@processmaker/modeler 1.23.0 → 1.24.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@processmaker/modeler",
3
- "version": "1.23.0",
3
+ "version": "1.24.1",
4
4
  "scripts": {
5
5
  "serve": "vue-cli-service serve",
6
6
  "open-cypress": "TZ=UTC cypress open",
package/src/.DS_Store CHANGED
Binary file
@@ -7,15 +7,15 @@
7
7
  v-model="selectedProcess"
8
8
  :showLabels="false"
9
9
  :allow-empty="false"
10
- :disabled="processList.length === 0"
11
10
  :options="processList"
11
+ :loading="loading"
12
12
  optionContent="name"
13
13
  class="p-0 mb-2"
14
- validation="required"
14
+ :validation="validation"
15
15
  @search-change="searchChange"
16
16
  :searchable="true"
17
17
  :internal-search="false"
18
- :preserve-search="true"
18
+ :preserve-search="false"
19
19
  :clear-on-select="false"
20
20
  />
21
21
 
@@ -45,6 +45,7 @@
45
45
  </template>
46
46
 
47
47
  <script>
48
+ import debounce from 'lodash/debounce';
48
49
  import uniqBy from 'lodash/uniqBy';
49
50
 
50
51
  export default {
@@ -57,6 +58,7 @@ export default {
57
58
  loading: false ,
58
59
  processes: [],
59
60
  selectedProcessInfo: null,
61
+ validation: '',
60
62
  };
61
63
  },
62
64
  inheritAttrs: false,
@@ -107,7 +109,7 @@ export default {
107
109
  },
108
110
  methods: {
109
111
  searchChange(filter) {
110
- this.loadProcesses(filter);
112
+ this.loadProcessesDebounced(filter);
111
113
  },
112
114
  filterValidProcesses(processes) {
113
115
  return processes.filter(process => {
@@ -145,6 +147,9 @@ export default {
145
147
  this.selectedProcess = this.processList.find(p => p.id === this.config.processId);
146
148
  this.selectedStartEvent = this.startEventList.find(se => se.id === this.config.startEvent);
147
149
  this.$nextTick(() => {
150
+ if (!this.selectedProcess) {
151
+ this.validation = 'required';
152
+ }
148
153
  this.loading = false;
149
154
  });
150
155
  },
@@ -205,6 +210,10 @@ export default {
205
210
  },
206
211
  },
207
212
  created() {
213
+ this.validation = !this.config.processId ? 'required' : '';
214
+ this.loadProcessesDebounced = debounce((filter) => {
215
+ this.loadProcesses(filter);
216
+ }, 500);
208
217
  if (this.processList.length === 0) {
209
218
  this.loadProcesses();
210
219
  } else {