@enso-ui/ui 6.2.7 → 7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/bulma/index.js +2 -2
- package/package.json +34 -31
- package/renderless/index.js +2 -2
- package/src/bulma/components/AppFooter.vue +11 -11
- package/src/bulma/components/Breadcrumbs.vue +32 -5
- package/src/bulma/components/VueAside.vue +7 -11
- package/src/bulma/components/menu/Sidebar.vue +26 -10
- package/src/bulma/components/navbar/AppUpdate.vue +38 -14
- package/src/bulma/components/navbar/Navbar.vue +17 -15
- package/src/bulma/components/navbar/NavbarItem.vue +2 -4
- package/src/bulma/components/navbar/Search.vue +6 -5
- package/src/bulma/components/navbar/SettingsControl.vue +6 -5
- package/src/bulma/components/settings/Settings.vue +17 -3
- package/src/bulma/components/settings/SidebarState.vue +1 -2
- package/src/bulma/layouts/Default.vue +8 -22
- package/src/bulma/pages/MaintenanceMode.vue +5 -7
- package/src/bulma/pages/NotFound.vue +6 -5
- package/src/bulma/pages/Unauthorized.vue +5 -4
- package/src/bulma/styles/components/form.scss +151 -0
- package/src/bulma/styles/components/tables.scss +695 -0
- package/src/bulma/styles/components/vue-filter.scss +173 -0
- package/src/bulma/styles/components.sass +3 -0
- package/src/core/Root.vue +26 -7
- package/src/core/app.js +1 -1
- package/src/core/components/AppFooter.vue +2 -6
- package/src/core/components/DocumentTitle.vue +8 -3
- package/src/core/components/PageHeader.vue +7 -3
- package/src/core/components/menu/Sidebar.vue +2 -6
- package/src/core/components/navbar/Navbar.vue +17 -19
- package/src/core/components/navbar/Search.vue +10 -3
- package/src/core/components/navbar/SettingsControl.vue +4 -2
- package/src/core/components/settings/Settings.vue +6 -20
- package/src/core/components/settings/SidebarState.vue +5 -7
- package/src/core/layouts/Default.vue +96 -65
- package/src/core/layouts/Home.vue +27 -28
- package/src/core/services/contexts.js +51 -11
- package/src/core/services/errorHandler.js +4 -4
- package/src/core/services/pinia.js +7 -0
- package/src/core/services/resources.js +22 -17
- package/src/core/services/router.js +2 -3
- package/src/icons.js +8 -2
- package/src/middleware/before/auth.js +9 -5
- package/src/middleware/before/guest.js +6 -2
- package/src/middleware/before.js +5 -4
- package/src/modules/importers/routeImporter.js +23 -0
- package/src/modules/plugins/bootEnums.js +10 -1
- package/src/modules/plugins/date-fns/format.js +11 -6
- package/src/modules/plugins/date-fns/formatDistance.js +2 -2
- package/src/modules/plugins/i18n.js +7 -5
- package/src/modules/plugins/route.js +3 -3
- package/src/pinia/app.js +75 -0
- package/src/pinia/layout.js +115 -0
- package/src/pinia/loadState.js +78 -0
- package/src/pinia/preferences.js +90 -0
- package/src/pinia/websockets.js +48 -0
- package/src/core/services/store.js +0 -26
- package/src/modules/importers/storeImporter.js +0 -8
- package/src/modules/importers/themeImporter.js +0 -5
- package/src/modules/store/layout/navbar.js +0 -8
- package/src/modules/store/layout/settings.js +0 -7
- package/src/modules/store/layout/sidebar.js +0 -22
- package/src/modules/store/layout.js +0 -72
- package/src/modules/store/preferences.js +0 -80
- package/src/modules/store/websockets.js +0 -39
- package/src/modules/store.js +0 -115
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import Echo from 'laravel-echo';
|
|
2
|
-
import Pusher from 'pusher-js';
|
|
3
|
-
|
|
4
|
-
const initEcho = ({ authEndpoint, pusher }, csrfToken) => window
|
|
5
|
-
.Echo = new Echo({
|
|
6
|
-
broadcaster: 'pusher',
|
|
7
|
-
key: pusher.key,
|
|
8
|
-
cluster: pusher.options.cluster,
|
|
9
|
-
useTLS: pusher.options.useTLS,
|
|
10
|
-
namespace: 'App.Events',
|
|
11
|
-
csrfToken: csrfToken,
|
|
12
|
-
authEndpoint: authEndpoint,
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
export const state = {
|
|
16
|
-
authEndpoint: null,
|
|
17
|
-
channels: null,
|
|
18
|
-
pusher: null,
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export const getters = {
|
|
22
|
-
channels: state => state.channels,
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
export const mutations = {
|
|
26
|
-
configure: (state, config) => {
|
|
27
|
-
state.channels = config.channels;
|
|
28
|
-
state.pusher = config.pusher;
|
|
29
|
-
state.authEndpoint = config.authEndpoint;
|
|
30
|
-
},
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
export const actions = {
|
|
34
|
-
connect: async ({ state, rootState }) => {
|
|
35
|
-
if (!window.Echo) {
|
|
36
|
-
await initEcho(state, rootState.meta.csrfToken);
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
};
|
package/src/modules/store.js
DELETED
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import axios from 'axios';
|
|
2
|
-
import App from '../core/app';
|
|
3
|
-
import Sentry from './sentry';
|
|
4
|
-
import router from '../core/services/router';
|
|
5
|
-
import storeImporter from './importers/storeImporter';
|
|
6
|
-
import bootEnums from './plugins/bootEnums';
|
|
7
|
-
import i18n from './plugins/i18n';
|
|
8
|
-
import eventBus from '../core/services/eventBus';
|
|
9
|
-
|
|
10
|
-
const modules = storeImporter(require.context('./store', false, /.*\.js$/));
|
|
11
|
-
|
|
12
|
-
const state = {
|
|
13
|
-
appState: false,
|
|
14
|
-
appUpdate: false,
|
|
15
|
-
enums: {},
|
|
16
|
-
guestState: false,
|
|
17
|
-
impersonating: null,
|
|
18
|
-
meta: {},
|
|
19
|
-
requests: [],
|
|
20
|
-
routes: {},
|
|
21
|
-
showQuote: false,
|
|
22
|
-
user: {},
|
|
23
|
-
avatarKey: 1,
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
const getters = {
|
|
27
|
-
route: state => router.currentRoute.value,
|
|
28
|
-
routes: state => Object.keys(state.routes),
|
|
29
|
-
isWebview: () => typeof ReactNativeWebView !== 'undefined',
|
|
30
|
-
requests: state => state.requests.length,
|
|
31
|
-
requestIndex: state => ({ url, method }) => state.requests
|
|
32
|
-
.findIndex(request => method === request.method && url === request.url),
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
const mutations = {
|
|
36
|
-
addRequest: (state, { method, url }) => state.requests.push({ method, url }),
|
|
37
|
-
appState: (state, value) => state.appState = value,
|
|
38
|
-
guestState: (state, value) => state.guestState = value,
|
|
39
|
-
newRelease: state => state.appUpdate = true,
|
|
40
|
-
removeRequest: (state, index) => state.requests.splice(index, 1),
|
|
41
|
-
setDefaultRoute: (state, route) => router.addRoute({
|
|
42
|
-
name: 'default',
|
|
43
|
-
path: '/',
|
|
44
|
-
redirect: { name: route },
|
|
45
|
-
}),
|
|
46
|
-
setEnums: (state, enums) => state.enums = bootEnums(enums, i18n),
|
|
47
|
-
setImpersonating: (state, impersonating) => state.impersonating = impersonating,
|
|
48
|
-
setMeta: (state, meta) => state.meta = meta,
|
|
49
|
-
setPageTitle: (state, title) => state.meta.pageTitle = title,
|
|
50
|
-
setRoutes: (state, routes) => state.routes = routes,
|
|
51
|
-
setShowQuote: (state, value) => state.showQuote = value,
|
|
52
|
-
setUser: (state, user) => state.user = user,
|
|
53
|
-
updateAvatar: state => state.avatarKey++,
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
const actions = {
|
|
57
|
-
loadAppState({ state, commit, dispatch }) {
|
|
58
|
-
commit('appState', false);
|
|
59
|
-
|
|
60
|
-
axios.get('/api/core/home').then(({ data }) => {
|
|
61
|
-
data.forEach(({ mutation, state }) => commit(mutation, state));
|
|
62
|
-
|
|
63
|
-
commit('layout/sidebar/update', state.preferences.global.expandedSidebar);
|
|
64
|
-
window.Laravel = state.meta.csrfToken;
|
|
65
|
-
|
|
66
|
-
if (state.meta.sentryDsn) {
|
|
67
|
-
const sentry = new Sentry(App.instance, App.router);
|
|
68
|
-
sentry.init(state);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
eventBus.$emit('app-state-loaded');
|
|
72
|
-
|
|
73
|
-
dispatch('layout/setTheme').then(() => commit('appState', true));
|
|
74
|
-
|
|
75
|
-
if (state.meta.env === 'local') {
|
|
76
|
-
window.http = axios;
|
|
77
|
-
}
|
|
78
|
-
}).catch(error => {
|
|
79
|
-
if (error.response && error.response.status === 401) {
|
|
80
|
-
commit('auth/logout');
|
|
81
|
-
router.push({ name: 'login' });
|
|
82
|
-
} else {
|
|
83
|
-
throw error;
|
|
84
|
-
}
|
|
85
|
-
});
|
|
86
|
-
},
|
|
87
|
-
loadGuestState({ commit, getters }) {
|
|
88
|
-
axios.get('/api/meta', {
|
|
89
|
-
params: { locale: localStorage.getItem('locale') },
|
|
90
|
-
}).then(({ data }) => {
|
|
91
|
-
const { meta, i18n, routes } = data;
|
|
92
|
-
const lang = Object.keys(i18n).shift();
|
|
93
|
-
|
|
94
|
-
commit('localisation/setI18n', i18n);
|
|
95
|
-
commit('preferences/lang', lang);
|
|
96
|
-
commit('setMeta', meta);
|
|
97
|
-
commit('setRoutes', routes);
|
|
98
|
-
commit('guestState', true);
|
|
99
|
-
|
|
100
|
-
const loginRoutes = ['login', 'password.email', 'password.reset'];
|
|
101
|
-
|
|
102
|
-
if (! getters.route || !loginRoutes.includes(getters.route.name)) {
|
|
103
|
-
router.push({ name: 'login' });
|
|
104
|
-
}
|
|
105
|
-
});
|
|
106
|
-
},
|
|
107
|
-
setPageTitle({ commit }, title) {
|
|
108
|
-
commit('setPageTitle', title);
|
|
109
|
-
commit('bookmarks/title', title);
|
|
110
|
-
},
|
|
111
|
-
};
|
|
112
|
-
|
|
113
|
-
export {
|
|
114
|
-
modules, state, getters, mutations, actions,
|
|
115
|
-
};
|