@processmaker/screen-builder 2.85.7 → 2.85.9

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.85.7",
3
+ "version": "2.85.9",
4
4
  "scripts": {
5
5
  "dev": "VITE_COVERAGE=true vite",
6
6
  "build": "vite build",
@@ -43,6 +43,7 @@
43
43
  {{ pages[index]?.name }}
44
44
  </span>
45
45
  <span
46
+ v-if="isMultiPage"
46
47
  :data-test="`close-tab-${n}`"
47
48
  class="close-tab"
48
49
  role="link"
@@ -107,6 +108,13 @@ export default {
107
108
  buttonIcon: {
108
109
  type: String,
109
110
  default: () => "fa fa-file"
111
+ },
112
+ /**
113
+ * Is multi page mode enabled
114
+ */
115
+ isMultiPage: {
116
+ type: Boolean,
117
+ default: true
110
118
  }
111
119
  },
112
120
  data() {
@@ -55,13 +55,16 @@ export default {
55
55
  },
56
56
  methods: {
57
57
  loadMasks() {
58
- Inputmask('currency', {
58
+ const mask = (this.suffix).trim() === 'INR' ? 'indianns' : 'currency';
59
+
60
+ Inputmask(mask, {
59
61
  digits: this.precision,
60
62
  prefix: this.prefix,
61
63
  suffix: this.suffix,
62
64
  radixPoint: this.decimal,
63
65
  groupSeparator: this.thousands,
64
66
  }).mask(this.currencyInput);
67
+
65
68
  if (this.value) {
66
69
  this.currencyInput.inputmask.setValue(this.value);
67
70
  }
@@ -81,4 +84,4 @@ export default {
81
84
  </script>
82
85
 
83
86
  <style>
84
- </style>
87
+ </style>
@@ -14,19 +14,27 @@
14
14
  {{ $t(title) }}
15
15
  </p>
16
16
  <template v-if="dataControl.dropdownShow === 'requests'">
17
- <b-dropdown variant="outline-secondary" no-caret>
17
+ <b-dropdown
18
+ variant="outline-secondary"
19
+ right
20
+ no-caret
21
+ >
18
22
  <template #button-content>
19
23
  <i class="fas fa-caret-down" />
20
24
  </template>
21
25
  <b-dropdown-item
22
26
  @click="handleDropdownSelection('requests_filter', 'by_me')"
23
27
  >
24
- {{ $t("As Requester") }}
28
+ <span class="item-text">
29
+ {{ $t("As Requester") }}
30
+ </span>
25
31
  </b-dropdown-item>
26
32
  <b-dropdown-item
27
33
  @click="handleDropdownSelection('requests_filter', 'as_participant')"
28
34
  >
29
- {{ $t("As Participant") }}
35
+ <span class="item-text">
36
+ {{ $t("As Participant") }}
37
+ </span>
30
38
  </b-dropdown-item>
31
39
  </b-dropdown>
32
40
  </template>
@@ -38,68 +46,92 @@
38
46
  <div class="ml-auto d-flex align-items-center">
39
47
  <template v-if="dataControl.dropdownShow === 'requests'">
40
48
  <div class="mr-4">
41
- <b-dropdown variant="outline-secondary" size="sm">
49
+ <b-dropdown
50
+ variant="outline-secondary"
51
+ size="sm"
52
+ >
42
53
  <template #button-content>
43
54
  <span class="text-capitalize">
44
55
  <b-icon
45
56
  v-if="showBadge"
46
57
  icon="circle-fill"
58
+ class="mr-2"
47
59
  :variant="badgeVariant"
48
60
  />
49
61
  {{ $t(titleDropdown) }}
50
62
  </span>
51
63
  </template>
52
64
  <b-dropdown-item
53
- variant="success"
54
- @click="
55
- handleDropdownSelection('requests_dropdown', 'In Progress')
56
- "
65
+ @click="handleDropdownSelection('requests_dropdown', 'all')"
57
66
  >
58
- <i class="fas fa-circle mr-2" />{{ $t("In Progress") }}
67
+ <span class="item-text">
68
+ {{ $t("View All") }}
69
+ </span>
59
70
  </b-dropdown-item>
60
71
  <b-dropdown-item
61
- variant="primary"
62
- @click="
63
- handleDropdownSelection('requests_dropdown', 'Completed')
64
- "
72
+ @click="handleDropdownSelection('requests_dropdown', 'Completed')"
65
73
  >
66
- <i class="fas fa-circle mr-2" />{{ $t("Completed") }}
74
+ <span class="item-text">
75
+ <i
76
+ class="fas fa-circle mr-2 text-primary"
77
+ />
78
+ {{ $t("Completed") }}
79
+ </span>
67
80
  </b-dropdown-item>
68
81
  <b-dropdown-item
69
- @click="handleDropdownSelection('requests_dropdown', 'all')"
82
+ @click="handleDropdownSelection('requests_dropdown', 'In Progress')"
70
83
  >
71
- {{ $t("View All") }}
84
+ <span class="item-text">
85
+ <i
86
+ class="fas fa-circle mr-2 text-success"
87
+ />
88
+ {{ $t("In Progress") }}
89
+ </span>
72
90
  </b-dropdown-item>
73
91
  </b-dropdown>
74
92
  </div>
75
93
  </template>
76
94
  <template v-if="dataControl.dropdownShow === 'tasks'">
77
95
  <div class="mr-4">
78
- <b-dropdown variant="outline-secondary" size="sm">
96
+ <b-dropdown
97
+ variant="outline-secondary"
98
+ size="sm"
99
+ >
79
100
  <template #button-content>
80
101
  <span class="text-capitalize">
81
102
  <b-icon
82
103
  v-if="showBadge"
83
104
  icon="circle-fill"
105
+ class="mr-2"
84
106
  :variant="badgeVariant"
85
107
  />
86
108
  {{ $t(titleDropdown) }}
87
109
  </span>
88
110
  </template>
89
- <b-dropdown-item
90
- variant="warning"
91
- @click="handleDropdownSelection('tasks', 'In Progress')"
92
- >
93
- <i class="fas fa-circle mr-2" />{{ $t("In Progress") }}
111
+ <b-dropdown-item @click="handleDropdownSelection('tasks', 'all')">
112
+ <span class="item-text">
113
+ {{ $t("View All") }}
114
+ </span>
94
115
  </b-dropdown-item>
95
116
  <b-dropdown-item
96
- variant="danger"
97
117
  @click="handleDropdownSelection('tasks', 'Overdue')"
98
118
  >
99
- <i class="fas fa-circle mr-2" />{{ $t("Overdue") }}
119
+ <span class="item-text">
120
+ <i
121
+ class="fas fa-circle mr-2 text-danger"
122
+ />
123
+ {{ $t("Overdue") }}
124
+ </span>
100
125
  </b-dropdown-item>
101
- <b-dropdown-item @click="handleDropdownSelection('tasks', 'all')">
102
- {{ $t("View All") }}
126
+ <b-dropdown-item
127
+ @click="handleDropdownSelection('tasks', 'In Progress')"
128
+ >
129
+ <span class="item-text">
130
+ <i
131
+ class="fas fa-circle mr-2 text-warning"
132
+ />
133
+ {{ $t("In Progress") }}
134
+ </span>
103
135
  </b-dropdown-item>
104
136
  </b-dropdown>
105
137
  </div>
@@ -249,7 +281,8 @@ export default {
249
281
  },
250
282
  clearSearch(listType) {
251
283
  this.searchCriteria = "";
252
- this.toggleInput(listType);
284
+ this.performSearch(listType);
285
+ this.showInput = !this.showInput;
253
286
  },
254
287
  /**
255
288
  * Set the badge's color of the filter selected
@@ -327,4 +360,24 @@ export default {
327
360
  .btn-outline-secondary {
328
361
  border: none;
329
362
  }
363
+
364
+ .item-text {
365
+ color: #42526E;
366
+ font-family: 'Open Sans', sans-serif;
367
+ font-size: 14px;
368
+ font-weight: 400;
369
+ line-height: 21px;
370
+ letter-spacing: -0.02em;
371
+ text-align: left;
372
+ }
373
+
374
+ .dropdown-menu {
375
+ padding: 10px;
376
+ width: 211px;
377
+ box-shadow: 0px 10px 20px 4px #00000021;
378
+ }
379
+
380
+ .dropdown-item {
381
+ padding: 10px 8px;
382
+ }
330
383
  </style>
@@ -39,6 +39,7 @@
39
39
  :vdata="value"
40
40
  :_parent="_parent"
41
41
  :_initial-page="currentPage"
42
+ @after-submit="afterSubmit"
42
43
  @submit="submit"
43
44
  @asyncWatcherTriggered="onAsyncWatcherOn"
44
45
  @asyncWatcherCompleted="onAsyncWatcherOff"
@@ -108,6 +109,9 @@ export default {
108
109
  },
109
110
  setCurrentPage(page) {
110
111
  this.$refs.component.setCurrentPage(page);
112
+ },
113
+ afterSubmit() {
114
+ this.$emit('after-submit', ...arguments);
111
115
  }
112
116
  }
113
117
  };
@@ -30,6 +30,7 @@
30
30
  :key="refreshScreen"
31
31
  :loop-context="loopContext"
32
32
  @update="onUpdate"
33
+ @after-submit="afterSubmit"
33
34
  @submit="submit"
34
35
  />
35
36
  </div>
@@ -46,6 +47,7 @@
46
47
  :watchers="screen.watchers"
47
48
  :data="requestData"
48
49
  :type="screen.type"
50
+ @after-submit="afterSubmit"
49
51
  @submit="submit"
50
52
  />
51
53
  </div>
@@ -446,6 +448,9 @@ export default {
446
448
  }
447
449
  return 'card-header text-capitalize text-white ' + header;
448
450
  },
451
+ afterSubmit() {
452
+ this.$emit('after-submit', ...arguments);
453
+ },
449
454
  submit(formData = null, loading = false, buttonInfo = null) {
450
455
  //single click
451
456
  if (this.disabled) {
@@ -104,6 +104,7 @@
104
104
  <tabs-bar
105
105
  ref="tabsBar"
106
106
  :pages="config"
107
+ :is-multi-page="showToolbar"
107
108
  @tab-opened="currentPage = $event"
108
109
  >
109
110
  <template #tabs-start>
@@ -1386,7 +1387,7 @@ export default {
1386
1387
  };
1387
1388
  </script>
1388
1389
 
1389
- <style>
1390
+ <style scoped>
1390
1391
  .custom-popover {
1391
1392
  margin-right: -400px;
1392
1393
  padding: 16px;
@@ -18,6 +18,7 @@
18
18
  :test-screen-definition="testScreenDefinition || false"
19
19
  class="p-0"
20
20
  :loop-context="loopContext"
21
+ @after-submit="afterSubmit"
21
22
  @submit="submit"
22
23
  />
23
24
  </div>
@@ -246,6 +247,9 @@ export default {
246
247
  node.$children.forEach((child) => this.registerCustomFunctions(child));
247
248
  }
248
249
  },
250
+ afterSubmit() {
251
+ this.$emit('after-submit', ...arguments);
252
+ },
249
253
  submit(eventData, loading = false, buttonInfo = null) {
250
254
  this.$emit("submit", this.data, loading, buttonInfo);
251
255
  },
package/src/currency.json CHANGED
@@ -368,7 +368,7 @@
368
368
  {
369
369
  "code": "INR",
370
370
  "name": "Indian Rupee",
371
- "format": "#,##,###.##",
371
+ "format": "#,###.##",
372
372
  "symbol": "₹"
373
373
  },
374
374
  {
@@ -146,6 +146,15 @@ export default {
146
146
  }
147
147
  },
148
148
  async submitForm(eventData, loading = false, buttonInfo = null) {
149
+ const event = {
150
+ name: 'after-submit',
151
+ validation: true
152
+ };
153
+ this.$emit('after-submit', event, ...arguments);
154
+ if (event.validation === false) {
155
+ this.$emit('submit', this.vdata, loading, buttonInfo);
156
+ return;
157
+ }
149
158
  await this.validateNow(findRootScreen(this));
150
159
  this.hasSubmitted(true);
151
160
  if (!this.valid__ || this.disableSubmit__) {