@budibase/frontend-core 2.13.15 → 2.13.17

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.13.15",
3
+ "version": "2.13.17",
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.13.15",
10
- "@budibase/shared-core": "2.13.15",
9
+ "@budibase/bbui": "2.13.17",
10
+ "@budibase/shared-core": "2.13.17",
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": "8ada75c2f51c6ddff52676944b0d6e9395ea1c0b"
16
+ "gitHead": "d700bb57d466691e2f0b4f8c6c1664a3c76efa81"
17
17
  }
package/src/api/user.js CHANGED
@@ -214,15 +214,23 @@ export const buildUserEndpoints = API => ({
214
214
  inviteUsers: async users => {
215
215
  return await API.post({
216
216
  url: "/api/global/users/multi/invite",
217
- body: users.map(user => ({
218
- email: user.email,
219
- userInfo: {
220
- admin: user.admin ? { global: true } : undefined,
221
- builder: user.admin || user.builder ? { global: true } : undefined,
222
- userGroups: user.groups,
223
- roles: user.apps ? user.apps : undefined,
224
- },
225
- })),
217
+ body: users.map(user => {
218
+ let builder = undefined
219
+ if (user.admin || user.builder) {
220
+ builder = { global: true }
221
+ } else if (user.creator) {
222
+ builder = { creator: true }
223
+ }
224
+ return {
225
+ email: user.email,
226
+ userInfo: {
227
+ admin: user.admin ? { global: true } : undefined,
228
+ builder,
229
+ userGroups: user.groups,
230
+ roles: user.apps ? user.apps : undefined,
231
+ },
232
+ }
233
+ }),
226
234
  })
227
235
  },
228
236
 
@@ -55,11 +55,20 @@ export const deriveStores = context => {
55
55
 
56
56
  // Apply whitelist if specified
57
57
  if ($columnWhitelist?.length) {
58
- Object.keys(enrichedSchema).forEach(key => {
59
- if (!$columnWhitelist.includes(key)) {
60
- delete enrichedSchema[key]
58
+ const sortedColumns = {}
59
+
60
+ $columnWhitelist.forEach((columnKey, idx) => {
61
+ const enrichedColumn = enrichedSchema[columnKey]
62
+ if (enrichedColumn) {
63
+ sortedColumns[columnKey] = {
64
+ ...enrichedColumn,
65
+ order: idx,
66
+ visible: true,
67
+ }
61
68
  }
62
69
  })
70
+
71
+ return sortedColumns
63
72
  }
64
73
 
65
74
  return enrichedSchema
package/src/constants.js CHANGED
@@ -20,42 +20,31 @@ export const TableNames = {
20
20
  export const BudibaseRoles = {
21
21
  AppUser: "appUser",
22
22
  Developer: "developer",
23
+ Creator: "creator",
23
24
  Admin: "admin",
24
25
  }
25
26
 
26
27
  export const BudibaseRoleOptionsOld = [
27
- { label: "Developer", value: BudibaseRoles.Developer },
28
- { label: "Member", value: BudibaseRoles.AppUser },
29
- { label: "Admin", value: BudibaseRoles.Admin },
28
+ {
29
+ label: "Developer",
30
+ value: BudibaseRoles.Developer,
31
+ },
30
32
  ]
31
33
  export const BudibaseRoleOptions = [
32
- { label: "Member", value: BudibaseRoles.AppUser },
33
- { label: "Admin", value: BudibaseRoles.Admin },
34
- ]
35
-
36
- export const BudibaseRoleOptionsNew = [
37
34
  {
38
- label: "Admin",
39
- value: "admin",
35
+ label: "Account admin",
36
+ value: BudibaseRoles.Admin,
40
37
  subtitle: "Has full access to all apps and settings in your account",
41
38
  },
42
39
  {
43
- label: "Member",
44
- value: "appUser",
45
- subtitle: "Can only view apps they have access to",
40
+ label: "Creator",
41
+ value: BudibaseRoles.Creator,
42
+ subtitle: "Can create and edit apps they have access to",
46
43
  },
47
- ]
48
-
49
- export const BuilderRoleDescriptions = [
50
44
  {
45
+ label: "App user",
51
46
  value: BudibaseRoles.AppUser,
52
- icon: "User",
53
- label: "App user - Only has access to published apps",
54
- },
55
- {
56
- value: BudibaseRoles.Admin,
57
- icon: "Draw",
58
- label: "Admin - Full access",
47
+ subtitle: "Can only use published apps they have access to",
59
48
  },
60
49
  ]
61
50