From 6c3869cb0f8a5f36f9dfd7e6d3ca1e939f264888 Mon Sep 17 00:00:00 2001 From: mateuswetah Date: Mon, 14 Aug 2023 17:58:59 -0300 Subject: [PATCH] Uses modelValue on Buefy components. Begins refactor from VueDraggable to Sortable. #794. --- package-lock.json | 35 +- package.json | 7 +- .../edition/collection-edition-form.vue | 63 +- .../edition/exporter-edition-form.vue | 14 +- .../edition/filter-edition-form.vue | 21 +- .../edition/importer-edition-form.vue | 10 +- .../edition/importer-mapping-form.vue | 24 +- .../edition/item-bulk-edition-form.vue | 15 +- .../components/edition/item-edition-form.vue | 11 +- .../edition/metadata-section-edition-form.vue | 24 +- .../edition/metadatum-edition-form.vue | 44 +- .../edition/taxonomy-edition-form.vue | 18 +- .../components/edition/term-edition-form.vue | 17 +- .../autocomplete/Autocomplete.vue | 4 +- .../filter-types/checkbox/Checkbox.vue | 4 +- .../date-interval/DateInterval.vue | 8 +- .../components/filter-types/date/Date.vue | 33 +- .../components/filter-types/date/FormDate.vue | 4 +- .../numeric-interval/FormNumericInterval.vue | 8 +- .../numeric-interval/NumericInterval.vue | 8 +- .../FormNumericListInterval.vue | 16 +- .../NumericListInterval.vue | 4 +- .../filter-types/numeric/FormNumeric.vue | 8 +- .../filter-types/numeric/Numeric.vue | 29 +- .../filter-types/selectbox/Selectbox.vue | 8 +- .../filter-types/taginput/Taginput.vue | 2 +- .../filter-types/tainacan-filter-item.vue | 64 +- .../filter-types/taxonomy/Checkbox.vue | 4 +- .../filter-types/taxonomy/Taginput.vue | 2 +- .../components/lists/attachments-list.vue | 4 +- .../lists/collection-metadata-list.vue | 880 +++++++++--------- .../components/lists/collections-list.vue | 21 +- .../admin/components/lists/items-list.vue | 41 +- .../lists/metadata-mapping-list.vue | 18 +- .../components/lists/metadata-types-list.vue | 231 ++--- .../admin/components/lists/processes-list.vue | 21 +- .../components/lists/related-items-list.vue | 4 +- .../lists/repository-metadata-list.vue | 395 ++++---- .../components/lists/taxonomies-list.vue | 21 +- .../lists/terms-list-hierarchical.vue | 4 +- .../admin/components/lists/terms-list.vue | 40 +- .../compound/child-metadata-list.vue | 416 +++++---- .../components/metadata-types/date/Date.vue | 20 +- .../geocoordinate/FormGeoCoordinate.vue | 16 +- .../geocoordinate/GeoCoordinate.vue | 8 +- .../metadata-types/numeric/FormNumeric.vue | 8 +- .../metadata-types/numeric/Numeric.vue | 4 +- .../relationship/FormRelationship.vue | 20 +- .../relationship/Relationship.vue | 8 +- .../selectbox/FormSelectbox.vue | 8 +- .../metadata-types/selectbox/Selectbox.vue | 4 +- .../metadata-types/taxonomy/FormTaxonomy.vue | 32 +- .../metadata-types/taxonomy/Taxonomy.vue | 2 +- .../taxonomy/TaxonomyTaginput.vue | 2 +- .../metadata-types/text/FormText.vue | 4 +- .../components/metadata-types/text/Text.vue | 8 +- .../metadata-types/textarea/Textarea.vue | 4 +- .../metadata-types/user/FormUser.vue | 4 +- .../components/metadata-types/user/User.vue | 4 +- .../modals/activity-details-modal.vue | 2 +- .../modals/available-exporters-modal.vue | 2 +- .../modals/available-importers-modal.vue | 2 +- .../components/modals/bulk-edition-modal.vue | 12 +- .../modals/capability-edition-modal.vue | 8 +- .../modals/collection-creation-modal.vue | 4 +- .../components/modals/collections-modal.vue | 2 +- .../components/modals/exposers-modal.vue | 4 +- .../modals/item-document-text-modal.vue | 2 +- .../modals/item-document-url-modal.vue | 10 +- .../components/navigation/tainacan-header.vue | 4 +- .../other/checkbox-radio-filter-input.vue | 20 +- .../other/checkbox-radio-metadata-input.vue | 16 +- .../admin/components/other/custom-dialog.vue | 2 +- .../components/other/item-copy-dialog.vue | 4 +- .../other/item-creation-status-dialog.vue | 2 +- .../components/other/processes-popup.vue | 7 +- .../components/other/term-deletion-dialog.vue | 4 +- .../other/term-multiple-insertion-dialog.vue | 12 +- .../other/term-parent-selection-dialog.vue | 8 +- .../components/search/advanced-search.vue | 28 +- .../components/search/filters-items-list.vue | 6 +- .../components/search/filters-tags-list.vue | 6 +- .../admin/components/search/pagination.vue | 25 +- src/views/admin/js/admin-main.js | 16 +- src/views/admin/js/event-bus-item-metadata.js | 4 +- src/views/admin/js/event-bus-metadata-list.js | 25 - src/views/admin/js/event-bus-search.js | 671 +++++-------- src/views/admin/pages/home-page.vue | 2 +- .../admin/pages/lists/activities-page.vue | 28 +- .../pages/lists/available-exporters-page.vue | 2 +- .../pages/lists/available-importers-page.vue | 2 +- .../admin/pages/lists/capabilities-page.vue | 4 +- .../admin/pages/lists/collections-page.vue | 107 ++- src/views/admin/pages/lists/filters-page.vue | 404 ++++---- src/views/admin/pages/lists/items-page.vue | 350 +++++-- src/views/admin/pages/lists/metadata-page.vue | 3 +- .../admin/pages/lists/taxonomies-page.vue | 47 +- .../admin/pages/singles/collection-page.vue | 1 - src/views/admin/pages/singles/item-page.vue | 6 +- .../carousel-collections-list/theme.vue | 2 - .../blocks/carousel-items-list/theme.vue | 4 +- .../blocks/carousel-terms-list/theme.vue | 4 +- .../theme-search/components/view-mode-map.vue | 2 +- .../components/view-mode-slideshow.vue | 2 +- .../theme-search/theme-items-page.vue | 151 +-- .../components/term-creation-panel.vue | 15 +- .../item-submission/item-submission-form.vue | 28 +- 107 files changed, 2458 insertions(+), 2375 deletions(-) delete mode 100644 src/views/admin/js/event-bus-metadata-list.js diff --git a/package-lock.json b/package-lock.json index 4efa7fafb..dd74cf9ce 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1610,9 +1610,9 @@ } }, "@ntohq/buefy-next": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/@ntohq/buefy-next/-/buefy-next-0.1.0.tgz", - "integrity": "sha512-47kqY9zl/kqw72AwHA2lLk44BFgQDvGnGyWrLmxsS88RpH8Dhw3ECH4+fPK+CYSIsL6V6og13BtxWG//nlpKzA==", + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@ntohq/buefy-next/-/buefy-next-0.1.1.tgz", + "integrity": "sha512-5ZX1S9bhLqPFEmkmZeaUCRg289Ui/k3mT2qKQQ2p8ihTTCsW2ozXTcpcV3wmwsf81kPjT90ykU18u2ve92M2fA==", "requires": { "@babel/runtime": "7.18.9", "bulma": "0.9.4" @@ -5846,9 +5846,9 @@ } }, "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==" }, "type-fest": { "version": "0.6.0", @@ -6433,9 +6433,18 @@ } }, "sortablejs": { - "version": "1.14.0", - "resolved": "https://registry.npmjs.org/sortablejs/-/sortablejs-1.14.0.tgz", - "integrity": "sha512-pBXvQCs5/33fdN1/39pPL0NZF20LeRbLQ5jtnheIPN9JQAaufGjKdWduZn4U7wCtVuzKhmRkI0DFYHYRbB2H1w==" + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/sortablejs/-/sortablejs-1.15.0.tgz", + "integrity": "sha512-bv9qgVMjUMf89wAvM6AxVvS/4MX3sPeN0+agqShejLU5z5GX4C75ow1O2e5k4L6XItUyAK3gH6AxSbXrOM5e8w==" + }, + "sortablejs-vue3": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/sortablejs-vue3/-/sortablejs-vue3-1.2.9.tgz", + "integrity": "sha512-l0IIBdu+nRIwC2+KOkiavXw5vRfsn6MIPVSVSf7ItBevcuRZ4mVzC7dgnr/Hs/VPH2Q+nF2PYP3FsrnrG+7qCw==", + "requires": { + "sortablejs": "^1.15.0", + "vue": "^3.2.37" + } }, "source-map": { "version": "0.7.4", @@ -7127,14 +7136,6 @@ "resolved": "https://registry.npmjs.org/vue3-apexcharts/-/vue3-apexcharts-1.4.4.tgz", "integrity": "sha512-TH89uZrxGjaDvkaYAISvj8+k6Bf1rUKFillc8oJirs5XZEPiwM1ELKZQ786wz0rfPqkSHHny2lqqUCK7Rw+LcQ==" }, - "vuedraggable": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/vuedraggable/-/vuedraggable-4.1.0.tgz", - "integrity": "sha512-FU5HCWBmsf20GpP3eudURW3WdWTKIbEIQxh9/8GE806hydR9qZqRRxRE3RjqX7PkuLuMQG/A7n3cfj9rCEchww==", - "requires": { - "sortablejs": "1.14.0" - } - }, "vuex": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/vuex/-/vuex-4.1.0.tgz", diff --git a/package.json b/package.json index 395683276..d4ed608a9 100644 --- a/package.json +++ b/package.json @@ -8,13 +8,13 @@ "build-prod": "cross-env NODE_ENV=production webpack --config webpack.prod.js --progress --mode production" }, "dependencies": { + "@ntohq/buefy-next": "^0.1.1", "@vue-leaflet/vue-leaflet": "^0.10.1", "@vue/compat": "^3.3.4", "another-vue3-blurhash": "^0.0.1", "apexcharts": "^3.41.0", "axios": "^1.4.0", "blurhash": "^2.0.5", - "@ntohq/buefy-next": "^0.1.0", "bulma": "^0.9.4", "conditioner-core": "^2.3.3", "countup.js": "^2.7.0", @@ -30,13 +30,14 @@ "qs": "^6.11.2", "react": "^17.0.2", "react-dom": "^17.0.2", + "sortablejs": "^1.15.0", + "sortablejs-vue3": "^1.2.9", "swiper": "^8.4.5", "vue": "^3.3.4", - "vue3-apexcharts": "^1.4.4", "vue-countup-v3": "^1.3.0", "vue-router": "^4.2.4", "vue-the-mask": "^0.11.1", - "vuedraggable": "^4.1.0", + "vue3-apexcharts": "^1.4.4", "vuex": "^4.1.0" }, "devDependencies": { diff --git a/src/views/admin/components/edition/collection-edition-form.vue b/src/views/admin/components/edition/collection-edition-form.vue index b19198a44..e9ffc6054 100644 --- a/src/views/admin/components/edition/collection-edition-form.vue +++ b/src/views/admin/components/edition/collection-edition-form.vue @@ -26,7 +26,7 @@ @@ -53,7 +53,7 @@ type="textarea" rows="3" :placeholder="$i18n.get('instruction_collection_description')" - v-model:value="form.description" + v-model="form.description" @focus="clearErrors('description')"/> @@ -68,8 +68,8 @@ :message="$i18n.getHelperMessage('collections', 'slug')"/> @@ -88,7 +88,7 @@ + v-model="form.default_order">