@budibase/frontend-core 2.10.12-alpha.2 → 2.10.12
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.10.12
|
|
3
|
+
"version": "2.10.12",
|
|
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.10.12
|
|
10
|
-
"@budibase/shared-core": "2.10.12
|
|
11
|
-
"dayjs": "^1.
|
|
9
|
+
"@budibase/bbui": "2.10.12",
|
|
10
|
+
"@budibase/shared-core": "2.10.12",
|
|
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": "0bef7c146a9804d6e9fdfdfecba27a88e4e20fd7"
|
|
17
17
|
}
|
|
@@ -20,8 +20,6 @@
|
|
|
20
20
|
config,
|
|
21
21
|
ui,
|
|
22
22
|
columns,
|
|
23
|
-
definition,
|
|
24
|
-
datasource,
|
|
25
23
|
} = getContext("grid")
|
|
26
24
|
|
|
27
25
|
const bannedDisplayColumnTypes = [
|
|
@@ -120,33 +118,6 @@
|
|
|
120
118
|
open = false
|
|
121
119
|
}
|
|
122
120
|
|
|
123
|
-
const duplicateColumn = async () => {
|
|
124
|
-
open = false
|
|
125
|
-
|
|
126
|
-
// Generate new name
|
|
127
|
-
let newName = `${column.name} copy`
|
|
128
|
-
let attempts = 2
|
|
129
|
-
while ($definition.schema[newName]) {
|
|
130
|
-
newName = `${column.name} copy ${attempts++}`
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
// Save schema with new column
|
|
134
|
-
const existingColumnDefinition = $definition.schema[column.name]
|
|
135
|
-
await datasource.actions.saveDefinition({
|
|
136
|
-
...$definition,
|
|
137
|
-
schema: {
|
|
138
|
-
...$definition.schema,
|
|
139
|
-
[newName]: {
|
|
140
|
-
...existingColumnDefinition,
|
|
141
|
-
name: newName,
|
|
142
|
-
schema: {
|
|
143
|
-
...existingColumnDefinition.schema,
|
|
144
|
-
},
|
|
145
|
-
},
|
|
146
|
-
},
|
|
147
|
-
})
|
|
148
|
-
}
|
|
149
|
-
|
|
150
121
|
onMount(() => subscribe("close-edit-column", cancelEdit))
|
|
151
122
|
</script>
|
|
152
123
|
|
|
@@ -221,13 +192,6 @@
|
|
|
221
192
|
>
|
|
222
193
|
Edit column
|
|
223
194
|
</MenuItem>
|
|
224
|
-
<MenuItem
|
|
225
|
-
icon="Duplicate"
|
|
226
|
-
on:click={duplicateColumn}
|
|
227
|
-
disabled={!$config.canEditColumns}
|
|
228
|
-
>
|
|
229
|
-
Duplicate column
|
|
230
|
-
</MenuItem>
|
|
231
195
|
<MenuItem
|
|
232
196
|
icon="Label"
|
|
233
197
|
on:click={makeDisplayColumn}
|