@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/dist/index.js CHANGED
@@ -15,6 +15,7 @@ var VueI18Next = _interopDefault(require('@panter/vue-i18next'));
15
15
  var path = _interopDefault(require('path'));
16
16
  var vPhotoswipe = require('v-photoswipe');
17
17
  var pdfjs = _interopDefault(require('pdfjs-dist'));
18
+ var Draggable = _interopDefault(require('vuedraggable'));
18
19
  var Swatches = _interopDefault(require('vue-swatches'));
19
20
  var tiptap = require('tiptap');
20
21
  var tiptapExtensions = require('tiptap-extensions');
@@ -22,8 +23,10 @@ var hps = _interopDefault(require('html-parse-stringify'));
22
23
  var fontawesomeSvgCore = require('@fortawesome/fontawesome-svg-core');
23
24
  var freeSolidSvgIcons = require('@fortawesome/free-solid-svg-icons');
24
25
  var vuex = require('vuex');
25
- var draggable = _interopDefault(require('vuedraggable'));
26
+ var colorschemes = _interopDefault(require('chartjs-plugin-colorschemes'));
27
+ var Funnel = _interopDefault(require('chartjs-plugin-funnel'));
26
28
  var pino = _interopDefault(require('pino'));
29
+ var fzy = _interopDefault(require('fuzzysort'));
27
30
 
28
31
  /* eslint-disable @typescript-eslint/ban-ts-ignore */
