@afeefa/vue-app 0.0.207 → 0.0.209
Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.209
|
package/package.json
CHANGED
@@ -240,9 +240,20 @@ export default class ARichTextArea extends Vue {
|
|
240
240
|
|
241
241
|
get currentValueStripped () {
|
242
242
|
if (this.editor) {
|
243
|
-
|
243
|
+
const value = this.editor.state.doc.textContent
|
244
|
+
return this.getSanitizedValue(value)
|
244
245
|
}
|
245
246
|
}
|
247
|
+
|
248
|
+
getSanitizedValue (value) {
|
249
|
+
if (this.validator) {
|
250
|
+
const sanitizers = this.validator.getSanitizers()
|
251
|
+
for (const sanitizer of sanitizers) {
|
252
|
+
value = sanitizer(value)
|
253
|
+
}
|
254
|
+
}
|
255
|
+
return value
|
256
|
+
}
|
246
257
|
}
|
247
258
|
</script>
|
248
259
|
|
@@ -40,12 +40,12 @@
|
|
40
40
|
</v-btn>
|
41
41
|
|
42
42
|
<edit-form-buttons
|
43
|
-
:changed="changed"
|
43
|
+
:changed="changed || _changed"
|
44
44
|
:valid="validFromOutside && valid"
|
45
45
|
angular
|
46
46
|
:has="{reset: reset && !!modelToEdit.id}"
|
47
47
|
@save="$emit('save', modelToEdit, ignoreChangesOnClose, close)"
|
48
|
-
@reset="
|
48
|
+
@reset="resetForm"
|
49
49
|
/>
|
50
50
|
</a-row>
|
51
51
|
</template>
|
@@ -61,11 +61,15 @@ import { Component, Vue, Watch } from '@a-vue'
|
|
61
61
|
import { DialogEvent } from '@a-vue/events'
|
62
62
|
|
63
63
|
@Component({
|
64
|
-
props: ['model', 'createModelToEdit', 'show', {reset: true, valid: true}]
|
64
|
+
props: ['model', 'createModelToEdit', 'show', {reset: true, valid: true, changed: false}]
|
65
65
|
})
|
66
66
|
export default class EditModal extends Vue {
|
67
67
|
show_ = false
|
68
68
|
|
69
|
+
get _changed () {
|
70
|
+
return this.changed
|
71
|
+
}
|
72
|
+
|
69
73
|
created () {
|
70
74
|
if (!this.model && !this.createModelToEdit) {
|
71
75
|
console.warn('You need to pass either a model or a model factory to <edit-modal>.')
|
@@ -146,5 +150,10 @@ export default class EditModal extends Vue {
|
|
146
150
|
resetChanged () {
|
147
151
|
this.$refs.form.resetChanged()
|
148
152
|
}
|
153
|
+
|
154
|
+
resetForm () {
|
155
|
+
this.$refs.form.reset()
|
156
|
+
this.$emit('reset')
|
157
|
+
}
|
149
158
|
}
|
150
159
|
</script>
|