@budibase/frontend-core 2.8.6-alpha.6 → 2.8.7
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 +4 -4
- package/src/api/index.js +0 -2
- package/src/components/UserAvatar.svelte +3 -5
- package/src/components/grid/cells/HeaderCell.svelte +2 -6
- package/src/components/grid/cells/RelationshipCell.svelte +1 -1
- package/src/components/grid/lib/utils.js +0 -1
- package/src/components/grid/overlays/ResizeOverlay.svelte +9 -2
- package/src/components/grid/stores/users.js +2 -3
- package/src/fetch/DataFetch.js +1 -1
- package/src/utils/download.js +0 -23
- package/src/utils/index.js +1 -1
- package/src/api/logs.js +0 -14
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@budibase/frontend-core",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.7",
|
|
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.8.
|
|
10
|
-
"@budibase/shared-core": "2.8.
|
|
9
|
+
"@budibase/bbui": "2.8.7",
|
|
10
|
+
"@budibase/shared-core": "2.8.7",
|
|
11
11
|
"dayjs": "^1.11.7",
|
|
12
12
|
"lodash": "^4.17.21",
|
|
13
13
|
"socket.io-client": "^4.6.1",
|
|
14
14
|
"svelte": "^3.46.2"
|
|
15
15
|
},
|
|
16
|
-
"gitHead": "
|
|
16
|
+
"gitHead": "206e88894f65fc2454852193c86ad07ec1040e24"
|
|
17
17
|
}
|
package/src/api/index.js
CHANGED
|
@@ -30,7 +30,6 @@ import { buildBackupsEndpoints } from "./backups"
|
|
|
30
30
|
import { buildEnvironmentVariableEndpoints } from "./environmentVariables"
|
|
31
31
|
import { buildEventEndpoints } from "./events"
|
|
32
32
|
import { buildAuditLogsEndpoints } from "./auditLogs"
|
|
33
|
-
import { buildLogsEndpoints } from "./logs"
|
|
34
33
|
|
|
35
34
|
/**
|
|
36
35
|
* Random identifier to uniquely identify a session in a tab. This is
|
|
@@ -278,6 +277,5 @@ export const createAPIClient = config => {
|
|
|
278
277
|
...buildEnvironmentVariableEndpoints(API),
|
|
279
278
|
...buildEventEndpoints(API),
|
|
280
279
|
...buildAuditLogsEndpoints(API),
|
|
281
|
-
...buildLogsEndpoints(API),
|
|
282
280
|
}
|
|
283
281
|
}
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
<Tooltip
|
|
34
34
|
direction={tooltipDirection}
|
|
35
35
|
textWrapping
|
|
36
|
-
text={
|
|
36
|
+
text={user.email}
|
|
37
37
|
size="S"
|
|
38
38
|
/>
|
|
39
39
|
</div>
|
|
@@ -46,15 +46,13 @@
|
|
|
46
46
|
position: relative;
|
|
47
47
|
}
|
|
48
48
|
.tooltip {
|
|
49
|
+
display: none;
|
|
49
50
|
position: absolute;
|
|
50
51
|
top: 0;
|
|
51
52
|
left: 50%;
|
|
52
53
|
white-space: nowrap;
|
|
53
|
-
pointer-events: none;
|
|
54
|
-
opacity: 0;
|
|
55
|
-
transition: opacity 130ms ease-out;
|
|
56
54
|
}
|
|
57
55
|
.user-avatar:hover .tooltip {
|
|
58
|
-
|
|
56
|
+
display: block;
|
|
59
57
|
}
|
|
60
58
|
</style>
|
|
@@ -37,12 +37,8 @@
|
|
|
37
37
|
$: sortedBy = column.name === $sort.column
|
|
38
38
|
$: canMoveLeft = orderable && idx > 0
|
|
39
39
|
$: canMoveRight = orderable && idx < $renderedColumns.length - 1
|
|
40
|
-
$: ascendingLabel =
|
|
41
|
-
|
|
42
|
-
: "A-Z"
|
|
43
|
-
$: descendingLabel = ["number", "bigint"].includes(column.schema?.type)
|
|
44
|
-
? "high-low"
|
|
45
|
-
: "Z-A"
|
|
40
|
+
$: ascendingLabel = column.schema?.type === "number" ? "low-high" : "A-Z"
|
|
41
|
+
$: descendingLabel = column.schema?.type === "number" ? "high-low" : "Z-A"
|
|
46
42
|
|
|
47
43
|
const editColumn = () => {
|
|
48
44
|
dispatch("edit-column", column.schema)
|
|
@@ -258,7 +258,7 @@
|
|
|
258
258
|
class:wrap={editable || contentLines > 1}
|
|
259
259
|
on:wheel={e => (focused ? e.stopPropagation() : null)}
|
|
260
260
|
>
|
|
261
|
-
{#each value || [] as relationship}
|
|
261
|
+
{#each value || [] as relationship, idx}
|
|
262
262
|
{#if relationship.primaryDisplay}
|
|
263
263
|
<div class="badge">
|
|
264
264
|
<span
|
|
@@ -2,9 +2,16 @@
|
|
|
2
2
|
import { getContext } from "svelte"
|
|
3
3
|
import { GutterWidth } from "../lib/constants"
|
|
4
4
|
|
|
5
|
-
const {
|
|
6
|
-
|
|
5
|
+
const {
|
|
6
|
+
columns,
|
|
7
|
+
resize,
|
|
8
|
+
renderedColumns,
|
|
9
|
+
stickyColumn,
|
|
10
|
+
isReordering,
|
|
11
|
+
scrollLeft,
|
|
12
|
+
} = getContext("grid")
|
|
7
13
|
|
|
14
|
+
$: cutoff = $scrollLeft + GutterWidth + ($columns[0]?.width || 0)
|
|
8
15
|
$: offset = GutterWidth + ($stickyColumn?.width || 0)
|
|
9
16
|
$: activeColumn = $resize.column
|
|
10
17
|
|
|
@@ -30,9 +30,8 @@ export const deriveStores = context => {
|
|
|
30
30
|
([$users, $focusedCellId]) => {
|
|
31
31
|
let map = {}
|
|
32
32
|
$users.forEach(user => {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
map[cellId] = user
|
|
33
|
+
if (user.focusedCellId && user.focusedCellId !== $focusedCellId) {
|
|
34
|
+
map[user.focusedCellId] = user
|
|
36
35
|
}
|
|
37
36
|
})
|
|
38
37
|
return map
|
package/src/fetch/DataFetch.js
CHANGED
|
@@ -155,7 +155,7 @@ export default class DataFetch {
|
|
|
155
155
|
let sortType = "string"
|
|
156
156
|
if (sortColumn) {
|
|
157
157
|
const type = schema?.[sortColumn]?.type
|
|
158
|
-
sortType = type === "number"
|
|
158
|
+
sortType = type === "number" ? "number" : "string"
|
|
159
159
|
}
|
|
160
160
|
this.options.sortType = sortType
|
|
161
161
|
|
package/src/utils/download.js
CHANGED
|
@@ -11,26 +11,3 @@ export function downloadText(filename, text) {
|
|
|
11
11
|
|
|
12
12
|
URL.revokeObjectURL(url)
|
|
13
13
|
}
|
|
14
|
-
|
|
15
|
-
export async function downloadStream(streamResponse) {
|
|
16
|
-
const blob = await streamResponse.blob()
|
|
17
|
-
|
|
18
|
-
const contentDisposition = streamResponse.headers.get("Content-Disposition")
|
|
19
|
-
|
|
20
|
-
const matches = /filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/.exec(
|
|
21
|
-
contentDisposition
|
|
22
|
-
)
|
|
23
|
-
|
|
24
|
-
const filename = matches[1].replace(/['"]/g, "")
|
|
25
|
-
|
|
26
|
-
const resBlob = new Blob([blob])
|
|
27
|
-
|
|
28
|
-
const blobUrl = URL.createObjectURL(resBlob)
|
|
29
|
-
|
|
30
|
-
const link = document.createElement("a")
|
|
31
|
-
link.href = blobUrl
|
|
32
|
-
link.download = filename
|
|
33
|
-
link.click()
|
|
34
|
-
|
|
35
|
-
URL.revokeObjectURL(blobUrl)
|
|
36
|
-
}
|
package/src/utils/index.js
CHANGED
package/src/api/logs.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export const buildLogsEndpoints = API => ({
|
|
2
|
-
/**
|
|
3
|
-
* Gets a stream for the system logs.
|
|
4
|
-
*/
|
|
5
|
-
getSystemLogs: async () => {
|
|
6
|
-
return await API.get({
|
|
7
|
-
url: "/api/system/logs",
|
|
8
|
-
json: false,
|
|
9
|
-
parseResponse: async response => {
|
|
10
|
-
return response
|
|
11
|
-
},
|
|
12
|
-
})
|
|
13
|
-
},
|
|
14
|
-
})
|