Emit 'update-value' instead of 'input' events in Taxonomy, Relationship and GeoCoordinate form components.

This commit is contained in:
mateuswetah 2024-03-14 11:19:19 -03:00
parent 844cb743e4
commit c4ea79c406
5 changed files with 18 additions and 25 deletions

28
package-lock.json generated
View File

@ -3261,15 +3261,15 @@
"integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ=="
},
"cosmiconfig": {
"version": "8.3.6",
"resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.3.6.tgz",
"integrity": "sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA==",
"version": "9.0.0",
"resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-9.0.0.tgz",
"integrity": "sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==",
"dev": true,
"requires": {
"env-paths": "^2.2.1",
"import-fresh": "^3.3.0",
"js-yaml": "^4.1.0",
"parse-json": "^5.2.0",
"path-type": "^4.0.0"
"parse-json": "^5.2.0"
}
},
"countup.js": {
@ -5735,12 +5735,6 @@
"integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==",
"dev": true
},
"path-type": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz",
"integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==",
"dev": true
},
"photoswipe": {
"version": "5.4.3",
"resolved": "https://registry.npmjs.org/photoswipe/-/photoswipe-5.4.3.tgz",
@ -5823,14 +5817,14 @@
}
},
"postcss-loader": {
"version": "7.3.3",
"resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-7.3.3.tgz",
"integrity": "sha512-YgO/yhtevGO/vJePCQmTxiaEwER94LABZN0ZMT4A0vsak9TpO+RvKRs7EmJ8peIlB9xfXCsS7M8LjqncsUZ5HA==",
"version": "8.1.1",
"resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-8.1.1.tgz",
"integrity": "sha512-0IeqyAsG6tYiDRCYKQJLAmgQr47DX6N7sFSWvQxt6AcupX8DIdmykuk/o/tx0Lze3ErGHJEp5OSRxrelC6+NdQ==",
"dev": true,
"requires": {
"cosmiconfig": "^8.2.0",
"jiti": "^1.18.2",
"semver": "^7.3.8"
"cosmiconfig": "^9.0.0",
"jiti": "^1.20.0",
"semver": "^7.5.4"
}
},
"postcss-modules-extract-imports": {

View File

@ -59,7 +59,7 @@
"eslint-webpack-plugin": "^4.0.1",
"file-loader": "^6.2.0",
"moment-locales-webpack-plugin": "^1.2.0",
"postcss-loader": "7.3.3",
"postcss-loader": "8.1.1",
"sass-loader": "^13.3.2",
"style-loader": "^3.3.4",
"terser-webpack-plugin": "5.3.10",

View File

@ -76,7 +76,7 @@
props: {
value: [ String, Object, Array ]
},
emits: ['input'],
emits: ['update:value'],
data() {
return {
mapProvider: String,
@ -96,7 +96,7 @@
},
methods: {
emitValues(){
this.$emit('input',{
this.$emit('update:value',{
map_provider: this.mapProvider,
attribution: this.attribution,
initial_zoom: this.initialZoom,

View File

@ -148,7 +148,7 @@
metadatum: [ String, Object ],
errors: [ String, Object, Array ]
},
emits: ['input'],
emits: ['update:value'],
data(){
return {
icon: '',
@ -296,7 +296,7 @@
this.collectionMessage = '';
},
emitValues(){
this.$emit('input',{
this.$emit('update:value',{
collection_id: this.collection,
search: this.modelSearch,
display_in_related_items: this.modelDisplayInRelatedItems,

View File

@ -183,7 +183,7 @@
metadatum: [ String, Object ],
errors: [ String, Object, Array ]
},
emits: ['input'],
emits: ['update:value'],
data(){
return {
isReady: false,
@ -211,7 +211,6 @@
if ( this.metadatum && this.metadatum.multiple === 'no' ) {
let types = Object.keys( this.single_types );
let hasValue = this.value && this.value.input_type && types.indexOf( this.value.input_type ) >= 0;
if (hasValue)
this.setInputType(this.value.input_type)
else {
@ -327,7 +326,7 @@
this.taxonomyMessage = '';
},
emitValues(){
this.$emit('input',{
this.$emit('update:value',{
taxonomy_id: this.taxonomy_id,
input_type: this.input_type,
allow_new_terms: this.allow_new_terms,