29
32
  /**
@@ -1926,15 +1929,19 @@ var url = /*#__PURE__*/Object.freeze({
1926
1929
  const accessToken = Symbol('accessToken');
1927
1930
  const user = Symbol('user');
1928
1931
  /**
1929
- * This is an endpoint of a oauth2 authorization-code flow + refresh token exchange
1932
+ * This is an endpoint of an oauth2 authorization-code flow + refresh token exchange
1930
1933
  * for default client.
1931
1934
  *
1932
- * If you are concerned about security, this is not much different than using a dedicated backend
1935
+ * If you are concerned about security, this is not much different to using a dedicated backend
1933
1936
  * for this SPA that only redirects to a set of allowed URIs.
1934
1937
  */
1935
1938
  const oauth2FlowURL = '/oauth2/default-client';
1936
1939
  const oauth2InfoURL = '/oauth2/info';
1937
1940
  const oauth2Scope = 'profile api';
1941
+ const storeKeyFlowStarted = 'auth.flow-started';
1942
+ const storeKeyFinalState = 'auth.state.final';
1943
+ const storeKeyRefreshToken = 'auth.refresh-token';
1944
+ const maxStartAttempts = 5;
1938
1945
  class Auth {
1939
1946
  constructor({ app, verbose, cortezaAuthURL, callbackURL, entrypointURL, location, sessionStorage, refreshFactor }) {
1940
1947
  if (refreshFactor >= 1 || refreshFactor <= 0) {
@@ -1977,13 +1984,6 @@ class Auth {
1977
1984
  error: noop,
1978
1985
  };
1979
1986
  }
1980
- /**
1981
- * Returns prefixed key
1982
- * @param key
1983
- */
1984
- get refreshTokenKey() {
1985
- return 'auth.refresh-token';
1986
- }
1987
1987
  /**
1988
1988
  * Returns function that returns current access token
1989
1989
  */
@@ -2007,43 +2007,83 @@ class Auth {
2007
2007
  handle(req = new URL(this.entrypointURL)) {
2008
2008
  return __awaiter(this, void 0, void 0, function* () {
2009
2009
  this.log.info('handling authentication');
2010
- if (/\/auth\/callback$/.test(req.pathname)) {
2010
+ if (this.isCallback(req.pathname)) {
2011
2011
  this.log.info('handling authentication callback');
2012
2012
  const params = new URLSearchParams(req.search);
2013
2013
  if (params.has('error')) {
2014
2014
  throw new Error(params.get('error') || 'authentication flow failed with error');
2015
2015
  }
2016
2016
  if (params.has('code')) {
2017
- let finalLocation = null;
2017
+ let finalLocation = this.entrypointURL;
2018
2018
  if (params.has('state')) {
2019
2019
  const state = params.get('state') || '';
2020
- const key = `auth.state.${state}.location`;
2021
- this.log.info('state received', state);
2022
- finalLocation = this.sessionStorage.getItem(key);
2023
- if (!finalLocation) {
2024
- throw Error('state does not match');
2020
+ const storeKeyStateLocation = `auth.state.${state}.location`;
2021
+ const tmp = this.sessionStorage.getItem(storeKeyStateLocation);
2022
+ if (tmp === null) {
2023
+ console.warn('state does not match, restarting authentication flow');
2024
+ this.startAuthenticationFlow();
2025
+ return null;
2025
2026
  }
2026
- if (/auth\/callback/.test(finalLocation)) {
2027
+ if (!this.isCallback(tmp)) {
2027
2028
  // if by some coincidence we got callback URL to finalLocation
2028
- // we'll silently ignore it
2029
- finalLocation = null;
2030
- }
2031
- else {
2032
- this.log.info('location before auth flow start', finalLocation);
2029
+ // we'll silently ignore it and redirect user back to entrypoint
2030
+ finalLocation = tmp;
2033
2031
  }
2034
- this.sessionStorage.removeItem(key);
2032
+ this.sessionStorage.removeItem(storeKeyStateLocation);
2035
2033
  }
2036
2034
  const code = params.get('code') || '';
2037
2035
  this.log.info('authorization code received', code);
2038
- yield this.exchangeCode(code);
2039
- if (finalLocation) {
2040
- this.location.assign(finalLocation);
2041
- }
2036
+ const rsp = yield this.exchangeCode(code);
2037
+ this.startFinalState(finalLocation);
2038
+ return rsp;
2042
2039
  }
2043
2040
  }
2044
2041
  return this.check();
2045
2042
  });
2046
2043
  }
2044
+ /**
2045
+ * Flagging session storage
2046
+ *
2047
+ * Challenge with sessions and browser tabs:
2048
+ * Each browser tab & window interacts with an isolated session. When user clicks on a link to and wants to open
2049
+ * it in a new window or a tab, or when tab is duplicated, session contents are copied!
2050
+ *
2051
+ * Consequences of that are that two (or more) tabs end up with the same session
2052
+ * and the same refresh token, and we need to detect if we're dealing with refresh token in an old or new session.
2053
+ *
2054
+ * With this function we start the final state and flag the session. This way we'll
2055
+ * know, after the redirection to the final location, if this is a final stage or not and if the refresh token
2056
+ * belongs to this session or not.
2057
+ */
2058
+ startFinalState(dst) {
2059
+ this.log.info('redirecting back to final destination', dst);
2060
+ this.sessionStorage.setItem(storeKeyFinalState, Date.now().toString());
2061
+ this.location.assign(dst);
2062
+ }
2063
+ /**
2064
+ * Called when refresh token is re-fetched.
2065
+ *
2066
+ * Cleanup aux items in the session store
2067
+ */
2068
+ completeFinalState() {
2069
+ this.sessionStorage.removeItem(storeKeyFinalState);
2070
+ this.sessionStorage.removeItem(storeKeyFlowStarted);
2071
+ const stateKey = /^auth\.state\.\w+\.location$/;
2072
+ for (let i = 0; i < this.sessionStorage.length; i++) {
2073
+ const key = this.sessionStorage.key(i);
2074
+ if (key !== null && stateKey.test(key)) {
2075
+ this.sessionStorage.removeItem(key);
2076
+ }
2077
+ }
2078
+ }
2079
+ /**
2080
+ * Are we in a final state or not?
2081
+ *
2082
+ * See startFinalState function for more details
2083
+ */
2084
+ inFinalState() {
2085
+ return this.sessionStorage.getItem(storeKeyFinalState) !== null;
2086
+ }
2047
2087
  /**
2048
2088
  * Checks current auth state; is access token loaded OR do we have a refresh token we can use
2049
2089
  *
@@ -2077,27 +2117,34 @@ class Auth {
2077
2117
  this[user] = authUser;
2078
2118
  return data;
2079
2119
  }).catch((error) => {
2080
- this.log.info('data fetch form info endpoint failed', { oauth2InfoURL, headers, error });
2120
+ this.log.error('data fetch form info endpoint failed', { oauth2InfoURL, headers, error });
2081
2121
  // assume invalid JWT and remove it
2082
2122
  this[accessToken] = undefined;
2083
2123
  throw new Error('Unauthenticated');
2084
2124
  });
2085
2125
  }
2086
- const refreshToken = this.sessionStorage.getItem(this.refreshTokenKey);
2126
+ const refreshToken = this.sessionStorage.getItem(storeKeyRefreshToken);
2087
2127
  if (refreshToken) {
2088
- this.log.info('refresh token found, exchanging it for new access token');
2128
+ this.log.debug('refresh token found', { refreshToken });
2089
2129
  /**
2090
- * Refresh token found in the storage,
2091
- * let's use it to get new access token
2130
+ * Only exchange refresh token if this is the final state (see startFinalState function for more details)
2131
+ *
2132
+ * If this is a duplicated-session, an error will be thrown and authentication will be (probably)
2133
+ * restarted by the caller.
2092
2134
  */
2093
- return this.exchangeRefresh(refreshToken);
2135
+ if (this.inFinalState()) {
2136
+ this.log.info('refreshing token', refreshToken);
2137
+ /**
2138
+ * Refresh token found in the storage,
2139
+ * let's use it to get new access token
2140
+ */
2141
+ return this.exchangeRefresh(refreshToken);
2142
+ }
2094
2143
  }
2095
2144
  throw new Error('Unauthenticated');
2096
2145
  });
2097
2146
  }
2098
2147
  logout() {
2099
- this[accessToken] = undefined;
2100
- this[user] = undefined;
2101
2148
  this.pruneStore();
2102
2149
  this.location.assign(Make({
2103
2150
  url: `${this.cortezaAuthURL}/logout`,
@@ -2112,8 +2159,9 @@ class Auth {
2112
2159
  */
2113
2160
  startAuthenticationFlow() {
2114
2161
  this.log.debug('starting new authentication flow');
2162
+ this.incFlowCounter();
2115
2163
  const state = Math.random().toString(36).substring(2);
2116
- this.sessionStorage.setItem(`auth.state.${state}.location`, this.location.toString());
2164
+ this.sessionStorage.setItem(`auth.state.${state}.location`, this.getRedirect(this.location.toString()));
2117
2165
  this.location.assign(Make({
2118
2166
  url: `${this.cortezaAuthURL}` + oauth2FlowURL,
2119
2167
  query: {
@@ -2124,6 +2172,38 @@ class Auth {
2124
2172
  },
2125
2173
  }));
2126
2174
  }
2175
+ getRedirect(url) {
2176
+ const u = new URL(url);
2177
+ // In case someone started the flow on a callback route, default to the root
2178
+ // of the webapp.
2179
+ if (this.isCallback(u.pathname)) {
2180
+ u.pathname = '';
2181
+ u.search = '';
2182
+ u.hash = '';
2183
+ }
2184
+ return u.toString();
2185
+ }
2186
+ isCallback(url) {
2187
+ return /\/auth\/callback$/.test(url);
2188
+ }
2189
+ /**
2190
+ * protects against too many tries when we try to auto-fix the "state does not match" error
2191
+ * by restarting the aut flow.
2192
+ */
2193
+ incFlowCounter() {
2194
+ const aux = this.sessionStorage.getItem(storeKeyFlowStarted);
2195
+ if (aux === null) {
2196
+ this.sessionStorage.setItem(storeKeyFlowStarted, '1');
2197
+ return;
2198
+ }
2199
+ const count = parseInt(this.sessionStorage.getItem(storeKeyFlowStarted));
2200
+ if (count >= maxStartAttempts) {
2201
+ // Too many start attempts
2202
+ this.sessionStorage.removeItem(storeKeyFlowStarted);
2203
+ throw new Error('could not start authentication flow, too many attempts');
2204
+ }
2205
+ this.sessionStorage.setItem(storeKeyFlowStarted, (count + 1).toString());
2206
+ }
2127
2207
  /**
2128
2208
  * Exchanges authorization code for access and refresh tokens
2129
2209
  */
@@ -2147,6 +2227,10 @@ class Auth {
2147
2227
  */
2148
2228
  exchangeRefresh(refreshToken) {
2149
2229
  return __awaiter(this, void 0, void 0, function* () {
2230
+ /**
2231
+ * Finalize
2232
+ */
2233
+ this.completeFinalState();
2150
2234
  return this.oauth2token({
2151
2235
  // eslint-disable-next-line @typescript-eslint/camelcase
2152
2236
  refresh_token: refreshToken || '',
@@ -2190,7 +2274,7 @@ class Auth {
2190
2274
  this.startAuthenticationFlow();
2191
2275
  });
2192
2276
  }), 1000 * timeout);
2193
- this.sessionStorage.setItem(this.refreshTokenKey, oa2tkn.refresh_token);
2277
+ this.sessionStorage.setItem(storeKeyRefreshToken, oa2tkn.refresh_token);
2194
2278
  const u = new cortezaJs.system.User({
2195
2279
  userID: oa2tkn.sub,
2196
2280
  name: oa2tkn.name,
@@ -2498,6 +2582,10 @@ class Settings {
2498
2582
  throw new Error('api.notDefined');
2499
2583
  }
2500
2584
 
2585
+ return this.fetch();
2586
+ }
2587
+
2588
+ async fetch() {
2501
2589
  return this.api.settingsCurrent().then(settings => {
2502
2590
  this.current = settings || {};
2503
2591
  return settings;
@@ -2543,7 +2631,7 @@ class Settings {
2543
2631
  var settings = {
2544
2632
  install(Vue) {
2545
2633
  // Should be used to initialize settings
2546
- Vue.prototype.$Settings = new Settings(); // Should be used to access settings
2634
+ Vue.prototype.$Settings = Vue.observable(new Settings()); // Should be used to access settings
2547
2635
 
2548
2636
  Vue.prototype.$s = Vue.prototype.$Settings.get.bind(Vue.prototype.$Settings);
2549
2637
  }
@@ -71035,14 +71123,109 @@ var __vue_staticRenderFns__$8 = [];
71035
71123
  undefined
71036
71124
  );
71037
71125
 
71126
+ function getDate(value) {
71127
+ if (!value) {
71128
+ return undefined;
71129
+ }
71130
+ if (value === 'Invalid date') {
71131
+ // Make sure this weird value does not cause us problems
71132
+ return undefined;
71133
+ }
71134
+ const dt = value.split(' ');
71135
+ if (dt.length > 1) {
71136
+ return dt[0]; // we only want the date part
71137
+ }
71138
+ else if (dt.length === 1) {
71139
+ // If date is in the value
71140
+ if (dt[0].indexOf('-') > -1) {
71141
+ return dt[0];
71142
+ }
71143
+ }
71144
+ }
71145
+ function getTime(value) {
71146
+ if (!value) {
71147
+ return undefined;
71148
+ }
71149
+ const dt = value.split(' ');
71150
+ if (dt.length > 1) {
71151
+ return dt[1]; // we only want the time part
71152
+ }
71153
+ else if (dt.length === 1) {
71154
+ // If we time is in the value
71155
+ if (dt[0].indexOf(':') > -1) {
71156
+ return dt[0];
71157
+ }
71158
+ }
71159
+ }
71160
+ function setDate(date, value, noDate = false, noTime = false) {
71161
+ if (noDate || !date || !date.length) {
71162
+ return undefined;
71163
+ }
71164
+ const time = getTime(value);
71165
+ if (noTime) {
71166
+ return moment(date, 'YYYY-MM-DD').format('YYYY-MM-DD');
71167
+ }
71168
+ return moment(date + ' ' + time, 'YYYY-MM-DD HH:mm').format('YYYY-MM-DD HH:mm');
71169
+ }
71170
+ function setTime(time, value, noDate = false, noTime = false) {
71171
+ if (noTime || !time || !time.length) {
71172
+ return undefined;
71173
+ }
71174
+ let date = getDate(value);
71175
+ if (noDate) {
71176
+ return moment(time, 'HH:mm').format('HH:mm');
71177
+ }
71178
+ if (!date) {
71179
+ // If no date is yet set default to today
71180
+ date = moment().format('YYYY-MM-DD');
71181
+ }
71182
+ return moment(date + ' ' + time, 'YYYY-MM-DD HH:mm').format('YYYY-MM-DD HH:mm');
71183
+ }
71184
+
71038
71185
  var script$a = {
71039
71186
  props: {
71040
- label: {
71187
+ value: {
71041
71188
  type: String,
71042
- default: undefined
71189
+ required: true
71190
+ },
71191
+ noTime: {
71192
+ type: Boolean,
71193
+ default: false
71194
+ },
71195
+ noDate: {
71196
+ type: Boolean,
71197
+ default: false
71198
+ }
71199
+ },
71200
+ computed: {
71201
+ date: {
71202
+ get() {
71203
+ return getDate(this.value);
71204
+ },
71205
+
71206
+ set(date) {
71207
+ date = setDate(date, this.value, this.noDate, this.noTime);
71208
+
71209
+ if (date) {
71210
+ this.$emit('input', date);
71211
+ }
71212
+ }
71213
+
71043
71214
  },
71044
- // eslint-disable-next-line
71045
- value: {}
71215
+ time: {
71216
+ get() {
71217
+ return getTime(this.value);
71218
+ },
71219
+
71220
+ set(time) {
71221
+ time = setTime(time, this.value, this.noDate, this.noTime);
71222
+
71223
+ if (time) {
71224
+ this.$emit('input', time);
71225
+ }
71226
+ }
71227
+
71228
+ }
71046
71229
  }
71047
71230
  };
71048
71231
 
@@ -71050,6 +71233,8 @@ var script$a = {
71050
71233
  const __vue_script__$a = script$a;
71051
71234
 
71052
71235
  /* template */
71236
+ 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)};
71237
+ var __vue_staticRenderFns__$9 = [];
71053
71238
 
71054
71239
  /* style */
71055
71240
  const __vue_inject_styles__$b = undefined;
@@ -71058,7 +71243,7 @@ const __vue_script__$a = script$a;
71058
71243
  /* module identifier */
71059
71244
  const __vue_module_identifier__$b = undefined;
71060
71245
  /* functional template */
71061
- const __vue_is_functional_template__$b = undefined;
71246
+ const __vue_is_functional_template__$b = false;
71062
71247
  /* style inject */
71063
71248
 
71064
71249
  /* style inject SSR */
@@ -71068,7 +71253,7 @@ const __vue_script__$a = script$a;
71068
71253
 
71069
71254
 
71070
71255
  const __vue_component__$b = /*#__PURE__*/normalizeComponent(
71071
- {},
71256
+ { render: __vue_render__$9, staticRenderFns: __vue_staticRenderFns__$9 },
71072
71257
  __vue_inject_styles__$b,
71073
71258
  __vue_script__$a,
71074
71259
  __vue_scope_id__$b,
@@ -71080,123 +71265,110 @@ const __vue_script__$a = script$a;
71080
71265
  undefined
71081
71266
  );
71082
71267
 
71268
+ //
71083
71269
  var script$b = {
71084
- extends: __vue_component__$b,
71270
+ components: {
71271
+ Draggable
71272
+ },
71085
71273
  props: {
71086
- noTime: {
71087
- type: Boolean,
71088
- default: false
71274
+ value: {
71275
+ type: String,
71276
+ required: true
71089
71277
  },
71090
- noDate: {
71278
+ fields: {
71279
+ type: Array,
71280
+ required: true
71281
+ },
71282
+ labels: {
71283
+ type: Object,
71284
+ required: true
71285
+ },
71286
+ allowTextInput: {
71091
71287
  type: Boolean,
71092
71288
  default: false
71093
71289
  }
71094
71290
  },
71291
+
71292
+ data() {
71293
+ return {
71294
+ items: [],
71295
+ textInput: false
71296
+ };
71297
+ },
71298
+
71095
71299
  computed: {
71096
- date: {
71300
+ presortValue: {
71097
71301
  get() {
71098
- return this.getDate();
71302
+ return this.value;
71099
71303
  },
71100
71304
 
71101
- set(d) {
71102
- this.setDate(d);
71305
+ set(value) {
71306
+ this.$emit('input', value);
71103
71307
  }
71104
71308
 
71105
71309
  },
71106
- time: {
71107
- get() {
71108
- return this.getTime();
71109
- },
71110
71310
 
71111
- set(t) {
71112
- this.setTime(t);
71113
- }
71311
+ sortDirections() {
71312
+ return [{
71313
+ value: false,
71314
+ text: this.labels.ascending
71315
+ }, {
71316
+ value: true,
71317
+ text: this.labels.descending
71318
+ }];
71319
+ },
71114
71320
 
71321
+ sortedFields() {
71322
+ return [...this.fields.sort((a, b) => a.label.localeCompare(b.label))];
71115
71323
  }
71116
- },
71117
- methods: {
71118
- getTime() {
71119
- if (!this.value) {
71120
- return undefined;
71121
- }
71122
-
71123
- let dt = this.value.split(' ');
71124
71324
 
71125
- if (dt.length > 1) {
71126
- return dt[1]; // we only want the time part
71127
- } else if (dt.length === 1) {
71128
- // If we time is in the value
71129
- if (dt[0].indexOf(':') > -1) {
71130
- return dt[0];
71131
- }
71132
- }
71133
- },
71325
+ },
71326
+ watch: {
71327
+ value: {
71328
+ immediate: true,
71134
71329
 
71135
- setTime(t) {
71136
- if (this.noTime || !t || !t.length) {
71137
- return;
71138
- }
71330
+ handler(value) {
71331
+ if (value) {
71332
+ const sort = value.includes(',') ? value.split(',') : [value];
71333
+ this.items = sort.map(field => {
71334
+ let descending = false;
71139
71335
 
71140
- let tm = moment();
71141
- let date = this.getDate();
71336
+ if (field.includes(' ')) {
71337
+ field = field.split(' ')[0];
71338
+ descending = true;
71339
+ }
71142
71340
 
71143
- if (this.noDate) {
71144
- tm = moment(t, 'HH:mm');
71145
- tm = tm.format('HH:mm');
71146
- } else {
71147
- if (!date) {
71148
- // If no date is yet set default to today
71149
- date = moment().format('YYYY-MM-DD');
71341
+ return {
71342
+ field,
71343
+ descending: !!descending
71344
+ };
71345
+ });
71346
+ } else {
71347
+ this.items = [{
71348
+ field: undefined,
71349
+ descending: false
71350
+ }];
71150
71351
  }
71151
-
71152
- tm = moment(date + ' ' + t, 'YYYY-MM-DD HH:mm');
71153
- tm = tm.format('YYYY-MM-DD HH:mm');
71154
71352
  }
71155
71353
 
71156
- this.$emit('input', tm);
71157
71354
  },
71355
+ items: {
71356
+ deep: true,
71158
71357
 
71159
- getDate() {
71160
- if (!this.value) {
71161
- return undefined;
71162
- }
71163
-
71164
- if (this.value === 'Invalid date') {
71165
- // Make sure this weird value does not cause us problems
71166
- return undefined;
71167
- }
71168
-
71169
- let dt = this.value.split(' ');
71170
-
71171
- if (dt.length > 1) {
71172
- return dt[0]; // we only want the date part
71173
- } else if (dt.length === 1) {
71174
- // If date is in the value
71175
- if (dt[0].indexOf('-') > -1) {
71176
- return dt[0];
71358
+ handler(items = [], oldItems = undefined) {
71359
+ if (oldItems) {
71360
+ this.$emit('input', items.filter(({
71361
+ field
71362
+ }) => field).map(({
71363
+ field,
71364
+ descending
71365
+ }) => {
71366
+ return descending ? `${field} DESC` : field;
71367
+ }).join(','));
71177
71368
  }
71178
71369
  }
71179
- },
71180
71370
 
71181
- setDate(d) {
71182
- if (this.noDate || !d || !d.length) {
71183
- return;
71184
- }
71185
-
71186
- let dm = moment();
71187
- const time = this.getTime();
71188
-
71189
- if (this.noTime) {
71190
- dm = moment(d, 'YYYY-MM-DD');
71191
- dm = dm.format('YYYY-MM-DD');
71192
- } else {
71193
- dm = moment(d + ' ' + time, 'YYYY-MM-DD HH:mm');
71194
- dm = dm.format('YYYY-MM-DD HH:mm');
71195
- }
71196
-
71197
- this.$emit('input', dm);
71198
71371
  }
71199
-
71200
71372
  }
71201
71373
  };
71202
71374
 
@@ -71204,8 +71376,8 @@ var script$b = {
71204
71376
  const __vue_script__$b = script$b;
71205
71377
 
71206
71378
  /* template */
71207
- var __vue_render__$9 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-form-group',{attrs:{"label":_vm.label}},[(!_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)};
71208
- var __vue_staticRenderFns__$9 = [];
71379
+ 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)};
71380
+ var __vue_staticRenderFns__$a = [];
71209
71381
 
71210
71382
  /* style */
71211
71383
  const __vue_inject_styles__$c = undefined;
@@ -71224,7 +71396,7 @@ var __vue_staticRenderFns__$9 = [];
71224
71396
 
71225
71397
 
71226
71398
  const __vue_component__$c = /*#__PURE__*/normalizeComponent(
71227
- { render: __vue_render__$9, staticRenderFns: __vue_staticRenderFns__$9 },
71399
+ { render: __vue_render__$a, staticRenderFns: __vue_staticRenderFns__$a },
71228
71400
  __vue_inject_styles__$c,
71229
71401
  __vue_script__$b,
71230
71402
  __vue_scope_id__$c,
@@ -71237,45 +71409,24 @@ var __vue_staticRenderFns__$9 = [];
71237
71409
  );
71238
71410
 
71239
71411
  var script$c = {
71240
- extends: __vue_component__$b,
71241
71412
  props: {
71242
- simple: Boolean,
71243
- options: {
71244
- type: Array,
71245
- default: () => []
71413
+ value: {
71414
+ type: String,
71415
+ required: true
71246
71416
  },
71247
- optionsAppend: {
71248
- type: Array,
71249
- default: () => []
71417
+ simple: {
71418
+ type: Boolean,
71419
+ default: false
71250
71420
  }
71251
71421
  },
71252
-
71253
- data() {
71254
- return {
71255
- intervalOptions: [// @todo somehow add to i18
71256
- {
71257
- text: 'Every Minute',
71258
- value: '0 * * * * * *'
71259
- }]
71260
- };
71261
- },
71262
-
71263
71422
  computed: {
71264
- cOptions() {
71265
- if (this.options.length) {
71266
- return this.options;
71267
- }
71268
-
71269
- return this.intervalOptions.concat(this.optionsAppend);
71270
- },
71271
-
71272
- cValue: {
71423
+ cronValue: {
71273
71424
  get() {
71274
71425
  return this.value;
71275
71426
  },
71276
71427
 
71277
- set(v) {
71278
- this.$emit('input', v);
71428
+ set(value) {
71429
+ this.$emit('input', value);
71279
71430
  }
71280
71431
 
71281
71432
  }
@@ -71286,8 +71437,8 @@ var script$c = {
71286
71437
  const __vue_script__$c = script$c;
71287
71438
 
71288
71439
  /* template */
71289
- var __vue_render__$a = 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',{staticClass:"d-inline",class:{ 'w-50': !_vm.simple },attrs:{"options":_vm.cOptions},model:{value:(_vm.cValue),callback:function ($$v) {_vm.cValue=$$v;},expression:"cValue"}}),_vm._v(" "),(!_vm.simple)?_c('b-form-input',{staticClass:"d-inline w-50",attrs:{"type":"text"},model:{value:(_vm.cValue),callback:function ($$v) {_vm.cValue=$$v;},expression:"cValue"}}):_vm._e()],1)};
71290
- var __vue_staticRenderFns__$a = [];
71440
+ var __vue_render__$b = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("div")};
71441
+ var __vue_staticRenderFns__$b = [];
71291
71442
 
71292
71443
  /* style */
71293
71444
  const __vue_inject_styles__$d = undefined;
@@ -71306,7 +71457,7 @@ var __vue_staticRenderFns__$a = [];
71306
71457
 
71307
71458
 
71308
71459
  const __vue_component__$d = /*#__PURE__*/normalizeComponent(
71309
- { render: __vue_render__$a, staticRenderFns: __vue_staticRenderFns__$a },
71460
+ { render: __vue_render__$b, staticRenderFns: __vue_staticRenderFns__$b },
71310
71461
  __vue_inject_styles__$d,
71311
71462
  __vue_script__$c,
71312
71463
  __vue_scope_id__$d,
@@ -71431,8 +71582,8 @@ var script$e = {
71431
71582
  const __vue_script__$e = script$e;
71432
71583
 
71433
71584
  /* template */
71434
- var __vue_render__$b = 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)};
71435
- var __vue_staticRenderFns__$b = [];
71585
+ 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)};
71586
+ var __vue_staticRenderFns__$c = [];
71436
71587
 
71437
71588
  /* style */
71438
71589
  const __vue_inject_styles__$f = function (inject) {
@@ -71454,7 +71605,7 @@ var __vue_staticRenderFns__$b = [];
71454
71605
 
71455
71606
 
71456
71607
  const __vue_component__$f = /*#__PURE__*/normalizeComponent(
71457
- { render: __vue_render__$b, staticRenderFns: __vue_staticRenderFns__$b },
71608
+ { render: __vue_render__$c, staticRenderFns: __vue_staticRenderFns__$c },
71458
71609
  __vue_inject_styles__$f,
71459
71610
  __vue_script__$e,
71460
71611
  __vue_scope_id__$f,
@@ -71480,8 +71631,8 @@ var script$f = {
71480
71631
  const __vue_script__$f = script$f;
71481
71632
 
71482
71633
  /* template */
71483
- var __vue_render__$c = 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)])};
71484
- var __vue_staticRenderFns__$c = [];
71634
+ 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)])};
71635
+ var __vue_staticRenderFns__$d = [];
71485
71636
 
71486
71637
  /* style */
71487
71638
  const __vue_inject_styles__$g = undefined;
@@ -71500,7 +71651,7 @@ var __vue_staticRenderFns__$c = [];
71500
71651
 
71501
71652
 
71502
71653
  const __vue_component__$g = /*#__PURE__*/normalizeComponent(
71503
- { render: __vue_render__$c, staticRenderFns: __vue_staticRenderFns__$c },
71654
+ { render: __vue_render__$d, staticRenderFns: __vue_staticRenderFns__$d },
71504
71655
  __vue_inject_styles__$g,
71505
71656
  __vue_script__$f,
71506
71657
  __vue_scope_id__$g,
@@ -71532,7 +71683,8 @@ var script$g = {
71532
71683
  return {
71533
71684
  visible: false,
71534
71685
  attrs: {
71535
- href: null
71686
+ href: null,
71687
+ target: '_self'
71536
71688
  }
71537
71689
  };
71538
71690
  },
@@ -71587,8 +71739,8 @@ var script$g = {
71587
71739
  const __vue_script__$g = script$g;
71588
71740
 
71589
71741
  /* template */
71590
- var __vue_render__$d = 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)],1)],1):_vm._e()],1)};
71591
- var __vue_staticRenderFns__$d = [];
71742
+ 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)};
71743
+ var __vue_staticRenderFns__$e = [];
71592
71744
 
71593
71745
  /* style */
71594
71746
  const __vue_inject_styles__$h = undefined;
@@ -71607,7 +71759,7 @@ var __vue_staticRenderFns__$d = [];
71607
71759
 
71608
71760
 
71609
71761
  const __vue_component__$h = /*#__PURE__*/normalizeComponent(
71610
- { render: __vue_render__$d, staticRenderFns: __vue_staticRenderFns__$d },
71762
+ { render: __vue_render__$e, staticRenderFns: __vue_staticRenderFns__$e },
71611
71763
  __vue_inject_styles__$h,
71612
71764
  __vue_script__$g,
71613
71765
  __vue_scope_id__$h,
@@ -78173,8 +78325,9 @@ class Link extends tiptapExtensions.Link {
78173
78325
  get schema() {
78174
78326
  const base = super.schema;
78175
78327
  return { ...base,
78176
- toDOM: node => ['a', { ...node.attrs,
78328
+ toDOM: node => ['a', {
78177
78329
  target: '_blank',
78330
+ ...node.attrs,
78178
78331
  rel: 'noopener noreferrer nofollow'
78179
78332
  }, 0]
78180
78333
  };
@@ -78603,8 +78756,8 @@ var script$i = {
78603
78756
  const __vue_script__$i = script$i;
78604
78757
 
78605
78758
  /* template */
78606
- var __vue_render__$e = 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)])};
78607
- var __vue_staticRenderFns__$e = [];
78759
+ 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)])};
78760
+ var __vue_staticRenderFns__$f = [];
78608
78761
 
78609
78762
  /* style */
78610
78763
  const __vue_inject_styles__$j = undefined;
@@ -78623,7 +78776,7 @@ var __vue_staticRenderFns__$e = [];
78623
78776
 
78624
78777
 
78625
78778
  const __vue_component__$j = /*#__PURE__*/normalizeComponent(
78626
- { render: __vue_render__$e, staticRenderFns: __vue_staticRenderFns__$e },
78779
+ { render: __vue_render__$f, staticRenderFns: __vue_staticRenderFns__$f },
78627
78780
  __vue_inject_styles__$j,
78628
78781
  __vue_script__$i,
78629
78782
  __vue_scope_id__$j,
@@ -78713,8 +78866,8 @@ var script$j = {
78713
78866
  const __vue_script__$j = script$j;
78714
78867
 
78715
78868
  /* template */
78716
- var __vue_render__$f = 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)};
78717
- var __vue_staticRenderFns__$f = [];
78869
+ 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)};
78870
+ var __vue_staticRenderFns__$g = [];
78718
78871
 
78719
78872
  /* style */
78720
78873
  const __vue_inject_styles__$k = undefined;
@@ -78733,7 +78886,7 @@ var __vue_staticRenderFns__$f = [];
78733
78886
 
78734
78887
 
78735
78888
  const __vue_component__$k = /*#__PURE__*/normalizeComponent(
78736
- { render: __vue_render__$f, staticRenderFns: __vue_staticRenderFns__$f },
78889
+ { render: __vue_render__$g, staticRenderFns: __vue_staticRenderFns__$g },
78737
78890
  __vue_inject_styles__$k,
78738
78891
  __vue_script__$j,
78739
78892
  __vue_scope_id__$k,
@@ -78842,8 +78995,8 @@ var script$k = {
78842
78995
  const __vue_script__$k = script$k;
78843
78996
 
78844
78997
  /* template */
78845
- var __vue_render__$g = 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)};
78846
- var __vue_staticRenderFns__$g = [];
78998
+ 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)};
78999
+ var __vue_staticRenderFns__$h = [];
78847
79000
 
78848
79001
  /* style */
78849
79002
  const __vue_inject_styles__$l = undefined;
@@ -78862,7 +79015,7 @@ var __vue_staticRenderFns__$g = [];
78862
79015
 
78863
79016
 
78864
79017
  const __vue_component__$l = /*#__PURE__*/normalizeComponent(
78865
- { render: __vue_render__$g, staticRenderFns: __vue_staticRenderFns__$g },
79018
+ { render: __vue_render__$h, staticRenderFns: __vue_staticRenderFns__$h },
78866
79019
  __vue_inject_styles__$l,
78867
79020
  __vue_script__$k,
78868
79021
  __vue_scope_id__$l,
@@ -78968,13 +79121,13 @@ var script$l = {
78968
79121
  const __vue_script__$l = script$l;
78969
79122
 
78970
79123
  /* template */
78971
- var __vue_render__$h = 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){
79124
+ 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){
78972
79125
  var commands = ref.commands;
78973
79126
  var isActive = ref.isActive;
78974
79127
  var getMarkAttrs = ref.getMarkAttrs;
78975
79128
  var getNodeAttrs = ref.getNodeAttrs;
78976
79129
  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)};
78977
- var __vue_staticRenderFns__$h = [];
79130
+ var __vue_staticRenderFns__$i = [];
78978
79131
 
78979
79132
  /* style */
78980
79133
  const __vue_inject_styles__$m = undefined;
@@ -78993,7 +79146,7 @@ var __vue_staticRenderFns__$h = [];
78993
79146
 
78994
79147
 
78995
79148
  const __vue_component__$m = /*#__PURE__*/normalizeComponent(
78996
- { render: __vue_render__$h, staticRenderFns: __vue_staticRenderFns__$h },
79149
+ { render: __vue_render__$i, staticRenderFns: __vue_staticRenderFns__$i },
78997
79150
  __vue_inject_styles__$m,
78998
79151
  __vue_script__$l,
78999
79152
  __vue_scope_id__$m,
@@ -79080,8 +79233,8 @@ var script$m = {
79080
79233
  const __vue_script__$m = script$m;
79081
79234
 
79082
79235
  /* template */
79083
- var __vue_render__$i = 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)};
79084
- var __vue_staticRenderFns__$i = [];
79236
+ 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)};
79237
+ var __vue_staticRenderFns__$j = [];
79085
79238
 
79086
79239
  /* style */
79087
79240
  const __vue_inject_styles__$n = function (inject) {
@@ -79102,7 +79255,7 @@ var __vue_staticRenderFns__$i = [];
79102
79255
 
79103
79256
 
79104
79257
  const __vue_component__$n = /*#__PURE__*/normalizeComponent(
79105
- { render: __vue_render__$i, staticRenderFns: __vue_staticRenderFns__$i },
79258
+ { render: __vue_render__$j, staticRenderFns: __vue_staticRenderFns__$j },
79106
79259
  __vue_inject_styles__$n,
79107
79260
  __vue_script__$m,
79108
79261
  __vue_scope_id__$n,
@@ -79168,8 +79321,8 @@ var script$n = {
79168
79321
  const __vue_script__$n = script$n;
79169
79322
 
79170
79323
  /* template */
79171
- var __vue_render__$j = 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"}})};
79172
- var __vue_staticRenderFns__$j = [];
79324
+ 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"}})};
79325
+ var __vue_staticRenderFns__$k = [];
79173
79326
 
79174
79327
  /* style */
79175
79328
  const __vue_inject_styles__$o = undefined;
@@ -79188,7 +79341,7 @@ var __vue_staticRenderFns__$j = [];
79188
79341
 
79189
79342
 
79190
79343
  const __vue_component__$o = /*#__PURE__*/normalizeComponent(
79191
- { render: __vue_render__$j, staticRenderFns: __vue_staticRenderFns__$j },
79344
+ { render: __vue_render__$k, staticRenderFns: __vue_staticRenderFns__$k },
79192
79345
  __vue_inject_styles__$o,
79193
79346
  __vue_script__$n,
79194
79347
  __vue_scope_id__$o,
@@ -79271,8 +79424,8 @@ var script$o = {
79271
79424
  const __vue_script__$o = script$o;
79272
79425
 
79273
79426
  /* template */
79274
- var __vue_render__$k = 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)};
79275
- var __vue_staticRenderFns__$k = [];
79427
+ 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)};
79428
+ var __vue_staticRenderFns__$l = [];
79276
79429
 
79277
79430
  /* style */
79278
79431
  const __vue_inject_styles__$p = undefined;
@@ -79291,7 +79444,7 @@ var __vue_staticRenderFns__$k = [];
79291
79444
 
79292
79445
 
79293
79446
  const __vue_component__$p = /*#__PURE__*/normalizeComponent(
79294
- { render: __vue_render__$k, staticRenderFns: __vue_staticRenderFns__$k },
79447
+ { render: __vue_render__$l, staticRenderFns: __vue_staticRenderFns__$l },
79295
79448
  __vue_inject_styles__$p,
79296
79449
  __vue_script__$o,
79297
79450
  __vue_scope_id__$p,
@@ -79335,8 +79488,8 @@ var script$p = {
79335
79488
  const __vue_script__$p = script$p;
79336
79489
 
79337
79490
  /* template */
79338
- var __vue_render__$l = 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)};
79339
- var __vue_staticRenderFns__$l = [];
79491
+ 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)};
79492
+ var __vue_staticRenderFns__$m = [];
79340
79493
 
79341
79494
  /* style */
79342
79495
  const __vue_inject_styles__$q = undefined;
@@ -79355,7 +79508,7 @@ var __vue_staticRenderFns__$l = [];
79355
79508
 
79356
79509
 
79357
79510
  const __vue_component__$q = /*#__PURE__*/normalizeComponent(
79358
- { render: __vue_render__$l, staticRenderFns: __vue_staticRenderFns__$l },
79511
+ { render: __vue_render__$m, staticRenderFns: __vue_staticRenderFns__$m },
79359
79512
  __vue_inject_styles__$q,
79360
79513
  __vue_script__$p,
79361
79514
  __vue_scope_id__$q,
@@ -79609,8 +79762,8 @@ var script$q = {
79609
79762
  const __vue_script__$q = script$q;
79610
79763
 
79611
79764
  /* template */
79612
- var __vue_render__$m = 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)};
79613
- var __vue_staticRenderFns__$m = [];
79765
+ 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)};
79766
+ var __vue_staticRenderFns__$n = [];
79614
79767
 
79615
79768
  /* style */
79616
79769
  const __vue_inject_styles__$r = function (inject) {
@@ -79631,7 +79784,7 @@ var __vue_staticRenderFns__$m = [];
79631
79784
 
79632
79785
 
79633
79786
  const __vue_component__$r = /*#__PURE__*/normalizeComponent(
79634
- { render: __vue_render__$m, staticRenderFns: __vue_staticRenderFns__$m },
79787
+ { render: __vue_render__$n, staticRenderFns: __vue_staticRenderFns__$n },
79635
79788
  __vue_inject_styles__$r,
79636
79789
  __vue_script__$q,
79637
79790
  __vue_scope_id__$r,
@@ -79748,8 +79901,8 @@ var script$r = {
79748
79901
  const __vue_script__$r = script$r;
79749
79902
 
79750
79903
  /* template */
79751
- var __vue_render__$n = 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)};
79752
- var __vue_staticRenderFns__$n = [];
79904
+ 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)};
79905
+ var __vue_staticRenderFns__$o = [];
79753
79906
 
79754
79907
  /* style */
79755
79908
  const __vue_inject_styles__$s = undefined;
@@ -79768,7 +79921,7 @@ var __vue_staticRenderFns__$n = [];
79768
79921
 
79769
79922
 
79770
79923
  const __vue_component__$s = /*#__PURE__*/normalizeComponent(
79771
- { render: __vue_render__$n, staticRenderFns: __vue_staticRenderFns__$n },
79924
+ { render: __vue_render__$o, staticRenderFns: __vue_staticRenderFns__$o },
79772
79925
  __vue_inject_styles__$s,
79773
79926
  __vue_script__$r,
79774
79927
  __vue_scope_id__$s,
@@ -79871,8 +80024,8 @@ var script$t = {
79871
80024
  const __vue_script__$t = script$t;
79872
80025
 
79873
80026
  /* template */
79874
- var __vue_render__$o = 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)])};
79875
- var __vue_staticRenderFns__$o = [];
80027
+ 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)])};
80028
+ var __vue_staticRenderFns__$p = [];
79876
80029
 
