@processmaker/screen-builder 2.90.0 → 2.92.0
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/README.md +5 -4
- package/dist/vue-form-builder.css +1 -1
- package/dist/vue-form-builder.es.js +7897 -7488
- package/dist/vue-form-builder.es.js.map +1 -1
- package/dist/vue-form-builder.umd.js +76 -59
- package/dist/vue-form-builder.umd.js.map +1 -1
- package/package.json +3 -3
- package/src/DataProvider.js +31 -11
- package/src/assets/icons/Bypass.svg +5 -0
- package/src/assets/icons/Unbypass.svg +5 -0
- package/src/components/accordions.js +1 -0
- package/src/components/computed-properties.vue +211 -110
- package/src/components/index.js +2 -0
- package/src/components/inspector/options-list.vue +1 -1
- package/src/components/renderer/form-list-table.vue +11 -2
- package/src/components/renderer/form-requests.vue +13 -26
- package/src/components/renderer/form-tasks.vue +5 -3
- package/src/components/renderer/index.js +1 -0
- package/src/components/renderer/link-button.vue +30 -0
- package/src/components/sortable/Sortable.vue +95 -13
- package/src/components/sortable/sortable.scss +5 -0
- package/src/components/sortable/sortableList/SortableList.vue +103 -36
- package/src/components/sortable/sortableList/sortableList.scss +63 -22
- package/src/components/task.vue +256 -59
- package/src/components/vue-form-builder.vue +19 -10
- package/src/components/watchers-form.vue +4 -3
- package/src/components/watchers-list.vue +46 -100
- package/src/components/watchers-popup.vue +89 -16
- package/src/customLogs.js +26 -0
- package/src/form-builder-controls.js +42 -0
- package/src/main.js +26 -1
- package/src/mixins/Json2Vue.js +5 -3
- package/src/mixins/computedFields.js +25 -7
- package/src/mixins/extensions/ComputedFields.js +26 -5
- package/src/mixins/extensions/Watchers.js +4 -0
- package/src/mixins/watchers.js +5 -2
- package/src/stories/Sortable.stories.js +58 -11
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@processmaker/screen-builder",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.92.0",
|
|
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.
|
|
59
|
+
"@processmaker/vue-form-elements": "0.58.0",
|
|
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.
|
|
118
|
+
"@processmaker/vue-form-elements": "0.58.0",
|
|
119
119
|
"i18next": "^15.0.8",
|
|
120
120
|
"vue": "^2.6.12",
|
|
121
121
|
"vuex": "^3.1.1"
|
package/src/DataProvider.js
CHANGED
|
@@ -71,18 +71,38 @@ export default {
|
|
|
71
71
|
|
|
72
72
|
// Methods below are used in the components
|
|
73
73
|
|
|
74
|
-
getTasks(params) {
|
|
74
|
+
async getTasks(params) {
|
|
75
75
|
const endpoint = get(
|
|
76
76
|
window,
|
|
77
77
|
"PM4ConfigOverrides.getTasksEndpoint",
|
|
78
|
-
"/tasks"
|
|
78
|
+
"/api/1.1/tasks"
|
|
79
79
|
);
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
80
|
+
const promises = [];
|
|
81
|
+
const hasIncludeScreen = params.match(/include=.*,screen,/);
|
|
82
|
+
const hasIncludeNested = params.match(/include=.*,nested,/);
|
|
83
|
+
|
|
84
|
+
// remove params ?...
|
|
85
|
+
promises.push(
|
|
86
|
+
this.get(endpoint + params.replace(/,screen,|,nested,/g, ","))
|
|
87
|
+
);
|
|
88
|
+
// Get the screen from a separated cached endpoint
|
|
89
|
+
if (hasIncludeScreen) {
|
|
90
|
+
const screenEndpoint = `${(endpoint + params).replace(
|
|
91
|
+
/\?.+$/,
|
|
92
|
+
""
|
|
93
|
+
)}/screen?include=screen${hasIncludeNested ? ",nested" : ""}`;
|
|
94
|
+
promises.push(this.get(screenEndpoint));
|
|
95
|
+
}
|
|
96
|
+
// Await for both promises to resolve
|
|
97
|
+
const [taskData, taskScreen] = await Promise.all(promises);
|
|
98
|
+
const response = taskData;
|
|
99
|
+
if (taskScreen) {
|
|
100
|
+
response.data.screen = taskScreen.data;
|
|
101
|
+
}
|
|
102
|
+
if (response.data.screen && response.data.screen.nested) {
|
|
103
|
+
this.addNestedScreenCache(response.data.screen.nested);
|
|
104
|
+
}
|
|
105
|
+
return response;
|
|
86
106
|
},
|
|
87
107
|
addNestedScreenCache(nested) {
|
|
88
108
|
nested.forEach((screen) => {
|
|
@@ -173,7 +193,7 @@ export default {
|
|
|
173
193
|
* @param {object} params
|
|
174
194
|
* @returns {object}
|
|
175
195
|
*/
|
|
176
|
-
getDataSource(dataSourceId, params) {
|
|
196
|
+
getDataSource(dataSourceId, params, nonce = null) {
|
|
177
197
|
// keep backwards compatibility
|
|
178
198
|
if (
|
|
179
199
|
!window.ProcessMaker.screen.cacheEnabled &&
|
|
@@ -190,7 +210,7 @@ export default {
|
|
|
190
210
|
pmds_data: JSON.stringify(params.data)
|
|
191
211
|
}
|
|
192
212
|
}).then((response) => {
|
|
193
|
-
return response;
|
|
213
|
+
return [response, nonce];
|
|
194
214
|
});
|
|
195
215
|
},
|
|
196
216
|
|
|
@@ -246,7 +266,7 @@ export default {
|
|
|
246
266
|
},
|
|
247
267
|
|
|
248
268
|
getCollectionRecords(collectionId, options, nonce = null) {
|
|
249
|
-
options.useCache = window.ProcessMaker
|
|
269
|
+
options.useCache = window.ProcessMaker?.screen?.cacheEnabled;
|
|
250
270
|
|
|
251
271
|
return this.get(
|
|
252
272
|
`/collections/${collectionId}/records${this.authQueryString()}`,
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg width="20" height="15" viewBox="0 0 20 15" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M11.2632 7.10528H16M16 7.10528L14.0263 9.07896M16 7.10528L15.0132 6.11843L14.0263 5.13159" stroke="#6A7888" stroke-width="1.5" stroke-linecap="round"/>
|
|
3
|
+
<rect x="3.4791" y="0.9" width="7.67368" height="12.4105" rx="1.1" stroke="#6A7888" stroke-width="1.8"/>
|
|
4
|
+
<path d="M1 6.20522C0.502944 6.20522 0.1 6.60817 0.1 7.10522C0.1 7.60228 0.502944 8.00522 1 8.00522L1 6.20522ZM1 8.00522L7.31579 8.00523L7.31579 6.20523L1 6.20522L1 8.00522Z" fill="#6A7888"/>
|
|
5
|
+
</svg>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg width="20" height="15" viewBox="0 0 20 15" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M12 7H18M18 7L15.5 9M18 7L16.75 6L15.5 5" stroke="#6A7888" stroke-width="1.5" stroke-linecap="round"/>
|
|
3
|
+
<rect x="4.4791" y="0.9" width="7.67368" height="12.4105" rx="1.1" stroke="#6A7888" stroke-width="1.8"/>
|
|
4
|
+
<path d="M1 6.1C0.502944 6.1 0.1 6.50294 0.1 7C0.1 7.49706 0.502944 7.9 1 7.9V6.1ZM1 7.9H13V6.1H1V7.9Z" fill="#6A7888"/>
|
|
5
|
+
</svg>
|
|
@@ -2,111 +2,124 @@
|
|
|
2
2
|
<b-modal
|
|
3
3
|
id="computed-properties"
|
|
4
4
|
ref="modal"
|
|
5
|
-
size="
|
|
6
|
-
:title="$t('Calculated Properties')"
|
|
5
|
+
:size="modalSize"
|
|
7
6
|
content-class="p-3"
|
|
8
7
|
header-class="m-0 p-0 mb-3"
|
|
9
8
|
body-class="m-0 p-0"
|
|
10
9
|
title-class="m-0"
|
|
11
|
-
footer-class="m-0 p-0"
|
|
10
|
+
footer-class="m-0 p-0 border-0"
|
|
12
11
|
no-close-on-backdrop
|
|
13
12
|
header-close-content="×"
|
|
14
13
|
data-cy="calcs-modal"
|
|
15
14
|
@hidden="displayTableList"
|
|
16
15
|
>
|
|
16
|
+
<template #modal-title>
|
|
17
|
+
<h5 class="modal-title">{{ $t('Calculated Properties') }}</h5>
|
|
18
|
+
<small v-show="!displayList" class="modal-subtitle my-2">
|
|
19
|
+
{{
|
|
20
|
+
$t(
|
|
21
|
+
'Perform mathematical calculations offering quick, convenient, and accurate operations, enhancing user efficiency and usability.',
|
|
22
|
+
)
|
|
23
|
+
}}
|
|
24
|
+
</small>
|
|
25
|
+
</template>
|
|
17
26
|
<template v-if="displayList">
|
|
18
|
-
<
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
>
|
|
36
|
-
<
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
v-b-tooltip.hover
|
|
50
|
-
variant="link"
|
|
51
|
-
:title="$t('Delete')"
|
|
52
|
-
data-cy="calcs-table-remove"
|
|
53
|
-
@click="deleteProperty(item)"
|
|
54
|
-
>
|
|
55
|
-
<i class="fas fa-trash-alt fa-lg fa-fw" />
|
|
56
|
-
</b-btn>
|
|
57
|
-
</div>
|
|
58
|
-
</div>
|
|
59
|
-
</template>
|
|
60
|
-
</b-table>
|
|
61
|
-
</div>
|
|
27
|
+
<Sortable
|
|
28
|
+
class="mb-3"
|
|
29
|
+
:fields="fields"
|
|
30
|
+
:items="current"
|
|
31
|
+
disable-key="byPass"
|
|
32
|
+
:inline-edit="false"
|
|
33
|
+
:data-test-actions="{
|
|
34
|
+
tableBox: { 'data-cy': 'calcs-table' },
|
|
35
|
+
btnNew: { 'data-cy': 'calcs-add-property' },
|
|
36
|
+
btnEdit: { 'data-cy': 'calcs-table-edit' },
|
|
37
|
+
btnDelete: { 'data-cy': 'calcs-table-remove' },
|
|
38
|
+
}"
|
|
39
|
+
@item-edit="editProperty"
|
|
40
|
+
@item-delete="deleteProperty"
|
|
41
|
+
@add-page="displayFormProperty"
|
|
42
|
+
:searchProperties= "searchProperties"
|
|
43
|
+
>
|
|
44
|
+
<template #options="{ item }">
|
|
45
|
+
<button
|
|
46
|
+
v-b-tooltip="{ customClass: 'bypass-btn-tooltip' }"
|
|
47
|
+
:title="item.byPass ? $t('Unbypass Calc') : $t('Bypass Calc')"
|
|
48
|
+
class="btn"
|
|
49
|
+
data-test="calcs-bypass"
|
|
50
|
+
@click="toggleBypass(item.id)"
|
|
51
|
+
>
|
|
52
|
+
<img :src="getByPassIcon(item)" alt="Bypass" width="24" />
|
|
53
|
+
</button>
|
|
54
|
+
<div class="sortable-item-vr"></div>
|
|
55
|
+
</template>
|
|
56
|
+
</Sortable>
|
|
57
|
+
|
|
62
58
|
<template slot="modal-footer">
|
|
63
|
-
<
|
|
59
|
+
<div class="d-flex align-items-end">
|
|
60
|
+
<button
|
|
61
|
+
class="btn btn-secondary ml-3 text-uppercase"
|
|
62
|
+
data-cy="calcs-button-close"
|
|
63
|
+
@click="$refs.modal.hide()"
|
|
64
|
+
>
|
|
65
|
+
{{ $t("Done") }}
|
|
66
|
+
</button>
|
|
67
|
+
</div>
|
|
64
68
|
</template>
|
|
65
69
|
</template>
|
|
66
70
|
|
|
67
71
|
<template v-else>
|
|
68
|
-
<
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
72
|
+
<b-row>
|
|
73
|
+
<b-col>
|
|
74
|
+
<form-input
|
|
75
|
+
ref="property"
|
|
76
|
+
v-model="add.property"
|
|
77
|
+
:label="$t('Property Name') + ' *'"
|
|
78
|
+
name="property"
|
|
79
|
+
:error="errors.property"
|
|
80
|
+
class="mb-3 calcs-input"
|
|
81
|
+
data-cy="calcs-property-name"
|
|
82
|
+
required
|
|
83
|
+
aria-required="true"
|
|
84
|
+
/>
|
|
85
|
+
</b-col>
|
|
86
|
+
<b-col>
|
|
87
|
+
<form-text-area
|
|
88
|
+
ref="name"
|
|
89
|
+
v-model="add.name"
|
|
90
|
+
:label="$t('Description') + ' *'"
|
|
91
|
+
name="name"
|
|
92
|
+
:error="errors.name"
|
|
93
|
+
class="mb-3 calcs-input"
|
|
94
|
+
data-cy="calcs-property-description"
|
|
95
|
+
required
|
|
96
|
+
aria-required="true"
|
|
97
|
+
/>
|
|
98
|
+
</b-col>
|
|
99
|
+
</b-row>
|
|
100
|
+
|
|
91
101
|
<div class="form-group mb-3" style="position: relative">
|
|
92
|
-
<
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
102
|
+
<div class="d-flex justify-content-between mb-1">
|
|
103
|
+
<label class="m-0">{{ $t('Formula') + ' *' }}</label>
|
|
104
|
+
|
|
105
|
+
<div>
|
|
106
|
+
<a
|
|
107
|
+
class="btn btn-sm"
|
|
108
|
+
:class="expressionTypeClass"
|
|
109
|
+
data-cy="calcs-switch-formula"
|
|
110
|
+
@click="switchExpressionType('expression')"
|
|
111
|
+
>
|
|
112
|
+
<i class="fas fa-square-root-alt" />
|
|
113
|
+
</a>
|
|
114
|
+
<a
|
|
115
|
+
class="btn btn-sm"
|
|
116
|
+
:class="javascriptTypeClass"
|
|
117
|
+
data-cy="calcs-switch-javascript"
|
|
118
|
+
@click="switchExpressionType('javascript')"
|
|
119
|
+
>
|
|
120
|
+
<i class="fab fa-js-square fa-lg"></i>
|
|
121
|
+
</a>
|
|
122
|
+
</div>
|
|
110
123
|
</div>
|
|
111
124
|
|
|
112
125
|
<form-text-area
|
|
@@ -114,12 +127,12 @@
|
|
|
114
127
|
ref="formula"
|
|
115
128
|
v-model="add.formula"
|
|
116
129
|
rows="5"
|
|
117
|
-
:label="$t('Formula') + ' *'"
|
|
118
130
|
name="formula"
|
|
119
131
|
:error="errors.formula"
|
|
120
132
|
data-cy="calcs-property-formula"
|
|
121
133
|
required
|
|
122
134
|
aria-required="true"
|
|
135
|
+
class="calcs-input-formula"
|
|
123
136
|
/>
|
|
124
137
|
<div
|
|
125
138
|
v-show="isJS"
|
|
@@ -144,14 +157,14 @@
|
|
|
144
157
|
<template slot="modal-footer">
|
|
145
158
|
<div class="d-flex align-items-end">
|
|
146
159
|
<button
|
|
147
|
-
class="btn btn-outline-secondary"
|
|
160
|
+
class="btn btn-outline-secondary text-uppercase"
|
|
148
161
|
data-cy="calcs-button-cancel"
|
|
149
162
|
@click="displayTableList"
|
|
150
163
|
>
|
|
151
164
|
{{ $t("Cancel") }}
|
|
152
165
|
</button>
|
|
153
166
|
<button
|
|
154
|
-
class="btn btn-secondary ml-3"
|
|
167
|
+
class="btn btn-secondary ml-3 text-uppercase"
|
|
155
168
|
data-cy="calcs-button-save"
|
|
156
169
|
@click="validateData"
|
|
157
170
|
>
|
|
@@ -168,12 +181,16 @@ import { FormInput, FormTextArea } from "@processmaker/vue-form-elements";
|
|
|
168
181
|
import MonacoEditor from "vue-monaco";
|
|
169
182
|
import Validator from "@chantouchsek/validatorjs";
|
|
170
183
|
import FocusErrors from "../mixins/focusErrors";
|
|
184
|
+
import Sortable from './sortable/Sortable.vue';
|
|
185
|
+
|
|
186
|
+
const globalObject = typeof window === 'undefined' ? global : window;
|
|
171
187
|
|
|
172
188
|
export default {
|
|
173
189
|
components: {
|
|
174
190
|
FormInput,
|
|
175
191
|
FormTextArea,
|
|
176
|
-
MonacoEditor
|
|
192
|
+
MonacoEditor,
|
|
193
|
+
Sortable,
|
|
177
194
|
},
|
|
178
195
|
mixins: [FocusErrors],
|
|
179
196
|
props: ["value"],
|
|
@@ -208,18 +225,23 @@ export default {
|
|
|
208
225
|
},
|
|
209
226
|
fields: [
|
|
210
227
|
{
|
|
211
|
-
label: this.$t("
|
|
212
|
-
key: "property"
|
|
228
|
+
label: this.$t("Name"),
|
|
229
|
+
key: "property",
|
|
213
230
|
},
|
|
214
231
|
{
|
|
215
|
-
label: this.$t("
|
|
216
|
-
key: "
|
|
232
|
+
label: this.$t("Type"),
|
|
233
|
+
key: "type",
|
|
234
|
+
cb: (value) => {
|
|
235
|
+
switch (value) {
|
|
236
|
+
case 'expression':
|
|
237
|
+
return 'Formula';
|
|
238
|
+
case 'javascript':
|
|
239
|
+
return 'JavaScript';
|
|
240
|
+
default:
|
|
241
|
+
return value;
|
|
242
|
+
}
|
|
243
|
+
},
|
|
217
244
|
},
|
|
218
|
-
{
|
|
219
|
-
key: "__actions",
|
|
220
|
-
label: "",
|
|
221
|
-
class: "text-right"
|
|
222
|
-
}
|
|
223
245
|
],
|
|
224
246
|
monacoOptions: {
|
|
225
247
|
automaticLayout: true,
|
|
@@ -227,7 +249,8 @@ export default {
|
|
|
227
249
|
minimap: false
|
|
228
250
|
},
|
|
229
251
|
monacoEditor: null,
|
|
230
|
-
errors: {}
|
|
252
|
+
errors: {},
|
|
253
|
+
searchProperties: ['property', 'type'],
|
|
231
254
|
};
|
|
232
255
|
},
|
|
233
256
|
computed: {
|
|
@@ -251,16 +274,24 @@ export default {
|
|
|
251
274
|
},
|
|
252
275
|
isJS() {
|
|
253
276
|
return this.add.type === "javascript";
|
|
254
|
-
}
|
|
277
|
+
},
|
|
278
|
+
modalSize() {
|
|
279
|
+
return this.displayList ? 'lg' : 'xl';
|
|
280
|
+
},
|
|
255
281
|
},
|
|
256
282
|
watch: {
|
|
257
283
|
value() {
|
|
258
284
|
this.value.forEach((item) => {
|
|
259
285
|
this.numberItem++;
|
|
260
286
|
item.id = this.numberItem;
|
|
287
|
+
|
|
288
|
+
if (!Object.hasOwn(item, 'byPass')) {
|
|
289
|
+
item.byPass = false;
|
|
290
|
+
}
|
|
261
291
|
});
|
|
292
|
+
|
|
262
293
|
this.current = this.value;
|
|
263
|
-
}
|
|
294
|
+
},
|
|
264
295
|
},
|
|
265
296
|
created() {
|
|
266
297
|
Validator.register(
|
|
@@ -334,6 +365,13 @@ export default {
|
|
|
334
365
|
this.focusFirstCalculatedPropertiesError();
|
|
335
366
|
}
|
|
336
367
|
},
|
|
368
|
+
toggleBypass(itemId) {
|
|
369
|
+
this.current = this.current.map((item) =>
|
|
370
|
+
item.id === itemId ? { ...item, byPass: !item.byPass } : item,
|
|
371
|
+
);
|
|
372
|
+
|
|
373
|
+
this.$emit("input", this.current);
|
|
374
|
+
},
|
|
337
375
|
saveProperty() {
|
|
338
376
|
if (this.add.id === 0) {
|
|
339
377
|
this.numberItem++;
|
|
@@ -342,7 +380,8 @@ export default {
|
|
|
342
380
|
property: this.add.property,
|
|
343
381
|
name: this.add.name,
|
|
344
382
|
formula: this.add.formula,
|
|
345
|
-
type: this.add.type
|
|
383
|
+
type: this.add.type,
|
|
384
|
+
byPass: false,
|
|
346
385
|
});
|
|
347
386
|
} else {
|
|
348
387
|
this.current.forEach((item) => {
|
|
@@ -367,6 +406,16 @@ export default {
|
|
|
367
406
|
this.displayList = false;
|
|
368
407
|
},
|
|
369
408
|
deleteProperty(item) {
|
|
409
|
+
globalObject.ProcessMaker.confirmModal(
|
|
410
|
+
this.$t('Are you sure you want to delete the calc ?'),
|
|
411
|
+
this.$t('If you do, you won’t be able to recover the Calc configuration.'),
|
|
412
|
+
'',
|
|
413
|
+
() => {
|
|
414
|
+
this.remove(item);
|
|
415
|
+
}
|
|
416
|
+
);
|
|
417
|
+
},
|
|
418
|
+
remove(item) {
|
|
370
419
|
this.current = this.current.filter((val) => {
|
|
371
420
|
return val.id !== item.id;
|
|
372
421
|
});
|
|
@@ -375,22 +424,28 @@ export default {
|
|
|
375
424
|
},
|
|
376
425
|
editorMounted(editor) {
|
|
377
426
|
this.monacoEditor = editor;
|
|
378
|
-
}
|
|
427
|
+
},
|
|
428
|
+
getByPassIcon(item) {
|
|
429
|
+
return new URL(
|
|
430
|
+
`../assets/icons/${item.byPass ? 'Unbypass' : 'Bypass'}.svg`,
|
|
431
|
+
import.meta.url,
|
|
432
|
+
).href;
|
|
433
|
+
},
|
|
379
434
|
}
|
|
380
435
|
};
|
|
381
436
|
</script>
|
|
382
437
|
|
|
383
438
|
<style lang="scss" scoped>
|
|
384
439
|
.editor {
|
|
385
|
-
height:
|
|
440
|
+
height: 430px;
|
|
386
441
|
z-index: 0;
|
|
387
442
|
}
|
|
388
443
|
|
|
389
444
|
.editor-border {
|
|
390
|
-
border: 1px solid #
|
|
445
|
+
border: 1px solid #CDDDEE;
|
|
391
446
|
border-radius: 4px;
|
|
392
447
|
overflow: hidden;
|
|
393
|
-
height:
|
|
448
|
+
height: 430px;
|
|
394
449
|
position: absolute;
|
|
395
450
|
pointer-events: none;
|
|
396
451
|
width: 100%;
|
|
@@ -400,4 +455,50 @@ export default {
|
|
|
400
455
|
.editor-border.is-invalid {
|
|
401
456
|
border-color: #dc3545;
|
|
402
457
|
}
|
|
458
|
+
|
|
459
|
+
.bypass-btn-tooltip::v-deep {
|
|
460
|
+
& .tooltip-inner {
|
|
461
|
+
background-color: #EBEEF2 !important;
|
|
462
|
+
color: #444444 !important;
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
& .arrow:before {
|
|
466
|
+
border-top-color: #EBEEF2 !important;
|
|
467
|
+
border-bottom-color: #EBEEF2 !important;
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
.modal-subtitle {
|
|
472
|
+
display: block;
|
|
473
|
+
color: #556271;
|
|
474
|
+
font-size: 1rem;
|
|
475
|
+
font-weight: 400;
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
.calcs-input::v-deep {
|
|
479
|
+
& > .form-control {
|
|
480
|
+
height: 86px;
|
|
481
|
+
border-color: #CDDDEE;
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
& > input.form-control {
|
|
485
|
+
padding-bottom: 52px;
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
& > textarea.form-control {
|
|
489
|
+
resize: none;
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
.calcs-input-formula::v-deep {
|
|
494
|
+
& > textarea.form-control {
|
|
495
|
+
height: 430px;
|
|
496
|
+
border-color: #CDDDEE;
|
|
497
|
+
resize: none;
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
& > label {
|
|
501
|
+
display: none;
|
|
502
|
+
}
|
|
503
|
+
}
|
|
403
504
|
</style>
|
package/src/components/index.js
CHANGED
|
@@ -47,6 +47,7 @@ import FormListTable from "./renderer/form-list-table.vue";
|
|
|
47
47
|
import FormAnalyticsChart from "./renderer/form-analytics-chart.vue";
|
|
48
48
|
import accordions from "@/components/accordions";
|
|
49
49
|
import VariableNameGenerator from "@/components/VariableNameGenerator";
|
|
50
|
+
import { LinkButton } from "./renderer";
|
|
50
51
|
import "../assets/css/tabs.css";
|
|
51
52
|
|
|
52
53
|
const rendererComponents = {
|
|
@@ -161,6 +162,7 @@ export default {
|
|
|
161
162
|
|
|
162
163
|
Vue.use(Vuex);
|
|
163
164
|
Vue.component("FormListTable", FormListTable);
|
|
165
|
+
Vue.component("LinkButton", LinkButton);
|
|
164
166
|
const store = new Vuex.Store({
|
|
165
167
|
modules: {
|
|
166
168
|
globalErrorsModule,
|
|
@@ -122,6 +122,7 @@
|
|
|
122
122
|
</div>
|
|
123
123
|
<div class="card-body list-table">
|
|
124
124
|
<template v-if="listOption === 'My Tasks'">
|
|
125
|
+
<Recommendations :dashboard="true" />
|
|
125
126
|
<FormTasks @tasksCount="getData"></FormTasks>
|
|
126
127
|
</template>
|
|
127
128
|
<template v-if="verifyListCase()">
|
|
@@ -139,8 +140,12 @@ import FormTasks from "./form-tasks.vue";
|
|
|
139
140
|
import FormRequests from "./form-requests.vue";
|
|
140
141
|
import FormNewRequest from "./form-new-request.vue";
|
|
141
142
|
|
|
143
|
+
const Recommendations = (resolve) => {
|
|
144
|
+
resolve(window.SharedComponents?.Recommendations || { template: "<span></span>" });
|
|
145
|
+
};
|
|
146
|
+
|
|
142
147
|
export default {
|
|
143
|
-
components: { FormTasks, FormRequests, FormNewRequest },
|
|
148
|
+
components: { FormTasks, FormRequests, FormNewRequest, Recommendations },
|
|
144
149
|
mixins: [],
|
|
145
150
|
props: ["listOption"],
|
|
146
151
|
data() {
|
|
@@ -310,8 +315,12 @@ export default {
|
|
|
310
315
|
|
|
311
316
|
.list-table {
|
|
312
317
|
height: 300px;
|
|
313
|
-
overflow:
|
|
318
|
+
overflow: hidden;
|
|
314
319
|
background-color: #f9f9f9;
|
|
320
|
+
padding: 0 13.5px 0 0;
|
|
321
|
+
}
|
|
322
|
+
.list-table:hover {
|
|
323
|
+
overflow: auto;
|
|
315
324
|
padding: 0;
|
|
316
325
|
}
|
|
317
326
|
|