@budibase/frontend-core 2.26.1 → 2.26.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.26.
|
|
3
|
+
"version": "2.26.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.26.
|
|
10
|
-
"@budibase/shared-core": "2.26.
|
|
11
|
-
"@budibase/types": "2.26.
|
|
9
|
+
"@budibase/bbui": "2.26.3",
|
|
10
|
+
"@budibase/shared-core": "2.26.3",
|
|
11
|
+
"@budibase/types": "2.26.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": "4be0c2e7f1698fe76235b87109a8c2e4a56c5470"
|
|
18
18
|
}
|
|
@@ -16,6 +16,8 @@
|
|
|
16
16
|
const { config, dispatch, selectedRows } = getContext("grid")
|
|
17
17
|
const svelteDispatch = createEventDispatcher()
|
|
18
18
|
|
|
19
|
+
$: selectionEnabled = $config.canSelectRows || $config.canDeleteRows
|
|
20
|
+
|
|
19
21
|
const select = e => {
|
|
20
22
|
e.stopPropagation()
|
|
21
23
|
svelteDispatch("select")
|
|
@@ -52,7 +54,7 @@
|
|
|
52
54
|
<div
|
|
53
55
|
on:click={select}
|
|
54
56
|
class="checkbox"
|
|
55
|
-
class:visible={
|
|
57
|
+
class:visible={selectionEnabled &&
|
|
56
58
|
(disableNumber || rowSelected || rowHovered || rowFocused)}
|
|
57
59
|
>
|
|
58
60
|
<Checkbox value={rowSelected} {disabled} />
|
|
@@ -60,7 +62,7 @@
|
|
|
60
62
|
{#if !disableNumber}
|
|
61
63
|
<div
|
|
62
64
|
class="number"
|
|
63
|
-
class:visible={
|
|
65
|
+
class:visible={!selectionEnabled ||
|
|
64
66
|
!(rowSelected || rowHovered || rowFocused)}
|
|
65
67
|
>
|
|
66
68
|
{row.__idx + 1}
|
|
@@ -117,19 +119,11 @@
|
|
|
117
119
|
.expand {
|
|
118
120
|
margin-right: 4px;
|
|
119
121
|
}
|
|
120
|
-
.expand
|
|
122
|
+
.expand:not(.visible),
|
|
123
|
+
.expand:not(.visible) :global(*) {
|
|
121
124
|
opacity: 0;
|
|
125
|
+
pointer-events: none !important;
|
|
122
126
|
}
|
|
123
|
-
.expand :global(.spectrum-Icon) {
|
|
124
|
-
pointer-events: none;
|
|
125
|
-
}
|
|
126
|
-
.expand.visible {
|
|
127
|
-
opacity: 1;
|
|
128
|
-
}
|
|
129
|
-
.expand.visible :global(.spectrum-Icon) {
|
|
130
|
-
pointer-events: all;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
127
|
.delete:hover {
|
|
134
128
|
cursor: pointer;
|
|
135
129
|
}
|
|
@@ -386,7 +386,7 @@
|
|
|
386
386
|
>
|
|
387
387
|
Hide column
|
|
388
388
|
</MenuItem>
|
|
389
|
-
{#if $config.canEditColumns && column.schema.type === "link" && column.schema.tableId === TableNames.USERS}
|
|
389
|
+
{#if $config.canEditColumns && column.schema.type === "link" && column.schema.tableId === TableNames.USERS && !column.schema.autocolumn}
|
|
390
390
|
<MenuItem icon="User" on:click={openMigrationModal}>
|
|
391
391
|
Migrate to user column
|
|
392
392
|
</MenuItem>
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
export let canDeleteRows = true
|
|
42
42
|
export let canEditColumns = true
|
|
43
43
|
export let canSaveSchema = true
|
|
44
|
+
export let canSelectRows = false
|
|
44
45
|
export let stripeRows = false
|
|
45
46
|
export let quiet = false
|
|
46
47
|
export let collaboration = true
|
|
@@ -94,6 +95,7 @@
|
|
|
94
95
|
canDeleteRows,
|
|
95
96
|
canEditColumns,
|
|
96
97
|
canSaveSchema,
|
|
98
|
+
canSelectRows,
|
|
97
99
|
stripeRows,
|
|
98
100
|
quiet,
|
|
99
101
|
collaboration,
|
|
@@ -5,11 +5,11 @@ import { TypeIconMap } from "../../../constants"
|
|
|
5
5
|
// using something very unusual to avoid this problem
|
|
6
6
|
const JOINING_CHARACTER = "‽‽"
|
|
7
7
|
|
|
8
|
-
export const parseCellID =
|
|
9
|
-
if (!
|
|
10
|
-
return undefined
|
|
8
|
+
export const parseCellID = cellId => {
|
|
9
|
+
if (!cellId) {
|
|
10
|
+
return { id: undefined, field: undefined }
|
|
11
11
|
}
|
|
12
|
-
const parts =
|
|
12
|
+
const parts = cellId.split(JOINING_CHARACTER)
|
|
13
13
|
const field = parts.pop()
|
|
14
14
|
return { id: parts.join(JOINING_CHARACTER), field }
|
|
15
15
|
}
|
|
@@ -110,12 +110,11 @@ export const deriveStores = context => {
|
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
export const createActions = context => {
|
|
113
|
-
const { focusedCellId,
|
|
113
|
+
const { focusedCellId, hoveredRowId } = context
|
|
114
114
|
|
|
115
115
|
// Callback when leaving the grid, deselecting all focussed or selected items
|
|
116
116
|
const blur = () => {
|
|
117
117
|
focusedCellId.set(null)
|
|
118
|
-
selectedRows.set({})
|
|
119
118
|
hoveredRowId.set(null)
|
|
120
119
|
}
|
|
121
120
|
|