@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.es.js CHANGED
@@ -9,6 +9,7 @@ import VueI18Next from '@panter/vue-i18next';
9
9
  import path from 'path';
10
10
  import { PhotoSwipe } from 'v-photoswipe';
11
11
  import pdfjs from 'pdfjs-dist';
12
+ import Draggable from 'vuedraggable';
12
13
  import Swatches from 'vue-swatches';
13
14
  import { Paragraph as Paragraph$1, Mark as Mark$1, Plugin, PluginKey, Extension, EditorContent, EditorMenuBar, Editor } from 'tiptap';
14
15
  import { Heading as Heading$1, Link as Link$1, Bold, Italic, Underline, Strike, Blockquote, CodeBlock, OrderedList, BulletList, TodoList, HorizontalRule, ListItem, TodoItem, History } from 'tiptap-extensions';
@@ -16,8 +17,10 @@ import hps from 'html-parse-stringify';
16
17
  import { library } from '@fortawesome/fontawesome-svg-core';
17
18
  import { faLock } from '@fortawesome/free-solid-svg-icons';
18
19
  import { mapGetters, mapActions } from 'vuex';
19
- import draggable from 'vuedraggable';
20
+ import colorschemes from 'chartjs-plugin-colorschemes';
21
+ import Funnel from 'chartjs-plugin-funnel';
20
22
  import pino from 'pino';
23
+ import fzy from 'fuzzysort';
21
24
 
22
25
  /* eslint-disable @typescript-eslint/ban-ts-ignore */
23
26
  /**
@@ -1920,15 +1923,19 @@ var url = /*#__PURE__*/Object.freeze({
1920
1923
  const accessToken = Symbol('accessToken');
1921
1924
  const user = Symbol('user');
1922
1925
  /**
1923
- * This is an endpoint of a oauth2 authorization-code flow + refresh token exchange
1926
+ * This is an endpoint of an oauth2 authorization-code flow + refresh token exchange
1924
1927
  * for default client.
1925
1928
  *
1926
- * If you are concerned about security, this is not much different than using a dedicated backend
1929
+ * If you are concerned about security, this is not much different to using a dedicated backend
1927
1930
  * for this SPA that only redirects to a set of allowed URIs.
1928
1931
  */
1929
1932
  const oauth2FlowURL = '/oauth2/default-client';
1930
1933
  const oauth2InfoURL = '/oauth2/info';
1931
1934
  const oauth2Scope = 'profile api';
1935
+ const storeKeyFlowStarted = 'auth.flow-started';
1936
+ const storeKeyFinalState = 'auth.state.final';
1937
+ const storeKeyRefreshToken = 'auth.refresh-token';
1938
+ const maxStartAttempts = 5;
1932
1939
  class Auth {
1933
1940
  constructor({ app, verbose, cortezaAuthURL, callbackURL, entrypointURL, location, sessionStorage, refreshFactor }) {
1934
1941
  if (refreshFactor >= 1 || refreshFactor <= 0) {
@@ -1971,13 +1978,6 @@ class Auth {
1971
1978
  error: noop,
1972
1979
  };
1973
1980
  }
1974
- /**
1975
- * Returns prefixed key
1976
- * @param key
1977
- */
1978
- get refreshTokenKey() {
1979
- return 'auth.refresh-token';
1980
- }
1981
1981
  /**
1982
1982
  * Returns function that returns current access token
1983
1983
  */
@@ -2008,36 +2008,77 @@ class Auth {
2008
2008
  throw new Error(params.get('error') || 'authentication flow failed with error');
2009
2009
  }
2010
2010
  if (params.has('code')) {
2011
- let finalLocation = null;
2011
+ let finalLocation = this.entrypointURL;
2012
2012
  if (params.has('state')) {
2013
2013
  const state = params.get('state') || '';
2014
- const key = `auth.state.${state}.location`;
2014
+ const storeKeyStateLocation = `auth.state.${state}.location`;
2015
2015
  this.log.info('state received', state);
2016
- finalLocation = this.sessionStorage.getItem(key);
2017
- if (!finalLocation) {
2018
- throw Error('state does not match');
2016
+ const tmp = this.sessionStorage.getItem(storeKeyStateLocation);
2017
+ if (tmp === null) {
2018
+ console.warn('state does not match, restarting authentication flow');
2019
+ this.startAuthenticationFlow();
2020
+ return null;
2019
2021
  }
2020
- if (/auth\/callback/.test(finalLocation)) {
2022
+ if (!/auth\/callback/.test(tmp)) {
2021
2023
  // if by some coincidence we got callback URL to finalLocation
2022
- // we'll silently ignore it
2023
- finalLocation = null;
2024
- }
2025
- else {
2026
- this.log.info('location before auth flow start', finalLocation);
2024
+ // we'll silently ignore it and redirect user back to entrypoint
2025
+ finalLocation = tmp;
2027
2026
  }
2028
- this.sessionStorage.removeItem(key);
2027
+ this.sessionStorage.removeItem(storeKeyStateLocation);
2029
2028
  }
2030
2029
  const code = params.get('code') || '';
2031
2030
  this.log.info('authorization code received', code);
2032
2031
  yield this.exchangeCode(code);
2033
- if (finalLocation) {
2034
- this.location.assign(finalLocation);
2035
- }
2032
+ this.startFinalState(finalLocation);
2033
+ return null;
2036
2034
  }
2037
2035
  }
2038
2036
  return this.check();
2039
2037
  });
2040
2038
  }
2039
+ /**
2040
+ * Flagging session storage
2041
+ *
2042
+ * Challenge with sessions and browser tabs:
2043
+ * Each browser tab & window interacts with an isolated session. When user clicks on a link to and wants to open
2044
+ * it in a new window or a tab, or when tab is duplicated, session contents are copied!
2045
+ *
2046
+ * Consequences of that are that two (or more) tabs end up with the same session
2047
+ * and the same refresh token, and we need to detect if we're dealing with refresh token in an old or new session.
2048
+ *
2049
+ * With this function we start the final state and flag the session. This way we'll
2050
+ * know, after the redirection to the final location, if this is a final stage or not and if the refresh token
2051
+ * belongs to this session or not.
2052
+ */
2053
+ startFinalState(dst) {
2054
+ this.log.info('redirecting back to final destination', dst);
2055
+ this.sessionStorage.setItem(storeKeyFinalState, Date.now().toString());
2056
+ this.location.assign(dst);
2057
+ }
2058
+ /**
2059
+ * Called when refresh token is re-fetched.
2060
+ *
2061
+ * Cleanup aux items in the session store
2062
+ */
2063
+ completeFinalState() {
2064
+ this.sessionStorage.removeItem(storeKeyFinalState);
2065
+ this.sessionStorage.removeItem(storeKeyFlowStarted);
2066
+ const stateKey = /^auth\.state\.\w+\.location$/;
2067
+ for (let i = 0; i < this.sessionStorage.length; i++) {
2068
+ const key = this.sessionStorage.key(i);
2069
+ if (key !== null && stateKey.test(key)) {
2070
+ this.sessionStorage.removeItem(key);
2071
+ }
2072
+ }
2073
+ }
2074
+ /**
2075
+ * Are we in a final state or not?
2076
+ *
2077
+ * See startFinalState function for more details
2078
+ */
2079
+ inFinalState() {
2080
+ return this.sessionStorage.getItem(storeKeyFinalState) !== null;
2081
+ }
2041
2082
  /**
2042
2083
  * Checks current auth state; is access token loaded OR do we have a refresh token we can use
2043
2084
  *
@@ -2071,27 +2112,34 @@ class Auth {
2071
2112
  this[user] = authUser;
2072
2113
  return data;
2073
2114
  }).catch((error) => {
2074
- this.log.info('data fetch form info endpoint failed', { oauth2InfoURL, headers, error });
2115
+ this.log.error('data fetch form info endpoint failed', { oauth2InfoURL, headers, error });
2075
2116
  // assume invalid JWT and remove it
2076
2117
  this[accessToken] = undefined;
2077
2118
  throw new Error('Unauthenticated');
2078
2119
  });
2079
2120
  }
2080
- const refreshToken = this.sessionStorage.getItem(this.refreshTokenKey);
2121
+ const refreshToken = this.sessionStorage.getItem(storeKeyRefreshToken);
2081
2122
  if (refreshToken) {
2082
- this.log.info('refresh token found, exchanging it for new access token');
2123
+ this.log.debug('refresh token found', { refreshToken });
2083
2124
  /**
2084
- * Refresh token found in the storage,
2085
- * let's use it to get new access token
2125
+ * Only exchange refresh token if this is the final state (see startFinalState function for more details)
2126
+ *
2127
+ * If this is a duplicated-session, an error will be thrown and authentication will be (probably)
2128
+ * restarted by the caller.
2086
2129
  */
2087
- return this.exchangeRefresh(refreshToken);
2130
+ if (this.inFinalState()) {
2131
+ this.log.info('refreshing token', refreshToken);
2132
+ /**
2133
+ * Refresh token found in the storage,
2134
+ * let's use it to get new access token
2135
+ */
2136
+ return this.exchangeRefresh(refreshToken);
2137
+ }
2088
2138
  }
2089
2139
  throw new Error('Unauthenticated');
2090
2140
  });
2091
2141
  }
