Imports render function (h) and disables buefy temporaly on Roles.
This commit is contained in:
parent
80173eca90
commit
98b9578b83
|
@ -8,7 +8,9 @@
|
||||||
"build-prod": "cross-env NODE_ENV=production webpack --config webpack.prod.js --progress --mode production"
|
"build-prod": "cross-env NODE_ENV=production webpack --config webpack.prod.js --progress --mode production"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@vue-leaflet/vue-leaflet": "^0.10.1",
|
||||||
"@vue/compat": "^3.3.4",
|
"@vue/compat": "^3.3.4",
|
||||||
|
"another-vue3-blurhash": "^0.0.1",
|
||||||
"apexcharts": "^3.41.0",
|
"apexcharts": "^3.41.0",
|
||||||
"axios": "^1.4.0",
|
"axios": "^1.4.0",
|
||||||
"blurhash": "^2.0.5",
|
"blurhash": "^2.0.5",
|
||||||
|
@ -31,11 +33,9 @@
|
||||||
"swiper": "^8.4.5",
|
"swiper": "^8.4.5",
|
||||||
"vue": "^3.3.4",
|
"vue": "^3.3.4",
|
||||||
"vue-apexcharts": "^1.6.2",
|
"vue-apexcharts": "^1.6.2",
|
||||||
"another-vue3-blurhash": "^0.0.1",
|
|
||||||
"vue-countup-v3": "^1.3.0",
|
"vue-countup-v3": "^1.3.0",
|
||||||
"vue-router": "^4.2.4",
|
"vue-router": "^4.2.4",
|
||||||
"vue-the-mask": "^0.11.1",
|
"vue-the-mask": "^0.11.1",
|
||||||
"@vue-leaflet/vue-leaflet": "^0.10.1",
|
|
||||||
"vuedraggable": "^4.1.0",
|
"vuedraggable": "^4.1.0",
|
||||||
"vuex": "^4.1.0"
|
"vuex": "^4.1.0"
|
||||||
},
|
},
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
//window.underscore = _.noConflict();
|
//window.underscore = _.noConflict();
|
||||||
|
|
||||||
// Main imports
|
// Main imports
|
||||||
import { createApp } from 'vue';
|
import { createApp, h } from 'vue';
|
||||||
import {
|
import {
|
||||||
Field,
|
Field,
|
||||||
Input,
|
Input,
|
||||||
|
@ -103,7 +103,7 @@ export default (element) => {
|
||||||
el: '#tainacan-admin-app',
|
el: '#tainacan-admin-app',
|
||||||
router,
|
router,
|
||||||
store,
|
store,
|
||||||
render: h => h(AdminPage)
|
render: () => h(AdminPage)
|
||||||
});
|
});
|
||||||
|
|
||||||
app.use(router);
|
app.use(router);
|
||||||
|
@ -246,7 +246,7 @@ export default (element) => {
|
||||||
next();
|
next();
|
||||||
});
|
});
|
||||||
|
|
||||||
app.mount();
|
app.mount('#tainacan-admin-app');
|
||||||
|
|
||||||
// Initialize Ponyfill for Custom CSS properties
|
// Initialize Ponyfill for Custom CSS properties
|
||||||
cssVars({
|
cssVars({
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { createApp } from 'vue';
|
import { createApp, h } from 'vue';
|
||||||
import CarouselCollectionsListTheme from './theme.vue';
|
import CarouselCollectionsListTheme from './theme.vue';
|
||||||
import { ThumbnailHelperPlugin } from '../../../admin/js/utilities.js';
|
import { ThumbnailHelperPlugin } from '../../../admin/js/utilities.js';
|
||||||
import VueBlurHash from 'another-vue3-blurhash';
|
import VueBlurHash from 'another-vue3-blurhash';
|
||||||
|
@ -42,7 +42,7 @@ export default (element) => {
|
||||||
className: '',
|
className: '',
|
||||||
style: ''
|
style: ''
|
||||||
},
|
},
|
||||||
render(h) {
|
render() {
|
||||||
return h(CarouselCollectionsListTheme, {
|
return h(CarouselCollectionsListTheme, {
|
||||||
props: {
|
props: {
|
||||||
blockId: blockId,
|
blockId: blockId,
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { createApp } from 'vue';
|
import { createApp, h } from 'vue';
|
||||||
|
|
||||||
import CarouselItemsListTheme from './theme.vue';
|
import CarouselItemsListTheme from './theme.vue';
|
||||||
import { ThumbnailHelperPlugin } from '../../../admin/js/utilities.js';
|
import { ThumbnailHelperPlugin } from '../../../admin/js/utilities.js';
|
||||||
|
@ -48,7 +48,7 @@ export default (element) => {
|
||||||
className: '',
|
className: '',
|
||||||
style: ''
|
style: ''
|
||||||
},
|
},
|
||||||
render(h){
|
render(){
|
||||||
return h(CarouselItemsListTheme, {
|
return h(CarouselItemsListTheme, {
|
||||||
props: {
|
props: {
|
||||||
blockId: blockId,
|
blockId: blockId,
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { createApp } from 'vue';
|
import { createApp, h } from 'vue';
|
||||||
import CarouselTermsListTheme from './theme.vue';
|
import CarouselTermsListTheme from './theme.vue';
|
||||||
import { ThumbnailHelperPlugin } from '../../../admin/js/utilities.js';
|
import { ThumbnailHelperPlugin } from '../../../admin/js/utilities.js';
|
||||||
import VueBlurHash from 'another-vue3-blurhash';
|
import VueBlurHash from 'another-vue3-blurhash';
|
||||||
|
@ -43,7 +43,7 @@ export default (element) => {
|
||||||
taxonomyId: '',
|
taxonomyId: '',
|
||||||
style: ''
|
style: ''
|
||||||
},
|
},
|
||||||
render(h){
|
render(){
|
||||||
return h(CarouselTermsListTheme, {
|
return h(CarouselTermsListTheme, {
|
||||||
props: {
|
props: {
|
||||||
blockId: blockId,
|
blockId: blockId,
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { createApp } from 'vue';
|
import { createApp, h } from 'vue';
|
||||||
|
|
||||||
import DynamicItemsListTheme from './theme.vue';
|
import DynamicItemsListTheme from './theme.vue';
|
||||||
import { ThumbnailHelperPlugin } from '../../../admin/js/utilities.js';
|
import { ThumbnailHelperPlugin } from '../../../admin/js/utilities.js';
|
||||||
|
@ -54,7 +54,7 @@ export default (element) => {
|
||||||
className: '',
|
className: '',
|
||||||
style: ''
|
style: ''
|
||||||
},
|
},
|
||||||
render(h){
|
render(){
|
||||||
return h(DynamicItemsListTheme, {
|
return h(DynamicItemsListTheme, {
|
||||||
props: {
|
props: {
|
||||||
collectionId: this.collectionId,
|
collectionId: this.collectionId,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Main imports
|
// Main imports
|
||||||
import { createApp } from 'vue';
|
import { createApp, h } from 'vue';
|
||||||
import {
|
import {
|
||||||
Field,
|
Field,
|
||||||
Input,
|
Input,
|
||||||
|
@ -176,7 +176,7 @@ export default (element) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
render: h => h(ThemeSearch)
|
render: () => h(ThemeSearch)
|
||||||
});
|
});
|
||||||
|
|
||||||
VueItemsList.use(store);
|
VueItemsList.use(store);
|
||||||
|
@ -285,7 +285,7 @@ export default (element) => {
|
||||||
|
|
||||||
VueItemsList.use(eventBusSearch, { store: store, router: routerTheme });
|
VueItemsList.use(eventBusSearch, { store: store, router: routerTheme });
|
||||||
|
|
||||||
VueItemsList.mount();
|
VueItemsList.mount('#tainacan-items-page');
|
||||||
|
|
||||||
// Initialize Ponyfill for Custom CSS properties
|
// Initialize Ponyfill for Custom CSS properties
|
||||||
cssVars({
|
cssVars({
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { createApp } from 'vue';
|
import { createApp, h } from 'vue';
|
||||||
import FacetsListTheme from './theme.vue';
|
import FacetsListTheme from './theme.vue';
|
||||||
import FacetsListThemeUnit from './facet-unit.vue';
|
import FacetsListThemeUnit from './facet-unit.vue';
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ export default (element) => {
|
||||||
className: '',
|
className: '',
|
||||||
style: ''
|
style: ''
|
||||||
},
|
},
|
||||||
render(h){
|
render(){
|
||||||
return h(FacetsListTheme, {
|
return h(FacetsListTheme, {
|
||||||
props: {
|
props: {
|
||||||
metadatumId: this.metadatumId,
|
metadatumId: this.metadatumId,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Main imports
|
// Main imports
|
||||||
import { createApp } from 'vue';
|
import { createApp, h } from 'vue';
|
||||||
import {
|
import {
|
||||||
Field,
|
Field,
|
||||||
Numberinput,
|
Numberinput,
|
||||||
|
@ -152,7 +152,7 @@ export default (element) => {
|
||||||
return (value == true || value == 'true' || value == '1' || value == 1) ? true : false;
|
return (value == true || value == 'true' || value == '1' || value == 1) ? true : false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
render: h => h(ItemSubmission)
|
render: () => h(ItemSubmission)
|
||||||
});
|
});
|
||||||
|
|
||||||
VueItemSubmission.use(store);
|
VueItemSubmission.use(store);
|
||||||
|
@ -239,7 +239,7 @@ export default (element) => {
|
||||||
VueItemSubmission.component('term-creation-panel', TermCreationPanel);
|
VueItemSubmission.component('term-creation-panel', TermCreationPanel);
|
||||||
VueItemSubmission.component('help-button', HelpButton);
|
VueItemSubmission.component('help-button', HelpButton);
|
||||||
|
|
||||||
VueItemSubmission.mount();
|
VueItemSubmission.mount('#tainacan-item-submission-form');
|
||||||
|
|
||||||
// Initialize Ponyfill for Custom CSS properties
|
// Initialize Ponyfill for Custom CSS properties
|
||||||
cssVars({
|
cssVars({
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { createApp } from 'vue';
|
import { createApp, h } from 'vue';
|
||||||
import store from '../../admin/js/store/store';
|
import store from '../../admin/js/store/store';
|
||||||
import router from './reports-router';
|
import router from './reports-router';
|
||||||
import { Snackbar, Modal } from 'buefy';
|
import { Snackbar, Modal } from 'buefy';
|
||||||
|
@ -71,7 +71,7 @@ export default (element) => {
|
||||||
|
|
||||||
const VueReports = createApp({
|
const VueReports = createApp({
|
||||||
el: '#tainacan-reports-app',
|
el: '#tainacan-reports-app',
|
||||||
render: h => h(ReportsPage)
|
render: () => h(ReportsPage)
|
||||||
});
|
});
|
||||||
|
|
||||||
VueReports.use(store);
|
VueReports.use(store);
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import { createApp } from 'vue';
|
import { createApp, h } from 'vue';
|
||||||
import store from '../../admin/js/store/store';
|
import store from '../../admin/js/store/store';
|
||||||
import router from './roles-router';
|
import router from './roles-router';
|
||||||
import VTooltip from 'floating-vue';
|
import FloatingVue from 'floating-vue';
|
||||||
import { Snackbar, Modal } from 'buefy';
|
//import { Snackbar, Modal } from 'buefy';
|
||||||
|
|
||||||
import { I18NPlugin } from './wp-i18n-plugin';
|
import { I18NPlugin } from './wp-i18n-plugin';
|
||||||
|
|
||||||
|
@ -20,11 +20,11 @@ export default (element) => {
|
||||||
|
|
||||||
const VueRoles = createApp({
|
const VueRoles = createApp({
|
||||||
el: '#tainacan-roles-app',
|
el: '#tainacan-roles-app',
|
||||||
render: h => h(RolesPage)
|
render: () => h(RolesPage)
|
||||||
});
|
});
|
||||||
|
|
||||||
VueRoles.use(I18NPlugin);
|
VueRoles.use(I18NPlugin);
|
||||||
VueRoles.use(VTooltip, {
|
VueRoles.use(FloatingVue, {
|
||||||
popperTriggers: ['hover'],
|
popperTriggers: ['hover'],
|
||||||
themes: {
|
themes: {
|
||||||
'taianacan-tooltip': {
|
'taianacan-tooltip': {
|
||||||
|
@ -35,8 +35,8 @@ export default (element) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
VueRoles.use(Snackbar);
|
// VueRoles.use(Snackbar);
|
||||||
VueRoles.use(Modal);
|
// VueRoles.use(Modal);
|
||||||
|
|
||||||
// Changing title of pages
|
// Changing title of pages
|
||||||
router.beforeEach((to, from, next) => {
|
router.beforeEach((to, from, next) => {
|
||||||
|
@ -44,10 +44,11 @@ export default (element) => {
|
||||||
if (next() != undefined)
|
if (next() != undefined)
|
||||||
next();
|
next();
|
||||||
});
|
});
|
||||||
|
|
||||||
VueRoles.use(router);
|
VueRoles.use(router);
|
||||||
VueRoles.use(store);
|
VueRoles.use(store);
|
||||||
|
|
||||||
|
VueRoles.mount('#tainacan-roles-app');
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,9 @@
|
||||||
v-model="searchString">
|
v-model="searchString">
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div class="tablenav top">
|
<div
|
||||||
|
v-if="roles"
|
||||||
|
class="tablenav top">
|
||||||
<div class="align-left actions">
|
<div class="align-left actions">
|
||||||
<p>{{ $i18n.get('Create and edit roles for users') }}</p>
|
<p>{{ $i18n.get('Create and edit roles for users') }}</p>
|
||||||
</div>
|
</div>
|
||||||
|
@ -201,6 +203,7 @@
|
||||||
|
|
||||||
<div class="tablenav bottom">
|
<div class="tablenav bottom">
|
||||||
<div
|
<div
|
||||||
|
v-if="roles"
|
||||||
style="margin-left: auto;"
|
style="margin-left: auto;"
|
||||||
class="tablenav-pages one-page">
|
class="tablenav-pages one-page">
|
||||||
<span class="displaying-num">
|
<span class="displaying-num">
|
||||||
|
@ -230,7 +233,7 @@
|
||||||
roles() {
|
roles() {
|
||||||
let roles = this.getRoles();
|
let roles = this.getRoles();
|
||||||
|
|
||||||
if (this.searchString) {
|
if (this.searchString && roles) {
|
||||||
let searchedRoles = {}
|
let searchedRoles = {}
|
||||||
for (let [roleKey, role] of Object.entries(roles)) {
|
for (let [roleKey, role] of Object.entries(roles)) {
|
||||||
if (role.name.toLowerCase().match(this.searchString))
|
if (role.name.toLowerCase().match(this.searchString))
|
||||||
|
@ -239,7 +242,7 @@
|
||||||
roles = searchedRoles;
|
roles = searchedRoles;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.relatedEntities.length) {
|
if (this.relatedEntities.length && roles) {
|
||||||
let filteredRoles = {};
|
let filteredRoles = {};
|
||||||
for (let [roleKey, role] of Object.entries(roles)) {
|
for (let [roleKey, role] of Object.entries(roles)) {
|
||||||
for (let entity of this.relatedEntities) {
|
for (let entity of this.relatedEntities) {
|
||||||
|
@ -253,7 +256,7 @@
|
||||||
roles = filteredRoles;
|
roles = filteredRoles;
|
||||||
}
|
}
|
||||||
|
|
||||||
return roles;
|
return roles ? roles : {};
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div
|
<div class="has-mounted wrap">
|
||||||
id="tainacan-roles-app"
|
|
||||||
class="has-mounted wrap">
|
|
||||||
<router-view />
|
<router-view />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -106,7 +106,9 @@ module.exports = {
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
new webpack.DefinePlugin({
|
new webpack.DefinePlugin({
|
||||||
'TAINACAN_ENV': JSON.stringify(process.env.NODE_ENV)
|
'TAINACAN_ENV': JSON.stringify(process.env.NODE_ENV),
|
||||||
|
__VUE_OPTIONS_API__: true,
|
||||||
|
__VUE_PROD_DEVTOOLS__: true,
|
||||||
}),
|
}),
|
||||||
new VueLoaderPlugin({
|
new VueLoaderPlugin({
|
||||||
prettify: false
|
prettify: false
|
||||||
|
|
Loading…
Reference in New Issue