@budibase/frontend-core 2.29.1 → 2.29.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/package.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@budibase/frontend-core",
|
|
3
|
-
"version": "2.29.
|
|
3
|
+
"version": "2.29.3",
|
|
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.29.
|
|
10
|
-
"@budibase/shared-core": "2.29.
|
|
11
|
-
"@budibase/types": "2.29.
|
|
9
|
+
"@budibase/bbui": "2.29.3",
|
|
10
|
+
"@budibase/shared-core": "2.29.3",
|
|
11
|
+
"@budibase/types": "2.29.3",
|
|
12
12
|
"dayjs": "^1.10.8",
|
|
13
13
|
"lodash": "4.17.21",
|
|
14
14
|
"shortid": "2.2.15",
|
|
15
15
|
"socket.io-client": "^4.6.1"
|
|
16
16
|
},
|
|
17
|
-
"gitHead": "
|
|
17
|
+
"gitHead": "c2cc9ed214200effd8e97b69a01a3ab0fe811cc3"
|
|
18
18
|
}
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
import FilterUsers from "./FilterUsers.svelte"
|
|
19
19
|
import { getFields } from "../utils/searchFields"
|
|
20
20
|
|
|
21
|
-
const { OperatorOptions } = Constants
|
|
21
|
+
const { OperatorOptions, DEFAULT_BB_DATASOURCE_ID } = Constants
|
|
22
22
|
|
|
23
23
|
export let schemaFields
|
|
24
24
|
export let filters = []
|
|
@@ -28,6 +28,23 @@
|
|
|
28
28
|
export let allowBindings = false
|
|
29
29
|
export let filtersLabel = "Filters"
|
|
30
30
|
|
|
31
|
+
$: {
|
|
32
|
+
if (
|
|
33
|
+
tables.find(
|
|
34
|
+
table =>
|
|
35
|
+
table._id === datasource.tableId &&
|
|
36
|
+
table.sourceId === DEFAULT_BB_DATASOURCE_ID
|
|
37
|
+
) &&
|
|
38
|
+
!schemaFields.some(field => field.name === "_id")
|
|
39
|
+
) {
|
|
40
|
+
schemaFields = [
|
|
41
|
+
...schemaFields,
|
|
42
|
+
{ name: "_id", type: "string" },
|
|
43
|
+
{ name: "_rev", type: "string" },
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
31
48
|
$: matchAny = filters?.find(filter => filter.operator === "allOr") != null
|
|
32
49
|
$: onEmptyFilter =
|
|
33
50
|
filters?.find(filter => filter.onEmptyFilter)?.onEmptyFilter ?? "all"
|
|
@@ -35,7 +52,6 @@
|
|
|
35
52
|
$: fieldFilters = filters.filter(
|
|
36
53
|
filter => filter.operator !== "allOr" && !filter.onEmptyFilter
|
|
37
54
|
)
|
|
38
|
-
|
|
39
55
|
const behaviourOptions = [
|
|
40
56
|
{ value: "and", label: "Match all filters" },
|
|
41
57
|
{ value: "or", label: "Match any filter" },
|
|
@@ -44,7 +60,6 @@
|
|
|
44
60
|
{ value: "all", label: "Return all table rows" },
|
|
45
61
|
{ value: "none", label: "Return no rows" },
|
|
46
62
|
]
|
|
47
|
-
|
|
48
63
|
const context = getContext("context")
|
|
49
64
|
|
|
50
65
|
$: fieldOptions = getFields(tables, schemaFields || [], {
|
package/src/constants.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Operator options for lucene queries
|
|
3
3
|
*/
|
|
4
|
-
export {
|
|
4
|
+
export {
|
|
5
|
+
OperatorOptions,
|
|
6
|
+
SqlNumberTypeRangeMap,
|
|
7
|
+
DEFAULT_BB_DATASOURCE_ID,
|
|
8
|
+
} from "@budibase/shared-core"
|
|
5
9
|
export { Feature as Features } from "@budibase/types"
|
|
6
10
|
import { BpmCorrelationKey } from "@budibase/shared-core"
|
|
7
11
|
import { FieldType, BBReferenceFieldSubType } from "@budibase/types"
|