2092
2142
  logout() {
2093
- this[accessToken] = undefined;
2094
- this[user] = undefined;
2095
2143
  this.pruneStore();
2096
2144
  this.location.assign(Make({
2097
2145
  url: `${this.cortezaAuthURL}/logout`,
@@ -2106,6 +2154,7 @@ class Auth {
2106
2154
  */
2107
2155
  startAuthenticationFlow() {
2108
2156
  this.log.debug('starting new authentication flow');
2157
+ this.incFlowCounter();
2109
2158
  const state = Math.random().toString(36).substring(2);
2110
2159
  this.sessionStorage.setItem(`auth.state.${state}.location`, this.location.toString());
2111
2160
  this.location.assign(Make({
@@ -2118,6 +2167,24 @@ class Auth {
2118
2167
  },
2119
2168
  }));
2120
2169
  }
2170
+ /**
2171
+ * protects against too many tries when we try to auto-fix the "state does not match" error
2172
+ * by restarting the aut flow.
2173
+ */
2174
+ incFlowCounter() {
2175
+ const aux = this.sessionStorage.getItem(storeKeyFlowStarted);
2176
+ if (aux === null) {
2177
+ this.sessionStorage.setItem(storeKeyFlowStarted, '1');
2178
+ return;
2179
+ }
2180
+ const count = parseInt(this.sessionStorage.getItem(storeKeyFlowStarted));
2181
+ if (count >= maxStartAttempts) {
2182
+ // Too many start attempts
2183
+ this.sessionStorage.removeItem(storeKeyFlowStarted);
2184
+ throw new Error('could not start authentication flow, too many attempts');
2185
+ }
2186
+ this.sessionStorage.setItem(storeKeyFlowStarted, (count + 1).toString());
2187
+ }
2121
2188
  /**
2122
2189
  * Exchanges authorization code for access and refresh tokens
2123
2190
  */
@@ -2141,6 +2208,10 @@ class Auth {
2141
2208
  */
2142
2209
  exchangeRefresh(refreshToken) {
2143
2210
  return __awaiter(this, void 0, void 0, function* () {
2211
+ /**
2212
+ * Finalize
2213
+ */
2214
+ this.completeFinalState();
2144
2215
  return this.oauth2token({
2145
2216
  // eslint-disable-next-line @typescript-eslint/camelcase
2146
2217
  refresh_token: refreshToken || '',
@@ -2184,7 +2255,7 @@ class Auth {
2184
2255
  this.startAuthenticationFlow();
2185
2256
  });
2186
2257
  }), 1000 * timeout);
2187
- this.sessionStorage.setItem(this.refreshTokenKey, oa2tkn.refresh_token);
2258
+ this.sessionStorage.setItem(storeKeyRefreshToken, oa2tkn.refresh_token);
2188
2259
  const u = new system.User({
2189
2260
  userID: oa2tkn.sub,
2190
2261
  name: oa2tkn.name,
@@ -71029,14 +71100,109 @@ var __vue_staticRenderFns__$8 = [];
71029
71100
  undefined
71030
71101
  );
71031
71102
 
71103
+ function getDate(value) {
71104
+ if (!value) {
71105
+ return undefined;
71106
+ }
71107
+ if (value === 'Invalid date') {
71108
+ // Make sure this weird value does not cause us problems
71109
+ return undefined;
71110
+ }
71111
+ const dt = value.split(' ');
71112
+ if (dt.length > 1) {
71113
+ return dt[0]; // we only want the date part
71114
+ }
71115
+ else if (dt.length === 1) {
71116
+ // If date is in the value
71117
+ if (dt[0].indexOf('-') > -1) {
71118
+ return dt[0];
71119
+ }
71120
+ }
71121
+ }
71122
+ function getTime(value) {
71123
+ if (!value) {
71124
+ return undefined;
71125
+ }
71126
+ const dt = value.split(' ');
71127
+ if (dt.length > 1) {
71128
+ return dt[1]; // we only want the time part
71129
+ }
71130
+ else if (dt.length === 1) {
71131
+ // If we time is in the value
71132
+ if (dt[0].indexOf(':') > -1) {
71133
+ return dt[0];
71134
+ }
71135
+ }
71136
+ }
71137
+ function setDate(date, value, noDate = false, noTime = false) {
71138
+ if (noDate || !date || !date.length) {
71139
+ return undefined;
71140
+ }
71141
+ const time = getTime(value);
71142
+ if (noTime) {
71143
+ return moment(date, 'YYYY-MM-DD').format('YYYY-MM-DD');
71144
+ }
71145
+ return moment(date + ' ' + time, 'YYYY-MM-DD HH:mm').format('YYYY-MM-DD HH:mm');
71146
+ }
71147
+ function setTime(time, value, noDate = false, noTime = false) {
71148
+ if (noTime || !time || !time.length) {
71149
+ return undefined;
71150
+ }
71151
+ let date = getDate(value);
71152
+ if (noDate) {
71153
+ return moment(time, 'HH:mm').format('HH:mm');
71154
+ }
71155
+ if (!date) {
71156
+ // If no date is yet set default to today
71157
+ date = moment().format('YYYY-MM-DD');
71158
+ }
71159
+ return moment(date + ' ' + time, 'YYYY-MM-DD HH:mm').format('YYYY-MM-DD HH:mm');
71160
+ }
71161
+
71032
71162
  var script$a = {
71033
71163
  props: {
71034
- label: {
71164
+ value: {
71035
71165
  type: String,
71036
- default: undefined
71166
+ required: true
71037
71167
  },
71038
- // eslint-disable-next-line
71039
- value: {}
71168
+ noTime: {
71169
+ type: Boolean,
71170
+ default: false
71171
+ },
71172
+ noDate: {
71173
+ type: Boolean,
71174
+ default: false
71175
+ }
71176
+ },
71177
+ computed: {
71178
+ date: {
71179
+ get() {
71180
+ return getDate(this.value);
71181
+ },
71182
+
71183
+ set(date) {
71184
+ date = setDate(date, this.value, this.noDate, this.noTime);
71185
+
71186
+ if (date) {
71187
+ this.$emit('input', date);
71188
+ }
71189
+ }
71190
+
71191
+ },
71192
+ time: {
71193
+ get() {
71194
+ return getTime(this.value);
71195
+ },
71196
+
71197
+ set(time) {
71198
+ time = setTime(time, this.value, this.noDate, this.noTime);
71199
+
71200
+ if (time) {
71201
+ this.$emit('input', time);
71202
+ }
71203
+ }
71204
+
71205
+ }
71040
71206
  }
71041
71207
  };
71042
71208
 
@@ -71044,6 +71210,8 @@ var script$a = {
71044
71210
  const __vue_script__$a = script$a;
71045
71211
 
71046
71212
  /* template */
71213
+ 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)};
71214
+ var __vue_staticRenderFns__$9 = [];
71047
71215
 
71048
71216
  /* style */
71049
71217
  const __vue_inject_styles__$b = undefined;
@@ -71052,7 +71220,7 @@ const __vue_script__$a = script$a;
71052
71220
  /* module identifier */
71053
71221
  const __vue_module_identifier__$b = undefined;
71054
71222
  /* functional template */
71055
- const __vue_is_functional_template__$b = undefined;
71223
+ const __vue_is_functional_template__$b = false;
71056
71224
  /* style inject */
71057
71225
 
71058
71226
  /* style inject SSR */
@@ -71062,7 +71230,7 @@ const __vue_script__$a = script$a;
71062
71230
 
71063
71231
 
71064
71232
  const __vue_component__$b = /*#__PURE__*/normalizeComponent(
71065
- {},
71233
+ { render: __vue_render__$9, staticRenderFns: __vue_staticRenderFns__$9 },
71066
71234
  __vue_inject_styles__$b,
71067
71235
  __vue_script__$a,
71068
71236
  __vue_scope_id__$b,
@@ -71074,123 +71242,110 @@ const __vue_script__$a = script$a;
71074
71242
  undefined
71075
71243
  );
71076
71244
 
71245
+ //
71077
71246
  var script$b = {
71078
- extends: __vue_component__$b,
71247
+ components: {
71248
+ Draggable
71249
+ },
71079
71250
  props: {
71080
- noTime: {
71081
- type: Boolean,
71082
- default: false
71251
+ value: {
71252
+ type: String,
71253
+ required: true
71083
71254
  },
71084
- noDate: {
71255
+ fields: {
71256
+ type: Array,
71257
+ required: true
71258
+ },
71259
+ labels: {
71260
+ type: Object,
71261
+ required: true
71262
+ },
71263
+ allowTextInput: {
71085
71264
  type: Boolean,
71086
71265
  default: false
71087
71266
  }
71088
71267
  },
71268
+
71269
+ data() {
71270
+ return {
71271
+ items: [],
71272
+ textInput: false
71273
+ };
71274
+ },
71275
+
71089
71276
  computed: {
71090
- date: {
71277
+ presortValue: {
71091
71278
  get() {
71092
- return this.getDate();
71279
+ return this.value;
71093
71280
  },
71094
71281
 
71095
- set(d) {
71096
- this.setDate(d);
71282
+ set(value) {
71283
+ this.$emit('input', value);
71097
71284
  }
71098
71285
 
71099
71286
  },
71100
- time: {
71101
- get() {
71102
- return this.getTime();
71103
- },
71104
71287
 
71105
- set(t) {
71106
- this.setTime(t);
71107
- }
71288
+ sortDirections() {
71289
+ return [{
71290
+ value: false,
71291
+ text: this.labels.ascending
71292
+ }, {
71293
+ value: true,
71294
+ text: this.labels.descending
71295
+ }];
71296
+ },
71108
71297
 
71298
+ sortedFields() {
71299
+ return [...this.fields.sort((a, b) => a.label.localeCompare(b.label))];
71109
71300
  }
71110
- },
71111
- methods: {
71112
- getTime() {
71113
- if (!this.value) {
71114
- return undefined;
71115
- }
71116
-
71117
- let dt = this.value.split(' ');
71118
71301
 
71119
- if (dt.length > 1) {
71120
- return dt[1]; // we only want the time part
71121
- } else if (dt.length === 1) {
71122
- // If we time is in the value
71123
- if (dt[0].indexOf(':') > -1) {
71124
- return dt[0];
71125
- }
71126
- }
71127
- },
71302
+ },
71303
+ watch: {
71304
+ value: {
71305
+ immediate: true,
71128
71306
 
71129
- setTime(t) {
71130
- if (this.noTime || !t || !t.length) {
71131
- return;
71132
- }
71307
+ handler(value) {
71308
+ if (value) {
71309
+ const sort = value.includes(',') ? value.split(',') : [value];
71310
+ this.items = sort.map(field => {
71311
+ let descending = false;
71133
71312
 
71134
- let tm = moment();
71135
- let date = this.getDate();
71313
+ if (field.includes(' ')) {
71314
+ field = field.split(' ')[0];
71315
+ descending = true;
71316
+ }
71136
71317
 
71137
- if (this.noDate) {
71138
- tm = moment(t, 'HH:mm');
71139
- tm = tm.format('HH:mm');
71140
- } else {
71141
- if (!date) {
71142
- // If no date is yet set default to today
71143
- date = moment().format('YYYY-MM-DD');
71318
+ return {
71319
+ field,
71320
+ descending: !!descending
71321
+ };
71322
+ });
71323
+ } else {
71324
+ this.items = [{
71325
+ field: undefined,
71326
+ descending: false
71327
+ }];
71144
71328
  }
71145
-
71146
- tm = moment(date + ' ' + t, 'YYYY-MM-DD HH:mm');
71147
- tm = tm.format('YYYY-MM-DD HH:mm');
71148
71329
  }
71149
71330
 
71150
- this.$emit('input', tm);
71151
71331
  },
71332
+ items: {
71333
+ deep: true,
71152
71334
 
71153
- getDate() {
71154
- if (!this.value) {
71155
- return undefined;
71156
- }
71157
-
71158
- if (this.value === 'Invalid date') {
71159
- // Make sure this weird value does not cause us problems
71160
- return undefined;
71161
- }
71162
-
71163
- let dt = this.value.split(' ');
71164
-
71165
- if (dt.length > 1) {
71166
- return dt[0]; // we only want the date part
71167
- } else if (dt.length === 1) {
71168
- // If date is in the value
71169
- if (dt[0].indexOf('-') > -1) {
71170
- return dt[0];
71335
+ handler(items = [], oldItems = undefined) {
71336
+ if (oldItems) {
71337
+ this.$emit('input', items.filter(({
71338
+ field
71339
+ }) => field).map(({
71340
+ field,
71341
+ descending
71342
+ }) => {
71343
+ return descending ? `${field} DESC` : field;
71344
+ }).join(','));
71171
71345
  }
71172
71346
  }
71173
- },
71174
-
71175
- setDate(d) {
71176
- if (this.noDate || !d || !d.length) {
71177
- return;
71178
- }
71179
-
71180
- let dm = moment();
71181
- const time = this.getTime();
71182
-
71183
- if (this.noTime) {
71184
- dm = moment(d, 'YYYY-MM-DD');
71185
- dm = dm.format('YYYY-MM-DD');
71186
- } else {
71187
- dm = moment(d + ' ' + time, 'YYYY-MM-DD HH:mm');
71188
- dm = dm.format('YYYY-MM-DD HH:mm');
71189
- }
71190
71347
 
71191
- this.$emit('input', dm);
71192
71348
  }
71193
-
71194
71349
  }
71195
71350
  };
71196
71351
 
@@ -71198,8 +71353,8 @@ var script$b = {
71198
71353
  const __vue_script__$b = script$b;
71199
71354
 
71200
71355
  /* template */
71201
- 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)};
71202
- var __vue_staticRenderFns__$9 = [];
71356
+ 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)};
71357
+ var __vue_staticRenderFns__$a = [];
71203
71358
 
71204
71359
  /* style */
71205
71360
  const __vue_inject_styles__$c = undefined;
@@ -71218,7 +71373,7 @@ var __vue_staticRenderFns__$9 = [];
71218
71373
 
71219
71374
 
71220
71375
  const __vue_component__$c = /*#__PURE__*/normalizeComponent(
71221
- { render: __vue_render__$9, staticRenderFns: __vue_staticRenderFns__$9 },
71376
+ { render: __vue_render__$a, staticRenderFns: __vue_staticRenderFns__$a },
71222
71377
  __vue_inject_styles__$c,
71223
71378
  __vue_script__$b,
71224
71379
  __vue_scope_id__$c,
@@ -71231,45 +71386,24 @@ var __vue_staticRenderFns__$9 = [];
71231
71386
  );
71232
71387
 
71233
71388
  var script$c = {
71234
- extends: __vue_component__$b,
71235
71389
  props: {
71236
- simple: Boolean,
71237
- options: {
71238
- type: Array,
71239
- default: () => []
71390
+ value: {
71391
+ type: String,
71392
+ required: true
71240
71393
  },
71241
- optionsAppend: {
71242
- type: Array,
71243
- default: () => []
71394
+ simple: {
71395
+ type: Boolean,
71396
+ default: false
71244
71397
  }
71245
71398
  },
71246
-
71247
- data() {
71248
- return {
71249
- intervalOptions: [// @todo somehow add to i18
71250
- {
71251
- text: 'Every Minute',
71252
- value: '0 * * * * * *'
71253
- }]
71254
- };
71255
- },
71256
-
71257
71399
  computed: {
71258
- cOptions() {
71259
- if (this.options.length) {
71260
- return this.options;
71261
- }
71262
-
71263
- return this.intervalOptions.concat(this.optionsAppend);
71264
- },
71265
-
71266
- cValue: {
71400
+ cronValue: {
71267
71401
  get() {
71268
71402
  return this.value;
71269
71403
  },
71270
71404
 
71271
- set(v) {
71272
- this.$emit('input', v);
71405
+ set(value) {
71406
+ this.$emit('input', value);
71273
71407
  }
71274
71408
 
71275
71409
  }
@@ -71280,8 +71414,8 @@ var script$c = {
71280
71414
  const __vue_script__$c = script$c;
71281
71415
 
71282
71416
  /* template */
71283
- 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)};
71284
- var __vue_staticRenderFns__$a = [];
71417
+ var __vue_render__$b = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("div")};
71418
+ var __vue_staticRenderFns__$b = [];
71285
71419
 
71286
71420
  /* style */
71287
71421
  const __vue_inject_styles__$d = undefined;
@@ -71300,7 +71434,7 @@ var __vue_staticRenderFns__$a = [];
71300
71434
 
71301
71435
 
71302
71436
  const __vue_component__$d = /*#__PURE__*/normalizeComponent(
71303
- { render: __vue_render__$a, staticRenderFns: __vue_staticRenderFns__$a },
71437
+ { render: __vue_render__$b, staticRenderFns: __vue_staticRenderFns__$b },
71304
71438
  __vue_inject_styles__$d,
71305
71439
  __vue_script__$c,
71306
71440
  __vue_scope_id__$d,
@@ -71425,8 +71559,8 @@ var script$e = {
71425
71559
  const __vue_script__$e = script$e;
71426
71560
 
71427
71561
  /* template */
71428
- 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)};
71429
- var __vue_staticRenderFns__$b = [];
71562
+ 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)};
71563
+ var __vue_staticRenderFns__$c = [];
71430
71564
 
71431
71565
  /* style */
71432
71566
  const __vue_inject_styles__$f = function (inject) {
@@ -71448,7 +71582,7 @@ var __vue_staticRenderFns__$b = [];
71448
71582
 
71449
71583
 
71450
71584
  const __vue_component__$f = /*#__PURE__*/normalizeComponent(
71451
- { render: __vue_render__$b, staticRenderFns: __vue_staticRenderFns__$b },
71585
+ { render: __vue_render__$c, staticRenderFns: __vue_staticRenderFns__$c },
71452
71586
  __vue_inject_styles__$f,
71453
71587
  __vue_script__$e,
71454
71588
  __vue_scope_id__$f,
@@ -71474,8 +71608,8 @@ var script$f = {
71474
71608
  const __vue_script__$f = script$f;
71475
71609
 
71476
71610
  /* template */
71477
- 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)])};
71478
- var __vue_staticRenderFns__$c = [];
71611
+ 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)])};
71612
+ var __vue_staticRenderFns__$d = [];
71479
71613
 
71480
71614
  /* style */
71481
71615
  const __vue_inject_styles__$g = undefined;
@@ -71494,7 +71628,7 @@ var __vue_staticRenderFns__$c = [];
71494
71628
 
71495
71629
 
71496
71630
  const __vue_component__$g = /*#__PURE__*/normalizeComponent(
71497
- { render: __vue_render__$c, staticRenderFns: __vue_staticRenderFns__$c },
71631
+ { render: __vue_render__$d, staticRenderFns: __vue_staticRenderFns__$d },
71498
71632
  __vue_inject_styles__$g,
71499
71633
  __vue_script__$f,
71500
71634
  __vue_scope_id__$g,
@@ -71581,8 +71715,8 @@ var script$g = {
71581
71715
  const __vue_script__$g = script$g;
71582
71716
 
71583
71717
  /* template */
71584
- 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)};
71585
- var __vue_staticRenderFns__$d = [];
71718
+ 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)};
71719
+ var __vue_staticRenderFns__$e = [];
71586
71720
 
71587
71721
  /* style */
71588
71722
  const __vue_inject_styles__$h = undefined;
@@ -71601,7 +71735,7 @@ var __vue_staticRenderFns__$d = [];
71601
71735
 
71602
71736
 
71603
71737
  const __vue_component__$h = /*#__PURE__*/normalizeComponent(
71604
- { render: __vue_render__$d, staticRenderFns: __vue_staticRenderFns__$d },
71738
+ { render: __vue_render__$e, staticRenderFns: __vue_staticRenderFns__$e },
71605
71739
  __vue_inject_styles__$h,
71606
71740
  __vue_script__$g,
71607
71741
  __vue_scope_id__$h,
@@ -78597,8 +78731,8 @@ var script$i = {
78597
78731
  const __vue_script__$i = script$i;
78598
78732
 
78599
78733
  /* template */
78600
- 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)])};
78601
- var __vue_staticRenderFns__$e = [];
78734
+ 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)])};
78735
+ var __vue_staticRenderFns__$f = [];
78602
78736
 
78603
78737
  /* style */
78604
78738
  const __vue_inject_styles__$j = undefined;
@@ -78617,7 +78751,7 @@ var __vue_staticRenderFns__$e = [];
78617
78751
 
78618
78752
 
78619
78753
  const __vue_component__$j = /*#__PURE__*/normalizeComponent(
78620
- { render: __vue_render__$e, staticRenderFns: __vue_staticRenderFns__$e },
78754
+ { render: __vue_render__$f, staticRenderFns: __vue_staticRenderFns__$f },
78621
78755
  __vue_inject_styles__$j,
78622
78756
  __vue_script__$i,
78623
78757
  __vue_scope_id__$j,
@@ -78707,8 +78841,8 @@ var script$j = {
78707
78841
  const __vue_script__$j = script$j;
78708
78842
 
78709
78843
  /* template */
78710
- 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)};
78711
- var __vue_staticRenderFns__$f = [];
78844
+ 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)};
78845
+ var __vue_staticRenderFns__$g = [];
78712
78846
 
78713
78847
  /* style */
78714
78848
  const __vue_inject_styles__$k = undefined;
@@ -78727,7 +78861,7 @@ var __vue_staticRenderFns__$f = [];
78727
78861
 
78728
78862
 
78729
78863
  const __vue_component__$k = /*#__PURE__*/normalizeComponent(
78730
- { render: __vue_render__$f, staticRenderFns: __vue_staticRenderFns__$f },
78864
+ { render: __vue_render__$g, staticRenderFns: __vue_staticRenderFns__$g },
78731
78865
  __vue_inject_styles__$k,
78732
78866
  __vue_script__$j,
78733
78867
  __vue_scope_id__$k,
@@ -78836,8 +78970,8 @@ var script$k = {
78836
78970
  const __vue_script__$k = script$k;
78837
78971
 
78838
78972
  /* template */
78839
- 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)};
78840
- var __vue_staticRenderFns__$g = [];
78973
+ 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)};
78974
+ var __vue_staticRenderFns__$h = [];
78841
78975
 
78842
78976
  /* style */
78843
78977
  const __vue_inject_styles__$l = undefined;
@@ -78856,7 +78990,7 @@ var __vue_staticRenderFns__$g = [];
78856
78990
 
78857
78991
 
78858
78992
  const __vue_component__$l = /*#__PURE__*/normalizeComponent(
78859
- { render: __vue_render__$g, staticRenderFns: __vue_staticRenderFns__$g },
78993
+ { render: __vue_render__$h, staticRenderFns: __vue_staticRenderFns__$h },
78860
78994
  __vue_inject_styles__$l,
78861
78995
  __vue_script__$k,
78862
78996
  __vue_scope_id__$l,
@@ -78962,13 +79096,13 @@ var script$l = {
78962
79096
  const __vue_script__$l = script$l;
78963
79097
 
78964
79098
  /* template */
78965
- 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){
79099
+ var __vue_render__$i = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-card',{staticClass:"editor rt-content",attrs:{"no-body":""}},[(_vm.editor)?[_c('b-card-header',{attrs:{"header-class":"p-0 rounded-sm"}},[_c('editor-menu-bar',{attrs:{"editor":_vm.editor},scopedSlots:_vm._u([{key:"default",fn:function(ref){
78966
79100
  var commands = ref.commands;
78967
79101
  var isActive = ref.isActive;
78968
79102
  var getMarkAttrs = ref.getMarkAttrs;
78969
79103
  var getNodeAttrs = ref.getNodeAttrs;
78970
79104
  return [_c('r-toolbar',{attrs:{"editor":_vm.editor,"formats":_vm.toolbar,"commands":commands,"is-active":isActive,"get-mark-attrs":getMarkAttrs,"get-node-attrs":getNodeAttrs,"labels":_vm.labels,"current-value":_vm.currentValue}})]}}],null,false,2342935495)})],1),_vm._v(" "),_c('b-card-body',[_c('editor-content',{staticClass:"editor__content",attrs:{"editor":_vm.editor}})],1)]:_vm._e()],2)};
78971
- var __vue_staticRenderFns__$h = [];
79105
+ var __vue_staticRenderFns__$i = [];
78972
79106
 
78973
79107
  /* style */
78974
79108
  const __vue_inject_styles__$m = undefined;
@@ -78987,7 +79121,7 @@ var __vue_staticRenderFns__$h = [];
78987
79121
 
78988
79122
 
78989
79123
  const __vue_component__$m = /*#__PURE__*/normalizeComponent(
78990
- { render: __vue_render__$h, staticRenderFns: __vue_staticRenderFns__$h },
79124
+ { render: __vue_render__$i, staticRenderFns: __vue_staticRenderFns__$i },
78991
79125
  __vue_inject_styles__$m,
78992
79126
  __vue_script__$l,
78993
79127
  __vue_scope_id__$m,
@@ -79074,8 +79208,8 @@ var script$m = {
79074
79208
  const __vue_script__$m = script$m;
79075
79209
 
79076
79210
  /* template */
79077
- 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)};
79078
- var __vue_staticRenderFns__$i = [];
79211
+ 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)};
79212
+ var __vue_staticRenderFns__$j = [];
79079
79213
 
79080
79214
  /* style */
79081
79215
  const __vue_inject_styles__$n = function (inject) {
@@ -79096,7 +79230,7 @@ var __vue_staticRenderFns__$i = [];
79096
79230
 
79097
79231
 
79098
79232
  const __vue_component__$n = /*#__PURE__*/normalizeComponent(
79099
- { render: __vue_render__$i, staticRenderFns: __vue_staticRenderFns__$i },
79233
+ { render: __vue_render__$j, staticRenderFns: __vue_staticRenderFns__$j },
79100
79234
  __vue_inject_styles__$n,
79101
79235
  __vue_script__$m,
79102
79236
  __vue_scope_id__$n,
@@ -79162,8 +79296,8 @@ var script$n = {
79162
79296
  const __vue_script__$n = script$n;
79163
79297
 
79164
79298
  /* template */
79165
- 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"}})};
79166
- var __vue_staticRenderFns__$j = [];
79299
+ 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"}})};
79300
+ var __vue_staticRenderFns__$k = [];
79167
79301
 
79168
79302
  /* style */
79169
79303
  const __vue_inject_styles__$o = undefined;
@@ -79182,7 +79316,7 @@ var __vue_staticRenderFns__$j = [];
79182
79316
 
79183
79317
 
79184
79318
  const __vue_component__$o = /*#__PURE__*/normalizeComponent(
79185
- { render: __vue_render__$j, staticRenderFns: __vue_staticRenderFns__$j },
79319
+ { render: __vue_render__$k, staticRenderFns: __vue_staticRenderFns__$k },
79186
79320
  __vue_inject_styles__$o,
79187
79321
  __vue_script__$n,
79188
79322
  __vue_scope_id__$o,
@@ -79265,8 +79399,8 @@ var script$o = {
79265
79399
  const __vue_script__$o = script$o;
79266
79400
 
79267
79401
  /* template */
79268
- 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)};
79269
- var __vue_staticRenderFns__$k = [];
79402
+ 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)};
79403
+ var __vue_staticRenderFns__$l = [];
79270
79404
 
79271
79405
  /* style */
79272
79406
  const __vue_inject_styles__$p = undefined;
@@ -79285,7 +79419,7 @@ var __vue_staticRenderFns__$k = [];
79285
79419
 
79286
79420
 
79287
79421
  const __vue_component__$p = /*#__PURE__*/normalizeComponent(
79288
- { render: __vue_render__$k, staticRenderFns: __vue_staticRenderFns__$k },
79422
+ { render: __vue_render__$l, staticRenderFns: __vue_staticRenderFns__$l },
79289
79423
  __vue_inject_styles__$p,
79290
79424
  __vue_script__$o,
79291
79425
  __vue_scope_id__$p,
@@ -79329,8 +79463,8 @@ var script$p = {
79329
79463
  const __vue_script__$p = script$p;
79330
79464
 
79331
79465
  /* template */
79332
- 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)};
79333
- var __vue_staticRenderFns__$l = [];
79466
+ 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)};
79467
+ var __vue_staticRenderFns__$m = [];
79334
79468
 
