@cortezaproject/corteza-vue 2021.9.6-dev.5 → 2022.3.0-dev.1

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
  */
@@ -2014,36 +2014,77 @@ class Auth {
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`;
2020
+ const storeKeyStateLocation = `auth.state.${state}.location`;
2021
2021
  this.log.info('state received', state);
2022
- finalLocation = this.sessionStorage.getItem(key);
2023
- if (!finalLocation) {
2024
- throw Error('state does not match');
2022
+ const tmp = this.sessionStorage.getItem(storeKeyStateLocation);
2023
+ if (tmp === null) {
2024
+ console.warn('state does not match, restarting authentication flow');
2025
+ this.startAuthenticationFlow();
2026
+ return null;
2025
2027
  }
2026
- if (/auth\/callback/.test(finalLocation)) {
2028
+ if (!/auth\/callback/.test(tmp)) {
2027
2029
  // 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);
2030
+ // we'll silently ignore it and redirect user back to entrypoint
2031
+ finalLocation = tmp;
2033
2032
  }
2034
- this.sessionStorage.removeItem(key);
2033
+ this.sessionStorage.removeItem(storeKeyStateLocation);
2035
2034
  }
2036
2035
  const code = params.get('code') || '';
2037
2036
  this.log.info('authorization code received', code);
2038
2037
  yield this.exchangeCode(code);
2039
- if (finalLocation) {
2040
- this.location.assign(finalLocation);
2041
- }
2038
+ this.startFinalState(finalLocation);
2039
+ return null;
2042
2040
  }
2043
2041
  }
2044
2042
  return this.check();
2045
2043
  });
2046
2044
  }
2045
+ /**
2046
+ * Flagging session storage
2047
+ *
2048
+ * Challenge with sessions and browser tabs:
2049
+ * Each browser tab & window interacts with an isolated session. When user clicks on a link to and wants to open
2050
+ * it in a new window or a tab, or when tab is duplicated, session contents are copied!
2051
+ *
2052
+ * Consequences of that are that two (or more) tabs end up with the same session
2053
+ * and the same refresh token, and we need to detect if we're dealing with refresh token in an old or new session.
2054
+ *
2055
+ * With this function we start the final state and flag the session. This way we'll
2056
+ * know, after the redirection to the final location, if this is a final stage or not and if the refresh token
2057
+ * belongs to this session or not.
2058
+ */
2059
+ startFinalState(dst) {
2060
+ this.log.info('redirecting back to final destination', dst);
2061
+ this.sessionStorage.setItem(storeKeyFinalState, Date.now().toString());
2062
+ this.location.assign(dst);
2063
+ }
2064
+ /**
2065
+ * Called when refresh token is re-fetched.
2066
+ *
2067
+ * Cleanup aux items in the session store
2068
+ */
2069
+ completeFinalState() {
2070
+ this.sessionStorage.removeItem(storeKeyFinalState);
2071
+ this.sessionStorage.removeItem(storeKeyFlowStarted);
2072
+ const stateKey = /^auth\.state\.\w+\.location$/;
2073
+ for (let i = 0; i < this.sessionStorage.length; i++) {
2074
+ const key = this.sessionStorage.key(i);
2075
+ if (key !== null && stateKey.test(key)) {
2076
+ this.sessionStorage.removeItem(key);
2077
+ }
2078
+ }
2079
+ }
2080
+ /**
2081
+ * Are we in a final state or not?
2082
+ *
2083
+ * See startFinalState function for more details
2084
+ */
2085
+ inFinalState() {
2086
+ return this.sessionStorage.getItem(storeKeyFinalState) !== null;
2087
+ }
2047
2088
  /**
2048
2089
  * Checks current auth state; is access token loaded OR do we have a refresh token we can use
2049
2090
  *
@@ -2077,27 +2118,34 @@ class Auth {
2077
2118
  this[user] = authUser;
2078
2119
  return data;
2079
2120
  }).catch((error) => {
2080
- this.log.info('data fetch form info endpoint failed', { oauth2InfoURL, headers, error });
2121
+ this.log.error('data fetch form info endpoint failed', { oauth2InfoURL, headers, error });
2081
2122
  // assume invalid JWT and remove it
2082
2123
  this[accessToken] = undefined;
2083
2124
  throw new Error('Unauthenticated');
2084
2125
  });
2085
2126
  }
2086
- const refreshToken = this.sessionStorage.getItem(this.refreshTokenKey);
2127
+ const refreshToken = this.sessionStorage.getItem(storeKeyRefreshToken);
2087
2128
  if (refreshToken) {
2088
- this.log.info('refresh token found, exchanging it for new access token');
2129
+ this.log.debug('refresh token found', { refreshToken });
2089
2130
  /**
2090
- * Refresh token found in the storage,
2091
- * let's use it to get new access token
2131
+ * Only exchange refresh token if this is the final state (see startFinalState function for more details)
2132
+ *
2133
+ * If this is a duplicated-session, an error will be thrown and authentication will be (probably)
2134
+ * restarted by the caller.
2092
2135
  */
2093
- return this.exchangeRefresh(refreshToken);
2136
+ if (this.inFinalState()) {
2137
+ this.log.info('refreshing token', refreshToken);
2138
+ /**
2139
+ * Refresh token found in the storage,
2140
+ * let's use it to get new access token
2141
+ */
2142
+ return this.exchangeRefresh(refreshToken);
2143
+ }
2094
2144
  }
2095
2145
  throw new Error('Unauthenticated');
2096
2146
  });
2097
2147
  }
2098
2148
  logout() {
2099
- this[accessToken] = undefined;
2100
- this[user] = undefined;
2101
2149
  this.pruneStore();
2102
2150
  this.location.assign(Make({
2103
2151
  url: `${this.cortezaAuthURL}/logout`,
@@ -2112,6 +2160,7 @@ class Auth {
2112
2160
  */
2113
2161
  startAuthenticationFlow() {
2114
2162
  this.log.debug('starting new authentication flow');
2163
+ this.incFlowCounter();
2115
2164
  const state = Math.random().toString(36).substring(2);
2116
2165
  this.sessionStorage.setItem(`auth.state.${state}.location`, this.location.toString());
2117
2166
  this.location.assign(Make({
@@ -2124,6 +2173,24 @@ class Auth {
2124
2173
  },
2125
2174
  }));
2126
2175
  }
2176
+ /**
2177
+ * protects against too many tries when we try to auto-fix the "state does not match" error
2178
+ * by restarting the aut flow.
2179
+ */
2180
+ incFlowCounter() {
2181
+ const aux = this.sessionStorage.getItem(storeKeyFlowStarted);
2182
+ if (aux === null) {
2183
+ this.sessionStorage.setItem(storeKeyFlowStarted, '1');
2184
+ return;
2185
+ }
2186
+ const count = parseInt(this.sessionStorage.getItem(storeKeyFlowStarted));
2187
+ if (count >= maxStartAttempts) {
2188
+ // Too many start attempts
2189
+ this.sessionStorage.removeItem(storeKeyFlowStarted);
2190
+ throw new Error('could not start authentication flow, too many attempts');
2191
+ }
2192
+ this.sessionStorage.setItem(storeKeyFlowStarted, (count + 1).toString());
2193
+ }
2127
2194
  /**
2128
2195
  * Exchanges authorization code for access and refresh tokens
2129
2196
  */
@@ -2147,6 +2214,10 @@ class Auth {
2147
2214
  */
2148
2215
  exchangeRefresh(refreshToken) {
2149
2216
  return __awaiter(this, void 0, void 0, function* () {
2217
+ /**
2218
+ * Finalize
2219
+ */
2220
+ this.completeFinalState();
2150
2221
  return this.oauth2token({
2151
2222
  // eslint-disable-next-line @typescript-eslint/camelcase
2152
2223
  refresh_token: refreshToken || '',
@@ -2190,7 +2261,7 @@ class Auth {
2190
2261
  this.startAuthenticationFlow();
2191
2262
  });
2192
2263
  }), 1000 * timeout);
2193
- this.sessionStorage.setItem(this.refreshTokenKey, oa2tkn.refresh_token);
2264
+ this.sessionStorage.setItem(storeKeyRefreshToken, oa2tkn.refresh_token);
2194
2265
  const u = new cortezaJs.system.User({
2195
2266
  userID: oa2tkn.sub,
2196
2267
  name: oa2tkn.name,
@@ -71035,14 +71106,109 @@ var __vue_staticRenderFns__$8 = [];
71035
71106
  undefined
71036
71107
  );
71037
71108
 
71109
+ function getDate(value) {
71110
+ if (!value) {
71111
+ return undefined;
71112
+ }
71113
+ if (value === 'Invalid date') {
71114
+ // Make sure this weird value does not cause us problems
71115
+ return undefined;
71116
+ }
71117
+ const dt = value.split(' ');
71118
+ if (dt.length > 1) {
71119
+ return dt[0]; // we only want the date part
71120
+ }
71121
+ else if (dt.length === 1) {
71122
+ // If date is in the value
71123
+ if (dt[0].indexOf('-') > -1) {
71124
+ return dt[0];
71125
+ }
71126
+ }
71127
+ }
71128
+ function getTime(value) {
71129
+ if (!value) {
71130
+ return undefined;
71131
+ }
71132
+ const dt = value.split(' ');
71133
+ if (dt.length > 1) {
71134
+ return dt[1]; // we only want the time part
71135
+ }
71136
+ else if (dt.length === 1) {
71137
+ // If we time is in the value
71138
+ if (dt[0].indexOf(':') > -1) {
71139
+ return dt[0];
71140
+ }
71141
+ }
71142
+ }
71143
+ function setDate(date, value, noDate = false, noTime = false) {
71144
+ if (noDate || !date || !date.length) {
71145
+ return undefined;
71146
+ }
71147
+ const time = getTime(value);
71148
+ if (noTime) {
71149
+ return moment(date, 'YYYY-MM-DD').format('YYYY-MM-DD');
71150
+ }
71151
+ return moment(date + ' ' + time, 'YYYY-MM-DD HH:mm').format('YYYY-MM-DD HH:mm');
71152
+ }
71153
+ function setTime(time, value, noDate = false, noTime = false) {
71154
+ if (noTime || !time || !time.length) {
71155
+ return undefined;
71156
+ }
71157
+ let date = getDate(value);
71158
+ if (noDate) {
71159
+ return moment(time, 'HH:mm').format('HH:mm');
71160
+ }
71161
+ if (!date) {
71162
+ // If no date is yet set default to today
71163
+ date = moment().format('YYYY-MM-DD');
71164
+ }
71165
+ return moment(date + ' ' + time, 'YYYY-MM-DD HH:mm').format('YYYY-MM-DD HH:mm');
71166
+ }
71167
+
71038
71168
  var script$a = {
71039
71169
  props: {
71040
- label: {
71170
+ value: {
71041
71171
  type: String,
71042
- default: undefined
71172
+ required: true
71043
71173
  },
71044
- // eslint-disable-next-line
71045
- value: {}
71174
+ noTime: {
71175
+ type: Boolean,
71176
+ default: false
71177
+ },
71178
+ noDate: {
71179
+ type: Boolean,
71180
+ default: false
71181
+ }
71182
+ },
71183
+ computed: {
71184
+ date: {
71185
+ get() {
71186
+ return getDate(this.value);
71187
+ },
71188
+
71189
+ set(date) {
71190
+ date = setDate(date, this.value, this.noDate, this.noTime);
71191
+
71192
+ if (date) {
71193
+ this.$emit('input', date);
71194
+ }
71195
+ }
71196
+
71197
+ },
71198
+ time: {
71199
+ get() {
71200
+ return getTime(this.value);
71201
+ },
71202
+
71203
+ set(time) {
71204
+ time = setTime(time, this.value, this.noDate, this.noTime);
71205
+
71206
+ if (time) {
71207
+ this.$emit('input', time);
71208
+ }
71209
+ }
71210
+
71211
+ }
71046
71212
  }
71047
71213
  };
71048
71214
 
@@ -71050,6 +71216,8 @@ var script$a = {
71050
71216
  const __vue_script__$a = script$a;
71051
71217
 
71052
71218
  /* template */
71219
+ 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)};
71220
+ var __vue_staticRenderFns__$9 = [];
71053
71221
 
71054
71222
  /* style */
71055
71223
  const __vue_inject_styles__$b = undefined;
@@ -71058,7 +71226,7 @@ const __vue_script__$a = script$a;
71058
71226
  /* module identifier */
71059
71227
  const __vue_module_identifier__$b = undefined;
71060
71228
  /* functional template */
71061
- const __vue_is_functional_template__$b = undefined;
71229
+ const __vue_is_functional_template__$b = false;
71062
71230
  /* style inject */
71063
71231
 
71064
71232
  /* style inject SSR */
@@ -71068,7 +71236,7 @@ const __vue_script__$a = script$a;
71068
71236
 
71069
71237
 
71070
71238
  const __vue_component__$b = /*#__PURE__*/normalizeComponent(
71071
- {},
71239
+ { render: __vue_render__$9, staticRenderFns: __vue_staticRenderFns__$9 },
71072
71240
  __vue_inject_styles__$b,
71073
71241
  __vue_script__$a,
71074
71242
  __vue_scope_id__$b,
@@ -71080,123 +71248,110 @@ const __vue_script__$a = script$a;
71080
71248
  undefined
71081
71249
  );
71082
71250
 
71251
+ //
71083
71252
  var script$b = {
71084
- extends: __vue_component__$b,
71253
+ components: {
71254
+ Draggable
71255
+ },
71085
71256
  props: {
71086
- noTime: {
71087
- type: Boolean,
71088
- default: false
71257
+ value: {
71258
+ type: String,
71259
+ required: true
71089
71260
  },
71090
- noDate: {
71261
+ fields: {
71262
+ type: Array,
71263
+ required: true
71264
+ },
71265
+ labels: {
71266
+ type: Object,
71267
+ required: true
71268
+ },
71269
+ allowTextInput: {
71091
71270
  type: Boolean,
71092
71271
  default: false
71093
71272
  }
71094
71273
  },
71274
+
71275
+ data() {
71276
+ return {
71277
+ items: [],
71278
+ textInput: false
71279
+ };
71280
+ },
71281
+
71095
71282
  computed: {
71096
- date: {
71283
+ presortValue: {
71097
71284
  get() {
71098
- return this.getDate();
71285
+ return this.value;
71099
71286
  },
71100
71287
 
71101
- set(d) {
71102
- this.setDate(d);
71288
+ set(value) {
71289
+ this.$emit('input', value);
71103
71290
  }
71104
71291
 
71105
71292
  },
71106
- time: {
71107
- get() {
71108
- return this.getTime();
71109
- },
71110
71293
 
71111
- set(t) {
71112
- this.setTime(t);
71113
- }
71294
+ sortDirections() {
71295
+ return [{
71296
+ value: false,
71297
+ text: this.labels.ascending
71298
+ }, {
71299
+ value: true,
71300
+ text: this.labels.descending
71301
+ }];
71302
+ },
71114
71303
 
71304
+ sortedFields() {
71305
+ return [...this.fields.sort((a, b) => a.label.localeCompare(b.label))];
71115
71306
  }
71116
- },
71117
- methods: {
71118
- getTime() {
71119
- if (!this.value) {
71120
- return undefined;
71121
- }
71122
-
71123
- let dt = this.value.split(' ');
71124
71307
 
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
- },
71308
+ },
71309
+ watch: {
71310
+ value: {
71311
+ immediate: true,
71134
71312
 
71135
- setTime(t) {
71136
- if (this.noTime || !t || !t.length) {
71137
- return;
71138
- }
71313
+ handler(value) {
71314
+ if (value) {
71315
+ const sort = value.includes(',') ? value.split(',') : [value];
71316
+ this.items = sort.map(field => {
71317
+ let descending = false;
71139
71318
 
71140
- let tm = moment();
71141
- let date = this.getDate();
71319
+ if (field.includes(' ')) {
71320
+ field = field.split(' ')[0];
71321
+ descending = true;
71322
+ }
71142
71323
 
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');
71324
+ return {
71325
+ field,
71326
+ descending: !!descending
71327
+ };
71328
+ });
71329
+ } else {
71330
+ this.items = [{
71331
+ field: undefined,
71332
+ descending: false
71333
+ }];
71150
71334
  }
71151
-
71152
- tm = moment(date + ' ' + t, 'YYYY-MM-DD HH:mm');
71153
- tm = tm.format('YYYY-MM-DD HH:mm');
71154
71335
  }
71155
71336
 
71156
- this.$emit('input', tm);
71157
71337
  },
71338
+ items: {
71339
+ deep: true,
71158
71340
 
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];
71341
+ handler(items = [], oldItems = undefined) {
71342
+ if (oldItems) {
71343
+ this.$emit('input', items.filter(({
71344
+ field
71345
+ }) => field).map(({
71346
+ field,
71347
+ descending
71348
+ }) => {
71349
+ return descending ? `${field} DESC` : field;
71350
+ }).join(','));
71177
71351
  }
71178
71352
  }
71179
- },
71180
-
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
71353
 
71197
- this.$emit('input', dm);
71198
71354
  }
71199
-
71200
71355
  }
71201
71356
  };
71202
71357
 
@@ -71204,8 +71359,8 @@ var script$b = {
71204
71359
  const __vue_script__$b = script$b;
71205
71360
 
71206
71361
  /* 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 = [];
71362
+ 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)};
71363
+ var __vue_staticRenderFns__$a = [];
71209
71364
 
71210
71365
  /* style */
71211
71366
  const __vue_inject_styles__$c = undefined;
@@ -71224,7 +71379,7 @@ var __vue_staticRenderFns__$9 = [];
71224
71379
 
71225
71380
 
71226
71381
  const __vue_component__$c = /*#__PURE__*/normalizeComponent(
71227
- { render: __vue_render__$9, staticRenderFns: __vue_staticRenderFns__$9 },
71382
+ { render: __vue_render__$a, staticRenderFns: __vue_staticRenderFns__$a },
71228
71383
  __vue_inject_styles__$c,
71229
71384
  __vue_script__$b,
71230
71385
  __vue_scope_id__$c,
@@ -71237,45 +71392,24 @@ var __vue_staticRenderFns__$9 = [];
71237
71392
  );
71238
71393
 
71239
71394
  var script$c = {
71240
- extends: __vue_component__$b,
71241
71395
  props: {
71242
- simple: Boolean,
71243
- options: {
71244
- type: Array,
71245
- default: () => []
71396
+ value: {
71397
+ type: String,
71398
+ required: true
71246
71399
  },
71247
- optionsAppend: {
71248
- type: Array,
71249
- default: () => []
71400
+ simple: {
71401
+ type: Boolean,
71402
+ default: false
71250
71403
  }
71251
71404
  },
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
71405
  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: {
71406
+ cronValue: {
71273
71407
  get() {
71274
71408
  return this.value;
71275
71409
  },
71276
71410
 
71277
- set(v) {
71278
- this.$emit('input', v);
71411
+ set(value) {
71412
+ this.$emit('input', value);
71279
71413
  }
71280
71414
 
71281
71415
  }
@@ -71286,8 +71420,8 @@ var script$c = {
71286
71420
  const __vue_script__$c = script$c;
71287
71421
 
71288
71422
  /* 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 = [];
71423
+ var __vue_render__$b = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("div")};
71424
+ var __vue_staticRenderFns__$b = [];
71291
71425
 
71292
71426
  /* style */
71293
71427
  const __vue_inject_styles__$d = undefined;
@@ -71306,7 +71440,7 @@ var __vue_staticRenderFns__$a = [];
71306
71440
 
71307
71441
 
71308
71442
  const __vue_component__$d = /*#__PURE__*/normalizeComponent(
71309
- { render: __vue_render__$a, staticRenderFns: __vue_staticRenderFns__$a },
71443
+ { render: __vue_render__$b, staticRenderFns: __vue_staticRenderFns__$b },
71310
71444
  __vue_inject_styles__$d,
71311
71445
  __vue_script__$c,
71312
71446
  __vue_scope_id__$d,
@@ -71431,8 +71565,8 @@ var script$e = {
71431
71565
  const __vue_script__$e = script$e;
71432
71566
 
71433
71567
  /* 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 = [];
71568
+ 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)};
71569
+ var __vue_staticRenderFns__$c = [];
71436
71570
 
71437
71571
  /* style */
71438
71572
  const __vue_inject_styles__$f = function (inject) {
@@ -71454,7 +71588,7 @@ var __vue_staticRenderFns__$b = [];
71454
71588
 
71455
71589
 
71456
71590
  const __vue_component__$f = /*#__PURE__*/normalizeComponent(
71457
- { render: __vue_render__$b, staticRenderFns: __vue_staticRenderFns__$b },
71591
+ { render: __vue_render__$c, staticRenderFns: __vue_staticRenderFns__$c },
71458
71592
  __vue_inject_styles__$f,
71459
71593
  __vue_script__$e,
71460
71594
  __vue_scope_id__$f,
@@ -71480,8 +71614,8 @@ var script$f = {
71480
71614
  const __vue_script__$f = script$f;
71481
71615
 
71482
71616
  /* 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 = [];
71617
+ 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)])};
71618
+ var __vue_staticRenderFns__$d = [];
71485
71619
 
71486
71620
  /* style */
71487
71621
  const __vue_inject_styles__$g = undefined;
@@ -71500,7 +71634,7 @@ var __vue_staticRenderFns__$c = [];
71500
71634
 
71501
71635
 
71502
71636
  const __vue_component__$g = /*#__PURE__*/normalizeComponent(
71503
- { render: __vue_render__$c, staticRenderFns: __vue_staticRenderFns__$c },
71637
+ { render: __vue_render__$d, staticRenderFns: __vue_staticRenderFns__$d },
71504
71638
  __vue_inject_styles__$g,
71505
71639
  __vue_script__$f,
71506
71640
  __vue_scope_id__$g,
@@ -71587,8 +71721,8 @@ var script$g = {
71587
71721
  const __vue_script__$g = script$g;
71588
71722
 
71589
71723
  /* 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 = [];
71724
+ 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)],1)],1):_vm._e()],1)};
71725
+ var __vue_staticRenderFns__$e = [];
71592
71726
 
71593
71727
  /* style */
71594
71728
  const __vue_inject_styles__$h = undefined;
@@ -71607,7 +71741,7 @@ var __vue_staticRenderFns__$d = [];
71607
71741
 
71608
71742
 
71609
71743
  const __vue_component__$h = /*#__PURE__*/normalizeComponent(
71610
- { render: __vue_render__$d, staticRenderFns: __vue_staticRenderFns__$d },
71744
+ { render: __vue_render__$e, staticRenderFns: __vue_staticRenderFns__$e },
71611
71745
  __vue_inject_styles__$h,
71612
71746
  __vue_script__$g,
71613
71747
  __vue_scope_id__$h,
@@ -78603,8 +78737,8 @@ var script$i = {
78603
78737
  const __vue_script__$i = script$i;
78604
78738
 
78605
78739
  /* 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 = [];
78740
+ 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)])};
78741
+ var __vue_staticRenderFns__$f = [];
78608
78742
 
78609
78743
  /* style */
78610
78744
  const __vue_inject_styles__$j = undefined;
@@ -78623,7 +78757,7 @@ var __vue_staticRenderFns__$e = [];
78623
78757
 
78624
78758
 
78625
78759
  const __vue_component__$j = /*#__PURE__*/normalizeComponent(
78626
- { render: __vue_render__$e, staticRenderFns: __vue_staticRenderFns__$e },
78760
+ { render: __vue_render__$f, staticRenderFns: __vue_staticRenderFns__$f },
78627
78761
  __vue_inject_styles__$j,
78628
78762
  __vue_script__$i,
78629
78763
  __vue_scope_id__$j,
@@ -78713,8 +78847,8 @@ var script$j = {
78713
78847
  const __vue_script__$j = script$j;
78714
78848
 
78715
78849
  /* 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 = [];
78850
+ 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)};
78851
+ var __vue_staticRenderFns__$g = [];
78718
78852
 
78719
78853
  /* style */
78720
78854
  const __vue_inject_styles__$k = undefined;
@@ -78733,7 +78867,7 @@ var __vue_staticRenderFns__$f = [];
78733
78867
 
78734
78868
 
78735
78869
  const __vue_component__$k = /*#__PURE__*/normalizeComponent(
78736
- { render: __vue_render__$f, staticRenderFns: __vue_staticRenderFns__$f },
78870
+ { render: __vue_render__$g, staticRenderFns: __vue_staticRenderFns__$g },
78737
78871
  __vue_inject_styles__$k,
78738
78872
  __vue_script__$j,
78739
78873
  __vue_scope_id__$k,
@@ -78842,8 +78976,8 @@ var script$k = {
78842
78976
  const __vue_script__$k = script$k;
78843
78977
 
78844
78978
  /* 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 = [];
78979
+ 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)};
78980
+ var __vue_staticRenderFns__$h = [];
78847
78981
 
78848
78982
  /* style */
78849
78983
  const __vue_inject_styles__$l = undefined;
@@ -78862,7 +78996,7 @@ var __vue_staticRenderFns__$g = [];
78862
78996
 
78863
78997
 
78864
78998
  const __vue_component__$l = /*#__PURE__*/normalizeComponent(
78865
- { render: __vue_render__$g, staticRenderFns: __vue_staticRenderFns__$g },
78999
+ { render: __vue_render__$h, staticRenderFns: __vue_staticRenderFns__$h },
78866
79000
  __vue_inject_styles__$l,
78867
79001
  __vue_script__$k,
78868
79002
  __vue_scope_id__$l,
@@ -78968,13 +79102,13 @@ var script$l = {
78968
79102
  const __vue_script__$l = script$l;
78969
79103
 
78970
79104
  /* 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){
79105
+ 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
79106
  var commands = ref.commands;
78973
79107
  var isActive = ref.isActive;
78974
79108
  var getMarkAttrs = ref.getMarkAttrs;
78975
79109
  var getNodeAttrs = ref.getNodeAttrs;
78976
79110
  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 = [];
79111
+ var __vue_staticRenderFns__$i = [];
78978
79112
 
78979
79113
  /* style */
78980
79114
  const __vue_inject_styles__$m = undefined;
@@ -78993,7 +79127,7 @@ var __vue_staticRenderFns__$h = [];
78993
79127
 
78994
79128
 
78995
79129
  const __vue_component__$m = /*#__PURE__*/normalizeComponent(
78996
- { render: __vue_render__$h, staticRenderFns: __vue_staticRenderFns__$h },
79130
+ { render: __vue_render__$i, staticRenderFns: __vue_staticRenderFns__$i },
78997
79131
  __vue_inject_styles__$m,
78998
79132
  __vue_script__$l,
78999
79133
  __vue_scope_id__$m,
@@ -79080,8 +79214,8 @@ var script$m = {
79080
79214
  const __vue_script__$m = script$m;
79081
79215
 
79082
79216
  /* 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 = [];
79217
+ 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)};
79218
+ var __vue_staticRenderFns__$j = [];
79085
79219
 
79086
79220
  /* style */
79087
79221
  const __vue_inject_styles__$n = function (inject) {
@@ -79102,7 +79236,7 @@ var __vue_staticRenderFns__$i = [];
79102
79236
 
79103
79237
 
79104
79238
  const __vue_component__$n = /*#__PURE__*/normalizeComponent(
79105
- { render: __vue_render__$i, staticRenderFns: __vue_staticRenderFns__$i },
79239
+ { render: __vue_render__$j, staticRenderFns: __vue_staticRenderFns__$j },
79106
79240
  __vue_inject_styles__$n,
79107
79241
  __vue_script__$m,
79108
79242
  __vue_scope_id__$n,
@@ -79168,8 +79302,8 @@ var script$n = {
79168
79302
  const __vue_script__$n = script$n;
79169
79303
 
79170
79304
  /* 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 = [];
79305
+ 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"}})};
79306
+ var __vue_staticRenderFns__$k = [];
79173
79307
 
79174
79308
  /* style */
79175
79309
  const __vue_inject_styles__$o = undefined;
@@ -79188,7 +79322,7 @@ var __vue_staticRenderFns__$j = [];
79188
79322
 
79189
79323
 
79190
79324
  const __vue_component__$o = /*#__PURE__*/normalizeComponent(
79191
- { render: __vue_render__$j, staticRenderFns: __vue_staticRenderFns__$j },
79325
+ { render: __vue_render__$k, staticRenderFns: __vue_staticRenderFns__$k },
79192
79326
  __vue_inject_styles__$o,
79193
79327
  __vue_script__$n,
79194
79328
  __vue_scope_id__$o,
@@ -79271,8 +79405,8 @@ var script$o = {
79271
79405
  const __vue_script__$o = script$o;
79272
79406
 
79273
79407
  /* 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 = [];
79408
+ 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)};
79409
+ var __vue_staticRenderFns__$l = [];
79276
79410
 
79277
79411
  /* style */
79278
79412
  const __vue_inject_styles__$p = undefined;
@@ -79291,7 +79425,7 @@ var __vue_staticRenderFns__$k = [];
79291
79425
 
79292
79426
 
79293
79427
  const __vue_component__$p = /*#__PURE__*/normalizeComponent(
79294
- { render: __vue_render__$k, staticRenderFns: __vue_staticRenderFns__$k },
79428
+ { render: __vue_render__$l, staticRenderFns: __vue_staticRenderFns__$l },
79295
79429
  __vue_inject_styles__$p,
79296
79430
  __vue_script__$o,
79297
79431
  __vue_scope_id__$p,
@@ -79335,8 +79469,8 @@ var script$p = {
79335
79469
  const __vue_script__$p = script$p;
79336
79470
 
79337
79471
  /* 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 = [];
79472
+ 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)};
79473
+ var __vue_staticRenderFns__$m = [];
79340
79474
 
79341
79475
  /* style */
79342
79476
  const __vue_inject_styles__$q = undefined;
@@ -79355,7 +79489,7 @@ var __vue_staticRenderFns__$l = [];
79355
79489
 
79356
79490
 
79357
79491
  const __vue_component__$q = /*#__PURE__*/normalizeComponent(
79358
- { render: __vue_render__$l, staticRenderFns: __vue_staticRenderFns__$l },
79492
+ { render: __vue_render__$m, staticRenderFns: __vue_staticRenderFns__$m },
79359
79493
  __vue_inject_styles__$q,
79360
79494
  __vue_script__$p,
79361
79495
  __vue_scope_id__$q,
@@ -79609,8 +79743,8 @@ var script$q = {
79609
79743
  const __vue_script__$q = script$q;
79610
79744
 
79611
79745
  /* 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 = [];
79746
+ 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)};
79747
+ var __vue_staticRenderFns__$n = [];
79614
79748
 
79615
79749
  /* style */
79616
79750
  const __vue_inject_styles__$r = function (inject) {
@@ -79631,7 +79765,7 @@ var __vue_staticRenderFns__$m = [];
79631
79765
 
79632
79766
 
79633
79767
  const __vue_component__$r = /*#__PURE__*/normalizeComponent(
79634
- { render: __vue_render__$m, staticRenderFns: __vue_staticRenderFns__$m },
79768
+ { render: __vue_render__$n, staticRenderFns: __vue_staticRenderFns__$n },
79635
79769
  __vue_inject_styles__$r,
79636
79770
  __vue_script__$q,
79637
79771
  __vue_scope_id__$r,
@@ -79748,8 +79882,8 @@ var script$r = {
79748
79882
  const __vue_script__$r = script$r;
79749
79883
 
79750
79884
  /* 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 = [];
79885
+ 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)};
79886
+ var __vue_staticRenderFns__$o = [];
79753
79887
 
79754
79888
  /* style */
79755
79889
  const __vue_inject_styles__$s = undefined;
@@ -79768,7 +79902,7 @@ var __vue_staticRenderFns__$n = [];
79768
79902
 
79769
79903
 
79770
79904
  const __vue_component__$s = /*#__PURE__*/normalizeComponent(
79771
- { render: __vue_render__$n, staticRenderFns: __vue_staticRenderFns__$n },
79905
+ { render: __vue_render__$o, staticRenderFns: __vue_staticRenderFns__$o },
79772
79906
  __vue_inject_styles__$s,
79773
79907
  __vue_script__$r,
79774
79908
  __vue_scope_id__$s,
@@ -79871,8 +80005,8 @@ var script$t = {
79871
80005
  const __vue_script__$t = script$t;
79872
80006
 
79873
80007
  /* 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 = [];
80008
+ 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)])};
80009
+ var __vue_staticRenderFns__$p = [];
79876
80010
 
79877
80011
  /* style */
79878
80012
  const __vue_inject_styles__$u = undefined;
@@ -79891,7 +80025,7 @@ var __vue_staticRenderFns__$o = [];
79891
80025
 
79892
80026
 
79893
80027
  const __vue_component__$u = /*#__PURE__*/normalizeComponent(
79894
- { render: __vue_render__$o, staticRenderFns: __vue_staticRenderFns__$o },
80028
+ { render: __vue_render__$p, staticRenderFns: __vue_staticRenderFns__$p },
79895
80029
  __vue_inject_styles__$u,
79896
80030
  __vue_script__$t,
79897
80031
  __vue_scope_id__$u,
@@ -79912,8 +80046,8 @@ var script$u = {
79912
80046
  const __vue_script__$u = script$u;
79913
80047
 
79914
80048
  /* 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 = [];
80049
+ 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)])};
80050
+ var __vue_staticRenderFns__$q = [];
79917
80051
 
79918
80052
  /* style */
79919
80053
  const __vue_inject_styles__$v = undefined;
@@ -79932,7 +80066,7 @@ var __vue_staticRenderFns__$p = [];
79932
80066
 
79933
80067
 
79934
80068
  const __vue_component__$v = /*#__PURE__*/normalizeComponent(
79935
- { render: __vue_render__$p, staticRenderFns: __vue_staticRenderFns__$p },
80069
+ { render: __vue_render__$q, staticRenderFns: __vue_staticRenderFns__$q },
79936
80070
  __vue_inject_styles__$v,
79937
80071
  __vue_script__$u,
79938
80072
  __vue_scope_id__$v,
@@ -79981,8 +80115,8 @@ var script$v = {
79981
80115
  const __vue_script__$v = script$v;
79982
80116
 
79983
80117
  /* 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 = [];
80118
+ 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)};
80119
+ var __vue_staticRenderFns__$r = [];
79986
80120
 
79987
80121
  /* style */
79988
80122
  const __vue_inject_styles__$w = undefined;
@@ -80001,7 +80135,7 @@ var __vue_staticRenderFns__$q = [];
80001
80135
 
80002
80136
 
80003
80137
  const __vue_component__$w = /*#__PURE__*/normalizeComponent(
80004
- { render: __vue_render__$q, staticRenderFns: __vue_staticRenderFns__$q },
80138
+ { render: __vue_render__$r, staticRenderFns: __vue_staticRenderFns__$r },
80005
80139
  __vue_inject_styles__$w,
80006
80140
  __vue_script__$v,
80007
80141
  __vue_scope_id__$w,
@@ -80031,8 +80165,8 @@ var script$w = {
80031
80165
  const __vue_script__$w = script$w;
80032
80166
 
80033
80167
  /* 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 = [];
80168
+ 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)}})])};
80169
+ var __vue_staticRenderFns__$s = [];
80036
80170
 
80037
80171
  /* style */
80038
80172
  const __vue_inject_styles__$x = undefined;
@@ -80051,7 +80185,7 @@ var __vue_staticRenderFns__$r = [];
80051
80185
 
80052
80186
 
80053
80187
  const __vue_component__$x = /*#__PURE__*/normalizeComponent(
80054
- { render: __vue_render__$r, staticRenderFns: __vue_staticRenderFns__$r },
80188
+ { render: __vue_render__$s, staticRenderFns: __vue_staticRenderFns__$s },
80055
80189
  __vue_inject_styles__$x,
80056
80190
  __vue_script__$w,
80057
80191
  __vue_scope_id__$x,
@@ -80141,8 +80275,8 @@ var script$x = {
80141
80275
  const __vue_script__$x = script$x;
80142
80276
 
80143
80277
  /* 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 = [];
80278
+ 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)};
80279
+ var __vue_staticRenderFns__$t = [];
80146
80280
 
80147
80281
  /* style */
80148
80282
  const __vue_inject_styles__$y = undefined;
@@ -80161,7 +80295,7 @@ var __vue_staticRenderFns__$s = [];
80161
80295
 
80162
80296
 
80163
80297
  const __vue_component__$y = /*#__PURE__*/normalizeComponent(
80164
- { render: __vue_render__$s, staticRenderFns: __vue_staticRenderFns__$s },
80298
+ { render: __vue_render__$t, staticRenderFns: __vue_staticRenderFns__$t },
80165
80299
  __vue_inject_styles__$y,
80166
80300
  __vue_script__$x,
80167
80301
  __vue_scope_id__$y,
@@ -80240,7 +80374,7 @@ const definitions = {
80240
80374
  }
80241
80375
  else {
80242
80376
  // Resolve recordID
80243
- if (pType(v, 'record') === 'String') {
80377
+ if (pType(v, 'record') === 'ID') {
80244
80378
  recordID = record;
80245
80379
  }
80246
80380
  // Resolve namespaceID
@@ -80290,9 +80424,12 @@ const definitions = {
80290
80424
  pageID = pp[0].pageID;
80291
80425
  // @ts-ignore
80292
80426
  if (this.$root.$options.name === 'compose') {
80293
- let name = 'page.record.edit';
80294
- if (!edit) {
80295
- name = 'page.record';
80427
+ if (!edit && !recordID) {
80428
+ throw new Error('invalid record page prompt configuration');
80429
+ }
80430
+ let name = 'page.record';
80431
+ if (edit) {
80432
+ name += recordID ? '.edit' : '.create';
80296
80433
  }
80297
80434
  // If name and params match, make sure to refresh page instead of push
80298
80435
  // @ts-ignore
@@ -80442,12 +80579,12 @@ var script$y = {
80442
80579
  const __vue_script__$y = script$y;
80443
80580
 
80444
80581
  /* 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){
80582
+ 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
80583
  var prompt = ref.prompt;
80447
80584
  var component = ref.component;
80448
80585
  var passive = ref.passive;
80449
80586
  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 = [];
80587
+ var __vue_staticRenderFns__$u = [];
80451
80588
 
80452
80589
  /* style */
80453
80590
  const __vue_inject_styles__$z = function (inject) {
@@ -80468,7 +80605,7 @@ var __vue_staticRenderFns__$t = [];
80468
80605
 
80469
80606
 
80470
80607
  const __vue_component__$z = /*#__PURE__*/normalizeComponent(
80471
- { render: __vue_render__$t, staticRenderFns: __vue_staticRenderFns__$t },
80608
+ { render: __vue_render__$u, staticRenderFns: __vue_staticRenderFns__$u },
80472
80609
  __vue_inject_styles__$z,
80473
80610
  __vue_script__$y,
80474
80611
  __vue_scope_id__$z,
@@ -80548,13 +80685,13 @@ var script$z = {
80548
80685
  const __vue_script__$z = script$z;
80549
80686
 
80550
80687
  /* 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){
80688
+ 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
80689
  var key = ref.key;
80553
80690
  var title = ref.title;
80554
80691
  var age = ref.age;
80555
80692
  var prompt = ref.prompt;
80556
80693
  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 = [];
80694
+ var __vue_staticRenderFns__$v = [];
80558
80695
 
80559
80696
  /* style */
80560
80697
  const __vue_inject_styles__$A = undefined;
@@ -80573,7 +80710,7 @@ var __vue_staticRenderFns__$u = [];
80573
80710
 
80574
80711
 
80575
80712
  const __vue_component__$A = /*#__PURE__*/normalizeComponent(
80576
- { render: __vue_render__$u, staticRenderFns: __vue_staticRenderFns__$u },
80713
+ { render: __vue_render__$v, staticRenderFns: __vue_staticRenderFns__$v },
80577
80714
  __vue_inject_styles__$A,
80578
80715
  __vue_script__$z,
80579
80716
  __vue_scope_id__$A,
@@ -80607,8 +80744,8 @@ var script$A = {
80607
80744
  const __vue_script__$A = script$A;
80608
80745
 
80609
80746
  /* 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 = [];
80747
+ 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)};
80748
+ var __vue_staticRenderFns__$w = [];
80612
80749
 
80613
80750
  /* style */
80614
80751
  const __vue_inject_styles__$B = undefined;
@@ -80627,7 +80764,7 @@ var __vue_staticRenderFns__$v = [];
80627
80764
 
80628
80765
 
80629
80766
  const __vue_component__$B = /*#__PURE__*/normalizeComponent(
80630
- { render: __vue_render__$v, staticRenderFns: __vue_staticRenderFns__$v },
80767
+ { render: __vue_render__$w, staticRenderFns: __vue_staticRenderFns__$w },
80631
80768
  __vue_inject_styles__$B,
80632
80769
  __vue_script__$A,
80633
80770
  __vue_scope_id__$B,
@@ -80639,7 +80776,16 @@ var __vue_staticRenderFns__$v = [];
80639
80776
  undefined
80640
80777
  );
80641
80778
 
80642
- const variants = ['primary', 'secondary', 'success', 'warning', 'danger', 'info', 'light', 'dark'];
80779
+ const variants = [
80780
+ { value: 'primary', text: 'Primary' },
80781
+ { value: 'secondary', text: 'Secondary' },
80782
+ { value: 'success', text: 'Success' },
80783
+ { value: 'warning', text: 'Warning' },
80784
+ { value: 'danger', text: 'Danger' },
80785
+ { value: 'info', text: 'Info' },
80786
+ { value: 'light', text: 'Light' },
80787
+ { value: 'dark', text: 'Dark' },
80788
+ ];
80643
80789
  const prompts = Object.freeze([{
80644
80790
  ref: 'redirect',
80645
80791
  meta: { short: 'Redirect user to an outside URL' },
@@ -80672,7 +80818,7 @@ const prompts = Object.freeze([{
80672
80818
  parameters: [
80673
80819
  { name: 'title', types: ['String'] },
80674
80820
  { name: 'message', types: ['String'], required: true },
80675
- { name: 'variant', types: ['String'], meta: { visual: { options: variants } } },
80821
+ { name: 'variant', types: ['String'], meta: { visual: { input: { type: 'select', properties: { options: variants } } } } },
80676
80822
  { name: 'timeout', types: ['Integer'], meta: { description: 'How long do we show the notification in seconds' } },
80677
80823
  ],
80678
80824
  }, {
@@ -80682,7 +80828,7 @@ const prompts = Object.freeze([{
80682
80828
  { name: 'title', types: ['String'] },
80683
80829
  { name: 'message', types: ['String'], required: true },
80684
80830
  { name: 'buttonLabel', types: ['String'] },
80685
- { name: 'buttonVariant', types: ['String'], meta: { visual: { options: variants } } },
80831
+ { name: 'buttonVariant', types: ['String'], meta: { visual: { input: { type: 'select', properties: { options: variants } } } } },
80686
80832
  { name: 'buttonValue', types: ['Any'] },
80687
80833
  ],
80688
80834
  }, {
@@ -80692,10 +80838,10 @@ const prompts = Object.freeze([{
80692
80838
  { name: 'title', types: ['String'] },
80693
80839
  { name: 'message', types: ['String'], required: true },
80694
80840
  { name: 'confirmButtonLabel', types: ['String'] },
80695
- { name: 'confirmButtonVariant', types: ['String'], meta: { visual: { options: variants } } },
80841
+ { name: 'confirmButtonVariant', types: ['String'], meta: { visual: { input: { type: 'select', properties: { options: variants } } } } },
80696
80842
  { name: 'confirmButtonValue', types: ['Any'] },
80697
80843
  { name: 'rejectButtonLabel', types: ['String'] },
80698
- { name: 'rejectButtonVariant', types: ['String'], meta: { visual: { options: variants } } },
80844
+ { name: 'rejectButtonVariant', types: ['String'], meta: { visual: { input: { type: 'select', properties: { options: variants } } } } },
80699
80845
  { name: 'rejectButtonValue', types: ['Any'] },
80700
80846
  ],
80701
80847
  results: [
@@ -80706,7 +80852,7 @@ const prompts = Object.freeze([{
80706
80852
  meta: { short: 'Prompt user with a single input' },
80707
80853
  parameters: [
80708
80854
  { name: 'title', types: ['String'] },
80709
- { name: 'variant', types: ['String'], meta: { visual: { options: variants } } },
80855
+ { name: 'variant', types: ['String'], meta: { visual: { input: { type: 'select', properties: { options: variants } } } } },
80710
80856
  { name: 'message', types: ['String'], required: true },
80711
80857
  { name: 'label', types: ['String'] },
80712
80858
  {
@@ -80714,7 +80860,15 @@ const prompts = Object.freeze([{
80714
80860
  types: ['String'],
80715
80861
  meta: {
80716
80862
  visual: {
80717
- options: ['text', 'number', 'email', 'password', 'search', 'date', 'time'],
80863
+ options: [
80864
+ { value: 'text', text: 'Text' },
80865
+ { value: 'number', text: 'Number' },
80866
+ { value: 'email', text: 'Email' },
80867
+ { value: 'password', text: 'Password' },
80868
+ { value: 'search', text: 'Search' },
80869
+ { value: 'date', text: 'Date' },
80870
+ { value: 'time', text: 'Time' },
80871
+ ],
80718
80872
  },
80719
80873
  },
80720
80874
  },
@@ -80728,7 +80882,7 @@ const prompts = Object.freeze([{
80728
80882
  meta: { short: 'Prompt user with options' },
80729
80883
  parameters: [
80730
80884
  { name: 'title', types: ['String'] },
80731
- { name: 'variant', types: ['String'], meta: { visual: { options: variants } } },
80885
+ { name: 'variant', types: ['String'], meta: { visual: { input: { type: 'select', properties: { options: variants } } } } },
80732
80886
  { name: 'message', types: ['String'], required: true },
80733
80887
  { name: 'label', types: ['String'] },
80734
80888
  {
@@ -80736,7 +80890,10 @@ const prompts = Object.freeze([{
80736
80890
  types: ['String'],
80737
80891
  meta: {
80738
80892
  visual: {
80739
- options: ['select', 'radio'],
80893
+ options: [
80894
+ { value: 'select', text: 'Select' },
80895
+ { value: 'radio', text: 'Radio' },
80896
+ ],
80740
80897
  },
80741
80898
  },
80742
80899
  },
@@ -80775,8 +80932,8 @@ var script$B = {
80775
80932
  const __vue_script__$B = script$B;
80776
80933
 
80777
80934
  /* 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 = [];
80935
+ 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()])};
80936
+ var __vue_staticRenderFns__$x = [];
80780
80937
 
80781
80938
  /* style */
80782
80939
  const __vue_inject_styles__$C = function (inject) {
@@ -80797,7 +80954,7 @@ var __vue_staticRenderFns__$w = [];
80797
80954
 
80798
80955
 
80799
80956
  const __vue_component__$C = /*#__PURE__*/normalizeComponent(
80800
- { render: __vue_render__$w, staticRenderFns: __vue_staticRenderFns__$w },
80957
+ { render: __vue_render__$x, staticRenderFns: __vue_staticRenderFns__$x },
80801
80958
  __vue_inject_styles__$C,
80802
80959
  __vue_script__$B,
80803
80960
  __vue_scope_id__$C,
@@ -81005,10 +81162,10 @@ var script$C = {
81005
81162
  const __vue_script__$C = script$C;
81006
81163
 
81007
81164
  /* 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:{
81165
+ 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
81166
  'expanded': _vm.sidebarPinned,
81010
81167
  }})],_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 = [];
81168
+ var __vue_staticRenderFns__$y = [];
81012
81169
 
81013
81170
  /* style */
81014
81171
  const __vue_inject_styles__$D = function (inject) {
@@ -81029,7 +81186,7 @@ var __vue_staticRenderFns__$x = [];
81029
81186
 
81030
81187
 
81031
81188
  const __vue_component__$D = /*#__PURE__*/normalizeComponent(
81032
- { render: __vue_render__$x, staticRenderFns: __vue_staticRenderFns__$x },
81189
+ { render: __vue_render__$y, staticRenderFns: __vue_staticRenderFns__$y },
81033
81190
  __vue_inject_styles__$D,
81034
81191
  __vue_script__$C,
81035
81192
  __vue_scope_id__$D,
@@ -81339,8 +81496,8 @@ var script$D = {
81339
81496
  const __vue_script__$D = script$D;
81340
81497
 
81341
81498
  /* 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 = [];
81499
+ 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)])};
81500
+ var __vue_staticRenderFns__$z = [];
81344
81501
 
81345
81502
  /* style */
81346
81503
  const __vue_inject_styles__$E = function (inject) {
@@ -81362,7 +81519,7 @@ var __vue_staticRenderFns__$y = [];
81362
81519
 
81363
81520
 
81364
81521
  const __vue_component__$E = /*#__PURE__*/normalizeComponent(
81365
- { render: __vue_render__$y, staticRenderFns: __vue_staticRenderFns__$y },
81522
+ { render: __vue_render__$z, staticRenderFns: __vue_staticRenderFns__$z },
81366
81523
  __vue_inject_styles__$E,
81367
81524
  __vue_script__$D,
81368
81525
  __vue_scope_id__$E,
@@ -81501,15 +81658,19 @@ var script$E = {
81501
81658
  },
81502
81659
 
81503
81660
  // 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;
81661
+ showChildren({
81662
+ params = {},
81663
+ children = []
81664
+ }) {
81665
+ const partialParamsMatch = Object.entries(params).some(([key, value]) => {
81666
+ return this.$route.params[key] === value;
81667
+ });
81668
+
81669
+ if (partialParamsMatch) {
81670
+ return partialParamsMatch;
81507
81671
  }
81508
81672
 
81509
- return children.map(({
81510
- page,
81511
- children
81512
- }) => this.showChildren(page, children)).some(isOpen => isOpen);
81673
+ return children.map(c => this.showChildren(c)).some(isOpen => isOpen);
81513
81674
  }
81514
81675
 
81515
81676
  }
@@ -81519,21 +81680,21 @@ var script$E = {
81519
81680
  const __vue_script__$E = script$E;
81520
81681
 
81521
81682
  /* 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){
81683
+ 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
81684
  var page = ref.page; if ( page === void 0 ) page = {};
81524
81685
  var params = ref.params; if ( params === void 0 ) params = {};
81525
81686
  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 = [];
81687
+ 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)};
81688
+ var __vue_staticRenderFns__$A = [];
81528
81689
 
81529
81690
  /* style */
81530
81691
  const __vue_inject_styles__$F = function (inject) {
81531
81692
  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 });
81693
+ 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
81694
 
81534
81695
  };
81535
81696
  /* scoped */
81536
- const __vue_scope_id__$F = "data-v-6ae03c14";
81697
+ const __vue_scope_id__$F = "data-v-16ceb9b5";
81537
81698
  /* module identifier */
81538
81699
  const __vue_module_identifier__$F = undefined;
81539
81700
  /* functional template */
@@ -81545,7 +81706,7 @@ var __vue_staticRenderFns__$z = [];
81545
81706
 
81546
81707
 
81547
81708
  const __vue_component__$F = /*#__PURE__*/normalizeComponent(
81548
- { render: __vue_render__$z, staticRenderFns: __vue_staticRenderFns__$z },
81709
+ { render: __vue_render__$A, staticRenderFns: __vue_staticRenderFns__$A },
81549
81710
  __vue_inject_styles__$F,
81550
81711
  __vue_script__$E,
81551
81712
  __vue_scope_id__$F,
@@ -81705,8 +81866,8 @@ var script$F = {
81705
81866
  const __vue_script__$F = script$F;
81706
81867
 
81707
81868
  /* 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 = [];
81869
+ 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()};
81870
+ var __vue_staticRenderFns__$B = [];
81710
81871
 
81711
81872
  /* style */
81712
81873
  const __vue_inject_styles__$G = function (inject) {
@@ -81727,7 +81888,7 @@ var __vue_staticRenderFns__$A = [];
81727
81888
 
81728
81889
 
81729
81890
  const __vue_component__$G = /*#__PURE__*/normalizeComponent(
81730
- { render: __vue_render__$A, staticRenderFns: __vue_staticRenderFns__$A },
81891
+ { render: __vue_render__$B, staticRenderFns: __vue_staticRenderFns__$B },
81731
81892
  __vue_inject_styles__$G,
81732
81893
  __vue_script__$F,
81733
81894
  __vue_scope_id__$G,
@@ -81794,8 +81955,8 @@ var script$G = {
81794
81955
  const __vue_script__$G = script$G;
81795
81956
 
81796
81957
  /* 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 = [];
81958
+ 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 ")])])};
81959
+ var __vue_staticRenderFns__$C = [];
81799
81960
 
81800
81961
  /* style */
81801
81962
  const __vue_inject_styles__$H = undefined;
@@ -81814,7 +81975,7 @@ var __vue_staticRenderFns__$B = [];
81814
81975
 
81815
81976
 
81816
81977
  const __vue_component__$H = /*#__PURE__*/normalizeComponent(
81817
- { render: __vue_render__$B, staticRenderFns: __vue_staticRenderFns__$B },
81978
+ { render: __vue_render__$C, staticRenderFns: __vue_staticRenderFns__$C },
81818
81979
  __vue_inject_styles__$H,
81819
81980
  __vue_script__$G,
81820
81981
  __vue_scope_id__$H,
@@ -81883,8 +82044,8 @@ var script$I = {
81883
82044
  const __vue_script__$I = script$I;
81884
82045
 
81885
82046
  /* 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 = [];
82047
+ 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)}})])};
82048
+ var __vue_staticRenderFns__$D = [];
81888
82049
 
81889
82050
  /* style */
81890
82051
  const __vue_inject_styles__$J = undefined;
@@ -81903,7 +82064,7 @@ var __vue_staticRenderFns__$C = [];
81903
82064
 
81904
82065
 
81905
82066
  const __vue_component__$J = /*#__PURE__*/normalizeComponent(
81906
- { render: __vue_render__$C, staticRenderFns: __vue_staticRenderFns__$C },
82067
+ { render: __vue_render__$D, staticRenderFns: __vue_staticRenderFns__$D },
81907
82068
  __vue_inject_styles__$J,
81908
82069
  __vue_script__$I,
81909
82070
  __vue_scope_id__$J,
@@ -81931,8 +82092,8 @@ var script$J = {
81931
82092
  const __vue_script__$J = script$J;
81932
82093
 
81933
82094
  /* 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 = [];
82095
+ 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)};
82096
+ var __vue_staticRenderFns__$E = [];
81936
82097
 
81937
82098
  /* style */
81938
82099
  const __vue_inject_styles__$K = undefined;
@@ -81951,7 +82112,7 @@ var __vue_staticRenderFns__$D = [];
81951
82112
 
81952
82113
 
81953
82114
  const __vue_component__$K = /*#__PURE__*/normalizeComponent(
81954
- { render: __vue_render__$D, staticRenderFns: __vue_staticRenderFns__$D },
82115
+ { render: __vue_render__$E, staticRenderFns: __vue_staticRenderFns__$E },
81955
82116
  __vue_inject_styles__$K,
81956
82117
  __vue_script__$J,
81957
82118
  __vue_scope_id__$K,
@@ -81971,8 +82132,8 @@ var script$K = {
81971
82132
  const __vue_script__$K = script$K;
81972
82133
 
81973
82134
  /* 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 = [];
82135
+ 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)};
82136
+ var __vue_staticRenderFns__$F = [];
81976
82137
 
81977
82138
  /* style */
81978
82139
  const __vue_inject_styles__$L = undefined;
@@ -81991,7 +82152,7 @@ var __vue_staticRenderFns__$E = [];
81991
82152
 
81992
82153
 
81993
82154
  const __vue_component__$L = /*#__PURE__*/normalizeComponent(
81994
- { render: __vue_render__$E, staticRenderFns: __vue_staticRenderFns__$E },
82155
+ { render: __vue_render__$F, staticRenderFns: __vue_staticRenderFns__$F },
81995
82156
  __vue_inject_styles__$L,
81996
82157
  __vue_script__$K,
81997
82158
  __vue_scope_id__$L,
@@ -82036,8 +82197,8 @@ var script$L = {
82036
82197
  const __vue_script__$L = script$L;
82037
82198
 
82038
82199
  /* 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 = [];
82200
+ 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)};
82201
+ var __vue_staticRenderFns__$G = [];
82041
82202
 
82042
82203
  /* style */
82043
82204
  const __vue_inject_styles__$M = undefined;
@@ -82056,7 +82217,7 @@ var __vue_staticRenderFns__$F = [];
82056
82217
 
82057
82218
 
82058
82219
  const __vue_component__$M = /*#__PURE__*/normalizeComponent(
82059
- { render: __vue_render__$F, staticRenderFns: __vue_staticRenderFns__$F },
82220
+ { render: __vue_render__$G, staticRenderFns: __vue_staticRenderFns__$G },
82060
82221
  __vue_inject_styles__$M,
82061
82222
  __vue_script__$L,
82062
82223
  __vue_scope_id__$M,
@@ -82111,11 +82272,11 @@ var script$M = {
82111
82272
  const __vue_script__$M = script$M;
82112
82273
 
82113
82274
  /* 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){
82275
+ 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
82276
  var name = ref[0];
82116
82277
  var act = ref[1];
82117
82278
  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 = [];
82279
+ var __vue_staticRenderFns__$H = [];
82119
82280
 
82120
82281
  /* style */
82121
82282
  const __vue_inject_styles__$N = function (inject) {
@@ -82136,7 +82297,7 @@ var __vue_staticRenderFns__$G = [];
82136
82297
 
82137
82298
 
82138
82299
  const __vue_component__$N = /*#__PURE__*/normalizeComponent(
82139
- { render: __vue_render__$G, staticRenderFns: __vue_staticRenderFns__$G },
82300
+ { render: __vue_render__$H, staticRenderFns: __vue_staticRenderFns__$H },
82140
82301
  __vue_inject_styles__$N,
82141
82302
  __vue_script__$M,
82142
82303
  __vue_scope_id__$N,
@@ -82183,8 +82344,8 @@ var script$N = {
82183
82344
  const __vue_script__$N = script$N;
82184
82345
 
82185
82346
  /* 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 = [];
82347
+ 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)};
82348
+ var __vue_staticRenderFns__$I = [];
82188
82349
 
82189
82350
  /* style */
82190
82351
  const __vue_inject_styles__$O = function (inject) {
@@ -82205,7 +82366,7 @@ var __vue_staticRenderFns__$H = [];
82205
82366
 
82206
82367
 
82207
82368
  const __vue_component__$O = /*#__PURE__*/normalizeComponent(
82208
- { render: __vue_render__$H, staticRenderFns: __vue_staticRenderFns__$H },
82369
+ { render: __vue_render__$I, staticRenderFns: __vue_staticRenderFns__$I },
82209
82370
  __vue_inject_styles__$O,
82210
82371
  __vue_script__$N,
82211
82372
  __vue_scope_id__$O,
@@ -82244,36 +82405,46 @@ var __vue_staticRenderFns__$H = [];
82244
82405
  //
82245
82406
  //
82246
82407
  //
82408
+ //
82409
+ //
82410
+ //
82411
+ //
82412
+ //
82413
+ //
82414
+ //
82415
+ //
82416
+ //
82417
+ //
82247
82418
  var script$O = {
82248
- name: "FieldItem",
82419
+ name: 'CItemPickerItem',
82249
82420
  props: {
82250
- field: {
82421
+ item: {
82251
82422
  type: Object,
82252
82423
  required: true
82253
82424
  },
82254
- isSelected: {
82255
- type: Boolean,
82256
- required: true
82425
+ textField: {
82426
+ type: String,
82427
+ default: 'text'
82257
82428
  },
82258
- selectedFields: {
82259
- type: Array,
82260
- required: true
82429
+ selected: {
82430
+ type: Boolean
82261
82431
  },
82262
- systemFieldLabel: {
82263
- type: String,
82264
- required: true
82432
+ disabled: {
82433
+ type: Boolean
82434
+ },
82435
+ disabledDragging: {
82436
+ type: Boolean
82437
+ },
82438
+ disabledSorting: {
82439
+ type: Boolean
82440
+ },
82441
+ hideIcons: {
82442
+ type: Boolean
82265
82443
  }
82266
82444
  },
82267
82445
  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;
82446
+ _hideIcons() {
82447
+ return !this.disabled && !this.hideIcons;
82277
82448
  }
82278
82449
 
82279
82450
  }
@@ -82283,17 +82454,17 @@ var script$O = {
82283
82454
  const __vue_script__$O = script$O;
82284
82455
 
82285
82456
  /* 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 = [];
82457
+ 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)};
82458
+ var __vue_staticRenderFns__$J = [];
82288
82459
 
82289
82460
  /* style */
82290
82461
  const __vue_inject_styles__$P = function (inject) {
82291
82462
  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 });
82463
+ 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
82464
 
82294
82465
  };
82295
82466
  /* scoped */
82296
- const __vue_scope_id__$P = "data-v-475bd41a";
82467
+ const __vue_scope_id__$P = "data-v-70b6001a";
82297
82468
  /* module identifier */
82298
82469
  const __vue_module_identifier__$P = undefined;
82299
82470
  /* functional template */
@@ -82305,7 +82476,7 @@ var __vue_staticRenderFns__$I = [];
82305
82476
 
82306
82477
 
82307
82478
  const __vue_component__$P = /*#__PURE__*/normalizeComponent(
82308
- { render: __vue_render__$I, staticRenderFns: __vue_staticRenderFns__$I },
82479
+ { render: __vue_render__$J, staticRenderFns: __vue_staticRenderFns__$J },
82309
82480
  __vue_inject_styles__$P,
82310
82481
  __vue_script__$O,
82311
82482
  __vue_scope_id__$P,
@@ -82319,161 +82490,246 @@ var __vue_staticRenderFns__$I = [];
82319
82490
 
82320
82491
  //
82321
82492
  var script$P = {
82493
+ name: 'CItemPicker',
82322
82494
  components: {
82323
- draggable,
82324
- FieldItem: __vue_component__$P
82495
+ draggable: Draggable,
82496
+ CItemPickerItem: __vue_component__$P
82325
82497
  },
82326
82498
  props: {
82327
- module: {
82328
- type: Object,
82499
+ /**
82500
+ * List of all items, available and selected/picked
82501
+ *
82502
+ * Internally, we'll build 2 arrays for each group (available + selected)
82503
+ * and work with them.
82504
+ * On the outside, we'll always deal input array of (full) items and
82505
+ * array of selected/picked values of those items.
82506
+ *
82507
+ * This component mimics the behaviour of <b-form-select> component from
82508
+ * Vue Bootstrap and could serve as a drop-in replacement!
82509
+ */
82510
+ options: {
82511
+ type: Array,
82329
82512
  required: true
82330
82513
  },
82331
- fields: {
82514
+
82515
+ /**
82516
+ * List of values that can be found in the items
82517
+ */
82518
+ value: {
82332
82519
  type: Array,
82333
82520
  required: true
82334
82521
  },
82335
- disabled: {
82336
- type: Boolean,
82337
- default: false
82522
+ valueField: {
82523
+ type: String,
82524
+ default: 'value'
82338
82525
  },
82339
- disabledTypes: {
82340
- type: Array,
82341
- default: () => []
82526
+ textField: {
82527
+ type: String,
82528
+ default: 'text'
82342
82529
  },
82343
- disableSystemFields: {
82344
- type: Boolean,
82345
- default: false
82530
+ labels: {
82531
+ type: Object,
82532
+ default: () => ({
82533
+ searchPlaceholder: 'Filter items',
82534
+ availableItems: 'Available',
82535
+ selectAllItems: 'Select all',
82536
+ selectedItems: 'Selected',
82537
+ unselectAllItems: 'Unselect all',
82538
+ noItemsFound: 'No items found'
82539
+ })
82346
82540
  },
82347
- systemFields: {
82348
- type: Array,
82349
- default: null
82541
+ disabled: {
82542
+ type: Boolean
82350
82543
  },
82351
- fieldSubset: {
82352
- type: Array,
82353
- default: null
82544
+ disabledFilter: {
82545
+ type: Boolean
82354
82546
  },
82355
- group: {
82356
- type: String,
82357
- default: 'fields'
82547
+ disabledSorting: {
82548
+ type: Boolean
82358
82549
  },
82359
- maxHeight: {
82360
- type: String,
82361
- default: 'max-height: 65vh;'
82550
+ disabledDragging: {
82551
+ type: Boolean
82362
82552
  },
82363
- labels: {
82364
- type: Object,
82365
- required: true
82553
+ hideIcons: {
82554
+ type: Boolean
82555
+ },
82556
+ hideFilter: {
82557
+ type: Boolean
82366
82558
  }
82367
82559
  },
82368
82560
 
82369
82561
  data() {
82370
82562
  return {
82371
- modules: [],
82372
- query: ''
82563
+ query: '',
82564
+ available: [],
82565
+ selected: []
82373
82566
  };
82374
82567
  },
82375
82568
 
82376
82569
  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);
82570
+ _disabledFilter() {
82571
+ return this.disabled || this.disabledFilter;
82572
+ },
82384
82573
 
82385
- if (field) {
82386
- fields.push(field);
82387
- }
82574
+ _disabledSorting() {
82575
+ return this.disabled || this.disabledSorting;
82576
+ },
82388
82577
 
82389
- return fields;
82390
- }, []);
82578
+ /**
82579
+ * Provides list of all available items, filtered by query
82580
+ * and a setter for draggable component to update available items on drag
82581
+ */
82582
+ filteredAvailable: {
82583
+ get() {
82584
+ const q = this.query.toLowerCase();
82585
+ return this.available.filter(i => i.text.toLowerCase().indexOf(q) > -1);
82391
82586
  },
82392
82587
 
82393
- set(f) {
82394
- this.$emit('update:fields', f);
82588
+ set(items) {
82589
+ this.available = items;
82395
82590
  }
82396
82591
 
82397
82592
  },
82398
82593
 
82399
- allFields() {
82400
- let mFields = [];
82594
+ /**
82595
+ * Provides list of all selected items, filtered by query
82596
+ * and a setter for draggable component to update selected items on drag
82597
+ */
82598
+ filteredSelected: {
82599
+ get() {
82600
+ const q = this.query.toLowerCase();
82601
+ return this.selected.filter(i => i.text.toLowerCase().indexOf(q) > -1);
82602
+ },
82401
82603
 
82402
- if (this.fieldSubset) {
82403
- mFields = this.module.filterFields(this.fieldSubset);
82404
- } else {
82405
- mFields = this.module.fields;
82604
+ set(items) {
82605
+ this.selected = items;
82406
82606
  }
82407
82607
 
82408
- if (this.disabledTypes.length > 0) {
82409
- mFields = mFields.filter(({
82410
- kind
82411
- }) => !this.disabledTypes.find(t => t === kind));
82412
- }
82608
+ }
82609
+ },
82610
+ watch: {
82611
+ /**
82612
+ * Update parent component (if needed)
82613
+ * @param v
82614
+ */
82615
+ selected(items) {
82616
+ const value = items.map(i => i[this.valueField]);
82617
+ /**
82618
+ * Make sure we do not fall into an infinite loop
82619
+ *
82620
+ * If we emit update/input event, parent will update value/v-modal
82621
+ * and watcher function for value will trigger the sync and recreate
82622
+ * the selected array and trigger this watcher!
82623
+ */
82413
82624
 
82414
- let sysFields = [];
82625
+ if (value.length === this.value.length) {
82626
+ if (value.filter(v => !this.value.includes(v)).length === 0) {
82627
+ return;
82628
+ }
82629
+ } // satisfy value.sync
82415
82630
 
82416
- if (!this.disableSystemFields) {
82417
- sysFields = this.module.systemFields();
82418
82631
 
82419
- if (this.systemFields) {
82420
- sysFields = sysFields.filter(({
82421
- name
82422
- }) => this.systemFields.find(sf => sf === name));
82423
- }
82424
- } else {
82425
- mFields = mFields.filter(({
82426
- isSystem
82427
- }) => !isSystem);
82632
+ this.$emit('update:value', value); // satisfy v-model
82633
+
82634
+ this.$emit('input', value);
82635
+ },
82636
+
82637
+ options: {
82638
+ deep: true,
82639
+ immediate: true,
82640
+
82641
+ handler() {
82642
+ this.sync();
82428
82643
  }
82429
82644
 
82430
- return [...[...mFields].sort((a, b) => a.label.localeCompare(b.label)), ...sysFields];
82431
82645
  },
82432
82646
 
82433
- allSelected() {
82434
- return this.availableFields.length > 0;
82647
+ value(vv) {
82648
+ this.sync();
82649
+ }
82650
+
82651
+ },
82652
+
82653
+ created() {
82654
+ this.options.forEach(o => {
82655
+ if (typeof o !== 'object') {
82656
+ throw new Error('expecting array of objects for options prop');
82657
+ }
82658
+ });
82659
+ },
82660
+
82661
+ methods: {
82662
+ _disableDragging(e) {
82663
+ if (this.disabledDragging && e.to !== e.from) {
82664
+ return false;
82665
+ }
82435
82666
  },
82436
82667
 
82437
- allUnselected() {
82438
- return this.selectedFields.length > 0;
82668
+ selectAll() {
82669
+ if (this.disabledSorting) {
82670
+ // sorting disabled, just reuse list from the frozen list
82671
+ this.selected = [...this.frozen()];
82672
+ } else {
82673
+ // sorting enabled, push all items left in available
82674
+ // at the end of the list
82675
+ this.selected.push(...this.available);
82676
+ }
82677
+
82678
+ this.available = [];
82439
82679
  },
82440
82680
 
82441
- availableFields() {
82442
- // Remove selected fields
82443
- return this.allFields.filter(a => !this.fields.some(f => a.name === f.name));
82681
+ select(item) {
82682
+ // remove available
82683
+ this.available = this.available.filter(i => i !== item); // put the selected item in the place where it was (if sorting is disabled)
82684
+ // or at the end
82685
+
82686
+ if (this.disabledSorting) {
82687
+ this.selected = this.frozen().filter(i => !this.available.includes(i));
82688
+ } else {
82689
+ this.selected.push(item);
82690
+ }
82444
82691
  },
82445
82692
 
82446
- filteredAvailableFields() {
82447
- return this.filterFields(this.availableFields);
82693
+ unselectAll() {
82694
+ this.available = [...this.frozen()];
82695
+ this.selected = [];
82448
82696
  },
82449
82697
 
82450
- filteredSelectedFields() {
82451
- return this.filterFields(this.selectedFields);
82452
- }
82698
+ unselect(item) {
82699
+ // filtering out the unselected item
82700
+ this.selected = this.selected.filter(i => i !== item); // sync available from the list of frozen items without selected
82453
82701
 
82454
- },
82455
- watch: {
82456
- 'moduleID'(o, n) {
82457
- if (o !== n) {
82458
- this.selectedFields = [];
82459
- }
82460
- }
82702
+ this.available = this.frozen().filter(i => !this.selected.includes(i));
82703
+ },
82461
82704
 
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);
82705
+ /**
82706
+ * Returns true given item is selected or not
82707
+ *
82708
+ * Item is considered selected if value of item's value-field is inside the selected array.
82709
+ *
82710
+ * @param item object
82711
+ * @returns boolean
82712
+ */
82713
+ isPicked(item) {
82714
+ return item[this.valueField] && this.value.includes(item[this.valueField]);
82466
82715
  },
82467
82716
 
82468
- selectField(field) {
82469
- if (this.selectedFields.some(selectedField => selectedField.label === field.label)) return;
82470
- this.selectedFields = [...this.selectedFields, field];
82717
+ sync() {
82718
+ /**
82719
+ * filter all unpicked options, freeze each item in the array and
82720
+ * build list of available items
82721
+ */
82722
+ this.available = this.frozen().filter(opt => !this.isPicked(opt));
82723
+ /**
82724
+ * filter all unpicked options, freeze each item in the array and
82725
+ * build list of selected items
82726
+ */
82727
+
82728
+ this.selected = this.frozen().filter(opt => this.isPicked(opt));
82471
82729
  },
82472
82730
 
82473
- unselectField(field) {
82474
- this.selectedFields = this.selectedFields.filter(({
82475
- name
82476
- }) => field.name !== name);
82731
+ frozen() {
82732
+ return this.options.map(Object.freeze);
82477
82733
  }
82478
82734
 
82479
82735
  }
@@ -82483,21 +82739,19 @@ var script$P = {
82483
82739
  const __vue_script__$P = script$P;
82484
82740
 
82485
82741
  /* 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 = [];
82742
+ 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)};
82743
+ var __vue_staticRenderFns__$K = [];
82488
82744
 
82489
82745
  /* 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
- };
82746
+ const __vue_inject_styles__$Q = undefined;
82495
82747
  /* scoped */
82496
- const __vue_scope_id__$Q = "data-v-6f297e50";
82748
+ const __vue_scope_id__$Q = undefined;
82497
82749
  /* module identifier */
82498
82750
  const __vue_module_identifier__$Q = undefined;
82499
82751
  /* functional template */
82500
82752
  const __vue_is_functional_template__$Q = false;
82753
+ /* style inject */
82754
+
82501
82755
  /* style inject SSR */
82502
82756
 
82503
82757
  /* style inject shadow dom */
@@ -82505,89 +82759,36 @@ var __vue_staticRenderFns__$J = [];
82505
82759
 
82506
82760
 
82507
82761
  const __vue_component__$Q = /*#__PURE__*/normalizeComponent(
82508
- { render: __vue_render__$J, staticRenderFns: __vue_staticRenderFns__$J },
82762
+ { render: __vue_render__$K, staticRenderFns: __vue_staticRenderFns__$K },
82509
82763
  __vue_inject_styles__$Q,
82510
82764
  __vue_script__$P,
82511
82765
  __vue_scope_id__$Q,
82512
82766
  __vue_is_functional_template__$Q,
82513
82767
  __vue_module_identifier__$Q,
82514
82768
  false,
82515
- createInjector,
82769
+ undefined,
82516
82770
  undefined,
82517
82771
  undefined
82518
82772
  );
82519
82773
 
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
82774
  var script$Q = {
82561
- name: 'ComponentList',
82562
82775
  props: {
82563
- catalogue: {
82564
- required: true,
82565
- type: Object
82776
+ displayElement: {
82777
+ type: Object,
82778
+ required: true
82566
82779
  },
82567
- path: {
82568
- type: Array,
82569
- default: () => []
82780
+ labels: {
82781
+ type: Object,
82782
+ default: () => ({})
82570
82783
  }
82571
82784
  },
82572
82785
  computed: {
82573
- // name of the current group
82574
- root() {
82575
- return this.path.length === 0;
82576
- },
82577
-
82578
- // name of the current group
82579
- group() {
82580
- return this.root ? undefined : this.path[this.path.length - 1];
82786
+ dataframes() {
82787
+ return this.displayElement.dataframes || [];
82581
82788
  },
82582
82789
 
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);
82790
+ options() {
82791
+ return this.displayElement.options || undefined;
82591
82792
  }
82592
82793
 
82593
82794
  }
@@ -82597,21 +82798,17 @@ var script$Q = {
82597
82798
  const __vue_script__$Q = script$Q;
82598
82799
 
82599
82800
  /* 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
82801
 
82603
82802
  /* 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
- };
82803
+ const __vue_inject_styles__$R = undefined;
82609
82804
  /* scoped */
82610
- const __vue_scope_id__$R = "data-v-8b2b254e";
82805
+ const __vue_scope_id__$R = undefined;
82611
82806
  /* module identifier */
82612
82807
  const __vue_module_identifier__$R = undefined;
82613
82808
  /* functional template */
82614
- const __vue_is_functional_template__$R = false;
82809
+ const __vue_is_functional_template__$R = undefined;
82810
+ /* style inject */
82811
+
82615
82812
  /* style inject SSR */
82616
82813
 
82617
82814
  /* style inject shadow dom */
@@ -82619,77 +82816,75 @@ var __vue_staticRenderFns__$K = [];
82619
82816
 
82620
82817
 
82621
82818
  const __vue_component__$R = /*#__PURE__*/normalizeComponent(
82622
- { render: __vue_render__$K, staticRenderFns: __vue_staticRenderFns__$K },
82819
+ {},
82623
82820
  __vue_inject_styles__$R,
82624
82821
  __vue_script__$Q,
82625
82822
  __vue_scope_id__$R,
82626
82823
  __vue_is_functional_template__$R,
82627
82824
  __vue_module_identifier__$R,
82628
82825
  false,
82629
- createInjector,
82826
+ undefined,
82630
82827
  undefined,
82631
82828
  undefined
82632
82829
  );
82633
82830
 
82634
82831
  //
82635
82832
  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
- }
82833
+ extends: __vue_component__$R,
82651
82834
 
82652
- if (Array.isArray(this.current.controls[0])) {
82653
- // already grouped
82654
- return this.current.controls;
82655
- } // make one virtual group holding all controls
82835
+ data() {
82836
+ return {
82837
+ chart: undefined,
82838
+ plugins: [Funnel, colorschemes]
82839
+ };
82840
+ },
82656
82841
 
82842
+ computed: {
82843
+ localDataframe() {
82844
+ return this.dataframes[0];
82845
+ },
82657
82846
 
82658
- return [this.current.controls];
82847
+ size() {
82848
+ return this.displayElement ? this.displayElement.meta.size || 100 : 100;
82659
82849
  }
82660
82850
 
82661
82851
  },
82852
+ watch: {
82853
+ dataframes: {
82854
+ deep: true,
82662
82855
 
82663
- data() {
82664
- return {
82665
- current: undefined
82666
- };
82667
- },
82856
+ handler(dataframes = []) {
82857
+ if (dataframes.length) {
82858
+ this.$nextTick(() => {
82859
+ this.renderChart();
82860
+ });
82861
+ }
82862
+ }
82668
82863
 
82669
- methods: {
82670
- setCurrent(component) {
82671
- this.current = {
82672
- props: {},
82673
- ...component
82674
- };
82675
- this.setScenario(this.current);
82676
82864
  },
82865
+ size: {
82866
+ immediate: true,
82867
+ deep: true,
82677
82868
 
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);
82869
+ handler() {
82870
+ this.$nextTick(() => {
82871
+ this.renderChart();
82872
+ });
82873
+ }
82684
82874
 
82685
- controls.forEach(c => {
82686
- if (Array.isArray(c)) {
82687
- c.forEach(c => apply(c, props));
82688
- } else {
82689
- apply(c, props);
82690
- }
82875
+ }
82876
+ },
82877
+ methods: {
82878
+ renderChart() {
82879
+ if (this.chart) {
82880
+ this.chart.destroy();
82881
+ }
82882
+
82883
+ const ctx = this.$refs.chart.getContext('2d');
82884
+ const chartConfig = this.options.getChartConfiguration(this.dataframes);
82885
+ this.chart = new Chart(ctx, { ...chartConfig,
82886
+ plugins: this.plugins
82691
82887
  });
82692
- this.current.props = props;
82693
82888
  }
82694
82889
 
82695
82890
  }
@@ -82699,21 +82894,19 @@ var script$R = {
82699
82894
  const __vue_script__$R = script$R;
82700
82895
 
82701
82896
  /* 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()])};
82897
+ 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
82898
  var __vue_staticRenderFns__$L = [];
82704
82899
 
82705
82900
  /* 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
- };
82901
+ const __vue_inject_styles__$S = undefined;
82711
82902
  /* scoped */
82712
82903
  const __vue_scope_id__$S = undefined;
82713
82904
  /* module identifier */
82714
82905
  const __vue_module_identifier__$S = undefined;
82715
82906
  /* functional template */
82716
82907
  const __vue_is_functional_template__$S = false;
82908
+ /* style inject */
82909
+
82717
82910
  /* style inject SSR */
82718
82911
 
82719
82912
  /* style inject shadow dom */
@@ -82728,32 +82921,90 @@ var __vue_staticRenderFns__$L = [];
82728
82921
  __vue_is_functional_template__$S,
82729
82922
  __vue_module_identifier__$S,
82730
82923
  false,
82731
- createInjector,
82924
+ undefined,
82732
82925
  undefined,
82733
82926
  undefined
82734
82927
  );
82735
82928
 
82736
- //
82737
- //
82738
- //
82739
- //
82740
- //
82741
- //
82742
- //
82743
- //
82744
- //
82745
- //
82746
82929
  //
82747
82930
  var script$S = {
82748
- props: {
82749
- label: {
82750
- required: true,
82751
- type: String
82931
+ extends: __vue_component__$R,
82932
+
82933
+ data() {
82934
+ return {
82935
+ vvb: ['0', '0', '0', '0']
82936
+ };
82937
+ },
82938
+
82939
+ computed: {
82940
+ viewbox() {
82941
+ return this.vvb.join(' ');
82942
+ },
82943
+
82944
+ style() {
82945
+ return {
82946
+ fill: this.options.color || '#000000',
82947
+ backgroundColor: this.options.backgroundColor || '#ffffff'
82948
+ };
82949
+ },
82950
+
82951
+ value() {
82952
+ if (this.dataframes.length) {
82953
+ const {
82954
+ rows = [],
82955
+ columns = []
82956
+ } = this.dataframes[0];
82957
+
82958
+ if (columns.length) {
82959
+ const columnIndex = columns.findIndex(({
82960
+ name
82961
+ }) => name === this.options.valueColumn);
82962
+
82963
+ if (rows.length) {
82964
+ return rows[0] ? rows[0][columnIndex] || '' : '';
82965
+ }
82966
+ }
82967
+ }
82968
+
82969
+ return '';
82752
82970
  },
82971
+
82972
+ displayedMetric() {
82973
+ const {
82974
+ prefix = '',
82975
+ suffix = ''
82976
+ } = this.options;
82977
+
82978
+ if (this.value) {
82979
+ return `${prefix}${this.value}${suffix}`;
82980
+ }
82981
+
82982
+ return '';
82983
+ }
82984
+
82985
+ },
82986
+ watch: {
82753
82987
  value: {
82754
- type: String,
82755
- default: () => ''
82988
+ immediate: true,
82989
+ handler: function () {
82990
+ this.update();
82991
+ }
82992
+ }
82993
+ },
82994
+ methods: {
82995
+ update() {
82996
+ this.$nextTick(function () {
82997
+ const {
82998
+ width,
82999
+ height
83000
+ } = this.$refs.metricItem.getBBox();
83001
+ const tmp = [...this.vvb];
83002
+ tmp[2] = parseInt(Math.ceil(width));
83003
+ tmp[3] = parseInt(Math.ceil(height));
83004
+ this.vvb = tmp;
83005
+ });
82756
83006
  }
83007
+
82757
83008
  }
82758
83009
  };
82759
83010
 
@@ -82761,7 +83012,7 @@ var script$S = {
82761
83012
  const __vue_script__$S = script$S;
82762
83013
 
82763
83014
  /* 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)};
83015
+ 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
83016
  var __vue_staticRenderFns__$M = [];
82766
83017
 
82767
83018
  /* style */
@@ -82793,27 +83044,377 @@ var __vue_staticRenderFns__$M = [];
82793
83044
  undefined
82794
83045
  );
82795
83046
 
82796
- //
82797
- //
82798
- //
82799
- //
82800
- //
82801
- //
82802
- //
82803
- //
82804
- //
82805
- //
82806
83047
  //
82807
83048
  var script$T = {
82808
- props: {
82809
- label: {
82810
- required: true,
82811
- type: String
83049
+ extends: __vue_component__$R,
83050
+
83051
+ data() {
83052
+ return {
83053
+ sort: {
83054
+ field: '',
83055
+ descending: false
83056
+ },
83057
+ cursors: [],
83058
+ cursor: undefined
83059
+ };
83060
+ },
83061
+
83062
+ computed: {
83063
+ localDataframe() {
83064
+ return this.dataframes[0];
82812
83065
  },
82813
- value: {
82814
- type: String,
82815
- default: () => ''
83066
+
83067
+ // indexFrames groups frames based on the related DS identifiers
83068
+ // for easier work.
83069
+ indexFrames() {
83070
+ const ix = {};
83071
+
83072
+ for (const df of this.dataframes || []) {
83073
+ if (!df.relSource) {
83074
+ continue;
83075
+ }
83076
+
83077
+ if (!ix[df.relSource]) {
83078
+ ix[df.relSource] = {};
83079
+ }
83080
+
83081
+ if (!ix[df.relSource][df.refValue]) {
83082
+ ix[df.relSource][df.refValue] = [];
83083
+ }
83084
+
83085
+ ix[df.relSource][df.refValue].push(df);
83086
+ }
83087
+
83088
+ return ix;
83089
+ },
83090
+
83091
+ tabelify() {
83092
+ if (!this.dataframes.length) {
83093
+ return {};
83094
+ }
83095
+
83096
+ return this.tabelifyFrame(this.localDataframe);
83097
+ },
83098
+
83099
+ hasPrevPage() {
83100
+ return !!this.cursors.length;
83101
+ },
83102
+
83103
+ nextPage() {
83104
+ if (this.localDataframe) {
83105
+ const {
83106
+ nextPage
83107
+ } = this.localDataframe.paging || {};
83108
+ return nextPage;
83109
+ }
83110
+
83111
+ return undefined;
83112
+ },
83113
+
83114
+ hasNextPage() {
83115
+ return !!this.nextPage;
83116
+ }
83117
+
83118
+ },
83119
+ watch: {
83120
+ localDataframe: {
83121
+ immediate: true,
83122
+
83123
+ handler(dataframe, oldDataframe) {
83124
+ if (dataframe && !oldDataframe) {
83125
+ const firstField = dataframe.sort.includes(',') ? dataframe.sort.split(',')[0] : dataframe.sort;
83126
+
83127
+ if (firstField.includes('DESC')) {
83128
+ this.sort.descending = true;
83129
+ this.sort.field = firstField.split(' ')[0];
83130
+ } else {
83131
+ this.sort.field = firstField;
83132
+ }
83133
+ }
83134
+ }
83135
+
83136
+ }
83137
+ },
83138
+ methods: {
83139
+ // keyColumns returns all of the key columns with indexes for all of the
83140
+ // columns that are used in joins.
83141
+ keyColumns(frame) {
83142
+ const foreignFrames = this.getForeignFrames(frame);
83143
+ const keys = {};
83144
+
83145
+ if (foreignFrames === undefined) {
83146
+ return keys;
83147
+ }
83148
+
83149
+ for (const ff of Object.values(foreignFrames)) {
83150
+ for (const f of ff) {
83151
+ keys[f.relColumn] = f.columns.findIndex(({
83152
+ name
83153
+ }) => name === f.relColumn);
83154
+ }
83155
+ }
83156
+
83157
+ return keys;
83158
+ },
83159
+
83160
+ getForeignFrames(frame) {
83161
+ return this.indexFrames[frame.ref];
83162
+ },
83163
+
83164
+ // tabelifyFrame returns a set of rows and columns that should be shown
83165
+ // for this frame.
83166
+ //
83167
+ // maxSize is used to calculate the rowSpan that should be applied to joined
83168
+ // frames with fewer rows then the other.
83169
+ //
83170
+ // Flow outline:
83171
+ // * for each row of the frame:
83172
+ // ** find all foreign frames
83173
+ // ** tabelify foreign frames
83174
+ // ** merge with the current tabelified result
83175
+ tabelifyFrame(frame, maxSize = 1) {
83176
+ const outRows = [];
83177
+ const isLocal = frame.ref === this.localDataframe.ref; // Index selected columns
83178
+
83179
+ const selectedCols = new Set();
83180
+
83181
+ for (const c of this.options.columns[frame.ref] || []) {
83182
+ selectedCols.add(frame.columns.findIndex(({
83183
+ name
83184
+ }) => name === c.name));
83185
+ }
83186
+
83187
+ const hSeanFrames = {};
83188
+ const outHeader = [...selectedCols].map(index => {
83189
+ const column = frame.columns[index];
83190
+ return {
83191
+ column,
83192
+ meta: {
83193
+ ref: frame.ref,
83194
+ sortKey: isLocal ? column.name : `${frame.ref}.${column.name}`
83195
+ }
83196
+ };
83197
+ });
83198
+ const outColgroups = [{
83199
+ size: outHeader.length,
83200
+ isLocal: isLocal
83201
+ }];
83202
+ const relFrames = this.getForeignFrames(frame);
83203
+ const usedKeys = this.keyColumns(frame);
83204
+
83205
+ for (const r of frame.rows || []) {
83206
+ maxSize = 1;
83207
+ const row = this.tabelifyRow(r, [...selectedCols]);
83208
+ const auxRows = [];
83209
+
83210
+ for (const colIndex of Object.values(usedKeys)) {
83211
+ const relFrame = relFrames[r[colIndex]]; // Determine the largest frame so our maxSize will match
83212
+
83213
+ for (const rf of relFrame || []) {
83214
+ maxSize = Math.max(maxSize, rf.rows.length);
83215
+ } // Tabelify related frames
83216
+
83217
+
83218
+ for (const rf of relFrame || []) {
83219
+ // const refColumnIndexes = (this.options.columns[rf.ref] || []).map(({ name }) => {
83220
+ // return frame.columns.findIndex(fc => fc.name === name)
83221
+ // })
83222
+ const aux = this.tabelifyFrame(rf, Math.max(rf.rows.length, maxSize)); // Optionally append header
83223
+
83224
+ if (!hSeanFrames[rf.ref]) {
83225
+ const x = [...aux.header];
83226
+ x[0].sourceName = rf.ref;
83227
+ outHeader.push(...x);
83228
+ hSeanFrames[rf.ref] = true;
83229
+ outColgroups.push(...aux.colgroups);
83230
+ } // Rowspan smaller frames so the table is nice and aligned
83231
+
83232
+
83233
+ if (aux.rows.length < maxSize) {
83234
+ for (const col of aux.rows[aux.rows.length - 1]) {
83235
+ col.attrs = {
83236
+ rowspan: maxSize - aux.rows.length + 1
83237
+ };
83238
+ }
83239
+ }
83240
+
83241
+ auxRows.push(aux.rows);
83242
+ }
83243
+ } // Merge the original row with joined rows
83244
+ // - the forst row of the merged row gets joined with the original row
83245
+ // - the rest are appended to the list (they are offsetted by rowspan)
83246
+
83247
+
83248
+ if (auxRows.length > 0) {
83249
+ for (const c of row) {
83250
+ c.attrs = {
83251
+ rowspan: maxSize
83252
+ };
83253
+ }
83254
+
83255
+ row[0].separator = true;
83256
+ const merged = this.mergeRows(auxRows).pop();
83257
+ row.push(...merged[0]);
83258
+ outRows.push(row);
83259
+ outRows.push(...merged.slice(1));
83260
+ } else {
83261
+ outRows.push(row);
83262
+ }
83263
+ }
83264
+
83265
+ return {
83266
+ rows: outRows,
83267
+ maxSize,
83268
+ header: outHeader,
83269
+ colgroups: outColgroups
83270
+ };
83271
+ },
83272
+
83273
+ mergeRows(auxRows, maxSize) {
83274
+ if (auxRows.length <= 1) {
83275
+ return auxRows;
83276
+ }
83277
+
83278
+ const a = auxRows[auxRows.length - 2];
83279
+ const b = auxRows[auxRows.length - 1];
83280
+ const tmpRows = [];
83281
+
83282
+ for (let i = 0; i < a.length; i++) {
83283
+ const row = a[i];
83284
+
83285
+ if (i >= b.length) {
83286
+ tmpRows.push(row);
83287
+ continue;
83288
+ }
83289
+
83290
+ row.push(...b[i]);
83291
+ tmpRows.push(row);
83292
+ }
83293
+
83294
+ if (b.length > a.length) {
83295
+ tmpRows.push(...b.slice(a.length));
83296
+ }
83297
+
83298
+ auxRows.splice(auxRows.length - 2, 2, tmpRows);
83299
+ return this.mergeRows(auxRows);
83300
+ },
83301
+
83302
+ tabelifyRow(row, selectedCols = []) {
83303
+ const out = [];
83304
+ selectedCols.forEach(index => {
83305
+ out.push({
83306
+ value: row[index]
83307
+ });
83308
+ });
83309
+ return out;
83310
+ },
83311
+
83312
+ // Sorting
83313
+ handleSort(fieldName) {
83314
+ let relatedDatasource;
83315
+
83316
+ if (fieldName.includes('.')) {
83317
+ [relatedDatasource, fieldName] = fieldName.split('.');
83318
+ return; // Uncomment this when foreign frame sorting is implemented
83319
+ }
83320
+
83321
+ if (fieldName) {
83322
+ const {
83323
+ field,
83324
+ descending
83325
+ } = this.sort;
83326
+
83327
+ if (this.cursor) {
83328
+ this.cursor = undefined;
83329
+ this.cursors = [];
83330
+ }
83331
+
83332
+ if (fieldName === field) {
83333
+ this.sort.descending = !descending;
83334
+ } else {
83335
+ this.sort.field = fieldName;
83336
+ this.sort.descending = false;
83337
+ }
83338
+ }
83339
+
83340
+ this.updateDefinition(relatedDatasource);
83341
+ },
83342
+
83343
+ goToPage(dir) {
83344
+ switch (dir) {
83345
+ case 'nextPage':
83346
+ if (!this.cursors.length) {
83347
+ this.cursors.push(undefined);
83348
+ }
83349
+
83350
+ this.cursors.push(this.nextPage);
83351
+ this.cursor = this.nextPage;
83352
+ break;
83353
+
83354
+ case 'prevPage':
83355
+ this.cursors.pop();
83356
+ this.cursor = this.cursors.pop();
83357
+ break;
83358
+
83359
+ default:
83360
+ this.cursor = undefined;
83361
+ this.cursors = [];
83362
+ }
83363
+
83364
+ this.updateDefinition();
83365
+ },
83366
+
83367
+ // Meta
83368
+ updateDefinition(updatedDatasource) {
83369
+ if (this.localDataframe) {
83370
+ // Get related datasource
83371
+ let ref = this.localDataframe.ref;
83372
+
83373
+ if (updatedDatasource) {
83374
+ ref = (this.dataframes.find(({
83375
+ ref
83376
+ }) => ref === updatedDatasource) || {}).ref;
83377
+ }
83378
+
83379
+ if (ref) {
83380
+ const def = {
83381
+ ref
83382
+ }; // Sorting
83383
+
83384
+ const {
83385
+ field,
83386
+ descending
83387
+ } = this.sort;
83388
+
83389
+ if (field) {
83390
+ // Generate sort string
83391
+ const sort = descending ? `${field} DESC` : field;
83392
+ def.sort = sort;
83393
+ } // Paging
83394
+
83395
+
83396
+ if (this.cursor) {
83397
+ let {
83398
+ limit
83399
+ } = this.localDataframe.paging || {};
83400
+
83401
+ if (!limit) {
83402
+ limit = this.options.datasources[0] ? this.options.datasources[0].paging.limit || 20 : 20;
83403
+ }
83404
+
83405
+ def.paging = {
83406
+ cursor: this.cursor,
83407
+ limit
83408
+ };
83409
+ }
83410
+
83411
+ const definition = {};
83412
+ definition[ref] = def;
83413
+ this.$emit('update', definition);
83414
+ }
83415
+ }
82816
83416
  }
83417
+
82817
83418
  }
82818
83419
  };
82819
83420
 
@@ -82821,19 +83422,27 @@ var script$T = {
82821
83422
  const __vue_script__$T = script$T;
82822
83423
 
82823
83424
  /* 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)};
83425
+ 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:({
83426
+ color: _vm.sort.field === c.meta.sortKey && !_vm.sort.descending ? 'black' : 'grey',
83427
+ }),attrs:{"icon":['fas', 'angle-up']}}),_vm._v(" "),_c('font-awesome-icon',{staticClass:"mt-1",style:({
83428
+ color: _vm.sort.field === c.meta.sortKey && _vm.sort.descending ? 'black' : 'grey',
83429
+ }),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:{
83430
+ separator: !!r[0].separator,
83431
+ }},_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
83432
  var __vue_staticRenderFns__$N = [];
82826
83433
 
82827
83434
  /* style */
82828
- const __vue_inject_styles__$U = undefined;
83435
+ const __vue_inject_styles__$U = function (inject) {
83436
+ if (!inject) return
83437
+ inject("data-v-52bf61e6_0", { source: ".foreign[data-v-52bf61e6]{border:1px solid rgba(22,36,37,.8);border-top:0;border-bottom:0}.separator[data-v-52bf61e6]{border-top:2px solid rgba(22,36,37,.5)}.card-rounded[data-v-52bf61e6]{border-radius:1rem 1rem 0 0}", map: undefined, media: undefined });
83438
+
83439
+ };
82829
83440
  /* scoped */
82830
- const __vue_scope_id__$U = undefined;
83441
+ const __vue_scope_id__$U = "data-v-52bf61e6";
82831
83442
  /* module identifier */
82832
83443
  const __vue_module_identifier__$U = undefined;
82833
83444
  /* functional template */
82834
83445
  const __vue_is_functional_template__$U = false;
82835
- /* style inject */
82836
-
82837
83446
  /* style inject SSR */
82838
83447
 
82839
83448
  /* style inject shadow dom */
@@ -82848,39 +83457,21 @@ var __vue_staticRenderFns__$N = [];
82848
83457
  __vue_is_functional_template__$U,
82849
83458
  __vue_module_identifier__$U,
82850
83459
  false,
82851
- undefined,
83460
+ createInjector,
82852
83461
  undefined,
82853
83462
  undefined
82854
83463
  );
82855
83464
 
82856
- //
82857
- //
82858
- //
82859
- //
82860
- //
82861
- //
82862
- //
82863
- //
82864
- //
82865
83465
  //
82866
83466
  var script$U = {
82867
- props: {
82868
- label: {
82869
- required: true,
82870
- type: String
82871
- },
82872
- value: {
82873
- type: Boolean,
82874
- default: () => false
82875
- }
82876
- }
83467
+ extends: __vue_component__$R
82877
83468
  };
82878
83469
 
82879
83470
  /* script */
82880
83471
  const __vue_script__$U = script$U;
82881
83472
 
82882
83473
  /* 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)};
83474
+ 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
83475
  var __vue_staticRenderFns__$O = [];
82885
83476
 
82886
83477
  /* style */
@@ -82912,8 +83503,222 @@ var __vue_staticRenderFns__$O = [];
82912
83503
  undefined
82913
83504
  );
82914
83505
 
83506
+ const del$1 = '|||';
83507
+ /**
83508
+ * Extract subgroups from the given groups
83509
+ * @param groups
83510
+ * @param path Array of groups that represent the path
83511
+ */
83512
+ function extractGroups(groups, ...path) {
83513
+ const jpath = path.join(del$1);
83514
+ return [...(new Set(groups
83515
+ .filter(g => g.slice(0, path.length).join(del$1) === jpath)
83516
+ .map(g => g.slice(path.length, path.length + 1)[0])
83517
+ .filter(g => !!g))).values()];
83518
+ }
83519
+ /**
83520
+ * Extract subgroups from the catalogue that match the given path
83521
+ *
83522
+ * @param cat Catalogue
83523
+ * @param path Array of groups that represent the path
83524
+ * @constructor
83525
+ */
83526
+ function ExtractSubgroups(cat, ...path) {
83527
+ const groups = Object.values(cat)
83528
+ .map(({ group }) => group)
83529
+ .filter(g => g !== undefined);
83530
+ return extractGroups(groups, ...path);
83531
+ }
83532
+ /**
83533
+ * Returns all components that match the given path
83534
+ *
83535
+ * @param cat Catalogue
83536
+ * @param path Array of groups that represent the path
83537
+
83538
+ */
83539
+ function ExtractComponents(cat, ...path) {
83540
+ const jpath = path.join(del$1);
83541
+ return Object.values(cat)
83542
+ .filter(({ group }) => (group || []).join(del$1) === jpath);
83543
+ }
83544
+
82915
83545
  //
83546
+ var script$V = {
83547
+ name: 'ComponentList',
83548
+ props: {
83549
+ catalogue: {
83550
+ required: true,
83551
+ type: Object
83552
+ },
83553
+ path: {
83554
+ type: Array,
83555
+ default: () => []
83556
+ }
83557
+ },
83558
+ computed: {
83559
+ // name of the current group
83560
+ root() {
83561
+ return this.path.length === 0;
83562
+ },
83563
+
83564
+ // name of the current group
83565
+ group() {
83566
+ return this.root ? undefined : this.path[this.path.length - 1];
83567
+ },
83568
+
83569
+ // returns all groups at this level
83570
+ subgroups() {
83571
+ return ExtractSubgroups(this.catalogue, ...this.path);
83572
+ },
83573
+
83574
+ components() {
83575
+ // return ExtractComponents(this.catalogue, ...this.path)
83576
+ return ExtractComponents(this.catalogue, ...this.path);
83577
+ }
83578
+
83579
+ }
83580
+ };
83581
+
83582
+ /* script */
83583
+ const __vue_script__$V = script$V;
83584
+
83585
+ /* template */
83586
+ 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()])};
83587
+ var __vue_staticRenderFns__$P = [];
83588
+
83589
+ /* style */
83590
+ const __vue_inject_styles__$W = function (inject) {
83591
+ if (!inject) return
83592
+ inject("data-v-8b2b254e_0", { source: ".component[data-v-8b2b254e]{cursor:pointer}", map: undefined, media: undefined });
83593
+
83594
+ };
83595
+ /* scoped */
83596
+ const __vue_scope_id__$W = "data-v-8b2b254e";
83597
+ /* module identifier */
83598
+ const __vue_module_identifier__$W = undefined;
83599
+ /* functional template */
83600
+ const __vue_is_functional_template__$W = false;
83601
+ /* style inject SSR */
83602
+
83603
+ /* style inject shadow dom */
83604
+
83605
+
83606
+
83607
+ const __vue_component__$W = /*#__PURE__*/normalizeComponent(
83608
+ { render: __vue_render__$P, staticRenderFns: __vue_staticRenderFns__$P },
83609
+ __vue_inject_styles__$W,
83610
+ __vue_script__$V,
83611
+ __vue_scope_id__$W,
83612
+ __vue_is_functional_template__$W,
83613
+ __vue_module_identifier__$W,
83614
+ false,
83615
+ createInjector,
83616
+ undefined,
83617
+ undefined
83618
+ );
83619
+
82916
83620
  //
83621
+ var script$W = {
83622
+ name: 'C3',
83623
+ components: {
83624
+ ComponentList: __vue_component__$W
83625
+ },
83626
+ props: {
83627
+ catalogue: {
83628
+ required: true,
83629
+ type: Object
83630
+ }
83631
+ },
83632
+ computed: {
83633
+ controlGroups() {
83634
+ if (this.current.controls.length === 0) {
83635
+ return [];
83636
+ }
83637
+
83638
+ if (Array.isArray(this.current.controls[0])) {
83639
+ // already grouped
83640
+ return this.current.controls;
83641
+ } // make one virtual group holding all controls
83642
+
83643
+
83644
+ return [this.current.controls];
83645
+ }
83646
+
83647
+ },
83648
+
83649
+ data() {
83650
+ return {
83651
+ current: undefined
83652
+ };
83653
+ },
83654
+
83655
+ methods: {
83656
+ setCurrent(component) {
83657
+ this.current = {
83658
+ props: {},
83659
+ ...component
83660
+ };
83661
+ this.setScenario(this.current);
83662
+ },
83663
+
83664
+ setScenario({
83665
+ props = {},
83666
+ controls = []
83667
+ }) {
83668
+ // create missing props from controls
83669
+ const apply = (c, props) => c.update(props, c.value(props) || null);
83670
+
83671
+ controls.forEach(c => {
83672
+ if (Array.isArray(c)) {
83673
+ c.forEach(c => apply(c, props));
83674
+ } else {
83675
+ apply(c, props);
83676
+ }
83677
+ });
83678
+ this.current.props = props;
83679
+ }
83680
+
83681
+ }
83682
+ };
83683
+
83684
+ /* script */
83685
+ const __vue_script__$W = script$W;
83686
+
83687
+ /* template */
83688
+ 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()])};
83689
+ var __vue_staticRenderFns__$Q = [];
83690
+
83691
+ /* style */
83692
+ const __vue_inject_styles__$X = function (inject) {
83693
+ if (!inject) return
83694
+ 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 });
83695
+
83696
+ };
83697
+ /* scoped */
83698
+ const __vue_scope_id__$X = undefined;
83699
+ /* module identifier */
83700
+ const __vue_module_identifier__$X = undefined;
83701
+ /* functional template */
83702
+ const __vue_is_functional_template__$X = false;
83703
+ /* style inject SSR */
83704
+
83705
+ /* style inject shadow dom */
83706
+
83707
+
83708
+
83709
+ const __vue_component__$X = /*#__PURE__*/normalizeComponent(
83710
+ { render: __vue_render__$Q, staticRenderFns: __vue_staticRenderFns__$Q },
83711
+ __vue_inject_styles__$X,
83712
+ __vue_script__$W,
83713
+ __vue_scope_id__$X,
83714
+ __vue_is_functional_template__$X,
83715
+ __vue_module_identifier__$X,
83716
+ false,
83717
+ createInjector,
83718
+ undefined,
83719
+ undefined
83720
+ );
83721
+
82917
83722
  //
82918
83723
  //
82919
83724
  //
@@ -82924,7 +83729,188 @@ var __vue_staticRenderFns__$O = [];
82924
83729
  //
82925
83730
  //
82926
83731
  //
82927
- var script$V = {
83732
+ //
83733
+ var script$X = {
83734
+ props: {
83735
+ label: {
83736
+ required: true,
83737
+ type: String
83738
+ },
83739
+ value: {
83740
+ type: String,
83741
+ default: () => ''
83742
+ }
83743
+ }
83744
+ };
83745
+
83746
+ /* script */
83747
+ const __vue_script__$X = script$X;
83748
+
83749
+ /* template */
83750
+ 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)};
83751
+ var __vue_staticRenderFns__$R = [];
83752
+
83753
+ /* style */
83754
+ const __vue_inject_styles__$Y = undefined;
83755
+ /* scoped */
83756
+ const __vue_scope_id__$Y = undefined;
83757
+ /* module identifier */
83758
+ const __vue_module_identifier__$Y = undefined;
83759
+ /* functional template */
83760
+ const __vue_is_functional_template__$Y = false;
83761
+ /* style inject */
83762
+
83763
+ /* style inject SSR */
83764
+
83765
+ /* style inject shadow dom */
83766
+
83767
+
83768
+
83769
+ const __vue_component__$Y = /*#__PURE__*/normalizeComponent(
83770
+ { render: __vue_render__$R, staticRenderFns: __vue_staticRenderFns__$R },
83771
+ __vue_inject_styles__$Y,
83772
+ __vue_script__$X,
83773
+ __vue_scope_id__$Y,
83774
+ __vue_is_functional_template__$Y,
83775
+ __vue_module_identifier__$Y,
83776
+ false,
83777
+ undefined,
83778
+ undefined,
83779
+ undefined
83780
+ );
83781
+
83782
+ //
83783
+ //
83784
+ //
83785
+ //
83786
+ //
83787
+ //
83788
+ //
83789
+ //
83790
+ //
83791
+ //
83792
+ //
83793
+ var script$Y = {
83794
+ props: {
83795
+ label: {
83796
+ required: true,
83797
+ type: String
83798
+ },
83799
+ value: {
83800
+ type: String,
83801
+ default: () => ''
83802
+ }
83803
+ }
83804
+ };
83805
+
83806
+ /* script */
83807
+ const __vue_script__$Y = script$Y;
83808
+
83809
+ /* template */
83810
+ 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)};
83811
+ var __vue_staticRenderFns__$S = [];
83812
+
83813
+ /* style */
83814
+ const __vue_inject_styles__$Z = undefined;
83815
+ /* scoped */
83816
+ const __vue_scope_id__$Z = undefined;
83817
+ /* module identifier */
83818
+ const __vue_module_identifier__$Z = undefined;
83819
+ /* functional template */
83820
+ const __vue_is_functional_template__$Z = false;
83821
+ /* style inject */
83822
+
83823
+ /* style inject SSR */
83824
+
83825
+ /* style inject shadow dom */
83826
+
83827
+
83828
+
83829
+ const __vue_component__$Z = /*#__PURE__*/normalizeComponent(
83830
+ { render: __vue_render__$S, staticRenderFns: __vue_staticRenderFns__$S },
83831
+ __vue_inject_styles__$Z,
83832
+ __vue_script__$Y,
83833
+ __vue_scope_id__$Z,
83834
+ __vue_is_functional_template__$Z,
83835
+ __vue_module_identifier__$Z,
83836
+ false,
83837
+ undefined,
83838
+ undefined,
83839
+ undefined
83840
+ );
83841
+
83842
+ //
83843
+ //
83844
+ //
83845
+ //
83846
+ //
83847
+ //
83848
+ //
83849
+ //
83850
+ //
83851
+ //
83852
+ var script$Z = {
83853
+ props: {
83854
+ label: {
83855
+ required: true,
83856
+ type: String
83857
+ },
83858
+ value: {
83859
+ type: Boolean,
83860
+ default: () => false
83861
+ }
83862
+ }
83863
+ };
83864
+
83865
+ /* script */
83866
+ const __vue_script__$Z = script$Z;
83867
+
83868
+ /* template */
83869
+ 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)};
83870
+ var __vue_staticRenderFns__$T = [];
83871
+
83872
+ /* style */
83873
+ const __vue_inject_styles__$_ = undefined;
83874
+ /* scoped */
83875
+ const __vue_scope_id__$_ = undefined;
83876
+ /* module identifier */
83877
+ const __vue_module_identifier__$_ = undefined;
83878
+ /* functional template */
83879
+ const __vue_is_functional_template__$_ = false;
83880
+ /* style inject */
83881
+
83882
+ /* style inject SSR */
83883
+
83884
+ /* style inject shadow dom */
83885
+
83886
+
83887
+
83888
+ const __vue_component__$_ = /*#__PURE__*/normalizeComponent(
83889
+ { render: __vue_render__$T, staticRenderFns: __vue_staticRenderFns__$T },
83890
+ __vue_inject_styles__$_,
83891
+ __vue_script__$Z,
83892
+ __vue_scope_id__$_,
83893
+ __vue_is_functional_template__$_,
83894
+ __vue_module_identifier__$_,
83895
+ false,
83896
+ undefined,
83897
+ undefined,
83898
+ undefined
83899
+ );
83900
+
83901
+ //
83902
+ //
83903
+ //
83904
+ //
83905
+ //
83906
+ //
83907
+ //
83908
+ //
83909
+ //
83910
+ //
83911
+ //
83912
+ //
83913
+ var script$_ = {
82928
83914
  props: {
82929
83915
  label: {
82930
83916
  required: true,
@@ -82942,20 +83928,20 @@ var script$V = {
82942
83928
  };
82943
83929
 
82944
83930
  /* script */
82945
- const __vue_script__$V = script$V;
83931
+ const __vue_script__$_ = script$_;
82946
83932
 
82947
83933
  /* 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 = [];
83934
+ 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)};
83935
+ var __vue_staticRenderFns__$U = [];
82950
83936
 
82951
83937
  /* style */
82952
- const __vue_inject_styles__$W = undefined;
83938
+ const __vue_inject_styles__$$ = undefined;
82953
83939
  /* scoped */
82954
- const __vue_scope_id__$W = undefined;
83940
+ const __vue_scope_id__$$ = undefined;
82955
83941
  /* module identifier */
82956
- const __vue_module_identifier__$W = undefined;
83942
+ const __vue_module_identifier__$$ = undefined;
82957
83943
  /* functional template */
82958
- const __vue_is_functional_template__$W = false;
83944
+ const __vue_is_functional_template__$$ = false;
82959
83945
  /* style inject */
82960
83946
 
82961
83947
  /* style inject SSR */
@@ -82964,13 +83950,13 @@ var __vue_staticRenderFns__$P = [];
82964
83950
 
82965
83951
 
82966
83952
 
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,
83953
+ const __vue_component__$$ = /*#__PURE__*/normalizeComponent(
83954
+ { render: __vue_render__$U, staticRenderFns: __vue_staticRenderFns__$U },
83955
+ __vue_inject_styles__$$,
83956
+ __vue_script__$_,
83957
+ __vue_scope_id__$$,
83958
+ __vue_is_functional_template__$$,
83959
+ __vue_module_identifier__$$,
82974
83960
  false,
82975
83961
  undefined,
82976
83962
  undefined,
@@ -100182,16 +101168,16 @@ function generic(component, { handler, props }) {
100182
101168
  props }, handler);
100183
101169
  }
100184
101170
  function input(label, handler) {
100185
- return generic(__vue_component__$T, { handler, props: { label } });
101171
+ return generic(__vue_component__$Y, { handler, props: { label } });
100186
101172
  }
100187
101173
  function textarea(label, handler) {
100188
- return generic(__vue_component__$U, { handler, props: { label } });
101174
+ return generic(__vue_component__$Z, { handler, props: { label } });
100189
101175
  }
100190
101176
  function checkbox(label, handler) {
100191
- return generic(__vue_component__$V, { handler, props: { label } });
101177
+ return generic(__vue_component__$_, { handler, props: { label } });
100192
101178
  }
100193
101179
  function select(label, handler, options) {
100194
- return generic(__vue_component__$W, {
101180
+ return generic(__vue_component__$$, {
100195
101181
  handler,
100196
101182
  props: {
100197
101183
  label,
@@ -100210,7 +101196,7 @@ var controls = /*#__PURE__*/Object.freeze({
100210
101196
  });
100211
101197
 
100212
101198
  var index$2 = {
100213
- View: __vue_component__$S,
101199
+ View: __vue_component__$X,
100214
101200
  controls,
100215
101201
  };
100216
101202
 
@@ -100224,8 +101210,9 @@ var index$3 = /*#__PURE__*/Object.freeze({
100224
101210
  canPreview: canPreview,
100225
101211
  CInputConfirm: __vue_component__$9,
100226
101212
  CInputProcessing: __vue_component__$a,
100227
- CInputDateTime: __vue_component__$c,
100228
- CInputInterval: __vue_component__$d,
101213
+ CInputDateTime: __vue_component__$b,
101214
+ CInputPresort: __vue_component__$c,
101215
+ CInputCron: __vue_component__$d,
100229
101216
  CRichTextInput: __vue_component__$m,
100230
101217
  CLightbox: __vue_component__$5,
100231
101218
  CPermissionsButton: __vue_component__$n,
@@ -100240,8 +101227,12 @@ var index$3 = /*#__PURE__*/Object.freeze({
100240
101227
  CToaster: __vue_component__$N,
100241
101228
  CToasterLink: __vue_component__$M,
100242
101229
  CReminderSidebar: __vue_component__$O,
100243
- FieldItem: __vue_component__$P,
100244
- FieldPicker: __vue_component__$Q,
101230
+ CItemPicker: __vue_component__$Q,
101231
+ CItemPickerItem: __vue_component__$P,
101232
+ CReportChart: __vue_component__$S,
101233
+ CReportMetric: __vue_component__$T,
101234
+ CReportTable: __vue_component__$U,
101235
+ CReportText: __vue_component__$V,
100245
101236
  C3: index$2,
100246
101237
  CPrompts: __vue_component__$B,
100247
101238
  CPromptModal: __vue_component__$A,
@@ -100663,6 +101654,66 @@ var index$7 = /*#__PURE__*/Object.freeze({
100663
101654
  RBAC: RBAC
100664
101655
  });
100665
101656
 
101657
+ // A helper function to remove diacritics from the given string.
101658
+ // This allows us so search over characters like čšž with csz.
101659
+ //
101660
+ // stackoverflow.com/questions/990904/remove-accents-diacritics-in-a-string-in-javascript/37511463#37511463
101661
+ function toNFD(s) {
101662
+ return s.normalize('NFD').replace(/[\u0300-\u036f]/g, '');
101663
+ }
101664
+ // Here we try to calculate the quality of the match using relative numbers.
101665
+ // By default, fuzzy sort uses score that is not capped.
101666
+ const goodMatchThreshold = 0.35;
101667
+ function fuzzyMatch({ indexes }) {
101668
+ return indexes.length / (Math.max(...indexes) + 1);
101669
+ }
101670
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
101671
+ function assert(match, obj, query, field, ...fields) {
101672
+ if (!obj) {
101673
+ return false;
101674
+ }
101675
+ query = toNFD(query.trim().toLowerCase());
101676
+ if (typeof obj === 'string') {
101677
+ return match(toNFD(obj.trim().toLowerCase()), query);
101678
+ }
101679
+ else {
101680
+ if (!field) {
101681
+ throw new Error('field must be provided when searching over objects');
101682
+ }
101683
+ return fields.concat([field])
101684
+ .some(f => match(toNFD(obj[f].trim().toLowerCase()), query));
101685
+ }
101686
+ }
101687
+ // AssertStrict checks for a substring and doesn't do any additional guessing
101688
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
101689
+ function AssertStrict(obj, query, field, ...fields) {
101690
+ return assert((v, query) => v.includes(query), obj, query, field, ...fields);
101691
+ }
101692
+ // AssertFuzzy uses some heuristic to determine if the query maybe probably perhaps matches
101693
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
101694
+ function AssertFuzzy(obj, query, field, ...fields) {
101695
+ return assert((v, query) => {
101696
+ const rs = fzy.single(query, v);
101697
+ if (!rs) {
101698
+ return false;
101699
+ }
101700
+ return fuzzyMatch(rs) >= goodMatchThreshold;
101701
+ }, obj, query, field, ...fields);
101702
+ }
101703
+ // Assert uses both AssertStrict and AssertFuzzy to check if the query matches,
101704
+ // If the strict assertion passes that is used, else it tries to do a AssertFuzzy just to make sure
101705
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
101706
+ function Assert(obj, query, field, ...fields) {
101707
+ return AssertStrict(obj, query, field, ...fields) || AssertFuzzy(obj, query, field, ...fields);
101708
+ }
101709
+
101710
+ var filter = /*#__PURE__*/Object.freeze({
101711
+ __proto__: null,
101712
+ AssertStrict: AssertStrict,
101713
+ AssertFuzzy: AssertFuzzy,
101714
+ Assert: Assert
101715
+ });
101716
+
100666
101717
  const config = {
100667
101718
  format: 'json',
100668
101719
  // (Boolean) whether to reconnect automatically (false)
@@ -100747,6 +101798,7 @@ var websocket = /*#__PURE__*/Object.freeze({
100747
101798
 
100748
101799
  exports.components = index$3;
100749
101800
  exports.corredor = index$4;
101801
+ exports.filter = filter;
100750
101802
  exports.filters = index$5;
100751
101803
  exports.i18n = i18n;
100752
101804
  exports.mixins = index$1;