@processmaker/screen-builder 3.8.33 → 3.8.34
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/vue-form-builder.css +1 -1
- package/dist/vue-form-builder.es.js +23 -7
- package/dist/vue-form-builder.es.js.map +1 -1
- package/dist/vue-form-builder.umd.js +2 -2
- package/dist/vue-form-builder.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/components/renderer/file-upload.vue +22 -1
- package/src/components/renderer/form-record-list.vue +34 -6
package/package.json
CHANGED
|
@@ -154,6 +154,18 @@ export default {
|
|
|
154
154
|
components: { ...uploader, RequiredAsterisk },
|
|
155
155
|
mixins: [uniqIdsMixin],
|
|
156
156
|
props: ['label', 'error', 'helper', 'name', 'value', 'controlClass', 'endpoint', 'accept', 'validation', 'parent', 'config', 'multipleUpload', 'screenType'],
|
|
157
|
+
created() {
|
|
158
|
+
const vm = this;
|
|
159
|
+
// File Manager > Public + multi: see isFileManagerPublicInterface(); processParams fixes
|
|
160
|
+
// data_name per chunk (processParams runs after getParams merges `filename` for this chunk).
|
|
161
|
+
this.options.processParams = (params, file) => {
|
|
162
|
+
if (!vm.isFileManagerPublicInterface() || !vm.multipleUpload) {
|
|
163
|
+
return params;
|
|
164
|
+
}
|
|
165
|
+
params.data_name = params.filename || file.name;
|
|
166
|
+
return params;
|
|
167
|
+
};
|
|
168
|
+
},
|
|
157
169
|
updated() {
|
|
158
170
|
this.removeDefaultClasses();
|
|
159
171
|
},
|
|
@@ -373,6 +385,15 @@ export default {
|
|
|
373
385
|
};
|
|
374
386
|
},
|
|
375
387
|
methods: {
|
|
388
|
+
isFileManagerPublicInterface() {
|
|
389
|
+
if (typeof window === 'undefined' || !window.location) {
|
|
390
|
+
return false;
|
|
391
|
+
}
|
|
392
|
+
const p = String(window.location.pathname || '');
|
|
393
|
+
const h = String(window.location.hash || '');
|
|
394
|
+
return p.includes('/file-manager/public')
|
|
395
|
+
|| (/\/file-manager\/?$/i.test(p) && /^#\/public(\/|$)/i.test(h));
|
|
396
|
+
},
|
|
376
397
|
clearFiles() {
|
|
377
398
|
this.showComponent = false;
|
|
378
399
|
this.$nextTick(() => {
|
|
@@ -573,7 +594,7 @@ export default {
|
|
|
573
594
|
}
|
|
574
595
|
}
|
|
575
596
|
file.ignored = false;
|
|
576
|
-
if (!this.name) {
|
|
597
|
+
if (!this.name && !(this.isFileManagerPublicInterface() && this.multipleUpload)) {
|
|
577
598
|
this.options.query.data_name = file.name;
|
|
578
599
|
}
|
|
579
600
|
return true;
|
|
@@ -118,8 +118,11 @@
|
|
|
118
118
|
<i v-if="styleMode === 'Classic'" class="fas fa-trash-alt" />
|
|
119
119
|
<img v-else src="../../assets/Shape.svg" alt="delete" />
|
|
120
120
|
</button>
|
|
121
|
-
|
|
122
|
-
|
|
121
|
+
<div
|
|
122
|
+
v-show="isPopoverVisible === index"
|
|
123
|
+
class="popover-content"
|
|
124
|
+
:style="popoverPosition"
|
|
125
|
+
>
|
|
123
126
|
<p>Are you sure you want to delete it?</p>
|
|
124
127
|
<button class="btn btn-light" @click="hidePopover">CANCEL</button>
|
|
125
128
|
<button class="btn btn-danger" @click="popover_remove()">DELETE</button>
|
|
@@ -508,10 +511,34 @@ export default {
|
|
|
508
511
|
this.deleteIndex = _.find(this.tableData.data, { row_id: rowId });
|
|
509
512
|
this.isPopoverVisible = this.isPopoverVisible === index ? null : index;
|
|
510
513
|
if (this.isPopoverVisible !== null) {
|
|
511
|
-
const
|
|
514
|
+
const buttonEl = event.target.closest("button") || event.target;
|
|
515
|
+
const rect = buttonEl.getBoundingClientRect();
|
|
516
|
+
const popoverWidth = 285;
|
|
517
|
+
const estimatedPopoverHeight = 130;
|
|
518
|
+
const viewportMargin = 8;
|
|
519
|
+
|
|
520
|
+
// Default: anchor below the button, aligned to its left edge
|
|
521
|
+
let top = rect.bottom + viewportMargin;
|
|
522
|
+
let left = rect.left;
|
|
523
|
+
|
|
524
|
+
// Flip above the button if there isn't enough room below
|
|
525
|
+
if (
|
|
526
|
+
top + estimatedPopoverHeight >
|
|
527
|
+
window.innerHeight - viewportMargin
|
|
528
|
+
) {
|
|
529
|
+
top = Math.max(
|
|
530
|
+
viewportMargin,
|
|
531
|
+
rect.top - estimatedPopoverHeight - viewportMargin
|
|
532
|
+
);
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
// Clamp horizontally so the popover never overflows the viewport
|
|
536
|
+
const maxLeft = window.innerWidth - popoverWidth - viewportMargin;
|
|
537
|
+
left = Math.max(viewportMargin, Math.min(left, maxLeft));
|
|
538
|
+
|
|
512
539
|
this.popoverPosition = {
|
|
513
|
-
top: `${
|
|
514
|
-
left: `${
|
|
540
|
+
top: `${top}px`,
|
|
541
|
+
left: `${left}px`
|
|
515
542
|
};
|
|
516
543
|
}
|
|
517
544
|
},
|
|
@@ -1075,8 +1102,9 @@ export default {
|
|
|
1075
1102
|
position: fixed;
|
|
1076
1103
|
z-index: 1000;
|
|
1077
1104
|
width: 285px;
|
|
1105
|
+
max-width: calc(100vw - 16px);
|
|
1078
1106
|
text-align: center;
|
|
1079
|
-
|
|
1107
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
|
|
1080
1108
|
}
|
|
1081
1109
|
.popover-content p {
|
|
1082
1110
|
margin: 0 0 10px;
|