@3squared/forge-ui-3 0.8.0 → 0.10.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 +961 -827
- package/dist/esm/style.css +1 -1
- package/dist/src/components/ForgeDatepicker.vue.d.ts +3 -0
- package/dist/src/components/ForgeFormField.vue.d.ts +7 -9
- package/dist/src/components/table/ForgeFilterHeader.vue.d.ts +38 -9
- package/dist/src/components/table/ForgeTable.vue.d.ts +1 -1
- package/dist/src/passthroughs/Dropdown.pt.d.ts +1 -0
- package/dist/src/passthroughs/Multiselect.pt.d.ts +7 -1
- package/dist/src/types/forge-types.d.ts +1 -1
- package/package.json +3 -3
- package/src/styles/components/_table.scss +14 -0
- package/src/styles/utilities/_utilities.scss +8 -0
- package/src/types/forge-types.ts +1 -1
package/dist/esm/forge-ui-3.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { defineComponent as
|
|
1
|
+
import he from "primevue/message";
|
|
2
|
+
import { defineComponent as V, openBlock as i, createBlock as h, normalizeProps as ee, guardReactiveProps as te, withCtx as b, createElementVNode as c, normalizeClass as F, unref as m, createCommentVNode as S, createVNode as f, renderSlot as B, ref as I, createElementBlock as y, Fragment as N, mergeProps as C, onMounted as ae, watch as re, computed as k, isRef as le, createTextVNode as O, toDisplayString as w, withDirectives as L, vShow as H, mergeModels as j, useModel as E, createSlots as oe, renderList as q, withKeys as X, useAttrs as ce, withModifiers as Y, normalizeStyle as we } from "vue";
|
|
3
3
|
import { Icon as T } from "@iconify/vue";
|
|
4
4
|
import R from "primevue/button";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { useField as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { vOnClickOutside as
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import Ce from "primevue/
|
|
5
|
+
import xe from "primevue/toast";
|
|
6
|
+
import ke from "primevue/checkbox";
|
|
7
|
+
import { useField as K } from "vee-validate";
|
|
8
|
+
import $e from "primevue/progressspinner";
|
|
9
|
+
import Be from "primevue/dialog";
|
|
10
|
+
import de from "primevue/inputtext";
|
|
11
|
+
import { vOnClickOutside as _e } from "@vueuse/components";
|
|
12
|
+
import Fe from "primevue/menubar";
|
|
13
|
+
import Ve from "vue-multiselect";
|
|
14
|
+
import Se from "primevue/calendar";
|
|
15
|
+
import ne from "primevue/dropdown";
|
|
16
|
+
import Ce from "primevue/inputmask";
|
|
17
|
+
import Te from "primevue/textarea";
|
|
17
18
|
import me from "primevue/inputnumber";
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import ze from "primevue/multiselect";
|
|
19
|
+
import Pe from "primevue/chips";
|
|
20
|
+
import Me from "primevue/progressbar";
|
|
21
|
+
import Ie from "primevue/divider";
|
|
22
|
+
import ze from "primevue/steps";
|
|
23
|
+
import Oe from "primevue/datatable";
|
|
24
|
+
import De from "primevue/multiselect";
|
|
25
25
|
import { BlockBlobClient as pe } from "@azure/storage-blob";
|
|
26
|
-
import
|
|
27
|
-
const
|
|
26
|
+
import Ue from "primevue/image";
|
|
27
|
+
const Ae = {
|
|
28
28
|
button: {
|
|
29
29
|
root: ({ props: e }) => ({
|
|
30
30
|
class: [
|
|
@@ -108,7 +108,7 @@ const De = {
|
|
|
108
108
|
]
|
|
109
109
|
})
|
|
110
110
|
}
|
|
111
|
-
},
|
|
111
|
+
}, Ne = {
|
|
112
112
|
checkbox: {
|
|
113
113
|
root: () => ({
|
|
114
114
|
class: [
|
|
@@ -126,7 +126,7 @@ const De = {
|
|
|
126
126
|
]
|
|
127
127
|
})
|
|
128
128
|
}
|
|
129
|
-
},
|
|
129
|
+
}, Ee = {
|
|
130
130
|
dropdown: {
|
|
131
131
|
root: ({ props: e }) => ({
|
|
132
132
|
class: [
|
|
@@ -148,7 +148,7 @@ const De = {
|
|
|
148
148
|
list: "list-unstyled mb-0 dropdown-menu show w-100",
|
|
149
149
|
item: ({ context: e }) => ({
|
|
150
150
|
class: [
|
|
151
|
-
"dropdown-item d-flex cursor-pointer",
|
|
151
|
+
"dropdown-item d-flex cursor-pointer text-wrap",
|
|
152
152
|
{
|
|
153
153
|
"bg-primary text-white": e.selected
|
|
154
154
|
}
|
|
@@ -184,9 +184,10 @@ const De = {
|
|
|
184
184
|
checkboxicon: "mb-1 fw-medium text-white position-absolute filter-header-multiselect__check-icon",
|
|
185
185
|
clearicon: "ms-auto my-auto",
|
|
186
186
|
loadingIcon: "spinner-border spinner-border-sm border-0",
|
|
187
|
-
itemGroupLabel: "ps-2 fw-bold"
|
|
187
|
+
itemGroupLabel: "ps-2 fw-bold",
|
|
188
|
+
input: "w-100"
|
|
188
189
|
}
|
|
189
|
-
},
|
|
190
|
+
}, Re = {
|
|
190
191
|
column: {
|
|
191
192
|
sortBadge: "ms-2 my-auto cursor-pointer",
|
|
192
193
|
headerCell: (e) => {
|
|
@@ -282,7 +283,7 @@ const De = {
|
|
|
282
283
|
]
|
|
283
284
|
})
|
|
284
285
|
}
|
|
285
|
-
},
|
|
286
|
+
}, Le = {
|
|
286
287
|
inputtext: {
|
|
287
288
|
root: (e) => {
|
|
288
289
|
var t, l;
|
|
@@ -297,7 +298,7 @@ const De = {
|
|
|
297
298
|
};
|
|
298
299
|
}
|
|
299
300
|
}
|
|
300
|
-
},
|
|
301
|
+
}, je = {
|
|
301
302
|
inputmask: {
|
|
302
303
|
root: () => ({
|
|
303
304
|
class: [
|
|
@@ -305,12 +306,12 @@ const De = {
|
|
|
305
306
|
]
|
|
306
307
|
})
|
|
307
308
|
}
|
|
308
|
-
},
|
|
309
|
+
}, He = {
|
|
309
310
|
inputSwitch: {
|
|
310
311
|
root: "form-check form-switch",
|
|
311
312
|
input: "form-check-input"
|
|
312
313
|
}
|
|
313
|
-
},
|
|
314
|
+
}, Ye = {
|
|
314
315
|
textarea: {
|
|
315
316
|
root: () => ({
|
|
316
317
|
class: [
|
|
@@ -318,13 +319,13 @@ const De = {
|
|
|
318
319
|
]
|
|
319
320
|
})
|
|
320
321
|
}
|
|
321
|
-
},
|
|
322
|
+
}, qe = {
|
|
322
323
|
// More PassThrough options in component file.
|
|
323
324
|
chips: {
|
|
324
325
|
root: "d-flex",
|
|
325
326
|
label: "pe-2"
|
|
326
327
|
}
|
|
327
|
-
},
|
|
328
|
+
}, Ge = {
|
|
328
329
|
dialog: {
|
|
329
330
|
header: () => ({
|
|
330
331
|
class: ["modal-header"]
|
|
@@ -367,7 +368,7 @@ const De = {
|
|
|
367
368
|
]
|
|
368
369
|
})
|
|
369
370
|
}
|
|
370
|
-
},
|
|
371
|
+
}, Ke = {
|
|
371
372
|
overlaypanel: {
|
|
372
373
|
root: (e) => ({
|
|
373
374
|
class: [
|
|
@@ -381,7 +382,7 @@ const De = {
|
|
|
381
382
|
content: "d-flex position-relative",
|
|
382
383
|
closeButton: "position-absolute top-0 end-0 p-1 btn btn-link text-black ms-2"
|
|
383
384
|
}
|
|
384
|
-
},
|
|
385
|
+
}, We = {
|
|
385
386
|
message: {
|
|
386
387
|
root: ({ props: e }) => ({
|
|
387
388
|
class: [
|
|
@@ -410,13 +411,13 @@ const De = {
|
|
|
410
411
|
class: ["px-0 ms-2 btn d-flex"]
|
|
411
412
|
})
|
|
412
413
|
}
|
|
413
|
-
},
|
|
414
|
+
}, Ze = {
|
|
414
415
|
// More PT options defined in ForgeStepper.
|
|
415
416
|
steps: {
|
|
416
417
|
root: "w-100 mx-2 line",
|
|
417
418
|
menu: "p-0 m-0 list-unstyled d-flex justify-content-between "
|
|
418
419
|
}
|
|
419
|
-
},
|
|
420
|
+
}, Je = {
|
|
420
421
|
tabview: {
|
|
421
422
|
navContainer: () => ({
|
|
422
423
|
class: ["nav nav-tabs position-relative"]
|
|
@@ -454,7 +455,7 @@ const De = {
|
|
|
454
455
|
class: ["p-2"]
|
|
455
456
|
})
|
|
456
457
|
}
|
|
457
|
-
},
|
|
458
|
+
}, Xe = {
|
|
458
459
|
// More PassThrough options defined in ForgeDatepicker.
|
|
459
460
|
calendar: {
|
|
460
461
|
root: "d-inline-flex relative w-100",
|
|
@@ -527,7 +528,7 @@ const De = {
|
|
|
527
528
|
decrementButton: "btn btn-sm",
|
|
528
529
|
incrementButton: "btn btn-sm"
|
|
529
530
|
}
|
|
530
|
-
},
|
|
531
|
+
}, Qe = {
|
|
531
532
|
multiselect: {
|
|
532
533
|
root: ({ props: e }) => ({
|
|
533
534
|
class: [
|
|
@@ -541,15 +542,24 @@ const De = {
|
|
|
541
542
|
list: "list-unstyled mb-0",
|
|
542
543
|
item: "dropdown-item d-flex cursor-pointer",
|
|
543
544
|
header: "d-flex",
|
|
545
|
+
labelContainer: "w-100",
|
|
546
|
+
label: "w-100",
|
|
544
547
|
filterContainer: "d-flex w-100",
|
|
545
548
|
filterIcon: "d-none",
|
|
546
549
|
filterInput: "form-control form-control-sm my-2 mx-3",
|
|
547
550
|
closeButton: "d-none",
|
|
548
551
|
hiddenInput: "d-none",
|
|
549
552
|
emptymessage: "mx-3 my-2",
|
|
550
|
-
trigger:
|
|
553
|
+
trigger: ({ state: e }) => ({
|
|
554
|
+
class: [
|
|
555
|
+
"ms-auto my-auto",
|
|
556
|
+
{
|
|
557
|
+
"rotate-180": e.overlayVisible
|
|
558
|
+
}
|
|
559
|
+
]
|
|
560
|
+
})
|
|
551
561
|
}
|
|
552
|
-
},
|
|
562
|
+
}, et = {
|
|
553
563
|
// More PassThrough options in component file.
|
|
554
564
|
progressbar: {
|
|
555
565
|
root: () => ({
|
|
@@ -562,7 +572,7 @@ const De = {
|
|
|
562
572
|
class: ["text-white"]
|
|
563
573
|
})
|
|
564
574
|
}
|
|
565
|
-
},
|
|
575
|
+
}, tt = {
|
|
566
576
|
// More PT options can be found in the ForgeTable file.
|
|
567
577
|
dataTable: {
|
|
568
578
|
datatable: "position-relative",
|
|
@@ -622,7 +632,7 @@ const De = {
|
|
|
622
632
|
]
|
|
623
633
|
})
|
|
624
634
|
}
|
|
625
|
-
},
|
|
635
|
+
}, at = {
|
|
626
636
|
badge: {
|
|
627
637
|
root: ({ props: e }) => ({
|
|
628
638
|
class: [
|
|
@@ -643,7 +653,7 @@ const De = {
|
|
|
643
653
|
]
|
|
644
654
|
})
|
|
645
655
|
}
|
|
646
|
-
},
|
|
656
|
+
}, lt = {
|
|
647
657
|
// More PassThrough options in component file.
|
|
648
658
|
menubar: {
|
|
649
659
|
menu: ({ instance: e }) => ({
|
|
@@ -713,7 +723,7 @@ const De = {
|
|
|
713
723
|
]
|
|
714
724
|
})
|
|
715
725
|
}
|
|
716
|
-
},
|
|
726
|
+
}, ot = {
|
|
717
727
|
tooltip: {
|
|
718
728
|
root: ({ context: e }) => ({
|
|
719
729
|
class: [
|
|
@@ -735,7 +745,7 @@ const De = {
|
|
|
735
745
|
class: ["tooltip-inner"]
|
|
736
746
|
}
|
|
737
747
|
}
|
|
738
|
-
},
|
|
748
|
+
}, nt = {
|
|
739
749
|
selectbutton: {
|
|
740
750
|
root: () => ({
|
|
741
751
|
class: ["btn-group"]
|
|
@@ -753,7 +763,7 @@ const De = {
|
|
|
753
763
|
]
|
|
754
764
|
})
|
|
755
765
|
}
|
|
756
|
-
},
|
|
766
|
+
}, st = {
|
|
757
767
|
progressspinner: {
|
|
758
768
|
spinner: () => ({
|
|
759
769
|
class: [
|
|
@@ -761,7 +771,7 @@ const De = {
|
|
|
761
771
|
]
|
|
762
772
|
})
|
|
763
773
|
}
|
|
764
|
-
},
|
|
774
|
+
}, it = {
|
|
765
775
|
card: {
|
|
766
776
|
root: () => ({
|
|
767
777
|
class: ["card"]
|
|
@@ -785,11 +795,11 @@ const De = {
|
|
|
785
795
|
class: ["card-header"]
|
|
786
796
|
})
|
|
787
797
|
}
|
|
788
|
-
},
|
|
798
|
+
}, rt = {
|
|
789
799
|
divider: {
|
|
790
800
|
root: "border-bottom m-4 w-100"
|
|
791
801
|
}
|
|
792
|
-
},
|
|
802
|
+
}, dt = {
|
|
793
803
|
image: {
|
|
794
804
|
root: "position-relative d-inline-block",
|
|
795
805
|
button: "preview-button",
|
|
@@ -802,7 +812,7 @@ const De = {
|
|
|
802
812
|
zoominbutton: "btn text-white",
|
|
803
813
|
closebutton: "btn text-white"
|
|
804
814
|
}
|
|
805
|
-
},
|
|
815
|
+
}, ut = {
|
|
806
816
|
toast: {
|
|
807
817
|
message: () => ({
|
|
808
818
|
class: ["toast-container w-100 position-relative"]
|
|
@@ -840,37 +850,37 @@ const De = {
|
|
|
840
850
|
};
|
|
841
851
|
}
|
|
842
852
|
}
|
|
843
|
-
},
|
|
844
|
-
...
|
|
845
|
-
...De,
|
|
846
|
-
...nt,
|
|
847
|
-
...Ue,
|
|
848
|
-
...je,
|
|
849
|
-
...Ne,
|
|
850
|
-
...Ze,
|
|
851
|
-
...Ye,
|
|
852
|
-
...st,
|
|
853
|
+
}, cl = {
|
|
854
|
+
...at,
|
|
853
855
|
...Ae,
|
|
854
856
|
...it,
|
|
855
|
-
...
|
|
856
|
-
...Re,
|
|
857
|
-
...Le,
|
|
858
|
-
...Ge,
|
|
859
|
-
...Je,
|
|
860
|
-
...tt,
|
|
857
|
+
...Ne,
|
|
861
858
|
...qe,
|
|
859
|
+
...Re,
|
|
862
860
|
...Xe,
|
|
863
|
-
...
|
|
864
|
-
...lt,
|
|
865
|
-
...Ke,
|
|
866
|
-
...Qe,
|
|
867
|
-
...We,
|
|
861
|
+
...Ge,
|
|
868
862
|
...rt,
|
|
863
|
+
...Ee,
|
|
864
|
+
...dt,
|
|
865
|
+
...Le,
|
|
866
|
+
...je,
|
|
869
867
|
...He,
|
|
868
|
+
...We,
|
|
869
|
+
...Qe,
|
|
870
|
+
...lt,
|
|
871
|
+
...Ke,
|
|
872
|
+
...et,
|
|
873
|
+
...st,
|
|
874
|
+
...nt,
|
|
875
|
+
...Ze,
|
|
876
|
+
...tt,
|
|
877
|
+
...Je,
|
|
878
|
+
...ut,
|
|
879
|
+
...Ye,
|
|
870
880
|
directives: {
|
|
871
|
-
...
|
|
881
|
+
...ot
|
|
872
882
|
}
|
|
873
|
-
},
|
|
883
|
+
}, se = /* @__PURE__ */ V({
|
|
874
884
|
__name: "ForgeAlert",
|
|
875
885
|
props: {
|
|
876
886
|
severity: { default: "primary" },
|
|
@@ -887,32 +897,32 @@ const De = {
|
|
|
887
897
|
setup(e) {
|
|
888
898
|
const t = e;
|
|
889
899
|
return (l, a) => {
|
|
890
|
-
const o =
|
|
891
|
-
return
|
|
892
|
-
messageicon:
|
|
893
|
-
|
|
894
|
-
class:
|
|
900
|
+
const o = he;
|
|
901
|
+
return i(), h(o, ee(te({ ...l.$attrs, ...t })), {
|
|
902
|
+
messageicon: b(() => [
|
|
903
|
+
c("div", {
|
|
904
|
+
class: F(t.icon ? "me-2 pe-1" : "")
|
|
895
905
|
}, [
|
|
896
|
-
t.icon ? (
|
|
906
|
+
t.icon ? (i(), h(m(T), {
|
|
897
907
|
key: 0,
|
|
898
908
|
"data-cy": "message-icon",
|
|
899
909
|
icon: t.icon,
|
|
900
|
-
class:
|
|
910
|
+
class: F(`text-${t.severity}`),
|
|
901
911
|
height: 35
|
|
902
|
-
}, null, 8, ["icon", "class"])) :
|
|
912
|
+
}, null, 8, ["icon", "class"])) : S("", !0)
|
|
903
913
|
], 2)
|
|
904
914
|
]),
|
|
905
|
-
closeicon:
|
|
906
|
-
|
|
915
|
+
closeicon: b(() => [
|
|
916
|
+
f(m(T), { icon: "bi:x" })
|
|
907
917
|
]),
|
|
908
|
-
default:
|
|
909
|
-
|
|
918
|
+
default: b(() => [
|
|
919
|
+
B(l.$slots, "default")
|
|
910
920
|
]),
|
|
911
921
|
_: 3
|
|
912
922
|
}, 16);
|
|
913
923
|
};
|
|
914
924
|
}
|
|
915
|
-
}),
|
|
925
|
+
}), ml = /* @__PURE__ */ V({
|
|
916
926
|
__name: "ForgeActionButton",
|
|
917
927
|
props: {
|
|
918
928
|
action: {},
|
|
@@ -930,19 +940,19 @@ const De = {
|
|
|
930
940
|
}
|
|
931
941
|
t.value = !1;
|
|
932
942
|
};
|
|
933
|
-
return (o,
|
|
934
|
-
const
|
|
935
|
-
return
|
|
936
|
-
|
|
943
|
+
return (o, s) => {
|
|
944
|
+
const d = R;
|
|
945
|
+
return i(), y(N, null, [
|
|
946
|
+
f(d, C({ ...l, ...o.$attrs }, {
|
|
937
947
|
loading: t.value,
|
|
938
948
|
disabled: t.value || l.disabled,
|
|
939
949
|
onClick: a
|
|
940
950
|
}), null, 16, ["loading", "disabled"]),
|
|
941
|
-
|
|
951
|
+
f(m(xe))
|
|
942
952
|
], 64);
|
|
943
953
|
};
|
|
944
954
|
}
|
|
945
|
-
}),
|
|
955
|
+
}), ct = /* @__PURE__ */ c("div", null, null, -1), mt = ["for"], ve = /* @__PURE__ */ V({
|
|
946
956
|
__name: "ForgeCheckbox",
|
|
947
957
|
props: {
|
|
948
958
|
label: { default: "" },
|
|
@@ -969,58 +979,58 @@ const De = {
|
|
|
969
979
|
},
|
|
970
980
|
emits: ["update:modelValue"],
|
|
971
981
|
setup(e, { emit: t }) {
|
|
972
|
-
const l = t, a = e, { checked: o, handleChange:
|
|
982
|
+
const l = t, a = e, { checked: o, handleChange: s, setValue: d, errors: r, errorMessage: v } = K(() => a.name ?? a.label, void 0, {
|
|
973
983
|
type: "checkbox",
|
|
974
984
|
checkedValue: !0
|
|
975
|
-
}),
|
|
976
|
-
a.disabled || (
|
|
985
|
+
}), u = (p) => {
|
|
986
|
+
a.disabled || (s(p), l("update:modelValue", !a.modelValue));
|
|
977
987
|
};
|
|
978
988
|
ae(() => {
|
|
979
|
-
a.value !== void 0 && a.value !== (o == null ? void 0 : o.value) ?
|
|
980
|
-
}),
|
|
981
|
-
|
|
989
|
+
a.value !== void 0 && a.value !== (o == null ? void 0 : o.value) ? d(a.value) : a.modelValue !== void 0 && a.modelValue !== (o == null ? void 0 : o.value) && d(a.modelValue);
|
|
990
|
+
}), re(() => a.value, (p) => {
|
|
991
|
+
d(p);
|
|
982
992
|
});
|
|
983
|
-
const
|
|
993
|
+
const n = k(() => r.value.length > 0);
|
|
984
994
|
return (p, x) => {
|
|
985
|
-
const _ =
|
|
986
|
-
return
|
|
987
|
-
|
|
995
|
+
const _ = ke;
|
|
996
|
+
return i(), y(N, null, [
|
|
997
|
+
c("div", C({
|
|
988
998
|
class: "d-flex",
|
|
989
999
|
"data-cy": "checkbox-container"
|
|
990
1000
|
}, { ...p.$attrs }), [
|
|
991
|
-
|
|
1001
|
+
f(_, C({
|
|
992
1002
|
id: a.name
|
|
993
1003
|
}, { ...a }, {
|
|
994
|
-
modelValue:
|
|
1004
|
+
modelValue: m(o),
|
|
995
1005
|
"onUpdate:modelValue": x[0] || (x[0] = (P) => le(o) ? o.value = P : null),
|
|
996
|
-
"input-class": { "is-invalid":
|
|
997
|
-
onChange:
|
|
1006
|
+
"input-class": { "is-invalid": n.value },
|
|
1007
|
+
onChange: u
|
|
998
1008
|
}), {
|
|
999
|
-
icon:
|
|
1000
|
-
|
|
1009
|
+
icon: b(() => [
|
|
1010
|
+
ct
|
|
1001
1011
|
]),
|
|
1002
1012
|
_: 1
|
|
1003
1013
|
}, 16, ["id", "modelValue", "input-class"]),
|
|
1004
|
-
|
|
1014
|
+
c("label", {
|
|
1005
1015
|
for: a.name,
|
|
1006
|
-
class:
|
|
1007
|
-
onClick:
|
|
1016
|
+
class: F(`${a.disabled ? "opacity-50" : "cursor-pointer"} ${n.value ? "text-danger-dark" : ""}`),
|
|
1017
|
+
onClick: u
|
|
1008
1018
|
}, [
|
|
1009
|
-
|
|
1010
|
-
|
|
1019
|
+
B(p.$slots, "default", {}, () => [
|
|
1020
|
+
O(w(a.label), 1)
|
|
1011
1021
|
])
|
|
1012
|
-
], 10,
|
|
1022
|
+
], 10, mt)
|
|
1013
1023
|
], 16),
|
|
1014
|
-
L(
|
|
1024
|
+
L(c("small", {
|
|
1015
1025
|
"data-cy": "error",
|
|
1016
1026
|
class: "text-invalid"
|
|
1017
|
-
},
|
|
1018
|
-
[
|
|
1027
|
+
}, w(m(v)), 513), [
|
|
1028
|
+
[H, n.value]
|
|
1019
1029
|
])
|
|
1020
1030
|
], 64);
|
|
1021
1031
|
};
|
|
1022
1032
|
}
|
|
1023
|
-
}),
|
|
1033
|
+
}), pt = { class: "forge-loader" }, ye = /* @__PURE__ */ V({
|
|
1024
1034
|
__name: "ForgeLoader",
|
|
1025
1035
|
props: {
|
|
1026
1036
|
severity: { default: "primary" }
|
|
@@ -1028,16 +1038,16 @@ const De = {
|
|
|
1028
1038
|
setup(e) {
|
|
1029
1039
|
const t = e;
|
|
1030
1040
|
return (l, a) => {
|
|
1031
|
-
const o =
|
|
1032
|
-
return
|
|
1033
|
-
|
|
1041
|
+
const o = $e;
|
|
1042
|
+
return i(), y("div", pt, [
|
|
1043
|
+
f(o, {
|
|
1034
1044
|
"animation-duration": ".75",
|
|
1035
|
-
class:
|
|
1045
|
+
class: F(`text-${t.severity === void 0 ? "primary" : t.severity}`)
|
|
1036
1046
|
}, null, 8, ["class"])
|
|
1037
1047
|
]);
|
|
1038
1048
|
};
|
|
1039
1049
|
}
|
|
1040
|
-
}),
|
|
1050
|
+
}), vt = ["href", "target"], pl = /* @__PURE__ */ V({
|
|
1041
1051
|
__name: "ForgeLink",
|
|
1042
1052
|
props: {
|
|
1043
1053
|
url: {},
|
|
@@ -1055,7 +1065,7 @@ const De = {
|
|
|
1055
1065
|
iconName: {}
|
|
1056
1066
|
},
|
|
1057
1067
|
setup(e) {
|
|
1058
|
-
const t =
|
|
1068
|
+
const t = k(() => ({
|
|
1059
1069
|
[`link-${e.severity}`]: e.severity,
|
|
1060
1070
|
[`link-underline-${e.underlineSeverity}`]: e.underlineSeverity,
|
|
1061
1071
|
[`link-opacity-${e.opacity}`]: e.opacity,
|
|
@@ -1064,32 +1074,32 @@ const De = {
|
|
|
1064
1074
|
[`link-underline-opacity-${e.underlineHoverOpacity ?? e.hoverOpacity}-hover`]: e.underlineHoverOpacity || e.hoverOpacity,
|
|
1065
1075
|
[`link-offset-${e.underlineOffset}`]: e.underlineOffset,
|
|
1066
1076
|
"icon-link icon-link-hover": e.animateIconOnHover
|
|
1067
|
-
})), l =
|
|
1077
|
+
})), l = k(() => ({
|
|
1068
1078
|
"order-2": e.positionIconEnd,
|
|
1069
1079
|
"me-1": !e.positionIconEnd && !e.animateIconOnHover,
|
|
1070
1080
|
"ms-1": e.positionIconEnd && !e.animateIconOnHover,
|
|
1071
1081
|
"ms-0": e.positionIconEnd && e.animateIconOnHover,
|
|
1072
1082
|
"me-0": e.animateIconOnHover
|
|
1073
1083
|
}));
|
|
1074
|
-
return (a, o) => (
|
|
1084
|
+
return (a, o) => (i(), y("a", {
|
|
1075
1085
|
id: "link",
|
|
1076
|
-
class:
|
|
1086
|
+
class: F(["cursor-pointer d-flex", t.value]),
|
|
1077
1087
|
href: a.url,
|
|
1078
1088
|
target: a.target
|
|
1079
1089
|
}, [
|
|
1080
|
-
|
|
1081
|
-
a.iconName ? (
|
|
1090
|
+
B(a.$slots, "default", {}, () => [
|
|
1091
|
+
a.iconName ? (i(), h(m(T), {
|
|
1082
1092
|
key: 0,
|
|
1083
1093
|
id: "link-icon",
|
|
1084
1094
|
icon: a.iconName,
|
|
1085
|
-
class:
|
|
1086
|
-
}, null, 8, ["icon", "class"])) :
|
|
1087
|
-
|
|
1095
|
+
class: F(["bi my-auto", l.value])
|
|
1096
|
+
}, null, 8, ["icon", "class"])) : S("", !0),
|
|
1097
|
+
O(" " + w(a.label), 1)
|
|
1088
1098
|
])
|
|
1089
|
-
], 10,
|
|
1099
|
+
], 10, vt));
|
|
1090
1100
|
}
|
|
1091
1101
|
});
|
|
1092
|
-
function
|
|
1102
|
+
function yt(e) {
|
|
1093
1103
|
const t = {
|
|
1094
1104
|
errorMessage: "",
|
|
1095
1105
|
errorDetails: []
|
|
@@ -1100,12 +1110,12 @@ function pt(e) {
|
|
|
1100
1110
|
}
|
|
1101
1111
|
return t.errorMessage === "" && t.errorDetails.length === 0 && (t.errorMessage = e), t;
|
|
1102
1112
|
}
|
|
1103
|
-
const
|
|
1113
|
+
const bt = { key: 0 }, ft = {
|
|
1104
1114
|
class: "d-flex w-100",
|
|
1105
1115
|
"data-cy": "footer"
|
|
1106
|
-
},
|
|
1116
|
+
}, vl = /* @__PURE__ */ V({
|
|
1107
1117
|
__name: "ForgeModal",
|
|
1108
|
-
props: /* @__PURE__ */
|
|
1118
|
+
props: /* @__PURE__ */ j({
|
|
1109
1119
|
cancelText: { default: "Cancel" },
|
|
1110
1120
|
submitText: { default: "Submit" },
|
|
1111
1121
|
showFooter: { type: Boolean, default: !0 },
|
|
@@ -1148,30 +1158,30 @@ const vt = { key: 0 }, yt = {
|
|
|
1148
1158
|
}),
|
|
1149
1159
|
emits: ["update:visible"],
|
|
1150
1160
|
setup(e) {
|
|
1151
|
-
const t = E(e, "visible"), l = I(!1), a = e, o = I(!1),
|
|
1161
|
+
const t = E(e, "visible"), l = I(!1), a = e, o = I(!1), s = I({
|
|
1152
1162
|
hasError: !1,
|
|
1153
1163
|
header: "",
|
|
1154
1164
|
message: []
|
|
1155
|
-
}),
|
|
1165
|
+
}), d = () => {
|
|
1156
1166
|
l.value = !1;
|
|
1157
|
-
},
|
|
1167
|
+
}, r = () => {
|
|
1158
1168
|
l.value = !0;
|
|
1159
|
-
},
|
|
1169
|
+
}, v = () => {
|
|
1160
1170
|
t.value = !1;
|
|
1161
|
-
},
|
|
1171
|
+
}, u = async () => {
|
|
1162
1172
|
if (a.onConfirm) {
|
|
1163
|
-
o.value = !0,
|
|
1173
|
+
o.value = !0, s.value.hasError = !1;
|
|
1164
1174
|
try {
|
|
1165
1175
|
const p = await a.onConfirm();
|
|
1166
|
-
(p || p == null) &&
|
|
1176
|
+
(p || p == null) && v();
|
|
1167
1177
|
} catch (p) {
|
|
1168
|
-
|
|
1169
|
-
const x =
|
|
1170
|
-
|
|
1178
|
+
s.value.hasError = !0;
|
|
1179
|
+
const x = yt(p);
|
|
1180
|
+
s.value.header = x.errorMessage, s.value.message = x.errorDetails;
|
|
1171
1181
|
}
|
|
1172
1182
|
o.value = !1;
|
|
1173
1183
|
}
|
|
1174
|
-
},
|
|
1184
|
+
}, n = k(() => ({
|
|
1175
1185
|
root: [
|
|
1176
1186
|
"modal modal-dialog modal-content h-auto m-0",
|
|
1177
1187
|
{
|
|
@@ -1180,23 +1190,23 @@ const vt = { key: 0 }, yt = {
|
|
|
1180
1190
|
]
|
|
1181
1191
|
}));
|
|
1182
1192
|
return (p, x) => {
|
|
1183
|
-
const _ = R, P =
|
|
1184
|
-
return
|
|
1185
|
-
onMaximize:
|
|
1186
|
-
onUnmaximize:
|
|
1187
|
-
pt:
|
|
1193
|
+
const _ = R, P = Be;
|
|
1194
|
+
return i(), h(P, C(a, {
|
|
1195
|
+
onMaximize: r,
|
|
1196
|
+
onUnmaximize: d,
|
|
1197
|
+
pt: n.value
|
|
1188
1198
|
}), oe({
|
|
1189
|
-
closeicon:
|
|
1190
|
-
|
|
1199
|
+
closeicon: b(() => [
|
|
1200
|
+
f(m(T), {
|
|
1191
1201
|
"data-cy": "close-icon",
|
|
1192
1202
|
icon: "bi:x-lg",
|
|
1193
1203
|
width: "18",
|
|
1194
1204
|
height: "18",
|
|
1195
|
-
onClick:
|
|
1205
|
+
onClick: v
|
|
1196
1206
|
})
|
|
1197
1207
|
]),
|
|
1198
|
-
maximizeicon:
|
|
1199
|
-
|
|
1208
|
+
maximizeicon: b(() => [
|
|
1209
|
+
f(m(T), {
|
|
1200
1210
|
"data-cy": "maximisable-icon",
|
|
1201
1211
|
icon: l.value ? "bi:arrows-angle-contract" : "bi:arrows-angle-expand",
|
|
1202
1212
|
width: "16",
|
|
@@ -1205,46 +1215,46 @@ const vt = { key: 0 }, yt = {
|
|
|
1205
1215
|
]),
|
|
1206
1216
|
_: 2
|
|
1207
1217
|
}, [
|
|
1208
|
-
|
|
1209
|
-
name:
|
|
1210
|
-
fn:
|
|
1211
|
-
|
|
1218
|
+
q(p.$slots, (M, z) => ({
|
|
1219
|
+
name: z,
|
|
1220
|
+
fn: b((g) => [
|
|
1221
|
+
s.value.hasError ? (i(), h(se, {
|
|
1212
1222
|
key: 0,
|
|
1213
1223
|
severity: "danger",
|
|
1214
1224
|
"data-cy": "error"
|
|
1215
1225
|
}, {
|
|
1216
|
-
default:
|
|
1217
|
-
|
|
1218
|
-
class:
|
|
1219
|
-
},
|
|
1220
|
-
|
|
1221
|
-
(
|
|
1222
|
-
])) :
|
|
1226
|
+
default: b(() => [
|
|
1227
|
+
c("p", {
|
|
1228
|
+
class: F(s.value.message.length > 0 ? "my-auto" : "mb-0")
|
|
1229
|
+
}, w(s.value.header), 3),
|
|
1230
|
+
s.value.message.length > 0 ? (i(), y("ul", bt, [
|
|
1231
|
+
(i(!0), y(N, null, q(s.value.message, ($) => (i(), y("li", { key: $ }, w($), 1))), 128))
|
|
1232
|
+
])) : S("", !0)
|
|
1223
1233
|
]),
|
|
1224
1234
|
_: 1
|
|
1225
|
-
})) :
|
|
1226
|
-
|
|
1227
|
-
o.value ?
|
|
1228
|
-
|
|
1229
|
-
]) :
|
|
1235
|
+
})) : S("", !0),
|
|
1236
|
+
B(p.$slots, z, ee(te(g || {}))),
|
|
1237
|
+
o.value ? B(p.$slots, "loader", { key: 1 }, () => [
|
|
1238
|
+
f(ye, { "data-cy": "loader" })
|
|
1239
|
+
]) : S("", !0)
|
|
1230
1240
|
])
|
|
1231
1241
|
})),
|
|
1232
1242
|
p.showFooter ? {
|
|
1233
1243
|
name: "footer",
|
|
1234
|
-
fn:
|
|
1235
|
-
|
|
1236
|
-
|
|
1244
|
+
fn: b(() => [
|
|
1245
|
+
c("div", ft, [
|
|
1246
|
+
f(_, {
|
|
1237
1247
|
label: p.cancelText,
|
|
1238
|
-
class:
|
|
1248
|
+
class: F(a.cancelClass),
|
|
1239
1249
|
outlined: "",
|
|
1240
|
-
onClick:
|
|
1250
|
+
onClick: v,
|
|
1241
1251
|
id: "cancel-button",
|
|
1242
1252
|
type: a.cancelButtonType
|
|
1243
1253
|
}, null, 8, ["label", "class", "type"]),
|
|
1244
|
-
|
|
1254
|
+
f(_, {
|
|
1245
1255
|
label: p.submitText,
|
|
1246
|
-
class:
|
|
1247
|
-
onClick:
|
|
1256
|
+
class: F([a.submitClass, "ms-auto"]),
|
|
1257
|
+
onClick: u,
|
|
1248
1258
|
id: "submit-button",
|
|
1249
1259
|
type: a.submitButtonType
|
|
1250
1260
|
}, null, 8, ["label", "class", "type"])
|
|
@@ -1255,9 +1265,9 @@ const vt = { key: 0 }, yt = {
|
|
|
1255
1265
|
]), 1040, ["pt"]);
|
|
1256
1266
|
};
|
|
1257
1267
|
}
|
|
1258
|
-
}),
|
|
1268
|
+
}), gt = ["id"], ht = { key: 0 }, wt = { key: 0 }, xt = { class: "d-flex justify-content-between align-items-center position-relative" }, kt = { key: 1 }, $t = { "data-cy": "readonly-value" }, Bt = /* @__PURE__ */ V({
|
|
1259
1269
|
__name: "ForgeInlineEditor",
|
|
1260
|
-
props: /* @__PURE__ */
|
|
1270
|
+
props: /* @__PURE__ */ j({
|
|
1261
1271
|
name: { default: "" },
|
|
1262
1272
|
completeAction: {},
|
|
1263
1273
|
errorAction: {},
|
|
@@ -1270,10 +1280,10 @@ const vt = { key: 0 }, yt = {
|
|
|
1270
1280
|
}),
|
|
1271
1281
|
emits: ["update:modelValue"],
|
|
1272
1282
|
setup(e) {
|
|
1273
|
-
const t = e, l = E(e, "modelValue"), a = I(!1), o = I(),
|
|
1283
|
+
const t = e, l = E(e, "modelValue"), a = I(!1), o = I(), s = () => {
|
|
1274
1284
|
var _;
|
|
1275
1285
|
a.value = !a.value, (_ = o.value) == null || _.focus();
|
|
1276
|
-
},
|
|
1286
|
+
}, d = async () => {
|
|
1277
1287
|
if (x.value)
|
|
1278
1288
|
return !1;
|
|
1279
1289
|
if (l.value = p.value, t.completeAction)
|
|
@@ -1284,97 +1294,97 @@ const vt = { key: 0 }, yt = {
|
|
|
1284
1294
|
}
|
|
1285
1295
|
else
|
|
1286
1296
|
a.value = !a.value;
|
|
1287
|
-
},
|
|
1297
|
+
}, r = () => {
|
|
1288
1298
|
a.value = !a.value;
|
|
1289
|
-
},
|
|
1299
|
+
}, v = () => {
|
|
1290
1300
|
p.value = null;
|
|
1291
|
-
}, { errorMessage:
|
|
1301
|
+
}, { errorMessage: u, errors: n, value: p } = K(() => t.name, void 0, {
|
|
1292
1302
|
initialValue: l.value
|
|
1293
1303
|
});
|
|
1294
1304
|
ae(() => {
|
|
1295
1305
|
p.value = l.value;
|
|
1296
1306
|
});
|
|
1297
|
-
const x =
|
|
1307
|
+
const x = k(() => n.value.length > 0);
|
|
1298
1308
|
return (_, P) => {
|
|
1299
|
-
const
|
|
1300
|
-
return
|
|
1309
|
+
const M = de, z = R;
|
|
1310
|
+
return i(), y("div", {
|
|
1301
1311
|
id: t.name
|
|
1302
1312
|
}, [
|
|
1303
|
-
_.readonly ? (
|
|
1304
|
-
|
|
1305
|
-
|
|
1313
|
+
_.readonly ? (i(), y("div", kt, [
|
|
1314
|
+
B(_.$slots, "default", {}, () => [
|
|
1315
|
+
c("span", $t, w(m(p)), 1)
|
|
1306
1316
|
])
|
|
1307
|
-
])) : (
|
|
1308
|
-
a.value ? (
|
|
1309
|
-
L((
|
|
1310
|
-
|
|
1311
|
-
class:
|
|
1312
|
-
editFinished:
|
|
1313
|
-
cancel:
|
|
1314
|
-
val:
|
|
1317
|
+
])) : (i(), y("div", ht, [
|
|
1318
|
+
a.value ? (i(), y("div", wt, [
|
|
1319
|
+
L((i(), y("div", xt, [
|
|
1320
|
+
B(_.$slots, "editor", {
|
|
1321
|
+
class: F({ "is-invalid": x.value }),
|
|
1322
|
+
editFinished: d,
|
|
1323
|
+
cancel: r,
|
|
1324
|
+
val: m(p)
|
|
1315
1325
|
}, () => [
|
|
1316
|
-
|
|
1326
|
+
f(M, {
|
|
1317
1327
|
"data-cy": "input",
|
|
1318
1328
|
ref_key: "input",
|
|
1319
1329
|
ref: o,
|
|
1320
|
-
modelValue:
|
|
1321
|
-
"onUpdate:modelValue": P[0] || (P[0] = (
|
|
1330
|
+
modelValue: m(p),
|
|
1331
|
+
"onUpdate:modelValue": P[0] || (P[0] = (g) => le(p) ? p.value = g : null),
|
|
1322
1332
|
modelModifiers: { trim: !0 },
|
|
1323
|
-
class:
|
|
1333
|
+
class: F({ "is-invalid": x.value }),
|
|
1324
1334
|
onKeydown: [
|
|
1325
|
-
|
|
1326
|
-
|
|
1335
|
+
X(d, ["enter"]),
|
|
1336
|
+
X(r, ["esc"])
|
|
1327
1337
|
]
|
|
1328
1338
|
}, null, 8, ["modelValue", "class"])
|
|
1329
1339
|
]),
|
|
1330
|
-
|
|
1340
|
+
f(m(T), {
|
|
1331
1341
|
icon: "bi:x-circle",
|
|
1332
1342
|
class: "mx-2 cursor-pointer",
|
|
1333
|
-
onClick:
|
|
1334
|
-
onKeydown:
|
|
1343
|
+
onClick: v,
|
|
1344
|
+
onKeydown: X(v, ["enter"]),
|
|
1335
1345
|
"data-cy": "clear-icon"
|
|
1336
1346
|
})
|
|
1337
1347
|
])), [
|
|
1338
|
-
[
|
|
1348
|
+
[m(_e), d]
|
|
1339
1349
|
])
|
|
1340
|
-
])) : (
|
|
1350
|
+
])) : (i(), y("div", {
|
|
1341
1351
|
key: 1,
|
|
1342
1352
|
class: "d-flex text-muted",
|
|
1343
|
-
onClick:
|
|
1344
|
-
onFocus:
|
|
1353
|
+
onClick: s,
|
|
1354
|
+
onFocus: s
|
|
1345
1355
|
}, [
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
class:
|
|
1356
|
+
B(_.$slots, "default", {}, () => [
|
|
1357
|
+
c("div", {
|
|
1358
|
+
class: F(["pe-2 cursor-pointer", { "text-invalid": x.value }]),
|
|
1349
1359
|
"data-cy": "value"
|
|
1350
|
-
},
|
|
1360
|
+
}, w(m(p) ? m(p) : "Click to edit"), 3)
|
|
1351
1361
|
]),
|
|
1352
|
-
|
|
1362
|
+
f(z, {
|
|
1353
1363
|
link: "",
|
|
1354
1364
|
class: "p-0 m-0"
|
|
1355
1365
|
}, {
|
|
1356
|
-
default:
|
|
1357
|
-
|
|
1366
|
+
default: b(() => [
|
|
1367
|
+
f(m(T), {
|
|
1358
1368
|
icon: "bi:pencil",
|
|
1359
|
-
class:
|
|
1369
|
+
class: F(x.value ? "text-invalid" : "text-muted"),
|
|
1360
1370
|
"data-cy": "edit-icon",
|
|
1361
|
-
onKeydown:
|
|
1371
|
+
onKeydown: X(s, ["enter"])
|
|
1362
1372
|
}, null, 8, ["class"])
|
|
1363
1373
|
]),
|
|
1364
1374
|
_: 1
|
|
1365
1375
|
})
|
|
1366
1376
|
], 32))
|
|
1367
1377
|
])),
|
|
1368
|
-
L(
|
|
1378
|
+
L(c("small", {
|
|
1369
1379
|
"data-cy": "error",
|
|
1370
1380
|
class: "text-invalid"
|
|
1371
|
-
},
|
|
1372
|
-
[
|
|
1381
|
+
}, w(m(u)), 513), [
|
|
1382
|
+
[H, x.value]
|
|
1373
1383
|
])
|
|
1374
|
-
], 8,
|
|
1384
|
+
], 8, gt);
|
|
1375
1385
|
};
|
|
1376
1386
|
}
|
|
1377
|
-
}),
|
|
1387
|
+
}), _t = ["href"], yl = /* @__PURE__ */ V({
|
|
1378
1388
|
__name: "ForgeNavbar",
|
|
1379
1389
|
props: {
|
|
1380
1390
|
severity: { default: "light" },
|
|
@@ -1391,7 +1401,7 @@ const vt = { key: 0 }, yt = {
|
|
|
1391
1401
|
unstyled: { type: Boolean }
|
|
1392
1402
|
},
|
|
1393
1403
|
setup(e) {
|
|
1394
|
-
const t = e, l =
|
|
1404
|
+
const t = e, l = k(() => ({
|
|
1395
1405
|
root: () => ({
|
|
1396
1406
|
class: [
|
|
1397
1407
|
"navbar container-fluid navbar-expand-lg",
|
|
@@ -1419,27 +1429,27 @@ const vt = { key: 0 }, yt = {
|
|
|
1419
1429
|
})
|
|
1420
1430
|
}));
|
|
1421
1431
|
return (a, o) => {
|
|
1422
|
-
const
|
|
1423
|
-
return
|
|
1432
|
+
const s = Fe;
|
|
1433
|
+
return i(), h(s, C({ ...t, ...a.$attrs }, {
|
|
1424
1434
|
pt: l.value,
|
|
1425
1435
|
"data-cy": "navbar"
|
|
1426
1436
|
}), oe({
|
|
1427
|
-
start:
|
|
1428
|
-
|
|
1437
|
+
start: b(() => [
|
|
1438
|
+
c("a", {
|
|
1429
1439
|
href: a.logoUrl,
|
|
1430
1440
|
class: "navbar-brand ms-3",
|
|
1431
1441
|
"data-cy": "logo"
|
|
1432
1442
|
}, [
|
|
1433
|
-
|
|
1434
|
-
|
|
1443
|
+
B(a.$slots, "logo", {}, () => [
|
|
1444
|
+
O(" Logo ")
|
|
1435
1445
|
])
|
|
1436
|
-
], 8,
|
|
1446
|
+
], 8, _t)
|
|
1437
1447
|
]),
|
|
1438
|
-
menubuttonicon:
|
|
1439
|
-
|
|
1440
|
-
|
|
1448
|
+
menubuttonicon: b(() => [
|
|
1449
|
+
B(a.$slots, "menubuttonicon", {}, () => [
|
|
1450
|
+
f(m(T), {
|
|
1441
1451
|
icon: "bi:list",
|
|
1442
|
-
class:
|
|
1452
|
+
class: F(t.severity === "light" ? "text-black" : "text-white"),
|
|
1443
1453
|
height: "24",
|
|
1444
1454
|
"data-cy": "burger-icon"
|
|
1445
1455
|
}, null, 8, ["class"])
|
|
@@ -1447,16 +1457,16 @@ const vt = { key: 0 }, yt = {
|
|
|
1447
1457
|
]),
|
|
1448
1458
|
_: 2
|
|
1449
1459
|
}, [
|
|
1450
|
-
|
|
1451
|
-
name:
|
|
1452
|
-
fn:
|
|
1453
|
-
|
|
1460
|
+
q(a.$slots, (d, r) => ({
|
|
1461
|
+
name: r,
|
|
1462
|
+
fn: b((v) => [
|
|
1463
|
+
B(a.$slots, r, ee(te(v)))
|
|
1454
1464
|
])
|
|
1455
1465
|
}))
|
|
1456
1466
|
]), 1040, ["pt"]);
|
|
1457
1467
|
};
|
|
1458
1468
|
}
|
|
1459
|
-
}),
|
|
1469
|
+
}), Ft = /* @__PURE__ */ c("div", { class: "ps-1" }, "Select all", -1), Vt = ["data-cy"], St = { class: "ps-1 w-100" }, Ct = { class: "multiselect__tag d-inline-flex" }, Tt = { class: "my-auto" }, be = /* @__PURE__ */ V({
|
|
1460
1470
|
__name: "ForgeMultiSelect",
|
|
1461
1471
|
props: {
|
|
1462
1472
|
severity: { default: "primary" },
|
|
@@ -1469,18 +1479,18 @@ const vt = { key: 0 }, yt = {
|
|
|
1469
1479
|
emits: ["update:modelValue"],
|
|
1470
1480
|
setup(e, { emit: t }) {
|
|
1471
1481
|
const l = e, a = (U, D) => {
|
|
1472
|
-
const
|
|
1482
|
+
const J = {
|
|
1473
1483
|
...D,
|
|
1474
1484
|
$isDisabled: D.$isDisabled ?? !1
|
|
1475
1485
|
};
|
|
1476
|
-
U(
|
|
1477
|
-
}, o = ce(),
|
|
1486
|
+
U(J);
|
|
1487
|
+
}, o = ce(), s = t, { errors: d, value: r, errorMessage: v } = K(() => l.name, void 0, {
|
|
1478
1488
|
initialValue: o.modelValue
|
|
1479
|
-
}),
|
|
1489
|
+
}), u = I(!1), n = k(() => ({
|
|
1480
1490
|
multiple: !0,
|
|
1481
1491
|
label: "label",
|
|
1482
1492
|
trackBy: "id",
|
|
1483
|
-
showPointer: !
|
|
1493
|
+
showPointer: !u.value,
|
|
1484
1494
|
placeholder: o.searchable === null || o.searchable ? "Search" : "Select",
|
|
1485
1495
|
allowEmpty: !0,
|
|
1486
1496
|
selectValue: "",
|
|
@@ -1489,74 +1499,74 @@ const vt = { key: 0 }, yt = {
|
|
|
1489
1499
|
searchable: !!(o.searchable === null || o.searchable) && o.modelValue.length === o.options.length,
|
|
1490
1500
|
async: !1,
|
|
1491
1501
|
...o
|
|
1492
|
-
})), p =
|
|
1493
|
-
|
|
1494
|
-
},
|
|
1495
|
-
|
|
1496
|
-
},
|
|
1497
|
-
_.value ?
|
|
1502
|
+
})), p = k(() => `forge-multiselect-${l.severity}`), x = k(() => `multiselect__option ${u.value ? " multiselect__option--highlight" : ""} ${_.value ? " multiselect__option--selected" : ""}`), _ = k(() => n.value && !(n.value.multiple || !l.showSelectAll || n.value.async) ? !1 : o.modelValue.length === o.options.length), P = k(() => d.value.length > 0), M = k(() => !!((o.allowEmpty == null || o.allowEmpty) && l.showClearSelection && (n.value.multiple ? o.modelValue.length > 0 : o.modelValue))), z = () => u.value = !0, g = () => u.value = !1, $ = () => {
|
|
1503
|
+
r.value = n.value.multiple ? [] : null, s("update:modelValue", r.value);
|
|
1504
|
+
}, G = (U) => {
|
|
1505
|
+
s("update:modelValue", l.selectValue ? U.map((D) => D[l.selectValue]) : U);
|
|
1506
|
+
}, Z = (U) => o.modelValue !== null ? o.modelValue.some((D) => n.value.selectValue ? U[l.selectValue] === D : U.id === D.id && U.label === D.label) : !1, ie = () => {
|
|
1507
|
+
_.value ? $() : (r.value = [...o.options], s("update:modelValue", [...o.options]));
|
|
1498
1508
|
};
|
|
1499
1509
|
return (U, D) => {
|
|
1500
|
-
const
|
|
1501
|
-
return
|
|
1502
|
-
|
|
1510
|
+
const J = ve;
|
|
1511
|
+
return i(), y(N, null, [
|
|
1512
|
+
f(m(Ve), C(n.value, {
|
|
1503
1513
|
class: [p.value, P.value ? "is-invalid" : ""],
|
|
1504
1514
|
"data-cy": "multiselect",
|
|
1505
1515
|
"onUpdate:modelValue": [
|
|
1506
|
-
|
|
1507
|
-
D[1] || (D[1] = (A) => le(
|
|
1516
|
+
G,
|
|
1517
|
+
D[1] || (D[1] = (A) => le(r) ? r.value = A : null)
|
|
1508
1518
|
],
|
|
1509
|
-
modelValue:
|
|
1519
|
+
modelValue: m(r)
|
|
1510
1520
|
}), oe({
|
|
1511
|
-
caret:
|
|
1512
|
-
|
|
1521
|
+
caret: b(({ toggle: A }) => [
|
|
1522
|
+
M.value ? (i(), h(m(T), {
|
|
1513
1523
|
key: 0,
|
|
1514
1524
|
icon: "bi:x",
|
|
1515
1525
|
class: "my-auto multiselect__clear-icon",
|
|
1516
|
-
onMousedown: D[0] || (D[0] =
|
|
1526
|
+
onMousedown: D[0] || (D[0] = Y((W) => $(), ["prevent", "stop"])),
|
|
1517
1527
|
"data-cy": "clear",
|
|
1518
1528
|
height: "18px",
|
|
1519
1529
|
width: "18px"
|
|
1520
|
-
})) :
|
|
1521
|
-
|
|
1530
|
+
})) : S("", !0),
|
|
1531
|
+
f(m(T), {
|
|
1522
1532
|
icon: "bi:chevron-down",
|
|
1523
1533
|
onClick: A,
|
|
1524
1534
|
class: "multiselect__select"
|
|
1525
1535
|
}, null, 8, ["onClick"])
|
|
1526
1536
|
]),
|
|
1527
|
-
tag:
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1537
|
+
tag: b(({ option: A, remove: W }) => [
|
|
1538
|
+
c("div", Ct, [
|
|
1539
|
+
c("div", Tt, w(A.label), 1),
|
|
1540
|
+
f(m(T), {
|
|
1531
1541
|
icon: "bi:x",
|
|
1532
1542
|
class: "my-auto multiselect__tag-icon",
|
|
1533
|
-
onMousedown:
|
|
1543
|
+
onMousedown: Y((Aa) => a(W, A), ["prevent", "stop"]),
|
|
1534
1544
|
height: "18px",
|
|
1535
1545
|
width: "18px"
|
|
1536
1546
|
}, null, 8, ["onMousedown"])
|
|
1537
1547
|
])
|
|
1538
1548
|
]),
|
|
1539
|
-
default:
|
|
1540
|
-
(
|
|
1549
|
+
default: b(() => [
|
|
1550
|
+
(i(!0), y(N, null, q(U.$slots, (A, W) => B(U.$slots, W, { slot: W })), 256))
|
|
1541
1551
|
]),
|
|
1542
1552
|
_: 2
|
|
1543
1553
|
}, [
|
|
1544
|
-
|
|
1554
|
+
n.value.multiple && U.showSelectAll && !n.value.async ? {
|
|
1545
1555
|
name: "beforeList",
|
|
1546
|
-
fn:
|
|
1547
|
-
|
|
1556
|
+
fn: b(() => [
|
|
1557
|
+
c("li", {
|
|
1548
1558
|
class: "multiselect__element",
|
|
1549
|
-
onClick:
|
|
1550
|
-
onMouseover:
|
|
1551
|
-
onMouseleave:
|
|
1559
|
+
onClick: ie,
|
|
1560
|
+
onMouseover: z,
|
|
1561
|
+
onMouseleave: g,
|
|
1552
1562
|
"data-cy": "toggle-all"
|
|
1553
1563
|
}, [
|
|
1554
|
-
|
|
1555
|
-
class:
|
|
1564
|
+
c("span", {
|
|
1565
|
+
class: F(`${x.value}`)
|
|
1556
1566
|
}, [
|
|
1557
|
-
|
|
1558
|
-
default:
|
|
1559
|
-
|
|
1567
|
+
f(J, { value: _.value }, {
|
|
1568
|
+
default: b(() => [
|
|
1569
|
+
Ft
|
|
1560
1570
|
]),
|
|
1561
1571
|
_: 1
|
|
1562
1572
|
}, 8, ["value"])
|
|
@@ -1565,46 +1575,46 @@ const vt = { key: 0 }, yt = {
|
|
|
1565
1575
|
]),
|
|
1566
1576
|
key: "0"
|
|
1567
1577
|
} : void 0,
|
|
1568
|
-
|
|
1578
|
+
n.value.multiple ? {
|
|
1569
1579
|
name: "option",
|
|
1570
|
-
fn:
|
|
1571
|
-
|
|
1580
|
+
fn: b(({ option: A }) => [
|
|
1581
|
+
c("div", {
|
|
1572
1582
|
"data-cy": A.label
|
|
1573
1583
|
}, [
|
|
1574
|
-
(
|
|
1575
|
-
value:
|
|
1584
|
+
(i(), h(J, {
|
|
1585
|
+
value: Z(A),
|
|
1576
1586
|
key: A
|
|
1577
1587
|
}, {
|
|
1578
|
-
default:
|
|
1579
|
-
|
|
1588
|
+
default: b(() => [
|
|
1589
|
+
c("div", St, w(A[n.value.label]), 1)
|
|
1580
1590
|
]),
|
|
1581
1591
|
_: 2
|
|
1582
1592
|
}, 1032, ["value"]))
|
|
1583
|
-
], 8,
|
|
1593
|
+
], 8, Vt)
|
|
1584
1594
|
]),
|
|
1585
1595
|
key: "1"
|
|
1586
1596
|
} : void 0
|
|
1587
1597
|
]), 1040, ["class", "modelValue"]),
|
|
1588
|
-
L(
|
|
1598
|
+
L(c("small", {
|
|
1589
1599
|
"data-cy": "error",
|
|
1590
1600
|
class: "invalid-feedback"
|
|
1591
|
-
},
|
|
1592
|
-
[
|
|
1601
|
+
}, w(m(v)), 513), [
|
|
1602
|
+
[H, P.value]
|
|
1593
1603
|
])
|
|
1594
1604
|
], 64);
|
|
1595
1605
|
};
|
|
1596
1606
|
}
|
|
1597
|
-
}),
|
|
1607
|
+
}), Pt = {
|
|
1598
1608
|
key: 0,
|
|
1599
1609
|
class: "pl-1"
|
|
1600
|
-
},
|
|
1610
|
+
}, Mt = { class: "border alternating-item-list" }, It = {
|
|
1601
1611
|
key: 0,
|
|
1602
1612
|
class: "p-2 border-top border-bottom",
|
|
1603
1613
|
"data-cy": "title"
|
|
1604
|
-
},
|
|
1614
|
+
}, zt = { class: "d-inline-block" }, Ot = {
|
|
1605
1615
|
key: 1,
|
|
1606
1616
|
class: "p-2 item d-flex justify-content-between align-items-center"
|
|
1607
|
-
},
|
|
1617
|
+
}, bl = /* @__PURE__ */ V({
|
|
1608
1618
|
__name: "ForgeMultiSelectPreview",
|
|
1609
1619
|
props: {
|
|
1610
1620
|
title: { default: "Selected Items" },
|
|
@@ -1615,106 +1625,106 @@ const vt = { key: 0 }, yt = {
|
|
|
1615
1625
|
},
|
|
1616
1626
|
emits: ["update:modelValue"],
|
|
1617
1627
|
setup(e, { emit: t }) {
|
|
1618
|
-
const l = e, a = ce(), o = t,
|
|
1619
|
-
o("update:modelValue",
|
|
1620
|
-
},
|
|
1621
|
-
|
|
1628
|
+
const l = e, a = ce(), o = t, s = k(() => `${a.modelValue.length} selected`), d = k(() => a.modelValue.length), r = (u) => {
|
|
1629
|
+
o("update:modelValue", u);
|
|
1630
|
+
}, v = (u) => {
|
|
1631
|
+
r(a.modelValue.filter((n) => n.id !== u));
|
|
1622
1632
|
};
|
|
1623
|
-
return (
|
|
1633
|
+
return (u, n) => {
|
|
1624
1634
|
const p = R;
|
|
1625
|
-
return
|
|
1626
|
-
class:
|
|
1635
|
+
return i(), y("div", {
|
|
1636
|
+
class: F(u.orientation === "column" ? "row" : ""),
|
|
1627
1637
|
"data-cy": "multiselect-preview"
|
|
1628
1638
|
}, [
|
|
1629
|
-
|
|
1630
|
-
class:
|
|
1639
|
+
c("div", {
|
|
1640
|
+
class: F(u.orientation === "row" ? "col-12 mb-1" : "col"),
|
|
1631
1641
|
"data-cy": "multiselect-container"
|
|
1632
1642
|
}, [
|
|
1633
|
-
|
|
1643
|
+
f(be, {
|
|
1634
1644
|
"onUpdate:modelValue": [
|
|
1635
|
-
|
|
1636
|
-
|
|
1645
|
+
n[0] || (n[0] = (x) => r(x)),
|
|
1646
|
+
n[1] || (n[1] = (x) => u.$attrs.modelValue = x)
|
|
1637
1647
|
],
|
|
1638
|
-
modelValue:
|
|
1639
|
-
"limit-text":
|
|
1648
|
+
modelValue: u.$attrs.modelValue,
|
|
1649
|
+
"limit-text": s.value,
|
|
1640
1650
|
options: l.options
|
|
1641
1651
|
}, {
|
|
1642
|
-
tag:
|
|
1643
|
-
|
|
1652
|
+
tag: b(() => [
|
|
1653
|
+
O(w(""))
|
|
1644
1654
|
]),
|
|
1645
|
-
selection:
|
|
1646
|
-
|
|
1655
|
+
selection: b(() => [
|
|
1656
|
+
u.$attrs.modelValue.length > 0 ? (i(), y("span", Pt, w(d.value) + " items selected", 1)) : S("", !0)
|
|
1647
1657
|
]),
|
|
1648
|
-
default:
|
|
1649
|
-
(
|
|
1658
|
+
default: b(() => [
|
|
1659
|
+
(i(!0), y(N, null, q(u.$slots, (x, _) => B(u.$slots, _, { slot: _ })), 256))
|
|
1650
1660
|
]),
|
|
1651
1661
|
_: 3
|
|
1652
1662
|
}, 8, ["modelValue", "limit-text", "options"]),
|
|
1653
|
-
|
|
1663
|
+
B(u.$slots, "after-multi-select")
|
|
1654
1664
|
], 2),
|
|
1655
|
-
|
|
1656
|
-
class:
|
|
1665
|
+
c("div", {
|
|
1666
|
+
class: F(u.orientation === "row" ? "col-12" : "col"),
|
|
1657
1667
|
"data-cy": "options-preview"
|
|
1658
1668
|
}, [
|
|
1659
|
-
|
|
1660
|
-
style:
|
|
1669
|
+
c("div", {
|
|
1670
|
+
style: we({ height: u.height }),
|
|
1661
1671
|
class: "overflow-auto"
|
|
1662
1672
|
}, [
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
(
|
|
1673
|
+
c("div", Mt, [
|
|
1674
|
+
u.title ? (i(), y("div", It, w(u.title), 1)) : S("", !0),
|
|
1675
|
+
(i(!0), y(N, null, q(u.$attrs.modelValue, (x) => (i(), y("div", {
|
|
1666
1676
|
key: x.id,
|
|
1667
1677
|
class: "p-2 item d-flex justify-content-between align-items-center"
|
|
1668
1678
|
}, [
|
|
1669
|
-
|
|
1670
|
-
|
|
1679
|
+
B(u.$slots, "list-item", { item: x }, () => [
|
|
1680
|
+
c("span", zt, w(x.shortLabel ? x.shortLabel : x.label), 1)
|
|
1671
1681
|
]),
|
|
1672
|
-
|
|
1682
|
+
u.canRemoveItemFromPreview ? (i(), h(p, {
|
|
1673
1683
|
key: 0,
|
|
1674
1684
|
link: "",
|
|
1675
1685
|
class: "m-0 p-0 d-flex align-items-center",
|
|
1676
|
-
onClick: (_) =>
|
|
1686
|
+
onClick: (_) => v(x.id)
|
|
1677
1687
|
}, {
|
|
1678
|
-
default:
|
|
1679
|
-
|
|
1688
|
+
default: b(() => [
|
|
1689
|
+
f(m(T), {
|
|
1680
1690
|
icon: "bi:x",
|
|
1681
1691
|
class: "close-icon",
|
|
1682
1692
|
"data-cy": `close-icon-${x.id}`
|
|
1683
1693
|
}, null, 8, ["data-cy"])
|
|
1684
1694
|
]),
|
|
1685
1695
|
_: 2
|
|
1686
|
-
}, 1032, ["onClick"])) :
|
|
1696
|
+
}, 1032, ["onClick"])) : S("", !0)
|
|
1687
1697
|
]))), 128)),
|
|
1688
|
-
|
|
1698
|
+
u.$attrs.modelValue.length === 0 ? (i(), y("div", Ot, "No Items Selected.")) : S("", !0)
|
|
1689
1699
|
])
|
|
1690
1700
|
], 4)
|
|
1691
1701
|
], 2)
|
|
1692
1702
|
], 2);
|
|
1693
1703
|
};
|
|
1694
1704
|
}
|
|
1695
|
-
}),
|
|
1705
|
+
}), Dt = { class: "d-flex justify-content-between pb-2" }, Ut = {
|
|
1696
1706
|
"data-cy": "title",
|
|
1697
1707
|
class: "my-auto"
|
|
1698
|
-
},
|
|
1708
|
+
}, At = {
|
|
1699
1709
|
"data-cy": "slot",
|
|
1700
1710
|
class: "d-flex align-items-center"
|
|
1701
|
-
},
|
|
1711
|
+
}, fl = /* @__PURE__ */ V({
|
|
1702
1712
|
__name: "ForgePageHeader",
|
|
1703
1713
|
props: {
|
|
1704
1714
|
title: {}
|
|
1705
1715
|
},
|
|
1706
1716
|
setup(e) {
|
|
1707
1717
|
const t = e;
|
|
1708
|
-
return (l, a) => (
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1718
|
+
return (l, a) => (i(), y("div", Dt, [
|
|
1719
|
+
c("h3", Ut, w(t.title), 1),
|
|
1720
|
+
c("div", At, [
|
|
1721
|
+
B(l.$slots, "default")
|
|
1712
1722
|
])
|
|
1713
1723
|
]));
|
|
1714
1724
|
}
|
|
1715
|
-
}),
|
|
1725
|
+
}), Nt = { class: "d-flex" }, Et = { "data-cy": "before-slot" }, Rt = { class: "position-relative" }, Lt = { "data-cy": "after-slot" }, fe = /* @__PURE__ */ V({
|
|
1716
1726
|
__name: "ForgeDatepicker",
|
|
1717
|
-
props: /* @__PURE__ */
|
|
1727
|
+
props: /* @__PURE__ */ j({
|
|
1718
1728
|
severity: { default: "primary" },
|
|
1719
1729
|
modelValue: {},
|
|
1720
1730
|
selectionMode: { default: "single" },
|
|
@@ -1773,7 +1783,7 @@ const vt = { key: 0 }, yt = {
|
|
|
1773
1783
|
panelStyle: {},
|
|
1774
1784
|
panelClass: {},
|
|
1775
1785
|
panelProps: {},
|
|
1776
|
-
name: {},
|
|
1786
|
+
name: { default: "" },
|
|
1777
1787
|
ariaLabelledby: {},
|
|
1778
1788
|
ariaLabel: {},
|
|
1779
1789
|
pt: {},
|
|
@@ -1785,9 +1795,11 @@ const vt = { key: 0 }, yt = {
|
|
|
1785
1795
|
}),
|
|
1786
1796
|
emits: ["update:modelValue"],
|
|
1787
1797
|
setup(e) {
|
|
1788
|
-
const t = e, l = E(e, "modelValue"), a = () => {
|
|
1798
|
+
const t = e, l = E(e, "modelValue"), { errors: a, errorMessage: o, handleChange: s, handleBlur: d } = K(() => t.name, void 0, {
|
|
1799
|
+
initialValue: l.value
|
|
1800
|
+
}), r = () => {
|
|
1789
1801
|
l.value = null;
|
|
1790
|
-
},
|
|
1802
|
+
}, v = k(() => a.value.length > 0), u = k(() => ({
|
|
1791
1803
|
day: ({ context: n }) => ({
|
|
1792
1804
|
class: [
|
|
1793
1805
|
`text-center date-${t.severity === void 0 ? "primary" : t.severity}`,
|
|
@@ -1878,53 +1890,66 @@ const vt = { key: 0 }, yt = {
|
|
|
1878
1890
|
]
|
|
1879
1891
|
})
|
|
1880
1892
|
}));
|
|
1881
|
-
return (n,
|
|
1882
|
-
const
|
|
1883
|
-
return
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
u("div", Nt, [
|
|
1888
|
-
b(d, V({ ...t, ...n.$attrs }, {
|
|
1889
|
-
pt: o.value,
|
|
1890
|
-
modelValue: l.value,
|
|
1891
|
-
"onUpdate:modelValue": i[0] || (i[0] = (y) => l.value = y)
|
|
1892
|
-
}), null, 16, ["pt", "modelValue"]),
|
|
1893
|
-
L(b(c(T), {
|
|
1894
|
-
"data-cy": "icon",
|
|
1895
|
-
icon: "bi:calendar4",
|
|
1896
|
-
class: "position-absolute end-0 top-50 bottom-50 my-auto me-2 text-muted"
|
|
1897
|
-
}, null, 512), [
|
|
1898
|
-
[q, t.showIcon]
|
|
1893
|
+
return (n, p) => {
|
|
1894
|
+
const x = Se;
|
|
1895
|
+
return i(), y(N, null, [
|
|
1896
|
+
c("div", Nt, [
|
|
1897
|
+
c("span", Et, [
|
|
1898
|
+
B(n.$slots, "before")
|
|
1899
1899
|
]),
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1900
|
+
c("div", Rt, [
|
|
1901
|
+
f(x, C({ ...t, ...n.$attrs }, {
|
|
1902
|
+
pt: u.value,
|
|
1903
|
+
modelValue: l.value,
|
|
1904
|
+
"onUpdate:modelValue": [
|
|
1905
|
+
p[0] || (p[0] = (_) => l.value = _),
|
|
1906
|
+
m(s)
|
|
1907
|
+
],
|
|
1908
|
+
onBlur: m(d),
|
|
1909
|
+
"input-class": { "is-invalid": v.value }
|
|
1910
|
+
}), null, 16, ["pt", "modelValue", "onUpdate:modelValue", "onBlur", "input-class"]),
|
|
1911
|
+
L(f(m(T), {
|
|
1912
|
+
"data-cy": "icon",
|
|
1913
|
+
icon: "bi:calendar4",
|
|
1914
|
+
class: F(["position-absolute end-0 top-50 bottom-50 my-auto me-2 bg-white", `${v.value ? "text-danger-dark" : "text-muted"}`])
|
|
1915
|
+
}, null, 8, ["class"]), [
|
|
1916
|
+
[H, t.showIcon]
|
|
1917
|
+
]),
|
|
1918
|
+
L(f(m(T), {
|
|
1919
|
+
"data-cy": "icon",
|
|
1920
|
+
icon: "bi:x",
|
|
1921
|
+
onClick: r,
|
|
1922
|
+
class: F(["position-absolute end-0 top-50 bottom-50 my-auto text-muted cursor-pointer bg-white", t.showIcon ? "datepicker-close-icon" : "me-2"])
|
|
1923
|
+
}, null, 8, ["class"]), [
|
|
1924
|
+
[H, t.modelValue]
|
|
1925
|
+
])
|
|
1926
|
+
]),
|
|
1927
|
+
c("span", Lt, [
|
|
1928
|
+
B(n.$slots, "after")
|
|
1907
1929
|
])
|
|
1908
1930
|
]),
|
|
1909
|
-
|
|
1910
|
-
|
|
1931
|
+
L(c("small", {
|
|
1932
|
+
"data-cy": "error",
|
|
1933
|
+
class: "text-invalid"
|
|
1934
|
+
}, w(m(o)), 513), [
|
|
1935
|
+
[H, v.value]
|
|
1911
1936
|
])
|
|
1912
1937
|
], 64);
|
|
1913
1938
|
};
|
|
1914
1939
|
}
|
|
1915
|
-
}),
|
|
1940
|
+
}), gl = /* @__PURE__ */ V({
|
|
1916
1941
|
__name: "ForgeRemainingCharacters",
|
|
1917
1942
|
props: {
|
|
1918
1943
|
maxCount: { default: 300 },
|
|
1919
1944
|
currentCount: {}
|
|
1920
1945
|
},
|
|
1921
1946
|
setup(e) {
|
|
1922
|
-
const t = e, l =
|
|
1923
|
-
return (a, o) => (
|
|
1924
|
-
class:
|
|
1925
|
-
}, "Remaining characters: " +
|
|
1947
|
+
const t = e, l = k(() => t.maxCount - t.currentCount);
|
|
1948
|
+
return (a, o) => (i(), y("div", {
|
|
1949
|
+
class: F(l.value < 0 ? "text-danger" : "")
|
|
1950
|
+
}, "Remaining characters: " + w(l.value), 3));
|
|
1926
1951
|
}
|
|
1927
|
-
}),
|
|
1952
|
+
}), jt = /* @__PURE__ */ c("hr", null, null, -1), Ht = { class: "d-flex justify-content-between" }, hl = /* @__PURE__ */ V({
|
|
1928
1953
|
__name: "ForgeForm",
|
|
1929
1954
|
props: {
|
|
1930
1955
|
onSubmit: {},
|
|
@@ -1944,87 +1969,87 @@ const vt = { key: 0 }, yt = {
|
|
|
1944
1969
|
l.value = !0, a.value.hasError = !1;
|
|
1945
1970
|
try {
|
|
1946
1971
|
await t.onSubmit();
|
|
1947
|
-
} catch (
|
|
1948
|
-
a.value.hasError = !0,
|
|
1972
|
+
} catch (s) {
|
|
1973
|
+
a.value.hasError = !0, s.message && (a.value.message = s.message);
|
|
1949
1974
|
}
|
|
1950
1975
|
l.value = !1;
|
|
1951
1976
|
}
|
|
1952
|
-
return (
|
|
1953
|
-
const
|
|
1954
|
-
return
|
|
1977
|
+
return (s, d) => {
|
|
1978
|
+
const r = R;
|
|
1979
|
+
return i(), y("form", C(s.$attrs, {
|
|
1955
1980
|
novalidate: "",
|
|
1956
1981
|
class: "position-relative shadow-sm border p-4 bg-white",
|
|
1957
|
-
onSubmit:
|
|
1982
|
+
onSubmit: Y(o, ["prevent"])
|
|
1958
1983
|
}), [
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
class:
|
|
1984
|
+
s.hideTitle ? S("", !0) : (i(), y(N, { key: 0 }, [
|
|
1985
|
+
B(s.$slots, "title", {}, () => [
|
|
1986
|
+
c("h3", {
|
|
1987
|
+
class: F(s.titleClass),
|
|
1963
1988
|
"data-cy": "form-title"
|
|
1964
|
-
},
|
|
1989
|
+
}, w(s.title), 3)
|
|
1965
1990
|
]),
|
|
1966
|
-
|
|
1991
|
+
jt
|
|
1967
1992
|
], 64)),
|
|
1968
|
-
a.value.hasError ? (
|
|
1993
|
+
a.value.hasError ? (i(), h(se, {
|
|
1969
1994
|
key: 1,
|
|
1970
1995
|
severity: "danger",
|
|
1971
1996
|
"data-cy": "error"
|
|
1972
1997
|
}, {
|
|
1973
|
-
default:
|
|
1974
|
-
|
|
1998
|
+
default: b(() => [
|
|
1999
|
+
B(s.$slots, "error", {
|
|
1975
2000
|
error: a.value.message
|
|
1976
2001
|
}, () => [
|
|
1977
|
-
|
|
2002
|
+
O(w(a.value.message), 1)
|
|
1978
2003
|
])
|
|
1979
2004
|
]),
|
|
1980
2005
|
_: 3
|
|
1981
|
-
})) :
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
2006
|
+
})) : S("", !0),
|
|
2007
|
+
B(s.$slots, "default"),
|
|
2008
|
+
c("div", Ht, [
|
|
2009
|
+
B(s.$slots, "cancel", {}, () => [
|
|
2010
|
+
s.hideCancel ? S("", !0) : (i(), h(r, {
|
|
1986
2011
|
key: 0,
|
|
1987
2012
|
"data-cy": "cancel-btn",
|
|
1988
2013
|
type: "reset",
|
|
1989
2014
|
severity: "secondary",
|
|
1990
2015
|
outlined: "",
|
|
1991
|
-
onClick:
|
|
2016
|
+
onClick: d[0] || (d[0] = (v) => s.$emit("cancel"))
|
|
1992
2017
|
}, {
|
|
1993
|
-
default:
|
|
1994
|
-
|
|
2018
|
+
default: b(() => [
|
|
2019
|
+
O(w(s.cancelText), 1)
|
|
1995
2020
|
]),
|
|
1996
2021
|
_: 1
|
|
1997
2022
|
}))
|
|
1998
2023
|
]),
|
|
1999
|
-
|
|
2000
|
-
|
|
2024
|
+
B(s.$slots, "submit", { submit: o }, () => [
|
|
2025
|
+
f(r, {
|
|
2001
2026
|
"data-cy": "submit-btn",
|
|
2002
2027
|
type: "submit",
|
|
2003
2028
|
severity: "primary",
|
|
2004
2029
|
class: "ms-auto"
|
|
2005
2030
|
}, {
|
|
2006
|
-
default:
|
|
2007
|
-
|
|
2031
|
+
default: b(() => [
|
|
2032
|
+
O(w(s.submitText), 1)
|
|
2008
2033
|
]),
|
|
2009
2034
|
_: 1
|
|
2010
2035
|
})
|
|
2011
2036
|
])
|
|
2012
2037
|
]),
|
|
2013
|
-
l.value ? (
|
|
2038
|
+
l.value ? (i(), h(ye, {
|
|
2014
2039
|
key: 2,
|
|
2015
2040
|
"data-cy": "loading-spinner"
|
|
2016
|
-
})) :
|
|
2041
|
+
})) : S("", !0)
|
|
2017
2042
|
], 16);
|
|
2018
2043
|
};
|
|
2019
2044
|
}
|
|
2020
|
-
}),
|
|
2045
|
+
}), Yt = {
|
|
2021
2046
|
key: 1,
|
|
2022
|
-
class: "d-flex flex-column"
|
|
2023
|
-
},
|
|
2047
|
+
class: "d-flex flex-column w-100"
|
|
2048
|
+
}, qt = ["for"], wl = /* @__PURE__ */ V({
|
|
2024
2049
|
__name: "ForgeFormField",
|
|
2025
|
-
props: /* @__PURE__ */
|
|
2050
|
+
props: /* @__PURE__ */ j({
|
|
2026
2051
|
name: {},
|
|
2027
|
-
|
|
2052
|
+
fieldLabel: {},
|
|
2028
2053
|
type: { default: "text" },
|
|
2029
2054
|
mask: { default: "" },
|
|
2030
2055
|
placeholder: { default: "" }
|
|
@@ -2034,79 +2059,92 @@ const vt = { key: 0 }, yt = {
|
|
|
2034
2059
|
}),
|
|
2035
2060
|
emits: ["update:modelValue"],
|
|
2036
2061
|
setup(e) {
|
|
2037
|
-
const t = E(e, "modelValue"), l = e, a = (
|
|
2038
|
-
l.type == "number" ?
|
|
2039
|
-
}, { errors: o, value:
|
|
2062
|
+
const t = E(e, "modelValue"), l = e, a = (n) => {
|
|
2063
|
+
l.type == "number" ? r(n.value) : r(n);
|
|
2064
|
+
}, { errors: o, value: s, errorMessage: d, handleChange: r, handleBlur: v } = K(() => l.name, void 0, {
|
|
2040
2065
|
initialValue: t.value
|
|
2041
|
-
}),
|
|
2042
|
-
return
|
|
2043
|
-
t.value =
|
|
2044
|
-
}, { immediate: !0 }), (
|
|
2045
|
-
const x =
|
|
2046
|
-
return l.type === "checkbox" ? (
|
|
2066
|
+
}), u = k(() => o.value.length > 0);
|
|
2067
|
+
return re(() => s.value, (n) => {
|
|
2068
|
+
t.value = n;
|
|
2069
|
+
}, { immediate: !0 }), (n, p) => {
|
|
2070
|
+
const x = Te, _ = Ce, P = de, M = ne, z = be, g = fe;
|
|
2071
|
+
return l.type === "checkbox" ? (i(), h(ve, C({
|
|
2047
2072
|
key: 0,
|
|
2048
2073
|
id: l.name,
|
|
2049
|
-
label: l.
|
|
2050
|
-
},
|
|
2074
|
+
label: l.fieldLabel
|
|
2075
|
+
}, n.$attrs, {
|
|
2051
2076
|
name: l.name,
|
|
2052
2077
|
modelValue: t.value,
|
|
2053
|
-
"onUpdate:modelValue": p[0] || (p[0] = (
|
|
2054
|
-
}), null, 16, ["id", "label", "name", "modelValue"])) : (
|
|
2055
|
-
|
|
2056
|
-
for: l.name
|
|
2057
|
-
|
|
2058
|
-
l.
|
|
2078
|
+
"onUpdate:modelValue": p[0] || (p[0] = ($) => t.value = $)
|
|
2079
|
+
}), null, 16, ["id", "label", "name", "modelValue"])) : (i(), y("div", Yt, [
|
|
2080
|
+
c("label", {
|
|
2081
|
+
for: l.name,
|
|
2082
|
+
class: "mb-1"
|
|
2083
|
+
}, w(l.fieldLabel), 9, qt),
|
|
2084
|
+
l.type === "number" ? (i(), h(m(me), C({
|
|
2059
2085
|
key: 0,
|
|
2060
2086
|
id: l.name
|
|
2061
|
-
},
|
|
2087
|
+
}, n.$attrs, {
|
|
2062
2088
|
placeholder: l.placeholder,
|
|
2063
|
-
"input-class": { "is-invalid":
|
|
2064
|
-
class: { "is-invalid":
|
|
2089
|
+
"input-class": { "is-invalid": u.value },
|
|
2090
|
+
class: { "is-invalid": u.value },
|
|
2065
2091
|
modelValue: t.value,
|
|
2066
|
-
"onUpdate:modelValue": p[1] || (p[1] = (
|
|
2092
|
+
"onUpdate:modelValue": p[1] || (p[1] = ($) => t.value = $),
|
|
2067
2093
|
onInput: a
|
|
2068
|
-
}), null, 16, ["id", "placeholder", "input-class", "class", "modelValue"])) : l.type === "textarea" ? (
|
|
2094
|
+
}), null, 16, ["id", "placeholder", "input-class", "class", "modelValue"])) : l.type === "textarea" ? (i(), h(x, C({
|
|
2069
2095
|
key: 1,
|
|
2070
2096
|
id: l.name
|
|
2071
|
-
},
|
|
2097
|
+
}, n.$attrs, {
|
|
2072
2098
|
placeholder: l.placeholder,
|
|
2073
|
-
class: { "is-invalid":
|
|
2099
|
+
class: { "is-invalid": u.value },
|
|
2074
2100
|
modelValue: t.value,
|
|
2075
|
-
"onUpdate:modelValue": p[2] || (p[2] = (
|
|
2101
|
+
"onUpdate:modelValue": p[2] || (p[2] = ($) => t.value = $),
|
|
2076
2102
|
onInput: a,
|
|
2077
|
-
onBlur:
|
|
2078
|
-
}), null, 16, ["id", "placeholder", "class", "modelValue", "onBlur"])) : l.type === "mask" ? (
|
|
2103
|
+
onBlur: m(v)
|
|
2104
|
+
}), null, 16, ["id", "placeholder", "class", "modelValue", "onBlur"])) : l.type === "mask" ? (i(), h(_, C({
|
|
2079
2105
|
key: 2,
|
|
2080
2106
|
id: l.name
|
|
2081
|
-
},
|
|
2107
|
+
}, n.$attrs, {
|
|
2082
2108
|
placeholder: l.placeholder,
|
|
2083
2109
|
mask: l.mask,
|
|
2084
|
-
class: { "is-invalid":
|
|
2110
|
+
class: { "is-invalid": u.value },
|
|
2085
2111
|
modelValue: t.value,
|
|
2086
|
-
"onUpdate:modelValue": p[3] || (p[3] = (
|
|
2087
|
-
|
|
2088
|
-
onBlur:
|
|
2089
|
-
}), null, 16, ["id", "placeholder", "mask", "class", "modelValue", "onBlur"])) : l.type === "text" ? (
|
|
2112
|
+
"onUpdate:modelValue": p[3] || (p[3] = ($) => t.value = $),
|
|
2113
|
+
onComplete: a,
|
|
2114
|
+
onBlur: m(v)
|
|
2115
|
+
}), null, 16, ["id", "placeholder", "mask", "class", "modelValue", "onBlur"])) : l.type === "text" ? (i(), h(P, C({
|
|
2090
2116
|
key: 3,
|
|
2091
2117
|
id: l.name
|
|
2092
|
-
},
|
|
2118
|
+
}, n.$attrs, {
|
|
2093
2119
|
placeholder: l.placeholder,
|
|
2094
|
-
class: { "is-invalid":
|
|
2120
|
+
class: { "is-invalid": u.value },
|
|
2095
2121
|
modelValue: t.value,
|
|
2096
|
-
"onUpdate:modelValue": p[4] || (p[4] = (
|
|
2122
|
+
"onUpdate:modelValue": p[4] || (p[4] = ($) => t.value = $),
|
|
2097
2123
|
onInput: a,
|
|
2098
|
-
onBlur:
|
|
2099
|
-
}), null, 16, ["id", "placeholder", "class", "modelValue", "onBlur"])) :
|
|
2100
|
-
|
|
2124
|
+
onBlur: m(v)
|
|
2125
|
+
}), null, 16, ["id", "placeholder", "class", "modelValue", "onBlur"])) : l.type === "select" ? (i(), h(M, C({ key: 4 }, { ...l, ...n.$attrs }, {
|
|
2126
|
+
modelValue: t.value,
|
|
2127
|
+
"onUpdate:modelValue": p[5] || (p[5] = ($) => t.value = $),
|
|
2128
|
+
class: { "is-invalid": u.value }
|
|
2129
|
+
}), null, 16, ["modelValue", "class"])) : l.type === "multiselect" ? (i(), h(z, C({ key: 5 }, { ...l, ...n.$attrs }, {
|
|
2130
|
+
modelValue: t.value,
|
|
2131
|
+
"onUpdate:modelValue": p[6] || (p[6] = ($) => t.value = $),
|
|
2132
|
+
class: { "is-invalid": u.value }
|
|
2133
|
+
}), null, 16, ["modelValue", "class"])) : l.type === "datepicker" ? (i(), h(g, C({ key: 6 }, { ...l, ...n.$attrs }, {
|
|
2134
|
+
modelValue: t.value,
|
|
2135
|
+
"onUpdate:modelValue": p[7] || (p[7] = ($) => t.value = $),
|
|
2136
|
+
class: { "is-invalid": u.value }
|
|
2137
|
+
}), null, 16, ["modelValue", "class"])) : S("", !0),
|
|
2138
|
+
L(c("small", {
|
|
2101
2139
|
"data-cy": "error",
|
|
2102
2140
|
class: "invalid-feedback"
|
|
2103
|
-
},
|
|
2104
|
-
[
|
|
2141
|
+
}, w(m(d)), 513), [
|
|
2142
|
+
[H, u.value && l.type !== "multiselect" && l.type !== "datepicker"]
|
|
2105
2143
|
])
|
|
2106
2144
|
]));
|
|
2107
2145
|
};
|
|
2108
2146
|
}
|
|
2109
|
-
}),
|
|
2147
|
+
}), xl = /* @__PURE__ */ V({
|
|
2110
2148
|
__name: "ForgeChips",
|
|
2111
2149
|
props: {
|
|
2112
2150
|
chipSeverity: { default: "primary" },
|
|
@@ -2133,17 +2171,17 @@ const vt = { key: 0 }, yt = {
|
|
|
2133
2171
|
unstyled: { type: Boolean }
|
|
2134
2172
|
},
|
|
2135
2173
|
setup(e) {
|
|
2136
|
-
const t = e, { errors: l, value: a, errorMessage: o } =
|
|
2174
|
+
const t = e, { errors: l, value: a, errorMessage: o } = K(() => t.name, void 0, {
|
|
2137
2175
|
initialValue: t.modelValue
|
|
2138
|
-
}),
|
|
2176
|
+
}), s = k(() => l.value.length > 0), d = k(() => ({
|
|
2139
2177
|
inputtoken: "list-unstyled",
|
|
2140
2178
|
input: "border-0",
|
|
2141
|
-
container: ({ props:
|
|
2179
|
+
container: ({ props: r }) => ({
|
|
2142
2180
|
class: [
|
|
2143
2181
|
"form-control mb-0 d-flex",
|
|
2144
2182
|
{
|
|
2145
|
-
disabled:
|
|
2146
|
-
"is-invalid":
|
|
2183
|
+
disabled: r.disabled,
|
|
2184
|
+
"is-invalid": s.value
|
|
2147
2185
|
}
|
|
2148
2186
|
]
|
|
2149
2187
|
}),
|
|
@@ -2166,35 +2204,35 @@ const vt = { key: 0 }, yt = {
|
|
|
2166
2204
|
]
|
|
2167
2205
|
}
|
|
2168
2206
|
}));
|
|
2169
|
-
return (
|
|
2170
|
-
const
|
|
2171
|
-
return
|
|
2172
|
-
|
|
2173
|
-
pt:
|
|
2174
|
-
"model-value":
|
|
2175
|
-
"onUpdate:modelValue":
|
|
2207
|
+
return (r, v) => {
|
|
2208
|
+
const u = Pe;
|
|
2209
|
+
return i(), y(N, null, [
|
|
2210
|
+
f(u, C({ ...t, ...r.$attrs }, {
|
|
2211
|
+
pt: d.value,
|
|
2212
|
+
"model-value": m(a),
|
|
2213
|
+
"onUpdate:modelValue": v[0] || (v[0] = (n) => le(a) ? a.value = n : null)
|
|
2176
2214
|
}), {
|
|
2177
|
-
removetokenicon:
|
|
2178
|
-
L(
|
|
2215
|
+
removetokenicon: b(({ removeCallback: n }) => [
|
|
2216
|
+
L(f(m(T), {
|
|
2179
2217
|
icon: "bi:x",
|
|
2180
2218
|
class: "cursor-pointer",
|
|
2181
|
-
onClick:
|
|
2219
|
+
onClick: n
|
|
2182
2220
|
}, null, 8, ["onClick"]), [
|
|
2183
|
-
[
|
|
2221
|
+
[H, !t.disabled]
|
|
2184
2222
|
])
|
|
2185
2223
|
]),
|
|
2186
2224
|
_: 1
|
|
2187
2225
|
}, 16, ["pt", "model-value"]),
|
|
2188
|
-
L(
|
|
2226
|
+
L(c("small", {
|
|
2189
2227
|
"data-cy": "error",
|
|
2190
2228
|
class: "text-invalid"
|
|
2191
|
-
},
|
|
2192
|
-
[
|
|
2229
|
+
}, w(m(o)), 513), [
|
|
2230
|
+
[H, s.value]
|
|
2193
2231
|
])
|
|
2194
2232
|
], 64);
|
|
2195
2233
|
};
|
|
2196
2234
|
}
|
|
2197
|
-
}),
|
|
2235
|
+
}), Gt = /* @__PURE__ */ V({
|
|
2198
2236
|
__name: "ForgeProgressBar",
|
|
2199
2237
|
props: {
|
|
2200
2238
|
severity: { default: "primary" },
|
|
@@ -2209,7 +2247,7 @@ const vt = { key: 0 }, yt = {
|
|
|
2209
2247
|
unstyled: { type: Boolean }
|
|
2210
2248
|
},
|
|
2211
2249
|
setup(e) {
|
|
2212
|
-
const t = e, l =
|
|
2250
|
+
const t = e, l = k(() => t.striped ? "progress-bar-striped" : null), a = k(() => t.animate ? "progress-bar-animated" : null), o = k(() => {
|
|
2213
2251
|
switch (t.severity) {
|
|
2214
2252
|
case "brand":
|
|
2215
2253
|
return "bg-brand";
|
|
@@ -2228,7 +2266,7 @@ const vt = { key: 0 }, yt = {
|
|
|
2228
2266
|
default:
|
|
2229
2267
|
return "bg-primary";
|
|
2230
2268
|
}
|
|
2231
|
-
}),
|
|
2269
|
+
}), s = k(() => ({
|
|
2232
2270
|
root: {
|
|
2233
2271
|
style: t.pixelWidth ? `width: ${t.pixelWidth}px` : ""
|
|
2234
2272
|
},
|
|
@@ -2236,17 +2274,17 @@ const vt = { key: 0 }, yt = {
|
|
|
2236
2274
|
class: [o.value, l.value, a.value]
|
|
2237
2275
|
}
|
|
2238
2276
|
}));
|
|
2239
|
-
return (
|
|
2240
|
-
const
|
|
2241
|
-
return
|
|
2242
|
-
default:
|
|
2243
|
-
|
|
2277
|
+
return (d, r) => {
|
|
2278
|
+
const v = Me;
|
|
2279
|
+
return i(), h(v, C({ ...d.$attrs, ...t }, { pt: s.value }), {
|
|
2280
|
+
default: b(() => [
|
|
2281
|
+
B(d.$slots, "default")
|
|
2244
2282
|
]),
|
|
2245
2283
|
_: 3
|
|
2246
2284
|
}, 16, ["pt"]);
|
|
2247
2285
|
};
|
|
2248
2286
|
}
|
|
2249
|
-
}),
|
|
2287
|
+
}), Kt = { class: "value text-white w-100 text-center" }, kl = /* @__PURE__ */ V({
|
|
2250
2288
|
__name: "ForgeStatWidget",
|
|
2251
2289
|
props: {
|
|
2252
2290
|
size: { default: "md" },
|
|
@@ -2254,18 +2292,18 @@ const vt = { key: 0 }, yt = {
|
|
|
2254
2292
|
},
|
|
2255
2293
|
setup(e) {
|
|
2256
2294
|
const t = e;
|
|
2257
|
-
return (l, a) => (
|
|
2295
|
+
return (l, a) => (i(), y("div", C(l.$attrs, {
|
|
2258
2296
|
class: `d-flex shadow m-2 align-items-center widget--${t.size} bg-${t.severity}`
|
|
2259
2297
|
}), [
|
|
2260
|
-
|
|
2261
|
-
|
|
2298
|
+
c("span", Kt, [
|
|
2299
|
+
B(l.$slots, "default")
|
|
2262
2300
|
])
|
|
2263
2301
|
], 16));
|
|
2264
2302
|
}
|
|
2265
|
-
}),
|
|
2303
|
+
}), Wt = {
|
|
2266
2304
|
class: "d-flex flex-column align-items-center",
|
|
2267
2305
|
"data-cy": "stepper"
|
|
2268
|
-
},
|
|
2306
|
+
}, Zt = { class: "d-flex align-items-center justify-content-center w-100" }, $l = /* @__PURE__ */ V({
|
|
2269
2307
|
__name: "ForgeStepper",
|
|
2270
2308
|
props: {
|
|
2271
2309
|
currentStep: { default: 0 },
|
|
@@ -2281,114 +2319,114 @@ const vt = { key: 0 }, yt = {
|
|
|
2281
2319
|
},
|
|
2282
2320
|
emits: ["update:currentStep"],
|
|
2283
2321
|
setup(e, { emit: t }) {
|
|
2284
|
-
const l = t, a = e, o = I(a.currentStep),
|
|
2322
|
+
const l = t, a = e, o = I(a.currentStep), s = () => {
|
|
2285
2323
|
do
|
|
2286
2324
|
o.value--;
|
|
2287
2325
|
while (a.model[o.value].disabled);
|
|
2288
2326
|
l("update:currentStep", o.value);
|
|
2289
|
-
},
|
|
2327
|
+
}, d = () => {
|
|
2290
2328
|
if (o.value < a.model.length - 1)
|
|
2291
2329
|
do
|
|
2292
2330
|
o.value++;
|
|
2293
2331
|
while (a.model[o.value].disabled);
|
|
2294
2332
|
l("update:currentStep", o.value);
|
|
2295
|
-
},
|
|
2296
|
-
const
|
|
2297
|
-
return !(
|
|
2298
|
-
}),
|
|
2299
|
-
menuitem: (
|
|
2333
|
+
}, r = k(() => {
|
|
2334
|
+
const u = a.model.findIndex((n) => !n.disabled);
|
|
2335
|
+
return !(u < o.value && u > -1);
|
|
2336
|
+
}), v = k(() => ({
|
|
2337
|
+
menuitem: (u) => ({
|
|
2300
2338
|
class: [{
|
|
2301
|
-
"cursor-pointer": !
|
|
2339
|
+
"cursor-pointer": !u.context.disabled
|
|
2302
2340
|
}]
|
|
2303
2341
|
}),
|
|
2304
|
-
step: (
|
|
2342
|
+
step: (u) => ({
|
|
2305
2343
|
class: [
|
|
2306
2344
|
"d-flex align-items-center justify-content-center mb-2 step",
|
|
2307
2345
|
{
|
|
2308
|
-
inactive:
|
|
2309
|
-
"bg-primary text-white":
|
|
2310
|
-
"bg-brand text-white":
|
|
2311
|
-
"bg-secondary text-white":
|
|
2312
|
-
"bg-success text-white":
|
|
2313
|
-
"bg-warning text-white":
|
|
2314
|
-
"bg-danger text-white":
|
|
2315
|
-
"bg-info text-white":
|
|
2346
|
+
inactive: u.context.disabled,
|
|
2347
|
+
"bg-primary text-white": u.context.index === o.value && (a.severity === void 0 || a.severity === "primary"),
|
|
2348
|
+
"bg-brand text-white": u.context.index === o.value && a.severity === "brand",
|
|
2349
|
+
"bg-secondary text-white": u.context.index === o.value && a.severity === "secondary",
|
|
2350
|
+
"bg-success text-white": u.context.index === o.value && a.severity === "success",
|
|
2351
|
+
"bg-warning text-white": u.context.index === o.value && a.severity === "warning",
|
|
2352
|
+
"bg-danger text-white": u.context.index === o.value && a.severity === "danger",
|
|
2353
|
+
"bg-info text-white": u.context.index === o.value && a.severity === "info"
|
|
2316
2354
|
}
|
|
2317
2355
|
]
|
|
2318
2356
|
}),
|
|
2319
|
-
label: (
|
|
2357
|
+
label: (u) => ({
|
|
2320
2358
|
class: [
|
|
2321
2359
|
"h5",
|
|
2322
2360
|
{
|
|
2323
|
-
"border-bottom border-2 border-primary":
|
|
2324
|
-
"border-bottom border-2 border-brand":
|
|
2325
|
-
"border-bottom border-2 border-secondary":
|
|
2326
|
-
"border-bottom border-2 border-success":
|
|
2327
|
-
"border-bottom border-2 border-warning":
|
|
2328
|
-
"border-bottom border-2 border-danger":
|
|
2329
|
-
"border-bottom border-2 border-info":
|
|
2361
|
+
"border-bottom border-2 border-primary": u.context.index === o.value && (a.severity === void 0 || a.severity === "primary"),
|
|
2362
|
+
"border-bottom border-2 border-brand": u.context.index === o.value && a.severity === "brand",
|
|
2363
|
+
"border-bottom border-2 border-secondary": u.context.index === o.value && a.severity === "secondary",
|
|
2364
|
+
"border-bottom border-2 border-success": u.context.index === o.value && a.severity === "success",
|
|
2365
|
+
"border-bottom border-2 border-warning": u.context.index === o.value && a.severity === "warning",
|
|
2366
|
+
"border-bottom border-2 border-danger": u.context.index === o.value && a.severity === "danger",
|
|
2367
|
+
"border-bottom border-2 border-info": u.context.index === o.value && a.severity === "info"
|
|
2330
2368
|
}
|
|
2331
2369
|
]
|
|
2332
2370
|
})
|
|
2333
2371
|
}));
|
|
2334
|
-
return (
|
|
2335
|
-
const p = R, x =
|
|
2336
|
-
return
|
|
2337
|
-
|
|
2338
|
-
|
|
2372
|
+
return (u, n) => {
|
|
2373
|
+
const p = R, x = ze, _ = Ie;
|
|
2374
|
+
return i(), y("div", Wt, [
|
|
2375
|
+
c("div", Zt, [
|
|
2376
|
+
f(p, {
|
|
2339
2377
|
severity: a.severity,
|
|
2340
|
-
disabled:
|
|
2341
|
-
onClick:
|
|
2378
|
+
disabled: r.value,
|
|
2379
|
+
onClick: s,
|
|
2342
2380
|
class: "rounded-circle py-2 me-4",
|
|
2343
2381
|
"data-cy": "back-button"
|
|
2344
2382
|
}, {
|
|
2345
|
-
default:
|
|
2346
|
-
|
|
2383
|
+
default: b(() => [
|
|
2384
|
+
f(m(T), {
|
|
2347
2385
|
icon: "bi:chevron-left",
|
|
2348
2386
|
class: "mb-1"
|
|
2349
2387
|
})
|
|
2350
2388
|
]),
|
|
2351
2389
|
_: 1
|
|
2352
2390
|
}, 8, ["severity", "disabled"]),
|
|
2353
|
-
|
|
2391
|
+
f(x, {
|
|
2354
2392
|
"active-step": o.value,
|
|
2355
|
-
"onUpdate:activeStep":
|
|
2393
|
+
"onUpdate:activeStep": n[0] || (n[0] = (P) => o.value = P),
|
|
2356
2394
|
model: a.model,
|
|
2357
|
-
pt:
|
|
2395
|
+
pt: v.value,
|
|
2358
2396
|
readonly: !1
|
|
2359
2397
|
}, null, 8, ["active-step", "model", "pt"])
|
|
2360
2398
|
]),
|
|
2361
|
-
|
|
2362
|
-
(
|
|
2363
|
-
key:
|
|
2399
|
+
f(_),
|
|
2400
|
+
(i(!0), y(N, null, q(a.model, (P, M) => (i(), y("div", {
|
|
2401
|
+
key: M,
|
|
2364
2402
|
class: "w-100"
|
|
2365
2403
|
}, [
|
|
2366
|
-
|
|
2404
|
+
M === o.value ? B(u.$slots, P.key ?? P.label, {
|
|
2367
2405
|
key: 0,
|
|
2368
|
-
nextStep:
|
|
2369
|
-
previousStep:
|
|
2406
|
+
nextStep: d,
|
|
2407
|
+
previousStep: s
|
|
2370
2408
|
}, () => [
|
|
2371
|
-
|
|
2409
|
+
f(se, {
|
|
2372
2410
|
severity: "info",
|
|
2373
2411
|
"data-cy": "alert"
|
|
2374
2412
|
}, {
|
|
2375
|
-
default:
|
|
2376
|
-
|
|
2377
|
-
|
|
2413
|
+
default: b(() => [
|
|
2414
|
+
O(" Please add Slot Content for the key " + w(P.key ?? P.label) + " ", 1),
|
|
2415
|
+
f(p, {
|
|
2378
2416
|
severity: "primary",
|
|
2379
2417
|
label: "Next",
|
|
2380
|
-
onClick:
|
|
2418
|
+
onClick: d,
|
|
2381
2419
|
class: "ms-2"
|
|
2382
2420
|
})
|
|
2383
2421
|
]),
|
|
2384
2422
|
_: 2
|
|
2385
2423
|
}, 1024)
|
|
2386
|
-
]) :
|
|
2424
|
+
]) : S("", !0)
|
|
2387
2425
|
]))), 128))
|
|
2388
2426
|
]);
|
|
2389
2427
|
};
|
|
2390
2428
|
}
|
|
2391
|
-
}),
|
|
2429
|
+
}), Jt = { class: "p-4 text-wrap w-100" }, Xt = { class: "p-4 text-wrap w-100" }, Bl = /* @__PURE__ */ V({
|
|
2392
2430
|
__name: "ForgeTile",
|
|
2393
2431
|
props: {
|
|
2394
2432
|
severity: { default: "primary" },
|
|
@@ -2397,48 +2435,48 @@ const vt = { key: 0 }, yt = {
|
|
|
2397
2435
|
selected: { type: Boolean, default: !1 }
|
|
2398
2436
|
},
|
|
2399
2437
|
setup(e) {
|
|
2400
|
-
const t = e, l =
|
|
2401
|
-
return (o,
|
|
2402
|
-
const
|
|
2403
|
-
return t.clickable ? (
|
|
2438
|
+
const t = e, l = k(() => `${t.severity === void 0 ? "tile-primary" : `tile-${t.severity}`} ${t.barPosition === "none" ? "" : `tile-bar-${t.barPosition}`} ${t.selected ? "selected" : ""}`), a = k(() => `${t.severity === void 0 ? "tile-primary border-primary" : `tile-${t.severity} border-${t.severity}`} ${t.barPosition === "none" ? "" : `tile-bar-${t.barPosition}`} ${t.selected ? "selected" : ""}`);
|
|
2439
|
+
return (o, s) => {
|
|
2440
|
+
const d = R;
|
|
2441
|
+
return t.clickable ? (i(), h(d, {
|
|
2404
2442
|
key: 0,
|
|
2405
|
-
class:
|
|
2443
|
+
class: F(["d-flex w-100 p-0 text-body", l.value]),
|
|
2406
2444
|
severity: t.severity,
|
|
2407
2445
|
unstyled: "",
|
|
2408
2446
|
"data-cy": "button-tile"
|
|
2409
2447
|
}, {
|
|
2410
|
-
default:
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2448
|
+
default: b(() => [
|
|
2449
|
+
c("div", Jt, [
|
|
2450
|
+
B(o.$slots, "default", {}, () => [
|
|
2451
|
+
O("Tile Content")
|
|
2414
2452
|
])
|
|
2415
2453
|
])
|
|
2416
2454
|
]),
|
|
2417
2455
|
_: 3
|
|
2418
|
-
}, 8, ["severity", "class"])) : (
|
|
2456
|
+
}, 8, ["severity", "class"])) : (i(), y("div", {
|
|
2419
2457
|
key: 1,
|
|
2420
|
-
class:
|
|
2458
|
+
class: F(["d-flex w-100", a.value]),
|
|
2421
2459
|
"data-cy": "tile"
|
|
2422
2460
|
}, [
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2461
|
+
c("div", Xt, [
|
|
2462
|
+
B(o.$slots, "default", {}, () => [
|
|
2463
|
+
O("Tile Content")
|
|
2426
2464
|
])
|
|
2427
2465
|
])
|
|
2428
2466
|
], 2));
|
|
2429
2467
|
};
|
|
2430
2468
|
}
|
|
2431
2469
|
});
|
|
2432
|
-
function
|
|
2470
|
+
function Q(e, t) {
|
|
2433
2471
|
return e > 1 ? `${t}s` : t;
|
|
2434
2472
|
}
|
|
2435
|
-
const
|
|
2473
|
+
const Qt = {
|
|
2436
2474
|
class: "d-flex justify-content-start align-items-baseline",
|
|
2437
2475
|
"data-cy": "pagination-header"
|
|
2438
|
-
},
|
|
2476
|
+
}, ea = { class: "ms-2" }, ta = { key: 0 }, aa = /* @__PURE__ */ c("span", { class: "mx-2" }, "|", -1), la = {
|
|
2439
2477
|
class: "w-auto",
|
|
2440
2478
|
"data-cy": "total"
|
|
2441
|
-
},
|
|
2479
|
+
}, oa = /* @__PURE__ */ V({
|
|
2442
2480
|
__name: "ForgePaginationHeader",
|
|
2443
2481
|
props: {
|
|
2444
2482
|
total: {},
|
|
@@ -2447,28 +2485,28 @@ const Xt = {
|
|
|
2447
2485
|
},
|
|
2448
2486
|
emits: ["update:perPage"],
|
|
2449
2487
|
setup(e, { emit: t }) {
|
|
2450
|
-
const l = t, a = e, o = (
|
|
2451
|
-
l("update:perPage",
|
|
2452
|
-
},
|
|
2453
|
-
const
|
|
2454
|
-
return `${
|
|
2488
|
+
const l = t, a = e, o = (d) => {
|
|
2489
|
+
l("update:perPage", d.value);
|
|
2490
|
+
}, s = k(() => {
|
|
2491
|
+
const d = Math.ceil(a.total / a.perPage);
|
|
2492
|
+
return `${d} ${Q(d, "page")}`;
|
|
2455
2493
|
});
|
|
2456
|
-
return (
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2494
|
+
return (d, r) => (i(), y("div", Qt, [
|
|
2495
|
+
O(" Number of results per page "),
|
|
2496
|
+
c("div", ea, [
|
|
2497
|
+
f(m(ne), {
|
|
2460
2498
|
options: a.pageSizes,
|
|
2461
2499
|
"model-value": a.perPage,
|
|
2462
|
-
onChange:
|
|
2500
|
+
onChange: r[0] || (r[0] = (v) => o(v))
|
|
2463
2501
|
}, null, 8, ["options", "model-value"])
|
|
2464
2502
|
]),
|
|
2465
|
-
a.total ? (
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
])) :
|
|
2503
|
+
a.total ? (i(), y("div", ta, [
|
|
2504
|
+
aa,
|
|
2505
|
+
c("span", la, w(a.total) + " " + w(m(Q)(a.total, "result")) + " across " + w(s.value), 1)
|
|
2506
|
+
])) : S("", !0)
|
|
2469
2507
|
]));
|
|
2470
2508
|
}
|
|
2471
|
-
}),
|
|
2509
|
+
}), na = { class: "position-relative" }, sa = { "data-cy": "above-table-slot" }, ia = { class: "d-flex" }, ra = { class: "d-flex align-items-end mb-2" }, da = { key: 0 }, ua = { class: "ms-auto" }, ca = /* @__PURE__ */ c("span", { class: "me-2 my-auto text-nowrap" }, "Page Size:", -1), _l = /* @__PURE__ */ V({
|
|
2472
2510
|
__name: "ForgeTable",
|
|
2473
2511
|
props: {
|
|
2474
2512
|
value: {},
|
|
@@ -2548,17 +2586,17 @@ const Xt = {
|
|
|
2548
2586
|
},
|
|
2549
2587
|
emits: ["update:filters", "update:tableContext", "sort", "page"],
|
|
2550
2588
|
setup(e, { emit: t }) {
|
|
2551
|
-
const l = t, a = e, o = I(),
|
|
2589
|
+
const l = t, a = e, o = I(), s = I([10, 20, 50, 100]), d = I(20), r = I({
|
|
2552
2590
|
filters: a.filters,
|
|
2553
|
-
perPage:
|
|
2591
|
+
perPage: d.value,
|
|
2554
2592
|
page: 0,
|
|
2555
2593
|
sortDirection: "None",
|
|
2556
2594
|
sortField: "",
|
|
2557
2595
|
total: a.totalRecords ?? a.value.length
|
|
2558
|
-
}),
|
|
2559
|
-
const
|
|
2560
|
-
return `${
|
|
2561
|
-
}),
|
|
2596
|
+
}), v = k(() => a.totalRecords ?? a.value.length), u = k(() => {
|
|
2597
|
+
const g = Math.ceil(v.value / d.value);
|
|
2598
|
+
return `${g} ${Q(g, "page")}`;
|
|
2599
|
+
}), n = k(() => ({
|
|
2562
2600
|
thead: () => ({
|
|
2563
2601
|
class: [
|
|
2564
2602
|
{
|
|
@@ -2581,174 +2619,270 @@ const Xt = {
|
|
|
2581
2619
|
]
|
|
2582
2620
|
})
|
|
2583
2621
|
})), p = () => {
|
|
2584
|
-
for (const
|
|
2585
|
-
typeof a.filters[
|
|
2622
|
+
for (const g in a.filters)
|
|
2623
|
+
typeof a.filters[g] == "string" ? a.filters[g] = "" : a.filters[g].value = null;
|
|
2586
2624
|
P(a.filters);
|
|
2587
2625
|
}, x = () => {
|
|
2588
2626
|
o.value.exportCSV();
|
|
2589
|
-
}, _ = (
|
|
2590
|
-
var
|
|
2591
|
-
|
|
2592
|
-
}, P = (
|
|
2593
|
-
|
|
2594
|
-
},
|
|
2595
|
-
|
|
2596
|
-
},
|
|
2597
|
-
|
|
2627
|
+
}, _ = (g) => {
|
|
2628
|
+
var $;
|
|
2629
|
+
r.value.sortDirection = g.sortOrder === 1 ? "Asc" : g.sortOrder === -1 ? "Desc" : "None", r.value.sortField = (($ = g.sortField) == null ? void 0 : $.toString()) ?? "", l("update:tableContext", r.value), l("sort", g);
|
|
2630
|
+
}, P = (g) => {
|
|
2631
|
+
r.value.filters = g, l("update:tableContext", r.value), l("update:filters", g);
|
|
2632
|
+
}, M = (g) => {
|
|
2633
|
+
r.value.page = g.page, l("update:tableContext", r.value), l("page", g);
|
|
2634
|
+
}, z = () => {
|
|
2635
|
+
r.value.perPage = d.value, l("update:tableContext", r.value);
|
|
2598
2636
|
};
|
|
2599
|
-
return
|
|
2600
|
-
|
|
2601
|
-
}, { deep: !0 }), ae(() => l("update:tableContext",
|
|
2602
|
-
|
|
2603
|
-
|
|
2637
|
+
return re(() => a.filters, (g) => {
|
|
2638
|
+
r.value.filters = g, l("update:tableContext", r.value);
|
|
2639
|
+
}, { deep: !0 }), ae(() => l("update:tableContext", r.value)), (g, $) => (i(), y("div", na, [
|
|
2640
|
+
c("span", sa, [
|
|
2641
|
+
B(g.$slots, "above-table")
|
|
2604
2642
|
]),
|
|
2605
|
-
|
|
2643
|
+
f(m(Oe), C({
|
|
2606
2644
|
class: ["w-100", `${a.severity ? `forge-table-${a.severity}` : ""}`]
|
|
2607
|
-
}, { ...a, ...
|
|
2608
|
-
pt:
|
|
2609
|
-
rows:
|
|
2610
|
-
"total-records":
|
|
2645
|
+
}, { ...a, ...g.$attrs }, {
|
|
2646
|
+
pt: n.value,
|
|
2647
|
+
rows: d.value,
|
|
2648
|
+
"total-records": v.value,
|
|
2611
2649
|
"filter-display": a.filters ? "row" : void 0,
|
|
2612
2650
|
ref_key: "forgeTable",
|
|
2613
2651
|
ref: o,
|
|
2614
2652
|
"data-cy": "table",
|
|
2615
2653
|
"onUpdate:filters": P,
|
|
2616
2654
|
onSort: _,
|
|
2617
|
-
onPage:
|
|
2655
|
+
onPage: M
|
|
2618
2656
|
}), oe({
|
|
2619
|
-
header:
|
|
2620
|
-
|
|
2621
|
-
class:
|
|
2657
|
+
header: b(() => [
|
|
2658
|
+
c("div", {
|
|
2659
|
+
class: F(a.loading ? "opacity-50" : "")
|
|
2622
2660
|
}, [
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
total:
|
|
2628
|
-
"page-sizes":
|
|
2629
|
-
"per-page":
|
|
2661
|
+
c("div", ia, [
|
|
2662
|
+
c("div", ra, [
|
|
2663
|
+
g.paginator && !g.legacyPaginationFooter ? (i(), y("span", da, [
|
|
2664
|
+
f(oa, {
|
|
2665
|
+
total: v.value,
|
|
2666
|
+
"page-sizes": s.value,
|
|
2667
|
+
"per-page": d.value,
|
|
2630
2668
|
"onUpdate:perPage": [
|
|
2631
|
-
|
|
2632
|
-
|
|
2669
|
+
$[0] || ($[0] = (G) => d.value = G),
|
|
2670
|
+
z
|
|
2633
2671
|
]
|
|
2634
2672
|
}, null, 8, ["total", "page-sizes", "per-page"])
|
|
2635
|
-
])) :
|
|
2673
|
+
])) : S("", !0)
|
|
2636
2674
|
]),
|
|
2637
|
-
|
|
2638
|
-
|
|
2675
|
+
c("div", ua, [
|
|
2676
|
+
g.showClearButton ? (i(), h(m(R), {
|
|
2639
2677
|
key: 0,
|
|
2640
2678
|
outlined: "",
|
|
2641
|
-
class:
|
|
2679
|
+
class: F(g.showExporterButton ? "me-2" : ""),
|
|
2642
2680
|
onClick: p,
|
|
2643
2681
|
"data-cy": "clear-all"
|
|
2644
2682
|
}, {
|
|
2645
|
-
default:
|
|
2646
|
-
|
|
2683
|
+
default: b(() => [
|
|
2684
|
+
f(m(T), {
|
|
2647
2685
|
icon: "bi:funnel-fill",
|
|
2648
2686
|
width: "24",
|
|
2649
2687
|
height: "24"
|
|
2650
2688
|
}),
|
|
2651
|
-
|
|
2689
|
+
O(" Clear ")
|
|
2652
2690
|
]),
|
|
2653
2691
|
_: 1
|
|
2654
|
-
}, 8, ["class"])) :
|
|
2655
|
-
|
|
2692
|
+
}, 8, ["class"])) : S("", !0),
|
|
2693
|
+
g.showExporterButton ? (i(), h(m(R), {
|
|
2656
2694
|
key: 1,
|
|
2657
2695
|
outlined: "",
|
|
2658
2696
|
onClick: x,
|
|
2659
2697
|
"data-cy": "exporter"
|
|
2660
2698
|
}, {
|
|
2661
|
-
default:
|
|
2662
|
-
|
|
2699
|
+
default: b(() => [
|
|
2700
|
+
f(m(T), {
|
|
2663
2701
|
icon: "typcn:export",
|
|
2664
2702
|
width: "24",
|
|
2665
2703
|
height: "24"
|
|
2666
2704
|
}),
|
|
2667
|
-
|
|
2705
|
+
O(" Export ")
|
|
2668
2706
|
]),
|
|
2669
2707
|
_: 1
|
|
2670
|
-
})) :
|
|
2708
|
+
})) : S("", !0)
|
|
2671
2709
|
])
|
|
2672
2710
|
])
|
|
2673
2711
|
], 2)
|
|
2674
2712
|
]),
|
|
2675
|
-
default:
|
|
2676
|
-
|
|
2713
|
+
default: b(() => [
|
|
2714
|
+
B(g.$slots, "default")
|
|
2677
2715
|
]),
|
|
2678
2716
|
_: 2
|
|
2679
2717
|
}, [
|
|
2680
|
-
|
|
2681
|
-
name:
|
|
2682
|
-
fn:
|
|
2683
|
-
|
|
2718
|
+
q(g.$slots, (G, Z) => ({
|
|
2719
|
+
name: Z,
|
|
2720
|
+
fn: b((ie) => [
|
|
2721
|
+
B(g.$slots, Z, ee(te(ie || {})))
|
|
2684
2722
|
])
|
|
2685
2723
|
})),
|
|
2686
|
-
|
|
2724
|
+
g.legacyPaginationFooter ? {
|
|
2687
2725
|
name: "paginatorstart",
|
|
2688
|
-
fn:
|
|
2689
|
-
|
|
2690
|
-
class:
|
|
2726
|
+
fn: b(() => [
|
|
2727
|
+
c("span", {
|
|
2728
|
+
class: F(["d-flex", a.loading ? "opacity-50" : ""]),
|
|
2691
2729
|
"data-cy": "legacy-page-size"
|
|
2692
2730
|
}, [
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
options:
|
|
2696
|
-
modelValue:
|
|
2697
|
-
"onUpdate:modelValue":
|
|
2731
|
+
ca,
|
|
2732
|
+
f(m(ne), {
|
|
2733
|
+
options: s.value,
|
|
2734
|
+
modelValue: d.value,
|
|
2735
|
+
"onUpdate:modelValue": $[1] || ($[1] = (G) => d.value = G),
|
|
2698
2736
|
class: "ms-2",
|
|
2699
|
-
onClick:
|
|
2737
|
+
onClick: z
|
|
2700
2738
|
}, null, 8, ["options", "modelValue"])
|
|
2701
2739
|
], 2)
|
|
2702
2740
|
]),
|
|
2703
2741
|
key: "0"
|
|
2704
2742
|
} : void 0,
|
|
2705
|
-
|
|
2743
|
+
g.legacyPaginationFooter ? {
|
|
2706
2744
|
name: "paginatorend",
|
|
2707
|
-
fn:
|
|
2708
|
-
|
|
2745
|
+
fn: b(() => [
|
|
2746
|
+
c("span", {
|
|
2709
2747
|
"data-cy": "legacy-total",
|
|
2710
|
-
class:
|
|
2711
|
-
},
|
|
2748
|
+
class: F(a.loading ? "opacity-50" : "")
|
|
2749
|
+
}, w(v.value) + " " + w(m(Q)(v.value, "result")) + " across " + w(u.value), 3)
|
|
2712
2750
|
]),
|
|
2713
2751
|
key: "1"
|
|
2714
2752
|
} : void 0
|
|
2715
2753
|
]), 1040, ["class", "pt", "rows", "total-records", "filter-display"])
|
|
2716
2754
|
]));
|
|
2717
2755
|
}
|
|
2718
|
-
}),
|
|
2756
|
+
}), ma = { class: "d-flex position-relative" }, pa = { class: "d-flex w-100" }, va = { class: "d-flex w-100" }, Fl = /* @__PURE__ */ V({
|
|
2719
2757
|
__name: "ForgeFilterHeader",
|
|
2720
|
-
props: {
|
|
2758
|
+
props: /* @__PURE__ */ j({
|
|
2721
2759
|
dataType: {},
|
|
2722
|
-
dropdownOptions: {}
|
|
2723
|
-
|
|
2760
|
+
dropdownOptions: {},
|
|
2761
|
+
showClearButton: { type: Boolean, default: !1 },
|
|
2762
|
+
clearFilter: { type: Function }
|
|
2763
|
+
}, {
|
|
2764
|
+
modelValue: { required: !0 },
|
|
2765
|
+
modelModifiers: {}
|
|
2766
|
+
}),
|
|
2767
|
+
emits: ["update:modelValue"],
|
|
2724
2768
|
setup(e) {
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2769
|
+
const t = E(e, "modelValue"), l = () => {
|
|
2770
|
+
e.clearFilter ? e.clearFilter() : t.value = null;
|
|
2771
|
+
};
|
|
2772
|
+
return (a, o) => {
|
|
2773
|
+
const s = me, d = R;
|
|
2774
|
+
return i(), y("div", ma, [
|
|
2775
|
+
a.dataType === "numeric" ? (i(), h(s, C({
|
|
2776
|
+
key: 0,
|
|
2777
|
+
modelValue: t.value,
|
|
2778
|
+
"onUpdate:modelValue": o[0] || (o[0] = (r) => t.value = r)
|
|
2779
|
+
}, a.$attrs), null, 16, ["modelValue"])) : a.dataType === "date" ? (i(), h(fe, C({
|
|
2780
|
+
key: 1,
|
|
2781
|
+
modelValue: t.value,
|
|
2782
|
+
"onUpdate:modelValue": o[1] || (o[1] = (r) => t.value = r)
|
|
2783
|
+
}, a.$attrs, {
|
|
2784
|
+
"show-icon": !1,
|
|
2785
|
+
"show-on-focus": !0
|
|
2786
|
+
}), null, 16, ["modelValue"])) : a.dataType === "select" ? (i(), h(m(ne), C({
|
|
2787
|
+
key: 2,
|
|
2788
|
+
modelValue: t.value,
|
|
2789
|
+
"onUpdate:modelValue": o[2] || (o[2] = (r) => t.value = r)
|
|
2790
|
+
}, a.$attrs, { options: a.dropdownOptions }), {
|
|
2791
|
+
value: b(({ value: r, placeholder: v }) => [
|
|
2792
|
+
c("div", pa, [
|
|
2793
|
+
c("span", {
|
|
2794
|
+
class: F({ "filter-placeholder": r === null })
|
|
2795
|
+
}, w(r !== null ? r : v), 3),
|
|
2796
|
+
a.showClearButton && t.value !== null ? (i(), h(d, {
|
|
2797
|
+
key: 0,
|
|
2798
|
+
onClick: Y(l, ["prevent"]),
|
|
2799
|
+
size: "small",
|
|
2800
|
+
class: "bg-transparent border-0 ms-auto p-0 pe-1"
|
|
2801
|
+
}, {
|
|
2802
|
+
default: b(() => [
|
|
2803
|
+
f(m(T), {
|
|
2804
|
+
icon: "bi:x",
|
|
2805
|
+
width: "1rem",
|
|
2806
|
+
height: "1rem",
|
|
2807
|
+
class: "text-black"
|
|
2808
|
+
})
|
|
2809
|
+
]),
|
|
2810
|
+
_: 1
|
|
2811
|
+
})) : S("", !0)
|
|
2812
|
+
])
|
|
2813
|
+
]),
|
|
2814
|
+
_: 1
|
|
2815
|
+
}, 16, ["modelValue", "options"])) : a.dataType === "multiselect" ? (i(), h(m(De), C({
|
|
2816
|
+
key: 3,
|
|
2817
|
+
modelValue: t.value,
|
|
2818
|
+
"onUpdate:modelValue": o[3] || (o[3] = (r) => t.value = r)
|
|
2819
|
+
}, a.$attrs, {
|
|
2820
|
+
options: a.dropdownOptions,
|
|
2821
|
+
showToggleAll: !1,
|
|
2822
|
+
filter: ""
|
|
2823
|
+
}), {
|
|
2824
|
+
value: b(({ value: r, placeholder: v }) => [
|
|
2825
|
+
c("div", va, [
|
|
2826
|
+
c("span", {
|
|
2827
|
+
class: F({ "filter-placeholder": (r == null ? void 0 : r.length) === 0 })
|
|
2828
|
+
}, w(r !== null && (r == null ? void 0 : r.length) > 0 ? r.join(", ") : v), 3),
|
|
2829
|
+
a.showClearButton && (r == null ? void 0 : r.length) > 0 ? (i(), h(d, {
|
|
2830
|
+
key: 0,
|
|
2831
|
+
onClick: Y(l, ["prevent"]),
|
|
2832
|
+
size: "small",
|
|
2833
|
+
class: "bg-transparent border-0 ms-auto p-0 pe-1"
|
|
2834
|
+
}, {
|
|
2835
|
+
default: b(() => [
|
|
2836
|
+
f(m(T), {
|
|
2837
|
+
icon: "bi:x",
|
|
2838
|
+
width: "1rem",
|
|
2839
|
+
height: "1rem",
|
|
2840
|
+
class: "text-black"
|
|
2841
|
+
})
|
|
2842
|
+
]),
|
|
2843
|
+
_: 1
|
|
2844
|
+
})) : S("", !0)
|
|
2845
|
+
])
|
|
2846
|
+
]),
|
|
2847
|
+
_: 1
|
|
2848
|
+
}, 16, ["modelValue", "options"])) : (i(), h(m(de), C({
|
|
2849
|
+
key: 4,
|
|
2850
|
+
modelValue: t.value,
|
|
2851
|
+
"onUpdate:modelValue": o[4] || (o[4] = (r) => t.value = r)
|
|
2852
|
+
}, a.$attrs), null, 16, ["modelValue"])),
|
|
2853
|
+
a.showClearButton && t.value !== null && a.dataType !== "select" && a.dataType !== "multiselect" && a.dataType !== "date" ? (i(), h(d, {
|
|
2854
|
+
key: 5,
|
|
2855
|
+
onClick: Y(l, ["prevent"]),
|
|
2856
|
+
size: "small",
|
|
2857
|
+
class: "bg-transparent border-0 ms-auto p-0 pe-1 position-absolute end-0 top-0 bottom-0"
|
|
2858
|
+
}, {
|
|
2859
|
+
default: b(() => [
|
|
2860
|
+
f(m(T), {
|
|
2861
|
+
icon: "bi:x",
|
|
2862
|
+
width: "1rem",
|
|
2863
|
+
height: "1rem",
|
|
2864
|
+
class: "text-black bg-white"
|
|
2865
|
+
})
|
|
2866
|
+
]),
|
|
2867
|
+
_: 1
|
|
2868
|
+
})) : S("", !0)
|
|
2869
|
+
]);
|
|
2736
2870
|
};
|
|
2737
2871
|
}
|
|
2738
2872
|
});
|
|
2739
|
-
function
|
|
2740
|
-
const o = t.flatMap((
|
|
2741
|
-
return t = t.map((
|
|
2742
|
-
const
|
|
2743
|
-
let
|
|
2744
|
-
|
|
2745
|
-
file:
|
|
2746
|
-
status:
|
|
2873
|
+
function ge(e, t, l, a) {
|
|
2874
|
+
const o = t.flatMap((s) => s.file);
|
|
2875
|
+
return t = t.map((s) => ({ ...s, status: s.status == "Duplicate" ? "Not Uploaded" : s.status })), e.forEach((s) => {
|
|
2876
|
+
const d = o.findIndex((v) => v.name === s.name);
|
|
2877
|
+
let r = "Not Uploaded";
|
|
2878
|
+
d === -1 ? ((!l.includes(s.type) || !(s.size <= a)) && (r = l.includes(s.type) ? "InvalidFileSize" : "InvalidFileType"), t.unshift({
|
|
2879
|
+
file: s,
|
|
2880
|
+
status: r,
|
|
2747
2881
|
blobFileName: null
|
|
2748
|
-
})) : t[
|
|
2882
|
+
})) : t[d].status = "Duplicate";
|
|
2749
2883
|
}), t;
|
|
2750
2884
|
}
|
|
2751
|
-
async function
|
|
2885
|
+
async function ya(e, t) {
|
|
2752
2886
|
if (e === "Uploaded" && t !== null)
|
|
2753
2887
|
try {
|
|
2754
2888
|
await new pe(t).delete();
|
|
@@ -2764,22 +2898,22 @@ function ue(e, t = !0, l = 1) {
|
|
|
2764
2898
|
if (Math.abs(e) < a)
|
|
2765
2899
|
return e + " B";
|
|
2766
2900
|
const o = t ? ["kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"] : ["KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"];
|
|
2767
|
-
let
|
|
2768
|
-
const
|
|
2901
|
+
let s = -1;
|
|
2902
|
+
const d = 10 ** l;
|
|
2769
2903
|
do
|
|
2770
|
-
e /= a, ++
|
|
2771
|
-
while (Math.round(Math.abs(e) *
|
|
2772
|
-
return e.toFixed(l) + " " + o[
|
|
2904
|
+
e /= a, ++s;
|
|
2905
|
+
while (Math.round(Math.abs(e) * d) / d >= a && s < o.length - 1);
|
|
2906
|
+
return e.toFixed(l) + " " + o[s];
|
|
2773
2907
|
}
|
|
2774
|
-
function
|
|
2908
|
+
function ba(e) {
|
|
2775
2909
|
return ["image/gif", "image/png", "image/jpeg", "image/svg"].includes(e);
|
|
2776
2910
|
}
|
|
2777
|
-
function
|
|
2911
|
+
function fa(e) {
|
|
2778
2912
|
return URL.createObjectURL(e);
|
|
2779
2913
|
}
|
|
2780
|
-
const
|
|
2914
|
+
const ga = { class: "d-flex justify-content-between" }, ha = ["accept", "disabled", "multiple"], wa = /* @__PURE__ */ V({
|
|
2781
2915
|
__name: "UploadButton",
|
|
2782
|
-
props: /* @__PURE__ */
|
|
2916
|
+
props: /* @__PURE__ */ j({
|
|
2783
2917
|
acceptedFileTypes: {},
|
|
2784
2918
|
maxFileInput: {},
|
|
2785
2919
|
showDragDropArea: { type: Boolean }
|
|
@@ -2789,54 +2923,54 @@ const va = { class: "d-flex justify-content-between" }, ya = ["accept", "disable
|
|
|
2789
2923
|
}),
|
|
2790
2924
|
emits: ["update:modelValue"],
|
|
2791
2925
|
setup(e) {
|
|
2792
|
-
const t = E(e, "modelValue"), l =
|
|
2793
|
-
t.value =
|
|
2926
|
+
const t = E(e, "modelValue"), l = k(() => e.maxFileInput <= t.value.length), a = (o) => {
|
|
2927
|
+
t.value = ge(o, t.value, e.acceptedFileTypes, e.maxFileInput);
|
|
2794
2928
|
};
|
|
2795
|
-
return (o,
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2929
|
+
return (o, s) => (i(), y("div", ga, [
|
|
2930
|
+
B(o.$slots, "message"),
|
|
2931
|
+
c("div", null, [
|
|
2932
|
+
c("input", {
|
|
2799
2933
|
id: "file-input",
|
|
2800
2934
|
type: "file",
|
|
2801
2935
|
class: "d-none",
|
|
2802
2936
|
accept: o.acceptedFileTypes.join(", "),
|
|
2803
2937
|
disabled: l.value,
|
|
2804
2938
|
multiple: o.maxFileInput > 1,
|
|
2805
|
-
onInput:
|
|
2806
|
-
}, null, 40,
|
|
2807
|
-
|
|
2808
|
-
class:
|
|
2939
|
+
onInput: s[0] || (s[0] = (d) => a([...d.target.files]))
|
|
2940
|
+
}, null, 40, ha),
|
|
2941
|
+
c("label", {
|
|
2942
|
+
class: F([{ disabled: l.value }, "btn btn-primary"]),
|
|
2809
2943
|
id: "file-input-button",
|
|
2810
2944
|
for: "file-input"
|
|
2811
2945
|
}, [
|
|
2812
|
-
|
|
2813
|
-
|
|
2946
|
+
B(o.$slots, "button-content", {}, () => [
|
|
2947
|
+
f(m(T), {
|
|
2814
2948
|
icon: "bi:upload",
|
|
2815
2949
|
class: "me-2",
|
|
2816
2950
|
height: "20px",
|
|
2817
2951
|
width: "20px"
|
|
2818
2952
|
}),
|
|
2819
|
-
|
|
2953
|
+
O(" Browse your computer ")
|
|
2820
2954
|
])
|
|
2821
2955
|
], 2)
|
|
2822
2956
|
]),
|
|
2823
|
-
o.showDragDropArea ? (
|
|
2957
|
+
o.showDragDropArea ? (i(), y("div", {
|
|
2824
2958
|
class: "ms-auto",
|
|
2825
2959
|
key: o.acceptedFileTypes.length,
|
|
2826
2960
|
id: "accepted-file-types"
|
|
2827
|
-
}, "Accepted File Types: " +
|
|
2961
|
+
}, "Accepted File Types: " + w(o.acceptedFileTypes.map((d) => d.split("/").pop()).join(", ")), 1)) : S("", !0)
|
|
2828
2962
|
]));
|
|
2829
2963
|
}
|
|
2830
|
-
}),
|
|
2964
|
+
}), xa = {
|
|
2831
2965
|
key: 0,
|
|
2832
2966
|
class: "py-4 px-3",
|
|
2833
2967
|
id: "placeholder-message"
|
|
2834
|
-
},
|
|
2968
|
+
}, ka = {
|
|
2835
2969
|
key: 1,
|
|
2836
2970
|
class: "d-flex flex-column"
|
|
2837
|
-
},
|
|
2971
|
+
}, $a = /* @__PURE__ */ V({
|
|
2838
2972
|
__name: "DragDropArea",
|
|
2839
|
-
props: /* @__PURE__ */
|
|
2973
|
+
props: /* @__PURE__ */ j({
|
|
2840
2974
|
maxFileInput: {},
|
|
2841
2975
|
maxFileSize: {},
|
|
2842
2976
|
acceptedFileTypes: {}
|
|
@@ -2846,30 +2980,30 @@ const va = { class: "d-flex justify-content-between" }, ya = ["accept", "disable
|
|
|
2846
2980
|
}),
|
|
2847
2981
|
emits: ["update:modelValue"],
|
|
2848
2982
|
setup(e) {
|
|
2849
|
-
const t = E(e, "modelValue"), l = I(!1), a =
|
|
2850
|
-
l.value = !1,
|
|
2983
|
+
const t = E(e, "modelValue"), l = I(!1), a = k(() => e.maxFileInput <= t.value.length), o = (s) => {
|
|
2984
|
+
l.value = !1, s.dataTransfer.files.length > e.maxFileInput || a.value ? s.preventDefault() : t.value = ge([...s.dataTransfer.files], t.value, e.acceptedFileTypes, e.maxFileSize);
|
|
2851
2985
|
};
|
|
2852
|
-
return (
|
|
2986
|
+
return (s, d) => (i(), y("div", {
|
|
2853
2987
|
id: "drag-drop-area",
|
|
2854
|
-
class:
|
|
2855
|
-
onDragleave:
|
|
2856
|
-
onDragover:
|
|
2857
|
-
onDrop:
|
|
2988
|
+
class: F(`${l.value ? "border-2 border-primary bg-body-tertiary" : ""} mt-3 file-container border-dashed border-2`),
|
|
2989
|
+
onDragleave: d[0] || (d[0] = Y((r) => l.value = !1, ["prevent"])),
|
|
2990
|
+
onDragover: d[1] || (d[1] = Y((r) => l.value = !0, ["prevent"])),
|
|
2991
|
+
onDrop: Y(o, ["prevent"])
|
|
2858
2992
|
}, [
|
|
2859
|
-
t.value.length === 0 ? (
|
|
2860
|
-
|
|
2993
|
+
t.value.length === 0 ? (i(), y("div", xa, [
|
|
2994
|
+
f(m(T), {
|
|
2861
2995
|
icon: "bi:upload",
|
|
2862
2996
|
class: "me-2",
|
|
2863
2997
|
height: "20px",
|
|
2864
2998
|
width: "20px"
|
|
2865
2999
|
}),
|
|
2866
|
-
|
|
2867
|
-
])) : (
|
|
2868
|
-
|
|
3000
|
+
O(" Drag and drop files here ")
|
|
3001
|
+
])) : (i(), y("div", ka, [
|
|
3002
|
+
B(s.$slots, "default")
|
|
2869
3003
|
]))
|
|
2870
3004
|
], 34));
|
|
2871
3005
|
}
|
|
2872
|
-
}),
|
|
3006
|
+
}), Ba = { class: "d-flex align-items-center me-2" }, _a = /* @__PURE__ */ V({
|
|
2873
3007
|
__name: "UploadStatus",
|
|
2874
3008
|
props: {
|
|
2875
3009
|
fileSize: {},
|
|
@@ -2878,7 +3012,7 @@ const va = { class: "d-flex justify-content-between" }, ya = ["accept", "disable
|
|
|
2878
3012
|
uploadStatus: {}
|
|
2879
3013
|
},
|
|
2880
3014
|
setup(e) {
|
|
2881
|
-
const t =
|
|
3015
|
+
const t = k(() => e.uploadStatus === "Failed" || e.uploadStatus === "InvalidFileType" || e.uploadStatus === "InvalidFileSize" ? "danger" : "warning"), l = k(() => {
|
|
2882
3016
|
switch (e.uploadStatus) {
|
|
2883
3017
|
case "InvalidFileType":
|
|
2884
3018
|
return "Upload Failed: File type is not accepted.";
|
|
@@ -2894,43 +3028,43 @@ const va = { class: "d-flex justify-content-between" }, ya = ["accept", "disable
|
|
|
2894
3028
|
return "Upload Failed: Connection error, please try again.";
|
|
2895
3029
|
}
|
|
2896
3030
|
});
|
|
2897
|
-
return (a, o) => (
|
|
2898
|
-
a.uploadStatus === "Uploading" ? (
|
|
3031
|
+
return (a, o) => (i(), y("div", Ba, [
|
|
3032
|
+
a.uploadStatus === "Uploading" ? (i(), h(Gt, {
|
|
2899
3033
|
key: 0,
|
|
2900
3034
|
pixelWidth: 200,
|
|
2901
3035
|
animate: "",
|
|
2902
3036
|
striped: ""
|
|
2903
3037
|
}, {
|
|
2904
|
-
default:
|
|
2905
|
-
|
|
3038
|
+
default: b(() => [
|
|
3039
|
+
O(w((a.bytesUploaded / a.fileSize * 100).toFixed(0)) + "%", 1)
|
|
2906
3040
|
]),
|
|
2907
3041
|
_: 1
|
|
2908
|
-
})) :
|
|
2909
|
-
a.uploadStatus !== "Uploading" && a.uploadStatus !== "Not Uploaded" && a.uploadStatus !== "Uploaded" && a.uploadStatus !== "Preparing" ? (
|
|
3042
|
+
})) : S("", !0),
|
|
3043
|
+
a.uploadStatus !== "Uploading" && a.uploadStatus !== "Not Uploaded" && a.uploadStatus !== "Uploaded" && a.uploadStatus !== "Preparing" ? (i(), h(se, {
|
|
2910
3044
|
key: 1,
|
|
2911
3045
|
id: "upload-status-alert",
|
|
2912
3046
|
severity: t.value,
|
|
2913
3047
|
class: "mb-0 w-75 ms-auto"
|
|
2914
3048
|
}, {
|
|
2915
|
-
default:
|
|
2916
|
-
|
|
3049
|
+
default: b(() => [
|
|
3050
|
+
O(w(l.value), 1)
|
|
2917
3051
|
]),
|
|
2918
3052
|
_: 1
|
|
2919
|
-
}, 8, ["severity"])) :
|
|
3053
|
+
}, 8, ["severity"])) : S("", !0)
|
|
2920
3054
|
]));
|
|
2921
3055
|
}
|
|
2922
|
-
}),
|
|
3056
|
+
}), Fa = ["data-cy"], Va = { class: "ms-3 d-flex flex-column" }, Sa = {
|
|
2923
3057
|
key: 1,
|
|
2924
3058
|
id: "file-name"
|
|
2925
|
-
},
|
|
3059
|
+
}, Ca = {
|
|
2926
3060
|
class: "text-black-50",
|
|
2927
3061
|
id: "file-type"
|
|
2928
|
-
},
|
|
3062
|
+
}, Ta = {
|
|
2929
3063
|
class: "text-black-50",
|
|
2930
3064
|
id: "file-size"
|
|
2931
|
-
},
|
|
3065
|
+
}, Pa = { class: "ms-auto my-auto d-flex" }, Ma = /* @__PURE__ */ V({
|
|
2932
3066
|
__name: "FileInfo",
|
|
2933
|
-
props: /* @__PURE__ */
|
|
3067
|
+
props: /* @__PURE__ */ j({
|
|
2934
3068
|
editableFileName: { type: Boolean },
|
|
2935
3069
|
acceptedFileTypes: {},
|
|
2936
3070
|
maxFileSize: {},
|
|
@@ -2945,57 +3079,57 @@ const va = { class: "d-flex justify-content-between" }, ya = ["accept", "disable
|
|
|
2945
3079
|
uploadStatus: { required: !0 },
|
|
2946
3080
|
uploadStatusModifiers: {}
|
|
2947
3081
|
}),
|
|
2948
|
-
emits: /* @__PURE__ */
|
|
3082
|
+
emits: /* @__PURE__ */ j(["deleted"], ["update:file", "update:blobFileName", "update:uploadStatus"]),
|
|
2949
3083
|
setup(e, { emit: t }) {
|
|
2950
|
-
const l = E(e, "file"), a = E(e, "blobFileName"), o = E(e, "uploadStatus"),
|
|
2951
|
-
l.value = new File([l.value],
|
|
3084
|
+
const l = E(e, "file"), a = E(e, "blobFileName"), o = E(e, "uploadStatus"), s = t, d = I(l.value.name), r = I(""), v = I(0), u = I(), n = k(() => e.acceptedFileTypes.includes(l.value.type)), p = k(() => l.value.size <= e.maxFileSize), x = () => {
|
|
3085
|
+
l.value = new File([l.value], d.value, { type: l.value.type, lastModified: (/* @__PURE__ */ new Date()).valueOf() });
|
|
2952
3086
|
}, _ = async () => {
|
|
2953
|
-
if (!
|
|
2954
|
-
o.value =
|
|
3087
|
+
if (!n.value || !p.value) {
|
|
3088
|
+
o.value = n.value ? "InvalidFileSize" : "InvalidFileType";
|
|
2955
3089
|
return;
|
|
2956
3090
|
}
|
|
2957
|
-
o.value = "Preparing",
|
|
2958
|
-
const [
|
|
2959
|
-
if (!
|
|
3091
|
+
o.value = "Preparing", u.value = new AbortController();
|
|
3092
|
+
const [M, z] = await e.getFileUrlAction(l.value.name);
|
|
3093
|
+
if (!M) {
|
|
2960
3094
|
o.value = "Failed";
|
|
2961
3095
|
return;
|
|
2962
3096
|
}
|
|
2963
3097
|
try {
|
|
2964
3098
|
o.value = "Uploading";
|
|
2965
|
-
const
|
|
2966
|
-
abortSignal:
|
|
2967
|
-
onProgress: (
|
|
3099
|
+
const g = new pe(M), $ = {
|
|
3100
|
+
abortSignal: u.value.signal,
|
|
3101
|
+
onProgress: (G) => v.value = G.loadedBytes,
|
|
2968
3102
|
tags: { temp: "true" }
|
|
2969
3103
|
};
|
|
2970
|
-
await
|
|
2971
|
-
} catch (
|
|
2972
|
-
if (
|
|
3104
|
+
await g.uploadData(l.value, $), r.value = M, o.value = "Uploaded", a.value = z;
|
|
3105
|
+
} catch (g) {
|
|
3106
|
+
if (g.name === "AbortError") {
|
|
2973
3107
|
o.value = "Aborted";
|
|
2974
3108
|
return;
|
|
2975
3109
|
}
|
|
2976
3110
|
o.value = "Failed";
|
|
2977
3111
|
}
|
|
2978
3112
|
}, P = async () => {
|
|
2979
|
-
await
|
|
3113
|
+
await ya(o.value, r.value), s("deleted", l.value);
|
|
2980
3114
|
};
|
|
2981
3115
|
return ae(() => {
|
|
2982
3116
|
e.autoUploadToBlob && _();
|
|
2983
|
-
}), (
|
|
2984
|
-
const
|
|
2985
|
-
return
|
|
3117
|
+
}), (M, z) => {
|
|
3118
|
+
const g = R;
|
|
3119
|
+
return i(), y("div", {
|
|
2986
3120
|
class: "py-4 px-3 d-flex",
|
|
2987
3121
|
"data-cy": `file-info-${l.value.name}`
|
|
2988
3122
|
}, [
|
|
2989
|
-
|
|
2990
|
-
|
|
3123
|
+
c("div", null, [
|
|
3124
|
+
m(ba)(l.value.type) ? (i(), h(m(Ue), {
|
|
2991
3125
|
key: 0,
|
|
2992
3126
|
id: "thumbnail-image",
|
|
2993
3127
|
"image-class": "image-file-thumbnail border",
|
|
2994
|
-
src:
|
|
3128
|
+
src: m(fa)(l.value),
|
|
2995
3129
|
alt: l.value.name,
|
|
2996
3130
|
width: "75px",
|
|
2997
3131
|
preview: ""
|
|
2998
|
-
}, null, 8, ["src", "alt"])) : (
|
|
3132
|
+
}, null, 8, ["src", "alt"])) : (i(), h(m(T), {
|
|
2999
3133
|
key: 1,
|
|
3000
3134
|
id: "file-earmark",
|
|
3001
3135
|
icon: "bi:file-earmark",
|
|
@@ -3003,78 +3137,78 @@ const va = { class: "d-flex justify-content-between" }, ya = ["accept", "disable
|
|
|
3003
3137
|
width: "75px"
|
|
3004
3138
|
}))
|
|
3005
3139
|
]),
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3140
|
+
c("div", Va, [
|
|
3141
|
+
c("div", null, [
|
|
3142
|
+
M.editableFileName ? (i(), h(Bt, {
|
|
3009
3143
|
key: 0,
|
|
3010
3144
|
id: "edit-file-name",
|
|
3011
|
-
modelValue:
|
|
3012
|
-
"onUpdate:modelValue":
|
|
3013
|
-
rules:
|
|
3145
|
+
modelValue: d.value,
|
|
3146
|
+
"onUpdate:modelValue": z[0] || (z[0] = ($) => d.value = $),
|
|
3147
|
+
rules: M.customFileNameRules,
|
|
3014
3148
|
name: l.value.name,
|
|
3015
3149
|
"complete-action": x
|
|
3016
|
-
}, null, 8, ["modelValue", "rules", "name"])) : (
|
|
3150
|
+
}, null, 8, ["modelValue", "rules", "name"])) : (i(), y("span", Sa, w(l.value.name), 1))
|
|
3017
3151
|
]),
|
|
3018
|
-
|
|
3019
|
-
|
|
3152
|
+
c("span", Ca, "File type: " + w(l.value.type.split("/").pop()), 1),
|
|
3153
|
+
c("span", Ta, "File size: " + w(m(ue)(l.value.size)), 1)
|
|
3020
3154
|
]),
|
|
3021
|
-
|
|
3022
|
-
(
|
|
3155
|
+
c("div", Pa, [
|
|
3156
|
+
(i(), h(_a, {
|
|
3023
3157
|
key: o.value,
|
|
3024
3158
|
"file-size": l.value.size,
|
|
3025
3159
|
"upload-status": o.value,
|
|
3026
|
-
"bytes-uploaded":
|
|
3027
|
-
"max-file-size":
|
|
3160
|
+
"bytes-uploaded": v.value,
|
|
3161
|
+
"max-file-size": M.maxFileSize
|
|
3028
3162
|
}, null, 8, ["file-size", "upload-status", "bytes-uploaded", "max-file-size"])),
|
|
3029
|
-
o.value === "Not Uploaded" || o.value === "Failed" || o.value === "Duplicate" || o.value === "Aborted" ? (
|
|
3163
|
+
o.value === "Not Uploaded" || o.value === "Failed" || o.value === "Duplicate" || o.value === "Aborted" ? (i(), h(g, {
|
|
3030
3164
|
key: 0,
|
|
3031
3165
|
link: "",
|
|
3032
3166
|
onClick: _
|
|
3033
3167
|
}, {
|
|
3034
|
-
default:
|
|
3035
|
-
|
|
3168
|
+
default: b(() => [
|
|
3169
|
+
f(m(T), {
|
|
3036
3170
|
icon: o.value === "Not Uploaded" || o.value === "Duplicate" ? "bi:upload" : "bi:arrow-clockwise"
|
|
3037
3171
|
}, null, 8, ["icon"])
|
|
3038
3172
|
]),
|
|
3039
3173
|
_: 1
|
|
3040
|
-
})) :
|
|
3041
|
-
o.value === "Uploading" ? (
|
|
3174
|
+
})) : S("", !0),
|
|
3175
|
+
o.value === "Uploading" ? (i(), h(g, {
|
|
3042
3176
|
key: 1,
|
|
3043
3177
|
link: "",
|
|
3044
|
-
onClick:
|
|
3178
|
+
onClick: z[1] || (z[1] = ($) => u.value.value.abort())
|
|
3045
3179
|
}, {
|
|
3046
|
-
default:
|
|
3047
|
-
|
|
3180
|
+
default: b(() => [
|
|
3181
|
+
f(m(T), { icon: "bi:x-circle-fill" })
|
|
3048
3182
|
]),
|
|
3049
3183
|
_: 1
|
|
3050
|
-
})) : (
|
|
3184
|
+
})) : (i(), h(g, {
|
|
3051
3185
|
key: 2,
|
|
3052
3186
|
link: "",
|
|
3053
3187
|
onClick: P,
|
|
3054
3188
|
id: "delete-button"
|
|
3055
3189
|
}, {
|
|
3056
|
-
default:
|
|
3057
|
-
|
|
3190
|
+
default: b(() => [
|
|
3191
|
+
f(m(T), { icon: "bi:trash" })
|
|
3058
3192
|
]),
|
|
3059
3193
|
_: 1
|
|
3060
3194
|
}))
|
|
3061
3195
|
])
|
|
3062
|
-
], 8,
|
|
3196
|
+
], 8, Fa);
|
|
3063
3197
|
};
|
|
3064
3198
|
}
|
|
3065
|
-
}),
|
|
3199
|
+
}), Ia = { class: "d-flex justify-content-end mt-1" }, za = { id: "max-file-size" }, Oa = /* @__PURE__ */ V({
|
|
3066
3200
|
__name: "MaxFileSize",
|
|
3067
3201
|
props: {
|
|
3068
3202
|
maxFileSize: {}
|
|
3069
3203
|
},
|
|
3070
3204
|
setup(e) {
|
|
3071
|
-
return (t, l) => (
|
|
3072
|
-
|
|
3205
|
+
return (t, l) => (i(), y("div", Ia, [
|
|
3206
|
+
c("div", za, "Max file size: " + w(m(ue)(t.maxFileSize)), 1)
|
|
3073
3207
|
]));
|
|
3074
3208
|
}
|
|
3075
|
-
}),
|
|
3209
|
+
}), Da = { "data-cy": "file-uploader" }, Ua = { key: 0 }, Vl = /* @__PURE__ */ V({
|
|
3076
3210
|
__name: "ForgeFileUploader",
|
|
3077
|
-
props: /* @__PURE__ */
|
|
3211
|
+
props: /* @__PURE__ */ j({
|
|
3078
3212
|
acceptedFileTypes: {},
|
|
3079
3213
|
maxFileSize: {},
|
|
3080
3214
|
getFileUrlAction: {},
|
|
@@ -3090,68 +3224,68 @@ const va = { class: "d-flex justify-content-between" }, ya = ["accept", "disable
|
|
|
3090
3224
|
emits: ["update:modelValue"],
|
|
3091
3225
|
setup(e) {
|
|
3092
3226
|
const t = E(e, "modelValue"), l = e, a = (o) => {
|
|
3093
|
-
t.value = t.value.filter((
|
|
3227
|
+
t.value = t.value.filter((s) => s.file != o);
|
|
3094
3228
|
};
|
|
3095
|
-
return (o,
|
|
3096
|
-
|
|
3229
|
+
return (o, s) => (i(), y("div", Da, [
|
|
3230
|
+
f(wa, C(l, {
|
|
3097
3231
|
modelValue: t.value,
|
|
3098
|
-
"onUpdate:modelValue":
|
|
3232
|
+
"onUpdate:modelValue": s[0] || (s[0] = (d) => t.value = d)
|
|
3099
3233
|
}), null, 16, ["modelValue"]),
|
|
3100
|
-
o.showDragDropArea ? (
|
|
3101
|
-
|
|
3234
|
+
o.showDragDropArea ? (i(), y("div", Ua, [
|
|
3235
|
+
f($a, {
|
|
3102
3236
|
"max-file-input": l.maxFileInput,
|
|
3103
3237
|
"max-file-size": l.maxFileSize,
|
|
3104
3238
|
"accepted-file-types": l.acceptedFileTypes,
|
|
3105
3239
|
modelValue: t.value,
|
|
3106
|
-
"onUpdate:modelValue":
|
|
3240
|
+
"onUpdate:modelValue": s[1] || (s[1] = (d) => t.value = d)
|
|
3107
3241
|
}, {
|
|
3108
|
-
default:
|
|
3109
|
-
(
|
|
3110
|
-
(
|
|
3111
|
-
key:
|
|
3112
|
-
class:
|
|
3113
|
-
file: t.value[
|
|
3114
|
-
"onUpdate:file": (
|
|
3115
|
-
"blob-file-name": t.value[
|
|
3116
|
-
"onUpdate:blobFileName": (
|
|
3117
|
-
"upload-status": t.value[
|
|
3118
|
-
"onUpdate:uploadStatus": (
|
|
3242
|
+
default: b(() => [
|
|
3243
|
+
(i(!0), y(N, null, q(t.value, ({ file: d }, r) => (i(), y("span", null, [
|
|
3244
|
+
(i(), h(Ma, C({
|
|
3245
|
+
key: d.name,
|
|
3246
|
+
class: r === t.value.length - 1 || t.value.length == 1 ? "" : "border-bottom",
|
|
3247
|
+
file: t.value[r].file,
|
|
3248
|
+
"onUpdate:file": (v) => t.value[r].file = v,
|
|
3249
|
+
"blob-file-name": t.value[r].blobFileName,
|
|
3250
|
+
"onUpdate:blobFileName": (v) => t.value[r].blobFileName = v,
|
|
3251
|
+
"upload-status": t.value[r].status,
|
|
3252
|
+
"onUpdate:uploadStatus": (v) => t.value[r].status = v,
|
|
3119
3253
|
ref_for: !0
|
|
3120
3254
|
}, l, { onDeleted: a }), null, 16, ["class", "file", "onUpdate:file", "blob-file-name", "onUpdate:blobFileName", "upload-status", "onUpdate:uploadStatus"]))
|
|
3121
3255
|
]))), 256))
|
|
3122
3256
|
]),
|
|
3123
3257
|
_: 1
|
|
3124
3258
|
}, 8, ["max-file-input", "max-file-size", "accepted-file-types", "modelValue"]),
|
|
3125
|
-
|
|
3259
|
+
f(Oa, {
|
|
3126
3260
|
"max-file-size": l.maxFileSize
|
|
3127
3261
|
}, null, 8, ["max-file-size"])
|
|
3128
|
-
])) :
|
|
3262
|
+
])) : S("", !0)
|
|
3129
3263
|
]));
|
|
3130
3264
|
}
|
|
3131
3265
|
});
|
|
3132
3266
|
export {
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3267
|
+
cl as Bootstrap_PT,
|
|
3268
|
+
ml as ForgeActionButton,
|
|
3269
|
+
se as ForgeAlert,
|
|
3136
3270
|
ve as ForgeCheckbox,
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3271
|
+
xl as ForgeChips,
|
|
3272
|
+
fe as ForgeDatepicker,
|
|
3273
|
+
Vl as ForgeFileUploader,
|
|
3274
|
+
Fl as ForgeFilterHeader,
|
|
3275
|
+
hl as ForgeForm,
|
|
3276
|
+
wl as ForgeFormField,
|
|
3277
|
+
Bt as ForgeInlineEditor,
|
|
3278
|
+
pl as ForgeLink,
|
|
3145
3279
|
ye as ForgeLoader,
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3280
|
+
vl as ForgeModal,
|
|
3281
|
+
be as ForgeMultiSelect,
|
|
3282
|
+
bl as ForgeMultiSelectPreview,
|
|
3283
|
+
yl as ForgeNavbar,
|
|
3284
|
+
fl as ForgePageHeader,
|
|
3285
|
+
Gt as ForgeProgressBar,
|
|
3286
|
+
gl as ForgeRemainingCharacters,
|
|
3287
|
+
kl as ForgeStatWidget,
|
|
3288
|
+
$l as ForgeStepper,
|
|
3289
|
+
_l as ForgeTable,
|
|
3290
|
+
Bl as ForgeTile
|
|
3157
3291
|
};
|