@3squared/forge-ui-3 0.5.4 → 0.6.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 +442 -427
- package/dist/esm/style.css +1 -1
- package/dist/src/components/table/ForgeTable.vue.d.ts +6 -0
- package/dist/src/passthroughs/Dialog.pt.d.ts +2 -2
- package/dist/src/passthroughs/Table.pt.d.ts +0 -3
- package/package.json +2 -2
- package/src/styles/components/_table.scss +42 -0
- package/src/styles/components/_tile.scss +2 -0
package/dist/esm/forge-ui-3.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import fe from "primevue/message";
|
|
2
|
-
import { defineComponent as $, openBlock as s, createBlock as w, normalizeProps as Q, guardReactiveProps as ee, withCtx as
|
|
2
|
+
import { defineComponent as $, openBlock as s, createBlock as w, normalizeProps as Q, guardReactiveProps as ee, withCtx as b, createElementVNode as m, normalizeClass as B, unref as u, createCommentVNode as F, createVNode as v, renderSlot as x, ref as M, createElementBlock as p, Fragment as D, mergeProps as S, onMounted as oe, watch as ge, computed as k, isRef as j, createTextVNode as P, toDisplayString as h, withDirectives as L, vShow as Y, mergeModels as q, useModel as R, createSlots as te, renderList as H, withKeys as J, useAttrs as de, withModifiers as G, normalizeStyle as he } from "vue";
|
|
3
3
|
import { Icon as C } from "@iconify/vue";
|
|
4
4
|
import E from "primevue/button";
|
|
5
5
|
import we from "primevue/toast";
|
|
6
|
-
import
|
|
6
|
+
import ke from "primevue/checkbox";
|
|
7
7
|
import { useField as W } from "vee-validate";
|
|
8
|
-
import
|
|
8
|
+
import xe from "primevue/progressspinner";
|
|
9
9
|
import _e from "primevue/dialog";
|
|
10
10
|
import ne from "primevue/inputtext";
|
|
11
11
|
import { vOnClickOutside as $e } from "@vueuse/components";
|
|
@@ -307,7 +307,7 @@ const Ue = {
|
|
|
307
307
|
root: "form-check form-switch",
|
|
308
308
|
input: "form-check-input"
|
|
309
309
|
}
|
|
310
|
-
},
|
|
310
|
+
}, He = {
|
|
311
311
|
textarea: {
|
|
312
312
|
root: () => ({
|
|
313
313
|
class: [
|
|
@@ -315,7 +315,7 @@ const Ue = {
|
|
|
315
315
|
]
|
|
316
316
|
})
|
|
317
317
|
}
|
|
318
|
-
},
|
|
318
|
+
}, je = {
|
|
319
319
|
// More PassThrough options in component file.
|
|
320
320
|
chips: {
|
|
321
321
|
root: "d-flex",
|
|
@@ -356,9 +356,12 @@ const Ue = {
|
|
|
356
356
|
]
|
|
357
357
|
}),
|
|
358
358
|
mask: ({ props: e }) => ({
|
|
359
|
-
class: [
|
|
360
|
-
"
|
|
361
|
-
|
|
359
|
+
class: [
|
|
360
|
+
"z-3",
|
|
361
|
+
{
|
|
362
|
+
"modal-open": e.modal && e.visible
|
|
363
|
+
}
|
|
364
|
+
]
|
|
362
365
|
})
|
|
363
366
|
}
|
|
364
367
|
}, qe = {
|
|
@@ -535,6 +538,7 @@ const Ue = {
|
|
|
535
538
|
})
|
|
536
539
|
}
|
|
537
540
|
}, Xe = {
|
|
541
|
+
// More PT options can be found in the ForgeTable file.
|
|
538
542
|
dataTable: {
|
|
539
543
|
table: (e) => ({
|
|
540
544
|
class: [
|
|
@@ -555,9 +559,6 @@ const Ue = {
|
|
|
555
559
|
}
|
|
556
560
|
}),
|
|
557
561
|
rowgrouptoggler: "btn",
|
|
558
|
-
thead: () => ({
|
|
559
|
-
class: "sticky-header"
|
|
560
|
-
}),
|
|
561
562
|
//@ts-ignore
|
|
562
563
|
tbody: (e) => ({
|
|
563
564
|
class: {
|
|
@@ -821,7 +822,7 @@ const Ue = {
|
|
|
821
822
|
...Ue,
|
|
822
823
|
...ot,
|
|
823
824
|
...Ae,
|
|
824
|
-
...
|
|
825
|
+
...je,
|
|
825
826
|
...Ne,
|
|
826
827
|
...Ze,
|
|
827
828
|
...Ye,
|
|
@@ -842,7 +843,7 @@ const Ue = {
|
|
|
842
843
|
...Xe,
|
|
843
844
|
...We,
|
|
844
845
|
...it,
|
|
845
|
-
...
|
|
846
|
+
...He,
|
|
846
847
|
directives: {
|
|
847
848
|
...tt
|
|
848
849
|
}
|
|
@@ -865,11 +866,11 @@ const Ue = {
|
|
|
865
866
|
return (n, a) => {
|
|
866
867
|
const l = fe;
|
|
867
868
|
return s(), w(l, Q(ee({ ...n.$attrs, ...t })), {
|
|
868
|
-
messageicon:
|
|
869
|
+
messageicon: b(() => [
|
|
869
870
|
m("div", {
|
|
870
871
|
class: B(t.icon ? "me-2 pe-1" : "")
|
|
871
872
|
}, [
|
|
872
|
-
t.icon ? (s(), w(
|
|
873
|
+
t.icon ? (s(), w(u(C), {
|
|
873
874
|
key: 0,
|
|
874
875
|
"data-cy": "message-icon",
|
|
875
876
|
icon: t.icon,
|
|
@@ -878,11 +879,11 @@ const Ue = {
|
|
|
878
879
|
}, null, 8, ["icon", "class"])) : F("", !0)
|
|
879
880
|
], 2)
|
|
880
881
|
]),
|
|
881
|
-
closeicon:
|
|
882
|
-
|
|
882
|
+
closeicon: b(() => [
|
|
883
|
+
v(u(C), { icon: "bi:x" })
|
|
883
884
|
]),
|
|
884
|
-
default:
|
|
885
|
-
|
|
885
|
+
default: b(() => [
|
|
886
|
+
x(n.$slots, "default")
|
|
886
887
|
]),
|
|
887
888
|
_: 3
|
|
888
889
|
}, 16);
|
|
@@ -897,7 +898,7 @@ const Ue = {
|
|
|
897
898
|
params: { default: Array }
|
|
898
899
|
},
|
|
899
900
|
setup(e) {
|
|
900
|
-
const t =
|
|
901
|
+
const t = M(!1), n = e, a = async () => {
|
|
901
902
|
t.value = !0;
|
|
902
903
|
try {
|
|
903
904
|
await n.action.apply(this, n.params);
|
|
@@ -909,12 +910,12 @@ const Ue = {
|
|
|
909
910
|
return (l, o) => {
|
|
910
911
|
const i = E;
|
|
911
912
|
return s(), p(D, null, [
|
|
912
|
-
|
|
913
|
+
v(i, S({ ...n, ...l.$attrs }, {
|
|
913
914
|
loading: t.value,
|
|
914
915
|
disabled: t.value || n.disabled,
|
|
915
916
|
onClick: a
|
|
916
917
|
}), null, 16, ["loading", "disabled"]),
|
|
917
|
-
|
|
918
|
+
v(u(we))
|
|
918
919
|
], 64);
|
|
919
920
|
};
|
|
920
921
|
}
|
|
@@ -946,34 +947,34 @@ const Ue = {
|
|
|
946
947
|
},
|
|
947
948
|
emits: ["update:modelValue"],
|
|
948
949
|
setup(e, { emit: t }) {
|
|
949
|
-
const n = t, a = e, { checked: l, handleChange: o, setValue: i, errors:
|
|
950
|
+
const n = t, a = e, { checked: l, handleChange: o, setValue: i, errors: d, errorMessage: f } = W(() => a.name ?? a.label, a.rules, {
|
|
950
951
|
type: "checkbox",
|
|
951
952
|
checkedValue: !0
|
|
952
|
-
}),
|
|
953
|
-
a.disabled || (o(
|
|
953
|
+
}), r = (y) => {
|
|
954
|
+
a.disabled || (o(y), n("update:modelValue", !a.modelValue));
|
|
954
955
|
};
|
|
955
956
|
oe(() => {
|
|
956
957
|
a.value !== void 0 && a.value !== (l == null ? void 0 : l.value) ? i(a.value) : a.modelValue !== void 0 && a.modelValue !== (l == null ? void 0 : l.value) && i(a.modelValue);
|
|
957
|
-
}), ge(() => a.value, (
|
|
958
|
-
i(
|
|
958
|
+
}), ge(() => a.value, (y) => {
|
|
959
|
+
i(y);
|
|
959
960
|
});
|
|
960
|
-
const
|
|
961
|
-
return (
|
|
962
|
-
const _ =
|
|
961
|
+
const g = k(() => d.value.length > 0);
|
|
962
|
+
return (y, c) => {
|
|
963
|
+
const _ = ke;
|
|
963
964
|
return s(), p(D, null, [
|
|
964
965
|
m("div", S({
|
|
965
966
|
class: "d-flex",
|
|
966
967
|
"data-cy": "checkbox-container"
|
|
967
|
-
}, { ...
|
|
968
|
-
|
|
968
|
+
}, { ...y.$attrs }), [
|
|
969
|
+
v(_, S({
|
|
969
970
|
id: a.name
|
|
970
971
|
}, { ...a }, {
|
|
971
|
-
modelValue:
|
|
972
|
-
"onUpdate:modelValue":
|
|
973
|
-
"input-class": { "is-invalid":
|
|
974
|
-
onChange:
|
|
972
|
+
modelValue: u(l),
|
|
973
|
+
"onUpdate:modelValue": c[0] || (c[0] = (V) => j(l) ? l.value = V : null),
|
|
974
|
+
"input-class": { "is-invalid": g.value },
|
|
975
|
+
onChange: r
|
|
975
976
|
}), {
|
|
976
|
-
icon:
|
|
977
|
+
icon: b(() => [
|
|
977
978
|
rt
|
|
978
979
|
]),
|
|
979
980
|
_: 1
|
|
@@ -981,18 +982,18 @@ const Ue = {
|
|
|
981
982
|
m("label", {
|
|
982
983
|
for: a.name,
|
|
983
984
|
class: B(`${a.disabled ? "opacity-50" : "cursor-pointer"}`),
|
|
984
|
-
onClick:
|
|
985
|
+
onClick: r
|
|
985
986
|
}, [
|
|
986
|
-
|
|
987
|
-
P(
|
|
987
|
+
x(y.$slots, "default", {}, () => [
|
|
988
|
+
P(h(a.label), 1)
|
|
988
989
|
])
|
|
989
990
|
], 10, dt)
|
|
990
991
|
], 16),
|
|
991
992
|
L(m("small", {
|
|
992
993
|
"data-cy": "error",
|
|
993
994
|
class: "text-invalid"
|
|
994
|
-
},
|
|
995
|
-
[Y,
|
|
995
|
+
}, h(u(f)), 513), [
|
|
996
|
+
[Y, g.value]
|
|
996
997
|
])
|
|
997
998
|
], 64);
|
|
998
999
|
};
|
|
@@ -1005,9 +1006,9 @@ const Ue = {
|
|
|
1005
1006
|
setup(e) {
|
|
1006
1007
|
const t = e;
|
|
1007
1008
|
return (n, a) => {
|
|
1008
|
-
const l =
|
|
1009
|
+
const l = xe;
|
|
1009
1010
|
return s(), p("div", ut, [
|
|
1010
|
-
|
|
1011
|
+
v(l, {
|
|
1011
1012
|
"animation-duration": ".75",
|
|
1012
1013
|
class: B(`text-${t.severity === void 0 ? "primary" : t.severity}`)
|
|
1013
1014
|
}, null, 8, ["class"])
|
|
@@ -1032,7 +1033,7 @@ const Ue = {
|
|
|
1032
1033
|
iconName: {}
|
|
1033
1034
|
},
|
|
1034
1035
|
setup(e) {
|
|
1035
|
-
const t =
|
|
1036
|
+
const t = k(() => ({
|
|
1036
1037
|
[`link-${e.severity}`]: e.severity,
|
|
1037
1038
|
[`link-underline-${e.underlineSeverity}`]: e.underlineSeverity,
|
|
1038
1039
|
[`link-opacity-${e.opacity}`]: e.opacity,
|
|
@@ -1041,7 +1042,7 @@ const Ue = {
|
|
|
1041
1042
|
[`link-underline-opacity-${e.underlineHoverOpacity ?? e.hoverOpacity}-hover`]: e.underlineHoverOpacity || e.hoverOpacity,
|
|
1042
1043
|
[`link-offset-${e.underlineOffset}`]: e.underlineOffset,
|
|
1043
1044
|
"icon-link icon-link-hover": e.animateIconOnHover
|
|
1044
|
-
})), n =
|
|
1045
|
+
})), n = k(() => ({
|
|
1045
1046
|
"order-2": e.positionIconEnd,
|
|
1046
1047
|
"me-1": !e.positionIconEnd && !e.animateIconOnHover,
|
|
1047
1048
|
"ms-1": e.positionIconEnd && !e.animateIconOnHover,
|
|
@@ -1054,14 +1055,14 @@ const Ue = {
|
|
|
1054
1055
|
href: a.url,
|
|
1055
1056
|
target: a.target
|
|
1056
1057
|
}, [
|
|
1057
|
-
|
|
1058
|
-
a.iconName ? (s(), w(
|
|
1058
|
+
x(a.$slots, "default", {}, () => [
|
|
1059
|
+
a.iconName ? (s(), w(u(C), {
|
|
1059
1060
|
key: 0,
|
|
1060
1061
|
id: "link-icon",
|
|
1061
1062
|
icon: a.iconName,
|
|
1062
1063
|
class: B(["bi my-auto", n.value])
|
|
1063
1064
|
}, null, 8, ["icon", "class"])) : F("", !0),
|
|
1064
|
-
P(" " +
|
|
1065
|
+
P(" " + h(a.label), 1)
|
|
1065
1066
|
])
|
|
1066
1067
|
], 10, ct));
|
|
1067
1068
|
}
|
|
@@ -1123,30 +1124,30 @@ const pt = { key: 0 }, yt = {
|
|
|
1123
1124
|
}),
|
|
1124
1125
|
emits: ["update:visible"],
|
|
1125
1126
|
setup(e) {
|
|
1126
|
-
const t = R(e, "visible"), n =
|
|
1127
|
+
const t = R(e, "visible"), n = M(!1), a = e, l = M(!1), o = M({
|
|
1127
1128
|
hasError: !1,
|
|
1128
1129
|
header: "",
|
|
1129
1130
|
message: []
|
|
1130
1131
|
}), i = () => {
|
|
1131
1132
|
n.value = !1;
|
|
1132
|
-
},
|
|
1133
|
+
}, d = () => {
|
|
1133
1134
|
n.value = !0;
|
|
1134
|
-
},
|
|
1135
|
+
}, f = () => {
|
|
1135
1136
|
t.value = !1;
|
|
1136
|
-
},
|
|
1137
|
+
}, r = async () => {
|
|
1137
1138
|
if (a.onConfirm) {
|
|
1138
1139
|
l.value = !0, o.value.hasError = !1;
|
|
1139
1140
|
try {
|
|
1140
|
-
const
|
|
1141
|
-
(
|
|
1142
|
-
} catch (
|
|
1141
|
+
const y = await a.onConfirm();
|
|
1142
|
+
(y || y == null) && f();
|
|
1143
|
+
} catch (y) {
|
|
1143
1144
|
o.value.hasError = !0;
|
|
1144
|
-
const
|
|
1145
|
-
o.value.header =
|
|
1145
|
+
const c = mt(y);
|
|
1146
|
+
o.value.header = c.errorMessage, o.value.message = c.errorDetails;
|
|
1146
1147
|
}
|
|
1147
1148
|
l.value = !1;
|
|
1148
1149
|
}
|
|
1149
|
-
},
|
|
1150
|
+
}, g = k(() => ({
|
|
1150
1151
|
root: [
|
|
1151
1152
|
"modal modal-dialog modal-content h-auto m-0",
|
|
1152
1153
|
{
|
|
@@ -1154,24 +1155,24 @@ const pt = { key: 0 }, yt = {
|
|
|
1154
1155
|
}
|
|
1155
1156
|
]
|
|
1156
1157
|
}));
|
|
1157
|
-
return (
|
|
1158
|
+
return (y, c) => {
|
|
1158
1159
|
const _ = E, V = _e;
|
|
1159
1160
|
return s(), w(V, S(a, {
|
|
1160
|
-
onMaximize:
|
|
1161
|
+
onMaximize: d,
|
|
1161
1162
|
onUnmaximize: i,
|
|
1162
|
-
pt:
|
|
1163
|
+
pt: g.value
|
|
1163
1164
|
}), te({
|
|
1164
|
-
closeicon:
|
|
1165
|
-
|
|
1165
|
+
closeicon: b(() => [
|
|
1166
|
+
v(u(C), {
|
|
1166
1167
|
"data-cy": "close-icon",
|
|
1167
1168
|
icon: "bi:x-lg",
|
|
1168
1169
|
width: "18",
|
|
1169
1170
|
height: "18",
|
|
1170
|
-
onClick:
|
|
1171
|
+
onClick: f
|
|
1171
1172
|
})
|
|
1172
1173
|
]),
|
|
1173
|
-
maximizeicon:
|
|
1174
|
-
|
|
1174
|
+
maximizeicon: b(() => [
|
|
1175
|
+
v(u(C), {
|
|
1175
1176
|
"data-cy": "maximisable-icon",
|
|
1176
1177
|
icon: n.value ? "bi:arrows-angle-contract" : "bi:arrows-angle-expand",
|
|
1177
1178
|
width: "16",
|
|
@@ -1180,45 +1181,45 @@ const pt = { key: 0 }, yt = {
|
|
|
1180
1181
|
]),
|
|
1181
1182
|
_: 2
|
|
1182
1183
|
}, [
|
|
1183
|
-
|
|
1184
|
+
H(y.$slots, (T, I) => ({
|
|
1184
1185
|
name: I,
|
|
1185
|
-
fn:
|
|
1186
|
+
fn: b((z) => [
|
|
1186
1187
|
o.value.hasError ? (s(), w(ae, {
|
|
1187
1188
|
key: 0,
|
|
1188
1189
|
severity: "danger",
|
|
1189
1190
|
"data-cy": "error"
|
|
1190
1191
|
}, {
|
|
1191
|
-
default:
|
|
1192
|
+
default: b(() => [
|
|
1192
1193
|
m("p", {
|
|
1193
1194
|
class: B(o.value.message.length > 0 ? "my-auto" : "mb-0")
|
|
1194
|
-
},
|
|
1195
|
+
}, h(o.value.header), 3),
|
|
1195
1196
|
o.value.message.length > 0 ? (s(), p("ul", pt, [
|
|
1196
|
-
(s(!0), p(D, null,
|
|
1197
|
+
(s(!0), p(D, null, H(o.value.message, (N) => (s(), p("li", { key: N }, h(N), 1))), 128))
|
|
1197
1198
|
])) : F("", !0)
|
|
1198
1199
|
]),
|
|
1199
1200
|
_: 1
|
|
1200
1201
|
})) : F("", !0),
|
|
1201
|
-
|
|
1202
|
-
l.value ?
|
|
1203
|
-
|
|
1202
|
+
x(y.$slots, I, Q(ee(z || {}))),
|
|
1203
|
+
l.value ? x(y.$slots, "loader", { key: 1 }, () => [
|
|
1204
|
+
v(pe, { "data-cy": "loader" })
|
|
1204
1205
|
]) : F("", !0)
|
|
1205
1206
|
])
|
|
1206
1207
|
})),
|
|
1207
|
-
|
|
1208
|
+
y.showFooter ? {
|
|
1208
1209
|
name: "footer",
|
|
1209
|
-
fn:
|
|
1210
|
+
fn: b(() => [
|
|
1210
1211
|
m("div", yt, [
|
|
1211
|
-
|
|
1212
|
-
label:
|
|
1212
|
+
v(_, {
|
|
1213
|
+
label: y.cancelText,
|
|
1213
1214
|
class: B(a.cancelClass),
|
|
1214
1215
|
outlined: "",
|
|
1215
|
-
onClick:
|
|
1216
|
+
onClick: f,
|
|
1216
1217
|
id: "cancel-button"
|
|
1217
1218
|
}, null, 8, ["label", "class"]),
|
|
1218
|
-
|
|
1219
|
-
label:
|
|
1219
|
+
v(_, {
|
|
1220
|
+
label: y.submitText,
|
|
1220
1221
|
class: B([a.submitClass, "ms-auto"]),
|
|
1221
|
-
onClick:
|
|
1222
|
+
onClick: r,
|
|
1222
1223
|
id: "submit-button"
|
|
1223
1224
|
}, null, 8, ["label", "class"])
|
|
1224
1225
|
])
|
|
@@ -1228,7 +1229,7 @@ const pt = { key: 0 }, yt = {
|
|
|
1228
1229
|
]), 1040, ["pt"]);
|
|
1229
1230
|
};
|
|
1230
1231
|
}
|
|
1231
|
-
}), vt = ["id"], bt = { key: 0 }, ft = { key: 0 }, gt = { class: "d-flex justify-content-between align-items-center position-relative" }, ht = { key: 1 }, wt = { "data-cy": "readonly-value" },
|
|
1232
|
+
}), vt = ["id"], bt = { key: 0 }, ft = { key: 0 }, gt = { class: "d-flex justify-content-between align-items-center position-relative" }, ht = { key: 1 }, wt = { "data-cy": "readonly-value" }, kt = /* @__PURE__ */ $({
|
|
1232
1233
|
__name: "ForgeInlineEditor",
|
|
1233
1234
|
props: /* @__PURE__ */ q({
|
|
1234
1235
|
name: { default: "" },
|
|
@@ -1244,13 +1245,13 @@ const pt = { key: 0 }, yt = {
|
|
|
1244
1245
|
}),
|
|
1245
1246
|
emits: ["update:modelValue"],
|
|
1246
1247
|
setup(e) {
|
|
1247
|
-
const t = e, n = R(e, "modelValue"), a =
|
|
1248
|
+
const t = e, n = R(e, "modelValue"), a = M(!1), l = M(), o = () => {
|
|
1248
1249
|
var _;
|
|
1249
1250
|
a.value = !a.value, (_ = l.value) == null || _.focus();
|
|
1250
1251
|
}, i = async () => {
|
|
1251
|
-
if (
|
|
1252
|
+
if (c.value)
|
|
1252
1253
|
return !1;
|
|
1253
|
-
if (n.value =
|
|
1254
|
+
if (n.value = y.value, t.completeAction)
|
|
1254
1255
|
try {
|
|
1255
1256
|
await t.completeAction.apply(this, t.params), a.value = !a.value;
|
|
1256
1257
|
} catch {
|
|
@@ -1258,56 +1259,56 @@ const pt = { key: 0 }, yt = {
|
|
|
1258
1259
|
}
|
|
1259
1260
|
else
|
|
1260
1261
|
a.value = !a.value;
|
|
1261
|
-
},
|
|
1262
|
+
}, d = () => {
|
|
1262
1263
|
a.value = !a.value;
|
|
1263
|
-
},
|
|
1264
|
-
|
|
1265
|
-
}, { errorMessage:
|
|
1264
|
+
}, f = () => {
|
|
1265
|
+
y.value = null;
|
|
1266
|
+
}, { errorMessage: r, errors: g, value: y } = W(() => t.name, t.rules);
|
|
1266
1267
|
oe(() => {
|
|
1267
|
-
|
|
1268
|
+
y.value = n.value;
|
|
1268
1269
|
});
|
|
1269
|
-
const
|
|
1270
|
+
const c = k(() => g.value.length > 0);
|
|
1270
1271
|
return (_, V) => {
|
|
1271
|
-
const
|
|
1272
|
+
const T = ne, I = E;
|
|
1272
1273
|
return s(), p("div", {
|
|
1273
1274
|
id: t.name
|
|
1274
1275
|
}, [
|
|
1275
1276
|
_.readonly ? (s(), p("div", ht, [
|
|
1276
|
-
|
|
1277
|
-
m("span", wt,
|
|
1277
|
+
x(_.$slots, "default", {}, () => [
|
|
1278
|
+
m("span", wt, h(u(y)), 1)
|
|
1278
1279
|
])
|
|
1279
1280
|
])) : (s(), p("div", bt, [
|
|
1280
1281
|
a.value ? (s(), p("div", ft, [
|
|
1281
1282
|
L((s(), p("div", gt, [
|
|
1282
|
-
|
|
1283
|
-
class: B({ "is-invalid":
|
|
1283
|
+
x(_.$slots, "editor", {
|
|
1284
|
+
class: B({ "is-invalid": c.value }),
|
|
1284
1285
|
editFinished: i,
|
|
1285
|
-
cancel:
|
|
1286
|
-
val:
|
|
1286
|
+
cancel: d,
|
|
1287
|
+
val: u(y)
|
|
1287
1288
|
}, () => [
|
|
1288
|
-
|
|
1289
|
+
v(T, {
|
|
1289
1290
|
"data-cy": "input",
|
|
1290
1291
|
ref_key: "input",
|
|
1291
1292
|
ref: l,
|
|
1292
|
-
modelValue:
|
|
1293
|
-
"onUpdate:modelValue": V[0] || (V[0] = (z) =>
|
|
1293
|
+
modelValue: u(y),
|
|
1294
|
+
"onUpdate:modelValue": V[0] || (V[0] = (z) => j(y) ? y.value = z : null),
|
|
1294
1295
|
modelModifiers: { trim: !0 },
|
|
1295
|
-
class: B({ "is-invalid":
|
|
1296
|
+
class: B({ "is-invalid": c.value }),
|
|
1296
1297
|
onKeydown: [
|
|
1297
1298
|
J(i, ["enter"]),
|
|
1298
|
-
J(
|
|
1299
|
+
J(d, ["esc"])
|
|
1299
1300
|
]
|
|
1300
1301
|
}, null, 8, ["modelValue", "class"])
|
|
1301
1302
|
]),
|
|
1302
|
-
|
|
1303
|
+
v(u(C), {
|
|
1303
1304
|
icon: "bi:x-circle",
|
|
1304
1305
|
class: "mx-2 cursor-pointer",
|
|
1305
|
-
onClick:
|
|
1306
|
-
onKeydown: J(
|
|
1306
|
+
onClick: f,
|
|
1307
|
+
onKeydown: J(f, ["enter"]),
|
|
1307
1308
|
"data-cy": "clear-icon"
|
|
1308
1309
|
})
|
|
1309
1310
|
])), [
|
|
1310
|
-
[
|
|
1311
|
+
[u($e), i]
|
|
1311
1312
|
])
|
|
1312
1313
|
])) : (s(), p("div", {
|
|
1313
1314
|
key: 1,
|
|
@@ -1315,20 +1316,20 @@ const pt = { key: 0 }, yt = {
|
|
|
1315
1316
|
onClick: o,
|
|
1316
1317
|
onFocus: o
|
|
1317
1318
|
}, [
|
|
1318
|
-
|
|
1319
|
+
x(_.$slots, "default", {}, () => [
|
|
1319
1320
|
m("div", {
|
|
1320
|
-
class: B(["pe-2 cursor-pointer", { "text-invalid":
|
|
1321
|
+
class: B(["pe-2 cursor-pointer", { "text-invalid": c.value }]),
|
|
1321
1322
|
"data-cy": "value"
|
|
1322
|
-
},
|
|
1323
|
+
}, h(u(y) ? u(y) : "Click to edit"), 3)
|
|
1323
1324
|
]),
|
|
1324
|
-
|
|
1325
|
+
v(I, {
|
|
1325
1326
|
link: "",
|
|
1326
1327
|
class: "p-0 m-0"
|
|
1327
1328
|
}, {
|
|
1328
|
-
default:
|
|
1329
|
-
|
|
1329
|
+
default: b(() => [
|
|
1330
|
+
v(u(C), {
|
|
1330
1331
|
icon: "bi:pencil",
|
|
1331
|
-
class: B(
|
|
1332
|
+
class: B(c.value ? "text-invalid" : "text-muted"),
|
|
1332
1333
|
"data-cy": "edit-icon",
|
|
1333
1334
|
onKeydown: J(o, ["enter"])
|
|
1334
1335
|
}, null, 8, ["class"])
|
|
@@ -1340,13 +1341,13 @@ const pt = { key: 0 }, yt = {
|
|
|
1340
1341
|
L(m("small", {
|
|
1341
1342
|
"data-cy": "error",
|
|
1342
1343
|
class: "text-invalid"
|
|
1343
|
-
},
|
|
1344
|
-
[Y,
|
|
1344
|
+
}, h(u(r)), 513), [
|
|
1345
|
+
[Y, c.value]
|
|
1345
1346
|
])
|
|
1346
1347
|
], 8, vt);
|
|
1347
1348
|
};
|
|
1348
1349
|
}
|
|
1349
|
-
}),
|
|
1350
|
+
}), xt = ["href"], cl = /* @__PURE__ */ $({
|
|
1350
1351
|
__name: "ForgeNavbar",
|
|
1351
1352
|
props: {
|
|
1352
1353
|
severity: { default: "light" },
|
|
@@ -1363,7 +1364,7 @@ const pt = { key: 0 }, yt = {
|
|
|
1363
1364
|
unstyled: { type: Boolean }
|
|
1364
1365
|
},
|
|
1365
1366
|
setup(e) {
|
|
1366
|
-
const t = e, n =
|
|
1367
|
+
const t = e, n = k(() => ({
|
|
1367
1368
|
root: () => ({
|
|
1368
1369
|
class: [
|
|
1369
1370
|
"navbar container-fluid navbar-expand-lg",
|
|
@@ -1396,20 +1397,20 @@ const pt = { key: 0 }, yt = {
|
|
|
1396
1397
|
pt: n.value,
|
|
1397
1398
|
"data-cy": "navbar"
|
|
1398
1399
|
}), te({
|
|
1399
|
-
start:
|
|
1400
|
+
start: b(() => [
|
|
1400
1401
|
m("a", {
|
|
1401
1402
|
href: a.logoUrl,
|
|
1402
1403
|
class: "navbar-brand ms-3",
|
|
1403
1404
|
"data-cy": "logo"
|
|
1404
1405
|
}, [
|
|
1405
|
-
|
|
1406
|
+
x(a.$slots, "logo", {}, () => [
|
|
1406
1407
|
P(" Logo ")
|
|
1407
1408
|
])
|
|
1408
|
-
], 8,
|
|
1409
|
+
], 8, xt)
|
|
1409
1410
|
]),
|
|
1410
|
-
menubuttonicon:
|
|
1411
|
-
|
|
1412
|
-
|
|
1411
|
+
menubuttonicon: b(() => [
|
|
1412
|
+
x(a.$slots, "menubuttonicon", {}, () => [
|
|
1413
|
+
v(u(C), {
|
|
1413
1414
|
icon: "bi:list",
|
|
1414
1415
|
class: B(t.severity === "light" ? "text-black" : "text-white"),
|
|
1415
1416
|
height: "24",
|
|
@@ -1419,10 +1420,10 @@ const pt = { key: 0 }, yt = {
|
|
|
1419
1420
|
]),
|
|
1420
1421
|
_: 2
|
|
1421
1422
|
}, [
|
|
1422
|
-
|
|
1423
|
-
name:
|
|
1424
|
-
fn:
|
|
1425
|
-
|
|
1423
|
+
H(a.$slots, (i, d) => ({
|
|
1424
|
+
name: d,
|
|
1425
|
+
fn: b((f) => [
|
|
1426
|
+
x(a.$slots, d, Q(ee(f)))
|
|
1426
1427
|
])
|
|
1427
1428
|
}))
|
|
1428
1429
|
]), 1040, ["pt"]);
|
|
@@ -1447,11 +1448,11 @@ const pt = { key: 0 }, yt = {
|
|
|
1447
1448
|
$isDisabled: O.$isDisabled ?? !1
|
|
1448
1449
|
};
|
|
1449
1450
|
U(Z);
|
|
1450
|
-
}, l = de(), o = t, { errors: i, value:
|
|
1451
|
+
}, l = de(), o = t, { errors: i, value: d, errorMessage: f } = W(() => n.name, n.rules), r = M(!1), g = k(() => ({
|
|
1451
1452
|
multiple: !0,
|
|
1452
1453
|
label: "label",
|
|
1453
1454
|
trackBy: "id",
|
|
1454
|
-
showPointer: !
|
|
1455
|
+
showPointer: !r.value,
|
|
1455
1456
|
placeholder: l.searchable === null || l.searchable ? "Search" : "Select",
|
|
1456
1457
|
allowEmpty: !0,
|
|
1457
1458
|
selectValue: "",
|
|
@@ -1460,27 +1461,27 @@ const pt = { key: 0 }, yt = {
|
|
|
1460
1461
|
searchable: !!(l.searchable === null || l.searchable) && l.modelValue.length === l.options.length,
|
|
1461
1462
|
async: !1,
|
|
1462
1463
|
...l
|
|
1463
|
-
})),
|
|
1464
|
-
|
|
1464
|
+
})), y = k(() => `forge-multiselect-${n.severity}`), c = k(() => `multiselect__option ${r.value ? " multiselect__option--highlight" : ""} ${_.value ? " multiselect__option--selected" : ""}`), _ = k(() => g.value && !(g.value.multiple || !n.showSelectAll || g.value.async) ? !1 : l.modelValue.length === l.options.length), V = k(() => i.value.length > 0), T = k(() => !!((l.allowEmpty == null || l.allowEmpty) && n.showClearSelection && (g.value.multiple ? l.modelValue.length > 0 : l.modelValue))), I = () => r.value = !0, z = () => r.value = !1, N = () => {
|
|
1465
|
+
d.value = g.value.multiple ? [] : null, o("update:modelValue", d.value);
|
|
1465
1466
|
}, le = (U) => {
|
|
1466
1467
|
o("update:modelValue", n.selectValue ? U.map((O) => O[n.selectValue]) : U);
|
|
1467
|
-
}, ve = (U) => l.modelValue !== null ? l.modelValue.some((O) =>
|
|
1468
|
-
_.value ? N() : (
|
|
1468
|
+
}, ve = (U) => l.modelValue !== null ? l.modelValue.some((O) => g.value.selectValue ? U[n.selectValue] === O : U.id === O.id && U.label === O.label) : !1, be = () => {
|
|
1469
|
+
_.value ? N() : (d.value = [...l.options], o("update:modelValue", [...l.options]));
|
|
1469
1470
|
};
|
|
1470
1471
|
return (U, O) => {
|
|
1471
1472
|
const Z = me;
|
|
1472
1473
|
return s(), p(D, null, [
|
|
1473
|
-
|
|
1474
|
-
class: [
|
|
1474
|
+
v(u(Be), S(g.value, {
|
|
1475
|
+
class: [y.value, V.value ? "is-invalid" : ""],
|
|
1475
1476
|
"data-cy": "multiselect",
|
|
1476
1477
|
"onUpdate:modelValue": [
|
|
1477
1478
|
le,
|
|
1478
|
-
O[1] || (O[1] = (A) =>
|
|
1479
|
+
O[1] || (O[1] = (A) => j(d) ? d.value = A : null)
|
|
1479
1480
|
],
|
|
1480
|
-
modelValue:
|
|
1481
|
+
modelValue: u(d)
|
|
1481
1482
|
}), te({
|
|
1482
|
-
caret:
|
|
1483
|
-
|
|
1483
|
+
caret: b(({ toggle: A }) => [
|
|
1484
|
+
T.value ? (s(), w(u(C), {
|
|
1484
1485
|
key: 0,
|
|
1485
1486
|
icon: "bi:x",
|
|
1486
1487
|
class: "my-auto multiselect__clear-icon",
|
|
@@ -1489,16 +1490,16 @@ const pt = { key: 0 }, yt = {
|
|
|
1489
1490
|
height: "18px",
|
|
1490
1491
|
width: "18px"
|
|
1491
1492
|
})) : F("", !0),
|
|
1492
|
-
|
|
1493
|
+
v(u(C), {
|
|
1493
1494
|
icon: "bi:chevron-down",
|
|
1494
1495
|
onClick: A,
|
|
1495
1496
|
class: "multiselect__select"
|
|
1496
1497
|
}, null, 8, ["onClick"])
|
|
1497
1498
|
]),
|
|
1498
|
-
tag:
|
|
1499
|
+
tag: b(({ option: A, remove: K }) => [
|
|
1499
1500
|
m("div", Bt, [
|
|
1500
|
-
m("div", St,
|
|
1501
|
-
|
|
1501
|
+
m("div", St, h(A.label), 1),
|
|
1502
|
+
v(u(C), {
|
|
1502
1503
|
icon: "bi:x",
|
|
1503
1504
|
class: "my-auto multiselect__tag-icon",
|
|
1504
1505
|
onMousedown: G((za) => a(K, A), ["prevent", "stop"]),
|
|
@@ -1507,14 +1508,14 @@ const pt = { key: 0 }, yt = {
|
|
|
1507
1508
|
}, null, 8, ["onMousedown"])
|
|
1508
1509
|
])
|
|
1509
1510
|
]),
|
|
1510
|
-
default:
|
|
1511
|
-
(s(!0), p(D, null,
|
|
1511
|
+
default: b(() => [
|
|
1512
|
+
(s(!0), p(D, null, H(U.$slots, (A, K) => x(U.$slots, K, { slot: K })), 256))
|
|
1512
1513
|
]),
|
|
1513
1514
|
_: 2
|
|
1514
1515
|
}, [
|
|
1515
|
-
|
|
1516
|
+
g.value.multiple && U.showSelectAll && !g.value.async ? {
|
|
1516
1517
|
name: "beforeList",
|
|
1517
|
-
fn:
|
|
1518
|
+
fn: b(() => [
|
|
1518
1519
|
m("li", {
|
|
1519
1520
|
class: "multiselect__element",
|
|
1520
1521
|
onClick: be,
|
|
@@ -1523,10 +1524,10 @@ const pt = { key: 0 }, yt = {
|
|
|
1523
1524
|
"data-cy": "toggle-all"
|
|
1524
1525
|
}, [
|
|
1525
1526
|
m("span", {
|
|
1526
|
-
class: B(`${
|
|
1527
|
+
class: B(`${c.value}`)
|
|
1527
1528
|
}, [
|
|
1528
|
-
|
|
1529
|
-
default:
|
|
1529
|
+
v(Z, { value: _.value }, {
|
|
1530
|
+
default: b(() => [
|
|
1530
1531
|
_t
|
|
1531
1532
|
]),
|
|
1532
1533
|
_: 1
|
|
@@ -1536,9 +1537,9 @@ const pt = { key: 0 }, yt = {
|
|
|
1536
1537
|
]),
|
|
1537
1538
|
key: "0"
|
|
1538
1539
|
} : void 0,
|
|
1539
|
-
|
|
1540
|
+
g.value.multiple ? {
|
|
1540
1541
|
name: "option",
|
|
1541
|
-
fn:
|
|
1542
|
+
fn: b(({ option: A }) => [
|
|
1542
1543
|
m("div", {
|
|
1543
1544
|
"data-cy": A.label
|
|
1544
1545
|
}, [
|
|
@@ -1546,8 +1547,8 @@ const pt = { key: 0 }, yt = {
|
|
|
1546
1547
|
value: ve(A),
|
|
1547
1548
|
key: A
|
|
1548
1549
|
}, {
|
|
1549
|
-
default:
|
|
1550
|
-
m("div", Ft,
|
|
1550
|
+
default: b(() => [
|
|
1551
|
+
m("div", Ft, h(A[g.value.label]), 1)
|
|
1551
1552
|
]),
|
|
1552
1553
|
_: 2
|
|
1553
1554
|
}, 1032, ["value"]))
|
|
@@ -1559,7 +1560,7 @@ const pt = { key: 0 }, yt = {
|
|
|
1559
1560
|
L(m("small", {
|
|
1560
1561
|
"data-cy": "error",
|
|
1561
1562
|
class: "invalid-feedback"
|
|
1562
|
-
},
|
|
1563
|
+
}, h(u(f)), 513), [
|
|
1563
1564
|
[Y, V.value]
|
|
1564
1565
|
])
|
|
1565
1566
|
], 64);
|
|
@@ -1586,77 +1587,77 @@ const pt = { key: 0 }, yt = {
|
|
|
1586
1587
|
},
|
|
1587
1588
|
emits: ["update:modelValue"],
|
|
1588
1589
|
setup(e, { emit: t }) {
|
|
1589
|
-
const n = e, a = de(), l = t, o =
|
|
1590
|
-
l("update:modelValue",
|
|
1591
|
-
},
|
|
1592
|
-
|
|
1590
|
+
const n = e, a = de(), l = t, o = k(() => `${a.modelValue.length} selected`), i = k(() => a.modelValue.length), d = (r) => {
|
|
1591
|
+
l("update:modelValue", r);
|
|
1592
|
+
}, f = (r) => {
|
|
1593
|
+
d(a.modelValue.filter((g) => g.id !== r));
|
|
1593
1594
|
};
|
|
1594
|
-
return (
|
|
1595
|
-
const
|
|
1595
|
+
return (r, g) => {
|
|
1596
|
+
const y = E;
|
|
1596
1597
|
return s(), p("div", {
|
|
1597
|
-
class: B(
|
|
1598
|
+
class: B(r.orientation === "column" ? "row" : ""),
|
|
1598
1599
|
"data-cy": "multiselect-preview"
|
|
1599
1600
|
}, [
|
|
1600
1601
|
m("div", {
|
|
1601
|
-
class: B(
|
|
1602
|
+
class: B(r.orientation === "row" ? "col-12 mb-1" : "col"),
|
|
1602
1603
|
"data-cy": "multiselect-container"
|
|
1603
1604
|
}, [
|
|
1604
|
-
|
|
1605
|
+
v(Ct, {
|
|
1605
1606
|
"onUpdate:modelValue": [
|
|
1606
|
-
|
|
1607
|
-
|
|
1607
|
+
g[0] || (g[0] = (c) => d(c)),
|
|
1608
|
+
g[1] || (g[1] = (c) => r.$attrs.modelValue = c)
|
|
1608
1609
|
],
|
|
1609
|
-
modelValue:
|
|
1610
|
+
modelValue: r.$attrs.modelValue,
|
|
1610
1611
|
"limit-text": o.value,
|
|
1611
1612
|
options: n.options
|
|
1612
1613
|
}, {
|
|
1613
|
-
tag:
|
|
1614
|
-
P(
|
|
1614
|
+
tag: b(() => [
|
|
1615
|
+
P(h(""))
|
|
1615
1616
|
]),
|
|
1616
|
-
selection:
|
|
1617
|
-
|
|
1617
|
+
selection: b(() => [
|
|
1618
|
+
r.$attrs.modelValue.length > 0 ? (s(), p("span", Vt, h(i.value) + " items selected", 1)) : F("", !0)
|
|
1618
1619
|
]),
|
|
1619
|
-
default:
|
|
1620
|
-
(s(!0), p(D, null,
|
|
1620
|
+
default: b(() => [
|
|
1621
|
+
(s(!0), p(D, null, H(r.$slots, (c, _) => x(r.$slots, _, { slot: _ })), 256))
|
|
1621
1622
|
]),
|
|
1622
1623
|
_: 3
|
|
1623
1624
|
}, 8, ["modelValue", "limit-text", "options"]),
|
|
1624
|
-
|
|
1625
|
+
x(r.$slots, "after-multi-select")
|
|
1625
1626
|
], 2),
|
|
1626
1627
|
m("div", {
|
|
1627
|
-
class: B(
|
|
1628
|
+
class: B(r.orientation === "row" ? "col-12" : "col"),
|
|
1628
1629
|
"data-cy": "options-preview"
|
|
1629
1630
|
}, [
|
|
1630
1631
|
m("div", {
|
|
1631
|
-
style: he({ height:
|
|
1632
|
+
style: he({ height: r.height }),
|
|
1632
1633
|
class: "overflow-auto"
|
|
1633
1634
|
}, [
|
|
1634
1635
|
m("div", Tt, [
|
|
1635
|
-
|
|
1636
|
-
(s(!0), p(D, null,
|
|
1637
|
-
key:
|
|
1636
|
+
r.title ? (s(), p("div", Mt, h(r.title), 1)) : F("", !0),
|
|
1637
|
+
(s(!0), p(D, null, H(r.$attrs.modelValue, (c) => (s(), p("div", {
|
|
1638
|
+
key: c.id,
|
|
1638
1639
|
class: "p-2 item d-flex justify-content-between align-items-center"
|
|
1639
1640
|
}, [
|
|
1640
|
-
|
|
1641
|
-
m("span", Pt,
|
|
1641
|
+
x(r.$slots, "list-item", { item: c }, () => [
|
|
1642
|
+
m("span", Pt, h(c.shortLabel ? c.shortLabel : c.label), 1)
|
|
1642
1643
|
]),
|
|
1643
|
-
|
|
1644
|
+
r.canRemoveItemFromPreview ? (s(), w(y, {
|
|
1644
1645
|
key: 0,
|
|
1645
1646
|
link: "",
|
|
1646
1647
|
class: "m-0 p-0 d-flex align-items-center",
|
|
1647
|
-
onClick: (_) =>
|
|
1648
|
+
onClick: (_) => f(c.id)
|
|
1648
1649
|
}, {
|
|
1649
|
-
default:
|
|
1650
|
-
|
|
1650
|
+
default: b(() => [
|
|
1651
|
+
v(u(C), {
|
|
1651
1652
|
icon: "bi:x",
|
|
1652
1653
|
class: "close-icon",
|
|
1653
|
-
"data-cy": `close-icon-${
|
|
1654
|
+
"data-cy": `close-icon-${c.id}`
|
|
1654
1655
|
}, null, 8, ["data-cy"])
|
|
1655
1656
|
]),
|
|
1656
1657
|
_: 2
|
|
1657
1658
|
}, 1032, ["onClick"])) : F("", !0)
|
|
1658
1659
|
]))), 128)),
|
|
1659
|
-
|
|
1660
|
+
r.$attrs.modelValue.length === 0 ? (s(), p("div", It, "No Items Selected.")) : F("", !0)
|
|
1660
1661
|
])
|
|
1661
1662
|
], 4)
|
|
1662
1663
|
], 2)
|
|
@@ -1665,7 +1666,7 @@ const pt = { key: 0 }, yt = {
|
|
|
1665
1666
|
}
|
|
1666
1667
|
}), zt = { class: "d-flex justify-content-between pb-2" }, Ot = {
|
|
1667
1668
|
"data-cy": "title",
|
|
1668
|
-
class: "
|
|
1669
|
+
class: "my-auto"
|
|
1669
1670
|
}, Dt = {
|
|
1670
1671
|
"data-cy": "slot",
|
|
1671
1672
|
class: "d-flex align-items-center"
|
|
@@ -1677,9 +1678,9 @@ const pt = { key: 0 }, yt = {
|
|
|
1677
1678
|
setup(e) {
|
|
1678
1679
|
const t = e;
|
|
1679
1680
|
return (n, a) => (s(), p("div", zt, [
|
|
1680
|
-
m("
|
|
1681
|
+
m("h3", Ot, h(t.title), 1),
|
|
1681
1682
|
m("div", Dt, [
|
|
1682
|
-
|
|
1683
|
+
x(n.$slots, "default")
|
|
1683
1684
|
])
|
|
1684
1685
|
]));
|
|
1685
1686
|
}
|
|
@@ -1757,7 +1758,7 @@ const pt = { key: 0 }, yt = {
|
|
|
1757
1758
|
setup(e) {
|
|
1758
1759
|
const t = e, n = R(e, "modelValue"), a = () => {
|
|
1759
1760
|
n.value = null;
|
|
1760
|
-
}, l =
|
|
1761
|
+
}, l = k(() => ({
|
|
1761
1762
|
day: ({ context: o }) => ({
|
|
1762
1763
|
class: [
|
|
1763
1764
|
`text-center date-${t.severity === void 0 ? "primary" : t.severity}`,
|
|
@@ -1849,25 +1850,25 @@ const pt = { key: 0 }, yt = {
|
|
|
1849
1850
|
})
|
|
1850
1851
|
}));
|
|
1851
1852
|
return (o, i) => {
|
|
1852
|
-
const
|
|
1853
|
+
const d = Se;
|
|
1853
1854
|
return s(), p(D, null, [
|
|
1854
1855
|
m("span", Ut, [
|
|
1855
|
-
|
|
1856
|
+
x(o.$slots, "before")
|
|
1856
1857
|
]),
|
|
1857
1858
|
m("div", At, [
|
|
1858
|
-
|
|
1859
|
+
v(d, S({ ...t, ...o.$attrs }, {
|
|
1859
1860
|
pt: l.value,
|
|
1860
1861
|
modelValue: n.value,
|
|
1861
|
-
"onUpdate:modelValue": i[0] || (i[0] = (
|
|
1862
|
+
"onUpdate:modelValue": i[0] || (i[0] = (f) => n.value = f)
|
|
1862
1863
|
}), null, 16, ["pt", "modelValue"]),
|
|
1863
|
-
L(
|
|
1864
|
+
L(v(u(C), {
|
|
1864
1865
|
"data-cy": "icon",
|
|
1865
1866
|
icon: "bi:calendar4",
|
|
1866
1867
|
class: "position-absolute end-0 top-50 bottom-50 my-auto me-2 text-muted"
|
|
1867
1868
|
}, null, 512), [
|
|
1868
1869
|
[Y, t.showIcon]
|
|
1869
1870
|
]),
|
|
1870
|
-
L(
|
|
1871
|
+
L(v(u(C), {
|
|
1871
1872
|
"data-cy": "icon",
|
|
1872
1873
|
icon: "bi:x",
|
|
1873
1874
|
onClick: a,
|
|
@@ -1877,7 +1878,7 @@ const pt = { key: 0 }, yt = {
|
|
|
1877
1878
|
])
|
|
1878
1879
|
]),
|
|
1879
1880
|
m("span", Nt, [
|
|
1880
|
-
|
|
1881
|
+
x(o.$slots, "after")
|
|
1881
1882
|
])
|
|
1882
1883
|
], 64);
|
|
1883
1884
|
};
|
|
@@ -1889,10 +1890,10 @@ const pt = { key: 0 }, yt = {
|
|
|
1889
1890
|
currentCount: {}
|
|
1890
1891
|
},
|
|
1891
1892
|
setup(e) {
|
|
1892
|
-
const t = e, n =
|
|
1893
|
+
const t = e, n = k(() => t.maxCount - t.currentCount);
|
|
1893
1894
|
return (a, l) => (s(), p("div", {
|
|
1894
1895
|
class: B(n.value < 0 ? "text-danger" : "")
|
|
1895
|
-
}, "Remaining characters: " +
|
|
1896
|
+
}, "Remaining characters: " + h(n.value), 3));
|
|
1896
1897
|
}
|
|
1897
1898
|
}), Rt = /* @__PURE__ */ m("hr", null, null, -1), Lt = { class: "d-flex justify-content-between" }, vl = /* @__PURE__ */ $({
|
|
1898
1899
|
__name: "ForgeForm",
|
|
@@ -1906,7 +1907,7 @@ const pt = { key: 0 }, yt = {
|
|
|
1906
1907
|
hideCancel: { type: Boolean, default: !1 }
|
|
1907
1908
|
},
|
|
1908
1909
|
setup(e) {
|
|
1909
|
-
const t = e, n =
|
|
1910
|
+
const t = e, n = M(!1), a = M({
|
|
1910
1911
|
hasError: !1,
|
|
1911
1912
|
message: ""
|
|
1912
1913
|
});
|
|
@@ -1920,18 +1921,18 @@ const pt = { key: 0 }, yt = {
|
|
|
1920
1921
|
n.value = !1;
|
|
1921
1922
|
}
|
|
1922
1923
|
return (o, i) => {
|
|
1923
|
-
const
|
|
1924
|
+
const d = E;
|
|
1924
1925
|
return s(), p("form", S(o.$attrs, {
|
|
1925
1926
|
novalidate: "",
|
|
1926
1927
|
class: "position-relative shadow-sm border p-4 bg-white",
|
|
1927
1928
|
onSubmit: G(l, ["prevent"])
|
|
1928
1929
|
}), [
|
|
1929
1930
|
o.hideTitle ? F("", !0) : (s(), p(D, { key: 0 }, [
|
|
1930
|
-
|
|
1931
|
+
x(o.$slots, "title", {}, () => [
|
|
1931
1932
|
m("h3", {
|
|
1932
1933
|
class: B(o.titleClass),
|
|
1933
1934
|
"data-cy": "form-title"
|
|
1934
|
-
},
|
|
1935
|
+
}, h(o.title), 3)
|
|
1935
1936
|
]),
|
|
1936
1937
|
Rt
|
|
1937
1938
|
], 64)),
|
|
@@ -1940,41 +1941,41 @@ const pt = { key: 0 }, yt = {
|
|
|
1940
1941
|
severity: "danger",
|
|
1941
1942
|
"data-cy": "error"
|
|
1942
1943
|
}, {
|
|
1943
|
-
default:
|
|
1944
|
-
|
|
1944
|
+
default: b(() => [
|
|
1945
|
+
x(o.$slots, "error", {
|
|
1945
1946
|
error: a.value.message
|
|
1946
1947
|
}, () => [
|
|
1947
|
-
P(
|
|
1948
|
+
P(h(a.value.message), 1)
|
|
1948
1949
|
])
|
|
1949
1950
|
]),
|
|
1950
1951
|
_: 3
|
|
1951
1952
|
})) : F("", !0),
|
|
1952
|
-
|
|
1953
|
+
x(o.$slots, "default"),
|
|
1953
1954
|
m("div", Lt, [
|
|
1954
|
-
|
|
1955
|
-
o.hideCancel ? F("", !0) : (s(), w(
|
|
1955
|
+
x(o.$slots, "cancel", {}, () => [
|
|
1956
|
+
o.hideCancel ? F("", !0) : (s(), w(d, {
|
|
1956
1957
|
key: 0,
|
|
1957
1958
|
"data-cy": "cancel-btn",
|
|
1958
1959
|
type: "reset",
|
|
1959
1960
|
severity: "secondary",
|
|
1960
1961
|
outlined: "",
|
|
1961
|
-
onClick: i[0] || (i[0] = (
|
|
1962
|
+
onClick: i[0] || (i[0] = (f) => o.$emit("cancel"))
|
|
1962
1963
|
}, {
|
|
1963
|
-
default:
|
|
1964
|
-
P(
|
|
1964
|
+
default: b(() => [
|
|
1965
|
+
P(h(o.cancelText), 1)
|
|
1965
1966
|
]),
|
|
1966
1967
|
_: 1
|
|
1967
1968
|
}))
|
|
1968
1969
|
]),
|
|
1969
|
-
|
|
1970
|
-
|
|
1970
|
+
x(o.$slots, "submit", { submit: l }, () => [
|
|
1971
|
+
v(d, {
|
|
1971
1972
|
"data-cy": "submit-btn",
|
|
1972
1973
|
type: "submit",
|
|
1973
1974
|
severity: "primary",
|
|
1974
1975
|
class: "ms-auto"
|
|
1975
1976
|
}, {
|
|
1976
|
-
default:
|
|
1977
|
-
P(
|
|
1977
|
+
default: b(() => [
|
|
1978
|
+
P(h(o.submitText), 1)
|
|
1978
1979
|
]),
|
|
1979
1980
|
_: 1
|
|
1980
1981
|
})
|
|
@@ -1987,7 +1988,7 @@ const pt = { key: 0 }, yt = {
|
|
|
1987
1988
|
], 16);
|
|
1988
1989
|
};
|
|
1989
1990
|
}
|
|
1990
|
-
}),
|
|
1991
|
+
}), Ht = { class: "d-flex flex-column" }, jt = ["for"], bl = /* @__PURE__ */ $({
|
|
1991
1992
|
__name: "ForgeFormField",
|
|
1992
1993
|
props: {
|
|
1993
1994
|
name: {},
|
|
@@ -1998,55 +1999,55 @@ const pt = { key: 0 }, yt = {
|
|
|
1998
1999
|
placeholder: { default: "" }
|
|
1999
2000
|
},
|
|
2000
2001
|
setup(e) {
|
|
2001
|
-
const t = e, { errors: n, value: a, errorMessage: l } = W(() => t.name, t.rules), o =
|
|
2002
|
-
return (i,
|
|
2003
|
-
const
|
|
2004
|
-
return s(), p("div",
|
|
2002
|
+
const t = e, { errors: n, value: a, errorMessage: l } = W(() => t.name, t.rules), o = k(() => n.value.length > 0);
|
|
2003
|
+
return (i, d) => {
|
|
2004
|
+
const f = Ve, r = Ce, g = ne;
|
|
2005
|
+
return s(), p("div", Ht, [
|
|
2005
2006
|
t.type !== "checkbox" ? (s(), p("label", {
|
|
2006
2007
|
key: 0,
|
|
2007
2008
|
for: t.name
|
|
2008
|
-
},
|
|
2009
|
+
}, h(t.label), 9, jt)) : F("", !0),
|
|
2009
2010
|
t.type === "checkbox" ? (s(), w(me, S({
|
|
2010
2011
|
key: 1,
|
|
2011
2012
|
id: t.name,
|
|
2012
2013
|
rules: i.rules,
|
|
2013
2014
|
label: t.label
|
|
2014
|
-
}, i.$attrs), null, 16, ["id", "rules", "label"])) : t.type === "number" ? (s(), w(
|
|
2015
|
+
}, i.$attrs), null, 16, ["id", "rules", "label"])) : t.type === "number" ? (s(), w(u(ue), S({
|
|
2015
2016
|
key: 2,
|
|
2016
2017
|
id: t.name,
|
|
2017
2018
|
placeholder: t.placeholder,
|
|
2018
|
-
modelValue:
|
|
2019
|
-
"onUpdate:modelValue":
|
|
2019
|
+
modelValue: u(a),
|
|
2020
|
+
"onUpdate:modelValue": d[0] || (d[0] = (y) => j(a) ? a.value = y : null),
|
|
2020
2021
|
"input-class": { "is-invalid": o.value },
|
|
2021
2022
|
class: { "is-invalid": o.value }
|
|
2022
|
-
}, i.$attrs), null, 16, ["id", "placeholder", "modelValue", "input-class", "class"])) : t.type === "textarea" ? (s(), w(
|
|
2023
|
+
}, i.$attrs), null, 16, ["id", "placeholder", "modelValue", "input-class", "class"])) : t.type === "textarea" ? (s(), w(f, S({
|
|
2023
2024
|
key: 3,
|
|
2024
2025
|
id: t.name,
|
|
2025
2026
|
placeholder: t.placeholder,
|
|
2026
|
-
modelValue:
|
|
2027
|
-
"onUpdate:modelValue":
|
|
2027
|
+
modelValue: u(a),
|
|
2028
|
+
"onUpdate:modelValue": d[1] || (d[1] = (y) => j(a) ? a.value = y : null),
|
|
2028
2029
|
class: { "is-invalid": o.value }
|
|
2029
|
-
}, i.$attrs), null, 16, ["id", "placeholder", "modelValue", "class"])) : t.type === "mask" ? (s(), w(
|
|
2030
|
+
}, i.$attrs), null, 16, ["id", "placeholder", "modelValue", "class"])) : t.type === "mask" ? (s(), w(r, S({
|
|
2030
2031
|
key: 4,
|
|
2031
2032
|
id: t.name,
|
|
2032
2033
|
placeholder: t.placeholder,
|
|
2033
|
-
modelValue:
|
|
2034
|
-
"onUpdate:modelValue":
|
|
2034
|
+
modelValue: u(a),
|
|
2035
|
+
"onUpdate:modelValue": d[2] || (d[2] = (y) => j(a) ? a.value = y : null),
|
|
2035
2036
|
mask: t.mask,
|
|
2036
2037
|
class: { "is-invalid": o.value }
|
|
2037
|
-
}, i.$attrs), null, 16, ["id", "placeholder", "modelValue", "mask", "class"])) : t.type === "text" ? (s(), w(
|
|
2038
|
+
}, i.$attrs), null, 16, ["id", "placeholder", "modelValue", "mask", "class"])) : t.type === "text" ? (s(), w(g, S({
|
|
2038
2039
|
key: 5,
|
|
2039
2040
|
id: t.name,
|
|
2040
2041
|
placeholder: t.placeholder,
|
|
2041
|
-
modelValue:
|
|
2042
|
-
"onUpdate:modelValue":
|
|
2042
|
+
modelValue: u(a),
|
|
2043
|
+
"onUpdate:modelValue": d[3] || (d[3] = (y) => j(a) ? a.value = y : null),
|
|
2043
2044
|
class: { "is-invalid": o.value }
|
|
2044
2045
|
}, i.$attrs), null, 16, ["id", "placeholder", "modelValue", "class"])) : F("", !0),
|
|
2045
2046
|
t.type !== "checkbox" ? L((s(), p("small", {
|
|
2046
2047
|
key: 6,
|
|
2047
2048
|
"data-cy": "error",
|
|
2048
2049
|
class: "invalid-feedback"
|
|
2049
|
-
},
|
|
2050
|
+
}, h(u(l)), 513)), [
|
|
2050
2051
|
[Y, o.value]
|
|
2051
2052
|
]) : F("", !0)
|
|
2052
2053
|
]);
|
|
@@ -2082,14 +2083,14 @@ const pt = { key: 0 }, yt = {
|
|
|
2082
2083
|
setup(e) {
|
|
2083
2084
|
const t = e, { errors: n, value: a, errorMessage: l } = W(() => t.name, t.rules);
|
|
2084
2085
|
a.value = t.modelValue;
|
|
2085
|
-
const o =
|
|
2086
|
+
const o = k(() => n.value.length > 0), i = k(() => ({
|
|
2086
2087
|
inputtoken: "list-unstyled",
|
|
2087
2088
|
input: "border-0",
|
|
2088
|
-
container: ({ props:
|
|
2089
|
+
container: ({ props: d }) => ({
|
|
2089
2090
|
class: [
|
|
2090
2091
|
"form-control mb-0 d-flex",
|
|
2091
2092
|
{
|
|
2092
|
-
disabled:
|
|
2093
|
+
disabled: d.disabled,
|
|
2093
2094
|
"is-invalid": o.value
|
|
2094
2095
|
}
|
|
2095
2096
|
]
|
|
@@ -2113,19 +2114,19 @@ const pt = { key: 0 }, yt = {
|
|
|
2113
2114
|
]
|
|
2114
2115
|
}
|
|
2115
2116
|
}));
|
|
2116
|
-
return (
|
|
2117
|
-
const
|
|
2117
|
+
return (d, f) => {
|
|
2118
|
+
const r = Te;
|
|
2118
2119
|
return s(), p(D, null, [
|
|
2119
|
-
|
|
2120
|
+
v(r, S({ ...t, ...d.$attrs }, {
|
|
2120
2121
|
pt: i.value,
|
|
2121
|
-
"model-value":
|
|
2122
|
-
"onUpdate:modelValue":
|
|
2122
|
+
"model-value": u(a),
|
|
2123
|
+
"onUpdate:modelValue": f[0] || (f[0] = (g) => j(a) ? a.value = g : null)
|
|
2123
2124
|
}), {
|
|
2124
|
-
removetokenicon:
|
|
2125
|
-
L(
|
|
2125
|
+
removetokenicon: b(({ removeCallback: g }) => [
|
|
2126
|
+
L(v(u(C), {
|
|
2126
2127
|
icon: "bi:x",
|
|
2127
2128
|
class: "cursor-pointer",
|
|
2128
|
-
onClick:
|
|
2129
|
+
onClick: g
|
|
2129
2130
|
}, null, 8, ["onClick"]), [
|
|
2130
2131
|
[Y, !t.disabled]
|
|
2131
2132
|
])
|
|
@@ -2135,7 +2136,7 @@ const pt = { key: 0 }, yt = {
|
|
|
2135
2136
|
L(m("small", {
|
|
2136
2137
|
"data-cy": "error",
|
|
2137
2138
|
class: "text-invalid"
|
|
2138
|
-
},
|
|
2139
|
+
}, h(u(l)), 513), [
|
|
2139
2140
|
[Y, o.value]
|
|
2140
2141
|
])
|
|
2141
2142
|
], 64);
|
|
@@ -2156,7 +2157,7 @@ const pt = { key: 0 }, yt = {
|
|
|
2156
2157
|
unstyled: { type: Boolean }
|
|
2157
2158
|
},
|
|
2158
2159
|
setup(e) {
|
|
2159
|
-
const t = e, n =
|
|
2160
|
+
const t = e, n = k(() => t.striped ? "progress-bar-striped" : null), a = k(() => t.animate ? "progress-bar-animated" : null), l = k(() => {
|
|
2160
2161
|
switch (t.severity) {
|
|
2161
2162
|
case "brand":
|
|
2162
2163
|
return "bg-brand";
|
|
@@ -2175,7 +2176,7 @@ const pt = { key: 0 }, yt = {
|
|
|
2175
2176
|
default:
|
|
2176
2177
|
return "bg-primary";
|
|
2177
2178
|
}
|
|
2178
|
-
}), o =
|
|
2179
|
+
}), o = k(() => ({
|
|
2179
2180
|
root: {
|
|
2180
2181
|
style: t.pixelWidth ? `width: ${t.pixelWidth}px` : ""
|
|
2181
2182
|
},
|
|
@@ -2183,11 +2184,11 @@ const pt = { key: 0 }, yt = {
|
|
|
2183
2184
|
class: [l.value, n.value, a.value]
|
|
2184
2185
|
}
|
|
2185
2186
|
}));
|
|
2186
|
-
return (i,
|
|
2187
|
-
const
|
|
2188
|
-
return s(), w(
|
|
2189
|
-
default:
|
|
2190
|
-
|
|
2187
|
+
return (i, d) => {
|
|
2188
|
+
const f = Me;
|
|
2189
|
+
return s(), w(f, S({ ...i.$attrs, ...t }, { pt: o.value }), {
|
|
2190
|
+
default: b(() => [
|
|
2191
|
+
x(i.$slots, "default")
|
|
2191
2192
|
]),
|
|
2192
2193
|
_: 3
|
|
2193
2194
|
}, 16, ["pt"]);
|
|
@@ -2205,7 +2206,7 @@ const pt = { key: 0 }, yt = {
|
|
|
2205
2206
|
class: `d-flex shadow m-2 align-items-center widget--${t.size} bg-${t.severity}`
|
|
2206
2207
|
}), [
|
|
2207
2208
|
m("span", qt, [
|
|
2208
|
-
|
|
2209
|
+
x(n.$slots, "default")
|
|
2209
2210
|
])
|
|
2210
2211
|
], 16));
|
|
2211
2212
|
}
|
|
@@ -2228,7 +2229,7 @@ const pt = { key: 0 }, yt = {
|
|
|
2228
2229
|
},
|
|
2229
2230
|
emits: ["update:currentStep"],
|
|
2230
2231
|
setup(e, { emit: t }) {
|
|
2231
|
-
const n = t, a = e, l =
|
|
2232
|
+
const n = t, a = e, l = M(a.currentStep), o = () => {
|
|
2232
2233
|
do
|
|
2233
2234
|
l.value--;
|
|
2234
2235
|
while (a.model[l.value].disabled);
|
|
@@ -2239,89 +2240,89 @@ const pt = { key: 0 }, yt = {
|
|
|
2239
2240
|
l.value++;
|
|
2240
2241
|
while (a.model[l.value].disabled);
|
|
2241
2242
|
n("update:currentStep", l.value);
|
|
2242
|
-
},
|
|
2243
|
-
const
|
|
2244
|
-
return !(
|
|
2245
|
-
}),
|
|
2246
|
-
menuitem: (
|
|
2243
|
+
}, d = k(() => {
|
|
2244
|
+
const r = a.model.findIndex((g) => !g.disabled);
|
|
2245
|
+
return !(r < l.value && r > -1);
|
|
2246
|
+
}), f = k(() => ({
|
|
2247
|
+
menuitem: (r) => ({
|
|
2247
2248
|
class: [{
|
|
2248
|
-
"cursor-pointer": !
|
|
2249
|
+
"cursor-pointer": !r.context.disabled
|
|
2249
2250
|
}]
|
|
2250
2251
|
}),
|
|
2251
|
-
step: (
|
|
2252
|
+
step: (r) => ({
|
|
2252
2253
|
class: [
|
|
2253
2254
|
"d-flex align-items-center justify-content-center mb-2 step",
|
|
2254
2255
|
{
|
|
2255
|
-
inactive:
|
|
2256
|
-
"bg-primary text-white":
|
|
2257
|
-
"bg-brand text-white":
|
|
2258
|
-
"bg-secondary text-white":
|
|
2259
|
-
"bg-success text-white":
|
|
2260
|
-
"bg-warning text-white":
|
|
2261
|
-
"bg-danger text-white":
|
|
2262
|
-
"bg-info text-white":
|
|
2256
|
+
inactive: r.context.disabled,
|
|
2257
|
+
"bg-primary text-white": r.context.index === l.value && (a.severity === void 0 || a.severity === "primary"),
|
|
2258
|
+
"bg-brand text-white": r.context.index === l.value && a.severity === "brand",
|
|
2259
|
+
"bg-secondary text-white": r.context.index === l.value && a.severity === "secondary",
|
|
2260
|
+
"bg-success text-white": r.context.index === l.value && a.severity === "success",
|
|
2261
|
+
"bg-warning text-white": r.context.index === l.value && a.severity === "warning",
|
|
2262
|
+
"bg-danger text-white": r.context.index === l.value && a.severity === "danger",
|
|
2263
|
+
"bg-info text-white": r.context.index === l.value && a.severity === "info"
|
|
2263
2264
|
}
|
|
2264
2265
|
]
|
|
2265
2266
|
}),
|
|
2266
|
-
label: (
|
|
2267
|
+
label: (r) => ({
|
|
2267
2268
|
class: [
|
|
2268
2269
|
"h5",
|
|
2269
2270
|
{
|
|
2270
|
-
"border-bottom border-2 border-primary":
|
|
2271
|
-
"border-bottom border-2 border-brand":
|
|
2272
|
-
"border-bottom border-2 border-secondary":
|
|
2273
|
-
"border-bottom border-2 border-success":
|
|
2274
|
-
"border-bottom border-2 border-warning":
|
|
2275
|
-
"border-bottom border-2 border-danger":
|
|
2276
|
-
"border-bottom border-2 border-info":
|
|
2271
|
+
"border-bottom border-2 border-primary": r.context.index === l.value && (a.severity === void 0 || a.severity === "primary"),
|
|
2272
|
+
"border-bottom border-2 border-brand": r.context.index === l.value && a.severity === "brand",
|
|
2273
|
+
"border-bottom border-2 border-secondary": r.context.index === l.value && a.severity === "secondary",
|
|
2274
|
+
"border-bottom border-2 border-success": r.context.index === l.value && a.severity === "success",
|
|
2275
|
+
"border-bottom border-2 border-warning": r.context.index === l.value && a.severity === "warning",
|
|
2276
|
+
"border-bottom border-2 border-danger": r.context.index === l.value && a.severity === "danger",
|
|
2277
|
+
"border-bottom border-2 border-info": r.context.index === l.value && a.severity === "info"
|
|
2277
2278
|
}
|
|
2278
2279
|
]
|
|
2279
2280
|
})
|
|
2280
2281
|
}));
|
|
2281
|
-
return (
|
|
2282
|
-
const
|
|
2282
|
+
return (r, g) => {
|
|
2283
|
+
const y = E, c = Ie, _ = Pe;
|
|
2283
2284
|
return s(), p("div", Gt, [
|
|
2284
2285
|
m("div", Kt, [
|
|
2285
|
-
y
|
|
2286
|
+
v(y, {
|
|
2286
2287
|
severity: a.severity,
|
|
2287
|
-
disabled:
|
|
2288
|
+
disabled: d.value,
|
|
2288
2289
|
onClick: o,
|
|
2289
2290
|
class: "rounded-circle py-2 me-4",
|
|
2290
2291
|
"data-cy": "back-button"
|
|
2291
2292
|
}, {
|
|
2292
|
-
default:
|
|
2293
|
-
|
|
2293
|
+
default: b(() => [
|
|
2294
|
+
v(u(C), {
|
|
2294
2295
|
icon: "bi:chevron-left",
|
|
2295
2296
|
class: "mb-1"
|
|
2296
2297
|
})
|
|
2297
2298
|
]),
|
|
2298
2299
|
_: 1
|
|
2299
2300
|
}, 8, ["severity", "disabled"]),
|
|
2300
|
-
|
|
2301
|
+
v(c, {
|
|
2301
2302
|
"active-step": l.value,
|
|
2302
|
-
"onUpdate:activeStep":
|
|
2303
|
+
"onUpdate:activeStep": g[0] || (g[0] = (V) => l.value = V),
|
|
2303
2304
|
model: a.model,
|
|
2304
|
-
pt:
|
|
2305
|
+
pt: f.value,
|
|
2305
2306
|
readonly: !1
|
|
2306
2307
|
}, null, 8, ["active-step", "model", "pt"])
|
|
2307
2308
|
]),
|
|
2308
|
-
|
|
2309
|
-
(s(!0), p(D, null,
|
|
2310
|
-
key:
|
|
2309
|
+
v(_),
|
|
2310
|
+
(s(!0), p(D, null, H(a.model, (V, T) => (s(), p("div", {
|
|
2311
|
+
key: T,
|
|
2311
2312
|
class: "w-100"
|
|
2312
2313
|
}, [
|
|
2313
|
-
|
|
2314
|
+
T === l.value ? x(r.$slots, V.key ?? V.label, {
|
|
2314
2315
|
key: 0,
|
|
2315
2316
|
nextStep: i,
|
|
2316
2317
|
previousStep: o
|
|
2317
2318
|
}, () => [
|
|
2318
|
-
|
|
2319
|
+
v(ae, {
|
|
2319
2320
|
severity: "info",
|
|
2320
2321
|
"data-cy": "alert"
|
|
2321
2322
|
}, {
|
|
2322
|
-
default:
|
|
2323
|
-
P(" Please add Slot Content for the key " +
|
|
2324
|
-
y
|
|
2323
|
+
default: b(() => [
|
|
2324
|
+
P(" Please add Slot Content for the key " + h(V.key ?? V.label) + " ", 1),
|
|
2325
|
+
v(y, {
|
|
2325
2326
|
severity: "primary",
|
|
2326
2327
|
label: "Next",
|
|
2327
2328
|
onClick: i,
|
|
@@ -2343,7 +2344,7 @@ const pt = { key: 0 }, yt = {
|
|
|
2343
2344
|
clickable: { type: Boolean, default: !1 }
|
|
2344
2345
|
},
|
|
2345
2346
|
setup(e) {
|
|
2346
|
-
const t = e, n =
|
|
2347
|
+
const t = e, n = k(() => `${t.severity === void 0 ? "tile-primary" : `tile-${t.severity}`} ${t.barPosition === "none" ? "border-0" : `tile-bar-${t.barPosition}`}`), a = k(() => `${t.severity === void 0 ? "tile-primary border-primary" : `tile-${t.severity} border-${t.severity}`} ${t.barPosition === "none" ? "" : `tile-bar-${t.barPosition}`}`);
|
|
2347
2348
|
return (l, o) => {
|
|
2348
2349
|
const i = E;
|
|
2349
2350
|
return t.clickable ? (s(), w(i, {
|
|
@@ -2353,9 +2354,9 @@ const pt = { key: 0 }, yt = {
|
|
|
2353
2354
|
unstyled: "",
|
|
2354
2355
|
"data-cy": "button-tile"
|
|
2355
2356
|
}, {
|
|
2356
|
-
default:
|
|
2357
|
+
default: b(() => [
|
|
2357
2358
|
m("div", Wt, [
|
|
2358
|
-
|
|
2359
|
+
x(l.$slots, "default", {}, () => [
|
|
2359
2360
|
P("Tile Content")
|
|
2360
2361
|
])
|
|
2361
2362
|
])
|
|
@@ -2367,7 +2368,7 @@ const pt = { key: 0 }, yt = {
|
|
|
2367
2368
|
"data-cy": "tile"
|
|
2368
2369
|
}, [
|
|
2369
2370
|
m("div", Zt, [
|
|
2370
|
-
|
|
2371
|
+
x(l.$slots, "default", {}, () => [
|
|
2371
2372
|
P("Tile Content")
|
|
2372
2373
|
])
|
|
2373
2374
|
])
|
|
@@ -2395,29 +2396,29 @@ const Jt = {
|
|
|
2395
2396
|
setup(e, { emit: t }) {
|
|
2396
2397
|
const n = t, a = e, l = (i) => {
|
|
2397
2398
|
n("update:perPage", i.value);
|
|
2398
|
-
}, o =
|
|
2399
|
+
}, o = k(() => {
|
|
2399
2400
|
const i = Math.ceil(a.total / a.perPage);
|
|
2400
2401
|
return `${i} ${X(i, "page")}`;
|
|
2401
2402
|
});
|
|
2402
|
-
return (i,
|
|
2403
|
+
return (i, d) => (s(), p("div", Jt, [
|
|
2403
2404
|
P(" Number of results per page "),
|
|
2404
2405
|
m("div", Xt, [
|
|
2405
|
-
|
|
2406
|
+
v(u(se), {
|
|
2406
2407
|
options: a.pageSizes,
|
|
2407
2408
|
"model-value": a.perPage,
|
|
2408
|
-
onChange:
|
|
2409
|
+
onChange: d[0] || (d[0] = (f) => l(f))
|
|
2409
2410
|
}, null, 8, ["options", "model-value"])
|
|
2410
2411
|
]),
|
|
2411
2412
|
a.total ? (s(), p("div", Qt, [
|
|
2412
2413
|
ea,
|
|
2413
|
-
m("span", ta,
|
|
2414
|
+
m("span", ta, h(a.total) + " " + h(u(X)(a.total, "result")) + " across " + h(o.value), 1)
|
|
2414
2415
|
])) : F("", !0)
|
|
2415
2416
|
]));
|
|
2416
2417
|
}
|
|
2417
2418
|
}), la = { "data-cy": "above-table-slot" }, oa = { class: "d-flex" }, na = { class: "d-flex align-items-end mb-2" }, sa = { key: 0 }, ia = { class: "ms-auto" }, ra = {
|
|
2418
2419
|
class: "d-flex",
|
|
2419
2420
|
"data-cy": "legacy-page-size"
|
|
2420
|
-
}, da = /* @__PURE__ */ m("span", { class: "me-2 my-auto text-nowrap" }, "Page Size:", -1), ua = { "data-cy": "legacy-total" },
|
|
2421
|
+
}, da = /* @__PURE__ */ m("span", { class: "me-2 my-auto text-nowrap" }, "Page Size:", -1), ua = { "data-cy": "legacy-total" }, kl = /* @__PURE__ */ $({
|
|
2421
2422
|
__name: "ForgeTable",
|
|
2422
2423
|
props: {
|
|
2423
2424
|
value: {},
|
|
@@ -2425,6 +2426,8 @@ const Jt = {
|
|
|
2425
2426
|
total: {},
|
|
2426
2427
|
showClearButton: { type: Boolean, default: !1 },
|
|
2427
2428
|
showExporterButton: { type: Boolean, default: !1 },
|
|
2429
|
+
stickyHeader: { type: Boolean, default: !0 },
|
|
2430
|
+
severity: {},
|
|
2428
2431
|
dataKey: {},
|
|
2429
2432
|
rows: {},
|
|
2430
2433
|
first: {},
|
|
@@ -2496,53 +2499,65 @@ const Jt = {
|
|
|
2496
2499
|
},
|
|
2497
2500
|
emits: ["update:filters"],
|
|
2498
2501
|
setup(e, { emit: t }) {
|
|
2499
|
-
const n = t, a = e, l =
|
|
2500
|
-
for (const
|
|
2501
|
-
a.filters[
|
|
2502
|
-
|
|
2503
|
-
},
|
|
2504
|
-
n("update:filters",
|
|
2505
|
-
},
|
|
2506
|
-
const
|
|
2507
|
-
return `${
|
|
2508
|
-
}),
|
|
2502
|
+
const n = t, a = e, l = M([10, 20, 50, 100]), o = M(20), i = M(), d = () => {
|
|
2503
|
+
for (const c in a.filters)
|
|
2504
|
+
a.filters[c].value = null;
|
|
2505
|
+
f(a.filters);
|
|
2506
|
+
}, f = (c) => {
|
|
2507
|
+
n("update:filters", c);
|
|
2508
|
+
}, r = k(() => {
|
|
2509
|
+
const c = Math.ceil((a.total ?? a.value.length) / o.value);
|
|
2510
|
+
return `${c} ${X(c, "page")}`;
|
|
2511
|
+
}), g = () => {
|
|
2509
2512
|
i.value.exportCSV();
|
|
2510
|
-
}
|
|
2511
|
-
|
|
2513
|
+
}, y = k(() => ({
|
|
2514
|
+
thead: () => ({
|
|
2515
|
+
class: [
|
|
2516
|
+
{
|
|
2517
|
+
"sticky-header": a.stickyHeader
|
|
2518
|
+
}
|
|
2519
|
+
],
|
|
2520
|
+
style: "position: "
|
|
2521
|
+
})
|
|
2522
|
+
}));
|
|
2523
|
+
return (c, _) => (s(), p(D, null, [
|
|
2512
2524
|
m("span", la, [
|
|
2513
|
-
|
|
2525
|
+
x(c.$slots, "above-table")
|
|
2514
2526
|
]),
|
|
2515
|
-
|
|
2527
|
+
v(u(ze), S({
|
|
2528
|
+
class: ["w-100", `${a.severity ? `forge-table-${a.severity}` : ""}`]
|
|
2529
|
+
}, { ...a, ...c.$attrs }, {
|
|
2516
2530
|
rows: o.value,
|
|
2517
|
-
"total-records":
|
|
2531
|
+
"total-records": c.total,
|
|
2518
2532
|
"filter-display": a.filters ? "row" : void 0,
|
|
2519
2533
|
ref_key: "forgeTable",
|
|
2520
2534
|
ref: i,
|
|
2521
|
-
"onUpdate:filters":
|
|
2535
|
+
"onUpdate:filters": f,
|
|
2536
|
+
pt: y.value,
|
|
2522
2537
|
"data-cy": "table"
|
|
2523
2538
|
}), te({
|
|
2524
|
-
header:
|
|
2539
|
+
header: b(() => [
|
|
2525
2540
|
m("div", oa, [
|
|
2526
2541
|
m("div", na, [
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
total:
|
|
2542
|
+
c.paginator && !c.legacyPaginationFooter ? (s(), p("span", sa, [
|
|
2543
|
+
v(aa, {
|
|
2544
|
+
total: c.total ?? c.value.length,
|
|
2530
2545
|
"page-sizes": l.value,
|
|
2531
2546
|
"per-page": o.value,
|
|
2532
|
-
"onUpdate:perPage":
|
|
2547
|
+
"onUpdate:perPage": _[0] || (_[0] = (V) => o.value = V)
|
|
2533
2548
|
}, null, 8, ["total", "page-sizes", "per-page"])
|
|
2534
2549
|
])) : F("", !0)
|
|
2535
2550
|
]),
|
|
2536
2551
|
m("div", ia, [
|
|
2537
|
-
|
|
2552
|
+
c.showClearButton ? (s(), w(u(E), {
|
|
2538
2553
|
key: 0,
|
|
2539
2554
|
outlined: "",
|
|
2540
|
-
class: B(
|
|
2541
|
-
onClick:
|
|
2555
|
+
class: B(c.showExporterButton ? "me-2" : ""),
|
|
2556
|
+
onClick: d,
|
|
2542
2557
|
"data-cy": "clear-all"
|
|
2543
2558
|
}, {
|
|
2544
|
-
default:
|
|
2545
|
-
|
|
2559
|
+
default: b(() => [
|
|
2560
|
+
v(u(C), {
|
|
2546
2561
|
icon: "bi:funnel-fill",
|
|
2547
2562
|
width: "24",
|
|
2548
2563
|
height: "24"
|
|
@@ -2551,14 +2566,14 @@ const Jt = {
|
|
|
2551
2566
|
]),
|
|
2552
2567
|
_: 1
|
|
2553
2568
|
}, 8, ["class"])) : F("", !0),
|
|
2554
|
-
|
|
2569
|
+
c.showExporterButton ? (s(), w(u(E), {
|
|
2555
2570
|
key: 1,
|
|
2556
2571
|
outlined: "",
|
|
2557
|
-
onClick:
|
|
2572
|
+
onClick: g,
|
|
2558
2573
|
"data-cy": "exporter"
|
|
2559
2574
|
}, {
|
|
2560
|
-
default:
|
|
2561
|
-
|
|
2575
|
+
default: b(() => [
|
|
2576
|
+
v(u(C), {
|
|
2562
2577
|
icon: "typcn:export",
|
|
2563
2578
|
width: "24",
|
|
2564
2579
|
height: "24"
|
|
@@ -2570,43 +2585,43 @@ const Jt = {
|
|
|
2570
2585
|
])
|
|
2571
2586
|
])
|
|
2572
2587
|
]),
|
|
2573
|
-
default:
|
|
2574
|
-
|
|
2588
|
+
default: b(() => [
|
|
2589
|
+
x(c.$slots, "default")
|
|
2575
2590
|
]),
|
|
2576
2591
|
_: 2
|
|
2577
2592
|
}, [
|
|
2578
|
-
|
|
2579
|
-
name:
|
|
2580
|
-
fn:
|
|
2581
|
-
|
|
2593
|
+
H(c.$slots, (V, T) => ({
|
|
2594
|
+
name: T,
|
|
2595
|
+
fn: b((I) => [
|
|
2596
|
+
x(c.$slots, T, Q(ee(I || {})))
|
|
2582
2597
|
])
|
|
2583
2598
|
})),
|
|
2584
|
-
|
|
2599
|
+
c.legacyPaginationFooter ? {
|
|
2585
2600
|
name: "paginatorstart",
|
|
2586
|
-
fn:
|
|
2601
|
+
fn: b(() => [
|
|
2587
2602
|
m("span", ra, [
|
|
2588
2603
|
da,
|
|
2589
|
-
|
|
2604
|
+
v(u(se), {
|
|
2590
2605
|
options: l.value,
|
|
2591
2606
|
modelValue: o.value,
|
|
2592
|
-
"onUpdate:modelValue":
|
|
2607
|
+
"onUpdate:modelValue": _[1] || (_[1] = (V) => o.value = V),
|
|
2593
2608
|
class: "ms-2"
|
|
2594
2609
|
}, null, 8, ["options", "modelValue"])
|
|
2595
2610
|
])
|
|
2596
2611
|
]),
|
|
2597
2612
|
key: "0"
|
|
2598
2613
|
} : void 0,
|
|
2599
|
-
|
|
2614
|
+
c.legacyPaginationFooter ? {
|
|
2600
2615
|
name: "paginatorend",
|
|
2601
|
-
fn:
|
|
2602
|
-
m("span", ua,
|
|
2616
|
+
fn: b(() => [
|
|
2617
|
+
m("span", ua, h(c.total ?? c.value.length) + " " + h(u(X)(c.total ?? c.value.length, "result")) + " across " + h(r.value), 1)
|
|
2603
2618
|
]),
|
|
2604
2619
|
key: "1"
|
|
2605
2620
|
} : void 0
|
|
2606
|
-
]), 1040, ["rows", "total-records", "filter-display"])
|
|
2621
|
+
]), 1040, ["class", "rows", "total-records", "filter-display", "pt"])
|
|
2607
2622
|
], 64));
|
|
2608
2623
|
}
|
|
2609
|
-
}),
|
|
2624
|
+
}), xl = /* @__PURE__ */ $({
|
|
2610
2625
|
__name: "ForgeFilterHeader",
|
|
2611
2626
|
props: {
|
|
2612
2627
|
dataType: {},
|
|
@@ -2619,27 +2634,27 @@ const Jt = {
|
|
|
2619
2634
|
"show-icon": !1,
|
|
2620
2635
|
"show-on-focus": !0,
|
|
2621
2636
|
class: "w-100"
|
|
2622
|
-
}), null, 16)) : t.dataType === "select" ? (s(), w(
|
|
2637
|
+
}), null, 16)) : t.dataType === "select" ? (s(), w(u(se), S({ key: 2 }, t.$attrs, {
|
|
2623
2638
|
options: t.dropdownOptions,
|
|
2624
2639
|
class: "dropdown-input w-100"
|
|
2625
|
-
}), null, 16, ["options"])) : t.dataType === "multiselect" ? (s(), w(
|
|
2640
|
+
}), null, 16, ["options"])) : t.dataType === "multiselect" ? (s(), w(u(Oe), S({ key: 3 }, t.$attrs, {
|
|
2626
2641
|
options: t.dropdownOptions,
|
|
2627
2642
|
showToggleAll: !1,
|
|
2628
2643
|
placeholder: " ",
|
|
2629
2644
|
filter: "",
|
|
2630
2645
|
class: "w-100 dropdown-input"
|
|
2631
|
-
}), null, 16, ["options"])) : (s(), w(
|
|
2646
|
+
}), null, 16, ["options"])) : (s(), w(u(ne), S({ key: 4 }, t.$attrs, { class: "w-100" }), null, 16));
|
|
2632
2647
|
};
|
|
2633
2648
|
}
|
|
2634
2649
|
});
|
|
2635
2650
|
function ye(e, t, n, a) {
|
|
2636
2651
|
const l = t.flatMap((o) => o.file);
|
|
2637
2652
|
return t = t.map((o) => ({ ...o, status: o.status == "Duplicate" ? "Not Uploaded" : o.status })), e.forEach((o) => {
|
|
2638
|
-
const i = l.findIndex((
|
|
2639
|
-
let
|
|
2640
|
-
i === -1 ? ((!n.includes(o.type) || !(o.size <= a)) && (
|
|
2653
|
+
const i = l.findIndex((f) => f.name === o.name);
|
|
2654
|
+
let d = "Not Uploaded";
|
|
2655
|
+
i === -1 ? ((!n.includes(o.type) || !(o.size <= a)) && (d = n.includes(o.type) ? "InvalidFileSize" : "InvalidFileType"), t.unshift({
|
|
2641
2656
|
file: o,
|
|
2642
|
-
status:
|
|
2657
|
+
status: d,
|
|
2643
2658
|
blobFileName: null
|
|
2644
2659
|
})) : t[i].status = "Duplicate";
|
|
2645
2660
|
}), t;
|
|
@@ -2685,11 +2700,11 @@ const ya = { class: "d-flex justify-content-between" }, va = ["accept", "disable
|
|
|
2685
2700
|
}),
|
|
2686
2701
|
emits: ["update:modelValue"],
|
|
2687
2702
|
setup(e) {
|
|
2688
|
-
const t = R(e, "modelValue"), n =
|
|
2703
|
+
const t = R(e, "modelValue"), n = k(() => e.maxFileInput <= t.value.length), a = (l) => {
|
|
2689
2704
|
t.value = ye(l, t.value, e.acceptedFileTypes, e.maxFileInput);
|
|
2690
2705
|
};
|
|
2691
2706
|
return (l, o) => (s(), p("div", ya, [
|
|
2692
|
-
|
|
2707
|
+
x(l.$slots, "message"),
|
|
2693
2708
|
m("div", null, [
|
|
2694
2709
|
m("input", {
|
|
2695
2710
|
id: "file-input",
|
|
@@ -2705,8 +2720,8 @@ const ya = { class: "d-flex justify-content-between" }, va = ["accept", "disable
|
|
|
2705
2720
|
id: "file-input-button",
|
|
2706
2721
|
for: "file-input"
|
|
2707
2722
|
}, [
|
|
2708
|
-
|
|
2709
|
-
|
|
2723
|
+
x(l.$slots, "button-content", {}, () => [
|
|
2724
|
+
v(u(C), {
|
|
2710
2725
|
icon: "bi:upload",
|
|
2711
2726
|
class: "me-2",
|
|
2712
2727
|
height: "20px",
|
|
@@ -2720,7 +2735,7 @@ const ya = { class: "d-flex justify-content-between" }, va = ["accept", "disable
|
|
|
2720
2735
|
class: "ms-auto",
|
|
2721
2736
|
key: l.acceptedFileTypes.length,
|
|
2722
2737
|
id: "accepted-file-types"
|
|
2723
|
-
}, "Accepted File Types: " +
|
|
2738
|
+
}, "Accepted File Types: " + h(l.acceptedFileTypes.map((i) => i.split("/").pop()).join(", ")), 1)) : F("", !0)
|
|
2724
2739
|
]));
|
|
2725
2740
|
}
|
|
2726
2741
|
}), fa = {
|
|
@@ -2742,18 +2757,18 @@ const ya = { class: "d-flex justify-content-between" }, va = ["accept", "disable
|
|
|
2742
2757
|
}),
|
|
2743
2758
|
emits: ["update:modelValue"],
|
|
2744
2759
|
setup(e) {
|
|
2745
|
-
const t = R(e, "modelValue"), n =
|
|
2760
|
+
const t = R(e, "modelValue"), n = M(!1), a = k(() => e.maxFileInput <= t.value.length), l = (o) => {
|
|
2746
2761
|
n.value = !1, o.dataTransfer.files.length > e.maxFileInput || a.value ? o.preventDefault() : t.value = ye([...o.dataTransfer.files], t.value, e.acceptedFileTypes, e.maxFileSize);
|
|
2747
2762
|
};
|
|
2748
2763
|
return (o, i) => (s(), p("div", {
|
|
2749
2764
|
id: "drag-drop-area",
|
|
2750
2765
|
class: B(`${n.value ? "border-2 border-primary bg-body-tertiary" : ""} mt-3 file-container border-dashed border-2`),
|
|
2751
|
-
onDragleave: i[0] || (i[0] = G((
|
|
2752
|
-
onDragover: i[1] || (i[1] = G((
|
|
2766
|
+
onDragleave: i[0] || (i[0] = G((d) => n.value = !1, ["prevent"])),
|
|
2767
|
+
onDragover: i[1] || (i[1] = G((d) => n.value = !0, ["prevent"])),
|
|
2753
2768
|
onDrop: G(l, ["prevent"])
|
|
2754
2769
|
}, [
|
|
2755
2770
|
t.value.length === 0 ? (s(), p("div", fa, [
|
|
2756
|
-
|
|
2771
|
+
v(u(C), {
|
|
2757
2772
|
icon: "bi:upload",
|
|
2758
2773
|
class: "me-2",
|
|
2759
2774
|
height: "20px",
|
|
@@ -2761,11 +2776,11 @@ const ya = { class: "d-flex justify-content-between" }, va = ["accept", "disable
|
|
|
2761
2776
|
}),
|
|
2762
2777
|
P(" Drag and drop files here ")
|
|
2763
2778
|
])) : (s(), p("div", ga, [
|
|
2764
|
-
|
|
2779
|
+
x(o.$slots, "default")
|
|
2765
2780
|
]))
|
|
2766
2781
|
], 34));
|
|
2767
2782
|
}
|
|
2768
|
-
}), wa = { class: "d-flex align-items-center me-2" },
|
|
2783
|
+
}), wa = { class: "d-flex align-items-center me-2" }, ka = /* @__PURE__ */ $({
|
|
2769
2784
|
__name: "UploadStatus",
|
|
2770
2785
|
props: {
|
|
2771
2786
|
fileSize: {},
|
|
@@ -2774,7 +2789,7 @@ const ya = { class: "d-flex justify-content-between" }, va = ["accept", "disable
|
|
|
2774
2789
|
uploadStatus: {}
|
|
2775
2790
|
},
|
|
2776
2791
|
setup(e) {
|
|
2777
|
-
const t =
|
|
2792
|
+
const t = k(() => e.uploadStatus === "Failed" || e.uploadStatus === "InvalidFileType" || e.uploadStatus === "InvalidFileSize" ? "danger" : "warning"), n = k(() => {
|
|
2778
2793
|
switch (e.uploadStatus) {
|
|
2779
2794
|
case "InvalidFileType":
|
|
2780
2795
|
return "Upload Failed: File type is not accepted.";
|
|
@@ -2797,8 +2812,8 @@ const ya = { class: "d-flex justify-content-between" }, va = ["accept", "disable
|
|
|
2797
2812
|
animate: "",
|
|
2798
2813
|
striped: ""
|
|
2799
2814
|
}, {
|
|
2800
|
-
default:
|
|
2801
|
-
P(
|
|
2815
|
+
default: b(() => [
|
|
2816
|
+
P(h((a.bytesUploaded / a.fileSize * 100).toFixed(0)) + "%", 1)
|
|
2802
2817
|
]),
|
|
2803
2818
|
_: 1
|
|
2804
2819
|
})) : F("", !0),
|
|
@@ -2808,14 +2823,14 @@ const ya = { class: "d-flex justify-content-between" }, va = ["accept", "disable
|
|
|
2808
2823
|
severity: t.value,
|
|
2809
2824
|
class: "mb-0 w-75 ms-auto"
|
|
2810
2825
|
}, {
|
|
2811
|
-
default:
|
|
2812
|
-
P(
|
|
2826
|
+
default: b(() => [
|
|
2827
|
+
P(h(n.value), 1)
|
|
2813
2828
|
]),
|
|
2814
2829
|
_: 1
|
|
2815
2830
|
}, 8, ["severity"])) : F("", !0)
|
|
2816
2831
|
]));
|
|
2817
2832
|
}
|
|
2818
|
-
}),
|
|
2833
|
+
}), xa = ["data-cy"], _a = { class: "ms-3 d-flex flex-column" }, $a = {
|
|
2819
2834
|
key: 1,
|
|
2820
2835
|
id: "file-name"
|
|
2821
2836
|
}, Fa = {
|
|
@@ -2843,27 +2858,27 @@ const ya = { class: "d-flex justify-content-between" }, va = ["accept", "disable
|
|
|
2843
2858
|
}),
|
|
2844
2859
|
emits: /* @__PURE__ */ q(["deleted"], ["update:file", "update:blobFileName", "update:uploadStatus"]),
|
|
2845
2860
|
setup(e, { emit: t }) {
|
|
2846
|
-
const n = R(e, "file"), a = R(e, "blobFileName"), l = R(e, "uploadStatus"), o = t, i =
|
|
2861
|
+
const n = R(e, "file"), a = R(e, "blobFileName"), l = R(e, "uploadStatus"), o = t, i = M(n.value.name), d = M(""), f = M(0), r = M(), g = k(() => e.acceptedFileTypes.includes(n.value.type)), y = k(() => n.value.size <= e.maxFileSize), c = () => {
|
|
2847
2862
|
n.value = new File([n.value], i.value, { type: n.value.type, lastModified: (/* @__PURE__ */ new Date()).valueOf() });
|
|
2848
2863
|
}, _ = async () => {
|
|
2849
|
-
if (!
|
|
2850
|
-
l.value =
|
|
2864
|
+
if (!g.value || !y.value) {
|
|
2865
|
+
l.value = g.value ? "InvalidFileSize" : "InvalidFileType";
|
|
2851
2866
|
return;
|
|
2852
2867
|
}
|
|
2853
|
-
l.value = "Preparing",
|
|
2854
|
-
const [
|
|
2855
|
-
if (!
|
|
2868
|
+
l.value = "Preparing", r.value = new AbortController();
|
|
2869
|
+
const [T, I] = await e.getFileUrlAction(n.value.name);
|
|
2870
|
+
if (!T) {
|
|
2856
2871
|
l.value = "Failed";
|
|
2857
2872
|
return;
|
|
2858
2873
|
}
|
|
2859
2874
|
try {
|
|
2860
2875
|
l.value = "Uploading";
|
|
2861
|
-
const z = new ce(
|
|
2862
|
-
abortSignal:
|
|
2863
|
-
onProgress: (le) =>
|
|
2876
|
+
const z = new ce(T), N = {
|
|
2877
|
+
abortSignal: r.value.signal,
|
|
2878
|
+
onProgress: (le) => f.value = le.loadedBytes,
|
|
2864
2879
|
tags: { temp: "true" }
|
|
2865
2880
|
};
|
|
2866
|
-
await z.uploadData(n.value, N),
|
|
2881
|
+
await z.uploadData(n.value, N), d.value = T, l.value = "Uploaded", a.value = I;
|
|
2867
2882
|
} catch (z) {
|
|
2868
2883
|
if (z.name === "AbortError") {
|
|
2869
2884
|
l.value = "Aborted";
|
|
@@ -2872,26 +2887,26 @@ const ya = { class: "d-flex justify-content-between" }, va = ["accept", "disable
|
|
|
2872
2887
|
l.value = "Failed";
|
|
2873
2888
|
}
|
|
2874
2889
|
}, V = async () => {
|
|
2875
|
-
await ca(l.value,
|
|
2890
|
+
await ca(l.value, d.value), o("deleted", n.value);
|
|
2876
2891
|
};
|
|
2877
2892
|
return oe(() => {
|
|
2878
2893
|
e.autoUploadToBlob && _();
|
|
2879
|
-
}), (
|
|
2894
|
+
}), (T, I) => {
|
|
2880
2895
|
const z = E;
|
|
2881
2896
|
return s(), p("div", {
|
|
2882
2897
|
class: "py-4 px-3 d-flex",
|
|
2883
2898
|
"data-cy": `file-info-${n.value.name}`
|
|
2884
2899
|
}, [
|
|
2885
2900
|
m("div", null, [
|
|
2886
|
-
|
|
2901
|
+
u(ma)(n.value.type) ? (s(), w(u(De), {
|
|
2887
2902
|
key: 0,
|
|
2888
2903
|
id: "thumbnail-image",
|
|
2889
2904
|
"image-class": "image-file-thumbnail border",
|
|
2890
|
-
src:
|
|
2905
|
+
src: u(pa)(n.value),
|
|
2891
2906
|
alt: n.value.name,
|
|
2892
2907
|
width: "75px",
|
|
2893
2908
|
preview: ""
|
|
2894
|
-
}, null, 8, ["src", "alt"])) : (s(), w(
|
|
2909
|
+
}, null, 8, ["src", "alt"])) : (s(), w(u(C), {
|
|
2895
2910
|
key: 1,
|
|
2896
2911
|
id: "file-earmark",
|
|
2897
2912
|
icon: "bi:file-earmark",
|
|
@@ -2901,34 +2916,34 @@ const ya = { class: "d-flex justify-content-between" }, va = ["accept", "disable
|
|
|
2901
2916
|
]),
|
|
2902
2917
|
m("div", _a, [
|
|
2903
2918
|
m("div", null, [
|
|
2904
|
-
|
|
2919
|
+
T.editableFileName ? (s(), w(kt, {
|
|
2905
2920
|
key: 0,
|
|
2906
2921
|
id: "edit-file-name",
|
|
2907
2922
|
modelValue: i.value,
|
|
2908
2923
|
"onUpdate:modelValue": I[0] || (I[0] = (N) => i.value = N),
|
|
2909
|
-
rules:
|
|
2924
|
+
rules: T.customFileNameRules,
|
|
2910
2925
|
name: n.value.name,
|
|
2911
|
-
"complete-action":
|
|
2912
|
-
}, null, 8, ["modelValue", "rules", "name"])) : (s(), p("span", $a,
|
|
2926
|
+
"complete-action": c
|
|
2927
|
+
}, null, 8, ["modelValue", "rules", "name"])) : (s(), p("span", $a, h(n.value.name), 1))
|
|
2913
2928
|
]),
|
|
2914
|
-
m("span", Fa, "File type: " +
|
|
2915
|
-
m("span", Ba, "File size: " +
|
|
2929
|
+
m("span", Fa, "File type: " + h(n.value.type.split("/").pop()), 1),
|
|
2930
|
+
m("span", Ba, "File size: " + h(u(ie)(n.value.size)), 1)
|
|
2916
2931
|
]),
|
|
2917
2932
|
m("div", Sa, [
|
|
2918
|
-
(s(), w(
|
|
2933
|
+
(s(), w(ka, {
|
|
2919
2934
|
key: l.value,
|
|
2920
2935
|
"file-size": n.value.size,
|
|
2921
2936
|
"upload-status": l.value,
|
|
2922
|
-
"bytes-uploaded":
|
|
2923
|
-
"max-file-size":
|
|
2937
|
+
"bytes-uploaded": f.value,
|
|
2938
|
+
"max-file-size": T.maxFileSize
|
|
2924
2939
|
}, null, 8, ["file-size", "upload-status", "bytes-uploaded", "max-file-size"])),
|
|
2925
2940
|
l.value === "Not Uploaded" || l.value === "Failed" || l.value === "Duplicate" || l.value === "Aborted" ? (s(), w(z, {
|
|
2926
2941
|
key: 0,
|
|
2927
2942
|
link: "",
|
|
2928
2943
|
onClick: _
|
|
2929
2944
|
}, {
|
|
2930
|
-
default:
|
|
2931
|
-
|
|
2945
|
+
default: b(() => [
|
|
2946
|
+
v(u(C), {
|
|
2932
2947
|
icon: l.value === "Not Uploaded" || l.value === "Duplicate" ? "bi:upload" : "bi:arrow-clockwise"
|
|
2933
2948
|
}, null, 8, ["icon"])
|
|
2934
2949
|
]),
|
|
@@ -2937,10 +2952,10 @@ const ya = { class: "d-flex justify-content-between" }, va = ["accept", "disable
|
|
|
2937
2952
|
l.value === "Uploading" ? (s(), w(z, {
|
|
2938
2953
|
key: 1,
|
|
2939
2954
|
link: "",
|
|
2940
|
-
onClick: I[1] || (I[1] = (N) =>
|
|
2955
|
+
onClick: I[1] || (I[1] = (N) => r.value.value.abort())
|
|
2941
2956
|
}, {
|
|
2942
|
-
default:
|
|
2943
|
-
|
|
2957
|
+
default: b(() => [
|
|
2958
|
+
v(u(C), { icon: "bi:x-circle-fill" })
|
|
2944
2959
|
]),
|
|
2945
2960
|
_: 1
|
|
2946
2961
|
})) : (s(), w(z, {
|
|
@@ -2949,13 +2964,13 @@ const ya = { class: "d-flex justify-content-between" }, va = ["accept", "disable
|
|
|
2949
2964
|
onClick: V,
|
|
2950
2965
|
id: "delete-button"
|
|
2951
2966
|
}, {
|
|
2952
|
-
default:
|
|
2953
|
-
|
|
2967
|
+
default: b(() => [
|
|
2968
|
+
v(u(C), { icon: "bi:trash" })
|
|
2954
2969
|
]),
|
|
2955
2970
|
_: 1
|
|
2956
2971
|
}))
|
|
2957
2972
|
])
|
|
2958
|
-
], 8,
|
|
2973
|
+
], 8, xa);
|
|
2959
2974
|
};
|
|
2960
2975
|
}
|
|
2961
2976
|
}), Va = { class: "d-flex justify-content-end mt-1" }, Ta = { id: "max-file-size" }, Ma = /* @__PURE__ */ $({
|
|
@@ -2965,7 +2980,7 @@ const ya = { class: "d-flex justify-content-between" }, va = ["accept", "disable
|
|
|
2965
2980
|
},
|
|
2966
2981
|
setup(e) {
|
|
2967
2982
|
return (t, n) => (s(), p("div", Va, [
|
|
2968
|
-
m("div", Ta, "Max file size: " +
|
|
2983
|
+
m("div", Ta, "Max file size: " + h(u(ie)(t.maxFileSize)), 1)
|
|
2969
2984
|
]));
|
|
2970
2985
|
}
|
|
2971
2986
|
}), Pa = { "data-cy": "file-uploader" }, Ia = { key: 0 }, _l = /* @__PURE__ */ $({
|
|
@@ -2989,36 +3004,36 @@ const ya = { class: "d-flex justify-content-between" }, va = ["accept", "disable
|
|
|
2989
3004
|
t.value = t.value.filter((o) => o.file != l);
|
|
2990
3005
|
};
|
|
2991
3006
|
return (l, o) => (s(), p("div", Pa, [
|
|
2992
|
-
|
|
3007
|
+
v(ba, S(n, {
|
|
2993
3008
|
modelValue: t.value,
|
|
2994
3009
|
"onUpdate:modelValue": o[0] || (o[0] = (i) => t.value = i)
|
|
2995
3010
|
}), null, 16, ["modelValue"]),
|
|
2996
3011
|
l.showDragDropArea ? (s(), p("div", Ia, [
|
|
2997
|
-
|
|
3012
|
+
v(ha, {
|
|
2998
3013
|
"max-file-input": n.maxFileInput,
|
|
2999
3014
|
"max-file-size": n.maxFileSize,
|
|
3000
3015
|
"accepted-file-types": n.acceptedFileTypes,
|
|
3001
3016
|
modelValue: t.value,
|
|
3002
3017
|
"onUpdate:modelValue": o[1] || (o[1] = (i) => t.value = i)
|
|
3003
3018
|
}, {
|
|
3004
|
-
default:
|
|
3005
|
-
(s(!0), p(D, null,
|
|
3019
|
+
default: b(() => [
|
|
3020
|
+
(s(!0), p(D, null, H(t.value, ({ file: i }, d) => (s(), p("span", null, [
|
|
3006
3021
|
(s(), w(Ca, S({
|
|
3007
3022
|
key: i.name,
|
|
3008
|
-
class:
|
|
3009
|
-
file: t.value[
|
|
3010
|
-
"onUpdate:file": (
|
|
3011
|
-
"blob-file-name": t.value[
|
|
3012
|
-
"onUpdate:blobFileName": (
|
|
3013
|
-
"upload-status": t.value[
|
|
3014
|
-
"onUpdate:uploadStatus": (
|
|
3023
|
+
class: d === t.value.length - 1 || t.value.length == 1 ? "" : "border-bottom",
|
|
3024
|
+
file: t.value[d].file,
|
|
3025
|
+
"onUpdate:file": (f) => t.value[d].file = f,
|
|
3026
|
+
"blob-file-name": t.value[d].blobFileName,
|
|
3027
|
+
"onUpdate:blobFileName": (f) => t.value[d].blobFileName = f,
|
|
3028
|
+
"upload-status": t.value[d].status,
|
|
3029
|
+
"onUpdate:uploadStatus": (f) => t.value[d].status = f,
|
|
3015
3030
|
ref_for: !0
|
|
3016
3031
|
}, n, { onDeleted: a }), null, 16, ["class", "file", "onUpdate:file", "blob-file-name", "onUpdate:blobFileName", "upload-status", "onUpdate:uploadStatus"]))
|
|
3017
3032
|
]))), 256))
|
|
3018
3033
|
]),
|
|
3019
3034
|
_: 1
|
|
3020
3035
|
}, 8, ["max-file-input", "max-file-size", "accepted-file-types", "modelValue"]),
|
|
3021
|
-
|
|
3036
|
+
v(Ma, {
|
|
3022
3037
|
"max-file-size": n.maxFileSize
|
|
3023
3038
|
}, null, 8, ["max-file-size"])
|
|
3024
3039
|
])) : F("", !0)
|
|
@@ -3033,10 +3048,10 @@ export {
|
|
|
3033
3048
|
fl as ForgeChips,
|
|
3034
3049
|
Et as ForgeDatepicker,
|
|
3035
3050
|
_l as ForgeFileUploader,
|
|
3036
|
-
|
|
3051
|
+
xl as ForgeFilterHeader,
|
|
3037
3052
|
vl as ForgeForm,
|
|
3038
3053
|
bl as ForgeFormField,
|
|
3039
|
-
|
|
3054
|
+
kt as ForgeInlineEditor,
|
|
3040
3055
|
dl as ForgeLink,
|
|
3041
3056
|
pe as ForgeLoader,
|
|
3042
3057
|
ul as ForgeModal,
|
|
@@ -3048,6 +3063,6 @@ export {
|
|
|
3048
3063
|
yl as ForgeRemainingCharacters,
|
|
3049
3064
|
gl as ForgeStatWidget,
|
|
3050
3065
|
hl as ForgeStepper,
|
|
3051
|
-
|
|
3066
|
+
kl as ForgeTable,
|
|
3052
3067
|
wl as ForgeTile
|
|
3053
3068
|
};
|