@cortezaproject/corteza-vue 2021.9.7 → 2022.3.0-dev.2
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/README.md +16 -16
- package/dist/components/c3/C3.d.ts +5 -0
- package/dist/components/index.d.ts +3 -2
- package/dist/components/input/index.d.ts +3 -2
- package/dist/components/itemPicker/C3.d.ts +1 -0
- package/dist/components/itemPicker/CItemPicker.c3.d.ts +32 -0
- package/dist/components/itemPicker/index.d.ts +1 -1
- package/dist/components/reporter/index.d.ts +4 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.es.js +1774 -639
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +1774 -638
- package/dist/index.js.map +1 -1
- package/dist/libs/filter.d.ts +3 -1
- package/dist/plugins/auth.d.ts +34 -5
- package/dist/plugins/settings.d.ts +1 -0
- package/package.json +5 -2
- package/dist/components/field/index.d.ts +0 -2
package/dist/index.es.js
CHANGED
|
@@ -9,6 +9,7 @@ import VueI18Next from '@panter/vue-i18next';
|
|
|
9
9
|
import path from 'path';
|
|
10
10
|
import { PhotoSwipe } from 'v-photoswipe';
|
|
11
11
|
import pdfjs from 'pdfjs-dist';
|
|
12
|
+
import Draggable from 'vuedraggable';
|
|
12
13
|
import Swatches from 'vue-swatches';
|
|
13
14
|
import { Paragraph as Paragraph$1, Mark as Mark$1, Plugin, PluginKey, Extension, EditorContent, EditorMenuBar, Editor } from 'tiptap';
|
|
14
15
|
import { Heading as Heading$1, Link as Link$1, Bold, Italic, Underline, Strike, Blockquote, CodeBlock, OrderedList, BulletList, TodoList, HorizontalRule, ListItem, TodoItem, History } from 'tiptap-extensions';
|
|
@@ -16,8 +17,10 @@ import hps from 'html-parse-stringify';
|
|
|
16
17
|
import { library } from '@fortawesome/fontawesome-svg-core';
|
|
17
18
|
import { faLock } from '@fortawesome/free-solid-svg-icons';
|
|
18
19
|
import { mapGetters, mapActions } from 'vuex';
|
|
19
|
-
import
|
|
20
|
+
import colorschemes from 'chartjs-plugin-colorschemes';
|
|
21
|
+
import Funnel from 'chartjs-plugin-funnel';
|
|
20
22
|
import pino from 'pino';
|
|
23
|
+
import fzy from 'fuzzysort';
|
|
21
24
|
|
|
22
25
|
/* eslint-disable @typescript-eslint/ban-ts-ignore */
|
|
23
26
|
/**
|
|
@@ -1920,15 +1923,19 @@ var url = /*#__PURE__*/Object.freeze({
|
|
|
1920
1923
|
const accessToken = Symbol('accessToken');
|
|
1921
1924
|
const user = Symbol('user');
|
|
1922
1925
|
/**
|
|
1923
|
-
* This is an endpoint of
|
|
1926
|
+
* This is an endpoint of an oauth2 authorization-code flow + refresh token exchange
|
|
1924
1927
|
* for default client.
|
|
1925
1928
|
*
|
|
1926
|
-
* If you are concerned about security, this is not much different
|
|
1929
|
+
* If you are concerned about security, this is not much different to using a dedicated backend
|
|
1927
1930
|
* for this SPA that only redirects to a set of allowed URIs.
|
|
1928
1931
|
*/
|
|
1929
1932
|
const oauth2FlowURL = '/oauth2/default-client';
|
|
1930
1933
|
const oauth2InfoURL = '/oauth2/info';
|
|
1931
1934
|
const oauth2Scope = 'profile api';
|
|
1935
|
+
const storeKeyFlowStarted = 'auth.flow-started';
|
|
1936
|
+
const storeKeyFinalState = 'auth.state.final';
|
|
1937
|
+
const storeKeyRefreshToken = 'auth.refresh-token';
|
|
1938
|
+
const maxStartAttempts = 5;
|
|
1932
1939
|
class Auth {
|
|
1933
1940
|
constructor({ app, verbose, cortezaAuthURL, callbackURL, entrypointURL, location, sessionStorage, refreshFactor }) {
|
|
1934
1941
|
if (refreshFactor >= 1 || refreshFactor <= 0) {
|
|
@@ -1971,13 +1978,6 @@ class Auth {
|
|
|
1971
1978
|
error: noop,
|
|
1972
1979
|
};
|
|
1973
1980
|
}
|
|
1974
|
-
/**
|
|
1975
|
-
* Returns prefixed key
|
|
1976
|
-
* @param key
|
|
1977
|
-
*/
|
|
1978
|
-
get refreshTokenKey() {
|
|
1979
|
-
return 'auth.refresh-token';
|
|
1980
|
-
}
|
|
1981
1981
|
/**
|
|
1982
1982
|
* Returns function that returns current access token
|
|
1983
1983
|
*/
|
|
@@ -2001,43 +2001,83 @@ class Auth {
|
|
|
2001
2001
|
handle(req = new URL(this.entrypointURL)) {
|
|
2002
2002
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2003
2003
|
this.log.info('handling authentication');
|
|
2004
|
-
if (
|
|
2004
|
+
if (this.isCallback(req.pathname)) {
|
|
2005
2005
|
this.log.info('handling authentication callback');
|
|
2006
2006
|
const params = new URLSearchParams(req.search);
|
|
2007
2007
|
if (params.has('error')) {
|
|
2008
2008
|
throw new Error(params.get('error') || 'authentication flow failed with error');
|
|
2009
2009
|
}
|
|
2010
2010
|
if (params.has('code')) {
|
|
2011
|
-
let finalLocation =
|
|
2011
|
+
let finalLocation = this.entrypointURL;
|
|
2012
2012
|
if (params.has('state')) {
|
|
2013
2013
|
const state = params.get('state') || '';
|
|
2014
|
-
const
|
|
2015
|
-
this.
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2014
|
+
const storeKeyStateLocation = `auth.state.${state}.location`;
|
|
2015
|
+
const tmp = this.sessionStorage.getItem(storeKeyStateLocation);
|
|
2016
|
+
if (tmp === null) {
|
|
2017
|
+
console.warn('state does not match, restarting authentication flow');
|
|
2018
|
+
this.startAuthenticationFlow();
|
|
2019
|
+
return null;
|
|
2019
2020
|
}
|
|
2020
|
-
if (
|
|
2021
|
+
if (!this.isCallback(tmp)) {
|
|
2021
2022
|
// if by some coincidence we got callback URL to finalLocation
|
|
2022
|
-
// we'll silently ignore it
|
|
2023
|
-
finalLocation =
|
|
2024
|
-
}
|
|
2025
|
-
else {
|
|
2026
|
-
this.log.info('location before auth flow start', finalLocation);
|
|
2023
|
+
// we'll silently ignore it and redirect user back to entrypoint
|
|
2024
|
+
finalLocation = tmp;
|
|
2027
2025
|
}
|
|
2028
|
-
this.sessionStorage.removeItem(
|
|
2026
|
+
this.sessionStorage.removeItem(storeKeyStateLocation);
|
|
2029
2027
|
}
|
|
2030
2028
|
const code = params.get('code') || '';
|
|
2031
2029
|
this.log.info('authorization code received', code);
|
|
2032
|
-
yield this.exchangeCode(code);
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
}
|
|
2030
|
+
const rsp = yield this.exchangeCode(code);
|
|
2031
|
+
this.startFinalState(finalLocation);
|
|
2032
|
+
return rsp;
|
|
2036
2033
|
}
|
|
2037
2034
|
}
|
|
2038
2035
|
return this.check();
|
|
2039
2036
|
});
|
|
2040
2037
|
}
|
|
2038
|
+
/**
|
|
2039
|
+
* Flagging session storage
|
|
2040
|
+
*
|
|
2041
|
+
* Challenge with sessions and browser tabs:
|
|
2042
|
+
* Each browser tab & window interacts with an isolated session. When user clicks on a link to and wants to open
|
|
2043
|
+
* it in a new window or a tab, or when tab is duplicated, session contents are copied!
|
|
2044
|
+
*
|
|
2045
|
+
* Consequences of that are that two (or more) tabs end up with the same session
|
|
2046
|
+
* and the same refresh token, and we need to detect if we're dealing with refresh token in an old or new session.
|
|
2047
|
+
*
|
|
2048
|
+
* With this function we start the final state and flag the session. This way we'll
|
|
2049
|
+
* know, after the redirection to the final location, if this is a final stage or not and if the refresh token
|
|
2050
|
+
* belongs to this session or not.
|
|
2051
|
+
*/
|
|
2052
|
+
startFinalState(dst) {
|
|
2053
|
+
this.log.info('redirecting back to final destination', dst);
|
|
2054
|
+
this.sessionStorage.setItem(storeKeyFinalState, Date.now().toString());
|
|
2055
|
+
this.location.assign(dst);
|
|
2056
|
+
}
|
|
2057
|
+
/**
|
|
2058
|
+
* Called when refresh token is re-fetched.
|
|
2059
|
+
*
|
|
2060
|
+
* Cleanup aux items in the session store
|
|
2061
|
+
*/
|
|
2062
|
+
completeFinalState() {
|
|
2063
|
+
this.sessionStorage.removeItem(storeKeyFinalState);
|
|
2064
|
+
this.sessionStorage.removeItem(storeKeyFlowStarted);
|
|
2065
|
+
const stateKey = /^auth\.state\.\w+\.location$/;
|
|
2066
|
+
for (let i = 0; i < this.sessionStorage.length; i++) {
|
|
2067
|
+
const key = this.sessionStorage.key(i);
|
|
2068
|
+
if (key !== null && stateKey.test(key)) {
|
|
2069
|
+
this.sessionStorage.removeItem(key);
|
|
2070
|
+
}
|
|
2071
|
+
}
|
|
2072
|
+
}
|
|
2073
|
+
/**
|
|
2074
|
+
* Are we in a final state or not?
|
|
2075
|
+
*
|
|
2076
|
+
* See startFinalState function for more details
|
|
2077
|
+
*/
|
|
2078
|
+
inFinalState() {
|
|
2079
|
+
return this.sessionStorage.getItem(storeKeyFinalState) !== null;
|
|
2080
|
+
}
|
|
2041
2081
|
/**
|
|
2042
2082
|
* Checks current auth state; is access token loaded OR do we have a refresh token we can use
|
|
2043
2083
|
*
|
|
@@ -2071,27 +2111,34 @@ class Auth {
|
|
|
2071
2111
|
this[user] = authUser;
|
|
2072
2112
|
return data;
|
|
2073
2113
|
}).catch((error) => {
|
|
2074
|
-
this.log.
|
|
2114
|
+
this.log.error('data fetch form info endpoint failed', { oauth2InfoURL, headers, error });
|
|
2075
2115
|
// assume invalid JWT and remove it
|
|
2076
2116
|
this[accessToken] = undefined;
|
|
2077
2117
|
throw new Error('Unauthenticated');
|
|
2078
2118
|
});
|
|
2079
2119
|
}
|
|
2080
|
-
const refreshToken = this.sessionStorage.getItem(
|
|
2120
|
+
const refreshToken = this.sessionStorage.getItem(storeKeyRefreshToken);
|
|
2081
2121
|
if (refreshToken) {
|
|
2082
|
-
this.log.
|
|
2122
|
+
this.log.debug('refresh token found', { refreshToken });
|
|
2083
2123
|
/**
|
|
2084
|
-
*
|
|
2085
|
-
*
|
|
2124
|
+
* Only exchange refresh token if this is the final state (see startFinalState function for more details)
|
|
2125
|
+
*
|
|
2126
|
+
* If this is a duplicated-session, an error will be thrown and authentication will be (probably)
|
|
2127
|
+
* restarted by the caller.
|
|
2086
2128
|
*/
|
|
2087
|
-
|
|
2129
|
+
if (this.inFinalState()) {
|
|
2130
|
+
this.log.info('refreshing token', refreshToken);
|
|
2131
|
+
/**
|
|
2132
|
+
* Refresh token found in the storage,
|
|
2133
|
+
* let's use it to get new access token
|
|
2134
|
+
*/
|
|
2135
|
+
return this.exchangeRefresh(refreshToken);
|
|
2136
|
+
}
|
|
2088
2137
|
}
|
|
2089
2138
|
throw new Error('Unauthenticated');
|
|
2090
2139
|
});
|
|
2091
2140
|
}
|
|
2092
2141
|
logout() {
|
|
2093
|
-
this[accessToken] = undefined;
|
|
2094
|
-
this[user] = undefined;
|
|
2095
2142
|
this.pruneStore();
|
|
2096
2143
|
this.location.assign(Make({
|
|
2097
2144
|
url: `${this.cortezaAuthURL}/logout`,
|
|
@@ -2106,8 +2153,9 @@ class Auth {
|
|
|
2106
2153
|
*/
|
|
2107
2154
|
startAuthenticationFlow() {
|
|
2108
2155
|
this.log.debug('starting new authentication flow');
|
|
2156
|
+
this.incFlowCounter();
|
|
2109
2157
|
const state = Math.random().toString(36).substring(2);
|
|
2110
|
-
this.sessionStorage.setItem(`auth.state.${state}.location`, this.location.toString());
|
|
2158
|
+
this.sessionStorage.setItem(`auth.state.${state}.location`, this.getRedirect(this.location.toString()));
|
|
2111
2159
|
this.location.assign(Make({
|
|
2112
2160
|
url: `${this.cortezaAuthURL}` + oauth2FlowURL,
|
|
2113
2161
|
query: {
|
|
@@ -2118,6 +2166,38 @@ class Auth {
|
|
|
2118
2166
|
},
|
|
2119
2167
|
}));
|
|
2120
2168
|
}
|
|
2169
|
+
getRedirect(url) {
|
|
2170
|
+
const u = new URL(url);
|
|
2171
|
+
// In case someone started the flow on a callback route, default to the root
|
|
2172
|
+
// of the webapp.
|
|
2173
|
+
if (this.isCallback(u.pathname)) {
|
|
2174
|
+
u.pathname = '';
|
|
2175
|
+
u.search = '';
|
|
2176
|
+
u.hash = '';
|
|
2177
|
+
}
|
|
2178
|
+
return u.toString();
|
|
2179
|
+
}
|
|
2180
|
+
isCallback(url) {
|
|
2181
|
+
return /\/auth\/callback$/.test(url);
|
|
2182
|
+
}
|
|
2183
|
+
/**
|
|
2184
|
+
* protects against too many tries when we try to auto-fix the "state does not match" error
|
|
2185
|
+
* by restarting the aut flow.
|
|
2186
|
+
*/
|
|
2187
|
+
incFlowCounter() {
|
|
2188
|
+
const aux = this.sessionStorage.getItem(storeKeyFlowStarted);
|
|
2189
|
+
if (aux === null) {
|
|
2190
|
+
this.sessionStorage.setItem(storeKeyFlowStarted, '1');
|
|
2191
|
+
return;
|
|
2192
|
+
}
|
|
2193
|
+
const count = parseInt(this.sessionStorage.getItem(storeKeyFlowStarted));
|
|
2194
|
+
if (count >= maxStartAttempts) {
|
|
2195
|
+
// Too many start attempts
|
|
2196
|
+
this.sessionStorage.removeItem(storeKeyFlowStarted);
|
|
2197
|
+
throw new Error('could not start authentication flow, too many attempts');
|
|
2198
|
+
}
|
|
2199
|
+
this.sessionStorage.setItem(storeKeyFlowStarted, (count + 1).toString());
|
|
2200
|
+
}
|
|
2121
2201
|
/**
|
|
2122
2202
|
* Exchanges authorization code for access and refresh tokens
|
|
2123
2203
|
*/
|
|
@@ -2141,6 +2221,10 @@ class Auth {
|
|
|
2141
2221
|
*/
|
|
2142
2222
|
exchangeRefresh(refreshToken) {
|
|
2143
2223
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2224
|
+
/**
|
|
2225
|
+
* Finalize
|
|
2226
|
+
*/
|
|
2227
|
+
this.completeFinalState();
|
|
2144
2228
|
return this.oauth2token({
|
|
2145
2229
|
// eslint-disable-next-line @typescript-eslint/camelcase
|
|
2146
2230
|
refresh_token: refreshToken || '',
|
|
@@ -2184,7 +2268,7 @@ class Auth {
|
|
|
2184
2268
|
this.startAuthenticationFlow();
|
|
2185
2269
|
});
|
|
2186
2270
|
}), 1000 * timeout);
|
|
2187
|
-
this.sessionStorage.setItem(
|
|
2271
|
+
this.sessionStorage.setItem(storeKeyRefreshToken, oa2tkn.refresh_token);
|
|
2188
2272
|
const u = new system.User({
|
|
2189
2273
|
userID: oa2tkn.sub,
|
|
2190
2274
|
name: oa2tkn.name,
|
|
@@ -2492,6 +2576,10 @@ class Settings {
|
|
|
2492
2576
|
throw new Error('api.notDefined');
|
|
2493
2577
|
}
|
|
2494
2578
|
|
|
2579
|
+
return this.fetch();
|
|
2580
|
+
}
|
|
2581
|
+
|
|
2582
|
+
async fetch() {
|
|
2495
2583
|
return this.api.settingsCurrent().then(settings => {
|
|
2496
2584
|
this.current = settings || {};
|
|
2497
2585
|
return settings;
|
|
@@ -2537,7 +2625,7 @@ class Settings {
|
|
|
2537
2625
|
var settings = {
|
|
2538
2626
|
install(Vue) {
|
|
2539
2627
|
// Should be used to initialize settings
|
|
2540
|
-
Vue.prototype.$Settings = new Settings(); // Should be used to access settings
|
|
2628
|
+
Vue.prototype.$Settings = Vue.observable(new Settings()); // Should be used to access settings
|
|
2541
2629
|
|
|
2542
2630
|
Vue.prototype.$s = Vue.prototype.$Settings.get.bind(Vue.prototype.$Settings);
|
|
2543
2631
|
}
|
|
@@ -71029,14 +71117,109 @@ var __vue_staticRenderFns__$8 = [];
|
|
|
71029
71117
|
undefined
|
|
71030
71118
|
);
|
|
71031
71119
|
|
|
71120
|
+
function getDate(value) {
|
|
71121
|
+
if (!value) {
|
|
71122
|
+
return undefined;
|
|
71123
|
+
}
|
|
71124
|
+
if (value === 'Invalid date') {
|
|
71125
|
+
// Make sure this weird value does not cause us problems
|
|
71126
|
+
return undefined;
|
|
71127
|
+
}
|
|
71128
|
+
const dt = value.split(' ');
|
|
71129
|
+
if (dt.length > 1) {
|
|
71130
|
+
return dt[0]; // we only want the date part
|
|
71131
|
+
}
|
|
71132
|
+
else if (dt.length === 1) {
|
|
71133
|
+
// If date is in the value
|
|
71134
|
+
if (dt[0].indexOf('-') > -1) {
|
|
71135
|
+
return dt[0];
|
|
71136
|
+
}
|
|
71137
|
+
}
|
|
71138
|
+
}
|
|
71139
|
+
function getTime(value) {
|
|
71140
|
+
if (!value) {
|
|
71141
|
+
return undefined;
|
|
71142
|
+
}
|
|
71143
|
+
const dt = value.split(' ');
|
|
71144
|
+
if (dt.length > 1) {
|
|
71145
|
+
return dt[1]; // we only want the time part
|
|
71146
|
+
}
|
|
71147
|
+
else if (dt.length === 1) {
|
|
71148
|
+
// If we time is in the value
|
|
71149
|
+
if (dt[0].indexOf(':') > -1) {
|
|
71150
|
+
return dt[0];
|
|
71151
|
+
}
|
|
71152
|
+
}
|
|
71153
|
+
}
|
|
71154
|
+
function setDate(date, value, noDate = false, noTime = false) {
|
|
71155
|
+
if (noDate || !date || !date.length) {
|
|
71156
|
+
return undefined;
|
|
71157
|
+
}
|
|
71158
|
+
const time = getTime(value);
|
|
71159
|
+
if (noTime) {
|
|
71160
|
+
return moment(date, 'YYYY-MM-DD').format('YYYY-MM-DD');
|
|
71161
|
+
}
|
|
71162
|
+
return moment(date + ' ' + time, 'YYYY-MM-DD HH:mm').format('YYYY-MM-DD HH:mm');
|
|
71163
|
+
}
|
|
71164
|
+
function setTime(time, value, noDate = false, noTime = false) {
|
|
71165
|
+
if (noTime || !time || !time.length) {
|
|
71166
|
+
return undefined;
|
|
71167
|
+
}
|
|
71168
|
+
let date = getDate(value);
|
|
71169
|
+
if (noDate) {
|
|
71170
|
+
return moment(time, 'HH:mm').format('HH:mm');
|
|
71171
|
+
}
|
|
71172
|
+
if (!date) {
|
|
71173
|
+
// If no date is yet set default to today
|
|
71174
|
+
date = moment().format('YYYY-MM-DD');
|
|
71175
|
+
}
|
|
71176
|
+
return moment(date + ' ' + time, 'YYYY-MM-DD HH:mm').format('YYYY-MM-DD HH:mm');
|
|
71177
|
+
}
|
|
71178
|
+
|
|
71032
71179
|
var script$a = {
|
|
71033
71180
|
props: {
|
|
71034
|
-
|
|
71181
|
+
value: {
|
|
71035
71182
|
type: String,
|
|
71036
|
-
|
|
71183
|
+
required: true
|
|
71184
|
+
},
|
|
71185
|
+
noTime: {
|
|
71186
|
+
type: Boolean,
|
|
71187
|
+
default: false
|
|
71188
|
+
},
|
|
71189
|
+
noDate: {
|
|
71190
|
+
type: Boolean,
|
|
71191
|
+
default: false
|
|
71192
|
+
}
|
|
71193
|
+
},
|
|
71194
|
+
computed: {
|
|
71195
|
+
date: {
|
|
71196
|
+
get() {
|
|
71197
|
+
return getDate(this.value);
|
|
71198
|
+
},
|
|
71199
|
+
|
|
71200
|
+
set(date) {
|
|
71201
|
+
date = setDate(date, this.value, this.noDate, this.noTime);
|
|
71202
|
+
|
|
71203
|
+
if (date) {
|
|
71204
|
+
this.$emit('input', date);
|
|
71205
|
+
}
|
|
71206
|
+
}
|
|
71207
|
+
|
|
71037
71208
|
},
|
|
71038
|
-
|
|
71039
|
-
|
|
71209
|
+
time: {
|
|
71210
|
+
get() {
|
|
71211
|
+
return getTime(this.value);
|
|
71212
|
+
},
|
|
71213
|
+
|
|
71214
|
+
set(time) {
|
|
71215
|
+
time = setTime(time, this.value, this.noDate, this.noTime);
|
|
71216
|
+
|
|
71217
|
+
if (time) {
|
|
71218
|
+
this.$emit('input', time);
|
|
71219
|
+
}
|
|
71220
|
+
}
|
|
71221
|
+
|
|
71222
|
+
}
|
|
71040
71223
|
}
|
|
71041
71224
|
};
|
|
71042
71225
|
|
|
@@ -71044,6 +71227,8 @@ var script$a = {
|
|
|
71044
71227
|
const __vue_script__$a = script$a;
|
|
71045
71228
|
|
|
71046
71229
|
/* template */
|
|
71230
|
+
var __vue_render__$9 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-input-group',[(!_vm.noDate)?_c('b-form-input',{staticClass:"d-inline w-50",attrs:{"type":"date"},model:{value:(_vm.date),callback:function ($$v) {_vm.date=$$v;},expression:"date"}}):_vm._e(),_vm._v(" "),(!_vm.noTime)?_c('b-form-input',{staticClass:"d-inline w-50",attrs:{"type":"time"},model:{value:(_vm.time),callback:function ($$v) {_vm.time=$$v;},expression:"time"}}):_vm._e()],1)};
|
|
71231
|
+
var __vue_staticRenderFns__$9 = [];
|
|
71047
71232
|
|
|
71048
71233
|
/* style */
|
|
71049
71234
|
const __vue_inject_styles__$b = undefined;
|
|
@@ -71052,7 +71237,7 @@ const __vue_script__$a = script$a;
|
|
|
71052
71237
|
/* module identifier */
|
|
71053
71238
|
const __vue_module_identifier__$b = undefined;
|
|
71054
71239
|
/* functional template */
|
|
71055
|
-
const __vue_is_functional_template__$b =
|
|
71240
|
+
const __vue_is_functional_template__$b = false;
|
|
71056
71241
|
/* style inject */
|
|
71057
71242
|
|
|
71058
71243
|
/* style inject SSR */
|
|
@@ -71062,7 +71247,7 @@ const __vue_script__$a = script$a;
|
|
|
71062
71247
|
|
|
71063
71248
|
|
|
71064
71249
|
const __vue_component__$b = /*#__PURE__*/normalizeComponent(
|
|
71065
|
-
{},
|
|
71250
|
+
{ render: __vue_render__$9, staticRenderFns: __vue_staticRenderFns__$9 },
|
|
71066
71251
|
__vue_inject_styles__$b,
|
|
71067
71252
|
__vue_script__$a,
|
|
71068
71253
|
__vue_scope_id__$b,
|
|
@@ -71074,123 +71259,110 @@ const __vue_script__$a = script$a;
|
|
|
71074
71259
|
undefined
|
|
71075
71260
|
);
|
|
71076
71261
|
|
|
71262
|
+
//
|
|
71077
71263
|
var script$b = {
|
|
71078
|
-
|
|
71264
|
+
components: {
|
|
71265
|
+
Draggable
|
|
71266
|
+
},
|
|
71079
71267
|
props: {
|
|
71080
|
-
|
|
71081
|
-
type:
|
|
71082
|
-
|
|
71268
|
+
value: {
|
|
71269
|
+
type: String,
|
|
71270
|
+
required: true
|
|
71083
71271
|
},
|
|
71084
|
-
|
|
71272
|
+
fields: {
|
|
71273
|
+
type: Array,
|
|
71274
|
+
required: true
|
|
71275
|
+
},
|
|
71276
|
+
labels: {
|
|
71277
|
+
type: Object,
|
|
71278
|
+
required: true
|
|
71279
|
+
},
|
|
71280
|
+
allowTextInput: {
|
|
71085
71281
|
type: Boolean,
|
|
71086
71282
|
default: false
|
|
71087
71283
|
}
|
|
71088
71284
|
},
|
|
71285
|
+
|
|
71286
|
+
data() {
|
|
71287
|
+
return {
|
|
71288
|
+
items: [],
|
|
71289
|
+
textInput: false
|
|
71290
|
+
};
|
|
71291
|
+
},
|
|
71292
|
+
|
|
71089
71293
|
computed: {
|
|
71090
|
-
|
|
71294
|
+
presortValue: {
|
|
71091
71295
|
get() {
|
|
71092
|
-
return this.
|
|
71296
|
+
return this.value;
|
|
71093
71297
|
},
|
|
71094
71298
|
|
|
71095
|
-
set(
|
|
71096
|
-
this
|
|
71299
|
+
set(value) {
|
|
71300
|
+
this.$emit('input', value);
|
|
71097
71301
|
}
|
|
71098
71302
|
|
|
71099
71303
|
},
|
|
71100
|
-
time: {
|
|
71101
|
-
get() {
|
|
71102
|
-
return this.getTime();
|
|
71103
|
-
},
|
|
71104
71304
|
|
|
71105
|
-
|
|
71106
|
-
|
|
71107
|
-
|
|
71305
|
+
sortDirections() {
|
|
71306
|
+
return [{
|
|
71307
|
+
value: false,
|
|
71308
|
+
text: this.labels.ascending
|
|
71309
|
+
}, {
|
|
71310
|
+
value: true,
|
|
71311
|
+
text: this.labels.descending
|
|
71312
|
+
}];
|
|
71313
|
+
},
|
|
71108
71314
|
|
|
71315
|
+
sortedFields() {
|
|
71316
|
+
return [...this.fields.sort((a, b) => a.label.localeCompare(b.label))];
|
|
71109
71317
|
}
|
|
71110
|
-
},
|
|
71111
|
-
methods: {
|
|
71112
|
-
getTime() {
|
|
71113
|
-
if (!this.value) {
|
|
71114
|
-
return undefined;
|
|
71115
|
-
}
|
|
71116
|
-
|
|
71117
|
-
let dt = this.value.split(' ');
|
|
71118
71318
|
|
|
71119
|
-
|
|
71120
|
-
|
|
71121
|
-
|
|
71122
|
-
|
|
71123
|
-
if (dt[0].indexOf(':') > -1) {
|
|
71124
|
-
return dt[0];
|
|
71125
|
-
}
|
|
71126
|
-
}
|
|
71127
|
-
},
|
|
71319
|
+
},
|
|
71320
|
+
watch: {
|
|
71321
|
+
value: {
|
|
71322
|
+
immediate: true,
|
|
71128
71323
|
|
|
71129
|
-
|
|
71130
|
-
|
|
71131
|
-
|
|
71132
|
-
|
|
71324
|
+
handler(value) {
|
|
71325
|
+
if (value) {
|
|
71326
|
+
const sort = value.includes(',') ? value.split(',') : [value];
|
|
71327
|
+
this.items = sort.map(field => {
|
|
71328
|
+
let descending = false;
|
|
71133
71329
|
|
|
71134
|
-
|
|
71135
|
-
|
|
71330
|
+
if (field.includes(' ')) {
|
|
71331
|
+
field = field.split(' ')[0];
|
|
71332
|
+
descending = true;
|
|
71333
|
+
}
|
|
71136
71334
|
|
|
71137
|
-
|
|
71138
|
-
|
|
71139
|
-
|
|
71140
|
-
|
|
71141
|
-
|
|
71142
|
-
|
|
71143
|
-
|
|
71335
|
+
return {
|
|
71336
|
+
field,
|
|
71337
|
+
descending: !!descending
|
|
71338
|
+
};
|
|
71339
|
+
});
|
|
71340
|
+
} else {
|
|
71341
|
+
this.items = [{
|
|
71342
|
+
field: undefined,
|
|
71343
|
+
descending: false
|
|
71344
|
+
}];
|
|
71144
71345
|
}
|
|
71145
|
-
|
|
71146
|
-
tm = moment(date + ' ' + t, 'YYYY-MM-DD HH:mm');
|
|
71147
|
-
tm = tm.format('YYYY-MM-DD HH:mm');
|
|
71148
71346
|
}
|
|
71149
71347
|
|
|
71150
|
-
this.$emit('input', tm);
|
|
71151
71348
|
},
|
|
71349
|
+
items: {
|
|
71350
|
+
deep: true,
|
|
71152
71351
|
|
|
71153
|
-
|
|
71154
|
-
|
|
71155
|
-
|
|
71156
|
-
|
|
71157
|
-
|
|
71158
|
-
|
|
71159
|
-
|
|
71160
|
-
|
|
71161
|
-
|
|
71162
|
-
|
|
71163
|
-
let dt = this.value.split(' ');
|
|
71164
|
-
|
|
71165
|
-
if (dt.length > 1) {
|
|
71166
|
-
return dt[0]; // we only want the date part
|
|
71167
|
-
} else if (dt.length === 1) {
|
|
71168
|
-
// If date is in the value
|
|
71169
|
-
if (dt[0].indexOf('-') > -1) {
|
|
71170
|
-
return dt[0];
|
|
71352
|
+
handler(items = [], oldItems = undefined) {
|
|
71353
|
+
if (oldItems) {
|
|
71354
|
+
this.$emit('input', items.filter(({
|
|
71355
|
+
field
|
|
71356
|
+
}) => field).map(({
|
|
71357
|
+
field,
|
|
71358
|
+
descending
|
|
71359
|
+
}) => {
|
|
71360
|
+
return descending ? `${field} DESC` : field;
|
|
71361
|
+
}).join(','));
|
|
71171
71362
|
}
|
|
71172
71363
|
}
|
|
71173
|
-
},
|
|
71174
71364
|
|
|
71175
|
-
setDate(d) {
|
|
71176
|
-
if (this.noDate || !d || !d.length) {
|
|
71177
|
-
return;
|
|
71178
|
-
}
|
|
71179
|
-
|
|
71180
|
-
let dm = moment();
|
|
71181
|
-
const time = this.getTime();
|
|
71182
|
-
|
|
71183
|
-
if (this.noTime) {
|
|
71184
|
-
dm = moment(d, 'YYYY-MM-DD');
|
|
71185
|
-
dm = dm.format('YYYY-MM-DD');
|
|
71186
|
-
} else {
|
|
71187
|
-
dm = moment(d + ' ' + time, 'YYYY-MM-DD HH:mm');
|
|
71188
|
-
dm = dm.format('YYYY-MM-DD HH:mm');
|
|
71189
|
-
}
|
|
71190
|
-
|
|
71191
|
-
this.$emit('input', dm);
|
|
71192
71365
|
}
|
|
71193
|
-
|
|
71194
71366
|
}
|
|
71195
71367
|
};
|
|
71196
71368
|
|
|
@@ -71198,8 +71370,8 @@ var script$b = {
|
|
|
71198
71370
|
const __vue_script__$b = script$b;
|
|
71199
71371
|
|
|
71200
71372
|
/* template */
|
|
71201
|
-
var __vue_render__$
|
|
71202
|
-
var __vue_staticRenderFns__$
|
|
71373
|
+
var __vue_render__$a = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[(!_vm.textInput)?_c('draggable',{attrs:{"list":_vm.items,"group":"sort","handle":".grab"},on:{"update:list":function($event){_vm.items=$event;}}},_vm._l((_vm.items),function(column,index){return _c('b-form-row',{key:index,staticClass:"mb-1"},[_c('b-col',{staticClass:"d-flex align-items-center justify-content-center",attrs:{"cols":"1"}},[_c('font-awesome-icon',{staticClass:"grab text-grey",attrs:{"icon":['fas', 'bars']}})],1),_vm._v(" "),_c('b-col',{attrs:{"cols":"5"}},[_c('b-form-select',{staticClass:"rounded",attrs:{"options":_vm.fields,"text-field":"label","value-field":"name"},scopedSlots:_vm._u([{key:"first",fn:function(){return [_c('b-form-select-option',{attrs:{"value":undefined,"disabled":""}},[_vm._v("\n "+_vm._s(_vm.labels.none)+"\n ")])]},proxy:true}],null,true),model:{value:(column.field),callback:function ($$v) {_vm.$set(column, "field", $$v);},expression:"column.field"}})],1),_vm._v(" "),_c('b-col',{staticClass:"d-flex align-items-center justify-content-around",attrs:{"cols":"6"}},[_c('b-form-radio-group',{attrs:{"options":_vm.sortDirections,"buttons":"","size":"sm","button-variant":"outline-primary"},model:{value:(column.descending),callback:function ($$v) {_vm.$set(column, "descending", $$v);},expression:"column.descending"}}),_vm._v(" "),_c('c-input-confirm',{attrs:{"variant":"link","size":"lg","button-class":"text-dark px-0"},on:{"confirmed":function($event){return _vm.items.splice(index, 1)}}})],1)],1)}),1):_c('div',[_c('b-form-textarea',{attrs:{"placeholder":_vm.labels.placeholder},model:{value:(_vm.presortValue),callback:function ($$v) {_vm.presortValue=$$v;},expression:"presortValue"}}),_vm._v(" "),_c('b-form-text',[_vm._v("\n "+_vm._s(_vm.labels.footnote)+"\n ")])],1),_vm._v(" "),_c('div',{staticClass:"d-flex align-items-center"},[(!_vm.textInput)?_c('b-button',{staticClass:"d-flex align-items-center px-0 text-decoration-none",attrs:{"variant":"link"},on:{"click":function($event){return _vm.items.push({ field: undefined, descending: false })}}},[_c('font-awesome-icon',{staticClass:"mr-1",attrs:{"icon":['fas', 'plus'],"size":"sm"}}),_vm._v("\n "+_vm._s(_vm.labels.add)+"\n ")],1):_vm._e(),_vm._v(" "),(_vm.allowTextInput)?_c('b-button',{staticClass:"text-decoration-none ml-auto",attrs:{"variant":"link","size":"sm"},on:{"click":function($event){_vm.textInput = !_vm.textInput;}}},[_vm._v("\n "+_vm._s(_vm.labels.toggleInput)+"\n ")]):_vm._e()],1)],1)};
|
|
71374
|
+
var __vue_staticRenderFns__$a = [];
|
|
71203
71375
|
|
|
71204
71376
|
/* style */
|
|
71205
71377
|
const __vue_inject_styles__$c = undefined;
|
|
@@ -71218,7 +71390,7 @@ var __vue_staticRenderFns__$9 = [];
|
|
|
71218
71390
|
|
|
71219
71391
|
|
|
71220
71392
|
const __vue_component__$c = /*#__PURE__*/normalizeComponent(
|
|
71221
|
-
{ render: __vue_render__$
|
|
71393
|
+
{ render: __vue_render__$a, staticRenderFns: __vue_staticRenderFns__$a },
|
|
71222
71394
|
__vue_inject_styles__$c,
|
|
71223
71395
|
__vue_script__$b,
|
|
71224
71396
|
__vue_scope_id__$c,
|
|
@@ -71231,45 +71403,24 @@ var __vue_staticRenderFns__$9 = [];
|
|
|
71231
71403
|
);
|
|
71232
71404
|
|
|
71233
71405
|
var script$c = {
|
|
71234
|
-
extends: __vue_component__$b,
|
|
71235
71406
|
props: {
|
|
71236
|
-
|
|
71237
|
-
|
|
71238
|
-
|
|
71239
|
-
default: () => []
|
|
71407
|
+
value: {
|
|
71408
|
+
type: String,
|
|
71409
|
+
required: true
|
|
71240
71410
|
},
|
|
71241
|
-
|
|
71242
|
-
type:
|
|
71243
|
-
default:
|
|
71411
|
+
simple: {
|
|
71412
|
+
type: Boolean,
|
|
71413
|
+
default: false
|
|
71244
71414
|
}
|
|
71245
71415
|
},
|
|
71246
|
-
|
|
71247
|
-
data() {
|
|
71248
|
-
return {
|
|
71249
|
-
intervalOptions: [// @todo somehow add to i18
|
|
71250
|
-
{
|
|
71251
|
-
text: 'Every Minute',
|
|
71252
|
-
value: '0 * * * * * *'
|
|
71253
|
-
}]
|
|
71254
|
-
};
|
|
71255
|
-
},
|
|
71256
|
-
|
|
71257
71416
|
computed: {
|
|
71258
|
-
|
|
71259
|
-
if (this.options.length) {
|
|
71260
|
-
return this.options;
|
|
71261
|
-
}
|
|
71262
|
-
|
|
71263
|
-
return this.intervalOptions.concat(this.optionsAppend);
|
|
71264
|
-
},
|
|
71265
|
-
|
|
71266
|
-
cValue: {
|
|
71417
|
+
cronValue: {
|
|
71267
71418
|
get() {
|
|
71268
71419
|
return this.value;
|
|
71269
71420
|
},
|
|
71270
71421
|
|
|
71271
|
-
set(
|
|
71272
|
-
this.$emit('input',
|
|
71422
|
+
set(value) {
|
|
71423
|
+
this.$emit('input', value);
|
|
71273
71424
|
}
|
|
71274
71425
|
|
|
71275
71426
|
}
|
|
@@ -71280,8 +71431,8 @@ var script$c = {
|
|
|
71280
71431
|
const __vue_script__$c = script$c;
|
|
71281
71432
|
|
|
71282
71433
|
/* template */
|
|
71283
|
-
var __vue_render__$
|
|
71284
|
-
var __vue_staticRenderFns__$
|
|
71434
|
+
var __vue_render__$b = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("div")};
|
|
71435
|
+
var __vue_staticRenderFns__$b = [];
|
|
71285
71436
|
|
|
71286
71437
|
/* style */
|
|
71287
71438
|
const __vue_inject_styles__$d = undefined;
|
|
@@ -71300,7 +71451,7 @@ var __vue_staticRenderFns__$a = [];
|
|
|
71300
71451
|
|
|
71301
71452
|
|
|
71302
71453
|
const __vue_component__$d = /*#__PURE__*/normalizeComponent(
|
|
71303
|
-
{ render: __vue_render__$
|
|
71454
|
+
{ render: __vue_render__$b, staticRenderFns: __vue_staticRenderFns__$b },
|
|
71304
71455
|
__vue_inject_styles__$d,
|
|
71305
71456
|
__vue_script__$c,
|
|
71306
71457
|
__vue_scope_id__$d,
|
|
@@ -71425,8 +71576,8 @@ var script$e = {
|
|
|
71425
71576
|
const __vue_script__$e = script$e;
|
|
71426
71577
|
|
|
71427
71578
|
/* template */
|
|
71428
|
-
var __vue_render__$
|
|
71429
|
-
var __vue_staticRenderFns__$
|
|
71579
|
+
var __vue_render__$c = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('b-button',{staticClass:"text-dark font-weight-bold text-decoration-none",attrs:{"variant":"link","id":("color-popover-" + (_vm.format.type))}},[_c('span',{staticClass:"icon",class:_vm.typeStyle},[_vm._v("A")])]),_vm._v(" "),_c('b-popover',{ref:"popover",attrs:{"delay":0,"no-fade":"","custom-class":"tcl-popover","triggers":"focus","target":("color-popover-" + (_vm.format.type)),"placement":"bottom","container":null}},[_c('swatches',{attrs:{"swatch-size":"14","colors":"text-advanced","inline":""},on:{"input":function($event){return _vm.onClick(_vm.format.type, { color: $event })}}})],1)],1)};
|
|
71580
|
+
var __vue_staticRenderFns__$c = [];
|
|
71430
71581
|
|
|
71431
71582
|
/* style */
|
|
71432
71583
|
const __vue_inject_styles__$f = function (inject) {
|
|
@@ -71448,7 +71599,7 @@ var __vue_staticRenderFns__$b = [];
|
|
|
71448
71599
|
|
|
71449
71600
|
|
|
71450
71601
|
const __vue_component__$f = /*#__PURE__*/normalizeComponent(
|
|
71451
|
-
{ render: __vue_render__$
|
|
71602
|
+
{ render: __vue_render__$c, staticRenderFns: __vue_staticRenderFns__$c },
|
|
71452
71603
|
__vue_inject_styles__$f,
|
|
71453
71604
|
__vue_script__$e,
|
|
71454
71605
|
__vue_scope_id__$f,
|
|
@@ -71474,8 +71625,8 @@ var script$f = {
|
|
|
71474
71625
|
const __vue_script__$f = script$f;
|
|
71475
71626
|
|
|
71476
71627
|
/* template */
|
|
71477
|
-
var __vue_render__$
|
|
71478
|
-
var __vue_staticRenderFns__$
|
|
71628
|
+
var __vue_render__$d = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-button',{staticClass:"text-dark font-weight-bold text-decoration-none",attrs:{"variant":"link"},on:{"click":function($event){return _vm.onClick(_vm.format.type, _vm.format.attrs)}}},[_c('span',{class:_vm.activeClasses(_vm.format.attrs)},[(_vm.format.icon)?_c('font-awesome-icon',{attrs:{"icon":_vm.format.icon}}):_c('span',[_vm._v("\n "+_vm._s(_vm.format.label)+"\n ")])],1)])};
|
|
71629
|
+
var __vue_staticRenderFns__$d = [];
|
|
71479
71630
|
|
|
71480
71631
|
/* style */
|
|
71481
71632
|
const __vue_inject_styles__$g = undefined;
|
|
@@ -71494,7 +71645,7 @@ var __vue_staticRenderFns__$c = [];
|
|
|
71494
71645
|
|
|
71495
71646
|
|
|
71496
71647
|
const __vue_component__$g = /*#__PURE__*/normalizeComponent(
|
|
71497
|
-
{ render: __vue_render__$
|
|
71648
|
+
{ render: __vue_render__$d, staticRenderFns: __vue_staticRenderFns__$d },
|
|
71498
71649
|
__vue_inject_styles__$g,
|
|
71499
71650
|
__vue_script__$f,
|
|
71500
71651
|
__vue_scope_id__$g,
|
|
@@ -71526,7 +71677,8 @@ var script$g = {
|
|
|
71526
71677
|
return {
|
|
71527
71678
|
visible: false,
|
|
71528
71679
|
attrs: {
|
|
71529
|
-
href: null
|
|
71680
|
+
href: null,
|
|
71681
|
+
target: '_self'
|
|
71530
71682
|
}
|
|
71531
71683
|
};
|
|
71532
71684
|
},
|
|
@@ -71581,8 +71733,8 @@ var script$g = {
|
|
|
71581
71733
|
const __vue_script__$g = script$g;
|
|
71582
71734
|
|
|
71583
71735
|
/* template */
|
|
71584
|
-
var __vue_render__$
|
|
71585
|
-
var __vue_staticRenderFns__$
|
|
71736
|
+
var __vue_render__$e = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{"id":"link-popover-container"}},[_c('b-button',{staticClass:"text-dark font-weight-bold text-decoration-none",attrs:{"variant":"link","id":"link-popover"},on:{"click":_vm.showPopover}},[_c('span',{class:_vm.activeClasses(_vm.format.attrs)},[_c('font-awesome-icon',{attrs:{"icon":"link"}})],1)]),_vm._v(" "),(_vm.currentValue)?_c('b-popover',{ref:"popover",attrs:{"triggers":"focus","target":"link-popover","placement":"auto","show":_vm.visible,"container":"link-popover-container"},on:{"update:show":function($event){_vm.visible=$event;}}},[_c('b-input-group',[_c('b-form-input',{attrs:{"type":"url","autofocus":"","state":_vm.urlValid ? null : false,"placeholder":_vm.labels.urlPlaceholder},on:{"keydown":[function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"enter",13,$event.key,"Enter")){ return null; }$event.preventDefault();$event.stopPropagation();return _vm.link.apply(null, arguments)},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"esc",27,$event.key,["Esc","Escape"])){ return null; }$event.preventDefault();$event.stopPropagation();return _vm.close.apply(null, arguments)}]},model:{value:(_vm.attrs.href),callback:function ($$v) {_vm.$set(_vm.attrs, "href", $$v);},expression:"attrs.href"}}),_vm._v(" "),_c('b-input-group-append',[_c('b-button',{attrs:{"disabled":!_vm.urlValid,"variant":"outline-success"},on:{"click":_vm.link}},[_vm._v("\n "+_vm._s(_vm.labels.ok)+"\n ")])],1),_vm._v(" "),_c('b-checkbox',{staticClass:"py-1",attrs:{"value":"_blank","unchecked-value":"_self"},model:{value:(_vm.attrs.target),callback:function ($$v) {_vm.$set(_vm.attrs, "target", $$v);},expression:"attrs.target"}},[_vm._v("\n "+_vm._s(_vm.labels.openLinkInNewTab)+"\n ")])],1)],1):_vm._e()],1)};
|
|
71737
|
+
var __vue_staticRenderFns__$e = [];
|
|
71586
71738
|
|
|
71587
71739
|
/* style */
|
|
71588
71740
|
const __vue_inject_styles__$h = undefined;
|
|
@@ -71601,7 +71753,7 @@ var __vue_staticRenderFns__$d = [];
|
|
|
71601
71753
|
|
|
71602
71754
|
|
|
71603
71755
|
const __vue_component__$h = /*#__PURE__*/normalizeComponent(
|
|
71604
|
-
{ render: __vue_render__$
|
|
71756
|
+
{ render: __vue_render__$e, staticRenderFns: __vue_staticRenderFns__$e },
|
|
71605
71757
|
__vue_inject_styles__$h,
|
|
71606
71758
|
__vue_script__$g,
|
|
71607
71759
|
__vue_scope_id__$h,
|
|
@@ -78167,8 +78319,9 @@ class Link extends Link$1 {
|
|
|
78167
78319
|
get schema() {
|
|
78168
78320
|
const base = super.schema;
|
|
78169
78321
|
return { ...base,
|
|
78170
|
-
toDOM: node => ['a', {
|
|
78322
|
+
toDOM: node => ['a', {
|
|
78171
78323
|
target: '_blank',
|
|
78324
|
+
...node.attrs,
|
|
78172
78325
|
rel: 'noopener noreferrer nofollow'
|
|
78173
78326
|
}, 0]
|
|
78174
78327
|
};
|
|
@@ -78597,8 +78750,8 @@ var script$i = {
|
|
|
78597
78750
|
const __vue_script__$i = script$i;
|
|
78598
78751
|
|
|
78599
78752
|
/* template */
|
|
78600
|
-
var __vue_render__$
|
|
78601
|
-
var __vue_staticRenderFns__$
|
|
78753
|
+
var __vue_render__$f = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-button',{staticClass:"text-dark font-weight-bold text-decoration-none",attrs:{"variant":"link"},on:{"click":function($event){return _vm.onClick(_vm.format.type, _vm.format.attrs)}}},[_c('span',{class:_vm.activeClasses(_vm.format.attrs)},[(_vm.format.icon)?_c('font-awesome-icon',{attrs:{"icon":_vm.format.icon}}):_c('span',[_vm._v("\n "+_vm._s(_vm.format.label)+"\n ")])],1)])};
|
|
78754
|
+
var __vue_staticRenderFns__$f = [];
|
|
78602
78755
|
|
|
78603
78756
|
/* style */
|
|
78604
78757
|
const __vue_inject_styles__$j = undefined;
|
|
@@ -78617,7 +78770,7 @@ var __vue_staticRenderFns__$e = [];
|
|
|
78617
78770
|
|
|
78618
78771
|
|
|
78619
78772
|
const __vue_component__$j = /*#__PURE__*/normalizeComponent(
|
|
78620
|
-
{ render: __vue_render__$
|
|
78773
|
+
{ render: __vue_render__$f, staticRenderFns: __vue_staticRenderFns__$f },
|
|
78621
78774
|
__vue_inject_styles__$j,
|
|
78622
78775
|
__vue_script__$i,
|
|
78623
78776
|
__vue_scope_id__$j,
|
|
@@ -78707,8 +78860,8 @@ var script$j = {
|
|
|
78707
78860
|
const __vue_script__$j = script$j;
|
|
78708
78861
|
|
|
78709
78862
|
/* template */
|
|
78710
|
-
var __vue_render__$
|
|
78711
|
-
var __vue_staticRenderFns__$
|
|
78863
|
+
var __vue_render__$g = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-dropdown',{attrs:{"menu-class":"text-center","variant":"link"}},[_c('template',{slot:"button-content"},[_c('span',{staticClass:"text-dark font-weight-bold"},[_c('span',{class:_vm.rootActiveClasses()},[(_vm.format.icon)?_c('font-awesome-icon',{attrs:{"icon":_vm.format.icon}}):_c('span',[_vm._v("\n "+_vm._s(_vm.format.label)+"\n ")])],1)])]),_vm._v(" "),_vm._l((_vm.format.variants),function(v){return _c('b-dropdown-item',{key:v.variant,on:{"click":function($event){return _vm.dispatchTransaction(v)}}},[_c('b-button',{staticClass:"text-dark font-weight-bold",attrs:{"variant":"link"}},[_c('span',{class:_vm.activeClasses(v.attrs)},[(_vm.format.icon)?_c('font-awesome-icon',{attrs:{"icon":v.icon}}):_c('span',[_vm._v("\n "+_vm._s(v.label)+"\n ")])],1)])],1)})],2)};
|
|
78864
|
+
var __vue_staticRenderFns__$g = [];
|
|
78712
78865
|
|
|
78713
78866
|
/* style */
|
|
78714
78867
|
const __vue_inject_styles__$k = undefined;
|
|
@@ -78727,7 +78880,7 @@ var __vue_staticRenderFns__$f = [];
|
|
|
78727
78880
|
|
|
78728
78881
|
|
|
78729
78882
|
const __vue_component__$k = /*#__PURE__*/normalizeComponent(
|
|
78730
|
-
{ render: __vue_render__$
|
|
78883
|
+
{ render: __vue_render__$g, staticRenderFns: __vue_staticRenderFns__$g },
|
|
78731
78884
|
__vue_inject_styles__$k,
|
|
78732
78885
|
__vue_script__$j,
|
|
78733
78886
|
__vue_scope_id__$k,
|
|
@@ -78836,8 +78989,8 @@ var script$k = {
|
|
|
78836
78989
|
const __vue_script__$k = script$k;
|
|
78837
78990
|
|
|
78838
78991
|
/* template */
|
|
78839
|
-
var __vue_render__$
|
|
78840
|
-
var __vue_staticRenderFns__$
|
|
78992
|
+
var __vue_render__$h = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"d-flex flex-wrap"},[_vm._l((_vm.formats),function(f,i){return _c(_vm.getItem(f),_vm._b({key:("" + (f.name) + i + "}"),tag:"component",attrs:{"format":f,"labels":_vm.labels,"current-value":_vm.currentValue},on:{"click":function($event){(_vm.commands[$event.type])($event.attrs);}}},'component',_vm.$props,false))}),_vm._v(" "),_c('b-button',{staticClass:"text-dark font-weight-bold",attrs:{"variant":"link"},on:{"click":_vm.removeMarks}},[_c('font-awesome-icon',{attrs:{"icon":"remove-format"}})],1)],2)};
|
|
78993
|
+
var __vue_staticRenderFns__$h = [];
|
|
78841
78994
|
|
|
78842
78995
|
/* style */
|
|
78843
78996
|
const __vue_inject_styles__$l = undefined;
|
|
@@ -78856,7 +79009,7 @@ var __vue_staticRenderFns__$g = [];
|
|
|
78856
79009
|
|
|
78857
79010
|
|
|
78858
79011
|
const __vue_component__$l = /*#__PURE__*/normalizeComponent(
|
|
78859
|
-
{ render: __vue_render__$
|
|
79012
|
+
{ render: __vue_render__$h, staticRenderFns: __vue_staticRenderFns__$h },
|
|
78860
79013
|
__vue_inject_styles__$l,
|
|
78861
79014
|
__vue_script__$k,
|
|
78862
79015
|
__vue_scope_id__$l,
|
|
@@ -78962,13 +79115,13 @@ var script$l = {
|
|
|
78962
79115
|
const __vue_script__$l = script$l;
|
|
78963
79116
|
|
|
78964
79117
|
/* template */
|
|
78965
|
-
var __vue_render__$
|
|
79118
|
+
var __vue_render__$i = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-card',{staticClass:"editor rt-content",attrs:{"no-body":""}},[(_vm.editor)?[_c('b-card-header',{attrs:{"header-class":"p-0 rounded-sm"}},[_c('editor-menu-bar',{attrs:{"editor":_vm.editor},scopedSlots:_vm._u([{key:"default",fn:function(ref){
|
|
78966
79119
|
var commands = ref.commands;
|
|
78967
79120
|
var isActive = ref.isActive;
|
|
78968
79121
|
var getMarkAttrs = ref.getMarkAttrs;
|
|
78969
79122
|
var getNodeAttrs = ref.getNodeAttrs;
|
|
78970
79123
|
return [_c('r-toolbar',{attrs:{"editor":_vm.editor,"formats":_vm.toolbar,"commands":commands,"is-active":isActive,"get-mark-attrs":getMarkAttrs,"get-node-attrs":getNodeAttrs,"labels":_vm.labels,"current-value":_vm.currentValue}})]}}],null,false,2342935495)})],1),_vm._v(" "),_c('b-card-body',[_c('editor-content',{staticClass:"editor__content",attrs:{"editor":_vm.editor}})],1)]:_vm._e()],2)};
|
|
78971
|
-
var __vue_staticRenderFns__$
|
|
79124
|
+
var __vue_staticRenderFns__$i = [];
|
|
78972
79125
|
|
|
78973
79126
|
/* style */
|
|
78974
79127
|
const __vue_inject_styles__$m = undefined;
|
|
@@ -78987,7 +79140,7 @@ var __vue_staticRenderFns__$h = [];
|
|
|
78987
79140
|
|
|
78988
79141
|
|
|
78989
79142
|
const __vue_component__$m = /*#__PURE__*/normalizeComponent(
|
|
78990
|
-
{ render: __vue_render__$
|
|
79143
|
+
{ render: __vue_render__$i, staticRenderFns: __vue_staticRenderFns__$i },
|
|
78991
79144
|
__vue_inject_styles__$m,
|
|
78992
79145
|
__vue_script__$l,
|
|
78993
79146
|
__vue_scope_id__$m,
|
|
@@ -79074,8 +79227,8 @@ var script$m = {
|
|
|
79074
79227
|
const __vue_script__$m = script$m;
|
|
79075
79228
|
|
|
79076
79229
|
/* template */
|
|
79077
|
-
var __vue_render__$
|
|
79078
|
-
var __vue_staticRenderFns__$
|
|
79230
|
+
var __vue_render__$j = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.link)?_c('a',{staticClass:"pointer",on:{"click":_vm.onClick}},[_c('font-awesome-icon',{attrs:{"icon":['fas', 'lock']}})],1):_c('b-button',{attrs:{"variant":_vm.buttonVariant},on:{"click":_vm.onClick}},[_vm._t("default",function(){return [(_vm.showButtonIcon)?_c('font-awesome-icon',{attrs:{"icon":['fas', 'lock']}}):_vm._e(),_vm._v(" "),(_vm.buttonLabel)?_c('span',[_vm._v("\n "+_vm._s(_vm.buttonLabel)+"\n ")]):_vm._e()]})],2)};
|
|
79231
|
+
var __vue_staticRenderFns__$j = [];
|
|
79079
79232
|
|
|
79080
79233
|
/* style */
|
|
79081
79234
|
const __vue_inject_styles__$n = function (inject) {
|
|
@@ -79096,7 +79249,7 @@ var __vue_staticRenderFns__$i = [];
|
|
|
79096
79249
|
|
|
79097
79250
|
|
|
79098
79251
|
const __vue_component__$n = /*#__PURE__*/normalizeComponent(
|
|
79099
|
-
{ render: __vue_render__$
|
|
79252
|
+
{ render: __vue_render__$j, staticRenderFns: __vue_staticRenderFns__$j },
|
|
79100
79253
|
__vue_inject_styles__$n,
|
|
79101
79254
|
__vue_script__$m,
|
|
79102
79255
|
__vue_scope_id__$n,
|
|
@@ -79162,8 +79315,8 @@ var script$n = {
|
|
|
79162
79315
|
const __vue_script__$n = script$n;
|
|
79163
79316
|
|
|
79164
79317
|
/* template */
|
|
79165
|
-
var __vue_render__$
|
|
79166
|
-
var __vue_staticRenderFns__$
|
|
79318
|
+
var __vue_render__$k = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-form-radio-group',{attrs:{"buttons":"","disabled":!_vm.enabled,"button-variant":_vm.variant,"options":_vm.options},model:{value:(_vm.selected),callback:function ($$v) {_vm.selected=$$v;},expression:"selected"}})};
|
|
79319
|
+
var __vue_staticRenderFns__$k = [];
|
|
79167
79320
|
|
|
79168
79321
|
/* style */
|
|
79169
79322
|
const __vue_inject_styles__$o = undefined;
|
|
@@ -79182,7 +79335,7 @@ var __vue_staticRenderFns__$j = [];
|
|
|
79182
79335
|
|
|
79183
79336
|
|
|
79184
79337
|
const __vue_component__$o = /*#__PURE__*/normalizeComponent(
|
|
79185
|
-
{ render: __vue_render__$
|
|
79338
|
+
{ render: __vue_render__$k, staticRenderFns: __vue_staticRenderFns__$k },
|
|
79186
79339
|
__vue_inject_styles__$o,
|
|
79187
79340
|
__vue_script__$n,
|
|
79188
79341
|
__vue_scope_id__$o,
|
|
@@ -79265,8 +79418,8 @@ var script$o = {
|
|
|
79265
79418
|
const __vue_script__$o = script$o;
|
|
79266
79419
|
|
|
79267
79420
|
/* template */
|
|
79268
|
-
var __vue_render__$
|
|
79269
|
-
var __vue_staticRenderFns__$
|
|
79421
|
+
var __vue_render__$l = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-row',{staticClass:"mb-lg-1",attrs:{"no-gutters":""}},[_c('b-col',{attrs:{"cols":"12","lg":"6","order":"2","order-lg":"1"}},[_c('access',{attrs:{"access":_vm.access,"current":_vm.current,"enabled":_vm.enabled},on:{"update":_vm.onUpdate}}),_vm._v(" "),_c('b-button',{directives:[{name:"show",rawName:"v-show",value:(_vm.isChanged),expression:"isChanged"}],staticClass:"pl-0",attrs:{"variant":"link"},on:{"click":_vm.onReset}},[_vm._v("\n "+_vm._s(_vm.$t('ui.reset-back', {current: _vm.current}))+"\n ")])],1),_vm._v(" "),_c('b-col',{staticClass:"mb-lg-4 text-wrap",attrs:{"cols":"12","lg":"6","order":"1","order-lg":"2"}},[_c('b',{domProps:{"innerHTML":_vm._s(_vm.title || (_vm.operation + " on " + _vm.resource))}}),_vm._v(" "),_c('div',[_vm._v(_vm._s(_vm.description || ' '))])])],1)};
|
|
79422
|
+
var __vue_staticRenderFns__$l = [];
|
|
79270
79423
|
|
|
79271
79424
|
/* style */
|
|
79272
79425
|
const __vue_inject_styles__$p = undefined;
|
|
@@ -79285,7 +79438,7 @@ var __vue_staticRenderFns__$k = [];
|
|
|
79285
79438
|
|
|
79286
79439
|
|
|
79287
79440
|
const __vue_component__$p = /*#__PURE__*/normalizeComponent(
|
|
79288
|
-
{ render: __vue_render__$
|
|
79441
|
+
{ render: __vue_render__$l, staticRenderFns: __vue_staticRenderFns__$l },
|
|
79289
79442
|
__vue_inject_styles__$p,
|
|
79290
79443
|
__vue_script__$o,
|
|
79291
79444
|
__vue_scope_id__$p,
|
|
@@ -79329,8 +79482,8 @@ var script$p = {
|
|
|
79329
79482
|
const __vue_script__$p = script$p;
|
|
79330
79483
|
|
|
79331
79484
|
/* template */
|
|
79332
|
-
var __vue_render__$
|
|
79333
|
-
var __vue_staticRenderFns__$
|
|
79485
|
+
var __vue_render__$m = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-container',_vm._l((_vm.rules),function(p,i){return _c('rule',_vm._b({key:p.resource + p.operation,class:{ 'mt-4': i > 0 },on:{"update":_vm.onUpdate}},'rule',p,false))}),1)};
|
|
79486
|
+
var __vue_staticRenderFns__$m = [];
|
|
79334
79487
|
|
|
79335
79488
|
/* style */
|
|
79336
79489
|
const __vue_inject_styles__$q = undefined;
|
|
@@ -79349,7 +79502,7 @@ var __vue_staticRenderFns__$l = [];
|
|
|
79349
79502
|
|
|
79350
79503
|
|
|
79351
79504
|
const __vue_component__$q = /*#__PURE__*/normalizeComponent(
|
|
79352
|
-
{ render: __vue_render__$
|
|
79505
|
+
{ render: __vue_render__$m, staticRenderFns: __vue_staticRenderFns__$m },
|
|
79353
79506
|
__vue_inject_styles__$q,
|
|
79354
79507
|
__vue_script__$p,
|
|
79355
79508
|
__vue_scope_id__$q,
|
|
@@ -79603,8 +79756,8 @@ var script$q = {
|
|
|
79603
79756
|
const __vue_script__$q = script$q;
|
|
79604
79757
|
|
|
79605
79758
|
/* template */
|
|
79606
|
-
var __vue_render__$
|
|
79607
|
-
var __vue_staticRenderFns__$
|
|
79759
|
+
var __vue_render__$n = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-form',{on:{"submit":function($event){$event.preventDefault();return _vm.onSubmit.apply(null, arguments)}}},[_c('b-row',[_c('b-col',{staticClass:"role-list",attrs:{"cols":"12","lg":"3"}},[_c('b-list-group',{staticClass:"d-none d-lg-block"},_vm._l((_vm.roles),function(r){return _c('b-list-group-item',{key:r.roleID,staticClass:"text-break pointer",attrs:{"active":r.roleID === _vm.currentRole.roleID,"active-class":"primary","variant":"outline-primary"},on:{"click":function($event){return _vm.onRoleChange(r)}}},[_vm._v("\n "+_vm._s(r.name || r.handle || r.roleID)+"\n ")])}),1),_vm._v(" "),_c('vue-select',{key:"roleID",staticClass:"mb-4 d-block d-lg-none",attrs:{"label":"name","clearable":false,"options":_vm.roles},on:{"input":_vm.onRoleChange},model:{value:(_vm.currentRole),callback:function ($$v) {_vm.currentRole=$$v;},expression:"currentRole"}})],1),_vm._v(" "),_c('b-col',{staticClass:"rule-list",attrs:{"cols":"12","lg":"9"}},[_c('rules',{attrs:{"rules":_vm.rules},on:{"update:rules":function($event){_vm.rules=$event;}}})],1)],1),_vm._v(" "),_c('b-row',{staticClass:"footer mt-3"},[_c('b-col',{staticClass:"rule-list text-right",attrs:{"cols":"9","offset":"3"}},[_c('b-button',{attrs:{"type":"submit","variant":"primary","disabled":_vm.disabled}},[_vm._v("\n "+_vm._s(_vm.$t('permissions:ui.save-changes'))+"\n ")])],1)],1)],1)};
|
|
79760
|
+
var __vue_staticRenderFns__$n = [];
|
|
79608
79761
|
|
|
79609
79762
|
/* style */
|
|
79610
79763
|
const __vue_inject_styles__$r = function (inject) {
|
|
@@ -79625,7 +79778,7 @@ var __vue_staticRenderFns__$m = [];
|
|
|
79625
79778
|
|
|
79626
79779
|
|
|
79627
79780
|
const __vue_component__$r = /*#__PURE__*/normalizeComponent(
|
|
79628
|
-
{ render: __vue_render__$
|
|
79781
|
+
{ render: __vue_render__$n, staticRenderFns: __vue_staticRenderFns__$n },
|
|
79629
79782
|
__vue_inject_styles__$r,
|
|
79630
79783
|
__vue_script__$q,
|
|
79631
79784
|
__vue_scope_id__$r,
|
|
@@ -79742,8 +79895,8 @@ var script$r = {
|
|
|
79742
79895
|
const __vue_script__$r = script$r;
|
|
79743
79896
|
|
|
79744
79897
|
/* template */
|
|
79745
|
-
var __vue_render__$
|
|
79746
|
-
var __vue_staticRenderFns__$
|
|
79898
|
+
var __vue_render__$o = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('b-modal',{staticClass:"overflow-hidden",attrs:{"hide-footer":"","size":"xl","title":_vm.translatedTitle,"lazy":"","scrollable":""},on:{"hide":_vm.onHide},model:{value:(_vm.showModal),callback:function ($$v) {_vm.showModal=$$v;},expression:"showModal"}},[(_vm.resource)?_c('c-permissions-form',{staticClass:"h-100",attrs:{"resource":_vm.resource,"target":_vm.target,"all-specific":_vm.allSpecific}}):_vm._e()],1)],1)};
|
|
79899
|
+
var __vue_staticRenderFns__$o = [];
|
|
79747
79900
|
|
|
79748
79901
|
/* style */
|
|
79749
79902
|
const __vue_inject_styles__$s = undefined;
|
|
@@ -79762,7 +79915,7 @@ var __vue_staticRenderFns__$n = [];
|
|
|
79762
79915
|
|
|
79763
79916
|
|
|
79764
79917
|
const __vue_component__$s = /*#__PURE__*/normalizeComponent(
|
|
79765
|
-
{ render: __vue_render__$
|
|
79918
|
+
{ render: __vue_render__$o, staticRenderFns: __vue_staticRenderFns__$o },
|
|
79766
79919
|
__vue_inject_styles__$s,
|
|
79767
79920
|
__vue_script__$r,
|
|
79768
79921
|
__vue_scope_id__$s,
|
|
@@ -79865,8 +80018,8 @@ var script$t = {
|
|
|
79865
80018
|
const __vue_script__$t = script$t;
|
|
79866
80019
|
|
|
79867
80020
|
/* template */
|
|
79868
|
-
var __vue_render__$
|
|
79869
|
-
var __vue_staticRenderFns__$
|
|
80021
|
+
var __vue_render__$p = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('p',{domProps:{"innerHTML":_vm._s(_vm.message)}}),_vm._v(" "),_c('div',{staticClass:"text-center m-2"},[_c('b-button',{attrs:{"variant":_vm.pVal('buttonVariant', 'primary'),"disabled":_vm.loading},on:{"click":function($event){_vm.$emit('submit', { confirmed: _vm.pRaw('buttonValue', true, 'Boolean') });}}},[_vm._v("\n "+_vm._s(_vm.pVal('buttonLabel', 'OK'))+"\n ")])],1)])};
|
|
80022
|
+
var __vue_staticRenderFns__$p = [];
|
|
79870
80023
|
|
|
79871
80024
|
/* style */
|
|
79872
80025
|
const __vue_inject_styles__$u = undefined;
|
|
@@ -79885,7 +80038,7 @@ var __vue_staticRenderFns__$o = [];
|
|
|
79885
80038
|
|
|
79886
80039
|
|
|
79887
80040
|
const __vue_component__$u = /*#__PURE__*/normalizeComponent(
|
|
79888
|
-
{ render: __vue_render__$
|
|
80041
|
+
{ render: __vue_render__$p, staticRenderFns: __vue_staticRenderFns__$p },
|
|
79889
80042
|
__vue_inject_styles__$u,
|
|
79890
80043
|
__vue_script__$t,
|
|
79891
80044
|
__vue_scope_id__$u,
|
|
@@ -79906,8 +80059,8 @@ var script$u = {
|
|
|
79906
80059
|
const __vue_script__$u = script$u;
|
|
79907
80060
|
|
|
79908
80061
|
/* template */
|
|
79909
|
-
var __vue_render__$
|
|
79910
|
-
var __vue_staticRenderFns__$
|
|
80062
|
+
var __vue_render__$q = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('p',{domProps:{"innerHTML":_vm._s(_vm.message)}}),_vm._v(" "),_c('div',{staticClass:"text-center m-2"},[_c('b-button',{attrs:{"variant":_vm.pVal('confirmButtonVariant', 'primary'),"disabled":_vm.loading},on:{"click":function($event){_vm.$emit('submit', { value: _vm.pRaw('confirmButtonValue', true, 'Boolean') });}}},[_vm._v("\n "+_vm._s(_vm.pVal('confirmButtonLabel', 'Yes'))+"\n ")]),_vm._v(" "),_c('b-button',{attrs:{"disabled":_vm.loading,"variant":_vm.pVal('rejectButtonVariant', 'primary')},on:{"click":function($event){_vm.$emit('submit', { value: _vm.pRaw('rejectButtonValue', false, 'Boolean') });}}},[_vm._v("\n "+_vm._s(_vm.pVal('rejectButtonLabel', 'No'))+"\n ")])],1)])};
|
|
80063
|
+
var __vue_staticRenderFns__$q = [];
|
|
79911
80064
|
|
|
79912
80065
|
/* style */
|
|
79913
80066
|
const __vue_inject_styles__$v = undefined;
|
|
@@ -79926,7 +80079,7 @@ var __vue_staticRenderFns__$p = [];
|
|
|
79926
80079
|
|
|
79927
80080
|
|
|
79928
80081
|
const __vue_component__$v = /*#__PURE__*/normalizeComponent(
|
|
79929
|
-
{ render: __vue_render__$
|
|
80082
|
+
{ render: __vue_render__$q, staticRenderFns: __vue_staticRenderFns__$q },
|
|
79930
80083
|
__vue_inject_styles__$v,
|
|
79931
80084
|
__vue_script__$u,
|
|
79932
80085
|
__vue_scope_id__$v,
|
|
@@ -79975,8 +80128,8 @@ var script$v = {
|
|
|
79975
80128
|
const __vue_script__$v = script$v;
|
|
79976
80129
|
|
|
79977
80130
|
/* template */
|
|
79978
|
-
var __vue_render__$
|
|
79979
|
-
var __vue_staticRenderFns__$
|
|
80131
|
+
var __vue_render__$r = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('p',{domProps:{"innerHTML":_vm._s(_vm.message)}}),_vm._v(" "),_c('b-form-group',{attrs:{"label":_vm.label}},[_c('b-input',{attrs:{"type":_vm.type,"disabled":_vm.loading},model:{value:(_vm.value),callback:function ($$v) {_vm.value=$$v;},expression:"value"}})],1),_vm._v(" "),_c('b-button',{attrs:{"disabled":_vm.loading},on:{"click":function($event){return _vm.$emit('submit', { value: { '@value': _vm.value, '@type': 'String' }})}}},[_vm._v("\n "+_vm._s(_vm.pVal('buttonLabel', 'Submit'))+"\n ")])],1)};
|
|
80132
|
+
var __vue_staticRenderFns__$r = [];
|
|
79980
80133
|
|
|
79981
80134
|
/* style */
|
|
79982
80135
|
const __vue_inject_styles__$w = undefined;
|
|
@@ -79995,7 +80148,7 @@ var __vue_staticRenderFns__$q = [];
|
|
|
79995
80148
|
|
|
79996
80149
|
|
|
79997
80150
|
const __vue_component__$w = /*#__PURE__*/normalizeComponent(
|
|
79998
|
-
{ render: __vue_render__$
|
|
80151
|
+
{ render: __vue_render__$r, staticRenderFns: __vue_staticRenderFns__$r },
|
|
79999
80152
|
__vue_inject_styles__$w,
|
|
80000
80153
|
__vue_script__$v,
|
|
80001
80154
|
__vue_scope_id__$w,
|
|
@@ -80025,8 +80178,8 @@ var script$w = {
|
|
|
80025
80178
|
const __vue_script__$w = script$w;
|
|
80026
80179
|
|
|
80027
80180
|
/* template */
|
|
80028
|
-
var __vue_render__$
|
|
80029
|
-
var __vue_staticRenderFns__$
|
|
80181
|
+
var __vue_render__$s = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('p',{staticClass:"mb-0",domProps:{"innerHTML":_vm._s(_vm.message)}})])};
|
|
80182
|
+
var __vue_staticRenderFns__$s = [];
|
|
80030
80183
|
|
|
80031
80184
|
/* style */
|
|
80032
80185
|
const __vue_inject_styles__$x = undefined;
|
|
@@ -80045,7 +80198,7 @@ var __vue_staticRenderFns__$r = [];
|
|
|
80045
80198
|
|
|
80046
80199
|
|
|
80047
80200
|
const __vue_component__$x = /*#__PURE__*/normalizeComponent(
|
|
80048
|
-
{ render: __vue_render__$
|
|
80201
|
+
{ render: __vue_render__$s, staticRenderFns: __vue_staticRenderFns__$s },
|
|
80049
80202
|
__vue_inject_styles__$x,
|
|
80050
80203
|
__vue_script__$w,
|
|
80051
80204
|
__vue_scope_id__$x,
|
|
@@ -80135,8 +80288,8 @@ var script$x = {
|
|
|
80135
80288
|
const __vue_script__$x = script$x;
|
|
80136
80289
|
|
|
80137
80290
|
/* template */
|
|
80138
|
-
var __vue_render__$
|
|
80139
|
-
var __vue_staticRenderFns__$
|
|
80291
|
+
var __vue_render__$t = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('p',{domProps:{"innerHTML":_vm._s(_vm.message)}}),_vm._v(" "),_c('b-form-group',{attrs:{"label":_vm.pVal('label', 'Input')}},[(_vm.type === 'select')?_c('b-form-select',{attrs:{"options":_vm.options,"disabled":_vm.loading,"multiple":_vm.multiple},scopedSlots:_vm._u([(!_vm.multiple)?{key:"first",fn:function(){return [_c('b-form-select-option',{attrs:{"value":undefined,"disabled":""}},[_vm._v("\n -- Please select an option --\n ")])]},proxy:true}:null],null,true),model:{value:(_vm.value),callback:function ($$v) {_vm.value=$$v;},expression:"value"}}):_vm._e(),_vm._v(" "),(_vm.type === 'radio')?_c('b-form-radio-group',{attrs:{"disabled":_vm.loading,"options":_vm.options},model:{value:(_vm.value),callback:function ($$v) {_vm.value=$$v;},expression:"value"}}):_vm._e()],1),_vm._v(" "),_c('b-button',{attrs:{"disabled":_vm.loading},on:{"click":function($event){_vm.$emit('submit', { value: _vm.encodeValue() });}}},[_vm._v("\n "+_vm._s(_vm.pVal('buttonLabel', 'Submit'))+"\n ")])],1)};
|
|
80292
|
+
var __vue_staticRenderFns__$t = [];
|
|
80140
80293
|
|
|
80141
80294
|
/* style */
|
|
80142
80295
|
const __vue_inject_styles__$y = undefined;
|
|
@@ -80155,7 +80308,7 @@ var __vue_staticRenderFns__$s = [];
|
|
|
80155
80308
|
|
|
80156
80309
|
|
|
80157
80310
|
const __vue_component__$y = /*#__PURE__*/normalizeComponent(
|
|
80158
|
-
{ render: __vue_render__$
|
|
80311
|
+
{ render: __vue_render__$t, staticRenderFns: __vue_staticRenderFns__$t },
|
|
80159
80312
|
__vue_inject_styles__$y,
|
|
80160
80313
|
__vue_script__$x,
|
|
80161
80314
|
__vue_scope_id__$y,
|
|
@@ -80234,7 +80387,7 @@ const definitions = {
|
|
|
80234
80387
|
}
|
|
80235
80388
|
else {
|
|
80236
80389
|
// Resolve recordID
|
|
80237
|
-
if (pType(v, 'record') === '
|
|
80390
|
+
if (pType(v, 'record') === 'ID') {
|
|
80238
80391
|
recordID = record;
|
|
80239
80392
|
}
|
|
80240
80393
|
// Resolve namespaceID
|
|
@@ -80284,9 +80437,12 @@ const definitions = {
|
|
|
80284
80437
|
pageID = pp[0].pageID;
|
|
80285
80438
|
// @ts-ignore
|
|
80286
80439
|
if (this.$root.$options.name === 'compose') {
|
|
80287
|
-
|
|
80288
|
-
|
|
80289
|
-
|
|
80440
|
+
if (!edit && !recordID) {
|
|
80441
|
+
throw new Error('invalid record page prompt configuration');
|
|
80442
|
+
}
|
|
80443
|
+
let name = 'page.record';
|
|
80444
|
+
if (edit) {
|
|
80445
|
+
name += recordID ? '.edit' : '.create';
|
|
80290
80446
|
}
|
|
80291
80447
|
// If name and params match, make sure to refresh page instead of push
|
|
80292
80448
|
// @ts-ignore
|
|
@@ -80436,12 +80592,12 @@ var script$y = {
|
|
|
80436
80592
|
const __vue_script__$y = script$y;
|
|
80437
80593
|
|
|
80438
80594
|
/* template */
|
|
80439
|
-
var __vue_render__$
|
|
80595
|
+
var __vue_render__$u = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',_vm._l((_vm.toasts),function(ref){
|
|
80440
80596
|
var prompt = ref.prompt;
|
|
80441
80597
|
var component = ref.component;
|
|
80442
80598
|
var passive = ref.passive;
|
|
80443
80599
|
return _c('b-toast',{key:'wfPromptToast-'+prompt.stateID,attrs:{"id":'wfPromptToast-'+prompt.stateID,"variant":_vm.pVal(prompt, 'variant', 'primary'),"visible":!_vm.isActive,"solid":"","no-auto-hide":!passive,"auto-hide-delay":_vm.pVal(prompt, 'timeout', _vm.defaultTimeout) * 1000,"no-close-button":!passive},scopedSlots:_vm._u([{key:"toast-title",fn:function(){return [_c('div',{staticClass:"d-flex flex-grow-1 align-items-baseline"},[_c('strong',{staticClass:"mr-auto"},[_vm._v(_vm._s(_vm.pVal(prompt, 'title', 'Workflow prompt')))]),_vm._v(" "),(!passive && _vm.active.length > 1)?_c('b-button',{attrs:{"variant":"link","size":"sm"},on:{"click":function($event){return _vm.activate(true)}}},[_vm._v("\n "+_vm._s(_vm.active.length)+" waiting\n ")]):_vm._e()],1)]},proxy:true}],null,true)},[_vm._v(" "),(component)?_c(component,{tag:"component",attrs:{"payload":prompt.payload,"loading":_vm.isLoading},on:{"submit":function($event){return _vm.resumeToast({ input: $event, prompt: prompt })}}}):_vm._e()],1)}),1)};
|
|
80444
|
-
var __vue_staticRenderFns__$
|
|
80600
|
+
var __vue_staticRenderFns__$u = [];
|
|
80445
80601
|
|
|
80446
80602
|
/* style */
|
|
80447
80603
|
const __vue_inject_styles__$z = function (inject) {
|
|
@@ -80462,7 +80618,7 @@ var __vue_staticRenderFns__$t = [];
|
|
|
80462
80618
|
|
|
80463
80619
|
|
|
80464
80620
|
const __vue_component__$z = /*#__PURE__*/normalizeComponent(
|
|
80465
|
-
{ render: __vue_render__$
|
|
80621
|
+
{ render: __vue_render__$u, staticRenderFns: __vue_staticRenderFns__$u },
|
|
80466
80622
|
__vue_inject_styles__$z,
|
|
80467
80623
|
__vue_script__$y,
|
|
80468
80624
|
__vue_scope_id__$z,
|
|
@@ -80542,13 +80698,13 @@ var script$z = {
|
|
|
80542
80698
|
const __vue_script__$z = script$z;
|
|
80543
80699
|
|
|
80544
80700
|
/* template */
|
|
80545
|
-
var __vue_render__$
|
|
80701
|
+
var __vue_render__$v = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-modal',{attrs:{"size":"lg","lazy":"","hide-footer":!_vm.current,"title":_vm.current ? _vm.current.title : 'Workflow prompts',"busy":_vm.isLoading},on:{"hide":function($event){return _vm.deactivate()}},scopedSlots:_vm._u([(_vm.current)?{key:"modal-footer",fn:function(){return [_c('b-button',{attrs:{"variant":"link"},on:{"click":function($event){return _vm.activate(true)}}},[_vm._v("\n « Back to list\n ")])]},proxy:true}:null],null,true),model:{value:(_vm.isOpened),callback:function ($$v) {_vm.isOpened=$$v;},expression:"isOpened"}},[(_vm.current)?_c(_vm.current.component,{tag:"component",attrs:{"payload":_vm.current.prompt.payload,"loading":_vm.isLoading},on:{"submit":function($event){return _vm.resume({ input: $event, prompt: _vm.current.prompt })}}}):_c('div',_vm._l((_vm.list),function(ref){
|
|
80546
80702
|
var key = ref.key;
|
|
80547
80703
|
var title = ref.title;
|
|
80548
80704
|
var age = ref.age;
|
|
80549
80705
|
var prompt = ref.prompt;
|
|
80550
80706
|
return _c('div',{key:key,staticClass:"d-flex flex-grow-1 align-items-baseline"},[_c('span',{staticClass:"mr-auto",on:{"click":function($event){return _vm.activate(prompt)}}},[_vm._v("\n "+_vm._s(title)+"\n "),_c('time',{staticClass:"muted small",attrs:{"datetime":prompt.createdAt}},[_vm._v("\n "+_vm._s(age)+"\n ")])]),_vm._v(" "),_vm._e()],1)}),0)],1)};
|
|
80551
|
-
var __vue_staticRenderFns__$
|
|
80707
|
+
var __vue_staticRenderFns__$v = [];
|
|
80552
80708
|
|
|
80553
80709
|
/* style */
|
|
80554
80710
|
const __vue_inject_styles__$A = undefined;
|
|
@@ -80567,7 +80723,7 @@ var __vue_staticRenderFns__$u = [];
|
|
|
80567
80723
|
|
|
80568
80724
|
|
|
80569
80725
|
const __vue_component__$A = /*#__PURE__*/normalizeComponent(
|
|
80570
|
-
{ render: __vue_render__$
|
|
80726
|
+
{ render: __vue_render__$v, staticRenderFns: __vue_staticRenderFns__$v },
|
|
80571
80727
|
__vue_inject_styles__$A,
|
|
80572
80728
|
__vue_script__$z,
|
|
80573
80729
|
__vue_scope_id__$A,
|
|
@@ -80601,8 +80757,8 @@ var script$A = {
|
|
|
80601
80757
|
const __vue_script__$A = script$A;
|
|
80602
80758
|
|
|
80603
80759
|
/* template */
|
|
80604
|
-
var __vue_render__$
|
|
80605
|
-
var __vue_staticRenderFns__$
|
|
80760
|
+
var __vue_render__$w = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('c-prompt-toast'),_vm._v(" "),_c('c-prompt-modal')],1)};
|
|
80761
|
+
var __vue_staticRenderFns__$w = [];
|
|
80606
80762
|
|
|
80607
80763
|
/* style */
|
|
80608
80764
|
const __vue_inject_styles__$B = undefined;
|
|
@@ -80621,7 +80777,7 @@ var __vue_staticRenderFns__$v = [];
|
|
|
80621
80777
|
|
|
80622
80778
|
|
|
80623
80779
|
const __vue_component__$B = /*#__PURE__*/normalizeComponent(
|
|
80624
|
-
{ render: __vue_render__$
|
|
80780
|
+
{ render: __vue_render__$w, staticRenderFns: __vue_staticRenderFns__$w },
|
|
80625
80781
|
__vue_inject_styles__$B,
|
|
80626
80782
|
__vue_script__$A,
|
|
80627
80783
|
__vue_scope_id__$B,
|
|
@@ -80633,7 +80789,16 @@ var __vue_staticRenderFns__$v = [];
|
|
|
80633
80789
|
undefined
|
|
80634
80790
|
);
|
|
80635
80791
|
|
|
80636
|
-
const variants = [
|
|
80792
|
+
const variants = [
|
|
80793
|
+
{ value: 'primary', text: 'Primary' },
|
|
80794
|
+
{ value: 'secondary', text: 'Secondary' },
|
|
80795
|
+
{ value: 'success', text: 'Success' },
|
|
80796
|
+
{ value: 'warning', text: 'Warning' },
|
|
80797
|
+
{ value: 'danger', text: 'Danger' },
|
|
80798
|
+
{ value: 'info', text: 'Info' },
|
|
80799
|
+
{ value: 'light', text: 'Light' },
|
|
80800
|
+
{ value: 'dark', text: 'Dark' },
|
|
80801
|
+
];
|
|
80637
80802
|
const prompts = Object.freeze([{
|
|
80638
80803
|
ref: 'redirect',
|
|
80639
80804
|
meta: { short: 'Redirect user to an outside URL' },
|
|
@@ -80666,7 +80831,7 @@ const prompts = Object.freeze([{
|
|
|
80666
80831
|
parameters: [
|
|
80667
80832
|
{ name: 'title', types: ['String'] },
|
|
80668
80833
|
{ name: 'message', types: ['String'], required: true },
|
|
80669
|
-
{ name: 'variant', types: ['String'], meta: { visual: { options: variants } } },
|
|
80834
|
+
{ name: 'variant', types: ['String'], meta: { visual: { input: { type: 'select', properties: { options: variants } } } } },
|
|
80670
80835
|
{ name: 'timeout', types: ['Integer'], meta: { description: 'How long do we show the notification in seconds' } },
|
|
80671
80836
|
],
|
|
80672
80837
|
}, {
|
|
@@ -80676,7 +80841,7 @@ const prompts = Object.freeze([{
|
|
|
80676
80841
|
{ name: 'title', types: ['String'] },
|
|
80677
80842
|
{ name: 'message', types: ['String'], required: true },
|
|
80678
80843
|
{ name: 'buttonLabel', types: ['String'] },
|
|
80679
|
-
{ name: 'buttonVariant', types: ['String'], meta: { visual: { options: variants } } },
|
|
80844
|
+
{ name: 'buttonVariant', types: ['String'], meta: { visual: { input: { type: 'select', properties: { options: variants } } } } },
|
|
80680
80845
|
{ name: 'buttonValue', types: ['Any'] },
|
|
80681
80846
|
],
|
|
80682
80847
|
}, {
|
|
@@ -80686,10 +80851,10 @@ const prompts = Object.freeze([{
|
|
|
80686
80851
|
{ name: 'title', types: ['String'] },
|
|
80687
80852
|
{ name: 'message', types: ['String'], required: true },
|
|
80688
80853
|
{ name: 'confirmButtonLabel', types: ['String'] },
|
|
80689
|
-
{ name: 'confirmButtonVariant', types: ['String'], meta: { visual: { options: variants } } },
|
|
80854
|
+
{ name: 'confirmButtonVariant', types: ['String'], meta: { visual: { input: { type: 'select', properties: { options: variants } } } } },
|
|
80690
80855
|
{ name: 'confirmButtonValue', types: ['Any'] },
|
|
80691
80856
|
{ name: 'rejectButtonLabel', types: ['String'] },
|
|
80692
|
-
{ name: 'rejectButtonVariant', types: ['String'], meta: { visual: { options: variants } } },
|
|
80857
|
+
{ name: 'rejectButtonVariant', types: ['String'], meta: { visual: { input: { type: 'select', properties: { options: variants } } } } },
|
|
80693
80858
|
{ name: 'rejectButtonValue', types: ['Any'] },
|
|
80694
80859
|
],
|
|
80695
80860
|
results: [
|
|
@@ -80700,7 +80865,7 @@ const prompts = Object.freeze([{
|
|
|
80700
80865
|
meta: { short: 'Prompt user with a single input' },
|
|
80701
80866
|
parameters: [
|
|
80702
80867
|
{ name: 'title', types: ['String'] },
|
|
80703
|
-
{ name: 'variant', types: ['String'], meta: { visual: { options: variants } } },
|
|
80868
|
+
{ name: 'variant', types: ['String'], meta: { visual: { input: { type: 'select', properties: { options: variants } } } } },
|
|
80704
80869
|
{ name: 'message', types: ['String'], required: true },
|
|
80705
80870
|
{ name: 'label', types: ['String'] },
|
|
80706
80871
|
{
|
|
@@ -80708,7 +80873,15 @@ const prompts = Object.freeze([{
|
|
|
80708
80873
|
types: ['String'],
|
|
80709
80874
|
meta: {
|
|
80710
80875
|
visual: {
|
|
80711
|
-
options: [
|
|
80876
|
+
options: [
|
|
80877
|
+
{ value: 'text', text: 'Text' },
|
|
80878
|
+
{ value: 'number', text: 'Number' },
|
|
80879
|
+
{ value: 'email', text: 'Email' },
|
|
80880
|
+
{ value: 'password', text: 'Password' },
|
|
80881
|
+
{ value: 'search', text: 'Search' },
|
|
80882
|
+
{ value: 'date', text: 'Date' },
|
|
80883
|
+
{ value: 'time', text: 'Time' },
|
|
80884
|
+
],
|
|
80712
80885
|
},
|
|
80713
80886
|
},
|
|
80714
80887
|
},
|
|
@@ -80722,7 +80895,7 @@ const prompts = Object.freeze([{
|
|
|
80722
80895
|
meta: { short: 'Prompt user with options' },
|
|
80723
80896
|
parameters: [
|
|
80724
80897
|
{ name: 'title', types: ['String'] },
|
|
80725
|
-
{ name: 'variant', types: ['String'], meta: { visual: { options: variants } } },
|
|
80898
|
+
{ name: 'variant', types: ['String'], meta: { visual: { input: { type: 'select', properties: { options: variants } } } } },
|
|
80726
80899
|
{ name: 'message', types: ['String'], required: true },
|
|
80727
80900
|
{ name: 'label', types: ['String'] },
|
|
80728
80901
|
{
|
|
@@ -80730,7 +80903,10 @@ const prompts = Object.freeze([{
|
|
|
80730
80903
|
types: ['String'],
|
|
80731
80904
|
meta: {
|
|
80732
80905
|
visual: {
|
|
80733
|
-
options: [
|
|
80906
|
+
options: [
|
|
80907
|
+
{ value: 'select', text: 'Select' },
|
|
80908
|
+
{ value: 'radio', text: 'Radio' },
|
|
80909
|
+
],
|
|
80734
80910
|
},
|
|
80735
80911
|
},
|
|
80736
80912
|
},
|
|
@@ -80769,8 +80945,8 @@ var script$B = {
|
|
|
80769
80945
|
const __vue_script__$B = script$B;
|
|
80770
80946
|
|
|
80771
80947
|
/* template */
|
|
80772
|
-
var __vue_render__$
|
|
80773
|
-
var __vue_staticRenderFns__$
|
|
80948
|
+
var __vue_render__$x = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-container',{staticClass:"d-flex justify-content-center vh-100 logo",attrs:{"fluid":""}},[(_vm.logo)?_c('img',{staticClass:"w-25 my-auto",attrs:{"src":_vm.logo}}):_vm._e()])};
|
|
80949
|
+
var __vue_staticRenderFns__$x = [];
|
|
80774
80950
|
|
|
80775
80951
|
/* style */
|
|
80776
80952
|
const __vue_inject_styles__$C = function (inject) {
|
|
@@ -80791,7 +80967,7 @@ var __vue_staticRenderFns__$w = [];
|
|
|
80791
80967
|
|
|
80792
80968
|
|
|
80793
80969
|
const __vue_component__$C = /*#__PURE__*/normalizeComponent(
|
|
80794
|
-
{ render: __vue_render__$
|
|
80970
|
+
{ render: __vue_render__$x, staticRenderFns: __vue_staticRenderFns__$x },
|
|
80795
80971
|
__vue_inject_styles__$C,
|
|
80796
80972
|
__vue_script__$B,
|
|
80797
80973
|
__vue_scope_id__$C,
|
|
@@ -80952,6 +81128,31 @@ var __vue_staticRenderFns__$w = [];
|
|
|
80952
81128
|
//
|
|
80953
81129
|
//
|
|
80954
81130
|
//
|
|
81131
|
+
//
|
|
81132
|
+
//
|
|
81133
|
+
//
|
|
81134
|
+
//
|
|
81135
|
+
//
|
|
81136
|
+
//
|
|
81137
|
+
//
|
|
81138
|
+
//
|
|
81139
|
+
//
|
|
81140
|
+
//
|
|
81141
|
+
//
|
|
81142
|
+
//
|
|
81143
|
+
//
|
|
81144
|
+
//
|
|
81145
|
+
//
|
|
81146
|
+
//
|
|
81147
|
+
//
|
|
81148
|
+
//
|
|
81149
|
+
//
|
|
81150
|
+
//
|
|
81151
|
+
//
|
|
81152
|
+
//
|
|
81153
|
+
//
|
|
81154
|
+
//
|
|
81155
|
+
//
|
|
80955
81156
|
var script$C = {
|
|
80956
81157
|
props: {
|
|
80957
81158
|
sidebarPinned: {
|
|
@@ -80968,6 +81169,10 @@ var script$C = {
|
|
|
80968
81169
|
type: String,
|
|
80969
81170
|
default: '../'
|
|
80970
81171
|
},
|
|
81172
|
+
settings: {
|
|
81173
|
+
type: Object,
|
|
81174
|
+
required: true
|
|
81175
|
+
},
|
|
80971
81176
|
labels: {
|
|
80972
81177
|
type: Object,
|
|
80973
81178
|
required: true
|
|
@@ -80987,6 +81192,35 @@ var script$C = {
|
|
|
80987
81192
|
return `https://docs.cortezaproject.org/corteza-docs/${year}.${month}/index.html`;
|
|
80988
81193
|
},
|
|
80989
81194
|
|
|
81195
|
+
helpLinks() {
|
|
81196
|
+
const {
|
|
81197
|
+
helpLinks = []
|
|
81198
|
+
} = this.settings || {};
|
|
81199
|
+
return (helpLinks || []).filter(({
|
|
81200
|
+
handle,
|
|
81201
|
+
url
|
|
81202
|
+
}) => handle && url);
|
|
81203
|
+
},
|
|
81204
|
+
|
|
81205
|
+
profileLinks() {
|
|
81206
|
+
const {
|
|
81207
|
+
profileLinks = []
|
|
81208
|
+
} = this.settings || {};
|
|
81209
|
+
return (profileLinks || []).filter(({
|
|
81210
|
+
handle,
|
|
81211
|
+
url
|
|
81212
|
+
}) => handle && url);
|
|
81213
|
+
},
|
|
81214
|
+
|
|
81215
|
+
onlyVersion() {
|
|
81216
|
+
const {
|
|
81217
|
+
hideForumLink,
|
|
81218
|
+
hideDocumentationLink,
|
|
81219
|
+
hideFeedbackLink
|
|
81220
|
+
} = this.settings || {};
|
|
81221
|
+
return !this.helpLinks.length && hideForumLink && hideDocumentationLink && hideFeedbackLink;
|
|
81222
|
+
},
|
|
81223
|
+
|
|
80990
81224
|
frontendVersion() {
|
|
80991
81225
|
/* eslint-disable no-undef */
|
|
80992
81226
|
return VERSION;
|
|
@@ -80999,19 +81233,19 @@ var script$C = {
|
|
|
80999
81233
|
const __vue_script__$C = script$C;
|
|
81000
81234
|
|
|
81001
81235
|
/* template */
|
|
81002
|
-
var __vue_render__$
|
|
81236
|
+
var __vue_render__$y = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"header-navigation d-flex align-items-center justify-content-between sticky-top pr-3 pl-5 "},[_c('div',{staticClass:"d-flex text-nowrap flex-grow-1 align-items-center header h-100 w-100"},[[_c('div',{staticClass:"spacer",class:{
|
|
81003
81237
|
'expanded': _vm.sidebarPinned,
|
|
81004
|
-
}})],_vm._v(" "),_c('div',{staticClass:"d-flex align-items-center ml-2 text-truncate mr-auto h-100"},[_c('h2',{staticClass:"d-none d-sm-block mb-0"},[_vm._t("title")],2)]),_vm._v(" "),_c('div',{staticClass:"ml-3"},[_vm._t("tools")],2),_vm._v(" "),(!_vm.hideAppSelector)?_c('b-button',{staticClass:"d-flex align-items-center justify-content-center text-dark border-0 nav-icon rounded-circle ml-2",attrs:{"variant":"outline-light","href":_vm.appSelectorURL,"size":"lg"}},[_c('font-awesome-icon',{staticClass:"m-0 h5",attrs:{"icon":['fas', 'grip-horizontal']}})],1):_vm._e(),_vm._v(" "),_c('b-dropdown',{staticClass:"nav-icon mx-1",attrs:{"size":"lg","variant":"outline-light","toggle-class":"text-decoration-none text-dark rounded-circle border-0 w-100","menu-class":"border-0 shadow-sm text-dark font-weight-bold mt-2","right":"","no-caret":""},scopedSlots:_vm._u([{key:"button-content",fn:function(){return [_c('div',{staticClass:"d-flex align-items-center justify-content-center"},[_c('font-awesome-icon',{staticClass:"m-0 h5",attrs:{"icon":['far', 'question-circle']}}),_vm._v(" "),_c('span',{staticClass:"sr-only"},[_vm._v("\n Help\n ")])],1)]},proxy:true}])},[_vm._v(" "),_c('div',[_vm._t("help-dropdown")],2),_vm._v(" "),_c('b-dropdown-item',{attrs:{"href":"https://forum.cortezaproject.org/","target":"_blank"}},[_vm._v("\n "+_vm._s(_vm.labels.helpForum)+"\n ")]),_vm._v(" "),_c('b-dropdown-item',{attrs:{"href":_vm.documentationURL,"target":"_blank"}},[_vm._v("\n "+_vm._s(_vm.labels.helpDocumentation)+"\n ")]),_vm._v(" "),_c('b-dropdown-item',{attrs:{"href":"mailto:info@crust.tech","target":"_blank"}},[_vm._v("\n "+_vm._s(_vm.labels.helpFeedback)+"\n ")]),_vm._v(" "),_c('b-dropdown-divider'),_vm._v(" "),_c('b-dropdown-item',{staticClass:"small",attrs:{"disabled":""}},[_vm._v("\n "+_vm._s(_vm.labels.helpVersion)+"\n "),_c('br'),_vm._v("\n "+_vm._s(_vm.frontendVersion)+"\n ")])],
|
|
81005
|
-
var __vue_staticRenderFns__$
|
|
81238
|
+
}})],_vm._v(" "),_c('div',{staticClass:"d-flex align-items-center ml-2 text-truncate mr-auto h-100"},[_c('h2',{staticClass:"d-none d-sm-block mb-0"},[_vm._t("title")],2)]),_vm._v(" "),_c('div',{staticClass:"ml-3"},[_vm._t("tools")],2),_vm._v(" "),(!_vm.hideAppSelector && !_vm.settings.hideAppSelector)?_c('b-button',{staticClass:"d-flex align-items-center justify-content-center text-dark border-0 nav-icon rounded-circle ml-2",attrs:{"variant":"outline-light","href":_vm.appSelectorURL,"size":"lg"}},[_c('font-awesome-icon',{staticClass:"m-0 h5",attrs:{"icon":['fas', 'grip-horizontal']}})],1):_vm._e(),_vm._v(" "),(!_vm.settings.hideHelp)?_c('b-dropdown',{staticClass:"nav-icon mx-1",attrs:{"size":"lg","variant":"outline-light","toggle-class":"text-decoration-none text-dark rounded-circle border-0 w-100","menu-class":"topbar-dropdown-menu border-0 shadow-sm text-dark font-weight-bold mt-2","right":"","no-caret":""},scopedSlots:_vm._u([{key:"button-content",fn:function(){return [_c('div',{staticClass:"d-flex align-items-center justify-content-center"},[_c('font-awesome-icon',{staticClass:"m-0 h5",attrs:{"icon":['far', 'question-circle']}}),_vm._v(" "),_c('span',{staticClass:"sr-only"},[_vm._v("\n Help\n ")])],1)]},proxy:true}],null,false,3609523728)},[_vm._v(" "),_c('div',[_vm._t("help-dropdown")],2),_vm._v(" "),_vm._l((_vm.helpLinks),function(helpLink,index){return _c('b-dropdown-item',{key:index,attrs:{"href":helpLink.url,"target":helpLink.newTab ? '_blank' : ''}},[_vm._v("\n "+_vm._s(helpLink.handle)+"\n ")])}),_vm._v(" "),(!_vm.settings.hideForumLink)?_c('b-dropdown-item',{attrs:{"href":"https://forum.cortezaproject.org/","target":"_blank"}},[_vm._v("\n "+_vm._s(_vm.labels.helpForum)+"\n ")]):_vm._e(),_vm._v(" "),(!_vm.settings.hideDocumentationLink)?_c('b-dropdown-item',{attrs:{"href":_vm.documentationURL,"target":"_blank"}},[_vm._v("\n "+_vm._s(_vm.labels.helpDocumentation)+"\n ")]):_vm._e(),_vm._v(" "),(!_vm.settings.hideFeedbackLink)?_c('b-dropdown-item',{attrs:{"href":"mailto:info@crust.tech","target":"_blank"}},[_vm._v("\n "+_vm._s(_vm.labels.helpFeedback)+"\n ")]):_vm._e(),_vm._v(" "),(!_vm.onlyVersion)?_c('b-dropdown-divider'):_vm._e(),_vm._v(" "),_c('b-dropdown-item',{staticClass:"small",attrs:{"disabled":""}},[_vm._v("\n "+_vm._s(_vm.labels.helpVersion)+"\n "),_c('br'),_vm._v("\n "+_vm._s(_vm.frontendVersion)+"\n ")])],2):_vm._e(),_vm._v(" "),(!_vm.settings.hideProfile)?_c('b-dropdown',{staticClass:"nav-user-icon",attrs:{"data-v-onboarding":"profile","size":"lg","variant":"outline-light","toggle-class":"nav-icon text-decoration-none text-dark rounded-circle border","menu-class":"topbar-dropdown-menu border-0 shadow-sm text-dark font-weight-bold mt-2","right":"","no-caret":""},scopedSlots:_vm._u([{key:"button-content",fn:function(){return [_c('div',{staticClass:"d-flex align-items-center justify-content-center"},[_c('font-awesome-icon',{staticClass:"m-0 h5",attrs:{"icon":['far', 'user']}}),_vm._v(" "),_c('span',{staticClass:"sr-only"},[_vm._v("\n "+_vm._s(_vm.labels.helpForum)+"\n ")])],1)]},proxy:true}],null,false,2199786693)},[_vm._v(" "),_c('b-dropdown-text',{staticClass:"text-muted mb-2"},[_vm._v("\n "+_vm._s(_vm.labels.userSettingsLoggedInAs)+"\n ")]),_vm._v(" "),_c('div',[_vm._t("avatar-dropdown")],2),_vm._v(" "),_vm._l((_vm.profileLinks),function(profileLink,index){return _c('b-dropdown-item',{key:index,attrs:{"href":profileLink.url,"target":profileLink.newTab ? '_blank' : ''}},[_vm._v("\n "+_vm._s(profileLink.handle)+"\n ")])}),_vm._v(" "),(!_vm.settings.hideProfileLink)?_c('b-dropdown-item',{attrs:{"href":_vm.userProfileURL,"target":"_blank"}},[_vm._v("\n "+_vm._s(_vm.labels.userSettingsProfile)+"\n ")]):_vm._e(),_vm._v(" "),(!_vm.settings.hideChangePasswordLink)?_c('b-dropdown-item',{attrs:{"href":_vm.changePasswordURL,"target":"_blank"}},[_vm._v("\n "+_vm._s(_vm.labels.userSettingsChangePassword)+"\n ")]):_vm._e(),_vm._v(" "),_c('b-dropdown-divider'),_vm._v(" "),_c('b-dropdown-item',{staticClass:"mt-2",attrs:{"href":""},on:{"click":function($event){return _vm.$auth.logout()}}},[_vm._v("\n "+_vm._s(_vm.labels.userSettingsLogout)+"\n ")])],2):_vm._e()],2)])};
|
|
81239
|
+
var __vue_staticRenderFns__$y = [];
|
|
81006
81240
|
|
|
81007
81241
|
/* style */
|
|
81008
81242
|
const __vue_inject_styles__$D = function (inject) {
|
|
81009
81243
|
if (!inject) return
|
|
81010
|
-
inject("data-v-
|
|
81244
|
+
inject("data-v-39d2e772_0", { source: ".icon-logo[data-v-39d2e772]{height:calc(64px / 2);background-repeat:no-repeat;background-position:center}.nav-icon[data-v-39d2e772]{width:40px;height:40px}.nav-user-icon[data-v-39d2e772]{width:50px;height:50px}.header-navigation[data-v-39d2e772]{width:100vw;height:64px;background-color:#f3f3f5!important}.header-navigation h2[data-v-39d2e772]{padding-left:calc(.5rem + 2px)}.topbar-dropdown-menu[data-v-39d2e772]{max-height:80vh;overflow-y:auto}.spacer[data-v-39d2e772]{min-width:0;-webkit-transition:min-width .15s ease-in-out;-moz-transition:min-width .15s ease-in-out;-o-transition:min-width .15s ease-in-out;transition:min-width .15s ease-in-out}.spacer.expanded[data-v-39d2e772]{min-width:calc(320px - 42px);-webkit-transition:min-width .2s ease-in-out;-moz-transition:min-width .2s ease-in-out;-o-transition:min-width .2s ease-in-out;transition:min-width .2s ease-in-out}", map: undefined, media: undefined });
|
|
81011
81245
|
|
|
81012
81246
|
};
|
|
81013
81247
|
/* scoped */
|
|
81014
|
-
const __vue_scope_id__$D = "data-v-
|
|
81248
|
+
const __vue_scope_id__$D = "data-v-39d2e772";
|
|
81015
81249
|
/* module identifier */
|
|
81016
81250
|
const __vue_module_identifier__$D = undefined;
|
|
81017
81251
|
/* functional template */
|
|
@@ -81023,7 +81257,7 @@ var __vue_staticRenderFns__$x = [];
|
|
|
81023
81257
|
|
|
81024
81258
|
|
|
81025
81259
|
const __vue_component__$D = /*#__PURE__*/normalizeComponent(
|
|
81026
|
-
{ render: __vue_render__$
|
|
81260
|
+
{ render: __vue_render__$y, staticRenderFns: __vue_staticRenderFns__$y },
|
|
81027
81261
|
__vue_inject_styles__$D,
|
|
81028
81262
|
__vue_script__$C,
|
|
81029
81263
|
__vue_scope_id__$D,
|
|
@@ -81333,8 +81567,8 @@ var script$D = {
|
|
|
81333
81567
|
const __vue_script__$D = script$D;
|
|
81334
81568
|
|
|
81335
81569
|
/* template */
|
|
81336
|
-
var __vue_render__$
|
|
81337
|
-
var __vue_staticRenderFns__$
|
|
81570
|
+
var __vue_render__$z = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('div',{on:{"mouseleave":function($event){return _vm.onHover(false)}}},[_c('b-sidebar',{attrs:{"sidebar-class":("sidebar " + (_vm.isExpanded ? 'expanded' : '')),"header-class":("d-block sidebar-header " + (_vm.isExpanded ? 'expanded border-bottom p-2' : '')),"body-class":("bg-white " + (_vm.isExpanded ? 'py-2 px-3' : '')),"footer-class":("bg-white rounded-right " + (_vm.isExpanded ? 'p-2' : '')),"no-header":!_vm.isExpanded,"backdrop":_vm.isMobile,"shadow":_vm.isExpanded,"no-slide":"","right":_vm.right,"no-close-on-route-change":"","no-close-on-esc":""},scopedSlots:_vm._u([{key:"header",fn:function(){return [_c('div',{staticClass:"d-flex align-items-center justify-content-between px-2",staticStyle:{"height":"50px"}},[_c('img',{staticClass:"logo w-auto border-0",attrs:{"src":_vm.logo}}),_vm._v(" "),(_vm.isMobile)?_c('b-button',{staticClass:"d-flex align-items-center justify-content-center p-2",attrs:{"variant":"outline-light border-0"},on:{"click":function($event){return _vm.closeSidebar()}}},[_c('font-awesome-icon',{staticClass:"h6 mb-0 text-dark",attrs:{"icon":['fas', 'times']}})],1):_c('b-button',{staticClass:"d-flex align-items-center justify-content-center p-2",attrs:{"variant":"outline-light border-0"},on:{"click":function($event){return _vm.togglePin()}}},[_c('font-awesome-icon',{class:("h6 mb-0 " + (_vm.isPinned ? 'text-primary' : 'text-secondary')),attrs:{"icon":['fas', 'thumbtack']}})],1)],1),_vm._v(" "),(!_vm.isExpanded)?_c('div',{staticClass:"d-flex align-items-center justify-content-center my-3"},[_c('b-button',{attrs:{"variant":"link"},on:{"click":function($event){return _vm.togglePin()}}},[_c('font-awesome-icon',{staticClass:"h6 mb-0",attrs:{"icon":['fas', 'chevron-right']}})],1)],1):_vm._e(),_vm._v(" "),(_vm.isExpanded)?_c('div',{staticClass:"px-2"},[_vm._t("header-expanded")],2):_vm._e(),_vm._v(" "),(!_vm.isExpanded)?_c('hr',{staticClass:"my-2"}):_vm._e()]},proxy:true},{key:"footer",fn:function(){return [(_vm.isExpanded)?_vm._t("footer-expanded"):_vm._e()]},proxy:true}],null,true),model:{value:(_vm.isExpanded),callback:function ($$v) {_vm.isExpanded=$$v;},expression:"isExpanded"}},[_vm._v(" "),(_vm.isExpanded)?_vm._t("body-expanded"):_vm._e()],2)],1),_vm._v(" "),_c('div',{staticClass:"d-flex align-items-center justify-content-center tab position-absolute p-2"},[(_vm.expandOnHover && !_vm.disabledRoutes.includes(_vm.$route.name))?_c('b-button',{staticClass:"d-flex align-items-center border-0",attrs:{"variant":"outline-light","size":"lg"},on:{"mouseover":function($event){return _vm.onHover(true)}}},[_c('font-awesome-icon',{staticClass:"h4 mb-0 text-primary",attrs:{"icon":['fas', 'bars']}})],1):(!_vm.disabledRoutes.includes(_vm.$route.name))?_c('b-button',{staticClass:"d-flex align-items-center p-2 border-0",attrs:{"variant":"outline-light","size":"lg","to":{ name: 'root' }}},[_c('font-awesome-icon',{staticClass:"h4 mb-0 text-primary",attrs:{"icon":['fas', 'home']}})],1):_c('div',{staticClass:"d-flex align-items-center border-0 p-2"},[_c('img',{staticClass:"icon w-auto border-0",attrs:{"src":_vm.icon}})])],1)])};
|
|
81571
|
+
var __vue_staticRenderFns__$z = [];
|
|
81338
81572
|
|
|
81339
81573
|
/* style */
|
|
81340
81574
|
const __vue_inject_styles__$E = function (inject) {
|
|
@@ -81356,7 +81590,7 @@ var __vue_staticRenderFns__$y = [];
|
|
|
81356
81590
|
|
|
81357
81591
|
|
|
81358
81592
|
const __vue_component__$E = /*#__PURE__*/normalizeComponent(
|
|
81359
|
-
{ render: __vue_render__$
|
|
81593
|
+
{ render: __vue_render__$z, staticRenderFns: __vue_staticRenderFns__$z },
|
|
81360
81594
|
__vue_inject_styles__$E,
|
|
81361
81595
|
__vue_script__$D,
|
|
81362
81596
|
__vue_scope_id__$E,
|
|
@@ -81495,15 +81729,19 @@ var script$E = {
|
|
|
81495
81729
|
},
|
|
81496
81730
|
|
|
81497
81731
|
// Recursively check for child pages that are open, so that parents can open aswell
|
|
81498
|
-
showChildren(
|
|
81499
|
-
|
|
81500
|
-
|
|
81732
|
+
showChildren({
|
|
81733
|
+
params = {},
|
|
81734
|
+
children = []
|
|
81735
|
+
}) {
|
|
81736
|
+
const partialParamsMatch = Object.entries(params).some(([key, value]) => {
|
|
81737
|
+
return this.$route.params[key] === value;
|
|
81738
|
+
});
|
|
81739
|
+
|
|
81740
|
+
if (partialParamsMatch) {
|
|
81741
|
+
return partialParamsMatch;
|
|
81501
81742
|
}
|
|
81502
81743
|
|
|
81503
|
-
return children.map((
|
|
81504
|
-
page,
|
|
81505
|
-
children
|
|
81506
|
-
}) => this.showChildren(page, children)).some(isOpen => isOpen);
|
|
81744
|
+
return children.map(c => this.showChildren(c)).some(isOpen => isOpen);
|
|
81507
81745
|
}
|
|
81508
81746
|
|
|
81509
81747
|
}
|
|
@@ -81513,21 +81751,21 @@ var script$E = {
|
|
|
81513
81751
|
const __vue_script__$E = script$E;
|
|
81514
81752
|
|
|
81515
81753
|
/* template */
|
|
81516
|
-
var __vue_render__$
|
|
81754
|
+
var __vue_render__$A = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"nav-sidebar"},_vm._l((_vm.items),function(ref,index){
|
|
81517
81755
|
var page = ref.page; if ( page === void 0 ) page = {};
|
|
81518
81756
|
var params = ref.params; if ( params === void 0 ) params = {};
|
|
81519
81757
|
var children = ref.children; if ( children === void 0 ) children = [];
|
|
81520
|
-
return _c('b-button',{key:index,staticClass:"w-100 text-dark text-decoration-none p-0 pt-2 nav-item",attrs:{"variant":"link","active-class":"nav-active","exact-active-class":"nav-active","to":{ name: page.name || _vm.defaultRouteName, params: params }}},[_c('span',{staticClass:"d-inline-block w-75 text-nowrap text-truncate",on:{"click":function($event){return _vm.closeSidebar()}}},[(page.icon)?_c('font-awesome-icon',{staticClass:"icon",attrs:{"icon":page.icon}}):_vm._e(),_vm._v(" "),_c('span',{staticClass:"title"},[_vm._v("\n "+_vm._s(page.title)+"\n ")])],1),_vm._v(" "),(children.length)?[_c('b-button',{staticClass:"p-0 float-right",attrs:{"variant":"link","disabled":_vm.showChildren(
|
|
81521
|
-
var __vue_staticRenderFns__$
|
|
81758
|
+
return _c('b-button',{key:index,staticClass:"w-100 text-dark text-decoration-none p-0 pt-2 nav-item",attrs:{"variant":"link","active-class":"nav-active","exact-active-class":"nav-active","to":{ name: page.name || _vm.defaultRouteName, params: params }}},[_c('span',{staticClass:"d-inline-block w-75 text-nowrap text-truncate",on:{"click":function($event){return _vm.closeSidebar()}}},[(page.icon)?_c('font-awesome-icon',{staticClass:"icon",attrs:{"icon":page.icon}}):_vm._e(),_vm._v(" "),_c('span',{staticClass:"title"},[_vm._v("\n "+_vm._s(page.title)+"\n ")])],1),_vm._v(" "),(children.length)?[_c('b-button',{staticClass:"p-0 float-right",attrs:{"variant":"link","disabled":_vm.showChildren({ params: params, children: children })},on:{"click":function($event){if($event.target !== $event.currentTarget){ return null; }$event.stopPropagation();$event.preventDefault();return _vm.toggle(page)}}},[(!_vm.collapses[_vm.pageIndex(page)])?_c('font-awesome-icon',{staticClass:"pointer-none",attrs:{"icon":['fas', 'chevron-down']}}):_c('font-awesome-icon',{staticClass:"pointer-none",attrs:{"icon":['fas', 'chevron-up']}})],1),_vm._v(" "),_c('b-collapse',{attrs:{"visible":_vm.collapses[_vm.pageIndex(page)] || _vm.showChildren({ params: params, children: children })},on:{"click":function($event){$event.stopPropagation();$event.preventDefault();}}},[_c('c-sidebar-nav-items',_vm._g({staticClass:"ml-2",attrs:{"items":children,"start-expanded":_vm.startExpanded,"default-route-name":_vm.defaultRouteName}},_vm.$listeners))],1)]:_vm._e()],2)}),1)};
|
|
81759
|
+
var __vue_staticRenderFns__$A = [];
|
|
81522
81760
|
|
|
81523
81761
|
/* style */
|
|
81524
81762
|
const __vue_inject_styles__$F = function (inject) {
|
|
81525
81763
|
if (!inject) return
|
|
81526
|
-
inject("data-v-
|
|
81764
|
+
inject("data-v-16ceb9b5_0", { source: ".pointer-none[data-v-16ceb9b5]{pointer-events:none}.svg-inline--fa[data-v-16ceb9b5]{width:30px}.nav-item>span>.title[data-v-16ceb9b5]{font-family:Poppins-Regular}.nav-active>span>.icon[data-v-16ceb9b5]{color:#4d7281}.nav-active>span>.title[data-v-16ceb9b5]{font-family:Poppins-SemiBold}.nav-item[data-v-16ceb9b5]{text-align:left}[dir=rtl] .nav-item[data-v-16ceb9b5]{text-align:right}", map: undefined, media: undefined });
|
|
81527
81765
|
|
|
81528
81766
|
};
|
|
81529
81767
|
/* scoped */
|
|
81530
|
-
const __vue_scope_id__$F = "data-v-
|
|
81768
|
+
const __vue_scope_id__$F = "data-v-16ceb9b5";
|
|
81531
81769
|
/* module identifier */
|
|
81532
81770
|
const __vue_module_identifier__$F = undefined;
|
|
81533
81771
|
/* functional template */
|
|
@@ -81539,7 +81777,7 @@ var __vue_staticRenderFns__$z = [];
|
|
|
81539
81777
|
|
|
81540
81778
|
|
|
81541
81779
|
const __vue_component__$F = /*#__PURE__*/normalizeComponent(
|
|
81542
|
-
{ render: __vue_render__$
|
|
81780
|
+
{ render: __vue_render__$A, staticRenderFns: __vue_staticRenderFns__$A },
|
|
81543
81781
|
__vue_inject_styles__$F,
|
|
81544
81782
|
__vue_script__$E,
|
|
81545
81783
|
__vue_scope_id__$F,
|
|
@@ -81699,8 +81937,8 @@ var script$F = {
|
|
|
81699
81937
|
const __vue_script__$F = script$F;
|
|
81700
81938
|
|
|
81701
81939
|
/* template */
|
|
81702
|
-
var __vue_render__$
|
|
81703
|
-
var __vue_staticRenderFns__$
|
|
81940
|
+
var __vue_render__$B = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.tour !== null)?_c('v-tour',{attrs:{"name":_vm.tour.name,"steps":_vm.tour.steps,"options":_vm.tour,"callbacks":this.callbacks},on:{"onStop":_vm.onStop},scopedSlots:_vm._u([{key:"default",fn:function(tour){return [_c('transition',{attrs:{"name":"fade"}},[_vm._l((tour.steps),function(step,index){return [(tour.currentStep === index)?_c('v-step',{key:index,staticClass:"shadow p-3 text-light text-center",attrs:{"step":step,"previous-step":tour.previousStep,"next-step":tour.nextStep,"stop":tour.stop,"is-first":tour.isFirst,"is-last":tour.isLast,"labels":tour.labels},on:{"onStop":_vm.onStop}},[_c('div',{attrs:{"slot":"header"},slot:"header"},[((step.header || {}).title)?_c('h5',{domProps:{"innerHTML":_vm._s(_vm.$t(step.header.title))}}):_vm._e()]),_vm._v(" "),_c('div',{attrs:{"slot":"content"},slot:"content"},[_c('div',{staticClass:"p-1 mb-2"},[_c('div',{domProps:{"innerHTML":_vm._s(_vm.$t(step.content))}})])]),_vm._v(" "),_c('div',{attrs:{"slot":"actions"},slot:"actions"},[_c('b-button',{attrs:{"variant":"primary"},on:{"click":_vm.onStop}},[(tour.isLast && !(_vm.callbacks || {}).onNextRedirect)?[_vm._v("\n "+_vm._s(_vm.$t('buttons.end'))+"\n ")]:[_vm._v("\n "+_vm._s(_vm.$t('buttons.skip'))+"\n ")]],2),_vm._v(" "),(tour.isFirst && (_vm.callbacks || {}).onPrevRedirect)?_c('b-button',{attrs:{"variant":"primary","href":_vm.callbacks.onPrevRedirect}},[_vm._v("\n "+_vm._s(_vm.$t('buttons.previous'))+"\n ")]):(!tour.isFirst)?_c('b-button',{attrs:{"variant":"primary"},on:{"click":tour.previousStep}},[_vm._v("\n "+_vm._s(_vm.$t('buttons.previous'))+"\n ")]):_vm._e(),_vm._v(" "),(tour.isLast && (_vm.callbacks || {}).onNextRedirect)?_c('b-button',{attrs:{"variant":"primary","href":_vm.callbacks.onNextRedirect}},[_vm._v("\n "+_vm._s(_vm.$t('buttons.next'))+"\n ")]):(!tour.isLast)?_c('b-button',{attrs:{"variant":"primary"},on:{"click":tour.nextStep}},[_vm._v("\n "+_vm._s(_vm.$t('buttons.next'))+"\n ")]):_vm._e()],1)]):_vm._e()]})],2)]}}],null,false,1119462003)}):_vm._e()};
|
|
81941
|
+
var __vue_staticRenderFns__$B = [];
|
|
81704
81942
|
|
|
81705
81943
|
/* style */
|
|
81706
81944
|
const __vue_inject_styles__$G = function (inject) {
|
|
@@ -81721,7 +81959,7 @@ var __vue_staticRenderFns__$A = [];
|
|
|
81721
81959
|
|
|
81722
81960
|
|
|
81723
81961
|
const __vue_component__$G = /*#__PURE__*/normalizeComponent(
|
|
81724
|
-
{ render: __vue_render__$
|
|
81962
|
+
{ render: __vue_render__$B, staticRenderFns: __vue_staticRenderFns__$B },
|
|
81725
81963
|
__vue_inject_styles__$G,
|
|
81726
81964
|
__vue_script__$F,
|
|
81727
81965
|
__vue_scope_id__$G,
|
|
@@ -81788,8 +82026,8 @@ var script$G = {
|
|
|
81788
82026
|
const __vue_script__$G = script$G;
|
|
81789
82027
|
|
|
81790
82028
|
/* template */
|
|
81791
|
-
var __vue_render__$
|
|
81792
|
-
var __vue_staticRenderFns__$
|
|
82029
|
+
var __vue_render__$C = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-modal',{attrs:{"id":"tourStart","size":"lg","title":_vm.$t('start.welcome'),"ok-title":_vm.$t('start.show'),"cancel-title":_vm.$t('start.skip'),"body-class":"p-0"},on:{"ok":_vm.onSave,"cancel":_vm.onCancel}},[_c('div',{staticClass:"card-body"},[_vm._v("\n "+_vm._s(_vm.$t('start.instructions'))+"\n ")])])};
|
|
82030
|
+
var __vue_staticRenderFns__$C = [];
|
|
81793
82031
|
|
|
81794
82032
|
/* style */
|
|
81795
82033
|
const __vue_inject_styles__$H = undefined;
|
|
@@ -81808,7 +82046,7 @@ var __vue_staticRenderFns__$B = [];
|
|
|
81808
82046
|
|
|
81809
82047
|
|
|
81810
82048
|
const __vue_component__$H = /*#__PURE__*/normalizeComponent(
|
|
81811
|
-
{ render: __vue_render__$
|
|
82049
|
+
{ render: __vue_render__$C, staticRenderFns: __vue_staticRenderFns__$C },
|
|
81812
82050
|
__vue_inject_styles__$H,
|
|
81813
82051
|
__vue_script__$G,
|
|
81814
82052
|
__vue_scope_id__$H,
|
|
@@ -81877,8 +82115,8 @@ var script$I = {
|
|
|
81877
82115
|
const __vue_script__$I = script$I;
|
|
81878
82116
|
|
|
81879
82117
|
/* template */
|
|
81880
|
-
var __vue_render__$
|
|
81881
|
-
var __vue_staticRenderFns__$
|
|
82118
|
+
var __vue_render__$D = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-button',_vm._b({on:{"click":function($event){return _vm.$emit('action')}}},'b-button',_vm.options,false),[_c('span',{domProps:{"innerHTML":_vm._s(_vm.label)}})])};
|
|
82119
|
+
var __vue_staticRenderFns__$D = [];
|
|
81882
82120
|
|
|
81883
82121
|
/* style */
|
|
81884
82122
|
const __vue_inject_styles__$J = undefined;
|
|
@@ -81897,7 +82135,7 @@ var __vue_staticRenderFns__$C = [];
|
|
|
81897
82135
|
|
|
81898
82136
|
|
|
81899
82137
|
const __vue_component__$J = /*#__PURE__*/normalizeComponent(
|
|
81900
|
-
{ render: __vue_render__$
|
|
82138
|
+
{ render: __vue_render__$D, staticRenderFns: __vue_staticRenderFns__$D },
|
|
81901
82139
|
__vue_inject_styles__$J,
|
|
81902
82140
|
__vue_script__$I,
|
|
81903
82141
|
__vue_scope_id__$J,
|
|
@@ -81925,8 +82163,8 @@ var script$J = {
|
|
|
81925
82163
|
const __vue_script__$J = script$J;
|
|
81926
82164
|
|
|
81927
82165
|
/* template */
|
|
81928
|
-
var __vue_render__$
|
|
81929
|
-
var __vue_staticRenderFns__$
|
|
82166
|
+
var __vue_render__$E = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-dropdown',_vm._b({scopedSlots:_vm._u([{key:"button-content",fn:function(){return [_c('span',{domProps:{"innerHTML":_vm._s(_vm.label)}})]},proxy:true}])},'b-dropdown',_vm.options,false),[_vm._v(" "),_vm._l((_vm.options.items || []),function(opt,i){return _c(_vm.fromKind(opt),_vm._b({key:i,tag:"component",on:{"click":function($event){return _vm.$emit('action', opt.value)}}},'component',opt,false),[_c('span',{domProps:{"innerHTML":_vm._s(opt.label)}})])})],2)};
|
|
82167
|
+
var __vue_staticRenderFns__$E = [];
|
|
81930
82168
|
|
|
81931
82169
|
/* style */
|
|
81932
82170
|
const __vue_inject_styles__$K = undefined;
|
|
@@ -81945,7 +82183,7 @@ var __vue_staticRenderFns__$D = [];
|
|
|
81945
82183
|
|
|
81946
82184
|
|
|
81947
82185
|
const __vue_component__$K = /*#__PURE__*/normalizeComponent(
|
|
81948
|
-
{ render: __vue_render__$
|
|
82186
|
+
{ render: __vue_render__$E, staticRenderFns: __vue_staticRenderFns__$E },
|
|
81949
82187
|
__vue_inject_styles__$K,
|
|
81950
82188
|
__vue_script__$J,
|
|
81951
82189
|
__vue_scope_id__$K,
|
|
@@ -81965,8 +82203,8 @@ var script$K = {
|
|
|
81965
82203
|
const __vue_script__$K = script$K;
|
|
81966
82204
|
|
|
81967
82205
|
/* template */
|
|
81968
|
-
var __vue_render__$
|
|
81969
|
-
var __vue_staticRenderFns__$
|
|
82206
|
+
var __vue_render__$F = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-form-select',_vm._b({staticClass:"w-auto",attrs:{"value":null},on:{"change":function($event){return _vm.$emit('action', $event)}},scopedSlots:_vm._u([{key:"first",fn:function(){return [_c('option',{attrs:{"disabled":""},domProps:{"value":null,"innerHTML":_vm._s(_vm.label)}})]},proxy:true}])},'b-form-select',_vm.options,false),[_vm._v(" "),_vm._l((_vm.options.items || []),function(opt,i){return _c('option',_vm._b({key:i,domProps:{"value":opt.value,"innerHTML":_vm._s(opt.label)}},'option',opt,false))})],2)};
|
|
82207
|
+
var __vue_staticRenderFns__$F = [];
|
|
81970
82208
|
|
|
81971
82209
|
/* style */
|
|
81972
82210
|
const __vue_inject_styles__$L = undefined;
|
|
@@ -81985,7 +82223,7 @@ var __vue_staticRenderFns__$E = [];
|
|
|
81985
82223
|
|
|
81986
82224
|
|
|
81987
82225
|
const __vue_component__$L = /*#__PURE__*/normalizeComponent(
|
|
81988
|
-
{ render: __vue_render__$
|
|
82226
|
+
{ render: __vue_render__$F, staticRenderFns: __vue_staticRenderFns__$F },
|
|
81989
82227
|
__vue_inject_styles__$L,
|
|
81990
82228
|
__vue_script__$K,
|
|
81991
82229
|
__vue_scope_id__$L,
|
|
@@ -82030,8 +82268,8 @@ var script$L = {
|
|
|
82030
82268
|
const __vue_script__$L = script$L;
|
|
82031
82269
|
|
|
82032
82270
|
/* template */
|
|
82033
|
-
var __vue_render__$
|
|
82034
|
-
var __vue_staticRenderFns__$
|
|
82271
|
+
var __vue_render__$G = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[(_vm.toast.link)?_c('a',_vm._b({domProps:{"innerHTML":_vm._s(_vm.toast.linkLabel)}},'a',_vm.toast.linkOpts,false)):(_vm.toast.routerLink)?_c('router-link',_vm._b({attrs:{"to":_vm.toast.routerLink}},'router-link',_vm.toast.linkOpts,false),[_c('span',{domProps:{"innerHTML":_vm._s(_vm.toast.linkLabel)}})]):_vm._e()],1)};
|
|
82272
|
+
var __vue_staticRenderFns__$G = [];
|
|
82035
82273
|
|
|
82036
82274
|
/* style */
|
|
82037
82275
|
const __vue_inject_styles__$M = undefined;
|
|
@@ -82050,7 +82288,7 @@ var __vue_staticRenderFns__$F = [];
|
|
|
82050
82288
|
|
|
82051
82289
|
|
|
82052
82290
|
const __vue_component__$M = /*#__PURE__*/normalizeComponent(
|
|
82053
|
-
{ render: __vue_render__$
|
|
82291
|
+
{ render: __vue_render__$G, staticRenderFns: __vue_staticRenderFns__$G },
|
|
82054
82292
|
__vue_inject_styles__$M,
|
|
82055
82293
|
__vue_script__$L,
|
|
82056
82294
|
__vue_scope_id__$M,
|
|
@@ -82105,11 +82343,11 @@ var script$M = {
|
|
|
82105
82343
|
const __vue_script__$M = script$M;
|
|
82106
82344
|
|
|
82107
82345
|
/* template */
|
|
82108
|
-
var __vue_render__$
|
|
82346
|
+
var __vue_render__$H = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',_vm._l((_vm.toasts),function(t){return _c('b-toast',_vm._b({key:t.id,attrs:{"visible":"","title":t.payload.title,"no-close-button":!t.actions.hide,"toast-class":"overflow-unset"},on:{"hide":function($event){t.actions.hide ? t.actions.hide.cb(t) : _vm.evtSink;}}},'b-toast',t.options || {},false),[_c('b-card',{staticClass:"border-0",attrs:{"header-bg-variant":"transparent","bg-variant":"transparent","body-class":"p-0"}},[_c('b-card-text',[_vm._v("\n "+_vm._s(t.payload.notes)+"\n ")]),_vm._v(" "),(t.payload.link)?_c('b-card-text',[_c('c-toaster-link',{attrs:{"toast":t}})],1):_vm._e(),_vm._v(" "),_vm._l((_vm.extraActions(t)),function(ref){
|
|
82109
82347
|
var name = ref[0];
|
|
82110
82348
|
var act = ref[1];
|
|
82111
82349
|
return _c(_vm.actComponent(act),_vm._b({key:name,tag:"component",staticClass:"mr-1",on:{"action":function($event){act.cb ? act.cb(t, $event) : _vm.evtSink;}}},'component',act,false))})],2)],1)}),1)};
|
|
82112
|
-
var __vue_staticRenderFns__$
|
|
82350
|
+
var __vue_staticRenderFns__$H = [];
|
|
82113
82351
|
|
|
82114
82352
|
/* style */
|
|
82115
82353
|
const __vue_inject_styles__$N = function (inject) {
|
|
@@ -82130,7 +82368,7 @@ var __vue_staticRenderFns__$G = [];
|
|
|
82130
82368
|
|
|
82131
82369
|
|
|
82132
82370
|
const __vue_component__$N = /*#__PURE__*/normalizeComponent(
|
|
82133
|
-
{ render: __vue_render__$
|
|
82371
|
+
{ render: __vue_render__$H, staticRenderFns: __vue_staticRenderFns__$H },
|
|
82134
82372
|
__vue_inject_styles__$N,
|
|
82135
82373
|
__vue_script__$M,
|
|
82136
82374
|
__vue_scope_id__$N,
|
|
@@ -82177,8 +82415,8 @@ var script$N = {
|
|
|
82177
82415
|
const __vue_script__$N = script$N;
|
|
82178
82416
|
|
|
82179
82417
|
/* template */
|
|
82180
|
-
var __vue_render__$
|
|
82181
|
-
var __vue_staticRenderFns__$
|
|
82418
|
+
var __vue_render__$I = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-sidebar',{attrs:{"header-class":"d-flex align-items-center justify-content-between reminder-sidebar-header px-2 py-3 border-bottom","body-class":"bg-white px-2","title":_vm.title,"backdrop":_vm.isMobile,"no-footer":"","right":"","shadow":"","no-close-on-route-change":"","no-close-on-esc":""},scopedSlots:_vm._u([{key:"header",fn:function(){return [_c('h4',{staticClass:"text-primary mb-0"},[_c('b',[_vm._v(_vm._s(_vm.title))])]),_vm._v(" "),_c('b-button',{staticClass:"d-flex align-items-center justify-content-center p-2",attrs:{"variant":"outline-light border-0"},on:{"click":function($event){_vm.isVisible = false;}}},[_c('font-awesome-icon',{staticClass:"h6 mb-0 text-dark",attrs:{"icon":['fas', 'times']}})],1)]},proxy:true}]),model:{value:(_vm.isVisible),callback:function ($$v) {_vm.isVisible=$$v;},expression:"isVisible"}},[_vm._v(" "),_vm._t("default")],2)};
|
|
82419
|
+
var __vue_staticRenderFns__$I = [];
|
|
82182
82420
|
|
|
82183
82421
|
/* style */
|
|
82184
82422
|
const __vue_inject_styles__$O = function (inject) {
|
|
@@ -82199,7 +82437,7 @@ var __vue_staticRenderFns__$H = [];
|
|
|
82199
82437
|
|
|
82200
82438
|
|
|
82201
82439
|
const __vue_component__$O = /*#__PURE__*/normalizeComponent(
|
|
82202
|
-
{ render: __vue_render__$
|
|
82440
|
+
{ render: __vue_render__$I, staticRenderFns: __vue_staticRenderFns__$I },
|
|
82203
82441
|
__vue_inject_styles__$O,
|
|
82204
82442
|
__vue_script__$N,
|
|
82205
82443
|
__vue_scope_id__$O,
|
|
@@ -82238,36 +82476,46 @@ var __vue_staticRenderFns__$H = [];
|
|
|
82238
82476
|
//
|
|
82239
82477
|
//
|
|
82240
82478
|
//
|
|
82479
|
+
//
|
|
82480
|
+
//
|
|
82481
|
+
//
|
|
82482
|
+
//
|
|
82483
|
+
//
|
|
82484
|
+
//
|
|
82485
|
+
//
|
|
82486
|
+
//
|
|
82487
|
+
//
|
|
82488
|
+
//
|
|
82241
82489
|
var script$O = {
|
|
82242
|
-
name:
|
|
82490
|
+
name: 'CItemPickerItem',
|
|
82243
82491
|
props: {
|
|
82244
|
-
|
|
82492
|
+
item: {
|
|
82245
82493
|
type: Object,
|
|
82246
82494
|
required: true
|
|
82247
82495
|
},
|
|
82248
|
-
|
|
82249
|
-
type:
|
|
82250
|
-
|
|
82496
|
+
textField: {
|
|
82497
|
+
type: String,
|
|
82498
|
+
default: 'text'
|
|
82251
82499
|
},
|
|
82252
|
-
|
|
82253
|
-
type:
|
|
82254
|
-
required: true
|
|
82500
|
+
selected: {
|
|
82501
|
+
type: Boolean
|
|
82255
82502
|
},
|
|
82256
|
-
|
|
82257
|
-
type:
|
|
82258
|
-
|
|
82503
|
+
disabled: {
|
|
82504
|
+
type: Boolean
|
|
82505
|
+
},
|
|
82506
|
+
disabledDragging: {
|
|
82507
|
+
type: Boolean
|
|
82508
|
+
},
|
|
82509
|
+
disabledSorting: {
|
|
82510
|
+
type: Boolean
|
|
82511
|
+
},
|
|
82512
|
+
hideIcons: {
|
|
82513
|
+
type: Boolean
|
|
82259
82514
|
}
|
|
82260
82515
|
},
|
|
82261
82516
|
computed: {
|
|
82262
|
-
|
|
82263
|
-
|
|
82264
|
-
|
|
82265
|
-
if (this.field.label) {
|
|
82266
|
-
fieldLabel = `${this.field.label} (${this.field.name})`;
|
|
82267
|
-
}
|
|
82268
|
-
|
|
82269
|
-
fieldLabel += this.field.isRequired ? " *" : "";
|
|
82270
|
-
return fieldLabel;
|
|
82517
|
+
_hideIcons() {
|
|
82518
|
+
return !this.disabled && !this.hideIcons;
|
|
82271
82519
|
}
|
|
82272
82520
|
|
|
82273
82521
|
}
|
|
@@ -82277,17 +82525,17 @@ var script$O = {
|
|
|
82277
82525
|
const __vue_script__$O = script$O;
|
|
82278
82526
|
|
|
82279
82527
|
/* template */
|
|
82280
|
-
var __vue_render__$
|
|
82281
|
-
var __vue_staticRenderFns__$
|
|
82528
|
+
var __vue_render__$J = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"d-flex align-items-center"},[(!_vm.disabled && !_vm.disabledDragging && !_vm.disabledSorting && !_vm.hideIcons)?_c('font-awesome-icon',{staticClass:"handle align-baseline mr-3 text-primary",attrs:{"icon":['fas', 'grip-vertical']}}):_vm._e(),_vm._v(" "),_c('b',{staticClass:"cursor-default text-truncate"},[_vm._t("default",function(){return [_vm._v("\n "+_vm._s(_vm.item[_vm.textField])+"\n ")]},null,_vm.item)],2),_vm._v(" "),(_vm._hideIcons)?[(_vm.selected)?_c('font-awesome-icon',{staticClass:"align-baseline ml-auto text-muted pointer",attrs:{"icon":['far', 'eye']},on:{"click":function($event){return _vm.$emit('unselect')}}}):_c('font-awesome-icon',{staticClass:"align-baseline ml-auto text-muted pointer",attrs:{"icon":['fas', 'eye-slash']},on:{"click":function($event){return _vm.$emit('select')}}})]:_vm._e()],2)};
|
|
82529
|
+
var __vue_staticRenderFns__$J = [];
|
|
82282
82530
|
|
|
82283
82531
|
/* style */
|
|
82284
82532
|
const __vue_inject_styles__$P = function (inject) {
|
|
82285
82533
|
if (!inject) return
|
|
82286
|
-
inject("data-v-
|
|
82534
|
+
inject("data-v-70b6001a_0", { source: ".handle[data-v-70b6001a]{cursor:grab}.handle[data-v-70b6001a]:active{cursor:grabbing}.cursor-default[data-v-70b6001a]{cursor:default}", map: undefined, media: undefined });
|
|
82287
82535
|
|
|
82288
82536
|
};
|
|
82289
82537
|
/* scoped */
|
|
82290
|
-
const __vue_scope_id__$P = "data-v-
|
|
82538
|
+
const __vue_scope_id__$P = "data-v-70b6001a";
|
|
82291
82539
|
/* module identifier */
|
|
82292
82540
|
const __vue_module_identifier__$P = undefined;
|
|
82293
82541
|
/* functional template */
|
|
@@ -82299,7 +82547,7 @@ var __vue_staticRenderFns__$I = [];
|
|
|
82299
82547
|
|
|
82300
82548
|
|
|
82301
82549
|
const __vue_component__$P = /*#__PURE__*/normalizeComponent(
|
|
82302
|
-
{ render: __vue_render__$
|
|
82550
|
+
{ render: __vue_render__$J, staticRenderFns: __vue_staticRenderFns__$J },
|
|
82303
82551
|
__vue_inject_styles__$P,
|
|
82304
82552
|
__vue_script__$O,
|
|
82305
82553
|
__vue_scope_id__$P,
|
|
@@ -82313,161 +82561,253 @@ var __vue_staticRenderFns__$I = [];
|
|
|
82313
82561
|
|
|
82314
82562
|
//
|
|
82315
82563
|
var script$P = {
|
|
82564
|
+
name: 'CItemPicker',
|
|
82316
82565
|
components: {
|
|
82317
|
-
draggable,
|
|
82318
|
-
|
|
82566
|
+
draggable: Draggable,
|
|
82567
|
+
CItemPickerItem: __vue_component__$P
|
|
82319
82568
|
},
|
|
82320
82569
|
props: {
|
|
82321
|
-
|
|
82322
|
-
|
|
82570
|
+
/**
|
|
82571
|
+
* List of all items, available and selected/picked
|
|
82572
|
+
*
|
|
82573
|
+
* Internally, we'll build 2 arrays for each group (available + selected)
|
|
82574
|
+
* and work with them.
|
|
82575
|
+
* On the outside, we'll always deal input array of (full) items and
|
|
82576
|
+
* array of selected/picked values of those items.
|
|
82577
|
+
*
|
|
82578
|
+
* This component mimics the behaviour of <b-form-select> component from
|
|
82579
|
+
* Vue Bootstrap and could serve as a drop-in replacement!
|
|
82580
|
+
*/
|
|
82581
|
+
options: {
|
|
82582
|
+
type: Array,
|
|
82323
82583
|
required: true
|
|
82324
82584
|
},
|
|
82325
|
-
|
|
82585
|
+
|
|
82586
|
+
/**
|
|
82587
|
+
* List of values that can be found in the items
|
|
82588
|
+
*/
|
|
82589
|
+
value: {
|
|
82326
82590
|
type: Array,
|
|
82327
82591
|
required: true
|
|
82328
82592
|
},
|
|
82329
|
-
|
|
82330
|
-
type:
|
|
82331
|
-
default:
|
|
82593
|
+
valueField: {
|
|
82594
|
+
type: String,
|
|
82595
|
+
default: 'value'
|
|
82332
82596
|
},
|
|
82333
|
-
|
|
82334
|
-
type:
|
|
82335
|
-
default:
|
|
82597
|
+
textField: {
|
|
82598
|
+
type: String,
|
|
82599
|
+
default: 'text'
|
|
82336
82600
|
},
|
|
82337
|
-
|
|
82338
|
-
type:
|
|
82339
|
-
default:
|
|
82601
|
+
labels: {
|
|
82602
|
+
type: Object,
|
|
82603
|
+
default: () => ({
|
|
82604
|
+
searchPlaceholder: 'Filter items',
|
|
82605
|
+
availableItems: 'Available',
|
|
82606
|
+
selectAllItems: 'Select all',
|
|
82607
|
+
selectedItems: 'Selected',
|
|
82608
|
+
unselectAllItems: 'Unselect all',
|
|
82609
|
+
noItemsFound: 'No items found'
|
|
82610
|
+
})
|
|
82340
82611
|
},
|
|
82341
|
-
|
|
82342
|
-
type:
|
|
82343
|
-
default: null
|
|
82612
|
+
disabled: {
|
|
82613
|
+
type: Boolean
|
|
82344
82614
|
},
|
|
82345
|
-
|
|
82346
|
-
type:
|
|
82347
|
-
default: null
|
|
82615
|
+
disabledFilter: {
|
|
82616
|
+
type: Boolean
|
|
82348
82617
|
},
|
|
82349
|
-
|
|
82350
|
-
type:
|
|
82351
|
-
default: 'fields'
|
|
82618
|
+
disabledSorting: {
|
|
82619
|
+
type: Boolean
|
|
82352
82620
|
},
|
|
82353
|
-
|
|
82354
|
-
type:
|
|
82355
|
-
default: 'max-height: 65vh;'
|
|
82621
|
+
disabledDragging: {
|
|
82622
|
+
type: Boolean
|
|
82356
82623
|
},
|
|
82357
|
-
|
|
82358
|
-
type:
|
|
82359
|
-
|
|
82624
|
+
hideIcons: {
|
|
82625
|
+
type: Boolean
|
|
82626
|
+
},
|
|
82627
|
+
hideFilter: {
|
|
82628
|
+
type: Boolean
|
|
82360
82629
|
}
|
|
82361
82630
|
},
|
|
82362
82631
|
|
|
82363
82632
|
data() {
|
|
82364
82633
|
return {
|
|
82365
|
-
|
|
82366
|
-
|
|
82634
|
+
query: '',
|
|
82635
|
+
available: [],
|
|
82636
|
+
selected: []
|
|
82367
82637
|
};
|
|
82368
82638
|
},
|
|
82369
82639
|
|
|
82370
82640
|
computed: {
|
|
82371
|
-
|
|
82372
|
-
|
|
82373
|
-
|
|
82374
|
-
return this.fields.reduce((fields, field) => {
|
|
82375
|
-
field = this.allFields.find(({
|
|
82376
|
-
name
|
|
82377
|
-
}) => name === field.name);
|
|
82641
|
+
_disabledFilter() {
|
|
82642
|
+
return this.disabled || this.disabledFilter;
|
|
82643
|
+
},
|
|
82378
82644
|
|
|
82379
|
-
|
|
82380
|
-
|
|
82381
|
-
|
|
82645
|
+
_disabledSorting() {
|
|
82646
|
+
return this.disabled || this.disabledSorting;
|
|
82647
|
+
},
|
|
82382
82648
|
|
|
82383
|
-
|
|
82384
|
-
|
|
82649
|
+
/**
|
|
82650
|
+
* Provides list of all available items, filtered by query
|
|
82651
|
+
* and a setter for draggable component to update available items on drag
|
|
82652
|
+
*/
|
|
82653
|
+
filteredAvailable: {
|
|
82654
|
+
get() {
|
|
82655
|
+
const q = this.query.toLowerCase();
|
|
82656
|
+
return this.available.filter(i => i.text.toLowerCase().indexOf(q) > -1);
|
|
82385
82657
|
},
|
|
82386
82658
|
|
|
82387
|
-
set(
|
|
82388
|
-
this
|
|
82659
|
+
set(items) {
|
|
82660
|
+
this.available = items;
|
|
82389
82661
|
}
|
|
82390
82662
|
|
|
82391
82663
|
},
|
|
82392
82664
|
|
|
82393
|
-
|
|
82394
|
-
|
|
82665
|
+
/**
|
|
82666
|
+
* Provides list of all selected items, filtered by query
|
|
82667
|
+
* and a setter for draggable component to update selected items on drag
|
|
82668
|
+
*/
|
|
82669
|
+
filteredSelected: {
|
|
82670
|
+
get() {
|
|
82671
|
+
const q = this.query.toLowerCase();
|
|
82672
|
+
return this.selected.filter(i => i.text.toLowerCase().indexOf(q) > -1);
|
|
82673
|
+
},
|
|
82395
82674
|
|
|
82396
|
-
|
|
82397
|
-
|
|
82398
|
-
} else {
|
|
82399
|
-
mFields = this.module.fields;
|
|
82675
|
+
set(items) {
|
|
82676
|
+
this.selected = items;
|
|
82400
82677
|
}
|
|
82401
82678
|
|
|
82402
|
-
|
|
82403
|
-
|
|
82404
|
-
|
|
82405
|
-
|
|
82679
|
+
}
|
|
82680
|
+
},
|
|
82681
|
+
watch: {
|
|
82682
|
+
/**
|
|
82683
|
+
* Update parent component (if needed)
|
|
82684
|
+
* @param v
|
|
82685
|
+
*/
|
|
82686
|
+
selected: {
|
|
82687
|
+
immediate: false,
|
|
82688
|
+
|
|
82689
|
+
handler(items) {
|
|
82690
|
+
const value = items.map(i => i[this.valueField]); // satisfy value.sync
|
|
82691
|
+
|
|
82692
|
+
this.$emit('update:value', value); // satisfy v-model
|
|
82693
|
+
|
|
82694
|
+
this.$emit('input', value);
|
|
82406
82695
|
}
|
|
82407
82696
|
|
|
82408
|
-
|
|
82697
|
+
},
|
|
82698
|
+
options: {
|
|
82699
|
+
deep: true,
|
|
82700
|
+
immediate: true,
|
|
82409
82701
|
|
|
82410
|
-
|
|
82411
|
-
|
|
82702
|
+
handler() {
|
|
82703
|
+
this.sync();
|
|
82704
|
+
}
|
|
82412
82705
|
|
|
82413
|
-
|
|
82414
|
-
|
|
82415
|
-
|
|
82416
|
-
|
|
82706
|
+
},
|
|
82707
|
+
value: {
|
|
82708
|
+
immediate: false,
|
|
82709
|
+
|
|
82710
|
+
handler(value = [], oldValue = []) {
|
|
82711
|
+
/**
|
|
82712
|
+
* Make sure we do not fall into an infinite loop
|
|
82713
|
+
*
|
|
82714
|
+
* If we update the value thenn sync will trigger recomputation of selected
|
|
82715
|
+
* Which then emits the update event and the loop will begin
|
|
82716
|
+
*/
|
|
82717
|
+
if (value.length === oldValue.length) {
|
|
82718
|
+
if (value.filter(v => !oldValue.includes(v)).length === 0) {
|
|
82719
|
+
return;
|
|
82720
|
+
}
|
|
82417
82721
|
}
|
|
82418
|
-
|
|
82419
|
-
|
|
82420
|
-
isSystem
|
|
82421
|
-
}) => !isSystem);
|
|
82722
|
+
|
|
82723
|
+
this.sync();
|
|
82422
82724
|
}
|
|
82423
82725
|
|
|
82424
|
-
|
|
82425
|
-
|
|
82726
|
+
}
|
|
82727
|
+
},
|
|
82728
|
+
|
|
82729
|
+
created() {
|
|
82730
|
+
this.options.forEach(o => {
|
|
82731
|
+
if (typeof o !== 'object') {
|
|
82732
|
+
throw new Error('expecting array of objects for options prop');
|
|
82733
|
+
}
|
|
82734
|
+
});
|
|
82735
|
+
},
|
|
82426
82736
|
|
|
82427
|
-
|
|
82428
|
-
|
|
82737
|
+
methods: {
|
|
82738
|
+
_disableDragging(e) {
|
|
82739
|
+
if (this.disabledDragging && e.to !== e.from) {
|
|
82740
|
+
return false;
|
|
82741
|
+
}
|
|
82429
82742
|
},
|
|
82430
82743
|
|
|
82431
|
-
|
|
82432
|
-
|
|
82744
|
+
selectAll() {
|
|
82745
|
+
if (this.disabledSorting) {
|
|
82746
|
+
// sorting disabled, just reuse list from the frozen list
|
|
82747
|
+
this.selected = [...this.frozen()];
|
|
82748
|
+
} else {
|
|
82749
|
+
// sorting enabled, push all items left in available
|
|
82750
|
+
// at the end of the list
|
|
82751
|
+
this.selected.push(...this.available);
|
|
82752
|
+
}
|
|
82753
|
+
|
|
82754
|
+
this.available = [];
|
|
82433
82755
|
},
|
|
82434
82756
|
|
|
82435
|
-
|
|
82436
|
-
//
|
|
82437
|
-
|
|
82757
|
+
select(item) {
|
|
82758
|
+
// remove available
|
|
82759
|
+
this.available = this.available.filter(i => i !== item); // put the selected item in the place where it was (if sorting is disabled)
|
|
82760
|
+
// or at the end
|
|
82761
|
+
|
|
82762
|
+
if (this.disabledSorting) {
|
|
82763
|
+
this.selected = this.frozen().filter(i => !this.available.includes(i));
|
|
82764
|
+
} else {
|
|
82765
|
+
this.selected.push(item);
|
|
82766
|
+
}
|
|
82438
82767
|
},
|
|
82439
82768
|
|
|
82440
|
-
|
|
82441
|
-
|
|
82769
|
+
unselectAll() {
|
|
82770
|
+
this.available = [...this.frozen()];
|
|
82771
|
+
this.selected = [];
|
|
82442
82772
|
},
|
|
82443
82773
|
|
|
82444
|
-
|
|
82445
|
-
|
|
82446
|
-
|
|
82774
|
+
unselect(item) {
|
|
82775
|
+
// filtering out the unselected item
|
|
82776
|
+
this.selected = this.selected.filter(i => i !== item); // sync available from the list of frozen items without selected
|
|
82447
82777
|
|
|
82448
|
-
|
|
82449
|
-
|
|
82450
|
-
'moduleID'(o, n) {
|
|
82451
|
-
if (o !== n) {
|
|
82452
|
-
this.selectedFields = [];
|
|
82453
|
-
}
|
|
82454
|
-
}
|
|
82778
|
+
this.available = this.frozen().filter(i => !this.selected.includes(i));
|
|
82779
|
+
},
|
|
82455
82780
|
|
|
82456
|
-
|
|
82457
|
-
|
|
82458
|
-
|
|
82459
|
-
|
|
82781
|
+
/**
|
|
82782
|
+
* Returns true given item is selected or not
|
|
82783
|
+
*
|
|
82784
|
+
* Item is considered selected if value of item's value-field is inside the selected array.
|
|
82785
|
+
*
|
|
82786
|
+
* @param item object
|
|
82787
|
+
* @returns boolean
|
|
82788
|
+
*/
|
|
82789
|
+
isPicked(item) {
|
|
82790
|
+
return item[this.valueField] && this.value.includes(item[this.valueField]);
|
|
82460
82791
|
},
|
|
82461
82792
|
|
|
82462
|
-
|
|
82463
|
-
|
|
82464
|
-
|
|
82793
|
+
sync() {
|
|
82794
|
+
/**
|
|
82795
|
+
* filter all unpicked options, freeze each item in the array and
|
|
82796
|
+
* build list of available items
|
|
82797
|
+
*/
|
|
82798
|
+
this.available = this.frozen().filter(opt => !this.isPicked(opt));
|
|
82799
|
+
/**
|
|
82800
|
+
* filter all unpicked options, freeze each item in the array and
|
|
82801
|
+
* build list of selected items, traverse value to keep order
|
|
82802
|
+
*/
|
|
82803
|
+
|
|
82804
|
+
this.selected = this.value.map(v => {
|
|
82805
|
+
return this.frozen().find(item => item[this.valueField] === v);
|
|
82806
|
+
}).filter(f => f);
|
|
82465
82807
|
},
|
|
82466
82808
|
|
|
82467
|
-
|
|
82468
|
-
|
|
82469
|
-
name
|
|
82470
|
-
}) => field.name !== name);
|
|
82809
|
+
frozen() {
|
|
82810
|
+
return this.options.map(Object.freeze);
|
|
82471
82811
|
}
|
|
82472
82812
|
|
|
82473
82813
|
}
|
|
@@ -82477,21 +82817,19 @@ var script$P = {
|
|
|
82477
82817
|
const __vue_script__$P = script$P;
|
|
82478
82818
|
|
|
82479
82819
|
/* template */
|
|
82480
|
-
var __vue_render__$
|
|
82481
|
-
var __vue_staticRenderFns__$
|
|
82820
|
+
var __vue_render__$K = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"overflow-hidden d-flex flex-column w-100 vh-100"},[_c('b-card',{staticClass:"h-100",attrs:{"no-body":""}},[_c('b-card-header',{staticClass:"bg-white p-0"},[(!_vm.hideFilter)?_c('b-input-group',[_c('b-input',{staticClass:"text-truncate",attrs:{"type":"search","disabled":_vm._disabledFilter,"placeholder":_vm.labels.searchPlaceholder},model:{value:(_vm.query),callback:function ($$v) {_vm.query=(typeof $$v === 'string'? $$v.trim(): $$v);},expression:"query"}}),_vm._v(" "),_c('b-input-group-append',[_c('b-input-group-text',{staticClass:"text-primary bg-white border-left-0"},[_c('font-awesome-icon',{attrs:{"icon":['fas', 'search']}})],1)],1)],1):_vm._e()],1),_vm._v(" "),_c('b-card-body',{staticClass:"d-flex p-0"},[_c('b-card',{staticClass:"col-sm-6 col-12 h-100 p-0",attrs:{"no-body":""}},[_c('b-card-header',{staticClass:"bg-white py-2 pl-0 pr-2"},[_c('div',{staticClass:"d-flex align-items-center"},[_c('label',{staticClass:"text-primary mb-1 mt-2"},[_vm._v("\n "+_vm._s(_vm.labels.availableItems)+"\n ")]),_vm._v(" "),_c('b-button',{directives:[{name:"show",rawName:"v-show",value:(_vm.filteredAvailable.length && !_vm.disabled),expression:"filteredAvailable.length && !disabled"}],staticClass:"ml-auto px-0 text-muted",attrs:{"variant":"link"},on:{"click":function($event){return _vm.selectAll()}}},[_vm._v("\n "+_vm._s(_vm.labels.selectAllItems)+"\n ")])],1)]),_vm._v(" "),_c('b-card-body',{staticClass:"overflow-auto py-0 pl-0 pr-2"},[_c('b-list-group',{staticClass:"h-100",attrs:{"vertical":""}},[_c('draggable',{staticClass:"overflow-auto h-100",attrs:{"sort":!_vm._disabledSorting,"move":_vm._disableDragging,"draggable":".item","group":"items"},scopedSlots:_vm._u([{key:"footer",fn:function(){return [(!_vm.filteredAvailable.length && _vm.query)?_c('h6',{staticClass:"text-center my-4"},[_vm._v("\n "+_vm._s(_vm.labels.noItemsFound)+"\n ")]):_vm._e()]},proxy:true}]),model:{value:(_vm.filteredAvailable),callback:function ($$v) {_vm.filteredAvailable=$$v;},expression:"filteredAvailable"}},_vm._l((_vm.filteredAvailable),function(item){return _c('b-list-group-item',{key:item.value,staticClass:"item mb-3 border rounded",on:{"dblclick":function($event){return _vm.select(item)}}},[_c('c-item-picker-item',{attrs:{"item":item,"disabled":_vm.disabled,"disabled-dragging":_vm.disabledDragging,"disabled-sorting":_vm.disabledSorting,"hide-icons":_vm.hideIcons},on:{"select":function($event){return _vm.select(item)}},scopedSlots:_vm._u([_vm._l((_vm.$scopedSlots),function(_,slot){return {key:slot,fn:function(scope){return [_vm._t(slot,null,{"textField":_vm.textField,"disabled":_vm.disabled,"disabledDragging":_vm.disabledDragging,"disabledSorting":_vm.disabledSorting,"hideIcons":_vm.hideIcons},scope)]}}})],null,true)})],1)}),1)],1)],1)],1),_vm._v(" "),_c('b-card',{staticClass:"h-100 pl-sm-0 col-sm-6 col-12 p-0",attrs:{"no-body":""}},[_c('b-card-header',{staticClass:"bg-white py-2 pl-2 pr-0"},[_c('div',{staticClass:"d-flex align-items-center"},[_c('label',{staticClass:"text-primary mb-2 mt-1"},[_vm._v("\n "+_vm._s(_vm.labels.selectedItems)+"\n ")]),_vm._v(" "),_c('b-button',{directives:[{name:"show",rawName:"v-show",value:(_vm.filteredSelected.length && !_vm.disabled),expression:"filteredSelected.length && !disabled"}],staticClass:"ml-auto px-0 text-muted",attrs:{"variant":"link"},on:{"click":function($event){return _vm.unselectAll()}}},[_vm._v("\n "+_vm._s(_vm.labels.unselectAllItems)+"\n ")])],1)]),_vm._v(" "),_c('b-card-body',{staticClass:"overflow-auto py-0 pl-2 pr-0"},[_c('b-list-group',{staticClass:"h-100",attrs:{"vertical":""}},[_c('draggable',{staticClass:"overflow-auto h-100",attrs:{"sort":!_vm._disabledSorting,"move":_vm._disableDragging,"draggable":".item","group":"items"},scopedSlots:_vm._u([{key:"footer",fn:function(){return [(!_vm.filteredSelected.length && _vm.query)?_c('h6',{staticClass:"text-center my-4"},[_vm._v("\n "+_vm._s(_vm.labels.noItemsFound)+"\n ")]):_vm._e()]},proxy:true}]),model:{value:(_vm.filteredSelected),callback:function ($$v) {_vm.filteredSelected=$$v;},expression:"filteredSelected"}},_vm._l((_vm.filteredSelected),function(item){return _c('b-list-group-item',{key:item.value,staticClass:"item mb-3 border rounded",on:{"dblclick":function($event){return _vm.unselect(item)}}},[_c('c-item-picker-item',{attrs:{"item":item,"disabled":_vm.disabled,"disabled-dragging":_vm.disabledDragging,"disabled-sorting":_vm.disabledSorting,"hide-icons":_vm.hideIcons,"selected":""},on:{"unselect":function($event){return _vm.unselect(item)}},scopedSlots:_vm._u([_vm._l((_vm.$scopedSlots),function(_,slot){return {key:slot,fn:function(scope){return [_vm._t(slot,null,{"textField":_vm.textField,"disabled":_vm.disabled,"disabledDragging":_vm.disabledDragging,"disabledSorting":_vm.disabledSorting,"hideIcons":_vm.hideIcons},scope)]}}})],null,true)})],1)}),1)],1)],1)],1)],1)],1)],1)};
|
|
82821
|
+
var __vue_staticRenderFns__$K = [];
|
|
82482
82822
|
|
|
82483
82823
|
/* style */
|
|
82484
|
-
const __vue_inject_styles__$Q =
|
|
82485
|
-
if (!inject) return
|
|
82486
|
-
inject("data-v-6f297e50_0", { source: ".handle[data-v-6f297e50]{cursor:grab}", map: undefined, media: undefined });
|
|
82487
|
-
|
|
82488
|
-
};
|
|
82824
|
+
const __vue_inject_styles__$Q = undefined;
|
|
82489
82825
|
/* scoped */
|
|
82490
|
-
const __vue_scope_id__$Q =
|
|
82826
|
+
const __vue_scope_id__$Q = undefined;
|
|
82491
82827
|
/* module identifier */
|
|
82492
82828
|
const __vue_module_identifier__$Q = undefined;
|
|
82493
82829
|
/* functional template */
|
|
82494
82830
|
const __vue_is_functional_template__$Q = false;
|
|
82831
|
+
/* style inject */
|
|
82832
|
+
|
|
82495
82833
|
/* style inject SSR */
|
|
82496
82834
|
|
|
82497
82835
|
/* style inject shadow dom */
|
|
@@ -82499,89 +82837,36 @@ var __vue_staticRenderFns__$J = [];
|
|
|
82499
82837
|
|
|
82500
82838
|
|
|
82501
82839
|
const __vue_component__$Q = /*#__PURE__*/normalizeComponent(
|
|
82502
|
-
{ render: __vue_render__$
|
|
82840
|
+
{ render: __vue_render__$K, staticRenderFns: __vue_staticRenderFns__$K },
|
|
82503
82841
|
__vue_inject_styles__$Q,
|
|
82504
82842
|
__vue_script__$P,
|
|
82505
82843
|
__vue_scope_id__$Q,
|
|
82506
82844
|
__vue_is_functional_template__$Q,
|
|
82507
82845
|
__vue_module_identifier__$Q,
|
|
82508
82846
|
false,
|
|
82509
|
-
|
|
82847
|
+
undefined,
|
|
82510
82848
|
undefined,
|
|
82511
82849
|
undefined
|
|
82512
82850
|
);
|
|
82513
82851
|
|
|
82514
|
-
const del$1 = '|||';
|
|
82515
|
-
/**
|
|
82516
|
-
* Extract subgroups from the given groups
|
|
82517
|
-
* @param groups
|
|
82518
|
-
* @param path Array of groups that represent the path
|
|
82519
|
-
*/
|
|
82520
|
-
function extractGroups(groups, ...path) {
|
|
82521
|
-
const jpath = path.join(del$1);
|
|
82522
|
-
return [...(new Set(groups
|
|
82523
|
-
.filter(g => g.slice(0, path.length).join(del$1) === jpath)
|
|
82524
|
-
.map(g => g.slice(path.length, path.length + 1)[0])
|
|
82525
|
-
.filter(g => !!g))).values()];
|
|
82526
|
-
}
|
|
82527
|
-
/**
|
|
82528
|
-
* Extract subgroups from the catalogue that match the given path
|
|
82529
|
-
*
|
|
82530
|
-
* @param cat Catalogue
|
|
82531
|
-
* @param path Array of groups that represent the path
|
|
82532
|
-
* @constructor
|
|
82533
|
-
*/
|
|
82534
|
-
function ExtractSubgroups(cat, ...path) {
|
|
82535
|
-
const groups = Object.values(cat)
|
|
82536
|
-
.map(({ group }) => group)
|
|
82537
|
-
.filter(g => g !== undefined);
|
|
82538
|
-
return extractGroups(groups, ...path);
|
|
82539
|
-
}
|
|
82540
|
-
/**
|
|
82541
|
-
* Returns all components that match the given path
|
|
82542
|
-
*
|
|
82543
|
-
* @param cat Catalogue
|
|
82544
|
-
* @param path Array of groups that represent the path
|
|
82545
|
-
|
|
82546
|
-
*/
|
|
82547
|
-
function ExtractComponents(cat, ...path) {
|
|
82548
|
-
const jpath = path.join(del$1);
|
|
82549
|
-
return Object.values(cat)
|
|
82550
|
-
.filter(({ group }) => (group || []).join(del$1) === jpath);
|
|
82551
|
-
}
|
|
82552
|
-
|
|
82553
|
-
//
|
|
82554
82852
|
var script$Q = {
|
|
82555
|
-
name: 'ComponentList',
|
|
82556
82853
|
props: {
|
|
82557
|
-
|
|
82558
|
-
|
|
82559
|
-
|
|
82854
|
+
displayElement: {
|
|
82855
|
+
type: Object,
|
|
82856
|
+
required: true
|
|
82560
82857
|
},
|
|
82561
|
-
|
|
82562
|
-
type:
|
|
82563
|
-
default: () =>
|
|
82858
|
+
labels: {
|
|
82859
|
+
type: Object,
|
|
82860
|
+
default: () => ({})
|
|
82564
82861
|
}
|
|
82565
82862
|
},
|
|
82566
82863
|
computed: {
|
|
82567
|
-
|
|
82568
|
-
|
|
82569
|
-
return this.path.length === 0;
|
|
82864
|
+
dataframes() {
|
|
82865
|
+
return this.displayElement.dataframes || [];
|
|
82570
82866
|
},
|
|
82571
82867
|
|
|
82572
|
-
|
|
82573
|
-
|
|
82574
|
-
return this.root ? undefined : this.path[this.path.length - 1];
|
|
82575
|
-
},
|
|
82576
|
-
|
|
82577
|
-
// returns all groups at this level
|
|
82578
|
-
subgroups() {
|
|
82579
|
-
return ExtractSubgroups(this.catalogue, ...this.path);
|
|
82580
|
-
},
|
|
82581
|
-
|
|
82582
|
-
components() {
|
|
82583
|
-
// return ExtractComponents(this.catalogue, ...this.path)
|
|
82584
|
-
return ExtractComponents(this.catalogue, ...this.path);
|
|
82868
|
+
options() {
|
|
82869
|
+
return this.displayElement.options || undefined;
|
|
82585
82870
|
}
|
|
82586
82871
|
|
|
82587
82872
|
}
|
|
@@ -82591,21 +82876,17 @@ var script$Q = {
|
|
|
82591
82876
|
const __vue_script__$Q = script$Q;
|
|
82592
82877
|
|
|
82593
82878
|
/* template */
|
|
82594
|
-
var __vue_render__$K = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[(!_vm.root)?_c('h5',{staticClass:"mb-0"},[_vm._v("\n "+_vm._s(_vm.group)+"\n ")]):_vm._e(),_vm._v(" "),(_vm.subgroups.length > 0 || _vm.components.length > 0)?_c('div',[_vm._l((_vm.components),function(cmp,i){return _c('div',{key:i,staticClass:"component ml-2",on:{"click":function($event){return _vm.$emit('select', cmp)}}},[_vm._v("\n "+_vm._s(cmp.name || cmp.component.name || 'Untitled')+"\n "),(cmp.wip)?_c('b-badge',{staticClass:"float-right",attrs:{"variant":"warning"}},[_vm._v("\n wip\n ")]):_vm._e()],1)}),_vm._v(" "),_vm._l((_vm.subgroups),function(group){return _c('component-list',{key:group,staticClass:"my-3",attrs:{"catalogue":_vm.catalogue,"path":_vm.path.concat( [group])},on:{"select":function($event){return _vm.$emit('select', $event)}}})})],2):_vm._e()])};
|
|
82595
|
-
var __vue_staticRenderFns__$K = [];
|
|
82596
82879
|
|
|
82597
82880
|
/* style */
|
|
82598
|
-
const __vue_inject_styles__$R =
|
|
82599
|
-
if (!inject) return
|
|
82600
|
-
inject("data-v-8b2b254e_0", { source: ".component[data-v-8b2b254e]{cursor:pointer}", map: undefined, media: undefined });
|
|
82601
|
-
|
|
82602
|
-
};
|
|
82881
|
+
const __vue_inject_styles__$R = undefined;
|
|
82603
82882
|
/* scoped */
|
|
82604
|
-
const __vue_scope_id__$R =
|
|
82883
|
+
const __vue_scope_id__$R = undefined;
|
|
82605
82884
|
/* module identifier */
|
|
82606
82885
|
const __vue_module_identifier__$R = undefined;
|
|
82607
82886
|
/* functional template */
|
|
82608
|
-
const __vue_is_functional_template__$R =
|
|
82887
|
+
const __vue_is_functional_template__$R = undefined;
|
|
82888
|
+
/* style inject */
|
|
82889
|
+
|
|
82609
82890
|
/* style inject SSR */
|
|
82610
82891
|
|
|
82611
82892
|
/* style inject shadow dom */
|
|
@@ -82613,77 +82894,75 @@ var __vue_staticRenderFns__$K = [];
|
|
|
82613
82894
|
|
|
82614
82895
|
|
|
82615
82896
|
const __vue_component__$R = /*#__PURE__*/normalizeComponent(
|
|
82616
|
-
{
|
|
82897
|
+
{},
|
|
82617
82898
|
__vue_inject_styles__$R,
|
|
82618
82899
|
__vue_script__$Q,
|
|
82619
82900
|
__vue_scope_id__$R,
|
|
82620
82901
|
__vue_is_functional_template__$R,
|
|
82621
82902
|
__vue_module_identifier__$R,
|
|
82622
82903
|
false,
|
|
82623
|
-
|
|
82904
|
+
undefined,
|
|
82624
82905
|
undefined,
|
|
82625
82906
|
undefined
|
|
82626
82907
|
);
|
|
82627
82908
|
|
|
82628
82909
|
//
|
|
82629
82910
|
var script$R = {
|
|
82630
|
-
|
|
82631
|
-
components: {
|
|
82632
|
-
ComponentList: __vue_component__$R
|
|
82633
|
-
},
|
|
82634
|
-
props: {
|
|
82635
|
-
catalogue: {
|
|
82636
|
-
required: true,
|
|
82637
|
-
type: Object
|
|
82638
|
-
}
|
|
82639
|
-
},
|
|
82640
|
-
computed: {
|
|
82641
|
-
controlGroups() {
|
|
82642
|
-
if (this.current.controls.length === 0) {
|
|
82643
|
-
return [];
|
|
82644
|
-
}
|
|
82911
|
+
extends: __vue_component__$R,
|
|
82645
82912
|
|
|
82646
|
-
|
|
82647
|
-
|
|
82648
|
-
|
|
82649
|
-
|
|
82913
|
+
data() {
|
|
82914
|
+
return {
|
|
82915
|
+
chart: undefined,
|
|
82916
|
+
plugins: [Funnel, colorschemes]
|
|
82917
|
+
};
|
|
82918
|
+
},
|
|
82650
82919
|
|
|
82920
|
+
computed: {
|
|
82921
|
+
localDataframe() {
|
|
82922
|
+
return this.dataframes[0];
|
|
82923
|
+
},
|
|
82651
82924
|
|
|
82652
|
-
|
|
82925
|
+
size() {
|
|
82926
|
+
return this.displayElement ? this.displayElement.meta.size || 100 : 100;
|
|
82653
82927
|
}
|
|
82654
82928
|
|
|
82655
82929
|
},
|
|
82930
|
+
watch: {
|
|
82931
|
+
dataframes: {
|
|
82932
|
+
deep: true,
|
|
82656
82933
|
|
|
82657
|
-
|
|
82658
|
-
|
|
82659
|
-
|
|
82660
|
-
|
|
82661
|
-
|
|
82934
|
+
handler(dataframes = []) {
|
|
82935
|
+
if (dataframes.length) {
|
|
82936
|
+
this.$nextTick(() => {
|
|
82937
|
+
this.renderChart();
|
|
82938
|
+
});
|
|
82939
|
+
}
|
|
82940
|
+
}
|
|
82662
82941
|
|
|
82663
|
-
methods: {
|
|
82664
|
-
setCurrent(component) {
|
|
82665
|
-
this.current = {
|
|
82666
|
-
props: {},
|
|
82667
|
-
...component
|
|
82668
|
-
};
|
|
82669
|
-
this.setScenario(this.current);
|
|
82670
82942
|
},
|
|
82943
|
+
size: {
|
|
82944
|
+
immediate: true,
|
|
82945
|
+
deep: true,
|
|
82671
82946
|
|
|
82672
|
-
|
|
82673
|
-
|
|
82674
|
-
|
|
82675
|
-
|
|
82676
|
-
|
|
82677
|
-
const apply = (c, props) => c.update(props, c.value(props) || null);
|
|
82947
|
+
handler() {
|
|
82948
|
+
this.$nextTick(() => {
|
|
82949
|
+
this.renderChart();
|
|
82950
|
+
});
|
|
82951
|
+
}
|
|
82678
82952
|
|
|
82679
|
-
|
|
82680
|
-
|
|
82681
|
-
|
|
82682
|
-
|
|
82683
|
-
|
|
82684
|
-
|
|
82953
|
+
}
|
|
82954
|
+
},
|
|
82955
|
+
methods: {
|
|
82956
|
+
renderChart() {
|
|
82957
|
+
if (this.chart) {
|
|
82958
|
+
this.chart.destroy();
|
|
82959
|
+
}
|
|
82960
|
+
|
|
82961
|
+
const ctx = this.$refs.chart.getContext('2d');
|
|
82962
|
+
const chartConfig = this.options.getChartConfiguration(this.dataframes);
|
|
82963
|
+
this.chart = new Chart(ctx, { ...chartConfig,
|
|
82964
|
+
plugins: this.plugins
|
|
82685
82965
|
});
|
|
82686
|
-
this.current.props = props;
|
|
82687
82966
|
}
|
|
82688
82967
|
|
|
82689
82968
|
}
|
|
@@ -82693,21 +82972,19 @@ var script$R = {
|
|
|
82693
82972
|
const __vue_script__$R = script$R;
|
|
82694
82973
|
|
|
82695
82974
|
/* template */
|
|
82696
|
-
var __vue_render__$L = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('
|
|
82975
|
+
var __vue_render__$L = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('canvas',{ref:"chart",staticClass:"h-100 w-100"})};
|
|
82697
82976
|
var __vue_staticRenderFns__$L = [];
|
|
82698
82977
|
|
|
82699
82978
|
/* style */
|
|
82700
|
-
const __vue_inject_styles__$S =
|
|
82701
|
-
if (!inject) return
|
|
82702
|
-
inject("data-v-2c86815c_0", { source: ".layout{height:100vh;width:100vw;display:grid;grid-template-rows:auto 400px;grid-template-columns:300px auto;align-content:stretch;grid-template-areas:\"side main\" \"side controls\"}.layout aside{grid-area:side;overflow:auto}.layout main{grid-area:main;background-image:linear-gradient(135deg,#f3f3f5 21.43%,#fff 21.43%,#fff 50%,#f3f3f5 50%,#f3f3f5 71.43%,#fff 71.43%,#fff 100%);background-size:35px 35px;overflow:auto}.layout .controls{grid-area:controls;overflow:auto}.layout .controls .control-group{float:left}.layout .scenario{cursor:pointer}", map: undefined, media: undefined });
|
|
82703
|
-
|
|
82704
|
-
};
|
|
82979
|
+
const __vue_inject_styles__$S = undefined;
|
|
82705
82980
|
/* scoped */
|
|
82706
82981
|
const __vue_scope_id__$S = undefined;
|
|
82707
82982
|
/* module identifier */
|
|
82708
82983
|
const __vue_module_identifier__$S = undefined;
|
|
82709
82984
|
/* functional template */
|
|
82710
82985
|
const __vue_is_functional_template__$S = false;
|
|
82986
|
+
/* style inject */
|
|
82987
|
+
|
|
82711
82988
|
/* style inject SSR */
|
|
82712
82989
|
|
|
82713
82990
|
/* style inject shadow dom */
|
|
@@ -82722,32 +82999,90 @@ var __vue_staticRenderFns__$L = [];
|
|
|
82722
82999
|
__vue_is_functional_template__$S,
|
|
82723
83000
|
__vue_module_identifier__$S,
|
|
82724
83001
|
false,
|
|
82725
|
-
|
|
83002
|
+
undefined,
|
|
82726
83003
|
undefined,
|
|
82727
83004
|
undefined
|
|
82728
83005
|
);
|
|
82729
83006
|
|
|
82730
|
-
//
|
|
82731
|
-
//
|
|
82732
|
-
//
|
|
82733
|
-
//
|
|
82734
|
-
//
|
|
82735
|
-
//
|
|
82736
|
-
//
|
|
82737
|
-
//
|
|
82738
|
-
//
|
|
82739
|
-
//
|
|
82740
83007
|
//
|
|
82741
83008
|
var script$S = {
|
|
82742
|
-
|
|
82743
|
-
|
|
82744
|
-
|
|
82745
|
-
|
|
83009
|
+
extends: __vue_component__$R,
|
|
83010
|
+
|
|
83011
|
+
data() {
|
|
83012
|
+
return {
|
|
83013
|
+
vvb: ['0', '0', '0', '0']
|
|
83014
|
+
};
|
|
83015
|
+
},
|
|
83016
|
+
|
|
83017
|
+
computed: {
|
|
83018
|
+
viewbox() {
|
|
83019
|
+
return this.vvb.join(' ');
|
|
83020
|
+
},
|
|
83021
|
+
|
|
83022
|
+
style() {
|
|
83023
|
+
return {
|
|
83024
|
+
fill: this.options.color || '#000000',
|
|
83025
|
+
backgroundColor: this.options.backgroundColor || '#ffffff'
|
|
83026
|
+
};
|
|
82746
83027
|
},
|
|
83028
|
+
|
|
83029
|
+
value() {
|
|
83030
|
+
if (this.dataframes.length) {
|
|
83031
|
+
const {
|
|
83032
|
+
rows = [],
|
|
83033
|
+
columns = []
|
|
83034
|
+
} = this.dataframes[0];
|
|
83035
|
+
|
|
83036
|
+
if (columns.length) {
|
|
83037
|
+
const columnIndex = columns.findIndex(({
|
|
83038
|
+
name
|
|
83039
|
+
}) => name === this.options.valueColumn);
|
|
83040
|
+
|
|
83041
|
+
if (rows.length) {
|
|
83042
|
+
return rows[0] ? rows[0][columnIndex] || '' : '';
|
|
83043
|
+
}
|
|
83044
|
+
}
|
|
83045
|
+
}
|
|
83046
|
+
|
|
83047
|
+
return '';
|
|
83048
|
+
},
|
|
83049
|
+
|
|
83050
|
+
displayedMetric() {
|
|
83051
|
+
const {
|
|
83052
|
+
prefix = '',
|
|
83053
|
+
suffix = ''
|
|
83054
|
+
} = this.options;
|
|
83055
|
+
|
|
83056
|
+
if (this.value) {
|
|
83057
|
+
return `${prefix}${this.value}${suffix}`;
|
|
83058
|
+
}
|
|
83059
|
+
|
|
83060
|
+
return '';
|
|
83061
|
+
}
|
|
83062
|
+
|
|
83063
|
+
},
|
|
83064
|
+
watch: {
|
|
82747
83065
|
value: {
|
|
82748
|
-
|
|
82749
|
-
|
|
83066
|
+
immediate: true,
|
|
83067
|
+
handler: function () {
|
|
83068
|
+
this.update();
|
|
83069
|
+
}
|
|
82750
83070
|
}
|
|
83071
|
+
},
|
|
83072
|
+
methods: {
|
|
83073
|
+
update() {
|
|
83074
|
+
this.$nextTick(function () {
|
|
83075
|
+
const {
|
|
83076
|
+
width,
|
|
83077
|
+
height
|
|
83078
|
+
} = this.$refs.metricItem.getBBox();
|
|
83079
|
+
const tmp = [...this.vvb];
|
|
83080
|
+
tmp[2] = parseInt(Math.ceil(width));
|
|
83081
|
+
tmp[3] = parseInt(Math.ceil(height));
|
|
83082
|
+
this.vvb = tmp;
|
|
83083
|
+
});
|
|
83084
|
+
}
|
|
83085
|
+
|
|
82751
83086
|
}
|
|
82752
83087
|
};
|
|
82753
83088
|
|
|
@@ -82755,7 +83090,7 @@ var script$S = {
|
|
|
82755
83090
|
const __vue_script__$S = script$S;
|
|
82756
83091
|
|
|
82757
83092
|
/* template */
|
|
82758
|
-
var __vue_render__$M = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('
|
|
83093
|
+
var __vue_render__$M = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.options)?_c('div',{staticClass:"d-flex align-items-center justify-content-center overflow-hidden h-100 px-2 rounded",style:(_vm.style)},[_c('svg',{staticClass:"h-100 w-100 align-items-end d-flex",attrs:{"viewBox":_vm.viewbox,"width":"100%","height":"100%"}},[_c('text',{ref:"metricItem",attrs:{"y":"50%","x":"50%","text-anchor":"middle","dominant-baseline":"central","text-rendering":"geometricPrecision"}},[_vm._v("\n "+_vm._s(_vm.displayedMetric)+"\n ")])])]):_vm._e()};
|
|
82759
83094
|
var __vue_staticRenderFns__$M = [];
|
|
82760
83095
|
|
|
82761
83096
|
/* style */
|
|
@@ -82787,27 +83122,377 @@ var __vue_staticRenderFns__$M = [];
|
|
|
82787
83122
|
undefined
|
|
82788
83123
|
);
|
|
82789
83124
|
|
|
82790
|
-
//
|
|
82791
|
-
//
|
|
82792
|
-
//
|
|
82793
|
-
//
|
|
82794
|
-
//
|
|
82795
|
-
//
|
|
82796
|
-
//
|
|
82797
|
-
//
|
|
82798
|
-
//
|
|
82799
|
-
//
|
|
82800
83125
|
//
|
|
82801
83126
|
var script$T = {
|
|
82802
|
-
|
|
82803
|
-
|
|
82804
|
-
|
|
82805
|
-
|
|
83127
|
+
extends: __vue_component__$R,
|
|
83128
|
+
|
|
83129
|
+
data() {
|
|
83130
|
+
return {
|
|
83131
|
+
sort: {
|
|
83132
|
+
field: '',
|
|
83133
|
+
descending: false
|
|
83134
|
+
},
|
|
83135
|
+
cursors: [],
|
|
83136
|
+
cursor: undefined
|
|
83137
|
+
};
|
|
83138
|
+
},
|
|
83139
|
+
|
|
83140
|
+
computed: {
|
|
83141
|
+
localDataframe() {
|
|
83142
|
+
return this.dataframes[0];
|
|
82806
83143
|
},
|
|
82807
|
-
|
|
82808
|
-
|
|
82809
|
-
|
|
83144
|
+
|
|
83145
|
+
// indexFrames groups frames based on the related DS identifiers
|
|
83146
|
+
// for easier work.
|
|
83147
|
+
indexFrames() {
|
|
83148
|
+
const ix = {};
|
|
83149
|
+
|
|
83150
|
+
for (const df of this.dataframes || []) {
|
|
83151
|
+
if (!df.relSource) {
|
|
83152
|
+
continue;
|
|
83153
|
+
}
|
|
83154
|
+
|
|
83155
|
+
if (!ix[df.relSource]) {
|
|
83156
|
+
ix[df.relSource] = {};
|
|
83157
|
+
}
|
|
83158
|
+
|
|
83159
|
+
if (!ix[df.relSource][df.refValue]) {
|
|
83160
|
+
ix[df.relSource][df.refValue] = [];
|
|
83161
|
+
}
|
|
83162
|
+
|
|
83163
|
+
ix[df.relSource][df.refValue].push(df);
|
|
83164
|
+
}
|
|
83165
|
+
|
|
83166
|
+
return ix;
|
|
83167
|
+
},
|
|
83168
|
+
|
|
83169
|
+
tabelify() {
|
|
83170
|
+
if (!this.dataframes.length) {
|
|
83171
|
+
return {};
|
|
83172
|
+
}
|
|
83173
|
+
|
|
83174
|
+
return this.tabelifyFrame(this.localDataframe);
|
|
83175
|
+
},
|
|
83176
|
+
|
|
83177
|
+
hasPrevPage() {
|
|
83178
|
+
return !!this.cursors.length;
|
|
83179
|
+
},
|
|
83180
|
+
|
|
83181
|
+
nextPage() {
|
|
83182
|
+
if (this.localDataframe) {
|
|
83183
|
+
const {
|
|
83184
|
+
nextPage
|
|
83185
|
+
} = this.localDataframe.paging || {};
|
|
83186
|
+
return nextPage;
|
|
83187
|
+
}
|
|
83188
|
+
|
|
83189
|
+
return undefined;
|
|
83190
|
+
},
|
|
83191
|
+
|
|
83192
|
+
hasNextPage() {
|
|
83193
|
+
return !!this.nextPage;
|
|
82810
83194
|
}
|
|
83195
|
+
|
|
83196
|
+
},
|
|
83197
|
+
watch: {
|
|
83198
|
+
localDataframe: {
|
|
83199
|
+
immediate: true,
|
|
83200
|
+
|
|
83201
|
+
handler(dataframe, oldDataframe) {
|
|
83202
|
+
if (dataframe && !oldDataframe) {
|
|
83203
|
+
const firstField = dataframe.sort.includes(',') ? dataframe.sort.split(',')[0] : dataframe.sort;
|
|
83204
|
+
|
|
83205
|
+
if (firstField.includes('DESC')) {
|
|
83206
|
+
this.sort.descending = true;
|
|
83207
|
+
this.sort.field = firstField.split(' ')[0];
|
|
83208
|
+
} else {
|
|
83209
|
+
this.sort.field = firstField;
|
|
83210
|
+
}
|
|
83211
|
+
}
|
|
83212
|
+
}
|
|
83213
|
+
|
|
83214
|
+
}
|
|
83215
|
+
},
|
|
83216
|
+
methods: {
|
|
83217
|
+
// keyColumns returns all of the key columns with indexes for all of the
|
|
83218
|
+
// columns that are used in joins.
|
|
83219
|
+
keyColumns(frame) {
|
|
83220
|
+
const foreignFrames = this.getForeignFrames(frame);
|
|
83221
|
+
const keys = {};
|
|
83222
|
+
|
|
83223
|
+
if (foreignFrames === undefined) {
|
|
83224
|
+
return keys;
|
|
83225
|
+
}
|
|
83226
|
+
|
|
83227
|
+
for (const ff of Object.values(foreignFrames)) {
|
|
83228
|
+
for (const f of ff) {
|
|
83229
|
+
keys[f.relColumn] = f.columns.findIndex(({
|
|
83230
|
+
name
|
|
83231
|
+
}) => name === f.relColumn);
|
|
83232
|
+
}
|
|
83233
|
+
}
|
|
83234
|
+
|
|
83235
|
+
return keys;
|
|
83236
|
+
},
|
|
83237
|
+
|
|
83238
|
+
getForeignFrames(frame) {
|
|
83239
|
+
return this.indexFrames[frame.ref];
|
|
83240
|
+
},
|
|
83241
|
+
|
|
83242
|
+
// tabelifyFrame returns a set of rows and columns that should be shown
|
|
83243
|
+
// for this frame.
|
|
83244
|
+
//
|
|
83245
|
+
// maxSize is used to calculate the rowSpan that should be applied to joined
|
|
83246
|
+
// frames with fewer rows then the other.
|
|
83247
|
+
//
|
|
83248
|
+
// Flow outline:
|
|
83249
|
+
// * for each row of the frame:
|
|
83250
|
+
// ** find all foreign frames
|
|
83251
|
+
// ** tabelify foreign frames
|
|
83252
|
+
// ** merge with the current tabelified result
|
|
83253
|
+
tabelifyFrame(frame, maxSize = 1) {
|
|
83254
|
+
const outRows = [];
|
|
83255
|
+
const isLocal = frame.ref === this.localDataframe.ref; // Index selected columns
|
|
83256
|
+
|
|
83257
|
+
const selectedCols = new Set();
|
|
83258
|
+
|
|
83259
|
+
for (const c of this.options.columns[frame.ref] || []) {
|
|
83260
|
+
selectedCols.add(frame.columns.findIndex(({
|
|
83261
|
+
name
|
|
83262
|
+
}) => name === c.name));
|
|
83263
|
+
}
|
|
83264
|
+
|
|
83265
|
+
const hSeanFrames = {};
|
|
83266
|
+
const outHeader = [...selectedCols].map(index => {
|
|
83267
|
+
const column = frame.columns[index];
|
|
83268
|
+
return {
|
|
83269
|
+
column,
|
|
83270
|
+
meta: {
|
|
83271
|
+
ref: frame.ref,
|
|
83272
|
+
sortKey: isLocal ? column.name : `${frame.ref}.${column.name}`
|
|
83273
|
+
}
|
|
83274
|
+
};
|
|
83275
|
+
});
|
|
83276
|
+
const outColgroups = [{
|
|
83277
|
+
size: outHeader.length,
|
|
83278
|
+
isLocal: isLocal
|
|
83279
|
+
}];
|
|
83280
|
+
const relFrames = this.getForeignFrames(frame);
|
|
83281
|
+
const usedKeys = this.keyColumns(frame);
|
|
83282
|
+
|
|
83283
|
+
for (const r of frame.rows || []) {
|
|
83284
|
+
maxSize = 1;
|
|
83285
|
+
const row = this.tabelifyRow(r, [...selectedCols]);
|
|
83286
|
+
const auxRows = [];
|
|
83287
|
+
|
|
83288
|
+
for (const colIndex of Object.values(usedKeys)) {
|
|
83289
|
+
const relFrame = relFrames[r[colIndex]]; // Determine the largest frame so our maxSize will match
|
|
83290
|
+
|
|
83291
|
+
for (const rf of relFrame || []) {
|
|
83292
|
+
maxSize = Math.max(maxSize, rf.rows.length);
|
|
83293
|
+
} // Tabelify related frames
|
|
83294
|
+
|
|
83295
|
+
|
|
83296
|
+
for (const rf of relFrame || []) {
|
|
83297
|
+
// const refColumnIndexes = (this.options.columns[rf.ref] || []).map(({ name }) => {
|
|
83298
|
+
// return frame.columns.findIndex(fc => fc.name === name)
|
|
83299
|
+
// })
|
|
83300
|
+
const aux = this.tabelifyFrame(rf, Math.max(rf.rows.length, maxSize)); // Optionally append header
|
|
83301
|
+
|
|
83302
|
+
if (!hSeanFrames[rf.ref]) {
|
|
83303
|
+
const x = [...aux.header];
|
|
83304
|
+
x[0].sourceName = rf.ref;
|
|
83305
|
+
outHeader.push(...x);
|
|
83306
|
+
hSeanFrames[rf.ref] = true;
|
|
83307
|
+
outColgroups.push(...aux.colgroups);
|
|
83308
|
+
} // Rowspan smaller frames so the table is nice and aligned
|
|
83309
|
+
|
|
83310
|
+
|
|
83311
|
+
if (aux.rows.length < maxSize) {
|
|
83312
|
+
for (const col of aux.rows[aux.rows.length - 1]) {
|
|
83313
|
+
col.attrs = {
|
|
83314
|
+
rowspan: maxSize - aux.rows.length + 1
|
|
83315
|
+
};
|
|
83316
|
+
}
|
|
83317
|
+
}
|
|
83318
|
+
|
|
83319
|
+
auxRows.push(aux.rows);
|
|
83320
|
+
}
|
|
83321
|
+
} // Merge the original row with joined rows
|
|
83322
|
+
// - the forst row of the merged row gets joined with the original row
|
|
83323
|
+
// - the rest are appended to the list (they are offsetted by rowspan)
|
|
83324
|
+
|
|
83325
|
+
|
|
83326
|
+
if (auxRows.length > 0) {
|
|
83327
|
+
for (const c of row) {
|
|
83328
|
+
c.attrs = {
|
|
83329
|
+
rowspan: maxSize
|
|
83330
|
+
};
|
|
83331
|
+
}
|
|
83332
|
+
|
|
83333
|
+
row[0].separator = true;
|
|
83334
|
+
const merged = this.mergeRows(auxRows).pop();
|
|
83335
|
+
row.push(...merged[0]);
|
|
83336
|
+
outRows.push(row);
|
|
83337
|
+
outRows.push(...merged.slice(1));
|
|
83338
|
+
} else {
|
|
83339
|
+
outRows.push(row);
|
|
83340
|
+
}
|
|
83341
|
+
}
|
|
83342
|
+
|
|
83343
|
+
return {
|
|
83344
|
+
rows: outRows,
|
|
83345
|
+
maxSize,
|
|
83346
|
+
header: outHeader,
|
|
83347
|
+
colgroups: outColgroups
|
|
83348
|
+
};
|
|
83349
|
+
},
|
|
83350
|
+
|
|
83351
|
+
mergeRows(auxRows, maxSize) {
|
|
83352
|
+
if (auxRows.length <= 1) {
|
|
83353
|
+
return auxRows;
|
|
83354
|
+
}
|
|
83355
|
+
|
|
83356
|
+
const a = auxRows[auxRows.length - 2];
|
|
83357
|
+
const b = auxRows[auxRows.length - 1];
|
|
83358
|
+
const tmpRows = [];
|
|
83359
|
+
|
|
83360
|
+
for (let i = 0; i < a.length; i++) {
|
|
83361
|
+
const row = a[i];
|
|
83362
|
+
|
|
83363
|
+
if (i >= b.length) {
|
|
83364
|
+
tmpRows.push(row);
|
|
83365
|
+
continue;
|
|
83366
|
+
}
|
|
83367
|
+
|
|
83368
|
+
row.push(...b[i]);
|
|
83369
|
+
tmpRows.push(row);
|
|
83370
|
+
}
|
|
83371
|
+
|
|
83372
|
+
if (b.length > a.length) {
|
|
83373
|
+
tmpRows.push(...b.slice(a.length));
|
|
83374
|
+
}
|
|
83375
|
+
|
|
83376
|
+
auxRows.splice(auxRows.length - 2, 2, tmpRows);
|
|
83377
|
+
return this.mergeRows(auxRows);
|
|
83378
|
+
},
|
|
83379
|
+
|
|
83380
|
+
tabelifyRow(row, selectedCols = []) {
|
|
83381
|
+
const out = [];
|
|
83382
|
+
selectedCols.forEach(index => {
|
|
83383
|
+
out.push({
|
|
83384
|
+
value: row[index]
|
|
83385
|
+
});
|
|
83386
|
+
});
|
|
83387
|
+
return out;
|
|
83388
|
+
},
|
|
83389
|
+
|
|
83390
|
+
// Sorting
|
|
83391
|
+
handleSort(fieldName) {
|
|
83392
|
+
let relatedDatasource;
|
|
83393
|
+
|
|
83394
|
+
if (fieldName.includes('.')) {
|
|
83395
|
+
[relatedDatasource, fieldName] = fieldName.split('.');
|
|
83396
|
+
return; // Uncomment this when foreign frame sorting is implemented
|
|
83397
|
+
}
|
|
83398
|
+
|
|
83399
|
+
if (fieldName) {
|
|
83400
|
+
const {
|
|
83401
|
+
field,
|
|
83402
|
+
descending
|
|
83403
|
+
} = this.sort;
|
|
83404
|
+
|
|
83405
|
+
if (this.cursor) {
|
|
83406
|
+
this.cursor = undefined;
|
|
83407
|
+
this.cursors = [];
|
|
83408
|
+
}
|
|
83409
|
+
|
|
83410
|
+
if (fieldName === field) {
|
|
83411
|
+
this.sort.descending = !descending;
|
|
83412
|
+
} else {
|
|
83413
|
+
this.sort.field = fieldName;
|
|
83414
|
+
this.sort.descending = false;
|
|
83415
|
+
}
|
|
83416
|
+
}
|
|
83417
|
+
|
|
83418
|
+
this.updateDefinition(relatedDatasource);
|
|
83419
|
+
},
|
|
83420
|
+
|
|
83421
|
+
goToPage(dir) {
|
|
83422
|
+
switch (dir) {
|
|
83423
|
+
case 'nextPage':
|
|
83424
|
+
if (!this.cursors.length) {
|
|
83425
|
+
this.cursors.push(undefined);
|
|
83426
|
+
}
|
|
83427
|
+
|
|
83428
|
+
this.cursors.push(this.nextPage);
|
|
83429
|
+
this.cursor = this.nextPage;
|
|
83430
|
+
break;
|
|
83431
|
+
|
|
83432
|
+
case 'prevPage':
|
|
83433
|
+
this.cursors.pop();
|
|
83434
|
+
this.cursor = this.cursors.pop();
|
|
83435
|
+
break;
|
|
83436
|
+
|
|
83437
|
+
default:
|
|
83438
|
+
this.cursor = undefined;
|
|
83439
|
+
this.cursors = [];
|
|
83440
|
+
}
|
|
83441
|
+
|
|
83442
|
+
this.updateDefinition();
|
|
83443
|
+
},
|
|
83444
|
+
|
|
83445
|
+
// Meta
|
|
83446
|
+
updateDefinition(updatedDatasource) {
|
|
83447
|
+
if (this.localDataframe) {
|
|
83448
|
+
// Get related datasource
|
|
83449
|
+
let ref = this.localDataframe.ref;
|
|
83450
|
+
|
|
83451
|
+
if (updatedDatasource) {
|
|
83452
|
+
ref = (this.dataframes.find(({
|
|
83453
|
+
ref
|
|
83454
|
+
}) => ref === updatedDatasource) || {}).ref;
|
|
83455
|
+
}
|
|
83456
|
+
|
|
83457
|
+
if (ref) {
|
|
83458
|
+
const def = {
|
|
83459
|
+
ref
|
|
83460
|
+
}; // Sorting
|
|
83461
|
+
|
|
83462
|
+
const {
|
|
83463
|
+
field,
|
|
83464
|
+
descending
|
|
83465
|
+
} = this.sort;
|
|
83466
|
+
|
|
83467
|
+
if (field) {
|
|
83468
|
+
// Generate sort string
|
|
83469
|
+
const sort = descending ? `${field} DESC` : field;
|
|
83470
|
+
def.sort = sort;
|
|
83471
|
+
} // Paging
|
|
83472
|
+
|
|
83473
|
+
|
|
83474
|
+
if (this.cursor) {
|
|
83475
|
+
let {
|
|
83476
|
+
limit
|
|
83477
|
+
} = this.localDataframe.paging || {};
|
|
83478
|
+
|
|
83479
|
+
if (!limit) {
|
|
83480
|
+
limit = this.options.datasources[0] ? this.options.datasources[0].paging.limit || 20 : 20;
|
|
83481
|
+
}
|
|
83482
|
+
|
|
83483
|
+
def.paging = {
|
|
83484
|
+
cursor: this.cursor,
|
|
83485
|
+
limit
|
|
83486
|
+
};
|
|
83487
|
+
}
|
|
83488
|
+
|
|
83489
|
+
const definition = {};
|
|
83490
|
+
definition[ref] = def;
|
|
83491
|
+
this.$emit('update', definition);
|
|
83492
|
+
}
|
|
83493
|
+
}
|
|
83494
|
+
}
|
|
83495
|
+
|
|
82811
83496
|
}
|
|
82812
83497
|
};
|
|
82813
83498
|
|
|
@@ -82815,19 +83500,27 @@ var script$T = {
|
|
|
82815
83500
|
const __vue_script__$T = script$T;
|
|
82816
83501
|
|
|
82817
83502
|
/* template */
|
|
82818
|
-
var __vue_render__$N = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-
|
|
83503
|
+
var __vue_render__$N = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-card',{staticClass:"h-100 rounded-0",attrs:{"no-body":""}},[_c('b-table-simple',{staticClass:"flex-grow-1 mh-100 mb-0",attrs:{"table-variant":_vm.options.tableVariant,"dark":_vm.options.dark,"bordered":_vm.options.bordered,"borderless":_vm.options.borderless,"outlined":_vm.options.outlined,"striped":_vm.options.striped,"responsive":_vm.options.responsive,"fixed":_vm.options.fixed,"hover":_vm.options.hover,"small":_vm.options.small,"no-border-collapse":_vm.options.noCollapse,"sticky-header":""}},[_vm._l((_vm.tabelify.colgroups),function(cg,i){return _c('colgroup',{key:i,class:{ local: cg.isLocal, foreign: !cg.isLocal },attrs:{"span":cg.size}})}),_vm._v(" "),_c('b-thead',{attrs:{"head-variant":_vm.options.headVariant}},[(_vm.dataframes.length > 1)?_c('b-tr',_vm._l((_vm.tabelify.header),function(c,i){return _c('b-th',_vm._b({key:i,staticClass:"border-0"},'b-th',c.column.attrs || {},false),[(c.sourceName)?_c('p',{staticClass:"m-0"},[_vm._v("\n "+_vm._s(c.sourceName)+"\n ")]):_vm._e()])}),1):_vm._e(),_vm._v(" "),_c('b-tr',_vm._l((_vm.tabelify.header),function(c,i){return _c('b-th',{key:i,staticClass:"border-0",class:{ 'pointer': !c.meta.sortKey.includes('.') },on:{"click":function($event){return _vm.handleSort(c.meta.sortKey)}}},[_c('div',{staticClass:"d-flex align-items-center"},[_c('div',{staticClass:"d-flex text-nowrap"},[_vm._v("\n "+_vm._s(c.column.label)+"\n ")]),_vm._v(" "),(!c.meta.sortKey.includes('.'))?_c('font-awesome-layers',{staticClass:"ml-2"},[_c('font-awesome-icon',{staticClass:"mb-1",style:({
|
|
83504
|
+
color: _vm.sort.field === c.meta.sortKey && !_vm.sort.descending ? 'black' : 'grey',
|
|
83505
|
+
}),attrs:{"icon":['fas', 'angle-up']}}),_vm._v(" "),_c('font-awesome-icon',{staticClass:"mt-1",style:({
|
|
83506
|
+
color: _vm.sort.field === c.meta.sortKey && _vm.sort.descending ? 'black' : 'grey',
|
|
83507
|
+
}),attrs:{"icon":['fas', 'angle-down']}})],1):_vm._e()],1)])}),1)],1),_vm._v(" "),_c('b-tbody',{staticClass:"h-100"},_vm._l((_vm.tabelify.rows),function(r,i){return _c('b-tr',{key:i,class:{
|
|
83508
|
+
separator: !!(r[0] || {}).separator,
|
|
83509
|
+
}},_vm._l((r),function(c,j){return _c('b-td',_vm._b({key:j},'b-td',c.attrs || {},false),[_vm._v("\n "+_vm._s(c.value)+"\n ")])}),1)}),1)],2),_vm._v(" "),_c('b-card-footer',{staticClass:"d-flex p-1 rounded-0"},[_c('b-button-group',{staticClass:"ml-auto"},[_c('b-button',{staticClass:"d-flex align-items-center text-dark px-1",attrs:{"disabled":!_vm.hasPrevPage,"variant":"link"},on:{"click":function($event){return _vm.goToPage()}}},[_c('font-awesome-icon',{attrs:{"icon":['fas', 'angle-double-left']}})],1),_vm._v(" "),_c('b-button',{staticClass:"d-flex align-items-center text-dark",attrs:{"disabled":!_vm.hasPrevPage,"variant":"link"},on:{"click":function($event){return _vm.goToPage('prevPage')}}},[_c('font-awesome-icon',{staticClass:"mr-1",attrs:{"icon":['fas', 'angle-left']}}),_vm._v("\n "+_vm._s(_vm.labels.previous)+"\n ")],1),_vm._v(" "),_c('b-button',{staticClass:"d-flex align-items-center text-dark",attrs:{"disabled":!_vm.hasNextPage,"variant":"link"},on:{"click":function($event){return _vm.goToPage('nextPage')}}},[_vm._v("\n "+_vm._s(_vm.labels.next)+"\n "),_c('font-awesome-icon',{staticClass:"ml-1",attrs:{"icon":['fas', 'angle-right']}})],1)],1)],1)],1)};
|
|
82819
83510
|
var __vue_staticRenderFns__$N = [];
|
|
82820
83511
|
|
|
82821
83512
|
/* style */
|
|
82822
|
-
const __vue_inject_styles__$U =
|
|
83513
|
+
const __vue_inject_styles__$U = function (inject) {
|
|
83514
|
+
if (!inject) return
|
|
83515
|
+
inject("data-v-b515bfce_0", { source: ".foreign[data-v-b515bfce]{border:1px solid rgba(22,36,37,.8);border-top:0;border-bottom:0}.separator[data-v-b515bfce]{border-top:2px solid rgba(22,36,37,.5)}.card-rounded[data-v-b515bfce]{border-radius:1rem 1rem 0 0}", map: undefined, media: undefined });
|
|
83516
|
+
|
|
83517
|
+
};
|
|
82823
83518
|
/* scoped */
|
|
82824
|
-
const __vue_scope_id__$U =
|
|
83519
|
+
const __vue_scope_id__$U = "data-v-b515bfce";
|
|
82825
83520
|
/* module identifier */
|
|
82826
83521
|
const __vue_module_identifier__$U = undefined;
|
|
82827
83522
|
/* functional template */
|
|
82828
83523
|
const __vue_is_functional_template__$U = false;
|
|
82829
|
-
/* style inject */
|
|
82830
|
-
|
|
82831
83524
|
/* style inject SSR */
|
|
82832
83525
|
|
|
82833
83526
|
/* style inject shadow dom */
|
|
@@ -82842,39 +83535,21 @@ var __vue_staticRenderFns__$N = [];
|
|
|
82842
83535
|
__vue_is_functional_template__$U,
|
|
82843
83536
|
__vue_module_identifier__$U,
|
|
82844
83537
|
false,
|
|
82845
|
-
|
|
83538
|
+
createInjector,
|
|
82846
83539
|
undefined,
|
|
82847
83540
|
undefined
|
|
82848
83541
|
);
|
|
82849
83542
|
|
|
82850
|
-
//
|
|
82851
|
-
//
|
|
82852
|
-
//
|
|
82853
|
-
//
|
|
82854
|
-
//
|
|
82855
|
-
//
|
|
82856
|
-
//
|
|
82857
|
-
//
|
|
82858
|
-
//
|
|
82859
83543
|
//
|
|
82860
83544
|
var script$U = {
|
|
82861
|
-
|
|
82862
|
-
label: {
|
|
82863
|
-
required: true,
|
|
82864
|
-
type: String
|
|
82865
|
-
},
|
|
82866
|
-
value: {
|
|
82867
|
-
type: Boolean,
|
|
82868
|
-
default: () => false
|
|
82869
|
-
}
|
|
82870
|
-
}
|
|
83545
|
+
extends: __vue_component__$R
|
|
82871
83546
|
};
|
|
82872
83547
|
|
|
82873
83548
|
/* script */
|
|
82874
83549
|
const __vue_script__$U = script$U;
|
|
82875
83550
|
|
|
82876
83551
|
/* template */
|
|
82877
|
-
var __vue_render__$O = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return
|
|
83552
|
+
var __vue_render__$O = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.options)?_c('div',{staticClass:"p-2",domProps:{"innerHTML":_vm._s(_vm.options.value)}}):_vm._e()};
|
|
82878
83553
|
var __vue_staticRenderFns__$O = [];
|
|
82879
83554
|
|
|
82880
83555
|
/* style */
|
|
@@ -82906,8 +83581,222 @@ var __vue_staticRenderFns__$O = [];
|
|
|
82906
83581
|
undefined
|
|
82907
83582
|
);
|
|
82908
83583
|
|
|
83584
|
+
const del$1 = '|||';
|
|
83585
|
+
/**
|
|
83586
|
+
* Extract subgroups from the given groups
|
|
83587
|
+
* @param groups
|
|
83588
|
+
* @param path Array of groups that represent the path
|
|
83589
|
+
*/
|
|
83590
|
+
function extractGroups(groups, ...path) {
|
|
83591
|
+
const jpath = path.join(del$1);
|
|
83592
|
+
return [...(new Set(groups
|
|
83593
|
+
.filter(g => g.slice(0, path.length).join(del$1) === jpath)
|
|
83594
|
+
.map(g => g.slice(path.length, path.length + 1)[0])
|
|
83595
|
+
.filter(g => !!g))).values()];
|
|
83596
|
+
}
|
|
83597
|
+
/**
|
|
83598
|
+
* Extract subgroups from the catalogue that match the given path
|
|
83599
|
+
*
|
|
83600
|
+
* @param cat Catalogue
|
|
83601
|
+
* @param path Array of groups that represent the path
|
|
83602
|
+
* @constructor
|
|
83603
|
+
*/
|
|
83604
|
+
function ExtractSubgroups(cat, ...path) {
|
|
83605
|
+
const groups = Object.values(cat)
|
|
83606
|
+
.map(({ group }) => group)
|
|
83607
|
+
.filter(g => g !== undefined);
|
|
83608
|
+
return extractGroups(groups, ...path);
|
|
83609
|
+
}
|
|
83610
|
+
/**
|
|
83611
|
+
* Returns all components that match the given path
|
|
83612
|
+
*
|
|
83613
|
+
* @param cat Catalogue
|
|
83614
|
+
* @param path Array of groups that represent the path
|
|
83615
|
+
|
|
83616
|
+
*/
|
|
83617
|
+
function ExtractComponents(cat, ...path) {
|
|
83618
|
+
const jpath = path.join(del$1);
|
|
83619
|
+
return Object.values(cat)
|
|
83620
|
+
.filter(({ group }) => (group || []).join(del$1) === jpath);
|
|
83621
|
+
}
|
|
83622
|
+
|
|
82909
83623
|
//
|
|
83624
|
+
var script$V = {
|
|
83625
|
+
name: 'ComponentList',
|
|
83626
|
+
props: {
|
|
83627
|
+
catalogue: {
|
|
83628
|
+
required: true,
|
|
83629
|
+
type: Object
|
|
83630
|
+
},
|
|
83631
|
+
path: {
|
|
83632
|
+
type: Array,
|
|
83633
|
+
default: () => []
|
|
83634
|
+
}
|
|
83635
|
+
},
|
|
83636
|
+
computed: {
|
|
83637
|
+
// name of the current group
|
|
83638
|
+
root() {
|
|
83639
|
+
return this.path.length === 0;
|
|
83640
|
+
},
|
|
83641
|
+
|
|
83642
|
+
// name of the current group
|
|
83643
|
+
group() {
|
|
83644
|
+
return this.root ? undefined : this.path[this.path.length - 1];
|
|
83645
|
+
},
|
|
83646
|
+
|
|
83647
|
+
// returns all groups at this level
|
|
83648
|
+
subgroups() {
|
|
83649
|
+
return ExtractSubgroups(this.catalogue, ...this.path);
|
|
83650
|
+
},
|
|
83651
|
+
|
|
83652
|
+
components() {
|
|
83653
|
+
// return ExtractComponents(this.catalogue, ...this.path)
|
|
83654
|
+
return ExtractComponents(this.catalogue, ...this.path);
|
|
83655
|
+
}
|
|
83656
|
+
|
|
83657
|
+
}
|
|
83658
|
+
};
|
|
83659
|
+
|
|
83660
|
+
/* script */
|
|
83661
|
+
const __vue_script__$V = script$V;
|
|
83662
|
+
|
|
83663
|
+
/* template */
|
|
83664
|
+
var __vue_render__$P = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[(!_vm.root)?_c('h5',{staticClass:"mb-0"},[_vm._v("\n "+_vm._s(_vm.group)+"\n ")]):_vm._e(),_vm._v(" "),(_vm.subgroups.length > 0 || _vm.components.length > 0)?_c('div',[_vm._l((_vm.components),function(cmp,i){return _c('div',{key:i,staticClass:"component ml-2",on:{"click":function($event){return _vm.$emit('select', cmp)}}},[_vm._v("\n "+_vm._s(cmp.name || cmp.component.name || 'Untitled')+"\n "),(cmp.wip)?_c('b-badge',{staticClass:"float-right",attrs:{"variant":"warning"}},[_vm._v("\n wip\n ")]):_vm._e()],1)}),_vm._v(" "),_vm._l((_vm.subgroups),function(group){return _c('component-list',{key:group,staticClass:"my-3",attrs:{"catalogue":_vm.catalogue,"path":_vm.path.concat( [group])},on:{"select":function($event){return _vm.$emit('select', $event)}}})})],2):_vm._e()])};
|
|
83665
|
+
var __vue_staticRenderFns__$P = [];
|
|
83666
|
+
|
|
83667
|
+
/* style */
|
|
83668
|
+
const __vue_inject_styles__$W = function (inject) {
|
|
83669
|
+
if (!inject) return
|
|
83670
|
+
inject("data-v-8b2b254e_0", { source: ".component[data-v-8b2b254e]{cursor:pointer}", map: undefined, media: undefined });
|
|
83671
|
+
|
|
83672
|
+
};
|
|
83673
|
+
/* scoped */
|
|
83674
|
+
const __vue_scope_id__$W = "data-v-8b2b254e";
|
|
83675
|
+
/* module identifier */
|
|
83676
|
+
const __vue_module_identifier__$W = undefined;
|
|
83677
|
+
/* functional template */
|
|
83678
|
+
const __vue_is_functional_template__$W = false;
|
|
83679
|
+
/* style inject SSR */
|
|
83680
|
+
|
|
83681
|
+
/* style inject shadow dom */
|
|
83682
|
+
|
|
83683
|
+
|
|
83684
|
+
|
|
83685
|
+
const __vue_component__$W = /*#__PURE__*/normalizeComponent(
|
|
83686
|
+
{ render: __vue_render__$P, staticRenderFns: __vue_staticRenderFns__$P },
|
|
83687
|
+
__vue_inject_styles__$W,
|
|
83688
|
+
__vue_script__$V,
|
|
83689
|
+
__vue_scope_id__$W,
|
|
83690
|
+
__vue_is_functional_template__$W,
|
|
83691
|
+
__vue_module_identifier__$W,
|
|
83692
|
+
false,
|
|
83693
|
+
createInjector,
|
|
83694
|
+
undefined,
|
|
83695
|
+
undefined
|
|
83696
|
+
);
|
|
83697
|
+
|
|
82910
83698
|
//
|
|
83699
|
+
var script$W = {
|
|
83700
|
+
name: 'C3',
|
|
83701
|
+
components: {
|
|
83702
|
+
ComponentList: __vue_component__$W
|
|
83703
|
+
},
|
|
83704
|
+
props: {
|
|
83705
|
+
catalogue: {
|
|
83706
|
+
required: true,
|
|
83707
|
+
type: Object
|
|
83708
|
+
}
|
|
83709
|
+
},
|
|
83710
|
+
computed: {
|
|
83711
|
+
controlGroups() {
|
|
83712
|
+
if (this.current.controls.length === 0) {
|
|
83713
|
+
return [];
|
|
83714
|
+
}
|
|
83715
|
+
|
|
83716
|
+
if (Array.isArray(this.current.controls[0])) {
|
|
83717
|
+
// already grouped
|
|
83718
|
+
return this.current.controls;
|
|
83719
|
+
} // make one virtual group holding all controls
|
|
83720
|
+
|
|
83721
|
+
|
|
83722
|
+
return [this.current.controls];
|
|
83723
|
+
}
|
|
83724
|
+
|
|
83725
|
+
},
|
|
83726
|
+
|
|
83727
|
+
data() {
|
|
83728
|
+
return {
|
|
83729
|
+
current: undefined
|
|
83730
|
+
};
|
|
83731
|
+
},
|
|
83732
|
+
|
|
83733
|
+
methods: {
|
|
83734
|
+
setCurrent(component) {
|
|
83735
|
+
this.current = {
|
|
83736
|
+
props: {},
|
|
83737
|
+
...component
|
|
83738
|
+
};
|
|
83739
|
+
this.setScenario(this.current);
|
|
83740
|
+
},
|
|
83741
|
+
|
|
83742
|
+
setScenario({
|
|
83743
|
+
props = {},
|
|
83744
|
+
controls = []
|
|
83745
|
+
}) {
|
|
83746
|
+
// create missing props from controls
|
|
83747
|
+
const apply = (c, props) => c.update(props, c.value(props) || null);
|
|
83748
|
+
|
|
83749
|
+
controls.forEach(c => {
|
|
83750
|
+
if (Array.isArray(c)) {
|
|
83751
|
+
c.forEach(c => apply(c, props));
|
|
83752
|
+
} else {
|
|
83753
|
+
apply(c, props);
|
|
83754
|
+
}
|
|
83755
|
+
});
|
|
83756
|
+
this.current.props = props;
|
|
83757
|
+
}
|
|
83758
|
+
|
|
83759
|
+
}
|
|
83760
|
+
};
|
|
83761
|
+
|
|
83762
|
+
/* script */
|
|
83763
|
+
const __vue_script__$W = script$W;
|
|
83764
|
+
|
|
83765
|
+
/* template */
|
|
83766
|
+
var __vue_render__$Q = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"layout"},[_c('aside',{staticClass:"sidebar p-2"},[_c('h5',{staticClass:"border-bottom"},[_vm._v("\n C3: Component Catalogue\n ")]),_vm._v(" "),_c('component-list',{attrs:{"catalogue":_vm.catalogue},on:{"select":function($event){return _vm.setCurrent($event)}}})],1),_vm._v(" "),_c('main',{staticClass:"p-5"},[(_vm.current)?_c(_vm.current.component,_vm._b({tag:"component"},'component',_vm.current.props,false)):_c('p',{staticClass:"text-center"},[_vm._v("\n Select a component from the C3 Catalogue and start hacking :)\n ")])],1),_vm._v(" "),(_vm.current)?_c('div',{staticClass:"controls px-5 py-2 mt-2"},[_vm._l((_vm.controlGroups),function(cg,g){return _c('div',{key:("control-group-" + g),staticClass:"control-group mr-2"},[_c('h3',[_vm._v("\n Controls\n ")]),_vm._v(" "),_vm._l((cg),function(c,i){return _c(c.component,_vm._b({key:i,tag:"component",attrs:{"value":c.value(_vm.current.props)},on:{"update":function($event){return c.update(_vm.current.props, $event)}}},'component',c.props,false))})],2)}),_vm._v(" "),(_vm.current.scenarios)?_c('div',{staticClass:"control-group float-right"},[_c('h3',[_vm._v("\n Pre-set controls\n ")]),_vm._v(" "),_c('ul',{staticClass:"pl-0"},_vm._l((_vm.current.scenarios),function(s,i){return _c('li',{key:i,staticClass:"list-unstyled scenario",on:{"click":function($event){return _vm.setScenario(s)}}},[_vm._v("\n "+_vm._s(s.label)+"\n ")])}),0)]):_vm._e()],2):_vm._e()])};
|
|
83767
|
+
var __vue_staticRenderFns__$Q = [];
|
|
83768
|
+
|
|
83769
|
+
/* style */
|
|
83770
|
+
const __vue_inject_styles__$X = function (inject) {
|
|
83771
|
+
if (!inject) return
|
|
83772
|
+
inject("data-v-2c86815c_0", { source: ".layout{height:100vh;width:100vw;display:grid;grid-template-rows:auto 400px;grid-template-columns:300px auto;align-content:stretch;grid-template-areas:\"side main\" \"side controls\"}.layout aside{grid-area:side;overflow:auto}.layout main{grid-area:main;background-image:linear-gradient(135deg,#f3f3f5 21.43%,#fff 21.43%,#fff 50%,#f3f3f5 50%,#f3f3f5 71.43%,#fff 71.43%,#fff 100%);background-size:35px 35px;overflow:auto}.layout .controls{grid-area:controls;overflow:auto}.layout .controls .control-group{float:left}.layout .scenario{cursor:pointer}", map: undefined, media: undefined });
|
|
83773
|
+
|
|
83774
|
+
};
|
|
83775
|
+
/* scoped */
|
|
83776
|
+
const __vue_scope_id__$X = undefined;
|
|
83777
|
+
/* module identifier */
|
|
83778
|
+
const __vue_module_identifier__$X = undefined;
|
|
83779
|
+
/* functional template */
|
|
83780
|
+
const __vue_is_functional_template__$X = false;
|
|
83781
|
+
/* style inject SSR */
|
|
83782
|
+
|
|
83783
|
+
/* style inject shadow dom */
|
|
83784
|
+
|
|
83785
|
+
|
|
83786
|
+
|
|
83787
|
+
const __vue_component__$X = /*#__PURE__*/normalizeComponent(
|
|
83788
|
+
{ render: __vue_render__$Q, staticRenderFns: __vue_staticRenderFns__$Q },
|
|
83789
|
+
__vue_inject_styles__$X,
|
|
83790
|
+
__vue_script__$W,
|
|
83791
|
+
__vue_scope_id__$X,
|
|
83792
|
+
__vue_is_functional_template__$X,
|
|
83793
|
+
__vue_module_identifier__$X,
|
|
83794
|
+
false,
|
|
83795
|
+
createInjector,
|
|
83796
|
+
undefined,
|
|
83797
|
+
undefined
|
|
83798
|
+
);
|
|
83799
|
+
|
|
82911
83800
|
//
|
|
82912
83801
|
//
|
|
82913
83802
|
//
|
|
@@ -82918,7 +83807,188 @@ var __vue_staticRenderFns__$O = [];
|
|
|
82918
83807
|
//
|
|
82919
83808
|
//
|
|
82920
83809
|
//
|
|
82921
|
-
|
|
83810
|
+
//
|
|
83811
|
+
var script$X = {
|
|
83812
|
+
props: {
|
|
83813
|
+
label: {
|
|
83814
|
+
required: true,
|
|
83815
|
+
type: String
|
|
83816
|
+
},
|
|
83817
|
+
value: {
|
|
83818
|
+
type: String,
|
|
83819
|
+
default: () => ''
|
|
83820
|
+
}
|
|
83821
|
+
}
|
|
83822
|
+
};
|
|
83823
|
+
|
|
83824
|
+
/* script */
|
|
83825
|
+
const __vue_script__$X = script$X;
|
|
83826
|
+
|
|
83827
|
+
/* template */
|
|
83828
|
+
var __vue_render__$R = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-form-group',{attrs:{"label":_vm.label}},[_c('b-form-input',{attrs:{"value":_vm.value},on:{"update":function($event){return _vm.$emit('update', $event)}}})],1)};
|
|
83829
|
+
var __vue_staticRenderFns__$R = [];
|
|
83830
|
+
|
|
83831
|
+
/* style */
|
|
83832
|
+
const __vue_inject_styles__$Y = undefined;
|
|
83833
|
+
/* scoped */
|
|
83834
|
+
const __vue_scope_id__$Y = undefined;
|
|
83835
|
+
/* module identifier */
|
|
83836
|
+
const __vue_module_identifier__$Y = undefined;
|
|
83837
|
+
/* functional template */
|
|
83838
|
+
const __vue_is_functional_template__$Y = false;
|
|
83839
|
+
/* style inject */
|
|
83840
|
+
|
|
83841
|
+
/* style inject SSR */
|
|
83842
|
+
|
|
83843
|
+
/* style inject shadow dom */
|
|
83844
|
+
|
|
83845
|
+
|
|
83846
|
+
|
|
83847
|
+
const __vue_component__$Y = /*#__PURE__*/normalizeComponent(
|
|
83848
|
+
{ render: __vue_render__$R, staticRenderFns: __vue_staticRenderFns__$R },
|
|
83849
|
+
__vue_inject_styles__$Y,
|
|
83850
|
+
__vue_script__$X,
|
|
83851
|
+
__vue_scope_id__$Y,
|
|
83852
|
+
__vue_is_functional_template__$Y,
|
|
83853
|
+
__vue_module_identifier__$Y,
|
|
83854
|
+
false,
|
|
83855
|
+
undefined,
|
|
83856
|
+
undefined,
|
|
83857
|
+
undefined
|
|
83858
|
+
);
|
|
83859
|
+
|
|
83860
|
+
//
|
|
83861
|
+
//
|
|
83862
|
+
//
|
|
83863
|
+
//
|
|
83864
|
+
//
|
|
83865
|
+
//
|
|
83866
|
+
//
|
|
83867
|
+
//
|
|
83868
|
+
//
|
|
83869
|
+
//
|
|
83870
|
+
//
|
|
83871
|
+
var script$Y = {
|
|
83872
|
+
props: {
|
|
83873
|
+
label: {
|
|
83874
|
+
required: true,
|
|
83875
|
+
type: String
|
|
83876
|
+
},
|
|
83877
|
+
value: {
|
|
83878
|
+
type: String,
|
|
83879
|
+
default: () => ''
|
|
83880
|
+
}
|
|
83881
|
+
}
|
|
83882
|
+
};
|
|
83883
|
+
|
|
83884
|
+
/* script */
|
|
83885
|
+
const __vue_script__$Y = script$Y;
|
|
83886
|
+
|
|
83887
|
+
/* template */
|
|
83888
|
+
var __vue_render__$S = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-form-group',{attrs:{"label":_vm.label}},[_c('b-form-textarea',{attrs:{"value":_vm.value},on:{"update":function($event){return _vm.$emit('update', $event)}}})],1)};
|
|
83889
|
+
var __vue_staticRenderFns__$S = [];
|
|
83890
|
+
|
|
83891
|
+
/* style */
|
|
83892
|
+
const __vue_inject_styles__$Z = undefined;
|
|
83893
|
+
/* scoped */
|
|
83894
|
+
const __vue_scope_id__$Z = undefined;
|
|
83895
|
+
/* module identifier */
|
|
83896
|
+
const __vue_module_identifier__$Z = undefined;
|
|
83897
|
+
/* functional template */
|
|
83898
|
+
const __vue_is_functional_template__$Z = false;
|
|
83899
|
+
/* style inject */
|
|
83900
|
+
|
|
83901
|
+
/* style inject SSR */
|
|
83902
|
+
|
|
83903
|
+
/* style inject shadow dom */
|
|
83904
|
+
|
|
83905
|
+
|
|
83906
|
+
|
|
83907
|
+
const __vue_component__$Z = /*#__PURE__*/normalizeComponent(
|
|
83908
|
+
{ render: __vue_render__$S, staticRenderFns: __vue_staticRenderFns__$S },
|
|
83909
|
+
__vue_inject_styles__$Z,
|
|
83910
|
+
__vue_script__$Y,
|
|
83911
|
+
__vue_scope_id__$Z,
|
|
83912
|
+
__vue_is_functional_template__$Z,
|
|
83913
|
+
__vue_module_identifier__$Z,
|
|
83914
|
+
false,
|
|
83915
|
+
undefined,
|
|
83916
|
+
undefined,
|
|
83917
|
+
undefined
|
|
83918
|
+
);
|
|
83919
|
+
|
|
83920
|
+
//
|
|
83921
|
+
//
|
|
83922
|
+
//
|
|
83923
|
+
//
|
|
83924
|
+
//
|
|
83925
|
+
//
|
|
83926
|
+
//
|
|
83927
|
+
//
|
|
83928
|
+
//
|
|
83929
|
+
//
|
|
83930
|
+
var script$Z = {
|
|
83931
|
+
props: {
|
|
83932
|
+
label: {
|
|
83933
|
+
required: true,
|
|
83934
|
+
type: String
|
|
83935
|
+
},
|
|
83936
|
+
value: {
|
|
83937
|
+
type: Boolean,
|
|
83938
|
+
default: () => false
|
|
83939
|
+
}
|
|
83940
|
+
}
|
|
83941
|
+
};
|
|
83942
|
+
|
|
83943
|
+
/* script */
|
|
83944
|
+
const __vue_script__$Z = script$Z;
|
|
83945
|
+
|
|
83946
|
+
/* template */
|
|
83947
|
+
var __vue_render__$T = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-form-group',[_c('b-form-checkbox',{attrs:{"checked":_vm.value},on:{"change":function($event){return _vm.$emit('update', $event)}}},[_vm._v("\n "+_vm._s(_vm.label)+"\n ")])],1)};
|
|
83948
|
+
var __vue_staticRenderFns__$T = [];
|
|
83949
|
+
|
|
83950
|
+
/* style */
|
|
83951
|
+
const __vue_inject_styles__$_ = undefined;
|
|
83952
|
+
/* scoped */
|
|
83953
|
+
const __vue_scope_id__$_ = undefined;
|
|
83954
|
+
/* module identifier */
|
|
83955
|
+
const __vue_module_identifier__$_ = undefined;
|
|
83956
|
+
/* functional template */
|
|
83957
|
+
const __vue_is_functional_template__$_ = false;
|
|
83958
|
+
/* style inject */
|
|
83959
|
+
|
|
83960
|
+
/* style inject SSR */
|
|
83961
|
+
|
|
83962
|
+
/* style inject shadow dom */
|
|
83963
|
+
|
|
83964
|
+
|
|
83965
|
+
|
|
83966
|
+
const __vue_component__$_ = /*#__PURE__*/normalizeComponent(
|
|
83967
|
+
{ render: __vue_render__$T, staticRenderFns: __vue_staticRenderFns__$T },
|
|
83968
|
+
__vue_inject_styles__$_,
|
|
83969
|
+
__vue_script__$Z,
|
|
83970
|
+
__vue_scope_id__$_,
|
|
83971
|
+
__vue_is_functional_template__$_,
|
|
83972
|
+
__vue_module_identifier__$_,
|
|
83973
|
+
false,
|
|
83974
|
+
undefined,
|
|
83975
|
+
undefined,
|
|
83976
|
+
undefined
|
|
83977
|
+
);
|
|
83978
|
+
|
|
83979
|
+
//
|
|
83980
|
+
//
|
|
83981
|
+
//
|
|
83982
|
+
//
|
|
83983
|
+
//
|
|
83984
|
+
//
|
|
83985
|
+
//
|
|
83986
|
+
//
|
|
83987
|
+
//
|
|
83988
|
+
//
|
|
83989
|
+
//
|
|
83990
|
+
//
|
|
83991
|
+
var script$_ = {
|
|
82922
83992
|
props: {
|
|
82923
83993
|
label: {
|
|
82924
83994
|
required: true,
|
|
@@ -82936,20 +84006,20 @@ var script$V = {
|
|
|
82936
84006
|
};
|
|
82937
84007
|
|
|
82938
84008
|
/* script */
|
|
82939
|
-
const __vue_script__$
|
|
84009
|
+
const __vue_script__$_ = script$_;
|
|
82940
84010
|
|
|
82941
84011
|
/* template */
|
|
82942
|
-
var __vue_render__$
|
|
82943
|
-
var __vue_staticRenderFns__$
|
|
84012
|
+
var __vue_render__$U = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-form-group',{attrs:{"label":_vm.label}},[_c('b-form-select',{attrs:{"value":_vm.value,"options":_vm.options},on:{"input":function($event){return _vm.$emit('update', $event)}}})],1)};
|
|
84013
|
+
var __vue_staticRenderFns__$U = [];
|
|
82944
84014
|
|
|
82945
84015
|
/* style */
|
|
82946
|
-
const __vue_inject_styles__
|
|
84016
|
+
const __vue_inject_styles__$$ = undefined;
|
|
82947
84017
|
/* scoped */
|
|
82948
|
-
const __vue_scope_id__
|
|
84018
|
+
const __vue_scope_id__$$ = undefined;
|
|
82949
84019
|
/* module identifier */
|
|
82950
|
-
const __vue_module_identifier__
|
|
84020
|
+
const __vue_module_identifier__$$ = undefined;
|
|
82951
84021
|
/* functional template */
|
|
82952
|
-
const __vue_is_functional_template__
|
|
84022
|
+
const __vue_is_functional_template__$$ = false;
|
|
82953
84023
|
/* style inject */
|
|
82954
84024
|
|
|
82955
84025
|
/* style inject SSR */
|
|
@@ -82958,13 +84028,13 @@ var __vue_staticRenderFns__$P = [];
|
|
|
82958
84028
|
|
|
82959
84029
|
|
|
82960
84030
|
|
|
82961
|
-
const __vue_component__
|
|
82962
|
-
{ render: __vue_render__$
|
|
82963
|
-
__vue_inject_styles__
|
|
82964
|
-
__vue_script__$
|
|
82965
|
-
__vue_scope_id__
|
|
82966
|
-
__vue_is_functional_template__
|
|
82967
|
-
__vue_module_identifier__
|
|
84031
|
+
const __vue_component__$$ = /*#__PURE__*/normalizeComponent(
|
|
84032
|
+
{ render: __vue_render__$U, staticRenderFns: __vue_staticRenderFns__$U },
|
|
84033
|
+
__vue_inject_styles__$$,
|
|
84034
|
+
__vue_script__$_,
|
|
84035
|
+
__vue_scope_id__$$,
|
|
84036
|
+
__vue_is_functional_template__$$,
|
|
84037
|
+
__vue_module_identifier__$$,
|
|
82968
84038
|
false,
|
|
82969
84039
|
undefined,
|
|
82970
84040
|
undefined,
|
|
@@ -100176,16 +101246,16 @@ function generic(component, { handler, props }) {
|
|
|
100176
101246
|
props }, handler);
|
|
100177
101247
|
}
|
|
100178
101248
|
function input(label, handler) {
|
|
100179
|
-
return generic(__vue_component__$
|
|
101249
|
+
return generic(__vue_component__$Y, { handler, props: { label } });
|
|
100180
101250
|
}
|
|
100181
101251
|
function textarea(label, handler) {
|
|
100182
|
-
return generic(__vue_component__$
|
|
101252
|
+
return generic(__vue_component__$Z, { handler, props: { label } });
|
|
100183
101253
|
}
|
|
100184
101254
|
function checkbox(label, handler) {
|
|
100185
|
-
return generic(__vue_component__$
|
|
101255
|
+
return generic(__vue_component__$_, { handler, props: { label } });
|
|
100186
101256
|
}
|
|
100187
101257
|
function select(label, handler, options) {
|
|
100188
|
-
return generic(__vue_component__
|
|
101258
|
+
return generic(__vue_component__$$, {
|
|
100189
101259
|
handler,
|
|
100190
101260
|
props: {
|
|
100191
101261
|
label,
|
|
@@ -100204,7 +101274,7 @@ var controls = /*#__PURE__*/Object.freeze({
|
|
|
100204
101274
|
});
|
|
100205
101275
|
|
|
100206
101276
|
var index$2 = {
|
|
100207
|
-
View: __vue_component__$
|
|
101277
|
+
View: __vue_component__$X,
|
|
100208
101278
|
controls,
|
|
100209
101279
|
};
|
|
100210
101280
|
|
|
@@ -100218,8 +101288,9 @@ var index$3 = /*#__PURE__*/Object.freeze({
|
|
|
100218
101288
|
canPreview: canPreview,
|
|
100219
101289
|
CInputConfirm: __vue_component__$9,
|
|
100220
101290
|
CInputProcessing: __vue_component__$a,
|
|
100221
|
-
CInputDateTime: __vue_component__$
|
|
100222
|
-
|
|
101291
|
+
CInputDateTime: __vue_component__$b,
|
|
101292
|
+
CInputPresort: __vue_component__$c,
|
|
101293
|
+
CInputCron: __vue_component__$d,
|
|
100223
101294
|
CRichTextInput: __vue_component__$m,
|
|
100224
101295
|
CLightbox: __vue_component__$5,
|
|
100225
101296
|
CPermissionsButton: __vue_component__$n,
|
|
@@ -100234,8 +101305,12 @@ var index$3 = /*#__PURE__*/Object.freeze({
|
|
|
100234
101305
|
CToaster: __vue_component__$N,
|
|
100235
101306
|
CToasterLink: __vue_component__$M,
|
|
100236
101307
|
CReminderSidebar: __vue_component__$O,
|
|
100237
|
-
|
|
100238
|
-
|
|
101308
|
+
CItemPicker: __vue_component__$Q,
|
|
101309
|
+
CItemPickerItem: __vue_component__$P,
|
|
101310
|
+
CReportChart: __vue_component__$S,
|
|
101311
|
+
CReportMetric: __vue_component__$T,
|
|
101312
|
+
CReportTable: __vue_component__$U,
|
|
101313
|
+
CReportText: __vue_component__$V,
|
|
100239
101314
|
C3: index$2,
|
|
100240
101315
|
CPrompts: __vue_component__$B,
|
|
100241
101316
|
CPromptModal: __vue_component__$A,
|
|
@@ -100657,6 +101732,66 @@ var index$7 = /*#__PURE__*/Object.freeze({
|
|
|
100657
101732
|
RBAC: RBAC
|
|
100658
101733
|
});
|
|
100659
101734
|
|
|
101735
|
+
// A helper function to remove diacritics from the given string.
|
|
101736
|
+
// This allows us so search over characters like čšž with csz.
|
|
101737
|
+
//
|
|
101738
|
+
// stackoverflow.com/questions/990904/remove-accents-diacritics-in-a-string-in-javascript/37511463#37511463
|
|
101739
|
+
function toNFD(s) {
|
|
101740
|
+
return s.normalize('NFD').replace(/[\u0300-\u036f]/g, '');
|
|
101741
|
+
}
|
|
101742
|
+
// Here we try to calculate the quality of the match using relative numbers.
|
|
101743
|
+
// By default, fuzzy sort uses score that is not capped.
|
|
101744
|
+
const goodMatchThreshold = 0.35;
|
|
101745
|
+
function fuzzyMatch({ indexes }) {
|
|
101746
|
+
return indexes.length / (Math.max(...indexes) + 1);
|
|
101747
|
+
}
|
|
101748
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
101749
|
+
function assert(match, obj, query, field, ...fields) {
|
|
101750
|
+
if (!obj) {
|
|
101751
|
+
return false;
|
|
101752
|
+
}
|
|
101753
|
+
query = toNFD(query.trim().toLowerCase());
|
|
101754
|
+
if (typeof obj === 'string') {
|
|
101755
|
+
return match(toNFD(obj.trim().toLowerCase()), query);
|
|
101756
|
+
}
|
|
101757
|
+
else {
|
|
101758
|
+
if (!field) {
|
|
101759
|
+
throw new Error('field must be provided when searching over objects');
|
|
101760
|
+
}
|
|
101761
|
+
return fields.concat([field])
|
|
101762
|
+
.some(f => match(toNFD(obj[f].trim().toLowerCase()), query));
|
|
101763
|
+
}
|
|
101764
|
+
}
|
|
101765
|
+
// AssertStrict checks for a substring and doesn't do any additional guessing
|
|
101766
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
101767
|
+
function AssertStrict(obj, query, field, ...fields) {
|
|
101768
|
+
return assert((v, query) => v.includes(query), obj, query, field, ...fields);
|
|
101769
|
+
}
|
|
101770
|
+
// AssertFuzzy uses some heuristic to determine if the query maybe probably perhaps matches
|
|
101771
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
101772
|
+
function AssertFuzzy(obj, query, field, ...fields) {
|
|
101773
|
+
return assert((v, query) => {
|
|
101774
|
+
const rs = fzy.single(query, v);
|
|
101775
|
+
if (!rs) {
|
|
101776
|
+
return false;
|
|
101777
|
+
}
|
|
101778
|
+
return fuzzyMatch(rs) >= goodMatchThreshold;
|
|
101779
|
+
}, obj, query, field, ...fields);
|
|
101780
|
+
}
|
|
101781
|
+
// Assert uses both AssertStrict and AssertFuzzy to check if the query matches,
|
|
101782
|
+
// If the strict assertion passes that is used, else it tries to do a AssertFuzzy just to make sure
|
|
101783
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
101784
|
+
function Assert(obj, query, field, ...fields) {
|
|
101785
|
+
return AssertStrict(obj, query, field, ...fields) || AssertFuzzy(obj, query, field, ...fields);
|
|
101786
|
+
}
|
|
101787
|
+
|
|
101788
|
+
var filter = /*#__PURE__*/Object.freeze({
|
|
101789
|
+
__proto__: null,
|
|
101790
|
+
AssertStrict: AssertStrict,
|
|
101791
|
+
AssertFuzzy: AssertFuzzy,
|
|
101792
|
+
Assert: Assert
|
|
101793
|
+
});
|
|
101794
|
+
|
|
100660
101795
|
const config = {
|
|
100661
101796
|
format: 'json',
|
|
100662
101797
|
// (Boolean) whether to reconnect automatically (false)
|
|
@@ -100739,5 +101874,5 @@ var websocket = /*#__PURE__*/Object.freeze({
|
|
|
100739
101874
|
init: init
|
|
100740
101875
|
});
|
|
100741
101876
|
|
|
100742
|
-
export { index$3 as components, index$4 as corredor, index$5 as filters, i18n, index$1 as mixins, index as plugins, index$7 as store, url, websocket };
|
|
101877
|
+
export { index$3 as components, index$4 as corredor, filter, index$5 as filters, i18n, index$1 as mixins, index as plugins, index$7 as store, url, websocket };
|
|
100743
101878
|
//# sourceMappingURL=index.es.js.map
|