@budibase/frontend-core 2.31.7 → 2.32.0

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.31.7",
3
+ "version": "2.32.0",
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.31.7",
10
- "@budibase/shared-core": "2.31.7",
11
- "@budibase/types": "2.31.7",
9
+ "@budibase/bbui": "2.32.0",
10
+ "@budibase/shared-core": "2.32.0",
11
+ "@budibase/types": "2.32.0",
12
12
  "dayjs": "^1.10.8",
13
13
  "lodash": "4.17.21",
14
14
  "shortid": "2.2.15",
15
15
  "socket.io-client": "^4.7.5"
16
16
  },
17
- "gitHead": "a98ce68410543e6721e2670081aaaa43b1f7d80a"
17
+ "gitHead": "d4559773a0cb8173869a2622e4905bcbc92f7f67"
18
18
  }
@@ -12,7 +12,7 @@
12
12
  export let columns
13
13
  export let fromRelationshipField
14
14
 
15
- const { datasource, dispatch, cache, config } = getContext("grid")
15
+ const { datasource, dispatch, config } = getContext("grid")
16
16
 
17
17
  $: canSetRelationshipSchemas = $config.canSetRelationshipSchemas
18
18
 
@@ -114,29 +114,19 @@
114
114
  return { ...c, options }
115
115
  })
116
116
 
117
- let relationshipPanelColumns = []
118
- async function fetchRelationshipPanelColumns(relationshipField) {
119
- relationshipPanelColumns = []
120
- if (!relationshipField) {
121
- return
117
+ $: relationshipPanelColumns = Object.entries(
118
+ relationshipField?.columns || {}
119
+ ).map(([name, column]) => {
120
+ return {
121
+ name: name,
122
+ label: name,
123
+ schema: {
124
+ type: column.type,
125
+ visible: column.visible,
126
+ readonly: column.readonly,
127
+ },
122
128
  }
123
-
124
- const table = await cache.actions.getTable(relationshipField.tableId)
125
- relationshipPanelColumns = Object.entries(
126
- relationshipField?.columns || {}
127
- ).map(([name, column]) => {
128
- return {
129
- name: name,
130
- label: name,
131
- schema: {
132
- type: table.schema[name].type,
133
- visible: column.visible,
134
- readonly: column.readonly,
135
- },
136
- }
137
- })
138
- }
139
- $: fetchRelationshipPanelColumns(relationshipField)
129
+ })
140
130
 
141
131
  async function toggleColumn(column, permission) {
142
132
  const visible = permission !== FieldPermissions.HIDDEN
@@ -219,7 +209,7 @@
219
209
  on:close={() => (relationshipFieldName = null)}
220
210
  open={relationshipFieldName}
221
211
  anchor={relationshipPanelAnchor}
222
- align="right-outside"
212
+ align="left"
223
213
  >
224
214
  {#if relationshipPanelColumns.length}
225
215
  <div class="relationship-header">
@@ -44,6 +44,7 @@
44
44
  {wrap}
45
45
  portalTarget="#{gridID} .grid-popover-container"
46
46
  offset={0}
47
+ clickOutsideOverride
47
48
  >
48
49
  <div
49
50
  class="grid-popover-contents"
package/src/constants.js CHANGED
@@ -76,7 +76,9 @@ export const ExtendedBudibaseRoleOptions = [
76
76
  value: BudibaseRoles.Owner,
77
77
  sortOrder: 0,
78
78
  },
79
- ].concat(BudibaseRoleOptions)
79
+ ]
80
+ .concat(BudibaseRoleOptions)
81
+ .concat(BudibaseRoleOptionsOld)
80
82
 
81
83
  export const PlanType = {
82
84
  FREE: "free",