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