Merge branch 'develop' into feature/758.

This commit is contained in:
mateuswetah 2023-03-13 11:41:24 -03:00
commit c5f8617222
12 changed files with 52 additions and 27 deletions

36
package-lock.json generated
View File

@ -3028,11 +3028,6 @@
}
}
},
"@vue/devtools-api": {
"version": "6.5.0",
"resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-6.5.0.tgz",
"integrity": "sha512-o9KfBeaBmCKl10usN4crU53fYtC1r7jJwdGKjPT24t348rHxgfpZ0xL3Xm/gLUYnc0oTp8LAmrxOeLyu6tbk2Q=="
},
"@webassemblyjs/ast": {
"version": "1.11.1",
"resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz",
@ -4129,6 +4124,12 @@
"assert-plus": "^1.0.0"
}
},
"de-indent": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/de-indent/-/de-indent-1.0.2.tgz",
"integrity": "sha512-e/1zu3xH5MQryN2zdVaF0OrdNLUbvWxzMbi+iNA6Bky7l1RoP8a2fIbRocyHclXt/arDrrR6lL3TqFD9pMQTsg==",
"dev": true
},
"debug": {
"version": "4.3.2",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz",
@ -5219,6 +5220,12 @@
"integrity": "sha512-fUs4B4L+mlt8/XAtSOGMUO1TXmAelItBPtJG7CyHJfYTdDjwisntGO2JQz7oUsatOY9o68+57eziUVNw/mRHmA==",
"dev": true
},
"he": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",
"integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==",
"dev": true
},
"hosted-git-info": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz",
@ -8139,6 +8146,16 @@
}
}
},
"vue-template-compiler": {
"version": "2.7.14",
"resolved": "https://registry.npmjs.org/vue-template-compiler/-/vue-template-compiler-2.7.14.tgz",
"integrity": "sha512-zyA5Y3ArvVG0NacJDkkzJuPQDF8RFeRlzV2vLeSnhSpieO6LK2OVbdLPi5MPPs09Ii+gMO8nY4S3iKQxBxDmWQ==",
"dev": true,
"requires": {
"de-indent": "^1.0.2",
"he": "^1.2.0"
}
},
"vue-template-es2015-compiler": {
"version": "1.9.1",
"resolved": "https://registry.npmjs.org/vue-template-es2015-compiler/-/vue-template-es2015-compiler-1.9.1.tgz",
@ -8164,12 +8181,9 @@
}
},
"vuex": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/vuex/-/vuex-4.1.0.tgz",
"integrity": "sha512-hmV6UerDrPcgbSy9ORAtNXDr9M4wlNP4pEFKye4ujJF8oqgFFuxDCdOLS3eNoRTtq5O3hoBDh9Doj1bQMYHRbQ==",
"requires": {
"@vue/devtools-api": "^6.0.0-beta.11"
}
"version": "3.6.2",
"resolved": "https://registry.npmjs.org/vuex/-/vuex-3.6.2.tgz",
"integrity": "sha512-ETW44IqCgBpVomy520DT5jf8n0zoCac+sxWnn+hMe/CzaSejb/eVw2YToiXYX+Ex/AuHHia28vWTq4goAexFbw=="
},
"watchpack": {
"version": "2.4.0",

View File

@ -28,7 +28,7 @@
"react-dom": "^17.0.2",
"swiper": "^8.4.5",
"t": "^0.5.1",
"vue": "^2.7.14",
"vue": "^2.6.14",
"vue-apexcharts": "^1.6.2",
"vue-blurhash": "^0.1.4",
"vue-countup-v2": "^4.0.0",
@ -36,7 +36,7 @@
"vue-the-mask": "^0.11.1",
"vue2-leaflet": "^2.7.1",
"vuedraggable": "^2.24.3",
"vuex": "^4.1.0"
"vuex": "^3.6.2"
},
"devDependencies": {
"@babel/core": "^7.21.0",
@ -60,6 +60,7 @@
"style-loader": "^3.3.1",
"terser-webpack-plugin": "5.3.7",
"vue-loader": "^15.10.1",
"vue-template-compiler": "^2.6.14",
"webpack": "^5.76.0",
"webpack-bundle-analyzer": "^4.8.0",
"webpack-cli": "^5.0.1",

View File

@ -86,7 +86,7 @@ import TainacanFiltersList from '../components/filter-types/tainacan-filter-item
import AdminPage from '../admin.vue'
import HelpButton from '../components/other/help-button.vue';
import TainacanTitle from '../components/navigation/tainacan-title.vue';
import { store } from './store/store';
import store from './store/store';
import router from './router';
import eventBusSearch from './event-bus-search';
import eventBusTermsList from './event-bus-terms-list.js';
@ -261,7 +261,6 @@ export default (element) => {
// Event bus are needed to facilate comunication between child-parent-child components
Vue.use(eventBusTermsList, {});
Vue.use(eventBusMetadataList, {});
Vue.use(store);
Vue.use(eventBusSearch, { store: store, router: router});
// Changing title of pages

View File

@ -1,5 +1,5 @@
import Vue from 'vue';
import { store } from './store/store'
import store from './store/store'
export const eventBusItemMetadata = new Vue({
store,

View File

@ -1,4 +1,5 @@
import { createStore } from 'vuex';
import Vue from 'vue';
import Vuex from 'vuex';
import item from './modules/item';
import collection from './modules/collection';
@ -15,7 +16,11 @@ import exposer from './modules/exposer';
import capability from './modules/capability';
import report from './modules/report';
export const store = new createStore({
// Vue Dev Tools!
Vue.config.devtools = TAINACAN_ENV === 'development';
Vue.use(Vuex);
export default new Vuex.Store({
/*
In strict mode, whenever Vuex state is mutated outside of mutation handlers, an error will be thrown
@ -40,4 +45,4 @@ export const store = new createStore({
capability,
report
}
});
})

View File

@ -852,6 +852,8 @@
created() {
this.isRepositoryLevel = (this.collectionId == undefined || this.collectionId == '' || this.collectionId == null);
this.$eventBusSearch.updateStoreFromURL();
// Sets initial variables important to searchbus
if (this.collectionId != undefined)
this.$eventBusSearch.setCollectionId(this.collectionId);
@ -887,8 +889,6 @@
}
}
this.$eventBusSearch.updateStoreFromURL();
this.$eventBusSearch.$on('isLoadingItems', isLoadingItems => {
this.isLoadingItems = isLoadingItems;

View File

@ -54,7 +54,7 @@ import ViewModeList from './theme-search/components/view-mode-list.vue';
import ViewModeMap from './theme-search/components/view-mode-map.vue';
// Remaining imports
import { store } from '../../../admin/js/store/store';
import store from '../../../admin/js/store/store';
import routerTheme from './theme-search/js/theme-router.js';
import eventBusSearch from '../../../admin/js/event-bus-search';
import {

View File

@ -97,6 +97,12 @@ export default function ({ attributes, setAttributes, className }) {
backgroundColor = 'rgb(' + backgroundColor.rgb.r + ',' + backgroundColor.rgb.g + ',' + backgroundColor.rgb.b + ')';
}
// Sets some defaults that were not working
if (isLayoutSteps === undefined) {
isLayoutSteps = false;
setAttributes({ isLayoutSteps: isLayoutSteps });
}
function openCollectionModal() {
isCollectionModalOpen = true;
setAttributes( {

View File

@ -86,7 +86,7 @@ export default function({ attributes, className }) {
terms-agreement-message={ termsAgreementMessageHTML }
item-link-button-label={ itemLinkButtonLabel ? itemLinkButtonLabel : __( 'Go to the item page', 'tainacan' ) }
help-info-bellow-label={ helpInfoBellowLabel ? helpInfoBellowLabel.toString() : 'false' }
is-layout-steps={ isLayoutSteps.toString() } >
is-layout-steps={ isLayoutSteps !== undefined ? isLayoutSteps.toString() : 'false' } >
</div>
</div>
};

View File

@ -46,7 +46,7 @@ import ItemSubmission from './theme.vue';
import TainacanFormItem from '../../../admin/components/metadata-types/tainacan-form-item.vue';
import TermCreationPanel from './item-submission/components/term-creation-panel.vue';
import HelpButton from '../../../admin/components/other/help-button.vue';
import { store } from '../../../admin/js/store/store';
import store from '../../../admin/js/store/store';
import { I18NPlugin, UserPrefsPlugin, RouterHelperPlugin, ConsolePlugin, StatusHelperPlugin, CommentsStatusHelperPlugin, AdminOptionsHelperPlugin } from '../../../admin/js/admin-utilities';
import { ThumbnailHelperPlugin } from '../../../admin/js/utilities';

View File

@ -1,5 +1,5 @@
import Vue from 'vue';
import { store } from '../../admin/js/store/store';
import store from '../../admin/js/store/store';
import router from './reports-router';
import { Snackbar, Modal } from 'buefy';
import VueApexCharts from 'vue-apexcharts';

View File

@ -1,5 +1,5 @@
import Vue from 'vue';
import { store } from '../../admin/js/store/store';
import store from '../../admin/js/store/store';
import router from './roles-router';
import VTooltip from 'floating-vue';
import { Snackbar, Modal } from 'buefy';