@3squared/forge-ui-3 2.8.2 → 2.10.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 +748 -713
- package/dist/index.d.ts +1 -1
- package/dist/src/components/ForgeFormField.vue.d.ts +22 -1
- package/dist/src/components/ForgeModal.vue.d.ts +5 -1
- package/dist/src/components/ForgeSelectButton.vue.d.ts +6 -5
- package/dist/src/passthroughs/SelectButton.pt.d.ts +4 -2
- package/dist/src/types/forge-types.d.ts +0 -1
- package/package.json +3 -3
- package/src/types/forge-types.ts +0 -1
package/dist/esm/forge-ui-3.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import he from "primevue/message";
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
import { Icon as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
2
|
+
import { defineComponent as $, openBlock as r, createBlock as f, normalizeProps as J, guardReactiveProps as K, withCtx as b, createElementVNode as m, normalizeClass as F, unref as u, createCommentVNode as z, createVNode as x, renderSlot as w, ref as _, createElementBlock as v, Fragment as O, mergeProps as C, renderList as N, mergeModels as U, useModel as D, computed as T, createTextVNode as I, toDisplayString as k, withDirectives as H, vShow as Y, createSlots as ie, onMounted as le, isRef as we, withKeys as X, normalizeStyle as ke, withModifiers as G, watch as ce, h as $e, useTemplateRef as Be } from "vue";
|
|
3
|
+
import { Icon as j } from "@iconify/vue";
|
|
4
|
+
import A from "primevue/button";
|
|
5
|
+
import Fe from "primevue/toast";
|
|
6
6
|
import Se from "primevue/autocomplete";
|
|
7
7
|
import Ce from "primevue/checkbox";
|
|
8
8
|
import { useField as ee } from "vee-validate";
|
|
@@ -881,6 +881,7 @@ const We = {
|
|
|
881
881
|
"btn",
|
|
882
882
|
{
|
|
883
883
|
"btn-primary": e.context.active,
|
|
884
|
+
"border-danger": e.parent.props.invalid,
|
|
884
885
|
"btn-outline-primary": !e.context.active
|
|
885
886
|
}
|
|
886
887
|
]
|
|
@@ -1038,7 +1039,7 @@ const We = {
|
|
|
1038
1039
|
pcFilterContainer: { root: "dropdown-item" },
|
|
1039
1040
|
filterIcon: "d-none"
|
|
1040
1041
|
}
|
|
1041
|
-
},
|
|
1042
|
+
}, Bt = {
|
|
1042
1043
|
treeSelect: {
|
|
1043
1044
|
root: ({ props: e }) => ({
|
|
1044
1045
|
class: [
|
|
@@ -1086,7 +1087,7 @@ const We = {
|
|
|
1086
1087
|
filterIcon: "d-none"
|
|
1087
1088
|
}
|
|
1088
1089
|
}
|
|
1089
|
-
},
|
|
1090
|
+
}, Ft = {
|
|
1090
1091
|
fieldset: {
|
|
1091
1092
|
root: () => ({
|
|
1092
1093
|
class: [
|
|
@@ -1130,7 +1131,7 @@ const We = {
|
|
|
1130
1131
|
accordionContent: {
|
|
1131
1132
|
root: "mt-2 mx-4 mb-4"
|
|
1132
1133
|
}
|
|
1133
|
-
},
|
|
1134
|
+
}, Oi = {
|
|
1134
1135
|
...We,
|
|
1135
1136
|
...mt,
|
|
1136
1137
|
...Ye,
|
|
@@ -1161,14 +1162,14 @@ const We = {
|
|
|
1161
1162
|
...st,
|
|
1162
1163
|
...kt,
|
|
1163
1164
|
...tt,
|
|
1164
|
-
...Bt,
|
|
1165
1165
|
...Ft,
|
|
1166
|
+
...Bt,
|
|
1166
1167
|
...$t,
|
|
1167
1168
|
...St,
|
|
1168
1169
|
directives: {
|
|
1169
1170
|
...ft
|
|
1170
1171
|
}
|
|
1171
|
-
}, se = /* @__PURE__ */
|
|
1172
|
+
}, se = /* @__PURE__ */ $({
|
|
1172
1173
|
__name: "ForgeAlert",
|
|
1173
1174
|
props: {
|
|
1174
1175
|
severity: { default: "primary" },
|
|
@@ -1189,31 +1190,31 @@ const We = {
|
|
|
1189
1190
|
const t = e;
|
|
1190
1191
|
return (a, i) => {
|
|
1191
1192
|
const l = he;
|
|
1192
|
-
return
|
|
1193
|
+
return r(), f(l, J(K({ ...a.$attrs, ...t })), {
|
|
1193
1194
|
icon: b(() => [
|
|
1194
1195
|
m("div", {
|
|
1195
|
-
class:
|
|
1196
|
+
class: F(t.icon ? "me-2 pe-1" : "")
|
|
1196
1197
|
}, [
|
|
1197
|
-
t.icon ? (
|
|
1198
|
+
t.icon ? (r(), f(u(j), {
|
|
1198
1199
|
key: 0,
|
|
1199
1200
|
"data-cy": "message-icon",
|
|
1200
1201
|
icon: t.icon,
|
|
1201
|
-
class:
|
|
1202
|
+
class: F(`text-${t.severity}`),
|
|
1202
1203
|
height: 35
|
|
1203
|
-
}, null, 8, ["icon", "class"])) :
|
|
1204
|
+
}, null, 8, ["icon", "class"])) : z("", !0)
|
|
1204
1205
|
], 2)
|
|
1205
1206
|
]),
|
|
1206
1207
|
closeicon: b(() => [
|
|
1207
|
-
x(u(
|
|
1208
|
+
x(u(j), { icon: "bi:x" })
|
|
1208
1209
|
]),
|
|
1209
1210
|
default: b(() => [
|
|
1210
|
-
|
|
1211
|
+
w(a.$slots, "default")
|
|
1211
1212
|
]),
|
|
1212
1213
|
_: 3
|
|
1213
1214
|
}, 16);
|
|
1214
1215
|
};
|
|
1215
1216
|
}
|
|
1216
|
-
}),
|
|
1217
|
+
}), Ni = /* @__PURE__ */ $({
|
|
1217
1218
|
__name: "ForgeActionButton",
|
|
1218
1219
|
props: {
|
|
1219
1220
|
action: {},
|
|
@@ -1222,7 +1223,7 @@ const We = {
|
|
|
1222
1223
|
params: { default: Array }
|
|
1223
1224
|
},
|
|
1224
1225
|
setup(e) {
|
|
1225
|
-
const t =
|
|
1226
|
+
const t = _(!1), a = e, i = async () => {
|
|
1226
1227
|
t.value = !0;
|
|
1227
1228
|
try {
|
|
1228
1229
|
await a.action.apply(this, a.params);
|
|
@@ -1232,30 +1233,30 @@ const We = {
|
|
|
1232
1233
|
t.value = !1;
|
|
1233
1234
|
};
|
|
1234
1235
|
return (l, n) => {
|
|
1235
|
-
const o =
|
|
1236
|
-
return
|
|
1237
|
-
x(o,
|
|
1236
|
+
const o = A;
|
|
1237
|
+
return r(), v(O, null, [
|
|
1238
|
+
x(o, C({ ...a, ...l.$attrs }, {
|
|
1238
1239
|
loading: t.value,
|
|
1239
1240
|
disabled: t.value || a.disabled,
|
|
1240
1241
|
onClick: i
|
|
1241
1242
|
}), null, 16, ["loading", "disabled"]),
|
|
1242
|
-
x(u(
|
|
1243
|
+
x(u(Fe))
|
|
1243
1244
|
], 64);
|
|
1244
1245
|
};
|
|
1245
1246
|
}
|
|
1246
|
-
}),
|
|
1247
|
+
}), Ui = /* @__PURE__ */ $({
|
|
1247
1248
|
__name: "ForgeAutoComplete",
|
|
1248
1249
|
setup(e) {
|
|
1249
|
-
return (t, a) => (
|
|
1250
|
+
return (t, a) => (r(), f(u(Se), C({ ...t.$attrs, ...t.$props }, { inputClass: "form-control border-0" }), {
|
|
1250
1251
|
default: b(() => [
|
|
1251
|
-
(
|
|
1252
|
+
(r(!0), v(O, null, N(t.$slots, (i, l) => w(t.$slots, l, { slot: l })), 256))
|
|
1252
1253
|
]),
|
|
1253
1254
|
_: 3
|
|
1254
1255
|
}, 16));
|
|
1255
1256
|
}
|
|
1256
|
-
}), Ct = { class: "d-flex flex-column" }, zt = ["for"], fe = /* @__PURE__ */
|
|
1257
|
+
}), Ct = { class: "d-flex flex-column" }, zt = ["for"], fe = /* @__PURE__ */ $({
|
|
1257
1258
|
__name: "ForgeCheckbox",
|
|
1258
|
-
props: /* @__PURE__ */
|
|
1259
|
+
props: /* @__PURE__ */ U({
|
|
1259
1260
|
label: { default: "" },
|
|
1260
1261
|
value: {},
|
|
1261
1262
|
modelValue: {},
|
|
@@ -1297,43 +1298,43 @@ const We = {
|
|
|
1297
1298
|
}
|
|
1298
1299
|
), o = (p, c) => {
|
|
1299
1300
|
(t.disabled || t.readonly) && p.preventDefault(), t.name ? i(c) : a.value = c;
|
|
1300
|
-
},
|
|
1301
|
+
}, s = T(() => l.value.length > 0);
|
|
1301
1302
|
return (p, c) => {
|
|
1302
|
-
const
|
|
1303
|
-
return
|
|
1304
|
-
m("div",
|
|
1303
|
+
const g = Ce;
|
|
1304
|
+
return r(), v("div", Ct, [
|
|
1305
|
+
m("div", C({
|
|
1305
1306
|
class: "d-flex",
|
|
1306
1307
|
"data-cy": "checkbox-container",
|
|
1307
|
-
onClick: c[2] || (c[2] = (
|
|
1308
|
+
onClick: c[2] || (c[2] = (d) => o(d, a.value))
|
|
1308
1309
|
}, { ...p.$attrs }), [
|
|
1309
|
-
x(
|
|
1310
|
+
x(g, C({ ...t }, {
|
|
1310
1311
|
binary: "",
|
|
1311
1312
|
modelValue: a.value,
|
|
1312
|
-
"onUpdate:modelValue": c[0] || (c[0] = (
|
|
1313
|
+
"onUpdate:modelValue": c[0] || (c[0] = (d) => a.value = d),
|
|
1313
1314
|
"input-id": t.name,
|
|
1314
|
-
"input-class": { "is-invalid":
|
|
1315
|
+
"input-class": { "is-invalid": s.value },
|
|
1315
1316
|
class: t.disabled || t.readonly ? "" : "cursor-pointer"
|
|
1316
1317
|
}), null, 16, ["modelValue", "input-id", "input-class", "class"]),
|
|
1317
1318
|
m("label", {
|
|
1318
1319
|
for: t.name,
|
|
1319
|
-
onClick: c[1] || (c[1] = (
|
|
1320
|
-
class:
|
|
1320
|
+
onClick: c[1] || (c[1] = (d) => o(d, !a.value)),
|
|
1321
|
+
class: F([`${t.disabled || t.readonly ? "opacity-50" : "cursor-pointer"} ${s.value ? "text-danger-dark" : ""}`, "w-100 my-auto"])
|
|
1321
1322
|
}, [
|
|
1322
|
-
|
|
1323
|
-
|
|
1323
|
+
w(p.$slots, "default", {}, () => [
|
|
1324
|
+
I(k(t.label), 1)
|
|
1324
1325
|
])
|
|
1325
1326
|
], 10, zt)
|
|
1326
1327
|
], 16),
|
|
1327
1328
|
H(m("small", {
|
|
1328
1329
|
"data-cy": "error",
|
|
1329
1330
|
class: "text-invalid"
|
|
1330
|
-
},
|
|
1331
|
-
[Y,
|
|
1331
|
+
}, k(u(n)), 513), [
|
|
1332
|
+
[Y, s.value]
|
|
1332
1333
|
])
|
|
1333
1334
|
]);
|
|
1334
1335
|
};
|
|
1335
1336
|
}
|
|
1336
|
-
}), Tt = { class: "forge-loader" }, ge = /* @__PURE__ */
|
|
1337
|
+
}), Tt = { class: "forge-loader" }, ge = /* @__PURE__ */ $({
|
|
1337
1338
|
__name: "ForgeLoader",
|
|
1338
1339
|
props: {
|
|
1339
1340
|
severity: { default: "primary" }
|
|
@@ -1342,15 +1343,15 @@ const We = {
|
|
|
1342
1343
|
const t = e;
|
|
1343
1344
|
return (a, i) => {
|
|
1344
1345
|
const l = ze;
|
|
1345
|
-
return
|
|
1346
|
+
return r(), v("div", Tt, [
|
|
1346
1347
|
x(l, {
|
|
1347
1348
|
"animation-duration": ".75",
|
|
1348
|
-
class:
|
|
1349
|
+
class: F(`text-${t.severity === void 0 ? "primary" : t.severity}`)
|
|
1349
1350
|
}, null, 8, ["class"])
|
|
1350
1351
|
]);
|
|
1351
1352
|
};
|
|
1352
1353
|
}
|
|
1353
|
-
}), jt = ["href", "target"],
|
|
1354
|
+
}), jt = ["href", "target"], Ai = /* @__PURE__ */ $({
|
|
1354
1355
|
__name: "ForgeLink",
|
|
1355
1356
|
props: {
|
|
1356
1357
|
url: {},
|
|
@@ -1368,7 +1369,7 @@ const We = {
|
|
|
1368
1369
|
iconName: {}
|
|
1369
1370
|
},
|
|
1370
1371
|
setup(e) {
|
|
1371
|
-
const t =
|
|
1372
|
+
const t = T(() => ({
|
|
1372
1373
|
[`link-${e.severity}`]: e.severity,
|
|
1373
1374
|
[`link-underline-${e.underlineSeverity}`]: e.underlineSeverity,
|
|
1374
1375
|
[`link-opacity-${e.opacity}`]: e.opacity,
|
|
@@ -1377,27 +1378,27 @@ const We = {
|
|
|
1377
1378
|
[`link-underline-opacity-${e.underlineHoverOpacity ?? e.hoverOpacity}-hover`]: e.underlineHoverOpacity || e.hoverOpacity,
|
|
1378
1379
|
[`link-offset-${e.underlineOffset}`]: e.underlineOffset,
|
|
1379
1380
|
"icon-link icon-link-hover": e.animateIconOnHover
|
|
1380
|
-
})), a =
|
|
1381
|
+
})), a = T(() => ({
|
|
1381
1382
|
"order-2": e.positionIconEnd,
|
|
1382
1383
|
"me-1": !e.positionIconEnd && !e.animateIconOnHover,
|
|
1383
1384
|
"ms-1": e.positionIconEnd && !e.animateIconOnHover,
|
|
1384
1385
|
"ms-0": e.positionIconEnd && e.animateIconOnHover,
|
|
1385
1386
|
"me-0": e.animateIconOnHover
|
|
1386
1387
|
}));
|
|
1387
|
-
return (i, l) => (
|
|
1388
|
+
return (i, l) => (r(), v("a", {
|
|
1388
1389
|
id: "link",
|
|
1389
|
-
class:
|
|
1390
|
+
class: F(["cursor-pointer d-flex text-break", t.value]),
|
|
1390
1391
|
href: i.url,
|
|
1391
1392
|
target: i.target
|
|
1392
1393
|
}, [
|
|
1393
|
-
|
|
1394
|
-
i.iconName ? (
|
|
1394
|
+
w(i.$slots, "default", {}, () => [
|
|
1395
|
+
i.iconName ? (r(), f(u(j), {
|
|
1395
1396
|
key: 0,
|
|
1396
1397
|
id: "link-icon",
|
|
1397
1398
|
icon: i.iconName,
|
|
1398
|
-
class:
|
|
1399
|
-
}, null, 8, ["icon", "class"])) :
|
|
1400
|
-
|
|
1399
|
+
class: F(["bi my-auto", a.value])
|
|
1400
|
+
}, null, 8, ["icon", "class"])) : z("", !0),
|
|
1401
|
+
I(" " + k(i.label), 1)
|
|
1401
1402
|
])
|
|
1402
1403
|
], 10, jt));
|
|
1403
1404
|
}
|
|
@@ -1413,18 +1414,18 @@ function It(e) {
|
|
|
1413
1414
|
}
|
|
1414
1415
|
return t.errorMessage === "" && t.errorDetails.length === 0 && (t.errorMessage = e), t;
|
|
1415
1416
|
}
|
|
1416
|
-
function
|
|
1417
|
+
function qi(e, t) {
|
|
1417
1418
|
return e.map((a) => ({ id: a, label: t ? t(a) : `${a}` }));
|
|
1418
1419
|
}
|
|
1419
|
-
function
|
|
1420
|
+
function Ei(e, t, a) {
|
|
1420
1421
|
return { id: e, label: t ?? e.toString(), shortLabel: a };
|
|
1421
1422
|
}
|
|
1422
1423
|
const _t = { key: 0 }, Pt = {
|
|
1423
1424
|
class: "d-flex w-100",
|
|
1424
1425
|
"data-cy": "footer"
|
|
1425
|
-
},
|
|
1426
|
+
}, Li = /* @__PURE__ */ $({
|
|
1426
1427
|
__name: "ForgeModal",
|
|
1427
|
-
props: /* @__PURE__ */
|
|
1428
|
+
props: /* @__PURE__ */ U({
|
|
1428
1429
|
cancelText: { default: "Cancel" },
|
|
1429
1430
|
submitText: { default: "Submit" },
|
|
1430
1431
|
showFooter: { type: Boolean, default: !0 },
|
|
@@ -1434,6 +1435,7 @@ const _t = { key: 0 }, Pt = {
|
|
|
1434
1435
|
size: { default: "md" },
|
|
1435
1436
|
cancelClass: { default: "" },
|
|
1436
1437
|
submitClass: { default: "" },
|
|
1438
|
+
resetErrorOnClose: { type: Boolean, default: !0 },
|
|
1437
1439
|
header: { default: "Header" },
|
|
1438
1440
|
footer: {},
|
|
1439
1441
|
visible: { type: Boolean },
|
|
@@ -1471,109 +1473,119 @@ const _t = { key: 0 }, Pt = {
|
|
|
1471
1473
|
visibleModifiers: {}
|
|
1472
1474
|
}),
|
|
1473
1475
|
emits: ["update:visible"],
|
|
1474
|
-
setup(e) {
|
|
1475
|
-
const
|
|
1476
|
+
setup(e, { expose: t }) {
|
|
1477
|
+
const a = D(e, "visible"), i = _(!1), l = e, n = _(!1), o = _({
|
|
1476
1478
|
hasError: !1,
|
|
1477
1479
|
header: "",
|
|
1478
1480
|
message: []
|
|
1479
|
-
}),
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
}
|
|
1486
|
-
|
|
1487
|
-
|
|
1481
|
+
}), s = () => {
|
|
1482
|
+
o.value = {
|
|
1483
|
+
hasError: !1,
|
|
1484
|
+
header: "",
|
|
1485
|
+
message: []
|
|
1486
|
+
};
|
|
1487
|
+
};
|
|
1488
|
+
t({
|
|
1489
|
+
resetError: s
|
|
1490
|
+
});
|
|
1491
|
+
const p = () => {
|
|
1492
|
+
i.value = !1;
|
|
1493
|
+
}, c = () => {
|
|
1494
|
+
i.value = !0;
|
|
1495
|
+
}, g = () => {
|
|
1496
|
+
l.resetErrorOnClose && s(), a.value = !1;
|
|
1497
|
+
}, d = async () => {
|
|
1498
|
+
if (l.onConfirm) {
|
|
1499
|
+
n.value = !0, o.value.hasError = !1;
|
|
1488
1500
|
try {
|
|
1489
|
-
const
|
|
1490
|
-
(
|
|
1491
|
-
} catch (
|
|
1492
|
-
|
|
1493
|
-
const
|
|
1494
|
-
|
|
1501
|
+
const S = await l.onConfirm();
|
|
1502
|
+
(S || S == null) && g();
|
|
1503
|
+
} catch (S) {
|
|
1504
|
+
o.value.hasError = !0;
|
|
1505
|
+
const V = It(S);
|
|
1506
|
+
o.value.header = V.errorMessage, o.value.message = V.errorDetails;
|
|
1495
1507
|
}
|
|
1496
|
-
|
|
1508
|
+
n.value = !1;
|
|
1497
1509
|
}
|
|
1498
|
-
},
|
|
1510
|
+
}, B = T(() => ({
|
|
1499
1511
|
root: [
|
|
1500
1512
|
"modal modal-dialog modal-content h-auto m-0",
|
|
1501
1513
|
{
|
|
1502
|
-
"mw-100 vh-100 vw-100 top-0 start-0":
|
|
1503
|
-
"modal-sm":
|
|
1504
|
-
"modal-lg":
|
|
1505
|
-
"modal-xl":
|
|
1514
|
+
"mw-100 vh-100 vw-100 top-0 start-0": i.value,
|
|
1515
|
+
"modal-sm": l.size === "sm",
|
|
1516
|
+
"modal-lg": l.size === "lg",
|
|
1517
|
+
"modal-xl": l.size === "xl"
|
|
1506
1518
|
}
|
|
1507
1519
|
]
|
|
1508
1520
|
}));
|
|
1509
|
-
return (
|
|
1510
|
-
const
|
|
1511
|
-
return
|
|
1512
|
-
onMaximize:
|
|
1513
|
-
onUnmaximize:
|
|
1514
|
-
pt:
|
|
1521
|
+
return (S, V) => {
|
|
1522
|
+
const M = A, q = Te;
|
|
1523
|
+
return r(), f(q, C(l, {
|
|
1524
|
+
onMaximize: c,
|
|
1525
|
+
onUnmaximize: p,
|
|
1526
|
+
pt: B.value
|
|
1515
1527
|
}), ie({
|
|
1516
1528
|
closeicon: b(() => [
|
|
1517
|
-
x(u(
|
|
1529
|
+
x(u(j), {
|
|
1518
1530
|
"data-cy": "close-icon",
|
|
1519
1531
|
icon: "bi:x-lg",
|
|
1520
1532
|
width: "18",
|
|
1521
1533
|
height: "18",
|
|
1522
|
-
onClick:
|
|
1534
|
+
onClick: g
|
|
1523
1535
|
})
|
|
1524
1536
|
]),
|
|
1525
1537
|
maximizeicon: b(() => [
|
|
1526
|
-
x(u(
|
|
1538
|
+
x(u(j), {
|
|
1527
1539
|
"data-cy": "maximisable-icon",
|
|
1528
|
-
icon:
|
|
1540
|
+
icon: i.value ? "bi:arrows-angle-contract" : "bi:arrows-angle-expand",
|
|
1529
1541
|
width: "16",
|
|
1530
1542
|
height: "16"
|
|
1531
1543
|
}, null, 8, ["icon"])
|
|
1532
1544
|
]),
|
|
1533
1545
|
_: 2
|
|
1534
1546
|
}, [
|
|
1535
|
-
|
|
1536
|
-
name:
|
|
1537
|
-
fn: b((
|
|
1538
|
-
|
|
1547
|
+
N(S.$slots, (y, h) => ({
|
|
1548
|
+
name: h,
|
|
1549
|
+
fn: b((P) => [
|
|
1550
|
+
o.value.hasError ? (r(), f(se, {
|
|
1539
1551
|
key: 0,
|
|
1540
1552
|
severity: "danger",
|
|
1541
1553
|
"data-cy": "error"
|
|
1542
1554
|
}, {
|
|
1543
1555
|
default: b(() => [
|
|
1544
1556
|
m("p", {
|
|
1545
|
-
class:
|
|
1546
|
-
},
|
|
1547
|
-
|
|
1548
|
-
(
|
|
1549
|
-
])) :
|
|
1557
|
+
class: F(o.value.message.length > 0 ? "my-auto" : "mb-0")
|
|
1558
|
+
}, k(o.value.header), 3),
|
|
1559
|
+
o.value.message.length > 0 ? (r(), v("ul", _t, [
|
|
1560
|
+
(r(!0), v(O, null, N(o.value.message, (L) => (r(), v("li", { key: L }, k(L), 1))), 128))
|
|
1561
|
+
])) : z("", !0)
|
|
1550
1562
|
]),
|
|
1551
1563
|
_: 1
|
|
1552
|
-
})) :
|
|
1553
|
-
|
|
1554
|
-
|
|
1564
|
+
})) : z("", !0),
|
|
1565
|
+
w(S.$slots, h, J(K(P || {}))),
|
|
1566
|
+
n.value ? w(S.$slots, "loader", { key: 1 }, () => [
|
|
1555
1567
|
x(ge, { "data-cy": "loader" })
|
|
1556
|
-
]) :
|
|
1568
|
+
]) : z("", !0)
|
|
1557
1569
|
])
|
|
1558
1570
|
})),
|
|
1559
|
-
|
|
1571
|
+
S.showFooter ? {
|
|
1560
1572
|
name: "footer",
|
|
1561
1573
|
fn: b(() => [
|
|
1562
1574
|
m("div", Pt, [
|
|
1563
|
-
x(
|
|
1564
|
-
label:
|
|
1565
|
-
class:
|
|
1575
|
+
x(M, {
|
|
1576
|
+
label: S.cancelText,
|
|
1577
|
+
class: F(l.cancelClass),
|
|
1566
1578
|
outlined: "",
|
|
1567
|
-
onClick:
|
|
1579
|
+
onClick: g,
|
|
1568
1580
|
id: "cancel-button",
|
|
1569
|
-
type:
|
|
1581
|
+
type: l.cancelButtonType
|
|
1570
1582
|
}, null, 8, ["label", "class", "type"]),
|
|
1571
|
-
x(
|
|
1572
|
-
label:
|
|
1573
|
-
class:
|
|
1574
|
-
onClick:
|
|
1583
|
+
x(M, {
|
|
1584
|
+
label: S.submitText,
|
|
1585
|
+
class: F([l.submitClass, "ms-auto"]),
|
|
1586
|
+
onClick: d,
|
|
1575
1587
|
id: "submit-button",
|
|
1576
|
-
type:
|
|
1588
|
+
type: l.submitButtonType
|
|
1577
1589
|
}, null, 8, ["label", "class", "type"])
|
|
1578
1590
|
])
|
|
1579
1591
|
]),
|
|
@@ -1582,9 +1594,9 @@ const _t = { key: 0 }, Pt = {
|
|
|
1582
1594
|
]), 1040, ["pt"]);
|
|
1583
1595
|
};
|
|
1584
1596
|
}
|
|
1585
|
-
}), Vt = ["id"], Mt = { key: 0 }, Dt = { key: 0 }, Ot = { class: "d-flex justify-content-between align-items-center position-relative" }, Nt = { key: 1 }, Ut = { "data-cy": "readonly-value" }, At = /* @__PURE__ */
|
|
1597
|
+
}), Vt = ["id"], Mt = { key: 0 }, Dt = { key: 0 }, Ot = { class: "d-flex justify-content-between align-items-center position-relative" }, Nt = { key: 1 }, Ut = { "data-cy": "readonly-value" }, At = /* @__PURE__ */ $({
|
|
1586
1598
|
__name: "ForgeInlineEditor",
|
|
1587
|
-
props: /* @__PURE__ */
|
|
1599
|
+
props: /* @__PURE__ */ U({
|
|
1588
1600
|
name: { default: "" },
|
|
1589
1601
|
completeAction: {},
|
|
1590
1602
|
errorAction: {},
|
|
@@ -1597,13 +1609,13 @@ const _t = { key: 0 }, Pt = {
|
|
|
1597
1609
|
}),
|
|
1598
1610
|
emits: ["update:modelValue"],
|
|
1599
1611
|
setup(e) {
|
|
1600
|
-
const t = e, a = D(e, "modelValue"), i =
|
|
1601
|
-
var
|
|
1602
|
-
i.value = !i.value, (
|
|
1612
|
+
const t = e, a = D(e, "modelValue"), i = _(!1), l = _(), n = () => {
|
|
1613
|
+
var S;
|
|
1614
|
+
i.value = !i.value, (S = l.value) == null || S.focus();
|
|
1603
1615
|
}, o = async () => {
|
|
1604
|
-
if (
|
|
1616
|
+
if (B.value)
|
|
1605
1617
|
return !1;
|
|
1606
|
-
if (a.value =
|
|
1618
|
+
if (a.value = d.value, t.completeAction)
|
|
1607
1619
|
try {
|
|
1608
1620
|
await t.completeAction.apply(this, t.params), i.value = !i.value;
|
|
1609
1621
|
} catch {
|
|
@@ -1611,50 +1623,50 @@ const _t = { key: 0 }, Pt = {
|
|
|
1611
1623
|
}
|
|
1612
1624
|
else
|
|
1613
1625
|
i.value = !i.value;
|
|
1614
|
-
},
|
|
1626
|
+
}, s = () => {
|
|
1615
1627
|
i.value = !i.value;
|
|
1616
1628
|
}, p = () => {
|
|
1617
|
-
|
|
1618
|
-
}, { errorMessage: c, errors:
|
|
1629
|
+
d.value = null;
|
|
1630
|
+
}, { errorMessage: c, errors: g, value: d } = ee(() => t.name, void 0, {
|
|
1619
1631
|
initialValue: a.value
|
|
1620
1632
|
});
|
|
1621
1633
|
le(() => {
|
|
1622
|
-
|
|
1634
|
+
d.value = a.value;
|
|
1623
1635
|
});
|
|
1624
|
-
const
|
|
1625
|
-
return (
|
|
1626
|
-
const M = ne,
|
|
1627
|
-
return
|
|
1636
|
+
const B = T(() => g.value.length > 0);
|
|
1637
|
+
return (S, V) => {
|
|
1638
|
+
const M = ne, q = A;
|
|
1639
|
+
return r(), v("div", {
|
|
1628
1640
|
id: t.name
|
|
1629
1641
|
}, [
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
m("span", Ut,
|
|
1642
|
+
S.readonly ? (r(), v("div", Nt, [
|
|
1643
|
+
w(S.$slots, "default", {}, () => [
|
|
1644
|
+
m("span", Ut, k(u(d)), 1)
|
|
1633
1645
|
])
|
|
1634
|
-
])) : (
|
|
1635
|
-
i.value ? (
|
|
1636
|
-
H((
|
|
1637
|
-
|
|
1638
|
-
class:
|
|
1646
|
+
])) : (r(), v("div", Mt, [
|
|
1647
|
+
i.value ? (r(), v("div", Dt, [
|
|
1648
|
+
H((r(), v("div", Ot, [
|
|
1649
|
+
w(S.$slots, "editor", {
|
|
1650
|
+
class: F({ "is-invalid": B.value }),
|
|
1639
1651
|
editFinished: o,
|
|
1640
|
-
cancel:
|
|
1641
|
-
val: u(
|
|
1652
|
+
cancel: s,
|
|
1653
|
+
val: u(d)
|
|
1642
1654
|
}, () => [
|
|
1643
1655
|
x(M, {
|
|
1644
|
-
modelValue: u(
|
|
1645
|
-
"onUpdate:modelValue": V[0] || (V[0] = (
|
|
1656
|
+
modelValue: u(d),
|
|
1657
|
+
"onUpdate:modelValue": V[0] || (V[0] = (y) => we(d) ? d.value = y : null),
|
|
1646
1658
|
modelModifiers: { trim: !0 },
|
|
1647
1659
|
"data-cy": "input",
|
|
1648
1660
|
ref_key: "input",
|
|
1649
1661
|
ref: l,
|
|
1650
|
-
class:
|
|
1662
|
+
class: F({ "is-invalid": B.value }),
|
|
1651
1663
|
onKeydown: [
|
|
1652
1664
|
X(o, ["enter"]),
|
|
1653
|
-
X(
|
|
1665
|
+
X(s, ["esc"])
|
|
1654
1666
|
]
|
|
1655
1667
|
}, null, 8, ["modelValue", "class"])
|
|
1656
1668
|
]),
|
|
1657
|
-
x(u(
|
|
1669
|
+
x(u(j), {
|
|
1658
1670
|
icon: "bi:x-circle",
|
|
1659
1671
|
class: "mx-2 cursor-pointer",
|
|
1660
1672
|
onClick: p,
|
|
@@ -1664,26 +1676,26 @@ const _t = { key: 0 }, Pt = {
|
|
|
1664
1676
|
])), [
|
|
1665
1677
|
[u(je), o]
|
|
1666
1678
|
])
|
|
1667
|
-
])) : (
|
|
1679
|
+
])) : (r(), v("div", {
|
|
1668
1680
|
key: 1,
|
|
1669
1681
|
class: "d-flex text-muted",
|
|
1670
1682
|
onClick: n,
|
|
1671
1683
|
onFocus: n
|
|
1672
1684
|
}, [
|
|
1673
|
-
|
|
1685
|
+
w(S.$slots, "default", {}, () => [
|
|
1674
1686
|
m("div", {
|
|
1675
|
-
class:
|
|
1687
|
+
class: F(["pe-2 cursor-pointer", { "text-invalid": B.value }]),
|
|
1676
1688
|
"data-cy": "value"
|
|
1677
|
-
},
|
|
1689
|
+
}, k(u(d) ? u(d) : "Click to edit"), 3)
|
|
1678
1690
|
]),
|
|
1679
|
-
x(
|
|
1691
|
+
x(q, {
|
|
1680
1692
|
link: "",
|
|
1681
1693
|
class: "p-0 m-0"
|
|
1682
1694
|
}, {
|
|
1683
1695
|
default: b(() => [
|
|
1684
|
-
x(u(
|
|
1696
|
+
x(u(j), {
|
|
1685
1697
|
icon: "bi:pencil",
|
|
1686
|
-
class: B
|
|
1698
|
+
class: F(B.value ? "text-invalid" : "text-muted"),
|
|
1687
1699
|
"data-cy": "edit-icon",
|
|
1688
1700
|
onKeydown: X(n, ["enter"])
|
|
1689
1701
|
}, null, 8, ["class"])
|
|
@@ -1695,13 +1707,13 @@ const _t = { key: 0 }, Pt = {
|
|
|
1695
1707
|
H(m("small", {
|
|
1696
1708
|
"data-cy": "error",
|
|
1697
1709
|
class: "text-invalid"
|
|
1698
|
-
},
|
|
1699
|
-
[Y,
|
|
1710
|
+
}, k(u(c)), 513), [
|
|
1711
|
+
[Y, B.value]
|
|
1700
1712
|
])
|
|
1701
1713
|
], 8, Vt);
|
|
1702
1714
|
};
|
|
1703
1715
|
}
|
|
1704
|
-
}), qt = ["href"],
|
|
1716
|
+
}), qt = ["href"], Ri = /* @__PURE__ */ $({
|
|
1705
1717
|
__name: "ForgeNavbar",
|
|
1706
1718
|
props: {
|
|
1707
1719
|
severity: { default: "light" },
|
|
@@ -1718,7 +1730,7 @@ const _t = { key: 0 }, Pt = {
|
|
|
1718
1730
|
unstyled: { type: Boolean }
|
|
1719
1731
|
},
|
|
1720
1732
|
setup(e) {
|
|
1721
|
-
const t = e, a =
|
|
1733
|
+
const t = e, a = T(() => ({
|
|
1722
1734
|
root: () => ({
|
|
1723
1735
|
class: [
|
|
1724
1736
|
"navbar container-fluid navbar-expand-lg",
|
|
@@ -1745,7 +1757,7 @@ const _t = { key: 0 }, Pt = {
|
|
|
1745
1757
|
]
|
|
1746
1758
|
})
|
|
1747
1759
|
}));
|
|
1748
|
-
return (i, l) => (
|
|
1760
|
+
return (i, l) => (r(), f(u(Ie), C({ ...t, ...i.$attrs }, {
|
|
1749
1761
|
pt: a.value,
|
|
1750
1762
|
"data-cy": "navbar"
|
|
1751
1763
|
}), ie({
|
|
@@ -1755,16 +1767,16 @@ const _t = { key: 0 }, Pt = {
|
|
|
1755
1767
|
class: "navbar-brand ms-3",
|
|
1756
1768
|
"data-cy": "logo"
|
|
1757
1769
|
}, [
|
|
1758
|
-
|
|
1759
|
-
l[0] || (l[0] =
|
|
1770
|
+
w(i.$slots, "logo", {}, () => [
|
|
1771
|
+
l[0] || (l[0] = I(" Logo "))
|
|
1760
1772
|
])
|
|
1761
1773
|
], 8, qt)
|
|
1762
1774
|
]),
|
|
1763
1775
|
buttonicon: b(() => [
|
|
1764
|
-
|
|
1765
|
-
x(u(
|
|
1776
|
+
w(i.$slots, "buttonIcon", {}, () => [
|
|
1777
|
+
x(u(j), {
|
|
1766
1778
|
icon: "bi:list",
|
|
1767
|
-
class:
|
|
1779
|
+
class: F(t.severity === "light" ? "text-black" : "text-white"),
|
|
1768
1780
|
height: "24",
|
|
1769
1781
|
"data-cy": "burger-icon"
|
|
1770
1782
|
}, null, 8, ["class"])
|
|
@@ -1772,10 +1784,10 @@ const _t = { key: 0 }, Pt = {
|
|
|
1772
1784
|
]),
|
|
1773
1785
|
_: 2
|
|
1774
1786
|
}, [
|
|
1775
|
-
|
|
1787
|
+
N(i.$slots, (n, o) => ({
|
|
1776
1788
|
name: o,
|
|
1777
|
-
fn: b((
|
|
1778
|
-
|
|
1789
|
+
fn: b((s) => [
|
|
1790
|
+
w(i.$slots, o, J(K(s)))
|
|
1779
1791
|
])
|
|
1780
1792
|
}))
|
|
1781
1793
|
]), 1040, ["pt"]));
|
|
@@ -1787,9 +1799,9 @@ const _t = { key: 0 }, Pt = {
|
|
|
1787
1799
|
}, Rt = { class: "d-inline-block" }, Ht = {
|
|
1788
1800
|
key: 1,
|
|
1789
1801
|
class: "p-2 item d-flex justify-content-between align-items-center"
|
|
1790
|
-
}, Wt = /* @__PURE__ */
|
|
1802
|
+
}, Wt = /* @__PURE__ */ $({
|
|
1791
1803
|
__name: "ForgeMultiSelectPreview",
|
|
1792
|
-
props: /* @__PURE__ */
|
|
1804
|
+
props: /* @__PURE__ */ U({
|
|
1793
1805
|
title: { default: "Selected Items" },
|
|
1794
1806
|
orientation: { default: "row" },
|
|
1795
1807
|
height: { default: "200px" },
|
|
@@ -1807,16 +1819,16 @@ const _t = { key: 0 }, Pt = {
|
|
|
1807
1819
|
a.value = a.value.filter((n) => n.id !== l);
|
|
1808
1820
|
};
|
|
1809
1821
|
return (l, n) => {
|
|
1810
|
-
const o = oe,
|
|
1811
|
-
return
|
|
1812
|
-
class:
|
|
1822
|
+
const o = oe, s = A;
|
|
1823
|
+
return r(), v("div", {
|
|
1824
|
+
class: F(l.orientation === "column" ? "row" : ""),
|
|
1813
1825
|
"data-cy": "multiselect-preview"
|
|
1814
1826
|
}, [
|
|
1815
1827
|
m("div", {
|
|
1816
|
-
class:
|
|
1828
|
+
class: F(l.orientation === "row" ? "col-12 mb-1" : "col"),
|
|
1817
1829
|
"data-cy": "multiselect-container"
|
|
1818
1830
|
}, [
|
|
1819
|
-
x(o,
|
|
1831
|
+
x(o, C({
|
|
1820
1832
|
modelValue: a.value,
|
|
1821
1833
|
"onUpdate:modelValue": n[0] || (n[0] = (p) => a.value = p)
|
|
1822
1834
|
}, { ...l.$attrs }, {
|
|
@@ -1826,14 +1838,14 @@ const _t = { key: 0 }, Pt = {
|
|
|
1826
1838
|
"data-cy": "multiselect"
|
|
1827
1839
|
}), {
|
|
1828
1840
|
default: b(() => [
|
|
1829
|
-
(
|
|
1841
|
+
(r(!0), v(O, null, N(l.$slots, (p, c) => w(l.$slots, c, { slot: c })), 256))
|
|
1830
1842
|
]),
|
|
1831
1843
|
_: 3
|
|
1832
1844
|
}, 16, ["modelValue", "options", "placeholder"]),
|
|
1833
|
-
|
|
1845
|
+
w(l.$slots, "after-multi-select")
|
|
1834
1846
|
], 2),
|
|
1835
1847
|
m("div", {
|
|
1836
|
-
class:
|
|
1848
|
+
class: F(l.orientation === "row" ? "col-12" : "col"),
|
|
1837
1849
|
"data-cy": "options-preview"
|
|
1838
1850
|
}, [
|
|
1839
1851
|
m("div", {
|
|
@@ -1841,31 +1853,31 @@ const _t = { key: 0 }, Pt = {
|
|
|
1841
1853
|
class: "overflow-auto"
|
|
1842
1854
|
}, [
|
|
1843
1855
|
m("div", Et, [
|
|
1844
|
-
l.title ? (
|
|
1845
|
-
(
|
|
1856
|
+
l.title ? (r(), v("div", Lt, k(l.title), 1)) : z("", !0),
|
|
1857
|
+
(r(!0), v(O, null, N(a.value, (p) => (r(), v("div", {
|
|
1846
1858
|
key: p.id,
|
|
1847
1859
|
class: "p-2 item d-flex justify-content-between align-items-center"
|
|
1848
1860
|
}, [
|
|
1849
|
-
|
|
1850
|
-
m("span", Rt,
|
|
1861
|
+
w(l.$slots, "list-item", { item: p }, () => [
|
|
1862
|
+
m("span", Rt, k(p.shortLabel ? p.shortLabel : p.label), 1)
|
|
1851
1863
|
]),
|
|
1852
|
-
l.canRemoveItemFromPreview ? (
|
|
1864
|
+
l.canRemoveItemFromPreview ? (r(), f(s, {
|
|
1853
1865
|
key: 0,
|
|
1854
1866
|
link: "",
|
|
1855
1867
|
class: "m-0 p-0 d-flex align-items-center",
|
|
1856
1868
|
onClick: (c) => i(p.id)
|
|
1857
1869
|
}, {
|
|
1858
1870
|
default: b(() => [
|
|
1859
|
-
x(u(
|
|
1871
|
+
x(u(j), {
|
|
1860
1872
|
icon: "bi:x",
|
|
1861
1873
|
class: "close-icon",
|
|
1862
1874
|
"data-cy": `close-icon-${p.id}`
|
|
1863
1875
|
}, null, 8, ["data-cy"])
|
|
1864
1876
|
]),
|
|
1865
1877
|
_: 2
|
|
1866
|
-
}, 1032, ["onClick"])) :
|
|
1878
|
+
}, 1032, ["onClick"])) : z("", !0)
|
|
1867
1879
|
]))), 128)),
|
|
1868
|
-
a.value == null || a.value.length == 0 ? (
|
|
1880
|
+
a.value == null || a.value.length == 0 ? (r(), v("div", Ht, k(t.optionsPreviewEmptyText), 1)) : z("", !0)
|
|
1869
1881
|
])
|
|
1870
1882
|
], 4)
|
|
1871
1883
|
], 2)
|
|
@@ -1878,23 +1890,23 @@ const _t = { key: 0 }, Pt = {
|
|
|
1878
1890
|
}, Jt = {
|
|
1879
1891
|
"data-cy": "slot",
|
|
1880
1892
|
class: "d-flex align-items-center"
|
|
1881
|
-
},
|
|
1893
|
+
}, Hi = /* @__PURE__ */ $({
|
|
1882
1894
|
__name: "ForgePageHeader",
|
|
1883
1895
|
props: {
|
|
1884
1896
|
title: {}
|
|
1885
1897
|
},
|
|
1886
1898
|
setup(e) {
|
|
1887
1899
|
const t = e;
|
|
1888
|
-
return (a, i) => (
|
|
1889
|
-
m("h3", Gt,
|
|
1900
|
+
return (a, i) => (r(), v("div", Yt, [
|
|
1901
|
+
m("h3", Gt, k(t.title), 1),
|
|
1890
1902
|
m("div", Jt, [
|
|
1891
|
-
|
|
1903
|
+
w(a.$slots, "default")
|
|
1892
1904
|
])
|
|
1893
1905
|
]));
|
|
1894
1906
|
}
|
|
1895
|
-
}), Kt = { class: "d-flex" }, Zt = { "data-cy": "before-slot" }, Xt = { class: "position-relative w-100" }, Qt = { "data-cy": "after-slot" }, be = /* @__PURE__ */
|
|
1907
|
+
}), Kt = { class: "d-flex" }, Zt = { "data-cy": "before-slot" }, Xt = { class: "position-relative w-100" }, Qt = { "data-cy": "after-slot" }, be = /* @__PURE__ */ $({
|
|
1896
1908
|
__name: "ForgeDatepicker",
|
|
1897
|
-
props: /* @__PURE__ */
|
|
1909
|
+
props: /* @__PURE__ */ U({
|
|
1898
1910
|
severity: { default: "primary" },
|
|
1899
1911
|
modelValue: {},
|
|
1900
1912
|
defaultValue: {},
|
|
@@ -1968,37 +1980,37 @@ const _t = { key: 0 }, Pt = {
|
|
|
1968
1980
|
}),
|
|
1969
1981
|
emits: ["update:modelValue"],
|
|
1970
1982
|
setup(e) {
|
|
1971
|
-
const t = e, a = D(e, "modelValue"), { errors: i, errorMessage: l, handleChange: n, handleBlur: o, setValue:
|
|
1983
|
+
const t = e, a = D(e, "modelValue"), { errors: i, errorMessage: l, handleChange: n, handleBlur: o, setValue: s } = ee(() => t.name, void 0, {
|
|
1972
1984
|
initialValue: a.value
|
|
1973
1985
|
}), p = () => {
|
|
1974
|
-
|
|
1975
|
-
}, c =
|
|
1976
|
-
dayCell: ({ context:
|
|
1986
|
+
s(null), a.value = null;
|
|
1987
|
+
}, c = T(() => i.value.length > 0), g = T(() => ({
|
|
1988
|
+
dayCell: ({ context: d }) => ({
|
|
1977
1989
|
class: [
|
|
1978
1990
|
`text-center date-${t.severity === void 0 ? "primary" : t.severity}`,
|
|
1979
1991
|
{
|
|
1980
|
-
"cursor-pointer": !
|
|
1981
|
-
"pe-none":
|
|
1982
|
-
"text-white":
|
|
1992
|
+
"cursor-pointer": !d.disabled,
|
|
1993
|
+
"pe-none": d.disabled,
|
|
1994
|
+
"text-white": d.selected
|
|
1983
1995
|
},
|
|
1984
1996
|
// Severities
|
|
1985
1997
|
{
|
|
1986
|
-
selected:
|
|
1987
|
-
"text-primary": !
|
|
1988
|
-
"text-brand": !
|
|
1989
|
-
"text-secondary": !
|
|
1990
|
-
"text-success": !
|
|
1991
|
-
"text-warning": !
|
|
1992
|
-
"text-danger": !
|
|
1993
|
-
"text-info": !
|
|
1998
|
+
selected: d.selected && !d.disabled,
|
|
1999
|
+
"text-primary": !d.selected && d.today && (t.severity === void 0 || t.severity === "primary"),
|
|
2000
|
+
"text-brand": !d.selected && d.today && t.severity === "brand",
|
|
2001
|
+
"text-secondary": !d.selected && d.today && t.severity === "secondary",
|
|
2002
|
+
"text-success": !d.selected && d.today && t.severity === "success",
|
|
2003
|
+
"text-warning": !d.selected && d.today && t.severity === "warning",
|
|
2004
|
+
"text-danger": !d.selected && d.today && t.severity === "danger",
|
|
2005
|
+
"text-info": !d.selected && d.today && t.severity === "info"
|
|
1994
2006
|
}
|
|
1995
2007
|
]
|
|
1996
2008
|
}),
|
|
1997
|
-
dayLabel: ({ context:
|
|
2009
|
+
dayLabel: ({ context: d }) => ({
|
|
1998
2010
|
class: [
|
|
1999
2011
|
// Disabled States
|
|
2000
2012
|
{
|
|
2001
|
-
"text-muted":
|
|
2013
|
+
"text-muted": d.disabled
|
|
2002
2014
|
}
|
|
2003
2015
|
]
|
|
2004
2016
|
}),
|
|
@@ -2034,95 +2046,95 @@ const _t = { key: 0 }, Pt = {
|
|
|
2034
2046
|
]
|
|
2035
2047
|
})
|
|
2036
2048
|
},
|
|
2037
|
-
year: ({ context:
|
|
2049
|
+
year: ({ context: d }) => ({
|
|
2038
2050
|
class: [
|
|
2039
2051
|
"col-3 text-center cursor-pointer py-2",
|
|
2040
2052
|
{
|
|
2041
|
-
"text-primary": (t.severity === void 0 || t.severity === "primary") &&
|
|
2042
|
-
"text-brand": t.severity === "brand" &&
|
|
2043
|
-
"text-secondary": t.severity === "secondary" &&
|
|
2044
|
-
"text-success": t.severity === "success" &&
|
|
2045
|
-
"text-warning": t.severity === "warning" &&
|
|
2046
|
-
"text-danger": t.severity === "danger" &&
|
|
2047
|
-
"text-info": t.severity === "info" &&
|
|
2053
|
+
"text-primary": (t.severity === void 0 || t.severity === "primary") && d.year.value === (/* @__PURE__ */ new Date()).getFullYear(),
|
|
2054
|
+
"text-brand": t.severity === "brand" && d.year.value === (/* @__PURE__ */ new Date()).getFullYear(),
|
|
2055
|
+
"text-secondary": t.severity === "secondary" && d.year.value === (/* @__PURE__ */ new Date()).getFullYear(),
|
|
2056
|
+
"text-success": t.severity === "success" && d.year.value === (/* @__PURE__ */ new Date()).getFullYear(),
|
|
2057
|
+
"text-warning": t.severity === "warning" && d.year.value === (/* @__PURE__ */ new Date()).getFullYear(),
|
|
2058
|
+
"text-danger": t.severity === "danger" && d.year.value === (/* @__PURE__ */ new Date()).getFullYear(),
|
|
2059
|
+
"text-info": t.severity === "info" && d.year.value === (/* @__PURE__ */ new Date()).getFullYear()
|
|
2048
2060
|
}
|
|
2049
2061
|
]
|
|
2050
2062
|
}),
|
|
2051
|
-
month: ({ context:
|
|
2063
|
+
month: ({ context: d }) => ({
|
|
2052
2064
|
class: [
|
|
2053
2065
|
"col-3 text-center cursor-pointer py-2",
|
|
2054
2066
|
{
|
|
2055
|
-
"text-primary": (t.severity === void 0 || t.severity === "primary") &&
|
|
2056
|
-
"text-brand": t.severity === "brand" &&
|
|
2057
|
-
"text-secondary": t.severity === "secondary" &&
|
|
2058
|
-
"text-success": t.severity === "success" &&
|
|
2059
|
-
"text-warning": t.severity === "warning" &&
|
|
2060
|
-
"text-danger": t.severity === "danger" &&
|
|
2061
|
-
"text-info": t.severity === "info" &&
|
|
2067
|
+
"text-primary": (t.severity === void 0 || t.severity === "primary") && d.monthIndex + 1 === (/* @__PURE__ */ new Date()).getMonth() + 1,
|
|
2068
|
+
"text-brand": t.severity === "brand" && d.monthIndex + 1 === (/* @__PURE__ */ new Date()).getMonth() + 1,
|
|
2069
|
+
"text-secondary": t.severity === "secondary" && d.monthIndex + 1 === (/* @__PURE__ */ new Date()).getMonth() + 1,
|
|
2070
|
+
"text-success": t.severity === "success" && d.monthIndex + 1 === (/* @__PURE__ */ new Date()).getMonth() + 1,
|
|
2071
|
+
"text-warning": t.severity === "warning" && d.monthIndex + 1 === (/* @__PURE__ */ new Date()).getMonth() + 1,
|
|
2072
|
+
"text-danger": t.severity === "danger" && d.monthIndex + 1 === (/* @__PURE__ */ new Date()).getMonth() + 1,
|
|
2073
|
+
"text-info": t.severity === "info" && d.monthIndex + 1 === (/* @__PURE__ */ new Date()).getMonth() + 1
|
|
2062
2074
|
}
|
|
2063
2075
|
]
|
|
2064
2076
|
})
|
|
2065
2077
|
}));
|
|
2066
|
-
return (
|
|
2067
|
-
const
|
|
2068
|
-
return
|
|
2078
|
+
return (d, B) => {
|
|
2079
|
+
const S = _e;
|
|
2080
|
+
return r(), v(O, null, [
|
|
2069
2081
|
m("div", Kt, [
|
|
2070
2082
|
m("span", Zt, [
|
|
2071
|
-
|
|
2083
|
+
w(d.$slots, "before")
|
|
2072
2084
|
]),
|
|
2073
2085
|
m("div", Xt, [
|
|
2074
|
-
x(
|
|
2075
|
-
pt:
|
|
2086
|
+
x(S, C({ ...t, ...d.$attrs }, {
|
|
2087
|
+
pt: g.value,
|
|
2076
2088
|
modelValue: a.value,
|
|
2077
2089
|
"onUpdate:modelValue": [
|
|
2078
|
-
|
|
2090
|
+
B[0] || (B[0] = (V) => a.value = V),
|
|
2079
2091
|
u(n)
|
|
2080
2092
|
],
|
|
2081
|
-
onBlur:
|
|
2093
|
+
onBlur: B[1] || (B[1] = () => u(o)),
|
|
2082
2094
|
"input-class": { "datepicker-invalid": c.value }
|
|
2083
2095
|
}), null, 16, ["pt", "modelValue", "onUpdate:modelValue", "input-class"]),
|
|
2084
|
-
H(x(u(
|
|
2096
|
+
H(x(u(j), {
|
|
2085
2097
|
"data-cy": "icon",
|
|
2086
2098
|
icon: "bi:calendar4",
|
|
2087
|
-
class:
|
|
2099
|
+
class: F(["position-absolute end-0 top-50 bottom-50 my-auto me-2 bg-white", `${c.value ? "text-danger-dark" : "text-muted"}`])
|
|
2088
2100
|
}, null, 8, ["class"]), [
|
|
2089
2101
|
[Y, t.showIcon]
|
|
2090
2102
|
]),
|
|
2091
|
-
H(x(u(
|
|
2103
|
+
H(x(u(j), {
|
|
2092
2104
|
"data-cy": "icon",
|
|
2093
2105
|
icon: "bi:x",
|
|
2094
2106
|
onClick: p,
|
|
2095
|
-
class:
|
|
2107
|
+
class: F(["position-absolute end-0 top-50 bottom-50 my-auto text-muted cursor-pointer bg-white", t.showIcon ? "datepicker-close-icon" : "me-2"])
|
|
2096
2108
|
}, null, 8, ["class"]), [
|
|
2097
2109
|
[Y, t.modelValue]
|
|
2098
2110
|
])
|
|
2099
2111
|
]),
|
|
2100
2112
|
m("span", Qt, [
|
|
2101
|
-
|
|
2113
|
+
w(d.$slots, "after")
|
|
2102
2114
|
])
|
|
2103
2115
|
]),
|
|
2104
2116
|
H(m("small", {
|
|
2105
2117
|
"data-cy": "error",
|
|
2106
2118
|
class: "text-invalid"
|
|
2107
|
-
},
|
|
2119
|
+
}, k(u(l)), 513), [
|
|
2108
2120
|
[Y, c.value]
|
|
2109
2121
|
])
|
|
2110
2122
|
], 64);
|
|
2111
2123
|
};
|
|
2112
2124
|
}
|
|
2113
|
-
}),
|
|
2125
|
+
}), Wi = /* @__PURE__ */ $({
|
|
2114
2126
|
__name: "ForgeRemainingCharacters",
|
|
2115
2127
|
props: {
|
|
2116
2128
|
maxCount: { default: 300 },
|
|
2117
2129
|
currentCount: {}
|
|
2118
2130
|
},
|
|
2119
2131
|
setup(e) {
|
|
2120
|
-
const t = e, a =
|
|
2121
|
-
return (i, l) => (
|
|
2122
|
-
class:
|
|
2123
|
-
}, "Remaining characters: " +
|
|
2132
|
+
const t = e, a = T(() => t.maxCount - t.currentCount);
|
|
2133
|
+
return (i, l) => (r(), v("div", {
|
|
2134
|
+
class: F(a.value < 0 ? "text-danger" : "")
|
|
2135
|
+
}, "Remaining characters: " + k(a.value), 3));
|
|
2124
2136
|
}
|
|
2125
|
-
}), ea = { class: "d-flex justify-content-between" },
|
|
2137
|
+
}), ea = { class: "d-flex justify-content-between" }, Yi = /* @__PURE__ */ $({
|
|
2126
2138
|
__name: "ForgeForm",
|
|
2127
2139
|
props: {
|
|
2128
2140
|
onSubmit: {},
|
|
@@ -2134,7 +2146,7 @@ const _t = { key: 0 }, Pt = {
|
|
|
2134
2146
|
hideCancel: { type: Boolean, default: !1 }
|
|
2135
2147
|
},
|
|
2136
2148
|
setup(e) {
|
|
2137
|
-
const t = e, a =
|
|
2149
|
+
const t = e, a = _(!1), i = _({
|
|
2138
2150
|
hasError: !1,
|
|
2139
2151
|
message: ""
|
|
2140
2152
|
});
|
|
@@ -2148,39 +2160,39 @@ const _t = { key: 0 }, Pt = {
|
|
|
2148
2160
|
a.value = !1;
|
|
2149
2161
|
}
|
|
2150
2162
|
return (n, o) => {
|
|
2151
|
-
const
|
|
2152
|
-
return
|
|
2163
|
+
const s = A;
|
|
2164
|
+
return r(), v("form", C(n.$attrs, {
|
|
2153
2165
|
novalidate: "",
|
|
2154
2166
|
class: "position-relative shadow-sm border p-4 bg-white",
|
|
2155
2167
|
onSubmit: G(l, ["prevent"])
|
|
2156
2168
|
}), [
|
|
2157
|
-
n.hideTitle ?
|
|
2158
|
-
|
|
2169
|
+
n.hideTitle ? z("", !0) : (r(), v(O, { key: 0 }, [
|
|
2170
|
+
w(n.$slots, "title", {}, () => [
|
|
2159
2171
|
m("h3", {
|
|
2160
|
-
class:
|
|
2172
|
+
class: F(n.titleClass),
|
|
2161
2173
|
"data-cy": "form-title"
|
|
2162
|
-
},
|
|
2174
|
+
}, k(n.title), 3)
|
|
2163
2175
|
]),
|
|
2164
2176
|
o[1] || (o[1] = m("hr", null, null, -1))
|
|
2165
2177
|
], 64)),
|
|
2166
|
-
i.value.hasError ? (
|
|
2178
|
+
i.value.hasError ? (r(), f(se, {
|
|
2167
2179
|
key: 1,
|
|
2168
2180
|
severity: "danger",
|
|
2169
2181
|
"data-cy": "error"
|
|
2170
2182
|
}, {
|
|
2171
2183
|
default: b(() => [
|
|
2172
|
-
|
|
2184
|
+
w(n.$slots, "error", {
|
|
2173
2185
|
error: i.value.message
|
|
2174
2186
|
}, () => [
|
|
2175
|
-
|
|
2187
|
+
I(k(i.value.message), 1)
|
|
2176
2188
|
])
|
|
2177
2189
|
]),
|
|
2178
2190
|
_: 3
|
|
2179
|
-
})) :
|
|
2180
|
-
|
|
2191
|
+
})) : z("", !0),
|
|
2192
|
+
w(n.$slots, "default"),
|
|
2181
2193
|
m("div", ea, [
|
|
2182
|
-
|
|
2183
|
-
n.hideCancel ?
|
|
2194
|
+
w(n.$slots, "cancel", {}, () => [
|
|
2195
|
+
n.hideCancel ? z("", !0) : (r(), f(s, {
|
|
2184
2196
|
key: 0,
|
|
2185
2197
|
"data-cy": "cancel-btn",
|
|
2186
2198
|
type: "reset",
|
|
@@ -2189,146 +2201,155 @@ const _t = { key: 0 }, Pt = {
|
|
|
2189
2201
|
onClick: o[0] || (o[0] = (p) => n.$emit("cancel"))
|
|
2190
2202
|
}, {
|
|
2191
2203
|
default: b(() => [
|
|
2192
|
-
|
|
2204
|
+
I(k(n.cancelText), 1)
|
|
2193
2205
|
]),
|
|
2194
2206
|
_: 1
|
|
2195
2207
|
}))
|
|
2196
2208
|
]),
|
|
2197
|
-
|
|
2198
|
-
x(
|
|
2209
|
+
w(n.$slots, "submit", { submit: l }, () => [
|
|
2210
|
+
x(s, {
|
|
2199
2211
|
"data-cy": "submit-btn",
|
|
2200
2212
|
type: "submit",
|
|
2201
2213
|
severity: "primary",
|
|
2202
2214
|
class: "ms-auto"
|
|
2203
2215
|
}, {
|
|
2204
2216
|
default: b(() => [
|
|
2205
|
-
|
|
2217
|
+
I(k(n.submitText), 1)
|
|
2206
2218
|
]),
|
|
2207
2219
|
_: 1
|
|
2208
2220
|
})
|
|
2209
2221
|
])
|
|
2210
2222
|
]),
|
|
2211
|
-
a.value ? (
|
|
2223
|
+
a.value ? (r(), f(ge, {
|
|
2212
2224
|
key: 2,
|
|
2213
2225
|
"data-cy": "loading-spinner"
|
|
2214
|
-
})) :
|
|
2226
|
+
})) : z("", !0)
|
|
2215
2227
|
], 16);
|
|
2216
2228
|
};
|
|
2217
2229
|
}
|
|
2218
2230
|
}), ta = {
|
|
2219
2231
|
key: 1,
|
|
2220
2232
|
class: "d-flex flex-column w-100"
|
|
2221
|
-
}, aa = ["for"],
|
|
2233
|
+
}, aa = ["for"], ia = {
|
|
2234
|
+
key: 0,
|
|
2235
|
+
class: "text-danger fw-600"
|
|
2236
|
+
}, Gi = /* @__PURE__ */ $({
|
|
2222
2237
|
__name: "ForgeFormField",
|
|
2223
|
-
props: /* @__PURE__ */
|
|
2238
|
+
props: /* @__PURE__ */ U({
|
|
2224
2239
|
name: {},
|
|
2225
2240
|
fieldLabelPosition: { default: "top" },
|
|
2226
2241
|
fieldLabel: {},
|
|
2227
2242
|
type: { default: "text" },
|
|
2228
2243
|
mask: { default: "" },
|
|
2229
2244
|
placeholder: { default: "" },
|
|
2230
|
-
labelWidthClass: { default: "w-25" }
|
|
2245
|
+
labelWidthClass: { default: "w-25" },
|
|
2246
|
+
required: { type: Boolean, default: !1 }
|
|
2231
2247
|
}, {
|
|
2232
2248
|
modelValue: {},
|
|
2233
2249
|
modelModifiers: {}
|
|
2234
2250
|
}),
|
|
2235
2251
|
emits: ["update:modelValue"],
|
|
2236
2252
|
setup(e) {
|
|
2237
|
-
const t = D(e, "modelValue"), a = e, i = (
|
|
2238
|
-
a.type == "number" ?
|
|
2239
|
-
}, { errors: l, value: n, errorMessage: o, handleChange:
|
|
2253
|
+
const t = D(e, "modelValue"), a = e, i = (g) => {
|
|
2254
|
+
a.type == "number" ? s(g.value) : s(g);
|
|
2255
|
+
}, { errors: l, value: n, errorMessage: o, handleChange: s, handleBlur: p } = ee(() => a.name, void 0, {
|
|
2240
2256
|
initialValue: t.value
|
|
2241
|
-
}), c =
|
|
2242
|
-
return ce(() => n.value, (
|
|
2243
|
-
t.value =
|
|
2244
|
-
}, { immediate: !0 }), (
|
|
2245
|
-
const
|
|
2246
|
-
return a.type === "checkbox" ? (
|
|
2257
|
+
}), c = T(() => l.value.length > 0);
|
|
2258
|
+
return ce(() => n.value, (g) => {
|
|
2259
|
+
t.value = g;
|
|
2260
|
+
}, { immediate: !0 }), (g, d) => {
|
|
2261
|
+
const B = Ve, S = Pe, V = ne, M = te, q = oe, y = be;
|
|
2262
|
+
return a.type === "checkbox" ? (r(), f(fe, C({
|
|
2247
2263
|
key: 0,
|
|
2248
2264
|
id: a.name,
|
|
2249
2265
|
label: a.fieldLabel
|
|
2250
|
-
},
|
|
2266
|
+
}, g.$attrs, {
|
|
2251
2267
|
name: a.name,
|
|
2252
2268
|
modelValue: t.value,
|
|
2253
|
-
"onUpdate:modelValue":
|
|
2254
|
-
}), null, 16, ["id", "label", "name", "modelValue"])) : (
|
|
2269
|
+
"onUpdate:modelValue": d[0] || (d[0] = (h) => t.value = h)
|
|
2270
|
+
}), null, 16, ["id", "label", "name", "modelValue"])) : (r(), v("div", ta, [
|
|
2255
2271
|
m("div", {
|
|
2256
2272
|
"data-cy": "input-wrapper",
|
|
2257
|
-
class:
|
|
2273
|
+
class: F(["d-flex", a.fieldLabelPosition === "top" ? "flex-column" : "flex-row"])
|
|
2258
2274
|
}, [
|
|
2259
2275
|
m("label", {
|
|
2260
2276
|
for: a.name,
|
|
2261
|
-
class:
|
|
2262
|
-
},
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
placeholder: a.
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
placeholder: a.
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
placeholder: a.
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2277
|
+
class: F(a.fieldLabelPosition === "top" ? "mb-1" : "me-2 " + a.labelWidthClass)
|
|
2278
|
+
}, [
|
|
2279
|
+
I(k(a.fieldLabel) + " ", 1),
|
|
2280
|
+
g.required ? (r(), v("span", ia, "*")) : z("", !0)
|
|
2281
|
+
], 10, aa),
|
|
2282
|
+
w(g.$slots, "default", J(K({ modelValue: t.value, updateModel: u(s), hasErrors: c.value })), () => [
|
|
2283
|
+
a.type === "number" ? (r(), f(u(ue), C({
|
|
2284
|
+
key: 0,
|
|
2285
|
+
id: a.name
|
|
2286
|
+
}, g.$attrs, {
|
|
2287
|
+
placeholder: a.placeholder,
|
|
2288
|
+
"input-class": { "is-invalid": c.value },
|
|
2289
|
+
class: { "is-invalid": c.value },
|
|
2290
|
+
onInput: i,
|
|
2291
|
+
modelValue: t.value,
|
|
2292
|
+
"onUpdate:modelValue": d[1] || (d[1] = (h) => t.value = h)
|
|
2293
|
+
}), null, 16, ["id", "placeholder", "input-class", "class", "modelValue"])) : a.type === "textarea" ? (r(), f(B, C({
|
|
2294
|
+
key: 1,
|
|
2295
|
+
id: a.name
|
|
2296
|
+
}, g.$attrs, {
|
|
2297
|
+
placeholder: a.placeholder,
|
|
2298
|
+
class: { "is-invalid": c.value },
|
|
2299
|
+
modelValue: t.value,
|
|
2300
|
+
"onUpdate:modelValue": d[2] || (d[2] = (h) => t.value = h),
|
|
2301
|
+
onInput: i,
|
|
2302
|
+
onBlur: u(p)
|
|
2303
|
+
}), null, 16, ["id", "placeholder", "class", "modelValue", "onBlur"])) : a.type === "mask" ? (r(), f(S, C({
|
|
2304
|
+
key: 2,
|
|
2305
|
+
id: a.name
|
|
2306
|
+
}, g.$attrs, {
|
|
2307
|
+
placeholder: a.placeholder,
|
|
2308
|
+
mask: a.mask,
|
|
2309
|
+
class: { "is-invalid": c.value },
|
|
2310
|
+
modelValue: t.value,
|
|
2311
|
+
"onUpdate:modelValue": d[3] || (d[3] = (h) => t.value = h),
|
|
2312
|
+
onComplete: i,
|
|
2313
|
+
onBlur: u(p)
|
|
2314
|
+
}), null, 16, ["id", "placeholder", "mask", "class", "modelValue", "onBlur"])) : a.type === "text" ? (r(), f(V, C({
|
|
2315
|
+
key: 3,
|
|
2316
|
+
id: a.name
|
|
2317
|
+
}, g.$attrs, {
|
|
2318
|
+
placeholder: a.placeholder,
|
|
2319
|
+
class: { "is-invalid": c.value },
|
|
2320
|
+
modelValue: t.value,
|
|
2321
|
+
"onUpdate:modelValue": d[4] || (d[4] = (h) => t.value = h),
|
|
2322
|
+
onInput: i,
|
|
2323
|
+
onBlur: u(p)
|
|
2324
|
+
}), null, 16, ["id", "placeholder", "class", "modelValue", "onBlur"])) : a.type === "select" ? (r(), f(M, C({ key: 4 }, { ...a, ...g.$attrs }, {
|
|
2325
|
+
modelValue: t.value,
|
|
2326
|
+
"onUpdate:modelValue": d[5] || (d[5] = (h) => t.value = h),
|
|
2327
|
+
class: { "is-invalid": c.value }
|
|
2328
|
+
}), null, 16, ["modelValue", "class"])) : a.type === "multiselect" ? (r(), f(q, C({ key: 5 }, { ...a, ...g.$attrs }, {
|
|
2329
|
+
modelValue: t.value,
|
|
2330
|
+
"onUpdate:modelValue": d[6] || (d[6] = (h) => t.value = h),
|
|
2331
|
+
class: { "is-invalid": c.value }
|
|
2332
|
+
}), null, 16, ["modelValue", "class"])) : a.type === "multiselect-preview" ? (r(), f(Wt, C({ key: 6 }, { ...a, ...g.$attrs }, {
|
|
2333
|
+
modelValue: t.value,
|
|
2334
|
+
"onUpdate:modelValue": d[7] || (d[7] = (h) => t.value = h),
|
|
2335
|
+
class: { "is-invalid": c.value }
|
|
2336
|
+
}), null, 16, ["modelValue", "class"])) : a.type === "datepicker" ? (r(), f(y, C({ key: 7 }, { ...a, ...g.$attrs }, {
|
|
2337
|
+
modelValue: t.value,
|
|
2338
|
+
"onUpdate:modelValue": d[8] || (d[8] = (h) => t.value = h),
|
|
2339
|
+
class: { "is-invalid": c.value }
|
|
2340
|
+
}), null, 16, ["modelValue", "class"])) : z("", !0)
|
|
2341
|
+
])
|
|
2321
2342
|
], 2),
|
|
2322
2343
|
H(m("small", {
|
|
2323
2344
|
"data-cy": "error",
|
|
2324
2345
|
class: "invalid-feedback"
|
|
2325
|
-
},
|
|
2346
|
+
}, k(u(o)), 513), [
|
|
2326
2347
|
[Y, c.value && a.type !== "multiselect" && a.type !== "datepicker"]
|
|
2327
2348
|
])
|
|
2328
2349
|
]));
|
|
2329
2350
|
};
|
|
2330
2351
|
}
|
|
2331
|
-
}),
|
|
2352
|
+
}), Ji = /* @__PURE__ */ $({
|
|
2332
2353
|
__name: "ForgeChip",
|
|
2333
2354
|
props: {
|
|
2334
2355
|
chipSeverity: { default: "primary" },
|
|
@@ -2344,7 +2365,7 @@ const _t = { key: 0 }, Pt = {
|
|
|
2344
2365
|
unstyled: { type: Boolean }
|
|
2345
2366
|
},
|
|
2346
2367
|
setup(e) {
|
|
2347
|
-
const t = e, a =
|
|
2368
|
+
const t = e, a = T(() => ({
|
|
2348
2369
|
root: [
|
|
2349
2370
|
"badge d-inline-flex align-items-center border me-1 p-1",
|
|
2350
2371
|
{
|
|
@@ -2363,15 +2384,15 @@ const _t = { key: 0 }, Pt = {
|
|
|
2363
2384
|
}));
|
|
2364
2385
|
return (i, l) => {
|
|
2365
2386
|
const n = Me;
|
|
2366
|
-
return
|
|
2387
|
+
return r(), f(n, C({ ...i.$attrs, ...i.$props }, { pt: a.value }), {
|
|
2367
2388
|
default: b(() => [
|
|
2368
|
-
(
|
|
2389
|
+
(r(!0), v(O, null, N(i.$slots, (o, s) => w(i.$slots, s, { slot: s })), 256))
|
|
2369
2390
|
]),
|
|
2370
2391
|
_: 3
|
|
2371
2392
|
}, 16, ["pt"]);
|
|
2372
2393
|
};
|
|
2373
2394
|
}
|
|
2374
|
-
}),
|
|
2395
|
+
}), la = /* @__PURE__ */ $({
|
|
2375
2396
|
__name: "ForgeProgressBar",
|
|
2376
2397
|
props: {
|
|
2377
2398
|
severity: { default: "primary" },
|
|
@@ -2387,7 +2408,7 @@ const _t = { key: 0 }, Pt = {
|
|
|
2387
2408
|
unstyled: { type: Boolean }
|
|
2388
2409
|
},
|
|
2389
2410
|
setup(e) {
|
|
2390
|
-
const t = e, a =
|
|
2411
|
+
const t = e, a = T(() => t.striped ? "progress-bar-striped" : null), i = T(() => t.animate ? "progress-bar-animated" : null), l = T(() => {
|
|
2391
2412
|
switch (t.severity) {
|
|
2392
2413
|
case "brand":
|
|
2393
2414
|
return "bg-brand";
|
|
@@ -2406,7 +2427,7 @@ const _t = { key: 0 }, Pt = {
|
|
|
2406
2427
|
default:
|
|
2407
2428
|
return "bg-primary";
|
|
2408
2429
|
}
|
|
2409
|
-
}), n =
|
|
2430
|
+
}), n = T(() => ({
|
|
2410
2431
|
root: {
|
|
2411
2432
|
style: t.pixelWidth ? `width: ${t.pixelWidth}px` : ""
|
|
2412
2433
|
},
|
|
@@ -2414,18 +2435,18 @@ const _t = { key: 0 }, Pt = {
|
|
|
2414
2435
|
class: [l.value, a.value, i.value, "progress-bar"]
|
|
2415
2436
|
}
|
|
2416
2437
|
}));
|
|
2417
|
-
return (o,
|
|
2438
|
+
return (o, s) => {
|
|
2418
2439
|
const p = De;
|
|
2419
|
-
return
|
|
2440
|
+
return r(), f(p, C({ ...o.$attrs, ...t }, { pt: n.value }), {
|
|
2420
2441
|
default: b(() => [
|
|
2421
|
-
|
|
2442
|
+
w(o.$slots, "default")
|
|
2422
2443
|
]),
|
|
2423
2444
|
_: 3
|
|
2424
2445
|
}, 16, ["pt"]);
|
|
2425
2446
|
};
|
|
2426
2447
|
}
|
|
2427
2448
|
});
|
|
2428
|
-
var
|
|
2449
|
+
var na = /* @__PURE__ */ $({
|
|
2429
2450
|
name: "VueDrawingCanvas",
|
|
2430
2451
|
props: {
|
|
2431
2452
|
strokeType: {
|
|
@@ -2737,14 +2758,14 @@ var la = /* @__PURE__ */ F({
|
|
|
2737
2758
|
});
|
|
2738
2759
|
},
|
|
2739
2760
|
wrapText(e, t, a, i, l, n) {
|
|
2740
|
-
const o = /(\r\n|\n\r|\n|\r)+/g,
|
|
2761
|
+
const o = /(\r\n|\n\r|\n|\r)+/g, s = /\s+/g;
|
|
2741
2762
|
var p = t.split(o).filter((M) => M.length > 0);
|
|
2742
2763
|
for (let M = 0; M < p.length; M++) {
|
|
2743
|
-
for (var c = p[M].split(
|
|
2744
|
-
var
|
|
2745
|
-
V > l &&
|
|
2764
|
+
for (var c = p[M].split(s).filter((q) => q.length > 0), g = "", d = 0; d < c.length; d++) {
|
|
2765
|
+
var B = g + c[d] + " ", S = e.measureText(B), V = S.width;
|
|
2766
|
+
V > l && d > 0 ? (this.watermark && this.watermark.fontStyle && this.watermark.fontStyle.drawType && this.watermark.fontStyle.drawType === "stroke" ? e.strokeText(g, a, i) : e.fillText(g, a, i), g = c[d] + " ", i += n) : g = B;
|
|
2746
2767
|
}
|
|
2747
|
-
this.watermark && this.watermark.fontStyle && this.watermark.fontStyle.drawType && this.watermark.fontStyle.drawType === "stroke" ? e.strokeText(
|
|
2768
|
+
this.watermark && this.watermark.fontStyle && this.watermark.fontStyle.drawType && this.watermark.fontStyle.drawType === "stroke" ? e.strokeText(g, a, i) : e.fillText(g, a, i), i += c.length > 0 ? n : 0;
|
|
2748
2769
|
}
|
|
2749
2770
|
},
|
|
2750
2771
|
save() {
|
|
@@ -2764,20 +2785,20 @@ var la = /* @__PURE__ */ F({
|
|
|
2764
2785
|
const n = new Image();
|
|
2765
2786
|
n.src = a.source, n.onload = () => {
|
|
2766
2787
|
a && t && t.drawImage(n, a.x, a.y, Number(i), Number(l));
|
|
2767
|
-
let o = document.createElement("canvas"),
|
|
2768
|
-
if (o.width = Number(p), o.height = Number(c),
|
|
2769
|
-
return
|
|
2788
|
+
let o = document.createElement("canvas"), s = o.getContext("2d"), p = this.outputWidth === void 0 ? this.width : this.outputWidth, c = this.outputHeight === void 0 ? this.height : this.outputHeight;
|
|
2789
|
+
if (o.width = Number(p), o.height = Number(c), s)
|
|
2790
|
+
return s.drawImage(e, 0, 0, Number(p), Number(c)), this.$emit("update:image", o.toDataURL("image/" + this.saveAs, 1)), o.toDataURL("image/" + this.saveAs, 1);
|
|
2770
2791
|
};
|
|
2771
2792
|
} else if (a.type === "Text") {
|
|
2772
2793
|
let i = a.fontStyle && a.fontStyle.font ? a.fontStyle.font : "20px serif", l = a.fontStyle && a.fontStyle.textAlign ? a.fontStyle.textAlign : "start", n = a.fontStyle && a.fontStyle.textBaseline ? a.fontStyle.textBaseline : "alphabetic", o = a.fontStyle && a.fontStyle.color ? a.fontStyle.color : "#000000";
|
|
2773
2794
|
if (t.font = i, t.textAlign = l, t.textBaseline = n, a.fontStyle && a.fontStyle.rotate) {
|
|
2774
|
-
let
|
|
2775
|
-
a.fontStyle && a.fontStyle.width ?
|
|
2795
|
+
let d, B;
|
|
2796
|
+
a.fontStyle && a.fontStyle.width ? d = a.x + Math.floor(a.fontStyle.width / 2) : d = a.x, a.fontStyle && a.fontStyle.lineHeight ? B = a.y + Math.floor(a.fontStyle.lineHeight / 2) : B = a.y, t.translate(d, B), t.rotate(a.fontStyle.rotate * Math.PI / 180), t.translate(d * -1, B * -1);
|
|
2776
2797
|
}
|
|
2777
2798
|
a.fontStyle && a.fontStyle.drawType && a.fontStyle.drawType === "stroke" ? (t.strokeStyle = a.fontStyle.color, a.fontStyle && a.fontStyle.width ? this.wrapText(t, a.source, a.x, a.y, a.fontStyle.width, a.fontStyle.lineHeight) : t.strokeText(a.source, a.x, a.y)) : (t.fillStyle = o, a.fontStyle && a.fontStyle.width ? this.wrapText(t, a.source, a.x, a.y, a.fontStyle.width, a.fontStyle.lineHeight) : t.fillText(a.source, a.x, a.y));
|
|
2778
|
-
let
|
|
2779
|
-
if (
|
|
2780
|
-
return p.drawImage(e, 0, 0, Number(c), Number(
|
|
2799
|
+
let s = document.createElement("canvas"), p = s.getContext("2d"), c = this.outputWidth === void 0 ? this.width : this.outputWidth, g = this.outputHeight === void 0 ? this.height : this.outputHeight;
|
|
2800
|
+
if (s.width = Number(c), s.height = Number(g), p)
|
|
2801
|
+
return p.drawImage(e, 0, 0, Number(c), Number(g)), this.$emit("update:image", s.toDataURL("image/" + this.saveAs, 1)), s.toDataURL("image/" + this.saveAs, 1);
|
|
2781
2802
|
}
|
|
2782
2803
|
},
|
|
2783
2804
|
isEmpty() {
|
|
@@ -2815,7 +2836,7 @@ var la = /* @__PURE__ */ F({
|
|
|
2815
2836
|
});
|
|
2816
2837
|
}
|
|
2817
2838
|
});
|
|
2818
|
-
const
|
|
2839
|
+
const oa = { class: "d-flex flex-column" }, sa = { class: "d-flex flex-row mt-1 gap-1" }, Ki = /* @__PURE__ */ $({
|
|
2819
2840
|
__name: "ForgeScratchpad",
|
|
2820
2841
|
props: {
|
|
2821
2842
|
showClear: { type: Boolean, default: !0 },
|
|
@@ -2828,81 +2849,81 @@ const na = { class: "d-flex flex-column" }, oa = { class: "d-flex flex-row mt-1
|
|
|
2828
2849
|
},
|
|
2829
2850
|
emits: ["save"],
|
|
2830
2851
|
setup(e, { emit: t }) {
|
|
2831
|
-
const a = e, i = t, l =
|
|
2852
|
+
const a = e, i = t, l = Be("drawingCanvas"), n = _(), o = () => {
|
|
2832
2853
|
l == null || l.value.reset();
|
|
2833
|
-
},
|
|
2854
|
+
}, s = () => {
|
|
2834
2855
|
l == null || l.value.redo();
|
|
2835
2856
|
}, p = () => {
|
|
2836
2857
|
l == null || l.value.undo();
|
|
2837
2858
|
}, c = () => {
|
|
2838
2859
|
i("save", l.value.isEmpty());
|
|
2839
2860
|
};
|
|
2840
|
-
return (
|
|
2841
|
-
const
|
|
2842
|
-
return
|
|
2843
|
-
x(u(
|
|
2861
|
+
return (g, d) => {
|
|
2862
|
+
const B = A;
|
|
2863
|
+
return r(), v("div", oa, [
|
|
2864
|
+
x(u(na), C({
|
|
2844
2865
|
ref_key: "drawingCanvas",
|
|
2845
2866
|
ref: l,
|
|
2846
2867
|
image: n.value,
|
|
2847
|
-
"onUpdate:image":
|
|
2868
|
+
"onUpdate:image": d[0] || (d[0] = (S) => n.value = S),
|
|
2848
2869
|
"data-cy": "drawing-canvas",
|
|
2849
2870
|
class: "border canvas"
|
|
2850
|
-
}, { ...
|
|
2851
|
-
height:
|
|
2852
|
-
width:
|
|
2853
|
-
style: `height: ${
|
|
2854
|
-
"line-join":
|
|
2871
|
+
}, { ...g.$attrs }, {
|
|
2872
|
+
height: g.height,
|
|
2873
|
+
width: g.width,
|
|
2874
|
+
style: `height: ${g.height}px; width: ${g.width}px`,
|
|
2875
|
+
"line-join": g.lineJoin
|
|
2855
2876
|
}), null, 16, ["image", "height", "width", "style", "line-join"]),
|
|
2856
|
-
m("div",
|
|
2857
|
-
a.showUndo ? (
|
|
2877
|
+
m("div", sa, [
|
|
2878
|
+
a.showUndo ? (r(), f(B, {
|
|
2858
2879
|
key: 0,
|
|
2859
2880
|
onClick: p,
|
|
2860
2881
|
outlined: "",
|
|
2861
2882
|
"data-cy": "undo-button"
|
|
2862
2883
|
}, {
|
|
2863
|
-
default: b(() =>
|
|
2864
|
-
|
|
2884
|
+
default: b(() => d[1] || (d[1] = [
|
|
2885
|
+
I("Undo")
|
|
2865
2886
|
])),
|
|
2866
2887
|
_: 1
|
|
2867
|
-
})) :
|
|
2868
|
-
a.showRedo ? (
|
|
2888
|
+
})) : z("", !0),
|
|
2889
|
+
a.showRedo ? (r(), f(B, {
|
|
2869
2890
|
key: 1,
|
|
2870
|
-
onClick:
|
|
2891
|
+
onClick: s,
|
|
2871
2892
|
outlined: "",
|
|
2872
2893
|
"data-cy": "redo-button"
|
|
2873
2894
|
}, {
|
|
2874
|
-
default: b(() =>
|
|
2875
|
-
|
|
2895
|
+
default: b(() => d[2] || (d[2] = [
|
|
2896
|
+
I("Redo")
|
|
2876
2897
|
])),
|
|
2877
2898
|
_: 1
|
|
2878
|
-
})) :
|
|
2879
|
-
a.showClear ? (
|
|
2899
|
+
})) : z("", !0),
|
|
2900
|
+
a.showClear ? (r(), f(B, {
|
|
2880
2901
|
key: 2,
|
|
2881
2902
|
onClick: o,
|
|
2882
2903
|
outlined: "",
|
|
2883
2904
|
"data-cy": "clear-button"
|
|
2884
2905
|
}, {
|
|
2885
|
-
default: b(() =>
|
|
2886
|
-
|
|
2906
|
+
default: b(() => d[3] || (d[3] = [
|
|
2907
|
+
I("Clear")
|
|
2887
2908
|
])),
|
|
2888
2909
|
_: 1
|
|
2889
|
-
})) :
|
|
2890
|
-
a.showSave ? (
|
|
2910
|
+
})) : z("", !0),
|
|
2911
|
+
a.showSave ? (r(), f(B, {
|
|
2891
2912
|
key: 3,
|
|
2892
2913
|
onClick: c,
|
|
2893
2914
|
class: "ms-auto",
|
|
2894
2915
|
"data-cy": "save-button"
|
|
2895
2916
|
}, {
|
|
2896
|
-
default: b(() =>
|
|
2897
|
-
|
|
2917
|
+
default: b(() => d[4] || (d[4] = [
|
|
2918
|
+
I("Save")
|
|
2898
2919
|
])),
|
|
2899
2920
|
_: 1
|
|
2900
|
-
})) :
|
|
2921
|
+
})) : z("", !0)
|
|
2901
2922
|
])
|
|
2902
2923
|
]);
|
|
2903
2924
|
};
|
|
2904
2925
|
}
|
|
2905
|
-
}),
|
|
2926
|
+
}), ra = { class: "value text-white w-100 text-center" }, Zi = /* @__PURE__ */ $({
|
|
2906
2927
|
__name: "ForgeStatWidget",
|
|
2907
2928
|
props: {
|
|
2908
2929
|
size: { default: "md" },
|
|
@@ -2910,15 +2931,15 @@ const na = { class: "d-flex flex-column" }, oa = { class: "d-flex flex-row mt-1
|
|
|
2910
2931
|
},
|
|
2911
2932
|
setup(e) {
|
|
2912
2933
|
const t = e;
|
|
2913
|
-
return (a, i) => (
|
|
2934
|
+
return (a, i) => (r(), v("div", C(a.$attrs, {
|
|
2914
2935
|
class: `d-flex shadow m-2 align-items-center widget--${t.size} bg-${t.severity}`
|
|
2915
2936
|
}), [
|
|
2916
|
-
m("span",
|
|
2917
|
-
|
|
2937
|
+
m("span", ra, [
|
|
2938
|
+
w(a.$slots, "default")
|
|
2918
2939
|
])
|
|
2919
2940
|
], 16));
|
|
2920
2941
|
}
|
|
2921
|
-
}),
|
|
2942
|
+
}), da = { key: 0 }, Xi = /* @__PURE__ */ $({
|
|
2922
2943
|
__name: "ForgeStepper",
|
|
2923
2944
|
props: {
|
|
2924
2945
|
currentStep: { default: 1 },
|
|
@@ -2936,7 +2957,7 @@ const na = { class: "d-flex flex-column" }, oa = { class: "d-flex flex-row mt-1
|
|
|
2936
2957
|
unstyled: { type: Boolean }
|
|
2937
2958
|
},
|
|
2938
2959
|
setup(e) {
|
|
2939
|
-
const t = e, a =
|
|
2960
|
+
const t = e, a = T(() => ({
|
|
2940
2961
|
header: {
|
|
2941
2962
|
class: [
|
|
2942
2963
|
"p-0 m-0 d-flex align-items-center border border-0 bg-transparent gap-1",
|
|
@@ -2965,18 +2986,18 @@ const na = { class: "d-flex flex-column" }, oa = { class: "d-flex flex-row mt-1
|
|
|
2965
2986
|
]
|
|
2966
2987
|
})
|
|
2967
2988
|
}));
|
|
2968
|
-
return (i, l) => (
|
|
2989
|
+
return (i, l) => (r(), f(u(Ne), { value: i.currentStep }, {
|
|
2969
2990
|
default: b(() => [
|
|
2970
2991
|
x(u(Ue), null, {
|
|
2971
2992
|
default: b(() => [
|
|
2972
|
-
(
|
|
2993
|
+
(r(!0), v(O, null, N(i.steps, (n) => (r(), f(u(Oe), C({
|
|
2973
2994
|
key: n.value,
|
|
2974
2995
|
value: n.value,
|
|
2975
2996
|
disabled: n.disabled,
|
|
2976
2997
|
ref_for: !0
|
|
2977
2998
|
}, { ...i.$attrs }, { pt: a.value }), {
|
|
2978
2999
|
default: b(() => [
|
|
2979
|
-
i.showStepLabel ? (
|
|
3000
|
+
i.showStepLabel ? (r(), v("div", da, k(n.label), 1)) : z("", !0)
|
|
2980
3001
|
]),
|
|
2981
3002
|
_: 2
|
|
2982
3003
|
}, 1040, ["value", "disabled", "pt"]))), 128))
|
|
@@ -2985,12 +3006,12 @@ const na = { class: "d-flex flex-column" }, oa = { class: "d-flex flex-row mt-1
|
|
|
2985
3006
|
}),
|
|
2986
3007
|
x(u(qe), null, {
|
|
2987
3008
|
default: b(() => [
|
|
2988
|
-
(
|
|
3009
|
+
(r(!0), v(O, null, N(i.steps, (n) => (r(), f(u(Ae), {
|
|
2989
3010
|
key: n.value,
|
|
2990
3011
|
value: n.value
|
|
2991
3012
|
}, {
|
|
2992
3013
|
default: b(() => [
|
|
2993
|
-
|
|
3014
|
+
w(i.$slots, "step" + n.value)
|
|
2994
3015
|
]),
|
|
2995
3016
|
_: 2
|
|
2996
3017
|
}, 1032, ["value"]))), 128))
|
|
@@ -3001,7 +3022,7 @@ const na = { class: "d-flex flex-column" }, oa = { class: "d-flex flex-row mt-1
|
|
|
3001
3022
|
_: 3
|
|
3002
3023
|
}, 8, ["value"]));
|
|
3003
3024
|
}
|
|
3004
|
-
}),
|
|
3025
|
+
}), pa = { class: "p-4 text-wrap w-100" }, ca = { class: "p-4 text-wrap w-100" }, Qi = /* @__PURE__ */ $({
|
|
3005
3026
|
__name: "ForgeTile",
|
|
3006
3027
|
props: {
|
|
3007
3028
|
severity: { default: "primary" },
|
|
@@ -3010,32 +3031,32 @@ const na = { class: "d-flex flex-column" }, oa = { class: "d-flex flex-row mt-1
|
|
|
3010
3031
|
selected: { type: Boolean, default: !1 }
|
|
3011
3032
|
},
|
|
3012
3033
|
setup(e) {
|
|
3013
|
-
const t = e, a =
|
|
3034
|
+
const t = e, a = T(() => `${t.severity === void 0 ? "tile-primary" : `tile-${t.severity}`} ${t.barPosition === "none" ? "" : `tile-bar-${t.barPosition}`} ${t.selected ? "selected" : ""}`), i = T(() => `${t.severity === void 0 ? "tile-primary border-primary" : `tile-${t.severity} border-${t.severity}`} ${t.barPosition === "none" ? "" : `tile-bar-${t.barPosition}`} ${t.selected ? "selected" : ""}`);
|
|
3014
3035
|
return (l, n) => {
|
|
3015
|
-
const o =
|
|
3016
|
-
return t.clickable ? (
|
|
3036
|
+
const o = A;
|
|
3037
|
+
return t.clickable ? (r(), f(o, {
|
|
3017
3038
|
key: 0,
|
|
3018
|
-
class:
|
|
3039
|
+
class: F(["d-flex w-100 p-0 text-body", a.value]),
|
|
3019
3040
|
severity: t.severity,
|
|
3020
3041
|
unstyled: "",
|
|
3021
3042
|
"data-cy": "button-tile"
|
|
3022
3043
|
}, {
|
|
3023
3044
|
default: b(() => [
|
|
3024
|
-
m("div",
|
|
3025
|
-
|
|
3026
|
-
n[0] || (n[0] =
|
|
3045
|
+
m("div", pa, [
|
|
3046
|
+
w(l.$slots, "default", {}, () => [
|
|
3047
|
+
n[0] || (n[0] = I("Tile Content"))
|
|
3027
3048
|
])
|
|
3028
3049
|
])
|
|
3029
3050
|
]),
|
|
3030
3051
|
_: 3
|
|
3031
|
-
}, 8, ["severity", "class"])) : (
|
|
3052
|
+
}, 8, ["severity", "class"])) : (r(), v("div", {
|
|
3032
3053
|
key: 1,
|
|
3033
|
-
class:
|
|
3054
|
+
class: F(["d-flex w-100", i.value]),
|
|
3034
3055
|
"data-cy": "tile"
|
|
3035
3056
|
}, [
|
|
3036
|
-
m("div",
|
|
3037
|
-
|
|
3038
|
-
n[1] || (n[1] =
|
|
3057
|
+
m("div", ca, [
|
|
3058
|
+
w(l.$slots, "default", {}, () => [
|
|
3059
|
+
n[1] || (n[1] = I("Tile Content"))
|
|
3039
3060
|
])
|
|
3040
3061
|
])
|
|
3041
3062
|
], 2));
|
|
@@ -3045,13 +3066,13 @@ const na = { class: "d-flex flex-column" }, oa = { class: "d-flex flex-row mt-1
|
|
|
3045
3066
|
function Q(e, t) {
|
|
3046
3067
|
return e > 1 ? `${t}s` : t;
|
|
3047
3068
|
}
|
|
3048
|
-
const
|
|
3069
|
+
const ua = {
|
|
3049
3070
|
class: "d-flex justify-content-start align-items-baseline",
|
|
3050
3071
|
"data-cy": "pagination-header"
|
|
3051
|
-
},
|
|
3072
|
+
}, ma = { class: "ms-2" }, va = { key: 0 }, fa = {
|
|
3052
3073
|
class: "w-auto",
|
|
3053
3074
|
"data-cy": "total"
|
|
3054
|
-
},
|
|
3075
|
+
}, ga = /* @__PURE__ */ $({
|
|
3055
3076
|
__name: "ForgePaginationHeader",
|
|
3056
3077
|
props: {
|
|
3057
3078
|
total: {},
|
|
@@ -3062,30 +3083,30 @@ const ca = {
|
|
|
3062
3083
|
setup(e, { emit: t }) {
|
|
3063
3084
|
const a = t, i = e, l = (o) => {
|
|
3064
3085
|
a("update:perPage", o.value);
|
|
3065
|
-
}, n =
|
|
3086
|
+
}, n = T(() => {
|
|
3066
3087
|
const o = Math.ceil(i.total / i.perPage);
|
|
3067
3088
|
return `${o} ${Q(o, "page")}`;
|
|
3068
3089
|
});
|
|
3069
|
-
return (o,
|
|
3070
|
-
|
|
3071
|
-
m("div",
|
|
3090
|
+
return (o, s) => (r(), v("div", ua, [
|
|
3091
|
+
s[2] || (s[2] = I(" Number of results per page ")),
|
|
3092
|
+
m("div", ma, [
|
|
3072
3093
|
x(u(te), {
|
|
3073
3094
|
options: i.pageSizes,
|
|
3074
3095
|
"model-value": i.perPage,
|
|
3075
3096
|
class: "page-size",
|
|
3076
|
-
onChange:
|
|
3097
|
+
onChange: s[0] || (s[0] = (p) => l(p))
|
|
3077
3098
|
}, null, 8, ["options", "model-value"])
|
|
3078
3099
|
]),
|
|
3079
|
-
i.total ? (
|
|
3080
|
-
|
|
3081
|
-
m("span",
|
|
3082
|
-
])) :
|
|
3100
|
+
i.total ? (r(), v("div", va, [
|
|
3101
|
+
s[1] || (s[1] = m("span", { class: "mx-2" }, "|", -1)),
|
|
3102
|
+
m("span", fa, k(i.total) + " " + k(u(Q)(i.total, "result")) + " across " + k(n.value), 1)
|
|
3103
|
+
])) : z("", !0)
|
|
3083
3104
|
]));
|
|
3084
3105
|
}
|
|
3085
|
-
}),
|
|
3106
|
+
}), ba = { class: "position-relative" }, ya = { "data-cy": "above-table-slot" }, xa = { class: "d-flex w-100" }, ha = {
|
|
3086
3107
|
class: "mx-auto",
|
|
3087
3108
|
"data-cy": "empty-message"
|
|
3088
|
-
},
|
|
3109
|
+
}, wa = { class: "d-flex" }, ka = { class: "d-flex align-items-end mb-2" }, $a = { key: 0 }, Ba = { class: "ms-auto" }, el = /* @__PURE__ */ $({
|
|
3089
3110
|
__name: "ForgeTable",
|
|
3090
3111
|
props: {
|
|
3091
3112
|
value: {},
|
|
@@ -3171,17 +3192,17 @@ const ca = {
|
|
|
3171
3192
|
},
|
|
3172
3193
|
emits: ["update:filters", "update:tableContext", "sort", "page"],
|
|
3173
3194
|
setup(e, { emit: t }) {
|
|
3174
|
-
const a = t, i = e, l =
|
|
3195
|
+
const a = t, i = e, l = _(), n = _([5, 10, 20, 50, 100]), o = _(10), s = _({
|
|
3175
3196
|
filters: i.filters,
|
|
3176
3197
|
perPage: o.value,
|
|
3177
3198
|
page: 0,
|
|
3178
3199
|
sortDirection: "None",
|
|
3179
3200
|
sortField: "",
|
|
3180
3201
|
total: i.totalRecords ?? i.value.length
|
|
3181
|
-
}), p =
|
|
3182
|
-
const
|
|
3183
|
-
return `${
|
|
3184
|
-
}),
|
|
3202
|
+
}), p = T(() => i.totalRecords ?? i.value.length), c = T(() => {
|
|
3203
|
+
const y = Math.ceil(p.value / o.value);
|
|
3204
|
+
return `${y} ${Q(y, "page")}`;
|
|
3205
|
+
}), g = T(() => ({
|
|
3185
3206
|
thead: () => ({
|
|
3186
3207
|
class: [
|
|
3187
3208
|
{
|
|
@@ -3203,35 +3224,35 @@ const ca = {
|
|
|
3203
3224
|
}
|
|
3204
3225
|
]
|
|
3205
3226
|
})
|
|
3206
|
-
})),
|
|
3227
|
+
})), d = () => {
|
|
3207
3228
|
if (i.clearAll)
|
|
3208
3229
|
i.clearAll();
|
|
3209
3230
|
else
|
|
3210
|
-
for (const
|
|
3211
|
-
typeof i.filters[
|
|
3231
|
+
for (const y in i.filters)
|
|
3232
|
+
typeof i.filters[y] == "string" ? i.filters[y] = "" : i.filters[y].value = null;
|
|
3212
3233
|
V(i.filters);
|
|
3213
|
-
},
|
|
3234
|
+
}, B = () => {
|
|
3214
3235
|
l.value.exportCSV();
|
|
3215
|
-
},
|
|
3236
|
+
}, S = (y) => {
|
|
3216
3237
|
var h;
|
|
3217
|
-
|
|
3218
|
-
}, V = (
|
|
3219
|
-
|
|
3220
|
-
}, M = (
|
|
3221
|
-
|
|
3222
|
-
},
|
|
3223
|
-
|
|
3238
|
+
s.value.sortDirection = y.sortOrder === 1 ? "Asc" : y.sortOrder === -1 ? "Desc" : "None", s.value.sortField = ((h = y.sortField) == null ? void 0 : h.toString()) ?? "", a("update:tableContext", s.value), a("sort", y);
|
|
3239
|
+
}, V = (y) => {
|
|
3240
|
+
s.value.filters = y, a("update:tableContext", s.value), a("update:filters", y);
|
|
3241
|
+
}, M = (y) => {
|
|
3242
|
+
s.value.page = y.page, a("update:tableContext", s.value), a("page", y);
|
|
3243
|
+
}, q = () => {
|
|
3244
|
+
s.value.perPage = o.value, a("update:tableContext", s.value);
|
|
3224
3245
|
};
|
|
3225
|
-
return ce(() => i.filters, (
|
|
3226
|
-
|
|
3227
|
-
}, { deep: !0 }), le(() => a("update:tableContext",
|
|
3228
|
-
m("span",
|
|
3229
|
-
|
|
3246
|
+
return ce(() => i.filters, (y) => {
|
|
3247
|
+
s.value.filters = y, a("update:tableContext", s.value);
|
|
3248
|
+
}, { deep: !0 }), le(() => a("update:tableContext", s.value)), (y, h) => (r(), v("div", ba, [
|
|
3249
|
+
m("span", ya, [
|
|
3250
|
+
w(y.$slots, "above-table")
|
|
3230
3251
|
]),
|
|
3231
|
-
x(u(Ee),
|
|
3252
|
+
x(u(Ee), C({
|
|
3232
3253
|
class: ["w-100", `${i.severity ? `forge-table-${i.severity}` : ""}`]
|
|
3233
|
-
}, { ...i, ...
|
|
3234
|
-
pt:
|
|
3254
|
+
}, { ...i, ...y.$attrs }, {
|
|
3255
|
+
pt: g.value,
|
|
3235
3256
|
rows: o.value,
|
|
3236
3257
|
"total-records": p.value,
|
|
3237
3258
|
"filter-display": i.filters ? "row" : void 0,
|
|
@@ -3239,88 +3260,88 @@ const ca = {
|
|
|
3239
3260
|
ref: l,
|
|
3240
3261
|
"data-cy": "table",
|
|
3241
3262
|
"onUpdate:filters": V,
|
|
3242
|
-
onSort:
|
|
3263
|
+
onSort: S,
|
|
3243
3264
|
onPage: M,
|
|
3244
3265
|
showHeaders: ""
|
|
3245
3266
|
}), ie({
|
|
3246
3267
|
empty: b(() => [
|
|
3247
|
-
m("div",
|
|
3248
|
-
m("h5",
|
|
3268
|
+
m("div", xa, [
|
|
3269
|
+
m("h5", ha, k(y.emptyMessage ?? "No items Found."), 1)
|
|
3249
3270
|
])
|
|
3250
3271
|
]),
|
|
3251
3272
|
header: b(() => [
|
|
3252
3273
|
m("div", {
|
|
3253
|
-
class:
|
|
3274
|
+
class: F(i.loading ? "opacity-50" : "")
|
|
3254
3275
|
}, [
|
|
3255
|
-
m("div",
|
|
3256
|
-
m("div",
|
|
3257
|
-
|
|
3258
|
-
x(
|
|
3276
|
+
m("div", wa, [
|
|
3277
|
+
m("div", ka, [
|
|
3278
|
+
y.paginator && !y.legacyPaginationFooter ? (r(), v("span", $a, [
|
|
3279
|
+
x(ga, {
|
|
3259
3280
|
total: p.value,
|
|
3260
3281
|
"page-sizes": n.value,
|
|
3261
3282
|
"per-page": o.value,
|
|
3262
3283
|
"onUpdate:perPage": [
|
|
3263
3284
|
h[0] || (h[0] = (P) => o.value = P),
|
|
3264
|
-
|
|
3285
|
+
q
|
|
3265
3286
|
]
|
|
3266
3287
|
}, null, 8, ["total", "page-sizes", "per-page"])
|
|
3267
|
-
])) :
|
|
3288
|
+
])) : z("", !0)
|
|
3268
3289
|
]),
|
|
3269
|
-
m("div",
|
|
3270
|
-
|
|
3290
|
+
m("div", Ba, [
|
|
3291
|
+
y.showClearButton ? (r(), f(u(A), {
|
|
3271
3292
|
key: 0,
|
|
3272
3293
|
outlined: "",
|
|
3273
|
-
class:
|
|
3274
|
-
onClick:
|
|
3294
|
+
class: F(y.showExporterButton ? "me-2" : ""),
|
|
3295
|
+
onClick: d,
|
|
3275
3296
|
"data-cy": "clear-all"
|
|
3276
3297
|
}, {
|
|
3277
3298
|
default: b(() => [
|
|
3278
|
-
x(u(
|
|
3299
|
+
x(u(j), {
|
|
3279
3300
|
icon: "bi:funnel-fill",
|
|
3280
3301
|
width: "24",
|
|
3281
3302
|
height: "24"
|
|
3282
3303
|
}),
|
|
3283
|
-
h[2] || (h[2] =
|
|
3304
|
+
h[2] || (h[2] = I(" Clear "))
|
|
3284
3305
|
]),
|
|
3285
3306
|
_: 1
|
|
3286
|
-
}, 8, ["class"])) :
|
|
3287
|
-
|
|
3307
|
+
}, 8, ["class"])) : z("", !0),
|
|
3308
|
+
y.showExporterButton ? (r(), f(u(A), {
|
|
3288
3309
|
key: 1,
|
|
3289
3310
|
outlined: "",
|
|
3290
|
-
onClick:
|
|
3311
|
+
onClick: B,
|
|
3291
3312
|
"data-cy": "exporter"
|
|
3292
3313
|
}, {
|
|
3293
3314
|
default: b(() => [
|
|
3294
|
-
x(u(
|
|
3315
|
+
x(u(j), {
|
|
3295
3316
|
icon: "typcn:export",
|
|
3296
3317
|
width: "24",
|
|
3297
3318
|
height: "24"
|
|
3298
3319
|
}),
|
|
3299
|
-
h[3] || (h[3] =
|
|
3320
|
+
h[3] || (h[3] = I(" Export "))
|
|
3300
3321
|
]),
|
|
3301
3322
|
_: 1
|
|
3302
|
-
})) :
|
|
3303
|
-
|
|
3323
|
+
})) : z("", !0),
|
|
3324
|
+
w(y.$slots, "column-customiser")
|
|
3304
3325
|
])
|
|
3305
3326
|
])
|
|
3306
3327
|
], 2)
|
|
3307
3328
|
]),
|
|
3308
3329
|
default: b(() => [
|
|
3309
|
-
|
|
3330
|
+
w(y.$slots, "default")
|
|
3310
3331
|
]),
|
|
3311
3332
|
_: 2
|
|
3312
3333
|
}, [
|
|
3313
|
-
|
|
3334
|
+
N(y.$slots, (P, L) => ({
|
|
3314
3335
|
name: L,
|
|
3315
3336
|
fn: b((ae) => [
|
|
3316
|
-
|
|
3337
|
+
w(y.$slots, L, J(K(ae || {})))
|
|
3317
3338
|
])
|
|
3318
3339
|
})),
|
|
3319
|
-
|
|
3340
|
+
y.legacyPaginationFooter ? {
|
|
3320
3341
|
name: "paginatorstart",
|
|
3321
3342
|
fn: b(() => [
|
|
3322
3343
|
m("span", {
|
|
3323
|
-
class:
|
|
3344
|
+
class: F(["d-flex", i.loading ? "opacity-50" : ""]),
|
|
3324
3345
|
"data-cy": "legacy-page-size"
|
|
3325
3346
|
}, [
|
|
3326
3347
|
h[4] || (h[4] = m("span", { class: "me-2 my-auto text-nowrap" }, "Page Size:", -1)),
|
|
@@ -3329,28 +3350,28 @@ const ca = {
|
|
|
3329
3350
|
modelValue: o.value,
|
|
3330
3351
|
"onUpdate:modelValue": h[1] || (h[1] = (P) => o.value = P),
|
|
3331
3352
|
class: "ms-2",
|
|
3332
|
-
onClick:
|
|
3353
|
+
onClick: q
|
|
3333
3354
|
}, null, 8, ["options", "modelValue"])
|
|
3334
3355
|
], 2)
|
|
3335
3356
|
]),
|
|
3336
3357
|
key: "0"
|
|
3337
3358
|
} : void 0,
|
|
3338
|
-
|
|
3359
|
+
y.legacyPaginationFooter ? {
|
|
3339
3360
|
name: "paginatorend",
|
|
3340
3361
|
fn: b(() => [
|
|
3341
3362
|
m("span", {
|
|
3342
3363
|
"data-cy": "legacy-total",
|
|
3343
|
-
class:
|
|
3344
|
-
},
|
|
3364
|
+
class: F(i.loading ? "opacity-50" : "")
|
|
3365
|
+
}, k(p.value) + " " + k(u(Q)(p.value, "result")) + " across " + k(c.value), 3)
|
|
3345
3366
|
]),
|
|
3346
3367
|
key: "1"
|
|
3347
3368
|
} : void 0
|
|
3348
3369
|
]), 1040, ["class", "pt", "rows", "total-records", "filter-display"])
|
|
3349
3370
|
]));
|
|
3350
3371
|
}
|
|
3351
|
-
}), Fa = { class: "d-flex position-relative" },
|
|
3372
|
+
}), Fa = { class: "d-flex position-relative" }, Sa = { class: "d-flex w-100" }, tl = /* @__PURE__ */ $({
|
|
3352
3373
|
__name: "ForgeFilterHeader",
|
|
3353
|
-
props: /* @__PURE__ */
|
|
3374
|
+
props: /* @__PURE__ */ U({
|
|
3354
3375
|
dataType: {},
|
|
3355
3376
|
dropdownOptions: {},
|
|
3356
3377
|
showClearButton: { type: Boolean, default: !1 },
|
|
@@ -3366,10 +3387,10 @@ const ca = {
|
|
|
3366
3387
|
const t = D(e, "modelValue"), a = (l, n) => {
|
|
3367
3388
|
if (!l || Array.isArray(l) && l.length === 0)
|
|
3368
3389
|
return n;
|
|
3369
|
-
const o = (
|
|
3390
|
+
const o = (s) => {
|
|
3370
3391
|
var c;
|
|
3371
3392
|
const p = (c = e.dropdownOptions) == null ? void 0 : c.find(
|
|
3372
|
-
(
|
|
3393
|
+
(g) => e.optionValue ? g[e.optionValue] === s : Object.keys(g).every((d) => s.hasOwnProperty(d) && g[d] === s[d])
|
|
3373
3394
|
);
|
|
3374
3395
|
return e.optionLabel ? p[e.optionLabel] : p;
|
|
3375
3396
|
};
|
|
@@ -3378,21 +3399,21 @@ const ca = {
|
|
|
3378
3399
|
e.clearFilter ? e.clearFilter() : t.value = null;
|
|
3379
3400
|
};
|
|
3380
3401
|
return (l, n) => {
|
|
3381
|
-
const o = ue,
|
|
3382
|
-
return
|
|
3383
|
-
l.dataType === "numeric" ? (
|
|
3402
|
+
const o = ue, s = A;
|
|
3403
|
+
return r(), v("div", Fa, [
|
|
3404
|
+
l.dataType === "numeric" ? (r(), f(o, C({
|
|
3384
3405
|
key: 0,
|
|
3385
3406
|
modelValue: t.value,
|
|
3386
3407
|
"onUpdate:modelValue": n[0] || (n[0] = (p) => t.value = p),
|
|
3387
3408
|
modelModifiers: { trim: !0 }
|
|
3388
|
-
}, l.$attrs), null, 16, ["modelValue"])) : l.dataType === "date" ? (
|
|
3409
|
+
}, l.$attrs), null, 16, ["modelValue"])) : l.dataType === "date" ? (r(), f(be, C({
|
|
3389
3410
|
key: 1,
|
|
3390
3411
|
modelValue: t.value,
|
|
3391
3412
|
"onUpdate:modelValue": n[1] || (n[1] = (p) => t.value = p)
|
|
3392
3413
|
}, l.$attrs, {
|
|
3393
3414
|
"show-icon": !1,
|
|
3394
3415
|
"show-on-focus": !0
|
|
3395
|
-
}), null, 16, ["modelValue"])) : l.dataType === "select" ? (
|
|
3416
|
+
}), null, 16, ["modelValue"])) : l.dataType === "select" ? (r(), f(u(te), C({
|
|
3396
3417
|
key: 2,
|
|
3397
3418
|
modelValue: t.value,
|
|
3398
3419
|
"onUpdate:modelValue": n[2] || (n[2] = (p) => t.value = p)
|
|
@@ -3402,18 +3423,18 @@ const ca = {
|
|
|
3402
3423
|
"option-label": l.optionLabel
|
|
3403
3424
|
}), {
|
|
3404
3425
|
value: b(({ value: p, placeholder: c }) => [
|
|
3405
|
-
m("div",
|
|
3426
|
+
m("div", Sa, [
|
|
3406
3427
|
m("span", {
|
|
3407
|
-
class:
|
|
3408
|
-
},
|
|
3409
|
-
l.showClearButton && t.value !== null ? (
|
|
3428
|
+
class: F({ "filter-placeholder": p === null })
|
|
3429
|
+
}, k(a(p, c)), 3),
|
|
3430
|
+
l.showClearButton && t.value !== null ? (r(), f(s, {
|
|
3410
3431
|
key: 0,
|
|
3411
3432
|
onClick: G(i, ["prevent"]),
|
|
3412
3433
|
size: "small",
|
|
3413
3434
|
class: "bg-transparent border-0 ms-auto p-0 pe-1"
|
|
3414
3435
|
}, {
|
|
3415
3436
|
default: b(() => [
|
|
3416
|
-
x(u(
|
|
3437
|
+
x(u(j), {
|
|
3417
3438
|
icon: "bi:x",
|
|
3418
3439
|
width: "1rem",
|
|
3419
3440
|
height: "1rem",
|
|
@@ -3421,11 +3442,11 @@ const ca = {
|
|
|
3421
3442
|
})
|
|
3422
3443
|
]),
|
|
3423
3444
|
_: 1
|
|
3424
|
-
})) :
|
|
3445
|
+
})) : z("", !0)
|
|
3425
3446
|
])
|
|
3426
3447
|
]),
|
|
3427
3448
|
_: 1
|
|
3428
|
-
}, 16, ["modelValue", "options", "option-value", "option-label"])) : l.dataType === "multiselect" ? (
|
|
3449
|
+
}, 16, ["modelValue", "options", "option-value", "option-label"])) : l.dataType === "multiselect" ? (r(), f(u(oe), C({
|
|
3429
3450
|
key: 3,
|
|
3430
3451
|
modelValue: t.value,
|
|
3431
3452
|
"onUpdate:modelValue": n[3] || (n[3] = (p) => t.value = p)
|
|
@@ -3435,20 +3456,20 @@ const ca = {
|
|
|
3435
3456
|
"option-label": l.optionLabel,
|
|
3436
3457
|
"option-value": l.optionValue,
|
|
3437
3458
|
filter: ""
|
|
3438
|
-
}), null, 16, ["modelValue", "options", "option-label", "option-value"])) : (
|
|
3459
|
+
}), null, 16, ["modelValue", "options", "option-label", "option-value"])) : (r(), f(u(ne), C({
|
|
3439
3460
|
key: 4,
|
|
3440
3461
|
modelValue: t.value,
|
|
3441
3462
|
"onUpdate:modelValue": n[4] || (n[4] = (p) => t.value = p),
|
|
3442
3463
|
modelModifiers: { trim: !0 }
|
|
3443
3464
|
}, l.$attrs), null, 16, ["modelValue"])),
|
|
3444
|
-
l.showClearButton && t.value !== null && l.dataType !== "select" && l.dataType !== "multiselect" && l.dataType !== "date" ? (
|
|
3465
|
+
l.showClearButton && t.value !== null && l.dataType !== "select" && l.dataType !== "multiselect" && l.dataType !== "date" ? (r(), f(s, {
|
|
3445
3466
|
key: 5,
|
|
3446
3467
|
onClick: G(i, ["prevent"]),
|
|
3447
3468
|
size: "small",
|
|
3448
3469
|
class: "bg-transparent border-0 ms-auto p-0 pe-1 position-absolute end-0 top-0 bottom-0"
|
|
3449
3470
|
}, {
|
|
3450
3471
|
default: b(() => [
|
|
3451
|
-
x(u(
|
|
3472
|
+
x(u(j), {
|
|
3452
3473
|
icon: "bi:x",
|
|
3453
3474
|
width: "1rem",
|
|
3454
3475
|
height: "1rem",
|
|
@@ -3456,7 +3477,7 @@ const ca = {
|
|
|
3456
3477
|
})
|
|
3457
3478
|
]),
|
|
3458
3479
|
_: 1
|
|
3459
|
-
})) :
|
|
3480
|
+
})) : z("", !0)
|
|
3460
3481
|
]);
|
|
3461
3482
|
};
|
|
3462
3483
|
}
|
|
@@ -4517,26 +4538,26 @@ var E = function(e, t, a, i) {
|
|
|
4517
4538
|
if (a === "a" && !i) throw new TypeError("Private accessor was defined without a getter");
|
|
4518
4539
|
if (typeof t == "function" ? e !== t || !i : !t.has(e)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4519
4540
|
return a === "m" ? i : a === "a" ? i.call(e) : i ? i.value : t.get(e);
|
|
4520
|
-
}, W,
|
|
4541
|
+
}, W, Z, R;
|
|
4521
4542
|
class ye {
|
|
4522
4543
|
constructor(...t) {
|
|
4523
|
-
W.set(this, /* @__PURE__ */ new Map()),
|
|
4544
|
+
W.set(this, /* @__PURE__ */ new Map()), Z.set(this, /* @__PURE__ */ new Map()), R.set(this, /* @__PURE__ */ new Map());
|
|
4524
4545
|
for (const a of t)
|
|
4525
4546
|
this.define(a);
|
|
4526
4547
|
}
|
|
4527
4548
|
define(t, a = !1) {
|
|
4528
4549
|
for (let [i, l] of Object.entries(t)) {
|
|
4529
|
-
i = i.toLowerCase(), l = l.map((
|
|
4550
|
+
i = i.toLowerCase(), l = l.map((s) => s.toLowerCase()), E(this, R, "f").has(i) || E(this, R, "f").set(i, /* @__PURE__ */ new Set());
|
|
4530
4551
|
const n = E(this, R, "f").get(i);
|
|
4531
4552
|
let o = !0;
|
|
4532
|
-
for (let
|
|
4533
|
-
const p =
|
|
4534
|
-
if (
|
|
4553
|
+
for (let s of l) {
|
|
4554
|
+
const p = s.startsWith("*");
|
|
4555
|
+
if (s = p ? s.slice(1) : s, n == null || n.add(s), o && E(this, Z, "f").set(i, s), o = !1, p)
|
|
4535
4556
|
continue;
|
|
4536
|
-
const c = E(this, W, "f").get(
|
|
4557
|
+
const c = E(this, W, "f").get(s);
|
|
4537
4558
|
if (c && c != i && !a)
|
|
4538
|
-
throw new Error(`"${i} -> ${
|
|
4539
|
-
E(this, W, "f").set(
|
|
4559
|
+
throw new Error(`"${i} -> ${s}" conflicts with "${c} -> ${s}". Pass \`force=true\` to override this definition.`);
|
|
4560
|
+
E(this, W, "f").set(s, i);
|
|
4540
4561
|
}
|
|
4541
4562
|
}
|
|
4542
4563
|
return this;
|
|
@@ -4549,7 +4570,7 @@ class ye {
|
|
|
4549
4570
|
}
|
|
4550
4571
|
getExtension(t) {
|
|
4551
4572
|
var a;
|
|
4552
|
-
return typeof t != "string" ? null : (t = (a = t == null ? void 0 : t.split) == null ? void 0 : a.call(t, ";")[0], (t && E(this,
|
|
4573
|
+
return typeof t != "string" ? null : (t = (a = t == null ? void 0 : t.split) == null ? void 0 : a.call(t, ";")[0], (t && E(this, Z, "f").get(t.trim().toLowerCase())) ?? null);
|
|
4553
4574
|
}
|
|
4554
4575
|
getAllExtensions(t) {
|
|
4555
4576
|
return typeof t != "string" ? null : E(this, R, "f").get(t.toLowerCase()) ?? null;
|
|
@@ -4565,25 +4586,25 @@ class ye {
|
|
|
4565
4586
|
_getTestState() {
|
|
4566
4587
|
return {
|
|
4567
4588
|
types: E(this, W, "f"),
|
|
4568
|
-
extensions: E(this,
|
|
4589
|
+
extensions: E(this, Z, "f")
|
|
4569
4590
|
};
|
|
4570
4591
|
}
|
|
4571
4592
|
}
|
|
4572
|
-
W = /* @__PURE__ */ new WeakMap(),
|
|
4573
|
-
const
|
|
4593
|
+
W = /* @__PURE__ */ new WeakMap(), Z = /* @__PURE__ */ new WeakMap(), R = /* @__PURE__ */ new WeakMap();
|
|
4594
|
+
const Ca = new ye(de, re)._freeze();
|
|
4574
4595
|
function xe(e, t, a, i) {
|
|
4575
4596
|
const l = t.flatMap((n) => n.file);
|
|
4576
4597
|
return t = t.map((n) => ({ ...n, status: n.status == "Duplicate" ? "Not Uploaded" : n.status })), e.forEach((n) => {
|
|
4577
4598
|
const o = l.findIndex((p) => p.name === n.name);
|
|
4578
|
-
let
|
|
4579
|
-
o === -1 ? ((!a.includes(n.type) || !(n.size <= i)) && (
|
|
4599
|
+
let s = "Not Uploaded";
|
|
4600
|
+
o === -1 ? ((!a.includes(n.type) || !(n.size <= i)) && (s = a.includes(n.type) ? "InvalidFileSize" : "InvalidFileType"), t.unshift({
|
|
4580
4601
|
file: n,
|
|
4581
|
-
status:
|
|
4602
|
+
status: s,
|
|
4582
4603
|
blobFileName: null
|
|
4583
4604
|
})) : t[o].status = "Duplicate";
|
|
4584
4605
|
}), t;
|
|
4585
4606
|
}
|
|
4586
|
-
async function
|
|
4607
|
+
async function za(e, t) {
|
|
4587
4608
|
if (e === "Uploaded" && t !== null)
|
|
4588
4609
|
try {
|
|
4589
4610
|
await new me(t).delete();
|
|
@@ -4606,22 +4627,22 @@ function pe(e, t = !0, a = 1) {
|
|
|
4606
4627
|
while (Math.round(Math.abs(e) * o) / o >= i && n < l.length - 1);
|
|
4607
4628
|
return e.toFixed(a) + " " + l[n];
|
|
4608
4629
|
}
|
|
4609
|
-
function
|
|
4630
|
+
function Ta(e) {
|
|
4610
4631
|
return ["image/gif", "image/png", "image/jpeg", "image/svg"].includes(e);
|
|
4611
4632
|
}
|
|
4612
|
-
function
|
|
4633
|
+
function ja(e) {
|
|
4613
4634
|
return URL.createObjectURL(e);
|
|
4614
4635
|
}
|
|
4615
|
-
function
|
|
4636
|
+
function Ia() {
|
|
4616
4637
|
const e = new ye(de, re);
|
|
4617
4638
|
return e.define({ "application/vnd.ms-outlook": ["pst"] }), e;
|
|
4618
4639
|
}
|
|
4619
|
-
const
|
|
4640
|
+
const _a = { class: "d-flex justify-content-between" }, Pa = ["accept", "disabled", "multiple"], Va = {
|
|
4620
4641
|
class: "text-break accepted-file-types-container",
|
|
4621
4642
|
id: "accepted-file-types-overlay"
|
|
4622
|
-
},
|
|
4643
|
+
}, Ma = /* @__PURE__ */ $({
|
|
4623
4644
|
__name: "UploadButton",
|
|
4624
|
-
props: /* @__PURE__ */
|
|
4645
|
+
props: /* @__PURE__ */ U({
|
|
4625
4646
|
acceptedFileTypes: {},
|
|
4626
4647
|
maxFileInput: {},
|
|
4627
4648
|
showDragDropArea: { type: Boolean }
|
|
@@ -4631,13 +4652,13 @@ const Ia = { class: "d-flex justify-content-between" }, _a = ["accept", "disable
|
|
|
4631
4652
|
}),
|
|
4632
4653
|
emits: ["update:modelValue"],
|
|
4633
4654
|
setup(e) {
|
|
4634
|
-
const t = D(e, "modelValue"), a =
|
|
4635
|
-
t.value = xe(o, t.value, e.acceptedFileTypes.map((
|
|
4655
|
+
const t = D(e, "modelValue"), a = _(), i = (o) => a.value.toggle(o), l = T(() => e.maxFileInput <= t.value.length), n = (o) => {
|
|
4656
|
+
t.value = xe(o, t.value, e.acceptedFileTypes.map((s) => s.fileType), e.maxFileInput);
|
|
4636
4657
|
};
|
|
4637
|
-
return (o,
|
|
4638
|
-
const p =
|
|
4639
|
-
return
|
|
4640
|
-
|
|
4658
|
+
return (o, s) => {
|
|
4659
|
+
const p = A;
|
|
4660
|
+
return r(), v("div", _a, [
|
|
4661
|
+
w(o.$slots, "message"),
|
|
4641
4662
|
m("div", null, [
|
|
4642
4663
|
m("input", {
|
|
4643
4664
|
id: "file-input",
|
|
@@ -4646,58 +4667,58 @@ const Ia = { class: "d-flex justify-content-between" }, _a = ["accept", "disable
|
|
|
4646
4667
|
accept: o.acceptedFileTypes.join(", "),
|
|
4647
4668
|
disabled: l.value,
|
|
4648
4669
|
multiple: o.maxFileInput > 1,
|
|
4649
|
-
onInput:
|
|
4650
|
-
}, null, 40,
|
|
4670
|
+
onInput: s[0] || (s[0] = (c) => n([...c.target.files]))
|
|
4671
|
+
}, null, 40, Pa),
|
|
4651
4672
|
m("label", {
|
|
4652
|
-
class:
|
|
4673
|
+
class: F([{ disabled: l.value }, "btn btn-primary"]),
|
|
4653
4674
|
id: "file-input-button",
|
|
4654
4675
|
for: "file-input"
|
|
4655
4676
|
}, [
|
|
4656
|
-
|
|
4657
|
-
x(u(
|
|
4677
|
+
w(o.$slots, "button-content", {}, () => [
|
|
4678
|
+
x(u(j), {
|
|
4658
4679
|
icon: "bi:upload",
|
|
4659
4680
|
class: "me-2",
|
|
4660
4681
|
height: "20px",
|
|
4661
4682
|
width: "20px"
|
|
4662
4683
|
}),
|
|
4663
|
-
|
|
4684
|
+
s[1] || (s[1] = I(" Browse your computer "))
|
|
4664
4685
|
])
|
|
4665
4686
|
], 2)
|
|
4666
4687
|
]),
|
|
4667
|
-
o.showDragDropArea ? (
|
|
4688
|
+
o.showDragDropArea ? (r(), f(p, {
|
|
4668
4689
|
link: "",
|
|
4669
4690
|
class: "ms-auto",
|
|
4670
4691
|
key: o.acceptedFileTypes.length,
|
|
4671
4692
|
id: "accepted-file-types",
|
|
4672
4693
|
onClick: i
|
|
4673
4694
|
}, {
|
|
4674
|
-
default: b(() =>
|
|
4675
|
-
|
|
4695
|
+
default: b(() => s[2] || (s[2] = [
|
|
4696
|
+
I("Accepted File Types")
|
|
4676
4697
|
])),
|
|
4677
4698
|
_: 1
|
|
4678
|
-
})) :
|
|
4699
|
+
})) : z("", !0),
|
|
4679
4700
|
x(u(ve), {
|
|
4680
4701
|
ref_key: "acceptedFilesOverlay",
|
|
4681
4702
|
ref: a
|
|
4682
4703
|
}, {
|
|
4683
4704
|
default: b(() => [
|
|
4684
|
-
m("div",
|
|
4705
|
+
m("div", Va, k(o.acceptedFileTypes.map((c) => c.label ?? c.fileType.split("/").pop()).join(", ")), 1)
|
|
4685
4706
|
]),
|
|
4686
4707
|
_: 1
|
|
4687
4708
|
}, 512)
|
|
4688
4709
|
]);
|
|
4689
4710
|
};
|
|
4690
4711
|
}
|
|
4691
|
-
}),
|
|
4712
|
+
}), Da = {
|
|
4692
4713
|
key: 0,
|
|
4693
4714
|
class: "py-4 px-3",
|
|
4694
4715
|
id: "placeholder-message"
|
|
4695
|
-
},
|
|
4716
|
+
}, Oa = {
|
|
4696
4717
|
key: 1,
|
|
4697
4718
|
class: "d-flex flex-column"
|
|
4698
|
-
},
|
|
4719
|
+
}, Na = /* @__PURE__ */ $({
|
|
4699
4720
|
__name: "DragDropArea",
|
|
4700
|
-
props: /* @__PURE__ */
|
|
4721
|
+
props: /* @__PURE__ */ U({
|
|
4701
4722
|
maxFileInput: {},
|
|
4702
4723
|
maxFileSize: {},
|
|
4703
4724
|
acceptedFileTypes: {}
|
|
@@ -4707,30 +4728,30 @@ const Ia = { class: "d-flex justify-content-between" }, _a = ["accept", "disable
|
|
|
4707
4728
|
}),
|
|
4708
4729
|
emits: ["update:modelValue"],
|
|
4709
4730
|
setup(e) {
|
|
4710
|
-
const t = D(e, "modelValue"), a =
|
|
4731
|
+
const t = D(e, "modelValue"), a = _(!1), i = T(() => e.maxFileInput <= t.value.length), l = (n) => {
|
|
4711
4732
|
a.value = !1, n.dataTransfer.files.length > e.maxFileInput || i.value ? n.preventDefault() : t.value = xe([...n.dataTransfer.files], t.value, e.acceptedFileTypes.map((o) => o.fileType), e.maxFileSize);
|
|
4712
4733
|
};
|
|
4713
|
-
return (n, o) => (
|
|
4734
|
+
return (n, o) => (r(), v("div", {
|
|
4714
4735
|
id: "drag-drop-area",
|
|
4715
|
-
class:
|
|
4716
|
-
onDragleave: o[0] || (o[0] = G((
|
|
4717
|
-
onDragover: o[1] || (o[1] = G((
|
|
4736
|
+
class: F(`${a.value ? "border-2 border-primary bg-body-tertiary" : ""} mt-3 file-container border-dashed border-2`),
|
|
4737
|
+
onDragleave: o[0] || (o[0] = G((s) => a.value = !1, ["prevent"])),
|
|
4738
|
+
onDragover: o[1] || (o[1] = G((s) => a.value = !0, ["prevent"])),
|
|
4718
4739
|
onDrop: G(l, ["prevent"])
|
|
4719
4740
|
}, [
|
|
4720
|
-
t.value.length === 0 ? (
|
|
4721
|
-
x(u(
|
|
4741
|
+
t.value.length === 0 ? (r(), v("div", Da, [
|
|
4742
|
+
x(u(j), {
|
|
4722
4743
|
icon: "bi:upload",
|
|
4723
4744
|
class: "me-2",
|
|
4724
4745
|
height: "20px",
|
|
4725
4746
|
width: "20px"
|
|
4726
4747
|
}),
|
|
4727
|
-
o[2] || (o[2] =
|
|
4728
|
-
])) : (
|
|
4729
|
-
|
|
4748
|
+
o[2] || (o[2] = I(" Drag and drop files here "))
|
|
4749
|
+
])) : (r(), v("div", Oa, [
|
|
4750
|
+
w(n.$slots, "default")
|
|
4730
4751
|
]))
|
|
4731
4752
|
], 34));
|
|
4732
4753
|
}
|
|
4733
|
-
}),
|
|
4754
|
+
}), Ua = { class: "d-flex align-items-center me-2" }, Aa = /* @__PURE__ */ $({
|
|
4734
4755
|
__name: "UploadStatus",
|
|
4735
4756
|
props: {
|
|
4736
4757
|
fileSize: {},
|
|
@@ -4739,7 +4760,7 @@ const Ia = { class: "d-flex justify-content-between" }, _a = ["accept", "disable
|
|
|
4739
4760
|
uploadStatus: {}
|
|
4740
4761
|
},
|
|
4741
4762
|
setup(e) {
|
|
4742
|
-
const t =
|
|
4763
|
+
const t = T(() => e.uploadStatus === "Failed" || e.uploadStatus === "InvalidFileType" || e.uploadStatus === "InvalidFileSize" ? "danger" : "warning"), a = T(() => {
|
|
4743
4764
|
switch (e.uploadStatus) {
|
|
4744
4765
|
case "InvalidFileType":
|
|
4745
4766
|
return "Upload Failed: File type is not accepted.";
|
|
@@ -4755,43 +4776,43 @@ const Ia = { class: "d-flex justify-content-between" }, _a = ["accept", "disable
|
|
|
4755
4776
|
return "Upload Failed: Connection error, please try again.";
|
|
4756
4777
|
}
|
|
4757
4778
|
});
|
|
4758
|
-
return (i, l) => (
|
|
4759
|
-
i.uploadStatus === "Uploading" ? (
|
|
4779
|
+
return (i, l) => (r(), v("div", Ua, [
|
|
4780
|
+
i.uploadStatus === "Uploading" ? (r(), f(la, {
|
|
4760
4781
|
key: 0,
|
|
4761
4782
|
pixelWidth: 200,
|
|
4762
4783
|
animate: "",
|
|
4763
4784
|
striped: ""
|
|
4764
4785
|
}, {
|
|
4765
4786
|
default: b(() => [
|
|
4766
|
-
|
|
4787
|
+
I(k((i.bytesUploaded / i.fileSize * 100).toFixed(0)) + "%", 1)
|
|
4767
4788
|
]),
|
|
4768
4789
|
_: 1
|
|
4769
|
-
})) :
|
|
4770
|
-
i.uploadStatus !== "Uploading" && i.uploadStatus !== "Not Uploaded" && i.uploadStatus !== "Uploaded" && i.uploadStatus !== "Preparing" ? (
|
|
4790
|
+
})) : z("", !0),
|
|
4791
|
+
i.uploadStatus !== "Uploading" && i.uploadStatus !== "Not Uploaded" && i.uploadStatus !== "Uploaded" && i.uploadStatus !== "Preparing" ? (r(), f(se, {
|
|
4771
4792
|
key: 1,
|
|
4772
4793
|
id: "upload-status-alert",
|
|
4773
4794
|
severity: t.value,
|
|
4774
4795
|
class: "mb-0 w-75 ms-auto"
|
|
4775
4796
|
}, {
|
|
4776
4797
|
default: b(() => [
|
|
4777
|
-
|
|
4798
|
+
I(k(a.value), 1)
|
|
4778
4799
|
]),
|
|
4779
4800
|
_: 1
|
|
4780
|
-
}, 8, ["severity"])) :
|
|
4801
|
+
}, 8, ["severity"])) : z("", !0)
|
|
4781
4802
|
]));
|
|
4782
4803
|
}
|
|
4783
|
-
}),
|
|
4804
|
+
}), qa = ["data-cy"], Ea = { class: "ms-3 d-flex flex-column" }, La = {
|
|
4784
4805
|
key: 1,
|
|
4785
4806
|
id: "file-name"
|
|
4786
|
-
},
|
|
4807
|
+
}, Ra = {
|
|
4787
4808
|
class: "text-black-50",
|
|
4788
4809
|
id: "file-type"
|
|
4789
|
-
},
|
|
4810
|
+
}, Ha = {
|
|
4790
4811
|
class: "text-black-50",
|
|
4791
4812
|
id: "file-size"
|
|
4792
|
-
},
|
|
4813
|
+
}, Wa = { class: "ms-auto my-auto d-flex" }, Ya = /* @__PURE__ */ $({
|
|
4793
4814
|
__name: "FileInfo",
|
|
4794
|
-
props: /* @__PURE__ */
|
|
4815
|
+
props: /* @__PURE__ */ U({
|
|
4795
4816
|
editableFileName: { type: Boolean },
|
|
4796
4817
|
acceptedFileTypes: {},
|
|
4797
4818
|
maxFileSize: {},
|
|
@@ -4806,36 +4827,36 @@ const Ia = { class: "d-flex justify-content-between" }, _a = ["accept", "disable
|
|
|
4806
4827
|
uploadStatus: { required: !0 },
|
|
4807
4828
|
uploadStatusModifiers: {}
|
|
4808
4829
|
}),
|
|
4809
|
-
emits: /* @__PURE__ */
|
|
4830
|
+
emits: /* @__PURE__ */ U(["deleted"], ["update:file", "update:blobFileName", "update:uploadStatus"]),
|
|
4810
4831
|
setup(e, { emit: t }) {
|
|
4811
|
-
const a = D(e, "file"), i = D(e, "blobFileName"), l = D(e, "uploadStatus"), n = t, o =
|
|
4832
|
+
const a = D(e, "file"), i = D(e, "blobFileName"), l = D(e, "uploadStatus"), n = t, o = _(a.value.name), s = _(""), p = _(0), c = _(), g = T(() => e.acceptedFileTypes.some(({ fileType: y }) => y === a.value.type)), d = T(() => a.value.size <= e.maxFileSize), B = T(() => a.value.type ? a.value.type : Ia().getType(a.value.name)), S = () => {
|
|
4812
4833
|
o.value != null && (V(), a.value = new File([a.value], o.value, { type: a.value.type, lastModified: (/* @__PURE__ */ new Date()).valueOf() }));
|
|
4813
4834
|
}, V = () => {
|
|
4814
|
-
let
|
|
4815
|
-
|
|
4835
|
+
let y = o.value.split("."), h = Ca.getExtension(B.value), P = o.value.split(".").pop();
|
|
4836
|
+
y.length === 1 ? P && P.length > 0 && (o.value = [o.value, h].join(".")) : y.length > 1 && P !== h && (o.value = o.value.replace(P, h));
|
|
4816
4837
|
}, M = async () => {
|
|
4817
|
-
if (!
|
|
4818
|
-
l.value =
|
|
4838
|
+
if (!g.value || !d.value) {
|
|
4839
|
+
l.value = g.value ? "InvalidFileSize" : "InvalidFileType";
|
|
4819
4840
|
return;
|
|
4820
4841
|
}
|
|
4821
4842
|
l.value = "Preparing", c.value = new AbortController();
|
|
4822
|
-
const [
|
|
4823
|
-
if (!
|
|
4843
|
+
const [y, h] = await e.getFileUrlAction(a.value.name);
|
|
4844
|
+
if (!y) {
|
|
4824
4845
|
l.value = "Failed";
|
|
4825
4846
|
return;
|
|
4826
4847
|
}
|
|
4827
4848
|
try {
|
|
4828
4849
|
l.value = "Uploading";
|
|
4829
|
-
const P = new me(
|
|
4850
|
+
const P = new me(y), L = {
|
|
4830
4851
|
abortSignal: c.value.signal,
|
|
4831
4852
|
onProgress: (ae) => p.value = ae.loadedBytes,
|
|
4832
4853
|
blobHTTPHeaders: {
|
|
4833
|
-
blobContentType:
|
|
4854
|
+
blobContentType: B.value,
|
|
4834
4855
|
blobContentDisposition: `attachment; filename="${a.value.name}"`
|
|
4835
4856
|
},
|
|
4836
4857
|
tags: { temp: "true" }
|
|
4837
4858
|
};
|
|
4838
|
-
await P.uploadData(a.value, L),
|
|
4859
|
+
await P.uploadData(a.value, L), s.value = y, l.value = "Uploaded", i.value = h;
|
|
4839
4860
|
} catch (P) {
|
|
4840
4861
|
if (P.name === "AbortError") {
|
|
4841
4862
|
l.value = "Aborted";
|
|
@@ -4843,27 +4864,27 @@ const Ia = { class: "d-flex justify-content-between" }, _a = ["accept", "disable
|
|
|
4843
4864
|
}
|
|
4844
4865
|
l.value = "Failed";
|
|
4845
4866
|
}
|
|
4846
|
-
},
|
|
4847
|
-
await
|
|
4867
|
+
}, q = async () => {
|
|
4868
|
+
await za(l.value, s.value), n("deleted", a.value);
|
|
4848
4869
|
};
|
|
4849
4870
|
return le(() => {
|
|
4850
4871
|
e.autoUploadToBlob && M();
|
|
4851
|
-
}), (
|
|
4852
|
-
const P =
|
|
4853
|
-
return
|
|
4872
|
+
}), (y, h) => {
|
|
4873
|
+
const P = A;
|
|
4874
|
+
return r(), v("div", {
|
|
4854
4875
|
class: "py-4 px-3 d-flex",
|
|
4855
4876
|
"data-cy": `file-info-${a.value.name}`
|
|
4856
4877
|
}, [
|
|
4857
4878
|
m("div", null, [
|
|
4858
|
-
u(
|
|
4879
|
+
u(Ta)(a.value.type) ? (r(), f(u(Le), {
|
|
4859
4880
|
key: 0,
|
|
4860
4881
|
id: "thumbnail-image",
|
|
4861
4882
|
"image-class": "image-file-thumbnail border",
|
|
4862
|
-
src: u(
|
|
4883
|
+
src: u(ja)(a.value),
|
|
4863
4884
|
alt: a.value.name,
|
|
4864
4885
|
width: "75px",
|
|
4865
4886
|
preview: ""
|
|
4866
|
-
}, null, 8, ["src", "alt"])) : (
|
|
4887
|
+
}, null, 8, ["src", "alt"])) : (r(), f(u(j), {
|
|
4867
4888
|
key: 1,
|
|
4868
4889
|
id: "file-earmark",
|
|
4869
4890
|
icon: "bi:file-earmark",
|
|
@@ -4871,78 +4892,78 @@ const Ia = { class: "d-flex justify-content-between" }, _a = ["accept", "disable
|
|
|
4871
4892
|
width: "75px"
|
|
4872
4893
|
}))
|
|
4873
4894
|
]),
|
|
4874
|
-
m("div",
|
|
4895
|
+
m("div", Ea, [
|
|
4875
4896
|
m("div", null, [
|
|
4876
|
-
|
|
4897
|
+
y.editableFileName ? (r(), f(At, {
|
|
4877
4898
|
key: 0,
|
|
4878
4899
|
id: "edit-file-name",
|
|
4879
4900
|
modelValue: o.value,
|
|
4880
4901
|
"onUpdate:modelValue": h[0] || (h[0] = (L) => o.value = L),
|
|
4881
|
-
rules:
|
|
4902
|
+
rules: y.customFileNameRules,
|
|
4882
4903
|
name: a.value.name,
|
|
4883
|
-
"complete-action":
|
|
4884
|
-
}, null, 8, ["modelValue", "rules", "name"])) : (
|
|
4904
|
+
"complete-action": S
|
|
4905
|
+
}, null, 8, ["modelValue", "rules", "name"])) : (r(), v("span", La, k(o.value), 1))
|
|
4885
4906
|
]),
|
|
4886
|
-
m("span",
|
|
4887
|
-
m("span",
|
|
4907
|
+
m("span", Ra, "File type: " + k(a.value.type.split("/").pop()), 1),
|
|
4908
|
+
m("span", Ha, "File size: " + k(u(pe)(a.value.size)), 1)
|
|
4888
4909
|
]),
|
|
4889
|
-
m("div",
|
|
4890
|
-
(
|
|
4910
|
+
m("div", Wa, [
|
|
4911
|
+
(r(), f(Aa, {
|
|
4891
4912
|
key: l.value,
|
|
4892
4913
|
"file-size": a.value.size,
|
|
4893
4914
|
"upload-status": l.value,
|
|
4894
4915
|
"bytes-uploaded": p.value,
|
|
4895
|
-
"max-file-size":
|
|
4916
|
+
"max-file-size": y.maxFileSize
|
|
4896
4917
|
}, null, 8, ["file-size", "upload-status", "bytes-uploaded", "max-file-size"])),
|
|
4897
|
-
l.value === "Not Uploaded" || l.value === "Failed" || l.value === "Duplicate" || l.value === "Aborted" ? (
|
|
4918
|
+
l.value === "Not Uploaded" || l.value === "Failed" || l.value === "Duplicate" || l.value === "Aborted" ? (r(), f(P, {
|
|
4898
4919
|
key: 0,
|
|
4899
4920
|
link: "",
|
|
4900
4921
|
onClick: M
|
|
4901
4922
|
}, {
|
|
4902
4923
|
default: b(() => [
|
|
4903
|
-
x(u(
|
|
4924
|
+
x(u(j), {
|
|
4904
4925
|
icon: l.value === "Not Uploaded" || l.value === "Duplicate" ? "bi:upload" : "bi:arrow-clockwise"
|
|
4905
4926
|
}, null, 8, ["icon"])
|
|
4906
4927
|
]),
|
|
4907
4928
|
_: 1
|
|
4908
|
-
})) :
|
|
4909
|
-
l.value === "Uploading" ? (
|
|
4929
|
+
})) : z("", !0),
|
|
4930
|
+
l.value === "Uploading" ? (r(), f(P, {
|
|
4910
4931
|
key: 1,
|
|
4911
4932
|
link: "",
|
|
4912
4933
|
onClick: h[1] || (h[1] = (L) => c.value.value.abort())
|
|
4913
4934
|
}, {
|
|
4914
4935
|
default: b(() => [
|
|
4915
|
-
x(u(
|
|
4936
|
+
x(u(j), { icon: "bi:x-circle-fill" })
|
|
4916
4937
|
]),
|
|
4917
4938
|
_: 1
|
|
4918
|
-
})) : (
|
|
4939
|
+
})) : (r(), f(P, {
|
|
4919
4940
|
key: 2,
|
|
4920
4941
|
link: "",
|
|
4921
|
-
onClick:
|
|
4942
|
+
onClick: q,
|
|
4922
4943
|
id: "delete-button"
|
|
4923
4944
|
}, {
|
|
4924
4945
|
default: b(() => [
|
|
4925
|
-
x(u(
|
|
4946
|
+
x(u(j), { icon: "bi:trash" })
|
|
4926
4947
|
]),
|
|
4927
4948
|
_: 1
|
|
4928
4949
|
}))
|
|
4929
4950
|
])
|
|
4930
|
-
], 8,
|
|
4951
|
+
], 8, qa);
|
|
4931
4952
|
};
|
|
4932
4953
|
}
|
|
4933
|
-
}),
|
|
4954
|
+
}), Ga = { class: "d-flex justify-content-end mt-1" }, Ja = { id: "max-file-size" }, Ka = /* @__PURE__ */ $({
|
|
4934
4955
|
__name: "MaxFileSize",
|
|
4935
4956
|
props: {
|
|
4936
4957
|
maxFileSize: {}
|
|
4937
4958
|
},
|
|
4938
4959
|
setup(e) {
|
|
4939
|
-
return (t, a) => (
|
|
4940
|
-
m("div",
|
|
4960
|
+
return (t, a) => (r(), v("div", Ga, [
|
|
4961
|
+
m("div", Ja, "Max file size: " + k(u(pe)(t.maxFileSize)), 1)
|
|
4941
4962
|
]));
|
|
4942
4963
|
}
|
|
4943
|
-
}),
|
|
4964
|
+
}), Za = { "data-cy": "file-uploader" }, Xa = { key: 0 }, al = /* @__PURE__ */ $({
|
|
4944
4965
|
__name: "ForgeFileUploader",
|
|
4945
|
-
props: /* @__PURE__ */
|
|
4966
|
+
props: /* @__PURE__ */ U({
|
|
4946
4967
|
acceptedFileTypes: {},
|
|
4947
4968
|
maxFileSize: {},
|
|
4948
4969
|
getFileUrlAction: {},
|
|
@@ -4960,13 +4981,13 @@ const Ia = { class: "d-flex justify-content-between" }, _a = ["accept", "disable
|
|
|
4960
4981
|
const t = D(e, "modelValue"), a = e, i = (l) => {
|
|
4961
4982
|
t.value = t.value.filter((n) => n.file != l);
|
|
4962
4983
|
};
|
|
4963
|
-
return (l, n) => (
|
|
4964
|
-
x(
|
|
4984
|
+
return (l, n) => (r(), v("div", Za, [
|
|
4985
|
+
x(Ma, C(a, {
|
|
4965
4986
|
modelValue: t.value,
|
|
4966
4987
|
"onUpdate:modelValue": n[0] || (n[0] = (o) => t.value = o)
|
|
4967
4988
|
}), null, 16, ["modelValue"]),
|
|
4968
|
-
l.showDragDropArea ? (
|
|
4969
|
-
x(
|
|
4989
|
+
l.showDragDropArea ? (r(), v("div", Xa, [
|
|
4990
|
+
x(Na, {
|
|
4970
4991
|
"max-file-input": a.maxFileInput,
|
|
4971
4992
|
"max-file-size": a.maxFileSize,
|
|
4972
4993
|
"accepted-file-types": a.acceptedFileTypes,
|
|
@@ -4974,29 +4995,29 @@ const Ia = { class: "d-flex justify-content-between" }, _a = ["accept", "disable
|
|
|
4974
4995
|
"onUpdate:modelValue": n[1] || (n[1] = (o) => t.value = o)
|
|
4975
4996
|
}, {
|
|
4976
4997
|
default: b(() => [
|
|
4977
|
-
(
|
|
4978
|
-
(
|
|
4998
|
+
(r(!0), v(O, null, N(t.value, ({ file: o }, s) => (r(), v("span", null, [
|
|
4999
|
+
(r(), f(Ya, C({
|
|
4979
5000
|
key: o.name,
|
|
4980
|
-
class:
|
|
4981
|
-
file: t.value[
|
|
4982
|
-
"onUpdate:file": (p) => t.value[
|
|
4983
|
-
"blob-file-name": t.value[
|
|
4984
|
-
"onUpdate:blobFileName": (p) => t.value[
|
|
4985
|
-
"upload-status": t.value[
|
|
4986
|
-
"onUpdate:uploadStatus": (p) => t.value[
|
|
5001
|
+
class: s === t.value.length - 1 || t.value.length == 1 ? "" : "border-bottom",
|
|
5002
|
+
file: t.value[s].file,
|
|
5003
|
+
"onUpdate:file": (p) => t.value[s].file = p,
|
|
5004
|
+
"blob-file-name": t.value[s].blobFileName,
|
|
5005
|
+
"onUpdate:blobFileName": (p) => t.value[s].blobFileName = p,
|
|
5006
|
+
"upload-status": t.value[s].status,
|
|
5007
|
+
"onUpdate:uploadStatus": (p) => t.value[s].status = p,
|
|
4987
5008
|
ref_for: !0
|
|
4988
5009
|
}, a, { onDeleted: i }), null, 16, ["class", "file", "onUpdate:file", "blob-file-name", "onUpdate:blobFileName", "upload-status", "onUpdate:uploadStatus"]))
|
|
4989
5010
|
]))), 256))
|
|
4990
5011
|
]),
|
|
4991
5012
|
_: 1
|
|
4992
5013
|
}, 8, ["max-file-input", "max-file-size", "accepted-file-types", "modelValue"]),
|
|
4993
|
-
x(
|
|
5014
|
+
x(Ka, {
|
|
4994
5015
|
"max-file-size": a.maxFileSize
|
|
4995
5016
|
}, null, 8, ["max-file-size"])
|
|
4996
|
-
])) :
|
|
5017
|
+
])) : z("", !0)
|
|
4997
5018
|
]));
|
|
4998
5019
|
}
|
|
4999
|
-
}),
|
|
5020
|
+
}), Qa = { class: "d-flex" }, ei = { class: "me-3" }, ti = { class: "ms-2" }, ai = { class: "d-flex flex-column w-100" }, il = /* @__PURE__ */ $({
|
|
5000
5021
|
__name: "ForgeColumnCustomiser",
|
|
5001
5022
|
props: {
|
|
5002
5023
|
modelValue: { required: !0 },
|
|
@@ -5004,22 +5025,22 @@ const Ia = { class: "d-flex justify-content-between" }, _a = ["accept", "disable
|
|
|
5004
5025
|
},
|
|
5005
5026
|
emits: ["update:modelValue"],
|
|
5006
5027
|
setup(e) {
|
|
5007
|
-
const t = D(e, "modelValue"), a =
|
|
5028
|
+
const t = D(e, "modelValue"), a = _(), i = _(!1), l = (n) => {
|
|
5008
5029
|
a.value.toggle(n);
|
|
5009
5030
|
};
|
|
5010
|
-
return (n, o) => (
|
|
5011
|
-
x(u(
|
|
5031
|
+
return (n, o) => (r(), v(O, null, [
|
|
5032
|
+
x(u(A), {
|
|
5012
5033
|
onClick: l,
|
|
5013
5034
|
class: "ms-2"
|
|
5014
5035
|
}, {
|
|
5015
5036
|
default: b(() => [
|
|
5016
|
-
m("div",
|
|
5017
|
-
m("div", Qa, [
|
|
5018
|
-
x(u(T), { icon: "bi:layout-three-columns" })
|
|
5019
|
-
]),
|
|
5020
|
-
_(" Columns (" + w(t.value.filter((r) => r.selected).length ?? 0) + "/" + w(t.value.length ?? 0) + ") ", 1),
|
|
5037
|
+
m("div", Qa, [
|
|
5021
5038
|
m("div", ei, [
|
|
5022
|
-
x(u(
|
|
5039
|
+
x(u(j), { icon: "bi:layout-three-columns" })
|
|
5040
|
+
]),
|
|
5041
|
+
I(" Columns (" + k(t.value.filter((s) => s.selected).length ?? 0) + "/" + k(t.value.length ?? 0) + ") ", 1),
|
|
5042
|
+
m("div", ti, [
|
|
5043
|
+
x(u(j), {
|
|
5023
5044
|
icon: i.value ? "bi:chevron-up" : "bi:chevron-down"
|
|
5024
5045
|
}, null, 8, ["icon"])
|
|
5025
5046
|
])
|
|
@@ -5035,9 +5056,9 @@ const Ia = { class: "d-flex justify-content-between" }, _a = ["accept", "disable
|
|
|
5035
5056
|
onShow: o[1] || (o[1] = () => i.value = !0)
|
|
5036
5057
|
}, {
|
|
5037
5058
|
default: b(() => [
|
|
5038
|
-
m("div",
|
|
5039
|
-
(
|
|
5040
|
-
class:
|
|
5059
|
+
m("div", ai, [
|
|
5060
|
+
(r(!0), v(O, null, N(t.value, (s, p) => (r(), v("div", {
|
|
5061
|
+
class: F(["d-flex cursor-pointer", {
|
|
5041
5062
|
"border-top": p !== 0,
|
|
5042
5063
|
"py-1": p !== 0 && t.value.length - 1 !== p,
|
|
5043
5064
|
"pt-1": t.value.length - 1 === p,
|
|
@@ -5045,12 +5066,12 @@ const Ia = { class: "d-flex justify-content-between" }, _a = ["accept", "disable
|
|
|
5045
5066
|
}])
|
|
5046
5067
|
}, [
|
|
5047
5068
|
x(fe, {
|
|
5048
|
-
id:
|
|
5049
|
-
modelValue:
|
|
5050
|
-
"onUpdate:modelValue": (c) =>
|
|
5069
|
+
id: s.field,
|
|
5070
|
+
modelValue: s.selected,
|
|
5071
|
+
"onUpdate:modelValue": (c) => s.selected = c,
|
|
5051
5072
|
binary: "",
|
|
5052
5073
|
class: "cursor-pointer",
|
|
5053
|
-
label:
|
|
5074
|
+
label: s.header
|
|
5054
5075
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "label"])
|
|
5055
5076
|
], 2))), 256))
|
|
5056
5077
|
])
|
|
@@ -5059,45 +5080,46 @@ const Ia = { class: "d-flex justify-content-between" }, _a = ["accept", "disable
|
|
|
5059
5080
|
}, 512)
|
|
5060
5081
|
], 64));
|
|
5061
5082
|
}
|
|
5062
|
-
}),
|
|
5083
|
+
}), ll = /* @__PURE__ */ $({
|
|
5063
5084
|
__name: "ForgePanel",
|
|
5064
5085
|
setup(e) {
|
|
5065
5086
|
return (t, a) => {
|
|
5066
5087
|
const i = Re;
|
|
5067
|
-
return
|
|
5088
|
+
return r(), f(i, J(K({ ...t.$attrs })), {
|
|
5068
5089
|
toggleicon: b(({ collapsed: l }) => [
|
|
5069
|
-
l ? (
|
|
5090
|
+
l ? (r(), f(u(j), {
|
|
5070
5091
|
key: 0,
|
|
5071
5092
|
"data-cy": "message-icon",
|
|
5072
5093
|
icon: "bi:chevron-down"
|
|
5073
|
-
})) :
|
|
5074
|
-
l ?
|
|
5094
|
+
})) : z("", !0),
|
|
5095
|
+
l ? z("", !0) : (r(), f(u(j), {
|
|
5075
5096
|
key: 1,
|
|
5076
5097
|
"data-cy": "message-icon",
|
|
5077
5098
|
icon: "bi:chevron-up"
|
|
5078
5099
|
}))
|
|
5079
5100
|
]),
|
|
5080
5101
|
default: b(() => [
|
|
5081
|
-
|
|
5102
|
+
w(t.$slots, "default")
|
|
5082
5103
|
]),
|
|
5083
5104
|
_: 3
|
|
5084
5105
|
}, 16);
|
|
5085
5106
|
};
|
|
5086
5107
|
}
|
|
5087
|
-
}),
|
|
5108
|
+
}), ii = /* @__PURE__ */ $({
|
|
5088
5109
|
__name: "ForgeToggleButton",
|
|
5089
5110
|
props: {
|
|
5090
5111
|
severity: { default: "primary" }
|
|
5091
5112
|
},
|
|
5092
5113
|
setup(e) {
|
|
5093
|
-
const t = e, a =
|
|
5114
|
+
const t = e, a = T(() => ({
|
|
5094
5115
|
root: (i) => ({
|
|
5095
5116
|
class: [
|
|
5096
5117
|
"btn",
|
|
5097
5118
|
{
|
|
5098
5119
|
[`focus-ring focus-ring-${t.severity} btn-${t.severity}-subtle border border-2 border-${t.severity} fw-500 text-${t.severity}`]: i.context.active,
|
|
5099
5120
|
[`border text-${t.severity} select-btn-${t.severity}`]: !i.context.active,
|
|
5100
|
-
"btn-secondary-subtle": i.context.disabled
|
|
5121
|
+
"btn-secondary-subtle": i.context.disabled,
|
|
5122
|
+
"border-danger": i.props.invalid
|
|
5101
5123
|
}
|
|
5102
5124
|
]
|
|
5103
5125
|
}),
|
|
@@ -5110,46 +5132,59 @@ const Ia = { class: "d-flex justify-content-between" }, _a = ["accept", "disable
|
|
|
5110
5132
|
]
|
|
5111
5133
|
})
|
|
5112
5134
|
}));
|
|
5113
|
-
return (i, l) => (
|
|
5135
|
+
return (i, l) => (r(), f(u(He), C({ ...i.$attrs, ...t }, {
|
|
5114
5136
|
severity: t.severity,
|
|
5115
5137
|
pt: a.value
|
|
5116
5138
|
}), null, 16, ["severity", "pt"]));
|
|
5117
5139
|
}
|
|
5118
|
-
}),
|
|
5140
|
+
}), li = {
|
|
5119
5141
|
class: "btn-group",
|
|
5120
5142
|
"data-cy": "forge-select-button"
|
|
5121
|
-
},
|
|
5143
|
+
}, nl = /* @__PURE__ */ $({
|
|
5122
5144
|
__name: "ForgeSelectButton",
|
|
5123
|
-
props: /* @__PURE__ */
|
|
5124
|
-
|
|
5125
|
-
|
|
5145
|
+
props: /* @__PURE__ */ U({
|
|
5146
|
+
options: {},
|
|
5147
|
+
multiple: { type: Boolean, default: !0 },
|
|
5148
|
+
allowEmpty: { type: Boolean, default: !1 },
|
|
5149
|
+
invalid: { type: Boolean, default: !1 }
|
|
5126
5150
|
}, {
|
|
5127
5151
|
modelValue: { required: !0 },
|
|
5128
5152
|
modelModifiers: {}
|
|
5129
5153
|
}),
|
|
5130
|
-
emits:
|
|
5131
|
-
setup(e
|
|
5132
|
-
const
|
|
5133
|
-
|
|
5134
|
-
|
|
5135
|
-
|
|
5136
|
-
|
|
5137
|
-
|
|
5154
|
+
emits: ["update:modelValue"],
|
|
5155
|
+
setup(e) {
|
|
5156
|
+
const t = e, a = D(e, "modelValue"), i = (n) => {
|
|
5157
|
+
var o;
|
|
5158
|
+
return t.multiple ? (o = a == null ? void 0 : a.value) == null ? void 0 : o.includes(n.value) : a.value === n.value;
|
|
5159
|
+
}, l = (n) => {
|
|
5160
|
+
var o;
|
|
5161
|
+
if (!n.disabled)
|
|
5162
|
+
if (t.multiple) {
|
|
5163
|
+
let s = (o = a.value) != null && o.length ? [...a.value] : [];
|
|
5164
|
+
if (s.length >= 1 && s.includes(n.value)) {
|
|
5165
|
+
if (!t.allowEmpty && s.length === 1) return;
|
|
5166
|
+
s = s.length > 1 ? s.filter((c) => c !== n.value) : [];
|
|
5167
|
+
} else
|
|
5168
|
+
s.push(n.value);
|
|
5169
|
+
a.value = s;
|
|
5170
|
+
} else
|
|
5171
|
+
a.value = a.value === n.value && t.allowEmpty ? null : n.value;
|
|
5138
5172
|
};
|
|
5139
|
-
return (
|
|
5140
|
-
(
|
|
5141
|
-
|
|
5142
|
-
|
|
5143
|
-
|
|
5144
|
-
|
|
5145
|
-
onChange: (
|
|
5146
|
-
defaultValue:
|
|
5147
|
-
disabled:
|
|
5148
|
-
"data-cy": `toggle-button-${
|
|
5149
|
-
|
|
5173
|
+
return (n, o) => (r(), v("div", li, [
|
|
5174
|
+
(r(!0), v(O, null, N(n.options, (s, p) => (r(), f(ii, {
|
|
5175
|
+
key: p,
|
|
5176
|
+
onLabel: s.label,
|
|
5177
|
+
offLabel: s.label,
|
|
5178
|
+
severity: s.severity,
|
|
5179
|
+
onChange: (c) => l(s),
|
|
5180
|
+
defaultValue: i(s),
|
|
5181
|
+
disabled: s.disabled,
|
|
5182
|
+
"data-cy": `toggle-button-${s.value}`,
|
|
5183
|
+
invalid: n.invalid
|
|
5184
|
+
}, null, 8, ["onLabel", "offLabel", "severity", "onChange", "defaultValue", "disabled", "data-cy", "invalid"]))), 128))
|
|
5150
5185
|
]));
|
|
5151
5186
|
}
|
|
5152
|
-
}),
|
|
5187
|
+
}), ol = () => ({
|
|
5153
5188
|
type: "component",
|
|
5154
5189
|
resolve: (e) => {
|
|
5155
5190
|
if (e.startsWith("Forge"))
|
|
@@ -5160,37 +5195,37 @@ const Ia = { class: "d-flex justify-content-between" }, _a = ["accept", "disable
|
|
|
5160
5195
|
}
|
|
5161
5196
|
});
|
|
5162
5197
|
export {
|
|
5163
|
-
|
|
5164
|
-
|
|
5198
|
+
Oi as Bootstrap_PT,
|
|
5199
|
+
Ni as ForgeActionButton,
|
|
5165
5200
|
se as ForgeAlert,
|
|
5166
|
-
|
|
5201
|
+
Ui as ForgeAutoComplete,
|
|
5167
5202
|
fe as ForgeCheckbox,
|
|
5168
|
-
|
|
5169
|
-
|
|
5203
|
+
Ji as ForgeChip,
|
|
5204
|
+
il as ForgeColumnCustomiser,
|
|
5170
5205
|
be as ForgeDatepicker,
|
|
5171
|
-
|
|
5172
|
-
|
|
5173
|
-
|
|
5174
|
-
|
|
5206
|
+
al as ForgeFileUploader,
|
|
5207
|
+
tl as ForgeFilterHeader,
|
|
5208
|
+
Yi as ForgeForm,
|
|
5209
|
+
Gi as ForgeFormField,
|
|
5175
5210
|
At as ForgeInlineEditor,
|
|
5176
|
-
|
|
5211
|
+
Ai as ForgeLink,
|
|
5177
5212
|
ge as ForgeLoader,
|
|
5178
|
-
|
|
5213
|
+
Li as ForgeModal,
|
|
5179
5214
|
Wt as ForgeMultiSelectPreview,
|
|
5180
|
-
|
|
5181
|
-
|
|
5182
|
-
|
|
5183
|
-
|
|
5184
|
-
|
|
5185
|
-
|
|
5186
|
-
|
|
5187
|
-
|
|
5188
|
-
|
|
5189
|
-
|
|
5190
|
-
|
|
5191
|
-
|
|
5192
|
-
|
|
5193
|
-
|
|
5194
|
-
|
|
5215
|
+
Ri as ForgeNavbar,
|
|
5216
|
+
Hi as ForgePageHeader,
|
|
5217
|
+
ll as ForgePanel,
|
|
5218
|
+
la as ForgeProgressBar,
|
|
5219
|
+
Wi as ForgeRemainingCharacters,
|
|
5220
|
+
ol as ForgeResolver,
|
|
5221
|
+
Ki as ForgeScratchpad,
|
|
5222
|
+
nl as ForgeSelectButton,
|
|
5223
|
+
Zi as ForgeStatWidget,
|
|
5224
|
+
Xi as ForgeStepper,
|
|
5225
|
+
el as ForgeTable,
|
|
5226
|
+
Qi as ForgeTile,
|
|
5227
|
+
ii as ForgeToggleButton,
|
|
5228
|
+
Ei as convertToMultiSelectOption,
|
|
5229
|
+
qi as enumToMultiSelectList,
|
|
5195
5230
|
It as parseError
|
|
5196
5231
|
};
|