@3squared/forge-ui-3 0.11.0 → 0.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/esm/forge-ui-3.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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 i, createBlock as w, normalizeProps as ee, guardReactiveProps as te, withCtx as f, createElementVNode as c, normalizeClass as B, unref as p, createCommentVNode as V, createVNode as b, renderSlot as $, ref as I, createElementBlock as y, Fragment as N, mergeProps as S, mergeModels as E, useModel as U, onMounted as ae, watch as ie, computed as x, createTextVNode as O, toDisplayString as h, withDirectives as j, vShow as H, createSlots as le, renderList as q, isRef as re, withKeys as X, useAttrs as he, withModifiers as Y, normalizeStyle as we } from "vue";
|
|
3
|
+
import { Icon as C } from "@iconify/vue";
|
|
4
|
+
import R from "primevue/button";
|
|
5
5
|
import xe from "primevue/toast";
|
|
6
6
|
import ke from "primevue/checkbox";
|
|
7
7
|
import { useField as K } from "vee-validate";
|
|
@@ -10,19 +10,19 @@ import Be from "primevue/dialog";
|
|
|
10
10
|
import de from "primevue/inputtext";
|
|
11
11
|
import { vOnClickOutside as Fe } from "@vueuse/components";
|
|
12
12
|
import _e from "primevue/menubar";
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
13
|
+
import Se from "vue-multiselect";
|
|
14
|
+
import Ve from "primevue/calendar";
|
|
15
|
+
import oe from "primevue/dropdown";
|
|
16
16
|
import Ce from "primevue/inputmask";
|
|
17
17
|
import Te from "primevue/textarea";
|
|
18
|
-
import
|
|
18
|
+
import ce from "primevue/inputnumber";
|
|
19
19
|
import Me from "primevue/chips";
|
|
20
20
|
import Pe from "primevue/progressbar";
|
|
21
21
|
import Ie from "primevue/divider";
|
|
22
22
|
import ze from "primevue/steps";
|
|
23
23
|
import Oe from "primevue/datatable";
|
|
24
24
|
import De from "primevue/multiselect";
|
|
25
|
-
import { BlockBlobClient as
|
|
25
|
+
import { BlockBlobClient as me } from "@azure/storage-blob";
|
|
26
26
|
import Ue from "primevue/image";
|
|
27
27
|
const Ae = {
|
|
28
28
|
button: {
|
|
@@ -191,13 +191,13 @@ const Ae = {
|
|
|
191
191
|
column: {
|
|
192
192
|
sortBadge: "ms-2 my-auto cursor-pointer",
|
|
193
193
|
headerCell: (e) => {
|
|
194
|
-
var t,
|
|
194
|
+
var t, a, o, l;
|
|
195
195
|
return {
|
|
196
196
|
class: [
|
|
197
197
|
{
|
|
198
198
|
"cursor-move": e.props.reorderableColumns,
|
|
199
|
-
"position-sticky": ((t = e.column) == null ? void 0 : t.context.frozen) !== void 0 || ((
|
|
200
|
-
"overflow-hidden position-relative bg-clip-padding": (
|
|
199
|
+
"position-sticky": ((t = e.column) == null ? void 0 : t.context.frozen) !== void 0 || ((a = e.column) == null ? void 0 : a.context.frozen) || ((o = e.column) == null ? void 0 : o.context.frozen) === "",
|
|
200
|
+
"overflow-hidden position-relative bg-clip-padding": (l = e.column) == null ? void 0 : l.context.resizable
|
|
201
201
|
}
|
|
202
202
|
]
|
|
203
203
|
};
|
|
@@ -286,13 +286,13 @@ const Ae = {
|
|
|
286
286
|
}, Re = {
|
|
287
287
|
inputtext: {
|
|
288
288
|
root: (e) => {
|
|
289
|
-
var t,
|
|
289
|
+
var t, a;
|
|
290
290
|
return {
|
|
291
291
|
class: [
|
|
292
292
|
"form-control",
|
|
293
293
|
{
|
|
294
294
|
"form-control-lg": ((t = e.props.size) == null ? void 0 : t.toLowerCase()) == "large",
|
|
295
|
-
"form-control-sm": ((
|
|
295
|
+
"form-control-sm": ((a = e.props.size) == null ? void 0 : a.toLowerCase()) == "small"
|
|
296
296
|
}
|
|
297
297
|
]
|
|
298
298
|
};
|
|
@@ -836,15 +836,15 @@ const Ae = {
|
|
|
836
836
|
class: ["ps-1"]
|
|
837
837
|
}),
|
|
838
838
|
icon: ({ props: e }) => {
|
|
839
|
-
var t,
|
|
839
|
+
var t, a, o, l;
|
|
840
840
|
return {
|
|
841
841
|
class: [
|
|
842
842
|
"toast-icon",
|
|
843
843
|
{
|
|
844
844
|
"text-primary": ((t = e.message) == null ? void 0 : t.severity) === "info",
|
|
845
|
-
"text-success": ((
|
|
846
|
-
"text-danger": ((
|
|
847
|
-
"text-warning": ((
|
|
845
|
+
"text-success": ((a = e.message) == null ? void 0 : a.severity) === "success",
|
|
846
|
+
"text-danger": ((o = e.message) == null ? void 0 : o.severity) === "error",
|
|
847
|
+
"text-warning": ((l = e.message) == null ? void 0 : l.severity) === "warn"
|
|
848
848
|
}
|
|
849
849
|
]
|
|
850
850
|
};
|
|
@@ -880,7 +880,7 @@ const Ae = {
|
|
|
880
880
|
directives: {
|
|
881
881
|
...ot
|
|
882
882
|
}
|
|
883
|
-
},
|
|
883
|
+
}, ne = /* @__PURE__ */ F({
|
|
884
884
|
__name: "ForgeAlert",
|
|
885
885
|
props: {
|
|
886
886
|
severity: { default: "primary" },
|
|
@@ -896,33 +896,33 @@ const Ae = {
|
|
|
896
896
|
},
|
|
897
897
|
setup(e) {
|
|
898
898
|
const t = e;
|
|
899
|
-
return (
|
|
900
|
-
const
|
|
901
|
-
return i(),
|
|
902
|
-
messageicon:
|
|
903
|
-
|
|
904
|
-
class:
|
|
899
|
+
return (a, o) => {
|
|
900
|
+
const l = ge;
|
|
901
|
+
return i(), w(l, ee(te({ ...a.$attrs, ...t })), {
|
|
902
|
+
messageicon: f(() => [
|
|
903
|
+
c("div", {
|
|
904
|
+
class: B(t.icon ? "me-2 pe-1" : "")
|
|
905
905
|
}, [
|
|
906
|
-
t.icon ? (i(),
|
|
906
|
+
t.icon ? (i(), w(p(C), {
|
|
907
907
|
key: 0,
|
|
908
908
|
"data-cy": "message-icon",
|
|
909
909
|
icon: t.icon,
|
|
910
|
-
class:
|
|
910
|
+
class: B(`text-${t.severity}`),
|
|
911
911
|
height: 35
|
|
912
|
-
}, null, 8, ["icon", "class"])) :
|
|
912
|
+
}, null, 8, ["icon", "class"])) : V("", !0)
|
|
913
913
|
], 2)
|
|
914
914
|
]),
|
|
915
|
-
closeicon:
|
|
916
|
-
|
|
915
|
+
closeicon: f(() => [
|
|
916
|
+
b(p(C), { icon: "bi:x" })
|
|
917
917
|
]),
|
|
918
|
-
default:
|
|
919
|
-
|
|
918
|
+
default: f(() => [
|
|
919
|
+
$(a.$slots, "default")
|
|
920
920
|
]),
|
|
921
921
|
_: 3
|
|
922
922
|
}, 16);
|
|
923
923
|
};
|
|
924
924
|
}
|
|
925
|
-
}), ml = /* @__PURE__ */
|
|
925
|
+
}), ml = /* @__PURE__ */ F({
|
|
926
926
|
__name: "ForgeActionButton",
|
|
927
927
|
props: {
|
|
928
928
|
action: {},
|
|
@@ -931,30 +931,30 @@ const Ae = {
|
|
|
931
931
|
params: { default: Array }
|
|
932
932
|
},
|
|
933
933
|
setup(e) {
|
|
934
|
-
const t = I(!1),
|
|
934
|
+
const t = I(!1), a = e, o = async () => {
|
|
935
935
|
t.value = !0;
|
|
936
936
|
try {
|
|
937
|
-
await
|
|
938
|
-
} catch (
|
|
939
|
-
await
|
|
937
|
+
await a.action.apply(this, a.params);
|
|
938
|
+
} catch (l) {
|
|
939
|
+
await a.errorAction.apply(this, a.errorParams ? [...a.errorParams, l] : [l]);
|
|
940
940
|
}
|
|
941
941
|
t.value = !1;
|
|
942
942
|
};
|
|
943
|
-
return (
|
|
944
|
-
const d =
|
|
943
|
+
return (l, n) => {
|
|
944
|
+
const d = R;
|
|
945
945
|
return i(), y(N, null, [
|
|
946
|
-
|
|
946
|
+
b(d, S({ ...a, ...l.$attrs }, {
|
|
947
947
|
loading: t.value,
|
|
948
|
-
disabled: t.value ||
|
|
949
|
-
onClick:
|
|
948
|
+
disabled: t.value || a.disabled,
|
|
949
|
+
onClick: o
|
|
950
950
|
}), null, 16, ["loading", "disabled"]),
|
|
951
|
-
|
|
951
|
+
b(p(xe))
|
|
952
952
|
], 64);
|
|
953
953
|
};
|
|
954
954
|
}
|
|
955
|
-
}), ct = /* @__PURE__ */
|
|
955
|
+
}), ct = /* @__PURE__ */ c("div", null, null, -1), mt = ["for"], pe = /* @__PURE__ */ F({
|
|
956
956
|
__name: "ForgeCheckbox",
|
|
957
|
-
props: {
|
|
957
|
+
props: /* @__PURE__ */ E({
|
|
958
958
|
label: { default: "" },
|
|
959
959
|
value: {},
|
|
960
960
|
modelValue: {},
|
|
@@ -976,78 +976,83 @@ const Ae = {
|
|
|
976
976
|
pt: {},
|
|
977
977
|
ptOptions: {},
|
|
978
978
|
unstyled: { type: Boolean }
|
|
979
|
-
},
|
|
979
|
+
}, {
|
|
980
|
+
modelValue: { type: Boolean },
|
|
981
|
+
modelModifiers: {}
|
|
982
|
+
}),
|
|
980
983
|
emits: ["update:modelValue"],
|
|
981
|
-
setup(e
|
|
982
|
-
const
|
|
984
|
+
setup(e) {
|
|
985
|
+
const t = U(e, "modelValue"), a = e, { handleChange: o, checked: l, setValue: n, errors: d, errorMessage: r } = K(() => a.name ?? a.label, void 0, {
|
|
983
986
|
type: "checkbox",
|
|
984
|
-
checkedValue:
|
|
985
|
-
}),
|
|
986
|
-
a.disabled || (
|
|
987
|
+
checkedValue: t.value
|
|
988
|
+
}), u = (v) => {
|
|
989
|
+
a.disabled || (o(v), t.value = !t.value);
|
|
987
990
|
};
|
|
988
991
|
ae(() => {
|
|
989
|
-
a.value !== void 0 && a.value !== (
|
|
990
|
-
}),
|
|
991
|
-
|
|
992
|
+
a.value !== void 0 && a.value !== (l == null ? void 0 : l.value) ? n(a.value) : a.modelValue !== void 0 && a.modelValue !== (l == null ? void 0 : l.value) && n(a.modelValue);
|
|
993
|
+
}), ie(() => a.value, (v) => {
|
|
994
|
+
n(v);
|
|
992
995
|
});
|
|
993
|
-
const
|
|
994
|
-
return (v,
|
|
995
|
-
const
|
|
996
|
+
const m = x(() => d.value.length > 0);
|
|
997
|
+
return (v, s) => {
|
|
998
|
+
const T = ke;
|
|
996
999
|
return i(), y(N, null, [
|
|
997
|
-
|
|
1000
|
+
c("div", S({
|
|
998
1001
|
class: "d-flex",
|
|
999
1002
|
"data-cy": "checkbox-container"
|
|
1000
1003
|
}, { ...v.$attrs }), [
|
|
1001
|
-
|
|
1004
|
+
b(T, S({
|
|
1002
1005
|
id: a.name
|
|
1003
1006
|
}, { ...a }, {
|
|
1004
|
-
modelValue:
|
|
1005
|
-
"onUpdate:modelValue":
|
|
1006
|
-
|
|
1007
|
-
|
|
1007
|
+
modelValue: t.value,
|
|
1008
|
+
"onUpdate:modelValue": [
|
|
1009
|
+
s[0] || (s[0] = (_) => t.value = _),
|
|
1010
|
+
u
|
|
1011
|
+
],
|
|
1012
|
+
"input-class": { "is-invalid": m.value }
|
|
1008
1013
|
}), {
|
|
1009
|
-
icon:
|
|
1014
|
+
icon: f(() => [
|
|
1010
1015
|
ct
|
|
1011
1016
|
]),
|
|
1012
1017
|
_: 1
|
|
1013
1018
|
}, 16, ["id", "modelValue", "input-class"]),
|
|
1014
|
-
|
|
1019
|
+
c("label", {
|
|
1015
1020
|
for: a.name,
|
|
1016
|
-
class:
|
|
1017
|
-
onClick:
|
|
1021
|
+
class: B(["w-100 my-auto", `${a.disabled ? "opacity-50" : "cursor-pointer"} ${m.value ? "text-danger-dark" : ""}`]),
|
|
1022
|
+
onClick: u
|
|
1018
1023
|
}, [
|
|
1019
|
-
|
|
1020
|
-
O(
|
|
1024
|
+
$(v.$slots, "default", {}, () => [
|
|
1025
|
+
O(h(a.label), 1)
|
|
1021
1026
|
])
|
|
1022
1027
|
], 10, mt)
|
|
1023
1028
|
], 16),
|
|
1024
|
-
|
|
1029
|
+
j(c("small", {
|
|
1025
1030
|
"data-cy": "error",
|
|
1026
1031
|
class: "text-invalid"
|
|
1027
|
-
},
|
|
1028
|
-
[H,
|
|
1032
|
+
}, h(p(r)), 513), [
|
|
1033
|
+
[H, m.value]
|
|
1029
1034
|
])
|
|
1030
1035
|
], 64);
|
|
1031
1036
|
};
|
|
1032
1037
|
}
|
|
1033
|
-
}), pt = { class: "forge-loader" },
|
|
1038
|
+
}), pt = { class: "forge-loader" }, ve = /* @__PURE__ */ F({
|
|
1034
1039
|
__name: "ForgeLoader",
|
|
1035
1040
|
props: {
|
|
1036
1041
|
severity: { default: "primary" }
|
|
1037
1042
|
},
|
|
1038
1043
|
setup(e) {
|
|
1039
1044
|
const t = e;
|
|
1040
|
-
return (
|
|
1041
|
-
const
|
|
1045
|
+
return (a, o) => {
|
|
1046
|
+
const l = $e;
|
|
1042
1047
|
return i(), y("div", pt, [
|
|
1043
|
-
|
|
1048
|
+
b(l, {
|
|
1044
1049
|
"animation-duration": ".75",
|
|
1045
|
-
class:
|
|
1050
|
+
class: B(`text-${t.severity === void 0 ? "primary" : t.severity}`)
|
|
1046
1051
|
}, null, 8, ["class"])
|
|
1047
1052
|
]);
|
|
1048
1053
|
};
|
|
1049
1054
|
}
|
|
1050
|
-
}), vt = ["href", "target"], pl = /* @__PURE__ */
|
|
1055
|
+
}), vt = ["href", "target"], pl = /* @__PURE__ */ F({
|
|
1051
1056
|
__name: "ForgeLink",
|
|
1052
1057
|
props: {
|
|
1053
1058
|
url: {},
|
|
@@ -1065,7 +1070,7 @@ const Ae = {
|
|
|
1065
1070
|
iconName: {}
|
|
1066
1071
|
},
|
|
1067
1072
|
setup(e) {
|
|
1068
|
-
const t =
|
|
1073
|
+
const t = x(() => ({
|
|
1069
1074
|
[`link-${e.severity}`]: e.severity,
|
|
1070
1075
|
[`link-underline-${e.underlineSeverity}`]: e.underlineSeverity,
|
|
1071
1076
|
[`link-opacity-${e.opacity}`]: e.opacity,
|
|
@@ -1074,27 +1079,27 @@ const Ae = {
|
|
|
1074
1079
|
[`link-underline-opacity-${e.underlineHoverOpacity ?? e.hoverOpacity}-hover`]: e.underlineHoverOpacity || e.hoverOpacity,
|
|
1075
1080
|
[`link-offset-${e.underlineOffset}`]: e.underlineOffset,
|
|
1076
1081
|
"icon-link icon-link-hover": e.animateIconOnHover
|
|
1077
|
-
})),
|
|
1082
|
+
})), a = x(() => ({
|
|
1078
1083
|
"order-2": e.positionIconEnd,
|
|
1079
1084
|
"me-1": !e.positionIconEnd && !e.animateIconOnHover,
|
|
1080
1085
|
"ms-1": e.positionIconEnd && !e.animateIconOnHover,
|
|
1081
1086
|
"ms-0": e.positionIconEnd && e.animateIconOnHover,
|
|
1082
1087
|
"me-0": e.animateIconOnHover
|
|
1083
1088
|
}));
|
|
1084
|
-
return (
|
|
1089
|
+
return (o, l) => (i(), y("a", {
|
|
1085
1090
|
id: "link",
|
|
1086
|
-
class:
|
|
1087
|
-
href:
|
|
1088
|
-
target:
|
|
1091
|
+
class: B(["cursor-pointer d-flex", t.value]),
|
|
1092
|
+
href: o.url,
|
|
1093
|
+
target: o.target
|
|
1089
1094
|
}, [
|
|
1090
|
-
|
|
1091
|
-
|
|
1095
|
+
$(o.$slots, "default", {}, () => [
|
|
1096
|
+
o.iconName ? (i(), w(p(C), {
|
|
1092
1097
|
key: 0,
|
|
1093
1098
|
id: "link-icon",
|
|
1094
|
-
icon:
|
|
1095
|
-
class:
|
|
1096
|
-
}, null, 8, ["icon", "class"])) :
|
|
1097
|
-
O(" " +
|
|
1099
|
+
icon: o.iconName,
|
|
1100
|
+
class: B(["bi my-auto", a.value])
|
|
1101
|
+
}, null, 8, ["icon", "class"])) : V("", !0),
|
|
1102
|
+
O(" " + h(o.label), 1)
|
|
1098
1103
|
])
|
|
1099
1104
|
], 10, vt));
|
|
1100
1105
|
}
|
|
@@ -1105,23 +1110,23 @@ function yt(e) {
|
|
|
1105
1110
|
errorDetails: []
|
|
1106
1111
|
};
|
|
1107
1112
|
if (e.exception && (t.errorMessage = e.exception), e.message && (Array.isArray(e.message) ? t.errorDetails = e.message : t.errorMessage = e.message), e.response) {
|
|
1108
|
-
const
|
|
1109
|
-
|
|
1113
|
+
const a = JSON.parse(e.response);
|
|
1114
|
+
a.errors && (t.errorDetails = Object.values(a.errors).flat()), a.message && (t.errorDetails = a.message);
|
|
1110
1115
|
}
|
|
1111
1116
|
return t.errorMessage === "" && t.errorDetails.length === 0 && (t.errorMessage = e), t;
|
|
1112
1117
|
}
|
|
1113
1118
|
function vl(e, t) {
|
|
1114
|
-
return e.map((
|
|
1119
|
+
return e.map((a) => ({ id: a, label: t ? t(a) : `${a}` }));
|
|
1115
1120
|
}
|
|
1116
|
-
function yl(e, t,
|
|
1117
|
-
return { id: e, label: t ?? e.toString(), shortLabel:
|
|
1121
|
+
function yl(e, t, a) {
|
|
1122
|
+
return { id: e, label: t ?? e.toString(), shortLabel: a };
|
|
1118
1123
|
}
|
|
1119
1124
|
const bt = { key: 0 }, ft = {
|
|
1120
1125
|
class: "d-flex w-100",
|
|
1121
1126
|
"data-cy": "footer"
|
|
1122
|
-
}, bl = /* @__PURE__ */
|
|
1127
|
+
}, bl = /* @__PURE__ */ F({
|
|
1123
1128
|
__name: "ForgeModal",
|
|
1124
|
-
props: /* @__PURE__ */
|
|
1129
|
+
props: /* @__PURE__ */ E({
|
|
1125
1130
|
cancelText: { default: "Cancel" },
|
|
1126
1131
|
submitText: { default: "Submit" },
|
|
1127
1132
|
showFooter: { type: Boolean, default: !0 },
|
|
@@ -1164,105 +1169,105 @@ const bt = { key: 0 }, ft = {
|
|
|
1164
1169
|
}),
|
|
1165
1170
|
emits: ["update:visible"],
|
|
1166
1171
|
setup(e) {
|
|
1167
|
-
const t =
|
|
1172
|
+
const t = U(e, "visible"), a = I(!1), o = e, l = I(!1), n = I({
|
|
1168
1173
|
hasError: !1,
|
|
1169
1174
|
header: "",
|
|
1170
1175
|
message: []
|
|
1171
1176
|
}), d = () => {
|
|
1172
|
-
|
|
1177
|
+
a.value = !1;
|
|
1178
|
+
}, r = () => {
|
|
1179
|
+
a.value = !0;
|
|
1173
1180
|
}, u = () => {
|
|
1174
|
-
l.value = !0;
|
|
1175
|
-
}, c = () => {
|
|
1176
1181
|
t.value = !1;
|
|
1177
|
-
},
|
|
1178
|
-
if (
|
|
1179
|
-
|
|
1182
|
+
}, m = async () => {
|
|
1183
|
+
if (o.onConfirm) {
|
|
1184
|
+
l.value = !0, n.value.hasError = !1;
|
|
1180
1185
|
try {
|
|
1181
|
-
const
|
|
1182
|
-
(
|
|
1183
|
-
} catch (
|
|
1186
|
+
const s = await o.onConfirm();
|
|
1187
|
+
(s || s == null) && u();
|
|
1188
|
+
} catch (s) {
|
|
1184
1189
|
n.value.hasError = !0;
|
|
1185
|
-
const
|
|
1186
|
-
n.value.header =
|
|
1190
|
+
const T = yt(s);
|
|
1191
|
+
n.value.header = T.errorMessage, n.value.message = T.errorDetails;
|
|
1187
1192
|
}
|
|
1188
|
-
|
|
1193
|
+
l.value = !1;
|
|
1189
1194
|
}
|
|
1190
|
-
},
|
|
1195
|
+
}, v = x(() => ({
|
|
1191
1196
|
root: [
|
|
1192
1197
|
"modal modal-dialog modal-content h-auto m-0",
|
|
1193
1198
|
{
|
|
1194
|
-
"mw-100 vh-100 vw-100 top-0 start-0":
|
|
1199
|
+
"mw-100 vh-100 vw-100 top-0 start-0": a.value
|
|
1195
1200
|
}
|
|
1196
1201
|
]
|
|
1197
1202
|
}));
|
|
1198
|
-
return (
|
|
1199
|
-
const
|
|
1200
|
-
return i(),
|
|
1201
|
-
onMaximize:
|
|
1203
|
+
return (s, T) => {
|
|
1204
|
+
const _ = R, M = Be;
|
|
1205
|
+
return i(), w(M, S(o, {
|
|
1206
|
+
onMaximize: r,
|
|
1202
1207
|
onUnmaximize: d,
|
|
1203
|
-
pt:
|
|
1204
|
-
}),
|
|
1205
|
-
closeicon:
|
|
1206
|
-
|
|
1208
|
+
pt: v.value
|
|
1209
|
+
}), le({
|
|
1210
|
+
closeicon: f(() => [
|
|
1211
|
+
b(p(C), {
|
|
1207
1212
|
"data-cy": "close-icon",
|
|
1208
1213
|
icon: "bi:x-lg",
|
|
1209
1214
|
width: "18",
|
|
1210
1215
|
height: "18",
|
|
1211
|
-
onClick:
|
|
1216
|
+
onClick: u
|
|
1212
1217
|
})
|
|
1213
1218
|
]),
|
|
1214
|
-
maximizeicon:
|
|
1215
|
-
|
|
1219
|
+
maximizeicon: f(() => [
|
|
1220
|
+
b(p(C), {
|
|
1216
1221
|
"data-cy": "maximisable-icon",
|
|
1217
|
-
icon:
|
|
1222
|
+
icon: a.value ? "bi:arrows-angle-contract" : "bi:arrows-angle-expand",
|
|
1218
1223
|
width: "16",
|
|
1219
1224
|
height: "16"
|
|
1220
1225
|
}, null, 8, ["icon"])
|
|
1221
1226
|
]),
|
|
1222
1227
|
_: 2
|
|
1223
1228
|
}, [
|
|
1224
|
-
q(
|
|
1229
|
+
q(s.$slots, (P, z) => ({
|
|
1225
1230
|
name: z,
|
|
1226
|
-
fn:
|
|
1227
|
-
n.value.hasError ? (i(),
|
|
1231
|
+
fn: f((g) => [
|
|
1232
|
+
n.value.hasError ? (i(), w(ne, {
|
|
1228
1233
|
key: 0,
|
|
1229
1234
|
severity: "danger",
|
|
1230
1235
|
"data-cy": "error"
|
|
1231
1236
|
}, {
|
|
1232
|
-
default:
|
|
1233
|
-
|
|
1234
|
-
class:
|
|
1235
|
-
},
|
|
1237
|
+
default: f(() => [
|
|
1238
|
+
c("p", {
|
|
1239
|
+
class: B(n.value.message.length > 0 ? "my-auto" : "mb-0")
|
|
1240
|
+
}, h(n.value.header), 3),
|
|
1236
1241
|
n.value.message.length > 0 ? (i(), y("ul", bt, [
|
|
1237
|
-
(i(!0), y(N, null, q(n.value.message, (
|
|
1238
|
-
])) :
|
|
1242
|
+
(i(!0), y(N, null, q(n.value.message, (k) => (i(), y("li", { key: k }, h(k), 1))), 128))
|
|
1243
|
+
])) : V("", !0)
|
|
1239
1244
|
]),
|
|
1240
1245
|
_: 1
|
|
1241
|
-
})) :
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
]) :
|
|
1246
|
+
})) : V("", !0),
|
|
1247
|
+
$(s.$slots, z, ee(te(g || {}))),
|
|
1248
|
+
l.value ? $(s.$slots, "loader", { key: 1 }, () => [
|
|
1249
|
+
b(ve, { "data-cy": "loader" })
|
|
1250
|
+
]) : V("", !0)
|
|
1246
1251
|
])
|
|
1247
1252
|
})),
|
|
1248
|
-
|
|
1253
|
+
s.showFooter ? {
|
|
1249
1254
|
name: "footer",
|
|
1250
|
-
fn:
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
label:
|
|
1254
|
-
class:
|
|
1255
|
+
fn: f(() => [
|
|
1256
|
+
c("div", ft, [
|
|
1257
|
+
b(_, {
|
|
1258
|
+
label: s.cancelText,
|
|
1259
|
+
class: B(o.cancelClass),
|
|
1255
1260
|
outlined: "",
|
|
1256
|
-
onClick:
|
|
1261
|
+
onClick: u,
|
|
1257
1262
|
id: "cancel-button",
|
|
1258
|
-
type:
|
|
1263
|
+
type: o.cancelButtonType
|
|
1259
1264
|
}, null, 8, ["label", "class", "type"]),
|
|
1260
|
-
|
|
1261
|
-
label:
|
|
1262
|
-
class:
|
|
1263
|
-
onClick:
|
|
1265
|
+
b(_, {
|
|
1266
|
+
label: s.submitText,
|
|
1267
|
+
class: B([o.submitClass, "ms-auto"]),
|
|
1268
|
+
onClick: m,
|
|
1264
1269
|
id: "submit-button",
|
|
1265
|
-
type:
|
|
1270
|
+
type: o.submitButtonType
|
|
1266
1271
|
}, null, 8, ["label", "class", "type"])
|
|
1267
1272
|
])
|
|
1268
1273
|
]),
|
|
@@ -1271,9 +1276,9 @@ const bt = { key: 0 }, ft = {
|
|
|
1271
1276
|
]), 1040, ["pt"]);
|
|
1272
1277
|
};
|
|
1273
1278
|
}
|
|
1274
|
-
}), gt = ["id"], ht = { key: 0 }, wt = { key: 0 }, xt = { class: "d-flex justify-content-between align-items-center position-relative" }, kt = { key: 1 }, $t = { "data-cy": "readonly-value" }, Bt = /* @__PURE__ */
|
|
1279
|
+
}), gt = ["id"], ht = { key: 0 }, wt = { key: 0 }, xt = { class: "d-flex justify-content-between align-items-center position-relative" }, kt = { key: 1 }, $t = { "data-cy": "readonly-value" }, Bt = /* @__PURE__ */ F({
|
|
1275
1280
|
__name: "ForgeInlineEditor",
|
|
1276
|
-
props: /* @__PURE__ */
|
|
1281
|
+
props: /* @__PURE__ */ E({
|
|
1277
1282
|
name: { default: "" },
|
|
1278
1283
|
completeAction: {},
|
|
1279
1284
|
errorAction: {},
|
|
@@ -1286,68 +1291,68 @@ const bt = { key: 0 }, ft = {
|
|
|
1286
1291
|
}),
|
|
1287
1292
|
emits: ["update:modelValue"],
|
|
1288
1293
|
setup(e) {
|
|
1289
|
-
const t = e,
|
|
1290
|
-
var
|
|
1291
|
-
|
|
1294
|
+
const t = e, a = U(e, "modelValue"), o = I(!1), l = I(), n = () => {
|
|
1295
|
+
var _;
|
|
1296
|
+
o.value = !o.value, (_ = l.value) == null || _.focus();
|
|
1292
1297
|
}, d = async () => {
|
|
1293
|
-
if (
|
|
1298
|
+
if (T.value)
|
|
1294
1299
|
return !1;
|
|
1295
|
-
if (
|
|
1300
|
+
if (a.value = s.value, t.completeAction)
|
|
1296
1301
|
try {
|
|
1297
|
-
await t.completeAction.apply(this, t.params),
|
|
1302
|
+
await t.completeAction.apply(this, t.params), o.value = !o.value;
|
|
1298
1303
|
} catch {
|
|
1299
1304
|
t.errorAction && await t.errorAction.apply(this, t.errorParams);
|
|
1300
1305
|
}
|
|
1301
1306
|
else
|
|
1302
|
-
|
|
1307
|
+
o.value = !o.value;
|
|
1308
|
+
}, r = () => {
|
|
1309
|
+
o.value = !o.value;
|
|
1303
1310
|
}, u = () => {
|
|
1304
|
-
|
|
1305
|
-
},
|
|
1306
|
-
|
|
1307
|
-
}, { errorMessage: r, errors: s, value: v } = K(() => t.name, void 0, {
|
|
1308
|
-
initialValue: l.value
|
|
1311
|
+
s.value = null;
|
|
1312
|
+
}, { errorMessage: m, errors: v, value: s } = K(() => t.name, void 0, {
|
|
1313
|
+
initialValue: a.value
|
|
1309
1314
|
});
|
|
1310
1315
|
ae(() => {
|
|
1311
|
-
|
|
1316
|
+
s.value = a.value;
|
|
1312
1317
|
});
|
|
1313
|
-
const
|
|
1314
|
-
return (
|
|
1315
|
-
const P = de, z =
|
|
1318
|
+
const T = x(() => v.value.length > 0);
|
|
1319
|
+
return (_, M) => {
|
|
1320
|
+
const P = de, z = R;
|
|
1316
1321
|
return i(), y("div", {
|
|
1317
1322
|
id: t.name
|
|
1318
1323
|
}, [
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1324
|
+
_.readonly ? (i(), y("div", kt, [
|
|
1325
|
+
$(_.$slots, "default", {}, () => [
|
|
1326
|
+
c("span", $t, h(p(s)), 1)
|
|
1322
1327
|
])
|
|
1323
1328
|
])) : (i(), y("div", ht, [
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
class:
|
|
1329
|
+
o.value ? (i(), y("div", wt, [
|
|
1330
|
+
j((i(), y("div", xt, [
|
|
1331
|
+
$(_.$slots, "editor", {
|
|
1332
|
+
class: B({ "is-invalid": T.value }),
|
|
1328
1333
|
editFinished: d,
|
|
1329
|
-
cancel:
|
|
1330
|
-
val: p(
|
|
1334
|
+
cancel: r,
|
|
1335
|
+
val: p(s)
|
|
1331
1336
|
}, () => [
|
|
1332
|
-
|
|
1337
|
+
b(P, {
|
|
1333
1338
|
"data-cy": "input",
|
|
1334
1339
|
ref_key: "input",
|
|
1335
|
-
ref:
|
|
1336
|
-
modelValue: p(
|
|
1337
|
-
"onUpdate:modelValue": M[0] || (M[0] = (g) =>
|
|
1340
|
+
ref: l,
|
|
1341
|
+
modelValue: p(s),
|
|
1342
|
+
"onUpdate:modelValue": M[0] || (M[0] = (g) => re(s) ? s.value = g : null),
|
|
1338
1343
|
modelModifiers: { trim: !0 },
|
|
1339
|
-
class:
|
|
1344
|
+
class: B({ "is-invalid": T.value }),
|
|
1340
1345
|
onKeydown: [
|
|
1341
1346
|
X(d, ["enter"]),
|
|
1342
|
-
X(
|
|
1347
|
+
X(r, ["esc"])
|
|
1343
1348
|
]
|
|
1344
1349
|
}, null, 8, ["modelValue", "class"])
|
|
1345
1350
|
]),
|
|
1346
|
-
|
|
1351
|
+
b(p(C), {
|
|
1347
1352
|
icon: "bi:x-circle",
|
|
1348
1353
|
class: "mx-2 cursor-pointer",
|
|
1349
|
-
onClick:
|
|
1350
|
-
onKeydown: X(
|
|
1354
|
+
onClick: u,
|
|
1355
|
+
onKeydown: X(u, ["enter"]),
|
|
1351
1356
|
"data-cy": "clear-icon"
|
|
1352
1357
|
})
|
|
1353
1358
|
])), [
|
|
@@ -1359,20 +1364,20 @@ const bt = { key: 0 }, ft = {
|
|
|
1359
1364
|
onClick: n,
|
|
1360
1365
|
onFocus: n
|
|
1361
1366
|
}, [
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
class:
|
|
1367
|
+
$(_.$slots, "default", {}, () => [
|
|
1368
|
+
c("div", {
|
|
1369
|
+
class: B(["pe-2 cursor-pointer", { "text-invalid": T.value }]),
|
|
1365
1370
|
"data-cy": "value"
|
|
1366
|
-
},
|
|
1371
|
+
}, h(p(s) ? p(s) : "Click to edit"), 3)
|
|
1367
1372
|
]),
|
|
1368
|
-
|
|
1373
|
+
b(z, {
|
|
1369
1374
|
link: "",
|
|
1370
1375
|
class: "p-0 m-0"
|
|
1371
1376
|
}, {
|
|
1372
|
-
default:
|
|
1373
|
-
|
|
1377
|
+
default: f(() => [
|
|
1378
|
+
b(p(C), {
|
|
1374
1379
|
icon: "bi:pencil",
|
|
1375
|
-
class:
|
|
1380
|
+
class: B(T.value ? "text-invalid" : "text-muted"),
|
|
1376
1381
|
"data-cy": "edit-icon",
|
|
1377
1382
|
onKeydown: X(n, ["enter"])
|
|
1378
1383
|
}, null, 8, ["class"])
|
|
@@ -1381,16 +1386,16 @@ const bt = { key: 0 }, ft = {
|
|
|
1381
1386
|
})
|
|
1382
1387
|
], 32))
|
|
1383
1388
|
])),
|
|
1384
|
-
|
|
1389
|
+
j(c("small", {
|
|
1385
1390
|
"data-cy": "error",
|
|
1386
1391
|
class: "text-invalid"
|
|
1387
|
-
},
|
|
1388
|
-
[H,
|
|
1392
|
+
}, h(p(m)), 513), [
|
|
1393
|
+
[H, T.value]
|
|
1389
1394
|
])
|
|
1390
1395
|
], 8, gt);
|
|
1391
1396
|
};
|
|
1392
1397
|
}
|
|
1393
|
-
}), Ft = ["href"], fl = /* @__PURE__ */
|
|
1398
|
+
}), Ft = ["href"], fl = /* @__PURE__ */ F({
|
|
1394
1399
|
__name: "ForgeNavbar",
|
|
1395
1400
|
props: {
|
|
1396
1401
|
severity: { default: "light" },
|
|
@@ -1407,7 +1412,7 @@ const bt = { key: 0 }, ft = {
|
|
|
1407
1412
|
unstyled: { type: Boolean }
|
|
1408
1413
|
},
|
|
1409
1414
|
setup(e) {
|
|
1410
|
-
const t = e,
|
|
1415
|
+
const t = e, a = x(() => ({
|
|
1411
1416
|
root: () => ({
|
|
1412
1417
|
class: [
|
|
1413
1418
|
"navbar container-fluid navbar-expand-lg",
|
|
@@ -1434,28 +1439,28 @@ const bt = { key: 0 }, ft = {
|
|
|
1434
1439
|
]
|
|
1435
1440
|
})
|
|
1436
1441
|
}));
|
|
1437
|
-
return (
|
|
1442
|
+
return (o, l) => {
|
|
1438
1443
|
const n = _e;
|
|
1439
|
-
return i(),
|
|
1440
|
-
pt:
|
|
1444
|
+
return i(), w(n, S({ ...t, ...o.$attrs }, {
|
|
1445
|
+
pt: a.value,
|
|
1441
1446
|
"data-cy": "navbar"
|
|
1442
|
-
}),
|
|
1443
|
-
start:
|
|
1444
|
-
|
|
1445
|
-
href:
|
|
1447
|
+
}), le({
|
|
1448
|
+
start: f(() => [
|
|
1449
|
+
c("a", {
|
|
1450
|
+
href: o.logoUrl,
|
|
1446
1451
|
class: "navbar-brand ms-3",
|
|
1447
1452
|
"data-cy": "logo"
|
|
1448
1453
|
}, [
|
|
1449
|
-
|
|
1454
|
+
$(o.$slots, "logo", {}, () => [
|
|
1450
1455
|
O(" Logo ")
|
|
1451
1456
|
])
|
|
1452
1457
|
], 8, Ft)
|
|
1453
1458
|
]),
|
|
1454
|
-
menubuttonicon:
|
|
1455
|
-
|
|
1456
|
-
|
|
1459
|
+
menubuttonicon: f(() => [
|
|
1460
|
+
$(o.$slots, "menubuttonicon", {}, () => [
|
|
1461
|
+
b(p(C), {
|
|
1457
1462
|
icon: "bi:list",
|
|
1458
|
-
class:
|
|
1463
|
+
class: B(t.severity === "light" ? "text-black" : "text-white"),
|
|
1459
1464
|
height: "24",
|
|
1460
1465
|
"data-cy": "burger-icon"
|
|
1461
1466
|
}, null, 8, ["class"])
|
|
@@ -1463,16 +1468,16 @@ const bt = { key: 0 }, ft = {
|
|
|
1463
1468
|
]),
|
|
1464
1469
|
_: 2
|
|
1465
1470
|
}, [
|
|
1466
|
-
q(
|
|
1467
|
-
name:
|
|
1468
|
-
fn:
|
|
1469
|
-
|
|
1471
|
+
q(o.$slots, (d, r) => ({
|
|
1472
|
+
name: r,
|
|
1473
|
+
fn: f((u) => [
|
|
1474
|
+
$(o.$slots, r, ee(te(u)))
|
|
1470
1475
|
])
|
|
1471
1476
|
}))
|
|
1472
1477
|
]), 1040, ["pt"]);
|
|
1473
1478
|
};
|
|
1474
1479
|
}
|
|
1475
|
-
}), _t = /* @__PURE__ */
|
|
1480
|
+
}), _t = /* @__PURE__ */ c("div", { class: "ps-1" }, "Select all", -1), St = ["data-cy"], Vt = { class: "ps-1 w-100" }, Ct = { class: "multiselect__tag d-inline-flex" }, Tt = { class: "my-auto" }, ye = /* @__PURE__ */ F({
|
|
1476
1481
|
__name: "ForgeMultiSelect",
|
|
1477
1482
|
props: {
|
|
1478
1483
|
severity: { default: "primary" },
|
|
@@ -1484,94 +1489,97 @@ const bt = { key: 0 }, ft = {
|
|
|
1484
1489
|
},
|
|
1485
1490
|
emits: ["update:modelValue"],
|
|
1486
1491
|
setup(e, { emit: t }) {
|
|
1487
|
-
const
|
|
1492
|
+
const a = e, o = (A, D) => {
|
|
1488
1493
|
const J = {
|
|
1489
1494
|
...D,
|
|
1490
1495
|
$isDisabled: D.$isDisabled ?? !1
|
|
1491
1496
|
};
|
|
1492
|
-
|
|
1493
|
-
},
|
|
1494
|
-
initialValue:
|
|
1495
|
-
}),
|
|
1497
|
+
A(J);
|
|
1498
|
+
}, l = he(), n = t, { errors: d, value: r, errorMessage: u } = K(() => a.name, void 0, {
|
|
1499
|
+
initialValue: l.modelValue
|
|
1500
|
+
}), m = I(!1), v = x(() => ({
|
|
1496
1501
|
multiple: !0,
|
|
1497
1502
|
label: "label",
|
|
1498
1503
|
trackBy: "id",
|
|
1499
|
-
showPointer: !
|
|
1500
|
-
placeholder:
|
|
1504
|
+
showPointer: !m.value,
|
|
1505
|
+
placeholder: l.searchable === null || l.searchable ? "Search" : "Select",
|
|
1501
1506
|
allowEmpty: !0,
|
|
1502
1507
|
selectValue: "",
|
|
1503
|
-
closeOnSelect: !!(
|
|
1504
|
-
clearOnSelect: !!(
|
|
1505
|
-
searchable: !!(
|
|
1508
|
+
closeOnSelect: !!(l.multiple === null || l.multiple),
|
|
1509
|
+
clearOnSelect: !!(l.multiple === null || l.multiple),
|
|
1510
|
+
searchable: !!(l.searchable === null || l.searchable) && l.modelValue.length === l.options.length,
|
|
1506
1511
|
async: !1,
|
|
1507
|
-
...
|
|
1508
|
-
})),
|
|
1509
|
-
|
|
1510
|
-
}, G = (
|
|
1511
|
-
n("update:modelValue",
|
|
1512
|
-
}, Z = (
|
|
1513
|
-
|
|
1512
|
+
...l
|
|
1513
|
+
})), s = x(() => `forge-multiselect-${a.severity}`), T = x(() => `multiselect__option ${m.value ? " multiselect__option--highlight" : ""} ${_.value ? " multiselect__option--selected" : ""}`), _ = x(() => v.value && !(v.value.multiple || !a.showSelectAll || v.value.async) ? !1 : l.modelValue.length === l.options.length), M = x(() => d.value.length > 0), P = x(() => !!((l.allowEmpty == null || l.allowEmpty) && a.showClearSelection && (v.value.multiple ? l.modelValue.length > 0 : l.modelValue))), z = () => m.value = !0, g = () => m.value = !1, k = () => {
|
|
1514
|
+
r.value = v.value.multiple ? [] : null, n("update:modelValue", r.value);
|
|
1515
|
+
}, G = (A) => {
|
|
1516
|
+
n("update:modelValue", a.selectValue ? A.map((D) => D[a.selectValue]) : A);
|
|
1517
|
+
}, Z = (A) => l.modelValue !== null ? l.modelValue.some((D) => v.value.selectValue ? A[a.selectValue] === D : A.id === D.id && A.label === D.label) : !1, se = () => {
|
|
1518
|
+
_.value ? k() : (r.value = [...l.options], n("update:modelValue", [...l.options]));
|
|
1514
1519
|
};
|
|
1515
|
-
return (
|
|
1516
|
-
const J =
|
|
1520
|
+
return (A, D) => {
|
|
1521
|
+
const J = pe;
|
|
1517
1522
|
return i(), y(N, null, [
|
|
1518
|
-
|
|
1519
|
-
class: [
|
|
1523
|
+
b(p(Se), S(v.value, {
|
|
1524
|
+
class: [s.value, M.value ? "is-invalid" : ""],
|
|
1520
1525
|
"data-cy": "multiselect",
|
|
1521
1526
|
"onUpdate:modelValue": [
|
|
1522
1527
|
G,
|
|
1523
|
-
D[1] || (D[1] = (
|
|
1528
|
+
D[1] || (D[1] = (L) => re(r) ? r.value = L : null)
|
|
1524
1529
|
],
|
|
1525
|
-
modelValue: p(
|
|
1526
|
-
}),
|
|
1527
|
-
caret:
|
|
1528
|
-
P.value ? (i(),
|
|
1530
|
+
modelValue: p(r)
|
|
1531
|
+
}), le({
|
|
1532
|
+
caret: f(({ toggle: L }) => [
|
|
1533
|
+
P.value ? (i(), w(p(C), {
|
|
1529
1534
|
key: 0,
|
|
1530
1535
|
icon: "bi:x",
|
|
1531
1536
|
class: "my-auto multiselect__clear-icon",
|
|
1532
|
-
onMousedown: D[0] || (D[0] = Y((W) =>
|
|
1537
|
+
onMousedown: D[0] || (D[0] = Y((W) => k(), ["prevent", "stop"])),
|
|
1533
1538
|
"data-cy": "clear",
|
|
1534
1539
|
height: "18px",
|
|
1535
1540
|
width: "18px"
|
|
1536
|
-
})) :
|
|
1537
|
-
|
|
1541
|
+
})) : V("", !0),
|
|
1542
|
+
b(p(C), {
|
|
1538
1543
|
icon: "bi:chevron-down",
|
|
1539
|
-
onClick:
|
|
1544
|
+
onClick: L,
|
|
1540
1545
|
class: "multiselect__select"
|
|
1541
1546
|
}, null, 8, ["onClick"])
|
|
1542
1547
|
]),
|
|
1543
|
-
tag:
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1548
|
+
tag: f(({ option: L, remove: W }) => [
|
|
1549
|
+
c("div", Ct, [
|
|
1550
|
+
c("div", Tt, h(L.label), 1),
|
|
1551
|
+
b(p(C), {
|
|
1547
1552
|
icon: "bi:x",
|
|
1548
1553
|
class: "my-auto multiselect__tag-icon",
|
|
1549
|
-
onMousedown: Y((Aa) =>
|
|
1554
|
+
onMousedown: Y((Aa) => o(W, L), ["prevent", "stop"]),
|
|
1550
1555
|
height: "18px",
|
|
1551
1556
|
width: "18px"
|
|
1552
1557
|
}, null, 8, ["onMousedown"])
|
|
1553
1558
|
])
|
|
1554
1559
|
]),
|
|
1555
|
-
default:
|
|
1556
|
-
(i(!0), y(N, null, q(
|
|
1560
|
+
default: f(() => [
|
|
1561
|
+
(i(!0), y(N, null, q(A.$slots, (L, W) => $(A.$slots, W, { slot: W })), 256))
|
|
1557
1562
|
]),
|
|
1558
1563
|
_: 2
|
|
1559
1564
|
}, [
|
|
1560
|
-
|
|
1565
|
+
v.value.multiple && A.showSelectAll && !v.value.async ? {
|
|
1561
1566
|
name: "beforeList",
|
|
1562
|
-
fn:
|
|
1563
|
-
|
|
1567
|
+
fn: f(() => [
|
|
1568
|
+
c("li", {
|
|
1564
1569
|
class: "multiselect__element",
|
|
1565
|
-
onClick:
|
|
1570
|
+
onClick: se,
|
|
1566
1571
|
onMouseover: z,
|
|
1567
1572
|
onMouseleave: g,
|
|
1568
1573
|
"data-cy": "toggle-all"
|
|
1569
1574
|
}, [
|
|
1570
|
-
|
|
1571
|
-
class:
|
|
1575
|
+
c("span", {
|
|
1576
|
+
class: B(`${T.value}`)
|
|
1572
1577
|
}, [
|
|
1573
|
-
|
|
1574
|
-
|
|
1578
|
+
b(J, {
|
|
1579
|
+
value: _.value,
|
|
1580
|
+
class: "w-100 p-1"
|
|
1581
|
+
}, {
|
|
1582
|
+
default: f(() => [
|
|
1575
1583
|
_t
|
|
1576
1584
|
]),
|
|
1577
1585
|
_: 1
|
|
@@ -1581,30 +1589,30 @@ const bt = { key: 0 }, ft = {
|
|
|
1581
1589
|
]),
|
|
1582
1590
|
key: "0"
|
|
1583
1591
|
} : void 0,
|
|
1584
|
-
|
|
1592
|
+
v.value.multiple ? {
|
|
1585
1593
|
name: "option",
|
|
1586
|
-
fn:
|
|
1587
|
-
|
|
1588
|
-
"data-cy":
|
|
1594
|
+
fn: f(({ option: L }) => [
|
|
1595
|
+
c("div", {
|
|
1596
|
+
"data-cy": L.label
|
|
1589
1597
|
}, [
|
|
1590
|
-
(
|
|
1591
|
-
value: Z(
|
|
1592
|
-
|
|
1598
|
+
b(J, {
|
|
1599
|
+
value: Z(L),
|
|
1600
|
+
class: "w-100 p-1"
|
|
1593
1601
|
}, {
|
|
1594
|
-
default:
|
|
1595
|
-
|
|
1602
|
+
default: f(() => [
|
|
1603
|
+
c("div", Vt, h(L[v.value.label]), 1)
|
|
1596
1604
|
]),
|
|
1597
1605
|
_: 2
|
|
1598
|
-
}, 1032, ["value"])
|
|
1599
|
-
], 8,
|
|
1606
|
+
}, 1032, ["value"])
|
|
1607
|
+
], 8, St)
|
|
1600
1608
|
]),
|
|
1601
1609
|
key: "1"
|
|
1602
1610
|
} : void 0
|
|
1603
1611
|
]), 1040, ["class", "modelValue"]),
|
|
1604
|
-
|
|
1612
|
+
j(c("small", {
|
|
1605
1613
|
"data-cy": "error",
|
|
1606
1614
|
class: "invalid-feedback"
|
|
1607
|
-
},
|
|
1615
|
+
}, h(p(u)), 513), [
|
|
1608
1616
|
[H, M.value]
|
|
1609
1617
|
])
|
|
1610
1618
|
], 64);
|
|
@@ -1620,88 +1628,87 @@ const bt = { key: 0 }, ft = {
|
|
|
1620
1628
|
}, zt = { class: "d-inline-block" }, Ot = {
|
|
1621
1629
|
key: 1,
|
|
1622
1630
|
class: "p-2 item d-flex justify-content-between align-items-center"
|
|
1623
|
-
}, gl = /* @__PURE__ */
|
|
1631
|
+
}, gl = /* @__PURE__ */ F({
|
|
1624
1632
|
__name: "ForgeMultiSelectPreview",
|
|
1625
|
-
props: {
|
|
1633
|
+
props: /* @__PURE__ */ E({
|
|
1626
1634
|
title: { default: "Selected Items" },
|
|
1627
1635
|
orientation: { default: "row" },
|
|
1628
1636
|
height: { default: "200px" },
|
|
1629
1637
|
options: {},
|
|
1630
|
-
canRemoveItemFromPreview: { type: Boolean, default: !1 }
|
|
1631
|
-
|
|
1638
|
+
canRemoveItemFromPreview: { type: Boolean, default: !1 },
|
|
1639
|
+
optionsPreviewEmptyText: { default: "No Items Selected." }
|
|
1640
|
+
}, {
|
|
1641
|
+
modelValue: { default: [] },
|
|
1642
|
+
modelModifiers: {}
|
|
1643
|
+
}),
|
|
1632
1644
|
emits: ["update:modelValue"],
|
|
1633
|
-
setup(e
|
|
1634
|
-
const
|
|
1635
|
-
|
|
1636
|
-
}, c = (r) => {
|
|
1637
|
-
u(a.modelValue.filter((s) => s.id !== r));
|
|
1645
|
+
setup(e) {
|
|
1646
|
+
const t = e, a = U(e, "modelValue"), o = (l) => {
|
|
1647
|
+
a.value = a.value.filter((n) => n.id !== l);
|
|
1638
1648
|
};
|
|
1639
|
-
return (
|
|
1640
|
-
const
|
|
1649
|
+
return (l, n) => {
|
|
1650
|
+
const d = R;
|
|
1641
1651
|
return i(), y("div", {
|
|
1642
|
-
class:
|
|
1652
|
+
class: B(l.orientation === "column" ? "row" : ""),
|
|
1643
1653
|
"data-cy": "multiselect-preview"
|
|
1644
1654
|
}, [
|
|
1645
|
-
|
|
1646
|
-
class:
|
|
1655
|
+
c("div", {
|
|
1656
|
+
class: B(l.orientation === "row" ? "col-12 mb-1" : "col"),
|
|
1647
1657
|
"data-cy": "multiselect-container"
|
|
1648
1658
|
}, [
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
}, {
|
|
1658
|
-
tag: b(() => [
|
|
1659
|
-
O(w(""))
|
|
1659
|
+
b(ye, S({
|
|
1660
|
+
modelValue: a.value,
|
|
1661
|
+
"onUpdate:modelValue": n[0] || (n[0] = (r) => a.value = r),
|
|
1662
|
+
"limit-text": () => `${a.value.length} selected`,
|
|
1663
|
+
options: t.options
|
|
1664
|
+
}, { ...l.$attrs }), {
|
|
1665
|
+
tag: f(() => [
|
|
1666
|
+
O(h(""))
|
|
1660
1667
|
]),
|
|
1661
|
-
selection:
|
|
1662
|
-
|
|
1668
|
+
selection: f(() => [
|
|
1669
|
+
a.value.length > 0 ? (i(), y("span", Mt, h(a.value.length) + " items selected", 1)) : V("", !0)
|
|
1663
1670
|
]),
|
|
1664
|
-
default:
|
|
1665
|
-
(i(!0), y(N, null, q(
|
|
1671
|
+
default: f(() => [
|
|
1672
|
+
(i(!0), y(N, null, q(l.$slots, (r, u) => $(l.$slots, u, { slot: u })), 256))
|
|
1666
1673
|
]),
|
|
1667
1674
|
_: 3
|
|
1668
|
-
},
|
|
1669
|
-
|
|
1675
|
+
}, 16, ["modelValue", "limit-text", "options"]),
|
|
1676
|
+
$(l.$slots, "after-multi-select")
|
|
1670
1677
|
], 2),
|
|
1671
|
-
|
|
1672
|
-
class:
|
|
1678
|
+
c("div", {
|
|
1679
|
+
class: B(l.orientation === "row" ? "col-12" : "col"),
|
|
1673
1680
|
"data-cy": "options-preview"
|
|
1674
1681
|
}, [
|
|
1675
|
-
|
|
1676
|
-
style: we({ height:
|
|
1682
|
+
c("div", {
|
|
1683
|
+
style: we({ height: l.height }),
|
|
1677
1684
|
class: "overflow-auto"
|
|
1678
1685
|
}, [
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
(i(!0), y(N, null, q(
|
|
1682
|
-
key:
|
|
1686
|
+
c("div", Pt, [
|
|
1687
|
+
l.title ? (i(), y("div", It, h(l.title), 1)) : V("", !0),
|
|
1688
|
+
(i(!0), y(N, null, q(a.value, (r) => (i(), y("div", {
|
|
1689
|
+
key: r.id,
|
|
1683
1690
|
class: "p-2 item d-flex justify-content-between align-items-center"
|
|
1684
1691
|
}, [
|
|
1685
|
-
|
|
1686
|
-
|
|
1692
|
+
$(l.$slots, "list-item", { item: r }, () => [
|
|
1693
|
+
c("span", zt, h(r.shortLabel ? r.shortLabel : r.label), 1)
|
|
1687
1694
|
]),
|
|
1688
|
-
|
|
1695
|
+
l.canRemoveItemFromPreview ? (i(), w(d, {
|
|
1689
1696
|
key: 0,
|
|
1690
1697
|
link: "",
|
|
1691
1698
|
class: "m-0 p-0 d-flex align-items-center",
|
|
1692
|
-
onClick: (
|
|
1699
|
+
onClick: (u) => o(r.id)
|
|
1693
1700
|
}, {
|
|
1694
|
-
default:
|
|
1695
|
-
|
|
1701
|
+
default: f(() => [
|
|
1702
|
+
b(p(C), {
|
|
1696
1703
|
icon: "bi:x",
|
|
1697
1704
|
class: "close-icon",
|
|
1698
|
-
"data-cy": `close-icon-${
|
|
1705
|
+
"data-cy": `close-icon-${r.id}`
|
|
1699
1706
|
}, null, 8, ["data-cy"])
|
|
1700
1707
|
]),
|
|
1701
1708
|
_: 2
|
|
1702
|
-
}, 1032, ["onClick"])) :
|
|
1709
|
+
}, 1032, ["onClick"])) : V("", !0)
|
|
1703
1710
|
]))), 128)),
|
|
1704
|
-
|
|
1711
|
+
a.value.length === 0 ? (i(), y("div", Ot, h(t.optionsPreviewEmptyText), 1)) : V("", !0)
|
|
1705
1712
|
])
|
|
1706
1713
|
], 4)
|
|
1707
1714
|
], 2)
|
|
@@ -1714,23 +1721,23 @@ const bt = { key: 0 }, ft = {
|
|
|
1714
1721
|
}, At = {
|
|
1715
1722
|
"data-cy": "slot",
|
|
1716
1723
|
class: "d-flex align-items-center"
|
|
1717
|
-
}, hl = /* @__PURE__ */
|
|
1724
|
+
}, hl = /* @__PURE__ */ F({
|
|
1718
1725
|
__name: "ForgePageHeader",
|
|
1719
1726
|
props: {
|
|
1720
1727
|
title: {}
|
|
1721
1728
|
},
|
|
1722
1729
|
setup(e) {
|
|
1723
1730
|
const t = e;
|
|
1724
|
-
return (
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1731
|
+
return (a, o) => (i(), y("div", Dt, [
|
|
1732
|
+
c("h3", Ut, h(t.title), 1),
|
|
1733
|
+
c("div", At, [
|
|
1734
|
+
$(a.$slots, "default")
|
|
1728
1735
|
])
|
|
1729
1736
|
]));
|
|
1730
1737
|
}
|
|
1731
|
-
}), Nt = { class: "d-flex" }, Et = { "data-cy": "before-slot" }, Lt = { class: "position-relative w-100" }, Rt = { "data-cy": "after-slot" },
|
|
1738
|
+
}), Nt = { class: "d-flex" }, Et = { "data-cy": "before-slot" }, Lt = { class: "position-relative w-100" }, Rt = { "data-cy": "after-slot" }, be = /* @__PURE__ */ F({
|
|
1732
1739
|
__name: "ForgeDatepicker",
|
|
1733
|
-
props: /* @__PURE__ */
|
|
1740
|
+
props: /* @__PURE__ */ E({
|
|
1734
1741
|
severity: { default: "primary" },
|
|
1735
1742
|
modelValue: {},
|
|
1736
1743
|
selectionMode: { default: "single" },
|
|
@@ -1801,11 +1808,11 @@ const bt = { key: 0 }, ft = {
|
|
|
1801
1808
|
}),
|
|
1802
1809
|
emits: ["update:modelValue"],
|
|
1803
1810
|
setup(e) {
|
|
1804
|
-
const t = e,
|
|
1805
|
-
initialValue:
|
|
1811
|
+
const t = e, a = U(e, "modelValue"), { errors: o, errorMessage: l, handleChange: n, handleBlur: d, setValue: r } = K(() => t.name, void 0, {
|
|
1812
|
+
initialValue: a.value
|
|
1806
1813
|
}), u = () => {
|
|
1807
|
-
|
|
1808
|
-
},
|
|
1814
|
+
r(null), a.value = null;
|
|
1815
|
+
}, m = x(() => o.value.length > 0), v = x(() => ({
|
|
1809
1816
|
day: ({ context: s }) => ({
|
|
1810
1817
|
class: [
|
|
1811
1818
|
`text-center date-${t.severity === void 0 ? "primary" : t.severity}`,
|
|
@@ -1896,66 +1903,66 @@ const bt = { key: 0 }, ft = {
|
|
|
1896
1903
|
]
|
|
1897
1904
|
})
|
|
1898
1905
|
}));
|
|
1899
|
-
return (s,
|
|
1900
|
-
const
|
|
1906
|
+
return (s, T) => {
|
|
1907
|
+
const _ = Ve;
|
|
1901
1908
|
return i(), y(N, null, [
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1909
|
+
c("div", Nt, [
|
|
1910
|
+
c("span", Et, [
|
|
1911
|
+
$(s.$slots, "before")
|
|
1905
1912
|
]),
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
pt:
|
|
1909
|
-
modelValue:
|
|
1913
|
+
c("div", Lt, [
|
|
1914
|
+
b(_, S({ ...t, ...s.$attrs }, {
|
|
1915
|
+
pt: v.value,
|
|
1916
|
+
modelValue: a.value,
|
|
1910
1917
|
"onUpdate:modelValue": [
|
|
1911
|
-
|
|
1918
|
+
T[0] || (T[0] = (M) => a.value = M),
|
|
1912
1919
|
p(n)
|
|
1913
1920
|
],
|
|
1914
1921
|
onBlur: p(d),
|
|
1915
|
-
"input-class": { "is-invalid":
|
|
1922
|
+
"input-class": { "is-invalid": m.value }
|
|
1916
1923
|
}), null, 16, ["pt", "modelValue", "onUpdate:modelValue", "onBlur", "input-class"]),
|
|
1917
|
-
|
|
1924
|
+
j(b(p(C), {
|
|
1918
1925
|
"data-cy": "icon",
|
|
1919
1926
|
icon: "bi:calendar4",
|
|
1920
|
-
class:
|
|
1927
|
+
class: B(["position-absolute end-0 top-50 bottom-50 my-auto me-2 bg-white", `${m.value ? "text-danger-dark" : "text-muted"}`])
|
|
1921
1928
|
}, null, 8, ["class"]), [
|
|
1922
1929
|
[H, t.showIcon]
|
|
1923
1930
|
]),
|
|
1924
|
-
|
|
1931
|
+
j(b(p(C), {
|
|
1925
1932
|
"data-cy": "icon",
|
|
1926
1933
|
icon: "bi:x",
|
|
1927
1934
|
onClick: u,
|
|
1928
|
-
class:
|
|
1935
|
+
class: B(["position-absolute end-0 top-50 bottom-50 my-auto text-muted cursor-pointer bg-white", t.showIcon ? "datepicker-close-icon" : "me-2"])
|
|
1929
1936
|
}, null, 8, ["class"]), [
|
|
1930
1937
|
[H, t.modelValue]
|
|
1931
1938
|
])
|
|
1932
1939
|
]),
|
|
1933
|
-
|
|
1934
|
-
|
|
1940
|
+
c("span", Rt, [
|
|
1941
|
+
$(s.$slots, "after")
|
|
1935
1942
|
])
|
|
1936
1943
|
]),
|
|
1937
|
-
|
|
1944
|
+
j(c("small", {
|
|
1938
1945
|
"data-cy": "error",
|
|
1939
1946
|
class: "text-invalid"
|
|
1940
|
-
},
|
|
1941
|
-
[H,
|
|
1947
|
+
}, h(p(l)), 513), [
|
|
1948
|
+
[H, m.value]
|
|
1942
1949
|
])
|
|
1943
1950
|
], 64);
|
|
1944
1951
|
};
|
|
1945
1952
|
}
|
|
1946
|
-
}), wl = /* @__PURE__ */
|
|
1953
|
+
}), wl = /* @__PURE__ */ F({
|
|
1947
1954
|
__name: "ForgeRemainingCharacters",
|
|
1948
1955
|
props: {
|
|
1949
1956
|
maxCount: { default: 300 },
|
|
1950
1957
|
currentCount: {}
|
|
1951
1958
|
},
|
|
1952
1959
|
setup(e) {
|
|
1953
|
-
const t = e,
|
|
1954
|
-
return (
|
|
1955
|
-
class:
|
|
1956
|
-
}, "Remaining characters: " +
|
|
1960
|
+
const t = e, a = x(() => t.maxCount - t.currentCount);
|
|
1961
|
+
return (o, l) => (i(), y("div", {
|
|
1962
|
+
class: B(a.value < 0 ? "text-danger" : "")
|
|
1963
|
+
}, "Remaining characters: " + h(a.value), 3));
|
|
1957
1964
|
}
|
|
1958
|
-
}), jt = /* @__PURE__ */
|
|
1965
|
+
}), jt = /* @__PURE__ */ c("hr", null, null, -1), Ht = { class: "d-flex justify-content-between" }, xl = /* @__PURE__ */ F({
|
|
1959
1966
|
__name: "ForgeForm",
|
|
1960
1967
|
props: {
|
|
1961
1968
|
onSubmit: {},
|
|
@@ -1967,93 +1974,93 @@ const bt = { key: 0 }, ft = {
|
|
|
1967
1974
|
hideCancel: { type: Boolean, default: !1 }
|
|
1968
1975
|
},
|
|
1969
1976
|
setup(e) {
|
|
1970
|
-
const t = e,
|
|
1977
|
+
const t = e, a = I(!1), o = I({
|
|
1971
1978
|
hasError: !1,
|
|
1972
1979
|
message: ""
|
|
1973
1980
|
});
|
|
1974
|
-
async function
|
|
1975
|
-
|
|
1981
|
+
async function l() {
|
|
1982
|
+
a.value = !0, o.value.hasError = !1;
|
|
1976
1983
|
try {
|
|
1977
1984
|
await t.onSubmit();
|
|
1978
1985
|
} catch (n) {
|
|
1979
|
-
|
|
1986
|
+
o.value.hasError = !0, n.message && (o.value.message = n.message);
|
|
1980
1987
|
}
|
|
1981
|
-
|
|
1988
|
+
a.value = !1;
|
|
1982
1989
|
}
|
|
1983
1990
|
return (n, d) => {
|
|
1984
|
-
const
|
|
1985
|
-
return i(), y("form",
|
|
1991
|
+
const r = R;
|
|
1992
|
+
return i(), y("form", S(n.$attrs, {
|
|
1986
1993
|
novalidate: "",
|
|
1987
1994
|
class: "position-relative shadow-sm border p-4 bg-white",
|
|
1988
|
-
onSubmit: Y(
|
|
1995
|
+
onSubmit: Y(l, ["prevent"])
|
|
1989
1996
|
}), [
|
|
1990
|
-
n.hideTitle ?
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
class:
|
|
1997
|
+
n.hideTitle ? V("", !0) : (i(), y(N, { key: 0 }, [
|
|
1998
|
+
$(n.$slots, "title", {}, () => [
|
|
1999
|
+
c("h3", {
|
|
2000
|
+
class: B(n.titleClass),
|
|
1994
2001
|
"data-cy": "form-title"
|
|
1995
|
-
},
|
|
2002
|
+
}, h(n.title), 3)
|
|
1996
2003
|
]),
|
|
1997
2004
|
jt
|
|
1998
2005
|
], 64)),
|
|
1999
|
-
|
|
2006
|
+
o.value.hasError ? (i(), w(ne, {
|
|
2000
2007
|
key: 1,
|
|
2001
2008
|
severity: "danger",
|
|
2002
2009
|
"data-cy": "error"
|
|
2003
2010
|
}, {
|
|
2004
|
-
default:
|
|
2005
|
-
|
|
2006
|
-
error:
|
|
2011
|
+
default: f(() => [
|
|
2012
|
+
$(n.$slots, "error", {
|
|
2013
|
+
error: o.value.message
|
|
2007
2014
|
}, () => [
|
|
2008
|
-
O(
|
|
2015
|
+
O(h(o.value.message), 1)
|
|
2009
2016
|
])
|
|
2010
2017
|
]),
|
|
2011
2018
|
_: 3
|
|
2012
|
-
})) :
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
n.hideCancel ?
|
|
2019
|
+
})) : V("", !0),
|
|
2020
|
+
$(n.$slots, "default"),
|
|
2021
|
+
c("div", Ht, [
|
|
2022
|
+
$(n.$slots, "cancel", {}, () => [
|
|
2023
|
+
n.hideCancel ? V("", !0) : (i(), w(r, {
|
|
2017
2024
|
key: 0,
|
|
2018
2025
|
"data-cy": "cancel-btn",
|
|
2019
2026
|
type: "reset",
|
|
2020
2027
|
severity: "secondary",
|
|
2021
2028
|
outlined: "",
|
|
2022
|
-
onClick: d[0] || (d[0] = (
|
|
2029
|
+
onClick: d[0] || (d[0] = (u) => n.$emit("cancel"))
|
|
2023
2030
|
}, {
|
|
2024
|
-
default:
|
|
2025
|
-
O(
|
|
2031
|
+
default: f(() => [
|
|
2032
|
+
O(h(n.cancelText), 1)
|
|
2026
2033
|
]),
|
|
2027
2034
|
_: 1
|
|
2028
2035
|
}))
|
|
2029
2036
|
]),
|
|
2030
|
-
|
|
2031
|
-
|
|
2037
|
+
$(n.$slots, "submit", { submit: l }, () => [
|
|
2038
|
+
b(r, {
|
|
2032
2039
|
"data-cy": "submit-btn",
|
|
2033
2040
|
type: "submit",
|
|
2034
2041
|
severity: "primary",
|
|
2035
2042
|
class: "ms-auto"
|
|
2036
2043
|
}, {
|
|
2037
|
-
default:
|
|
2038
|
-
O(
|
|
2044
|
+
default: f(() => [
|
|
2045
|
+
O(h(n.submitText), 1)
|
|
2039
2046
|
]),
|
|
2040
2047
|
_: 1
|
|
2041
2048
|
})
|
|
2042
2049
|
])
|
|
2043
2050
|
]),
|
|
2044
|
-
|
|
2051
|
+
a.value ? (i(), w(ve, {
|
|
2045
2052
|
key: 2,
|
|
2046
2053
|
"data-cy": "loading-spinner"
|
|
2047
|
-
})) :
|
|
2054
|
+
})) : V("", !0)
|
|
2048
2055
|
], 16);
|
|
2049
2056
|
};
|
|
2050
2057
|
}
|
|
2051
2058
|
}), Yt = {
|
|
2052
2059
|
key: 1,
|
|
2053
2060
|
class: "d-flex flex-column w-100"
|
|
2054
|
-
}, qt = ["for"], kl = /* @__PURE__ */
|
|
2061
|
+
}, qt = ["for"], kl = /* @__PURE__ */ F({
|
|
2055
2062
|
__name: "ForgeFormField",
|
|
2056
|
-
props: /* @__PURE__ */
|
|
2063
|
+
props: /* @__PURE__ */ E({
|
|
2057
2064
|
name: {},
|
|
2058
2065
|
fieldLabel: {},
|
|
2059
2066
|
type: { default: "text" },
|
|
@@ -2065,92 +2072,92 @@ const bt = { key: 0 }, ft = {
|
|
|
2065
2072
|
}),
|
|
2066
2073
|
emits: ["update:modelValue"],
|
|
2067
2074
|
setup(e) {
|
|
2068
|
-
const t =
|
|
2069
|
-
|
|
2070
|
-
}, { errors:
|
|
2075
|
+
const t = U(e, "modelValue"), a = e, o = (v) => {
|
|
2076
|
+
a.type == "number" ? r(v.value) : r(v);
|
|
2077
|
+
}, { errors: l, value: n, errorMessage: d, handleChange: r, handleBlur: u } = K(() => a.name, void 0, {
|
|
2071
2078
|
initialValue: t.value
|
|
2072
|
-
}),
|
|
2073
|
-
return
|
|
2074
|
-
t.value =
|
|
2075
|
-
}, { immediate: !0 }), (
|
|
2076
|
-
const
|
|
2077
|
-
return
|
|
2079
|
+
}), m = x(() => l.value.length > 0);
|
|
2080
|
+
return ie(() => n.value, (v) => {
|
|
2081
|
+
t.value = v;
|
|
2082
|
+
}, { immediate: !0 }), (v, s) => {
|
|
2083
|
+
const T = Te, _ = Ce, M = de, P = oe, z = ye, g = be;
|
|
2084
|
+
return a.type === "checkbox" ? (i(), w(pe, S({
|
|
2078
2085
|
key: 0,
|
|
2079
|
-
id:
|
|
2080
|
-
label:
|
|
2081
|
-
},
|
|
2082
|
-
name:
|
|
2086
|
+
id: a.name,
|
|
2087
|
+
label: a.fieldLabel
|
|
2088
|
+
}, v.$attrs, {
|
|
2089
|
+
name: a.name,
|
|
2083
2090
|
modelValue: t.value,
|
|
2084
|
-
"onUpdate:modelValue":
|
|
2091
|
+
"onUpdate:modelValue": s[0] || (s[0] = (k) => t.value = k)
|
|
2085
2092
|
}), null, 16, ["id", "label", "name", "modelValue"])) : (i(), y("div", Yt, [
|
|
2086
|
-
|
|
2087
|
-
for:
|
|
2093
|
+
c("label", {
|
|
2094
|
+
for: a.name,
|
|
2088
2095
|
class: "mb-1"
|
|
2089
|
-
},
|
|
2090
|
-
|
|
2096
|
+
}, h(a.fieldLabel), 9, qt),
|
|
2097
|
+
a.type === "number" ? (i(), w(p(ce), S({
|
|
2091
2098
|
key: 0,
|
|
2092
|
-
id:
|
|
2093
|
-
},
|
|
2094
|
-
placeholder:
|
|
2095
|
-
"input-class": { "is-invalid":
|
|
2096
|
-
class: { "is-invalid":
|
|
2099
|
+
id: a.name
|
|
2100
|
+
}, v.$attrs, {
|
|
2101
|
+
placeholder: a.placeholder,
|
|
2102
|
+
"input-class": { "is-invalid": m.value },
|
|
2103
|
+
class: { "is-invalid": m.value },
|
|
2097
2104
|
modelValue: t.value,
|
|
2098
|
-
"onUpdate:modelValue":
|
|
2099
|
-
onInput:
|
|
2100
|
-
}), null, 16, ["id", "placeholder", "input-class", "class", "modelValue"])) :
|
|
2105
|
+
"onUpdate:modelValue": s[1] || (s[1] = (k) => t.value = k),
|
|
2106
|
+
onInput: o
|
|
2107
|
+
}), null, 16, ["id", "placeholder", "input-class", "class", "modelValue"])) : a.type === "textarea" ? (i(), w(T, S({
|
|
2101
2108
|
key: 1,
|
|
2102
|
-
id:
|
|
2103
|
-
},
|
|
2104
|
-
placeholder:
|
|
2105
|
-
class: { "is-invalid":
|
|
2109
|
+
id: a.name
|
|
2110
|
+
}, v.$attrs, {
|
|
2111
|
+
placeholder: a.placeholder,
|
|
2112
|
+
class: { "is-invalid": m.value },
|
|
2106
2113
|
modelValue: t.value,
|
|
2107
|
-
"onUpdate:modelValue":
|
|
2108
|
-
onInput:
|
|
2109
|
-
onBlur: p(
|
|
2110
|
-
}), null, 16, ["id", "placeholder", "class", "modelValue", "onBlur"])) :
|
|
2114
|
+
"onUpdate:modelValue": s[2] || (s[2] = (k) => t.value = k),
|
|
2115
|
+
onInput: o,
|
|
2116
|
+
onBlur: p(u)
|
|
2117
|
+
}), null, 16, ["id", "placeholder", "class", "modelValue", "onBlur"])) : a.type === "mask" ? (i(), w(_, S({
|
|
2111
2118
|
key: 2,
|
|
2112
|
-
id:
|
|
2113
|
-
},
|
|
2114
|
-
placeholder:
|
|
2115
|
-
mask:
|
|
2116
|
-
class: { "is-invalid":
|
|
2119
|
+
id: a.name
|
|
2120
|
+
}, v.$attrs, {
|
|
2121
|
+
placeholder: a.placeholder,
|
|
2122
|
+
mask: a.mask,
|
|
2123
|
+
class: { "is-invalid": m.value },
|
|
2117
2124
|
modelValue: t.value,
|
|
2118
|
-
"onUpdate:modelValue":
|
|
2119
|
-
onComplete:
|
|
2120
|
-
onBlur: p(
|
|
2121
|
-
}), null, 16, ["id", "placeholder", "mask", "class", "modelValue", "onBlur"])) :
|
|
2125
|
+
"onUpdate:modelValue": s[3] || (s[3] = (k) => t.value = k),
|
|
2126
|
+
onComplete: o,
|
|
2127
|
+
onBlur: p(u)
|
|
2128
|
+
}), null, 16, ["id", "placeholder", "mask", "class", "modelValue", "onBlur"])) : a.type === "text" ? (i(), w(M, S({
|
|
2122
2129
|
key: 3,
|
|
2123
|
-
id:
|
|
2124
|
-
},
|
|
2125
|
-
placeholder:
|
|
2126
|
-
class: { "is-invalid":
|
|
2130
|
+
id: a.name
|
|
2131
|
+
}, v.$attrs, {
|
|
2132
|
+
placeholder: a.placeholder,
|
|
2133
|
+
class: { "is-invalid": m.value },
|
|
2127
2134
|
modelValue: t.value,
|
|
2128
|
-
"onUpdate:modelValue":
|
|
2129
|
-
onInput:
|
|
2130
|
-
onBlur: p(
|
|
2131
|
-
}), null, 16, ["id", "placeholder", "class", "modelValue", "onBlur"])) :
|
|
2135
|
+
"onUpdate:modelValue": s[4] || (s[4] = (k) => t.value = k),
|
|
2136
|
+
onInput: o,
|
|
2137
|
+
onBlur: p(u)
|
|
2138
|
+
}), null, 16, ["id", "placeholder", "class", "modelValue", "onBlur"])) : a.type === "select" ? (i(), w(P, S({ key: 4 }, { ...a, ...v.$attrs }, {
|
|
2132
2139
|
modelValue: t.value,
|
|
2133
|
-
"onUpdate:modelValue":
|
|
2134
|
-
class: { "is-invalid":
|
|
2135
|
-
}), null, 16, ["modelValue", "class"])) :
|
|
2140
|
+
"onUpdate:modelValue": s[5] || (s[5] = (k) => t.value = k),
|
|
2141
|
+
class: { "is-invalid": m.value }
|
|
2142
|
+
}), null, 16, ["modelValue", "class"])) : a.type === "multiselect" ? (i(), w(z, S({ key: 5 }, { ...a, ...v.$attrs }, {
|
|
2136
2143
|
modelValue: t.value,
|
|
2137
|
-
"onUpdate:modelValue":
|
|
2138
|
-
class: { "is-invalid":
|
|
2139
|
-
}), null, 16, ["modelValue", "class"])) :
|
|
2144
|
+
"onUpdate:modelValue": s[6] || (s[6] = (k) => t.value = k),
|
|
2145
|
+
class: { "is-invalid": m.value }
|
|
2146
|
+
}), null, 16, ["modelValue", "class"])) : a.type === "datepicker" ? (i(), w(g, S({ key: 6 }, { ...a, ...v.$attrs }, {
|
|
2140
2147
|
modelValue: t.value,
|
|
2141
|
-
"onUpdate:modelValue":
|
|
2142
|
-
class: { "is-invalid":
|
|
2143
|
-
}), null, 16, ["modelValue", "class"])) :
|
|
2144
|
-
|
|
2148
|
+
"onUpdate:modelValue": s[7] || (s[7] = (k) => t.value = k),
|
|
2149
|
+
class: { "is-invalid": m.value }
|
|
2150
|
+
}), null, 16, ["modelValue", "class"])) : V("", !0),
|
|
2151
|
+
j(c("small", {
|
|
2145
2152
|
"data-cy": "error",
|
|
2146
2153
|
class: "invalid-feedback"
|
|
2147
|
-
},
|
|
2148
|
-
[H,
|
|
2154
|
+
}, h(p(d)), 513), [
|
|
2155
|
+
[H, m.value && a.type !== "multiselect" && a.type !== "datepicker"]
|
|
2149
2156
|
])
|
|
2150
2157
|
]));
|
|
2151
2158
|
};
|
|
2152
2159
|
}
|
|
2153
|
-
}), $l = /* @__PURE__ */
|
|
2160
|
+
}), $l = /* @__PURE__ */ F({
|
|
2154
2161
|
__name: "ForgeChips",
|
|
2155
2162
|
props: {
|
|
2156
2163
|
chipSeverity: { default: "primary" },
|
|
@@ -2177,16 +2184,16 @@ const bt = { key: 0 }, ft = {
|
|
|
2177
2184
|
unstyled: { type: Boolean }
|
|
2178
2185
|
},
|
|
2179
2186
|
setup(e) {
|
|
2180
|
-
const t = e, { errors:
|
|
2187
|
+
const t = e, { errors: a, value: o, errorMessage: l } = K(() => t.name, void 0, {
|
|
2181
2188
|
initialValue: t.modelValue
|
|
2182
|
-
}), n =
|
|
2189
|
+
}), n = x(() => a.value.length > 0), d = x(() => ({
|
|
2183
2190
|
inputtoken: "list-unstyled",
|
|
2184
2191
|
input: "border-0",
|
|
2185
|
-
container: ({ props:
|
|
2192
|
+
container: ({ props: r }) => ({
|
|
2186
2193
|
class: [
|
|
2187
2194
|
"form-control mb-0 d-flex",
|
|
2188
2195
|
{
|
|
2189
|
-
disabled:
|
|
2196
|
+
disabled: r.disabled,
|
|
2190
2197
|
"is-invalid": n.value
|
|
2191
2198
|
}
|
|
2192
2199
|
]
|
|
@@ -2210,35 +2217,35 @@ const bt = { key: 0 }, ft = {
|
|
|
2210
2217
|
]
|
|
2211
2218
|
}
|
|
2212
2219
|
}));
|
|
2213
|
-
return (
|
|
2214
|
-
const
|
|
2220
|
+
return (r, u) => {
|
|
2221
|
+
const m = Me;
|
|
2215
2222
|
return i(), y(N, null, [
|
|
2216
|
-
|
|
2223
|
+
b(m, S({ ...t, ...r.$attrs }, {
|
|
2217
2224
|
pt: d.value,
|
|
2218
|
-
"model-value": p(
|
|
2219
|
-
"onUpdate:modelValue":
|
|
2225
|
+
"model-value": p(o),
|
|
2226
|
+
"onUpdate:modelValue": u[0] || (u[0] = (v) => re(o) ? o.value = v : null)
|
|
2220
2227
|
}), {
|
|
2221
|
-
removetokenicon:
|
|
2222
|
-
|
|
2228
|
+
removetokenicon: f(({ removeCallback: v }) => [
|
|
2229
|
+
j(b(p(C), {
|
|
2223
2230
|
icon: "bi:x",
|
|
2224
2231
|
class: "cursor-pointer",
|
|
2225
|
-
onClick:
|
|
2232
|
+
onClick: v
|
|
2226
2233
|
}, null, 8, ["onClick"]), [
|
|
2227
2234
|
[H, !t.disabled]
|
|
2228
2235
|
])
|
|
2229
2236
|
]),
|
|
2230
2237
|
_: 1
|
|
2231
2238
|
}, 16, ["pt", "model-value"]),
|
|
2232
|
-
|
|
2239
|
+
j(c("small", {
|
|
2233
2240
|
"data-cy": "error",
|
|
2234
2241
|
class: "text-invalid"
|
|
2235
|
-
},
|
|
2242
|
+
}, h(p(l)), 513), [
|
|
2236
2243
|
[H, n.value]
|
|
2237
2244
|
])
|
|
2238
2245
|
], 64);
|
|
2239
2246
|
};
|
|
2240
2247
|
}
|
|
2241
|
-
}), Gt = /* @__PURE__ */
|
|
2248
|
+
}), Gt = /* @__PURE__ */ F({
|
|
2242
2249
|
__name: "ForgeProgressBar",
|
|
2243
2250
|
props: {
|
|
2244
2251
|
severity: { default: "primary" },
|
|
@@ -2253,7 +2260,7 @@ const bt = { key: 0 }, ft = {
|
|
|
2253
2260
|
unstyled: { type: Boolean }
|
|
2254
2261
|
},
|
|
2255
2262
|
setup(e) {
|
|
2256
|
-
const t = e,
|
|
2263
|
+
const t = e, a = x(() => t.striped ? "progress-bar-striped" : null), o = x(() => t.animate ? "progress-bar-animated" : null), l = x(() => {
|
|
2257
2264
|
switch (t.severity) {
|
|
2258
2265
|
case "brand":
|
|
2259
2266
|
return "bg-brand";
|
|
@@ -2272,25 +2279,25 @@ const bt = { key: 0 }, ft = {
|
|
|
2272
2279
|
default:
|
|
2273
2280
|
return "bg-primary";
|
|
2274
2281
|
}
|
|
2275
|
-
}), n =
|
|
2282
|
+
}), n = x(() => ({
|
|
2276
2283
|
root: {
|
|
2277
2284
|
style: t.pixelWidth ? `width: ${t.pixelWidth}px` : ""
|
|
2278
2285
|
},
|
|
2279
2286
|
value: {
|
|
2280
|
-
class: [
|
|
2287
|
+
class: [l.value, a.value, o.value]
|
|
2281
2288
|
}
|
|
2282
2289
|
}));
|
|
2283
|
-
return (d,
|
|
2284
|
-
const
|
|
2285
|
-
return i(),
|
|
2286
|
-
default:
|
|
2287
|
-
|
|
2290
|
+
return (d, r) => {
|
|
2291
|
+
const u = Pe;
|
|
2292
|
+
return i(), w(u, S({ ...d.$attrs, ...t }, { pt: n.value }), {
|
|
2293
|
+
default: f(() => [
|
|
2294
|
+
$(d.$slots, "default")
|
|
2288
2295
|
]),
|
|
2289
2296
|
_: 3
|
|
2290
2297
|
}, 16, ["pt"]);
|
|
2291
2298
|
};
|
|
2292
2299
|
}
|
|
2293
|
-
}), Kt = { class: "value text-white w-100 text-center" }, Bl = /* @__PURE__ */
|
|
2300
|
+
}), Kt = { class: "value text-white w-100 text-center" }, Bl = /* @__PURE__ */ F({
|
|
2294
2301
|
__name: "ForgeStatWidget",
|
|
2295
2302
|
props: {
|
|
2296
2303
|
size: { default: "md" },
|
|
@@ -2298,18 +2305,18 @@ const bt = { key: 0 }, ft = {
|
|
|
2298
2305
|
},
|
|
2299
2306
|
setup(e) {
|
|
2300
2307
|
const t = e;
|
|
2301
|
-
return (
|
|
2308
|
+
return (a, o) => (i(), y("div", S(a.$attrs, {
|
|
2302
2309
|
class: `d-flex shadow m-2 align-items-center widget--${t.size} bg-${t.severity}`
|
|
2303
2310
|
}), [
|
|
2304
|
-
|
|
2305
|
-
|
|
2311
|
+
c("span", Kt, [
|
|
2312
|
+
$(a.$slots, "default")
|
|
2306
2313
|
])
|
|
2307
2314
|
], 16));
|
|
2308
2315
|
}
|
|
2309
2316
|
}), Wt = {
|
|
2310
2317
|
class: "d-flex flex-column align-items-center",
|
|
2311
2318
|
"data-cy": "stepper"
|
|
2312
|
-
}, Zt = { class: "d-flex align-items-center justify-content-center w-100" }, Fl = /* @__PURE__ */
|
|
2319
|
+
}, Zt = { class: "d-flex align-items-center justify-content-center w-100" }, Fl = /* @__PURE__ */ F({
|
|
2313
2320
|
__name: "ForgeStepper",
|
|
2314
2321
|
props: {
|
|
2315
2322
|
currentStep: { default: 0 },
|
|
@@ -2325,100 +2332,100 @@ const bt = { key: 0 }, ft = {
|
|
|
2325
2332
|
},
|
|
2326
2333
|
emits: ["update:currentStep"],
|
|
2327
2334
|
setup(e, { emit: t }) {
|
|
2328
|
-
const
|
|
2335
|
+
const a = t, o = e, l = I(o.currentStep), n = () => {
|
|
2329
2336
|
do
|
|
2330
|
-
|
|
2331
|
-
while (
|
|
2332
|
-
|
|
2337
|
+
l.value--;
|
|
2338
|
+
while (o.model[l.value].disabled);
|
|
2339
|
+
a("update:currentStep", l.value);
|
|
2333
2340
|
}, d = () => {
|
|
2334
|
-
if (
|
|
2341
|
+
if (l.value < o.model.length - 1)
|
|
2335
2342
|
do
|
|
2336
|
-
|
|
2337
|
-
while (
|
|
2338
|
-
|
|
2339
|
-
},
|
|
2340
|
-
const
|
|
2341
|
-
return !(
|
|
2342
|
-
}),
|
|
2343
|
-
menuitem: (
|
|
2343
|
+
l.value++;
|
|
2344
|
+
while (o.model[l.value].disabled);
|
|
2345
|
+
a("update:currentStep", l.value);
|
|
2346
|
+
}, r = x(() => {
|
|
2347
|
+
const m = o.model.findIndex((v) => !v.disabled);
|
|
2348
|
+
return !(m < l.value && m > -1);
|
|
2349
|
+
}), u = x(() => ({
|
|
2350
|
+
menuitem: (m) => ({
|
|
2344
2351
|
class: [{
|
|
2345
|
-
"cursor-pointer": !
|
|
2352
|
+
"cursor-pointer": !m.context.disabled
|
|
2346
2353
|
}]
|
|
2347
2354
|
}),
|
|
2348
|
-
step: (
|
|
2355
|
+
step: (m) => ({
|
|
2349
2356
|
class: [
|
|
2350
2357
|
"d-flex align-items-center justify-content-center mb-2 step",
|
|
2351
2358
|
{
|
|
2352
|
-
inactive:
|
|
2353
|
-
"bg-primary text-white":
|
|
2354
|
-
"bg-brand text-white":
|
|
2355
|
-
"bg-secondary text-white":
|
|
2356
|
-
"bg-success text-white":
|
|
2357
|
-
"bg-warning text-white":
|
|
2358
|
-
"bg-danger text-white":
|
|
2359
|
-
"bg-info text-white":
|
|
2359
|
+
inactive: m.context.disabled,
|
|
2360
|
+
"bg-primary text-white": m.context.index === l.value && (o.severity === void 0 || o.severity === "primary"),
|
|
2361
|
+
"bg-brand text-white": m.context.index === l.value && o.severity === "brand",
|
|
2362
|
+
"bg-secondary text-white": m.context.index === l.value && o.severity === "secondary",
|
|
2363
|
+
"bg-success text-white": m.context.index === l.value && o.severity === "success",
|
|
2364
|
+
"bg-warning text-white": m.context.index === l.value && o.severity === "warning",
|
|
2365
|
+
"bg-danger text-white": m.context.index === l.value && o.severity === "danger",
|
|
2366
|
+
"bg-info text-white": m.context.index === l.value && o.severity === "info"
|
|
2360
2367
|
}
|
|
2361
2368
|
]
|
|
2362
2369
|
}),
|
|
2363
|
-
label: (
|
|
2370
|
+
label: (m) => ({
|
|
2364
2371
|
class: [
|
|
2365
2372
|
"h5",
|
|
2366
2373
|
{
|
|
2367
|
-
"border-bottom border-2 border-primary":
|
|
2368
|
-
"border-bottom border-2 border-brand":
|
|
2369
|
-
"border-bottom border-2 border-secondary":
|
|
2370
|
-
"border-bottom border-2 border-success":
|
|
2371
|
-
"border-bottom border-2 border-warning":
|
|
2372
|
-
"border-bottom border-2 border-danger":
|
|
2373
|
-
"border-bottom border-2 border-info":
|
|
2374
|
+
"border-bottom border-2 border-primary": m.context.index === l.value && (o.severity === void 0 || o.severity === "primary"),
|
|
2375
|
+
"border-bottom border-2 border-brand": m.context.index === l.value && o.severity === "brand",
|
|
2376
|
+
"border-bottom border-2 border-secondary": m.context.index === l.value && o.severity === "secondary",
|
|
2377
|
+
"border-bottom border-2 border-success": m.context.index === l.value && o.severity === "success",
|
|
2378
|
+
"border-bottom border-2 border-warning": m.context.index === l.value && o.severity === "warning",
|
|
2379
|
+
"border-bottom border-2 border-danger": m.context.index === l.value && o.severity === "danger",
|
|
2380
|
+
"border-bottom border-2 border-info": m.context.index === l.value && o.severity === "info"
|
|
2374
2381
|
}
|
|
2375
2382
|
]
|
|
2376
2383
|
})
|
|
2377
2384
|
}));
|
|
2378
|
-
return (
|
|
2379
|
-
const
|
|
2385
|
+
return (m, v) => {
|
|
2386
|
+
const s = R, T = ze, _ = Ie;
|
|
2380
2387
|
return i(), y("div", Wt, [
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
severity:
|
|
2384
|
-
disabled:
|
|
2388
|
+
c("div", Zt, [
|
|
2389
|
+
b(s, {
|
|
2390
|
+
severity: o.severity,
|
|
2391
|
+
disabled: r.value,
|
|
2385
2392
|
onClick: n,
|
|
2386
2393
|
class: "rounded-circle py-2 me-4",
|
|
2387
2394
|
"data-cy": "back-button"
|
|
2388
2395
|
}, {
|
|
2389
|
-
default:
|
|
2390
|
-
|
|
2396
|
+
default: f(() => [
|
|
2397
|
+
b(p(C), {
|
|
2391
2398
|
icon: "bi:chevron-left",
|
|
2392
2399
|
class: "mb-1"
|
|
2393
2400
|
})
|
|
2394
2401
|
]),
|
|
2395
2402
|
_: 1
|
|
2396
2403
|
}, 8, ["severity", "disabled"]),
|
|
2397
|
-
|
|
2398
|
-
"active-step":
|
|
2399
|
-
"onUpdate:activeStep":
|
|
2400
|
-
model:
|
|
2401
|
-
pt:
|
|
2404
|
+
b(T, {
|
|
2405
|
+
"active-step": l.value,
|
|
2406
|
+
"onUpdate:activeStep": v[0] || (v[0] = (M) => l.value = M),
|
|
2407
|
+
model: o.model,
|
|
2408
|
+
pt: u.value,
|
|
2402
2409
|
readonly: !1
|
|
2403
2410
|
}, null, 8, ["active-step", "model", "pt"])
|
|
2404
2411
|
]),
|
|
2405
|
-
|
|
2406
|
-
(i(!0), y(N, null, q(
|
|
2412
|
+
b(_),
|
|
2413
|
+
(i(!0), y(N, null, q(o.model, (M, P) => (i(), y("div", {
|
|
2407
2414
|
key: P,
|
|
2408
2415
|
class: "w-100"
|
|
2409
2416
|
}, [
|
|
2410
|
-
P ===
|
|
2417
|
+
P === l.value ? $(m.$slots, M.key ?? M.label, {
|
|
2411
2418
|
key: 0,
|
|
2412
2419
|
nextStep: d,
|
|
2413
2420
|
previousStep: n
|
|
2414
2421
|
}, () => [
|
|
2415
|
-
|
|
2422
|
+
b(ne, {
|
|
2416
2423
|
severity: "info",
|
|
2417
2424
|
"data-cy": "alert"
|
|
2418
2425
|
}, {
|
|
2419
|
-
default:
|
|
2420
|
-
O(" Please add Slot Content for the key " +
|
|
2421
|
-
|
|
2426
|
+
default: f(() => [
|
|
2427
|
+
O(" Please add Slot Content for the key " + h(M.key ?? M.label) + " ", 1),
|
|
2428
|
+
b(s, {
|
|
2422
2429
|
severity: "primary",
|
|
2423
2430
|
label: "Next",
|
|
2424
2431
|
onClick: d,
|
|
@@ -2427,12 +2434,12 @@ const bt = { key: 0 }, ft = {
|
|
|
2427
2434
|
]),
|
|
2428
2435
|
_: 2
|
|
2429
2436
|
}, 1024)
|
|
2430
|
-
]) :
|
|
2437
|
+
]) : V("", !0)
|
|
2431
2438
|
]))), 128))
|
|
2432
2439
|
]);
|
|
2433
2440
|
};
|
|
2434
2441
|
}
|
|
2435
|
-
}), Jt = { class: "p-4 text-wrap w-100" }, Xt = { class: "p-4 text-wrap w-100" }, _l = /* @__PURE__ */
|
|
2442
|
+
}), Jt = { class: "p-4 text-wrap w-100" }, Xt = { class: "p-4 text-wrap w-100" }, _l = /* @__PURE__ */ F({
|
|
2436
2443
|
__name: "ForgeTile",
|
|
2437
2444
|
props: {
|
|
2438
2445
|
severity: { default: "primary" },
|
|
@@ -2441,19 +2448,19 @@ const bt = { key: 0 }, ft = {
|
|
|
2441
2448
|
selected: { type: Boolean, default: !1 }
|
|
2442
2449
|
},
|
|
2443
2450
|
setup(e) {
|
|
2444
|
-
const t = e,
|
|
2445
|
-
return (
|
|
2446
|
-
const d =
|
|
2447
|
-
return t.clickable ? (i(),
|
|
2451
|
+
const t = e, a = x(() => `${t.severity === void 0 ? "tile-primary" : `tile-${t.severity}`} ${t.barPosition === "none" ? "" : `tile-bar-${t.barPosition}`} ${t.selected ? "selected" : ""}`), o = x(() => `${t.severity === void 0 ? "tile-primary border-primary" : `tile-${t.severity} border-${t.severity}`} ${t.barPosition === "none" ? "" : `tile-bar-${t.barPosition}`} ${t.selected ? "selected" : ""}`);
|
|
2452
|
+
return (l, n) => {
|
|
2453
|
+
const d = R;
|
|
2454
|
+
return t.clickable ? (i(), w(d, {
|
|
2448
2455
|
key: 0,
|
|
2449
|
-
class:
|
|
2456
|
+
class: B(["d-flex w-100 p-0 text-body", a.value]),
|
|
2450
2457
|
severity: t.severity,
|
|
2451
2458
|
unstyled: "",
|
|
2452
2459
|
"data-cy": "button-tile"
|
|
2453
2460
|
}, {
|
|
2454
|
-
default:
|
|
2455
|
-
|
|
2456
|
-
|
|
2461
|
+
default: f(() => [
|
|
2462
|
+
c("div", Jt, [
|
|
2463
|
+
$(l.$slots, "default", {}, () => [
|
|
2457
2464
|
O("Tile Content")
|
|
2458
2465
|
])
|
|
2459
2466
|
])
|
|
@@ -2461,11 +2468,11 @@ const bt = { key: 0 }, ft = {
|
|
|
2461
2468
|
_: 3
|
|
2462
2469
|
}, 8, ["severity", "class"])) : (i(), y("div", {
|
|
2463
2470
|
key: 1,
|
|
2464
|
-
class:
|
|
2471
|
+
class: B(["d-flex w-100", o.value]),
|
|
2465
2472
|
"data-cy": "tile"
|
|
2466
2473
|
}, [
|
|
2467
|
-
|
|
2468
|
-
|
|
2474
|
+
c("div", Xt, [
|
|
2475
|
+
$(l.$slots, "default", {}, () => [
|
|
2469
2476
|
O("Tile Content")
|
|
2470
2477
|
])
|
|
2471
2478
|
])
|
|
@@ -2479,10 +2486,10 @@ function Q(e, t) {
|
|
|
2479
2486
|
const Qt = {
|
|
2480
2487
|
class: "d-flex justify-content-start align-items-baseline",
|
|
2481
2488
|
"data-cy": "pagination-header"
|
|
2482
|
-
}, ea = { class: "ms-2" }, ta = { key: 0 }, aa = /* @__PURE__ */
|
|
2489
|
+
}, ea = { class: "ms-2" }, ta = { key: 0 }, aa = /* @__PURE__ */ c("span", { class: "mx-2" }, "|", -1), la = {
|
|
2483
2490
|
class: "w-auto",
|
|
2484
2491
|
"data-cy": "total"
|
|
2485
|
-
}, oa = /* @__PURE__ */
|
|
2492
|
+
}, oa = /* @__PURE__ */ F({
|
|
2486
2493
|
__name: "ForgePaginationHeader",
|
|
2487
2494
|
props: {
|
|
2488
2495
|
total: {},
|
|
@@ -2491,28 +2498,28 @@ const Qt = {
|
|
|
2491
2498
|
},
|
|
2492
2499
|
emits: ["update:perPage"],
|
|
2493
2500
|
setup(e, { emit: t }) {
|
|
2494
|
-
const
|
|
2495
|
-
|
|
2496
|
-
}, n =
|
|
2497
|
-
const d = Math.ceil(
|
|
2501
|
+
const a = t, o = e, l = (d) => {
|
|
2502
|
+
a("update:perPage", d.value);
|
|
2503
|
+
}, n = x(() => {
|
|
2504
|
+
const d = Math.ceil(o.total / o.perPage);
|
|
2498
2505
|
return `${d} ${Q(d, "page")}`;
|
|
2499
2506
|
});
|
|
2500
|
-
return (d,
|
|
2507
|
+
return (d, r) => (i(), y("div", Qt, [
|
|
2501
2508
|
O(" Number of results per page "),
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
options:
|
|
2505
|
-
"model-value":
|
|
2506
|
-
onChange:
|
|
2509
|
+
c("div", ea, [
|
|
2510
|
+
b(p(oe), {
|
|
2511
|
+
options: o.pageSizes,
|
|
2512
|
+
"model-value": o.perPage,
|
|
2513
|
+
onChange: r[0] || (r[0] = (u) => l(u))
|
|
2507
2514
|
}, null, 8, ["options", "model-value"])
|
|
2508
2515
|
]),
|
|
2509
|
-
|
|
2516
|
+
o.total ? (i(), y("div", ta, [
|
|
2510
2517
|
aa,
|
|
2511
|
-
|
|
2512
|
-
])) :
|
|
2518
|
+
c("span", la, h(o.total) + " " + h(p(Q)(o.total, "result")) + " across " + h(n.value), 1)
|
|
2519
|
+
])) : V("", !0)
|
|
2513
2520
|
]));
|
|
2514
2521
|
}
|
|
2515
|
-
}), na = { class: "position-relative" }, sa = { "data-cy": "above-table-slot" }, ia = { class: "d-flex" }, ra = { class: "d-flex align-items-end mb-2" }, da = { key: 0 }, ua = { class: "ms-auto" }, ca = /* @__PURE__ */
|
|
2522
|
+
}), na = { class: "position-relative" }, sa = { "data-cy": "above-table-slot" }, ia = { class: "d-flex" }, ra = { class: "d-flex align-items-end mb-2" }, da = { key: 0 }, ua = { class: "ms-auto" }, ca = /* @__PURE__ */ c("span", { class: "me-2 my-auto text-nowrap" }, "Page Size:", -1), Sl = /* @__PURE__ */ F({
|
|
2516
2523
|
__name: "ForgeTable",
|
|
2517
2524
|
props: {
|
|
2518
2525
|
value: {},
|
|
@@ -2592,21 +2599,21 @@ const Qt = {
|
|
|
2592
2599
|
},
|
|
2593
2600
|
emits: ["update:filters", "update:tableContext", "sort", "page"],
|
|
2594
2601
|
setup(e, { emit: t }) {
|
|
2595
|
-
const
|
|
2596
|
-
filters:
|
|
2602
|
+
const a = t, o = e, l = I(), n = I([10, 20, 50, 100]), d = I(20), r = I({
|
|
2603
|
+
filters: o.filters,
|
|
2597
2604
|
perPage: d.value,
|
|
2598
2605
|
page: 0,
|
|
2599
2606
|
sortDirection: "None",
|
|
2600
2607
|
sortField: "",
|
|
2601
|
-
total:
|
|
2602
|
-
}),
|
|
2603
|
-
const g = Math.ceil(
|
|
2608
|
+
total: o.totalRecords ?? o.value.length
|
|
2609
|
+
}), u = x(() => o.totalRecords ?? o.value.length), m = x(() => {
|
|
2610
|
+
const g = Math.ceil(u.value / d.value);
|
|
2604
2611
|
return `${g} ${Q(g, "page")}`;
|
|
2605
|
-
}),
|
|
2612
|
+
}), v = x(() => ({
|
|
2606
2613
|
thead: () => ({
|
|
2607
2614
|
class: [
|
|
2608
2615
|
{
|
|
2609
|
-
"sticky-header":
|
|
2616
|
+
"sticky-header": o.stickyHeader
|
|
2610
2617
|
}
|
|
2611
2618
|
],
|
|
2612
2619
|
style: "position: "
|
|
@@ -2615,79 +2622,79 @@ const Qt = {
|
|
|
2615
2622
|
class: [
|
|
2616
2623
|
"spinner-border border-0",
|
|
2617
2624
|
{
|
|
2618
|
-
"text-brand":
|
|
2619
|
-
"text-primary":
|
|
2620
|
-
"text-success":
|
|
2621
|
-
"text-warning":
|
|
2622
|
-
"text-danger":
|
|
2623
|
-
"text-info":
|
|
2625
|
+
"text-brand": o.severity === "brand",
|
|
2626
|
+
"text-primary": o.severity === "primary",
|
|
2627
|
+
"text-success": o.severity === "success",
|
|
2628
|
+
"text-warning": o.severity === "warning",
|
|
2629
|
+
"text-danger": o.severity === "danger",
|
|
2630
|
+
"text-info": o.severity === "info"
|
|
2624
2631
|
}
|
|
2625
2632
|
]
|
|
2626
2633
|
})
|
|
2627
|
-
})),
|
|
2628
|
-
for (const g in
|
|
2629
|
-
typeof
|
|
2630
|
-
M(
|
|
2631
|
-
},
|
|
2632
|
-
|
|
2633
|
-
},
|
|
2634
|
-
var
|
|
2635
|
-
|
|
2634
|
+
})), s = () => {
|
|
2635
|
+
for (const g in o.filters)
|
|
2636
|
+
typeof o.filters[g] == "string" ? o.filters[g] = "" : o.filters[g].value = null;
|
|
2637
|
+
M(o.filters);
|
|
2638
|
+
}, T = () => {
|
|
2639
|
+
l.value.exportCSV();
|
|
2640
|
+
}, _ = (g) => {
|
|
2641
|
+
var k;
|
|
2642
|
+
r.value.sortDirection = g.sortOrder === 1 ? "Asc" : g.sortOrder === -1 ? "Desc" : "None", r.value.sortField = ((k = g.sortField) == null ? void 0 : k.toString()) ?? "", a("update:tableContext", r.value), a("sort", g);
|
|
2636
2643
|
}, M = (g) => {
|
|
2637
|
-
|
|
2644
|
+
r.value.filters = g, a("update:tableContext", r.value), a("update:filters", g);
|
|
2638
2645
|
}, P = (g) => {
|
|
2639
|
-
|
|
2646
|
+
r.value.page = g.page, a("update:tableContext", r.value), a("page", g);
|
|
2640
2647
|
}, z = () => {
|
|
2641
|
-
|
|
2648
|
+
r.value.perPage = d.value, a("update:tableContext", r.value);
|
|
2642
2649
|
};
|
|
2643
|
-
return
|
|
2644
|
-
|
|
2645
|
-
}, { deep: !0 }), ae(() =>
|
|
2646
|
-
|
|
2647
|
-
|
|
2650
|
+
return ie(() => o.filters, (g) => {
|
|
2651
|
+
r.value.filters = g, a("update:tableContext", r.value);
|
|
2652
|
+
}, { deep: !0 }), ae(() => a("update:tableContext", r.value)), (g, k) => (i(), y("div", na, [
|
|
2653
|
+
c("span", sa, [
|
|
2654
|
+
$(g.$slots, "above-table")
|
|
2648
2655
|
]),
|
|
2649
|
-
|
|
2650
|
-
class: ["w-100", `${
|
|
2651
|
-
}, { ...
|
|
2652
|
-
pt:
|
|
2656
|
+
b(p(Oe), S({
|
|
2657
|
+
class: ["w-100", `${o.severity ? `forge-table-${o.severity}` : ""}`]
|
|
2658
|
+
}, { ...o, ...g.$attrs }, {
|
|
2659
|
+
pt: v.value,
|
|
2653
2660
|
rows: d.value,
|
|
2654
|
-
"total-records":
|
|
2655
|
-
"filter-display":
|
|
2661
|
+
"total-records": u.value,
|
|
2662
|
+
"filter-display": o.filters ? "row" : void 0,
|
|
2656
2663
|
ref_key: "forgeTable",
|
|
2657
|
-
ref:
|
|
2664
|
+
ref: l,
|
|
2658
2665
|
"data-cy": "table",
|
|
2659
2666
|
"onUpdate:filters": M,
|
|
2660
|
-
onSort:
|
|
2667
|
+
onSort: _,
|
|
2661
2668
|
onPage: P
|
|
2662
|
-
}),
|
|
2663
|
-
header:
|
|
2664
|
-
|
|
2665
|
-
class:
|
|
2669
|
+
}), le({
|
|
2670
|
+
header: f(() => [
|
|
2671
|
+
c("div", {
|
|
2672
|
+
class: B(o.loading ? "opacity-50" : "")
|
|
2666
2673
|
}, [
|
|
2667
|
-
|
|
2668
|
-
|
|
2674
|
+
c("div", ia, [
|
|
2675
|
+
c("div", ra, [
|
|
2669
2676
|
g.paginator && !g.legacyPaginationFooter ? (i(), y("span", da, [
|
|
2670
|
-
|
|
2671
|
-
total:
|
|
2677
|
+
b(oa, {
|
|
2678
|
+
total: u.value,
|
|
2672
2679
|
"page-sizes": n.value,
|
|
2673
2680
|
"per-page": d.value,
|
|
2674
2681
|
"onUpdate:perPage": [
|
|
2675
|
-
|
|
2682
|
+
k[0] || (k[0] = (G) => d.value = G),
|
|
2676
2683
|
z
|
|
2677
2684
|
]
|
|
2678
2685
|
}, null, 8, ["total", "page-sizes", "per-page"])
|
|
2679
|
-
])) :
|
|
2686
|
+
])) : V("", !0)
|
|
2680
2687
|
]),
|
|
2681
|
-
|
|
2682
|
-
g.showClearButton ? (i(),
|
|
2688
|
+
c("div", ua, [
|
|
2689
|
+
g.showClearButton ? (i(), w(p(R), {
|
|
2683
2690
|
key: 0,
|
|
2684
2691
|
outlined: "",
|
|
2685
|
-
class:
|
|
2686
|
-
onClick:
|
|
2692
|
+
class: B(g.showExporterButton ? "me-2" : ""),
|
|
2693
|
+
onClick: s,
|
|
2687
2694
|
"data-cy": "clear-all"
|
|
2688
2695
|
}, {
|
|
2689
|
-
default:
|
|
2690
|
-
|
|
2696
|
+
default: f(() => [
|
|
2697
|
+
b(p(C), {
|
|
2691
2698
|
icon: "bi:funnel-fill",
|
|
2692
2699
|
width: "24",
|
|
2693
2700
|
height: "24"
|
|
@@ -2695,15 +2702,15 @@ const Qt = {
|
|
|
2695
2702
|
O(" Clear ")
|
|
2696
2703
|
]),
|
|
2697
2704
|
_: 1
|
|
2698
|
-
}, 8, ["class"])) :
|
|
2699
|
-
g.showExporterButton ? (i(),
|
|
2705
|
+
}, 8, ["class"])) : V("", !0),
|
|
2706
|
+
g.showExporterButton ? (i(), w(p(R), {
|
|
2700
2707
|
key: 1,
|
|
2701
2708
|
outlined: "",
|
|
2702
|
-
onClick:
|
|
2709
|
+
onClick: T,
|
|
2703
2710
|
"data-cy": "exporter"
|
|
2704
2711
|
}, {
|
|
2705
|
-
default:
|
|
2706
|
-
|
|
2712
|
+
default: f(() => [
|
|
2713
|
+
b(p(C), {
|
|
2707
2714
|
icon: "typcn:export",
|
|
2708
2715
|
width: "24",
|
|
2709
2716
|
height: "24"
|
|
@@ -2711,34 +2718,34 @@ const Qt = {
|
|
|
2711
2718
|
O(" Export ")
|
|
2712
2719
|
]),
|
|
2713
2720
|
_: 1
|
|
2714
|
-
})) :
|
|
2721
|
+
})) : V("", !0)
|
|
2715
2722
|
])
|
|
2716
2723
|
])
|
|
2717
2724
|
], 2)
|
|
2718
2725
|
]),
|
|
2719
|
-
default:
|
|
2720
|
-
|
|
2726
|
+
default: f(() => [
|
|
2727
|
+
$(g.$slots, "default")
|
|
2721
2728
|
]),
|
|
2722
2729
|
_: 2
|
|
2723
2730
|
}, [
|
|
2724
2731
|
q(g.$slots, (G, Z) => ({
|
|
2725
2732
|
name: Z,
|
|
2726
|
-
fn:
|
|
2727
|
-
|
|
2733
|
+
fn: f((se) => [
|
|
2734
|
+
$(g.$slots, Z, ee(te(se || {})))
|
|
2728
2735
|
])
|
|
2729
2736
|
})),
|
|
2730
2737
|
g.legacyPaginationFooter ? {
|
|
2731
2738
|
name: "paginatorstart",
|
|
2732
|
-
fn:
|
|
2733
|
-
|
|
2734
|
-
class:
|
|
2739
|
+
fn: f(() => [
|
|
2740
|
+
c("span", {
|
|
2741
|
+
class: B(["d-flex", o.loading ? "opacity-50" : ""]),
|
|
2735
2742
|
"data-cy": "legacy-page-size"
|
|
2736
2743
|
}, [
|
|
2737
2744
|
ca,
|
|
2738
|
-
|
|
2745
|
+
b(p(oe), {
|
|
2739
2746
|
options: n.value,
|
|
2740
2747
|
modelValue: d.value,
|
|
2741
|
-
"onUpdate:modelValue":
|
|
2748
|
+
"onUpdate:modelValue": k[1] || (k[1] = (G) => d.value = G),
|
|
2742
2749
|
class: "ms-2",
|
|
2743
2750
|
onClick: z
|
|
2744
2751
|
}, null, 8, ["options", "modelValue"])
|
|
@@ -2748,20 +2755,20 @@ const Qt = {
|
|
|
2748
2755
|
} : void 0,
|
|
2749
2756
|
g.legacyPaginationFooter ? {
|
|
2750
2757
|
name: "paginatorend",
|
|
2751
|
-
fn:
|
|
2752
|
-
|
|
2758
|
+
fn: f(() => [
|
|
2759
|
+
c("span", {
|
|
2753
2760
|
"data-cy": "legacy-total",
|
|
2754
|
-
class:
|
|
2755
|
-
},
|
|
2761
|
+
class: B(o.loading ? "opacity-50" : "")
|
|
2762
|
+
}, h(u.value) + " " + h(p(Q)(u.value, "result")) + " across " + h(m.value), 3)
|
|
2756
2763
|
]),
|
|
2757
2764
|
key: "1"
|
|
2758
2765
|
} : void 0
|
|
2759
2766
|
]), 1040, ["class", "pt", "rows", "total-records", "filter-display"])
|
|
2760
2767
|
]));
|
|
2761
2768
|
}
|
|
2762
|
-
}), ma = { class: "d-flex position-relative" }, pa = { class: "d-flex w-100" }, va = { class: "d-flex w-100" },
|
|
2769
|
+
}), ma = { class: "d-flex position-relative" }, pa = { class: "d-flex w-100" }, va = { class: "d-flex w-100" }, Vl = /* @__PURE__ */ F({
|
|
2763
2770
|
__name: "ForgeFilterHeader",
|
|
2764
|
-
props: /* @__PURE__ */
|
|
2771
|
+
props: /* @__PURE__ */ E({
|
|
2765
2772
|
dataType: {},
|
|
2766
2773
|
dropdownOptions: {},
|
|
2767
2774
|
showClearButton: { type: Boolean, default: !1 },
|
|
@@ -2774,56 +2781,56 @@ const Qt = {
|
|
|
2774
2781
|
}),
|
|
2775
2782
|
emits: ["update:modelValue"],
|
|
2776
2783
|
setup(e) {
|
|
2777
|
-
const t =
|
|
2778
|
-
if (!
|
|
2784
|
+
const t = U(e, "modelValue"), a = (l, n) => {
|
|
2785
|
+
if (!l || Array.isArray(l) && l.length === 0)
|
|
2779
2786
|
return n;
|
|
2780
|
-
const d = (
|
|
2781
|
-
var
|
|
2782
|
-
const
|
|
2783
|
-
(
|
|
2787
|
+
const d = (r) => {
|
|
2788
|
+
var m;
|
|
2789
|
+
const u = (m = e.dropdownOptions) == null ? void 0 : m.find(
|
|
2790
|
+
(v) => e.optionValue ? v[e.optionValue] === r : Object.keys(v).every((s) => r.hasOwnProperty(s) && v[s] === r[s])
|
|
2784
2791
|
);
|
|
2785
|
-
return e.optionLabel ?
|
|
2792
|
+
return e.optionLabel ? u[e.optionLabel] : u;
|
|
2786
2793
|
};
|
|
2787
|
-
return Array.isArray(
|
|
2788
|
-
},
|
|
2794
|
+
return Array.isArray(l) ? l.map(d).join(", ") : d(l);
|
|
2795
|
+
}, o = () => {
|
|
2789
2796
|
e.clearFilter ? e.clearFilter() : t.value = null;
|
|
2790
2797
|
};
|
|
2791
|
-
return (
|
|
2792
|
-
const d =
|
|
2798
|
+
return (l, n) => {
|
|
2799
|
+
const d = ce, r = R;
|
|
2793
2800
|
return i(), y("div", ma, [
|
|
2794
|
-
|
|
2801
|
+
l.dataType === "numeric" ? (i(), w(d, S({
|
|
2795
2802
|
key: 0,
|
|
2796
2803
|
modelValue: t.value,
|
|
2797
|
-
"onUpdate:modelValue": n[0] || (n[0] = (
|
|
2798
|
-
},
|
|
2804
|
+
"onUpdate:modelValue": n[0] || (n[0] = (u) => t.value = u)
|
|
2805
|
+
}, l.$attrs), null, 16, ["modelValue"])) : l.dataType === "date" ? (i(), w(be, S({
|
|
2799
2806
|
key: 1,
|
|
2800
2807
|
modelValue: t.value,
|
|
2801
|
-
"onUpdate:modelValue": n[1] || (n[1] = (
|
|
2802
|
-
},
|
|
2808
|
+
"onUpdate:modelValue": n[1] || (n[1] = (u) => t.value = u)
|
|
2809
|
+
}, l.$attrs, {
|
|
2803
2810
|
"show-icon": !1,
|
|
2804
2811
|
"show-on-focus": !0
|
|
2805
|
-
}), null, 16, ["modelValue"])) :
|
|
2812
|
+
}), null, 16, ["modelValue"])) : l.dataType === "select" ? (i(), w(p(oe), S({
|
|
2806
2813
|
key: 2,
|
|
2807
2814
|
modelValue: t.value,
|
|
2808
|
-
"onUpdate:modelValue": n[2] || (n[2] = (
|
|
2809
|
-
},
|
|
2810
|
-
options:
|
|
2811
|
-
"option-value":
|
|
2812
|
-
"option-label":
|
|
2815
|
+
"onUpdate:modelValue": n[2] || (n[2] = (u) => t.value = u)
|
|
2816
|
+
}, l.$attrs, {
|
|
2817
|
+
options: l.dropdownOptions,
|
|
2818
|
+
"option-value": l.optionValue,
|
|
2819
|
+
"option-label": l.optionLabel
|
|
2813
2820
|
}), {
|
|
2814
|
-
value:
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
class:
|
|
2818
|
-
},
|
|
2819
|
-
|
|
2821
|
+
value: f(({ value: u, placeholder: m }) => [
|
|
2822
|
+
c("div", pa, [
|
|
2823
|
+
c("span", {
|
|
2824
|
+
class: B({ "filter-placeholder": u === null })
|
|
2825
|
+
}, h(a(u, m)), 3),
|
|
2826
|
+
l.showClearButton && t.value !== null ? (i(), w(r, {
|
|
2820
2827
|
key: 0,
|
|
2821
|
-
onClick: Y(
|
|
2828
|
+
onClick: Y(o, ["prevent"]),
|
|
2822
2829
|
size: "small",
|
|
2823
2830
|
class: "bg-transparent border-0 ms-auto p-0 pe-1"
|
|
2824
2831
|
}, {
|
|
2825
|
-
default:
|
|
2826
|
-
|
|
2832
|
+
default: f(() => [
|
|
2833
|
+
b(p(C), {
|
|
2827
2834
|
icon: "bi:x",
|
|
2828
2835
|
width: "1rem",
|
|
2829
2836
|
height: "1rem",
|
|
@@ -2831,34 +2838,34 @@ const Qt = {
|
|
|
2831
2838
|
})
|
|
2832
2839
|
]),
|
|
2833
2840
|
_: 1
|
|
2834
|
-
})) :
|
|
2841
|
+
})) : V("", !0)
|
|
2835
2842
|
])
|
|
2836
2843
|
]),
|
|
2837
2844
|
_: 1
|
|
2838
|
-
}, 16, ["modelValue", "options", "option-value", "option-label"])) :
|
|
2845
|
+
}, 16, ["modelValue", "options", "option-value", "option-label"])) : l.dataType === "multiselect" ? (i(), w(p(De), S({
|
|
2839
2846
|
key: 3,
|
|
2840
2847
|
modelValue: t.value,
|
|
2841
|
-
"onUpdate:modelValue": n[3] || (n[3] = (
|
|
2842
|
-
},
|
|
2843
|
-
options:
|
|
2848
|
+
"onUpdate:modelValue": n[3] || (n[3] = (u) => t.value = u)
|
|
2849
|
+
}, l.$attrs, {
|
|
2850
|
+
options: l.dropdownOptions,
|
|
2844
2851
|
showToggleAll: !1,
|
|
2845
|
-
"option-label":
|
|
2846
|
-
"option-value":
|
|
2852
|
+
"option-label": l.optionLabel,
|
|
2853
|
+
"option-value": l.optionValue,
|
|
2847
2854
|
filter: ""
|
|
2848
2855
|
}), {
|
|
2849
|
-
value:
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
class:
|
|
2853
|
-
},
|
|
2854
|
-
|
|
2856
|
+
value: f(({ value: u, placeholder: m }) => [
|
|
2857
|
+
c("div", va, [
|
|
2858
|
+
c("span", {
|
|
2859
|
+
class: B({ "filter-placeholder": (u == null ? void 0 : u.length) === 0 || u === null })
|
|
2860
|
+
}, h(a(u, m)), 3),
|
|
2861
|
+
l.showClearButton && (u == null ? void 0 : u.length) > 0 ? (i(), w(r, {
|
|
2855
2862
|
key: 0,
|
|
2856
|
-
onClick: Y(
|
|
2863
|
+
onClick: Y(o, ["prevent"]),
|
|
2857
2864
|
size: "small",
|
|
2858
2865
|
class: "bg-transparent border-0 ms-auto p-0 pe-1"
|
|
2859
2866
|
}, {
|
|
2860
|
-
default:
|
|
2861
|
-
|
|
2867
|
+
default: f(() => [
|
|
2868
|
+
b(p(C), {
|
|
2862
2869
|
icon: "bi:x",
|
|
2863
2870
|
width: "1rem",
|
|
2864
2871
|
height: "1rem",
|
|
@@ -2866,23 +2873,23 @@ const Qt = {
|
|
|
2866
2873
|
})
|
|
2867
2874
|
]),
|
|
2868
2875
|
_: 1
|
|
2869
|
-
})) :
|
|
2876
|
+
})) : V("", !0)
|
|
2870
2877
|
])
|
|
2871
2878
|
]),
|
|
2872
2879
|
_: 1
|
|
2873
|
-
}, 16, ["modelValue", "options", "option-label", "option-value"])) : (i(),
|
|
2880
|
+
}, 16, ["modelValue", "options", "option-label", "option-value"])) : (i(), w(p(de), S({
|
|
2874
2881
|
key: 4,
|
|
2875
2882
|
modelValue: t.value,
|
|
2876
|
-
"onUpdate:modelValue": n[4] || (n[4] = (
|
|
2877
|
-
},
|
|
2878
|
-
|
|
2883
|
+
"onUpdate:modelValue": n[4] || (n[4] = (u) => t.value = u)
|
|
2884
|
+
}, l.$attrs), null, 16, ["modelValue"])),
|
|
2885
|
+
l.showClearButton && t.value !== null && l.dataType !== "select" && l.dataType !== "multiselect" && l.dataType !== "date" ? (i(), w(r, {
|
|
2879
2886
|
key: 5,
|
|
2880
|
-
onClick: Y(
|
|
2887
|
+
onClick: Y(o, ["prevent"]),
|
|
2881
2888
|
size: "small",
|
|
2882
2889
|
class: "bg-transparent border-0 ms-auto p-0 pe-1 position-absolute end-0 top-0 bottom-0"
|
|
2883
2890
|
}, {
|
|
2884
|
-
default:
|
|
2885
|
-
|
|
2891
|
+
default: f(() => [
|
|
2892
|
+
b(p(C), {
|
|
2886
2893
|
icon: "bi:x",
|
|
2887
2894
|
width: "1rem",
|
|
2888
2895
|
height: "1rem",
|
|
@@ -2890,19 +2897,19 @@ const Qt = {
|
|
|
2890
2897
|
})
|
|
2891
2898
|
]),
|
|
2892
2899
|
_: 1
|
|
2893
|
-
})) :
|
|
2900
|
+
})) : V("", !0)
|
|
2894
2901
|
]);
|
|
2895
2902
|
};
|
|
2896
2903
|
}
|
|
2897
2904
|
});
|
|
2898
|
-
function
|
|
2899
|
-
const
|
|
2905
|
+
function fe(e, t, a, o) {
|
|
2906
|
+
const l = t.flatMap((n) => n.file);
|
|
2900
2907
|
return t = t.map((n) => ({ ...n, status: n.status == "Duplicate" ? "Not Uploaded" : n.status })), e.forEach((n) => {
|
|
2901
|
-
const d =
|
|
2902
|
-
let
|
|
2903
|
-
d === -1 ? ((!
|
|
2908
|
+
const d = l.findIndex((u) => u.name === n.name);
|
|
2909
|
+
let r = "Not Uploaded";
|
|
2910
|
+
d === -1 ? ((!a.includes(n.type) || !(n.size <= o)) && (r = a.includes(n.type) ? "InvalidFileSize" : "InvalidFileType"), t.unshift({
|
|
2904
2911
|
file: n,
|
|
2905
|
-
status:
|
|
2912
|
+
status: r,
|
|
2906
2913
|
blobFileName: null
|
|
2907
2914
|
})) : t[d].status = "Duplicate";
|
|
2908
2915
|
}), t;
|
|
@@ -2910,25 +2917,25 @@ function ge(e, t, l, a) {
|
|
|
2910
2917
|
async function ya(e, t) {
|
|
2911
2918
|
if (e === "Uploaded" && t !== null)
|
|
2912
2919
|
try {
|
|
2913
|
-
await new
|
|
2914
|
-
} catch (
|
|
2915
|
-
if (
|
|
2920
|
+
await new me(t).delete();
|
|
2921
|
+
} catch (a) {
|
|
2922
|
+
if (a !== "BlobNotFound") {
|
|
2916
2923
|
e = "DeleteFileFailed";
|
|
2917
2924
|
return;
|
|
2918
2925
|
}
|
|
2919
2926
|
}
|
|
2920
2927
|
}
|
|
2921
|
-
function ue(e, t = !0,
|
|
2922
|
-
const
|
|
2923
|
-
if (Math.abs(e) <
|
|
2928
|
+
function ue(e, t = !0, a = 1) {
|
|
2929
|
+
const o = t ? 1e3 : 1024;
|
|
2930
|
+
if (Math.abs(e) < o)
|
|
2924
2931
|
return e + " B";
|
|
2925
|
-
const
|
|
2932
|
+
const l = t ? ["kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"] : ["KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"];
|
|
2926
2933
|
let n = -1;
|
|
2927
|
-
const d = 10 **
|
|
2934
|
+
const d = 10 ** a;
|
|
2928
2935
|
do
|
|
2929
|
-
e /=
|
|
2930
|
-
while (Math.round(Math.abs(e) * d) / d >=
|
|
2931
|
-
return e.toFixed(
|
|
2936
|
+
e /= o, ++n;
|
|
2937
|
+
while (Math.round(Math.abs(e) * d) / d >= o && n < l.length - 1);
|
|
2938
|
+
return e.toFixed(a) + " " + l[n];
|
|
2932
2939
|
}
|
|
2933
2940
|
function ba(e) {
|
|
2934
2941
|
return ["image/gif", "image/png", "image/jpeg", "image/svg"].includes(e);
|
|
@@ -2936,9 +2943,9 @@ function ba(e) {
|
|
|
2936
2943
|
function fa(e) {
|
|
2937
2944
|
return URL.createObjectURL(e);
|
|
2938
2945
|
}
|
|
2939
|
-
const ga = { class: "d-flex justify-content-between" }, ha = ["accept", "disabled", "multiple"], wa = /* @__PURE__ */
|
|
2946
|
+
const ga = { class: "d-flex justify-content-between" }, ha = ["accept", "disabled", "multiple"], wa = /* @__PURE__ */ F({
|
|
2940
2947
|
__name: "UploadButton",
|
|
2941
|
-
props: /* @__PURE__ */
|
|
2948
|
+
props: /* @__PURE__ */ E({
|
|
2942
2949
|
acceptedFileTypes: {},
|
|
2943
2950
|
maxFileInput: {},
|
|
2944
2951
|
showDragDropArea: { type: Boolean }
|
|
@@ -2948,28 +2955,28 @@ const ga = { class: "d-flex justify-content-between" }, ha = ["accept", "disable
|
|
|
2948
2955
|
}),
|
|
2949
2956
|
emits: ["update:modelValue"],
|
|
2950
2957
|
setup(e) {
|
|
2951
|
-
const t =
|
|
2952
|
-
t.value =
|
|
2958
|
+
const t = U(e, "modelValue"), a = x(() => e.maxFileInput <= t.value.length), o = (l) => {
|
|
2959
|
+
t.value = fe(l, t.value, e.acceptedFileTypes, e.maxFileInput);
|
|
2953
2960
|
};
|
|
2954
|
-
return (
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2961
|
+
return (l, n) => (i(), y("div", ga, [
|
|
2962
|
+
$(l.$slots, "message"),
|
|
2963
|
+
c("div", null, [
|
|
2964
|
+
c("input", {
|
|
2958
2965
|
id: "file-input",
|
|
2959
2966
|
type: "file",
|
|
2960
2967
|
class: "d-none",
|
|
2961
|
-
accept:
|
|
2962
|
-
disabled:
|
|
2963
|
-
multiple:
|
|
2964
|
-
onInput: n[0] || (n[0] = (d) =>
|
|
2968
|
+
accept: l.acceptedFileTypes.join(", "),
|
|
2969
|
+
disabled: a.value,
|
|
2970
|
+
multiple: l.maxFileInput > 1,
|
|
2971
|
+
onInput: n[0] || (n[0] = (d) => o([...d.target.files]))
|
|
2965
2972
|
}, null, 40, ha),
|
|
2966
|
-
|
|
2967
|
-
class:
|
|
2973
|
+
c("label", {
|
|
2974
|
+
class: B([{ disabled: a.value }, "btn btn-primary"]),
|
|
2968
2975
|
id: "file-input-button",
|
|
2969
2976
|
for: "file-input"
|
|
2970
2977
|
}, [
|
|
2971
|
-
|
|
2972
|
-
|
|
2978
|
+
$(l.$slots, "button-content", {}, () => [
|
|
2979
|
+
b(p(C), {
|
|
2973
2980
|
icon: "bi:upload",
|
|
2974
2981
|
class: "me-2",
|
|
2975
2982
|
height: "20px",
|
|
@@ -2979,11 +2986,11 @@ const ga = { class: "d-flex justify-content-between" }, ha = ["accept", "disable
|
|
|
2979
2986
|
])
|
|
2980
2987
|
], 2)
|
|
2981
2988
|
]),
|
|
2982
|
-
|
|
2989
|
+
l.showDragDropArea ? (i(), y("div", {
|
|
2983
2990
|
class: "ms-auto",
|
|
2984
|
-
key:
|
|
2991
|
+
key: l.acceptedFileTypes.length,
|
|
2985
2992
|
id: "accepted-file-types"
|
|
2986
|
-
}, "Accepted File Types: " +
|
|
2993
|
+
}, "Accepted File Types: " + h(l.acceptedFileTypes.map((d) => d.split("/").pop()).join(", ")), 1)) : V("", !0)
|
|
2987
2994
|
]));
|
|
2988
2995
|
}
|
|
2989
2996
|
}), xa = {
|
|
@@ -2993,9 +3000,9 @@ const ga = { class: "d-flex justify-content-between" }, ha = ["accept", "disable
|
|
|
2993
3000
|
}, ka = {
|
|
2994
3001
|
key: 1,
|
|
2995
3002
|
class: "d-flex flex-column"
|
|
2996
|
-
}, $a = /* @__PURE__ */
|
|
3003
|
+
}, $a = /* @__PURE__ */ F({
|
|
2997
3004
|
__name: "DragDropArea",
|
|
2998
|
-
props: /* @__PURE__ */
|
|
3005
|
+
props: /* @__PURE__ */ E({
|
|
2999
3006
|
maxFileInput: {},
|
|
3000
3007
|
maxFileSize: {},
|
|
3001
3008
|
acceptedFileTypes: {}
|
|
@@ -3005,18 +3012,18 @@ const ga = { class: "d-flex justify-content-between" }, ha = ["accept", "disable
|
|
|
3005
3012
|
}),
|
|
3006
3013
|
emits: ["update:modelValue"],
|
|
3007
3014
|
setup(e) {
|
|
3008
|
-
const t =
|
|
3009
|
-
|
|
3015
|
+
const t = U(e, "modelValue"), a = I(!1), o = x(() => e.maxFileInput <= t.value.length), l = (n) => {
|
|
3016
|
+
a.value = !1, n.dataTransfer.files.length > e.maxFileInput || o.value ? n.preventDefault() : t.value = fe([...n.dataTransfer.files], t.value, e.acceptedFileTypes, e.maxFileSize);
|
|
3010
3017
|
};
|
|
3011
3018
|
return (n, d) => (i(), y("div", {
|
|
3012
3019
|
id: "drag-drop-area",
|
|
3013
|
-
class:
|
|
3014
|
-
onDragleave: d[0] || (d[0] = Y((
|
|
3015
|
-
onDragover: d[1] || (d[1] = Y((
|
|
3016
|
-
onDrop: Y(
|
|
3020
|
+
class: B(`${a.value ? "border-2 border-primary bg-body-tertiary" : ""} mt-3 file-container border-dashed border-2`),
|
|
3021
|
+
onDragleave: d[0] || (d[0] = Y((r) => a.value = !1, ["prevent"])),
|
|
3022
|
+
onDragover: d[1] || (d[1] = Y((r) => a.value = !0, ["prevent"])),
|
|
3023
|
+
onDrop: Y(l, ["prevent"])
|
|
3017
3024
|
}, [
|
|
3018
3025
|
t.value.length === 0 ? (i(), y("div", xa, [
|
|
3019
|
-
|
|
3026
|
+
b(p(C), {
|
|
3020
3027
|
icon: "bi:upload",
|
|
3021
3028
|
class: "me-2",
|
|
3022
3029
|
height: "20px",
|
|
@@ -3024,11 +3031,11 @@ const ga = { class: "d-flex justify-content-between" }, ha = ["accept", "disable
|
|
|
3024
3031
|
}),
|
|
3025
3032
|
O(" Drag and drop files here ")
|
|
3026
3033
|
])) : (i(), y("div", ka, [
|
|
3027
|
-
|
|
3034
|
+
$(n.$slots, "default")
|
|
3028
3035
|
]))
|
|
3029
3036
|
], 34));
|
|
3030
3037
|
}
|
|
3031
|
-
}), Ba = { class: "d-flex align-items-center me-2" }, Fa = /* @__PURE__ */
|
|
3038
|
+
}), Ba = { class: "d-flex align-items-center me-2" }, Fa = /* @__PURE__ */ F({
|
|
3032
3039
|
__name: "UploadStatus",
|
|
3033
3040
|
props: {
|
|
3034
3041
|
fileSize: {},
|
|
@@ -3037,7 +3044,7 @@ const ga = { class: "d-flex justify-content-between" }, ha = ["accept", "disable
|
|
|
3037
3044
|
uploadStatus: {}
|
|
3038
3045
|
},
|
|
3039
3046
|
setup(e) {
|
|
3040
|
-
const t =
|
|
3047
|
+
const t = x(() => e.uploadStatus === "Failed" || e.uploadStatus === "InvalidFileType" || e.uploadStatus === "InvalidFileSize" ? "danger" : "warning"), a = x(() => {
|
|
3041
3048
|
switch (e.uploadStatus) {
|
|
3042
3049
|
case "InvalidFileType":
|
|
3043
3050
|
return "Upload Failed: File type is not accepted.";
|
|
@@ -3053,32 +3060,32 @@ const ga = { class: "d-flex justify-content-between" }, ha = ["accept", "disable
|
|
|
3053
3060
|
return "Upload Failed: Connection error, please try again.";
|
|
3054
3061
|
}
|
|
3055
3062
|
});
|
|
3056
|
-
return (
|
|
3057
|
-
|
|
3063
|
+
return (o, l) => (i(), y("div", Ba, [
|
|
3064
|
+
o.uploadStatus === "Uploading" ? (i(), w(Gt, {
|
|
3058
3065
|
key: 0,
|
|
3059
3066
|
pixelWidth: 200,
|
|
3060
3067
|
animate: "",
|
|
3061
3068
|
striped: ""
|
|
3062
3069
|
}, {
|
|
3063
|
-
default:
|
|
3064
|
-
O(
|
|
3070
|
+
default: f(() => [
|
|
3071
|
+
O(h((o.bytesUploaded / o.fileSize * 100).toFixed(0)) + "%", 1)
|
|
3065
3072
|
]),
|
|
3066
3073
|
_: 1
|
|
3067
|
-
})) :
|
|
3068
|
-
|
|
3074
|
+
})) : V("", !0),
|
|
3075
|
+
o.uploadStatus !== "Uploading" && o.uploadStatus !== "Not Uploaded" && o.uploadStatus !== "Uploaded" && o.uploadStatus !== "Preparing" ? (i(), w(ne, {
|
|
3069
3076
|
key: 1,
|
|
3070
3077
|
id: "upload-status-alert",
|
|
3071
3078
|
severity: t.value,
|
|
3072
3079
|
class: "mb-0 w-75 ms-auto"
|
|
3073
3080
|
}, {
|
|
3074
|
-
default:
|
|
3075
|
-
O(
|
|
3081
|
+
default: f(() => [
|
|
3082
|
+
O(h(a.value), 1)
|
|
3076
3083
|
]),
|
|
3077
3084
|
_: 1
|
|
3078
|
-
}, 8, ["severity"])) :
|
|
3085
|
+
}, 8, ["severity"])) : V("", !0)
|
|
3079
3086
|
]));
|
|
3080
3087
|
}
|
|
3081
|
-
}), _a = ["data-cy"],
|
|
3088
|
+
}), _a = ["data-cy"], Sa = { class: "ms-3 d-flex flex-column" }, Va = {
|
|
3082
3089
|
key: 1,
|
|
3083
3090
|
id: "file-name"
|
|
3084
3091
|
}, Ca = {
|
|
@@ -3087,9 +3094,9 @@ const ga = { class: "d-flex justify-content-between" }, ha = ["accept", "disable
|
|
|
3087
3094
|
}, Ta = {
|
|
3088
3095
|
class: "text-black-50",
|
|
3089
3096
|
id: "file-size"
|
|
3090
|
-
}, Ma = { class: "ms-auto my-auto d-flex" }, Pa = /* @__PURE__ */
|
|
3097
|
+
}, Ma = { class: "ms-auto my-auto d-flex" }, Pa = /* @__PURE__ */ F({
|
|
3091
3098
|
__name: "FileInfo",
|
|
3092
|
-
props: /* @__PURE__ */
|
|
3099
|
+
props: /* @__PURE__ */ E({
|
|
3093
3100
|
editableFileName: { type: Boolean },
|
|
3094
3101
|
acceptedFileTypes: {},
|
|
3095
3102
|
maxFileSize: {},
|
|
@@ -3104,57 +3111,57 @@ const ga = { class: "d-flex justify-content-between" }, ha = ["accept", "disable
|
|
|
3104
3111
|
uploadStatus: { required: !0 },
|
|
3105
3112
|
uploadStatusModifiers: {}
|
|
3106
3113
|
}),
|
|
3107
|
-
emits: /* @__PURE__ */
|
|
3114
|
+
emits: /* @__PURE__ */ E(["deleted"], ["update:file", "update:blobFileName", "update:uploadStatus"]),
|
|
3108
3115
|
setup(e, { emit: t }) {
|
|
3109
|
-
const
|
|
3110
|
-
|
|
3111
|
-
},
|
|
3112
|
-
if (!
|
|
3113
|
-
|
|
3116
|
+
const a = U(e, "file"), o = U(e, "blobFileName"), l = U(e, "uploadStatus"), n = t, d = I(a.value.name), r = I(""), u = I(0), m = I(), v = x(() => e.acceptedFileTypes.includes(a.value.type)), s = x(() => a.value.size <= e.maxFileSize), T = () => {
|
|
3117
|
+
a.value = new File([a.value], d.value, { type: a.value.type, lastModified: (/* @__PURE__ */ new Date()).valueOf() });
|
|
3118
|
+
}, _ = async () => {
|
|
3119
|
+
if (!v.value || !s.value) {
|
|
3120
|
+
l.value = v.value ? "InvalidFileSize" : "InvalidFileType";
|
|
3114
3121
|
return;
|
|
3115
3122
|
}
|
|
3116
|
-
|
|
3117
|
-
const [P, z] = await e.getFileUrlAction(
|
|
3123
|
+
l.value = "Preparing", m.value = new AbortController();
|
|
3124
|
+
const [P, z] = await e.getFileUrlAction(a.value.name);
|
|
3118
3125
|
if (!P) {
|
|
3119
|
-
|
|
3126
|
+
l.value = "Failed";
|
|
3120
3127
|
return;
|
|
3121
3128
|
}
|
|
3122
3129
|
try {
|
|
3123
|
-
|
|
3124
|
-
const g = new
|
|
3125
|
-
abortSignal:
|
|
3126
|
-
onProgress: (G) =>
|
|
3130
|
+
l.value = "Uploading";
|
|
3131
|
+
const g = new me(P), k = {
|
|
3132
|
+
abortSignal: m.value.signal,
|
|
3133
|
+
onProgress: (G) => u.value = G.loadedBytes,
|
|
3127
3134
|
tags: { temp: "true" }
|
|
3128
3135
|
};
|
|
3129
|
-
await g.uploadData(
|
|
3136
|
+
await g.uploadData(a.value, k), r.value = P, l.value = "Uploaded", o.value = z;
|
|
3130
3137
|
} catch (g) {
|
|
3131
3138
|
if (g.name === "AbortError") {
|
|
3132
|
-
|
|
3139
|
+
l.value = "Aborted";
|
|
3133
3140
|
return;
|
|
3134
3141
|
}
|
|
3135
|
-
|
|
3142
|
+
l.value = "Failed";
|
|
3136
3143
|
}
|
|
3137
3144
|
}, M = async () => {
|
|
3138
|
-
await ya(
|
|
3145
|
+
await ya(l.value, r.value), n("deleted", a.value);
|
|
3139
3146
|
};
|
|
3140
3147
|
return ae(() => {
|
|
3141
|
-
e.autoUploadToBlob &&
|
|
3148
|
+
e.autoUploadToBlob && _();
|
|
3142
3149
|
}), (P, z) => {
|
|
3143
|
-
const g =
|
|
3150
|
+
const g = R;
|
|
3144
3151
|
return i(), y("div", {
|
|
3145
3152
|
class: "py-4 px-3 d-flex",
|
|
3146
|
-
"data-cy": `file-info-${
|
|
3153
|
+
"data-cy": `file-info-${a.value.name}`
|
|
3147
3154
|
}, [
|
|
3148
|
-
|
|
3149
|
-
p(ba)(
|
|
3155
|
+
c("div", null, [
|
|
3156
|
+
p(ba)(a.value.type) ? (i(), w(p(Ue), {
|
|
3150
3157
|
key: 0,
|
|
3151
3158
|
id: "thumbnail-image",
|
|
3152
3159
|
"image-class": "image-file-thumbnail border",
|
|
3153
|
-
src: p(fa)(
|
|
3154
|
-
alt:
|
|
3160
|
+
src: p(fa)(a.value),
|
|
3161
|
+
alt: a.value.name,
|
|
3155
3162
|
width: "75px",
|
|
3156
3163
|
preview: ""
|
|
3157
|
-
}, null, 8, ["src", "alt"])) : (i(),
|
|
3164
|
+
}, null, 8, ["src", "alt"])) : (i(), w(p(C), {
|
|
3158
3165
|
key: 1,
|
|
3159
3166
|
id: "file-earmark",
|
|
3160
3167
|
icon: "bi:file-earmark",
|
|
@@ -3162,58 +3169,58 @@ const ga = { class: "d-flex justify-content-between" }, ha = ["accept", "disable
|
|
|
3162
3169
|
width: "75px"
|
|
3163
3170
|
}))
|
|
3164
3171
|
]),
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
P.editableFileName ? (i(),
|
|
3172
|
+
c("div", Sa, [
|
|
3173
|
+
c("div", null, [
|
|
3174
|
+
P.editableFileName ? (i(), w(Bt, {
|
|
3168
3175
|
key: 0,
|
|
3169
3176
|
id: "edit-file-name",
|
|
3170
3177
|
modelValue: d.value,
|
|
3171
|
-
"onUpdate:modelValue": z[0] || (z[0] = (
|
|
3178
|
+
"onUpdate:modelValue": z[0] || (z[0] = (k) => d.value = k),
|
|
3172
3179
|
rules: P.customFileNameRules,
|
|
3173
|
-
name:
|
|
3174
|
-
"complete-action":
|
|
3175
|
-
}, null, 8, ["modelValue", "rules", "name"])) : (i(), y("span",
|
|
3180
|
+
name: a.value.name,
|
|
3181
|
+
"complete-action": T
|
|
3182
|
+
}, null, 8, ["modelValue", "rules", "name"])) : (i(), y("span", Va, h(a.value.name), 1))
|
|
3176
3183
|
]),
|
|
3177
|
-
|
|
3178
|
-
|
|
3184
|
+
c("span", Ca, "File type: " + h(a.value.type.split("/").pop()), 1),
|
|
3185
|
+
c("span", Ta, "File size: " + h(p(ue)(a.value.size)), 1)
|
|
3179
3186
|
]),
|
|
3180
|
-
|
|
3181
|
-
(i(),
|
|
3182
|
-
key:
|
|
3183
|
-
"file-size":
|
|
3184
|
-
"upload-status":
|
|
3185
|
-
"bytes-uploaded":
|
|
3187
|
+
c("div", Ma, [
|
|
3188
|
+
(i(), w(Fa, {
|
|
3189
|
+
key: l.value,
|
|
3190
|
+
"file-size": a.value.size,
|
|
3191
|
+
"upload-status": l.value,
|
|
3192
|
+
"bytes-uploaded": u.value,
|
|
3186
3193
|
"max-file-size": P.maxFileSize
|
|
3187
3194
|
}, null, 8, ["file-size", "upload-status", "bytes-uploaded", "max-file-size"])),
|
|
3188
|
-
|
|
3195
|
+
l.value === "Not Uploaded" || l.value === "Failed" || l.value === "Duplicate" || l.value === "Aborted" ? (i(), w(g, {
|
|
3189
3196
|
key: 0,
|
|
3190
3197
|
link: "",
|
|
3191
|
-
onClick:
|
|
3198
|
+
onClick: _
|
|
3192
3199
|
}, {
|
|
3193
|
-
default:
|
|
3194
|
-
|
|
3195
|
-
icon:
|
|
3200
|
+
default: f(() => [
|
|
3201
|
+
b(p(C), {
|
|
3202
|
+
icon: l.value === "Not Uploaded" || l.value === "Duplicate" ? "bi:upload" : "bi:arrow-clockwise"
|
|
3196
3203
|
}, null, 8, ["icon"])
|
|
3197
3204
|
]),
|
|
3198
3205
|
_: 1
|
|
3199
|
-
})) :
|
|
3200
|
-
|
|
3206
|
+
})) : V("", !0),
|
|
3207
|
+
l.value === "Uploading" ? (i(), w(g, {
|
|
3201
3208
|
key: 1,
|
|
3202
3209
|
link: "",
|
|
3203
|
-
onClick: z[1] || (z[1] = (
|
|
3210
|
+
onClick: z[1] || (z[1] = (k) => m.value.value.abort())
|
|
3204
3211
|
}, {
|
|
3205
|
-
default:
|
|
3206
|
-
|
|
3212
|
+
default: f(() => [
|
|
3213
|
+
b(p(C), { icon: "bi:x-circle-fill" })
|
|
3207
3214
|
]),
|
|
3208
3215
|
_: 1
|
|
3209
|
-
})) : (i(),
|
|
3216
|
+
})) : (i(), w(g, {
|
|
3210
3217
|
key: 2,
|
|
3211
3218
|
link: "",
|
|
3212
3219
|
onClick: M,
|
|
3213
3220
|
id: "delete-button"
|
|
3214
3221
|
}, {
|
|
3215
|
-
default:
|
|
3216
|
-
|
|
3222
|
+
default: f(() => [
|
|
3223
|
+
b(p(C), { icon: "bi:trash" })
|
|
3217
3224
|
]),
|
|
3218
3225
|
_: 1
|
|
3219
3226
|
}))
|
|
@@ -3221,19 +3228,19 @@ const ga = { class: "d-flex justify-content-between" }, ha = ["accept", "disable
|
|
|
3221
3228
|
], 8, _a);
|
|
3222
3229
|
};
|
|
3223
3230
|
}
|
|
3224
|
-
}), Ia = { class: "d-flex justify-content-end mt-1" }, za = { id: "max-file-size" }, Oa = /* @__PURE__ */
|
|
3231
|
+
}), Ia = { class: "d-flex justify-content-end mt-1" }, za = { id: "max-file-size" }, Oa = /* @__PURE__ */ F({
|
|
3225
3232
|
__name: "MaxFileSize",
|
|
3226
3233
|
props: {
|
|
3227
3234
|
maxFileSize: {}
|
|
3228
3235
|
},
|
|
3229
3236
|
setup(e) {
|
|
3230
|
-
return (t,
|
|
3231
|
-
|
|
3237
|
+
return (t, a) => (i(), y("div", Ia, [
|
|
3238
|
+
c("div", za, "Max file size: " + h(p(ue)(t.maxFileSize)), 1)
|
|
3232
3239
|
]));
|
|
3233
3240
|
}
|
|
3234
|
-
}), Da = { "data-cy": "file-uploader" }, Ua = { key: 0 }, Cl = /* @__PURE__ */
|
|
3241
|
+
}), Da = { "data-cy": "file-uploader" }, Ua = { key: 0 }, Cl = /* @__PURE__ */ F({
|
|
3235
3242
|
__name: "ForgeFileUploader",
|
|
3236
|
-
props: /* @__PURE__ */
|
|
3243
|
+
props: /* @__PURE__ */ E({
|
|
3237
3244
|
acceptedFileTypes: {},
|
|
3238
3245
|
maxFileSize: {},
|
|
3239
3246
|
getFileUrlAction: {},
|
|
@@ -3248,62 +3255,62 @@ const ga = { class: "d-flex justify-content-between" }, ha = ["accept", "disable
|
|
|
3248
3255
|
}),
|
|
3249
3256
|
emits: ["update:modelValue"],
|
|
3250
3257
|
setup(e) {
|
|
3251
|
-
const t =
|
|
3252
|
-
t.value = t.value.filter((n) => n.file !=
|
|
3258
|
+
const t = U(e, "modelValue"), a = e, o = (l) => {
|
|
3259
|
+
t.value = t.value.filter((n) => n.file != l);
|
|
3253
3260
|
};
|
|
3254
|
-
return (
|
|
3255
|
-
|
|
3261
|
+
return (l, n) => (i(), y("div", Da, [
|
|
3262
|
+
b(wa, S(a, {
|
|
3256
3263
|
modelValue: t.value,
|
|
3257
3264
|
"onUpdate:modelValue": n[0] || (n[0] = (d) => t.value = d)
|
|
3258
3265
|
}), null, 16, ["modelValue"]),
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
"max-file-input":
|
|
3262
|
-
"max-file-size":
|
|
3263
|
-
"accepted-file-types":
|
|
3266
|
+
l.showDragDropArea ? (i(), y("div", Ua, [
|
|
3267
|
+
b($a, {
|
|
3268
|
+
"max-file-input": a.maxFileInput,
|
|
3269
|
+
"max-file-size": a.maxFileSize,
|
|
3270
|
+
"accepted-file-types": a.acceptedFileTypes,
|
|
3264
3271
|
modelValue: t.value,
|
|
3265
3272
|
"onUpdate:modelValue": n[1] || (n[1] = (d) => t.value = d)
|
|
3266
3273
|
}, {
|
|
3267
|
-
default:
|
|
3268
|
-
(i(!0), y(N, null, q(t.value, ({ file: d },
|
|
3269
|
-
(i(),
|
|
3274
|
+
default: f(() => [
|
|
3275
|
+
(i(!0), y(N, null, q(t.value, ({ file: d }, r) => (i(), y("span", null, [
|
|
3276
|
+
(i(), w(Pa, S({
|
|
3270
3277
|
key: d.name,
|
|
3271
|
-
class:
|
|
3272
|
-
file: t.value[
|
|
3273
|
-
"onUpdate:file": (
|
|
3274
|
-
"blob-file-name": t.value[
|
|
3275
|
-
"onUpdate:blobFileName": (
|
|
3276
|
-
"upload-status": t.value[
|
|
3277
|
-
"onUpdate:uploadStatus": (
|
|
3278
|
+
class: r === t.value.length - 1 || t.value.length == 1 ? "" : "border-bottom",
|
|
3279
|
+
file: t.value[r].file,
|
|
3280
|
+
"onUpdate:file": (u) => t.value[r].file = u,
|
|
3281
|
+
"blob-file-name": t.value[r].blobFileName,
|
|
3282
|
+
"onUpdate:blobFileName": (u) => t.value[r].blobFileName = u,
|
|
3283
|
+
"upload-status": t.value[r].status,
|
|
3284
|
+
"onUpdate:uploadStatus": (u) => t.value[r].status = u,
|
|
3278
3285
|
ref_for: !0
|
|
3279
|
-
},
|
|
3286
|
+
}, a, { onDeleted: o }), null, 16, ["class", "file", "onUpdate:file", "blob-file-name", "onUpdate:blobFileName", "upload-status", "onUpdate:uploadStatus"]))
|
|
3280
3287
|
]))), 256))
|
|
3281
3288
|
]),
|
|
3282
3289
|
_: 1
|
|
3283
3290
|
}, 8, ["max-file-input", "max-file-size", "accepted-file-types", "modelValue"]),
|
|
3284
|
-
|
|
3285
|
-
"max-file-size":
|
|
3291
|
+
b(Oa, {
|
|
3292
|
+
"max-file-size": a.maxFileSize
|
|
3286
3293
|
}, null, 8, ["max-file-size"])
|
|
3287
|
-
])) :
|
|
3294
|
+
])) : V("", !0)
|
|
3288
3295
|
]));
|
|
3289
3296
|
}
|
|
3290
3297
|
});
|
|
3291
3298
|
export {
|
|
3292
3299
|
cl as Bootstrap_PT,
|
|
3293
3300
|
ml as ForgeActionButton,
|
|
3294
|
-
|
|
3295
|
-
|
|
3301
|
+
ne as ForgeAlert,
|
|
3302
|
+
pe as ForgeCheckbox,
|
|
3296
3303
|
$l as ForgeChips,
|
|
3297
|
-
|
|
3304
|
+
be as ForgeDatepicker,
|
|
3298
3305
|
Cl as ForgeFileUploader,
|
|
3299
|
-
|
|
3306
|
+
Vl as ForgeFilterHeader,
|
|
3300
3307
|
xl as ForgeForm,
|
|
3301
3308
|
kl as ForgeFormField,
|
|
3302
3309
|
Bt as ForgeInlineEditor,
|
|
3303
3310
|
pl as ForgeLink,
|
|
3304
|
-
|
|
3311
|
+
ve as ForgeLoader,
|
|
3305
3312
|
bl as ForgeModal,
|
|
3306
|
-
|
|
3313
|
+
ye as ForgeMultiSelect,
|
|
3307
3314
|
gl as ForgeMultiSelectPreview,
|
|
3308
3315
|
fl as ForgeNavbar,
|
|
3309
3316
|
hl as ForgePageHeader,
|
|
@@ -3311,7 +3318,7 @@ export {
|
|
|
3311
3318
|
wl as ForgeRemainingCharacters,
|
|
3312
3319
|
Bl as ForgeStatWidget,
|
|
3313
3320
|
Fl as ForgeStepper,
|
|
3314
|
-
|
|
3321
|
+
Sl as ForgeTable,
|
|
3315
3322
|
_l as ForgeTile,
|
|
3316
3323
|
yl as convertToMultiSelectOption,
|
|
3317
3324
|
vl as enumToMultiSelectList,
|