@live-change/frontend-auto-form 0.9.46 → 0.9.47
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="flex flex-col-reverse md:flex-row justify-between items-center
|
|
2
|
+
<div class="flex flex-col-reverse md:flex-row justify-between items-center">
|
|
3
3
|
<div class="flex flex-col mt-2 md:mt-0">
|
|
4
4
|
<div v-if="savingDraft" class="text-surface-500 dark:text-surface-300 mr-2 flex flex-row items-center">
|
|
5
5
|
<i class="pi pi-spin pi-spinner mr-2" style="font-size: 1.23rem"></i>
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
|
|
36
36
|
import Message from "primevue/message"
|
|
37
37
|
|
|
38
|
-
import { ref, computed, onMounted, defineProps, defineEmits, toRefs, getCurrentInstance } from 'vue'
|
|
38
|
+
import { ref, computed, onMounted, defineProps, defineEmits, toRefs, getCurrentInstance, unref } from 'vue'
|
|
39
39
|
|
|
40
40
|
const props = defineProps({
|
|
41
41
|
editor: {
|
|
@@ -73,12 +73,14 @@
|
|
|
73
73
|
const validationResult = computed(() => {
|
|
74
74
|
const currentValue = {
|
|
75
75
|
...(editor.value.identifiers),
|
|
76
|
-
...(editor.value.value
|
|
76
|
+
...unref(editor.value.value),
|
|
77
77
|
}
|
|
78
78
|
const validationResult = validateData(model.value, currentValue, 'validation', appContext,
|
|
79
79
|
props.propName, props.rootValue, true)
|
|
80
80
|
const softValidationResult = validateData(model.value, currentValue, 'softValidation', appContext,
|
|
81
81
|
props.propName, props.rootValue, true)
|
|
82
|
+
console.log("currentValue", currentValue)
|
|
83
|
+
console.log("validationResult", validationResult, softValidationResult)
|
|
82
84
|
return validationResult || softValidationResult
|
|
83
85
|
})
|
|
84
86
|
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
|
|
97
97
|
import { editorData } from "@live-change/frontend-auto-form"
|
|
98
98
|
import { computedAsync } from "@vueuse/core"
|
|
99
|
-
import InjectedObjectIndentification from './InjectedObjectIndentification.vue'
|
|
99
|
+
import InjectedObjectIndentification from './InjectedObjectIndentification.vue'
|
|
100
100
|
|
|
101
101
|
const editor = computedAsync(async () => {
|
|
102
102
|
try {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useToast } from 'primevue/usetoast'
|
|
2
2
|
import { usePath, live, useApi } from '@live-change/vue3-ssr'
|
|
3
|
-
import { ref, computed, inject } from 'vue'
|
|
3
|
+
import { ref, computed, inject, watch } from 'vue'
|
|
4
4
|
import { synchronized, defaultData } from '@live-change/vue3-components'
|
|
5
5
|
|
|
6
6
|
export default function editorData(options) {
|
|
@@ -155,11 +155,15 @@ export default function editorData(options) {
|
|
|
155
155
|
toast.add({ severity: 'error', summary: saveDraftErrorToast, detail: e.message ?? e, life: 5000 })
|
|
156
156
|
}
|
|
157
157
|
})
|
|
158
|
-
|
|
159
158
|
const changed = computed(() =>
|
|
160
|
-
JSON.stringify(editableSavedData.value ?? {})
|
|
159
|
+
JSON.stringify(editableSavedData.value ?? {})
|
|
160
|
+
!== JSON.stringify({ ...synchronizedData.value.value, [timeField]: undefined })
|
|
161
|
+
)
|
|
162
|
+
|
|
161
163
|
const sourceChanged = computed(() =>
|
|
162
|
-
JSON.stringify(draftData.value.from)
|
|
164
|
+
JSON.stringify(draftData.value.from)
|
|
165
|
+
!== JSON.stringify({ ...synchronizedData.value.value, [timeField]: undefined })
|
|
166
|
+
)
|
|
163
167
|
|
|
164
168
|
async function save() {
|
|
165
169
|
const saveResult = await saveData(synchronizedData.value.value)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@live-change/frontend-auto-form",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.47",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"memDev": "node server/start.js memDev --enableSessions --initScript ./init.js --dbAccess",
|
|
6
6
|
"localDevInit": "rm tmp.db; lcli localDev --enableSessions --initScript ./init.js",
|
|
@@ -22,16 +22,16 @@
|
|
|
22
22
|
"type": "module",
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@fortawesome/fontawesome-free": "^6.7.2",
|
|
25
|
-
"@live-change/cli": "^0.9.
|
|
26
|
-
"@live-change/dao": "^0.9.
|
|
27
|
-
"@live-change/dao-vue3": "^0.9.
|
|
28
|
-
"@live-change/dao-websocket": "^0.9.
|
|
29
|
-
"@live-change/framework": "^0.9.
|
|
30
|
-
"@live-change/image-frontend": "^0.9.
|
|
31
|
-
"@live-change/image-service": "^0.9.
|
|
32
|
-
"@live-change/session-service": "^0.9.
|
|
33
|
-
"@live-change/vue3-components": "^0.9.
|
|
34
|
-
"@live-change/vue3-ssr": "^0.9.
|
|
25
|
+
"@live-change/cli": "^0.9.47",
|
|
26
|
+
"@live-change/dao": "^0.9.47",
|
|
27
|
+
"@live-change/dao-vue3": "^0.9.47",
|
|
28
|
+
"@live-change/dao-websocket": "^0.9.47",
|
|
29
|
+
"@live-change/framework": "^0.9.47",
|
|
30
|
+
"@live-change/image-frontend": "^0.9.47",
|
|
31
|
+
"@live-change/image-service": "^0.9.47",
|
|
32
|
+
"@live-change/session-service": "^0.9.47",
|
|
33
|
+
"@live-change/vue3-components": "^0.9.47",
|
|
34
|
+
"@live-change/vue3-ssr": "^0.9.47",
|
|
35
35
|
"@vueuse/core": "^12.3.0",
|
|
36
36
|
"codeceptjs-assert": "^0.0.5",
|
|
37
37
|
"compression": "^1.7.5",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"vue3-scroll-border": "0.1.6"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"@live-change/codeceptjs-helper": "^0.9.
|
|
55
|
+
"@live-change/codeceptjs-helper": "^0.9.47",
|
|
56
56
|
"codeceptjs": "^3.6.10",
|
|
57
57
|
"generate-password": "1.7.1",
|
|
58
58
|
"playwright": "1.49.1",
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"author": "Michał Łaszczewski <michal@laszczewski.pl>",
|
|
64
64
|
"license": "ISC",
|
|
65
65
|
"description": "",
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "5cafc5b8a200cebad9e0949109bf25ea095eab01"
|
|
67
67
|
}
|