79335
79469
  /* style */
79336
79470
  const __vue_inject_styles__$q = undefined;
@@ -79349,7 +79483,7 @@ var __vue_staticRenderFns__$l = [];
79349
79483
 
79350
79484
 
79351
79485
  const __vue_component__$q = /*#__PURE__*/normalizeComponent(
79352
- { render: __vue_render__$l, staticRenderFns: __vue_staticRenderFns__$l },
79486
+ { render: __vue_render__$m, staticRenderFns: __vue_staticRenderFns__$m },
79353
79487
  __vue_inject_styles__$q,
79354
79488
  __vue_script__$p,
79355
79489
  __vue_scope_id__$q,
@@ -79603,8 +79737,8 @@ var script$q = {
79603
79737
  const __vue_script__$q = script$q;
79604
79738
 
79605
79739
  /* template */
79606
- 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)};
79607
- var __vue_staticRenderFns__$m = [];
79740
+ 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)};
79741
+ var __vue_staticRenderFns__$n = [];
79608
79742
 
79609
79743
  /* style */
79610
79744
  const __vue_inject_styles__$r = function (inject) {
@@ -79625,7 +79759,7 @@ var __vue_staticRenderFns__$m = [];
79625
79759
 
79626
79760
 
79627
79761
  const __vue_component__$r = /*#__PURE__*/normalizeComponent(
79628
- { render: __vue_render__$m, staticRenderFns: __vue_staticRenderFns__$m },
79762
+ { render: __vue_render__$n, staticRenderFns: __vue_staticRenderFns__$n },
79629
79763
  __vue_inject_styles__$r,
79630
79764
  __vue_script__$q,
79631
79765
  __vue_scope_id__$r,
@@ -79742,8 +79876,8 @@ var script$r = {
79742
79876
  const __vue_script__$r = script$r;
79743
79877
 
79744
79878
  /* template */
79745
- 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)};
79746
- var __vue_staticRenderFns__$n = [];
79879
+ 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)};
79880
+ var __vue_staticRenderFns__$o = [];
79747
79881
 
79748
79882
  /* style */
79749
79883
  const __vue_inject_styles__$s = undefined;
@@ -79762,7 +79896,7 @@ var __vue_staticRenderFns__$n = [];
79762
79896
 
79763
79897
 
79764
79898
  const __vue_component__$s = /*#__PURE__*/normalizeComponent(
79765
- { render: __vue_render__$n, staticRenderFns: __vue_staticRenderFns__$n },
79899
+ { render: __vue_render__$o, staticRenderFns: __vue_staticRenderFns__$o },
79766
79900
  __vue_inject_styles__$s,
79767
79901
  __vue_script__$r,
79768
79902
  __vue_scope_id__$s,
@@ -79865,8 +79999,8 @@ var script$t = {
79865
79999
  const __vue_script__$t = script$t;
79866
80000
 
79867
80001
  /* template */
79868
- 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)])};
79869
- var __vue_staticRenderFns__$o = [];
80002
+ 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)])};
80003
+ var __vue_staticRenderFns__$p = [];
79870
80004
 
79871
80005
  /* style */
79872
80006
  const __vue_inject_styles__$u = undefined;
@@ -79885,7 +80019,7 @@ var __vue_staticRenderFns__$o = [];
79885
80019
 
79886
80020
 
79887
80021
  const __vue_component__$u = /*#__PURE__*/normalizeComponent(
79888
- { render: __vue_render__$o, staticRenderFns: __vue_staticRenderFns__$o },
80022
+ { render: __vue_render__$p, staticRenderFns: __vue_staticRenderFns__$p },
79889
80023
  __vue_inject_styles__$u,
79890
80024
  __vue_script__$t,
79891
80025
  __vue_scope_id__$u,
@@ -79906,8 +80040,8 @@ var script$u = {
79906
80040
  const __vue_script__$u = script$u;
79907
80041
 
79908
80042
  /* template */
79909
- 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)])};
79910
- var __vue_staticRenderFns__$p = [];
80043
+ 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)])};
80044
+ var __vue_staticRenderFns__$q = [];
79911
80045
 
79912
80046
  /* style */
79913
80047
  const __vue_inject_styles__$v = undefined;
@@ -79926,7 +80060,7 @@ var __vue_staticRenderFns__$p = [];
79926
80060
 
79927
80061
 
79928
80062
  const __vue_component__$v = /*#__PURE__*/normalizeComponent(
79929
- { render: __vue_render__$p, staticRenderFns: __vue_staticRenderFns__$p },
80063
+ { render: __vue_render__$q, staticRenderFns: __vue_staticRenderFns__$q },
79930
80064
  __vue_inject_styles__$v,
79931
80065
  __vue_script__$u,
79932
80066
  __vue_scope_id__$v,
@@ -79975,8 +80109,8 @@ var script$v = {
79975
80109
  const __vue_script__$v = script$v;
79976
80110
 
79977
80111
  /* template */
79978
- 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)};
79979
- var __vue_staticRenderFns__$q = [];
80112
+ 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)};
80113
+ var __vue_staticRenderFns__$r = [];
79980
80114
 
79981
80115
  /* style */
79982
80116
  const __vue_inject_styles__$w = undefined;
@@ -79995,7 +80129,7 @@ var __vue_staticRenderFns__$q = [];
79995
80129
 
79996
80130
 
79997
80131
  const __vue_component__$w = /*#__PURE__*/normalizeComponent(
79998
- { render: __vue_render__$q, staticRenderFns: __vue_staticRenderFns__$q },
80132
+ { render: __vue_render__$r, staticRenderFns: __vue_staticRenderFns__$r },
79999
80133
  __vue_inject_styles__$w,
80000
80134
  __vue_script__$v,
80001
80135
  __vue_scope_id__$w,
@@ -80025,8 +80159,8 @@ var script$w = {
80025
80159
  const __vue_script__$w = script$w;
80026
80160
 
80027
80161
  /* template */
80028
- 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)}})])};
80029
- var __vue_staticRenderFns__$r = [];
80162
+ 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)}})])};
80163
+ var __vue_staticRenderFns__$s = [];
80030
80164
 
80031
80165
  /* style */
80032
80166
  const __vue_inject_styles__$x = undefined;
@@ -80045,7 +80179,7 @@ var __vue_staticRenderFns__$r = [];
80045
80179
 
80046
80180
 
80047
80181
  const __vue_component__$x = /*#__PURE__*/normalizeComponent(
80048
- { render: __vue_render__$r, staticRenderFns: __vue_staticRenderFns__$r },
80182
+ { render: __vue_render__$s, staticRenderFns: __vue_staticRenderFns__$s },
80049
80183
  __vue_inject_styles__$x,
80050
80184
  __vue_script__$w,
80051
80185
  __vue_scope_id__$x,
@@ -80135,8 +80269,8 @@ var script$x = {
80135
80269
  const __vue_script__$x = script$x;
80136
80270
 
80137
80271
  /* template */
80138
- 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)};
80139
- var __vue_staticRenderFns__$s = [];
80272
+ 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)};
80273
+ var __vue_staticRenderFns__$t = [];
80140
80274
 
80141
80275
  /* style */
80142
80276
  const __vue_inject_styles__$y = undefined;
@@ -80155,7 +80289,7 @@ var __vue_staticRenderFns__$s = [];
80155
80289
 
80156
80290
 
80157
80291
  const __vue_component__$y = /*#__PURE__*/normalizeComponent(
80158
- { render: __vue_render__$s, staticRenderFns: __vue_staticRenderFns__$s },
80292
+ { render: __vue_render__$t, staticRenderFns: __vue_staticRenderFns__$t },
80159
80293
  __vue_inject_styles__$y,
80160
80294
  __vue_script__$x,
80161
80295
  __vue_scope_id__$y,
@@ -80234,7 +80368,7 @@ const definitions = {
80234
80368
  }
80235
80369
  else {
80236
80370
  // Resolve recordID
80237
- if (pType(v, 'record') === 'String') {
80371
+ if (pType(v, 'record') === 'ID') {
80238
80372
  recordID = record;
80239
80373
  }
80240
80374
  // Resolve namespaceID
@@ -80284,9 +80418,12 @@ const definitions = {
80284
80418
  pageID = pp[0].pageID;
80285
80419
  // @ts-ignore
80286
80420
  if (this.$root.$options.name === 'compose') {
80287
- let name = 'page.record.edit';
80288
- if (!edit) {
80289
- name = 'page.record';
80421
+ if (!edit && !recordID) {
80422
+ throw new Error('invalid record page prompt configuration');
80423
+ }
80424
+ let name = 'page.record';
80425
+ if (edit) {
80426
+ name += recordID ? '.edit' : '.create';
80290
80427
  }
80291
80428
  // If name and params match, make sure to refresh page instead of push
80292
80429
  // @ts-ignore
@@ -80436,12 +80573,12 @@ var script$y = {
80436
80573
  const __vue_script__$y = script$y;
80437
80574
 
80438
80575
  /* template */
80439
- 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){
80576
+ var __vue_render__$u = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',_vm._l((_vm.toasts),function(ref){
80440
80577
  var prompt = ref.prompt;
80441
80578
  var component = ref.component;
80442
80579
  var passive = ref.passive;
80443
80580
  return _c('b-toast',{key:'wfPromptToast-'+prompt.stateID,attrs:{"id":'wfPromptToast-'+prompt.stateID,"variant":_vm.pVal(prompt, 'variant', 'primary'),"visible":!_vm.isActive,"solid":"","no-auto-hide":!passive,"auto-hide-delay":_vm.pVal(prompt, 'timeout', _vm.defaultTimeout) * 1000,"no-close-button":!passive},scopedSlots:_vm._u([{key:"toast-title",fn:function(){return [_c('div',{staticClass:"d-flex flex-grow-1 align-items-baseline"},[_c('strong',{staticClass:"mr-auto"},[_vm._v(_vm._s(_vm.pVal(prompt, 'title', 'Workflow prompt')))]),_vm._v(" "),(!passive && _vm.active.length > 1)?_c('b-button',{attrs:{"variant":"link","size":"sm"},on:{"click":function($event){return _vm.activate(true)}}},[_vm._v("\n "+_vm._s(_vm.active.length)+" waiting\n ")]):_vm._e()],1)]},proxy:true}],null,true)},[_vm._v(" "),(component)?_c(component,{tag:"component",attrs:{"payload":prompt.payload,"loading":_vm.isLoading},on:{"submit":function($event){return _vm.resumeToast({ input: $event, prompt: prompt })}}}):_vm._e()],1)}),1)};
80444
- var __vue_staticRenderFns__$t = [];
80581
+ var __vue_staticRenderFns__$u = [];
80445
80582
 
80446
80583
  /* style */
80447
80584
  const __vue_inject_styles__$z = function (inject) {
@@ -80462,7 +80599,7 @@ var __vue_staticRenderFns__$t = [];
80462
80599
 
80463
80600
 
80464
80601
  const __vue_component__$z = /*#__PURE__*/normalizeComponent(
80465
- { render: __vue_render__$t, staticRenderFns: __vue_staticRenderFns__$t },
80602
+ { render: __vue_render__$u, staticRenderFns: __vue_staticRenderFns__$u },
80466
80603
  __vue_inject_styles__$z,
80467
80604
  __vue_script__$y,
80468
80605
  __vue_scope_id__$z,
@@ -80542,13 +80679,13 @@ var script$z = {
80542
80679
  const __vue_script__$z = script$z;
80543
80680
 
80544
80681
  /* template */
80545
- 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){
80682
+ var __vue_render__$v = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-modal',{attrs:{"size":"lg","lazy":"","hide-footer":!_vm.current,"title":_vm.current ? _vm.current.title : 'Workflow prompts',"busy":_vm.isLoading},on:{"hide":function($event){return _vm.deactivate()}},scopedSlots:_vm._u([(_vm.current)?{key:"modal-footer",fn:function(){return [_c('b-button',{attrs:{"variant":"link"},on:{"click":function($event){return _vm.activate(true)}}},[_vm._v("\n « Back to list\n ")])]},proxy:true}:null],null,true),model:{value:(_vm.isOpened),callback:function ($$v) {_vm.isOpened=$$v;},expression:"isOpened"}},[(_vm.current)?_c(_vm.current.component,{tag:"component",attrs:{"payload":_vm.current.prompt.payload,"loading":_vm.isLoading},on:{"submit":function($event){return _vm.resume({ input: $event, prompt: _vm.current.prompt })}}}):_c('div',_vm._l((_vm.list),function(ref){
80546
80683
  var key = ref.key;
80547
80684
  var title = ref.title;
80548
80685
  var age = ref.age;
80549
80686
  var prompt = ref.prompt;
80550
80687
  return _c('div',{key:key,staticClass:"d-flex flex-grow-1 align-items-baseline"},[_c('span',{staticClass:"mr-auto",on:{"click":function($event){return _vm.activate(prompt)}}},[_vm._v("\n "+_vm._s(title)+"\n "),_c('time',{staticClass:"muted small",attrs:{"datetime":prompt.createdAt}},[_vm._v("\n "+_vm._s(age)+"\n ")])]),_vm._v(" "),_vm._e()],1)}),0)],1)};
80551
- var __vue_staticRenderFns__$u = [];
80688
+ var __vue_staticRenderFns__$v = [];
80552
80689
 
80553
80690
  /* style */
80554
80691
  const __vue_inject_styles__$A = undefined;
@@ -80567,7 +80704,7 @@ var __vue_staticRenderFns__$u = [];
80567
80704
 
80568
80705
 
80569
80706
  const __vue_component__$A = /*#__PURE__*/normalizeComponent(
80570
- { render: __vue_render__$u, staticRenderFns: __vue_staticRenderFns__$u },
80707
+ { render: __vue_render__$v, staticRenderFns: __vue_staticRenderFns__$v },
80571
80708
  __vue_inject_styles__$A,
80572
80709
  __vue_script__$z,
80573
80710
  __vue_scope_id__$A,
@@ -80601,8 +80738,8 @@ var script$A = {
80601
80738
  const __vue_script__$A = script$A;
80602
80739
 
80603
80740
  /* template */
80604
- 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)};
80605
- var __vue_staticRenderFns__$v = [];
80741
+ 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)};
80742
+ var __vue_staticRenderFns__$w = [];
80606
80743
 
80607
80744
  /* style */
80608
80745
  const __vue_inject_styles__$B = undefined;
@@ -80621,7 +80758,7 @@ var __vue_staticRenderFns__$v = [];
80621
80758
 
80622
80759
 
80623
80760
  const __vue_component__$B = /*#__PURE__*/normalizeComponent(
80624
- { render: __vue_render__$v, staticRenderFns: __vue_staticRenderFns__$v },
80761
+ { render: __vue_render__$w, staticRenderFns: __vue_staticRenderFns__$w },
80625
80762
  __vue_inject_styles__$B,
80626
80763
  __vue_script__$A,
80627
80764
  __vue_scope_id__$B,
@@ -80633,7 +80770,16 @@ var __vue_staticRenderFns__$v = [];
80633
80770
  undefined
80634
80771
  );
80635
80772
 