79877
80030
  /* style */
79878
80031
  const __vue_inject_styles__$u = undefined;
@@ -79891,7 +80044,7 @@ var __vue_staticRenderFns__$o = [];
79891
80044
 
79892
80045
 
79893
80046
  const __vue_component__$u = /*#__PURE__*/normalizeComponent(
79894
- { render: __vue_render__$o, staticRenderFns: __vue_staticRenderFns__$o },
80047
+ { render: __vue_render__$p, staticRenderFns: __vue_staticRenderFns__$p },
79895
80048
  __vue_inject_styles__$u,
79896
80049
  __vue_script__$t,
79897
80050
  __vue_scope_id__$u,
@@ -79912,8 +80065,8 @@ var script$u = {
79912
80065
  const __vue_script__$u = script$u;
79913
80066
 
79914
80067
  /* template */
79915
- 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('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)])};
79916
- var __vue_staticRenderFns__$p = [];
80068
+ 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)])};
80069
+ var __vue_staticRenderFns__$q = [];
79917
80070
 
79918
80071
  /* style */
79919
80072
  const __vue_inject_styles__$v = undefined;
@@ -79932,7 +80085,7 @@ var __vue_staticRenderFns__$p = [];
79932
80085
 
79933
80086
 
79934
80087
  const __vue_component__$v = /*#__PURE__*/normalizeComponent(
79935
- { render: __vue_render__$p, staticRenderFns: __vue_staticRenderFns__$p },
80088
+ { render: __vue_render__$q, staticRenderFns: __vue_staticRenderFns__$q },
79936
80089
  __vue_inject_styles__$v,
79937
80090
  __vue_script__$u,
79938
80091
  __vue_scope_id__$v,
@@ -79981,8 +80134,8 @@ var script$v = {
79981
80134
  const __vue_script__$v = script$v;
79982
80135
 
79983
80136
  /* template */
79984
- 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('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)};
79985
- var __vue_staticRenderFns__$q = [];
80137
+ 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)};
80138
+ var __vue_staticRenderFns__$r = [];
79986
80139
 
79987
80140
  /* style */
79988
80141
  const __vue_inject_styles__$w = undefined;
@@ -80001,7 +80154,7 @@ var __vue_staticRenderFns__$q = [];
80001
80154
 
80002
80155
 
80003
80156
  const __vue_component__$w = /*#__PURE__*/normalizeComponent(
80004
- { render: __vue_render__$q, staticRenderFns: __vue_staticRenderFns__$q },
80157
+ { render: __vue_render__$r, staticRenderFns: __vue_staticRenderFns__$r },
80005
80158
  __vue_inject_styles__$w,
80006
80159
  __vue_script__$v,
80007
80160
  __vue_scope_id__$w,
@@ -80031,8 +80184,8 @@ var script$w = {
80031
80184
  const __vue_script__$w = script$w;
80032
80185
 
80033
80186
  /* template */
80034
- var __vue_render__$r = 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)}})])};
80035
- var __vue_staticRenderFns__$r = [];
80187
+ 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)}})])};
80188
+ var __vue_staticRenderFns__$s = [];
80036
80189
 
80037
80190
  /* style */
80038
80191
  const __vue_inject_styles__$x = undefined;
@@ -80051,7 +80204,7 @@ var __vue_staticRenderFns__$r = [];
80051
80204
 
80052
80205
 
80053
80206
  const __vue_component__$x = /*#__PURE__*/normalizeComponent(
80054
- { render: __vue_render__$r, staticRenderFns: __vue_staticRenderFns__$r },
80207
+ { render: __vue_render__$s, staticRenderFns: __vue_staticRenderFns__$s },
80055
80208
  __vue_inject_styles__$x,
80056
80209
  __vue_script__$w,
80057
80210
  __vue_scope_id__$x,
@@ -80141,8 +80294,8 @@ var script$x = {
80141
80294
  const __vue_script__$x = script$x;
80142
80295
 
80143
80296
  /* template */
80144
- var __vue_render__$s = 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)};
80145
- var __vue_staticRenderFns__$s = [];
80297
+ 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)};
80298
+ var __vue_staticRenderFns__$t = [];
80146
80299
 
80147
80300
  /* style */
80148
80301
  const __vue_inject_styles__$y = undefined;
@@ -80161,7 +80314,7 @@ var __vue_staticRenderFns__$s = [];
80161
80314
 
80162
80315
 
