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