@budibase/frontend-core 2.0.21 → 2.0.23
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/package.json +3 -3
- package/src/fetch/DataFetch.js +41 -41
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@budibase/frontend-core",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.23",
|
|
4
4
|
"description": "Budibase frontend core libraries used in builder and client",
|
|
5
5
|
"author": "Budibase",
|
|
6
6
|
"license": "MPL-2.0",
|
|
7
7
|
"svelte": "src/index.js",
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@budibase/bbui": "^2.0.
|
|
9
|
+
"@budibase/bbui": "^2.0.23",
|
|
10
10
|
"lodash": "^4.17.21",
|
|
11
11
|
"svelte": "^3.46.2"
|
|
12
12
|
},
|
|
13
|
-
"gitHead": "
|
|
13
|
+
"gitHead": "d185ab9bfc042deb6fdfba199667a70567548b77"
|
|
14
14
|
}
|
package/src/fetch/DataFetch.js
CHANGED
|
@@ -14,52 +14,52 @@ import { convertJSONSchemaToTableSchema } from "../utils/json"
|
|
|
14
14
|
* For other types of datasource, this class is overridden and extended.
|
|
15
15
|
*/
|
|
16
16
|
export default class DataFetch {
|
|
17
|
-
// API client
|
|
18
|
-
API = null
|
|
19
|
-
|
|
20
|
-
// Feature flags
|
|
21
|
-
featureStore = writable({
|
|
22
|
-
supportsSearch: false,
|
|
23
|
-
supportsSort: false,
|
|
24
|
-
supportsPagination: false,
|
|
25
|
-
})
|
|
26
|
-
|
|
27
|
-
// Config
|
|
28
|
-
options = {
|
|
29
|
-
datasource: null,
|
|
30
|
-
limit: 10,
|
|
31
|
-
|
|
32
|
-
// Search config
|
|
33
|
-
filter: null,
|
|
34
|
-
query: null,
|
|
35
|
-
|
|
36
|
-
// Sorting config
|
|
37
|
-
sortColumn: null,
|
|
38
|
-
sortOrder: "ascending",
|
|
39
|
-
sortType: null,
|
|
40
|
-
|
|
41
|
-
// Pagination config
|
|
42
|
-
paginate: true,
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
// State of the fetch
|
|
46
|
-
store = writable({
|
|
47
|
-
rows: [],
|
|
48
|
-
info: null,
|
|
49
|
-
schema: null,
|
|
50
|
-
loading: false,
|
|
51
|
-
loaded: false,
|
|
52
|
-
query: null,
|
|
53
|
-
pageNumber: 0,
|
|
54
|
-
cursor: null,
|
|
55
|
-
cursors: [],
|
|
56
|
-
})
|
|
57
|
-
|
|
58
17
|
/**
|
|
59
18
|
* Constructs a new DataFetch instance.
|
|
60
19
|
* @param opts the fetch options
|
|
61
20
|
*/
|
|
62
21
|
constructor(opts) {
|
|
22
|
+
// API client
|
|
23
|
+
this.API = null
|
|
24
|
+
|
|
25
|
+
// Feature flags
|
|
26
|
+
this.featureStore = writable({
|
|
27
|
+
supportsSearch: false,
|
|
28
|
+
supportsSort: false,
|
|
29
|
+
supportsPagination: false,
|
|
30
|
+
})
|
|
31
|
+
|
|
32
|
+
// Config
|
|
33
|
+
this.options = {
|
|
34
|
+
datasource: null,
|
|
35
|
+
limit: 10,
|
|
36
|
+
|
|
37
|
+
// Search config
|
|
38
|
+
filter: null,
|
|
39
|
+
query: null,
|
|
40
|
+
|
|
41
|
+
// Sorting config
|
|
42
|
+
sortColumn: null,
|
|
43
|
+
sortOrder: "ascending",
|
|
44
|
+
sortType: null,
|
|
45
|
+
|
|
46
|
+
// Pagination config
|
|
47
|
+
paginate: true,
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// State of the fetch
|
|
51
|
+
this.store = writable({
|
|
52
|
+
rows: [],
|
|
53
|
+
info: null,
|
|
54
|
+
schema: null,
|
|
55
|
+
loading: false,
|
|
56
|
+
loaded: false,
|
|
57
|
+
query: null,
|
|
58
|
+
pageNumber: 0,
|
|
59
|
+
cursor: null,
|
|
60
|
+
cursors: [],
|
|
61
|
+
})
|
|
62
|
+
|
|
63
63
|
// Merge options with their default values
|
|
64
64
|
this.API = opts?.API
|
|
65
65
|
this.options = {
|