80636
- const variants = ['primary', 'secondary', 'success', 'warning', 'danger', 'info', 'light', 'dark'];
80773
+ const variants = [
80774
+ { value: 'primary', text: 'Primary' },
80775
+ { value: 'secondary', text: 'Secondary' },
80776
+ { value: 'success', text: 'Success' },
80777
+ { value: 'warning', text: 'Warning' },
80778
+ { value: 'danger', text: 'Danger' },
80779
+ { value: 'info', text: 'Info' },
80780
+ { value: 'light', text: 'Light' },
80781
+ { value: 'dark', text: 'Dark' },
80782
+ ];
80637
80783
  const prompts = Object.freeze([{
80638
80784
  ref: 'redirect',
80639
80785
  meta: { short: 'Redirect user to an outside URL' },
@@ -80666,7 +80812,7 @@ const prompts = Object.freeze([{
80666
80812
  parameters: [
80667
80813
  { name: 'title', types: ['String'] },
80668
80814
  { name: 'message', types: ['String'], required: true },
80669
- { name: 'variant', types: ['String'], meta: { visual: { options: variants } } },
80815
+ { name: 'variant', types: ['String'], meta: { visual: { input: { type: 'select', properties: { options: variants } } } } },
80670
80816
  { name: 'timeout', types: ['Integer'], meta: { description: 'How long do we show the notification in seconds' } },
80671
80817
  ],
80672
80818
  }, {
@@ -80676,7 +80822,7 @@ const prompts = Object.freeze([{
80676
80822
  { name: 'title', types: ['String'] },
80677
80823
  { name: 'message', types: ['String'], required: true },
80678
80824
  { name: 'buttonLabel', types: ['String'] },
80679
- { name: 'buttonVariant', types: ['String'], meta: { visual: { options: variants } } },
80825
+ { name: 'buttonVariant', types: ['String'], meta: { visual: { input: { type: 'select', properties: { options: variants } } } } },
80680
80826
  { name: 'buttonValue', types: ['Any'] },
80681
80827
  ],
80682
80828
  }, {
@@ -80686,10 +80832,10 @@ const prompts = Object.freeze([{
80686
80832
  { name: 'title', types: ['String'] },
80687
80833
  { name: 'message', types: ['String'], required: true },
80688
80834
  { name: 'confirmButtonLabel', types: ['String'] },
80689
- { name: 'confirmButtonVariant', types: ['String'], meta: { visual: { options: variants } } },
80835
+ { name: 'confirmButtonVariant', types: ['String'], meta: { visual: { input: { type: 'select', properties: { options: variants } } } } },
80690
80836
  { name: 'confirmButtonValue', types: ['Any'] },
80691
80837
  { name: 'rejectButtonLabel', types: ['String'] },
80692
- { name: 'rejectButtonVariant', types: ['String'], meta: { visual: { options: variants } } },
80838
+ { name: 'rejectButtonVariant', types: ['String'], meta: { visual: { input: { type: 'select', properties: { options: variants } } } } },
80693
80839
  { name: 'rejectButtonValue', types: ['Any'] },
80694
80840
  ],
80695
80841
  results: [
@@ -80700,7 +80846,7 @@ const prompts = Object.freeze([{
80700
80846
  meta: { short: 'Prompt user with a single input' },
80701
80847
  parameters: [
80702
80848
  { name: 'title', types: ['String'] },
80703
- { name: 'variant', types: ['String'], meta: { visual: { options: variants } } },
80849
+ { name: 'variant', types: ['String'], meta: { visual: { input: { type: 'select', properties: { options: variants } } } } },
80704
80850
  { name: 'message', types: ['String'], required: true },
80705
80851
  { name: 'label', types: ['String'] },
80706
80852
  {
@@ -80708,7 +80854,15 @@ const prompts = Object.freeze([{
80708
80854
  types: ['String'],
80709
80855
  meta: {
80710
80856
  visual: {
80711
- options: ['text', 'number', 'email', 'password', 'search', 'date', 'time'],
80857
+ options: [
80858
+ { value: 'text', text: 'Text' },
80859
+ { value: 'number', text: 'Number' },
80860
+ { value: 'email', text: 'Email' },
80861
+ { value: 'password', text: 'Password' },
80862
+ { value: 'search', text: 'Search' },
80863
+ { value: 'date', text: 'Date' },
80864
+ { value: 'time', text: 'Time' },
80865
+ ],
80712
80866
  },
80713
80867
  },
80714
80868
  },
@@ -80722,7 +80876,7 @@ const prompts = Object.freeze([{
80722
80876
  meta: { short: 'Prompt user with options' },
80723
80877
  parameters: [
80724
80878
  { name: 'title', types: ['String'] },
80725
- { name: 'variant', types: ['String'], meta: { visual: { options: variants } } },
80879
+ { name: 'variant', types: ['String'], meta: { visual: { input: { type: 'select', properties: { options: variants } } } } },
80726
80880
  { name: 'message', types: ['String'], required: true },
80727
80881
  { name: 'label', types: ['String'] },
80728
80882
  {
@@ -80730,7 +80884,10 @@ const prompts = Object.freeze([{
80730
80884
  types: ['String'],
80731
80885
  meta: {
80732
80886
  visual: {
80733
- options: ['select', 'radio'],
80887
+ options: [
80888
+ { value: 'select', text: 'Select' },
80889
+ { value: 'radio', text: 'Radio' },
80890
+ ],
80734
80891
  },
80735
80892
  },
80736
80893
  },
@@ -80769,8 +80926,8 @@ var script$B = {
80769
80926
  const __vue_script__$B = script$B;
80770
80927
 
80771
80928
  /* template */
80772
- 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()])};
80773
- var __vue_staticRenderFns__$w = [];
80929
+ 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()])};
80930
+ var __vue_staticRenderFns__$x = [];
80774
80931
 
80775
80932
  /* style */
80776
80933
  const __vue_inject_styles__$C = function (inject) {
@@ -80791,7 +80948,7 @@ var __vue_staticRenderFns__$w = [];
80791
80948
 
80792
80949
 
80793
80950
  const __vue_component__$C = /*#__PURE__*/normalizeComponent(
80794
- { render: __vue_render__$w, staticRenderFns: __vue_staticRenderFns__$w },
80951
+ { render: __vue_render__$x, staticRenderFns: __vue_staticRenderFns__$x },
80795
80952
  __vue_inject_styles__$C,
80796
80953
  __vue_script__$B,
80797
80954
  __vue_scope_id__$C,
@@ -80999,10 +81156,10 @@ var script$C = {
80999
81156
  const __vue_script__$C = script$C;
81000
81157
 
81001
81158
  /* template */
81002
- 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:{
81159
+ var __vue_render__$y = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"header-navigation d-flex align-items-center justify-content-between sticky-top pr-3 pl-5 "},[_c('div',{staticClass:"d-flex text-nowrap flex-grow-1 align-items-center header h-100 w-100"},[[_c('div',{staticClass:"spacer",class:{
81003
81160
  'expanded': _vm.sidebarPinned,
81004
81161
  }})],_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)])};
81005
- var __vue_staticRenderFns__$x = [];
81162
+ var __vue_staticRenderFns__$y = [];
81006
81163
 
81007
81164
  /* style */
81008
81165
  const __vue_inject_styles__$D = function (inject) {
@@ -81023,7 +81180,7 @@ var __vue_staticRenderFns__$x = [];
81023
81180
 
81024
81181
 
81025
81182
  const __vue_component__$D = /*#__PURE__*/normalizeComponent(
81026
- { render: __vue_render__$x, staticRenderFns: __vue_staticRenderFns__$x },
81183
+ { render: __vue_render__$y, staticRenderFns: __vue_staticRenderFns__$y },
81027
81184
  __vue_inject_styles__$D,
81028
81185
  __vue_script__$C,
81029
81186
  __vue_scope_id__$D,
@@ -81333,8 +81490,8 @@ var script$D = {
81333
81490
  const __vue_script__$D = script$D;
81334
81491
 
81335
81492
  /* template */
81336
- 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)])};
81337
- var __vue_staticRenderFns__$y = [];
81493
+ 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)])};
81494
+ var __vue_staticRenderFns__$z = [];
81338
81495
 
81339
81496
  /* style */
81340
81497
  const __vue_inject_styles__$E = function (inject) {
@@ -81356,7 +81513,7 @@ var __vue_staticRenderFns__$y = [];
81356
81513
 
81357
81514
 
81358
81515
  const __vue_component__$E = /*#__PURE__*/normalizeComponent(
81359
- { render: __vue_render__$y, staticRenderFns: __vue_staticRenderFns__$y },
81516
+ { render: __vue_render__$z, staticRenderFns: __vue_staticRenderFns__$z },
81360
81517
  __vue_inject_styles__$E,
81361
81518
  __vue_script__$D,
81362
81519
  __vue_scope_id__$E,
@@ -81495,15 +81652,19 @@ var script$E = {
81495
81652
  },
81496
81653
 
81497
81654
  // Recursively check for child pages that are open, so that parents can open aswell
81498
- showChildren(page = {}, children = []) {
81499
- if (page.pageID === this.$route.params.pageID) {
81500
- return page.pageID === this.$route.params.pageID;
81655
+ showChildren({
81656
+ params = {},
81657
+ children = []
81658
+ }) {
81659
+ const partialParamsMatch = Object.entries(params).some(([key, value]) => {
81660
+ return this.$route.params[key] === value;
81661
+ });
81662
+
81663
+ if (partialParamsMatch) {
81664
+ return partialParamsMatch;
81501
81665
  }
81502
81666
 
81503
- return children.map(({
81504
- page,
81505
- children
81506
- }) => this.showChildren(page, children)).some(isOpen => isOpen);
81667
+ return children.map(c => this.showChildren(c)).some(isOpen => isOpen);
81507
81668
  }
81508
81669
 
81509
81670
  }
@@ -81513,21 +81674,21 @@ var script$E = {
81513
81674
  const __vue_script__$E = script$E;
81514
81675
 
81515
81676
  /* template */
81516
- 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){
81677
+ var __vue_render__$A = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"nav-sidebar"},_vm._l((_vm.items),function(ref,index){
81517
81678
  var page = ref.page; if ( page === void 0 ) page = {};
81518
81679
  var params = ref.params; if ( params === void 0 ) params = {};
81519
81680
  var children = ref.children; if ( children === void 0 ) children = [];
81520
- return _c('b-button',{key:index,staticClass:"w-100 text-dark text-decoration-none p-0 pt-2 nav-item",attrs:{"variant":"link","active-class":"nav-active","exact-active-class":"nav-active","to":{ name: page.name || _vm.defaultRouteName, params: params }}},[_c('span',{staticClass:"d-inline-block w-75 text-nowrap text-truncate",on:{"click":function($event){return _vm.closeSidebar()}}},[(page.icon)?_c('font-awesome-icon',{staticClass:"icon",attrs:{"icon":page.icon}}):_vm._e(),_vm._v(" "),_c('span',{staticClass:"title"},[_vm._v("\n "+_vm._s(page.title)+"\n ")])],1),_vm._v(" "),(children.length)?[_c('b-button',{staticClass:"p-0 float-right",attrs:{"variant":"link","disabled":_vm.showChildren(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)};
81521
- var __vue_staticRenderFns__$z = [];
81681
+ 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)};
81682
+ var __vue_staticRenderFns__$A = [];
81522
81683
 
81523
81684
  /* style */
81524
81685
  const __vue_inject_styles__$F = function (inject) {
81525
81686
  if (!inject) return
81526
- 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 });
81687
+ inject("data-v-16ceb9b5_0", { source: ".pointer-none[data-v-16ceb9b5]{pointer-events:none}.svg-inline--fa[data-v-16ceb9b5]{width:30px}.nav-item>span>.title[data-v-16ceb9b5]{font-family:Poppins-Regular}.nav-active>span>.icon[data-v-16ceb9b5]{color:#4d7281}.nav-active>span>.title[data-v-16ceb9b5]{font-family:Poppins-SemiBold}.nav-item[data-v-16ceb9b5]{text-align:left}[dir=rtl] .nav-item[data-v-16ceb9b5]{text-align:right}", map: undefined, media: undefined });
81527
81688
 
81528
81689
  };
81529
81690
  /* scoped */
81530
- const __vue_scope_id__$F = "data-v-6ae03c14";
81691
+ const __vue_scope_id__$F = "data-v-16ceb9b5";
81531
81692
  /* module identifier */
81532
81693
  const __vue_module_identifier__$F = undefined;
81533
81694
  /* functional template */
@@ -81539,7 +81700,7 @@ var __vue_staticRenderFns__$z = [];
81539
81700
 
81540
81701
 
81541
81702
  const __vue_component__$F = /*#__PURE__*/normalizeComponent(
81542
- { render: __vue_render__$z, staticRenderFns: __vue_staticRenderFns__$z },
81703
+ { render: __vue_render__$A, staticRenderFns: __vue_staticRenderFns__$A },
81543
81704
  __vue_inject_styles__$F,
81544
81705
  __vue_script__$E,
81545
81706
  __vue_scope_id__$F,
@@ -81699,8 +81860,8 @@ var script$F = {
81699
81860
  const __vue_script__$F = script$F;
81700
81861
 
81701
81862
  /* template */
81702
- 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()};
81703
- var __vue_staticRenderFns__$A = [];
81863
+ 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()};
81864
+ var __vue_staticRenderFns__$B = [];
81704
81865
 
81705
81866
  /* style */
81706
81867
  const __vue_inject_styles__$G = function (inject) {
@@ -81721,7 +81882,7 @@ var __vue_staticRenderFns__$A = [];
81721
81882
 
81722
81883
 
81723
81884
  const __vue_component__$G = /*#__PURE__*/normalizeComponent(
81724
- { render: __vue_render__$A, staticRenderFns: __vue_staticRenderFns__$A },
81885
+ { render: __vue_render__$B, staticRenderFns: __vue_staticRenderFns__$B },
81725
81886
  __vue_inject_styles__$G,
81726
81887
  __vue_script__$F,
81727
81888
  __vue_scope_id__$G,
@@ -81788,8 +81949,8 @@ var script$G = {
81788
81949
  const __vue_script__$G = script$G;
81789
81950
 
81790
81951
  /* template */
81791
- 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 ")])])};
81792
- var __vue_staticRenderFns__$B = [];
81952
+ 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 ")])])};
81953
+ var __vue_staticRenderFns__$C = [];
81793
81954
 
81794
81955
  /* style */
81795
81956
  const __vue_inject_styles__$H = undefined;
@@ -81808,7 +81969,7 @@ var __vue_staticRenderFns__$B = [];
81808
81969
 
81809
81970
 
81810
81971
  const __vue_component__$H = /*#__PURE__*/normalizeComponent(
81811
- { render: __vue_render__$B, staticRenderFns: __vue_staticRenderFns__$B },
81972
+ { render: __vue_render__$C, staticRenderFns: __vue_staticRenderFns__$C },
81812
81973
  __vue_inject_styles__$H,
81813
81974
  __vue_script__$G,
81814
81975
  __vue_scope_id__$H,
@@ -81877,8 +82038,8 @@ var script$I = {
81877
82038
  const __vue_script__$I = script$I;
81878
82039
 
81879
82040
  /* template */
81880
- 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)}})])};
81881
- var __vue_staticRenderFns__$C = [];
82041
+ 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)}})])};
82042
+ var __vue_staticRenderFns__$D = [];
81882
82043
 
81883
82044
  /* style */
81884
82045
  const __vue_inject_styles__$J = undefined;
@@ -81897,7 +82058,7 @@ var __vue_staticRenderFns__$C = [];
81897
82058
 
81898
82059
 
81899
82060
  const __vue_component__$J = /*#__PURE__*/normalizeComponent(
81900
- { render: __vue_render__$C, staticRenderFns: __vue_staticRenderFns__$C },
82061
+ { render: __vue_render__$D, staticRenderFns: __vue_staticRenderFns__$D },
81901
82062
  __vue_inject_styles__$J,
81902
82063
  __vue_script__$I,
81903
82064
  __vue_scope_id__$J,
@@ -81925,8 +82086,8 @@ var script$J = {
81925
82086
  const __vue_script__$J = script$J;
81926
82087
 
81927
82088
  /* template */
81928
- 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)};
81929
- var __vue_staticRenderFns__$D = [];
82089
+ 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)};
82090
+ var __vue_staticRenderFns__$E = [];
81930
82091
 
81931
82092
  /* style */
81932
82093
  const __vue_inject_styles__$K = undefined;
@@ -81945,7 +82106,7 @@ var __vue_staticRenderFns__$D = [];
81945
82106
 
81946
82107
 
81947
82108
  const __vue_component__$K = /*#__PURE__*/normalizeComponent(
81948
- { render: __vue_render__$D, staticRenderFns: __vue_staticRenderFns__$D },
82109
+ { render: __vue_render__$E, staticRenderFns: __vue_staticRenderFns__$E },
81949
82110
  __vue_inject_styles__$K,
81950
82111
  __vue_script__$J,
81951
82112
  __vue_scope_id__$K,
@@ -81965,8 +82126,8 @@ var script$K = {
81965
82126
  const __vue_script__$K = script$K;
81966
82127
 
81967
82128
  /* template */
81968
- 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)};
81969
- var __vue_staticRenderFns__$E = [];
82129
+ 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)};
82130
+ var __vue_staticRenderFns__$F = [];
81970
82131
 
81971
82132
  /* style */
81972
82133
  const __vue_inject_styles__$L = undefined;
@@ -81985,7 +82146,7 @@ var __vue_staticRenderFns__$E = [];
81985
82146
 
81986
82147
 
81987
82148
  const __vue_component__$L = /*#__PURE__*/normalizeComponent(
81988
- { render: __vue_render__$E, staticRenderFns: __vue_staticRenderFns__$E },
82149
+ { render: __vue_render__$F, staticRenderFns: __vue_staticRenderFns__$F },
81989
82150
  __vue_inject_styles__$L,
81990
82151
  __vue_script__$K,
81991
82152
  __vue_scope_id__$L,
@@ -82030,8 +82191,8 @@ var script$L = {
82030
82191
  const __vue_script__$L = script$L;
82031
82192
 
82032
82193
  /* template */
82033
- 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)};
82034
- var __vue_staticRenderFns__$F = [];
82194
+ 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)};
82195
+ var __vue_staticRenderFns__$G = [];
82035
82196
 
82036
82197
  /* style */
82037
82198
  const __vue_inject_styles__$M = undefined;
@@ -82050,7 +82211,7 @@ var __vue_staticRenderFns__$F = [];
82050
82211
 
82051
82212
 
82052
82213
  const __vue_component__$M = /*#__PURE__*/normalizeComponent(
82053
- { render: __vue_render__$F, staticRenderFns: __vue_staticRenderFns__$F },
82214
+ { render: __vue_render__$G, staticRenderFns: __vue_staticRenderFns__$G },
82054
82215
  __vue_inject_styles__$M,
82055
82216
  __vue_script__$L,
82056
82217
  __vue_scope_id__$M,
@@ -82105,11 +82266,11 @@ var script$M = {
82105
82266
  const __vue_script__$M = script$M;
82106
82267
 
82107
82268
  /* template */
82108
- 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){
82269
+ var __vue_render__$H = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',_vm._l((_vm.toasts),function(t){return _c('b-toast',_vm._b({key:t.id,attrs:{"visible":"","title":t.payload.title,"no-close-button":!t.actions.hide,"toast-class":"overflow-unset"},on:{"hide":function($event){t.actions.hide ? t.actions.hide.cb(t) : _vm.evtSink;}}},'b-toast',t.options || {},false),[_c('b-card',{staticClass:"border-0",attrs:{"header-bg-variant":"transparent","bg-variant":"transparent","body-class":"p-0"}},[_c('b-card-text',[_vm._v("\n "+_vm._s(t.payload.notes)+"\n ")]),_vm._v(" "),(t.payload.link)?_c('b-card-text',[_c('c-toaster-link',{attrs:{"toast":t}})],1):_vm._e(),_vm._v(" "),_vm._l((_vm.extraActions(t)),function(ref){
82109
82270
  var name = ref[0];
82110
82271
  var act = ref[1];
82111
82272
  return _c(_vm.actComponent(act),_vm._b({key:name,tag:"component",staticClass:"mr-1",on:{"action":function($event){act.cb ? act.cb(t, $event) : _vm.evtSink;}}},'component',act,false))})],2)],1)}),1)};