80163
80316
  const __vue_component__$y = /*#__PURE__*/normalizeComponent(
80164
- { render: __vue_render__$s, staticRenderFns: __vue_staticRenderFns__$s },
80317
+ { render: __vue_render__$t, staticRenderFns: __vue_staticRenderFns__$t },
80165
80318
  __vue_inject_styles__$y,
80166
80319
  __vue_script__$x,
80167
80320
  __vue_scope_id__$y,
@@ -80240,7 +80393,7 @@ const definitions = {
80240
80393
  }
80241
80394
  else {
80242
80395
  // Resolve recordID
80243
- if (pType(v, 'record') === 'String') {
80396
+ if (pType(v, 'record') === 'ID') {
80244
80397
  recordID = record;
80245
80398
  }
80246
80399
  // Resolve namespaceID
@@ -80290,9 +80443,12 @@ const definitions = {
80290
80443
  pageID = pp[0].pageID;
80291
80444
  // @ts-ignore
80292
80445
  if (this.$root.$options.name === 'compose') {
80293
- let name = 'page.record.edit';
80294
- if (!edit) {
80295
- name = 'page.record';
80446
+ if (!edit && !recordID) {
80447
+ throw new Error('invalid record page prompt configuration');
80448
+ }
80449
+ let name = 'page.record';
80450
+ if (edit) {
80451
+ name += recordID ? '.edit' : '.create';
80296
80452
  }
80297
80453
  // If name and params match, make sure to refresh page instead of push
80298
80454
  // @ts-ignore
@@ -80442,12 +80598,12 @@ var script$y = {
80442
80598
  const __vue_script__$y = script$y;
80443
80599
 
80444
80600
  /* template */
80445
- var __vue_render__$t = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',_vm._l((_vm.toasts),function(ref){
80601
+ 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){
80446
80602
  var prompt = ref.prompt;
80447
80603
  var component = ref.component;
80448
80604
  var passive = ref.passive;
80449
80605
  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)};
80450
- var __vue_staticRenderFns__$t = [];
80606
+ var __vue_staticRenderFns__$u = [];
80451
80607
 
80452
80608
  /* style */
80453
80609
  const __vue_inject_styles__$z = function (inject) {
@@ -80468,7 +80624,7 @@ var __vue_staticRenderFns__$t = [];
80468
80624
 
80469
80625
 
80470
80626
  const __vue_component__$z = /*#__PURE__*/normalizeComponent(
80471
- { render: __vue_render__$t, staticRenderFns: __vue_staticRenderFns__$t },
80627
+ { render: __vue_render__$u, staticRenderFns: __vue_staticRenderFns__$u },
80472
80628
  __vue_inject_styles__$z,
80473
80629
  __vue_script__$y,
80474
80630
  __vue_scope_id__$z,
@@ -80548,13 +80704,13 @@ var script$z = {
80548
80704
  const __vue_script__$z = script$z;
80549
80705
 
80550
80706
  /* template */
80551
- var __vue_render__$u = 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){
80707
+ 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){
80552
80708
  var key = ref.key;
80553
80709
  var title = ref.title;
80554
80710
  var age = ref.age;
80555
80711
  var prompt = ref.prompt;
80556
80712
  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)};
80557
- var __vue_staticRenderFns__$u = [];
80713
+ var __vue_staticRenderFns__$v = [];
80558
80714
 
80559
80715
  /* style */
80560
80716
  const __vue_inject_styles__$A = undefined;
@@ -80573,7 +80729,7 @@ var __vue_staticRenderFns__$u = [];
80573
80729
 
80574
80730
 
80575
80731
  const __vue_component__$A = /*#__PURE__*/normalizeComponent(
80576
- { render: __vue_render__$u, staticRenderFns: __vue_staticRenderFns__$u },
80732
+ { render: __vue_render__$v, staticRenderFns: __vue_staticRenderFns__$v },
80577
80733
  __vue_inject_styles__$A,
80578
80734
  __vue_script__$z,
80579
80735
  __vue_scope_id__$A,
@@ -80607,8 +80763,8 @@ var script$A = {
80607
80763
  const __vue_script__$A = script$A;
80608
80764
 
80609
80765
  /* template */
80610
- var __vue_render__$v = 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)};
80611
- var __vue_staticRenderFns__$v = [];
80766
+ 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)};
80767
+ var __vue_staticRenderFns__$w = [];
80612
80768
 
80613
80769
  /* style */
80614
80770
  const __vue_inject_styles__$B = undefined;
@@ -80627,7 +80783,7 @@ var __vue_staticRenderFns__$v = [];
80627
80783
 
80628
80784
 
80629
80785
  const __vue_component__$B = /*#__PURE__*/normalizeComponent(
80630
- { render: __vue_render__$v, staticRenderFns: __vue_staticRenderFns__$v },
80786
+ { render: __vue_render__$w, staticRenderFns: __vue_staticRenderFns__$w },
80631
80787
  __vue_inject_styles__$B,
80632
80788
  __vue_script__$A,
80633
80789
  __vue_scope_id__$B,
@@ -80639,7 +80795,16 @@ var __vue_staticRenderFns__$v = [];
80639
80795
  undefined
80640
80796
  );
80641
80797
 
80642
- const variants = ['primary', 'secondary', 'success', 'warning', 'danger', 'info', 'light', 'dark'];
80798
+ const variants = [
80799
+ { value: 'primary', text: 'Primary' },
80800
+ { value: 'secondary', text: 'Secondary' },
80801
+ { value: 'success', text: 'Success' },
80802
+ { value: 'warning', text: 'Warning' },
80803
+ { value: 'danger', text: 'Danger' },
80804
+ { value: 'info', text: 'Info' },
80805
+ { value: 'light', text: 'Light' },
80806
+ { value: 'dark', text: 'Dark' },
80807
+ ];
80643
80808
  const prompts = Object.freeze([{
80644
80809
  ref: 'redirect',
80645
80810
  meta: { short: 'Redirect user to an outside URL' },
@@ -80672,7 +80837,7 @@ const prompts = Object.freeze([{
80672
80837
  parameters: [
80673
80838
  { name: 'title', types: ['String'] },
80674
80839
  { name: 'message', types: ['String'], required: true },
80675
- { name: 'variant', types: ['String'], meta: { visual: { options: variants } } },
80840
+ { name: 'variant', types: ['String'], meta: { visual: { input: { type: 'select', properties: { options: variants } } } } },
80676
80841
  { name: 'timeout', types: ['Integer'], meta: { description: 'How long do we show the notification in seconds' } },
80677
80842
  ],
80678
80843
  }, {
@@ -80682,7 +80847,7 @@ const prompts = Object.freeze([{
80682
80847
  { name: 'title', types: ['String'] },
80683
80848
  { name: 'message', types: ['String'], required: true },
80684
80849
  { name: 'buttonLabel', types: ['String'] },
80685
- { name: 'buttonVariant', types: ['String'], meta: { visual: { options: variants } } },
80850
+ { name: 'buttonVariant', types: ['String'], meta: { visual: { input: { type: 'select', properties: { options: variants } } } } },
80686
80851
  { name: 'buttonValue', types: ['Any'] },
80687
80852
  ],
80688
80853
  }, {
@@ -80692,10 +80857,10 @@ const prompts = Object.freeze([{
80692
80857
  { name: 'title', types: ['String'] },
80693
80858
  { name: 'message', types: ['String'], required: true },
80694
80859
  { name: 'confirmButtonLabel', types: ['String'] },
80695
- { name: 'confirmButtonVariant', types: ['String'], meta: { visual: { options: variants } } },
80860
+ { name: 'confirmButtonVariant', types: ['String'], meta: { visual: { input: { type: 'select', properties: { options: variants } } } } },
80696
80861
  { name: 'confirmButtonValue', types: ['Any'] },
80697
80862
  { name: 'rejectButtonLabel', types: ['String'] },
80698
- { name: 'rejectButtonVariant', types: ['String'], meta: { visual: { options: variants } } },
80863
+ { name: 'rejectButtonVariant', types: ['String'], meta: { visual: { input: { type: 'select', properties: { options: variants } } } } },
80699
80864
  { name: 'rejectButtonValue', types: ['Any'] },
80700
80865
  ],
80701
80866
  results: [
@@ -80706,7 +80871,7 @@ const prompts = Object.freeze([{
80706
80871
  meta: { short: 'Prompt user with a single input' },
80707
80872
  parameters: [
80708
80873
  { name: 'title', types: ['String'] },
80709
- { name: 'variant', types: ['String'], meta: { visual: { options: variants } } },
80874
+ { name: 'variant', types: ['String'], meta: { visual: { input: { type: 'select', properties: { options: variants } } } } },
80710
80875
  { name: 'message', types: ['String'], required: true },
80711
80876
  { name: 'label', types: ['String'] },
80712
80877
  {
@@ -80714,7 +80879,15 @@ const prompts = Object.freeze([{
80714
80879
  types: ['String'],
80715
80880
  meta: {
80716
80881
  visual: {
80717
- options: ['text', 'number', 'email', 'password', 'search', 'date', 'time'],
80882
+ options: [
80883
+ { value: 'text', text: 'Text' },
80884
+ { value: 'number', text: 'Number' },
80885
+ { value: 'email', text: 'Email' },
80886
+ { value: 'password', text: 'Password' },
80887
+ { value: 'search', text: 'Search' },
80888
+ { value: 'date', text: 'Date' },
80889
+ { value: 'time', text: 'Time' },
80890
+ ],
80718
80891
  },
80719
80892
  },
80720
80893
  },
@@ -80728,7 +80901,7 @@ const prompts = Object.freeze([{
80728
80901
  meta: { short: 'Prompt user with options' },
80729
80902
  parameters: [
80730
80903
  { name: 'title', types: ['String'] },
80731
- { name: 'variant', types: ['String'], meta: { visual: { options: variants } } },
80904
+ { name: 'variant', types: ['String'], meta: { visual: { input: { type: 'select', properties: { options: variants } } } } },
80732
80905
  { name: 'message', types: ['String'], required: true },
80733
80906
  { name: 'label', types: ['String'] },
80734
80907
  {
@@ -80736,7 +80909,10 @@ const prompts = Object.freeze([{
80736
80909
  types: ['String'],
80737
80910
  meta: {
80738
80911
  visual: {
80739
- options: ['select', 'radio'],
80912
+ options: [
80913
+ { value: 'select', text: 'Select' },
80914
+ { value: 'radio', text: 'Radio' },
80915
+ ],
80740
80916
  },
80741
80917
  },
80742
80918
  },
@@ -80775,8 +80951,8 @@ var script$B = {
80775
80951
  const __vue_script__$B = script$B;
80776
80952
 
80777
80953
  /* template */
80778
- var __vue_render__$w = 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()])};
80779
- var __vue_staticRenderFns__$w = [];
80954
+ 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()])};
80955
+ var __vue_staticRenderFns__$x = [];
80780
80956
 
80781
80957
  /* style */
80782
80958
  const __vue_inject_styles__$C = function (inject) {
@@ -80797,7 +80973,7 @@ var __vue_staticRenderFns__$w = [];
80797
80973
 
80798
80974
 
80799
80975
  const __vue_component__$C = /*#__PURE__*/normalizeComponent(
80800
- { render: __vue_render__$w, staticRenderFns: __vue_staticRenderFns__$w },
80976
+ { render: __vue_render__$x, staticRenderFns: __vue_staticRenderFns__$x },
80801
80977
  __vue_inject_styles__$C,
80802
80978
  __vue_script__$B,
80803
80979
  __vue_scope_id__$C,
@@ -80958,6 +81134,31 @@ var __vue_staticRenderFns__$w = [];
80958
81134
  //
80959
81135
  //
80960
81136
  //
81137
+ //
81138
+ //
81139
+ //
81140
+ //
81141
+ //
81142
+ //
81143
+ //
81144
+ //
81145
+ //
81146
+ //
81147
+ //
81148
+ //
81149
+ //
81150
+ //
81151
+ //
81152
+ //
81153
+ //
81154
+ //
81155
+ //
81156
+ //
81157
+ //
81158
+ //
81159
+ //
81160
+ //
81161
+ //
80961
81162
  var script$C = {
80962
81163
  props: {
80963
81164
  sidebarPinned: {
@@ -80974,6 +81175,10 @@ var script$C = {
80974
81175
  type: String,
80975
81176
  default: '../'
80976
81177
  },
81178
+ settings: {
81179
+ type: Object,
81180
+ required: true
81181
+ },
80977
81182
  labels: {
80978
81183
  type: Object,
80979
81184
  required: true
@@ -80993,6 +81198,35 @@ var script$C = {
80993
81198
  return `https://docs.cortezaproject.org/corteza-docs/${year}.${month}/index.html`;
80994
81199
  },
80995
81200
 
81201
+ helpLinks() {
81202
+ const {
81203
+ helpLinks = []
81204
+ } = this.settings || {};
81205
+ return (helpLinks || []).filter(({
81206
+ handle,
81207
+ url
81208
+ }) => handle && url);
81209
+ },
81210
+
81211
+ profileLinks() {
81212
+ const {
81213
+ profileLinks = []
81214
+ } = this.settings || {};
81215
+ return (profileLinks || []).filter(({
81216
+ handle,
81217
+ url
81218
+ }) => handle && url);
81219
+ },
81220
+
81221
+ onlyVersion() {
81222
+ const {
81223
+ hideForumLink,
81224
+ hideDocumentationLink,
81225
+ hideFeedbackLink
81226
+ } = this.settings || {};
81227
+ return !this.helpLinks.length && hideForumLink && hideDocumentationLink && hideFeedbackLink;
81228
+ },
81229
+
80996
81230
  frontendVersion() {
80997
81231
  /* eslint-disable no-undef */
80998
81232
  return VERSION;
@@ -81005,19 +81239,19 @@ var script$C = {
81005
81239
  const __vue_script__$C = script$C;
81006
81240
 
81007
81241
  /* template */
81008
- var __vue_render__$x = 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:{
81242
+ 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:{
81009
81243
  'expanded': _vm.sidebarPinned,
81010
- }})],_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 ")])],1),_vm._v(" "),_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":"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}])},[_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(" "),_c('b-dropdown-item',{attrs:{"href":_vm.userProfileURL,"target":"_blank"}},[_vm._v("\n "+_vm._s(_vm.labels.userSettingsProfile)+"\n ")]),_vm._v(" "),_c('b-dropdown-item',{attrs:{"href":_vm.changePasswordURL,"target":"_blank"}},[_vm._v("\n "+_vm._s(_vm.labels.userSettingsChangePassword)+"\n ")]),_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 ")])],1)],2)])};
81011
- var __vue_staticRenderFns__$x = [];
81244
+ }})],_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)])};
81245
+ var __vue_staticRenderFns__$y = [];
81012
81246
 
81013
81247
  /* style */
81014
81248
  const __vue_inject_styles__$D = function (inject) {
81015
81249
  if (!inject) return
81016
- inject("data-v-d822059c_0", { source: ".icon-logo[data-v-d822059c]{height:calc(64px / 2);background-repeat:no-repeat;background-position:center}.nav-icon[data-v-d822059c]{width:40px;height:40px}.nav-user-icon[data-v-d822059c]{width:50px;height:50px}.header-navigation[data-v-d822059c]{width:100vw;height:64px;background-color:#f3f3f5!important}.header-navigation h2[data-v-d822059c]{padding-left:calc(.5rem + 2px)}.spacer[data-v-d822059c]{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-d822059c]{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 });
81250
+ 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 });
81017
81251
 
81018
81252
  };
81019
81253
  /* scoped */
81020
- const __vue_scope_id__$D = "data-v-d822059c";
81254
+ const __vue_scope_id__$D = "data-v-39d2e772";
81021
81255
  /* module identifier */
81022
81256
  const __vue_module_identifier__$D = undefined;
81023
81257
  /* functional template */
@@ -81029,7 +81263,7 @@ var __vue_staticRenderFns__$x = [];
81029
81263
 
81030
81264
 
81031
81265
  const __vue_component__$D = /*#__PURE__*/normalizeComponent(
81032
- { render: __vue_render__$x, staticRenderFns: __vue_staticRenderFns__$x },
81266
+ { render: __vue_render__$y, staticRenderFns: __vue_staticRenderFns__$y },
81033
81267
  __vue_inject_styles__$D,
81034
81268
  __vue_script__$C,
81035
81269
  __vue_scope_id__$D,
@@ -81339,8 +81573,8 @@ var script$D = {
81339
81573
  const __vue_script__$D = script$D;
81340
81574
 
81341
81575
  /* template */
81342
- var __vue_render__$y = 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)])};
81343
- var __vue_staticRenderFns__$y = [];
81576
+ 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)])};
81577
+ var __vue_staticRenderFns__$z = [];
81344
81578
 
81345
81579
  /* style */
81346
81580
  const __vue_inject_styles__$E = function (inject) {
@@ -81362,7 +81596,7 @@ var __vue_staticRenderFns__$y = [];
81362
81596
 
81363
81597
 
81364
81598
  const __vue_component__$E = /*#__PURE__*/normalizeComponent(
81365
- { render: __vue_render__$y, staticRenderFns: __vue_staticRenderFns__$y },
81599
+ { render: __vue_render__$z, staticRenderFns: __vue_staticRenderFns__$z },
81366
81600
  __vue_inject_styles__$E,
81367
81601
  __vue_script__$D,
81368
81602
  __vue_scope_id__$E,
@@ -81501,15 +81735,19 @@ var script$E = {
81501
81735
  },
81502
81736
 
81503
81737
  // Recursively check for child pages that are open, so that parents can open aswell
81504
- showChildren(page = {}, children = []) {
81505
- if (page.pageID === this.$route.params.pageID) {
81506
- return page.pageID === this.$route.params.pageID;
81738
+ showChildren({
81739
+ params = {},
81740
+ children = []
81741
+ }) {
81742
+ const partialParamsMatch = Object.entries(params).some(([key, value]) => {
81743
+ return this.$route.params[key] === value;
81744
+ });
81745
+
81746
+ if (partialParamsMatch) {
81747
+ return partialParamsMatch;
81507
81748
  }
81508
81749
 
81509
- return children.map(({
81510
- page,
81511
- children
81512
- }) => this.showChildren(page, children)).some(isOpen => isOpen);
81750
+ return children.map(c => this.showChildren(c)).some(isOpen => isOpen);
81513
81751
  }
81514
81752
 
81515
81753
  }
@@ -81519,21 +81757,21 @@ var script$E = {
81519
81757
  const __vue_script__$E = script$E;
81520
81758
 
81521
81759
  /* template */
81522
- var __vue_render__$z = 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){
81760
+ 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){
81523
81761
  var page = ref.page; if ( page === void 0 ) page = {};
81524
81762
  var params = ref.params; if ( params === void 0 ) params = {};
81525
81763
  var children = ref.children; if ( children === void 0 ) children = [];
81526
- 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(page, 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(page, 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)};
81527
- var __vue_staticRenderFns__$z = [];
81764
+ 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)};
81765
+ var __vue_staticRenderFns__$A = [];
81528
81766
 
81529
81767
  /* style */
81530
81768
  const __vue_inject_styles__$F = function (inject) {
81531
81769
  if (!inject) return
81532
- inject("data-v-6ae03c14_0", { source: ".pointer-none[data-v-6ae03c14]{pointer-events:none}.svg-inline--fa[data-v-6ae03c14]{width:30px}.nav-item>span>.title[data-v-6ae03c14]{font-family:Poppins-Regular}.nav-active>span>.icon[data-v-6ae03c14]{color:#4d7281}.nav-active>span>.title[data-v-6ae03c14]{font-family:Poppins-SemiBold}.nav-item[data-v-6ae03c14]{text-align:left}[dir=rtl] .nav-item[data-v-6ae03c14]{text-align:right}", map: undefined, media: undefined });
81770
+ 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 });
81533
81771
 
81534
81772
  };
81535
81773
  /* scoped */
81536
- const __vue_scope_id__$F = "data-v-6ae03c14";
81774
+ const __vue_scope_id__$F = "data-v-16ceb9b5";
81537
81775
  /* module identifier */
81538
81776
  const __vue_module_identifier__$F = undefined;
81539
81777
  /* functional template */
@@ -81545,7 +81783,7 @@ var __vue_staticRenderFns__$z = [];
81545
81783
 
81546
81784
 
81547
81785
  const __vue_component__$F = /*#__PURE__*/normalizeComponent(
81548
- { render: __vue_render__$z, staticRenderFns: __vue_staticRenderFns__$z },
81786
+ { render: __vue_render__$A, staticRenderFns: __vue_staticRenderFns__$A },
81549
81787
  __vue_inject_styles__$F,
81550
81788
  __vue_script__$E,
81551
81789
  __vue_scope_id__$F,
@@ -81705,8 +81943,8 @@ var script$F = {
81705
81943
  const __vue_script__$F = script$F;
81706
81944
 
81707
81945
  /* template */
81708
- var __vue_render__$A = 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()};
81709
- var __vue_staticRenderFns__$A = [];
81946
+ 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()};
81947
+ var __vue_staticRenderFns__$B = [];
81710
81948
 
81711
81949
  /* style */
81712
81950
  const __vue_inject_styles__$G = function (inject) {
@@ -81727,7 +81965,7 @@ var __vue_staticRenderFns__$A = [];
81727
81965
 
81728
81966
 
81729
81967
  const __vue_component__$G = /*#__PURE__*/normalizeComponent(
81730
- { render: __vue_render__$A, staticRenderFns: __vue_staticRenderFns__$A },
81968
+ { render: __vue_render__$B, staticRenderFns: __vue_staticRenderFns__$B },
81731
81969
  __vue_inject_styles__$G,
81732
81970
  __vue_script__$F,
81733
81971
  __vue_scope_id__$G,
@@ -81794,8 +82032,8 @@ var script$G = {
81794
82032
  const __vue_script__$G = script$G;
81795
82033
 
81796
82034
  /* template */
81797
- var __vue_render__$B = 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 ")])])};
81798
- var __vue_staticRenderFns__$B = [];
82035
+ 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 ")])])};
82036
+ var __vue_staticRenderFns__$C = [];
81799
82037
 
81800
82038
  /* style */
81801
82039
  const __vue_inject_styles__$H = undefined;
@@ -81814,7 +82052,7 @@ var __vue_staticRenderFns__$B = [];
81814
82052
 
81815
82053
 
81816
82054
  const __vue_component__$H = /*#__PURE__*/normalizeComponent(
81817
- { render: __vue_render__$B, staticRenderFns: __vue_staticRenderFns__$B },
82055
+ { render: __vue_render__$C, staticRenderFns: __vue_staticRenderFns__$C },
81818
82056
  __vue_inject_styles__$H,
81819
82057
  __vue_script__$G,
81820
82058
  __vue_scope_id__$H,
@@ -81883,8 +82121,8 @@ var script$I = {
81883
82121
  const __vue_script__$I = script$I;
81884
82122
 
81885
82123
  /* template */
81886
- var __vue_render__$C = 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)}})])};
81887
- var __vue_staticRenderFns__$C = [];
82124
+ 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)}})])};
82125
+ var __vue_staticRenderFns__$D = [];
81888
82126
 
81889
82127
  /* style */
81890
82128
  const __vue_inject_styles__$J = undefined;
@@ -81903,7 +82141,7 @@ var __vue_staticRenderFns__$C = [];
81903
82141
 
81904
82142
 
81905
82143
  const __vue_component__$J = /*#__PURE__*/normalizeComponent(
81906
- { render: __vue_render__$C, staticRenderFns: __vue_staticRenderFns__$C },
82144
+ { render: __vue_render__$D, staticRenderFns: __vue_staticRenderFns__$D },
81907
82145
  __vue_inject_styles__$J,
81908
82146
  __vue_script__$I,
81909
82147
  __vue_scope_id__$J,
@@ -81931,8 +82169,8 @@ var script$J = {
81931
82169
  const __vue_script__$J = script$J;
81932
82170
 
81933
82171
  /* template */
81934
- var __vue_render__$D = 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)};
81935
- var __vue_staticRenderFns__$D = [];
82172
+ 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)};
82173
+ var __vue_staticRenderFns__$E = [];
81936
82174
 
81937
82175
  /* style */
81938
82176
  const __vue_inject_styles__$K = undefined;
@@ -81951,7 +82189,7 @@ var __vue_staticRenderFns__$D = [];
81951
82189
 
81952
82190
 
81953
82191
  const __vue_component__$K = /*#__PURE__*/normalizeComponent(
81954
- { render: __vue_render__$D, staticRenderFns: __vue_staticRenderFns__$D },
82192
+ { render: __vue_render__$E, staticRenderFns: __vue_staticRenderFns__$E },
81955
82193
  __vue_inject_styles__$K,
81956
82194
  __vue_script__$J,
81957
82195
  __vue_scope_id__$K,
@@ -81971,8 +82209,8 @@ var script$K = {
81971
82209
  const __vue_script__$K = script$K;
81972
82210
 
81973
82211
  /* template */
81974
- var __vue_render__$E = 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)};
81975
- var __vue_staticRenderFns__$E = [];
82212
+ 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)};
82213
+ var __vue_staticRenderFns__$F = [];
81976
82214
 
81977
82215
  /* style */
81978
82216
  const __vue_inject_styles__$L = undefined;
