@3squared/forge-ui-3 0.5.0 → 0.5.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 +308 -308
- package/package.json +5 -5
- package/src/styles/forge-components.scss +18 -0
- package/src/styles/main.scss +2 -19
package/dist/esm/forge-ui-3.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import fe from "primevue/message";
|
|
2
|
-
import { defineComponent as $, openBlock as s, createBlock as w, normalizeProps as Q, guardReactiveProps as ee, withCtx as v, createElementVNode as m, normalizeClass as B, unref as c, createCommentVNode as F, createVNode as y, renderSlot as k, ref as T, createElementBlock as p, Fragment as D, mergeProps as
|
|
3
|
-
import { Icon as
|
|
2
|
+
import { defineComponent as $, openBlock as s, createBlock as w, normalizeProps as Q, guardReactiveProps as ee, withCtx as v, createElementVNode as m, normalizeClass as B, unref as c, createCommentVNode as F, createVNode as y, renderSlot as k, ref as T, createElementBlock as p, Fragment as D, mergeProps as S, onMounted as oe, watch as ge, computed as x, isRef as H, createTextVNode as P, toDisplayString as g, withDirectives as L, vShow as Y, mergeModels as q, useModel as R, createSlots as te, renderList as j, withKeys as J, useAttrs as de, withModifiers as G, normalizeStyle as he } from "vue";
|
|
3
|
+
import { Icon as C } from "@iconify/vue";
|
|
4
4
|
import E from "primevue/button";
|
|
5
5
|
import we from "primevue/toast";
|
|
6
6
|
import xe from "primevue/checkbox";
|
|
@@ -816,7 +816,7 @@ const Ue = {
|
|
|
816
816
|
};
|
|
817
817
|
}
|
|
818
818
|
}
|
|
819
|
-
},
|
|
819
|
+
}, il = {
|
|
820
820
|
...Qe,
|
|
821
821
|
...Ue,
|
|
822
822
|
...ot,
|
|
@@ -869,7 +869,7 @@ const Ue = {
|
|
|
869
869
|
m("div", {
|
|
870
870
|
class: B(t.icon ? "me-2 pe-1" : "")
|
|
871
871
|
}, [
|
|
872
|
-
t.icon ? (s(), w(c(
|
|
872
|
+
t.icon ? (s(), w(c(C), {
|
|
873
873
|
key: 0,
|
|
874
874
|
"data-cy": "message-icon",
|
|
875
875
|
icon: t.icon,
|
|
@@ -879,7 +879,7 @@ const Ue = {
|
|
|
879
879
|
], 2)
|
|
880
880
|
]),
|
|
881
881
|
closeicon: v(() => [
|
|
882
|
-
y(c(
|
|
882
|
+
y(c(C), { icon: "bi:x" })
|
|
883
883
|
]),
|
|
884
884
|
default: v(() => [
|
|
885
885
|
k(n.$slots, "default")
|
|
@@ -888,7 +888,7 @@ const Ue = {
|
|
|
888
888
|
}, 16);
|
|
889
889
|
};
|
|
890
890
|
}
|
|
891
|
-
}),
|
|
891
|
+
}), rl = /* @__PURE__ */ $({
|
|
892
892
|
__name: "ForgeActionButton",
|
|
893
893
|
props: {
|
|
894
894
|
action: {},
|
|
@@ -907,9 +907,9 @@ const Ue = {
|
|
|
907
907
|
t.value = !1;
|
|
908
908
|
};
|
|
909
909
|
return (l, o) => {
|
|
910
|
-
const
|
|
910
|
+
const i = E;
|
|
911
911
|
return s(), p(D, null, [
|
|
912
|
-
y(
|
|
912
|
+
y(i, S({ ...n, ...l.$attrs }, {
|
|
913
913
|
loading: t.value,
|
|
914
914
|
disabled: t.value || n.disabled,
|
|
915
915
|
onClick: a
|
|
@@ -918,10 +918,7 @@ const Ue = {
|
|
|
918
918
|
], 64);
|
|
919
919
|
};
|
|
920
920
|
}
|
|
921
|
-
}), rt = {
|
|
922
|
-
class: "d-flex",
|
|
923
|
-
"data-cy": "checkbox-container"
|
|
924
|
-
}, dt = /* @__PURE__ */ m("div", null, null, -1), ut = ["for"], me = /* @__PURE__ */ $({
|
|
921
|
+
}), rt = /* @__PURE__ */ m("div", null, null, -1), dt = ["for"], me = /* @__PURE__ */ $({
|
|
925
922
|
__name: "ForgeCheckbox",
|
|
926
923
|
props: {
|
|
927
924
|
label: { default: "" },
|
|
@@ -949,32 +946,35 @@ const Ue = {
|
|
|
949
946
|
},
|
|
950
947
|
emits: ["update:modelValue"],
|
|
951
948
|
setup(e, { emit: t }) {
|
|
952
|
-
const n = t, a = e, { checked: l, handleChange: o, setValue:
|
|
949
|
+
const n = t, a = e, { checked: l, handleChange: o, setValue: i, errors: u, errorMessage: b } = W(() => a.name ?? a.label, a.rules, {
|
|
953
950
|
type: "checkbox",
|
|
954
951
|
checkedValue: !0
|
|
955
|
-
}), d = (
|
|
956
|
-
a.disabled || (o(
|
|
952
|
+
}), d = (r) => {
|
|
953
|
+
a.disabled || (o(r), n("update:modelValue", !a.modelValue));
|
|
957
954
|
};
|
|
958
955
|
oe(() => {
|
|
959
|
-
a.value !== void 0 && a.value !== (l == null ? void 0 : l.value) ?
|
|
956
|
+
a.value !== void 0 && a.value !== (l == null ? void 0 : l.value) ? i(a.value) : a.modelValue !== void 0 && a.modelValue !== (l == null ? void 0 : l.value) && i(a.modelValue);
|
|
957
|
+
}), ge(() => a.value, (r) => {
|
|
958
|
+
i(r);
|
|
960
959
|
});
|
|
961
960
|
const f = x(() => u.value.length > 0);
|
|
962
|
-
return
|
|
963
|
-
i !== (l == null ? void 0 : l.value) && r(i);
|
|
964
|
-
}), (i, h) => {
|
|
961
|
+
return (r, h) => {
|
|
965
962
|
const _ = xe;
|
|
966
963
|
return s(), p(D, null, [
|
|
967
|
-
m("div",
|
|
968
|
-
|
|
964
|
+
m("div", S({
|
|
965
|
+
class: "d-flex",
|
|
966
|
+
"data-cy": "checkbox-container"
|
|
967
|
+
}, { ...r.$attrs }), [
|
|
968
|
+
y(_, S({
|
|
969
969
|
id: a.name
|
|
970
|
-
}, { ...
|
|
970
|
+
}, { ...a }, {
|
|
971
971
|
modelValue: c(l),
|
|
972
972
|
"onUpdate:modelValue": h[0] || (h[0] = (V) => H(l) ? l.value = V : null),
|
|
973
973
|
"input-class": { "is-invalid": f.value },
|
|
974
974
|
onChange: d
|
|
975
975
|
}), {
|
|
976
976
|
icon: v(() => [
|
|
977
|
-
|
|
977
|
+
rt
|
|
978
978
|
]),
|
|
979
979
|
_: 1
|
|
980
980
|
}, 16, ["id", "modelValue", "input-class"]),
|
|
@@ -983,11 +983,11 @@ const Ue = {
|
|
|
983
983
|
class: B(`${a.disabled ? "opacity-50" : "cursor-pointer"}`),
|
|
984
984
|
onClick: d
|
|
985
985
|
}, [
|
|
986
|
-
k(
|
|
986
|
+
k(r.$slots, "default", {}, () => [
|
|
987
987
|
P(g(a.label), 1)
|
|
988
988
|
])
|
|
989
|
-
], 10,
|
|
990
|
-
]),
|
|
989
|
+
], 10, dt)
|
|
990
|
+
], 16),
|
|
991
991
|
L(m("small", {
|
|
992
992
|
"data-cy": "error",
|
|
993
993
|
class: "text-invalid"
|
|
@@ -997,7 +997,7 @@ const Ue = {
|
|
|
997
997
|
], 64);
|
|
998
998
|
};
|
|
999
999
|
}
|
|
1000
|
-
}),
|
|
1000
|
+
}), ut = { class: "forge-loader" }, pe = /* @__PURE__ */ $({
|
|
1001
1001
|
__name: "ForgeLoader",
|
|
1002
1002
|
props: {
|
|
1003
1003
|
severity: { default: "primary" }
|
|
@@ -1006,7 +1006,7 @@ const Ue = {
|
|
|
1006
1006
|
const t = e;
|
|
1007
1007
|
return (n, a) => {
|
|
1008
1008
|
const l = ke;
|
|
1009
|
-
return s(), p("div",
|
|
1009
|
+
return s(), p("div", ut, [
|
|
1010
1010
|
y(l, {
|
|
1011
1011
|
"animation-duration": ".75",
|
|
1012
1012
|
class: B(`text-${t.severity === void 0 ? "primary" : t.severity}`)
|
|
@@ -1014,7 +1014,7 @@ const Ue = {
|
|
|
1014
1014
|
]);
|
|
1015
1015
|
};
|
|
1016
1016
|
}
|
|
1017
|
-
}),
|
|
1017
|
+
}), ct = ["href", "target"], dl = /* @__PURE__ */ $({
|
|
1018
1018
|
__name: "ForgeLink",
|
|
1019
1019
|
props: {
|
|
1020
1020
|
url: {},
|
|
@@ -1055,7 +1055,7 @@ const Ue = {
|
|
|
1055
1055
|
target: a.target
|
|
1056
1056
|
}, [
|
|
1057
1057
|
k(a.$slots, "default", {}, () => [
|
|
1058
|
-
a.iconName ? (s(), w(c(
|
|
1058
|
+
a.iconName ? (s(), w(c(C), {
|
|
1059
1059
|
key: 0,
|
|
1060
1060
|
id: "link-icon",
|
|
1061
1061
|
icon: a.iconName,
|
|
@@ -1063,10 +1063,10 @@ const Ue = {
|
|
|
1063
1063
|
}, null, 8, ["icon", "class"])) : F("", !0),
|
|
1064
1064
|
P(" " + g(a.label), 1)
|
|
1065
1065
|
])
|
|
1066
|
-
], 10,
|
|
1066
|
+
], 10, ct));
|
|
1067
1067
|
}
|
|
1068
1068
|
});
|
|
1069
|
-
function
|
|
1069
|
+
function mt(e) {
|
|
1070
1070
|
const t = {
|
|
1071
1071
|
errorMessage: "",
|
|
1072
1072
|
errorDetails: []
|
|
@@ -1077,10 +1077,10 @@ function pt(e) {
|
|
|
1077
1077
|
}
|
|
1078
1078
|
return t.errorMessage === "" && t.errorDetails.length === 0 && (t.errorMessage = e), t;
|
|
1079
1079
|
}
|
|
1080
|
-
const
|
|
1080
|
+
const pt = { key: 0 }, yt = {
|
|
1081
1081
|
class: "d-flex w-100",
|
|
1082
1082
|
"data-cy": "footer"
|
|
1083
|
-
},
|
|
1083
|
+
}, ul = /* @__PURE__ */ $({
|
|
1084
1084
|
__name: "ForgeModal",
|
|
1085
1085
|
props: /* @__PURE__ */ q({
|
|
1086
1086
|
cancelText: { default: "Cancel" },
|
|
@@ -1127,7 +1127,7 @@ const yt = { key: 0 }, vt = {
|
|
|
1127
1127
|
hasError: !1,
|
|
1128
1128
|
header: "",
|
|
1129
1129
|
message: []
|
|
1130
|
-
}),
|
|
1130
|
+
}), i = () => {
|
|
1131
1131
|
n.value = !1;
|
|
1132
1132
|
}, u = () => {
|
|
1133
1133
|
n.value = !0;
|
|
@@ -1137,11 +1137,11 @@ const yt = { key: 0 }, vt = {
|
|
|
1137
1137
|
if (a.onConfirm) {
|
|
1138
1138
|
l.value = !0, o.value.hasError = !1;
|
|
1139
1139
|
try {
|
|
1140
|
-
const
|
|
1141
|
-
(
|
|
1142
|
-
} catch (
|
|
1140
|
+
const r = await a.onConfirm();
|
|
1141
|
+
(r || r == null) && b();
|
|
1142
|
+
} catch (r) {
|
|
1143
1143
|
o.value.hasError = !0;
|
|
1144
|
-
const h =
|
|
1144
|
+
const h = mt(r);
|
|
1145
1145
|
o.value.header = h.errorMessage, o.value.message = h.errorDetails;
|
|
1146
1146
|
}
|
|
1147
1147
|
l.value = !1;
|
|
@@ -1154,15 +1154,15 @@ const yt = { key: 0 }, vt = {
|
|
|
1154
1154
|
}
|
|
1155
1155
|
]
|
|
1156
1156
|
}));
|
|
1157
|
-
return (
|
|
1157
|
+
return (r, h) => {
|
|
1158
1158
|
const _ = E, V = _e;
|
|
1159
|
-
return s(), w(V,
|
|
1159
|
+
return s(), w(V, S(a, {
|
|
1160
1160
|
onMaximize: u,
|
|
1161
|
-
onUnmaximize:
|
|
1161
|
+
onUnmaximize: i,
|
|
1162
1162
|
pt: f.value
|
|
1163
1163
|
}), te({
|
|
1164
1164
|
closeicon: v(() => [
|
|
1165
|
-
y(c(
|
|
1165
|
+
y(c(C), {
|
|
1166
1166
|
"data-cy": "close-icon",
|
|
1167
1167
|
icon: "bi:x-lg",
|
|
1168
1168
|
width: "18",
|
|
@@ -1171,7 +1171,7 @@ const yt = { key: 0 }, vt = {
|
|
|
1171
1171
|
})
|
|
1172
1172
|
]),
|
|
1173
1173
|
maximizeicon: v(() => [
|
|
1174
|
-
y(c(
|
|
1174
|
+
y(c(C), {
|
|
1175
1175
|
"data-cy": "maximisable-icon",
|
|
1176
1176
|
icon: n.value ? "bi:arrows-angle-contract" : "bi:arrows-angle-expand",
|
|
1177
1177
|
width: "16",
|
|
@@ -1180,7 +1180,7 @@ const yt = { key: 0 }, vt = {
|
|
|
1180
1180
|
]),
|
|
1181
1181
|
_: 2
|
|
1182
1182
|
}, [
|
|
1183
|
-
j(
|
|
1183
|
+
j(r.$slots, (M, I) => ({
|
|
1184
1184
|
name: I,
|
|
1185
1185
|
fn: v((z) => [
|
|
1186
1186
|
o.value.hasError ? (s(), w(ae, {
|
|
@@ -1192,31 +1192,31 @@ const yt = { key: 0 }, vt = {
|
|
|
1192
1192
|
m("p", {
|
|
1193
1193
|
class: B(o.value.message.length > 0 ? "my-auto" : "mb-0")
|
|
1194
1194
|
}, g(o.value.header), 3),
|
|
1195
|
-
o.value.message.length > 0 ? (s(), p("ul",
|
|
1195
|
+
o.value.message.length > 0 ? (s(), p("ul", pt, [
|
|
1196
1196
|
(s(!0), p(D, null, j(o.value.message, (N) => (s(), p("li", { key: N }, g(N), 1))), 128))
|
|
1197
1197
|
])) : F("", !0)
|
|
1198
1198
|
]),
|
|
1199
1199
|
_: 1
|
|
1200
1200
|
})) : F("", !0),
|
|
1201
|
-
k(
|
|
1202
|
-
l.value ? k(
|
|
1201
|
+
k(r.$slots, I, Q(ee(z || {}))),
|
|
1202
|
+
l.value ? k(r.$slots, "loader", { key: 1 }, () => [
|
|
1203
1203
|
y(pe, { "data-cy": "loader" })
|
|
1204
1204
|
]) : F("", !0)
|
|
1205
1205
|
])
|
|
1206
1206
|
})),
|
|
1207
|
-
|
|
1207
|
+
r.showFooter ? {
|
|
1208
1208
|
name: "footer",
|
|
1209
1209
|
fn: v(() => [
|
|
1210
|
-
m("div",
|
|
1210
|
+
m("div", yt, [
|
|
1211
1211
|
y(_, {
|
|
1212
|
-
label:
|
|
1212
|
+
label: r.cancelText,
|
|
1213
1213
|
class: B(a.cancelClass),
|
|
1214
1214
|
outlined: "",
|
|
1215
1215
|
onClick: b,
|
|
1216
1216
|
id: "cancel-button"
|
|
1217
1217
|
}, null, 8, ["label", "class"]),
|
|
1218
1218
|
y(_, {
|
|
1219
|
-
label:
|
|
1219
|
+
label: r.submitText,
|
|
1220
1220
|
class: B([a.submitClass, "ms-auto"]),
|
|
1221
1221
|
onClick: d,
|
|
1222
1222
|
id: "submit-button"
|
|
@@ -1228,7 +1228,7 @@ const yt = { key: 0 }, vt = {
|
|
|
1228
1228
|
]), 1040, ["pt"]);
|
|
1229
1229
|
};
|
|
1230
1230
|
}
|
|
1231
|
-
}),
|
|
1231
|
+
}), vt = ["id"], bt = { key: 0 }, ft = { key: 0 }, gt = { class: "d-flex justify-content-between align-items-center position-relative" }, ht = { key: 1 }, wt = { "data-cy": "readonly-value" }, xt = /* @__PURE__ */ $({
|
|
1232
1232
|
__name: "ForgeInlineEditor",
|
|
1233
1233
|
props: /* @__PURE__ */ q({
|
|
1234
1234
|
name: { default: "" },
|
|
@@ -1247,10 +1247,10 @@ const yt = { key: 0 }, vt = {
|
|
|
1247
1247
|
const t = e, n = R(e, "modelValue"), a = T(!1), l = T(), o = () => {
|
|
1248
1248
|
var _;
|
|
1249
1249
|
a.value = !a.value, (_ = l.value) == null || _.focus();
|
|
1250
|
-
},
|
|
1250
|
+
}, i = async () => {
|
|
1251
1251
|
if (h.value)
|
|
1252
1252
|
return !1;
|
|
1253
|
-
if (n.value =
|
|
1253
|
+
if (n.value = r.value, t.completeAction)
|
|
1254
1254
|
try {
|
|
1255
1255
|
await t.completeAction.apply(this, t.params), a.value = !a.value;
|
|
1256
1256
|
} catch {
|
|
@@ -1261,10 +1261,10 @@ const yt = { key: 0 }, vt = {
|
|
|
1261
1261
|
}, u = () => {
|
|
1262
1262
|
a.value = !a.value;
|
|
1263
1263
|
}, b = () => {
|
|
1264
|
-
|
|
1265
|
-
}, { errorMessage: d, errors: f, value:
|
|
1264
|
+
r.value = null;
|
|
1265
|
+
}, { errorMessage: d, errors: f, value: r } = W(() => t.name, t.rules);
|
|
1266
1266
|
oe(() => {
|
|
1267
|
-
|
|
1267
|
+
r.value = n.value;
|
|
1268
1268
|
});
|
|
1269
1269
|
const h = x(() => f.value.length > 0);
|
|
1270
1270
|
return (_, V) => {
|
|
@@ -1272,34 +1272,34 @@ const yt = { key: 0 }, vt = {
|
|
|
1272
1272
|
return s(), p("div", {
|
|
1273
1273
|
id: t.name
|
|
1274
1274
|
}, [
|
|
1275
|
-
_.readonly ? (s(), p("div",
|
|
1275
|
+
_.readonly ? (s(), p("div", ht, [
|
|
1276
1276
|
k(_.$slots, "default", {}, () => [
|
|
1277
|
-
m("span",
|
|
1277
|
+
m("span", wt, g(c(r)), 1)
|
|
1278
1278
|
])
|
|
1279
|
-
])) : (s(), p("div",
|
|
1280
|
-
a.value ? (s(), p("div",
|
|
1281
|
-
L((s(), p("div",
|
|
1279
|
+
])) : (s(), p("div", bt, [
|
|
1280
|
+
a.value ? (s(), p("div", ft, [
|
|
1281
|
+
L((s(), p("div", gt, [
|
|
1282
1282
|
k(_.$slots, "editor", {
|
|
1283
1283
|
class: B({ "is-invalid": h.value }),
|
|
1284
|
-
editFinished:
|
|
1284
|
+
editFinished: i,
|
|
1285
1285
|
cancel: u,
|
|
1286
|
-
val: c(
|
|
1286
|
+
val: c(r)
|
|
1287
1287
|
}, () => [
|
|
1288
1288
|
y(M, {
|
|
1289
1289
|
"data-cy": "input",
|
|
1290
1290
|
ref_key: "input",
|
|
1291
1291
|
ref: l,
|
|
1292
|
-
modelValue: c(
|
|
1293
|
-
"onUpdate:modelValue": V[0] || (V[0] = (z) => H(
|
|
1292
|
+
modelValue: c(r),
|
|
1293
|
+
"onUpdate:modelValue": V[0] || (V[0] = (z) => H(r) ? r.value = z : null),
|
|
1294
1294
|
modelModifiers: { trim: !0 },
|
|
1295
1295
|
class: B({ "is-invalid": h.value }),
|
|
1296
1296
|
onKeydown: [
|
|
1297
|
-
J(
|
|
1297
|
+
J(i, ["enter"]),
|
|
1298
1298
|
J(u, ["esc"])
|
|
1299
1299
|
]
|
|
1300
1300
|
}, null, 8, ["modelValue", "class"])
|
|
1301
1301
|
]),
|
|
1302
|
-
y(c(
|
|
1302
|
+
y(c(C), {
|
|
1303
1303
|
icon: "bi:x-circle",
|
|
1304
1304
|
class: "mx-2 cursor-pointer",
|
|
1305
1305
|
onClick: b,
|
|
@@ -1307,7 +1307,7 @@ const yt = { key: 0 }, vt = {
|
|
|
1307
1307
|
"data-cy": "clear-icon"
|
|
1308
1308
|
})
|
|
1309
1309
|
])), [
|
|
1310
|
-
[c($e),
|
|
1310
|
+
[c($e), i]
|
|
1311
1311
|
])
|
|
1312
1312
|
])) : (s(), p("div", {
|
|
1313
1313
|
key: 1,
|
|
@@ -1319,14 +1319,14 @@ const yt = { key: 0 }, vt = {
|
|
|
1319
1319
|
m("div", {
|
|
1320
1320
|
class: B(["pe-2 cursor-pointer", { "text-invalid": h.value }]),
|
|
1321
1321
|
"data-cy": "value"
|
|
1322
|
-
}, g(c(
|
|
1322
|
+
}, g(c(r) ? c(r) : "Click to edit"), 3)
|
|
1323
1323
|
]),
|
|
1324
1324
|
y(I, {
|
|
1325
1325
|
link: "",
|
|
1326
1326
|
class: "p-0 m-0"
|
|
1327
1327
|
}, {
|
|
1328
1328
|
default: v(() => [
|
|
1329
|
-
y(c(
|
|
1329
|
+
y(c(C), {
|
|
1330
1330
|
icon: "bi:pencil",
|
|
1331
1331
|
class: B(h.value ? "text-invalid" : "text-muted"),
|
|
1332
1332
|
"data-cy": "edit-icon",
|
|
@@ -1343,10 +1343,10 @@ const yt = { key: 0 }, vt = {
|
|
|
1343
1343
|
}, g(c(d)), 513), [
|
|
1344
1344
|
[Y, h.value]
|
|
1345
1345
|
])
|
|
1346
|
-
], 8,
|
|
1346
|
+
], 8, vt);
|
|
1347
1347
|
};
|
|
1348
1348
|
}
|
|
1349
|
-
}),
|
|
1349
|
+
}), kt = ["href"], cl = /* @__PURE__ */ $({
|
|
1350
1350
|
__name: "ForgeNavbar",
|
|
1351
1351
|
props: {
|
|
1352
1352
|
severity: { default: "light" },
|
|
@@ -1392,7 +1392,7 @@ const yt = { key: 0 }, vt = {
|
|
|
1392
1392
|
}));
|
|
1393
1393
|
return (a, l) => {
|
|
1394
1394
|
const o = Fe;
|
|
1395
|
-
return s(), w(o,
|
|
1395
|
+
return s(), w(o, S({ ...t, ...a.$attrs }, {
|
|
1396
1396
|
pt: n.value,
|
|
1397
1397
|
"data-cy": "navbar"
|
|
1398
1398
|
}), te({
|
|
@@ -1405,11 +1405,11 @@ const yt = { key: 0 }, vt = {
|
|
|
1405
1405
|
k(a.$slots, "logo", {}, () => [
|
|
1406
1406
|
P(" Logo ")
|
|
1407
1407
|
])
|
|
1408
|
-
], 8,
|
|
1408
|
+
], 8, kt)
|
|
1409
1409
|
]),
|
|
1410
1410
|
menubuttonicon: v(() => [
|
|
1411
1411
|
k(a.$slots, "menubuttonicon", {}, () => [
|
|
1412
|
-
y(c(
|
|
1412
|
+
y(c(C), {
|
|
1413
1413
|
icon: "bi:list",
|
|
1414
1414
|
class: B(t.severity === "light" ? "text-black" : "text-white"),
|
|
1415
1415
|
height: "24",
|
|
@@ -1419,7 +1419,7 @@ const yt = { key: 0 }, vt = {
|
|
|
1419
1419
|
]),
|
|
1420
1420
|
_: 2
|
|
1421
1421
|
}, [
|
|
1422
|
-
j(a.$slots, (
|
|
1422
|
+
j(a.$slots, (i, u) => ({
|
|
1423
1423
|
name: u,
|
|
1424
1424
|
fn: v((b) => [
|
|
1425
1425
|
k(a.$slots, u, Q(ee(b)))
|
|
@@ -1428,7 +1428,7 @@ const yt = { key: 0 }, vt = {
|
|
|
1428
1428
|
]), 1040, ["pt"]);
|
|
1429
1429
|
};
|
|
1430
1430
|
}
|
|
1431
|
-
}),
|
|
1431
|
+
}), _t = /* @__PURE__ */ m("div", { class: "ps-1" }, "Select all", -1), $t = ["data-cy"], Ft = { class: "ps-1 w-100" }, Bt = { class: "multiselect__tag d-inline-flex" }, St = { class: "my-auto" }, Ct = /* @__PURE__ */ $({
|
|
1432
1432
|
__name: "ForgeMultiSelect",
|
|
1433
1433
|
props: {
|
|
1434
1434
|
severity: { default: "primary" },
|
|
@@ -1447,7 +1447,7 @@ const yt = { key: 0 }, vt = {
|
|
|
1447
1447
|
$isDisabled: O.$isDisabled ?? !1
|
|
1448
1448
|
};
|
|
1449
1449
|
U(Z);
|
|
1450
|
-
}, l = de(), o = t, { errors:
|
|
1450
|
+
}, l = de(), o = t, { errors: i, value: u, errorMessage: b } = W(() => n.name, n.rules), d = T(!1), f = x(() => ({
|
|
1451
1451
|
multiple: !0,
|
|
1452
1452
|
label: "label",
|
|
1453
1453
|
trackBy: "id",
|
|
@@ -1460,7 +1460,7 @@ const yt = { key: 0 }, vt = {
|
|
|
1460
1460
|
searchable: !!(l.searchable === null || l.searchable) && l.modelValue.length === l.options.length,
|
|
1461
1461
|
async: !1,
|
|
1462
1462
|
...l
|
|
1463
|
-
})),
|
|
1463
|
+
})), r = x(() => `forge-multiselect-${n.severity}`), h = x(() => `multiselect__option ${d.value ? " multiselect__option--highlight" : ""} ${_.value ? " multiselect__option--selected" : ""}`), _ = x(() => f.value && !(f.value.multiple || !n.showSelectAll || f.value.async) ? !1 : l.modelValue.length === l.options.length), V = x(() => i.value.length > 0), M = x(() => !!((l.allowEmpty == null || l.allowEmpty) && n.showClearSelection && (f.value.multiple ? l.modelValue.length > 0 : l.modelValue))), I = () => d.value = !0, z = () => d.value = !1, N = () => {
|
|
1464
1464
|
u.value = f.value.multiple ? [] : null, o("update:modelValue", u.value);
|
|
1465
1465
|
}, le = (U) => {
|
|
1466
1466
|
o("update:modelValue", n.selectValue ? U.map((O) => O[n.selectValue]) : U);
|
|
@@ -1470,8 +1470,8 @@ const yt = { key: 0 }, vt = {
|
|
|
1470
1470
|
return (U, O) => {
|
|
1471
1471
|
const Z = me;
|
|
1472
1472
|
return s(), p(D, null, [
|
|
1473
|
-
y(c(Be),
|
|
1474
|
-
class: [
|
|
1473
|
+
y(c(Be), S(f.value, {
|
|
1474
|
+
class: [r.value, V.value ? "is-invalid" : ""],
|
|
1475
1475
|
"data-cy": "multiselect",
|
|
1476
1476
|
"onUpdate:modelValue": [
|
|
1477
1477
|
le,
|
|
@@ -1480,7 +1480,7 @@ const yt = { key: 0 }, vt = {
|
|
|
1480
1480
|
modelValue: c(u)
|
|
1481
1481
|
}), te({
|
|
1482
1482
|
caret: v(({ toggle: A }) => [
|
|
1483
|
-
M.value ? (s(), w(c(
|
|
1483
|
+
M.value ? (s(), w(c(C), {
|
|
1484
1484
|
key: 0,
|
|
1485
1485
|
icon: "bi:x",
|
|
1486
1486
|
class: "my-auto multiselect__clear-icon",
|
|
@@ -1489,19 +1489,19 @@ const yt = { key: 0 }, vt = {
|
|
|
1489
1489
|
height: "18px",
|
|
1490
1490
|
width: "18px"
|
|
1491
1491
|
})) : F("", !0),
|
|
1492
|
-
y(c(
|
|
1492
|
+
y(c(C), {
|
|
1493
1493
|
icon: "bi:chevron-down",
|
|
1494
1494
|
onClick: A,
|
|
1495
1495
|
class: "multiselect__select"
|
|
1496
1496
|
}, null, 8, ["onClick"])
|
|
1497
1497
|
]),
|
|
1498
1498
|
tag: v(({ option: A, remove: K }) => [
|
|
1499
|
-
m("div",
|
|
1500
|
-
m("div",
|
|
1501
|
-
y(c(
|
|
1499
|
+
m("div", Bt, [
|
|
1500
|
+
m("div", St, g(A.label), 1),
|
|
1501
|
+
y(c(C), {
|
|
1502
1502
|
icon: "bi:x",
|
|
1503
1503
|
class: "my-auto multiselect__tag-icon",
|
|
1504
|
-
onMousedown: G((
|
|
1504
|
+
onMousedown: G((za) => a(K, A), ["prevent", "stop"]),
|
|
1505
1505
|
height: "18px",
|
|
1506
1506
|
width: "18px"
|
|
1507
1507
|
}, null, 8, ["onMousedown"])
|
|
@@ -1527,7 +1527,7 @@ const yt = { key: 0 }, vt = {
|
|
|
1527
1527
|
}, [
|
|
1528
1528
|
y(Z, { value: _.value }, {
|
|
1529
1529
|
default: v(() => [
|
|
1530
|
-
|
|
1530
|
+
_t
|
|
1531
1531
|
]),
|
|
1532
1532
|
_: 1
|
|
1533
1533
|
}, 8, ["value"])
|
|
@@ -1547,11 +1547,11 @@ const yt = { key: 0 }, vt = {
|
|
|
1547
1547
|
key: A
|
|
1548
1548
|
}, {
|
|
1549
1549
|
default: v(() => [
|
|
1550
|
-
m("div",
|
|
1550
|
+
m("div", Ft, g(A[f.value.label]), 1)
|
|
1551
1551
|
]),
|
|
1552
1552
|
_: 2
|
|
1553
1553
|
}, 1032, ["value"]))
|
|
1554
|
-
], 8,
|
|
1554
|
+
], 8, $t)
|
|
1555
1555
|
]),
|
|
1556
1556
|
key: "1"
|
|
1557
1557
|
} : void 0
|
|
@@ -1565,17 +1565,17 @@ const yt = { key: 0 }, vt = {
|
|
|
1565
1565
|
], 64);
|
|
1566
1566
|
};
|
|
1567
1567
|
}
|
|
1568
|
-
}),
|
|
1568
|
+
}), Vt = {
|
|
1569
1569
|
key: 0,
|
|
1570
1570
|
class: "pl-1"
|
|
1571
|
-
},
|
|
1571
|
+
}, Tt = { class: "border alternating-item-list" }, Mt = {
|
|
1572
1572
|
key: 0,
|
|
1573
1573
|
class: "p-2 border-top border-bottom",
|
|
1574
1574
|
"data-cy": "title"
|
|
1575
|
-
},
|
|
1575
|
+
}, Pt = { class: "d-inline-block" }, It = {
|
|
1576
1576
|
key: 1,
|
|
1577
1577
|
class: "p-2 item d-flex justify-content-between align-items-center"
|
|
1578
|
-
},
|
|
1578
|
+
}, ml = /* @__PURE__ */ $({
|
|
1579
1579
|
__name: "ForgeMultiSelectPreview",
|
|
1580
1580
|
props: {
|
|
1581
1581
|
title: { default: "Selected Items" },
|
|
@@ -1586,13 +1586,13 @@ const yt = { key: 0 }, vt = {
|
|
|
1586
1586
|
},
|
|
1587
1587
|
emits: ["update:modelValue"],
|
|
1588
1588
|
setup(e, { emit: t }) {
|
|
1589
|
-
const n = e, a = de(), l = t, o = x(() => `${a.modelValue.length} selected`),
|
|
1589
|
+
const n = e, a = de(), l = t, o = x(() => `${a.modelValue.length} selected`), i = x(() => a.modelValue.length), u = (d) => {
|
|
1590
1590
|
l("update:modelValue", d);
|
|
1591
1591
|
}, b = (d) => {
|
|
1592
1592
|
u(a.modelValue.filter((f) => f.id !== d));
|
|
1593
1593
|
};
|
|
1594
1594
|
return (d, f) => {
|
|
1595
|
-
const
|
|
1595
|
+
const r = E;
|
|
1596
1596
|
return s(), p("div", {
|
|
1597
1597
|
class: B(d.orientation === "column" ? "row" : ""),
|
|
1598
1598
|
"data-cy": "multiselect-preview"
|
|
@@ -1601,7 +1601,7 @@ const yt = { key: 0 }, vt = {
|
|
|
1601
1601
|
class: B(d.orientation === "row" ? "col-12 mb-1" : "col"),
|
|
1602
1602
|
"data-cy": "multiselect-container"
|
|
1603
1603
|
}, [
|
|
1604
|
-
y(
|
|
1604
|
+
y(Ct, {
|
|
1605
1605
|
"onUpdate:modelValue": [
|
|
1606
1606
|
f[0] || (f[0] = (h) => u(h)),
|
|
1607
1607
|
f[1] || (f[1] = (h) => d.$attrs.modelValue = h)
|
|
@@ -1614,7 +1614,7 @@ const yt = { key: 0 }, vt = {
|
|
|
1614
1614
|
P(g(""))
|
|
1615
1615
|
]),
|
|
1616
1616
|
selection: v(() => [
|
|
1617
|
-
d.$attrs.modelValue.length > 0 ? (s(), p("span",
|
|
1617
|
+
d.$attrs.modelValue.length > 0 ? (s(), p("span", Vt, g(i.value) + " items selected", 1)) : F("", !0)
|
|
1618
1618
|
]),
|
|
1619
1619
|
default: v(() => [
|
|
1620
1620
|
(s(!0), p(D, null, j(d.$slots, (h, _) => k(d.$slots, _, { slot: _ })), 256))
|
|
@@ -1631,23 +1631,23 @@ const yt = { key: 0 }, vt = {
|
|
|
1631
1631
|
style: he({ height: d.height }),
|
|
1632
1632
|
class: "overflow-auto"
|
|
1633
1633
|
}, [
|
|
1634
|
-
m("div",
|
|
1635
|
-
d.title ? (s(), p("div",
|
|
1634
|
+
m("div", Tt, [
|
|
1635
|
+
d.title ? (s(), p("div", Mt, g(d.title), 1)) : F("", !0),
|
|
1636
1636
|
(s(!0), p(D, null, j(d.$attrs.modelValue, (h) => (s(), p("div", {
|
|
1637
1637
|
key: h.id,
|
|
1638
1638
|
class: "p-2 item d-flex justify-content-between align-items-center"
|
|
1639
1639
|
}, [
|
|
1640
1640
|
k(d.$slots, "list-item", { item: h }, () => [
|
|
1641
|
-
m("span",
|
|
1641
|
+
m("span", Pt, g(h.shortLabel ? h.shortLabel : h.label), 1)
|
|
1642
1642
|
]),
|
|
1643
|
-
d.canRemoveItemFromPreview ? (s(), w(
|
|
1643
|
+
d.canRemoveItemFromPreview ? (s(), w(r, {
|
|
1644
1644
|
key: 0,
|
|
1645
1645
|
link: "",
|
|
1646
1646
|
class: "m-0 p-0 d-flex align-items-center",
|
|
1647
1647
|
onClick: (_) => b(h.id)
|
|
1648
1648
|
}, {
|
|
1649
1649
|
default: v(() => [
|
|
1650
|
-
y(c(
|
|
1650
|
+
y(c(C), {
|
|
1651
1651
|
icon: "bi:x",
|
|
1652
1652
|
class: "close-icon",
|
|
1653
1653
|
"data-cy": `close-icon-${h.id}`
|
|
@@ -1656,34 +1656,34 @@ const yt = { key: 0 }, vt = {
|
|
|
1656
1656
|
_: 2
|
|
1657
1657
|
}, 1032, ["onClick"])) : F("", !0)
|
|
1658
1658
|
]))), 128)),
|
|
1659
|
-
d.$attrs.modelValue.length === 0 ? (s(), p("div",
|
|
1659
|
+
d.$attrs.modelValue.length === 0 ? (s(), p("div", It, "No Items Selected.")) : F("", !0)
|
|
1660
1660
|
])
|
|
1661
1661
|
], 4)
|
|
1662
1662
|
], 2)
|
|
1663
1663
|
], 2);
|
|
1664
1664
|
};
|
|
1665
1665
|
}
|
|
1666
|
-
}),
|
|
1666
|
+
}), zt = { class: "d-flex justify-content-between pb-2" }, Ot = {
|
|
1667
1667
|
"data-cy": "title",
|
|
1668
1668
|
class: "h3"
|
|
1669
|
-
},
|
|
1669
|
+
}, Dt = {
|
|
1670
1670
|
"data-cy": "slot",
|
|
1671
1671
|
class: "d-flex align-items-center"
|
|
1672
|
-
},
|
|
1672
|
+
}, pl = /* @__PURE__ */ $({
|
|
1673
1673
|
__name: "ForgePageHeader",
|
|
1674
1674
|
props: {
|
|
1675
1675
|
title: {}
|
|
1676
1676
|
},
|
|
1677
1677
|
setup(e) {
|
|
1678
1678
|
const t = e;
|
|
1679
|
-
return (n, a) => (s(), p("div",
|
|
1680
|
-
m("h1",
|
|
1681
|
-
m("div",
|
|
1679
|
+
return (n, a) => (s(), p("div", zt, [
|
|
1680
|
+
m("h1", Ot, g(t.title), 1),
|
|
1681
|
+
m("div", Dt, [
|
|
1682
1682
|
k(n.$slots, "default")
|
|
1683
1683
|
])
|
|
1684
1684
|
]));
|
|
1685
1685
|
}
|
|
1686
|
-
}),
|
|
1686
|
+
}), Ut = { "data-cy": "before-slot" }, At = { class: "position-relative" }, Nt = { "data-cy": "after-slot" }, Et = /* @__PURE__ */ $({
|
|
1687
1687
|
__name: "ForgeDatepicker",
|
|
1688
1688
|
props: /* @__PURE__ */ q({
|
|
1689
1689
|
severity: { default: "primary" },
|
|
@@ -1848,26 +1848,26 @@ const yt = { key: 0 }, vt = {
|
|
|
1848
1848
|
]
|
|
1849
1849
|
})
|
|
1850
1850
|
}));
|
|
1851
|
-
return (o,
|
|
1851
|
+
return (o, i) => {
|
|
1852
1852
|
const u = Se;
|
|
1853
1853
|
return s(), p(D, null, [
|
|
1854
|
-
m("span",
|
|
1854
|
+
m("span", Ut, [
|
|
1855
1855
|
k(o.$slots, "before")
|
|
1856
1856
|
]),
|
|
1857
|
-
m("div",
|
|
1858
|
-
y(u,
|
|
1857
|
+
m("div", At, [
|
|
1858
|
+
y(u, S({ ...t, ...o.$attrs }, {
|
|
1859
1859
|
pt: l.value,
|
|
1860
1860
|
modelValue: n.value,
|
|
1861
|
-
"onUpdate:modelValue":
|
|
1861
|
+
"onUpdate:modelValue": i[0] || (i[0] = (b) => n.value = b)
|
|
1862
1862
|
}), null, 16, ["pt", "modelValue"]),
|
|
1863
|
-
L(y(c(
|
|
1863
|
+
L(y(c(C), {
|
|
1864
1864
|
"data-cy": "icon",
|
|
1865
1865
|
icon: "bi:calendar4",
|
|
1866
1866
|
class: "position-absolute end-0 top-50 bottom-50 my-auto me-2 text-muted"
|
|
1867
1867
|
}, null, 512), [
|
|
1868
1868
|
[Y, t.showIcon]
|
|
1869
1869
|
]),
|
|
1870
|
-
L(y(c(
|
|
1870
|
+
L(y(c(C), {
|
|
1871
1871
|
"data-cy": "icon",
|
|
1872
1872
|
icon: "bi:x",
|
|
1873
1873
|
onClick: a,
|
|
@@ -1876,13 +1876,13 @@ const yt = { key: 0 }, vt = {
|
|
|
1876
1876
|
[Y, t.modelValue]
|
|
1877
1877
|
])
|
|
1878
1878
|
]),
|
|
1879
|
-
m("span",
|
|
1879
|
+
m("span", Nt, [
|
|
1880
1880
|
k(o.$slots, "after")
|
|
1881
1881
|
])
|
|
1882
1882
|
], 64);
|
|
1883
1883
|
};
|
|
1884
1884
|
}
|
|
1885
|
-
}),
|
|
1885
|
+
}), yl = /* @__PURE__ */ $({
|
|
1886
1886
|
__name: "ForgeRemainingCharacters",
|
|
1887
1887
|
props: {
|
|
1888
1888
|
maxCount: { default: 300 },
|
|
@@ -1894,7 +1894,7 @@ const yt = { key: 0 }, vt = {
|
|
|
1894
1894
|
class: B(n.value < 0 ? "text-danger" : "")
|
|
1895
1895
|
}, "Remaining characters: " + g(n.value), 3));
|
|
1896
1896
|
}
|
|
1897
|
-
}),
|
|
1897
|
+
}), Rt = /* @__PURE__ */ m("hr", null, null, -1), Lt = { class: "d-flex justify-content-between" }, vl = /* @__PURE__ */ $({
|
|
1898
1898
|
__name: "ForgeForm",
|
|
1899
1899
|
props: {
|
|
1900
1900
|
onSubmit: {},
|
|
@@ -1919,9 +1919,9 @@ const yt = { key: 0 }, vt = {
|
|
|
1919
1919
|
}
|
|
1920
1920
|
n.value = !1;
|
|
1921
1921
|
}
|
|
1922
|
-
return (o,
|
|
1922
|
+
return (o, i) => {
|
|
1923
1923
|
const u = E;
|
|
1924
|
-
return s(), p("form",
|
|
1924
|
+
return s(), p("form", S(o.$attrs, {
|
|
1925
1925
|
novalidate: "",
|
|
1926
1926
|
class: "position-relative shadow-sm border p-4 bg-white",
|
|
1927
1927
|
onSubmit: G(l, ["prevent"])
|
|
@@ -1933,7 +1933,7 @@ const yt = { key: 0 }, vt = {
|
|
|
1933
1933
|
"data-cy": "form-title"
|
|
1934
1934
|
}, g(o.title), 3)
|
|
1935
1935
|
]),
|
|
1936
|
-
|
|
1936
|
+
Rt
|
|
1937
1937
|
], 64)),
|
|
1938
1938
|
a.value.hasError ? (s(), w(ae, {
|
|
1939
1939
|
key: 1,
|
|
@@ -1950,7 +1950,7 @@ const yt = { key: 0 }, vt = {
|
|
|
1950
1950
|
_: 3
|
|
1951
1951
|
})) : F("", !0),
|
|
1952
1952
|
k(o.$slots, "default"),
|
|
1953
|
-
m("div",
|
|
1953
|
+
m("div", Lt, [
|
|
1954
1954
|
k(o.$slots, "cancel", {}, () => [
|
|
1955
1955
|
o.hideCancel ? F("", !0) : (s(), w(u, {
|
|
1956
1956
|
key: 0,
|
|
@@ -1958,7 +1958,7 @@ const yt = { key: 0 }, vt = {
|
|
|
1958
1958
|
type: "reset",
|
|
1959
1959
|
severity: "secondary",
|
|
1960
1960
|
outlined: "",
|
|
1961
|
-
onClick:
|
|
1961
|
+
onClick: i[0] || (i[0] = (b) => o.$emit("cancel"))
|
|
1962
1962
|
}, {
|
|
1963
1963
|
default: v(() => [
|
|
1964
1964
|
P(g(o.cancelText), 1)
|
|
@@ -1987,7 +1987,7 @@ const yt = { key: 0 }, vt = {
|
|
|
1987
1987
|
], 16);
|
|
1988
1988
|
};
|
|
1989
1989
|
}
|
|
1990
|
-
}),
|
|
1990
|
+
}), jt = { class: "d-flex flex-column" }, Ht = ["for"], bl = /* @__PURE__ */ $({
|
|
1991
1991
|
__name: "ForgeFormField",
|
|
1992
1992
|
props: {
|
|
1993
1993
|
name: {},
|
|
@@ -1999,49 +1999,49 @@ const yt = { key: 0 }, vt = {
|
|
|
1999
1999
|
},
|
|
2000
2000
|
setup(e) {
|
|
2001
2001
|
const t = e, { errors: n, value: a, errorMessage: l } = W(() => t.name, t.rules), o = x(() => n.value.length > 0);
|
|
2002
|
-
return (
|
|
2002
|
+
return (i, u) => {
|
|
2003
2003
|
const b = Ve, d = Ce, f = ne;
|
|
2004
|
-
return s(), p("div",
|
|
2004
|
+
return s(), p("div", jt, [
|
|
2005
2005
|
t.type !== "checkbox" ? (s(), p("label", {
|
|
2006
2006
|
key: 0,
|
|
2007
2007
|
for: t.name
|
|
2008
|
-
}, g(t.label), 9,
|
|
2009
|
-
t.type === "checkbox" ? (s(), w(me,
|
|
2008
|
+
}, g(t.label), 9, Ht)) : F("", !0),
|
|
2009
|
+
t.type === "checkbox" ? (s(), w(me, S({
|
|
2010
2010
|
key: 1,
|
|
2011
2011
|
id: t.name,
|
|
2012
|
-
rules:
|
|
2012
|
+
rules: i.rules,
|
|
2013
2013
|
label: t.label
|
|
2014
|
-
},
|
|
2014
|
+
}, i.$attrs), null, 16, ["id", "rules", "label"])) : t.type === "number" ? (s(), w(c(ue), S({
|
|
2015
2015
|
key: 2,
|
|
2016
2016
|
id: t.name,
|
|
2017
2017
|
placeholder: t.placeholder,
|
|
2018
2018
|
modelValue: c(a),
|
|
2019
|
-
"onUpdate:modelValue": u[0] || (u[0] = (
|
|
2019
|
+
"onUpdate:modelValue": u[0] || (u[0] = (r) => H(a) ? a.value = r : null),
|
|
2020
2020
|
"input-class": { "is-invalid": o.value },
|
|
2021
2021
|
class: { "is-invalid": o.value }
|
|
2022
|
-
},
|
|
2022
|
+
}, i.$attrs), null, 16, ["id", "placeholder", "modelValue", "input-class", "class"])) : t.type === "textarea" ? (s(), w(b, S({
|
|
2023
2023
|
key: 3,
|
|
2024
2024
|
id: t.name,
|
|
2025
2025
|
placeholder: t.placeholder,
|
|
2026
2026
|
modelValue: c(a),
|
|
2027
|
-
"onUpdate:modelValue": u[1] || (u[1] = (
|
|
2027
|
+
"onUpdate:modelValue": u[1] || (u[1] = (r) => H(a) ? a.value = r : null),
|
|
2028
2028
|
class: { "is-invalid": o.value }
|
|
2029
|
-
},
|
|
2029
|
+
}, i.$attrs), null, 16, ["id", "placeholder", "modelValue", "class"])) : t.type === "mask" ? (s(), w(d, S({
|
|
2030
2030
|
key: 4,
|
|
2031
2031
|
id: t.name,
|
|
2032
2032
|
placeholder: t.placeholder,
|
|
2033
2033
|
modelValue: c(a),
|
|
2034
|
-
"onUpdate:modelValue": u[2] || (u[2] = (
|
|
2034
|
+
"onUpdate:modelValue": u[2] || (u[2] = (r) => H(a) ? a.value = r : null),
|
|
2035
2035
|
mask: t.mask,
|
|
2036
2036
|
class: { "is-invalid": o.value }
|
|
2037
|
-
},
|
|
2037
|
+
}, i.$attrs), null, 16, ["id", "placeholder", "modelValue", "mask", "class"])) : t.type === "text" ? (s(), w(f, S({
|
|
2038
2038
|
key: 5,
|
|
2039
2039
|
id: t.name,
|
|
2040
2040
|
placeholder: t.placeholder,
|
|
2041
2041
|
modelValue: c(a),
|
|
2042
|
-
"onUpdate:modelValue": u[3] || (u[3] = (
|
|
2042
|
+
"onUpdate:modelValue": u[3] || (u[3] = (r) => H(a) ? a.value = r : null),
|
|
2043
2043
|
class: { "is-invalid": o.value }
|
|
2044
|
-
},
|
|
2044
|
+
}, i.$attrs), null, 16, ["id", "placeholder", "modelValue", "class"])) : F("", !0),
|
|
2045
2045
|
t.type !== "checkbox" ? L((s(), p("small", {
|
|
2046
2046
|
key: 6,
|
|
2047
2047
|
"data-cy": "error",
|
|
@@ -2052,7 +2052,7 @@ const yt = { key: 0 }, vt = {
|
|
|
2052
2052
|
]);
|
|
2053
2053
|
};
|
|
2054
2054
|
}
|
|
2055
|
-
}),
|
|
2055
|
+
}), fl = /* @__PURE__ */ $({
|
|
2056
2056
|
__name: "ForgeChips",
|
|
2057
2057
|
props: {
|
|
2058
2058
|
chipSeverity: { default: "primary" },
|
|
@@ -2082,7 +2082,7 @@ const yt = { key: 0 }, vt = {
|
|
|
2082
2082
|
setup(e) {
|
|
2083
2083
|
const t = e, { errors: n, value: a, errorMessage: l } = W(() => t.name, t.rules);
|
|
2084
2084
|
a.value = t.modelValue;
|
|
2085
|
-
const o = x(() => n.value.length > 0),
|
|
2085
|
+
const o = x(() => n.value.length > 0), i = x(() => ({
|
|
2086
2086
|
inputtoken: "list-unstyled",
|
|
2087
2087
|
input: "border-0",
|
|
2088
2088
|
container: ({ props: u }) => ({
|
|
@@ -2116,13 +2116,13 @@ const yt = { key: 0 }, vt = {
|
|
|
2116
2116
|
return (u, b) => {
|
|
2117
2117
|
const d = Te;
|
|
2118
2118
|
return s(), p(D, null, [
|
|
2119
|
-
y(d,
|
|
2120
|
-
pt:
|
|
2119
|
+
y(d, S({ ...t, ...u.$attrs }, {
|
|
2120
|
+
pt: i.value,
|
|
2121
2121
|
"model-value": c(a),
|
|
2122
2122
|
"onUpdate:modelValue": b[0] || (b[0] = (f) => H(a) ? a.value = f : null)
|
|
2123
2123
|
}), {
|
|
2124
2124
|
removetokenicon: v(({ removeCallback: f }) => [
|
|
2125
|
-
L(y(c(
|
|
2125
|
+
L(y(c(C), {
|
|
2126
2126
|
icon: "bi:x",
|
|
2127
2127
|
class: "cursor-pointer",
|
|
2128
2128
|
onClick: f
|
|
@@ -2141,7 +2141,7 @@ const yt = { key: 0 }, vt = {
|
|
|
2141
2141
|
], 64);
|
|
2142
2142
|
};
|
|
2143
2143
|
}
|
|
2144
|
-
}),
|
|
2144
|
+
}), Yt = /* @__PURE__ */ $({
|
|
2145
2145
|
__name: "ForgeProgressBar",
|
|
2146
2146
|
props: {
|
|
2147
2147
|
severity: { default: "primary" },
|
|
@@ -2183,17 +2183,17 @@ const yt = { key: 0 }, vt = {
|
|
|
2183
2183
|
class: [l.value, n.value, a.value]
|
|
2184
2184
|
}
|
|
2185
2185
|
}));
|
|
2186
|
-
return (
|
|
2186
|
+
return (i, u) => {
|
|
2187
2187
|
const b = Me;
|
|
2188
|
-
return s(), w(b,
|
|
2188
|
+
return s(), w(b, S({ ...i.$attrs, ...t }, { pt: o.value }), {
|
|
2189
2189
|
default: v(() => [
|
|
2190
|
-
k(
|
|
2190
|
+
k(i.$slots, "default")
|
|
2191
2191
|
]),
|
|
2192
2192
|
_: 3
|
|
2193
2193
|
}, 16, ["pt"]);
|
|
2194
2194
|
};
|
|
2195
2195
|
}
|
|
2196
|
-
}),
|
|
2196
|
+
}), qt = { class: "value text-white w-100 text-center" }, gl = /* @__PURE__ */ $({
|
|
2197
2197
|
__name: "ForgeStatWidget",
|
|
2198
2198
|
props: {
|
|
2199
2199
|
size: { default: "md" },
|
|
@@ -2201,18 +2201,18 @@ const yt = { key: 0 }, vt = {
|
|
|
2201
2201
|
},
|
|
2202
2202
|
setup(e) {
|
|
2203
2203
|
const t = e;
|
|
2204
|
-
return (n, a) => (s(), p("div",
|
|
2204
|
+
return (n, a) => (s(), p("div", S(n.$attrs, {
|
|
2205
2205
|
class: `d-flex shadow m-2 align-items-center widget--${t.size} bg-${t.severity}`
|
|
2206
2206
|
}), [
|
|
2207
|
-
m("span",
|
|
2207
|
+
m("span", qt, [
|
|
2208
2208
|
k(n.$slots, "default")
|
|
2209
2209
|
])
|
|
2210
2210
|
], 16));
|
|
2211
2211
|
}
|
|
2212
|
-
}),
|
|
2212
|
+
}), Gt = {
|
|
2213
2213
|
class: "d-flex flex-column align-items-center",
|
|
2214
2214
|
"data-cy": "stepper"
|
|
2215
|
-
},
|
|
2215
|
+
}, Kt = { class: "d-flex align-items-center justify-content-center w-100" }, hl = /* @__PURE__ */ $({
|
|
2216
2216
|
__name: "ForgeStepper",
|
|
2217
2217
|
props: {
|
|
2218
2218
|
currentStep: { default: 0 },
|
|
@@ -2233,7 +2233,7 @@ const yt = { key: 0 }, vt = {
|
|
|
2233
2233
|
l.value--;
|
|
2234
2234
|
while (a.model[l.value].disabled);
|
|
2235
2235
|
n("update:currentStep", l.value);
|
|
2236
|
-
},
|
|
2236
|
+
}, i = () => {
|
|
2237
2237
|
if (l.value < a.model.length - 1)
|
|
2238
2238
|
do
|
|
2239
2239
|
l.value++;
|
|
@@ -2279,10 +2279,10 @@ const yt = { key: 0 }, vt = {
|
|
|
2279
2279
|
})
|
|
2280
2280
|
}));
|
|
2281
2281
|
return (d, f) => {
|
|
2282
|
-
const
|
|
2283
|
-
return s(), p("div",
|
|
2284
|
-
m("div",
|
|
2285
|
-
y(
|
|
2282
|
+
const r = E, h = Ie, _ = Pe;
|
|
2283
|
+
return s(), p("div", Gt, [
|
|
2284
|
+
m("div", Kt, [
|
|
2285
|
+
y(r, {
|
|
2286
2286
|
severity: a.severity,
|
|
2287
2287
|
disabled: u.value,
|
|
2288
2288
|
onClick: o,
|
|
@@ -2290,7 +2290,7 @@ const yt = { key: 0 }, vt = {
|
|
|
2290
2290
|
"data-cy": "back-button"
|
|
2291
2291
|
}, {
|
|
2292
2292
|
default: v(() => [
|
|
2293
|
-
y(c(
|
|
2293
|
+
y(c(C), {
|
|
2294
2294
|
icon: "bi:chevron-left",
|
|
2295
2295
|
class: "mb-1"
|
|
2296
2296
|
})
|
|
@@ -2312,7 +2312,7 @@ const yt = { key: 0 }, vt = {
|
|
|
2312
2312
|
}, [
|
|
2313
2313
|
M === l.value ? k(d.$slots, V.key ?? V.label, {
|
|
2314
2314
|
key: 0,
|
|
2315
|
-
nextStep:
|
|
2315
|
+
nextStep: i,
|
|
2316
2316
|
previousStep: o
|
|
2317
2317
|
}, () => [
|
|
2318
2318
|
y(ae, {
|
|
@@ -2321,10 +2321,10 @@ const yt = { key: 0 }, vt = {
|
|
|
2321
2321
|
}, {
|
|
2322
2322
|
default: v(() => [
|
|
2323
2323
|
P(" Please add Slot Content for the key " + g(V.key ?? V.label) + " ", 1),
|
|
2324
|
-
y(
|
|
2324
|
+
y(r, {
|
|
2325
2325
|
severity: "primary",
|
|
2326
2326
|
label: "Next",
|
|
2327
|
-
onClick:
|
|
2327
|
+
onClick: i,
|
|
2328
2328
|
class: "ms-2"
|
|
2329
2329
|
})
|
|
2330
2330
|
]),
|
|
@@ -2335,7 +2335,7 @@ const yt = { key: 0 }, vt = {
|
|
|
2335
2335
|
]);
|
|
2336
2336
|
};
|
|
2337
2337
|
}
|
|
2338
|
-
}),
|
|
2338
|
+
}), Wt = { class: "p-4 text-wrap w-100" }, Zt = { class: "p-4 text-wrap w-100" }, wl = /* @__PURE__ */ $({
|
|
2339
2339
|
__name: "ForgeTile",
|
|
2340
2340
|
props: {
|
|
2341
2341
|
severity: { default: "primary" },
|
|
@@ -2345,8 +2345,8 @@ const yt = { key: 0 }, vt = {
|
|
|
2345
2345
|
setup(e) {
|
|
2346
2346
|
const t = e, n = x(() => `${t.severity === void 0 ? "tile-primary" : `tile-${t.severity}`} ${t.barPosition === "none" ? "border-0" : `tile-bar-${t.barPosition}`}`), a = x(() => `${t.severity === void 0 ? "tile-primary border-primary" : `tile-${t.severity} border-${t.severity}`} ${t.barPosition === "none" ? "" : `tile-bar-${t.barPosition}`}`);
|
|
2347
2347
|
return (l, o) => {
|
|
2348
|
-
const
|
|
2349
|
-
return t.clickable ? (s(), w(
|
|
2348
|
+
const i = E;
|
|
2349
|
+
return t.clickable ? (s(), w(i, {
|
|
2350
2350
|
key: 0,
|
|
2351
2351
|
class: B(["d-flex w-100 p-0 text-body", n.value]),
|
|
2352
2352
|
severity: t.severity,
|
|
@@ -2354,7 +2354,7 @@ const yt = { key: 0 }, vt = {
|
|
|
2354
2354
|
"data-cy": "button-tile"
|
|
2355
2355
|
}, {
|
|
2356
2356
|
default: v(() => [
|
|
2357
|
-
m("div",
|
|
2357
|
+
m("div", Wt, [
|
|
2358
2358
|
k(l.$slots, "default", {}, () => [
|
|
2359
2359
|
P("Tile Content")
|
|
2360
2360
|
])
|
|
@@ -2366,7 +2366,7 @@ const yt = { key: 0 }, vt = {
|
|
|
2366
2366
|
class: B(["d-flex w-100", a.value]),
|
|
2367
2367
|
"data-cy": "tile"
|
|
2368
2368
|
}, [
|
|
2369
|
-
m("div",
|
|
2369
|
+
m("div", Zt, [
|
|
2370
2370
|
k(l.$slots, "default", {}, () => [
|
|
2371
2371
|
P("Tile Content")
|
|
2372
2372
|
])
|
|
@@ -2378,13 +2378,13 @@ const yt = { key: 0 }, vt = {
|
|
|
2378
2378
|
function X(e, t) {
|
|
2379
2379
|
return e > 1 ? `${t}s` : t;
|
|
2380
2380
|
}
|
|
2381
|
-
const
|
|
2381
|
+
const Jt = {
|
|
2382
2382
|
class: "d-flex justify-content-start align-items-baseline",
|
|
2383
2383
|
"data-cy": "pagination-header"
|
|
2384
|
-
},
|
|
2384
|
+
}, Xt = { class: "ms-2" }, Qt = { key: 0 }, ea = /* @__PURE__ */ m("span", { class: "mx-2" }, "|", -1), ta = {
|
|
2385
2385
|
class: "w-auto",
|
|
2386
2386
|
"data-cy": "total"
|
|
2387
|
-
},
|
|
2387
|
+
}, aa = /* @__PURE__ */ $({
|
|
2388
2388
|
__name: "ForgePaginationHeader",
|
|
2389
2389
|
props: {
|
|
2390
2390
|
total: {},
|
|
@@ -2393,31 +2393,31 @@ const Xt = {
|
|
|
2393
2393
|
},
|
|
2394
2394
|
emits: ["update:perPage"],
|
|
2395
2395
|
setup(e, { emit: t }) {
|
|
2396
|
-
const n = t, a = e, l = (
|
|
2397
|
-
n("update:perPage",
|
|
2396
|
+
const n = t, a = e, l = (i) => {
|
|
2397
|
+
n("update:perPage", i.value);
|
|
2398
2398
|
}, o = x(() => {
|
|
2399
|
-
const
|
|
2400
|
-
return `${
|
|
2399
|
+
const i = Math.ceil(a.total / a.perPage);
|
|
2400
|
+
return `${i} ${X(i, "page")}`;
|
|
2401
2401
|
});
|
|
2402
|
-
return (
|
|
2402
|
+
return (i, u) => (s(), p("div", Jt, [
|
|
2403
2403
|
P(" Number of results per page "),
|
|
2404
|
-
m("div",
|
|
2404
|
+
m("div", Xt, [
|
|
2405
2405
|
y(c(se), {
|
|
2406
2406
|
options: a.pageSizes,
|
|
2407
2407
|
"model-value": a.perPage,
|
|
2408
2408
|
onChange: u[0] || (u[0] = (b) => l(b))
|
|
2409
2409
|
}, null, 8, ["options", "model-value"])
|
|
2410
2410
|
]),
|
|
2411
|
-
a.total ? (s(), p("div",
|
|
2412
|
-
|
|
2413
|
-
m("span",
|
|
2411
|
+
a.total ? (s(), p("div", Qt, [
|
|
2412
|
+
ea,
|
|
2413
|
+
m("span", ta, g(a.total) + " " + g(c(X)(a.total, "result")) + " across " + g(o.value), 1)
|
|
2414
2414
|
])) : F("", !0)
|
|
2415
2415
|
]));
|
|
2416
2416
|
}
|
|
2417
|
-
}),
|
|
2417
|
+
}), la = { "data-cy": "above-table-slot" }, oa = { class: "d-flex" }, na = { class: "d-flex align-items-end mb-2" }, sa = { key: 0 }, ia = { class: "ms-auto" }, ra = {
|
|
2418
2418
|
class: "d-flex",
|
|
2419
2419
|
"data-cy": "legacy-page-size"
|
|
2420
|
-
},
|
|
2420
|
+
}, da = /* @__PURE__ */ m("span", { class: "me-2 my-auto text-nowrap" }, "Page Size:", -1), ua = { "data-cy": "legacy-total" }, xl = /* @__PURE__ */ $({
|
|
2421
2421
|
__name: "ForgeTable",
|
|
2422
2422
|
props: {
|
|
2423
2423
|
value: {},
|
|
@@ -2496,53 +2496,53 @@ const Xt = {
|
|
|
2496
2496
|
},
|
|
2497
2497
|
emits: ["update:filters"],
|
|
2498
2498
|
setup(e, { emit: t }) {
|
|
2499
|
-
const n = t, a = e, l = T([10, 20, 50, 100]), o = T(20),
|
|
2500
|
-
for (const
|
|
2501
|
-
a.filters[
|
|
2499
|
+
const n = t, a = e, l = T([10, 20, 50, 100]), o = T(20), i = T(), u = () => {
|
|
2500
|
+
for (const r in a.filters)
|
|
2501
|
+
a.filters[r].value = null;
|
|
2502
2502
|
b(a.filters);
|
|
2503
|
-
}, b = (
|
|
2504
|
-
n("update:filters",
|
|
2503
|
+
}, b = (r) => {
|
|
2504
|
+
n("update:filters", r);
|
|
2505
2505
|
}, d = x(() => {
|
|
2506
|
-
const
|
|
2507
|
-
return `${
|
|
2506
|
+
const r = Math.ceil((a.total ?? a.value.length) / o.value);
|
|
2507
|
+
return `${r} ${X(r, "page")}`;
|
|
2508
2508
|
}), f = () => {
|
|
2509
|
-
|
|
2509
|
+
i.value.exportCSV();
|
|
2510
2510
|
};
|
|
2511
|
-
return (
|
|
2512
|
-
m("span",
|
|
2513
|
-
k(
|
|
2511
|
+
return (r, h) => (s(), p(D, null, [
|
|
2512
|
+
m("span", la, [
|
|
2513
|
+
k(r.$slots, "above-table")
|
|
2514
2514
|
]),
|
|
2515
|
-
y(c(ze),
|
|
2515
|
+
y(c(ze), S({ class: "w-100" }, { ...a, ...r.$attrs }, {
|
|
2516
2516
|
rows: o.value,
|
|
2517
|
-
"total-records":
|
|
2517
|
+
"total-records": r.total,
|
|
2518
2518
|
"filter-display": a.filters ? "row" : void 0,
|
|
2519
2519
|
ref_key: "forgeTable",
|
|
2520
|
-
ref:
|
|
2520
|
+
ref: i,
|
|
2521
2521
|
"onUpdate:filters": b,
|
|
2522
2522
|
"data-cy": "table"
|
|
2523
2523
|
}), te({
|
|
2524
2524
|
header: v(() => [
|
|
2525
|
-
m("div",
|
|
2526
|
-
m("div",
|
|
2527
|
-
|
|
2528
|
-
y(
|
|
2529
|
-
total:
|
|
2525
|
+
m("div", oa, [
|
|
2526
|
+
m("div", na, [
|
|
2527
|
+
r.paginator && !r.legacyPaginationFooter ? (s(), p("span", sa, [
|
|
2528
|
+
y(aa, {
|
|
2529
|
+
total: r.total ?? r.value.length,
|
|
2530
2530
|
"page-sizes": l.value,
|
|
2531
2531
|
"per-page": o.value,
|
|
2532
2532
|
"onUpdate:perPage": h[0] || (h[0] = (_) => o.value = _)
|
|
2533
2533
|
}, null, 8, ["total", "page-sizes", "per-page"])
|
|
2534
2534
|
])) : F("", !0)
|
|
2535
2535
|
]),
|
|
2536
|
-
m("div",
|
|
2537
|
-
|
|
2536
|
+
m("div", ia, [
|
|
2537
|
+
r.showClearButton ? (s(), w(c(E), {
|
|
2538
2538
|
key: 0,
|
|
2539
2539
|
outlined: "",
|
|
2540
|
-
class: B(
|
|
2540
|
+
class: B(r.showExporterButton ? "me-2" : ""),
|
|
2541
2541
|
onClick: u,
|
|
2542
2542
|
"data-cy": "clear-all"
|
|
2543
2543
|
}, {
|
|
2544
2544
|
default: v(() => [
|
|
2545
|
-
y(c(
|
|
2545
|
+
y(c(C), {
|
|
2546
2546
|
icon: "bi:funnel-fill",
|
|
2547
2547
|
width: "24",
|
|
2548
2548
|
height: "24"
|
|
@@ -2551,14 +2551,14 @@ const Xt = {
|
|
|
2551
2551
|
]),
|
|
2552
2552
|
_: 1
|
|
2553
2553
|
}, 8, ["class"])) : F("", !0),
|
|
2554
|
-
|
|
2554
|
+
r.showExporterButton ? (s(), w(c(E), {
|
|
2555
2555
|
key: 1,
|
|
2556
2556
|
outlined: "",
|
|
2557
2557
|
onClick: f,
|
|
2558
2558
|
"data-cy": "exporter"
|
|
2559
2559
|
}, {
|
|
2560
2560
|
default: v(() => [
|
|
2561
|
-
y(c(
|
|
2561
|
+
y(c(C), {
|
|
2562
2562
|
icon: "typcn:export",
|
|
2563
2563
|
width: "24",
|
|
2564
2564
|
height: "24"
|
|
@@ -2571,21 +2571,21 @@ const Xt = {
|
|
|
2571
2571
|
])
|
|
2572
2572
|
]),
|
|
2573
2573
|
default: v(() => [
|
|
2574
|
-
k(
|
|
2574
|
+
k(r.$slots, "default")
|
|
2575
2575
|
]),
|
|
2576
2576
|
_: 2
|
|
2577
2577
|
}, [
|
|
2578
|
-
j(
|
|
2578
|
+
j(r.$slots, (_, V) => ({
|
|
2579
2579
|
name: V,
|
|
2580
2580
|
fn: v((M) => [
|
|
2581
|
-
k(
|
|
2581
|
+
k(r.$slots, V, Q(ee(M || {})))
|
|
2582
2582
|
])
|
|
2583
2583
|
})),
|
|
2584
|
-
|
|
2584
|
+
r.legacyPaginationFooter ? {
|
|
2585
2585
|
name: "paginatorstart",
|
|
2586
2586
|
fn: v(() => [
|
|
2587
|
-
m("span",
|
|
2588
|
-
|
|
2587
|
+
m("span", ra, [
|
|
2588
|
+
da,
|
|
2589
2589
|
y(c(se), {
|
|
2590
2590
|
options: l.value,
|
|
2591
2591
|
modelValue: o.value,
|
|
@@ -2596,17 +2596,17 @@ const Xt = {
|
|
|
2596
2596
|
]),
|
|
2597
2597
|
key: "0"
|
|
2598
2598
|
} : void 0,
|
|
2599
|
-
|
|
2599
|
+
r.legacyPaginationFooter ? {
|
|
2600
2600
|
name: "paginatorend",
|
|
2601
2601
|
fn: v(() => [
|
|
2602
|
-
m("span",
|
|
2602
|
+
m("span", ua, g(r.total ?? r.value.length) + " " + g(c(X)(r.total ?? r.value.length, "result")) + " across " + g(d.value), 1)
|
|
2603
2603
|
]),
|
|
2604
2604
|
key: "1"
|
|
2605
2605
|
} : void 0
|
|
2606
2606
|
]), 1040, ["rows", "total-records", "filter-display"])
|
|
2607
2607
|
], 64));
|
|
2608
2608
|
}
|
|
2609
|
-
}),
|
|
2609
|
+
}), kl = /* @__PURE__ */ $({
|
|
2610
2610
|
__name: "ForgeFilterHeader",
|
|
2611
2611
|
props: {
|
|
2612
2612
|
dataType: {},
|
|
@@ -2615,36 +2615,36 @@ const Xt = {
|
|
|
2615
2615
|
setup(e) {
|
|
2616
2616
|
return (t, n) => {
|
|
2617
2617
|
const a = ue;
|
|
2618
|
-
return t.dataType === "numeric" ? (s(), w(a,
|
|
2618
|
+
return t.dataType === "numeric" ? (s(), w(a, S({ key: 0 }, t.$attrs, { class: "w-100" }), null, 16)) : t.dataType === "date" ? (s(), w(Et, S({ key: 1 }, t.$attrs, {
|
|
2619
2619
|
"show-icon": !1,
|
|
2620
2620
|
"show-on-focus": !0,
|
|
2621
2621
|
class: "w-100"
|
|
2622
|
-
}), null, 16)) : t.dataType === "select" ? (s(), w(c(se),
|
|
2622
|
+
}), null, 16)) : t.dataType === "select" ? (s(), w(c(se), S({ key: 2 }, t.$attrs, {
|
|
2623
2623
|
options: t.dropdownOptions,
|
|
2624
2624
|
class: "dropdown-input w-100"
|
|
2625
|
-
}), null, 16, ["options"])) : t.dataType === "multiselect" ? (s(), w(c(Oe),
|
|
2625
|
+
}), null, 16, ["options"])) : t.dataType === "multiselect" ? (s(), w(c(Oe), S({ key: 3 }, t.$attrs, {
|
|
2626
2626
|
options: t.dropdownOptions,
|
|
2627
2627
|
showToggleAll: !1,
|
|
2628
2628
|
placeholder: " ",
|
|
2629
2629
|
filter: "",
|
|
2630
2630
|
class: "w-100 dropdown-input"
|
|
2631
|
-
}), null, 16, ["options"])) : (s(), w(c(ne),
|
|
2631
|
+
}), null, 16, ["options"])) : (s(), w(c(ne), S({ key: 4 }, t.$attrs, { class: "w-100" }), null, 16));
|
|
2632
2632
|
};
|
|
2633
2633
|
}
|
|
2634
2634
|
});
|
|
2635
2635
|
function ye(e, t, n, a) {
|
|
2636
2636
|
const l = t.flatMap((o) => o.file);
|
|
2637
2637
|
return t = t.map((o) => ({ ...o, status: o.status == "Duplicate" ? "Not Uploaded" : o.status })), e.forEach((o) => {
|
|
2638
|
-
const
|
|
2638
|
+
const i = l.findIndex((b) => b.name === o.name);
|
|
2639
2639
|
let u = "Not Uploaded";
|
|
2640
|
-
|
|
2640
|
+
i === -1 ? ((!n.includes(o.type) || !(o.size <= a)) && (u = n.includes(o.type) ? "InvalidFileSize" : "InvalidFileType"), t.unshift({
|
|
2641
2641
|
file: o,
|
|
2642
2642
|
status: u,
|
|
2643
2643
|
blobFileName: null
|
|
2644
|
-
})) : t[
|
|
2644
|
+
})) : t[i].status = "Duplicate";
|
|
2645
2645
|
}), t;
|
|
2646
2646
|
}
|
|
2647
|
-
async function
|
|
2647
|
+
async function ca(e, t) {
|
|
2648
2648
|
if (e === "Uploaded" && t !== null)
|
|
2649
2649
|
try {
|
|
2650
2650
|
await new ce(t).delete();
|
|
@@ -2661,19 +2661,19 @@ function ie(e, t = !0, n = 1) {
|
|
|
2661
2661
|
return e + " B";
|
|
2662
2662
|
const l = t ? ["kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"] : ["KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"];
|
|
2663
2663
|
let o = -1;
|
|
2664
|
-
const
|
|
2664
|
+
const i = 10 ** n;
|
|
2665
2665
|
do
|
|
2666
2666
|
e /= a, ++o;
|
|
2667
|
-
while (Math.round(Math.abs(e) *
|
|
2667
|
+
while (Math.round(Math.abs(e) * i) / i >= a && o < l.length - 1);
|
|
2668
2668
|
return e.toFixed(n) + " " + l[o];
|
|
2669
2669
|
}
|
|
2670
|
-
function
|
|
2670
|
+
function ma(e) {
|
|
2671
2671
|
return ["image/gif", "image/png", "image/jpeg", "image/svg"].includes(e);
|
|
2672
2672
|
}
|
|
2673
|
-
function
|
|
2673
|
+
function pa(e) {
|
|
2674
2674
|
return URL.createObjectURL(e);
|
|
2675
2675
|
}
|
|
2676
|
-
const
|
|
2676
|
+
const ya = { class: "d-flex justify-content-between" }, va = ["accept", "disabled", "multiple"], ba = /* @__PURE__ */ $({
|
|
2677
2677
|
__name: "UploadButton",
|
|
2678
2678
|
props: /* @__PURE__ */ q({
|
|
2679
2679
|
acceptedFileTypes: {},
|
|
@@ -2688,7 +2688,7 @@ const va = { class: "d-flex justify-content-between" }, ba = ["accept", "disable
|
|
|
2688
2688
|
const t = R(e, "modelValue"), n = x(() => e.maxFileInput <= t.value.length), a = (l) => {
|
|
2689
2689
|
t.value = ye(l, t.value, e.acceptedFileTypes, e.maxFileInput);
|
|
2690
2690
|
};
|
|
2691
|
-
return (l, o) => (s(), p("div",
|
|
2691
|
+
return (l, o) => (s(), p("div", ya, [
|
|
2692
2692
|
k(l.$slots, "message"),
|
|
2693
2693
|
m("div", null, [
|
|
2694
2694
|
m("input", {
|
|
@@ -2698,15 +2698,15 @@ const va = { class: "d-flex justify-content-between" }, ba = ["accept", "disable
|
|
|
2698
2698
|
accept: l.acceptedFileTypes.join(", "),
|
|
2699
2699
|
disabled: n.value,
|
|
2700
2700
|
multiple: l.maxFileInput > 1,
|
|
2701
|
-
onInput: o[0] || (o[0] = (
|
|
2702
|
-
}, null, 40,
|
|
2701
|
+
onInput: o[0] || (o[0] = (i) => a([...i.target.files]))
|
|
2702
|
+
}, null, 40, va),
|
|
2703
2703
|
m("label", {
|
|
2704
2704
|
class: B([{ disabled: n.value }, "btn btn-primary"]),
|
|
2705
2705
|
id: "file-input-button",
|
|
2706
2706
|
for: "file-input"
|
|
2707
2707
|
}, [
|
|
2708
2708
|
k(l.$slots, "button-content", {}, () => [
|
|
2709
|
-
y(c(
|
|
2709
|
+
y(c(C), {
|
|
2710
2710
|
icon: "bi:upload",
|
|
2711
2711
|
class: "me-2",
|
|
2712
2712
|
height: "20px",
|
|
@@ -2720,17 +2720,17 @@ const va = { class: "d-flex justify-content-between" }, ba = ["accept", "disable
|
|
|
2720
2720
|
class: "ms-auto",
|
|
2721
2721
|
key: l.acceptedFileTypes.length,
|
|
2722
2722
|
id: "accepted-file-types"
|
|
2723
|
-
}, "Accepted File Types: " + g(l.acceptedFileTypes.map((
|
|
2723
|
+
}, "Accepted File Types: " + g(l.acceptedFileTypes.map((i) => i.split("/").pop()).join(", ")), 1)) : F("", !0)
|
|
2724
2724
|
]));
|
|
2725
2725
|
}
|
|
2726
|
-
}),
|
|
2726
|
+
}), fa = {
|
|
2727
2727
|
key: 0,
|
|
2728
2728
|
class: "py-4 px-3",
|
|
2729
2729
|
id: "placeholder-message"
|
|
2730
|
-
},
|
|
2730
|
+
}, ga = {
|
|
2731
2731
|
key: 1,
|
|
2732
2732
|
class: "d-flex flex-column"
|
|
2733
|
-
},
|
|
2733
|
+
}, ha = /* @__PURE__ */ $({
|
|
2734
2734
|
__name: "DragDropArea",
|
|
2735
2735
|
props: /* @__PURE__ */ q({
|
|
2736
2736
|
maxFileInput: {},
|
|
@@ -2745,27 +2745,27 @@ const va = { class: "d-flex justify-content-between" }, ba = ["accept", "disable
|
|
|
2745
2745
|
const t = R(e, "modelValue"), n = T(!1), a = x(() => e.maxFileInput <= t.value.length), l = (o) => {
|
|
2746
2746
|
n.value = !1, o.dataTransfer.files.length > e.maxFileInput || a.value ? o.preventDefault() : t.value = ye([...o.dataTransfer.files], t.value, e.acceptedFileTypes, e.maxFileSize);
|
|
2747
2747
|
};
|
|
2748
|
-
return (o,
|
|
2748
|
+
return (o, i) => (s(), p("div", {
|
|
2749
2749
|
id: "drag-drop-area",
|
|
2750
2750
|
class: B(`${n.value ? "border-2 border-primary bg-body-tertiary" : ""} mt-3 file-container border-dashed border-2`),
|
|
2751
|
-
onDragleave:
|
|
2752
|
-
onDragover:
|
|
2751
|
+
onDragleave: i[0] || (i[0] = G((u) => n.value = !1, ["prevent"])),
|
|
2752
|
+
onDragover: i[1] || (i[1] = G((u) => n.value = !0, ["prevent"])),
|
|
2753
2753
|
onDrop: G(l, ["prevent"])
|
|
2754
2754
|
}, [
|
|
2755
|
-
t.value.length === 0 ? (s(), p("div",
|
|
2756
|
-
y(c(
|
|
2755
|
+
t.value.length === 0 ? (s(), p("div", fa, [
|
|
2756
|
+
y(c(C), {
|
|
2757
2757
|
icon: "bi:upload",
|
|
2758
2758
|
class: "me-2",
|
|
2759
2759
|
height: "20px",
|
|
2760
2760
|
width: "20px"
|
|
2761
2761
|
}),
|
|
2762
2762
|
P(" Drag and drop files here ")
|
|
2763
|
-
])) : (s(), p("div",
|
|
2763
|
+
])) : (s(), p("div", ga, [
|
|
2764
2764
|
k(o.$slots, "default")
|
|
2765
2765
|
]))
|
|
2766
2766
|
], 34));
|
|
2767
2767
|
}
|
|
2768
|
-
}),
|
|
2768
|
+
}), wa = { class: "d-flex align-items-center me-2" }, xa = /* @__PURE__ */ $({
|
|
2769
2769
|
__name: "UploadStatus",
|
|
2770
2770
|
props: {
|
|
2771
2771
|
fileSize: {},
|
|
@@ -2790,8 +2790,8 @@ const va = { class: "d-flex justify-content-between" }, ba = ["accept", "disable
|
|
|
2790
2790
|
return "Upload Failed: Connection error, please try again.";
|
|
2791
2791
|
}
|
|
2792
2792
|
});
|
|
2793
|
-
return (a, l) => (s(), p("div",
|
|
2794
|
-
a.uploadStatus === "Uploading" ? (s(), w(
|
|
2793
|
+
return (a, l) => (s(), p("div", wa, [
|
|
2794
|
+
a.uploadStatus === "Uploading" ? (s(), w(Yt, {
|
|
2795
2795
|
key: 0,
|
|
2796
2796
|
pixelWidth: 200,
|
|
2797
2797
|
animate: "",
|
|
@@ -2815,16 +2815,16 @@ const va = { class: "d-flex justify-content-between" }, ba = ["accept", "disable
|
|
|
2815
2815
|
}, 8, ["severity"])) : F("", !0)
|
|
2816
2816
|
]));
|
|
2817
2817
|
}
|
|
2818
|
-
}),
|
|
2818
|
+
}), ka = ["data-cy"], _a = { class: "ms-3 d-flex flex-column" }, $a = {
|
|
2819
2819
|
key: 1,
|
|
2820
2820
|
id: "file-name"
|
|
2821
|
-
},
|
|
2821
|
+
}, Fa = {
|
|
2822
2822
|
class: "text-black-50",
|
|
2823
2823
|
id: "file-type"
|
|
2824
|
-
},
|
|
2824
|
+
}, Ba = {
|
|
2825
2825
|
class: "text-black-50",
|
|
2826
2826
|
id: "file-size"
|
|
2827
|
-
},
|
|
2827
|
+
}, Sa = { class: "ms-auto my-auto d-flex" }, Ca = /* @__PURE__ */ $({
|
|
2828
2828
|
__name: "FileInfo",
|
|
2829
2829
|
props: /* @__PURE__ */ q({
|
|
2830
2830
|
editableFileName: { type: Boolean },
|
|
@@ -2843,10 +2843,10 @@ const va = { class: "d-flex justify-content-between" }, ba = ["accept", "disable
|
|
|
2843
2843
|
}),
|
|
2844
2844
|
emits: /* @__PURE__ */ q(["deleted"], ["update:file", "update:blobFileName", "update:uploadStatus"]),
|
|
2845
2845
|
setup(e, { emit: t }) {
|
|
2846
|
-
const n = R(e, "file"), a = R(e, "blobFileName"), l = R(e, "uploadStatus"), o = t,
|
|
2847
|
-
n.value = new File([n.value],
|
|
2846
|
+
const n = R(e, "file"), a = R(e, "blobFileName"), l = R(e, "uploadStatus"), o = t, i = T(n.value.name), u = T(""), b = T(0), d = T(), f = x(() => e.acceptedFileTypes.includes(n.value.type)), r = x(() => n.value.size <= e.maxFileSize), h = () => {
|
|
2847
|
+
n.value = new File([n.value], i.value, { type: n.value.type, lastModified: (/* @__PURE__ */ new Date()).valueOf() });
|
|
2848
2848
|
}, _ = async () => {
|
|
2849
|
-
if (!f.value || !
|
|
2849
|
+
if (!f.value || !r.value) {
|
|
2850
2850
|
l.value = f.value ? "InvalidFileSize" : "InvalidFileType";
|
|
2851
2851
|
return;
|
|
2852
2852
|
}
|
|
@@ -2872,7 +2872,7 @@ const va = { class: "d-flex justify-content-between" }, ba = ["accept", "disable
|
|
|
2872
2872
|
l.value = "Failed";
|
|
2873
2873
|
}
|
|
2874
2874
|
}, V = async () => {
|
|
2875
|
-
await
|
|
2875
|
+
await ca(l.value, u.value), o("deleted", n.value);
|
|
2876
2876
|
};
|
|
2877
2877
|
return oe(() => {
|
|
2878
2878
|
e.autoUploadToBlob && _();
|
|
@@ -2883,15 +2883,15 @@ const va = { class: "d-flex justify-content-between" }, ba = ["accept", "disable
|
|
|
2883
2883
|
"data-cy": `file-info-${n.value.name}`
|
|
2884
2884
|
}, [
|
|
2885
2885
|
m("div", null, [
|
|
2886
|
-
c(
|
|
2886
|
+
c(ma)(n.value.type) ? (s(), w(c(De), {
|
|
2887
2887
|
key: 0,
|
|
2888
2888
|
id: "thumbnail-image",
|
|
2889
2889
|
"image-class": "image-file-thumbnail border",
|
|
2890
|
-
src: c(
|
|
2890
|
+
src: c(pa)(n.value),
|
|
2891
2891
|
alt: n.value.name,
|
|
2892
2892
|
width: "75px",
|
|
2893
2893
|
preview: ""
|
|
2894
|
-
}, null, 8, ["src", "alt"])) : (s(), w(c(
|
|
2894
|
+
}, null, 8, ["src", "alt"])) : (s(), w(c(C), {
|
|
2895
2895
|
key: 1,
|
|
2896
2896
|
id: "file-earmark",
|
|
2897
2897
|
icon: "bi:file-earmark",
|
|
@@ -2899,23 +2899,23 @@ const va = { class: "d-flex justify-content-between" }, ba = ["accept", "disable
|
|
|
2899
2899
|
width: "75px"
|
|
2900
2900
|
}))
|
|
2901
2901
|
]),
|
|
2902
|
-
m("div",
|
|
2902
|
+
m("div", _a, [
|
|
2903
2903
|
m("div", null, [
|
|
2904
|
-
M.editableFileName ? (s(), w(
|
|
2904
|
+
M.editableFileName ? (s(), w(xt, {
|
|
2905
2905
|
key: 0,
|
|
2906
2906
|
id: "edit-file-name",
|
|
2907
|
-
modelValue:
|
|
2908
|
-
"onUpdate:modelValue": I[0] || (I[0] = (N) =>
|
|
2907
|
+
modelValue: i.value,
|
|
2908
|
+
"onUpdate:modelValue": I[0] || (I[0] = (N) => i.value = N),
|
|
2909
2909
|
rules: M.customFileNameRules,
|
|
2910
2910
|
name: n.value.name,
|
|
2911
2911
|
"complete-action": h
|
|
2912
|
-
}, null, 8, ["modelValue", "rules", "name"])) : (s(), p("span",
|
|
2912
|
+
}, null, 8, ["modelValue", "rules", "name"])) : (s(), p("span", $a, g(n.value.name), 1))
|
|
2913
2913
|
]),
|
|
2914
|
-
m("span",
|
|
2915
|
-
m("span",
|
|
2914
|
+
m("span", Fa, "File type: " + g(n.value.type.split("/").pop()), 1),
|
|
2915
|
+
m("span", Ba, "File size: " + g(c(ie)(n.value.size)), 1)
|
|
2916
2916
|
]),
|
|
2917
|
-
m("div",
|
|
2918
|
-
(s(), w(
|
|
2917
|
+
m("div", Sa, [
|
|
2918
|
+
(s(), w(xa, {
|
|
2919
2919
|
key: l.value,
|
|
2920
2920
|
"file-size": n.value.size,
|
|
2921
2921
|
"upload-status": l.value,
|
|
@@ -2928,7 +2928,7 @@ const va = { class: "d-flex justify-content-between" }, ba = ["accept", "disable
|
|
|
2928
2928
|
onClick: _
|
|
2929
2929
|
}, {
|
|
2930
2930
|
default: v(() => [
|
|
2931
|
-
y(c(
|
|
2931
|
+
y(c(C), {
|
|
2932
2932
|
icon: l.value === "Not Uploaded" || l.value === "Duplicate" ? "bi:upload" : "bi:arrow-clockwise"
|
|
2933
2933
|
}, null, 8, ["icon"])
|
|
2934
2934
|
]),
|
|
@@ -2940,7 +2940,7 @@ const va = { class: "d-flex justify-content-between" }, ba = ["accept", "disable
|
|
|
2940
2940
|
onClick: I[1] || (I[1] = (N) => d.value.value.abort())
|
|
2941
2941
|
}, {
|
|
2942
2942
|
default: v(() => [
|
|
2943
|
-
y(c(
|
|
2943
|
+
y(c(C), { icon: "bi:x-circle-fill" })
|
|
2944
2944
|
]),
|
|
2945
2945
|
_: 1
|
|
2946
2946
|
})) : (s(), w(z, {
|
|
@@ -2950,25 +2950,25 @@ const va = { class: "d-flex justify-content-between" }, ba = ["accept", "disable
|
|
|
2950
2950
|
id: "delete-button"
|
|
2951
2951
|
}, {
|
|
2952
2952
|
default: v(() => [
|
|
2953
|
-
y(c(
|
|
2953
|
+
y(c(C), { icon: "bi:trash" })
|
|
2954
2954
|
]),
|
|
2955
2955
|
_: 1
|
|
2956
2956
|
}))
|
|
2957
2957
|
])
|
|
2958
|
-
], 8,
|
|
2958
|
+
], 8, ka);
|
|
2959
2959
|
};
|
|
2960
2960
|
}
|
|
2961
|
-
}),
|
|
2961
|
+
}), Va = { class: "d-flex justify-content-end mt-1" }, Ta = { id: "max-file-size" }, Ma = /* @__PURE__ */ $({
|
|
2962
2962
|
__name: "MaxFileSize",
|
|
2963
2963
|
props: {
|
|
2964
2964
|
maxFileSize: {}
|
|
2965
2965
|
},
|
|
2966
2966
|
setup(e) {
|
|
2967
|
-
return (t, n) => (s(), p("div",
|
|
2968
|
-
m("div",
|
|
2967
|
+
return (t, n) => (s(), p("div", Va, [
|
|
2968
|
+
m("div", Ta, "Max file size: " + g(c(ie)(t.maxFileSize)), 1)
|
|
2969
2969
|
]));
|
|
2970
2970
|
}
|
|
2971
|
-
}),
|
|
2971
|
+
}), Pa = { "data-cy": "file-uploader" }, Ia = { key: 0 }, _l = /* @__PURE__ */ $({
|
|
2972
2972
|
__name: "ForgeFileUploader",
|
|
2973
2973
|
props: /* @__PURE__ */ q({
|
|
2974
2974
|
acceptedFileTypes: {},
|
|
@@ -2988,23 +2988,23 @@ const va = { class: "d-flex justify-content-between" }, ba = ["accept", "disable
|
|
|
2988
2988
|
const t = R(e, "modelValue"), n = e, a = (l) => {
|
|
2989
2989
|
t.value = t.value.filter((o) => o.file != l);
|
|
2990
2990
|
};
|
|
2991
|
-
return (l, o) => (s(), p("div",
|
|
2992
|
-
y(
|
|
2991
|
+
return (l, o) => (s(), p("div", Pa, [
|
|
2992
|
+
y(ba, S(n, {
|
|
2993
2993
|
modelValue: t.value,
|
|
2994
|
-
"onUpdate:modelValue": o[0] || (o[0] = (
|
|
2994
|
+
"onUpdate:modelValue": o[0] || (o[0] = (i) => t.value = i)
|
|
2995
2995
|
}), null, 16, ["modelValue"]),
|
|
2996
|
-
l.showDragDropArea ? (s(), p("div",
|
|
2997
|
-
y(
|
|
2996
|
+
l.showDragDropArea ? (s(), p("div", Ia, [
|
|
2997
|
+
y(ha, {
|
|
2998
2998
|
"max-file-input": n.maxFileInput,
|
|
2999
2999
|
"max-file-size": n.maxFileSize,
|
|
3000
3000
|
"accepted-file-types": n.acceptedFileTypes,
|
|
3001
3001
|
modelValue: t.value,
|
|
3002
|
-
"onUpdate:modelValue": o[1] || (o[1] = (
|
|
3002
|
+
"onUpdate:modelValue": o[1] || (o[1] = (i) => t.value = i)
|
|
3003
3003
|
}, {
|
|
3004
3004
|
default: v(() => [
|
|
3005
|
-
(s(!0), p(D, null, j(t.value, ({ file:
|
|
3006
|
-
(s(), w(
|
|
3007
|
-
key:
|
|
3005
|
+
(s(!0), p(D, null, j(t.value, ({ file: i }, u) => (s(), p("span", null, [
|
|
3006
|
+
(s(), w(Ca, S({
|
|
3007
|
+
key: i.name,
|
|
3008
3008
|
class: u === t.value.length - 1 || t.value.length == 1 ? "" : "border-bottom",
|
|
3009
3009
|
file: t.value[u].file,
|
|
3010
3010
|
"onUpdate:file": (b) => t.value[u].file = b,
|
|
@@ -3018,7 +3018,7 @@ const va = { class: "d-flex justify-content-between" }, ba = ["accept", "disable
|
|
|
3018
3018
|
]),
|
|
3019
3019
|
_: 1
|
|
3020
3020
|
}, 8, ["max-file-input", "max-file-size", "accepted-file-types", "modelValue"]),
|
|
3021
|
-
y(
|
|
3021
|
+
y(Ma, {
|
|
3022
3022
|
"max-file-size": n.maxFileSize
|
|
3023
3023
|
}, null, 8, ["max-file-size"])
|
|
3024
3024
|
])) : F("", !0)
|
|
@@ -3026,28 +3026,28 @@ const va = { class: "d-flex justify-content-between" }, ba = ["accept", "disable
|
|
|
3026
3026
|
}
|
|
3027
3027
|
});
|
|
3028
3028
|
export {
|
|
3029
|
-
|
|
3030
|
-
|
|
3029
|
+
il as Bootstrap_PT,
|
|
3030
|
+
rl as ForgeActionButton,
|
|
3031
3031
|
ae as ForgeAlert,
|
|
3032
3032
|
me as ForgeCheckbox,
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
3033
|
+
fl as ForgeChips,
|
|
3034
|
+
Et as ForgeDatepicker,
|
|
3035
|
+
_l as ForgeFileUploader,
|
|
3036
|
+
kl as ForgeFilterHeader,
|
|
3037
|
+
vl as ForgeForm,
|
|
3038
|
+
bl as ForgeFormField,
|
|
3039
|
+
xt as ForgeInlineEditor,
|
|
3040
|
+
dl as ForgeLink,
|
|
3041
3041
|
pe as ForgeLoader,
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
|
|
3042
|
+
ul as ForgeModal,
|
|
3043
|
+
Ct as ForgeMultiSelect,
|
|
3044
|
+
ml as ForgeMultiSelectPreview,
|
|
3045
|
+
cl as ForgeNavbar,
|
|
3046
|
+
pl as ForgePageHeader,
|
|
3047
|
+
Yt as ForgeProgressBar,
|
|
3048
|
+
yl as ForgeRemainingCharacters,
|
|
3049
|
+
gl as ForgeStatWidget,
|
|
3050
|
+
hl as ForgeStepper,
|
|
3051
|
+
xl as ForgeTable,
|
|
3052
|
+
wl as ForgeTile
|
|
3053
3053
|
};
|