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