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