@budibase/frontend-core 2.11.20 → 2.11.22

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,17 +1,17 @@
1
1
  {
2
2
  "name": "@budibase/frontend-core",
3
- "version": "2.11.20",
3
+ "version": "2.11.22",
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.11.20",
10
- "@budibase/shared-core": "2.11.20",
9
+ "@budibase/bbui": "2.11.22",
10
+ "@budibase/shared-core": "2.11.22",
11
11
  "dayjs": "^1.10.8",
12
12
  "lodash": "^4.17.21",
13
13
  "socket.io-client": "^4.6.1",
14
14
  "svelte": "^3.46.2"
15
15
  },
16
- "gitHead": "4932aa97e4b694d1a61804f38327001ce9894118"
16
+ "gitHead": "53594cab9d1b2820cc186e321701d41168214aae"
17
17
  }
@@ -1,7 +1,7 @@
1
1
  <script>
2
2
  import { getContext } from "svelte"
3
3
  import RelationshipCell from "./RelationshipCell.svelte"
4
- import { FieldSubtype } from "@budibase/types"
4
+ import { FieldSubtype, RelationshipType } from "@budibase/types"
5
5
 
6
6
  export let api
7
7
 
@@ -12,10 +12,14 @@
12
12
  ...$$props.schema,
13
13
  // This is not really used, just adding some content to be able to render the relationship cell
14
14
  tableId: "external",
15
+ relationshipType:
16
+ subtype === FieldSubtype.USER
17
+ ? RelationshipType.ONE_TO_MANY
18
+ : RelationshipType.MANY_TO_MANY,
15
19
  }
16
20
 
17
21
  async function searchFunction(searchParams) {
18
- if (subtype !== FieldSubtype.USER) {
22
+ if (subtype !== FieldSubtype.USER && subtype !== FieldSubtype.USERS) {
19
23
  throw `Search for '${subtype}' not implemented`
20
24
  }
21
25
 
@@ -1,7 +1,8 @@
1
1
  <script>
2
2
  import { getContext, onMount, tick } from "svelte"
3
- import GridCell from "./GridCell.svelte"
3
+ import { canBeDisplayColumn } from "@budibase/shared-core"
4
4
  import { Icon, Popover, Menu, MenuItem, clickOutside } from "@budibase/bbui"
5
+ import GridCell from "./GridCell.svelte"
5
6
  import { getColumnIcon } from "../lib/utils"
6
7
 
7
8
  export let column
@@ -24,14 +25,6 @@
24
25
  datasource,
25
26
  } = getContext("grid")
26
27
 
27
- const bannedDisplayColumnTypes = [
28
- "link",
29
- "array",
30
- "attachment",
31
- "boolean",
32
- "json",
33
- ]
34
-
35
28
  let anchor
36
29
  let open = false
37
30
  let editIsOpen = false
@@ -231,8 +224,7 @@
231
224
  <MenuItem
232
225
  icon="Label"
233
226
  on:click={makeDisplayColumn}
234
- disabled={idx === "sticky" ||
235
- bannedDisplayColumnTypes.includes(column.schema.type)}
227
+ disabled={idx === "sticky" || !canBeDisplayColumn(column.schema.type)}
236
228
  >
237
229
  Use as display column
238
230
  </MenuItem>
@@ -21,6 +21,7 @@ const TypeIconMap = {
21
21
  bigint: "TagBold",
22
22
  bb_reference: {
23
23
  user: "User",
24
+ users: "UserGroup",
24
25
  },
25
26
  }
26
27