@live-change/db-admin 0.8.63 → 0.8.64
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/front/src/Data.vue +10 -4
- package/front/src/ObjectEditor.vue +1 -1
- package/front/src/PathEditor.vue +10 -7
- package/package.json +11 -11
package/front/src/Data.vue
CHANGED
|
@@ -11,18 +11,24 @@
|
|
|
11
11
|
|
|
12
12
|
<working-zone>
|
|
13
13
|
|
|
14
|
-
<CreateObject v-if="write" :dbApi="dbApi" :write="write.result" class="mt-2" />
|
|
14
|
+
<CreateObject v-if="write && !write.empty" :dbApi="dbApi" :write="write.result" class="mt-2" />
|
|
15
15
|
|
|
16
16
|
<template v-if="read?.external?.includes('range')">
|
|
17
17
|
<DataRangeView v-if="read && write && remove" :key="'rangeView' + version"
|
|
18
|
-
:dbApi="dbApi"
|
|
18
|
+
:dbApi="dbApi"
|
|
19
|
+
:read="read.result"
|
|
20
|
+
:write="!write.empty && write.result"
|
|
21
|
+
:remove="!remove.empty && remove.result" />
|
|
19
22
|
</template>
|
|
20
23
|
<template v-else>
|
|
21
24
|
<DataView v-if="read && write && remove" :key="'view' + version"
|
|
22
|
-
:dbApi="dbApi"
|
|
25
|
+
:dbApi="dbApi"
|
|
26
|
+
:read="read.result"
|
|
27
|
+
:write="!write.empty && write.result"
|
|
28
|
+
:remove="!remove.empty && remove.result" />
|
|
23
29
|
</template>
|
|
24
30
|
|
|
25
|
-
<CreateObject v-if="write" :dbApi="props.dbApi" :write="write.result" class="mt-2" />
|
|
31
|
+
<CreateObject v-if="write && !write.empty" :dbApi="props.dbApi" :write="write.result" class="mt-2" />
|
|
26
32
|
|
|
27
33
|
</working-zone>
|
|
28
34
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<div class="flex flex-row">
|
|
3
3
|
|
|
4
4
|
<div class="flex-grow-1 pt-1 pb-1 w-10rem">
|
|
5
|
-
<CodeEditor :readOnly="readOnly" :initialData="initialData" @result="result => handleEditResult(result)"
|
|
5
|
+
<CodeEditor :readOnly="readOnly || !write" :initialData="initialData" @result="result => handleEditResult(result)"
|
|
6
6
|
:ref="el => editorElementFound(el)" />
|
|
7
7
|
</div>
|
|
8
8
|
<div class="flex flex-column justify-content-end align-items-center">
|
package/front/src/PathEditor.vue
CHANGED
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
const path = reactive(JSON.parse(JSON.stringify(props.modelValue)))
|
|
78
78
|
|
|
79
79
|
watch(() => props.modelValue, value => {
|
|
80
|
-
if(JSON.stringify(path)
|
|
80
|
+
if(JSON.stringify(path) !== JSON.stringify(value)) {
|
|
81
81
|
path.read = value.read
|
|
82
82
|
path.write = value.write
|
|
83
83
|
path.remove = value.remove
|
|
@@ -142,13 +142,13 @@
|
|
|
142
142
|
|
|
143
143
|
watch(() => codeParams.value, params => {
|
|
144
144
|
for(const newParam of params) {
|
|
145
|
-
if(!path.params.find(p => p[0]
|
|
145
|
+
if(!path.params.find(p => p[0] === newParam)) {
|
|
146
146
|
path.params.push([newParam, ''])
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
149
|
const removedParams = []
|
|
150
150
|
for(const oldParam of path.params) {
|
|
151
|
-
if(!params.find(p => p
|
|
151
|
+
if(!params.find(p => p === oldParam[0]) && !oldParam[1]) {
|
|
152
152
|
removedParams.push(oldParam[0])
|
|
153
153
|
}
|
|
154
154
|
}
|
|
@@ -158,7 +158,7 @@
|
|
|
158
158
|
})
|
|
159
159
|
|
|
160
160
|
watch(() => output.value, value => {
|
|
161
|
-
if(JSON.stringify(props.modelValue)
|
|
161
|
+
if(JSON.stringify(props.modelValue) !== JSON.stringify(value)) {
|
|
162
162
|
console.log("EMIT OUTPUT!", JSON.stringify(props.modelValue), JSON.stringify(value))
|
|
163
163
|
emit('update:modelValue', output.value)
|
|
164
164
|
} else {
|
|
@@ -169,7 +169,8 @@
|
|
|
169
169
|
const readCompiled = computed(() => {
|
|
170
170
|
try {
|
|
171
171
|
const compiled = compilePath(path.read, path.params, ['range'])
|
|
172
|
-
return { ...compiled, example: compiled.result({ range: { } }, dbViewSugar)
|
|
172
|
+
return { ...compiled, example: compiled.result({ range: { } }, dbViewSugar), empty: path.read === 'false'
|
|
173
|
+
}
|
|
173
174
|
} catch (error) {
|
|
174
175
|
console.error("READ CODE ERROR", error)
|
|
175
176
|
return {
|
|
@@ -181,7 +182,8 @@
|
|
|
181
182
|
const writeCompiled = computed(() => {
|
|
182
183
|
try {
|
|
183
184
|
const compiled = compilePath(path.write, path.params, ['object'])
|
|
184
|
-
return { ...compiled, example: compiled.result({ object: { id: 'object' } }, dbRequestSugar)
|
|
185
|
+
return { ...compiled, example: compiled.result({ object: { id: 'object' } }, dbRequestSugar),
|
|
186
|
+
empty: path.write === 'false' }
|
|
185
187
|
} catch (error) {
|
|
186
188
|
console.error("WRITE CODE ERROR", error)
|
|
187
189
|
return {
|
|
@@ -193,7 +195,8 @@
|
|
|
193
195
|
const removeCompiled = computed(() => {
|
|
194
196
|
try {
|
|
195
197
|
const compiled = compilePath(path.remove, path.params, ['object'])
|
|
196
|
-
return { ...compiled, example: compiled.result({ object: { id: 'object' } }, dbRequestSugar)
|
|
198
|
+
return { ...compiled, example: compiled.result({ object: { id: 'object' } }, dbRequestSugar),
|
|
199
|
+
empty: path.remove === 'false' }
|
|
197
200
|
} catch (error) {
|
|
198
201
|
console.error("DELETE CODE ERROR", error)
|
|
199
202
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@live-change/db-admin",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.64",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"memDev": "node server/start.js memDev --initScript ./init.js --dbAccess",
|
|
6
6
|
"localDevInit": "rm tmp.db; lcli localDev --initScript ./init.js --dbAccess",
|
|
@@ -19,14 +19,14 @@
|
|
|
19
19
|
"type": "module",
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@fortawesome/fontawesome-free": "^6.5.2",
|
|
22
|
-
"@live-change/dao": "^0.8.
|
|
23
|
-
"@live-change/dao-message": "^0.8.
|
|
24
|
-
"@live-change/dao-sockjs": "^0.8.
|
|
25
|
-
"@live-change/dao-vue3": "^0.8.
|
|
26
|
-
"@live-change/dao-websocket": "^0.8.
|
|
27
|
-
"@live-change/framework": "^0.8.
|
|
28
|
-
"@live-change/vue3-components": "^0.8.
|
|
29
|
-
"@live-change/vue3-ssr": "^0.8.
|
|
22
|
+
"@live-change/dao": "^0.8.64",
|
|
23
|
+
"@live-change/dao-message": "^0.8.64",
|
|
24
|
+
"@live-change/dao-sockjs": "^0.8.64",
|
|
25
|
+
"@live-change/dao-vue3": "^0.8.64",
|
|
26
|
+
"@live-change/dao-websocket": "^0.8.64",
|
|
27
|
+
"@live-change/framework": "^0.8.64",
|
|
28
|
+
"@live-change/vue3-components": "^0.8.64",
|
|
29
|
+
"@live-change/vue3-ssr": "^0.8.64",
|
|
30
30
|
"@vitejs/plugin-vue": "^5.0.5",
|
|
31
31
|
"@vueuse/core": "^10.11.0",
|
|
32
32
|
"@vueuse/head": "^2.0.0",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"vue3-scroll-border": "0.1.6"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@live-change/codeceptjs-helper": "^0.8.
|
|
56
|
+
"@live-change/codeceptjs-helper": "^0.8.64",
|
|
57
57
|
"@wdio/selenium-standalone-service": "^8.15.0",
|
|
58
58
|
"codeceptjs": "^3.6.5",
|
|
59
59
|
"generate-password": "1.7.1",
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"author": "Michał Łaszczewski <michal@laszczewski.pl>",
|
|
67
67
|
"license": "ISC",
|
|
68
68
|
"description": "",
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "cf14b283170cd39b80a57865e9b5eb9cf2073f39"
|
|
70
70
|
}
|