@teselagen/ui 0.8.5 → 0.8.6-beta.3
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/DataTable/utils/filterLocalEntitiesToHasura.d.ts +5 -0
- package/DataTable/utils/initializeHasuraWhereAndFilter.d.ts +2 -0
- package/DataTable/utils/queryParams.d.ts +7 -14
- package/DataTable/utils/tableQueryParamsToHasuraClauses.d.ts +26 -0
- package/index.cjs.js +847 -973
- package/index.d.ts +1 -0
- package/index.es.js +847 -973
- package/package.json +1 -1
- package/src/DataTable/Columns.js +2 -2
- package/src/DataTable/DisplayOptions.js +1 -1
- package/src/DataTable/FilterAndSortMenu.js +27 -30
- package/src/DataTable/index.js +3 -14
- package/src/DataTable/style.css +1 -1
- package/src/DataTable/utils/filterLocalEntitiesToHasura.js +236 -0
- package/src/DataTable/utils/filterLocalEntitiesToHasura.test.js +587 -0
- package/src/DataTable/utils/initializeHasuraWhereAndFilter.js +26 -0
- package/src/DataTable/utils/queryParams.js +64 -772
- package/src/DataTable/utils/tableQueryParamsToHasuraClauses.js +260 -0
- package/src/DataTable/utils/tableQueryParamsToHasuraClauses.test.js +206 -0
- package/src/DataTable/utils/withTableParams.js +3 -16
- package/src/FormComponents/Uploader.js +5 -1
- package/src/FormComponents/index.js +2 -2
- package/src/autoTooltip.js +1 -0
- package/src/index.js +1 -0
- package/ui.css +1 -1
|
@@ -3,12 +3,6 @@ export function getMergedOpts(topLevel?: {}, instanceLevel?: {}): {
|
|
|
3
3
|
defaults: any;
|
|
4
4
|
formName: string;
|
|
5
5
|
};
|
|
6
|
-
/**
|
|
7
|
-
*
|
|
8
|
-
* @param {object} field
|
|
9
|
-
* @returns the camelCase display name of the field, to be used for filters, sorting, etc
|
|
10
|
-
*/
|
|
11
|
-
export function getCCDisplayName(field: object): string;
|
|
12
6
|
export function getCurrentParamsFromUrl(location: any, isSimple: any): any;
|
|
13
7
|
export function setCurrentParamsOnUrl(newParams: any, replace: any, isSimple: any): void;
|
|
14
8
|
export function makeDataTableHandlers({ setNewParams, defaults, onlyOneFilter }: {
|
|
@@ -25,34 +19,33 @@ export function makeDataTableHandlers({ setNewParams, defaults, onlyOneFilter }:
|
|
|
25
19
|
setOrder: (order: any, isRemove: any, shiftHeld: any) => any;
|
|
26
20
|
setNewParams: any;
|
|
27
21
|
};
|
|
28
|
-
export function getQueryParams({ currentParams,
|
|
22
|
+
export function getQueryParams({ currentParams, defaults, schema, isInfinite, entities, isLocalCall, additionalFilter, doNotCoercePageSize, noOrderError, ownProps }: {
|
|
29
23
|
currentParams: any;
|
|
30
|
-
urlConnected: any;
|
|
31
24
|
defaults: any;
|
|
32
25
|
schema: any;
|
|
33
26
|
isInfinite: any;
|
|
34
27
|
entities: any;
|
|
35
28
|
isLocalCall: any;
|
|
36
29
|
additionalFilter: any;
|
|
37
|
-
additionalOrFilter: any;
|
|
38
30
|
doNotCoercePageSize: any;
|
|
39
31
|
noOrderError: any;
|
|
40
|
-
isCodeModel: any;
|
|
41
32
|
ownProps: any;
|
|
42
33
|
}): {
|
|
43
34
|
page: any;
|
|
44
35
|
pageSize: any;
|
|
45
|
-
order: any;
|
|
36
|
+
order: any[];
|
|
46
37
|
filters: any;
|
|
47
38
|
searchTerm: any;
|
|
48
39
|
} | {
|
|
49
40
|
variables: {
|
|
50
|
-
|
|
41
|
+
where: {};
|
|
42
|
+
order_by: {};
|
|
43
|
+
limit: any;
|
|
44
|
+
offset: number;
|
|
51
45
|
};
|
|
52
|
-
errorParsingUrlString: unknown;
|
|
53
46
|
page: any;
|
|
54
47
|
pageSize: any;
|
|
55
|
-
order: any;
|
|
48
|
+
order: any[];
|
|
56
49
|
filters: any;
|
|
57
50
|
searchTerm: any;
|
|
58
51
|
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export function tableQueryParamsToHasuraClauses({ page, pageSize, searchTerm, filters, order, schema, additionalFilter }: {
|
|
2
|
+
page: any;
|
|
3
|
+
pageSize: any;
|
|
4
|
+
searchTerm: any;
|
|
5
|
+
filters: any;
|
|
6
|
+
order: any;
|
|
7
|
+
schema: any;
|
|
8
|
+
additionalFilter: any;
|
|
9
|
+
}): {
|
|
10
|
+
where: {};
|
|
11
|
+
order_by: {};
|
|
12
|
+
limit: any;
|
|
13
|
+
offset: number;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Takes a schema and returns an object with the fields mapped by their camelCased display name.
|
|
17
|
+
* If the displayName is not set or is a jsx element, the path is used instead.
|
|
18
|
+
* The same conversion must be done when using the result of this method
|
|
19
|
+
*/
|
|
20
|
+
export function getFieldsMappedByCCDisplayName(schema: any): any;
|
|
21
|
+
/**
|
|
22
|
+
*
|
|
23
|
+
* @param {object} field
|
|
24
|
+
* @returns the camelCase display name of the field, to be used for filters, sorting, etc
|
|
25
|
+
*/
|
|
26
|
+
export function getCCDisplayName(field: object): string;
|