@@ -81991,7 +82229,7 @@ var __vue_staticRenderFns__$E = [];
81991
82229
 
81992
82230
 
81993
82231
  const __vue_component__$L = /*#__PURE__*/normalizeComponent(
81994
- { render: __vue_render__$E, staticRenderFns: __vue_staticRenderFns__$E },
82232
+ { render: __vue_render__$F, staticRenderFns: __vue_staticRenderFns__$F },
81995
82233
  __vue_inject_styles__$L,
81996
82234
  __vue_script__$K,
81997
82235
  __vue_scope_id__$L,
@@ -82036,8 +82274,8 @@ var script$L = {
82036
82274
  const __vue_script__$L = script$L;
82037
82275
 
82038
82276
  /* template */
82039
- var __vue_render__$F = 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)};
82040
- var __vue_staticRenderFns__$F = [];
82277
+ 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)};
82278
+ var __vue_staticRenderFns__$G = [];
82041
82279
 
82042
82280
  /* style */
82043
82281
  const __vue_inject_styles__$M = undefined;
@@ -82056,7 +82294,7 @@ var __vue_staticRenderFns__$F = [];
82056
82294
 
82057
82295
 
82058
82296
  const __vue_component__$M = /*#__PURE__*/normalizeComponent(
82059
- { render: __vue_render__$F, staticRenderFns: __vue_staticRenderFns__$F },
82297
+ { render: __vue_render__$G, staticRenderFns: __vue_staticRenderFns__$G },
82060
82298
  __vue_inject_styles__$M,
82061
82299
  __vue_script__$L,
82062
82300
  __vue_scope_id__$M,
@@ -82111,11 +82349,11 @@ var script$M = {
82111
82349
  const __vue_script__$M = script$M;
82112
82350
 
82113
82351
  /* template */
82114
- var __vue_render__$G = 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){
82352
+ 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){
82115
82353
  var name = ref[0];
82116
82354
  var act = ref[1];
82117
82355
  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)};
82118
- var __vue_staticRenderFns__$G = [];
82356
+ var __vue_staticRenderFns__$H = [];
82119
82357
 
82120
82358
  /* style */
82121
82359
  const __vue_inject_styles__$N = function (inject) {
@@ -82136,7 +82374,7 @@ var __vue_staticRenderFns__$G = [];
82136
82374
 
82137
82375
 
82138
82376
  const __vue_component__$N = /*#__PURE__*/normalizeComponent(
82139
- { render: __vue_render__$G, staticRenderFns: __vue_staticRenderFns__$G },
82377
+ { render: __vue_render__$H, staticRenderFns: __vue_staticRenderFns__$H },
82140
82378
  __vue_inject_styles__$N,
82141
82379
  __vue_script__$M,
82142
82380
  __vue_scope_id__$N,
@@ -82183,8 +82421,8 @@ var script$N = {
82183
82421
  const __vue_script__$N = script$N;
82184
82422
 
82185
82423
  /* template */
82186
- var __vue_render__$H = 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)};
82187
- var __vue_staticRenderFns__$H = [];
82424
+ 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)};
82425
+ var __vue_staticRenderFns__$I = [];
82188
82426
 
82189
82427
  /* style */
