@3squared/forge-ui-3 0.4.1 → 0.5.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/dist/esm/forge-ui-3.js +989 -871
- package/dist/esm/style.css +1 -1
- package/dist/src/components/ForgeActionButton.vue.d.ts +1 -1
- package/dist/src/components/ForgeAlert.vue.d.ts +6 -4
- package/dist/src/components/ForgeCheckbox.vue.d.ts +6 -4
- package/dist/src/components/ForgeChips.vue.d.ts +1 -1
- package/dist/src/components/ForgeDatepicker.vue.d.ts +408 -46
- package/dist/src/components/ForgeForm.vue.d.ts +14 -12
- package/dist/src/components/ForgeInlineEditor.vue.d.ts +15 -13
- package/dist/src/components/ForgeLink.vue.d.ts +4 -2
- package/dist/src/components/ForgeModal.vue.d.ts +6 -4
- package/dist/src/components/ForgeMultiSelect.vue.d.ts +6 -4
- package/dist/src/components/ForgeMultiSelectPreview.vue.d.ts +11 -9
- package/dist/src/components/ForgeNavbar.vue.d.ts +7 -5
- package/dist/src/components/ForgePageHeader.vue.d.ts +4 -2
- package/dist/src/components/ForgeProgressBar.vue.d.ts +6 -4
- package/dist/src/components/ForgeStatWidget.vue.d.ts +6 -4
- package/dist/src/components/ForgeStepper.vue.d.ts +7 -5
- package/dist/src/components/ForgeTile.vue.d.ts +6 -4
- package/dist/src/components/file-uploader/components/DragDropArea.vue.d.ts +6 -4
- package/dist/src/components/file-uploader/components/UploadButton.vue.d.ts +7 -5
- package/dist/src/components/table/ForgePaginationHeader.vue.d.ts +1 -1
- package/dist/src/components/table/ForgeTable.vue.d.ts +7 -5
- package/dist/src/passthroughs/Column.pt.d.ts +2 -2
- package/dist/src/passthroughs/Datepicker.pt.d.ts +2 -36
- package/package.json +5 -5
- package/src/styles/components/_button.scss +5 -1
- package/src/styles/components/_datepicker.scss +50 -3
- package/src/styles/components/_multiselect.scss +33 -53
package/dist/esm/forge-ui-3.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
import { Icon as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
1
|
+
import fe from "primevue/message";
|
|
2
|
+
import { defineComponent as $, openBlock as s, createBlock as w, normalizeProps as Q, guardReactiveProps as ee, withCtx as v, createElementVNode as m, normalizeClass as B, unref as c, createCommentVNode as F, createVNode as y, renderSlot as k, ref as T, createElementBlock as p, Fragment as D, mergeProps as C, onMounted as oe, computed as x, watch as ge, isRef as H, createTextVNode as P, toDisplayString as g, withDirectives as L, vShow as Y, mergeModels as q, useModel as R, createSlots as te, renderList as j, withKeys as J, useAttrs as de, withModifiers as G, normalizeStyle as he } from "vue";
|
|
3
|
+
import { Icon as S } from "@iconify/vue";
|
|
4
|
+
import E from "primevue/button";
|
|
5
|
+
import we from "primevue/toast";
|
|
6
|
+
import xe from "primevue/checkbox";
|
|
7
7
|
import { useField as W } from "vee-validate";
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { vOnClickOutside as
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import { BlockBlobClient as
|
|
26
|
-
import
|
|
27
|
-
const
|
|
8
|
+
import ke from "primevue/progressspinner";
|
|
9
|
+
import _e from "primevue/dialog";
|
|
10
|
+
import ne from "primevue/inputtext";
|
|
11
|
+
import { vOnClickOutside as $e } from "@vueuse/components";
|
|
12
|
+
import Fe from "primevue/menubar";
|
|
13
|
+
import Be from "vue-multiselect";
|
|
14
|
+
import Se from "primevue/calendar";
|
|
15
|
+
import Ce from "primevue/inputmask";
|
|
16
|
+
import Ve from "primevue/textarea";
|
|
17
|
+
import ue from "primevue/inputnumber";
|
|
18
|
+
import Te from "primevue/chips";
|
|
19
|
+
import Me from "primevue/progressbar";
|
|
20
|
+
import Pe from "primevue/divider";
|
|
21
|
+
import Ie from "primevue/steps";
|
|
22
|
+
import ze from "primevue/datatable";
|
|
23
|
+
import se from "primevue/dropdown";
|
|
24
|
+
import Oe from "primevue/multiselect";
|
|
25
|
+
import { BlockBlobClient as ce } from "@azure/storage-blob";
|
|
26
|
+
import De from "primevue/image";
|
|
27
|
+
const Ue = {
|
|
28
28
|
button: {
|
|
29
29
|
root: ({ props: e }) => ({
|
|
30
30
|
class: [
|
|
@@ -108,7 +108,7 @@ const ze = {
|
|
|
108
108
|
]
|
|
109
109
|
})
|
|
110
110
|
}
|
|
111
|
-
},
|
|
111
|
+
}, Ae = {
|
|
112
112
|
checkbox: {
|
|
113
113
|
root: () => ({
|
|
114
114
|
class: [
|
|
@@ -126,7 +126,7 @@ const ze = {
|
|
|
126
126
|
]
|
|
127
127
|
})
|
|
128
128
|
}
|
|
129
|
-
},
|
|
129
|
+
}, re = {
|
|
130
130
|
dropdown: {
|
|
131
131
|
root: ({ props: e }) => ({
|
|
132
132
|
class: [
|
|
@@ -186,16 +186,16 @@ const ze = {
|
|
|
186
186
|
loadingIcon: "spinner-border spinner-border-sm border-0",
|
|
187
187
|
itemGroupLabel: "ps-2 fw-bold"
|
|
188
188
|
}
|
|
189
|
-
},
|
|
189
|
+
}, Ne = {
|
|
190
190
|
column: {
|
|
191
191
|
sortBadge: "ms-2 my-auto cursor-pointer",
|
|
192
192
|
headerCell: (e) => {
|
|
193
|
-
var t,
|
|
193
|
+
var t, n, a, l;
|
|
194
194
|
return {
|
|
195
195
|
class: [{
|
|
196
196
|
"cursor-move": e.props.reorderableColumns,
|
|
197
|
-
"position-sticky": ((t = e.column) == null ? void 0 : t.context.frozen) !== void 0 || ((
|
|
198
|
-
"overflow-hidden position-relative bg-clip-padding": (
|
|
197
|
+
"position-sticky": ((t = e.column) == null ? void 0 : t.context.frozen) !== void 0 || ((n = e.column) == null ? void 0 : n.context.frozen) || ((a = e.column) == null ? void 0 : a.context.frozen) === "",
|
|
198
|
+
"overflow-hidden position-relative bg-clip-padding": (l = e.column) == null ? void 0 : l.context.resizable
|
|
199
199
|
}]
|
|
200
200
|
};
|
|
201
201
|
},
|
|
@@ -279,22 +279,22 @@ const ze = {
|
|
|
279
279
|
]
|
|
280
280
|
})
|
|
281
281
|
}
|
|
282
|
-
},
|
|
282
|
+
}, Ee = {
|
|
283
283
|
inputtext: {
|
|
284
284
|
root: (e) => {
|
|
285
|
-
var t,
|
|
285
|
+
var t, n;
|
|
286
286
|
return {
|
|
287
287
|
class: [
|
|
288
288
|
"form-control",
|
|
289
289
|
{
|
|
290
290
|
"form-control-lg": ((t = e.props.size) == null ? void 0 : t.toLowerCase()) == "large",
|
|
291
|
-
"form-control-sm": ((
|
|
291
|
+
"form-control-sm": ((n = e.props.size) == null ? void 0 : n.toLowerCase()) == "small"
|
|
292
292
|
}
|
|
293
293
|
]
|
|
294
294
|
};
|
|
295
295
|
}
|
|
296
296
|
}
|
|
297
|
-
},
|
|
297
|
+
}, Re = {
|
|
298
298
|
inputmask: {
|
|
299
299
|
root: () => ({
|
|
300
300
|
class: [
|
|
@@ -302,12 +302,12 @@ const ze = {
|
|
|
302
302
|
]
|
|
303
303
|
})
|
|
304
304
|
}
|
|
305
|
-
},
|
|
305
|
+
}, Le = {
|
|
306
306
|
inputSwitch: {
|
|
307
307
|
root: "form-check form-switch",
|
|
308
308
|
input: "form-check-input"
|
|
309
309
|
}
|
|
310
|
-
},
|
|
310
|
+
}, je = {
|
|
311
311
|
textarea: {
|
|
312
312
|
root: () => ({
|
|
313
313
|
class: [
|
|
@@ -315,13 +315,13 @@ const ze = {
|
|
|
315
315
|
]
|
|
316
316
|
})
|
|
317
317
|
}
|
|
318
|
-
},
|
|
318
|
+
}, He = {
|
|
319
319
|
// More PassThrough options in component file.
|
|
320
320
|
chips: {
|
|
321
321
|
root: "d-flex",
|
|
322
322
|
label: "pe-2"
|
|
323
323
|
}
|
|
324
|
-
},
|
|
324
|
+
}, Ye = {
|
|
325
325
|
dialog: {
|
|
326
326
|
header: () => ({
|
|
327
327
|
class: ["modal-header"]
|
|
@@ -361,7 +361,7 @@ const ze = {
|
|
|
361
361
|
}]
|
|
362
362
|
})
|
|
363
363
|
}
|
|
364
|
-
},
|
|
364
|
+
}, qe = {
|
|
365
365
|
overlaypanel: {
|
|
366
366
|
root: (e) => ({
|
|
367
367
|
class: [
|
|
@@ -375,7 +375,7 @@ const ze = {
|
|
|
375
375
|
content: "d-flex position-relative",
|
|
376
376
|
closeButton: "position-absolute top-0 end-0 p-1 btn btn-link text-black ms-2"
|
|
377
377
|
}
|
|
378
|
-
},
|
|
378
|
+
}, Ge = {
|
|
379
379
|
message: {
|
|
380
380
|
root: ({ props: e }) => ({
|
|
381
381
|
class: [
|
|
@@ -404,13 +404,13 @@ const ze = {
|
|
|
404
404
|
class: ["px-0 ms-2 btn d-flex"]
|
|
405
405
|
})
|
|
406
406
|
}
|
|
407
|
-
},
|
|
407
|
+
}, Ke = {
|
|
408
408
|
// More PT options defined in ForgeStepper.
|
|
409
409
|
steps: {
|
|
410
410
|
root: "w-100 mx-2 line",
|
|
411
411
|
menu: "p-0 m-0 list-unstyled d-flex justify-content-between "
|
|
412
412
|
}
|
|
413
|
-
},
|
|
413
|
+
}, We = {
|
|
414
414
|
tabview: {
|
|
415
415
|
navContainer: () => ({
|
|
416
416
|
class: ["nav nav-tabs position-relative"]
|
|
@@ -448,7 +448,7 @@ const ze = {
|
|
|
448
448
|
class: ["p-2"]
|
|
449
449
|
})
|
|
450
450
|
}
|
|
451
|
-
},
|
|
451
|
+
}, Ze = {
|
|
452
452
|
// More PassThrough options defined in ForgeDatepicker.
|
|
453
453
|
calendar: {
|
|
454
454
|
root: "d-inline-flex relative",
|
|
@@ -461,27 +461,55 @@ const ze = {
|
|
|
461
461
|
}
|
|
462
462
|
]
|
|
463
463
|
}),
|
|
464
|
+
groupContainer: "d-flex flex-wrap",
|
|
464
465
|
header: "d-flex align-items-center justify-content-between p-2 border-bottom",
|
|
465
|
-
previousButton:
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
466
|
+
previousButton: ({ props: e }) => ({
|
|
467
|
+
class: {
|
|
468
|
+
"btn mb-1 ms-auto": e.numberOfMonths === void 0 || e.numberOfMonths == 1,
|
|
469
|
+
"btn p-0 btn-sm": e.numberOfMonths !== void 0 && e.numberOfMonths > 1
|
|
470
|
+
}
|
|
471
|
+
}),
|
|
472
|
+
tableheadercell: "pe-none",
|
|
473
|
+
nextButton: ({ props: e }) => ({
|
|
474
|
+
class: {
|
|
475
|
+
"btn mb-1 me-auto": e.numberOfMonths === void 0 || e.numberOfMonths == 1,
|
|
476
|
+
"btn p-0 btn-sm": e.numberOfMonths !== void 0 && e.numberOfMonths > 1
|
|
477
|
+
}
|
|
478
|
+
}),
|
|
479
|
+
group: ({ props: e }) => ({
|
|
480
|
+
class: [
|
|
481
|
+
"d-flex flex-column",
|
|
482
|
+
{
|
|
483
|
+
"w-100": e.numberOfMonths === void 0 || e.numberOfMonths == 1
|
|
484
|
+
}
|
|
485
|
+
]
|
|
486
|
+
}),
|
|
487
|
+
yearTitle: ({ props: e }) => ({
|
|
488
|
+
class: {
|
|
489
|
+
"btn ps-0 pe-1 fw-bold": e.numberOfMonths === void 0 || e.numberOfMonths == 1,
|
|
490
|
+
"fw-bold text-black border-0 bg-white": e.numberOfMonths !== void 0 && e.numberOfMonths > 1
|
|
491
|
+
}
|
|
492
|
+
}),
|
|
493
|
+
monthTitle: ({ props: e }) => ({
|
|
494
|
+
class: {
|
|
495
|
+
"btn ps-1 fw-bold": e.numberOfMonths === void 0 || e.numberOfMonths == 1,
|
|
496
|
+
"fw-bold text-black border-0 bg-white": e.numberOfMonths !== void 0 && e.numberOfMonths > 1
|
|
497
|
+
}
|
|
498
|
+
}),
|
|
499
|
+
title: "d-flex mx-auto",
|
|
500
|
+
decadetitle: "fw-bold",
|
|
501
|
+
table: "datepicker-table",
|
|
502
|
+
tableHeaderRow: "text-center",
|
|
503
|
+
monthPicker: "d-flex flex-row flex-wrap m-2",
|
|
504
|
+
yearPicker: "d-flex flex-row flex-wrap m-2",
|
|
476
505
|
timePicker: "d-flex justify-content-center align-items-center border-top p-2",
|
|
477
506
|
separatorContainer: "d-flex flex-column align-items-center px-2",
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
second: "my-2",
|
|
507
|
+
hourPicker: "px-2 d-flex flex-column",
|
|
508
|
+
hour: "mx-auto",
|
|
509
|
+
minutePicker: "px-2 d-flex flex-column",
|
|
510
|
+
minute: "mx-auto",
|
|
511
|
+
secondPicker: "px-2 d-flex flex-column",
|
|
512
|
+
second: "mx-auto",
|
|
485
513
|
buttonbar: ({ props: e }) => ({
|
|
486
514
|
class: [
|
|
487
515
|
"p-2 d-flex",
|
|
@@ -489,9 +517,11 @@ const ze = {
|
|
|
489
517
|
"border-top": !e.showTime
|
|
490
518
|
}
|
|
491
519
|
]
|
|
492
|
-
})
|
|
520
|
+
}),
|
|
521
|
+
decrementButton: "btn btn-sm",
|
|
522
|
+
incrementButton: "btn btn-sm"
|
|
493
523
|
}
|
|
494
|
-
},
|
|
524
|
+
}, Je = {
|
|
495
525
|
// More PassThrough options in component file.
|
|
496
526
|
progressbar: {
|
|
497
527
|
root: () => ({
|
|
@@ -504,7 +534,7 @@ const ze = {
|
|
|
504
534
|
class: ["text-white"]
|
|
505
535
|
})
|
|
506
536
|
}
|
|
507
|
-
},
|
|
537
|
+
}, Xe = {
|
|
508
538
|
dataTable: {
|
|
509
539
|
table: (e) => ({
|
|
510
540
|
class: [
|
|
@@ -568,7 +598,7 @@ const ze = {
|
|
|
568
598
|
]
|
|
569
599
|
})
|
|
570
600
|
}
|
|
571
|
-
},
|
|
601
|
+
}, Qe = {
|
|
572
602
|
badge: {
|
|
573
603
|
root: ({ props: e }) => ({
|
|
574
604
|
class: [
|
|
@@ -589,7 +619,7 @@ const ze = {
|
|
|
589
619
|
]
|
|
590
620
|
})
|
|
591
621
|
}
|
|
592
|
-
},
|
|
622
|
+
}, et = {
|
|
593
623
|
// More PassThrough options in component file.
|
|
594
624
|
menubar: {
|
|
595
625
|
menu: ({ instance: e }) => ({
|
|
@@ -659,7 +689,7 @@ const ze = {
|
|
|
659
689
|
]
|
|
660
690
|
})
|
|
661
691
|
}
|
|
662
|
-
},
|
|
692
|
+
}, tt = {
|
|
663
693
|
tooltip: {
|
|
664
694
|
root: ({ context: e }) => ({
|
|
665
695
|
class: [
|
|
@@ -681,7 +711,7 @@ const ze = {
|
|
|
681
711
|
class: ["tooltip-inner"]
|
|
682
712
|
}
|
|
683
713
|
}
|
|
684
|
-
},
|
|
714
|
+
}, at = {
|
|
685
715
|
selectbutton: {
|
|
686
716
|
root: () => ({
|
|
687
717
|
class: ["btn-group"]
|
|
@@ -699,7 +729,7 @@ const ze = {
|
|
|
699
729
|
]
|
|
700
730
|
})
|
|
701
731
|
}
|
|
702
|
-
},
|
|
732
|
+
}, lt = {
|
|
703
733
|
progressspinner: {
|
|
704
734
|
spinner: () => ({
|
|
705
735
|
class: [
|
|
@@ -707,7 +737,7 @@ const ze = {
|
|
|
707
737
|
]
|
|
708
738
|
})
|
|
709
739
|
}
|
|
710
|
-
},
|
|
740
|
+
}, ot = {
|
|
711
741
|
card: {
|
|
712
742
|
root: () => ({
|
|
713
743
|
class: ["card"]
|
|
@@ -731,11 +761,11 @@ const ze = {
|
|
|
731
761
|
class: ["card-header"]
|
|
732
762
|
})
|
|
733
763
|
}
|
|
734
|
-
},
|
|
764
|
+
}, nt = {
|
|
735
765
|
divider: {
|
|
736
766
|
root: "border-bottom m-4 w-100"
|
|
737
767
|
}
|
|
738
|
-
},
|
|
768
|
+
}, st = {
|
|
739
769
|
image: {
|
|
740
770
|
root: "position-relative d-inline-block",
|
|
741
771
|
button: "preview-button",
|
|
@@ -748,7 +778,7 @@ const ze = {
|
|
|
748
778
|
zoominbutton: "btn text-white",
|
|
749
779
|
closebutton: "btn text-white"
|
|
750
780
|
}
|
|
751
|
-
},
|
|
781
|
+
}, it = {
|
|
752
782
|
toast: {
|
|
753
783
|
message: () => ({
|
|
754
784
|
class: ["toast-container w-100 position-relative"]
|
|
@@ -772,51 +802,51 @@ const ze = {
|
|
|
772
802
|
class: ["ps-1"]
|
|
773
803
|
}),
|
|
774
804
|
icon: ({ props: e }) => {
|
|
775
|
-
var t,
|
|
805
|
+
var t, n, a, l;
|
|
776
806
|
return {
|
|
777
807
|
class: [
|
|
778
808
|
"toast-icon",
|
|
779
809
|
{
|
|
780
810
|
"text-primary": ((t = e.message) == null ? void 0 : t.severity) === "info",
|
|
781
|
-
"text-success": ((
|
|
811
|
+
"text-success": ((n = e.message) == null ? void 0 : n.severity) === "success",
|
|
782
812
|
"text-danger": ((a = e.message) == null ? void 0 : a.severity) === "error",
|
|
783
|
-
"text-warning": ((
|
|
813
|
+
"text-warning": ((l = e.message) == null ? void 0 : l.severity) === "warn"
|
|
784
814
|
}
|
|
785
815
|
]
|
|
786
816
|
};
|
|
787
817
|
}
|
|
788
818
|
}
|
|
789
|
-
},
|
|
790
|
-
...
|
|
791
|
-
...ze,
|
|
792
|
-
...et,
|
|
793
|
-
...Me,
|
|
794
|
-
...Ee,
|
|
795
|
-
...Oe,
|
|
796
|
-
...Ge,
|
|
797
|
-
...Re,
|
|
798
|
-
...tt,
|
|
799
|
-
...se,
|
|
800
|
-
...at,
|
|
819
|
+
}, rl = {
|
|
820
|
+
...Qe,
|
|
801
821
|
...Ue,
|
|
802
|
-
...
|
|
822
|
+
...ot,
|
|
803
823
|
...Ae,
|
|
804
|
-
...
|
|
805
|
-
...
|
|
824
|
+
...He,
|
|
825
|
+
...Ne,
|
|
826
|
+
...Ze,
|
|
806
827
|
...Ye,
|
|
828
|
+
...nt,
|
|
829
|
+
...re,
|
|
830
|
+
...st,
|
|
831
|
+
...Ee,
|
|
832
|
+
...Re,
|
|
807
833
|
...Le,
|
|
834
|
+
...Ge,
|
|
835
|
+
...re,
|
|
836
|
+
...et,
|
|
837
|
+
...qe,
|
|
838
|
+
...Je,
|
|
839
|
+
...lt,
|
|
840
|
+
...at,
|
|
808
841
|
...Ke,
|
|
809
|
-
...Qe,
|
|
810
842
|
...Xe,
|
|
811
|
-
...He,
|
|
812
843
|
...We,
|
|
813
|
-
...
|
|
814
|
-
...
|
|
815
|
-
...Ne,
|
|
844
|
+
...it,
|
|
845
|
+
...je,
|
|
816
846
|
directives: {
|
|
817
|
-
...
|
|
847
|
+
...tt
|
|
818
848
|
}
|
|
819
|
-
},
|
|
849
|
+
}, ae = /* @__PURE__ */ $({
|
|
820
850
|
__name: "ForgeAlert",
|
|
821
851
|
props: {
|
|
822
852
|
severity: { default: "primary" },
|
|
@@ -832,14 +862,14 @@ const ze = {
|
|
|
832
862
|
},
|
|
833
863
|
setup(e) {
|
|
834
864
|
const t = e;
|
|
835
|
-
return (
|
|
836
|
-
const
|
|
837
|
-
return s(), w(
|
|
865
|
+
return (n, a) => {
|
|
866
|
+
const l = fe;
|
|
867
|
+
return s(), w(l, Q(ee({ ...n.$attrs, ...t })), {
|
|
838
868
|
messageicon: v(() => [
|
|
839
|
-
|
|
869
|
+
m("div", {
|
|
840
870
|
class: B(t.icon ? "me-2 pe-1" : "")
|
|
841
871
|
}, [
|
|
842
|
-
t.icon ? (s(), w(
|
|
872
|
+
t.icon ? (s(), w(c(S), {
|
|
843
873
|
key: 0,
|
|
844
874
|
"data-cy": "message-icon",
|
|
845
875
|
icon: t.icon,
|
|
@@ -849,16 +879,16 @@ const ze = {
|
|
|
849
879
|
], 2)
|
|
850
880
|
]),
|
|
851
881
|
closeicon: v(() => [
|
|
852
|
-
|
|
882
|
+
y(c(S), { icon: "bi:x" })
|
|
853
883
|
]),
|
|
854
884
|
default: v(() => [
|
|
855
|
-
k(
|
|
885
|
+
k(n.$slots, "default")
|
|
856
886
|
]),
|
|
857
887
|
_: 3
|
|
858
888
|
}, 16);
|
|
859
889
|
};
|
|
860
890
|
}
|
|
861
|
-
}),
|
|
891
|
+
}), dl = /* @__PURE__ */ $({
|
|
862
892
|
__name: "ForgeActionButton",
|
|
863
893
|
props: {
|
|
864
894
|
action: {},
|
|
@@ -867,31 +897,31 @@ const ze = {
|
|
|
867
897
|
params: { default: Array }
|
|
868
898
|
},
|
|
869
899
|
setup(e) {
|
|
870
|
-
const t =
|
|
900
|
+
const t = T(!1), n = e, a = async () => {
|
|
871
901
|
t.value = !0;
|
|
872
902
|
try {
|
|
873
|
-
await
|
|
874
|
-
} catch (
|
|
875
|
-
await
|
|
903
|
+
await n.action.apply(this, n.params);
|
|
904
|
+
} catch (l) {
|
|
905
|
+
await n.errorAction.apply(this, n.errorParams ? [...n.errorParams, l] : [l]);
|
|
876
906
|
}
|
|
877
907
|
t.value = !1;
|
|
878
908
|
};
|
|
879
|
-
return (
|
|
880
|
-
const
|
|
881
|
-
return s(), p(
|
|
882
|
-
|
|
909
|
+
return (l, o) => {
|
|
910
|
+
const r = E;
|
|
911
|
+
return s(), p(D, null, [
|
|
912
|
+
y(r, C({ ...n, ...l.$attrs }, {
|
|
883
913
|
loading: t.value,
|
|
884
|
-
disabled: t.value ||
|
|
914
|
+
disabled: t.value || n.disabled,
|
|
885
915
|
onClick: a
|
|
886
916
|
}), null, 16, ["loading", "disabled"]),
|
|
887
|
-
|
|
917
|
+
y(c(we))
|
|
888
918
|
], 64);
|
|
889
919
|
};
|
|
890
920
|
}
|
|
891
|
-
}),
|
|
921
|
+
}), rt = {
|
|
892
922
|
class: "d-flex",
|
|
893
923
|
"data-cy": "checkbox-container"
|
|
894
|
-
},
|
|
924
|
+
}, dt = /* @__PURE__ */ m("div", null, null, -1), ut = ["for"], me = /* @__PURE__ */ $({
|
|
895
925
|
__name: "ForgeCheckbox",
|
|
896
926
|
props: {
|
|
897
927
|
label: { default: "" },
|
|
@@ -919,66 +949,72 @@ const ze = {
|
|
|
919
949
|
},
|
|
920
950
|
emits: ["update:modelValue"],
|
|
921
951
|
setup(e, { emit: t }) {
|
|
922
|
-
const
|
|
952
|
+
const n = t, a = e, { checked: l, handleChange: o, setValue: r, errors: u, errorMessage: b } = W(() => a.name ?? a.label, a.rules, {
|
|
923
953
|
type: "checkbox",
|
|
924
|
-
checkedValue: !0
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
954
|
+
checkedValue: !0
|
|
955
|
+
}), d = (i) => {
|
|
956
|
+
a.disabled || (o(i), n("update:modelValue", !a.modelValue));
|
|
957
|
+
};
|
|
958
|
+
oe(() => {
|
|
959
|
+
a.value !== void 0 && a.value !== (l == null ? void 0 : l.value) ? r(a.value) : a.modelValue !== void 0 && a.modelValue !== (l == null ? void 0 : l.value) && r(a.modelValue);
|
|
960
|
+
});
|
|
961
|
+
const f = x(() => u.value.length > 0);
|
|
962
|
+
return ge(() => a.value, (i) => {
|
|
963
|
+
i !== (l == null ? void 0 : l.value) && r(i);
|
|
964
|
+
}), (i, h) => {
|
|
965
|
+
const _ = xe;
|
|
966
|
+
return s(), p(D, null, [
|
|
967
|
+
m("div", rt, [
|
|
968
|
+
y(_, C({
|
|
934
969
|
id: a.name
|
|
935
|
-
}, { ...
|
|
936
|
-
|
|
937
|
-
"
|
|
938
|
-
|
|
970
|
+
}, { ...i.$attrs, ...a }, {
|
|
971
|
+
modelValue: c(l),
|
|
972
|
+
"onUpdate:modelValue": h[0] || (h[0] = (V) => H(l) ? l.value = V : null),
|
|
973
|
+
"input-class": { "is-invalid": f.value },
|
|
974
|
+
onChange: d
|
|
939
975
|
}), {
|
|
940
976
|
icon: v(() => [
|
|
941
|
-
|
|
977
|
+
dt
|
|
942
978
|
]),
|
|
943
979
|
_: 1
|
|
944
|
-
}, 16, ["id", "
|
|
945
|
-
|
|
980
|
+
}, 16, ["id", "modelValue", "input-class"]),
|
|
981
|
+
m("label", {
|
|
946
982
|
for: a.name,
|
|
947
983
|
class: B(`${a.disabled ? "opacity-50" : "cursor-pointer"}`),
|
|
948
|
-
onClick:
|
|
984
|
+
onClick: d
|
|
949
985
|
}, [
|
|
950
|
-
k(
|
|
951
|
-
|
|
986
|
+
k(i.$slots, "default", {}, () => [
|
|
987
|
+
P(g(a.label), 1)
|
|
952
988
|
])
|
|
953
|
-
], 10,
|
|
989
|
+
], 10, ut)
|
|
954
990
|
]),
|
|
955
|
-
|
|
991
|
+
L(m("small", {
|
|
956
992
|
"data-cy": "error",
|
|
957
993
|
class: "text-invalid"
|
|
958
|
-
}, g(
|
|
959
|
-
[
|
|
994
|
+
}, g(c(b)), 513), [
|
|
995
|
+
[Y, f.value]
|
|
960
996
|
])
|
|
961
997
|
], 64);
|
|
962
998
|
};
|
|
963
999
|
}
|
|
964
|
-
}),
|
|
1000
|
+
}), ct = { class: "forge-loader" }, pe = /* @__PURE__ */ $({
|
|
965
1001
|
__name: "ForgeLoader",
|
|
966
1002
|
props: {
|
|
967
1003
|
severity: { default: "primary" }
|
|
968
1004
|
},
|
|
969
1005
|
setup(e) {
|
|
970
1006
|
const t = e;
|
|
971
|
-
return (
|
|
972
|
-
const
|
|
973
|
-
return s(), p("div",
|
|
974
|
-
|
|
1007
|
+
return (n, a) => {
|
|
1008
|
+
const l = ke;
|
|
1009
|
+
return s(), p("div", ct, [
|
|
1010
|
+
y(l, {
|
|
975
1011
|
"animation-duration": ".75",
|
|
976
1012
|
class: B(`text-${t.severity === void 0 ? "primary" : t.severity}`)
|
|
977
1013
|
}, null, 8, ["class"])
|
|
978
1014
|
]);
|
|
979
1015
|
};
|
|
980
1016
|
}
|
|
981
|
-
}),
|
|
1017
|
+
}), mt = ["href", "target"], ul = /* @__PURE__ */ $({
|
|
982
1018
|
__name: "ForgeLink",
|
|
983
1019
|
props: {
|
|
984
1020
|
url: {},
|
|
@@ -996,7 +1032,7 @@ const ze = {
|
|
|
996
1032
|
iconName: {}
|
|
997
1033
|
},
|
|
998
1034
|
setup(e) {
|
|
999
|
-
const t =
|
|
1035
|
+
const t = x(() => ({
|
|
1000
1036
|
[`link-${e.severity}`]: e.severity,
|
|
1001
1037
|
[`link-underline-${e.underlineSeverity}`]: e.underlineSeverity,
|
|
1002
1038
|
[`link-opacity-${e.opacity}`]: e.opacity,
|
|
@@ -1005,48 +1041,48 @@ const ze = {
|
|
|
1005
1041
|
[`link-underline-opacity-${e.underlineHoverOpacity ?? e.hoverOpacity}-hover`]: e.underlineHoverOpacity || e.hoverOpacity,
|
|
1006
1042
|
[`link-offset-${e.underlineOffset}`]: e.underlineOffset,
|
|
1007
1043
|
"icon-link icon-link-hover": e.animateIconOnHover
|
|
1008
|
-
})),
|
|
1044
|
+
})), n = x(() => ({
|
|
1009
1045
|
"order-2": e.positionIconEnd,
|
|
1010
1046
|
"me-1": !e.positionIconEnd && !e.animateIconOnHover,
|
|
1011
1047
|
"ms-1": e.positionIconEnd && !e.animateIconOnHover,
|
|
1012
1048
|
"ms-0": e.positionIconEnd && e.animateIconOnHover,
|
|
1013
1049
|
"me-0": e.animateIconOnHover
|
|
1014
1050
|
}));
|
|
1015
|
-
return (a,
|
|
1051
|
+
return (a, l) => (s(), p("a", {
|
|
1016
1052
|
id: "link",
|
|
1017
1053
|
class: B(["cursor-pointer d-flex", t.value]),
|
|
1018
1054
|
href: a.url,
|
|
1019
1055
|
target: a.target
|
|
1020
1056
|
}, [
|
|
1021
1057
|
k(a.$slots, "default", {}, () => [
|
|
1022
|
-
a.iconName ? (s(), w(
|
|
1058
|
+
a.iconName ? (s(), w(c(S), {
|
|
1023
1059
|
key: 0,
|
|
1024
1060
|
id: "link-icon",
|
|
1025
1061
|
icon: a.iconName,
|
|
1026
|
-
class: B(["bi my-auto",
|
|
1062
|
+
class: B(["bi my-auto", n.value])
|
|
1027
1063
|
}, null, 8, ["icon", "class"])) : F("", !0),
|
|
1028
|
-
|
|
1064
|
+
P(" " + g(a.label), 1)
|
|
1029
1065
|
])
|
|
1030
|
-
], 10,
|
|
1066
|
+
], 10, mt));
|
|
1031
1067
|
}
|
|
1032
1068
|
});
|
|
1033
|
-
function
|
|
1069
|
+
function pt(e) {
|
|
1034
1070
|
const t = {
|
|
1035
1071
|
errorMessage: "",
|
|
1036
1072
|
errorDetails: []
|
|
1037
1073
|
};
|
|
1038
1074
|
if (e.exception && (t.errorMessage = e.exception), e.message && (Array.isArray(e.message) ? t.errorDetails = e.message : t.errorMessage = e.message), e.response) {
|
|
1039
|
-
const
|
|
1040
|
-
|
|
1075
|
+
const n = JSON.parse(e.response);
|
|
1076
|
+
n.errors && (t.errorDetails = Object.values(n.errors).flat()), n.message && (t.errorDetails = n.message);
|
|
1041
1077
|
}
|
|
1042
1078
|
return t.errorMessage === "" && t.errorDetails.length === 0 && (t.errorMessage = e), t;
|
|
1043
1079
|
}
|
|
1044
|
-
const
|
|
1080
|
+
const yt = { key: 0 }, vt = {
|
|
1045
1081
|
class: "d-flex w-100",
|
|
1046
1082
|
"data-cy": "footer"
|
|
1047
|
-
},
|
|
1083
|
+
}, cl = /* @__PURE__ */ $({
|
|
1048
1084
|
__name: "ForgeModal",
|
|
1049
|
-
props: /* @__PURE__ */
|
|
1085
|
+
props: /* @__PURE__ */ q({
|
|
1050
1086
|
cancelText: { default: "Cancel" },
|
|
1051
1087
|
submitText: { default: "Submit" },
|
|
1052
1088
|
showFooter: { type: Boolean, default: !0 },
|
|
@@ -1087,102 +1123,102 @@ const ct = { key: 0 }, mt = {
|
|
|
1087
1123
|
}),
|
|
1088
1124
|
emits: ["update:visible"],
|
|
1089
1125
|
setup(e) {
|
|
1090
|
-
const t =
|
|
1126
|
+
const t = R(e, "visible"), n = T(!1), a = e, l = T(!1), o = T({
|
|
1091
1127
|
hasError: !1,
|
|
1092
1128
|
header: "",
|
|
1093
1129
|
message: []
|
|
1094
|
-
}),
|
|
1095
|
-
|
|
1096
|
-
},
|
|
1097
|
-
|
|
1098
|
-
},
|
|
1130
|
+
}), r = () => {
|
|
1131
|
+
n.value = !1;
|
|
1132
|
+
}, u = () => {
|
|
1133
|
+
n.value = !0;
|
|
1134
|
+
}, b = () => {
|
|
1099
1135
|
t.value = !1;
|
|
1100
|
-
},
|
|
1136
|
+
}, d = async () => {
|
|
1101
1137
|
if (a.onConfirm) {
|
|
1102
|
-
|
|
1138
|
+
l.value = !0, o.value.hasError = !1;
|
|
1103
1139
|
try {
|
|
1104
|
-
const
|
|
1105
|
-
(
|
|
1106
|
-
} catch (
|
|
1107
|
-
|
|
1108
|
-
const
|
|
1109
|
-
|
|
1140
|
+
const i = await a.onConfirm();
|
|
1141
|
+
(i || i == null) && b();
|
|
1142
|
+
} catch (i) {
|
|
1143
|
+
o.value.hasError = !0;
|
|
1144
|
+
const h = pt(i);
|
|
1145
|
+
o.value.header = h.errorMessage, o.value.message = h.errorDetails;
|
|
1110
1146
|
}
|
|
1111
|
-
|
|
1147
|
+
l.value = !1;
|
|
1112
1148
|
}
|
|
1113
|
-
},
|
|
1149
|
+
}, f = x(() => ({
|
|
1114
1150
|
root: [
|
|
1115
1151
|
"modal modal-dialog modal-content h-auto m-0",
|
|
1116
1152
|
{
|
|
1117
|
-
"mw-100 vh-100 vw-100 top-0 start-0":
|
|
1153
|
+
"mw-100 vh-100 vw-100 top-0 start-0": n.value
|
|
1118
1154
|
}
|
|
1119
1155
|
]
|
|
1120
1156
|
}));
|
|
1121
|
-
return (
|
|
1122
|
-
const
|
|
1123
|
-
return s(), w(
|
|
1124
|
-
onMaximize:
|
|
1125
|
-
onUnmaximize:
|
|
1126
|
-
pt:
|
|
1127
|
-
}),
|
|
1157
|
+
return (i, h) => {
|
|
1158
|
+
const _ = E, V = _e;
|
|
1159
|
+
return s(), w(V, C(a, {
|
|
1160
|
+
onMaximize: u,
|
|
1161
|
+
onUnmaximize: r,
|
|
1162
|
+
pt: f.value
|
|
1163
|
+
}), te({
|
|
1128
1164
|
closeicon: v(() => [
|
|
1129
|
-
|
|
1165
|
+
y(c(S), {
|
|
1130
1166
|
"data-cy": "close-icon",
|
|
1131
1167
|
icon: "bi:x-lg",
|
|
1132
1168
|
width: "18",
|
|
1133
1169
|
height: "18",
|
|
1134
|
-
onClick:
|
|
1170
|
+
onClick: b
|
|
1135
1171
|
})
|
|
1136
1172
|
]),
|
|
1137
1173
|
maximizeicon: v(() => [
|
|
1138
|
-
|
|
1174
|
+
y(c(S), {
|
|
1139
1175
|
"data-cy": "maximisable-icon",
|
|
1140
|
-
icon:
|
|
1176
|
+
icon: n.value ? "bi:arrows-angle-contract" : "bi:arrows-angle-expand",
|
|
1141
1177
|
width: "16",
|
|
1142
1178
|
height: "16"
|
|
1143
1179
|
}, null, 8, ["icon"])
|
|
1144
1180
|
]),
|
|
1145
1181
|
_: 2
|
|
1146
1182
|
}, [
|
|
1147
|
-
|
|
1148
|
-
name:
|
|
1183
|
+
j(i.$slots, (M, I) => ({
|
|
1184
|
+
name: I,
|
|
1149
1185
|
fn: v((z) => [
|
|
1150
|
-
|
|
1186
|
+
o.value.hasError ? (s(), w(ae, {
|
|
1151
1187
|
key: 0,
|
|
1152
1188
|
severity: "danger",
|
|
1153
1189
|
"data-cy": "error"
|
|
1154
1190
|
}, {
|
|
1155
1191
|
default: v(() => [
|
|
1156
|
-
|
|
1157
|
-
class: B(
|
|
1158
|
-
}, g(
|
|
1159
|
-
|
|
1160
|
-
(s(!0), p(
|
|
1192
|
+
m("p", {
|
|
1193
|
+
class: B(o.value.message.length > 0 ? "my-auto" : "mb-0")
|
|
1194
|
+
}, g(o.value.header), 3),
|
|
1195
|
+
o.value.message.length > 0 ? (s(), p("ul", yt, [
|
|
1196
|
+
(s(!0), p(D, null, j(o.value.message, (N) => (s(), p("li", { key: N }, g(N), 1))), 128))
|
|
1161
1197
|
])) : F("", !0)
|
|
1162
1198
|
]),
|
|
1163
1199
|
_: 1
|
|
1164
1200
|
})) : F("", !0),
|
|
1165
|
-
k(
|
|
1166
|
-
|
|
1167
|
-
|
|
1201
|
+
k(i.$slots, I, Q(ee(z || {}))),
|
|
1202
|
+
l.value ? k(i.$slots, "loader", { key: 1 }, () => [
|
|
1203
|
+
y(pe, { "data-cy": "loader" })
|
|
1168
1204
|
]) : F("", !0)
|
|
1169
1205
|
])
|
|
1170
1206
|
})),
|
|
1171
|
-
|
|
1207
|
+
i.showFooter ? {
|
|
1172
1208
|
name: "footer",
|
|
1173
1209
|
fn: v(() => [
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
label:
|
|
1210
|
+
m("div", vt, [
|
|
1211
|
+
y(_, {
|
|
1212
|
+
label: i.cancelText,
|
|
1177
1213
|
class: B(a.cancelClass),
|
|
1178
1214
|
outlined: "",
|
|
1179
|
-
onClick:
|
|
1215
|
+
onClick: b,
|
|
1180
1216
|
id: "cancel-button"
|
|
1181
1217
|
}, null, 8, ["label", "class"]),
|
|
1182
|
-
|
|
1183
|
-
label:
|
|
1218
|
+
y(_, {
|
|
1219
|
+
label: i.submitText,
|
|
1184
1220
|
class: B([a.submitClass, "ms-auto"]),
|
|
1185
|
-
onClick:
|
|
1221
|
+
onClick: d,
|
|
1186
1222
|
id: "submit-button"
|
|
1187
1223
|
}, null, 8, ["label", "class"])
|
|
1188
1224
|
])
|
|
@@ -1192,9 +1228,9 @@ const ct = { key: 0 }, mt = {
|
|
|
1192
1228
|
]), 1040, ["pt"]);
|
|
1193
1229
|
};
|
|
1194
1230
|
}
|
|
1195
|
-
}),
|
|
1231
|
+
}), bt = ["id"], ft = { key: 0 }, gt = { key: 0 }, ht = { class: "d-flex justify-content-between align-items-center position-relative" }, wt = { key: 1 }, xt = { "data-cy": "readonly-value" }, kt = /* @__PURE__ */ $({
|
|
1196
1232
|
__name: "ForgeInlineEditor",
|
|
1197
|
-
props: /* @__PURE__ */
|
|
1233
|
+
props: /* @__PURE__ */ q({
|
|
1198
1234
|
name: { default: "" },
|
|
1199
1235
|
rules: {},
|
|
1200
1236
|
completeAction: {},
|
|
@@ -1208,13 +1244,13 @@ const ct = { key: 0 }, mt = {
|
|
|
1208
1244
|
}),
|
|
1209
1245
|
emits: ["update:modelValue"],
|
|
1210
1246
|
setup(e) {
|
|
1211
|
-
const t = e,
|
|
1212
|
-
var
|
|
1213
|
-
a.value = !a.value, (
|
|
1214
|
-
},
|
|
1215
|
-
if (
|
|
1247
|
+
const t = e, n = R(e, "modelValue"), a = T(!1), l = T(), o = () => {
|
|
1248
|
+
var _;
|
|
1249
|
+
a.value = !a.value, (_ = l.value) == null || _.focus();
|
|
1250
|
+
}, r = async () => {
|
|
1251
|
+
if (h.value)
|
|
1216
1252
|
return !1;
|
|
1217
|
-
if (
|
|
1253
|
+
if (n.value = i.value, t.completeAction)
|
|
1218
1254
|
try {
|
|
1219
1255
|
await t.completeAction.apply(this, t.params), a.value = !a.value;
|
|
1220
1256
|
} catch {
|
|
@@ -1222,95 +1258,95 @@ const ct = { key: 0 }, mt = {
|
|
|
1222
1258
|
}
|
|
1223
1259
|
else
|
|
1224
1260
|
a.value = !a.value;
|
|
1225
|
-
},
|
|
1261
|
+
}, u = () => {
|
|
1226
1262
|
a.value = !a.value;
|
|
1227
|
-
},
|
|
1228
|
-
|
|
1229
|
-
}, { errorMessage:
|
|
1230
|
-
|
|
1231
|
-
|
|
1263
|
+
}, b = () => {
|
|
1264
|
+
i.value = null;
|
|
1265
|
+
}, { errorMessage: d, errors: f, value: i } = W(() => t.name, t.rules);
|
|
1266
|
+
oe(() => {
|
|
1267
|
+
i.value = n.value;
|
|
1232
1268
|
});
|
|
1233
|
-
const
|
|
1234
|
-
return (
|
|
1235
|
-
const
|
|
1269
|
+
const h = x(() => f.value.length > 0);
|
|
1270
|
+
return (_, V) => {
|
|
1271
|
+
const M = ne, I = E;
|
|
1236
1272
|
return s(), p("div", {
|
|
1237
1273
|
id: t.name
|
|
1238
1274
|
}, [
|
|
1239
|
-
|
|
1240
|
-
k(
|
|
1241
|
-
|
|
1275
|
+
_.readonly ? (s(), p("div", wt, [
|
|
1276
|
+
k(_.$slots, "default", {}, () => [
|
|
1277
|
+
m("span", xt, g(c(i)), 1)
|
|
1242
1278
|
])
|
|
1243
|
-
])) : (s(), p("div",
|
|
1244
|
-
a.value ? (s(), p("div",
|
|
1245
|
-
|
|
1246
|
-
k(
|
|
1247
|
-
class: B({ "is-invalid":
|
|
1248
|
-
editFinished:
|
|
1249
|
-
cancel:
|
|
1250
|
-
val:
|
|
1279
|
+
])) : (s(), p("div", ft, [
|
|
1280
|
+
a.value ? (s(), p("div", gt, [
|
|
1281
|
+
L((s(), p("div", ht, [
|
|
1282
|
+
k(_.$slots, "editor", {
|
|
1283
|
+
class: B({ "is-invalid": h.value }),
|
|
1284
|
+
editFinished: r,
|
|
1285
|
+
cancel: u,
|
|
1286
|
+
val: c(i)
|
|
1251
1287
|
}, () => [
|
|
1252
|
-
|
|
1288
|
+
y(M, {
|
|
1253
1289
|
"data-cy": "input",
|
|
1254
1290
|
ref_key: "input",
|
|
1255
|
-
ref:
|
|
1256
|
-
modelValue:
|
|
1257
|
-
"onUpdate:modelValue":
|
|
1291
|
+
ref: l,
|
|
1292
|
+
modelValue: c(i),
|
|
1293
|
+
"onUpdate:modelValue": V[0] || (V[0] = (z) => H(i) ? i.value = z : null),
|
|
1258
1294
|
modelModifiers: { trim: !0 },
|
|
1259
|
-
class: B({ "is-invalid":
|
|
1295
|
+
class: B({ "is-invalid": h.value }),
|
|
1260
1296
|
onKeydown: [
|
|
1261
|
-
|
|
1262
|
-
|
|
1297
|
+
J(r, ["enter"]),
|
|
1298
|
+
J(u, ["esc"])
|
|
1263
1299
|
]
|
|
1264
1300
|
}, null, 8, ["modelValue", "class"])
|
|
1265
1301
|
]),
|
|
1266
|
-
|
|
1302
|
+
y(c(S), {
|
|
1267
1303
|
icon: "bi:x-circle",
|
|
1268
1304
|
class: "mx-2 cursor-pointer",
|
|
1269
|
-
onClick:
|
|
1270
|
-
onKeydown:
|
|
1305
|
+
onClick: b,
|
|
1306
|
+
onKeydown: J(b, ["enter"]),
|
|
1271
1307
|
"data-cy": "clear-icon"
|
|
1272
1308
|
})
|
|
1273
1309
|
])), [
|
|
1274
|
-
[
|
|
1310
|
+
[c($e), r]
|
|
1275
1311
|
])
|
|
1276
1312
|
])) : (s(), p("div", {
|
|
1277
1313
|
key: 1,
|
|
1278
1314
|
class: "d-flex text-muted",
|
|
1279
|
-
onClick:
|
|
1280
|
-
onFocus:
|
|
1315
|
+
onClick: o,
|
|
1316
|
+
onFocus: o
|
|
1281
1317
|
}, [
|
|
1282
|
-
k(
|
|
1283
|
-
|
|
1284
|
-
class: B(["pe-2 cursor-pointer", { "text-invalid":
|
|
1318
|
+
k(_.$slots, "default", {}, () => [
|
|
1319
|
+
m("div", {
|
|
1320
|
+
class: B(["pe-2 cursor-pointer", { "text-invalid": h.value }]),
|
|
1285
1321
|
"data-cy": "value"
|
|
1286
|
-
}, g(
|
|
1322
|
+
}, g(c(i) ? c(i) : "Click to edit"), 3)
|
|
1287
1323
|
]),
|
|
1288
|
-
|
|
1324
|
+
y(I, {
|
|
1289
1325
|
link: "",
|
|
1290
1326
|
class: "p-0 m-0"
|
|
1291
1327
|
}, {
|
|
1292
1328
|
default: v(() => [
|
|
1293
|
-
|
|
1329
|
+
y(c(S), {
|
|
1294
1330
|
icon: "bi:pencil",
|
|
1295
|
-
class: B(
|
|
1331
|
+
class: B(h.value ? "text-invalid" : "text-muted"),
|
|
1296
1332
|
"data-cy": "edit-icon",
|
|
1297
|
-
onKeydown:
|
|
1333
|
+
onKeydown: J(o, ["enter"])
|
|
1298
1334
|
}, null, 8, ["class"])
|
|
1299
1335
|
]),
|
|
1300
1336
|
_: 1
|
|
1301
1337
|
})
|
|
1302
1338
|
], 32))
|
|
1303
1339
|
])),
|
|
1304
|
-
|
|
1340
|
+
L(m("small", {
|
|
1305
1341
|
"data-cy": "error",
|
|
1306
1342
|
class: "text-invalid"
|
|
1307
|
-
}, g(
|
|
1308
|
-
[
|
|
1343
|
+
}, g(c(d)), 513), [
|
|
1344
|
+
[Y, h.value]
|
|
1309
1345
|
])
|
|
1310
|
-
], 8,
|
|
1346
|
+
], 8, bt);
|
|
1311
1347
|
};
|
|
1312
1348
|
}
|
|
1313
|
-
}),
|
|
1349
|
+
}), _t = ["href"], ml = /* @__PURE__ */ $({
|
|
1314
1350
|
__name: "ForgeNavbar",
|
|
1315
1351
|
props: {
|
|
1316
1352
|
severity: { default: "light" },
|
|
@@ -1327,7 +1363,7 @@ const ct = { key: 0 }, mt = {
|
|
|
1327
1363
|
unstyled: { type: Boolean }
|
|
1328
1364
|
},
|
|
1329
1365
|
setup(e) {
|
|
1330
|
-
const t = e,
|
|
1366
|
+
const t = e, n = x(() => ({
|
|
1331
1367
|
root: () => ({
|
|
1332
1368
|
class: [
|
|
1333
1369
|
"navbar container-fluid navbar-expand-lg",
|
|
@@ -1354,26 +1390,26 @@ const ct = { key: 0 }, mt = {
|
|
|
1354
1390
|
]
|
|
1355
1391
|
})
|
|
1356
1392
|
}));
|
|
1357
|
-
return (a,
|
|
1358
|
-
const
|
|
1359
|
-
return s(), w(
|
|
1360
|
-
pt:
|
|
1393
|
+
return (a, l) => {
|
|
1394
|
+
const o = Fe;
|
|
1395
|
+
return s(), w(o, C({ ...t, ...a.$attrs }, {
|
|
1396
|
+
pt: n.value,
|
|
1361
1397
|
"data-cy": "navbar"
|
|
1362
|
-
}),
|
|
1398
|
+
}), te({
|
|
1363
1399
|
start: v(() => [
|
|
1364
|
-
|
|
1400
|
+
m("a", {
|
|
1365
1401
|
href: a.logoUrl,
|
|
1366
1402
|
class: "navbar-brand ms-3",
|
|
1367
1403
|
"data-cy": "logo"
|
|
1368
1404
|
}, [
|
|
1369
1405
|
k(a.$slots, "logo", {}, () => [
|
|
1370
|
-
|
|
1406
|
+
P(" Logo ")
|
|
1371
1407
|
])
|
|
1372
|
-
], 8,
|
|
1408
|
+
], 8, _t)
|
|
1373
1409
|
]),
|
|
1374
1410
|
menubuttonicon: v(() => [
|
|
1375
1411
|
k(a.$slots, "menubuttonicon", {}, () => [
|
|
1376
|
-
|
|
1412
|
+
y(c(S), {
|
|
1377
1413
|
icon: "bi:list",
|
|
1378
1414
|
class: B(t.severity === "light" ? "text-black" : "text-white"),
|
|
1379
1415
|
height: "24",
|
|
@@ -1383,16 +1419,16 @@ const ct = { key: 0 }, mt = {
|
|
|
1383
1419
|
]),
|
|
1384
1420
|
_: 2
|
|
1385
1421
|
}, [
|
|
1386
|
-
|
|
1387
|
-
name:
|
|
1388
|
-
fn: v((
|
|
1389
|
-
k(a.$slots,
|
|
1422
|
+
j(a.$slots, (r, u) => ({
|
|
1423
|
+
name: u,
|
|
1424
|
+
fn: v((b) => [
|
|
1425
|
+
k(a.$slots, u, Q(ee(b)))
|
|
1390
1426
|
])
|
|
1391
1427
|
}))
|
|
1392
1428
|
]), 1040, ["pt"]);
|
|
1393
1429
|
};
|
|
1394
1430
|
}
|
|
1395
|
-
}),
|
|
1431
|
+
}), $t = /* @__PURE__ */ m("div", { class: "ps-1" }, "Select all", -1), Ft = ["data-cy"], Bt = { class: "ps-1" }, St = { class: "multiselect__tag d-inline-flex" }, Ct = { class: "my-auto" }, Vt = /* @__PURE__ */ $({
|
|
1396
1432
|
__name: "ForgeMultiSelect",
|
|
1397
1433
|
props: {
|
|
1398
1434
|
severity: { default: "primary" },
|
|
@@ -1405,119 +1441,141 @@ const ct = { key: 0 }, mt = {
|
|
|
1405
1441
|
},
|
|
1406
1442
|
emits: ["update:modelValue"],
|
|
1407
1443
|
setup(e, { emit: t }) {
|
|
1408
|
-
const
|
|
1444
|
+
const n = e, a = (U, O) => {
|
|
1445
|
+
const Z = {
|
|
1446
|
+
...O,
|
|
1447
|
+
$isDisabled: O.$isDisabled ?? !1
|
|
1448
|
+
};
|
|
1449
|
+
U(Z);
|
|
1450
|
+
}, l = de(), o = t, { errors: r, value: u, errorMessage: b } = W(() => n.name, n.rules), d = T(!1), f = x(() => ({
|
|
1409
1451
|
multiple: !0,
|
|
1410
1452
|
label: "label",
|
|
1411
1453
|
trackBy: "id",
|
|
1412
|
-
showPointer: !
|
|
1413
|
-
placeholder: "Select
|
|
1454
|
+
showPointer: !d.value,
|
|
1455
|
+
placeholder: l.searchable === null || l.searchable ? "Search" : "Select",
|
|
1414
1456
|
allowEmpty: !0,
|
|
1415
1457
|
selectValue: "",
|
|
1416
|
-
closeOnSelect: !!(
|
|
1417
|
-
clearOnSelect: !!(
|
|
1418
|
-
searchable: !!(
|
|
1458
|
+
closeOnSelect: !!(l.multiple === null || l.multiple),
|
|
1459
|
+
clearOnSelect: !!(l.multiple === null || l.multiple),
|
|
1460
|
+
searchable: !!(l.searchable === null || l.searchable) && l.modelValue.length === l.options.length,
|
|
1419
1461
|
async: !1,
|
|
1420
|
-
...
|
|
1421
|
-
})),
|
|
1422
|
-
|
|
1423
|
-
},
|
|
1424
|
-
o("update:modelValue",
|
|
1425
|
-
},
|
|
1426
|
-
|
|
1462
|
+
...l
|
|
1463
|
+
})), i = x(() => `forge-multiselect-${n.severity}`), h = x(() => `multiselect__option ${d.value ? " multiselect__option--highlight" : ""} ${_.value ? " multiselect__option--selected" : ""}`), _ = x(() => f.value && !(f.value.multiple || !n.showSelectAll || f.value.async) ? !1 : l.modelValue.length === l.options.length), V = x(() => r.value.length > 0), M = x(() => !!((l.allowEmpty == null || l.allowEmpty) && n.showClearSelection && (f.value.multiple ? l.modelValue.length > 0 : l.modelValue))), I = () => d.value = !0, z = () => d.value = !1, N = () => {
|
|
1464
|
+
u.value = f.value.multiple ? [] : null, o("update:modelValue", u.value);
|
|
1465
|
+
}, le = (U) => {
|
|
1466
|
+
o("update:modelValue", n.selectValue ? U.map((O) => O[n.selectValue]) : U);
|
|
1467
|
+
}, ve = (U) => l.modelValue !== null ? l.modelValue.some((O) => f.value.selectValue ? U[n.selectValue] === O : U.id === O.id && U.label === O.label) : !1, be = () => {
|
|
1468
|
+
_.value ? N() : (u.value = [...l.options], o("update:modelValue", [...l.options]));
|
|
1427
1469
|
};
|
|
1428
|
-
return (U,
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
T.value ? {
|
|
1444
|
-
name: "caret",
|
|
1445
|
-
fn: v(({ toggle: R }) => [
|
|
1446
|
-
b(u(C), {
|
|
1470
|
+
return (U, O) => {
|
|
1471
|
+
const Z = me;
|
|
1472
|
+
return s(), p(D, null, [
|
|
1473
|
+
y(c(Be), C(f.value, {
|
|
1474
|
+
class: [i.value, V.value ? "is-invalid" : ""],
|
|
1475
|
+
"data-cy": "multiselect",
|
|
1476
|
+
"onUpdate:modelValue": [
|
|
1477
|
+
le,
|
|
1478
|
+
O[1] || (O[1] = (A) => H(u) ? u.value = A : null)
|
|
1479
|
+
],
|
|
1480
|
+
modelValue: c(u)
|
|
1481
|
+
}), te({
|
|
1482
|
+
caret: v(({ toggle: A }) => [
|
|
1483
|
+
M.value ? (s(), w(c(S), {
|
|
1484
|
+
key: 0,
|
|
1447
1485
|
icon: "bi:x",
|
|
1448
1486
|
class: "my-auto multiselect__clear-icon",
|
|
1449
|
-
onMousedown:
|
|
1450
|
-
"data-cy": "clear"
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1487
|
+
onMousedown: O[0] || (O[0] = G((K) => N(), ["prevent", "stop"])),
|
|
1488
|
+
"data-cy": "clear",
|
|
1489
|
+
height: "18px",
|
|
1490
|
+
width: "18px"
|
|
1491
|
+
})) : F("", !0),
|
|
1492
|
+
y(c(S), {
|
|
1493
|
+
icon: "bi:chevron-down",
|
|
1494
|
+
onClick: A,
|
|
1495
|
+
class: "multiselect__select"
|
|
1496
|
+
}, null, 8, ["onClick"])
|
|
1456
1497
|
]),
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
}, [
|
|
1469
|
-
c("span", {
|
|
1470
|
-
class: B(`multiselect__option ${d.value}`)
|
|
1471
|
-
}, [
|
|
1472
|
-
c("input", {
|
|
1473
|
-
checked: f.value,
|
|
1474
|
-
name: "selected",
|
|
1475
|
-
type: "checkbox",
|
|
1476
|
-
class: "multiselect__option--checkbox"
|
|
1477
|
-
}, null, 8, _t),
|
|
1478
|
-
xt
|
|
1479
|
-
], 2)
|
|
1480
|
-
], 32)
|
|
1498
|
+
tag: v(({ option: A, remove: K }) => [
|
|
1499
|
+
m("div", St, [
|
|
1500
|
+
m("div", Ct, g(A.label), 1),
|
|
1501
|
+
y(c(S), {
|
|
1502
|
+
icon: "bi:x",
|
|
1503
|
+
class: "my-auto multiselect__tag-icon",
|
|
1504
|
+
onMousedown: G((Oa) => a(K, A), ["prevent", "stop"]),
|
|
1505
|
+
height: "18px",
|
|
1506
|
+
width: "18px"
|
|
1507
|
+
}, null, 8, ["onMousedown"])
|
|
1508
|
+
])
|
|
1481
1509
|
]),
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
r.value.multiple ? {
|
|
1485
|
-
name: "option",
|
|
1486
|
-
fn: v(({ option: R }) => [
|
|
1487
|
-
c("div", {
|
|
1488
|
-
"data-cy": R.label
|
|
1489
|
-
}, [
|
|
1490
|
-
c("input", {
|
|
1491
|
-
checked: te(R),
|
|
1492
|
-
name: "selected",
|
|
1493
|
-
type: "checkbox",
|
|
1494
|
-
class: "multiselect__option--checkbox"
|
|
1495
|
-
}, null, 8, Bt),
|
|
1496
|
-
V(" " + g(R[r.value.label]), 1)
|
|
1497
|
-
], 8, $t)
|
|
1510
|
+
default: v(() => [
|
|
1511
|
+
(s(!0), p(D, null, j(U.$slots, (A, K) => k(U.$slots, K, { slot: K })), 256))
|
|
1498
1512
|
]),
|
|
1499
|
-
|
|
1500
|
-
}
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1513
|
+
_: 2
|
|
1514
|
+
}, [
|
|
1515
|
+
f.value.multiple && U.showSelectAll && !f.value.async ? {
|
|
1516
|
+
name: "beforeList",
|
|
1517
|
+
fn: v(() => [
|
|
1518
|
+
m("li", {
|
|
1519
|
+
class: "multiselect__element",
|
|
1520
|
+
onClick: be,
|
|
1521
|
+
onMouseover: I,
|
|
1522
|
+
onMouseleave: z,
|
|
1523
|
+
"data-cy": "toggle-all"
|
|
1524
|
+
}, [
|
|
1525
|
+
m("span", {
|
|
1526
|
+
class: B(`${h.value}`)
|
|
1527
|
+
}, [
|
|
1528
|
+
y(Z, { value: _.value }, {
|
|
1529
|
+
default: v(() => [
|
|
1530
|
+
$t
|
|
1531
|
+
]),
|
|
1532
|
+
_: 1
|
|
1533
|
+
}, 8, ["value"])
|
|
1534
|
+
], 2)
|
|
1535
|
+
], 32)
|
|
1536
|
+
]),
|
|
1537
|
+
key: "0"
|
|
1538
|
+
} : void 0,
|
|
1539
|
+
f.value.multiple ? {
|
|
1540
|
+
name: "option",
|
|
1541
|
+
fn: v(({ option: A }) => [
|
|
1542
|
+
m("div", {
|
|
1543
|
+
"data-cy": A.label
|
|
1544
|
+
}, [
|
|
1545
|
+
(s(), w(Z, {
|
|
1546
|
+
value: ve(A),
|
|
1547
|
+
key: A
|
|
1548
|
+
}, {
|
|
1549
|
+
default: v(() => [
|
|
1550
|
+
m("div", Bt, g(A[f.value.label]), 1)
|
|
1551
|
+
]),
|
|
1552
|
+
_: 2
|
|
1553
|
+
}, 1032, ["value"]))
|
|
1554
|
+
], 8, Ft)
|
|
1555
|
+
]),
|
|
1556
|
+
key: "1"
|
|
1557
|
+
} : void 0
|
|
1558
|
+
]), 1040, ["class", "modelValue"]),
|
|
1559
|
+
L(m("small", {
|
|
1560
|
+
"data-cy": "error",
|
|
1561
|
+
class: "invalid-feedback"
|
|
1562
|
+
}, g(c(b)), 513), [
|
|
1563
|
+
[Y, V.value]
|
|
1564
|
+
])
|
|
1565
|
+
], 64);
|
|
1566
|
+
};
|
|
1509
1567
|
}
|
|
1510
|
-
}),
|
|
1568
|
+
}), Tt = {
|
|
1511
1569
|
key: 0,
|
|
1512
1570
|
class: "pl-1"
|
|
1513
|
-
},
|
|
1571
|
+
}, Mt = { class: "border alternating-item-list" }, Pt = {
|
|
1514
1572
|
key: 0,
|
|
1515
1573
|
class: "p-2 border-top border-bottom",
|
|
1516
1574
|
"data-cy": "title"
|
|
1517
|
-
},
|
|
1575
|
+
}, It = { class: "d-inline-block" }, zt = {
|
|
1518
1576
|
key: 1,
|
|
1519
1577
|
class: "p-2 item d-flex justify-content-between align-items-center"
|
|
1520
|
-
},
|
|
1578
|
+
}, pl = /* @__PURE__ */ $({
|
|
1521
1579
|
__name: "ForgeMultiSelectPreview",
|
|
1522
1580
|
props: {
|
|
1523
1581
|
title: { default: "Selected Items" },
|
|
@@ -1528,106 +1586,106 @@ const ct = { key: 0 }, mt = {
|
|
|
1528
1586
|
},
|
|
1529
1587
|
emits: ["update:modelValue"],
|
|
1530
1588
|
setup(e, { emit: t }) {
|
|
1531
|
-
const
|
|
1532
|
-
|
|
1533
|
-
},
|
|
1534
|
-
|
|
1589
|
+
const n = e, a = de(), l = t, o = x(() => `${a.modelValue.length} selected`), r = x(() => a.modelValue.length), u = (d) => {
|
|
1590
|
+
l("update:modelValue", d);
|
|
1591
|
+
}, b = (d) => {
|
|
1592
|
+
u(a.modelValue.filter((f) => f.id !== d));
|
|
1535
1593
|
};
|
|
1536
|
-
return (
|
|
1537
|
-
const
|
|
1594
|
+
return (d, f) => {
|
|
1595
|
+
const i = E;
|
|
1538
1596
|
return s(), p("div", {
|
|
1539
|
-
class: B(
|
|
1597
|
+
class: B(d.orientation === "column" ? "row" : ""),
|
|
1540
1598
|
"data-cy": "multiselect-preview"
|
|
1541
1599
|
}, [
|
|
1542
|
-
|
|
1543
|
-
class: B(
|
|
1600
|
+
m("div", {
|
|
1601
|
+
class: B(d.orientation === "row" ? "col-12 mb-1" : "col"),
|
|
1544
1602
|
"data-cy": "multiselect-container"
|
|
1545
1603
|
}, [
|
|
1546
|
-
|
|
1604
|
+
y(Vt, {
|
|
1547
1605
|
"onUpdate:modelValue": [
|
|
1548
|
-
|
|
1549
|
-
|
|
1606
|
+
f[0] || (f[0] = (h) => u(h)),
|
|
1607
|
+
f[1] || (f[1] = (h) => d.$attrs.modelValue = h)
|
|
1550
1608
|
],
|
|
1551
|
-
modelValue:
|
|
1552
|
-
"limit-text":
|
|
1553
|
-
options:
|
|
1609
|
+
modelValue: d.$attrs.modelValue,
|
|
1610
|
+
"limit-text": o.value,
|
|
1611
|
+
options: n.options
|
|
1554
1612
|
}, {
|
|
1555
1613
|
tag: v(() => [
|
|
1556
|
-
|
|
1614
|
+
P(g(""))
|
|
1557
1615
|
]),
|
|
1558
1616
|
selection: v(() => [
|
|
1559
|
-
|
|
1617
|
+
d.$attrs.modelValue.length > 0 ? (s(), p("span", Tt, g(r.value) + " items selected", 1)) : F("", !0)
|
|
1560
1618
|
]),
|
|
1561
1619
|
default: v(() => [
|
|
1562
|
-
(s(!0), p(
|
|
1620
|
+
(s(!0), p(D, null, j(d.$slots, (h, _) => k(d.$slots, _, { slot: _ })), 256))
|
|
1563
1621
|
]),
|
|
1564
1622
|
_: 3
|
|
1565
1623
|
}, 8, ["modelValue", "limit-text", "options"]),
|
|
1566
|
-
k(
|
|
1624
|
+
k(d.$slots, "after-multi-select")
|
|
1567
1625
|
], 2),
|
|
1568
|
-
|
|
1569
|
-
class: B(
|
|
1626
|
+
m("div", {
|
|
1627
|
+
class: B(d.orientation === "row" ? "col-12" : "col"),
|
|
1570
1628
|
"data-cy": "options-preview"
|
|
1571
1629
|
}, [
|
|
1572
|
-
|
|
1573
|
-
style:
|
|
1630
|
+
m("div", {
|
|
1631
|
+
style: he({ height: d.height }),
|
|
1574
1632
|
class: "overflow-auto"
|
|
1575
1633
|
}, [
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
(s(!0), p(
|
|
1579
|
-
key:
|
|
1634
|
+
m("div", Mt, [
|
|
1635
|
+
d.title ? (s(), p("div", Pt, g(d.title), 1)) : F("", !0),
|
|
1636
|
+
(s(!0), p(D, null, j(d.$attrs.modelValue, (h) => (s(), p("div", {
|
|
1637
|
+
key: h.id,
|
|
1580
1638
|
class: "p-2 item d-flex justify-content-between align-items-center"
|
|
1581
1639
|
}, [
|
|
1582
|
-
k(
|
|
1583
|
-
|
|
1640
|
+
k(d.$slots, "list-item", { item: h }, () => [
|
|
1641
|
+
m("span", It, g(h.shortLabel ? h.shortLabel : h.label), 1)
|
|
1584
1642
|
]),
|
|
1585
|
-
|
|
1643
|
+
d.canRemoveItemFromPreview ? (s(), w(i, {
|
|
1586
1644
|
key: 0,
|
|
1587
1645
|
link: "",
|
|
1588
1646
|
class: "m-0 p-0 d-flex align-items-center",
|
|
1589
|
-
onClick: (
|
|
1647
|
+
onClick: (_) => b(h.id)
|
|
1590
1648
|
}, {
|
|
1591
1649
|
default: v(() => [
|
|
1592
|
-
|
|
1650
|
+
y(c(S), {
|
|
1593
1651
|
icon: "bi:x",
|
|
1594
1652
|
class: "close-icon",
|
|
1595
|
-
"data-cy": `close-icon-${
|
|
1653
|
+
"data-cy": `close-icon-${h.id}`
|
|
1596
1654
|
}, null, 8, ["data-cy"])
|
|
1597
1655
|
]),
|
|
1598
1656
|
_: 2
|
|
1599
1657
|
}, 1032, ["onClick"])) : F("", !0)
|
|
1600
1658
|
]))), 128)),
|
|
1601
|
-
|
|
1659
|
+
d.$attrs.modelValue.length === 0 ? (s(), p("div", zt, "No Items Selected.")) : F("", !0)
|
|
1602
1660
|
])
|
|
1603
1661
|
], 4)
|
|
1604
1662
|
], 2)
|
|
1605
1663
|
], 2);
|
|
1606
1664
|
};
|
|
1607
1665
|
}
|
|
1608
|
-
}),
|
|
1666
|
+
}), Ot = { class: "d-flex justify-content-between pb-2" }, Dt = {
|
|
1609
1667
|
"data-cy": "title",
|
|
1610
1668
|
class: "h3"
|
|
1611
|
-
},
|
|
1669
|
+
}, Ut = {
|
|
1612
1670
|
"data-cy": "slot",
|
|
1613
1671
|
class: "d-flex align-items-center"
|
|
1614
|
-
},
|
|
1672
|
+
}, yl = /* @__PURE__ */ $({
|
|
1615
1673
|
__name: "ForgePageHeader",
|
|
1616
1674
|
props: {
|
|
1617
1675
|
title: {}
|
|
1618
1676
|
},
|
|
1619
1677
|
setup(e) {
|
|
1620
1678
|
const t = e;
|
|
1621
|
-
return (
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
k(
|
|
1679
|
+
return (n, a) => (s(), p("div", Ot, [
|
|
1680
|
+
m("h1", Dt, g(t.title), 1),
|
|
1681
|
+
m("div", Ut, [
|
|
1682
|
+
k(n.$slots, "default")
|
|
1625
1683
|
])
|
|
1626
1684
|
]));
|
|
1627
1685
|
}
|
|
1628
|
-
}),
|
|
1686
|
+
}), At = { "data-cy": "before-slot" }, Nt = { class: "position-relative" }, Et = { "data-cy": "after-slot" }, Rt = /* @__PURE__ */ $({
|
|
1629
1687
|
__name: "ForgeDatepicker",
|
|
1630
|
-
props: {
|
|
1688
|
+
props: /* @__PURE__ */ q({
|
|
1631
1689
|
severity: { default: "primary" },
|
|
1632
1690
|
modelValue: {},
|
|
1633
1691
|
selectionMode: { default: "single" },
|
|
@@ -1658,7 +1716,7 @@ const ct = { key: 0 }, mt = {
|
|
|
1658
1716
|
showOnFocus: { type: Boolean },
|
|
1659
1717
|
autoZIndex: { type: Boolean, default: !0 },
|
|
1660
1718
|
baseZIndex: { default: 0 },
|
|
1661
|
-
showButtonBar: { type: Boolean, default: !
|
|
1719
|
+
showButtonBar: { type: Boolean, default: !1 },
|
|
1662
1720
|
shortYearCutoff: {},
|
|
1663
1721
|
showTime: { type: Boolean },
|
|
1664
1722
|
timeOnly: { type: Boolean },
|
|
@@ -1671,7 +1729,7 @@ const ct = { key: 0 }, mt = {
|
|
|
1671
1729
|
hideOnRangeSelection: { type: Boolean },
|
|
1672
1730
|
timeSeparator: {},
|
|
1673
1731
|
showWeek: { type: Boolean },
|
|
1674
|
-
manualInput: { type: Boolean },
|
|
1732
|
+
manualInput: { type: Boolean, default: !0 },
|
|
1675
1733
|
invalid: { type: Boolean },
|
|
1676
1734
|
disabled: { type: Boolean },
|
|
1677
1735
|
variant: {},
|
|
@@ -1691,21 +1749,41 @@ const ct = { key: 0 }, mt = {
|
|
|
1691
1749
|
pt: {},
|
|
1692
1750
|
ptOptions: {},
|
|
1693
1751
|
unstyled: { type: Boolean }
|
|
1694
|
-
},
|
|
1752
|
+
}, {
|
|
1753
|
+
modelValue: {},
|
|
1754
|
+
modelModifiers: {}
|
|
1755
|
+
}),
|
|
1756
|
+
emits: ["update:modelValue"],
|
|
1695
1757
|
setup(e) {
|
|
1696
|
-
const t = e,
|
|
1697
|
-
|
|
1758
|
+
const t = e, n = R(e, "modelValue"), a = () => {
|
|
1759
|
+
n.value = null;
|
|
1760
|
+
}, l = x(() => ({
|
|
1761
|
+
day: ({ context: o }) => ({
|
|
1762
|
+
class: [
|
|
1763
|
+
`text-center date-${t.severity === void 0 ? "primary" : t.severity}`,
|
|
1764
|
+
{
|
|
1765
|
+
"cursor-pointer": !o.disabled,
|
|
1766
|
+
"pe-none": o.disabled,
|
|
1767
|
+
"text-white": o.selected
|
|
1768
|
+
},
|
|
1769
|
+
// Severities
|
|
1770
|
+
{
|
|
1771
|
+
selected: o.selected && !o.disabled,
|
|
1772
|
+
"text-primary": !o.selected && o.today && (t.severity === void 0 || t.severity === "primary"),
|
|
1773
|
+
"text-brand": !o.selected && o.today && t.severity === "brand",
|
|
1774
|
+
"text-secondary": !o.selected && o.today && t.severity === "secondary",
|
|
1775
|
+
"text-success": !o.selected && o.today && t.severity === "success",
|
|
1776
|
+
"text-warning": !o.selected && o.today && t.severity === "warning",
|
|
1777
|
+
"text-danger": !o.selected && o.today && t.severity === "danger",
|
|
1778
|
+
"text-info": !o.selected && o.today && t.severity === "info"
|
|
1779
|
+
}
|
|
1780
|
+
]
|
|
1781
|
+
}),
|
|
1782
|
+
dayLabel: ({ context: o }) => ({
|
|
1698
1783
|
class: [
|
|
1699
|
-
|
|
1784
|
+
// Disabled States
|
|
1700
1785
|
{
|
|
1701
|
-
"
|
|
1702
|
-
"btn-primary": a.selected && !a.disabled && (t.severity === void 0 || t.severity === "primary"),
|
|
1703
|
-
"btn-brand": a.selected && !a.disabled && t.severity === "brand",
|
|
1704
|
-
"btn-secondary": a.selected && !a.disabled && t.severity === "secondary",
|
|
1705
|
-
"btn-success": a.selected && !a.disabled && t.severity === "success",
|
|
1706
|
-
"btn-warning": a.selected && !a.disabled && t.severity === "warning",
|
|
1707
|
-
"btn-danger": a.selected && !a.disabled && t.severity === "danger",
|
|
1708
|
-
"btn-info": a.selected && !a.disabled && t.severity === "info"
|
|
1786
|
+
"text-muted": o.disabled
|
|
1709
1787
|
}
|
|
1710
1788
|
]
|
|
1711
1789
|
}),
|
|
@@ -1740,43 +1818,83 @@ const ct = { key: 0 }, mt = {
|
|
|
1740
1818
|
}
|
|
1741
1819
|
]
|
|
1742
1820
|
})
|
|
1743
|
-
}
|
|
1821
|
+
},
|
|
1822
|
+
year: ({ context: o }) => ({
|
|
1823
|
+
class: [
|
|
1824
|
+
"col-3 text-center cursor-pointer py-2",
|
|
1825
|
+
{
|
|
1826
|
+
"text-primary": (t.severity === void 0 || t.severity === "primary") && o.year.value === (/* @__PURE__ */ new Date()).getFullYear(),
|
|
1827
|
+
"text-brand": t.severity === "brand" && o.year.value === (/* @__PURE__ */ new Date()).getFullYear(),
|
|
1828
|
+
"text-secondary": t.severity === "secondary" && o.year.value === (/* @__PURE__ */ new Date()).getFullYear(),
|
|
1829
|
+
"text-success": t.severity === "success" && o.year.value === (/* @__PURE__ */ new Date()).getFullYear(),
|
|
1830
|
+
"text-warning": t.severity === "warning" && o.year.value === (/* @__PURE__ */ new Date()).getFullYear(),
|
|
1831
|
+
"text-danger": t.severity === "danger" && o.year.value === (/* @__PURE__ */ new Date()).getFullYear(),
|
|
1832
|
+
"text-info": t.severity === "info" && o.year.value === (/* @__PURE__ */ new Date()).getFullYear()
|
|
1833
|
+
}
|
|
1834
|
+
]
|
|
1835
|
+
}),
|
|
1836
|
+
month: ({ context: o }) => ({
|
|
1837
|
+
class: [
|
|
1838
|
+
"col-3 text-center cursor-pointer py-2",
|
|
1839
|
+
{
|
|
1840
|
+
"text-primary": (t.severity === void 0 || t.severity === "primary") && o.monthIndex + 1 === (/* @__PURE__ */ new Date()).getMonth() + 1,
|
|
1841
|
+
"text-brand": t.severity === "brand" && o.monthIndex + 1 === (/* @__PURE__ */ new Date()).getMonth() + 1,
|
|
1842
|
+
"text-secondary": t.severity === "secondary" && o.monthIndex + 1 === (/* @__PURE__ */ new Date()).getMonth() + 1,
|
|
1843
|
+
"text-success": t.severity === "success" && o.monthIndex + 1 === (/* @__PURE__ */ new Date()).getMonth() + 1,
|
|
1844
|
+
"text-warning": t.severity === "warning" && o.monthIndex + 1 === (/* @__PURE__ */ new Date()).getMonth() + 1,
|
|
1845
|
+
"text-danger": t.severity === "danger" && o.monthIndex + 1 === (/* @__PURE__ */ new Date()).getMonth() + 1,
|
|
1846
|
+
"text-info": t.severity === "info" && o.monthIndex + 1 === (/* @__PURE__ */ new Date()).getMonth() + 1
|
|
1847
|
+
}
|
|
1848
|
+
]
|
|
1849
|
+
})
|
|
1744
1850
|
}));
|
|
1745
|
-
return (
|
|
1746
|
-
const
|
|
1747
|
-
return s(), p(
|
|
1748
|
-
|
|
1749
|
-
k(
|
|
1851
|
+
return (o, r) => {
|
|
1852
|
+
const u = Se;
|
|
1853
|
+
return s(), p(D, null, [
|
|
1854
|
+
m("span", At, [
|
|
1855
|
+
k(o.$slots, "before")
|
|
1750
1856
|
]),
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1857
|
+
m("div", Nt, [
|
|
1858
|
+
y(u, C({ ...t, ...o.$attrs }, {
|
|
1859
|
+
pt: l.value,
|
|
1860
|
+
modelValue: n.value,
|
|
1861
|
+
"onUpdate:modelValue": r[0] || (r[0] = (b) => n.value = b)
|
|
1862
|
+
}), null, 16, ["pt", "modelValue"]),
|
|
1863
|
+
L(y(c(S), {
|
|
1864
|
+
"data-cy": "icon",
|
|
1865
|
+
icon: "bi:calendar4",
|
|
1866
|
+
class: "position-absolute end-0 top-50 bottom-50 my-auto me-2 text-muted"
|
|
1867
|
+
}, null, 512), [
|
|
1868
|
+
[Y, t.showIcon]
|
|
1869
|
+
]),
|
|
1870
|
+
L(y(c(S), {
|
|
1871
|
+
"data-cy": "icon",
|
|
1872
|
+
icon: "bi:x",
|
|
1873
|
+
onClick: a,
|
|
1874
|
+
class: B(["position-absolute end-0 top-50 bottom-50 my-auto text-muted cursor-pointer", t.showIcon ? "datepicker-close-icon" : "me-2"])
|
|
1875
|
+
}, null, 8, ["class"]), [
|
|
1876
|
+
[Y, t.modelValue]
|
|
1877
|
+
])
|
|
1760
1878
|
]),
|
|
1761
|
-
|
|
1762
|
-
k(
|
|
1879
|
+
m("span", Et, [
|
|
1880
|
+
k(o.$slots, "after")
|
|
1763
1881
|
])
|
|
1764
1882
|
], 64);
|
|
1765
1883
|
};
|
|
1766
1884
|
}
|
|
1767
|
-
}),
|
|
1885
|
+
}), vl = /* @__PURE__ */ $({
|
|
1768
1886
|
__name: "ForgeRemainingCharacters",
|
|
1769
1887
|
props: {
|
|
1770
1888
|
maxCount: { default: 300 },
|
|
1771
1889
|
currentCount: {}
|
|
1772
1890
|
},
|
|
1773
1891
|
setup(e) {
|
|
1774
|
-
const t = e,
|
|
1775
|
-
return (a,
|
|
1776
|
-
class: B(
|
|
1777
|
-
}, "Remaining characters: " + g(
|
|
1892
|
+
const t = e, n = x(() => t.maxCount - t.currentCount);
|
|
1893
|
+
return (a, l) => (s(), p("div", {
|
|
1894
|
+
class: B(n.value < 0 ? "text-danger" : "")
|
|
1895
|
+
}, "Remaining characters: " + g(n.value), 3));
|
|
1778
1896
|
}
|
|
1779
|
-
}),
|
|
1897
|
+
}), Lt = /* @__PURE__ */ m("hr", null, null, -1), jt = { class: "d-flex justify-content-between" }, bl = /* @__PURE__ */ $({
|
|
1780
1898
|
__name: "ForgeForm",
|
|
1781
1899
|
props: {
|
|
1782
1900
|
onSubmit: {},
|
|
@@ -1788,88 +1906,88 @@ const ct = { key: 0 }, mt = {
|
|
|
1788
1906
|
hideCancel: { type: Boolean, default: !1 }
|
|
1789
1907
|
},
|
|
1790
1908
|
setup(e) {
|
|
1791
|
-
const t = e,
|
|
1909
|
+
const t = e, n = T(!1), a = T({
|
|
1792
1910
|
hasError: !1,
|
|
1793
1911
|
message: ""
|
|
1794
1912
|
});
|
|
1795
|
-
async function
|
|
1796
|
-
|
|
1913
|
+
async function l() {
|
|
1914
|
+
n.value = !0, a.value.hasError = !1;
|
|
1797
1915
|
try {
|
|
1798
1916
|
await t.onSubmit();
|
|
1799
|
-
} catch (
|
|
1800
|
-
a.value.hasError = !0,
|
|
1917
|
+
} catch (o) {
|
|
1918
|
+
a.value.hasError = !0, o.message && (a.value.message = o.message);
|
|
1801
1919
|
}
|
|
1802
|
-
|
|
1920
|
+
n.value = !1;
|
|
1803
1921
|
}
|
|
1804
|
-
return (
|
|
1805
|
-
const
|
|
1806
|
-
return s(), p("form",
|
|
1922
|
+
return (o, r) => {
|
|
1923
|
+
const u = E;
|
|
1924
|
+
return s(), p("form", C(o.$attrs, {
|
|
1807
1925
|
novalidate: "",
|
|
1808
1926
|
class: "position-relative shadow-sm border p-4 bg-white",
|
|
1809
|
-
onSubmit:
|
|
1927
|
+
onSubmit: G(l, ["prevent"])
|
|
1810
1928
|
}), [
|
|
1811
|
-
|
|
1812
|
-
k(
|
|
1813
|
-
|
|
1814
|
-
class: B(
|
|
1929
|
+
o.hideTitle ? F("", !0) : (s(), p(D, { key: 0 }, [
|
|
1930
|
+
k(o.$slots, "title", {}, () => [
|
|
1931
|
+
m("h3", {
|
|
1932
|
+
class: B(o.titleClass),
|
|
1815
1933
|
"data-cy": "form-title"
|
|
1816
|
-
}, g(
|
|
1934
|
+
}, g(o.title), 3)
|
|
1817
1935
|
]),
|
|
1818
|
-
|
|
1936
|
+
Lt
|
|
1819
1937
|
], 64)),
|
|
1820
|
-
a.value.hasError ? (s(), w(
|
|
1938
|
+
a.value.hasError ? (s(), w(ae, {
|
|
1821
1939
|
key: 1,
|
|
1822
1940
|
severity: "danger",
|
|
1823
1941
|
"data-cy": "error"
|
|
1824
1942
|
}, {
|
|
1825
1943
|
default: v(() => [
|
|
1826
|
-
k(
|
|
1944
|
+
k(o.$slots, "error", {
|
|
1827
1945
|
error: a.value.message
|
|
1828
1946
|
}, () => [
|
|
1829
|
-
|
|
1947
|
+
P(g(a.value.message), 1)
|
|
1830
1948
|
])
|
|
1831
1949
|
]),
|
|
1832
1950
|
_: 3
|
|
1833
1951
|
})) : F("", !0),
|
|
1834
|
-
k(
|
|
1835
|
-
|
|
1836
|
-
k(
|
|
1837
|
-
|
|
1952
|
+
k(o.$slots, "default"),
|
|
1953
|
+
m("div", jt, [
|
|
1954
|
+
k(o.$slots, "cancel", {}, () => [
|
|
1955
|
+
o.hideCancel ? F("", !0) : (s(), w(u, {
|
|
1838
1956
|
key: 0,
|
|
1839
1957
|
"data-cy": "cancel-btn",
|
|
1840
1958
|
type: "reset",
|
|
1841
1959
|
severity: "secondary",
|
|
1842
1960
|
outlined: "",
|
|
1843
|
-
onClick:
|
|
1961
|
+
onClick: r[0] || (r[0] = (b) => o.$emit("cancel"))
|
|
1844
1962
|
}, {
|
|
1845
1963
|
default: v(() => [
|
|
1846
|
-
|
|
1964
|
+
P(g(o.cancelText), 1)
|
|
1847
1965
|
]),
|
|
1848
1966
|
_: 1
|
|
1849
1967
|
}))
|
|
1850
1968
|
]),
|
|
1851
|
-
k(
|
|
1852
|
-
|
|
1969
|
+
k(o.$slots, "submit", { submit: l }, () => [
|
|
1970
|
+
y(u, {
|
|
1853
1971
|
"data-cy": "submit-btn",
|
|
1854
1972
|
type: "submit",
|
|
1855
1973
|
severity: "primary",
|
|
1856
1974
|
class: "ms-auto"
|
|
1857
1975
|
}, {
|
|
1858
1976
|
default: v(() => [
|
|
1859
|
-
|
|
1977
|
+
P(g(o.submitText), 1)
|
|
1860
1978
|
]),
|
|
1861
1979
|
_: 1
|
|
1862
1980
|
})
|
|
1863
1981
|
])
|
|
1864
1982
|
]),
|
|
1865
|
-
|
|
1983
|
+
n.value ? (s(), w(pe, {
|
|
1866
1984
|
key: 2,
|
|
1867
1985
|
"data-cy": "loading-spinner"
|
|
1868
1986
|
})) : F("", !0)
|
|
1869
1987
|
], 16);
|
|
1870
1988
|
};
|
|
1871
1989
|
}
|
|
1872
|
-
}),
|
|
1990
|
+
}), Ht = { class: "d-flex flex-column" }, Yt = ["for"], fl = /* @__PURE__ */ $({
|
|
1873
1991
|
__name: "ForgeFormField",
|
|
1874
1992
|
props: {
|
|
1875
1993
|
name: {},
|
|
@@ -1880,61 +1998,61 @@ const ct = { key: 0 }, mt = {
|
|
|
1880
1998
|
placeholder: { default: "" }
|
|
1881
1999
|
},
|
|
1882
2000
|
setup(e) {
|
|
1883
|
-
const t = e, { errors:
|
|
1884
|
-
return (
|
|
1885
|
-
const
|
|
1886
|
-
return s(), p("div",
|
|
2001
|
+
const t = e, { errors: n, value: a, errorMessage: l } = W(() => t.name, t.rules), o = x(() => n.value.length > 0);
|
|
2002
|
+
return (r, u) => {
|
|
2003
|
+
const b = Ve, d = Ce, f = ne;
|
|
2004
|
+
return s(), p("div", Ht, [
|
|
1887
2005
|
t.type !== "checkbox" ? (s(), p("label", {
|
|
1888
2006
|
key: 0,
|
|
1889
2007
|
for: t.name
|
|
1890
|
-
}, g(t.label), 9,
|
|
1891
|
-
t.type === "checkbox" ? (s(), w(
|
|
2008
|
+
}, g(t.label), 9, Yt)) : F("", !0),
|
|
2009
|
+
t.type === "checkbox" ? (s(), w(me, C({
|
|
1892
2010
|
key: 1,
|
|
1893
2011
|
id: t.name,
|
|
1894
|
-
rules:
|
|
2012
|
+
rules: r.rules,
|
|
1895
2013
|
label: t.label
|
|
1896
|
-
},
|
|
2014
|
+
}, r.$attrs), null, 16, ["id", "rules", "label"])) : t.type === "number" ? (s(), w(c(ue), C({
|
|
1897
2015
|
key: 2,
|
|
1898
2016
|
id: t.name,
|
|
1899
2017
|
placeholder: t.placeholder,
|
|
1900
|
-
modelValue:
|
|
1901
|
-
"onUpdate:modelValue":
|
|
1902
|
-
"input-class": { "is-invalid":
|
|
1903
|
-
class: { "is-invalid":
|
|
1904
|
-
},
|
|
2018
|
+
modelValue: c(a),
|
|
2019
|
+
"onUpdate:modelValue": u[0] || (u[0] = (i) => H(a) ? a.value = i : null),
|
|
2020
|
+
"input-class": { "is-invalid": o.value },
|
|
2021
|
+
class: { "is-invalid": o.value }
|
|
2022
|
+
}, r.$attrs), null, 16, ["id", "placeholder", "modelValue", "input-class", "class"])) : t.type === "textarea" ? (s(), w(b, C({
|
|
1905
2023
|
key: 3,
|
|
1906
2024
|
id: t.name,
|
|
1907
2025
|
placeholder: t.placeholder,
|
|
1908
|
-
modelValue:
|
|
1909
|
-
"onUpdate:modelValue":
|
|
1910
|
-
class: { "is-invalid":
|
|
1911
|
-
},
|
|
2026
|
+
modelValue: c(a),
|
|
2027
|
+
"onUpdate:modelValue": u[1] || (u[1] = (i) => H(a) ? a.value = i : null),
|
|
2028
|
+
class: { "is-invalid": o.value }
|
|
2029
|
+
}, r.$attrs), null, 16, ["id", "placeholder", "modelValue", "class"])) : t.type === "mask" ? (s(), w(d, C({
|
|
1912
2030
|
key: 4,
|
|
1913
2031
|
id: t.name,
|
|
1914
2032
|
placeholder: t.placeholder,
|
|
1915
|
-
modelValue:
|
|
1916
|
-
"onUpdate:modelValue":
|
|
2033
|
+
modelValue: c(a),
|
|
2034
|
+
"onUpdate:modelValue": u[2] || (u[2] = (i) => H(a) ? a.value = i : null),
|
|
1917
2035
|
mask: t.mask,
|
|
1918
|
-
class: { "is-invalid":
|
|
1919
|
-
},
|
|
2036
|
+
class: { "is-invalid": o.value }
|
|
2037
|
+
}, r.$attrs), null, 16, ["id", "placeholder", "modelValue", "mask", "class"])) : t.type === "text" ? (s(), w(f, C({
|
|
1920
2038
|
key: 5,
|
|
1921
2039
|
id: t.name,
|
|
1922
2040
|
placeholder: t.placeholder,
|
|
1923
|
-
modelValue:
|
|
1924
|
-
"onUpdate:modelValue":
|
|
1925
|
-
class: { "is-invalid":
|
|
1926
|
-
},
|
|
1927
|
-
t.type !== "checkbox" ?
|
|
2041
|
+
modelValue: c(a),
|
|
2042
|
+
"onUpdate:modelValue": u[3] || (u[3] = (i) => H(a) ? a.value = i : null),
|
|
2043
|
+
class: { "is-invalid": o.value }
|
|
2044
|
+
}, r.$attrs), null, 16, ["id", "placeholder", "modelValue", "class"])) : F("", !0),
|
|
2045
|
+
t.type !== "checkbox" ? L((s(), p("small", {
|
|
1928
2046
|
key: 6,
|
|
1929
2047
|
"data-cy": "error",
|
|
1930
2048
|
class: "invalid-feedback"
|
|
1931
|
-
}, g(
|
|
1932
|
-
[
|
|
2049
|
+
}, g(c(l)), 513)), [
|
|
2050
|
+
[Y, o.value]
|
|
1933
2051
|
]) : F("", !0)
|
|
1934
2052
|
]);
|
|
1935
2053
|
};
|
|
1936
2054
|
}
|
|
1937
|
-
}),
|
|
2055
|
+
}), gl = /* @__PURE__ */ $({
|
|
1938
2056
|
__name: "ForgeChips",
|
|
1939
2057
|
props: {
|
|
1940
2058
|
chipSeverity: { default: "primary" },
|
|
@@ -1962,17 +2080,17 @@ const ct = { key: 0 }, mt = {
|
|
|
1962
2080
|
unstyled: { type: Boolean }
|
|
1963
2081
|
},
|
|
1964
2082
|
setup(e) {
|
|
1965
|
-
const t = e, { errors:
|
|
2083
|
+
const t = e, { errors: n, value: a, errorMessage: l } = W(() => t.name, t.rules);
|
|
1966
2084
|
a.value = t.modelValue;
|
|
1967
|
-
const
|
|
2085
|
+
const o = x(() => n.value.length > 0), r = x(() => ({
|
|
1968
2086
|
inputtoken: "list-unstyled",
|
|
1969
2087
|
input: "border-0",
|
|
1970
|
-
container: ({ props:
|
|
2088
|
+
container: ({ props: u }) => ({
|
|
1971
2089
|
class: [
|
|
1972
2090
|
"form-control mb-0 d-flex",
|
|
1973
2091
|
{
|
|
1974
|
-
disabled:
|
|
1975
|
-
"is-invalid":
|
|
2092
|
+
disabled: u.disabled,
|
|
2093
|
+
"is-invalid": o.value
|
|
1976
2094
|
}
|
|
1977
2095
|
]
|
|
1978
2096
|
}),
|
|
@@ -1995,35 +2113,35 @@ const ct = { key: 0 }, mt = {
|
|
|
1995
2113
|
]
|
|
1996
2114
|
}
|
|
1997
2115
|
}));
|
|
1998
|
-
return (
|
|
1999
|
-
const
|
|
2000
|
-
return s(), p(
|
|
2001
|
-
|
|
2002
|
-
pt:
|
|
2003
|
-
"model-value":
|
|
2004
|
-
"onUpdate:modelValue":
|
|
2116
|
+
return (u, b) => {
|
|
2117
|
+
const d = Te;
|
|
2118
|
+
return s(), p(D, null, [
|
|
2119
|
+
y(d, C({ ...t, ...u.$attrs }, {
|
|
2120
|
+
pt: r.value,
|
|
2121
|
+
"model-value": c(a),
|
|
2122
|
+
"onUpdate:modelValue": b[0] || (b[0] = (f) => H(a) ? a.value = f : null)
|
|
2005
2123
|
}), {
|
|
2006
|
-
removetokenicon: v(({ removeCallback:
|
|
2007
|
-
|
|
2124
|
+
removetokenicon: v(({ removeCallback: f }) => [
|
|
2125
|
+
L(y(c(S), {
|
|
2008
2126
|
icon: "bi:x",
|
|
2009
2127
|
class: "cursor-pointer",
|
|
2010
|
-
onClick:
|
|
2128
|
+
onClick: f
|
|
2011
2129
|
}, null, 8, ["onClick"]), [
|
|
2012
|
-
[
|
|
2130
|
+
[Y, !t.disabled]
|
|
2013
2131
|
])
|
|
2014
2132
|
]),
|
|
2015
2133
|
_: 1
|
|
2016
2134
|
}, 16, ["pt", "model-value"]),
|
|
2017
|
-
|
|
2135
|
+
L(m("small", {
|
|
2018
2136
|
"data-cy": "error",
|
|
2019
2137
|
class: "text-invalid"
|
|
2020
|
-
}, g(
|
|
2021
|
-
[
|
|
2138
|
+
}, g(c(l)), 513), [
|
|
2139
|
+
[Y, o.value]
|
|
2022
2140
|
])
|
|
2023
2141
|
], 64);
|
|
2024
2142
|
};
|
|
2025
2143
|
}
|
|
2026
|
-
}),
|
|
2144
|
+
}), qt = /* @__PURE__ */ $({
|
|
2027
2145
|
__name: "ForgeProgressBar",
|
|
2028
2146
|
props: {
|
|
2029
2147
|
severity: { default: "primary" },
|
|
@@ -2038,7 +2156,7 @@ const ct = { key: 0 }, mt = {
|
|
|
2038
2156
|
unstyled: { type: Boolean }
|
|
2039
2157
|
},
|
|
2040
2158
|
setup(e) {
|
|
2041
|
-
const t = e,
|
|
2159
|
+
const t = e, n = x(() => t.striped ? "progress-bar-striped" : null), a = x(() => t.animate ? "progress-bar-animated" : null), l = x(() => {
|
|
2042
2160
|
switch (t.severity) {
|
|
2043
2161
|
case "brand":
|
|
2044
2162
|
return "bg-brand";
|
|
@@ -2057,25 +2175,25 @@ const ct = { key: 0 }, mt = {
|
|
|
2057
2175
|
default:
|
|
2058
2176
|
return "bg-primary";
|
|
2059
2177
|
}
|
|
2060
|
-
}),
|
|
2178
|
+
}), o = x(() => ({
|
|
2061
2179
|
root: {
|
|
2062
2180
|
style: t.pixelWidth ? `width: ${t.pixelWidth}px` : ""
|
|
2063
2181
|
},
|
|
2064
2182
|
value: {
|
|
2065
|
-
class: [
|
|
2183
|
+
class: [l.value, n.value, a.value]
|
|
2066
2184
|
}
|
|
2067
2185
|
}));
|
|
2068
|
-
return (
|
|
2069
|
-
const
|
|
2070
|
-
return s(), w(
|
|
2186
|
+
return (r, u) => {
|
|
2187
|
+
const b = Me;
|
|
2188
|
+
return s(), w(b, C({ ...r.$attrs, ...t }, { pt: o.value }), {
|
|
2071
2189
|
default: v(() => [
|
|
2072
|
-
k(
|
|
2190
|
+
k(r.$slots, "default")
|
|
2073
2191
|
]),
|
|
2074
2192
|
_: 3
|
|
2075
2193
|
}, 16, ["pt"]);
|
|
2076
2194
|
};
|
|
2077
2195
|
}
|
|
2078
|
-
}),
|
|
2196
|
+
}), Gt = { class: "value text-light w-100 text-center" }, hl = /* @__PURE__ */ $({
|
|
2079
2197
|
__name: "ForgeStatWidget",
|
|
2080
2198
|
props: {
|
|
2081
2199
|
size: { default: "md" },
|
|
@@ -2083,18 +2201,18 @@ const ct = { key: 0 }, mt = {
|
|
|
2083
2201
|
},
|
|
2084
2202
|
setup(e) {
|
|
2085
2203
|
const t = e;
|
|
2086
|
-
return (
|
|
2204
|
+
return (n, a) => (s(), p("div", C(n.$attrs, {
|
|
2087
2205
|
class: `d-flex shadow m-2 align-items-center widget--${t.size} bg-${t.severity}`
|
|
2088
2206
|
}), [
|
|
2089
|
-
|
|
2090
|
-
k(
|
|
2207
|
+
m("span", Gt, [
|
|
2208
|
+
k(n.$slots, "default")
|
|
2091
2209
|
])
|
|
2092
2210
|
], 16));
|
|
2093
2211
|
}
|
|
2094
|
-
}),
|
|
2212
|
+
}), Kt = {
|
|
2095
2213
|
class: "d-flex flex-column align-items-center",
|
|
2096
2214
|
"data-cy": "stepper"
|
|
2097
|
-
},
|
|
2215
|
+
}, Wt = { class: "d-flex align-items-center justify-content-center w-100" }, wl = /* @__PURE__ */ $({
|
|
2098
2216
|
__name: "ForgeStepper",
|
|
2099
2217
|
props: {
|
|
2100
2218
|
currentStep: { default: 0 },
|
|
@@ -2110,103 +2228,103 @@ const ct = { key: 0 }, mt = {
|
|
|
2110
2228
|
},
|
|
2111
2229
|
emits: ["update:currentStep"],
|
|
2112
2230
|
setup(e, { emit: t }) {
|
|
2113
|
-
const
|
|
2231
|
+
const n = t, a = e, l = T(a.currentStep), o = () => {
|
|
2114
2232
|
do
|
|
2115
|
-
|
|
2116
|
-
while (a.model[
|
|
2117
|
-
|
|
2118
|
-
},
|
|
2119
|
-
if (
|
|
2233
|
+
l.value--;
|
|
2234
|
+
while (a.model[l.value].disabled);
|
|
2235
|
+
n("update:currentStep", l.value);
|
|
2236
|
+
}, r = () => {
|
|
2237
|
+
if (l.value < a.model.length - 1)
|
|
2120
2238
|
do
|
|
2121
|
-
|
|
2122
|
-
while (a.model[
|
|
2123
|
-
|
|
2124
|
-
},
|
|
2125
|
-
const
|
|
2126
|
-
return !(
|
|
2127
|
-
}),
|
|
2128
|
-
menuitem: (
|
|
2239
|
+
l.value++;
|
|
2240
|
+
while (a.model[l.value].disabled);
|
|
2241
|
+
n("update:currentStep", l.value);
|
|
2242
|
+
}, u = x(() => {
|
|
2243
|
+
const d = a.model.findIndex((f) => !f.disabled);
|
|
2244
|
+
return !(d < l.value && d > -1);
|
|
2245
|
+
}), b = x(() => ({
|
|
2246
|
+
menuitem: (d) => ({
|
|
2129
2247
|
class: [{
|
|
2130
|
-
"cursor-pointer": !
|
|
2248
|
+
"cursor-pointer": !d.context.disabled
|
|
2131
2249
|
}]
|
|
2132
2250
|
}),
|
|
2133
|
-
step: (
|
|
2251
|
+
step: (d) => ({
|
|
2134
2252
|
class: [
|
|
2135
2253
|
"d-flex align-items-center justify-content-center mb-2 step",
|
|
2136
2254
|
{
|
|
2137
|
-
inactive:
|
|
2138
|
-
"bg-primary text-white":
|
|
2139
|
-
"bg-brand text-white":
|
|
2140
|
-
"bg-secondary text-white":
|
|
2141
|
-
"bg-success text-white":
|
|
2142
|
-
"bg-warning text-white":
|
|
2143
|
-
"bg-danger text-white":
|
|
2144
|
-
"bg-info text-white":
|
|
2255
|
+
inactive: d.context.disabled,
|
|
2256
|
+
"bg-primary text-white": d.context.index === l.value && (a.severity === void 0 || a.severity === "primary"),
|
|
2257
|
+
"bg-brand text-white": d.context.index === l.value && a.severity === "brand",
|
|
2258
|
+
"bg-secondary text-white": d.context.index === l.value && a.severity === "secondary",
|
|
2259
|
+
"bg-success text-white": d.context.index === l.value && a.severity === "success",
|
|
2260
|
+
"bg-warning text-white": d.context.index === l.value && a.severity === "warning",
|
|
2261
|
+
"bg-danger text-white": d.context.index === l.value && a.severity === "danger",
|
|
2262
|
+
"bg-info text-white": d.context.index === l.value && a.severity === "info"
|
|
2145
2263
|
}
|
|
2146
2264
|
]
|
|
2147
2265
|
}),
|
|
2148
|
-
label: (
|
|
2266
|
+
label: (d) => ({
|
|
2149
2267
|
class: [
|
|
2150
2268
|
"h5",
|
|
2151
2269
|
{
|
|
2152
|
-
"border-bottom border-2 border-primary":
|
|
2153
|
-
"border-bottom border-2 border-brand":
|
|
2154
|
-
"border-bottom border-2 border-secondary":
|
|
2155
|
-
"border-bottom border-2 border-success":
|
|
2156
|
-
"border-bottom border-2 border-warning":
|
|
2157
|
-
"border-bottom border-2 border-danger":
|
|
2158
|
-
"border-bottom border-2 border-info":
|
|
2270
|
+
"border-bottom border-2 border-primary": d.context.index === l.value && (a.severity === void 0 || a.severity === "primary"),
|
|
2271
|
+
"border-bottom border-2 border-brand": d.context.index === l.value && a.severity === "brand",
|
|
2272
|
+
"border-bottom border-2 border-secondary": d.context.index === l.value && a.severity === "secondary",
|
|
2273
|
+
"border-bottom border-2 border-success": d.context.index === l.value && a.severity === "success",
|
|
2274
|
+
"border-bottom border-2 border-warning": d.context.index === l.value && a.severity === "warning",
|
|
2275
|
+
"border-bottom border-2 border-danger": d.context.index === l.value && a.severity === "danger",
|
|
2276
|
+
"border-bottom border-2 border-info": d.context.index === l.value && a.severity === "info"
|
|
2159
2277
|
}
|
|
2160
2278
|
]
|
|
2161
2279
|
})
|
|
2162
2280
|
}));
|
|
2163
|
-
return (
|
|
2164
|
-
const
|
|
2165
|
-
return s(), p("div",
|
|
2166
|
-
|
|
2167
|
-
|
|
2281
|
+
return (d, f) => {
|
|
2282
|
+
const i = E, h = Ie, _ = Pe;
|
|
2283
|
+
return s(), p("div", Kt, [
|
|
2284
|
+
m("div", Wt, [
|
|
2285
|
+
y(i, {
|
|
2168
2286
|
severity: a.severity,
|
|
2169
|
-
disabled:
|
|
2170
|
-
onClick:
|
|
2287
|
+
disabled: u.value,
|
|
2288
|
+
onClick: o,
|
|
2171
2289
|
class: "rounded-circle py-2 me-4",
|
|
2172
2290
|
"data-cy": "back-button"
|
|
2173
2291
|
}, {
|
|
2174
2292
|
default: v(() => [
|
|
2175
|
-
|
|
2293
|
+
y(c(S), {
|
|
2176
2294
|
icon: "bi:chevron-left",
|
|
2177
2295
|
class: "mb-1"
|
|
2178
2296
|
})
|
|
2179
2297
|
]),
|
|
2180
2298
|
_: 1
|
|
2181
2299
|
}, 8, ["severity", "disabled"]),
|
|
2182
|
-
|
|
2183
|
-
"active-step":
|
|
2184
|
-
"onUpdate:activeStep":
|
|
2300
|
+
y(h, {
|
|
2301
|
+
"active-step": l.value,
|
|
2302
|
+
"onUpdate:activeStep": f[0] || (f[0] = (V) => l.value = V),
|
|
2185
2303
|
model: a.model,
|
|
2186
|
-
pt:
|
|
2304
|
+
pt: b.value,
|
|
2187
2305
|
readonly: !1
|
|
2188
2306
|
}, null, 8, ["active-step", "model", "pt"])
|
|
2189
2307
|
]),
|
|
2190
|
-
|
|
2191
|
-
(s(!0), p(
|
|
2192
|
-
key:
|
|
2308
|
+
y(_),
|
|
2309
|
+
(s(!0), p(D, null, j(a.model, (V, M) => (s(), p("div", {
|
|
2310
|
+
key: M,
|
|
2193
2311
|
class: "w-100"
|
|
2194
2312
|
}, [
|
|
2195
|
-
|
|
2313
|
+
M === l.value ? k(d.$slots, V.key ?? V.label, {
|
|
2196
2314
|
key: 0,
|
|
2197
|
-
nextStep:
|
|
2198
|
-
previousStep:
|
|
2315
|
+
nextStep: r,
|
|
2316
|
+
previousStep: o
|
|
2199
2317
|
}, () => [
|
|
2200
|
-
|
|
2318
|
+
y(ae, {
|
|
2201
2319
|
severity: "info",
|
|
2202
2320
|
"data-cy": "alert"
|
|
2203
2321
|
}, {
|
|
2204
2322
|
default: v(() => [
|
|
2205
|
-
|
|
2206
|
-
|
|
2323
|
+
P(" Please add Slot Content for the key " + g(V.key ?? V.label) + " ", 1),
|
|
2324
|
+
y(i, {
|
|
2207
2325
|
severity: "primary",
|
|
2208
2326
|
label: "Next",
|
|
2209
|
-
onClick:
|
|
2327
|
+
onClick: r,
|
|
2210
2328
|
class: "ms-2"
|
|
2211
2329
|
})
|
|
2212
2330
|
]),
|
|
@@ -2217,7 +2335,7 @@ const ct = { key: 0 }, mt = {
|
|
|
2217
2335
|
]);
|
|
2218
2336
|
};
|
|
2219
2337
|
}
|
|
2220
|
-
}),
|
|
2338
|
+
}), Zt = { class: "p-4 text-wrap w-100" }, Jt = { class: "p-4 text-wrap w-100" }, xl = /* @__PURE__ */ $({
|
|
2221
2339
|
__name: "ForgeTile",
|
|
2222
2340
|
props: {
|
|
2223
2341
|
severity: { default: "primary" },
|
|
@@ -2225,20 +2343,20 @@ const ct = { key: 0 }, mt = {
|
|
|
2225
2343
|
clickable: { type: Boolean, default: !1 }
|
|
2226
2344
|
},
|
|
2227
2345
|
setup(e) {
|
|
2228
|
-
const t = e,
|
|
2229
|
-
return (
|
|
2230
|
-
const
|
|
2231
|
-
return t.clickable ? (s(), w(
|
|
2346
|
+
const t = e, n = x(() => `${t.severity === void 0 ? "tile-primary" : `tile-${t.severity}`} ${t.barPosition === "none" ? "border-0" : `tile-bar-${t.barPosition}`}`), a = x(() => `${t.severity === void 0 ? "tile-primary border-primary" : `tile-${t.severity} border-${t.severity}`} ${t.barPosition === "none" ? "" : `tile-bar-${t.barPosition}`}`);
|
|
2347
|
+
return (l, o) => {
|
|
2348
|
+
const r = E;
|
|
2349
|
+
return t.clickable ? (s(), w(r, {
|
|
2232
2350
|
key: 0,
|
|
2233
|
-
class: B(["d-flex w-100 p-0 text-body",
|
|
2351
|
+
class: B(["d-flex w-100 p-0 text-body", n.value]),
|
|
2234
2352
|
severity: t.severity,
|
|
2235
2353
|
unstyled: "",
|
|
2236
2354
|
"data-cy": "button-tile"
|
|
2237
2355
|
}, {
|
|
2238
2356
|
default: v(() => [
|
|
2239
|
-
|
|
2240
|
-
k(
|
|
2241
|
-
|
|
2357
|
+
m("div", Zt, [
|
|
2358
|
+
k(l.$slots, "default", {}, () => [
|
|
2359
|
+
P("Tile Content")
|
|
2242
2360
|
])
|
|
2243
2361
|
])
|
|
2244
2362
|
]),
|
|
@@ -2248,25 +2366,25 @@ const ct = { key: 0 }, mt = {
|
|
|
2248
2366
|
class: B(["d-flex w-100", a.value]),
|
|
2249
2367
|
"data-cy": "tile"
|
|
2250
2368
|
}, [
|
|
2251
|
-
|
|
2252
|
-
k(
|
|
2253
|
-
|
|
2369
|
+
m("div", Jt, [
|
|
2370
|
+
k(l.$slots, "default", {}, () => [
|
|
2371
|
+
P("Tile Content")
|
|
2254
2372
|
])
|
|
2255
2373
|
])
|
|
2256
2374
|
], 2));
|
|
2257
2375
|
};
|
|
2258
2376
|
}
|
|
2259
2377
|
});
|
|
2260
|
-
function
|
|
2378
|
+
function X(e, t) {
|
|
2261
2379
|
return e > 1 ? `${t}s` : t;
|
|
2262
2380
|
}
|
|
2263
|
-
const
|
|
2381
|
+
const Xt = {
|
|
2264
2382
|
class: "d-flex justify-content-start align-items-baseline",
|
|
2265
2383
|
"data-cy": "pagination-header"
|
|
2266
|
-
},
|
|
2384
|
+
}, Qt = { class: "ms-2" }, ea = { key: 0 }, ta = /* @__PURE__ */ m("span", { class: "mx-2" }, "|", -1), aa = {
|
|
2267
2385
|
class: "w-auto",
|
|
2268
2386
|
"data-cy": "total"
|
|
2269
|
-
},
|
|
2387
|
+
}, la = /* @__PURE__ */ $({
|
|
2270
2388
|
__name: "ForgePaginationHeader",
|
|
2271
2389
|
props: {
|
|
2272
2390
|
total: {},
|
|
@@ -2275,31 +2393,31 @@ const Wt = {
|
|
|
2275
2393
|
},
|
|
2276
2394
|
emits: ["update:perPage"],
|
|
2277
2395
|
setup(e, { emit: t }) {
|
|
2278
|
-
const
|
|
2279
|
-
|
|
2280
|
-
},
|
|
2281
|
-
const
|
|
2282
|
-
return `${
|
|
2396
|
+
const n = t, a = e, l = (r) => {
|
|
2397
|
+
n("update:perPage", r.value);
|
|
2398
|
+
}, o = x(() => {
|
|
2399
|
+
const r = Math.ceil(a.total / a.perPage);
|
|
2400
|
+
return `${r} ${X(r, "page")}`;
|
|
2283
2401
|
});
|
|
2284
|
-
return (
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2402
|
+
return (r, u) => (s(), p("div", Xt, [
|
|
2403
|
+
P(" Number of results per page "),
|
|
2404
|
+
m("div", Qt, [
|
|
2405
|
+
y(c(se), {
|
|
2288
2406
|
options: a.pageSizes,
|
|
2289
2407
|
"model-value": a.perPage,
|
|
2290
|
-
onChange:
|
|
2408
|
+
onChange: u[0] || (u[0] = (b) => l(b))
|
|
2291
2409
|
}, null, 8, ["options", "model-value"])
|
|
2292
2410
|
]),
|
|
2293
|
-
a.total ? (s(), p("div",
|
|
2294
|
-
|
|
2295
|
-
|
|
2411
|
+
a.total ? (s(), p("div", ea, [
|
|
2412
|
+
ta,
|
|
2413
|
+
m("span", aa, g(a.total) + " " + g(c(X)(a.total, "result")) + " across " + g(o.value), 1)
|
|
2296
2414
|
])) : F("", !0)
|
|
2297
2415
|
]));
|
|
2298
2416
|
}
|
|
2299
|
-
}),
|
|
2417
|
+
}), oa = { "data-cy": "above-table-slot" }, na = { class: "d-flex" }, sa = { class: "d-flex align-items-end mb-2" }, ia = { key: 0 }, ra = { class: "ms-auto" }, da = {
|
|
2300
2418
|
class: "d-flex",
|
|
2301
2419
|
"data-cy": "legacy-page-size"
|
|
2302
|
-
},
|
|
2420
|
+
}, ua = /* @__PURE__ */ m("span", { class: "me-2 my-auto text-nowrap" }, "Page Size:", -1), ca = { "data-cy": "legacy-total" }, kl = /* @__PURE__ */ $({
|
|
2303
2421
|
__name: "ForgeTable",
|
|
2304
2422
|
props: {
|
|
2305
2423
|
value: {},
|
|
@@ -2378,74 +2496,74 @@ const Wt = {
|
|
|
2378
2496
|
},
|
|
2379
2497
|
emits: ["update:filters"],
|
|
2380
2498
|
setup(e, { emit: t }) {
|
|
2381
|
-
const
|
|
2382
|
-
for (const
|
|
2383
|
-
a.filters[
|
|
2384
|
-
|
|
2385
|
-
},
|
|
2386
|
-
|
|
2387
|
-
},
|
|
2388
|
-
const
|
|
2389
|
-
return `${
|
|
2390
|
-
}),
|
|
2391
|
-
|
|
2499
|
+
const n = t, a = e, l = T([10, 20, 50, 100]), o = T(20), r = T(), u = () => {
|
|
2500
|
+
for (const i in a.filters)
|
|
2501
|
+
a.filters[i].value = null;
|
|
2502
|
+
b(a.filters);
|
|
2503
|
+
}, b = (i) => {
|
|
2504
|
+
n("update:filters", i);
|
|
2505
|
+
}, d = x(() => {
|
|
2506
|
+
const i = Math.ceil((a.total ?? a.value.length) / o.value);
|
|
2507
|
+
return `${i} ${X(i, "page")}`;
|
|
2508
|
+
}), f = () => {
|
|
2509
|
+
r.value.exportCSV();
|
|
2392
2510
|
};
|
|
2393
|
-
return (
|
|
2394
|
-
|
|
2395
|
-
k(
|
|
2511
|
+
return (i, h) => (s(), p(D, null, [
|
|
2512
|
+
m("span", oa, [
|
|
2513
|
+
k(i.$slots, "above-table")
|
|
2396
2514
|
]),
|
|
2397
|
-
|
|
2398
|
-
rows:
|
|
2399
|
-
"total-records":
|
|
2515
|
+
y(c(ze), C({ class: "w-100" }, { ...a, ...i.$attrs }, {
|
|
2516
|
+
rows: o.value,
|
|
2517
|
+
"total-records": i.total,
|
|
2400
2518
|
"filter-display": a.filters ? "row" : void 0,
|
|
2401
2519
|
ref_key: "forgeTable",
|
|
2402
|
-
ref:
|
|
2403
|
-
"onUpdate:filters":
|
|
2520
|
+
ref: r,
|
|
2521
|
+
"onUpdate:filters": b,
|
|
2404
2522
|
"data-cy": "table"
|
|
2405
|
-
}),
|
|
2523
|
+
}), te({
|
|
2406
2524
|
header: v(() => [
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
total:
|
|
2412
|
-
"page-sizes":
|
|
2413
|
-
"per-page":
|
|
2414
|
-
"onUpdate:perPage":
|
|
2525
|
+
m("div", na, [
|
|
2526
|
+
m("div", sa, [
|
|
2527
|
+
i.paginator && !i.legacyPaginationFooter ? (s(), p("span", ia, [
|
|
2528
|
+
y(la, {
|
|
2529
|
+
total: i.total ?? i.value.length,
|
|
2530
|
+
"page-sizes": l.value,
|
|
2531
|
+
"per-page": o.value,
|
|
2532
|
+
"onUpdate:perPage": h[0] || (h[0] = (_) => o.value = _)
|
|
2415
2533
|
}, null, 8, ["total", "page-sizes", "per-page"])
|
|
2416
2534
|
])) : F("", !0)
|
|
2417
2535
|
]),
|
|
2418
|
-
|
|
2419
|
-
|
|
2536
|
+
m("div", ra, [
|
|
2537
|
+
i.showClearButton ? (s(), w(c(E), {
|
|
2420
2538
|
key: 0,
|
|
2421
2539
|
outlined: "",
|
|
2422
|
-
class: B(
|
|
2423
|
-
onClick:
|
|
2540
|
+
class: B(i.showExporterButton ? "me-2" : ""),
|
|
2541
|
+
onClick: u,
|
|
2424
2542
|
"data-cy": "clear-all"
|
|
2425
2543
|
}, {
|
|
2426
2544
|
default: v(() => [
|
|
2427
|
-
|
|
2545
|
+
y(c(S), {
|
|
2428
2546
|
icon: "bi:funnel-fill",
|
|
2429
2547
|
width: "24",
|
|
2430
2548
|
height: "24"
|
|
2431
2549
|
}),
|
|
2432
|
-
|
|
2550
|
+
P(" Clear ")
|
|
2433
2551
|
]),
|
|
2434
2552
|
_: 1
|
|
2435
2553
|
}, 8, ["class"])) : F("", !0),
|
|
2436
|
-
|
|
2554
|
+
i.showExporterButton ? (s(), w(c(E), {
|
|
2437
2555
|
key: 1,
|
|
2438
2556
|
outlined: "",
|
|
2439
|
-
onClick:
|
|
2557
|
+
onClick: f,
|
|
2440
2558
|
"data-cy": "exporter"
|
|
2441
2559
|
}, {
|
|
2442
2560
|
default: v(() => [
|
|
2443
|
-
|
|
2561
|
+
y(c(S), {
|
|
2444
2562
|
icon: "typcn:export",
|
|
2445
2563
|
width: "24",
|
|
2446
2564
|
height: "24"
|
|
2447
2565
|
}),
|
|
2448
|
-
|
|
2566
|
+
P(" Export ")
|
|
2449
2567
|
]),
|
|
2450
2568
|
_: 1
|
|
2451
2569
|
})) : F("", !0)
|
|
@@ -2453,111 +2571,111 @@ const Wt = {
|
|
|
2453
2571
|
])
|
|
2454
2572
|
]),
|
|
2455
2573
|
default: v(() => [
|
|
2456
|
-
k(
|
|
2574
|
+
k(i.$slots, "default")
|
|
2457
2575
|
]),
|
|
2458
2576
|
_: 2
|
|
2459
2577
|
}, [
|
|
2460
|
-
|
|
2461
|
-
name:
|
|
2462
|
-
fn: v((
|
|
2463
|
-
k(
|
|
2578
|
+
j(i.$slots, (_, V) => ({
|
|
2579
|
+
name: V,
|
|
2580
|
+
fn: v((M) => [
|
|
2581
|
+
k(i.$slots, V, Q(ee(M || {})))
|
|
2464
2582
|
])
|
|
2465
2583
|
})),
|
|
2466
|
-
|
|
2584
|
+
i.legacyPaginationFooter ? {
|
|
2467
2585
|
name: "paginatorstart",
|
|
2468
2586
|
fn: v(() => [
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
options:
|
|
2473
|
-
modelValue:
|
|
2474
|
-
"onUpdate:modelValue":
|
|
2587
|
+
m("span", da, [
|
|
2588
|
+
ua,
|
|
2589
|
+
y(c(se), {
|
|
2590
|
+
options: l.value,
|
|
2591
|
+
modelValue: o.value,
|
|
2592
|
+
"onUpdate:modelValue": h[1] || (h[1] = (_) => o.value = _),
|
|
2475
2593
|
class: "ms-2"
|
|
2476
2594
|
}, null, 8, ["options", "modelValue"])
|
|
2477
2595
|
])
|
|
2478
2596
|
]),
|
|
2479
2597
|
key: "0"
|
|
2480
2598
|
} : void 0,
|
|
2481
|
-
|
|
2599
|
+
i.legacyPaginationFooter ? {
|
|
2482
2600
|
name: "paginatorend",
|
|
2483
2601
|
fn: v(() => [
|
|
2484
|
-
|
|
2602
|
+
m("span", ca, g(i.total ?? i.value.length) + " " + g(c(X)(i.total ?? i.value.length, "result")) + " across " + g(d.value), 1)
|
|
2485
2603
|
]),
|
|
2486
2604
|
key: "1"
|
|
2487
2605
|
} : void 0
|
|
2488
2606
|
]), 1040, ["rows", "total-records", "filter-display"])
|
|
2489
2607
|
], 64));
|
|
2490
2608
|
}
|
|
2491
|
-
}),
|
|
2609
|
+
}), _l = /* @__PURE__ */ $({
|
|
2492
2610
|
__name: "ForgeFilterHeader",
|
|
2493
2611
|
props: {
|
|
2494
2612
|
dataType: {},
|
|
2495
2613
|
dropdownOptions: {}
|
|
2496
2614
|
},
|
|
2497
2615
|
setup(e) {
|
|
2498
|
-
return (t,
|
|
2499
|
-
const a =
|
|
2500
|
-
return t.dataType === "numeric" ? (s(), w(a,
|
|
2616
|
+
return (t, n) => {
|
|
2617
|
+
const a = ue;
|
|
2618
|
+
return t.dataType === "numeric" ? (s(), w(a, C({ key: 0 }, t.$attrs, { class: "w-100" }), null, 16)) : t.dataType === "date" ? (s(), w(Rt, C({ key: 1 }, t.$attrs, {
|
|
2501
2619
|
"show-icon": !1,
|
|
2502
2620
|
"show-on-focus": !0,
|
|
2503
2621
|
class: "w-100"
|
|
2504
|
-
}), null, 16)) : t.dataType === "select" ? (s(), w(
|
|
2622
|
+
}), null, 16)) : t.dataType === "select" ? (s(), w(c(se), C({ key: 2 }, t.$attrs, {
|
|
2505
2623
|
options: t.dropdownOptions,
|
|
2506
2624
|
class: "dropdown-input w-100"
|
|
2507
|
-
}), null, 16, ["options"])) : t.dataType === "multiselect" ? (s(), w(
|
|
2625
|
+
}), null, 16, ["options"])) : t.dataType === "multiselect" ? (s(), w(c(Oe), C({ key: 3 }, t.$attrs, {
|
|
2508
2626
|
options: t.dropdownOptions,
|
|
2509
2627
|
showToggleAll: !1,
|
|
2510
2628
|
placeholder: " ",
|
|
2511
2629
|
filter: "",
|
|
2512
2630
|
class: "w-100 dropdown-input"
|
|
2513
|
-
}), null, 16, ["options"])) : (s(), w(
|
|
2631
|
+
}), null, 16, ["options"])) : (s(), w(c(ne), C({ key: 4 }, t.$attrs, { class: "w-100" }), null, 16));
|
|
2514
2632
|
};
|
|
2515
2633
|
}
|
|
2516
2634
|
});
|
|
2517
|
-
function
|
|
2518
|
-
const
|
|
2519
|
-
return t = t.map((
|
|
2520
|
-
const
|
|
2521
|
-
let
|
|
2522
|
-
|
|
2523
|
-
file:
|
|
2524
|
-
status:
|
|
2635
|
+
function ye(e, t, n, a) {
|
|
2636
|
+
const l = t.flatMap((o) => o.file);
|
|
2637
|
+
return t = t.map((o) => ({ ...o, status: o.status == "Duplicate" ? "Not Uploaded" : o.status })), e.forEach((o) => {
|
|
2638
|
+
const r = l.findIndex((b) => b.name === o.name);
|
|
2639
|
+
let u = "Not Uploaded";
|
|
2640
|
+
r === -1 ? ((!n.includes(o.type) || !(o.size <= a)) && (u = n.includes(o.type) ? "InvalidFileSize" : "InvalidFileType"), t.unshift({
|
|
2641
|
+
file: o,
|
|
2642
|
+
status: u,
|
|
2525
2643
|
blobFileName: null
|
|
2526
|
-
})) : t[
|
|
2644
|
+
})) : t[r].status = "Duplicate";
|
|
2527
2645
|
}), t;
|
|
2528
2646
|
}
|
|
2529
|
-
async function
|
|
2647
|
+
async function ma(e, t) {
|
|
2530
2648
|
if (e === "Uploaded" && t !== null)
|
|
2531
2649
|
try {
|
|
2532
|
-
await new
|
|
2533
|
-
} catch (
|
|
2534
|
-
if (
|
|
2650
|
+
await new ce(t).delete();
|
|
2651
|
+
} catch (n) {
|
|
2652
|
+
if (n !== "BlobNotFound") {
|
|
2535
2653
|
e = "DeleteFileFailed";
|
|
2536
2654
|
return;
|
|
2537
2655
|
}
|
|
2538
2656
|
}
|
|
2539
2657
|
}
|
|
2540
|
-
function
|
|
2658
|
+
function ie(e, t = !0, n = 1) {
|
|
2541
2659
|
const a = t ? 1e3 : 1024;
|
|
2542
2660
|
if (Math.abs(e) < a)
|
|
2543
2661
|
return e + " B";
|
|
2544
|
-
const
|
|
2545
|
-
let
|
|
2546
|
-
const
|
|
2662
|
+
const l = t ? ["kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"] : ["KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"];
|
|
2663
|
+
let o = -1;
|
|
2664
|
+
const r = 10 ** n;
|
|
2547
2665
|
do
|
|
2548
|
-
e /= a, ++
|
|
2549
|
-
while (Math.round(Math.abs(e) *
|
|
2550
|
-
return e.toFixed(
|
|
2666
|
+
e /= a, ++o;
|
|
2667
|
+
while (Math.round(Math.abs(e) * r) / r >= a && o < l.length - 1);
|
|
2668
|
+
return e.toFixed(n) + " " + l[o];
|
|
2551
2669
|
}
|
|
2552
|
-
function
|
|
2670
|
+
function pa(e) {
|
|
2553
2671
|
return ["image/gif", "image/png", "image/jpeg", "image/svg"].includes(e);
|
|
2554
2672
|
}
|
|
2555
|
-
function
|
|
2673
|
+
function ya(e) {
|
|
2556
2674
|
return URL.createObjectURL(e);
|
|
2557
2675
|
}
|
|
2558
|
-
const
|
|
2676
|
+
const va = { class: "d-flex justify-content-between" }, ba = ["accept", "disabled", "multiple"], fa = /* @__PURE__ */ $({
|
|
2559
2677
|
__name: "UploadButton",
|
|
2560
|
-
props: /* @__PURE__ */
|
|
2678
|
+
props: /* @__PURE__ */ q({
|
|
2561
2679
|
acceptedFileTypes: {},
|
|
2562
2680
|
maxFileInput: {},
|
|
2563
2681
|
showDragDropArea: { type: Boolean }
|
|
@@ -2567,54 +2685,54 @@ const ca = { class: "d-flex justify-content-between" }, ma = ["accept", "disable
|
|
|
2567
2685
|
}),
|
|
2568
2686
|
emits: ["update:modelValue"],
|
|
2569
2687
|
setup(e) {
|
|
2570
|
-
const t =
|
|
2571
|
-
t.value =
|
|
2688
|
+
const t = R(e, "modelValue"), n = x(() => e.maxFileInput <= t.value.length), a = (l) => {
|
|
2689
|
+
t.value = ye(l, t.value, e.acceptedFileTypes, e.maxFileInput);
|
|
2572
2690
|
};
|
|
2573
|
-
return (
|
|
2574
|
-
k(
|
|
2575
|
-
|
|
2576
|
-
|
|
2691
|
+
return (l, o) => (s(), p("div", va, [
|
|
2692
|
+
k(l.$slots, "message"),
|
|
2693
|
+
m("div", null, [
|
|
2694
|
+
m("input", {
|
|
2577
2695
|
id: "file-input",
|
|
2578
2696
|
type: "file",
|
|
2579
2697
|
class: "d-none",
|
|
2580
|
-
accept:
|
|
2581
|
-
disabled:
|
|
2582
|
-
multiple:
|
|
2583
|
-
onInput:
|
|
2584
|
-
}, null, 40,
|
|
2585
|
-
|
|
2586
|
-
class: B([{ disabled:
|
|
2698
|
+
accept: l.acceptedFileTypes.join(", "),
|
|
2699
|
+
disabled: n.value,
|
|
2700
|
+
multiple: l.maxFileInput > 1,
|
|
2701
|
+
onInput: o[0] || (o[0] = (r) => a([...r.target.files]))
|
|
2702
|
+
}, null, 40, ba),
|
|
2703
|
+
m("label", {
|
|
2704
|
+
class: B([{ disabled: n.value }, "btn btn-primary"]),
|
|
2587
2705
|
id: "file-input-button",
|
|
2588
2706
|
for: "file-input"
|
|
2589
2707
|
}, [
|
|
2590
|
-
k(
|
|
2591
|
-
|
|
2708
|
+
k(l.$slots, "button-content", {}, () => [
|
|
2709
|
+
y(c(S), {
|
|
2592
2710
|
icon: "bi:upload",
|
|
2593
2711
|
class: "me-2",
|
|
2594
2712
|
height: "20px",
|
|
2595
2713
|
width: "20px"
|
|
2596
2714
|
}),
|
|
2597
|
-
|
|
2715
|
+
P(" Browse your computer ")
|
|
2598
2716
|
])
|
|
2599
2717
|
], 2)
|
|
2600
2718
|
]),
|
|
2601
|
-
|
|
2719
|
+
l.showDragDropArea ? (s(), p("div", {
|
|
2602
2720
|
class: "ms-auto",
|
|
2603
|
-
key:
|
|
2721
|
+
key: l.acceptedFileTypes.length,
|
|
2604
2722
|
id: "accepted-file-types"
|
|
2605
|
-
}, "Accepted File Types: " + g(
|
|
2723
|
+
}, "Accepted File Types: " + g(l.acceptedFileTypes.map((r) => r.split("/").pop()).join(", ")), 1)) : F("", !0)
|
|
2606
2724
|
]));
|
|
2607
2725
|
}
|
|
2608
|
-
}),
|
|
2726
|
+
}), ga = {
|
|
2609
2727
|
key: 0,
|
|
2610
2728
|
class: "py-4 px-3",
|
|
2611
2729
|
id: "placeholder-message"
|
|
2612
|
-
},
|
|
2730
|
+
}, ha = {
|
|
2613
2731
|
key: 1,
|
|
2614
2732
|
class: "d-flex flex-column"
|
|
2615
|
-
},
|
|
2733
|
+
}, wa = /* @__PURE__ */ $({
|
|
2616
2734
|
__name: "DragDropArea",
|
|
2617
|
-
props: /* @__PURE__ */
|
|
2735
|
+
props: /* @__PURE__ */ q({
|
|
2618
2736
|
maxFileInput: {},
|
|
2619
2737
|
maxFileSize: {},
|
|
2620
2738
|
acceptedFileTypes: {}
|
|
@@ -2624,30 +2742,30 @@ const ca = { class: "d-flex justify-content-between" }, ma = ["accept", "disable
|
|
|
2624
2742
|
}),
|
|
2625
2743
|
emits: ["update:modelValue"],
|
|
2626
2744
|
setup(e) {
|
|
2627
|
-
const t =
|
|
2628
|
-
|
|
2745
|
+
const t = R(e, "modelValue"), n = T(!1), a = x(() => e.maxFileInput <= t.value.length), l = (o) => {
|
|
2746
|
+
n.value = !1, o.dataTransfer.files.length > e.maxFileInput || a.value ? o.preventDefault() : t.value = ye([...o.dataTransfer.files], t.value, e.acceptedFileTypes, e.maxFileSize);
|
|
2629
2747
|
};
|
|
2630
|
-
return (
|
|
2748
|
+
return (o, r) => (s(), p("div", {
|
|
2631
2749
|
id: "drag-drop-area",
|
|
2632
|
-
class: B(`${
|
|
2633
|
-
onDragleave:
|
|
2634
|
-
onDragover:
|
|
2635
|
-
onDrop:
|
|
2750
|
+
class: B(`${n.value ? "border-2 border-primary bg-body-tertiary" : ""} mt-3 file-container border-dashed border-2`),
|
|
2751
|
+
onDragleave: r[0] || (r[0] = G((u) => n.value = !1, ["prevent"])),
|
|
2752
|
+
onDragover: r[1] || (r[1] = G((u) => n.value = !0, ["prevent"])),
|
|
2753
|
+
onDrop: G(l, ["prevent"])
|
|
2636
2754
|
}, [
|
|
2637
|
-
t.value.length === 0 ? (s(), p("div",
|
|
2638
|
-
|
|
2755
|
+
t.value.length === 0 ? (s(), p("div", ga, [
|
|
2756
|
+
y(c(S), {
|
|
2639
2757
|
icon: "bi:upload",
|
|
2640
2758
|
class: "me-2",
|
|
2641
2759
|
height: "20px",
|
|
2642
2760
|
width: "20px"
|
|
2643
2761
|
}),
|
|
2644
|
-
|
|
2645
|
-
])) : (s(), p("div",
|
|
2646
|
-
k(
|
|
2762
|
+
P(" Drag and drop files here ")
|
|
2763
|
+
])) : (s(), p("div", ha, [
|
|
2764
|
+
k(o.$slots, "default")
|
|
2647
2765
|
]))
|
|
2648
2766
|
], 34));
|
|
2649
2767
|
}
|
|
2650
|
-
}),
|
|
2768
|
+
}), xa = { class: "d-flex align-items-center me-2" }, ka = /* @__PURE__ */ $({
|
|
2651
2769
|
__name: "UploadStatus",
|
|
2652
2770
|
props: {
|
|
2653
2771
|
fileSize: {},
|
|
@@ -2656,12 +2774,12 @@ const ca = { class: "d-flex justify-content-between" }, ma = ["accept", "disable
|
|
|
2656
2774
|
uploadStatus: {}
|
|
2657
2775
|
},
|
|
2658
2776
|
setup(e) {
|
|
2659
|
-
const t =
|
|
2777
|
+
const t = x(() => e.uploadStatus === "Failed" || e.uploadStatus === "InvalidFileType" || e.uploadStatus === "InvalidFileSize" ? "danger" : "warning"), n = x(() => {
|
|
2660
2778
|
switch (e.uploadStatus) {
|
|
2661
2779
|
case "InvalidFileType":
|
|
2662
2780
|
return "Upload Failed: File type is not accepted.";
|
|
2663
2781
|
case "InvalidFileSize":
|
|
2664
|
-
return `Upload Failed: File size exceeds the ${
|
|
2782
|
+
return `Upload Failed: File size exceeds the ${ie(e.maxFileSize)} limit.`;
|
|
2665
2783
|
case "Aborted":
|
|
2666
2784
|
return "Upload Failed: User cancelled.";
|
|
2667
2785
|
case "DeleteFileFailed":
|
|
@@ -2672,43 +2790,43 @@ const ca = { class: "d-flex justify-content-between" }, ma = ["accept", "disable
|
|
|
2672
2790
|
return "Upload Failed: Connection error, please try again.";
|
|
2673
2791
|
}
|
|
2674
2792
|
});
|
|
2675
|
-
return (a,
|
|
2676
|
-
a.uploadStatus === "Uploading" ? (s(), w(
|
|
2793
|
+
return (a, l) => (s(), p("div", xa, [
|
|
2794
|
+
a.uploadStatus === "Uploading" ? (s(), w(qt, {
|
|
2677
2795
|
key: 0,
|
|
2678
2796
|
pixelWidth: 200,
|
|
2679
2797
|
animate: "",
|
|
2680
2798
|
striped: ""
|
|
2681
2799
|
}, {
|
|
2682
2800
|
default: v(() => [
|
|
2683
|
-
|
|
2801
|
+
P(g((a.bytesUploaded / a.fileSize * 100).toFixed(0)) + "%", 1)
|
|
2684
2802
|
]),
|
|
2685
2803
|
_: 1
|
|
2686
2804
|
})) : F("", !0),
|
|
2687
|
-
a.uploadStatus !== "Uploading" && a.uploadStatus !== "Not Uploaded" && a.uploadStatus !== "Uploaded" && a.uploadStatus !== "Preparing" ? (s(), w(
|
|
2805
|
+
a.uploadStatus !== "Uploading" && a.uploadStatus !== "Not Uploaded" && a.uploadStatus !== "Uploaded" && a.uploadStatus !== "Preparing" ? (s(), w(ae, {
|
|
2688
2806
|
key: 1,
|
|
2689
2807
|
id: "upload-status-alert",
|
|
2690
2808
|
severity: t.value,
|
|
2691
2809
|
class: "mb-0 w-75 ms-auto"
|
|
2692
2810
|
}, {
|
|
2693
2811
|
default: v(() => [
|
|
2694
|
-
|
|
2812
|
+
P(g(n.value), 1)
|
|
2695
2813
|
]),
|
|
2696
2814
|
_: 1
|
|
2697
2815
|
}, 8, ["severity"])) : F("", !0)
|
|
2698
2816
|
]));
|
|
2699
2817
|
}
|
|
2700
|
-
}),
|
|
2818
|
+
}), _a = ["data-cy"], $a = { class: "ms-3 d-flex flex-column" }, Fa = {
|
|
2701
2819
|
key: 1,
|
|
2702
2820
|
id: "file-name"
|
|
2703
|
-
},
|
|
2821
|
+
}, Ba = {
|
|
2704
2822
|
class: "text-black-50",
|
|
2705
2823
|
id: "file-type"
|
|
2706
|
-
},
|
|
2824
|
+
}, Sa = {
|
|
2707
2825
|
class: "text-black-50",
|
|
2708
2826
|
id: "file-size"
|
|
2709
|
-
},
|
|
2827
|
+
}, Ca = { class: "ms-auto my-auto d-flex" }, Va = /* @__PURE__ */ $({
|
|
2710
2828
|
__name: "FileInfo",
|
|
2711
|
-
props: /* @__PURE__ */
|
|
2829
|
+
props: /* @__PURE__ */ q({
|
|
2712
2830
|
editableFileName: { type: Boolean },
|
|
2713
2831
|
acceptedFileTypes: {},
|
|
2714
2832
|
maxFileSize: {},
|
|
@@ -2723,57 +2841,57 @@ const ca = { class: "d-flex justify-content-between" }, ma = ["accept", "disable
|
|
|
2723
2841
|
uploadStatus: { required: !0 },
|
|
2724
2842
|
uploadStatusModifiers: {}
|
|
2725
2843
|
}),
|
|
2726
|
-
emits: /* @__PURE__ */
|
|
2844
|
+
emits: /* @__PURE__ */ q(["deleted"], ["update:file", "update:blobFileName", "update:uploadStatus"]),
|
|
2727
2845
|
setup(e, { emit: t }) {
|
|
2728
|
-
const
|
|
2729
|
-
|
|
2730
|
-
},
|
|
2731
|
-
if (!
|
|
2732
|
-
|
|
2846
|
+
const n = R(e, "file"), a = R(e, "blobFileName"), l = R(e, "uploadStatus"), o = t, r = T(n.value.name), u = T(""), b = T(0), d = T(), f = x(() => e.acceptedFileTypes.includes(n.value.type)), i = x(() => n.value.size <= e.maxFileSize), h = () => {
|
|
2847
|
+
n.value = new File([n.value], r.value, { type: n.value.type, lastModified: (/* @__PURE__ */ new Date()).valueOf() });
|
|
2848
|
+
}, _ = async () => {
|
|
2849
|
+
if (!f.value || !i.value) {
|
|
2850
|
+
l.value = f.value ? "InvalidFileSize" : "InvalidFileType";
|
|
2733
2851
|
return;
|
|
2734
2852
|
}
|
|
2735
|
-
|
|
2736
|
-
const [
|
|
2737
|
-
if (!
|
|
2738
|
-
|
|
2853
|
+
l.value = "Preparing", d.value = new AbortController();
|
|
2854
|
+
const [M, I] = await e.getFileUrlAction(n.value.name);
|
|
2855
|
+
if (!M) {
|
|
2856
|
+
l.value = "Failed";
|
|
2739
2857
|
return;
|
|
2740
2858
|
}
|
|
2741
2859
|
try {
|
|
2742
|
-
|
|
2743
|
-
const z = new
|
|
2744
|
-
abortSignal:
|
|
2745
|
-
onProgress: (
|
|
2860
|
+
l.value = "Uploading";
|
|
2861
|
+
const z = new ce(M), N = {
|
|
2862
|
+
abortSignal: d.value.signal,
|
|
2863
|
+
onProgress: (le) => b.value = le.loadedBytes,
|
|
2746
2864
|
tags: { temp: "true" }
|
|
2747
2865
|
};
|
|
2748
|
-
await z.uploadData(
|
|
2866
|
+
await z.uploadData(n.value, N), u.value = M, l.value = "Uploaded", a.value = I;
|
|
2749
2867
|
} catch (z) {
|
|
2750
2868
|
if (z.name === "AbortError") {
|
|
2751
|
-
|
|
2869
|
+
l.value = "Aborted";
|
|
2752
2870
|
return;
|
|
2753
2871
|
}
|
|
2754
|
-
|
|
2872
|
+
l.value = "Failed";
|
|
2755
2873
|
}
|
|
2756
|
-
},
|
|
2757
|
-
await
|
|
2874
|
+
}, V = async () => {
|
|
2875
|
+
await ma(l.value, u.value), o("deleted", n.value);
|
|
2758
2876
|
};
|
|
2759
|
-
return
|
|
2760
|
-
e.autoUploadToBlob &&
|
|
2761
|
-
}), (
|
|
2762
|
-
const z =
|
|
2877
|
+
return oe(() => {
|
|
2878
|
+
e.autoUploadToBlob && _();
|
|
2879
|
+
}), (M, I) => {
|
|
2880
|
+
const z = E;
|
|
2763
2881
|
return s(), p("div", {
|
|
2764
2882
|
class: "py-4 px-3 d-flex",
|
|
2765
|
-
"data-cy": `file-info-${
|
|
2883
|
+
"data-cy": `file-info-${n.value.name}`
|
|
2766
2884
|
}, [
|
|
2767
|
-
|
|
2768
|
-
|
|
2885
|
+
m("div", null, [
|
|
2886
|
+
c(pa)(n.value.type) ? (s(), w(c(De), {
|
|
2769
2887
|
key: 0,
|
|
2770
2888
|
id: "thumbnail-image",
|
|
2771
2889
|
"image-class": "image-file-thumbnail border",
|
|
2772
|
-
src:
|
|
2773
|
-
alt:
|
|
2890
|
+
src: c(ya)(n.value),
|
|
2891
|
+
alt: n.value.name,
|
|
2774
2892
|
width: "75px",
|
|
2775
2893
|
preview: ""
|
|
2776
|
-
}, null, 8, ["src", "alt"])) : (s(), w(
|
|
2894
|
+
}, null, 8, ["src", "alt"])) : (s(), w(c(S), {
|
|
2777
2895
|
key: 1,
|
|
2778
2896
|
id: "file-earmark",
|
|
2779
2897
|
icon: "bi:file-earmark",
|
|
@@ -2781,78 +2899,78 @@ const ca = { class: "d-flex justify-content-between" }, ma = ["accept", "disable
|
|
|
2781
2899
|
width: "75px"
|
|
2782
2900
|
}))
|
|
2783
2901
|
]),
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2902
|
+
m("div", $a, [
|
|
2903
|
+
m("div", null, [
|
|
2904
|
+
M.editableFileName ? (s(), w(kt, {
|
|
2787
2905
|
key: 0,
|
|
2788
2906
|
id: "edit-file-name",
|
|
2789
|
-
modelValue:
|
|
2790
|
-
"onUpdate:modelValue":
|
|
2791
|
-
rules:
|
|
2792
|
-
name:
|
|
2793
|
-
"complete-action":
|
|
2794
|
-
}, null, 8, ["modelValue", "rules", "name"])) : (s(), p("span",
|
|
2907
|
+
modelValue: r.value,
|
|
2908
|
+
"onUpdate:modelValue": I[0] || (I[0] = (N) => r.value = N),
|
|
2909
|
+
rules: M.customFileNameRules,
|
|
2910
|
+
name: n.value.name,
|
|
2911
|
+
"complete-action": h
|
|
2912
|
+
}, null, 8, ["modelValue", "rules", "name"])) : (s(), p("span", Fa, g(n.value.name), 1))
|
|
2795
2913
|
]),
|
|
2796
|
-
|
|
2797
|
-
|
|
2914
|
+
m("span", Ba, "File type: " + g(n.value.type.split("/").pop()), 1),
|
|
2915
|
+
m("span", Sa, "File size: " + g(c(ie)(n.value.size)), 1)
|
|
2798
2916
|
]),
|
|
2799
|
-
|
|
2800
|
-
(s(), w(
|
|
2801
|
-
key:
|
|
2802
|
-
"file-size":
|
|
2803
|
-
"upload-status":
|
|
2804
|
-
"bytes-uploaded":
|
|
2805
|
-
"max-file-size":
|
|
2917
|
+
m("div", Ca, [
|
|
2918
|
+
(s(), w(ka, {
|
|
2919
|
+
key: l.value,
|
|
2920
|
+
"file-size": n.value.size,
|
|
2921
|
+
"upload-status": l.value,
|
|
2922
|
+
"bytes-uploaded": b.value,
|
|
2923
|
+
"max-file-size": M.maxFileSize
|
|
2806
2924
|
}, null, 8, ["file-size", "upload-status", "bytes-uploaded", "max-file-size"])),
|
|
2807
|
-
|
|
2925
|
+
l.value === "Not Uploaded" || l.value === "Failed" || l.value === "Duplicate" || l.value === "Aborted" ? (s(), w(z, {
|
|
2808
2926
|
key: 0,
|
|
2809
2927
|
link: "",
|
|
2810
|
-
onClick:
|
|
2928
|
+
onClick: _
|
|
2811
2929
|
}, {
|
|
2812
2930
|
default: v(() => [
|
|
2813
|
-
|
|
2814
|
-
icon:
|
|
2931
|
+
y(c(S), {
|
|
2932
|
+
icon: l.value === "Not Uploaded" || l.value === "Duplicate" ? "bi:upload" : "bi:arrow-clockwise"
|
|
2815
2933
|
}, null, 8, ["icon"])
|
|
2816
2934
|
]),
|
|
2817
2935
|
_: 1
|
|
2818
2936
|
})) : F("", !0),
|
|
2819
|
-
|
|
2937
|
+
l.value === "Uploading" ? (s(), w(z, {
|
|
2820
2938
|
key: 1,
|
|
2821
2939
|
link: "",
|
|
2822
|
-
onClick:
|
|
2940
|
+
onClick: I[1] || (I[1] = (N) => d.value.value.abort())
|
|
2823
2941
|
}, {
|
|
2824
2942
|
default: v(() => [
|
|
2825
|
-
|
|
2943
|
+
y(c(S), { icon: "bi:x-circle-fill" })
|
|
2826
2944
|
]),
|
|
2827
2945
|
_: 1
|
|
2828
2946
|
})) : (s(), w(z, {
|
|
2829
2947
|
key: 2,
|
|
2830
2948
|
link: "",
|
|
2831
|
-
onClick:
|
|
2949
|
+
onClick: V,
|
|
2832
2950
|
id: "delete-button"
|
|
2833
2951
|
}, {
|
|
2834
2952
|
default: v(() => [
|
|
2835
|
-
|
|
2953
|
+
y(c(S), { icon: "bi:trash" })
|
|
2836
2954
|
]),
|
|
2837
2955
|
_: 1
|
|
2838
2956
|
}))
|
|
2839
2957
|
])
|
|
2840
|
-
], 8,
|
|
2958
|
+
], 8, _a);
|
|
2841
2959
|
};
|
|
2842
2960
|
}
|
|
2843
|
-
}),
|
|
2961
|
+
}), Ta = { class: "d-flex justify-content-end mt-1" }, Ma = { id: "max-file-size" }, Pa = /* @__PURE__ */ $({
|
|
2844
2962
|
__name: "MaxFileSize",
|
|
2845
2963
|
props: {
|
|
2846
2964
|
maxFileSize: {}
|
|
2847
2965
|
},
|
|
2848
2966
|
setup(e) {
|
|
2849
|
-
return (t,
|
|
2850
|
-
|
|
2967
|
+
return (t, n) => (s(), p("div", Ta, [
|
|
2968
|
+
m("div", Ma, "Max file size: " + g(c(ie)(t.maxFileSize)), 1)
|
|
2851
2969
|
]));
|
|
2852
2970
|
}
|
|
2853
|
-
}),
|
|
2971
|
+
}), Ia = { "data-cy": "file-uploader" }, za = { key: 0 }, $l = /* @__PURE__ */ $({
|
|
2854
2972
|
__name: "ForgeFileUploader",
|
|
2855
|
-
props: /* @__PURE__ */
|
|
2973
|
+
props: /* @__PURE__ */ q({
|
|
2856
2974
|
acceptedFileTypes: {},
|
|
2857
2975
|
maxFileSize: {},
|
|
2858
2976
|
getFileUrlAction: {},
|
|
@@ -2867,69 +2985,69 @@ const ca = { class: "d-flex justify-content-between" }, ma = ["accept", "disable
|
|
|
2867
2985
|
}),
|
|
2868
2986
|
emits: ["update:modelValue"],
|
|
2869
2987
|
setup(e) {
|
|
2870
|
-
const t =
|
|
2871
|
-
t.value = t.value.filter((
|
|
2988
|
+
const t = R(e, "modelValue"), n = e, a = (l) => {
|
|
2989
|
+
t.value = t.value.filter((o) => o.file != l);
|
|
2872
2990
|
};
|
|
2873
|
-
return (
|
|
2874
|
-
|
|
2991
|
+
return (l, o) => (s(), p("div", Ia, [
|
|
2992
|
+
y(fa, C(n, {
|
|
2875
2993
|
modelValue: t.value,
|
|
2876
|
-
"onUpdate:modelValue":
|
|
2994
|
+
"onUpdate:modelValue": o[0] || (o[0] = (r) => t.value = r)
|
|
2877
2995
|
}), null, 16, ["modelValue"]),
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
"max-file-input":
|
|
2881
|
-
"max-file-size":
|
|
2882
|
-
"accepted-file-types":
|
|
2996
|
+
l.showDragDropArea ? (s(), p("div", za, [
|
|
2997
|
+
y(wa, {
|
|
2998
|
+
"max-file-input": n.maxFileInput,
|
|
2999
|
+
"max-file-size": n.maxFileSize,
|
|
3000
|
+
"accepted-file-types": n.acceptedFileTypes,
|
|
2883
3001
|
modelValue: t.value,
|
|
2884
|
-
"onUpdate:modelValue":
|
|
3002
|
+
"onUpdate:modelValue": o[1] || (o[1] = (r) => t.value = r)
|
|
2885
3003
|
}, {
|
|
2886
3004
|
default: v(() => [
|
|
2887
|
-
(s(!0), p(
|
|
2888
|
-
(s(), w(
|
|
2889
|
-
key:
|
|
2890
|
-
class:
|
|
2891
|
-
file: t.value[
|
|
2892
|
-
"onUpdate:file": (
|
|
2893
|
-
"blob-file-name": t.value[
|
|
2894
|
-
"onUpdate:blobFileName": (
|
|
2895
|
-
"upload-status": t.value[
|
|
2896
|
-
"onUpdate:uploadStatus": (
|
|
3005
|
+
(s(!0), p(D, null, j(t.value, ({ file: r }, u) => (s(), p("span", null, [
|
|
3006
|
+
(s(), w(Va, C({
|
|
3007
|
+
key: r.name,
|
|
3008
|
+
class: u === t.value.length - 1 || t.value.length == 1 ? "" : "border-bottom",
|
|
3009
|
+
file: t.value[u].file,
|
|
3010
|
+
"onUpdate:file": (b) => t.value[u].file = b,
|
|
3011
|
+
"blob-file-name": t.value[u].blobFileName,
|
|
3012
|
+
"onUpdate:blobFileName": (b) => t.value[u].blobFileName = b,
|
|
3013
|
+
"upload-status": t.value[u].status,
|
|
3014
|
+
"onUpdate:uploadStatus": (b) => t.value[u].status = b,
|
|
2897
3015
|
ref_for: !0
|
|
2898
|
-
},
|
|
3016
|
+
}, n, { onDeleted: a }), null, 16, ["class", "file", "onUpdate:file", "blob-file-name", "onUpdate:blobFileName", "upload-status", "onUpdate:uploadStatus"]))
|
|
2899
3017
|
]))), 256))
|
|
2900
3018
|
]),
|
|
2901
3019
|
_: 1
|
|
2902
3020
|
}, 8, ["max-file-input", "max-file-size", "accepted-file-types", "modelValue"]),
|
|
2903
|
-
|
|
2904
|
-
"max-file-size":
|
|
3021
|
+
y(Pa, {
|
|
3022
|
+
"max-file-size": n.maxFileSize
|
|
2905
3023
|
}, null, 8, ["max-file-size"])
|
|
2906
3024
|
])) : F("", !0)
|
|
2907
3025
|
]));
|
|
2908
3026
|
}
|
|
2909
3027
|
});
|
|
2910
3028
|
export {
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
3029
|
+
rl as Bootstrap_PT,
|
|
3030
|
+
dl as ForgeActionButton,
|
|
3031
|
+
ae as ForgeAlert,
|
|
3032
|
+
me as ForgeCheckbox,
|
|
3033
|
+
gl as ForgeChips,
|
|
3034
|
+
Rt as ForgeDatepicker,
|
|
3035
|
+
$l as ForgeFileUploader,
|
|
3036
|
+
_l as ForgeFilterHeader,
|
|
3037
|
+
bl as ForgeForm,
|
|
3038
|
+
fl as ForgeFormField,
|
|
3039
|
+
kt as ForgeInlineEditor,
|
|
3040
|
+
ul as ForgeLink,
|
|
3041
|
+
pe as ForgeLoader,
|
|
3042
|
+
cl as ForgeModal,
|
|
3043
|
+
Vt as ForgeMultiSelect,
|
|
3044
|
+
pl as ForgeMultiSelectPreview,
|
|
3045
|
+
ml as ForgeNavbar,
|
|
3046
|
+
yl as ForgePageHeader,
|
|
3047
|
+
qt as ForgeProgressBar,
|
|
3048
|
+
vl as ForgeRemainingCharacters,
|
|
3049
|
+
hl as ForgeStatWidget,
|
|
3050
|
+
wl as ForgeStepper,
|
|
3051
|
+
kl as ForgeTable,
|
|
3052
|
+
xl as ForgeTile
|
|
2935
3053
|
};
|