82112
- var __vue_staticRenderFns__$G = [];
82273
+ var __vue_staticRenderFns__$H = [];
82113
82274
 
82114
82275
  /* style */
82115
82276
  const __vue_inject_styles__$N = function (inject) {
@@ -82130,7 +82291,7 @@ var __vue_staticRenderFns__$G = [];
82130
82291
 
82131
82292
 
82132
82293
  const __vue_component__$N = /*#__PURE__*/normalizeComponent(
82133
- { render: __vue_render__$G, staticRenderFns: __vue_staticRenderFns__$G },
82294
+ { render: __vue_render__$H, staticRenderFns: __vue_staticRenderFns__$H },
82134
82295
  __vue_inject_styles__$N,
82135
82296
  __vue_script__$M,
82136
82297
  __vue_scope_id__$N,
@@ -82177,8 +82338,8 @@ var script$N = {
82177
82338
  const __vue_script__$N = script$N;
82178
82339
 
82179
82340
  /* template */
82180
- 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)};
82181
- var __vue_staticRenderFns__$H = [];
82341
+ 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)};
82342
+ var __vue_staticRenderFns__$I = [];
82182
82343
 
82183
82344
  /* style */
82184
82345
  const __vue_inject_styles__$O = function (inject) {
@@ -82199,7 +82360,7 @@ var __vue_staticRenderFns__$H = [];
82199
82360
 
82200
82361
 
82201
82362
  const __vue_component__$O = /*#__PURE__*/normalizeComponent(
82202
- { render: __vue_render__$H, staticRenderFns: __vue_staticRenderFns__$H },
82363
+ { render: __vue_render__$I, staticRenderFns: __vue_staticRenderFns__$I },
82203
82364
  __vue_inject_styles__$O,
82204
82365
  __vue_script__$N,
82205
82366
  __vue_scope_id__$O,
@@ -82238,36 +82399,46 @@ var __vue_staticRenderFns__$H = [];
82238
82399
  //
82239
82400
  //
82240
82401
  //
82402
+ //
82403
+ //
82404
+ //
82405
+ //
82406
+ //
82407
+ //
82408
+ //
82409
+ //
82410
+ //
82411
+ //
82241
82412
  var script$O = {
82242
- name: "FieldItem",
82413
+ name: 'CItemPickerItem',
82243
82414
  props: {
82244
- field: {
82415
+ item: {
82245
82416
  type: Object,
82246
82417
  required: true
82247
82418
  },
82248
- isSelected: {
82249
- type: Boolean,
82250
- required: true
82419
+ textField: {
82420
+ type: String,
82421
+ default: 'text'
82251
82422
  },
82252
- selectedFields: {
82253
- type: Array,
82254
- required: true
82423
+ selected: {
82424
+ type: Boolean
82255
82425
  },
82256
- systemFieldLabel: {
82257
- type: String,
82258
- required: true
82426
+ disabled: {
82427
+ type: Boolean
82428
+ },
82429
+ disabledDragging: {
82430
+ type: Boolean
82431
+ },
82432
+ disabledSorting: {
82433
+ type: Boolean
82434
+ },
82435
+ hideIcons: {
82436
+ type: Boolean
82259
82437
  }
82260
82438
  },
82261
82439
  computed: {
82262
- fieldLabel() {
82263
- let fieldLabel = this.field.name || "";
82264
-
82265
- if (this.field.label) {
82266
- fieldLabel = `${this.field.label} (${this.field.name})`;
82267
- }
82268
-
82269
- fieldLabel += this.field.isRequired ? " *" : "";
82270
- return fieldLabel;
82440
+ _hideIcons() {
82441
+ return !this.disabled && !this.hideIcons;
82271
82442
  }
82272
82443
 
82273
82444
  }
@@ -82277,17 +82448,17 @@ var script$O = {
82277
82448
  const __vue_script__$O = script$O;
82278
82449
 
82279
82450
  /* template */
82280
- 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)};
82281
- var __vue_staticRenderFns__$I = [];
82451
+ 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)};
82452
+ var __vue_staticRenderFns__$J = [];
82282
82453
 
82283
82454
  /* style */
82284
82455
  const __vue_inject_styles__$P = function (inject) {
82285
82456
  if (!inject) return
82286
- inject("data-v-475bd41a_0", { source: ".handle[data-v-475bd41a]{cursor:grab}.cursor-default[data-v-475bd41a]{cursor:default}", map: undefined, media: undefined });
82457
+ inject("data-v-70b6001a_0", { source: ".handle[data-v-70b6001a]{cursor:grab}.handle[data-v-70b6001a]:active{cursor:grabbing}.cursor-default[data-v-70b6001a]{cursor:default}", map: undefined, media: undefined });
82287
82458
 
82288
82459
  };
82289
82460
  /* scoped */
82290
- const __vue_scope_id__$P = "data-v-475bd41a";
82461
+ const __vue_scope_id__$P = "data-v-70b6001a";
82291
82462
  /* module identifier */
82292
82463
  const __vue_module_identifier__$P = undefined;
82293
82464
  /* functional template */
@@ -82299,7 +82470,7 @@ var __vue_staticRenderFns__$I = [];
82299
82470
 
82300
82471
 
82301
82472
  const __vue_component__$P = /*#__PURE__*/normalizeComponent(
82302
- { render: __vue_render__$I, staticRenderFns: __vue_staticRenderFns__$I },
82473
+ { render: __vue_render__$J, staticRenderFns: __vue_staticRenderFns__$J },
82303
82474
  __vue_inject_styles__$P,
82304
82475
  __vue_script__$O,
82305
82476
  __vue_scope_id__$P,
@@ -82313,161 +82484,246 @@ var __vue_staticRenderFns__$I = [];
82313
82484
 
82314
82485
  //
82315
82486
  var script$P = {
82487
+ name: 'CItemPicker',
82316
82488
  components: {
82317
- draggable,
82318
- FieldItem: __vue_component__$P
82489
+ draggable: Draggable,
82490
+ CItemPickerItem: __vue_component__$P
82319
82491
  },
82320
82492
  props: {
82321
- module: {
82322
- type: Object,
82493
+ /**
82494
+ * List of all items, available and selected/picked
82495
+ *
82496
+ * Internally, we'll build 2 arrays for each group (available + selected)
82497
+ * and work with them.
82498
+ * On the outside, we'll always deal input array of (full) items and
82499
+ * array of selected/picked values of those items.
82500
+ *
82501
+ * This component mimics the behaviour of <b-form-select> component from
82502
+ * Vue Bootstrap and could serve as a drop-in replacement!
82503
+ */
82504
+ options: {
82505
+ type: Array,
82323
82506
  required: true
82324
82507
  },
82325
- fields: {
82508
+
82509
+ /**
82510
+ * List of values that can be found in the items
82511
+ */
82512
+ value: {
82326
82513
  type: Array,
82327
82514
  required: true
82328
82515
  },
82329
- disabled: {
82330
- type: Boolean,
82331
- default: false
82516
+ valueField: {
82517
+ type: String,
82518
+ default: 'value'
82332
82519
  },
82333
- disabledTypes: {
82334
- type: Array,
82335
- default: () => []
82520
+ textField: {
82521
+ type: String,
82522
+ default: 'text'
82336
82523
  },
82337
- disableSystemFields: {
82338
- type: Boolean,
82339
- default: false
82524
+ labels: {
82525
+ type: Object,
82526
+ default: () => ({
82527
+ searchPlaceholder: 'Filter items',
82528
+ availableItems: 'Available',
82529
+ selectAllItems: 'Select all',
82530
+ selectedItems: 'Selected',
82531
+ unselectAllItems: 'Unselect all',
82532
+ noItemsFound: 'No items found'
82533
+ })
82340
82534
  },
82341
- systemFields: {
82342
- type: Array,
82343
- default: null
82535
+ disabled: {
82536
+ type: Boolean
82344
82537
  },
82345
- fieldSubset: {
82346
- type: Array,
82347
- default: null
82538
+ disabledFilter: {
82539
+ type: Boolean
82348
82540
  },
82349
- group: {
82350
- type: String,
82351
- default: 'fields'
82541
+ disabledSorting: {
82542
+ type: Boolean
82352
82543
  },
82353
- maxHeight: {
82354
- type: String,
82355
- default: 'max-height: 65vh;'
82544
+ disabledDragging: {
82545
+ type: Boolean
82356
82546
  },
82357
- labels: {
82358
- type: Object,
82359
- required: true
82547
+ hideIcons: {
82548
+ type: Boolean
82549
+ },
82550
+ hideFilter: {
82551
+ type: Boolean
82360
82552
  }
82361
82553
  },
82362
82554
 
82363
82555
  data() {
82364
82556
  return {
82365
- modules: [],
82366
- query: ''
82557
+ query: '',
82558
+ available: [],
82559
+ selected: []
82367
82560
  };
82368
82561
  },
82369
82562
 
82370
82563
  computed: {
82371
- selectedFields: {
82372
- get() {
82373
- // Needs to be done this way so it retains order of fields
82374
- return this.fields.reduce((fields, field) => {
82375
- field = this.allFields.find(({
82376
- name
82377
- }) => name === field.name);
82564
+ _disabledFilter() {
82565
+ return this.disabled || this.disabledFilter;
82566
+ },
82378
82567
 
82379
- if (field) {
82380
- fields.push(field);
82381
- }
82568
+ _disabledSorting() {
82569
+ return this.disabled || this.disabledSorting;
82570
+ },
82382
82571
 
82383
- return fields;
82384
- }, []);
82572
+ /**
82573
+ * Provides list of all available items, filtered by query
82574
+ * and a setter for draggable component to update available items on drag
82575
+ */
82576
+ filteredAvailable: {
82577
+ get() {
82578
+ const q = this.query.toLowerCase();
82579
+ return this.available.filter(i => i.text.toLowerCase().indexOf(q) > -1);
82385
82580
  },
82386
82581
 
82387
- set(f) {
82388
- this.$emit('update:fields', f);
82582
+ set(items) {
82583
+ this.available = items;
82389
82584
  }
82390
82585
 
82391
82586
  },
82392
82587
 
82393
- allFields() {
82394
- let mFields = [];
82588
+ /**
82589
+ * Provides list of all selected items, filtered by query
82590
+ * and a setter for draggable component to update selected items on drag
82591
+ */
82592
+ filteredSelected: {
82593
+ get() {
82594
+ const q = this.query.toLowerCase();
82595
+ return this.selected.filter(i => i.text.toLowerCase().indexOf(q) > -1);
82596
+ },
82395
82597
 
82396
- if (this.fieldSubset) {
82397
- mFields = this.module.filterFields(this.fieldSubset);
82398
- } else {
82399
- mFields = this.module.fields;
82598
+ set(items) {
82599
+ this.selected = items;
82400
82600
  }
82401
82601
 
82402
- if (this.disabledTypes.length > 0) {
82403
- mFields = mFields.filter(({
82404
- kind
82405
- }) => !this.disabledTypes.find(t => t === kind));
82406
- }
82602
+ }
82603
+ },
82604
+ watch: {
82605
+ /**
82606
+ * Update parent component (if needed)
82607
+ * @param v
82608
+ */
82609
+ selected(items) {
82610
+ const value = items.map(i => i[this.valueField]);
82611
+ /**
82612
+ * Make sure we do not fall into an infinite loop
82613
+ *
82614
+ * If we emit update/input event, parent will update value/v-modal
82615
+ * and watcher function for value will trigger the sync and recreate
82616
+ * the selected array and trigger this watcher!
82617
+ */
82407
82618
 
82408
- let sysFields = [];
82619
+ if (value.length === this.value.length) {
82620
+ if (value.filter(v => !this.value.includes(v)).length === 0) {
82621
+ return;
82622
+ }
82623
+ } // satisfy value.sync
82409
82624
 
82410
- if (!this.disableSystemFields) {
82411
- sysFields = this.module.systemFields();
82412
82625
 
82413
- if (this.systemFields) {
82414
- sysFields = sysFields.filter(({
82415
- name
82416
- }) => this.systemFields.find(sf => sf === name));
82417
- }
82418
- } else {
82419
- mFields = mFields.filter(({
82420
- isSystem
82421
- }) => !isSystem);
82626
+ this.$emit('update:value', value); // satisfy v-model
82627
+
82628
+ this.$emit('input', value);
82629
+ },
82630
+
82631
+ options: {
82632
+ deep: true,
82633
+ immediate: true,
82634
+
82635
+ handler() {
82636
+ this.sync();
82422
82637
  }
82423
82638
 
82424
- return [...[...mFields].sort((a, b) => a.label.localeCompare(b.label)), ...sysFields];
82425
82639
  },
82426
82640
 
82427
- allSelected() {
82428
- return this.availableFields.length > 0;
82641
+ value(vv) {
82642
+ this.sync();
82643
+ }
82644
+
82645
+ },
82646
+
82647
+ created() {
82648
+ this.options.forEach(o => {
82649
+ if (typeof o !== 'object') {
82650
+ throw new Error('expecting array of objects for options prop');
82651
+ }
82652
+ });
82653
+ },
82654
+
82655
+ methods: {
82656
+ _disableDragging(e) {
82657
+ if (this.disabledDragging && e.to !== e.from) {
82658
+ return false;
82659
+ }
82429
82660
  },
82430
82661
 
82431
- allUnselected() {
82432
- return this.selectedFields.length > 0;
82662
+ selectAll() {
82663
+ if (this.disabledSorting) {
82664
+ // sorting disabled, just reuse list from the frozen list
82665
+ this.selected = [...this.frozen()];
82666
+ } else {
82667
+ // sorting enabled, push all items left in available
82668
+ // at the end of the list
82669
+ this.selected.push(...this.available);
82670
+ }
82671
+
82672
+ this.available = [];
82433
82673
  },
82434
82674
 
82435
- availableFields() {
82436
- // Remove selected fields
82437
- return this.allFields.filter(a => !this.fields.some(f => a.name === f.name));
82675
+ select(item) {
82676
+ // remove available
82677
+ this.available = this.available.filter(i => i !== item); // put the selected item in the place where it was (if sorting is disabled)
82678
+ // or at the end
82679
+
82680
+ if (this.disabledSorting) {
82681
+ this.selected = this.frozen().filter(i => !this.available.includes(i));
82682
+ } else {
82683
+ this.selected.push(item);
82684
+ }
82438
82685
  },
82439
82686
 
82440
- filteredAvailableFields() {
82441
- return this.filterFields(this.availableFields);
82687
+ unselectAll() {
82688
+ this.available = [...this.frozen()];
82689
+ this.selected = [];
82442
82690
  },
82443
82691
 
82444
- filteredSelectedFields() {
82445
- return this.filterFields(this.selectedFields);
82446
- }
82692
+ unselect(item) {
82693
+ // filtering out the unselected item
82694
+ this.selected = this.selected.filter(i => i !== item); // sync available from the list of frozen items without selected
82447
82695
 
82448
- },
82449
- watch: {
82450
- 'moduleID'(o, n) {
82451
- if (o !== n) {
82452
- this.selectedFields = [];
82453
- }
82454
- }
82696
+ this.available = this.frozen().filter(i => !this.selected.includes(i));
82697
+ },
82455
82698
 
82456
- },
82457
- methods: {
82458
- filterFields(fields) {
82459
- return fields.filter(f => f.name.toLowerCase().indexOf(this.query.toLowerCase()) > -1 || f.label.toLowerCase().indexOf(this.query.toLowerCase()) > -1);
82699
+ /**
82700
+ * Returns true given item is selected or not
82701
+ *
82702
+ * Item is considered selected if value of item's value-field is inside the selected array.
82703
+ *
82704
+ * @param item object
82705
+ * @returns boolean
82706
+ */
82707
+ isPicked(item) {
82708
+ return item[this.valueField] && this.value.includes(item[this.valueField]);
82460
82709
  },
82461
82710
 
82462
- selectField(field) {
82463
- if (this.selectedFields.some(selectedField => selectedField.label === field.label)) return;
82464
- this.selectedFields = [...this.selectedFields, field];
82711
+ sync() {
82712
+ /**
82713
+ * filter all unpicked options, freeze each item in the array and
82714
+ * build list of available items
82715
+ */
82716
+ this.available = this.frozen().filter(opt => !this.isPicked(opt));
82717
+ /**
82718
+ * filter all unpicked options, freeze each item in the array and
82719
+ * build list of selected items
82720
+ */
82721
+
82722
+ this.selected = this.frozen().filter(opt => this.isPicked(opt));
82465
82723
  },
82466
82724
 
82467
- unselectField(field) {
82468
- this.selectedFields = this.selectedFields.filter(({
82469
- name
82470
- }) => field.name !== name);
82725
+ frozen() {
82726
+ return this.options.map(Object.freeze);
82471
82727
  }
82472
82728
 
82473
82729
  }
@@ -82477,21 +82733,19 @@ var script$P = {
82477
82733
  const __vue_script__$P = script$P;
82478
82734
 
82479
82735
  /* template */
82480
- 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)};
82481
- var __vue_staticRenderFns__$J = [];
82736
+ 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)};
82737
+ var __vue_staticRenderFns__$K = [];
82482
82738
 
82483
82739
  /* style */
82484
- const __vue_inject_styles__$Q = function (inject) {
82485
- if (!inject) return
82486
- inject("data-v-6f297e50_0", { source: ".handle[data-v-6f297e50]{cursor:grab}", map: undefined, media: undefined });
82487
-
82488
- };
82740
+ const __vue_inject_styles__$Q = undefined;
82489
82741
  /* scoped */
82490
- const __vue_scope_id__$Q = "data-v-6f297e50";
82742
+ const __vue_scope_id__$Q = undefined;
82491
82743
  /* module identifier */
82492
82744
  const __vue_module_identifier__$Q = undefined;
82493
82745
  /* functional template */
82494
82746
  const __vue_is_functional_template__$Q = false;
82747
+ /* style inject */
82748
+
82495
82749
  /* style inject SSR */
82496
82750
 
82497
82751
  /* style inject shadow dom */
@@ -82499,89 +82753,36 @@ var __vue_staticRenderFns__$J = [];
82499
82753
 
82500
82754
 
82501
82755
  const __vue_component__$Q = /*#__PURE__*/normalizeComponent(
82502
- { render: __vue_render__$J, staticRenderFns: __vue_staticRenderFns__$J },
82756
+ { render: __vue_render__$K, staticRenderFns: __vue_staticRenderFns__$K },
82503
82757
  __vue_inject_styles__$Q,
82504
82758
  __vue_script__$P,
82505
82759
  __vue_scope_id__$Q,
82506
82760
  __vue_is_functional_template__$Q,
82507
82761
  __vue_module_identifier__$Q,
82508
82762
  false,
82509
- createInjector,
82763
+ undefined,
82510
82764
  undefined,
82511
82765
  undefined
82512
82766
  );
82513
82767
 
82514
- const del$1 = '|||';
82515
- /**
82516
- * Extract subgroups from the given groups
82517
- * @param groups
82518
- * @param path Array of groups that represent the path
82519
- */
82520
- function extractGroups(groups, ...path) {
82521
- const jpath = path.join(del$1);
82522
- return [...(new Set(groups
82523
- .filter(g => g.slice(0, path.length).join(del$1) === jpath)
82524
- .map(g => g.slice(path.length, path.length + 1)[0])
82525
- .filter(g => !!g))).values()];
82526
- }
82527
- /**
82528
- * Extract subgroups from the catalogue that match the given path
82529
- *
82530
- * @param cat Catalogue
82531
- * @param path Array of groups that represent the path
82532
- * @constructor
82533
- */
82534
- function ExtractSubgroups(cat, ...path) {
82535
- const groups = Object.values(cat)
82536
- .map(({ group }) => group)
82537
- .filter(g => g !== undefined);
82538
- return extractGroups(groups, ...path);
82539
- }
82540
- /**
82541
- * Returns all components that match the given path
82542
- *
82543
- * @param cat Catalogue
82544
- * @param path Array of groups that represent the path
82545
-
82546
- */
82547
- function ExtractComponents(cat, ...path) {
82548
- const jpath = path.join(del$1);
82549
- return Object.values(cat)
82550
- .filter(({ group }) => (group || []).join(del$1) === jpath);
82551
- }
82552
-
82553
- //
82554
82768
  var script$Q = {
82555
- name: 'ComponentList',
82556
82769
  props: {
82557
- catalogue: {
82558
- required: true,
82559
- type: Object
82770
+ displayElement: {
82771
+ type: Object,
82772
+ required: true
82560
82773
  },
82561
- path: {
82562
- type: Array,
82563
- default: () => []
82774
+ labels: {
82775
+ type: Object,
82776
+ default: () => ({})
82564
82777
  }
82565
82778
  },
82566
82779
  computed: {
82567
- // name of the current group
82568
- root() {
82569
- return this.path.length === 0;
82570
- },
82571
-
82572
- // name of the current group
82573
- group() {
82574
- return this.root ? undefined : this.path[this.path.length - 1];
82780
+ dataframes() {
82781
+ return this.displayElement.dataframes || [];
82575
82782
  },
82576
82783
 
82577
- // returns all groups at this level
82578
- subgroups() {
82579
- return ExtractSubgroups(this.catalogue, ...this.path);
82580
- },
82581
-
82582
- components() {
82583
- // return ExtractComponents(this.catalogue, ...this.path)
82584
- return ExtractComponents(this.catalogue, ...this.path);
82784
+ options() {
82785
+ return this.displayElement.options || undefined;
82585
82786
  }
82586
82787
 
82587
82788
  }
@@ -82591,21 +82792,17 @@ var script$Q = {
82591
82792
  const __vue_script__$Q = script$Q;
82592
82793
 
82593
82794
  /* template */
82594
- var __vue_render__$K = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[(!_vm.root)?_c('h5',{staticClass:"mb-0"},[_vm._v("\n "+_vm._s(_vm.group)+"\n ")]):_vm._e(),_vm._v(" "),(_vm.subgroups.length > 0 || _vm.components.length > 0)?_c('div',[_vm._l((_vm.components),function(cmp,i){return _c('div',{key:i,staticClass:"component ml-2",on:{"click":function($event){return _vm.$emit('select', cmp)}}},[_vm._v("\n "+_vm._s(cmp.name || cmp.component.name || 'Untitled')+"\n "),(cmp.wip)?_c('b-badge',{staticClass:"float-right",attrs:{"variant":"warning"}},[_vm._v("\n wip\n ")]):_vm._e()],1)}),_vm._v(" "),_vm._l((_vm.subgroups),function(group){return _c('component-list',{key:group,staticClass:"my-3",attrs:{"catalogue":_vm.catalogue,"path":_vm.path.concat( [group])},on:{"select":function($event){return _vm.$emit('select', $event)}}})})],2):_vm._e()])};
82595
- var __vue_staticRenderFns__$K = [];
82596
82795
 
82597
82796
  /* style */
82598
- const __vue_inject_styles__$R = function (inject) {
82599
- if (!inject) return
82600
- inject("data-v-8b2b254e_0", { source: ".component[data-v-8b2b254e]{cursor:pointer}", map: undefined, media: undefined });
82601
-
82602
- };
82797
+ const __vue_inject_styles__$R = undefined;
82603
82798
  /* scoped */
82604
- const __vue_scope_id__$R = "data-v-8b2b254e";
82799
+ const __vue_scope_id__$R = undefined;
82605
82800
  /* module identifier */
82606
82801
  const __vue_module_identifier__$R = undefined;
82607
82802
  /* functional template */
82608
- const __vue_is_functional_template__$R = false;
82803
+ const __vue_is_functional_template__$R = undefined;
82804
+ /* style inject */
82805
+
82609
82806
  /* style inject SSR */
82610
82807
 
82611
82808
  /* style inject shadow dom */
@@ -82613,77 +82810,75 @@ var __vue_staticRenderFns__$K = [];
82613
82810
 
82614
82811
 
82615
82812
  const __vue_component__$R = /*#__PURE__*/normalizeComponent(
82616
- { render: __vue_render__$K, staticRenderFns: __vue_staticRenderFns__$K },
82813
+ {},
82617
82814
  __vue_inject_styles__$R,
82618
82815
  __vue_script__$Q,
82619
82816
  __vue_scope_id__$R,
82620
82817
  __vue_is_functional_template__$R,
82621
82818
  __vue_module_identifier__$R,
82622
82819
  false,
82623
- createInjector,
82820
+ undefined,
82624
82821
  undefined,
82625
82822
  undefined
82626
82823
  );
82627
82824
 
82628
82825
  //
82629
82826
  var script$R = {
82630
- name: 'C3',
82631
- components: {
82632
- ComponentList: __vue_component__$R
82633
- },
82634
- props: {
82635
- catalogue: {
82636
- required: true,
82637
- type: Object
82638
- }
82639
- },
82640
- computed: {
82641
- controlGroups() {
82642
- if (this.current.controls.length === 0) {
82643
- return [];
82644
- }
82827
+ extends: __vue_component__$R,
82645
82828
 
82646
- if (Array.isArray(this.current.controls[0])) {
82647
- // already grouped
82648
- return this.current.controls;
82649
- } // make one virtual group holding all controls
82829
+ data() {
82830
+ return {
82831
+ chart: undefined,
82832
+ plugins: [Funnel, colorschemes]
82833
+ };
82834
+ },
82650
82835
 
82836
+ computed: {
82837
+ localDataframe() {
82838
+ return this.dataframes[0];
82839
+ },
82651
82840
 
82652
- return [this.current.controls];
82841
+ size() {
82842
+ return this.displayElement ? this.displayElement.meta.size || 100 : 100;
82653
82843
  }
82654
82844
 
82655
82845
  },
82846
+ watch: {
82847
+ dataframes: {
82848
+ deep: true,
82656
82849
 
82657
- data() {
82658
- return {
82659
- current: undefined
82660
- };
82661
- },
82850
+ handler(dataframes = []) {
82851
+ if (dataframes.length) {
82852
+ this.$nextTick(() => {
82853
+ this.renderChart();
82854
+ });
82855
+ }
82856
+ }
82662
82857
 
82663
- methods: {
82664
- setCurrent(component) {
82665
- this.current = {
82666
- props: {},
82667
- ...component
82668
- };
82669
- this.setScenario(this.current);
82670
82858
  },
82859
+ size: {
82860
+ immediate: true,
82861
+ deep: true,
82671
82862
 
82672
- setScenario({
82673
- props = {},
82674
- controls = []
82675
- }) {
82676
- // create missing props from controls
82677
- const apply = (c, props) => c.update(props, c.value(props) || null);
82863
+ handler() {
82864
+ this.$nextTick(() => {
82865
+ this.renderChart();
82866
+ });
82867
+ }
82678
82868
 
82679
- controls.forEach(c => {
82680
- if (Array.isArray(c)) {
82681
- c.forEach(c => apply(c, props));
82682
- } else {
82683
- apply(c, props);
82684
- }
82869
+ }
82870
+ },
82871
+ methods: {
82872
+ renderChart() {
82873
+ if (this.chart) {
82874
+ this.chart.destroy();
82875
+ }
82876
+
82877
+ const ctx = this.$refs.chart.getContext('2d');
82878
+ const chartConfig = this.options.getChartConfiguration(this.dataframes);
82879
+ this.chart = new Chart(ctx, { ...chartConfig,
82880
+ plugins: this.plugins
82685
82881
  });
82686
- this.current.props = props;
82687
82882
  }
82688
82883
 
82689
82884
  }
@@ -82693,21 +82888,19 @@ var script$R = {
82693
82888
  const __vue_script__$R = script$R;
82694
82889
 
82695
82890
  /* template */
82696
- 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()])};
82891
+ var __vue_render__$L = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('canvas',{ref:"chart",staticClass:"h-100 w-100"})};
82697
82892
  var __vue_staticRenderFns__$L = [];
82698
82893
 
82699
82894
  /* style */
82700
- const __vue_inject_styles__$S = function (inject) {
82701
- if (!inject) return
82702
- inject("data-v-2c86815c_0", { source: ".layout{height:100vh;width:100vw;display:grid;grid-template-rows:auto 400px;grid-template-columns:300px auto;align-content:stretch;grid-template-areas:\"side main\" \"side controls\"}.layout aside{grid-area:side;overflow:auto}.layout main{grid-area:main;background-image:linear-gradient(135deg,#f3f3f5 21.43%,#fff 21.43%,#fff 50%,#f3f3f5 50%,#f3f3f5 71.43%,#fff 71.43%,#fff 100%);background-size:35px 35px;overflow:auto}.layout .controls{grid-area:controls;overflow:auto}.layout .controls .control-group{float:left}.layout .scenario{cursor:pointer}", map: undefined, media: undefined });
82703
-
82704
- };
82895
+ const __vue_inject_styles__$S = undefined;
82705
82896
  /* scoped */
82706
82897
  const __vue_scope_id__$S = undefined;
82707
82898
  /* module identifier */
82708
82899
  const __vue_module_identifier__$S = undefined;
82709
82900
  /* functional template */
82710
82901
  const __vue_is_functional_template__$S = false;
82902
+ /* style inject */
82903
+
82711
82904
  /* style inject SSR */
82712
82905
 
82713
82906
  /* style inject shadow dom */
@@ -82722,32 +82915,90 @@ var __vue_staticRenderFns__$L = [];
82722
82915
  __vue_is_functional_template__$S,
82723
82916
  __vue_module_identifier__$S,
82724
82917
  false,
82725
- createInjector,
82918
+ undefined,
82726
82919
  undefined,
82727
82920
  undefined
82728
82921
  );
82729
82922
 
82730
- //
82731
- //
82732
- //
82733
- //
82734
- //
82735
- //
82736
- //
82737
- //
82738
- //
82739
- //
82740
82923
  //
82741
82924
  var script$S = {
82742
- props: {
82743
- label: {
82744
- required: true,
82745
- type: String
82925
+ extends: __vue_component__$R,
82926
+
82927
+ data() {
82928
+ return {
82929
+ vvb: ['0', '0', '0', '0']
82930
+ };
82931
+ },
82932
+
82933
+ computed: {
82934
+ viewbox() {
82935
+ return this.vvb.join(' ');
82936
+ },
82937
+
82938
+ style() {
82939
+ return {
82940
+ fill: this.options.color || '#000000',
82941
+ backgroundColor: this.options.backgroundColor || '#ffffff'
82942
+ };
82943
+ },
82944
+
82945
+ value() {
82946
+ if (this.dataframes.length) {
82947
+ const {
82948
+ rows = [],
82949
+ columns = []
82950
+ } = this.dataframes[0];
82951
+
82952
+ if (columns.length) {
82953
+ const columnIndex = columns.findIndex(({
82954
+ name
82955
+ }) => name === this.options.valueColumn);
82956
+
82957
+ if (rows.length) {
82958
+ return rows[0] ? rows[0][columnIndex] || '' : '';
82959
+ }
82960
+ }
82961
+ }
82962
+
82963
+ return '';
82746
82964
  },
82965
+
82966
+ displayedMetric() {
82967
+ const {
82968
+ prefix = '',
82969
+ suffix = ''
82970
+ } = this.options;
82971
+
82972
+ if (this.value) {
82973
+ return `${prefix}${this.value}${suffix}`;
82974
+ }
82975
+
82976
+ return '';
82977
+ }
82978
+
82979
+ },
82980
+ watch: {
82747
82981
  value: {
82748
- type: String,
82749
- default: () => ''
82982
+ immediate: true,
82983
+ handler: function () {
82984
+ this.update();
82985
+ }
82986
+ }
82987
+ },
82988
+ methods: {
82989
+ update() {
82990
+ this.$nextTick(function () {
82991
+ const {
82992
+ width,
82993
+ height
82994
+ } = this.$refs.metricItem.getBBox();
82995
+ const tmp = [...this.vvb];
82996
+ tmp[2] = parseInt(Math.ceil(width));
82997
+ tmp[3] = parseInt(Math.ceil(height));
82998
+ this.vvb = tmp;
82999
+ });
82750
83000
  }
83001
+
82751
83002
  }
82752
83003
  };
82753
83004
 
@@ -82755,7 +83006,7 @@ var script$S = {
82755
83006
  const __vue_script__$S = script$S;
82756
83007
 
82757
83008
  /* template */
82758
- 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)};
83009
+ var __vue_render__$M = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.options)?_c('div',{staticClass:"d-flex align-items-center justify-content-center overflow-hidden h-100 px-2 rounded",style:(_vm.style)},[_c('svg',{staticClass:"h-100 w-100 align-items-end d-flex",attrs:{"viewBox":_vm.viewbox,"width":"100%","height":"100%"}},[_c('text',{ref:"metricItem",attrs:{"y":"50%","x":"50%","text-anchor":"middle","dominant-baseline":"central","text-rendering":"geometricPrecision"}},[_vm._v("\n "+_vm._s(_vm.displayedMetric)+"\n ")])])]):_vm._e()};
82759
83010
  var __vue_staticRenderFns__$M = [];
82760
83011
 
82761
83012
  /* style */
@@ -82787,27 +83038,377 @@ var __vue_staticRenderFns__$M = [];
82787
83038
  undefined
82788
83039
  );
82789
83040
 
82790
- //
82791
- //
82792
- //
82793
- //
82794
- //
82795
- //
82796
- //
82797
- //
82798
- //
82799
- //
82800
83041
  //
82801
83042
  var script$T = {
82802
- props: {
82803
- label: {
82804
- required: true,
82805
- type: String
83043
+ extends: __vue_component__$R,
83044
+
83045
+ data() {
83046
+ return {
83047
+ sort: {
83048
+ field: '',
83049
+ descending: false
83050
+ },
83051
+ cursors: [],
83052
+ cursor: undefined
83053
+ };
83054
+ },
83055
+
83056
+ computed: {
83057
+ localDataframe() {
83058
+ return this.dataframes[0];
82806
83059
  },
82807
- value: {
82808
- type: String,
82809
- default: () => ''
83060
+
83061
+ // indexFrames groups frames based on the related DS identifiers
83062
+ // for easier work.
83063
+ indexFrames() {
83064
+ const ix = {};
83065
+
83066
+ for (const df of this.dataframes || []) {
83067
+ if (!df.relSource) {
83068
+ continue;
83069
+ }
83070
+
83071
+ if (!ix[df.relSource]) {
83072
+ ix[df.relSource] = {};
83073
+ }
83074
+
83075
+ if (!ix[df.relSource][df.refValue]) {
83076
+ ix[df.relSource][df.refValue] = [];
83077
+ }
83078
+
83079
+ ix[df.relSource][df.refValue].push(df);
83080
+ }
83081
+
83082
+ return ix;
83083
+ },
83084
+
83085
+ tabelify() {
83086
+ if (!this.dataframes.length) {
83087
+ return {};
83088
+ }
83089
+
83090
+ return this.tabelifyFrame(this.localDataframe);
83091
+ },
83092
+
83093
+ hasPrevPage() {
83094
+ return !!this.cursors.length;
83095
+ },
83096
+
83097
+ nextPage() {
83098
+ if (this.localDataframe) {
83099
+ const {
83100
+ nextPage
83101
+ } = this.localDataframe.paging || {};
83102
+ return nextPage;
83103
+ }
83104
+
83105
+ return undefined;
83106
+ },
83107
+
83108
+ hasNextPage() {
83109
+ return !!this.nextPage;
83110
+ }
83111
+
83112
+ },
83113
+ watch: {
83114
+ localDataframe: {
83115
+ immediate: true,
83116
+
83117
+ handler(dataframe, oldDataframe) {
83118
+ if (dataframe && !oldDataframe) {
83119
+ const firstField = dataframe.sort.includes(',') ? dataframe.sort.split(',')[0] : dataframe.sort;
83120
+
83121
+ if (firstField.includes('DESC')) {
83122
+ this.sort.descending = true;
83123
+ this.sort.field = firstField.split(' ')[0];
83124
+ } else {
83125
+ this.sort.field = firstField;
83126
+ }
83127
+ }
83128
+ }
83129
+
83130
+ }
83131
+ },
83132
+ methods: {
83133
+ // keyColumns returns all of the key columns with indexes for all of the
83134
+ // columns that are used in joins.
83135
+ keyColumns(frame) {
83136
+ const foreignFrames = this.getForeignFrames(frame);
83137
+ const keys = {};
83138
+
83139
+ if (foreignFrames === undefined) {
83140
+ return keys;
83141
+ }
83142
+
83143
+ for (const ff of Object.values(foreignFrames)) {
83144
+ for (const f of ff) {
83145
+ keys[f.relColumn] = f.columns.findIndex(({
83146
+ name
83147
+ }) => name === f.relColumn);
83148
+ }
83149
+ }
83150
+
83151
+ return keys;
83152
+ },
83153
+
83154
+ getForeignFrames(frame) {
83155
+ return this.indexFrames[frame.ref];
83156
+ },
83157
+
83158
+ // tabelifyFrame returns a set of rows and columns that should be shown
83159
+ // for this frame.
83160
+ //
83161
+ // maxSize is used to calculate the rowSpan that should be applied to joined
83162
+ // frames with fewer rows then the other.
83163
+ //
83164
+ // Flow outline:
83165
+ // * for each row of the frame:
83166
+ // ** find all foreign frames
83167
+ // ** tabelify foreign frames
83168
+ // ** merge with the current tabelified result
83169
+ tabelifyFrame(frame, maxSize = 1) {
83170
+ const outRows = [];
83171
+ const isLocal = frame.ref === this.localDataframe.ref; // Index selected columns
83172
+
83173
+ const selectedCols = new Set();
83174
+
83175
+ for (const c of this.options.columns[frame.ref] || []) {
83176
+ selectedCols.add(frame.columns.findIndex(({
83177
+ name
83178
+ }) => name === c.name));
83179
+ }
83180
+
83181
+ const hSeanFrames = {};
83182
+ const outHeader = [...selectedCols].map(index => {
83183
+ const column = frame.columns[index];
83184
+ return {
83185
+ column,
83186
+ meta: {
83187
+ ref: frame.ref,
83188
+ sortKey: isLocal ? column.name : `${frame.ref}.${column.name}`
83189
+ }
83190
+ };
83191
+ });
83192
+ const outColgroups = [{
83193
+ size: outHeader.length,
83194
+ isLocal: isLocal
83195
+ }];
83196
+ const relFrames = this.getForeignFrames(frame);
83197
+ const usedKeys = this.keyColumns(frame);
83198
+
83199
+ for (const r of frame.rows || []) {
83200
+ maxSize = 1;
83201
+ const row = this.tabelifyRow(r, [...selectedCols]);
83202
+ const auxRows = [];
83203
+
83204
+ for (const colIndex of Object.values(usedKeys)) {
83205
+ const relFrame = relFrames[r[colIndex]]; // Determine the largest frame so our maxSize will match
83206
+
83207
+ for (const rf of relFrame || []) {
83208
+ maxSize = Math.max(maxSize, rf.rows.length);
83209
+ } // Tabelify related frames
83210
+
83211
+
83212
+ for (const rf of relFrame || []) {
83213
+ // const refColumnIndexes = (this.options.columns[rf.ref] || []).map(({ name }) => {
83214
+ // return frame.columns.findIndex(fc => fc.name === name)
83215
+ // })
83216
+ const aux = this.tabelifyFrame(rf, Math.max(rf.rows.length, maxSize)); // Optionally append header
83217
+
83218
+ if (!hSeanFrames[rf.ref]) {
83219
+ const x = [...aux.header];
83220
+ x[0].sourceName = rf.ref;
83221
+ outHeader.push(...x);
83222
+ hSeanFrames[rf.ref] = true;
83223
+ outColgroups.push(...aux.colgroups);
83224
+ } // Rowspan smaller frames so the table is nice and aligned
83225
+
83226
+
83227
+ if (aux.rows.length < maxSize) {
83228
+ for (const col of aux.rows[aux.rows.length - 1]) {
83229
+ col.attrs = {
83230
+ rowspan: maxSize - aux.rows.length + 1
83231
+ };
83232
+ }
83233
+ }
83234
+
83235
+ auxRows.push(aux.rows);
83236
+ }
83237
+ } // Merge the original row with joined rows
83238
+ // - the forst row of the merged row gets joined with the original row
83239
+ // - the rest are appended to the list (they are offsetted by rowspan)
83240
+
83241
+
83242
+ if (auxRows.length > 0) {
83243
+ for (const c of row) {
83244
+ c.attrs = {
83245
+ rowspan: maxSize
83246
+ };
83247
+ }
83248
+
83249
+ row[0].separator = true;
83250
+ const merged = this.mergeRows(auxRows).pop();
83251
+ row.push(...merged[0]);
83252
+ outRows.push(row);
83253
+ outRows.push(...merged.slice(1));
83254
+ } else {
83255
+ outRows.push(row);
83256
+ }
83257
+ }
83258
+
83259
+ return {
83260
+ rows: outRows,
83261
+ maxSize,
83262
+ header: outHeader,
83263
+ colgroups: outColgroups
83264
+ };
83265
+ },
83266
+
83267
+ mergeRows(auxRows, maxSize) {
83268
+ if (auxRows.length <= 1) {
83269
+ return auxRows;
83270
+ }
83271
+
83272
+ const a = auxRows[auxRows.length - 2];
83273
+ const b = auxRows[auxRows.length - 1];
83274
+ const tmpRows = [];
83275
+
83276
+ for (let i = 0; i < a.length; i++) {
83277
+ const row = a[i];
83278
+
83279
+ if (i >= b.length) {
83280
+ tmpRows.push(row);
83281
+ continue;
83282
+ }
83283
+
83284
+ row.push(...b[i]);
83285
+ tmpRows.push(row);
83286
+ }
83287
+
83288
+ if (b.length > a.length) {
83289
+ tmpRows.push(...b.slice(a.length));
83290
+ }
83291
+
83292
+ auxRows.splice(auxRows.length - 2, 2, tmpRows);
83293
+ return this.mergeRows(auxRows);
83294
+ },
83295
+
83296
+ tabelifyRow(row, selectedCols = []) {
83297
+ const out = [];
83298
+ selectedCols.forEach(index => {
83299
+ out.push({
83300
+ value: row[index]
83301
+ });
83302
+ });
83303
+ return out;
83304
+ },
83305
+
83306
+ // Sorting
83307
+ handleSort(fieldName) {
83308
+ let relatedDatasource;
83309
+
83310
+ if (fieldName.includes('.')) {
83311
+ [relatedDatasource, fieldName] = fieldName.split('.');
83312
+ return; // Uncomment this when foreign frame sorting is implemented
83313
+ }
83314
+
83315
+ if (fieldName) {
83316
+ const {
83317
+ field,
83318
+ descending
83319
+ } = this.sort;
83320
+
83321
+ if (this.cursor) {
83322
+ this.cursor = undefined;
83323
+ this.cursors = [];
83324
+ }
83325
+
83326
+ if (fieldName === field) {
83327
+ this.sort.descending = !descending;
83328
+ } else {
83329
+ this.sort.field = fieldName;
83330
+ this.sort.descending = false;
83331
+ }
83332
+ }
83333
+
83334
+ this.updateDefinition(relatedDatasource);
83335
+ },
83336
+
83337
+ goToPage(dir) {
83338
+ switch (dir) {
83339
+ case 'nextPage':
83340
+ if (!this.cursors.length) {
83341
+ this.cursors.push(undefined);
83342
+ }
83343
+
83344
+ this.cursors.push(this.nextPage);
83345
+ this.cursor = this.nextPage;
83346
+ break;
83347
+
83348
+ case 'prevPage':
83349
+ this.cursors.pop();
83350
+ this.cursor = this.cursors.pop();
83351
+ break;
83352
+
83353
+ default:
83354
+ this.cursor = undefined;
83355
+ this.cursors = [];
83356
+ }
83357
+
83358
+ this.updateDefinition();
83359
+ },
83360
+
83361
+ // Meta
83362
+ updateDefinition(updatedDatasource) {
83363
+ if (this.localDataframe) {
83364
+ // Get related datasource
83365
+ let ref = this.localDataframe.ref;
83366
+
83367
+ if (updatedDatasource) {
83368
+ ref = (this.dataframes.find(({
83369
+ ref
83370
+ }) => ref === updatedDatasource) || {}).ref;
83371
+ }
83372
+
83373
+ if (ref) {
83374
+ const def = {
83375
+ ref
83376
+ }; // Sorting
83377
+
83378
+ const {
83379
+ field,
83380
+ descending
83381
+ } = this.sort;
83382
+
83383
+ if (field) {
83384
+ // Generate sort string
83385
+ const sort = descending ? `${field} DESC` : field;
83386
+ def.sort = sort;
83387
+ } // Paging
83388
+
83389
+
83390
+ if (this.cursor) {
83391
+ let {
83392
+ limit
83393
+ } = this.localDataframe.paging || {};
83394
+
83395
+ if (!limit) {
83396
+ limit = this.options.datasources[0] ? this.options.datasources[0].paging.limit || 20 : 20;
83397
+ }
83398
+
83399
+ def.paging = {
83400
+ cursor: this.cursor,
83401
+ limit
83402
+ };
83403
+ }
83404
+
83405
+ const definition = {};
83406
+ definition[ref] = def;
83407
+ this.$emit('update', definition);
83408
+ }
83409
+ }
82810
83410
  }
83411
+
82811
83412
  }
82812
83413
  };
82813
83414
 
@@ -82815,19 +83416,27 @@ var script$T = {
82815
83416
  const __vue_script__$T = script$T;
82816
83417
 
82817
83418
  /* template */
82818
- 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)};
83419
+ 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:({
83420
+ color: _vm.sort.field === c.meta.sortKey && !_vm.sort.descending ? 'black' : 'grey',
83421
+ }),attrs:{"icon":['fas', 'angle-up']}}),_vm._v(" "),_c('font-awesome-icon',{staticClass:"mt-1",style:({
83422
+ color: _vm.sort.field === c.meta.sortKey && _vm.sort.descending ? 'black' : 'grey',
83423
+ }),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:{
83424
+ separator: !!r[0].separator,
83425
+ }},_vm._l((r),function(c,j){return _c('b-td',_vm._b({key:j},'b-td',c.attrs || {},false),[_vm._v("\n "+_vm._s(c.value)+"\n ")])}),1)}),1)],2),_vm._v(" "),_c('b-card-footer',{staticClass:"d-flex p-1 rounded-0"},[_c('b-button-group',{staticClass:"ml-auto"},[_c('b-button',{staticClass:"d-flex align-items-center text-dark px-1",attrs:{"disabled":!_vm.hasPrevPage,"variant":"link"},on:{"click":function($event){return _vm.goToPage()}}},[_c('font-awesome-icon',{attrs:{"icon":['fas', 'angle-double-left']}})],1),_vm._v(" "),_c('b-button',{staticClass:"d-flex align-items-center text-dark",attrs:{"disabled":!_vm.hasPrevPage,"variant":"link"},on:{"click":function($event){return _vm.goToPage('prevPage')}}},[_c('font-awesome-icon',{staticClass:"mr-1",attrs:{"icon":['fas', 'angle-left']}}),_vm._v("\n "+_vm._s(_vm.labels.previous)+"\n ")],1),_vm._v(" "),_c('b-button',{staticClass:"d-flex align-items-center text-dark",attrs:{"disabled":!_vm.hasNextPage,"variant":"link"},on:{"click":function($event){return _vm.goToPage('nextPage')}}},[_vm._v("\n "+_vm._s(_vm.labels.next)+"\n "),_c('font-awesome-icon',{staticClass:"ml-1",attrs:{"icon":['fas', 'angle-right']}})],1)],1)],1)],1)};
82819
83426
  var __vue_staticRenderFns__$N = [];
82820
83427
 
82821
83428
  /* style */
82822
- const __vue_inject_styles__$U = undefined;
83429
+ const __vue_inject_styles__$U = function (inject) {
83430
+ if (!inject) return
83431
+ 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 });
83432
+
83433
+ };
82823
83434
  /* scoped */
82824
- const __vue_scope_id__$U = undefined;
83435
+ const __vue_scope_id__$U = "data-v-52bf61e6";
82825
83436
  /* module identifier */
82826
83437
  const __vue_module_identifier__$U = undefined;
82827
83438
  /* functional template */
82828
83439
  const __vue_is_functional_template__$U = false;
82829
- /* style inject */
82830
-
82831
83440
  /* style inject SSR */
82832
83441
 
82833
83442
  /* style inject shadow dom */
@@ -82842,39 +83451,21 @@ var __vue_staticRenderFns__$N = [];
82842
83451
  __vue_is_functional_template__$U,
82843
83452
  __vue_module_identifier__$U,
82844
83453
  false,
82845
- undefined,
83454
+ createInjector,
82846
83455
  undefined,
82847
83456
  undefined
82848
83457
  );
82849
83458
 
82850
- //
82851
- //
82852
- //
82853
- //
82854
- //
82855
- //
82856
- //
82857
- //
82858
- //
82859
83459
  //
82860
83460
  var script$U = {
82861
- props: {
82862
- label: {
82863
- required: true,
82864
- type: String
82865
- },
82866
- value: {
82867
- type: Boolean,
82868
- default: () => false
82869
- }
82870
- }
83461
+ extends: __vue_component__$R
82871
83462
  };
82872
83463
 
82873
83464
  /* script */
82874
83465
  const __vue_script__$U = script$U;
82875
83466
 
82876
83467
  /* template */
82877
- 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)};
83468
+ var __vue_render__$O = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.options)?_c('div',{staticClass:"p-2",domProps:{"innerHTML":_vm._s(_vm.options.value)}}):_vm._e()};
82878
83469
  var __vue_staticRenderFns__$O = [];
82879
83470
 
82880
83471
  /* style */
@@ -82906,8 +83497,222 @@ var __vue_staticRenderFns__$O = [];
82906
83497
  undefined
82907
83498
  );
82908
83499
 
83500
+ const del$1 = '|||';
83501
+ /**
83502
+ * Extract subgroups from the given groups
83503
+ * @param groups
83504
+ * @param path Array of groups that represent the path
83505
+ */
83506
+ function extractGroups(groups, ...path) {
83507
+ const jpath = path.join(del$1);
83508
+ return [...(new Set(groups
83509
+ .filter(g => g.slice(0, path.length).join(del$1) === jpath)
83510
+ .map(g => g.slice(path.length, path.length + 1)[0])
83511
+ .filter(g => !!g))).values()];
83512
+ }
83513
+ /**
83514
+ * Extract subgroups from the catalogue that match the given path
83515
+ *
83516
+ * @param cat Catalogue
83517
+ * @param path Array of groups that represent the path
83518
+ * @constructor
83519
+ */
83520
+ function ExtractSubgroups(cat, ...path) {
83521
+ const groups = Object.values(cat)
83522
+ .map(({ group }) => group)
83523
+ .filter(g => g !== undefined);
83524
+ return extractGroups(groups, ...path);
83525
+ }
83526
+ /**
83527
+ * Returns all components that match the given path
83528
+ *
83529
+ * @param cat Catalogue
83530
+ * @param path Array of groups that represent the path
83531
+
83532
+ */
83533
+ function ExtractComponents(cat, ...path) {
83534
+ const jpath = path.join(del$1);
83535
+ return Object.values(cat)
83536
+ .filter(({ group }) => (group || []).join(del$1) === jpath);
83537
+ }
83538
+
82909
83539
  //
83540
+ var script$V = {
83541
+ name: 'ComponentList',
83542
+ props: {
83543
+ catalogue: {
83544
+ required: true,
83545
+ type: Object
83546
+ },
83547
+ path: {
83548
+ type: Array,
83549
+ default: () => []
83550
+ }
83551
+ },
83552
+ computed: {
83553
+ // name of the current group
83554
+ root() {
83555
+ return this.path.length === 0;
83556
+ },
83557
+
83558
+ // name of the current group
83559
+ group() {
83560
+ return this.root ? undefined : this.path[this.path.length - 1];
83561
+ },
83562
+
83563
+ // returns all groups at this level
83564
+ subgroups() {
83565
+ return ExtractSubgroups(this.catalogue, ...this.path);
83566
+ },
83567
+
83568
+ components() {
83569
+ // return ExtractComponents(this.catalogue, ...this.path)
83570
+ return ExtractComponents(this.catalogue, ...this.path);
83571
+ }
83572
+
83573
+ }
83574
+ };
83575
+
83576
+ /* script */
83577
+ const __vue_script__$V = script$V;
83578
+
83579
+ /* template */
83580
+ 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()])};
83581
+ var __vue_staticRenderFns__$P = [];
83582
+
83583
+ /* style */
83584
+ const __vue_inject_styles__$W = function (inject) {
83585
+ if (!inject) return
83586
+ inject("data-v-8b2b254e_0", { source: ".component[data-v-8b2b254e]{cursor:pointer}", map: undefined, media: undefined });
83587
+
83588
+ };
83589
+ /* scoped */
83590
+ const __vue_scope_id__$W = "data-v-8b2b254e";
83591
+ /* module identifier */
83592
+ const __vue_module_identifier__$W = undefined;
83593
+ /* functional template */
83594
+ const __vue_is_functional_template__$W = false;
83595
+ /* style inject SSR */
83596
+
83597
+ /* style inject shadow dom */
83598
+
83599
+
83600
+
83601
+ const __vue_component__$W = /*#__PURE__*/normalizeComponent(
83602
+ { render: __vue_render__$P, staticRenderFns: __vue_staticRenderFns__$P },
83603
+ __vue_inject_styles__$W,
83604
+ __vue_script__$V,
83605
+ __vue_scope_id__$W,
83606
+ __vue_is_functional_template__$W,
83607
+ __vue_module_identifier__$W,
83608
+ false,
83609
+ createInjector,
83610
+ undefined,
83611
+ undefined
83612
+ );
83613
+
82910
83614
  //
83615
+ var script$W = {
83616
+ name: 'C3',
83617
+ components: {
83618
+ ComponentList: __vue_component__$W
83619
+ },
83620
+ props: {
83621
+ catalogue: {
83622
+ required: true,
83623
+ type: Object
83624
+ }
83625
+ },
83626
+ computed: {
83627
+ controlGroups() {
83628
+ if (this.current.controls.length === 0) {
83629
+ return [];
83630
+ }
83631
+
83632
+ if (Array.isArray(this.current.controls[0])) {
83633
+ // already grouped
83634
+ return this.current.controls;
83635
+ } // make one virtual group holding all controls
83636
+
83637
+
83638
+ return [this.current.controls];
83639
+ }
83640
+
83641
+ },
83642
+
83643
+ data() {
83644
+ return {
83645
+ current: undefined
83646
+ };
83647
+ },
83648
+
83649
+ methods: {
83650
+ setCurrent(component) {
83651
+ this.current = {
83652
+ props: {},
83653
+ ...component
83654
+ };
83655
+ this.setScenario(this.current);
83656
+ },
83657
+
83658
+ setScenario({
83659
+ props = {},
83660
+ controls = []
83661
+ }) {
83662
+ // create missing props from controls
83663
+ const apply = (c, props) => c.update(props, c.value(props) || null);
83664
+
83665
+ controls.forEach(c => {
83666
+ if (Array.isArray(c)) {
83667
+ c.forEach(c => apply(c, props));
83668
+ } else {
83669
+ apply(c, props);
83670
+ }
83671
+ });
83672
+ this.current.props = props;
83673
+ }
83674
+
83675
+ }
83676
+ };
83677
+
83678
+ /* script */
83679
+ const __vue_script__$W = script$W;
83680
+
83681
+ /* template */
83682
+ 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()])};
83683
+ var __vue_staticRenderFns__$Q = [];
83684
+
83685
+ /* style */
83686
+ const __vue_inject_styles__$X = function (inject) {
83687
+ if (!inject) return
83688
+ 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 });
83689
+
83690
+ };
83691
+ /* scoped */
83692
+ const __vue_scope_id__$X = undefined;
83693
+ /* module identifier */
83694
+ const __vue_module_identifier__$X = undefined;
83695
+ /* functional template */
83696
+ const __vue_is_functional_template__$X = false;
83697
+ /* style inject SSR */
83698
+
83699
+ /* style inject shadow dom */
83700
+
83701
+
83702
+
83703
+ const __vue_component__$X = /*#__PURE__*/normalizeComponent(
83704
+ { render: __vue_render__$Q, staticRenderFns: __vue_staticRenderFns__$Q },
83705
+ __vue_inject_styles__$X,
83706
+ __vue_script__$W,
83707
+ __vue_scope_id__$X,
83708
+ __vue_is_functional_template__$X,
83709
+ __vue_module_identifier__$X,
83710
+ false,
83711
+ createInjector,
83712
+ undefined,
83713
+ undefined
83714
+ );
83715
+
82911
83716
  //
82912
83717
  //
82913
83718
  //
@@ -82918,7 +83723,188 @@ var __vue_staticRenderFns__$O = [];
82918
83723
  //
82919
83724
  //
82920
83725
  //
82921
- var script$V = {
83726
+ //
83727
+ var script$X = {
83728
+ props: {
83729
+ label: {
83730
+ required: true,
83731
+ type: String
83732
+ },
83733
+ value: {
83734
+ type: String,
83735
+ default: () => ''
83736
+ }
83737
+ }
83738
+ };
83739
+
83740
+ /* script */
83741
+ const __vue_script__$X = script$X;
83742
+
83743
+ /* template */
83744
+ 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)};
83745
+ var __vue_staticRenderFns__$R = [];
83746
+
83747
+ /* style */
83748
+ const __vue_inject_styles__$Y = undefined;
83749
+ /* scoped */
83750
+ const __vue_scope_id__$Y = undefined;
83751
+ /* module identifier */
83752
+ const __vue_module_identifier__$Y = undefined;
83753
+ /* functional template */
83754
+ const __vue_is_functional_template__$Y = false;
83755
+ /* style inject */
83756
+
83757
+ /* style inject SSR */
83758
+
83759
+ /* style inject shadow dom */
83760
+
83761
+
83762
+
83763
+ const __vue_component__$Y = /*#__PURE__*/normalizeComponent(
83764
+ { render: __vue_render__$R, staticRenderFns: __vue_staticRenderFns__$R },
83765
+ __vue_inject_styles__$Y,
83766
+ __vue_script__$X,
83767
+ __vue_scope_id__$Y,
83768
+ __vue_is_functional_template__$Y,
83769
+ __vue_module_identifier__$Y,
83770
+ false,
83771
+ undefined,
83772
+ undefined,
83773
+ undefined
83774
+ );
83775
+
83776
+ //
83777
+ //
83778
+ //
83779
+ //
83780
+ //
83781
+ //
83782
+ //
83783
+ //
83784
+ //
83785
+ //
83786
+ //
83787
+ var script$Y = {
83788
+ props: {
83789
+ label: {
83790
+ required: true,
83791
+ type: String
83792
+ },
83793
+ value: {
83794
+ type: String,
83795
+ default: () => ''
83796
+ }
83797
+ }
83798
+ };
83799
+
83800
+ /* script */
83801
+ const __vue_script__$Y = script$Y;
83802
+
83803
+ /* template */
83804
+ 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)};
83805
+ var __vue_staticRenderFns__$S = [];
83806
+
83807
+ /* style */
83808
+ const __vue_inject_styles__$Z = undefined;
83809
+ /* scoped */
83810
+ const __vue_scope_id__$Z = undefined;
83811
+ /* module identifier */
83812
+ const __vue_module_identifier__$Z = undefined;
83813
+ /* functional template */
83814
+ const __vue_is_functional_template__$Z = false;
83815
+ /* style inject */
83816
+
83817
+ /* style inject SSR */
83818
+
83819
+ /* style inject shadow dom */
83820
+
83821
+
83822
+
83823
+ const __vue_component__$Z = /*#__PURE__*/normalizeComponent(
83824
+ { render: __vue_render__$S, staticRenderFns: __vue_staticRenderFns__$S },
83825
+ __vue_inject_styles__$Z,
83826
+ __vue_script__$Y,
83827
+ __vue_scope_id__$Z,
83828
+ __vue_is_functional_template__$Z,
83829
+ __vue_module_identifier__$Z,
83830
+ false,
83831
+ undefined,
83832
+ undefined,
83833
+ undefined
83834
+ );
83835
+
83836
+ //
83837
+ //
83838
+ //
83839
+ //
83840
+ //
83841
+ //
83842
+ //
83843
+ //
83844
+ //
83845
+ //
83846
+ var script$Z = {
83847
+ props: {
83848
+ label: {
83849
+ required: true,
83850
+ type: String
83851
+ },
83852
+ value: {
83853
+ type: Boolean,
83854
+ default: () => false
83855
+ }
83856
+ }
83857
+ };
83858
+
83859
+ /* script */
83860
+ const __vue_script__$Z = script$Z;
83861
+
83862
+ /* template */
83863
+ 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)};
83864
+ var __vue_staticRenderFns__$T = [];
83865
+
83866
+ /* style */
83867
+ const __vue_inject_styles__$_ = undefined;
83868
+ /* scoped */
83869
+ const __vue_scope_id__$_ = undefined;
83870
+ /* module identifier */
83871
+ const __vue_module_identifier__$_ = undefined;
83872
+ /* functional template */
83873
+ const __vue_is_functional_template__$_ = false;
83874
+ /* style inject */
83875
+
83876
+ /* style inject SSR */
83877
+
83878
+ /* style inject shadow dom */
83879
+
83880
+
83881
+
83882
+ const __vue_component__$_ = /*#__PURE__*/normalizeComponent(
83883
+ { render: __vue_render__$T, staticRenderFns: __vue_staticRenderFns__$T },
83884
+ __vue_inject_styles__$_,
83885
+ __vue_script__$Z,
83886
+ __vue_scope_id__$_,
83887
+ __vue_is_functional_template__$_,
83888
+ __vue_module_identifier__$_,
83889
+ false,
83890
+ undefined,
83891
+ undefined,
83892
+ undefined
83893
+ );
83894
+
83895
+ //
83896
+ //
83897
+ //
83898
+ //
83899
+ //
83900
+ //
83901
+ //
83902
+ //
83903
+ //
83904
+ //
83905
+ //
83906
+ //
83907
+ var script$_ = {
82922
83908
  props: {
82923
83909
  label: {
82924
83910
  required: true,
@@ -82936,20 +83922,20 @@ var script$V = {
82936
83922
  };
82937
83923
 
82938
83924
  /* script */
82939
- const __vue_script__$V = script$V;
83925
+ const __vue_script__$_ = script$_;
82940
83926
 
82941
83927
  /* template */
82942
- 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)};
82943
- var __vue_staticRenderFns__$P = [];
83928
+ 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)};
83929
+ var __vue_staticRenderFns__$U = [];
82944
83930
 
82945
83931
  /* style */
82946
- const __vue_inject_styles__$W = undefined;
83932
+ const __vue_inject_styles__$$ = undefined;
82947
83933
  /* scoped */
82948
- const __vue_scope_id__$W = undefined;
83934
+ const __vue_scope_id__$$ = undefined;
82949
83935
  /* module identifier */
82950
- const __vue_module_identifier__$W = undefined;
83936
+ const __vue_module_identifier__$$ = undefined;
82951
83937
  /* functional template */
82952
- const __vue_is_functional_template__$W = false;
83938
+ const __vue_is_functional_template__$$ = false;
82953
83939
  /* style inject */
82954
83940
 
82955
83941
  /* style inject SSR */
@@ -82958,13 +83944,13 @@ var __vue_staticRenderFns__$P = [];
82958
83944
 
82959
83945
 
82960
83946
 
82961
- const __vue_component__$W = /*#__PURE__*/normalizeComponent(
82962
- { render: __vue_render__$P, staticRenderFns: __vue_staticRenderFns__$P },
82963
- __vue_inject_styles__$W,
82964
- __vue_script__$V,
82965
- __vue_scope_id__$W,
82966
- __vue_is_functional_template__$W,
82967
- __vue_module_identifier__$W,
83947
+ const __vue_component__$$ = /*#__PURE__*/normalizeComponent(
83948
+ { render: __vue_render__$U, staticRenderFns: __vue_staticRenderFns__$U },
83949
+ __vue_inject_styles__$$,
83950
+ __vue_script__$_,
83951
+ __vue_scope_id__$$,
83952
+ __vue_is_functional_template__$$,
83953
+ __vue_module_identifier__$$,
82968
83954
  false,
82969
83955
  undefined,
82970
83956
  undefined,
@@ -100176,16 +101162,16 @@ function generic(component, { handler, props }) {
100176
101162
  props }, handler);
100177
101163
  }
100178
101164
  function input(label, handler) {
100179
- return generic(__vue_component__$T, { handler, props: { label } });
101165
+ return generic(__vue_component__$Y, { handler, props: { label } });
100180
101166
  }
100181
101167
  function textarea(label, handler) {
100182
- return generic(__vue_component__$U, { handler, props: { label } });
101168
+ return generic(__vue_component__$Z, { handler, props: { label } });
100183
101169
  }
100184
101170
  function checkbox(label, handler) {
100185
- return generic(__vue_component__$V, { handler, props: { label } });
101171
+ return generic(__vue_component__$_, { handler, props: { label } });
100186
101172
  }
100187
101173
  function select(label, handler, options) {
100188
- return generic(__vue_component__$W, {
101174
+ return generic(__vue_component__$$, {
100189
101175
  handler,
100190
101176
  props: {
100191
101177
  label,
@@ -100204,7 +101190,7 @@ var controls = /*#__PURE__*/Object.freeze({
100204
101190
  });
100205
101191
 
100206
101192
  var index$2 = {
100207
- View: __vue_component__$S,
101193
+ View: __vue_component__$X,
100208
101194
  controls,
100209
101195
  };
100210
101196
 
@@ -100218,8 +101204,9 @@ var index$3 = /*#__PURE__*/Object.freeze({
100218
101204
  canPreview: canPreview,
100219
101205
  CInputConfirm: __vue_component__$9,
100220
101206
  CInputProcessing: __vue_component__$a,
100221
- CInputDateTime: __vue_component__$c,
100222
- CInputInterval: __vue_component__$d,
101207
+ CInputDateTime: __vue_component__$b,
101208
+ CInputPresort: __vue_component__$c,
101209
+ CInputCron: __vue_component__$d,
100223
101210
  CRichTextInput: __vue_component__$m,
100224
101211
  CLightbox: __vue_component__$5,
100225
101212
  CPermissionsButton: __vue_component__$n,
@@ -100234,8 +101221,12 @@ var index$3 = /*#__PURE__*/Object.freeze({
100234
101221
  CToaster: __vue_component__$N,
100235
101222
  CToasterLink: __vue_component__$M,
100236
101223
  CReminderSidebar: __vue_component__$O,
100237
- FieldItem: __vue_component__$P,
100238
- FieldPicker: __vue_component__$Q,
101224
+ CItemPicker: __vue_component__$Q,
101225
+ CItemPickerItem: __vue_component__$P,
101226
+ CReportChart: __vue_component__$S,
101227
+ CReportMetric: __vue_component__$T,
101228
+ CReportTable: __vue_component__$U,
101229
+ CReportText: __vue_component__$V,
100239
101230
  C3: index$2,
100240
101231
  CPrompts: __vue_component__$B,
100241
101232
  CPromptModal: __vue_component__$A,
@@ -100657,6 +101648,66 @@ var index$7 = /*#__PURE__*/Object.freeze({
100657
101648
  RBAC: RBAC
100658
101649
  });
100659
101650
 
101651
+ // A helper function to remove diacritics from the given string.
101652
+ // This allows us so search over characters like čšž with csz.
101653
+ //
101654
+ // stackoverflow.com/questions/990904/remove-accents-diacritics-in-a-string-in-javascript/37511463#37511463
101655
+ function toNFD(s) {
101656
+ return s.normalize('NFD').replace(/[\u0300-\u036f]/g, '');
101657
+ }
101658
+ // Here we try to calculate the quality of the match using relative numbers.
101659
+ // By default, fuzzy sort uses score that is not capped.
101660
+ const goodMatchThreshold = 0.35;
101661
+ function fuzzyMatch({ indexes }) {
101662
+ return indexes.length / (Math.max(...indexes) + 1);
101663
+ }
101664
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
101665
+ function assert(match, obj, query, field, ...fields) {
101666
+ if (!obj) {
101667
+ return false;
101668
+ }
101669
+ query = toNFD(query.trim().toLowerCase());
101670
+ if (typeof obj === 'string') {
101671
+ return match(toNFD(obj.trim().toLowerCase()), query);
101672
+ }
101673
+ else {
101674
+ if (!field) {
101675
+ throw new Error('field must be provided when searching over objects');
101676
+ }
101677
+ return fields.concat([field])
101678
+ .some(f => match(toNFD(obj[f].trim().toLowerCase()), query));
101679
+ }
101680
+ }
101681
+ // AssertStrict checks for a substring and doesn't do any additional guessing
101682
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
101683
+ function AssertStrict(obj, query, field, ...fields) {
101684
+ return assert((v, query) => v.includes(query), obj, query, field, ...fields);
101685
+ }
101686
+ // AssertFuzzy uses some heuristic to determine if the query maybe probably perhaps matches
101687
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
101688
+ function AssertFuzzy(obj, query, field, ...fields) {
101689
+ return assert((v, query) => {
101690
+ const rs = fzy.single(query, v);
101691
+ if (!rs) {
101692
+ return false;
101693
+ }
101694
+ return fuzzyMatch(rs) >= goodMatchThreshold;
101695
+ }, obj, query, field, ...fields);
101696
+ }
101697
+ // Assert uses both AssertStrict and AssertFuzzy to check if the query matches,
101698
+ // If the strict assertion passes that is used, else it tries to do a AssertFuzzy just to make sure
101699
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
101700
+ function Assert(obj, query, field, ...fields) {
101701
+ return AssertStrict(obj, query, field, ...fields) || AssertFuzzy(obj, query, field, ...fields);
101702
+ }
101703
+
101704
+ var filter = /*#__PURE__*/Object.freeze({
101705
+ __proto__: null,
101706
+ AssertStrict: AssertStrict,
101707
+ AssertFuzzy: AssertFuzzy,
101708
+ Assert: Assert
101709
+ });
101710
+
100660
101711
  const config = {
100661
101712
  format: 'json',
100662
101713
  // (Boolean) whether to reconnect automatically (false)
@@ -100739,5 +101790,5 @@ var websocket = /*#__PURE__*/Object.freeze({
100739
101790
  init: init
100740
101791
  });
100741
101792
 
100742
- export { index$3 as components, index$4 as corredor, index$5 as filters, i18n, index$1 as mixins, index as plugins, index$7 as store, url, websocket };
101793
+ export { index$3 as components, index$4 as corredor, filter, index$5 as filters, i18n, index$1 as mixins, index as plugins, index$7 as store, url, websocket };
100743
101794
  //# sourceMappingURL=index.es.js.map