82190
82428
  const __vue_inject_styles__$O = function (inject) {
@@ -82205,7 +82443,7 @@ var __vue_staticRenderFns__$H = [];
82205
82443
 
82206
82444
 
82207
82445
  const __vue_component__$O = /*#__PURE__*/normalizeComponent(
82208
- { render: __vue_render__$H, staticRenderFns: __vue_staticRenderFns__$H },
82446
+ { render: __vue_render__$I, staticRenderFns: __vue_staticRenderFns__$I },
82209
82447
  __vue_inject_styles__$O,
82210
82448
  __vue_script__$N,
82211
82449
  __vue_scope_id__$O,
@@ -82244,36 +82482,46 @@ var __vue_staticRenderFns__$H = [];
82244
82482
  //
82245
82483
  //
82246
82484
  //
82485
+ //
82486
+ //
82487
+ //
82488
+ //
82489
+ //
82490
+ //
82491
+ //
82492
+ //
82493
+ //
82494
+ //
82247
82495
  var script$O = {
82248
- name: "FieldItem",
82496
+ name: 'CItemPickerItem',
82249
82497
  props: {
82250
- field: {
82498
+ item: {
82251
82499
  type: Object,
82252
82500
  required: true
82253
82501
  },
82254
- isSelected: {
82255
- type: Boolean,
82256
- required: true
82502
+ textField: {
82503
+ type: String,
82504
+ default: 'text'
82257
82505
  },
82258
- selectedFields: {
82259
- type: Array,
82260
- required: true
82506
+ selected: {
82507
+ type: Boolean
82261
82508
  },
82262
- systemFieldLabel: {
82263
- type: String,
82264
- required: true
82509
+ disabled: {
82510
+ type: Boolean
82511
+ },
82512
+ disabledDragging: {
82513
+ type: Boolean
82514
+ },
82515
+ disabledSorting: {
82516
+ type: Boolean
82517
+ },
82518
+ hideIcons: {
82519
+ type: Boolean
82265
82520
  }
82266
82521
  },
82267
82522
  computed: {
82268
- fieldLabel() {
82269
- let fieldLabel = this.field.name || "";
82270
-
82271
- if (this.field.label) {
82272
- fieldLabel = `${this.field.label} (${this.field.name})`;
82273
- }
82274
-
82275
- fieldLabel += this.field.isRequired ? " *" : "";
82276
- return fieldLabel;
82523
+ _hideIcons() {
82524
+ return !this.disabled && !this.hideIcons;
82277
82525
  }
82278
82526
 
82279
82527
  }
@@ -82283,17 +82531,17 @@ var script$O = {
82283
82531
  const __vue_script__$O = script$O;
82284
82532
 
82285
82533
  /* template */
82286
- var __vue_render__$I = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"d-flex align-items-center"},[_c('font-awesome-icon',{staticClass:"handle align-baseline mr-3 text-primary",attrs:{"icon":['fas', 'grip-vertical']}}),_vm._v(" "),_c('b',{staticClass:"cursor-default text-dark text-truncate"},[_vm._v("\n "+_vm._s(_vm.fieldLabel)+"\n ")]),_vm._v(" "),(_vm.field.isSystem)?_c('small',{staticClass:"cursor-default ml-1 text-truncate"},[_vm._v("\n "+_vm._s(_vm.systemFieldLabel)+"\n ")]):_vm._e(),_vm._v(" "),(_vm.isSelected)?_c('font-awesome-icon',{staticClass:"align-baseline ml-auto text-muted pointer",attrs:{"icon":['far', 'eye']},on:{"click":function($event){return _vm.$emit('unselect-field', _vm.field)}}}):_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-field', _vm.field)}}})],1)};
82287
- var __vue_staticRenderFns__$I = [];
82534
+ 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)};
82535
+ var __vue_staticRenderFns__$J = [];
82288
82536
 
82289
82537
  /* style */
82290
82538
  const __vue_inject_styles__$P = function (inject) {
82291
82539
  if (!inject) return
82292
- inject("data-v-475bd41a_0", { source: ".handle[data-v-475bd41a]{cursor:grab}.cursor-default[data-v-475bd41a]{cursor:default}", map: undefined, media: undefined });
82540
+ 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 });
82293
82541
 
82294
82542
  };
82295
82543
  /* scoped */
82296
- const __vue_scope_id__$P = "data-v-475bd41a";
82544
+ const __vue_scope_id__$P = "data-v-70b6001a";
82297
82545
  /* module identifier */
82298
82546
  const __vue_module_identifier__$P = undefined;
82299
82547
  /* functional template */
@@ -82305,7 +82553,7 @@ var __vue_staticRenderFns__$I = [];
82305
82553
 
82306
82554
 
82307
82555
  const __vue_component__$P = /*#__PURE__*/normalizeComponent(
82308
- { render: __vue_render__$I, staticRenderFns: __vue_staticRenderFns__$I },
82556
+ { render: __vue_render__$J, staticRenderFns: __vue_staticRenderFns__$J },
82309
82557
  __vue_inject_styles__$P,
82310
82558
  __vue_script__$O,
82311
82559
  __vue_scope_id__$P,
@@ -82319,161 +82567,253 @@ var __vue_staticRenderFns__$I = [];
82319
82567
 
82320
82568
  //
82321
82569
  var script$P = {
82570
+ name: 'CItemPicker',
82322
82571
  components: {
82323
- draggable,
82324
- FieldItem: __vue_component__$P
82572
+ draggable: Draggable,
82573
+ CItemPickerItem: __vue_component__$P
82325
82574
  },
82326
82575
  props: {
82327
- module: {
82328
- type: Object,
82576
+ /**
82577
+ * List of all items, available and selected/picked
82578
+ *
82579
+ * Internally, we'll build 2 arrays for each group (available + selected)
82580
+ * and work with them.
82581
+ * On the outside, we'll always deal input array of (full) items and
82582
+ * array of selected/picked values of those items.
82583
+ *
82584
+ * This component mimics the behaviour of <b-form-select> component from
82585
+ * Vue Bootstrap and could serve as a drop-in replacement!
82586
+ */
82587
+ options: {
82588
+ type: Array,
82329
82589
  required: true
82330
82590
  },
82331
- fields: {
82591
+
82592
+ /**
82593
+ * List of values that can be found in the items
82594
+ */
82595
+ value: {
82332
82596
  type: Array,
82333
82597
  required: true
82334
82598
  },
82335
- disabled: {
82336
- type: Boolean,
82337
- default: false
82599
+ valueField: {
82600
+ type: String,
82601
+ default: 'value'
82338
82602
  },
82339
- disabledTypes: {
82340
- type: Array,
82341
- default: () => []
82603
+ textField: {
82604
+ type: String,
82605
+ default: 'text'
82342
82606
  },
82343
- disableSystemFields: {
82344
- type: Boolean,
82345
- default: false
82607
+ labels: {
82608
+ type: Object,
82609
+ default: () => ({
82610
+ searchPlaceholder: 'Filter items',
82611
+ availableItems: 'Available',
82612
+ selectAllItems: 'Select all',
82613
+ selectedItems: 'Selected',
82614
+ unselectAllItems: 'Unselect all',
82615
+ noItemsFound: 'No items found'
82616
+ })
82346
82617
  },
82347
- systemFields: {
82348
- type: Array,
82349
- default: null
82618
+ disabled: {
82619
+ type: Boolean
82350
82620
  },
82351
- fieldSubset: {
82352
- type: Array,
82353
- default: null
82621
+ disabledFilter: {
82622
+ type: Boolean
82354
82623
  },
82355
- group: {
82356
- type: String,
82357
- default: 'fields'
82624
+ disabledSorting: {
82625
+ type: Boolean
82358
82626
  },
82359
- maxHeight: {
82360
- type: String,
82361
- default: 'max-height: 65vh;'
82627
+ disabledDragging: {
82628
+ type: Boolean
82362
82629
  },
82363
- labels: {
82364
- type: Object,
82365
- required: true
82630
+ hideIcons: {
82631
+ type: Boolean
82632
+ },
82633
+ hideFilter: {
82634
+ type: Boolean
82366
82635
  }
82367
82636
  },
82368
82637
 
82369
82638
  data() {
82370
82639
  return {
82371
- modules: [],
82372
- query: ''
82640
+ query: '',
82641
+ available: [],
82642
+ selected: []
82373
82643
  };
82374
82644
  },
82375
82645
 
82376
82646
  computed: {
82377
- selectedFields: {
82378
- get() {
82379
- // Needs to be done this way so it retains order of fields
82380
- return this.fields.reduce((fields, field) => {
82381
- field = this.allFields.find(({
82382
- name
82383
- }) => name === field.name);
82647
+ _disabledFilter() {
82648
+ return this.disabled || this.disabledFilter;
82649
+ },
82384
82650
 
82385
- if (field) {
82386
- fields.push(field);
82387
- }
82651
+ _disabledSorting() {
82652
+ return this.disabled || this.disabledSorting;
82653
+ },
82388
82654
 
82389
- return fields;
82390
- }, []);
82655
+ /**
82656
+ * Provides list of all available items, filtered by query
82657
+ * and a setter for draggable component to update available items on drag
82658
+ */
82659
+ filteredAvailable: {
82660
+ get() {
82661
+ const q = this.query.toLowerCase();
82662
+ return this.available.filter(i => i.text.toLowerCase().indexOf(q) > -1);
82391
82663
  },
82392
82664
 
82393
- set(f) {
82394
- this.$emit('update:fields', f);
82665
+ set(items) {
82666
+ this.available = items;
82395
82667
  }
82396
82668
 
82397
82669
  },
82398
82670
 
82399
- allFields() {
82400
- let mFields = [];
82671
+ /**
82672
+ * Provides list of all selected items, filtered by query
82673
+ * and a setter for draggable component to update selected items on drag
82674
+ */
82675
+ filteredSelected: {
82676
+ get() {
82677
+ const q = this.query.toLowerCase();
82678
+ return this.selected.filter(i => i.text.toLowerCase().indexOf(q) > -1);
82679
+ },
82401
82680
 
82402
- if (this.fieldSubset) {
82403
- mFields = this.module.filterFields(this.fieldSubset);
82404
- } else {
82405
- mFields = this.module.fields;
82681
+ set(items) {
82682
+ this.selected = items;
82406
82683
  }
82407
82684
 
82408
- if (this.disabledTypes.length > 0) {
82409
- mFields = mFields.filter(({
82410
- kind
82411
- }) => !this.disabledTypes.find(t => t === kind));
82685
+ }
82686
+ },
82687
+ watch: {
82688
+ /**
82689
+ * Update parent component (if needed)
82690
+ * @param v
82691
+ */
82692
+ selected: {
82693
+ immediate: false,
82694
+
82695
+ handler(items) {
82696
+ const value = items.map(i => i[this.valueField]); // satisfy value.sync
82697
+
82698
+ this.$emit('update:value', value); // satisfy v-model
82699
+
82700
+ this.$emit('input', value);
82412
82701
  }
82413
82702
 
82414
- let sysFields = [];
82703
+ },
82704
+ options: {
82705
+ deep: true,
82706
+ immediate: true,
82415
82707
 
82416
- if (!this.disableSystemFields) {
82417
- sysFields = this.module.systemFields();
82708
+ handler() {
82709
+ this.sync();
82710
+ }
82418
82711
 
82419
- if (this.systemFields) {
82420
- sysFields = sysFields.filter(({
82421
- name
82422
- }) => this.systemFields.find(sf => sf === name));
82712
+ },
82713
+ value: {
82714
+ immediate: false,
82715
+
82716
+ handler(value = [], oldValue = []) {
82717
+ /**
82718
+ * Make sure we do not fall into an infinite loop
82719
+ *
82720
+ * If we update the value thenn sync will trigger recomputation of selected
82721
+ * Which then emits the update event and the loop will begin
82722
+ */
82723
+ if (value.length === oldValue.length) {
82724
+ if (value.filter(v => !oldValue.includes(v)).length === 0) {
82725
+ return;
82726
+ }
82423
82727
  }
82424
- } else {
82425
- mFields = mFields.filter(({
82426
- isSystem
82427
- }) => !isSystem);
82728
+
82729
+ this.sync();
82428
82730
  }
82429
82731
 
82430
- return [...[...mFields].sort((a, b) => a.label.localeCompare(b.label)), ...sysFields];
82431
- },
82732
+ }
82733
+ },
82734
+
82735
+ created() {
82736
+ this.options.forEach(o => {
82737
+ if (typeof o !== 'object') {
82738
+ throw new Error('expecting array of objects for options prop');
82739
+ }
82740
+ });
82741
+ },
82432
82742
 
82433
- allSelected() {
82434
- return this.availableFields.length > 0;
82743
+ methods: {
82744
+ _disableDragging(e) {
82745
+ if (this.disabledDragging && e.to !== e.from) {
82746
+ return false;
82747
+ }
82435
82748
  },
82436
82749
 
82437
- allUnselected() {
82438
- return this.selectedFields.length > 0;
82750
+ selectAll() {
82751
+ if (this.disabledSorting) {
82752
+ // sorting disabled, just reuse list from the frozen list
82753
+ this.selected = [...this.frozen()];
82754
+ } else {
82755
+ // sorting enabled, push all items left in available
82756
+ // at the end of the list
82757
+ this.selected.push(...this.available);
82758
+ }
82759
+
82760
+ this.available = [];
82439
82761
  },
82440
82762
 
82441
- availableFields() {
82442
- // Remove selected fields
82443
- return this.allFields.filter(a => !this.fields.some(f => a.name === f.name));
82763
+ select(item) {
82764
+ // remove available
82765
+ this.available = this.available.filter(i => i !== item); // put the selected item in the place where it was (if sorting is disabled)
82766
+ // or at the end
82767
+
82768
+ if (this.disabledSorting) {
82769
+ this.selected = this.frozen().filter(i => !this.available.includes(i));
82770
+ } else {
82771
+ this.selected.push(item);
82772
+ }
82444
82773
  },
82445
82774
 
82446
- filteredAvailableFields() {
82447
- return this.filterFields(this.availableFields);
82775
+ unselectAll() {
82776
+ this.available = [...this.frozen()];
82777
+ this.selected = [];
82448
82778
  },
82449
82779
 
82450
- filteredSelectedFields() {
82451
- return this.filterFields(this.selectedFields);
82452
- }
82780
+ unselect(item) {
82781
+ // filtering out the unselected item
82782
+ this.selected = this.selected.filter(i => i !== item); // sync available from the list of frozen items without selected
82453
82783
 
82454
- },
82455
- watch: {
82456
- 'moduleID'(o, n) {
82457
- if (o !== n) {
82458
- this.selectedFields = [];
82459
- }
82460
- }
82784
+ this.available = this.frozen().filter(i => !this.selected.includes(i));
82785
+ },
82461
82786
 
82462
- },
82463
- methods: {
82464
- filterFields(fields) {
82465
- return fields.filter(f => f.name.toLowerCase().indexOf(this.query.toLowerCase()) > -1 || f.label.toLowerCase().indexOf(this.query.toLowerCase()) > -1);
82787
+ /**
82788
+ * Returns true given item is selected or not
82789
+ *
82790
+ * Item is considered selected if value of item's value-field is inside the selected array.
82791
+ *
82792
+ * @param item object
82793
+ * @returns boolean
82794
+ */
82795
+ isPicked(item) {
82796
+ return item[this.valueField] && this.value.includes(item[this.valueField]);
82466
82797
  },
82467
82798
 
82468
- selectField(field) {
82469
- if (this.selectedFields.some(selectedField => selectedField.label === field.label)) return;
82470
- this.selectedFields = [...this.selectedFields, field];
82799
+ sync() {
82800
+ /**
82801
+ * filter all unpicked options, freeze each item in the array and
82802
+ * build list of available items
82803
+ */
82804
+ this.available = this.frozen().filter(opt => !this.isPicked(opt));
82805
+ /**
82806
+ * filter all unpicked options, freeze each item in the array and
82807
+ * build list of selected items, traverse value to keep order
82808
+ */
82809
+
82810
+ this.selected = this.value.map(v => {
82811
+ return this.frozen().find(item => item[this.valueField] === v);
82812
+ }).filter(f => f);
82471
82813
  },
82472
82814
 
82473
- unselectField(field) {
82474
- this.selectedFields = this.selectedFields.filter(({
82475
- name
82476
- }) => field.name !== name);
82815
+ frozen() {
82816
+ return this.options.map(Object.freeze);
82477
82817
  }
82478
82818
 
82479
82819
  }
@@ -82483,21 +82823,19 @@ var script$P = {
82483
82823
  const __vue_script__$P = script$P;
82484
82824
 
82485
82825
  /* template */
82486
- var __vue_render__$J = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"overflow-hidden"},[_c('b-input-group',[_c('b-input',{staticClass:"text-truncate",attrs:{"type":"search","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._v(" "),_c('b-row',{staticClass:"mt-2 h-100"},[_c('b-col',{attrs:{"cols":"12","sm":"6"}},[_c('div',{staticClass:"d-flex align-items-center"},[_c('label',{staticClass:"text-primary mb-0"},[_vm._v("\n "+_vm._s(_vm.labels.availableFields)+"\n ")]),_vm._v(" "),_c('b-button',{staticClass:"ml-auto px-0 text-muted",class:[_vm.allSelected ? 'visible' : 'invisible'],attrs:{"variant":"link"},on:{"click":function($event){$event.preventDefault();_vm.selectedFields = [].concat( _vm.allFields );}}},[_vm._v("\n "+_vm._s(_vm.labels.selectAllFields)+"\n ")])],1),_vm._v(" "),_c('b-list-group',{attrs:{"vertical":""}},[_c('draggable',{key:_vm.filteredAvailableFields.length,staticClass:"overflow-auto",style:(("" + _vm.maxHeight)),attrs:{"handle":".handle","disabled":_vm.disabled,"group":_vm.group,"value":_vm.filteredAvailableFields}},_vm._l((_vm.filteredAvailableFields),function(field){return _c('b-list-group-item',{key:field.name,staticClass:"mb-3 border rounded",on:{"dblclick":function($event){return _vm.selectField(field)}}},[_c('field-item',{attrs:{"field":field,"selected-fields":_vm.selectedFields,"is-selected":false,"system-field-label":_vm.labels.systemField},on:{"select-field":_vm.selectField}})],1)}),1)],1)],1),_vm._v(" "),_c('b-col',{staticClass:"pl-sm-0",attrs:{"cols":"12","sm":"6"}},[_c('div',{staticClass:"d-flex align-items-center"},[_c('label',{staticClass:"mb-0 text-primary"},[_vm._v("\n "+_vm._s(_vm.labels.selectedFields)+"\n ")]),_vm._v(" "),_c('b-button',{staticClass:"ml-auto px-0 text-muted",class:[_vm.allUnselected ? 'visible' : 'invisible'],attrs:{"variant":"link"},on:{"click":function($event){$event.preventDefault();_vm.selectedFields = [];}}},[_vm._v("\n "+_vm._s(_vm.labels.unselectAllFields)+"\n ")])],1),_vm._v(" "),_c('b-list-group',{attrs:{"vertical":""}},[_c('draggable',{staticClass:"overflow-auto",style:(("" + _vm.maxHeight)),attrs:{"handle":".handle","disabled":_vm.disabled,"group":_vm.group},model:{value:(_vm.selectedFields),callback:function ($$v) {_vm.selectedFields=$$v;},expression:"selectedFields"}},_vm._l((_vm.filteredSelectedFields),function(field){return _c('b-list-group-item',{key:field.name,staticClass:"mb-3 border rounded",on:{"dblclick":function($event){return _vm.unselectField(field)}}},[_c('field-item',{attrs:{"field":field,"selected-fields":_vm.selectedFields,"is-selected":true,"system-field-label":_vm.labels.systemField},on:{"unselect-field":_vm.unselectField}})],1)}),1)],1)],1)],1)],1)};
82487
- var __vue_staticRenderFns__$J = [];
82826
+ 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)};
82827
+ var __vue_staticRenderFns__$K = [];
82488
82828
 
82489
82829
  /* style */
82490
- const __vue_inject_styles__$Q = function (inject) {
82491
- if (!inject) return
82492
- inject("data-v-6f297e50_0", { source: ".handle[data-v-6f297e50]{cursor:grab}", map: undefined, media: undefined });
82493
-
82494
- };
82830
+ const __vue_inject_styles__$Q = undefined;
82495
82831
  /* scoped */
82496
- const __vue_scope_id__$Q = "data-v-6f297e50";
82832
+ const __vue_scope_id__$Q = undefined;
82497
82833
  /* module identifier */
82498
82834
  const __vue_module_identifier__$Q = undefined;
82499
82835
  /* functional template */
82500
82836
  const __vue_is_functional_template__$Q = false;
82837
+ /* style inject */
82838
+
82501
82839
  /* style inject SSR */
82502
82840
 
82503
82841
  /* style inject shadow dom */
@@ -82505,89 +82843,36 @@ var __vue_staticRenderFns__$J = [];
82505
82843
 
82506
82844
 
82507
82845
  const __vue_component__$Q = /*#__PURE__*/normalizeComponent(
82508
- { render: __vue_render__$J, staticRenderFns: __vue_staticRenderFns__$J },
82846
+ { render: __vue_render__$K, staticRenderFns: __vue_staticRenderFns__$K },
82509
82847
  __vue_inject_styles__$Q,
82510
82848
  __vue_script__$P,
82511
82849
  __vue_scope_id__$Q,
82512
82850
  __vue_is_functional_template__$Q,
82513
82851
  __vue_module_identifier__$Q,
82514
82852
  false,
82515
- createInjector,
82853
+ undefined,
82516
82854
  undefined,
82517
82855
  undefined
82518
82856
  );
82519
82857
 
82520
- const del$1 = '|||';
82521
- /**
82522
- * Extract subgroups from the given groups
82523
- * @param groups
82524
- * @param path Array of groups that represent the path
82525
- */
82526
- function extractGroups(groups, ...path) {
82527
- const jpath = path.join(del$1);
82528
- return [...(new Set(groups
82529
- .filter(g => g.slice(0, path.length).join(del$1) === jpath)
82530
- .map(g => g.slice(path.length, path.length + 1)[0])
82531
- .filter(g => !!g))).values()];
82532
- }
82533
- /**
82534
- * Extract subgroups from the catalogue that match the given path
82535
- *
82536
- * @param cat Catalogue
82537
- * @param path Array of groups that represent the path
82538
- * @constructor
82539
- */
82540
- function ExtractSubgroups(cat, ...path) {
82541
- const groups = Object.values(cat)
82542
- .map(({ group }) => group)
82543
- .filter(g => g !== undefined);
82544
- return extractGroups(groups, ...path);
82545
- }
82546
- /**
82547
- * Returns all components that match the given path
82548
- *
82549
- * @param cat Catalogue
82550
- * @param path Array of groups that represent the path
82551
-
82552
- */
82553
- function ExtractComponents(cat, ...path) {
82554
- const jpath = path.join(del$1);
82555
- return Object.values(cat)
82556
- .filter(({ group }) => (group || []).join(del$1) === jpath);
82557
- }
82558
-
82559
- //
82560
82858
  var script$Q = {
82561
- name: 'ComponentList',
82562
82859
  props: {
82563
- catalogue: {
82564
- required: true,
82565
- type: Object
82860
+ displayElement: {
82861
+ type: Object,
82862
+ required: true
82566
82863
  },
82567
- path: {
82568
- type: Array,
82569
- default: () => []
82864
+ labels: {
82865
+ type: Object,
82866
+ default: () => ({})
82570
82867
  }
82571
82868
  },
82572
82869
  computed: {
82573
- // name of the current group
82574
- root() {
82575
- return this.path.length === 0;
82870
+ dataframes() {
82871
+ return this.displayElement.dataframes || [];
82576
82872
  },
82577
82873
 
82578
- // name of the current group
82579
- group() {
82580
- return this.root ? undefined : this.path[this.path.length - 1];
82581
- },
82582
-
82583
- // returns all groups at this level
82584
- subgroups() {
82585
- return ExtractSubgroups(this.catalogue, ...this.path);
82586
- },
82587
-
82588
- components() {
82589
- // return ExtractComponents(this.catalogue, ...this.path)
82590
- return ExtractComponents(this.catalogue, ...this.path);
82874
+ options() {
82875
+ return this.displayElement.options || undefined;
82591
82876
  }
82592
82877
 
82593
82878
  }
@@ -82597,21 +82882,17 @@ var script$Q = {
82597
82882
  const __vue_script__$Q = script$Q;
82598
82883
 
82599
82884
  /* template */
82600
- 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()])};
82601
- var __vue_staticRenderFns__$K = [];
82602
82885
 
82603
82886
  /* style */
82604
- const __vue_inject_styles__$R = function (inject) {
82605
- if (!inject) return
82606
- inject("data-v-8b2b254e_0", { source: ".component[data-v-8b2b254e]{cursor:pointer}", map: undefined, media: undefined });
82607
-
82608
- };
82887
+ const __vue_inject_styles__$R = undefined;
82609
82888
  /* scoped */
82610
- const __vue_scope_id__$R = "data-v-8b2b254e";
82889
+ const __vue_scope_id__$R = undefined;
82611
82890
  /* module identifier */
82612
82891
  const __vue_module_identifier__$R = undefined;
82613
82892
  /* functional template */
82614
- const __vue_is_functional_template__$R = false;
82893
+ const __vue_is_functional_template__$R = undefined;
82894
+ /* style inject */
82895
+
82615
82896
  /* style inject SSR */
82616
82897
 
82617
82898
  /* style inject shadow dom */
@@ -82619,77 +82900,75 @@ var __vue_staticRenderFns__$K = [];
82619
82900
 
82620
82901
 
82621
82902
  const __vue_component__$R = /*#__PURE__*/normalizeComponent(
82622
- { render: __vue_render__$K, staticRenderFns: __vue_staticRenderFns__$K },
82903
+ {},
82623
82904
  __vue_inject_styles__$R,
82624
82905
  __vue_script__$Q,
82625
82906
  __vue_scope_id__$R,
82626
82907
  __vue_is_functional_template__$R,
82627
82908
  __vue_module_identifier__$R,
82628
82909
  false,
82629
- createInjector,
82910
+ undefined,
82630
82911
  undefined,
82631
82912
  undefined
82632
82913
  );
82633
82914
 
82634
82915
  //
82635
82916
  var script$R = {
82636
- name: 'C3',
82637
- components: {
82638
- ComponentList: __vue_component__$R
82639
- },
82640
- props: {
82641
- catalogue: {
82642
- required: true,
82643
- type: Object
82644
- }
82645
- },
82646
- computed: {
82647
- controlGroups() {
82648
- if (this.current.controls.length === 0) {
82649
- return [];
82650
- }
82917
+ extends: __vue_component__$R,
82651
82918
 
82652
- if (Array.isArray(this.current.controls[0])) {
82653
- // already grouped
82654
- return this.current.controls;
82655
- } // make one virtual group holding all controls
82919
+ data() {
82920
+ return {
82921
+ chart: undefined,
82922
+ plugins: [Funnel, colorschemes]
82923
+ };
82924
+ },
82656
82925
 
82926
+ computed: {
82927
+ localDataframe() {
82928
+ return this.dataframes[0];
82929
+ },
82657
82930
 
82658
- return [this.current.controls];
82931
+ size() {
82932
+ return this.displayElement ? this.displayElement.meta.size || 100 : 100;
82659
82933
  }
82660
82934
 
82661
82935
  },
82936
+ watch: {
82937
+ dataframes: {
82938
+ deep: true,
82662
82939
 
82663
- data() {
82664
- return {
82665
- current: undefined
82666
- };
82667
- },
82940
+ handler(dataframes = []) {
82941
+ if (dataframes.length) {
82942
+ this.$nextTick(() => {
82943
+ this.renderChart();
82944
+ });
82945
+ }
82946
+ }
82668
82947
 
82669
- methods: {
82670
- setCurrent(component) {
82671
- this.current = {
82672
- props: {},
82673
- ...component
82674
- };
82675
- this.setScenario(this.current);
82676
82948
  },
82949
+ size: {
82950
+ immediate: true,
82951
+ deep: true,
82677
82952
 
82678
- setScenario({
82679
- props = {},
82680
- controls = []
82681
- }) {
82682
- // create missing props from controls
82683
- const apply = (c, props) => c.update(props, c.value(props) || null);
82953
+ handler() {
82954
+ this.$nextTick(() => {
82955
+ this.renderChart();
82956
+ });
82957
+ }
82684
82958
 
82685
- controls.forEach(c => {
82686
- if (Array.isArray(c)) {
82687
- c.forEach(c => apply(c, props));
82688
- } else {
82689
- apply(c, props);
82690
- }
82959
+ }
82960
+ },
82961
+ methods: {
82962
+ renderChart() {
82963
+ if (this.chart) {
82964
+ this.chart.destroy();
82965
+ }
82966
+
82967
+ const ctx = this.$refs.chart.getContext('2d');
82968
+ const chartConfig = this.options.getChartConfiguration(this.dataframes);
82969
+ this.chart = new Chart(ctx, { ...chartConfig,
82970
+ plugins: this.plugins
82691
82971
  });
82692
- this.current.props = props;
82693
82972
  }
82694
82973
 
82695
82974
  }
@@ -82699,21 +82978,19 @@ var script$R = {
82699
82978
  const __vue_script__$R = script$R;
82700
82979
 
82701
82980
  /* template */
82702
- var __vue_render__$L = 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()])};
82981
+ 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"})};
82703
82982
  var __vue_staticRenderFns__$L = [];
82704
82983
 
82705
82984
  /* style */
82706
- const __vue_inject_styles__$S = function (inject) {
82707
- if (!inject) return
82708
- 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 });
82709
-
82710
- };
82985
+ const __vue_inject_styles__$S = undefined;
82711
82986
  /* scoped */
82712
82987
  const __vue_scope_id__$S = undefined;
82713
82988
  /* module identifier */
82714
82989
  const __vue_module_identifier__$S = undefined;
82715
82990
  /* functional template */
82716
82991
  const __vue_is_functional_template__$S = false;
82992
+ /* style inject */
82993
+
82717
82994
  /* style inject SSR */
82718
82995
 
82719
82996
  /* style inject shadow dom */
@@ -82728,32 +83005,90 @@ var __vue_staticRenderFns__$L = [];
82728
83005
  __vue_is_functional_template__$S,
82729
83006
  __vue_module_identifier__$S,
82730
83007
  false,
82731
- createInjector,
83008
+ undefined,
82732
83009
  undefined,
82733
83010
  undefined
82734
83011
  );
82735
83012
 
82736
- //
82737
- //
82738
- //
82739
- //
82740
- //
82741
- //
82742
- //
82743
- //
82744
- //
82745
- //
82746
83013
  //
82747
83014
  var script$S = {
82748
- props: {
82749
- label: {
82750
- required: true,
82751
- type: String
83015
+ extends: __vue_component__$R,
83016
+
83017
+ data() {
83018
+ return {
83019
+ vvb: ['0', '0', '0', '0']
83020
+ };
83021
+ },
83022
+
83023
+ computed: {
83024
+ viewbox() {
83025
+ return this.vvb.join(' ');
83026
+ },
83027
+
83028
+ style() {
83029
+ return {
83030
+ fill: this.options.color || '#000000',
83031
+ backgroundColor: this.options.backgroundColor || '#ffffff'
83032
+ };
82752
83033
  },
83034
+
83035
+ value() {
83036
+ if (this.dataframes.length) {
83037
+ const {
83038
+ rows = [],
83039
+ columns = []
83040
+ } = this.dataframes[0];
83041
+
83042
+ if (columns.length) {
83043
+ const columnIndex = columns.findIndex(({
83044
+ name
83045
+ }) => name === this.options.valueColumn);
83046
+
83047
+ if (rows.length) {
83048
+ return rows[0] ? rows[0][columnIndex] || '' : '';
83049
+ }
83050
+ }
83051
+ }
83052
+
83053
+ return '';
83054
+ },
83055
+
83056
+ displayedMetric() {
83057
+ const {
83058
+ prefix = '',
83059
+ suffix = ''
83060
+ } = this.options;
83061
+
83062
+ if (this.value) {
83063
+ return `${prefix}${this.value}${suffix}`;
83064
+ }
83065
+
83066
+ return '';
83067
+ }
83068
+
83069
+ },
83070
+ watch: {
82753
83071
  value: {
82754
- type: String,
82755
- default: () => ''
83072
+ immediate: true,
83073
+ handler: function () {
83074
+ this.update();
83075
+ }
82756
83076
  }
83077
+ },
83078
+ methods: {
83079
+ update() {
83080
+ this.$nextTick(function () {
83081
+ const {
83082
+ width,
83083
+ height
83084
+ } = this.$refs.metricItem.getBBox();
83085
+ const tmp = [...this.vvb];
83086
+ tmp[2] = parseInt(Math.ceil(width));
83087
+ tmp[3] = parseInt(Math.ceil(height));
83088
+ this.vvb = tmp;
83089
+ });
83090
+ }
83091
+
82757
83092
  }
82758
83093
  };
82759
83094
 
@@ -82761,7 +83096,7 @@ var script$S = {
82761
83096
  const __vue_script__$S = script$S;
82762
83097
 
82763
83098
  /* template */
82764
- var __vue_render__$M = 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)};
83099
+ 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()};
82765
83100
  var __vue_staticRenderFns__$M = [];
82766
83101
 
82767
83102
  /* style */
@@ -82793,27 +83128,377 @@ var __vue_staticRenderFns__$M = [];
82793
83128
  undefined
82794
83129
  );
82795
83130
 
82796
- //
82797
- //
82798
- //
82799
- //
82800
- //
82801
- //
82802
- //
82803
- //
82804
- //
82805
- //
82806
83131
  //
82807
83132
  var script$T = {
82808
- props: {
82809
- label: {
82810
- required: true,
82811
- type: String
83133
+ extends: __vue_component__$R,
83134
+
83135
+ data() {
83136
+ return {
83137
+ sort: {
83138
+ field: '',
83139
+ descending: false
83140
+ },
83141
+ cursors: [],
83142
+ cursor: undefined
83143
+ };
83144
+ },
83145
+
83146
+ computed: {
83147
+ localDataframe() {
83148
+ return this.dataframes[0];
82812
83149
  },
82813
- value: {
82814
- type: String,
82815
- default: () => ''
83150
+
83151
+ // indexFrames groups frames based on the related DS identifiers
83152
+ // for easier work.
83153
+ indexFrames() {
83154
+ const ix = {};
83155
+
83156
+ for (const df of this.dataframes || []) {
83157
+ if (!df.relSource) {
83158
+ continue;
83159
+ }
83160
+
83161
+ if (!ix[df.relSource]) {
83162
+ ix[df.relSource] = {};
83163
+ }
83164
+
83165
+ if (!ix[df.relSource][df.refValue]) {
83166
+ ix[df.relSource][df.refValue] = [];
83167
+ }
83168
+
83169
+ ix[df.relSource][df.refValue].push(df);
83170
+ }
83171
+
83172
+ return ix;
83173
+ },
83174
+
83175
+ tabelify() {
83176
+ if (!this.dataframes.length) {
83177
+ return {};
83178
+ }
83179
+
83180
+ return this.tabelifyFrame(this.localDataframe);
83181
+ },
83182
+
83183
+ hasPrevPage() {
83184
+ return !!this.cursors.length;
83185
+ },
83186
+
83187
+ nextPage() {
83188
+ if (this.localDataframe) {
83189
+ const {
83190
+ nextPage
83191
+ } = this.localDataframe.paging || {};
83192
+ return nextPage;
83193
+ }
83194
+
83195
+ return undefined;
83196
+ },
83197
+
83198
+ hasNextPage() {
83199
+ return !!this.nextPage;
82816
83200
  }
83201
+
83202
+ },
83203
+ watch: {
83204
+ localDataframe: {
83205
+ immediate: true,
83206
+
83207
+ handler(dataframe, oldDataframe) {
83208
+ if (dataframe && !oldDataframe) {
83209
+ const firstField = dataframe.sort.includes(',') ? dataframe.sort.split(',')[0] : dataframe.sort;
83210
+
83211
+ if (firstField.includes('DESC')) {
83212
+ this.sort.descending = true;
83213
+ this.sort.field = firstField.split(' ')[0];
83214
+ } else {
83215
+ this.sort.field = firstField;
83216
+ }
83217
+ }
83218
+ }
83219
+
83220
+ }
83221
+ },
83222
+ methods: {
83223
+ // keyColumns returns all of the key columns with indexes for all of the
83224
+ // columns that are used in joins.
83225
+ keyColumns(frame) {
83226
+ const foreignFrames = this.getForeignFrames(frame);
83227
+ const keys = {};
83228
+
83229
+ if (foreignFrames === undefined) {
83230
+ return keys;
83231
+ }
83232
+
83233
+ for (const ff of Object.values(foreignFrames)) {
83234
+ for (const f of ff) {
83235
+ keys[f.relColumn] = f.columns.findIndex(({
83236
+ name
83237
+ }) => name === f.relColumn);
83238
+ }
83239
+ }
83240
+
83241
+ return keys;
83242
+ },
83243
+
83244
+ getForeignFrames(frame) {
83245
+ return this.indexFrames[frame.ref];
83246
+ },
83247
+
83248
+ // tabelifyFrame returns a set of rows and columns that should be shown
83249
+ // for this frame.
83250
+ //
83251
+ // maxSize is used to calculate the rowSpan that should be applied to joined
83252
+ // frames with fewer rows then the other.
83253
+ //
83254
+ // Flow outline:
83255
+ // * for each row of the frame:
83256
+ // ** find all foreign frames
83257
+ // ** tabelify foreign frames
83258
+ // ** merge with the current tabelified result
83259
+ tabelifyFrame(frame, maxSize = 1) {
83260
+ const outRows = [];
83261
+ const isLocal = frame.ref === this.localDataframe.ref; // Index selected columns
83262
+
83263
+ const selectedCols = new Set();
83264
+
83265
+ for (const c of this.options.columns[frame.ref] || []) {
83266
+ selectedCols.add(frame.columns.findIndex(({
83267
+ name
83268
+ }) => name === c.name));
83269
+ }
83270
+
83271
+ const hSeanFrames = {};
83272
+ const outHeader = [...selectedCols].map(index => {
83273
+ const column = frame.columns[index];
83274
+ return {
83275
+ column,
83276
+ meta: {
83277
+ ref: frame.ref,
83278
+ sortKey: isLocal ? column.name : `${frame.ref}.${column.name}`
83279
+ }
83280
+ };
83281
+ });
83282
+ const outColgroups = [{
83283
+ size: outHeader.length,
83284
+ isLocal: isLocal
83285
+ }];
83286
+ const relFrames = this.getForeignFrames(frame);
83287
+ const usedKeys = this.keyColumns(frame);
83288
+
83289
+ for (const r of frame.rows || []) {
83290
+ maxSize = 1;
83291
+ const row = this.tabelifyRow(r, [...selectedCols]);
83292
+ const auxRows = [];
83293
+
83294
+ for (const colIndex of Object.values(usedKeys)) {
83295
+ const relFrame = relFrames[r[colIndex]]; // Determine the largest frame so our maxSize will match
83296
+
83297
+ for (const rf of relFrame || []) {
83298
+ maxSize = Math.max(maxSize, rf.rows.length);
83299
+ } // Tabelify related frames
83300
+
83301
+
83302
+ for (const rf of relFrame || []) {
83303
+ // const refColumnIndexes = (this.options.columns[rf.ref] || []).map(({ name }) => {
83304
+ // return frame.columns.findIndex(fc => fc.name === name)
83305
+ // })
83306
+ const aux = this.tabelifyFrame(rf, Math.max(rf.rows.length, maxSize)); // Optionally append header
83307
+
83308
+ if (!hSeanFrames[rf.ref]) {
83309
+ const x = [...aux.header];
83310
+ x[0].sourceName = rf.ref;
83311
+ outHeader.push(...x);
83312
+ hSeanFrames[rf.ref] = true;
83313
+ outColgroups.push(...aux.colgroups);
83314
+ } // Rowspan smaller frames so the table is nice and aligned
83315
+
83316
+
83317
+ if (aux.rows.length < maxSize) {
83318
+ for (const col of aux.rows[aux.rows.length - 1]) {
83319
+ col.attrs = {
83320
+ rowspan: maxSize - aux.rows.length + 1
83321
+ };
83322
+ }
83323
+ }
83324
+
83325
+ auxRows.push(aux.rows);
83326
+ }
83327
+ } // Merge the original row with joined rows
83328
+ // - the forst row of the merged row gets joined with the original row
83329
+ // - the rest are appended to the list (they are offsetted by rowspan)
83330
+
83331
+
83332
+ if (auxRows.length > 0) {
83333
+ for (const c of row) {
83334
+ c.attrs = {
83335
+ rowspan: maxSize
83336
+ };
83337
+ }
83338
+
83339
+ row[0].separator = true;
83340
+ const merged = this.mergeRows(auxRows).pop();
83341
+ row.push(...merged[0]);
83342
+ outRows.push(row);
83343
+ outRows.push(...merged.slice(1));
83344
+ } else {
83345
+ outRows.push(row);
83346
+ }
83347
+ }
83348
+
83349
+ return {
83350
+ rows: outRows,
83351
+ maxSize,
83352
+ header: outHeader,
83353
+ colgroups: outColgroups
83354
+ };
83355
+ },
83356
+
83357
+ mergeRows(auxRows, maxSize) {
83358
+ if (auxRows.length <= 1) {
83359
+ return auxRows;
83360
+ }
83361
+
83362
+ const a = auxRows[auxRows.length - 2];
83363
+ const b = auxRows[auxRows.length - 1];
83364
+ const tmpRows = [];
83365
+
83366
+ for (let i = 0; i < a.length; i++) {
83367
+ const row = a[i];
83368
+
83369
+ if (i >= b.length) {
83370
+ tmpRows.push(row);
83371
+ continue;
83372
+ }
83373
+
83374
+ row.push(...b[i]);
83375
+ tmpRows.push(row);
83376
+ }
83377
+
83378
+ if (b.length > a.length) {
83379
+ tmpRows.push(...b.slice(a.length));
83380
+ }
83381
+
83382
+ auxRows.splice(auxRows.length - 2, 2, tmpRows);
83383
+ return this.mergeRows(auxRows);
83384
+ },
83385
+
83386
+ tabelifyRow(row, selectedCols = []) {
83387
+ const out = [];
83388
+ selectedCols.forEach(index => {
83389
+ out.push({
83390
+ value: row[index]
83391
+ });
83392
+ });
83393
+ return out;
83394
+ },
83395
+
83396
+ // Sorting
83397
+ handleSort(fieldName) {
83398
+ let relatedDatasource;
83399
+
83400
+ if (fieldName.includes('.')) {
83401
+ [relatedDatasource, fieldName] = fieldName.split('.');
83402
+ return; // Uncomment this when foreign frame sorting is implemented
83403
+ }
83404
+
83405
+ if (fieldName) {
83406
+ const {
83407
+ field,
83408
+ descending
83409
+ } = this.sort;
83410
+
83411
+ if (this.cursor) {
83412
+ this.cursor = undefined;
83413
+ this.cursors = [];
83414
+ }
83415
+
83416
+ if (fieldName === field) {
83417
+ this.sort.descending = !descending;
83418
+ } else {
83419
+ this.sort.field = fieldName;
83420
+ this.sort.descending = false;
83421
+ }
83422
+ }
83423
+
83424
+ this.updateDefinition(relatedDatasource);
83425
+ },
83426
+
83427
+ goToPage(dir) {
83428
+ switch (dir) {
83429
+ case 'nextPage':
83430
+ if (!this.cursors.length) {
83431
+ this.cursors.push(undefined);
83432
+ }
83433
+
83434
+ this.cursors.push(this.nextPage);
83435
+ this.cursor = this.nextPage;
83436
+ break;
83437
+
83438
+ case 'prevPage':
83439
+ this.cursors.pop();
83440
+ this.cursor = this.cursors.pop();
83441
+ break;
83442
+
83443
+ default:
83444
+ this.cursor = undefined;
83445
+ this.cursors = [];
83446
+ }
83447
+
83448
+ this.updateDefinition();
83449
+ },
83450
+
83451
+ // Meta
83452
+ updateDefinition(updatedDatasource) {
83453
+ if (this.localDataframe) {
83454
+ // Get related datasource
83455
+ let ref = this.localDataframe.ref;
83456
+
83457
+ if (updatedDatasource) {
83458
+ ref = (this.dataframes.find(({
83459
+ ref
83460
+ }) => ref === updatedDatasource) || {}).ref;
83461
+ }
83462
+
83463
+ if (ref) {
83464
+ const def = {
83465
+ ref
83466
+ }; // Sorting
83467
+
83468
+ const {
83469
+ field,
83470
+ descending
83471
+ } = this.sort;
83472
+
83473
+ if (field) {
83474
+ // Generate sort string
83475
+ const sort = descending ? `${field} DESC` : field;
83476
+ def.sort = sort;
83477
+ } // Paging
83478
+
83479
+
83480
+ if (this.cursor) {
83481
+ let {
83482
+ limit
83483
+ } = this.localDataframe.paging || {};
83484
+
83485
+ if (!limit) {
83486
+ limit = this.options.datasources[0] ? this.options.datasources[0].paging.limit || 20 : 20;
83487
+ }
83488
+
83489
+ def.paging = {
83490
+ cursor: this.cursor,
83491
+ limit
83492
+ };
83493
+ }
83494
+
83495
+ const definition = {};
83496
+ definition[ref] = def;
83497
+ this.$emit('update', definition);
83498
+ }
83499
+ }
83500
+ }
83501
+
82817
83502
  }
82818
83503
  };
82819
83504
 
@@ -82821,19 +83506,27 @@ var script$T = {
82821
83506
  const __vue_script__$T = script$T;
82822
83507
 
82823
83508
  /* template */
82824
- var __vue_render__$N = 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)};
83509
+ 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:({
83510
+ color: _vm.sort.field === c.meta.sortKey && !_vm.sort.descending ? 'black' : 'grey',
83511
+ }),attrs:{"icon":['fas', 'angle-up']}}),_vm._v(" "),_c('font-awesome-icon',{staticClass:"mt-1",style:({
83512
+ color: _vm.sort.field === c.meta.sortKey && _vm.sort.descending ? 'black' : 'grey',
83513
+ }),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:{
83514
+ separator: !!(r[0] || {}).separator,
83515
+ }},_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)};
82825
83516
  var __vue_staticRenderFns__$N = [];
82826
83517
 
82827
83518
  /* style */
82828
- const __vue_inject_styles__$U = undefined;
83519
+ const __vue_inject_styles__$U = function (inject) {
83520
+ if (!inject) return
83521
+ 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 });
83522
+
83523
+ };
82829
83524
  /* scoped */
82830
- const __vue_scope_id__$U = undefined;
83525
+ const __vue_scope_id__$U = "data-v-b515bfce";
82831
83526
  /* module identifier */
82832
83527
  const __vue_module_identifier__$U = undefined;
82833
83528
  /* functional template */
82834
83529
  const __vue_is_functional_template__$U = false;
82835
- /* style inject */
82836
-
82837
83530
  /* style inject SSR */
82838
83531
 
82839
83532
  /* style inject shadow dom */
@@ -82848,39 +83541,21 @@ var __vue_staticRenderFns__$N = [];
82848
83541
  __vue_is_functional_template__$U,
82849
83542
  __vue_module_identifier__$U,
82850
83543
  false,
82851
- undefined,
83544
+ createInjector,
82852
83545
  undefined,
82853
83546
  undefined
82854
83547
  );
82855
83548
 
82856
- //
82857
- //
82858
- //
82859
- //
82860
- //
82861
- //
82862
- //
82863
- //
82864
- //
82865
83549
  //
82866
83550
  var script$U = {
82867
- props: {
82868
- label: {
82869
- required: true,
82870
- type: String
82871
- },
82872
- value: {
82873
- type: Boolean,
82874
- default: () => false
82875
- }
82876
- }
83551
+ extends: __vue_component__$R
82877
83552
  };
82878
83553
 
82879
83554
  /* script */
82880
83555
  const __vue_script__$U = script$U;
82881
83556
 
82882
83557
  /* template */
82883
- var __vue_render__$O = 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)};
83558
+ 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()};
82884
83559
  var __vue_staticRenderFns__$O = [];
82885
83560
 
82886
83561
  /* style */
@@ -82912,8 +83587,222 @@ var __vue_staticRenderFns__$O = [];
82912
83587
  undefined
82913
83588
  );
82914
83589
 
83590
+ const del$1 = '|||';
83591
+ /**
83592
+ * Extract subgroups from the given groups
83593
+ * @param groups
83594
+ * @param path Array of groups that represent the path
83595
+ */
83596
+ function extractGroups(groups, ...path) {
83597
+ const jpath = path.join(del$1);
83598
+ return [...(new Set(groups
83599
+ .filter(g => g.slice(0, path.length).join(del$1) === jpath)
83600
+ .map(g => g.slice(path.length, path.length + 1)[0])
83601
+ .filter(g => !!g))).values()];
83602
+ }
83603
+ /**
83604
+ * Extract subgroups from the catalogue that match the given path
83605
+ *
83606
+ * @param cat Catalogue
83607
+ * @param path Array of groups that represent the path
83608
+ * @constructor
83609
+ */
83610
+ function ExtractSubgroups(cat, ...path) {
83611
+ const groups = Object.values(cat)
83612
+ .map(({ group }) => group)
83613
+ .filter(g => g !== undefined);
83614
+ return extractGroups(groups, ...path);
83615
+ }
83616
+ /**
83617
+ * Returns all components that match the given path
83618
+ *
83619
+ * @param cat Catalogue
83620
+ * @param path Array of groups that represent the path
83621
+
83622
+ */
83623
+ function ExtractComponents(cat, ...path) {
83624
+ const jpath = path.join(del$1);
83625
+ return Object.values(cat)
83626
+ .filter(({ group }) => (group || []).join(del$1) === jpath);
83627
+ }
83628
+
82915
83629
  //
83630
+ var script$V = {
83631
+ name: 'ComponentList',
83632
+ props: {
83633
+ catalogue: {
83634
+ required: true,
83635
+ type: Object
83636
+ },
83637
+ path: {
83638
+ type: Array,
83639
+ default: () => []
83640
+ }
83641
+ },
83642
+ computed: {
83643
+ // name of the current group
83644
+ root() {
83645
+ return this.path.length === 0;
83646
+ },
83647
+
83648
+ // name of the current group
83649
+ group() {
83650
+ return this.root ? undefined : this.path[this.path.length - 1];
83651
+ },
83652
+
83653
+ // returns all groups at this level
83654
+ subgroups() {
83655
+ return ExtractSubgroups(this.catalogue, ...this.path);
83656
+ },
83657
+
83658
+ components() {
83659
+ // return ExtractComponents(this.catalogue, ...this.path)
83660
+ return ExtractComponents(this.catalogue, ...this.path);
83661
+ }
83662
+
83663
+ }
83664
+ };
83665
+
83666
+ /* script */
83667
+ const __vue_script__$V = script$V;
83668
+
83669
+ /* template */
83670
+ 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()])};
83671
+ var __vue_staticRenderFns__$P = [];
83672
+
83673
+ /* style */
83674
+ const __vue_inject_styles__$W = function (inject) {
83675
+ if (!inject) return
83676
+ inject("data-v-8b2b254e_0", { source: ".component[data-v-8b2b254e]{cursor:pointer}", map: undefined, media: undefined });
83677
+
83678
+ };
83679
+ /* scoped */
83680
+ const __vue_scope_id__$W = "data-v-8b2b254e";
83681
+ /* module identifier */
83682
+ const __vue_module_identifier__$W = undefined;
83683
+ /* functional template */
83684
+ const __vue_is_functional_template__$W = false;
83685
+ /* style inject SSR */
83686
+
83687
+ /* style inject shadow dom */
83688
+
83689
+
83690
+
83691
+ const __vue_component__$W = /*#__PURE__*/normalizeComponent(
83692
+ { render: __vue_render__$P, staticRenderFns: __vue_staticRenderFns__$P },
83693
+ __vue_inject_styles__$W,
83694
+ __vue_script__$V,
83695
+ __vue_scope_id__$W,
83696
+ __vue_is_functional_template__$W,
83697
+ __vue_module_identifier__$W,
83698
+ false,
83699
+ createInjector,
83700
+ undefined,
83701
+ undefined
83702
+ );
83703
+
82916
83704
  //
83705
+ var script$W = {
83706
+ name: 'C3',
83707
+ components: {
83708
+ ComponentList: __vue_component__$W
83709
+ },
83710
+ props: {
83711
+ catalogue: {
83712
+ required: true,
83713
+ type: Object
83714
+ }
83715
+ },
83716
+ computed: {
83717
+ controlGroups() {
83718
+ if (this.current.controls.length === 0) {
83719
+ return [];
83720
+ }
83721
+
83722
+ if (Array.isArray(this.current.controls[0])) {
83723
+ // already grouped
83724
+ return this.current.controls;
83725
+ } // make one virtual group holding all controls
83726
+
83727
+
83728
+ return [this.current.controls];
83729
+ }
83730
+
83731
+ },
83732
+
83733
+ data() {
83734
+ return {
83735
+ current: undefined
83736
+ };
83737
+ },
83738
+
83739
+ methods: {
83740
+ setCurrent(component) {
83741
+ this.current = {
83742
+ props: {},
83743
+ ...component
83744
+ };
83745
+ this.setScenario(this.current);
83746
+ },
83747
+
83748
+ setScenario({
83749
+ props = {},
83750
+ controls = []
83751
+ }) {
83752
+ // create missing props from controls
83753
+ const apply = (c, props) => c.update(props, c.value(props) || null);
83754
+
83755
+ controls.forEach(c => {
83756
+ if (Array.isArray(c)) {
83757
+ c.forEach(c => apply(c, props));
83758
+ } else {
83759
+ apply(c, props);
83760
+ }
83761
+ });
83762
+ this.current.props = props;
83763
+ }
83764
+
83765
+ }
83766
+ };
83767
+
83768
+ /* script */
83769
+ const __vue_script__$W = script$W;
83770
+
83771
+ /* template */
83772
+ 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()])};
83773
+ var __vue_staticRenderFns__$Q = [];
83774
+
83775
+ /* style */
83776
+ const __vue_inject_styles__$X = function (inject) {
83777
+ if (!inject) return
83778
+ 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 });
83779
+
83780
+ };
83781
+ /* scoped */
83782
+ const __vue_scope_id__$X = undefined;
83783
+ /* module identifier */
83784
+ const __vue_module_identifier__$X = undefined;
83785
+ /* functional template */
83786
+ const __vue_is_functional_template__$X = false;
83787
+ /* style inject SSR */
83788
+
83789
+ /* style inject shadow dom */
83790
+
83791
+
83792
+
83793
+ const __vue_component__$X = /*#__PURE__*/normalizeComponent(
83794
+ { render: __vue_render__$Q, staticRenderFns: __vue_staticRenderFns__$Q },
83795
+ __vue_inject_styles__$X,
83796
+ __vue_script__$W,
83797
+ __vue_scope_id__$X,
83798
+ __vue_is_functional_template__$X,
83799
+ __vue_module_identifier__$X,
83800
+ false,
83801
+ createInjector,
83802
+ undefined,
83803
+ undefined
83804
+ );
83805
+
82917
83806
  //
82918
83807
  //
82919
83808
  //
@@ -82924,7 +83813,188 @@ var __vue_staticRenderFns__$O = [];
82924
83813
  //
82925
83814
  //
82926
83815
  //
82927
- var script$V = {
83816
+ //
83817
+ var script$X = {
83818
+ props: {
83819
+ label: {
83820
+ required: true,
83821
+ type: String
83822
+ },
83823
+ value: {
83824
+ type: String,
83825
+ default: () => ''
83826
+ }
83827
+ }
83828
+ };
83829
+
83830
+ /* script */
83831
+ const __vue_script__$X = script$X;
83832
+
83833
+ /* template */
83834
+ 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)};
83835
+ var __vue_staticRenderFns__$R = [];
83836
+
83837
+ /* style */
83838
+ const __vue_inject_styles__$Y = undefined;
83839
+ /* scoped */
83840
+ const __vue_scope_id__$Y = undefined;
83841
+ /* module identifier */
83842
+ const __vue_module_identifier__$Y = undefined;
83843
+ /* functional template */
83844
+ const __vue_is_functional_template__$Y = false;
83845
+ /* style inject */
83846
+
83847
+ /* style inject SSR */
83848
+
83849
+ /* style inject shadow dom */
83850
+
83851
+
83852
+
83853
+ const __vue_component__$Y = /*#__PURE__*/normalizeComponent(
83854
+ { render: __vue_render__$R, staticRenderFns: __vue_staticRenderFns__$R },
83855
+ __vue_inject_styles__$Y,
83856
+ __vue_script__$X,
83857
+ __vue_scope_id__$Y,
83858
+ __vue_is_functional_template__$Y,
83859
+ __vue_module_identifier__$Y,
83860
+ false,
83861
+ undefined,
83862
+ undefined,
83863
+ undefined
83864
+ );
83865
+
83866
+ //
83867
+ //
83868
+ //
83869
+ //
83870
+ //
83871
+ //
83872
+ //
83873
+ //
83874
+ //
83875
+ //
83876
+ //
83877
+ var script$Y = {
83878
+ props: {
83879
+ label: {
83880
+ required: true,
83881
+ type: String
83882
+ },
83883
+ value: {
83884
+ type: String,
83885
+ default: () => ''
83886
+ }
83887
+ }
83888
+ };
83889
+
83890
+ /* script */
83891
+ const __vue_script__$Y = script$Y;
83892
+
83893
+ /* template */
83894
+ 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)};
83895
+ var __vue_staticRenderFns__$S = [];
83896
+
83897
+ /* style */
83898
+ const __vue_inject_styles__$Z = undefined;
83899
+ /* scoped */
83900
+ const __vue_scope_id__$Z = undefined;
83901
+ /* module identifier */
83902
+ const __vue_module_identifier__$Z = undefined;
83903
+ /* functional template */
83904
+ const __vue_is_functional_template__$Z = false;
83905
+ /* style inject */
83906
+
83907
+ /* style inject SSR */
83908
+
83909
+ /* style inject shadow dom */
83910
+
83911
+
83912
+
83913
+ const __vue_component__$Z = /*#__PURE__*/normalizeComponent(
83914
+ { render: __vue_render__$S, staticRenderFns: __vue_staticRenderFns__$S },
83915
+ __vue_inject_styles__$Z,
83916
+ __vue_script__$Y,
83917
+ __vue_scope_id__$Z,
83918
+ __vue_is_functional_template__$Z,
83919
+ __vue_module_identifier__$Z,
83920
+ false,
83921
+ undefined,
83922
+ undefined,
83923
+ undefined
83924
+ );
83925
+
83926
+ //
83927
+ //
83928
+ //
83929
+ //
83930
+ //
83931
+ //
83932
+ //
83933
+ //
83934
+ //
83935
+ //
83936
+ var script$Z = {
83937
+ props: {
83938
+ label: {
83939
+ required: true,
83940
+ type: String
83941
+ },
83942
+ value: {
83943
+ type: Boolean,
83944
+ default: () => false
83945
+ }
83946
+ }
83947
+ };
83948
+
83949
+ /* script */
83950
+ const __vue_script__$Z = script$Z;
83951
+
83952
+ /* template */
83953
+ 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)};
83954
+ var __vue_staticRenderFns__$T = [];
83955
+
83956
+ /* style */
83957
+ const __vue_inject_styles__$_ = undefined;
83958
+ /* scoped */
83959
+ const __vue_scope_id__$_ = undefined;
83960
+ /* module identifier */
83961
+ const __vue_module_identifier__$_ = undefined;
83962
+ /* functional template */
83963
+ const __vue_is_functional_template__$_ = false;
83964
+ /* style inject */
83965
+
83966
+ /* style inject SSR */
83967
+
83968
+ /* style inject shadow dom */
83969
+
83970
+
83971
+
83972
+ const __vue_component__$_ = /*#__PURE__*/normalizeComponent(
83973
+ { render: __vue_render__$T, staticRenderFns: __vue_staticRenderFns__$T },
83974
+ __vue_inject_styles__$_,
83975
+ __vue_script__$Z,
83976
+ __vue_scope_id__$_,
83977
+ __vue_is_functional_template__$_,
83978
+ __vue_module_identifier__$_,
83979
+ false,
83980
+ undefined,
83981
+ undefined,
83982
+ undefined
83983
+ );
83984
+
83985
+ //
83986
+ //
83987
+ //
83988
+ //
83989
+ //
83990
+ //
83991
+ //
83992
+ //
83993
+ //
83994
+ //
83995
+ //
83996
+ //
83997
+ var script$_ = {
82928
83998
  props: {
82929
83999
  label: {
82930
84000
  required: true,
@@ -82942,20 +84012,20 @@ var script$V = {
82942
84012
  };
82943
84013
 
82944
84014
  /* script */
82945
- const __vue_script__$V = script$V;
84015
+ const __vue_script__$_ = script$_;
82946
84016
 
82947
84017
  /* template */
82948
- var __vue_render__$P = 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)};
82949
- var __vue_staticRenderFns__$P = [];
84018
+ 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)};
84019
+ var __vue_staticRenderFns__$U = [];
82950
84020
 
82951
84021
  /* style */
82952
- const __vue_inject_styles__$W = undefined;
84022
+ const __vue_inject_styles__$$ = undefined;
82953
84023
  /* scoped */
82954
- const __vue_scope_id__$W = undefined;
84024
+ const __vue_scope_id__$$ = undefined;
82955
84025
  /* module identifier */
82956
- const __vue_module_identifier__$W = undefined;
84026
+ const __vue_module_identifier__$$ = undefined;
82957
84027
  /* functional template */
82958
- const __vue_is_functional_template__$W = false;
84028
+ const __vue_is_functional_template__$$ = false;
82959
84029
  /* style inject */
82960
84030
 
82961
84031
  /* style inject SSR */
@@ -82964,13 +84034,13 @@ var __vue_staticRenderFns__$P = [];
82964
84034
 
82965
84035
 
82966
84036
 
82967
- const __vue_component__$W = /*#__PURE__*/normalizeComponent(
82968
- { render: __vue_render__$P, staticRenderFns: __vue_staticRenderFns__$P },
82969
- __vue_inject_styles__$W,
82970
- __vue_script__$V,
82971
- __vue_scope_id__$W,
82972
- __vue_is_functional_template__$W,
82973
- __vue_module_identifier__$W,
84037
+ const __vue_component__$$ = /*#__PURE__*/normalizeComponent(
84038
+ { render: __vue_render__$U, staticRenderFns: __vue_staticRenderFns__$U },
84039
+ __vue_inject_styles__$$,
84040
+ __vue_script__$_,
84041
+ __vue_scope_id__$$,
84042
+ __vue_is_functional_template__$$,
84043
+ __vue_module_identifier__$$,
82974
84044
  false,
82975
84045
  undefined,
82976
84046
  undefined,
@@ -100182,16 +101252,16 @@ function generic(component, { handler, props }) {
100182
101252
  props }, handler);
100183
101253
  }
100184
101254
  function input(label, handler) {
100185
- return generic(__vue_component__$T, { handler, props: { label } });
101255
+ return generic(__vue_component__$Y, { handler, props: { label } });
100186
101256
  }
100187
101257
  function textarea(label, handler) {
100188
- return generic(__vue_component__$U, { handler, props: { label } });
101258
+ return generic(__vue_component__$Z, { handler, props: { label } });
100189
101259
  }
100190
101260
  function checkbox(label, handler) {
100191
- return generic(__vue_component__$V, { handler, props: { label } });
101261
+ return generic(__vue_component__$_, { handler, props: { label } });
100192
101262
  }
100193
101263
  function select(label, handler, options) {
100194
- return generic(__vue_component__$W, {
101264
+ return generic(__vue_component__$$, {
100195
101265
  handler,
100196
101266
  props: {
100197
101267
  label,
@@ -100210,7 +101280,7 @@ var controls = /*#__PURE__*/Object.freeze({
100210
101280
  });
100211
101281
 
100212
101282
  var index$2 = {
100213
- View: __vue_component__$S,
101283
+ View: __vue_component__$X,
100214
101284
  controls,
100215
101285
  };
100216
101286
 
@@ -100224,8 +101294,9 @@ var index$3 = /*#__PURE__*/Object.freeze({
100224
101294
  canPreview: canPreview,
100225
101295
  CInputConfirm: __vue_component__$9,
100226
101296
  CInputProcessing: __vue_component__$a,
100227
- CInputDateTime: __vue_component__$c,
100228
- CInputInterval: __vue_component__$d,
101297
+ CInputDateTime: __vue_component__$b,
101298
+ CInputPresort: __vue_component__$c,
101299
+ CInputCron: __vue_component__$d,
100229
101300
  CRichTextInput: __vue_component__$m,
100230
101301
  CLightbox: __vue_component__$5,
100231
101302
  CPermissionsButton: __vue_component__$n,
@@ -100240,8 +101311,12 @@ var index$3 = /*#__PURE__*/Object.freeze({
100240
101311
  CToaster: __vue_component__$N,
100241
101312
  CToasterLink: __vue_component__$M,
100242
101313
  CReminderSidebar: __vue_component__$O,
100243
- FieldItem: __vue_component__$P,
100244
- FieldPicker: __vue_component__$Q,
101314
+ CItemPicker: __vue_component__$Q,
101315
+ CItemPickerItem: __vue_component__$P,
101316
+ CReportChart: __vue_component__$S,
101317
+ CReportMetric: __vue_component__$T,
101318
+ CReportTable: __vue_component__$U,
101319
+ CReportText: __vue_component__$V,
100245
101320
  C3: index$2,
100246
101321
  CPrompts: __vue_component__$B,
100247
101322
  CPromptModal: __vue_component__$A,
@@ -100663,6 +101738,66 @@ var index$7 = /*#__PURE__*/Object.freeze({
100663
101738
  RBAC: RBAC
100664
101739
  });
100665
101740
 
101741
+ // A helper function to remove diacritics from the given string.
101742
+ // This allows us so search over characters like čšž with csz.
101743
+ //
101744
+ // stackoverflow.com/questions/990904/remove-accents-diacritics-in-a-string-in-javascript/37511463#37511463
101745
+ function toNFD(s) {
101746
+ return s.normalize('NFD').replace(/[\u0300-\u036f]/g, '');
101747
+ }
101748
+ // Here we try to calculate the quality of the match using relative numbers.
101749
+ // By default, fuzzy sort uses score that is not capped.
101750
+ const goodMatchThreshold = 0.35;
101751
+ function fuzzyMatch({ indexes }) {
101752
+ return indexes.length / (Math.max(...indexes) + 1);
101753
+ }
101754
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
101755
+ function assert(match, obj, query, field, ...fields) {
101756
+ if (!obj) {
101757
+ return false;
101758
+ }
101759
+ query = toNFD(query.trim().toLowerCase());
101760
+ if (typeof obj === 'string') {
101761
+ return match(toNFD(obj.trim().toLowerCase()), query);
101762
+ }
101763
+ else {
101764
+ if (!field) {
101765
+ throw new Error('field must be provided when searching over objects');
101766
+ }
101767
+ return fields.concat([field])
101768
+ .some(f => match(toNFD(obj[f].trim().toLowerCase()), query));
101769
+ }
101770
+ }
101771
+ // AssertStrict checks for a substring and doesn't do any additional guessing
101772
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
101773
+ function AssertStrict(obj, query, field, ...fields) {
101774
+ return assert((v, query) => v.includes(query), obj, query, field, ...fields);
101775
+ }
101776
+ // AssertFuzzy uses some heuristic to determine if the query maybe probably perhaps matches
101777
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
101778
+ function AssertFuzzy(obj, query, field, ...fields) {
101779
+ return assert((v, query) => {
101780
+ const rs = fzy.single(query, v);
101781
+ if (!rs) {
101782
+ return false;
101783
+ }
101784
+ return fuzzyMatch(rs) >= goodMatchThreshold;
101785
+ }, obj, query, field, ...fields);
101786
+ }
101787
+ // Assert uses both AssertStrict and AssertFuzzy to check if the query matches,
101788
+ // If the strict assertion passes that is used, else it tries to do a AssertFuzzy just to make sure
101789
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
101790
+ function Assert(obj, query, field, ...fields) {
101791
+ return AssertStrict(obj, query, field, ...fields) || AssertFuzzy(obj, query, field, ...fields);
101792
+ }
101793
+
101794
+ var filter = /*#__PURE__*/Object.freeze({
101795
+ __proto__: null,
101796
+ AssertStrict: AssertStrict,
101797
+ AssertFuzzy: AssertFuzzy,
101798
+ Assert: Assert
101799
+ });
101800
+
100666
101801
  const config = {
100667
101802
  format: 'json',
100668
101803
  // (Boolean) whether to reconnect automatically (false)
@@ -100747,6 +101882,7 @@ var websocket = /*#__PURE__*/Object.freeze({
100747
101882
 
100748
101883
  exports.components = index$3;
100749
101884
  exports.corredor = index$4;
101885
+ exports.filter = filter;
100750
101886
  exports.filters = index$5;
100751
101887
  exports.i18n = i18n;
100752
101888
  exports.mixins = index$1;