@processmaker/screen-builder 2.87.0 → 2.87.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@processmaker/screen-builder",
3
- "version": "2.87.0",
3
+ "version": "2.87.2",
4
4
  "scripts": {
5
5
  "dev": "VITE_COVERAGE=true vite",
6
6
  "build": "vite build",
@@ -56,7 +56,7 @@
56
56
  "@fortawesome/fontawesome-free": "^5.6.1",
57
57
  "@originjs/vite-plugin-commonjs": "^1.0.3",
58
58
  "@panter/vue-i18next": "^0.15.2",
59
- "@processmaker/vue-form-elements": "0.53.0",
59
+ "@processmaker/vue-form-elements": "0.53.1",
60
60
  "@processmaker/vue-multiselect": "2.3.0",
61
61
  "@storybook/addon-essentials": "^7.6.13",
62
62
  "@storybook/addon-interactions": "^7.6.13",
@@ -115,7 +115,7 @@
115
115
  },
116
116
  "peerDependencies": {
117
117
  "@panter/vue-i18next": "^0.15.0",
118
- "@processmaker/vue-form-elements": "0.53.0",
118
+ "@processmaker/vue-form-elements": "0.53.1",
119
119
  "i18next": "^15.0.8",
120
120
  "vue": "^2.6.12",
121
121
  "vuex": "^3.1.1"
@@ -173,7 +173,7 @@ export default {
173
173
  * @param {object} params
174
174
  * @returns {object}
175
175
  */
176
- getDataSource(dataSourceId, params) {
176
+ getDataSource(dataSourceId, params, nonce = null) {
177
177
  // keep backwards compatibility
178
178
  if (
179
179
  !window.ProcessMaker.screen.cacheEnabled &&
@@ -190,7 +190,7 @@ export default {
190
190
  pmds_data: JSON.stringify(params.data)
191
191
  }
192
192
  }).then((response) => {
193
- return response;
193
+ return [response, nonce];
194
194
  });
195
195
  },
196
196
 
@@ -246,7 +246,7 @@ export default {
246
246
  },
247
247
 
248
248
  getCollectionRecords(collectionId, options, nonce = null) {
249
- options.useCache = window.ProcessMaker.screen.cacheEnabled;
249
+ options.useCache = window.ProcessMaker?.screen?.cacheEnabled;
250
250
 
251
251
  return this.get(
252
252
  `/collections/${collectionId}/records${this.authQueryString()}`,
@@ -227,7 +227,7 @@
227
227
 
228
228
  <div v-if="dataSource === dataSourceValues.dataConnector">
229
229
  <pmql-input
230
- :search-type="'collections'"
230
+ :search-type="'collections_w_mustaches'"
231
231
  class="mb-1"
232
232
  :input-label="'PMQL'"
233
233
  v-model="pmqlQuery"
@@ -23,6 +23,7 @@
23
23
  <vue-form-renderer
24
24
  ref="renderer"
25
25
  v-model="requestData"
26
+ :class="{ loading: loadingTask }"
26
27
  :config="screen.config"
27
28
  :computed="screen.computed"
28
29
  :custom-css="screen.custom_css"
@@ -120,6 +121,7 @@ export default {
120
121
  refreshScreen: 0,
121
122
  redirecting: null,
122
123
  loadingButton: false,
124
+ loadingTask: false,
123
125
  };
124
126
  },
125
127
  watch: {
@@ -319,6 +321,9 @@ export default {
319
321
  })
320
322
  .catch(() => {
321
323
  this.hasErrors = true;
324
+ })
325
+ .finally(() => {
326
+ this.loadingTask = false;
322
327
  });
323
328
  });
324
329
  },
@@ -618,3 +623,9 @@ export default {
618
623
  },
619
624
  };
620
625
  </script>
626
+
627
+ <style scoped>
628
+ .loading {
629
+ pointer-events: none;
630
+ }
631
+ </style>
@@ -328,6 +328,7 @@ export default {
328
328
  debouncedValuesQueue.forEach((args) => {
329
329
  this.setValue(...args);
330
330
  });
331
+ debouncedValuesQueue.length = 0;
331
332
  }, 210);
332
333
  this.setValueDebounced = (...args) => {
333
334
  debouncedValuesQueue.push(args);
@@ -1,6 +1,6 @@
1
1
  import { helpers } from 'vuelidate/lib/validators';
2
2
  import moment from 'moment';
3
- import { get } from 'lodash';
3
+ import { get, isNil } from 'lodash';
4
4
 
5
5
  import {
6
6
  minLength,
@@ -161,7 +161,7 @@ export const regex = (expression) => helpers.withParams({expression}, (value) =>
161
161
  });
162
162
 
163
163
  export const required = (value) => {
164
- return value instanceof Array ? value.length > 0 : !!value;
164
+ return value instanceof Array ? value.length > 0 : !isNil(value) && value !== '' && value !== false;
165
165
  };
166
166
 
167
167
  export const requiredIf = (variable, expected, fieldName) => helpers.withParams({variable, expected}, function(value, data) {