@3squared/forge-ui-3 0.4.2 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/forge-ui-3.js +695 -605
- package/dist/esm/style.css +1 -1
- package/dist/src/components/ForgeDatepicker.vue.d.ts +402 -42
- package/dist/src/passthroughs/Datepicker.pt.d.ts +2 -36
- package/package.json +5 -5
- package/src/styles/components/_button.scss +5 -1
- package/src/styles/components/_datepicker.scss +50 -3
- package/src/styles/components/_multiselect.scss +34 -2
- package/src/styles/forge-components.scss +18 -0
- package/src/styles/main.scss +2 -19
package/dist/esm/forge-ui-3.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import fe from "primevue/message";
|
|
2
|
-
import { defineComponent as $, openBlock as s, createBlock as w, normalizeProps as Q, guardReactiveProps as ee, withCtx as v, createElementVNode as m, normalizeClass as
|
|
2
|
+
import { defineComponent as $, openBlock as s, createBlock as w, normalizeProps as Q, guardReactiveProps as ee, withCtx as v, createElementVNode as m, normalizeClass as B, unref as c, createCommentVNode as F, createVNode as y, renderSlot as k, ref as T, createElementBlock as p, Fragment as D, mergeProps as S, onMounted as oe, watch as ge, computed as x, isRef as H, createTextVNode as P, toDisplayString as g, withDirectives as L, vShow as Y, mergeModels as q, useModel as R, createSlots as te, renderList as j, withKeys as J, useAttrs as de, withModifiers as G, normalizeStyle as he } from "vue";
|
|
3
3
|
import { Icon as C } from "@iconify/vue";
|
|
4
4
|
import E from "primevue/button";
|
|
5
5
|
import we from "primevue/toast";
|
|
6
|
-
import
|
|
7
|
-
import { useField as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
6
|
+
import xe from "primevue/checkbox";
|
|
7
|
+
import { useField as W } from "vee-validate";
|
|
8
|
+
import ke from "primevue/progressspinner";
|
|
9
|
+
import _e from "primevue/dialog";
|
|
10
10
|
import ne from "primevue/inputtext";
|
|
11
11
|
import { vOnClickOutside as $e } from "@vueuse/components";
|
|
12
|
-
import
|
|
13
|
-
import
|
|
12
|
+
import Fe from "primevue/menubar";
|
|
13
|
+
import Be from "vue-multiselect";
|
|
14
14
|
import Se from "primevue/calendar";
|
|
15
15
|
import Ce from "primevue/inputmask";
|
|
16
|
-
import
|
|
16
|
+
import Ve from "primevue/textarea";
|
|
17
17
|
import ue from "primevue/inputnumber";
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
18
|
+
import Te from "primevue/chips";
|
|
19
|
+
import Me from "primevue/progressbar";
|
|
20
|
+
import Pe from "primevue/divider";
|
|
21
|
+
import Ie from "primevue/steps";
|
|
22
|
+
import ze from "primevue/datatable";
|
|
23
23
|
import se from "primevue/dropdown";
|
|
24
|
-
import
|
|
24
|
+
import Oe from "primevue/multiselect";
|
|
25
25
|
import { BlockBlobClient as ce } from "@azure/storage-blob";
|
|
26
|
-
import
|
|
27
|
-
const
|
|
26
|
+
import De from "primevue/image";
|
|
27
|
+
const Ue = {
|
|
28
28
|
button: {
|
|
29
29
|
root: ({ props: e }) => ({
|
|
30
30
|
class: [
|
|
@@ -190,11 +190,11 @@ const De = {
|
|
|
190
190
|
column: {
|
|
191
191
|
sortBadge: "ms-2 my-auto cursor-pointer",
|
|
192
192
|
headerCell: (e) => {
|
|
193
|
-
var t,
|
|
193
|
+
var t, n, a, l;
|
|
194
194
|
return {
|
|
195
195
|
class: [{
|
|
196
196
|
"cursor-move": e.props.reorderableColumns,
|
|
197
|
-
"position-sticky": ((t = e.column) == null ? void 0 : t.context.frozen) !== void 0 || ((
|
|
197
|
+
"position-sticky": ((t = e.column) == null ? void 0 : t.context.frozen) !== void 0 || ((n = e.column) == null ? void 0 : n.context.frozen) || ((a = e.column) == null ? void 0 : a.context.frozen) === "",
|
|
198
198
|
"overflow-hidden position-relative bg-clip-padding": (l = e.column) == null ? void 0 : l.context.resizable
|
|
199
199
|
}]
|
|
200
200
|
};
|
|
@@ -282,13 +282,13 @@ const De = {
|
|
|
282
282
|
}, Ee = {
|
|
283
283
|
inputtext: {
|
|
284
284
|
root: (e) => {
|
|
285
|
-
var t,
|
|
285
|
+
var t, n;
|
|
286
286
|
return {
|
|
287
287
|
class: [
|
|
288
288
|
"form-control",
|
|
289
289
|
{
|
|
290
290
|
"form-control-lg": ((t = e.props.size) == null ? void 0 : t.toLowerCase()) == "large",
|
|
291
|
-
"form-control-sm": ((
|
|
291
|
+
"form-control-sm": ((n = e.props.size) == null ? void 0 : n.toLowerCase()) == "small"
|
|
292
292
|
}
|
|
293
293
|
]
|
|
294
294
|
};
|
|
@@ -321,7 +321,7 @@ const De = {
|
|
|
321
321
|
root: "d-flex",
|
|
322
322
|
label: "pe-2"
|
|
323
323
|
}
|
|
324
|
-
},
|
|
324
|
+
}, Ye = {
|
|
325
325
|
dialog: {
|
|
326
326
|
header: () => ({
|
|
327
327
|
class: ["modal-header"]
|
|
@@ -361,7 +361,7 @@ const De = {
|
|
|
361
361
|
}]
|
|
362
362
|
})
|
|
363
363
|
}
|
|
364
|
-
},
|
|
364
|
+
}, qe = {
|
|
365
365
|
overlaypanel: {
|
|
366
366
|
root: (e) => ({
|
|
367
367
|
class: [
|
|
@@ -375,7 +375,7 @@ const De = {
|
|
|
375
375
|
content: "d-flex position-relative",
|
|
376
376
|
closeButton: "position-absolute top-0 end-0 p-1 btn btn-link text-black ms-2"
|
|
377
377
|
}
|
|
378
|
-
},
|
|
378
|
+
}, Ge = {
|
|
379
379
|
message: {
|
|
380
380
|
root: ({ props: e }) => ({
|
|
381
381
|
class: [
|
|
@@ -404,13 +404,13 @@ const De = {
|
|
|
404
404
|
class: ["px-0 ms-2 btn d-flex"]
|
|
405
405
|
})
|
|
406
406
|
}
|
|
407
|
-
},
|
|
407
|
+
}, Ke = {
|
|
408
408
|
// More PT options defined in ForgeStepper.
|
|
409
409
|
steps: {
|
|
410
410
|
root: "w-100 mx-2 line",
|
|
411
411
|
menu: "p-0 m-0 list-unstyled d-flex justify-content-between "
|
|
412
412
|
}
|
|
413
|
-
},
|
|
413
|
+
}, We = {
|
|
414
414
|
tabview: {
|
|
415
415
|
navContainer: () => ({
|
|
416
416
|
class: ["nav nav-tabs position-relative"]
|
|
@@ -448,7 +448,7 @@ const De = {
|
|
|
448
448
|
class: ["p-2"]
|
|
449
449
|
})
|
|
450
450
|
}
|
|
451
|
-
},
|
|
451
|
+
}, Ze = {
|
|
452
452
|
// More PassThrough options defined in ForgeDatepicker.
|
|
453
453
|
calendar: {
|
|
454
454
|
root: "d-inline-flex relative",
|
|
@@ -461,27 +461,55 @@ const De = {
|
|
|
461
461
|
}
|
|
462
462
|
]
|
|
463
463
|
}),
|
|
464
|
+
groupContainer: "d-flex flex-wrap",
|
|
464
465
|
header: "d-flex align-items-center justify-content-between p-2 border-bottom",
|
|
465
|
-
previousButton:
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
466
|
+
previousButton: ({ props: e }) => ({
|
|
467
|
+
class: {
|
|
468
|
+
"btn mb-1 ms-auto": e.numberOfMonths === void 0 || e.numberOfMonths == 1,
|
|
469
|
+
"btn p-0 btn-sm": e.numberOfMonths !== void 0 && e.numberOfMonths > 1
|
|
470
|
+
}
|
|
471
|
+
}),
|
|
472
|
+
tableheadercell: "pe-none",
|
|
473
|
+
nextButton: ({ props: e }) => ({
|
|
474
|
+
class: {
|
|
475
|
+
"btn mb-1 me-auto": e.numberOfMonths === void 0 || e.numberOfMonths == 1,
|
|
476
|
+
"btn p-0 btn-sm": e.numberOfMonths !== void 0 && e.numberOfMonths > 1
|
|
477
|
+
}
|
|
478
|
+
}),
|
|
479
|
+
group: ({ props: e }) => ({
|
|
480
|
+
class: [
|
|
481
|
+
"d-flex flex-column",
|
|
482
|
+
{
|
|
483
|
+
"w-100": e.numberOfMonths === void 0 || e.numberOfMonths == 1
|
|
484
|
+
}
|
|
485
|
+
]
|
|
486
|
+
}),
|
|
487
|
+
yearTitle: ({ props: e }) => ({
|
|
488
|
+
class: {
|
|
489
|
+
"btn ps-0 pe-1 fw-bold": e.numberOfMonths === void 0 || e.numberOfMonths == 1,
|
|
490
|
+
"fw-bold text-black border-0 bg-white": e.numberOfMonths !== void 0 && e.numberOfMonths > 1
|
|
491
|
+
}
|
|
492
|
+
}),
|
|
493
|
+
monthTitle: ({ props: e }) => ({
|
|
494
|
+
class: {
|
|
495
|
+
"btn ps-1 fw-bold": e.numberOfMonths === void 0 || e.numberOfMonths == 1,
|
|
496
|
+
"fw-bold text-black border-0 bg-white": e.numberOfMonths !== void 0 && e.numberOfMonths > 1
|
|
497
|
+
}
|
|
498
|
+
}),
|
|
499
|
+
title: "d-flex mx-auto",
|
|
500
|
+
decadetitle: "fw-bold",
|
|
501
|
+
table: "datepicker-table",
|
|
502
|
+
tableHeaderRow: "text-center",
|
|
503
|
+
monthPicker: "d-flex flex-row flex-wrap m-2",
|
|
504
|
+
yearPicker: "d-flex flex-row flex-wrap m-2",
|
|
476
505
|
timePicker: "d-flex justify-content-center align-items-center border-top p-2",
|
|
477
506
|
separatorContainer: "d-flex flex-column align-items-center px-2",
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
second: "my-2",
|
|
507
|
+
hourPicker: "px-2 d-flex flex-column",
|
|
508
|
+
hour: "mx-auto",
|
|
509
|
+
minutePicker: "px-2 d-flex flex-column",
|
|
510
|
+
minute: "mx-auto",
|
|
511
|
+
secondPicker: "px-2 d-flex flex-column",
|
|
512
|
+
second: "mx-auto",
|
|
485
513
|
buttonbar: ({ props: e }) => ({
|
|
486
514
|
class: [
|
|
487
515
|
"p-2 d-flex",
|
|
@@ -489,7 +517,9 @@ const De = {
|
|
|
489
517
|
"border-top": !e.showTime
|
|
490
518
|
}
|
|
491
519
|
]
|
|
492
|
-
})
|
|
520
|
+
}),
|
|
521
|
+
decrementButton: "btn btn-sm",
|
|
522
|
+
incrementButton: "btn btn-sm"
|
|
493
523
|
}
|
|
494
524
|
}, Je = {
|
|
495
525
|
// More PassThrough options in component file.
|
|
@@ -772,13 +802,13 @@ const De = {
|
|
|
772
802
|
class: ["ps-1"]
|
|
773
803
|
}),
|
|
774
804
|
icon: ({ props: e }) => {
|
|
775
|
-
var t,
|
|
805
|
+
var t, n, a, l;
|
|
776
806
|
return {
|
|
777
807
|
class: [
|
|
778
808
|
"toast-icon",
|
|
779
809
|
{
|
|
780
810
|
"text-primary": ((t = e.message) == null ? void 0 : t.severity) === "info",
|
|
781
|
-
"text-success": ((
|
|
811
|
+
"text-success": ((n = e.message) == null ? void 0 : n.severity) === "success",
|
|
782
812
|
"text-danger": ((a = e.message) == null ? void 0 : a.severity) === "error",
|
|
783
813
|
"text-warning": ((l = e.message) == null ? void 0 : l.severity) === "warn"
|
|
784
814
|
}
|
|
@@ -788,29 +818,29 @@ const De = {
|
|
|
788
818
|
}
|
|
789
819
|
}, il = {
|
|
790
820
|
...Qe,
|
|
791
|
-
...
|
|
821
|
+
...Ue,
|
|
792
822
|
...ot,
|
|
793
823
|
...Ae,
|
|
794
824
|
...He,
|
|
795
825
|
...Ne,
|
|
826
|
+
...Ze,
|
|
796
827
|
...Ye,
|
|
797
|
-
...qe,
|
|
798
828
|
...nt,
|
|
799
829
|
...re,
|
|
800
830
|
...st,
|
|
801
831
|
...Ee,
|
|
802
832
|
...Re,
|
|
803
833
|
...Le,
|
|
804
|
-
...
|
|
834
|
+
...Ge,
|
|
805
835
|
...re,
|
|
806
836
|
...et,
|
|
807
|
-
...
|
|
837
|
+
...qe,
|
|
808
838
|
...Je,
|
|
809
839
|
...lt,
|
|
810
840
|
...at,
|
|
811
|
-
...
|
|
841
|
+
...Ke,
|
|
812
842
|
...Xe,
|
|
813
|
-
...
|
|
843
|
+
...We,
|
|
814
844
|
...it,
|
|
815
845
|
...je,
|
|
816
846
|
directives: {
|
|
@@ -832,27 +862,27 @@ const De = {
|
|
|
832
862
|
},
|
|
833
863
|
setup(e) {
|
|
834
864
|
const t = e;
|
|
835
|
-
return (
|
|
865
|
+
return (n, a) => {
|
|
836
866
|
const l = fe;
|
|
837
|
-
return s(), w(l, Q(ee({ ...
|
|
867
|
+
return s(), w(l, Q(ee({ ...n.$attrs, ...t })), {
|
|
838
868
|
messageicon: v(() => [
|
|
839
869
|
m("div", {
|
|
840
|
-
class:
|
|
870
|
+
class: B(t.icon ? "me-2 pe-1" : "")
|
|
841
871
|
}, [
|
|
842
872
|
t.icon ? (s(), w(c(C), {
|
|
843
873
|
key: 0,
|
|
844
874
|
"data-cy": "message-icon",
|
|
845
875
|
icon: t.icon,
|
|
846
|
-
class:
|
|
876
|
+
class: B(`text-${t.severity}`),
|
|
847
877
|
height: 35
|
|
848
|
-
}, null, 8, ["icon", "class"])) :
|
|
878
|
+
}, null, 8, ["icon", "class"])) : F("", !0)
|
|
849
879
|
], 2)
|
|
850
880
|
]),
|
|
851
881
|
closeicon: v(() => [
|
|
852
882
|
y(c(C), { icon: "bi:x" })
|
|
853
883
|
]),
|
|
854
884
|
default: v(() => [
|
|
855
|
-
|
|
885
|
+
k(n.$slots, "default")
|
|
856
886
|
]),
|
|
857
887
|
_: 3
|
|
858
888
|
}, 16);
|
|
@@ -867,31 +897,28 @@ const De = {
|
|
|
867
897
|
params: { default: Array }
|
|
868
898
|
},
|
|
869
899
|
setup(e) {
|
|
870
|
-
const t =
|
|
900
|
+
const t = T(!1), n = e, a = async () => {
|
|
871
901
|
t.value = !0;
|
|
872
902
|
try {
|
|
873
|
-
await
|
|
903
|
+
await n.action.apply(this, n.params);
|
|
874
904
|
} catch (l) {
|
|
875
|
-
await
|
|
905
|
+
await n.errorAction.apply(this, n.errorParams ? [...n.errorParams, l] : [l]);
|
|
876
906
|
}
|
|
877
907
|
t.value = !1;
|
|
878
908
|
};
|
|
879
|
-
return (l,
|
|
880
|
-
const
|
|
881
|
-
return s(), p(
|
|
882
|
-
y(
|
|
909
|
+
return (l, o) => {
|
|
910
|
+
const i = E;
|
|
911
|
+
return s(), p(D, null, [
|
|
912
|
+
y(i, S({ ...n, ...l.$attrs }, {
|
|
883
913
|
loading: t.value,
|
|
884
|
-
disabled: t.value ||
|
|
914
|
+
disabled: t.value || n.disabled,
|
|
885
915
|
onClick: a
|
|
886
916
|
}), null, 16, ["loading", "disabled"]),
|
|
887
917
|
y(c(we))
|
|
888
918
|
], 64);
|
|
889
919
|
};
|
|
890
920
|
}
|
|
891
|
-
}), rt = {
|
|
892
|
-
class: "d-flex",
|
|
893
|
-
"data-cy": "checkbox-container"
|
|
894
|
-
}, dt = /* @__PURE__ */ m("div", null, null, -1), ut = ["for"], me = /* @__PURE__ */ $({
|
|
921
|
+
}), rt = /* @__PURE__ */ m("div", null, null, -1), dt = ["for"], me = /* @__PURE__ */ $({
|
|
895
922
|
__name: "ForgeCheckbox",
|
|
896
923
|
props: {
|
|
897
924
|
label: { default: "" },
|
|
@@ -919,72 +946,75 @@ const De = {
|
|
|
919
946
|
},
|
|
920
947
|
emits: ["update:modelValue"],
|
|
921
948
|
setup(e, { emit: t }) {
|
|
922
|
-
const
|
|
949
|
+
const n = t, a = e, { checked: l, handleChange: o, setValue: i, errors: u, errorMessage: b } = W(() => a.name ?? a.label, a.rules, {
|
|
923
950
|
type: "checkbox",
|
|
924
951
|
checkedValue: !0
|
|
925
|
-
}), d = (
|
|
926
|
-
a.disabled || (
|
|
952
|
+
}), d = (r) => {
|
|
953
|
+
a.disabled || (o(r), n("update:modelValue", !a.modelValue));
|
|
927
954
|
};
|
|
928
955
|
oe(() => {
|
|
929
|
-
a.value !== void 0 && a.value !== (l == null ? void 0 : l.value) ?
|
|
956
|
+
a.value !== void 0 && a.value !== (l == null ? void 0 : l.value) ? i(a.value) : a.modelValue !== void 0 && a.modelValue !== (l == null ? void 0 : l.value) && i(a.modelValue);
|
|
957
|
+
}), ge(() => a.value, (r) => {
|
|
958
|
+
i(r);
|
|
930
959
|
});
|
|
931
|
-
const
|
|
932
|
-
return
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
960
|
+
const f = x(() => u.value.length > 0);
|
|
961
|
+
return (r, h) => {
|
|
962
|
+
const _ = xe;
|
|
963
|
+
return s(), p(D, null, [
|
|
964
|
+
m("div", S({
|
|
965
|
+
class: "d-flex",
|
|
966
|
+
"data-cy": "checkbox-container"
|
|
967
|
+
}, { ...r.$attrs }), [
|
|
968
|
+
y(_, S({
|
|
939
969
|
id: a.name
|
|
940
|
-
}, { ...
|
|
970
|
+
}, { ...a }, {
|
|
941
971
|
modelValue: c(l),
|
|
942
|
-
"onUpdate:modelValue": h[0] || (h[0] = (
|
|
943
|
-
"input-class": { "is-invalid":
|
|
972
|
+
"onUpdate:modelValue": h[0] || (h[0] = (V) => H(l) ? l.value = V : null),
|
|
973
|
+
"input-class": { "is-invalid": f.value },
|
|
944
974
|
onChange: d
|
|
945
975
|
}), {
|
|
946
976
|
icon: v(() => [
|
|
947
|
-
|
|
977
|
+
rt
|
|
948
978
|
]),
|
|
949
979
|
_: 1
|
|
950
980
|
}, 16, ["id", "modelValue", "input-class"]),
|
|
951
981
|
m("label", {
|
|
952
982
|
for: a.name,
|
|
953
|
-
class:
|
|
983
|
+
class: B(`${a.disabled ? "opacity-50" : "cursor-pointer"}`),
|
|
954
984
|
onClick: d
|
|
955
985
|
}, [
|
|
956
|
-
|
|
957
|
-
|
|
986
|
+
k(r.$slots, "default", {}, () => [
|
|
987
|
+
P(g(a.label), 1)
|
|
958
988
|
])
|
|
959
|
-
], 10,
|
|
960
|
-
]),
|
|
961
|
-
|
|
989
|
+
], 10, dt)
|
|
990
|
+
], 16),
|
|
991
|
+
L(m("small", {
|
|
962
992
|
"data-cy": "error",
|
|
963
993
|
class: "text-invalid"
|
|
964
|
-
}, g(c(
|
|
965
|
-
[
|
|
994
|
+
}, g(c(b)), 513), [
|
|
995
|
+
[Y, f.value]
|
|
966
996
|
])
|
|
967
997
|
], 64);
|
|
968
998
|
};
|
|
969
999
|
}
|
|
970
|
-
}),
|
|
1000
|
+
}), ut = { class: "forge-loader" }, pe = /* @__PURE__ */ $({
|
|
971
1001
|
__name: "ForgeLoader",
|
|
972
1002
|
props: {
|
|
973
1003
|
severity: { default: "primary" }
|
|
974
1004
|
},
|
|
975
1005
|
setup(e) {
|
|
976
1006
|
const t = e;
|
|
977
|
-
return (
|
|
978
|
-
const l =
|
|
979
|
-
return s(), p("div",
|
|
1007
|
+
return (n, a) => {
|
|
1008
|
+
const l = ke;
|
|
1009
|
+
return s(), p("div", ut, [
|
|
980
1010
|
y(l, {
|
|
981
1011
|
"animation-duration": ".75",
|
|
982
|
-
class:
|
|
1012
|
+
class: B(`text-${t.severity === void 0 ? "primary" : t.severity}`)
|
|
983
1013
|
}, null, 8, ["class"])
|
|
984
1014
|
]);
|
|
985
1015
|
};
|
|
986
1016
|
}
|
|
987
|
-
}),
|
|
1017
|
+
}), ct = ["href", "target"], dl = /* @__PURE__ */ $({
|
|
988
1018
|
__name: "ForgeLink",
|
|
989
1019
|
props: {
|
|
990
1020
|
url: {},
|
|
@@ -1002,7 +1032,7 @@ const De = {
|
|
|
1002
1032
|
iconName: {}
|
|
1003
1033
|
},
|
|
1004
1034
|
setup(e) {
|
|
1005
|
-
const t =
|
|
1035
|
+
const t = x(() => ({
|
|
1006
1036
|
[`link-${e.severity}`]: e.severity,
|
|
1007
1037
|
[`link-underline-${e.underlineSeverity}`]: e.underlineSeverity,
|
|
1008
1038
|
[`link-opacity-${e.opacity}`]: e.opacity,
|
|
@@ -1011,7 +1041,7 @@ const De = {
|
|
|
1011
1041
|
[`link-underline-opacity-${e.underlineHoverOpacity ?? e.hoverOpacity}-hover`]: e.underlineHoverOpacity || e.hoverOpacity,
|
|
1012
1042
|
[`link-offset-${e.underlineOffset}`]: e.underlineOffset,
|
|
1013
1043
|
"icon-link icon-link-hover": e.animateIconOnHover
|
|
1014
|
-
})),
|
|
1044
|
+
})), n = x(() => ({
|
|
1015
1045
|
"order-2": e.positionIconEnd,
|
|
1016
1046
|
"me-1": !e.positionIconEnd && !e.animateIconOnHover,
|
|
1017
1047
|
"ms-1": e.positionIconEnd && !e.animateIconOnHover,
|
|
@@ -1020,39 +1050,39 @@ const De = {
|
|
|
1020
1050
|
}));
|
|
1021
1051
|
return (a, l) => (s(), p("a", {
|
|
1022
1052
|
id: "link",
|
|
1023
|
-
class:
|
|
1053
|
+
class: B(["cursor-pointer d-flex", t.value]),
|
|
1024
1054
|
href: a.url,
|
|
1025
1055
|
target: a.target
|
|
1026
1056
|
}, [
|
|
1027
|
-
|
|
1057
|
+
k(a.$slots, "default", {}, () => [
|
|
1028
1058
|
a.iconName ? (s(), w(c(C), {
|
|
1029
1059
|
key: 0,
|
|
1030
1060
|
id: "link-icon",
|
|
1031
1061
|
icon: a.iconName,
|
|
1032
|
-
class:
|
|
1033
|
-
}, null, 8, ["icon", "class"])) :
|
|
1034
|
-
|
|
1062
|
+
class: B(["bi my-auto", n.value])
|
|
1063
|
+
}, null, 8, ["icon", "class"])) : F("", !0),
|
|
1064
|
+
P(" " + g(a.label), 1)
|
|
1035
1065
|
])
|
|
1036
|
-
], 10,
|
|
1066
|
+
], 10, ct));
|
|
1037
1067
|
}
|
|
1038
1068
|
});
|
|
1039
|
-
function
|
|
1069
|
+
function mt(e) {
|
|
1040
1070
|
const t = {
|
|
1041
1071
|
errorMessage: "",
|
|
1042
1072
|
errorDetails: []
|
|
1043
1073
|
};
|
|
1044
1074
|
if (e.exception && (t.errorMessage = e.exception), e.message && (Array.isArray(e.message) ? t.errorDetails = e.message : t.errorMessage = e.message), e.response) {
|
|
1045
|
-
const
|
|
1046
|
-
|
|
1075
|
+
const n = JSON.parse(e.response);
|
|
1076
|
+
n.errors && (t.errorDetails = Object.values(n.errors).flat()), n.message && (t.errorDetails = n.message);
|
|
1047
1077
|
}
|
|
1048
1078
|
return t.errorMessage === "" && t.errorDetails.length === 0 && (t.errorMessage = e), t;
|
|
1049
1079
|
}
|
|
1050
|
-
const
|
|
1080
|
+
const pt = { key: 0 }, yt = {
|
|
1051
1081
|
class: "d-flex w-100",
|
|
1052
1082
|
"data-cy": "footer"
|
|
1053
1083
|
}, ul = /* @__PURE__ */ $({
|
|
1054
1084
|
__name: "ForgeModal",
|
|
1055
|
-
props: /* @__PURE__ */
|
|
1085
|
+
props: /* @__PURE__ */ q({
|
|
1056
1086
|
cancelText: { default: "Cancel" },
|
|
1057
1087
|
submitText: { default: "Submit" },
|
|
1058
1088
|
showFooter: { type: Boolean, default: !0 },
|
|
@@ -1093,43 +1123,43 @@ const yt = { key: 0 }, vt = {
|
|
|
1093
1123
|
}),
|
|
1094
1124
|
emits: ["update:visible"],
|
|
1095
1125
|
setup(e) {
|
|
1096
|
-
const t =
|
|
1126
|
+
const t = R(e, "visible"), n = T(!1), a = e, l = T(!1), o = T({
|
|
1097
1127
|
hasError: !1,
|
|
1098
1128
|
header: "",
|
|
1099
1129
|
message: []
|
|
1100
|
-
}),
|
|
1101
|
-
|
|
1130
|
+
}), i = () => {
|
|
1131
|
+
n.value = !1;
|
|
1102
1132
|
}, u = () => {
|
|
1103
|
-
|
|
1104
|
-
},
|
|
1133
|
+
n.value = !0;
|
|
1134
|
+
}, b = () => {
|
|
1105
1135
|
t.value = !1;
|
|
1106
1136
|
}, d = async () => {
|
|
1107
1137
|
if (a.onConfirm) {
|
|
1108
|
-
l.value = !0,
|
|
1138
|
+
l.value = !0, o.value.hasError = !1;
|
|
1109
1139
|
try {
|
|
1110
|
-
const
|
|
1111
|
-
(
|
|
1112
|
-
} catch (
|
|
1113
|
-
|
|
1114
|
-
const h =
|
|
1115
|
-
|
|
1140
|
+
const r = await a.onConfirm();
|
|
1141
|
+
(r || r == null) && b();
|
|
1142
|
+
} catch (r) {
|
|
1143
|
+
o.value.hasError = !0;
|
|
1144
|
+
const h = mt(r);
|
|
1145
|
+
o.value.header = h.errorMessage, o.value.message = h.errorDetails;
|
|
1116
1146
|
}
|
|
1117
1147
|
l.value = !1;
|
|
1118
1148
|
}
|
|
1119
|
-
},
|
|
1149
|
+
}, f = x(() => ({
|
|
1120
1150
|
root: [
|
|
1121
1151
|
"modal modal-dialog modal-content h-auto m-0",
|
|
1122
1152
|
{
|
|
1123
|
-
"mw-100 vh-100 vw-100 top-0 start-0":
|
|
1153
|
+
"mw-100 vh-100 vw-100 top-0 start-0": n.value
|
|
1124
1154
|
}
|
|
1125
1155
|
]
|
|
1126
1156
|
}));
|
|
1127
|
-
return (
|
|
1128
|
-
const
|
|
1129
|
-
return s(), w(
|
|
1157
|
+
return (r, h) => {
|
|
1158
|
+
const _ = E, V = _e;
|
|
1159
|
+
return s(), w(V, S(a, {
|
|
1130
1160
|
onMaximize: u,
|
|
1131
|
-
onUnmaximize:
|
|
1132
|
-
pt:
|
|
1161
|
+
onUnmaximize: i,
|
|
1162
|
+
pt: f.value
|
|
1133
1163
|
}), te({
|
|
1134
1164
|
closeicon: v(() => [
|
|
1135
1165
|
y(c(C), {
|
|
@@ -1137,57 +1167,57 @@ const yt = { key: 0 }, vt = {
|
|
|
1137
1167
|
icon: "bi:x-lg",
|
|
1138
1168
|
width: "18",
|
|
1139
1169
|
height: "18",
|
|
1140
|
-
onClick:
|
|
1170
|
+
onClick: b
|
|
1141
1171
|
})
|
|
1142
1172
|
]),
|
|
1143
1173
|
maximizeicon: v(() => [
|
|
1144
1174
|
y(c(C), {
|
|
1145
1175
|
"data-cy": "maximisable-icon",
|
|
1146
|
-
icon:
|
|
1176
|
+
icon: n.value ? "bi:arrows-angle-contract" : "bi:arrows-angle-expand",
|
|
1147
1177
|
width: "16",
|
|
1148
1178
|
height: "16"
|
|
1149
1179
|
}, null, 8, ["icon"])
|
|
1150
1180
|
]),
|
|
1151
1181
|
_: 2
|
|
1152
1182
|
}, [
|
|
1153
|
-
|
|
1154
|
-
name:
|
|
1155
|
-
fn: v((
|
|
1156
|
-
|
|
1183
|
+
j(r.$slots, (M, I) => ({
|
|
1184
|
+
name: I,
|
|
1185
|
+
fn: v((z) => [
|
|
1186
|
+
o.value.hasError ? (s(), w(ae, {
|
|
1157
1187
|
key: 0,
|
|
1158
1188
|
severity: "danger",
|
|
1159
1189
|
"data-cy": "error"
|
|
1160
1190
|
}, {
|
|
1161
1191
|
default: v(() => [
|
|
1162
1192
|
m("p", {
|
|
1163
|
-
class:
|
|
1164
|
-
}, g(
|
|
1165
|
-
|
|
1166
|
-
(s(!0), p(
|
|
1167
|
-
])) :
|
|
1193
|
+
class: B(o.value.message.length > 0 ? "my-auto" : "mb-0")
|
|
1194
|
+
}, g(o.value.header), 3),
|
|
1195
|
+
o.value.message.length > 0 ? (s(), p("ul", pt, [
|
|
1196
|
+
(s(!0), p(D, null, j(o.value.message, (N) => (s(), p("li", { key: N }, g(N), 1))), 128))
|
|
1197
|
+
])) : F("", !0)
|
|
1168
1198
|
]),
|
|
1169
1199
|
_: 1
|
|
1170
|
-
})) :
|
|
1171
|
-
|
|
1172
|
-
l.value ?
|
|
1200
|
+
})) : F("", !0),
|
|
1201
|
+
k(r.$slots, I, Q(ee(z || {}))),
|
|
1202
|
+
l.value ? k(r.$slots, "loader", { key: 1 }, () => [
|
|
1173
1203
|
y(pe, { "data-cy": "loader" })
|
|
1174
|
-
]) :
|
|
1204
|
+
]) : F("", !0)
|
|
1175
1205
|
])
|
|
1176
1206
|
})),
|
|
1177
|
-
|
|
1207
|
+
r.showFooter ? {
|
|
1178
1208
|
name: "footer",
|
|
1179
1209
|
fn: v(() => [
|
|
1180
|
-
m("div",
|
|
1181
|
-
y(
|
|
1182
|
-
label:
|
|
1183
|
-
class:
|
|
1210
|
+
m("div", yt, [
|
|
1211
|
+
y(_, {
|
|
1212
|
+
label: r.cancelText,
|
|
1213
|
+
class: B(a.cancelClass),
|
|
1184
1214
|
outlined: "",
|
|
1185
|
-
onClick:
|
|
1215
|
+
onClick: b,
|
|
1186
1216
|
id: "cancel-button"
|
|
1187
1217
|
}, null, 8, ["label", "class"]),
|
|
1188
|
-
y(
|
|
1189
|
-
label:
|
|
1190
|
-
class:
|
|
1218
|
+
y(_, {
|
|
1219
|
+
label: r.submitText,
|
|
1220
|
+
class: B([a.submitClass, "ms-auto"]),
|
|
1191
1221
|
onClick: d,
|
|
1192
1222
|
id: "submit-button"
|
|
1193
1223
|
}, null, 8, ["label", "class"])
|
|
@@ -1198,9 +1228,9 @@ const yt = { key: 0 }, vt = {
|
|
|
1198
1228
|
]), 1040, ["pt"]);
|
|
1199
1229
|
};
|
|
1200
1230
|
}
|
|
1201
|
-
}),
|
|
1231
|
+
}), vt = ["id"], bt = { key: 0 }, ft = { key: 0 }, gt = { class: "d-flex justify-content-between align-items-center position-relative" }, ht = { key: 1 }, wt = { "data-cy": "readonly-value" }, xt = /* @__PURE__ */ $({
|
|
1202
1232
|
__name: "ForgeInlineEditor",
|
|
1203
|
-
props: /* @__PURE__ */
|
|
1233
|
+
props: /* @__PURE__ */ q({
|
|
1204
1234
|
name: { default: "" },
|
|
1205
1235
|
rules: {},
|
|
1206
1236
|
completeAction: {},
|
|
@@ -1214,13 +1244,13 @@ const yt = { key: 0 }, vt = {
|
|
|
1214
1244
|
}),
|
|
1215
1245
|
emits: ["update:modelValue"],
|
|
1216
1246
|
setup(e) {
|
|
1217
|
-
const t = e,
|
|
1218
|
-
var
|
|
1219
|
-
a.value = !a.value, (
|
|
1220
|
-
},
|
|
1247
|
+
const t = e, n = R(e, "modelValue"), a = T(!1), l = T(), o = () => {
|
|
1248
|
+
var _;
|
|
1249
|
+
a.value = !a.value, (_ = l.value) == null || _.focus();
|
|
1250
|
+
}, i = async () => {
|
|
1221
1251
|
if (h.value)
|
|
1222
1252
|
return !1;
|
|
1223
|
-
if (
|
|
1253
|
+
if (n.value = r.value, t.completeAction)
|
|
1224
1254
|
try {
|
|
1225
1255
|
await t.completeAction.apply(this, t.params), a.value = !a.value;
|
|
1226
1256
|
} catch {
|
|
@@ -1230,41 +1260,41 @@ const yt = { key: 0 }, vt = {
|
|
|
1230
1260
|
a.value = !a.value;
|
|
1231
1261
|
}, u = () => {
|
|
1232
1262
|
a.value = !a.value;
|
|
1233
|
-
},
|
|
1234
|
-
|
|
1235
|
-
}, { errorMessage: d, errors:
|
|
1263
|
+
}, b = () => {
|
|
1264
|
+
r.value = null;
|
|
1265
|
+
}, { errorMessage: d, errors: f, value: r } = W(() => t.name, t.rules);
|
|
1236
1266
|
oe(() => {
|
|
1237
|
-
|
|
1267
|
+
r.value = n.value;
|
|
1238
1268
|
});
|
|
1239
|
-
const h =
|
|
1240
|
-
return (
|
|
1241
|
-
const
|
|
1269
|
+
const h = x(() => f.value.length > 0);
|
|
1270
|
+
return (_, V) => {
|
|
1271
|
+
const M = ne, I = E;
|
|
1242
1272
|
return s(), p("div", {
|
|
1243
1273
|
id: t.name
|
|
1244
1274
|
}, [
|
|
1245
|
-
|
|
1246
|
-
_
|
|
1247
|
-
m("span",
|
|
1275
|
+
_.readonly ? (s(), p("div", ht, [
|
|
1276
|
+
k(_.$slots, "default", {}, () => [
|
|
1277
|
+
m("span", wt, g(c(r)), 1)
|
|
1248
1278
|
])
|
|
1249
|
-
])) : (s(), p("div",
|
|
1250
|
-
a.value ? (s(), p("div",
|
|
1251
|
-
|
|
1252
|
-
_
|
|
1253
|
-
class:
|
|
1254
|
-
editFinished:
|
|
1279
|
+
])) : (s(), p("div", bt, [
|
|
1280
|
+
a.value ? (s(), p("div", ft, [
|
|
1281
|
+
L((s(), p("div", gt, [
|
|
1282
|
+
k(_.$slots, "editor", {
|
|
1283
|
+
class: B({ "is-invalid": h.value }),
|
|
1284
|
+
editFinished: i,
|
|
1255
1285
|
cancel: u,
|
|
1256
|
-
val: c(
|
|
1286
|
+
val: c(r)
|
|
1257
1287
|
}, () => [
|
|
1258
|
-
y(
|
|
1288
|
+
y(M, {
|
|
1259
1289
|
"data-cy": "input",
|
|
1260
1290
|
ref_key: "input",
|
|
1261
1291
|
ref: l,
|
|
1262
|
-
modelValue: c(
|
|
1263
|
-
"onUpdate:modelValue":
|
|
1292
|
+
modelValue: c(r),
|
|
1293
|
+
"onUpdate:modelValue": V[0] || (V[0] = (z) => H(r) ? r.value = z : null),
|
|
1264
1294
|
modelModifiers: { trim: !0 },
|
|
1265
|
-
class:
|
|
1295
|
+
class: B({ "is-invalid": h.value }),
|
|
1266
1296
|
onKeydown: [
|
|
1267
|
-
J(
|
|
1297
|
+
J(i, ["enter"]),
|
|
1268
1298
|
J(u, ["esc"])
|
|
1269
1299
|
]
|
|
1270
1300
|
}, null, 8, ["modelValue", "class"])
|
|
@@ -1272,51 +1302,51 @@ const yt = { key: 0 }, vt = {
|
|
|
1272
1302
|
y(c(C), {
|
|
1273
1303
|
icon: "bi:x-circle",
|
|
1274
1304
|
class: "mx-2 cursor-pointer",
|
|
1275
|
-
onClick:
|
|
1276
|
-
onKeydown: J(
|
|
1305
|
+
onClick: b,
|
|
1306
|
+
onKeydown: J(b, ["enter"]),
|
|
1277
1307
|
"data-cy": "clear-icon"
|
|
1278
1308
|
})
|
|
1279
1309
|
])), [
|
|
1280
|
-
[c($e),
|
|
1310
|
+
[c($e), i]
|
|
1281
1311
|
])
|
|
1282
1312
|
])) : (s(), p("div", {
|
|
1283
1313
|
key: 1,
|
|
1284
1314
|
class: "d-flex text-muted",
|
|
1285
|
-
onClick:
|
|
1286
|
-
onFocus:
|
|
1315
|
+
onClick: o,
|
|
1316
|
+
onFocus: o
|
|
1287
1317
|
}, [
|
|
1288
|
-
_
|
|
1318
|
+
k(_.$slots, "default", {}, () => [
|
|
1289
1319
|
m("div", {
|
|
1290
|
-
class:
|
|
1320
|
+
class: B(["pe-2 cursor-pointer", { "text-invalid": h.value }]),
|
|
1291
1321
|
"data-cy": "value"
|
|
1292
|
-
}, g(c(
|
|
1322
|
+
}, g(c(r) ? c(r) : "Click to edit"), 3)
|
|
1293
1323
|
]),
|
|
1294
|
-
y(
|
|
1324
|
+
y(I, {
|
|
1295
1325
|
link: "",
|
|
1296
1326
|
class: "p-0 m-0"
|
|
1297
1327
|
}, {
|
|
1298
1328
|
default: v(() => [
|
|
1299
1329
|
y(c(C), {
|
|
1300
1330
|
icon: "bi:pencil",
|
|
1301
|
-
class:
|
|
1331
|
+
class: B(h.value ? "text-invalid" : "text-muted"),
|
|
1302
1332
|
"data-cy": "edit-icon",
|
|
1303
|
-
onKeydown: J(
|
|
1333
|
+
onKeydown: J(o, ["enter"])
|
|
1304
1334
|
}, null, 8, ["class"])
|
|
1305
1335
|
]),
|
|
1306
1336
|
_: 1
|
|
1307
1337
|
})
|
|
1308
1338
|
], 32))
|
|
1309
1339
|
])),
|
|
1310
|
-
|
|
1340
|
+
L(m("small", {
|
|
1311
1341
|
"data-cy": "error",
|
|
1312
1342
|
class: "text-invalid"
|
|
1313
1343
|
}, g(c(d)), 513), [
|
|
1314
|
-
[
|
|
1344
|
+
[Y, h.value]
|
|
1315
1345
|
])
|
|
1316
|
-
], 8,
|
|
1346
|
+
], 8, vt);
|
|
1317
1347
|
};
|
|
1318
1348
|
}
|
|
1319
|
-
}),
|
|
1349
|
+
}), kt = ["href"], cl = /* @__PURE__ */ $({
|
|
1320
1350
|
__name: "ForgeNavbar",
|
|
1321
1351
|
props: {
|
|
1322
1352
|
severity: { default: "light" },
|
|
@@ -1333,7 +1363,7 @@ const yt = { key: 0 }, vt = {
|
|
|
1333
1363
|
unstyled: { type: Boolean }
|
|
1334
1364
|
},
|
|
1335
1365
|
setup(e) {
|
|
1336
|
-
const t = e,
|
|
1366
|
+
const t = e, n = x(() => ({
|
|
1337
1367
|
root: () => ({
|
|
1338
1368
|
class: [
|
|
1339
1369
|
"navbar container-fluid navbar-expand-lg",
|
|
@@ -1361,9 +1391,9 @@ const yt = { key: 0 }, vt = {
|
|
|
1361
1391
|
})
|
|
1362
1392
|
}));
|
|
1363
1393
|
return (a, l) => {
|
|
1364
|
-
const
|
|
1365
|
-
return s(), w(
|
|
1366
|
-
pt:
|
|
1394
|
+
const o = Fe;
|
|
1395
|
+
return s(), w(o, S({ ...t, ...a.$attrs }, {
|
|
1396
|
+
pt: n.value,
|
|
1367
1397
|
"data-cy": "navbar"
|
|
1368
1398
|
}), te({
|
|
1369
1399
|
start: v(() => [
|
|
@@ -1372,16 +1402,16 @@ const yt = { key: 0 }, vt = {
|
|
|
1372
1402
|
class: "navbar-brand ms-3",
|
|
1373
1403
|
"data-cy": "logo"
|
|
1374
1404
|
}, [
|
|
1375
|
-
|
|
1376
|
-
|
|
1405
|
+
k(a.$slots, "logo", {}, () => [
|
|
1406
|
+
P(" Logo ")
|
|
1377
1407
|
])
|
|
1378
|
-
], 8,
|
|
1408
|
+
], 8, kt)
|
|
1379
1409
|
]),
|
|
1380
1410
|
menubuttonicon: v(() => [
|
|
1381
|
-
|
|
1411
|
+
k(a.$slots, "menubuttonicon", {}, () => [
|
|
1382
1412
|
y(c(C), {
|
|
1383
1413
|
icon: "bi:list",
|
|
1384
|
-
class:
|
|
1414
|
+
class: B(t.severity === "light" ? "text-black" : "text-white"),
|
|
1385
1415
|
height: "24",
|
|
1386
1416
|
"data-cy": "burger-icon"
|
|
1387
1417
|
}, null, 8, ["class"])
|
|
@@ -1389,16 +1419,16 @@ const yt = { key: 0 }, vt = {
|
|
|
1389
1419
|
]),
|
|
1390
1420
|
_: 2
|
|
1391
1421
|
}, [
|
|
1392
|
-
|
|
1422
|
+
j(a.$slots, (i, u) => ({
|
|
1393
1423
|
name: u,
|
|
1394
|
-
fn: v((
|
|
1395
|
-
|
|
1424
|
+
fn: v((b) => [
|
|
1425
|
+
k(a.$slots, u, Q(ee(b)))
|
|
1396
1426
|
])
|
|
1397
1427
|
}))
|
|
1398
1428
|
]), 1040, ["pt"]);
|
|
1399
1429
|
};
|
|
1400
1430
|
}
|
|
1401
|
-
}),
|
|
1431
|
+
}), _t = /* @__PURE__ */ m("div", { class: "ps-1" }, "Select all", -1), $t = ["data-cy"], Ft = { class: "ps-1 w-100" }, Bt = { class: "multiselect__tag d-inline-flex" }, St = { class: "my-auto" }, Ct = /* @__PURE__ */ $({
|
|
1402
1432
|
__name: "ForgeMultiSelect",
|
|
1403
1433
|
props: {
|
|
1404
1434
|
severity: { default: "primary" },
|
|
@@ -1411,13 +1441,13 @@ const yt = { key: 0 }, vt = {
|
|
|
1411
1441
|
},
|
|
1412
1442
|
emits: ["update:modelValue"],
|
|
1413
1443
|
setup(e, { emit: t }) {
|
|
1414
|
-
const
|
|
1415
|
-
const
|
|
1416
|
-
...
|
|
1417
|
-
$isDisabled:
|
|
1444
|
+
const n = e, a = (U, O) => {
|
|
1445
|
+
const Z = {
|
|
1446
|
+
...O,
|
|
1447
|
+
$isDisabled: O.$isDisabled ?? !1
|
|
1418
1448
|
};
|
|
1419
|
-
|
|
1420
|
-
}, l = de(),
|
|
1449
|
+
U(Z);
|
|
1450
|
+
}, l = de(), o = t, { errors: i, value: u, errorMessage: b } = W(() => n.name, n.rules), d = T(!1), f = x(() => ({
|
|
1421
1451
|
multiple: !0,
|
|
1422
1452
|
label: "label",
|
|
1423
1453
|
trackBy: "id",
|
|
@@ -1430,74 +1460,74 @@ const yt = { key: 0 }, vt = {
|
|
|
1430
1460
|
searchable: !!(l.searchable === null || l.searchable) && l.modelValue.length === l.options.length,
|
|
1431
1461
|
async: !1,
|
|
1432
1462
|
...l
|
|
1433
|
-
})),
|
|
1434
|
-
u.value =
|
|
1435
|
-
}, le = (
|
|
1436
|
-
|
|
1437
|
-
}, ve = (
|
|
1438
|
-
|
|
1463
|
+
})), r = x(() => `forge-multiselect-${n.severity}`), h = x(() => `multiselect__option ${d.value ? " multiselect__option--highlight" : ""} ${_.value ? " multiselect__option--selected" : ""}`), _ = x(() => f.value && !(f.value.multiple || !n.showSelectAll || f.value.async) ? !1 : l.modelValue.length === l.options.length), V = x(() => i.value.length > 0), M = x(() => !!((l.allowEmpty == null || l.allowEmpty) && n.showClearSelection && (f.value.multiple ? l.modelValue.length > 0 : l.modelValue))), I = () => d.value = !0, z = () => d.value = !1, N = () => {
|
|
1464
|
+
u.value = f.value.multiple ? [] : null, o("update:modelValue", u.value);
|
|
1465
|
+
}, le = (U) => {
|
|
1466
|
+
o("update:modelValue", n.selectValue ? U.map((O) => O[n.selectValue]) : U);
|
|
1467
|
+
}, ve = (U) => l.modelValue !== null ? l.modelValue.some((O) => f.value.selectValue ? U[n.selectValue] === O : U.id === O.id && U.label === O.label) : !1, be = () => {
|
|
1468
|
+
_.value ? N() : (u.value = [...l.options], o("update:modelValue", [...l.options]));
|
|
1439
1469
|
};
|
|
1440
|
-
return (
|
|
1441
|
-
const
|
|
1442
|
-
return s(), p(
|
|
1443
|
-
y(c(
|
|
1444
|
-
class: [
|
|
1470
|
+
return (U, O) => {
|
|
1471
|
+
const Z = me;
|
|
1472
|
+
return s(), p(D, null, [
|
|
1473
|
+
y(c(Be), S(f.value, {
|
|
1474
|
+
class: [r.value, V.value ? "is-invalid" : ""],
|
|
1445
1475
|
"data-cy": "multiselect",
|
|
1446
1476
|
"onUpdate:modelValue": [
|
|
1447
1477
|
le,
|
|
1448
|
-
|
|
1478
|
+
O[1] || (O[1] = (A) => H(u) ? u.value = A : null)
|
|
1449
1479
|
],
|
|
1450
1480
|
modelValue: c(u)
|
|
1451
1481
|
}), te({
|
|
1452
1482
|
caret: v(({ toggle: A }) => [
|
|
1453
|
-
|
|
1483
|
+
M.value ? (s(), w(c(C), {
|
|
1454
1484
|
key: 0,
|
|
1455
1485
|
icon: "bi:x",
|
|
1456
1486
|
class: "my-auto multiselect__clear-icon",
|
|
1457
|
-
onMousedown:
|
|
1487
|
+
onMousedown: O[0] || (O[0] = G((K) => N(), ["prevent", "stop"])),
|
|
1458
1488
|
"data-cy": "clear",
|
|
1459
1489
|
height: "18px",
|
|
1460
1490
|
width: "18px"
|
|
1461
|
-
})) :
|
|
1491
|
+
})) : F("", !0),
|
|
1462
1492
|
y(c(C), {
|
|
1463
1493
|
icon: "bi:chevron-down",
|
|
1464
1494
|
onClick: A,
|
|
1465
1495
|
class: "multiselect__select"
|
|
1466
1496
|
}, null, 8, ["onClick"])
|
|
1467
1497
|
]),
|
|
1468
|
-
tag: v(({ option: A, remove:
|
|
1469
|
-
m("div",
|
|
1470
|
-
m("div",
|
|
1498
|
+
tag: v(({ option: A, remove: K }) => [
|
|
1499
|
+
m("div", Bt, [
|
|
1500
|
+
m("div", St, g(A.label), 1),
|
|
1471
1501
|
y(c(C), {
|
|
1472
1502
|
icon: "bi:x",
|
|
1473
1503
|
class: "my-auto multiselect__tag-icon",
|
|
1474
|
-
onMousedown:
|
|
1504
|
+
onMousedown: G((za) => a(K, A), ["prevent", "stop"]),
|
|
1475
1505
|
height: "18px",
|
|
1476
1506
|
width: "18px"
|
|
1477
1507
|
}, null, 8, ["onMousedown"])
|
|
1478
1508
|
])
|
|
1479
1509
|
]),
|
|
1480
1510
|
default: v(() => [
|
|
1481
|
-
(s(!0), p(
|
|
1511
|
+
(s(!0), p(D, null, j(U.$slots, (A, K) => k(U.$slots, K, { slot: K })), 256))
|
|
1482
1512
|
]),
|
|
1483
1513
|
_: 2
|
|
1484
1514
|
}, [
|
|
1485
|
-
|
|
1515
|
+
f.value.multiple && U.showSelectAll && !f.value.async ? {
|
|
1486
1516
|
name: "beforeList",
|
|
1487
1517
|
fn: v(() => [
|
|
1488
1518
|
m("li", {
|
|
1489
1519
|
class: "multiselect__element",
|
|
1490
1520
|
onClick: be,
|
|
1491
|
-
onMouseover:
|
|
1492
|
-
onMouseleave:
|
|
1521
|
+
onMouseover: I,
|
|
1522
|
+
onMouseleave: z,
|
|
1493
1523
|
"data-cy": "toggle-all"
|
|
1494
1524
|
}, [
|
|
1495
1525
|
m("span", {
|
|
1496
|
-
class:
|
|
1526
|
+
class: B(`${h.value}`)
|
|
1497
1527
|
}, [
|
|
1498
|
-
y(
|
|
1528
|
+
y(Z, { value: _.value }, {
|
|
1499
1529
|
default: v(() => [
|
|
1500
|
-
|
|
1530
|
+
_t
|
|
1501
1531
|
]),
|
|
1502
1532
|
_: 1
|
|
1503
1533
|
}, 8, ["value"])
|
|
@@ -1506,31 +1536,31 @@ const yt = { key: 0 }, vt = {
|
|
|
1506
1536
|
]),
|
|
1507
1537
|
key: "0"
|
|
1508
1538
|
} : void 0,
|
|
1509
|
-
|
|
1539
|
+
f.value.multiple ? {
|
|
1510
1540
|
name: "option",
|
|
1511
1541
|
fn: v(({ option: A }) => [
|
|
1512
1542
|
m("div", {
|
|
1513
1543
|
"data-cy": A.label
|
|
1514
1544
|
}, [
|
|
1515
|
-
(s(), w(
|
|
1545
|
+
(s(), w(Z, {
|
|
1516
1546
|
value: ve(A),
|
|
1517
1547
|
key: A
|
|
1518
1548
|
}, {
|
|
1519
1549
|
default: v(() => [
|
|
1520
|
-
m("div", Ft, g(A[
|
|
1550
|
+
m("div", Ft, g(A[f.value.label]), 1)
|
|
1521
1551
|
]),
|
|
1522
1552
|
_: 2
|
|
1523
1553
|
}, 1032, ["value"]))
|
|
1524
|
-
], 8,
|
|
1554
|
+
], 8, $t)
|
|
1525
1555
|
]),
|
|
1526
1556
|
key: "1"
|
|
1527
1557
|
} : void 0
|
|
1528
1558
|
]), 1040, ["class", "modelValue"]),
|
|
1529
|
-
|
|
1559
|
+
L(m("small", {
|
|
1530
1560
|
"data-cy": "error",
|
|
1531
1561
|
class: "invalid-feedback"
|
|
1532
|
-
}, g(c(
|
|
1533
|
-
[
|
|
1562
|
+
}, g(c(b)), 513), [
|
|
1563
|
+
[Y, V.value]
|
|
1534
1564
|
])
|
|
1535
1565
|
], 64);
|
|
1536
1566
|
};
|
|
@@ -1538,11 +1568,11 @@ const yt = { key: 0 }, vt = {
|
|
|
1538
1568
|
}), Vt = {
|
|
1539
1569
|
key: 0,
|
|
1540
1570
|
class: "pl-1"
|
|
1541
|
-
},
|
|
1571
|
+
}, Tt = { class: "border alternating-item-list" }, Mt = {
|
|
1542
1572
|
key: 0,
|
|
1543
1573
|
class: "p-2 border-top border-bottom",
|
|
1544
1574
|
"data-cy": "title"
|
|
1545
|
-
},
|
|
1575
|
+
}, Pt = { class: "d-inline-block" }, It = {
|
|
1546
1576
|
key: 1,
|
|
1547
1577
|
class: "p-2 item d-flex justify-content-between align-items-center"
|
|
1548
1578
|
}, ml = /* @__PURE__ */ $({
|
|
@@ -1556,65 +1586,65 @@ const yt = { key: 0 }, vt = {
|
|
|
1556
1586
|
},
|
|
1557
1587
|
emits: ["update:modelValue"],
|
|
1558
1588
|
setup(e, { emit: t }) {
|
|
1559
|
-
const
|
|
1589
|
+
const n = e, a = de(), l = t, o = x(() => `${a.modelValue.length} selected`), i = x(() => a.modelValue.length), u = (d) => {
|
|
1560
1590
|
l("update:modelValue", d);
|
|
1561
|
-
},
|
|
1562
|
-
u(a.modelValue.filter((
|
|
1591
|
+
}, b = (d) => {
|
|
1592
|
+
u(a.modelValue.filter((f) => f.id !== d));
|
|
1563
1593
|
};
|
|
1564
|
-
return (d,
|
|
1565
|
-
const
|
|
1594
|
+
return (d, f) => {
|
|
1595
|
+
const r = E;
|
|
1566
1596
|
return s(), p("div", {
|
|
1567
|
-
class:
|
|
1597
|
+
class: B(d.orientation === "column" ? "row" : ""),
|
|
1568
1598
|
"data-cy": "multiselect-preview"
|
|
1569
1599
|
}, [
|
|
1570
1600
|
m("div", {
|
|
1571
|
-
class:
|
|
1601
|
+
class: B(d.orientation === "row" ? "col-12 mb-1" : "col"),
|
|
1572
1602
|
"data-cy": "multiselect-container"
|
|
1573
1603
|
}, [
|
|
1574
|
-
y(
|
|
1604
|
+
y(Ct, {
|
|
1575
1605
|
"onUpdate:modelValue": [
|
|
1576
|
-
|
|
1577
|
-
|
|
1606
|
+
f[0] || (f[0] = (h) => u(h)),
|
|
1607
|
+
f[1] || (f[1] = (h) => d.$attrs.modelValue = h)
|
|
1578
1608
|
],
|
|
1579
1609
|
modelValue: d.$attrs.modelValue,
|
|
1580
|
-
"limit-text":
|
|
1581
|
-
options:
|
|
1610
|
+
"limit-text": o.value,
|
|
1611
|
+
options: n.options
|
|
1582
1612
|
}, {
|
|
1583
1613
|
tag: v(() => [
|
|
1584
|
-
|
|
1614
|
+
P(g(""))
|
|
1585
1615
|
]),
|
|
1586
1616
|
selection: v(() => [
|
|
1587
|
-
d.$attrs.modelValue.length > 0 ? (s(), p("span", Vt, g(
|
|
1617
|
+
d.$attrs.modelValue.length > 0 ? (s(), p("span", Vt, g(i.value) + " items selected", 1)) : F("", !0)
|
|
1588
1618
|
]),
|
|
1589
1619
|
default: v(() => [
|
|
1590
|
-
(s(!0), p(
|
|
1620
|
+
(s(!0), p(D, null, j(d.$slots, (h, _) => k(d.$slots, _, { slot: _ })), 256))
|
|
1591
1621
|
]),
|
|
1592
1622
|
_: 3
|
|
1593
1623
|
}, 8, ["modelValue", "limit-text", "options"]),
|
|
1594
|
-
|
|
1624
|
+
k(d.$slots, "after-multi-select")
|
|
1595
1625
|
], 2),
|
|
1596
1626
|
m("div", {
|
|
1597
|
-
class:
|
|
1627
|
+
class: B(d.orientation === "row" ? "col-12" : "col"),
|
|
1598
1628
|
"data-cy": "options-preview"
|
|
1599
1629
|
}, [
|
|
1600
1630
|
m("div", {
|
|
1601
1631
|
style: he({ height: d.height }),
|
|
1602
1632
|
class: "overflow-auto"
|
|
1603
1633
|
}, [
|
|
1604
|
-
m("div",
|
|
1605
|
-
d.title ? (s(), p("div",
|
|
1606
|
-
(s(!0), p(
|
|
1634
|
+
m("div", Tt, [
|
|
1635
|
+
d.title ? (s(), p("div", Mt, g(d.title), 1)) : F("", !0),
|
|
1636
|
+
(s(!0), p(D, null, j(d.$attrs.modelValue, (h) => (s(), p("div", {
|
|
1607
1637
|
key: h.id,
|
|
1608
1638
|
class: "p-2 item d-flex justify-content-between align-items-center"
|
|
1609
1639
|
}, [
|
|
1610
|
-
|
|
1611
|
-
m("span",
|
|
1640
|
+
k(d.$slots, "list-item", { item: h }, () => [
|
|
1641
|
+
m("span", Pt, g(h.shortLabel ? h.shortLabel : h.label), 1)
|
|
1612
1642
|
]),
|
|
1613
|
-
d.canRemoveItemFromPreview ? (s(), w(
|
|
1643
|
+
d.canRemoveItemFromPreview ? (s(), w(r, {
|
|
1614
1644
|
key: 0,
|
|
1615
1645
|
link: "",
|
|
1616
1646
|
class: "m-0 p-0 d-flex align-items-center",
|
|
1617
|
-
onClick: (
|
|
1647
|
+
onClick: (_) => b(h.id)
|
|
1618
1648
|
}, {
|
|
1619
1649
|
default: v(() => [
|
|
1620
1650
|
y(c(C), {
|
|
@@ -1624,16 +1654,16 @@ const yt = { key: 0 }, vt = {
|
|
|
1624
1654
|
}, null, 8, ["data-cy"])
|
|
1625
1655
|
]),
|
|
1626
1656
|
_: 2
|
|
1627
|
-
}, 1032, ["onClick"])) :
|
|
1657
|
+
}, 1032, ["onClick"])) : F("", !0)
|
|
1628
1658
|
]))), 128)),
|
|
1629
|
-
d.$attrs.modelValue.length === 0 ? (s(), p("div",
|
|
1659
|
+
d.$attrs.modelValue.length === 0 ? (s(), p("div", It, "No Items Selected.")) : F("", !0)
|
|
1630
1660
|
])
|
|
1631
1661
|
], 4)
|
|
1632
1662
|
], 2)
|
|
1633
1663
|
], 2);
|
|
1634
1664
|
};
|
|
1635
1665
|
}
|
|
1636
|
-
}),
|
|
1666
|
+
}), zt = { class: "d-flex justify-content-between pb-2" }, Ot = {
|
|
1637
1667
|
"data-cy": "title",
|
|
1638
1668
|
class: "h3"
|
|
1639
1669
|
}, Dt = {
|
|
@@ -1646,16 +1676,16 @@ const yt = { key: 0 }, vt = {
|
|
|
1646
1676
|
},
|
|
1647
1677
|
setup(e) {
|
|
1648
1678
|
const t = e;
|
|
1649
|
-
return (
|
|
1679
|
+
return (n, a) => (s(), p("div", zt, [
|
|
1650
1680
|
m("h1", Ot, g(t.title), 1),
|
|
1651
1681
|
m("div", Dt, [
|
|
1652
|
-
|
|
1682
|
+
k(n.$slots, "default")
|
|
1653
1683
|
])
|
|
1654
1684
|
]));
|
|
1655
1685
|
}
|
|
1656
|
-
}),
|
|
1686
|
+
}), Ut = { "data-cy": "before-slot" }, At = { class: "position-relative" }, Nt = { "data-cy": "after-slot" }, Et = /* @__PURE__ */ $({
|
|
1657
1687
|
__name: "ForgeDatepicker",
|
|
1658
|
-
props: {
|
|
1688
|
+
props: /* @__PURE__ */ q({
|
|
1659
1689
|
severity: { default: "primary" },
|
|
1660
1690
|
modelValue: {},
|
|
1661
1691
|
selectionMode: { default: "single" },
|
|
@@ -1686,7 +1716,7 @@ const yt = { key: 0 }, vt = {
|
|
|
1686
1716
|
showOnFocus: { type: Boolean },
|
|
1687
1717
|
autoZIndex: { type: Boolean, default: !0 },
|
|
1688
1718
|
baseZIndex: { default: 0 },
|
|
1689
|
-
showButtonBar: { type: Boolean, default: !
|
|
1719
|
+
showButtonBar: { type: Boolean, default: !1 },
|
|
1690
1720
|
shortYearCutoff: {},
|
|
1691
1721
|
showTime: { type: Boolean },
|
|
1692
1722
|
timeOnly: { type: Boolean },
|
|
@@ -1699,7 +1729,7 @@ const yt = { key: 0 }, vt = {
|
|
|
1699
1729
|
hideOnRangeSelection: { type: Boolean },
|
|
1700
1730
|
timeSeparator: {},
|
|
1701
1731
|
showWeek: { type: Boolean },
|
|
1702
|
-
manualInput: { type: Boolean },
|
|
1732
|
+
manualInput: { type: Boolean, default: !0 },
|
|
1703
1733
|
invalid: { type: Boolean },
|
|
1704
1734
|
disabled: { type: Boolean },
|
|
1705
1735
|
variant: {},
|
|
@@ -1719,21 +1749,41 @@ const yt = { key: 0 }, vt = {
|
|
|
1719
1749
|
pt: {},
|
|
1720
1750
|
ptOptions: {},
|
|
1721
1751
|
unstyled: { type: Boolean }
|
|
1722
|
-
},
|
|
1752
|
+
}, {
|
|
1753
|
+
modelValue: {},
|
|
1754
|
+
modelModifiers: {}
|
|
1755
|
+
}),
|
|
1756
|
+
emits: ["update:modelValue"],
|
|
1723
1757
|
setup(e) {
|
|
1724
|
-
const t = e,
|
|
1725
|
-
|
|
1758
|
+
const t = e, n = R(e, "modelValue"), a = () => {
|
|
1759
|
+
n.value = null;
|
|
1760
|
+
}, l = x(() => ({
|
|
1761
|
+
day: ({ context: o }) => ({
|
|
1726
1762
|
class: [
|
|
1727
|
-
|
|
1763
|
+
`text-center date-${t.severity === void 0 ? "primary" : t.severity}`,
|
|
1728
1764
|
{
|
|
1729
|
-
"
|
|
1730
|
-
"
|
|
1731
|
-
"
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
"
|
|
1765
|
+
"cursor-pointer": !o.disabled,
|
|
1766
|
+
"pe-none": o.disabled,
|
|
1767
|
+
"text-white": o.selected
|
|
1768
|
+
},
|
|
1769
|
+
// Severities
|
|
1770
|
+
{
|
|
1771
|
+
selected: o.selected && !o.disabled,
|
|
1772
|
+
"text-primary": !o.selected && o.today && (t.severity === void 0 || t.severity === "primary"),
|
|
1773
|
+
"text-brand": !o.selected && o.today && t.severity === "brand",
|
|
1774
|
+
"text-secondary": !o.selected && o.today && t.severity === "secondary",
|
|
1775
|
+
"text-success": !o.selected && o.today && t.severity === "success",
|
|
1776
|
+
"text-warning": !o.selected && o.today && t.severity === "warning",
|
|
1777
|
+
"text-danger": !o.selected && o.today && t.severity === "danger",
|
|
1778
|
+
"text-info": !o.selected && o.today && t.severity === "info"
|
|
1779
|
+
}
|
|
1780
|
+
]
|
|
1781
|
+
}),
|
|
1782
|
+
dayLabel: ({ context: o }) => ({
|
|
1783
|
+
class: [
|
|
1784
|
+
// Disabled States
|
|
1785
|
+
{
|
|
1786
|
+
"text-muted": o.disabled
|
|
1737
1787
|
}
|
|
1738
1788
|
]
|
|
1739
1789
|
}),
|
|
@@ -1768,26 +1818,66 @@ const yt = { key: 0 }, vt = {
|
|
|
1768
1818
|
}
|
|
1769
1819
|
]
|
|
1770
1820
|
})
|
|
1771
|
-
}
|
|
1821
|
+
},
|
|
1822
|
+
year: ({ context: o }) => ({
|
|
1823
|
+
class: [
|
|
1824
|
+
"col-3 text-center cursor-pointer py-2",
|
|
1825
|
+
{
|
|
1826
|
+
"text-primary": (t.severity === void 0 || t.severity === "primary") && o.year.value === (/* @__PURE__ */ new Date()).getFullYear(),
|
|
1827
|
+
"text-brand": t.severity === "brand" && o.year.value === (/* @__PURE__ */ new Date()).getFullYear(),
|
|
1828
|
+
"text-secondary": t.severity === "secondary" && o.year.value === (/* @__PURE__ */ new Date()).getFullYear(),
|
|
1829
|
+
"text-success": t.severity === "success" && o.year.value === (/* @__PURE__ */ new Date()).getFullYear(),
|
|
1830
|
+
"text-warning": t.severity === "warning" && o.year.value === (/* @__PURE__ */ new Date()).getFullYear(),
|
|
1831
|
+
"text-danger": t.severity === "danger" && o.year.value === (/* @__PURE__ */ new Date()).getFullYear(),
|
|
1832
|
+
"text-info": t.severity === "info" && o.year.value === (/* @__PURE__ */ new Date()).getFullYear()
|
|
1833
|
+
}
|
|
1834
|
+
]
|
|
1835
|
+
}),
|
|
1836
|
+
month: ({ context: o }) => ({
|
|
1837
|
+
class: [
|
|
1838
|
+
"col-3 text-center cursor-pointer py-2",
|
|
1839
|
+
{
|
|
1840
|
+
"text-primary": (t.severity === void 0 || t.severity === "primary") && o.monthIndex + 1 === (/* @__PURE__ */ new Date()).getMonth() + 1,
|
|
1841
|
+
"text-brand": t.severity === "brand" && o.monthIndex + 1 === (/* @__PURE__ */ new Date()).getMonth() + 1,
|
|
1842
|
+
"text-secondary": t.severity === "secondary" && o.monthIndex + 1 === (/* @__PURE__ */ new Date()).getMonth() + 1,
|
|
1843
|
+
"text-success": t.severity === "success" && o.monthIndex + 1 === (/* @__PURE__ */ new Date()).getMonth() + 1,
|
|
1844
|
+
"text-warning": t.severity === "warning" && o.monthIndex + 1 === (/* @__PURE__ */ new Date()).getMonth() + 1,
|
|
1845
|
+
"text-danger": t.severity === "danger" && o.monthIndex + 1 === (/* @__PURE__ */ new Date()).getMonth() + 1,
|
|
1846
|
+
"text-info": t.severity === "info" && o.monthIndex + 1 === (/* @__PURE__ */ new Date()).getMonth() + 1
|
|
1847
|
+
}
|
|
1848
|
+
]
|
|
1849
|
+
})
|
|
1772
1850
|
}));
|
|
1773
|
-
return (
|
|
1774
|
-
const
|
|
1775
|
-
return s(), p(
|
|
1776
|
-
m("span",
|
|
1777
|
-
|
|
1851
|
+
return (o, i) => {
|
|
1852
|
+
const u = Se;
|
|
1853
|
+
return s(), p(D, null, [
|
|
1854
|
+
m("span", Ut, [
|
|
1855
|
+
k(o.$slots, "before")
|
|
1778
1856
|
]),
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1857
|
+
m("div", At, [
|
|
1858
|
+
y(u, S({ ...t, ...o.$attrs }, {
|
|
1859
|
+
pt: l.value,
|
|
1860
|
+
modelValue: n.value,
|
|
1861
|
+
"onUpdate:modelValue": i[0] || (i[0] = (b) => n.value = b)
|
|
1862
|
+
}), null, 16, ["pt", "modelValue"]),
|
|
1863
|
+
L(y(c(C), {
|
|
1864
|
+
"data-cy": "icon",
|
|
1865
|
+
icon: "bi:calendar4",
|
|
1866
|
+
class: "position-absolute end-0 top-50 bottom-50 my-auto me-2 text-muted"
|
|
1867
|
+
}, null, 512), [
|
|
1868
|
+
[Y, t.showIcon]
|
|
1869
|
+
]),
|
|
1870
|
+
L(y(c(C), {
|
|
1871
|
+
"data-cy": "icon",
|
|
1872
|
+
icon: "bi:x",
|
|
1873
|
+
onClick: a,
|
|
1874
|
+
class: B(["position-absolute end-0 top-50 bottom-50 my-auto text-muted cursor-pointer", t.showIcon ? "datepicker-close-icon" : "me-2"])
|
|
1875
|
+
}, null, 8, ["class"]), [
|
|
1876
|
+
[Y, t.modelValue]
|
|
1877
|
+
])
|
|
1788
1878
|
]),
|
|
1789
1879
|
m("span", Nt, [
|
|
1790
|
-
|
|
1880
|
+
k(o.$slots, "after")
|
|
1791
1881
|
])
|
|
1792
1882
|
], 64);
|
|
1793
1883
|
};
|
|
@@ -1799,10 +1889,10 @@ const yt = { key: 0 }, vt = {
|
|
|
1799
1889
|
currentCount: {}
|
|
1800
1890
|
},
|
|
1801
1891
|
setup(e) {
|
|
1802
|
-
const t = e,
|
|
1892
|
+
const t = e, n = x(() => t.maxCount - t.currentCount);
|
|
1803
1893
|
return (a, l) => (s(), p("div", {
|
|
1804
|
-
class:
|
|
1805
|
-
}, "Remaining characters: " + g(
|
|
1894
|
+
class: B(n.value < 0 ? "text-danger" : "")
|
|
1895
|
+
}, "Remaining characters: " + g(n.value), 3));
|
|
1806
1896
|
}
|
|
1807
1897
|
}), Rt = /* @__PURE__ */ m("hr", null, null, -1), Lt = { class: "d-flex justify-content-between" }, vl = /* @__PURE__ */ $({
|
|
1808
1898
|
__name: "ForgeForm",
|
|
@@ -1816,32 +1906,32 @@ const yt = { key: 0 }, vt = {
|
|
|
1816
1906
|
hideCancel: { type: Boolean, default: !1 }
|
|
1817
1907
|
},
|
|
1818
1908
|
setup(e) {
|
|
1819
|
-
const t = e,
|
|
1909
|
+
const t = e, n = T(!1), a = T({
|
|
1820
1910
|
hasError: !1,
|
|
1821
1911
|
message: ""
|
|
1822
1912
|
});
|
|
1823
1913
|
async function l() {
|
|
1824
|
-
|
|
1914
|
+
n.value = !0, a.value.hasError = !1;
|
|
1825
1915
|
try {
|
|
1826
1916
|
await t.onSubmit();
|
|
1827
|
-
} catch (
|
|
1828
|
-
a.value.hasError = !0,
|
|
1917
|
+
} catch (o) {
|
|
1918
|
+
a.value.hasError = !0, o.message && (a.value.message = o.message);
|
|
1829
1919
|
}
|
|
1830
|
-
|
|
1920
|
+
n.value = !1;
|
|
1831
1921
|
}
|
|
1832
|
-
return (
|
|
1922
|
+
return (o, i) => {
|
|
1833
1923
|
const u = E;
|
|
1834
|
-
return s(), p("form", S(
|
|
1924
|
+
return s(), p("form", S(o.$attrs, {
|
|
1835
1925
|
novalidate: "",
|
|
1836
1926
|
class: "position-relative shadow-sm border p-4 bg-white",
|
|
1837
|
-
onSubmit:
|
|
1927
|
+
onSubmit: G(l, ["prevent"])
|
|
1838
1928
|
}), [
|
|
1839
|
-
|
|
1840
|
-
|
|
1929
|
+
o.hideTitle ? F("", !0) : (s(), p(D, { key: 0 }, [
|
|
1930
|
+
k(o.$slots, "title", {}, () => [
|
|
1841
1931
|
m("h3", {
|
|
1842
|
-
class:
|
|
1932
|
+
class: B(o.titleClass),
|
|
1843
1933
|
"data-cy": "form-title"
|
|
1844
|
-
}, g(
|
|
1934
|
+
}, g(o.title), 3)
|
|
1845
1935
|
]),
|
|
1846
1936
|
Rt
|
|
1847
1937
|
], 64)),
|
|
@@ -1851,32 +1941,32 @@ const yt = { key: 0 }, vt = {
|
|
|
1851
1941
|
"data-cy": "error"
|
|
1852
1942
|
}, {
|
|
1853
1943
|
default: v(() => [
|
|
1854
|
-
|
|
1944
|
+
k(o.$slots, "error", {
|
|
1855
1945
|
error: a.value.message
|
|
1856
1946
|
}, () => [
|
|
1857
|
-
|
|
1947
|
+
P(g(a.value.message), 1)
|
|
1858
1948
|
])
|
|
1859
1949
|
]),
|
|
1860
1950
|
_: 3
|
|
1861
|
-
})) :
|
|
1862
|
-
|
|
1951
|
+
})) : F("", !0),
|
|
1952
|
+
k(o.$slots, "default"),
|
|
1863
1953
|
m("div", Lt, [
|
|
1864
|
-
|
|
1865
|
-
|
|
1954
|
+
k(o.$slots, "cancel", {}, () => [
|
|
1955
|
+
o.hideCancel ? F("", !0) : (s(), w(u, {
|
|
1866
1956
|
key: 0,
|
|
1867
1957
|
"data-cy": "cancel-btn",
|
|
1868
1958
|
type: "reset",
|
|
1869
1959
|
severity: "secondary",
|
|
1870
1960
|
outlined: "",
|
|
1871
|
-
onClick:
|
|
1961
|
+
onClick: i[0] || (i[0] = (b) => o.$emit("cancel"))
|
|
1872
1962
|
}, {
|
|
1873
1963
|
default: v(() => [
|
|
1874
|
-
|
|
1964
|
+
P(g(o.cancelText), 1)
|
|
1875
1965
|
]),
|
|
1876
1966
|
_: 1
|
|
1877
1967
|
}))
|
|
1878
1968
|
]),
|
|
1879
|
-
|
|
1969
|
+
k(o.$slots, "submit", { submit: l }, () => [
|
|
1880
1970
|
y(u, {
|
|
1881
1971
|
"data-cy": "submit-btn",
|
|
1882
1972
|
type: "submit",
|
|
@@ -1884,16 +1974,16 @@ const yt = { key: 0 }, vt = {
|
|
|
1884
1974
|
class: "ms-auto"
|
|
1885
1975
|
}, {
|
|
1886
1976
|
default: v(() => [
|
|
1887
|
-
|
|
1977
|
+
P(g(o.submitText), 1)
|
|
1888
1978
|
]),
|
|
1889
1979
|
_: 1
|
|
1890
1980
|
})
|
|
1891
1981
|
])
|
|
1892
1982
|
]),
|
|
1893
|
-
|
|
1983
|
+
n.value ? (s(), w(pe, {
|
|
1894
1984
|
key: 2,
|
|
1895
1985
|
"data-cy": "loading-spinner"
|
|
1896
|
-
})) :
|
|
1986
|
+
})) : F("", !0)
|
|
1897
1987
|
], 16);
|
|
1898
1988
|
};
|
|
1899
1989
|
}
|
|
@@ -1908,57 +1998,57 @@ const yt = { key: 0 }, vt = {
|
|
|
1908
1998
|
placeholder: { default: "" }
|
|
1909
1999
|
},
|
|
1910
2000
|
setup(e) {
|
|
1911
|
-
const t = e, { errors:
|
|
1912
|
-
return (
|
|
1913
|
-
const
|
|
2001
|
+
const t = e, { errors: n, value: a, errorMessage: l } = W(() => t.name, t.rules), o = x(() => n.value.length > 0);
|
|
2002
|
+
return (i, u) => {
|
|
2003
|
+
const b = Ve, d = Ce, f = ne;
|
|
1914
2004
|
return s(), p("div", jt, [
|
|
1915
2005
|
t.type !== "checkbox" ? (s(), p("label", {
|
|
1916
2006
|
key: 0,
|
|
1917
2007
|
for: t.name
|
|
1918
|
-
}, g(t.label), 9, Ht)) :
|
|
2008
|
+
}, g(t.label), 9, Ht)) : F("", !0),
|
|
1919
2009
|
t.type === "checkbox" ? (s(), w(me, S({
|
|
1920
2010
|
key: 1,
|
|
1921
2011
|
id: t.name,
|
|
1922
|
-
rules:
|
|
2012
|
+
rules: i.rules,
|
|
1923
2013
|
label: t.label
|
|
1924
|
-
},
|
|
2014
|
+
}, i.$attrs), null, 16, ["id", "rules", "label"])) : t.type === "number" ? (s(), w(c(ue), S({
|
|
1925
2015
|
key: 2,
|
|
1926
2016
|
id: t.name,
|
|
1927
2017
|
placeholder: t.placeholder,
|
|
1928
2018
|
modelValue: c(a),
|
|
1929
|
-
"onUpdate:modelValue": u[0] || (u[0] = (
|
|
1930
|
-
"input-class": { "is-invalid":
|
|
1931
|
-
class: { "is-invalid":
|
|
1932
|
-
},
|
|
2019
|
+
"onUpdate:modelValue": u[0] || (u[0] = (r) => H(a) ? a.value = r : null),
|
|
2020
|
+
"input-class": { "is-invalid": o.value },
|
|
2021
|
+
class: { "is-invalid": o.value }
|
|
2022
|
+
}, i.$attrs), null, 16, ["id", "placeholder", "modelValue", "input-class", "class"])) : t.type === "textarea" ? (s(), w(b, S({
|
|
1933
2023
|
key: 3,
|
|
1934
2024
|
id: t.name,
|
|
1935
2025
|
placeholder: t.placeholder,
|
|
1936
2026
|
modelValue: c(a),
|
|
1937
|
-
"onUpdate:modelValue": u[1] || (u[1] = (
|
|
1938
|
-
class: { "is-invalid":
|
|
1939
|
-
},
|
|
2027
|
+
"onUpdate:modelValue": u[1] || (u[1] = (r) => H(a) ? a.value = r : null),
|
|
2028
|
+
class: { "is-invalid": o.value }
|
|
2029
|
+
}, i.$attrs), null, 16, ["id", "placeholder", "modelValue", "class"])) : t.type === "mask" ? (s(), w(d, S({
|
|
1940
2030
|
key: 4,
|
|
1941
2031
|
id: t.name,
|
|
1942
2032
|
placeholder: t.placeholder,
|
|
1943
2033
|
modelValue: c(a),
|
|
1944
|
-
"onUpdate:modelValue": u[2] || (u[2] = (
|
|
2034
|
+
"onUpdate:modelValue": u[2] || (u[2] = (r) => H(a) ? a.value = r : null),
|
|
1945
2035
|
mask: t.mask,
|
|
1946
|
-
class: { "is-invalid":
|
|
1947
|
-
},
|
|
2036
|
+
class: { "is-invalid": o.value }
|
|
2037
|
+
}, i.$attrs), null, 16, ["id", "placeholder", "modelValue", "mask", "class"])) : t.type === "text" ? (s(), w(f, S({
|
|
1948
2038
|
key: 5,
|
|
1949
2039
|
id: t.name,
|
|
1950
2040
|
placeholder: t.placeholder,
|
|
1951
2041
|
modelValue: c(a),
|
|
1952
|
-
"onUpdate:modelValue": u[3] || (u[3] = (
|
|
1953
|
-
class: { "is-invalid":
|
|
1954
|
-
},
|
|
1955
|
-
t.type !== "checkbox" ?
|
|
2042
|
+
"onUpdate:modelValue": u[3] || (u[3] = (r) => H(a) ? a.value = r : null),
|
|
2043
|
+
class: { "is-invalid": o.value }
|
|
2044
|
+
}, i.$attrs), null, 16, ["id", "placeholder", "modelValue", "class"])) : F("", !0),
|
|
2045
|
+
t.type !== "checkbox" ? L((s(), p("small", {
|
|
1956
2046
|
key: 6,
|
|
1957
2047
|
"data-cy": "error",
|
|
1958
2048
|
class: "invalid-feedback"
|
|
1959
2049
|
}, g(c(l)), 513)), [
|
|
1960
|
-
[
|
|
1961
|
-
]) :
|
|
2050
|
+
[Y, o.value]
|
|
2051
|
+
]) : F("", !0)
|
|
1962
2052
|
]);
|
|
1963
2053
|
};
|
|
1964
2054
|
}
|
|
@@ -1990,9 +2080,9 @@ const yt = { key: 0 }, vt = {
|
|
|
1990
2080
|
unstyled: { type: Boolean }
|
|
1991
2081
|
},
|
|
1992
2082
|
setup(e) {
|
|
1993
|
-
const t = e, { errors:
|
|
2083
|
+
const t = e, { errors: n, value: a, errorMessage: l } = W(() => t.name, t.rules);
|
|
1994
2084
|
a.value = t.modelValue;
|
|
1995
|
-
const
|
|
2085
|
+
const o = x(() => n.value.length > 0), i = x(() => ({
|
|
1996
2086
|
inputtoken: "list-unstyled",
|
|
1997
2087
|
input: "border-0",
|
|
1998
2088
|
container: ({ props: u }) => ({
|
|
@@ -2000,7 +2090,7 @@ const yt = { key: 0 }, vt = {
|
|
|
2000
2090
|
"form-control mb-0 d-flex",
|
|
2001
2091
|
{
|
|
2002
2092
|
disabled: u.disabled,
|
|
2003
|
-
"is-invalid":
|
|
2093
|
+
"is-invalid": o.value
|
|
2004
2094
|
}
|
|
2005
2095
|
]
|
|
2006
2096
|
}),
|
|
@@ -2023,35 +2113,35 @@ const yt = { key: 0 }, vt = {
|
|
|
2023
2113
|
]
|
|
2024
2114
|
}
|
|
2025
2115
|
}));
|
|
2026
|
-
return (u,
|
|
2027
|
-
const d =
|
|
2028
|
-
return s(), p(
|
|
2116
|
+
return (u, b) => {
|
|
2117
|
+
const d = Te;
|
|
2118
|
+
return s(), p(D, null, [
|
|
2029
2119
|
y(d, S({ ...t, ...u.$attrs }, {
|
|
2030
|
-
pt:
|
|
2120
|
+
pt: i.value,
|
|
2031
2121
|
"model-value": c(a),
|
|
2032
|
-
"onUpdate:modelValue":
|
|
2122
|
+
"onUpdate:modelValue": b[0] || (b[0] = (f) => H(a) ? a.value = f : null)
|
|
2033
2123
|
}), {
|
|
2034
|
-
removetokenicon: v(({ removeCallback:
|
|
2035
|
-
|
|
2124
|
+
removetokenicon: v(({ removeCallback: f }) => [
|
|
2125
|
+
L(y(c(C), {
|
|
2036
2126
|
icon: "bi:x",
|
|
2037
2127
|
class: "cursor-pointer",
|
|
2038
|
-
onClick:
|
|
2128
|
+
onClick: f
|
|
2039
2129
|
}, null, 8, ["onClick"]), [
|
|
2040
|
-
[
|
|
2130
|
+
[Y, !t.disabled]
|
|
2041
2131
|
])
|
|
2042
2132
|
]),
|
|
2043
2133
|
_: 1
|
|
2044
2134
|
}, 16, ["pt", "model-value"]),
|
|
2045
|
-
|
|
2135
|
+
L(m("small", {
|
|
2046
2136
|
"data-cy": "error",
|
|
2047
2137
|
class: "text-invalid"
|
|
2048
2138
|
}, g(c(l)), 513), [
|
|
2049
|
-
[
|
|
2139
|
+
[Y, o.value]
|
|
2050
2140
|
])
|
|
2051
2141
|
], 64);
|
|
2052
2142
|
};
|
|
2053
2143
|
}
|
|
2054
|
-
}),
|
|
2144
|
+
}), Yt = /* @__PURE__ */ $({
|
|
2055
2145
|
__name: "ForgeProgressBar",
|
|
2056
2146
|
props: {
|
|
2057
2147
|
severity: { default: "primary" },
|
|
@@ -2066,7 +2156,7 @@ const yt = { key: 0 }, vt = {
|
|
|
2066
2156
|
unstyled: { type: Boolean }
|
|
2067
2157
|
},
|
|
2068
2158
|
setup(e) {
|
|
2069
|
-
const t = e,
|
|
2159
|
+
const t = e, n = x(() => t.striped ? "progress-bar-striped" : null), a = x(() => t.animate ? "progress-bar-animated" : null), l = x(() => {
|
|
2070
2160
|
switch (t.severity) {
|
|
2071
2161
|
case "brand":
|
|
2072
2162
|
return "bg-brand";
|
|
@@ -2085,25 +2175,25 @@ const yt = { key: 0 }, vt = {
|
|
|
2085
2175
|
default:
|
|
2086
2176
|
return "bg-primary";
|
|
2087
2177
|
}
|
|
2088
|
-
}),
|
|
2178
|
+
}), o = x(() => ({
|
|
2089
2179
|
root: {
|
|
2090
2180
|
style: t.pixelWidth ? `width: ${t.pixelWidth}px` : ""
|
|
2091
2181
|
},
|
|
2092
2182
|
value: {
|
|
2093
|
-
class: [l.value,
|
|
2183
|
+
class: [l.value, n.value, a.value]
|
|
2094
2184
|
}
|
|
2095
2185
|
}));
|
|
2096
|
-
return (
|
|
2097
|
-
const
|
|
2098
|
-
return s(), w(
|
|
2186
|
+
return (i, u) => {
|
|
2187
|
+
const b = Me;
|
|
2188
|
+
return s(), w(b, S({ ...i.$attrs, ...t }, { pt: o.value }), {
|
|
2099
2189
|
default: v(() => [
|
|
2100
|
-
|
|
2190
|
+
k(i.$slots, "default")
|
|
2101
2191
|
]),
|
|
2102
2192
|
_: 3
|
|
2103
2193
|
}, 16, ["pt"]);
|
|
2104
2194
|
};
|
|
2105
2195
|
}
|
|
2106
|
-
}),
|
|
2196
|
+
}), qt = { class: "value text-white w-100 text-center" }, gl = /* @__PURE__ */ $({
|
|
2107
2197
|
__name: "ForgeStatWidget",
|
|
2108
2198
|
props: {
|
|
2109
2199
|
size: { default: "md" },
|
|
@@ -2111,18 +2201,18 @@ const yt = { key: 0 }, vt = {
|
|
|
2111
2201
|
},
|
|
2112
2202
|
setup(e) {
|
|
2113
2203
|
const t = e;
|
|
2114
|
-
return (
|
|
2204
|
+
return (n, a) => (s(), p("div", S(n.$attrs, {
|
|
2115
2205
|
class: `d-flex shadow m-2 align-items-center widget--${t.size} bg-${t.severity}`
|
|
2116
2206
|
}), [
|
|
2117
|
-
m("span",
|
|
2118
|
-
|
|
2207
|
+
m("span", qt, [
|
|
2208
|
+
k(n.$slots, "default")
|
|
2119
2209
|
])
|
|
2120
2210
|
], 16));
|
|
2121
2211
|
}
|
|
2122
|
-
}),
|
|
2212
|
+
}), Gt = {
|
|
2123
2213
|
class: "d-flex flex-column align-items-center",
|
|
2124
2214
|
"data-cy": "stepper"
|
|
2125
|
-
},
|
|
2215
|
+
}, Kt = { class: "d-flex align-items-center justify-content-center w-100" }, hl = /* @__PURE__ */ $({
|
|
2126
2216
|
__name: "ForgeStepper",
|
|
2127
2217
|
props: {
|
|
2128
2218
|
currentStep: { default: 0 },
|
|
@@ -2138,21 +2228,21 @@ const yt = { key: 0 }, vt = {
|
|
|
2138
2228
|
},
|
|
2139
2229
|
emits: ["update:currentStep"],
|
|
2140
2230
|
setup(e, { emit: t }) {
|
|
2141
|
-
const
|
|
2231
|
+
const n = t, a = e, l = T(a.currentStep), o = () => {
|
|
2142
2232
|
do
|
|
2143
2233
|
l.value--;
|
|
2144
2234
|
while (a.model[l.value].disabled);
|
|
2145
|
-
|
|
2146
|
-
},
|
|
2235
|
+
n("update:currentStep", l.value);
|
|
2236
|
+
}, i = () => {
|
|
2147
2237
|
if (l.value < a.model.length - 1)
|
|
2148
2238
|
do
|
|
2149
2239
|
l.value++;
|
|
2150
2240
|
while (a.model[l.value].disabled);
|
|
2151
|
-
|
|
2152
|
-
}, u =
|
|
2153
|
-
const d = a.model.findIndex((
|
|
2241
|
+
n("update:currentStep", l.value);
|
|
2242
|
+
}, u = x(() => {
|
|
2243
|
+
const d = a.model.findIndex((f) => !f.disabled);
|
|
2154
2244
|
return !(d < l.value && d > -1);
|
|
2155
|
-
}),
|
|
2245
|
+
}), b = x(() => ({
|
|
2156
2246
|
menuitem: (d) => ({
|
|
2157
2247
|
class: [{
|
|
2158
2248
|
"cursor-pointer": !d.context.disabled
|
|
@@ -2188,14 +2278,14 @@ const yt = { key: 0 }, vt = {
|
|
|
2188
2278
|
]
|
|
2189
2279
|
})
|
|
2190
2280
|
}));
|
|
2191
|
-
return (d,
|
|
2192
|
-
const
|
|
2193
|
-
return s(), p("div",
|
|
2194
|
-
m("div",
|
|
2195
|
-
y(
|
|
2281
|
+
return (d, f) => {
|
|
2282
|
+
const r = E, h = Ie, _ = Pe;
|
|
2283
|
+
return s(), p("div", Gt, [
|
|
2284
|
+
m("div", Kt, [
|
|
2285
|
+
y(r, {
|
|
2196
2286
|
severity: a.severity,
|
|
2197
2287
|
disabled: u.value,
|
|
2198
|
-
onClick:
|
|
2288
|
+
onClick: o,
|
|
2199
2289
|
class: "rounded-circle py-2 me-4",
|
|
2200
2290
|
"data-cy": "back-button"
|
|
2201
2291
|
}, {
|
|
@@ -2209,43 +2299,43 @@ const yt = { key: 0 }, vt = {
|
|
|
2209
2299
|
}, 8, ["severity", "disabled"]),
|
|
2210
2300
|
y(h, {
|
|
2211
2301
|
"active-step": l.value,
|
|
2212
|
-
"onUpdate:activeStep":
|
|
2302
|
+
"onUpdate:activeStep": f[0] || (f[0] = (V) => l.value = V),
|
|
2213
2303
|
model: a.model,
|
|
2214
|
-
pt:
|
|
2304
|
+
pt: b.value,
|
|
2215
2305
|
readonly: !1
|
|
2216
2306
|
}, null, 8, ["active-step", "model", "pt"])
|
|
2217
2307
|
]),
|
|
2218
|
-
y(
|
|
2219
|
-
(s(!0), p(
|
|
2220
|
-
key:
|
|
2308
|
+
y(_),
|
|
2309
|
+
(s(!0), p(D, null, j(a.model, (V, M) => (s(), p("div", {
|
|
2310
|
+
key: M,
|
|
2221
2311
|
class: "w-100"
|
|
2222
2312
|
}, [
|
|
2223
|
-
|
|
2313
|
+
M === l.value ? k(d.$slots, V.key ?? V.label, {
|
|
2224
2314
|
key: 0,
|
|
2225
|
-
nextStep:
|
|
2226
|
-
previousStep:
|
|
2315
|
+
nextStep: i,
|
|
2316
|
+
previousStep: o
|
|
2227
2317
|
}, () => [
|
|
2228
2318
|
y(ae, {
|
|
2229
2319
|
severity: "info",
|
|
2230
2320
|
"data-cy": "alert"
|
|
2231
2321
|
}, {
|
|
2232
2322
|
default: v(() => [
|
|
2233
|
-
|
|
2234
|
-
y(
|
|
2323
|
+
P(" Please add Slot Content for the key " + g(V.key ?? V.label) + " ", 1),
|
|
2324
|
+
y(r, {
|
|
2235
2325
|
severity: "primary",
|
|
2236
2326
|
label: "Next",
|
|
2237
|
-
onClick:
|
|
2327
|
+
onClick: i,
|
|
2238
2328
|
class: "ms-2"
|
|
2239
2329
|
})
|
|
2240
2330
|
]),
|
|
2241
2331
|
_: 2
|
|
2242
2332
|
}, 1024)
|
|
2243
|
-
]) :
|
|
2333
|
+
]) : F("", !0)
|
|
2244
2334
|
]))), 128))
|
|
2245
2335
|
]);
|
|
2246
2336
|
};
|
|
2247
2337
|
}
|
|
2248
|
-
}),
|
|
2338
|
+
}), Wt = { class: "p-4 text-wrap w-100" }, Zt = { class: "p-4 text-wrap w-100" }, wl = /* @__PURE__ */ $({
|
|
2249
2339
|
__name: "ForgeTile",
|
|
2250
2340
|
props: {
|
|
2251
2341
|
severity: { default: "primary" },
|
|
@@ -2253,32 +2343,32 @@ const yt = { key: 0 }, vt = {
|
|
|
2253
2343
|
clickable: { type: Boolean, default: !1 }
|
|
2254
2344
|
},
|
|
2255
2345
|
setup(e) {
|
|
2256
|
-
const t = e,
|
|
2257
|
-
return (l,
|
|
2258
|
-
const
|
|
2259
|
-
return t.clickable ? (s(), w(
|
|
2346
|
+
const t = e, n = x(() => `${t.severity === void 0 ? "tile-primary" : `tile-${t.severity}`} ${t.barPosition === "none" ? "border-0" : `tile-bar-${t.barPosition}`}`), a = x(() => `${t.severity === void 0 ? "tile-primary border-primary" : `tile-${t.severity} border-${t.severity}`} ${t.barPosition === "none" ? "" : `tile-bar-${t.barPosition}`}`);
|
|
2347
|
+
return (l, o) => {
|
|
2348
|
+
const i = E;
|
|
2349
|
+
return t.clickable ? (s(), w(i, {
|
|
2260
2350
|
key: 0,
|
|
2261
|
-
class:
|
|
2351
|
+
class: B(["d-flex w-100 p-0 text-body", n.value]),
|
|
2262
2352
|
severity: t.severity,
|
|
2263
2353
|
unstyled: "",
|
|
2264
2354
|
"data-cy": "button-tile"
|
|
2265
2355
|
}, {
|
|
2266
2356
|
default: v(() => [
|
|
2267
|
-
m("div",
|
|
2268
|
-
|
|
2269
|
-
|
|
2357
|
+
m("div", Wt, [
|
|
2358
|
+
k(l.$slots, "default", {}, () => [
|
|
2359
|
+
P("Tile Content")
|
|
2270
2360
|
])
|
|
2271
2361
|
])
|
|
2272
2362
|
]),
|
|
2273
2363
|
_: 3
|
|
2274
2364
|
}, 8, ["severity", "class"])) : (s(), p("div", {
|
|
2275
2365
|
key: 1,
|
|
2276
|
-
class:
|
|
2366
|
+
class: B(["d-flex w-100", a.value]),
|
|
2277
2367
|
"data-cy": "tile"
|
|
2278
2368
|
}, [
|
|
2279
|
-
m("div",
|
|
2280
|
-
|
|
2281
|
-
|
|
2369
|
+
m("div", Zt, [
|
|
2370
|
+
k(l.$slots, "default", {}, () => [
|
|
2371
|
+
P("Tile Content")
|
|
2282
2372
|
])
|
|
2283
2373
|
])
|
|
2284
2374
|
], 2));
|
|
@@ -2303,31 +2393,31 @@ const Jt = {
|
|
|
2303
2393
|
},
|
|
2304
2394
|
emits: ["update:perPage"],
|
|
2305
2395
|
setup(e, { emit: t }) {
|
|
2306
|
-
const
|
|
2307
|
-
|
|
2308
|
-
},
|
|
2309
|
-
const
|
|
2310
|
-
return `${
|
|
2396
|
+
const n = t, a = e, l = (i) => {
|
|
2397
|
+
n("update:perPage", i.value);
|
|
2398
|
+
}, o = x(() => {
|
|
2399
|
+
const i = Math.ceil(a.total / a.perPage);
|
|
2400
|
+
return `${i} ${X(i, "page")}`;
|
|
2311
2401
|
});
|
|
2312
|
-
return (
|
|
2313
|
-
|
|
2402
|
+
return (i, u) => (s(), p("div", Jt, [
|
|
2403
|
+
P(" Number of results per page "),
|
|
2314
2404
|
m("div", Xt, [
|
|
2315
2405
|
y(c(se), {
|
|
2316
2406
|
options: a.pageSizes,
|
|
2317
2407
|
"model-value": a.perPage,
|
|
2318
|
-
onChange: u[0] || (u[0] = (
|
|
2408
|
+
onChange: u[0] || (u[0] = (b) => l(b))
|
|
2319
2409
|
}, null, 8, ["options", "model-value"])
|
|
2320
2410
|
]),
|
|
2321
2411
|
a.total ? (s(), p("div", Qt, [
|
|
2322
2412
|
ea,
|
|
2323
|
-
m("span", ta, g(a.total) + " " + g(c(X)(a.total, "result")) + " across " + g(
|
|
2324
|
-
])) :
|
|
2413
|
+
m("span", ta, g(a.total) + " " + g(c(X)(a.total, "result")) + " across " + g(o.value), 1)
|
|
2414
|
+
])) : F("", !0)
|
|
2325
2415
|
]));
|
|
2326
2416
|
}
|
|
2327
2417
|
}), la = { "data-cy": "above-table-slot" }, oa = { class: "d-flex" }, na = { class: "d-flex align-items-end mb-2" }, sa = { key: 0 }, ia = { class: "ms-auto" }, ra = {
|
|
2328
2418
|
class: "d-flex",
|
|
2329
2419
|
"data-cy": "legacy-page-size"
|
|
2330
|
-
}, da = /* @__PURE__ */ m("span", { class: "me-2 my-auto text-nowrap" }, "Page Size:", -1), ua = { "data-cy": "legacy-total" },
|
|
2420
|
+
}, da = /* @__PURE__ */ m("span", { class: "me-2 my-auto text-nowrap" }, "Page Size:", -1), ua = { "data-cy": "legacy-total" }, xl = /* @__PURE__ */ $({
|
|
2331
2421
|
__name: "ForgeTable",
|
|
2332
2422
|
props: {
|
|
2333
2423
|
value: {},
|
|
@@ -2406,48 +2496,48 @@ const Jt = {
|
|
|
2406
2496
|
},
|
|
2407
2497
|
emits: ["update:filters"],
|
|
2408
2498
|
setup(e, { emit: t }) {
|
|
2409
|
-
const
|
|
2410
|
-
for (const
|
|
2411
|
-
a.filters[
|
|
2412
|
-
|
|
2413
|
-
},
|
|
2414
|
-
|
|
2415
|
-
}, d =
|
|
2416
|
-
const
|
|
2417
|
-
return `${
|
|
2418
|
-
}),
|
|
2419
|
-
|
|
2499
|
+
const n = t, a = e, l = T([10, 20, 50, 100]), o = T(20), i = T(), u = () => {
|
|
2500
|
+
for (const r in a.filters)
|
|
2501
|
+
a.filters[r].value = null;
|
|
2502
|
+
b(a.filters);
|
|
2503
|
+
}, b = (r) => {
|
|
2504
|
+
n("update:filters", r);
|
|
2505
|
+
}, d = x(() => {
|
|
2506
|
+
const r = Math.ceil((a.total ?? a.value.length) / o.value);
|
|
2507
|
+
return `${r} ${X(r, "page")}`;
|
|
2508
|
+
}), f = () => {
|
|
2509
|
+
i.value.exportCSV();
|
|
2420
2510
|
};
|
|
2421
|
-
return (
|
|
2511
|
+
return (r, h) => (s(), p(D, null, [
|
|
2422
2512
|
m("span", la, [
|
|
2423
|
-
|
|
2513
|
+
k(r.$slots, "above-table")
|
|
2424
2514
|
]),
|
|
2425
|
-
y(c(
|
|
2426
|
-
rows:
|
|
2427
|
-
"total-records":
|
|
2515
|
+
y(c(ze), S({ class: "w-100" }, { ...a, ...r.$attrs }, {
|
|
2516
|
+
rows: o.value,
|
|
2517
|
+
"total-records": r.total,
|
|
2428
2518
|
"filter-display": a.filters ? "row" : void 0,
|
|
2429
2519
|
ref_key: "forgeTable",
|
|
2430
|
-
ref:
|
|
2431
|
-
"onUpdate:filters":
|
|
2520
|
+
ref: i,
|
|
2521
|
+
"onUpdate:filters": b,
|
|
2432
2522
|
"data-cy": "table"
|
|
2433
2523
|
}), te({
|
|
2434
2524
|
header: v(() => [
|
|
2435
2525
|
m("div", oa, [
|
|
2436
2526
|
m("div", na, [
|
|
2437
|
-
|
|
2527
|
+
r.paginator && !r.legacyPaginationFooter ? (s(), p("span", sa, [
|
|
2438
2528
|
y(aa, {
|
|
2439
|
-
total:
|
|
2529
|
+
total: r.total ?? r.value.length,
|
|
2440
2530
|
"page-sizes": l.value,
|
|
2441
|
-
"per-page":
|
|
2442
|
-
"onUpdate:perPage": h[0] || (h[0] = (
|
|
2531
|
+
"per-page": o.value,
|
|
2532
|
+
"onUpdate:perPage": h[0] || (h[0] = (_) => o.value = _)
|
|
2443
2533
|
}, null, 8, ["total", "page-sizes", "per-page"])
|
|
2444
|
-
])) :
|
|
2534
|
+
])) : F("", !0)
|
|
2445
2535
|
]),
|
|
2446
2536
|
m("div", ia, [
|
|
2447
|
-
|
|
2537
|
+
r.showClearButton ? (s(), w(c(E), {
|
|
2448
2538
|
key: 0,
|
|
2449
2539
|
outlined: "",
|
|
2450
|
-
class:
|
|
2540
|
+
class: B(r.showExporterButton ? "me-2" : ""),
|
|
2451
2541
|
onClick: u,
|
|
2452
2542
|
"data-cy": "clear-all"
|
|
2453
2543
|
}, {
|
|
@@ -2457,14 +2547,14 @@ const Jt = {
|
|
|
2457
2547
|
width: "24",
|
|
2458
2548
|
height: "24"
|
|
2459
2549
|
}),
|
|
2460
|
-
|
|
2550
|
+
P(" Clear ")
|
|
2461
2551
|
]),
|
|
2462
2552
|
_: 1
|
|
2463
|
-
}, 8, ["class"])) :
|
|
2464
|
-
|
|
2553
|
+
}, 8, ["class"])) : F("", !0),
|
|
2554
|
+
r.showExporterButton ? (s(), w(c(E), {
|
|
2465
2555
|
key: 1,
|
|
2466
2556
|
outlined: "",
|
|
2467
|
-
onClick:
|
|
2557
|
+
onClick: f,
|
|
2468
2558
|
"data-cy": "exporter"
|
|
2469
2559
|
}, {
|
|
2470
2560
|
default: v(() => [
|
|
@@ -2473,57 +2563,57 @@ const Jt = {
|
|
|
2473
2563
|
width: "24",
|
|
2474
2564
|
height: "24"
|
|
2475
2565
|
}),
|
|
2476
|
-
|
|
2566
|
+
P(" Export ")
|
|
2477
2567
|
]),
|
|
2478
2568
|
_: 1
|
|
2479
|
-
})) :
|
|
2569
|
+
})) : F("", !0)
|
|
2480
2570
|
])
|
|
2481
2571
|
])
|
|
2482
2572
|
]),
|
|
2483
2573
|
default: v(() => [
|
|
2484
|
-
|
|
2574
|
+
k(r.$slots, "default")
|
|
2485
2575
|
]),
|
|
2486
2576
|
_: 2
|
|
2487
2577
|
}, [
|
|
2488
|
-
|
|
2489
|
-
name:
|
|
2490
|
-
fn: v((
|
|
2491
|
-
|
|
2578
|
+
j(r.$slots, (_, V) => ({
|
|
2579
|
+
name: V,
|
|
2580
|
+
fn: v((M) => [
|
|
2581
|
+
k(r.$slots, V, Q(ee(M || {})))
|
|
2492
2582
|
])
|
|
2493
2583
|
})),
|
|
2494
|
-
|
|
2584
|
+
r.legacyPaginationFooter ? {
|
|
2495
2585
|
name: "paginatorstart",
|
|
2496
2586
|
fn: v(() => [
|
|
2497
2587
|
m("span", ra, [
|
|
2498
2588
|
da,
|
|
2499
2589
|
y(c(se), {
|
|
2500
2590
|
options: l.value,
|
|
2501
|
-
modelValue:
|
|
2502
|
-
"onUpdate:modelValue": h[1] || (h[1] = (
|
|
2591
|
+
modelValue: o.value,
|
|
2592
|
+
"onUpdate:modelValue": h[1] || (h[1] = (_) => o.value = _),
|
|
2503
2593
|
class: "ms-2"
|
|
2504
2594
|
}, null, 8, ["options", "modelValue"])
|
|
2505
2595
|
])
|
|
2506
2596
|
]),
|
|
2507
2597
|
key: "0"
|
|
2508
2598
|
} : void 0,
|
|
2509
|
-
|
|
2599
|
+
r.legacyPaginationFooter ? {
|
|
2510
2600
|
name: "paginatorend",
|
|
2511
2601
|
fn: v(() => [
|
|
2512
|
-
m("span", ua, g(
|
|
2602
|
+
m("span", ua, g(r.total ?? r.value.length) + " " + g(c(X)(r.total ?? r.value.length, "result")) + " across " + g(d.value), 1)
|
|
2513
2603
|
]),
|
|
2514
2604
|
key: "1"
|
|
2515
2605
|
} : void 0
|
|
2516
2606
|
]), 1040, ["rows", "total-records", "filter-display"])
|
|
2517
2607
|
], 64));
|
|
2518
2608
|
}
|
|
2519
|
-
}),
|
|
2609
|
+
}), kl = /* @__PURE__ */ $({
|
|
2520
2610
|
__name: "ForgeFilterHeader",
|
|
2521
2611
|
props: {
|
|
2522
2612
|
dataType: {},
|
|
2523
2613
|
dropdownOptions: {}
|
|
2524
2614
|
},
|
|
2525
2615
|
setup(e) {
|
|
2526
|
-
return (t,
|
|
2616
|
+
return (t, n) => {
|
|
2527
2617
|
const a = ue;
|
|
2528
2618
|
return t.dataType === "numeric" ? (s(), w(a, S({ key: 0 }, t.$attrs, { class: "w-100" }), null, 16)) : t.dataType === "date" ? (s(), w(Et, S({ key: 1 }, t.$attrs, {
|
|
2529
2619
|
"show-icon": !1,
|
|
@@ -2532,7 +2622,7 @@ const Jt = {
|
|
|
2532
2622
|
}), null, 16)) : t.dataType === "select" ? (s(), w(c(se), S({ key: 2 }, t.$attrs, {
|
|
2533
2623
|
options: t.dropdownOptions,
|
|
2534
2624
|
class: "dropdown-input w-100"
|
|
2535
|
-
}), null, 16, ["options"])) : t.dataType === "multiselect" ? (s(), w(c(
|
|
2625
|
+
}), null, 16, ["options"])) : t.dataType === "multiselect" ? (s(), w(c(Oe), S({ key: 3 }, t.$attrs, {
|
|
2536
2626
|
options: t.dropdownOptions,
|
|
2537
2627
|
showToggleAll: !1,
|
|
2538
2628
|
placeholder: " ",
|
|
@@ -2542,40 +2632,40 @@ const Jt = {
|
|
|
2542
2632
|
};
|
|
2543
2633
|
}
|
|
2544
2634
|
});
|
|
2545
|
-
function ye(e, t,
|
|
2546
|
-
const l = t.flatMap((
|
|
2547
|
-
return t = t.map((
|
|
2548
|
-
const
|
|
2635
|
+
function ye(e, t, n, a) {
|
|
2636
|
+
const l = t.flatMap((o) => o.file);
|
|
2637
|
+
return t = t.map((o) => ({ ...o, status: o.status == "Duplicate" ? "Not Uploaded" : o.status })), e.forEach((o) => {
|
|
2638
|
+
const i = l.findIndex((b) => b.name === o.name);
|
|
2549
2639
|
let u = "Not Uploaded";
|
|
2550
|
-
|
|
2551
|
-
file:
|
|
2640
|
+
i === -1 ? ((!n.includes(o.type) || !(o.size <= a)) && (u = n.includes(o.type) ? "InvalidFileSize" : "InvalidFileType"), t.unshift({
|
|
2641
|
+
file: o,
|
|
2552
2642
|
status: u,
|
|
2553
2643
|
blobFileName: null
|
|
2554
|
-
})) : t[
|
|
2644
|
+
})) : t[i].status = "Duplicate";
|
|
2555
2645
|
}), t;
|
|
2556
2646
|
}
|
|
2557
2647
|
async function ca(e, t) {
|
|
2558
2648
|
if (e === "Uploaded" && t !== null)
|
|
2559
2649
|
try {
|
|
2560
2650
|
await new ce(t).delete();
|
|
2561
|
-
} catch (
|
|
2562
|
-
if (
|
|
2651
|
+
} catch (n) {
|
|
2652
|
+
if (n !== "BlobNotFound") {
|
|
2563
2653
|
e = "DeleteFileFailed";
|
|
2564
2654
|
return;
|
|
2565
2655
|
}
|
|
2566
2656
|
}
|
|
2567
2657
|
}
|
|
2568
|
-
function ie(e, t = !0,
|
|
2658
|
+
function ie(e, t = !0, n = 1) {
|
|
2569
2659
|
const a = t ? 1e3 : 1024;
|
|
2570
2660
|
if (Math.abs(e) < a)
|
|
2571
2661
|
return e + " B";
|
|
2572
2662
|
const l = t ? ["kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"] : ["KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"];
|
|
2573
|
-
let
|
|
2574
|
-
const
|
|
2663
|
+
let o = -1;
|
|
2664
|
+
const i = 10 ** n;
|
|
2575
2665
|
do
|
|
2576
|
-
e /= a, ++
|
|
2577
|
-
while (Math.round(Math.abs(e) *
|
|
2578
|
-
return e.toFixed(
|
|
2666
|
+
e /= a, ++o;
|
|
2667
|
+
while (Math.round(Math.abs(e) * i) / i >= a && o < l.length - 1);
|
|
2668
|
+
return e.toFixed(n) + " " + l[o];
|
|
2579
2669
|
}
|
|
2580
2670
|
function ma(e) {
|
|
2581
2671
|
return ["image/gif", "image/png", "image/jpeg", "image/svg"].includes(e);
|
|
@@ -2585,7 +2675,7 @@ function pa(e) {
|
|
|
2585
2675
|
}
|
|
2586
2676
|
const ya = { class: "d-flex justify-content-between" }, va = ["accept", "disabled", "multiple"], ba = /* @__PURE__ */ $({
|
|
2587
2677
|
__name: "UploadButton",
|
|
2588
|
-
props: /* @__PURE__ */
|
|
2678
|
+
props: /* @__PURE__ */ q({
|
|
2589
2679
|
acceptedFileTypes: {},
|
|
2590
2680
|
maxFileInput: {},
|
|
2591
2681
|
showDragDropArea: { type: Boolean }
|
|
@@ -2595,34 +2685,34 @@ const ya = { class: "d-flex justify-content-between" }, va = ["accept", "disable
|
|
|
2595
2685
|
}),
|
|
2596
2686
|
emits: ["update:modelValue"],
|
|
2597
2687
|
setup(e) {
|
|
2598
|
-
const t =
|
|
2688
|
+
const t = R(e, "modelValue"), n = x(() => e.maxFileInput <= t.value.length), a = (l) => {
|
|
2599
2689
|
t.value = ye(l, t.value, e.acceptedFileTypes, e.maxFileInput);
|
|
2600
2690
|
};
|
|
2601
|
-
return (l,
|
|
2602
|
-
|
|
2691
|
+
return (l, o) => (s(), p("div", ya, [
|
|
2692
|
+
k(l.$slots, "message"),
|
|
2603
2693
|
m("div", null, [
|
|
2604
2694
|
m("input", {
|
|
2605
2695
|
id: "file-input",
|
|
2606
2696
|
type: "file",
|
|
2607
2697
|
class: "d-none",
|
|
2608
2698
|
accept: l.acceptedFileTypes.join(", "),
|
|
2609
|
-
disabled:
|
|
2699
|
+
disabled: n.value,
|
|
2610
2700
|
multiple: l.maxFileInput > 1,
|
|
2611
|
-
onInput:
|
|
2701
|
+
onInput: o[0] || (o[0] = (i) => a([...i.target.files]))
|
|
2612
2702
|
}, null, 40, va),
|
|
2613
2703
|
m("label", {
|
|
2614
|
-
class:
|
|
2704
|
+
class: B([{ disabled: n.value }, "btn btn-primary"]),
|
|
2615
2705
|
id: "file-input-button",
|
|
2616
2706
|
for: "file-input"
|
|
2617
2707
|
}, [
|
|
2618
|
-
|
|
2708
|
+
k(l.$slots, "button-content", {}, () => [
|
|
2619
2709
|
y(c(C), {
|
|
2620
2710
|
icon: "bi:upload",
|
|
2621
2711
|
class: "me-2",
|
|
2622
2712
|
height: "20px",
|
|
2623
2713
|
width: "20px"
|
|
2624
2714
|
}),
|
|
2625
|
-
|
|
2715
|
+
P(" Browse your computer ")
|
|
2626
2716
|
])
|
|
2627
2717
|
], 2)
|
|
2628
2718
|
]),
|
|
@@ -2630,7 +2720,7 @@ const ya = { class: "d-flex justify-content-between" }, va = ["accept", "disable
|
|
|
2630
2720
|
class: "ms-auto",
|
|
2631
2721
|
key: l.acceptedFileTypes.length,
|
|
2632
2722
|
id: "accepted-file-types"
|
|
2633
|
-
}, "Accepted File Types: " + g(l.acceptedFileTypes.map((
|
|
2723
|
+
}, "Accepted File Types: " + g(l.acceptedFileTypes.map((i) => i.split("/").pop()).join(", ")), 1)) : F("", !0)
|
|
2634
2724
|
]));
|
|
2635
2725
|
}
|
|
2636
2726
|
}), fa = {
|
|
@@ -2642,7 +2732,7 @@ const ya = { class: "d-flex justify-content-between" }, va = ["accept", "disable
|
|
|
2642
2732
|
class: "d-flex flex-column"
|
|
2643
2733
|
}, ha = /* @__PURE__ */ $({
|
|
2644
2734
|
__name: "DragDropArea",
|
|
2645
|
-
props: /* @__PURE__ */
|
|
2735
|
+
props: /* @__PURE__ */ q({
|
|
2646
2736
|
maxFileInput: {},
|
|
2647
2737
|
maxFileSize: {},
|
|
2648
2738
|
acceptedFileTypes: {}
|
|
@@ -2652,15 +2742,15 @@ const ya = { class: "d-flex justify-content-between" }, va = ["accept", "disable
|
|
|
2652
2742
|
}),
|
|
2653
2743
|
emits: ["update:modelValue"],
|
|
2654
2744
|
setup(e) {
|
|
2655
|
-
const t =
|
|
2656
|
-
|
|
2745
|
+
const t = R(e, "modelValue"), n = T(!1), a = x(() => e.maxFileInput <= t.value.length), l = (o) => {
|
|
2746
|
+
n.value = !1, o.dataTransfer.files.length > e.maxFileInput || a.value ? o.preventDefault() : t.value = ye([...o.dataTransfer.files], t.value, e.acceptedFileTypes, e.maxFileSize);
|
|
2657
2747
|
};
|
|
2658
|
-
return (
|
|
2748
|
+
return (o, i) => (s(), p("div", {
|
|
2659
2749
|
id: "drag-drop-area",
|
|
2660
|
-
class:
|
|
2661
|
-
onDragleave:
|
|
2662
|
-
onDragover:
|
|
2663
|
-
onDrop:
|
|
2750
|
+
class: B(`${n.value ? "border-2 border-primary bg-body-tertiary" : ""} mt-3 file-container border-dashed border-2`),
|
|
2751
|
+
onDragleave: i[0] || (i[0] = G((u) => n.value = !1, ["prevent"])),
|
|
2752
|
+
onDragover: i[1] || (i[1] = G((u) => n.value = !0, ["prevent"])),
|
|
2753
|
+
onDrop: G(l, ["prevent"])
|
|
2664
2754
|
}, [
|
|
2665
2755
|
t.value.length === 0 ? (s(), p("div", fa, [
|
|
2666
2756
|
y(c(C), {
|
|
@@ -2669,13 +2759,13 @@ const ya = { class: "d-flex justify-content-between" }, va = ["accept", "disable
|
|
|
2669
2759
|
height: "20px",
|
|
2670
2760
|
width: "20px"
|
|
2671
2761
|
}),
|
|
2672
|
-
|
|
2762
|
+
P(" Drag and drop files here ")
|
|
2673
2763
|
])) : (s(), p("div", ga, [
|
|
2674
|
-
|
|
2764
|
+
k(o.$slots, "default")
|
|
2675
2765
|
]))
|
|
2676
2766
|
], 34));
|
|
2677
2767
|
}
|
|
2678
|
-
}), wa = { class: "d-flex align-items-center me-2" },
|
|
2768
|
+
}), wa = { class: "d-flex align-items-center me-2" }, xa = /* @__PURE__ */ $({
|
|
2679
2769
|
__name: "UploadStatus",
|
|
2680
2770
|
props: {
|
|
2681
2771
|
fileSize: {},
|
|
@@ -2684,7 +2774,7 @@ const ya = { class: "d-flex justify-content-between" }, va = ["accept", "disable
|
|
|
2684
2774
|
uploadStatus: {}
|
|
2685
2775
|
},
|
|
2686
2776
|
setup(e) {
|
|
2687
|
-
const t =
|
|
2777
|
+
const t = x(() => e.uploadStatus === "Failed" || e.uploadStatus === "InvalidFileType" || e.uploadStatus === "InvalidFileSize" ? "danger" : "warning"), n = x(() => {
|
|
2688
2778
|
switch (e.uploadStatus) {
|
|
2689
2779
|
case "InvalidFileType":
|
|
2690
2780
|
return "Upload Failed: File type is not accepted.";
|
|
@@ -2701,17 +2791,17 @@ const ya = { class: "d-flex justify-content-between" }, va = ["accept", "disable
|
|
|
2701
2791
|
}
|
|
2702
2792
|
});
|
|
2703
2793
|
return (a, l) => (s(), p("div", wa, [
|
|
2704
|
-
a.uploadStatus === "Uploading" ? (s(), w(
|
|
2794
|
+
a.uploadStatus === "Uploading" ? (s(), w(Yt, {
|
|
2705
2795
|
key: 0,
|
|
2706
2796
|
pixelWidth: 200,
|
|
2707
2797
|
animate: "",
|
|
2708
2798
|
striped: ""
|
|
2709
2799
|
}, {
|
|
2710
2800
|
default: v(() => [
|
|
2711
|
-
|
|
2801
|
+
P(g((a.bytesUploaded / a.fileSize * 100).toFixed(0)) + "%", 1)
|
|
2712
2802
|
]),
|
|
2713
2803
|
_: 1
|
|
2714
|
-
})) :
|
|
2804
|
+
})) : F("", !0),
|
|
2715
2805
|
a.uploadStatus !== "Uploading" && a.uploadStatus !== "Not Uploaded" && a.uploadStatus !== "Uploaded" && a.uploadStatus !== "Preparing" ? (s(), w(ae, {
|
|
2716
2806
|
key: 1,
|
|
2717
2807
|
id: "upload-status-alert",
|
|
@@ -2719,24 +2809,24 @@ const ya = { class: "d-flex justify-content-between" }, va = ["accept", "disable
|
|
|
2719
2809
|
class: "mb-0 w-75 ms-auto"
|
|
2720
2810
|
}, {
|
|
2721
2811
|
default: v(() => [
|
|
2722
|
-
|
|
2812
|
+
P(g(n.value), 1)
|
|
2723
2813
|
]),
|
|
2724
2814
|
_: 1
|
|
2725
|
-
}, 8, ["severity"])) :
|
|
2815
|
+
}, 8, ["severity"])) : F("", !0)
|
|
2726
2816
|
]));
|
|
2727
2817
|
}
|
|
2728
|
-
}),
|
|
2818
|
+
}), ka = ["data-cy"], _a = { class: "ms-3 d-flex flex-column" }, $a = {
|
|
2729
2819
|
key: 1,
|
|
2730
2820
|
id: "file-name"
|
|
2731
|
-
},
|
|
2821
|
+
}, Fa = {
|
|
2732
2822
|
class: "text-black-50",
|
|
2733
2823
|
id: "file-type"
|
|
2734
|
-
},
|
|
2824
|
+
}, Ba = {
|
|
2735
2825
|
class: "text-black-50",
|
|
2736
2826
|
id: "file-size"
|
|
2737
2827
|
}, Sa = { class: "ms-auto my-auto d-flex" }, Ca = /* @__PURE__ */ $({
|
|
2738
2828
|
__name: "FileInfo",
|
|
2739
|
-
props: /* @__PURE__ */
|
|
2829
|
+
props: /* @__PURE__ */ q({
|
|
2740
2830
|
editableFileName: { type: Boolean },
|
|
2741
2831
|
acceptedFileTypes: {},
|
|
2742
2832
|
maxFileSize: {},
|
|
@@ -2751,54 +2841,54 @@ const ya = { class: "d-flex justify-content-between" }, va = ["accept", "disable
|
|
|
2751
2841
|
uploadStatus: { required: !0 },
|
|
2752
2842
|
uploadStatusModifiers: {}
|
|
2753
2843
|
}),
|
|
2754
|
-
emits: /* @__PURE__ */
|
|
2844
|
+
emits: /* @__PURE__ */ q(["deleted"], ["update:file", "update:blobFileName", "update:uploadStatus"]),
|
|
2755
2845
|
setup(e, { emit: t }) {
|
|
2756
|
-
const
|
|
2757
|
-
|
|
2758
|
-
},
|
|
2759
|
-
if (!
|
|
2760
|
-
l.value =
|
|
2846
|
+
const n = R(e, "file"), a = R(e, "blobFileName"), l = R(e, "uploadStatus"), o = t, i = T(n.value.name), u = T(""), b = T(0), d = T(), f = x(() => e.acceptedFileTypes.includes(n.value.type)), r = x(() => n.value.size <= e.maxFileSize), h = () => {
|
|
2847
|
+
n.value = new File([n.value], i.value, { type: n.value.type, lastModified: (/* @__PURE__ */ new Date()).valueOf() });
|
|
2848
|
+
}, _ = async () => {
|
|
2849
|
+
if (!f.value || !r.value) {
|
|
2850
|
+
l.value = f.value ? "InvalidFileSize" : "InvalidFileType";
|
|
2761
2851
|
return;
|
|
2762
2852
|
}
|
|
2763
2853
|
l.value = "Preparing", d.value = new AbortController();
|
|
2764
|
-
const [
|
|
2765
|
-
if (!
|
|
2854
|
+
const [M, I] = await e.getFileUrlAction(n.value.name);
|
|
2855
|
+
if (!M) {
|
|
2766
2856
|
l.value = "Failed";
|
|
2767
2857
|
return;
|
|
2768
2858
|
}
|
|
2769
2859
|
try {
|
|
2770
2860
|
l.value = "Uploading";
|
|
2771
|
-
const
|
|
2861
|
+
const z = new ce(M), N = {
|
|
2772
2862
|
abortSignal: d.value.signal,
|
|
2773
|
-
onProgress: (le) =>
|
|
2863
|
+
onProgress: (le) => b.value = le.loadedBytes,
|
|
2774
2864
|
tags: { temp: "true" }
|
|
2775
2865
|
};
|
|
2776
|
-
await
|
|
2777
|
-
} catch (
|
|
2778
|
-
if (
|
|
2866
|
+
await z.uploadData(n.value, N), u.value = M, l.value = "Uploaded", a.value = I;
|
|
2867
|
+
} catch (z) {
|
|
2868
|
+
if (z.name === "AbortError") {
|
|
2779
2869
|
l.value = "Aborted";
|
|
2780
2870
|
return;
|
|
2781
2871
|
}
|
|
2782
2872
|
l.value = "Failed";
|
|
2783
2873
|
}
|
|
2784
|
-
},
|
|
2785
|
-
await ca(l.value, u.value),
|
|
2874
|
+
}, V = async () => {
|
|
2875
|
+
await ca(l.value, u.value), o("deleted", n.value);
|
|
2786
2876
|
};
|
|
2787
2877
|
return oe(() => {
|
|
2788
|
-
e.autoUploadToBlob &&
|
|
2789
|
-
}), (
|
|
2790
|
-
const
|
|
2878
|
+
e.autoUploadToBlob && _();
|
|
2879
|
+
}), (M, I) => {
|
|
2880
|
+
const z = E;
|
|
2791
2881
|
return s(), p("div", {
|
|
2792
2882
|
class: "py-4 px-3 d-flex",
|
|
2793
|
-
"data-cy": `file-info-${
|
|
2883
|
+
"data-cy": `file-info-${n.value.name}`
|
|
2794
2884
|
}, [
|
|
2795
2885
|
m("div", null, [
|
|
2796
|
-
c(ma)(
|
|
2886
|
+
c(ma)(n.value.type) ? (s(), w(c(De), {
|
|
2797
2887
|
key: 0,
|
|
2798
2888
|
id: "thumbnail-image",
|
|
2799
2889
|
"image-class": "image-file-thumbnail border",
|
|
2800
|
-
src: c(pa)(
|
|
2801
|
-
alt:
|
|
2890
|
+
src: c(pa)(n.value),
|
|
2891
|
+
alt: n.value.name,
|
|
2802
2892
|
width: "75px",
|
|
2803
2893
|
preview: ""
|
|
2804
2894
|
}, null, 8, ["src", "alt"])) : (s(), w(c(C), {
|
|
@@ -2809,33 +2899,33 @@ const ya = { class: "d-flex justify-content-between" }, va = ["accept", "disable
|
|
|
2809
2899
|
width: "75px"
|
|
2810
2900
|
}))
|
|
2811
2901
|
]),
|
|
2812
|
-
m("div",
|
|
2902
|
+
m("div", _a, [
|
|
2813
2903
|
m("div", null, [
|
|
2814
|
-
|
|
2904
|
+
M.editableFileName ? (s(), w(xt, {
|
|
2815
2905
|
key: 0,
|
|
2816
2906
|
id: "edit-file-name",
|
|
2817
|
-
modelValue:
|
|
2818
|
-
"onUpdate:modelValue":
|
|
2819
|
-
rules:
|
|
2820
|
-
name:
|
|
2907
|
+
modelValue: i.value,
|
|
2908
|
+
"onUpdate:modelValue": I[0] || (I[0] = (N) => i.value = N),
|
|
2909
|
+
rules: M.customFileNameRules,
|
|
2910
|
+
name: n.value.name,
|
|
2821
2911
|
"complete-action": h
|
|
2822
|
-
}, null, 8, ["modelValue", "rules", "name"])) : (s(), p("span", $a, g(
|
|
2912
|
+
}, null, 8, ["modelValue", "rules", "name"])) : (s(), p("span", $a, g(n.value.name), 1))
|
|
2823
2913
|
]),
|
|
2824
|
-
m("span",
|
|
2825
|
-
m("span",
|
|
2914
|
+
m("span", Fa, "File type: " + g(n.value.type.split("/").pop()), 1),
|
|
2915
|
+
m("span", Ba, "File size: " + g(c(ie)(n.value.size)), 1)
|
|
2826
2916
|
]),
|
|
2827
2917
|
m("div", Sa, [
|
|
2828
|
-
(s(), w(
|
|
2918
|
+
(s(), w(xa, {
|
|
2829
2919
|
key: l.value,
|
|
2830
|
-
"file-size":
|
|
2920
|
+
"file-size": n.value.size,
|
|
2831
2921
|
"upload-status": l.value,
|
|
2832
|
-
"bytes-uploaded":
|
|
2833
|
-
"max-file-size":
|
|
2922
|
+
"bytes-uploaded": b.value,
|
|
2923
|
+
"max-file-size": M.maxFileSize
|
|
2834
2924
|
}, null, 8, ["file-size", "upload-status", "bytes-uploaded", "max-file-size"])),
|
|
2835
|
-
l.value === "Not Uploaded" || l.value === "Failed" || l.value === "Duplicate" || l.value === "Aborted" ? (s(), w(
|
|
2925
|
+
l.value === "Not Uploaded" || l.value === "Failed" || l.value === "Duplicate" || l.value === "Aborted" ? (s(), w(z, {
|
|
2836
2926
|
key: 0,
|
|
2837
2927
|
link: "",
|
|
2838
|
-
onClick:
|
|
2928
|
+
onClick: _
|
|
2839
2929
|
}, {
|
|
2840
2930
|
default: v(() => [
|
|
2841
2931
|
y(c(C), {
|
|
@@ -2843,20 +2933,20 @@ const ya = { class: "d-flex justify-content-between" }, va = ["accept", "disable
|
|
|
2843
2933
|
}, null, 8, ["icon"])
|
|
2844
2934
|
]),
|
|
2845
2935
|
_: 1
|
|
2846
|
-
})) :
|
|
2847
|
-
l.value === "Uploading" ? (s(), w(
|
|
2936
|
+
})) : F("", !0),
|
|
2937
|
+
l.value === "Uploading" ? (s(), w(z, {
|
|
2848
2938
|
key: 1,
|
|
2849
2939
|
link: "",
|
|
2850
|
-
onClick:
|
|
2940
|
+
onClick: I[1] || (I[1] = (N) => d.value.value.abort())
|
|
2851
2941
|
}, {
|
|
2852
2942
|
default: v(() => [
|
|
2853
2943
|
y(c(C), { icon: "bi:x-circle-fill" })
|
|
2854
2944
|
]),
|
|
2855
2945
|
_: 1
|
|
2856
|
-
})) : (s(), w(
|
|
2946
|
+
})) : (s(), w(z, {
|
|
2857
2947
|
key: 2,
|
|
2858
2948
|
link: "",
|
|
2859
|
-
onClick:
|
|
2949
|
+
onClick: V,
|
|
2860
2950
|
id: "delete-button"
|
|
2861
2951
|
}, {
|
|
2862
2952
|
default: v(() => [
|
|
@@ -2865,22 +2955,22 @@ const ya = { class: "d-flex justify-content-between" }, va = ["accept", "disable
|
|
|
2865
2955
|
_: 1
|
|
2866
2956
|
}))
|
|
2867
2957
|
])
|
|
2868
|
-
], 8,
|
|
2958
|
+
], 8, ka);
|
|
2869
2959
|
};
|
|
2870
2960
|
}
|
|
2871
|
-
}),
|
|
2961
|
+
}), Va = { class: "d-flex justify-content-end mt-1" }, Ta = { id: "max-file-size" }, Ma = /* @__PURE__ */ $({
|
|
2872
2962
|
__name: "MaxFileSize",
|
|
2873
2963
|
props: {
|
|
2874
2964
|
maxFileSize: {}
|
|
2875
2965
|
},
|
|
2876
2966
|
setup(e) {
|
|
2877
|
-
return (t,
|
|
2878
|
-
m("div",
|
|
2967
|
+
return (t, n) => (s(), p("div", Va, [
|
|
2968
|
+
m("div", Ta, "Max file size: " + g(c(ie)(t.maxFileSize)), 1)
|
|
2879
2969
|
]));
|
|
2880
2970
|
}
|
|
2881
|
-
}),
|
|
2971
|
+
}), Pa = { "data-cy": "file-uploader" }, Ia = { key: 0 }, _l = /* @__PURE__ */ $({
|
|
2882
2972
|
__name: "ForgeFileUploader",
|
|
2883
|
-
props: /* @__PURE__ */
|
|
2973
|
+
props: /* @__PURE__ */ q({
|
|
2884
2974
|
acceptedFileTypes: {},
|
|
2885
2975
|
maxFileSize: {},
|
|
2886
2976
|
getFileUrlAction: {},
|
|
@@ -2895,43 +2985,43 @@ const ya = { class: "d-flex justify-content-between" }, va = ["accept", "disable
|
|
|
2895
2985
|
}),
|
|
2896
2986
|
emits: ["update:modelValue"],
|
|
2897
2987
|
setup(e) {
|
|
2898
|
-
const t =
|
|
2899
|
-
t.value = t.value.filter((
|
|
2988
|
+
const t = R(e, "modelValue"), n = e, a = (l) => {
|
|
2989
|
+
t.value = t.value.filter((o) => o.file != l);
|
|
2900
2990
|
};
|
|
2901
|
-
return (l,
|
|
2902
|
-
y(ba, S(
|
|
2991
|
+
return (l, o) => (s(), p("div", Pa, [
|
|
2992
|
+
y(ba, S(n, {
|
|
2903
2993
|
modelValue: t.value,
|
|
2904
|
-
"onUpdate:modelValue":
|
|
2994
|
+
"onUpdate:modelValue": o[0] || (o[0] = (i) => t.value = i)
|
|
2905
2995
|
}), null, 16, ["modelValue"]),
|
|
2906
|
-
l.showDragDropArea ? (s(), p("div",
|
|
2996
|
+
l.showDragDropArea ? (s(), p("div", Ia, [
|
|
2907
2997
|
y(ha, {
|
|
2908
|
-
"max-file-input":
|
|
2909
|
-
"max-file-size":
|
|
2910
|
-
"accepted-file-types":
|
|
2998
|
+
"max-file-input": n.maxFileInput,
|
|
2999
|
+
"max-file-size": n.maxFileSize,
|
|
3000
|
+
"accepted-file-types": n.acceptedFileTypes,
|
|
2911
3001
|
modelValue: t.value,
|
|
2912
|
-
"onUpdate:modelValue":
|
|
3002
|
+
"onUpdate:modelValue": o[1] || (o[1] = (i) => t.value = i)
|
|
2913
3003
|
}, {
|
|
2914
3004
|
default: v(() => [
|
|
2915
|
-
(s(!0), p(
|
|
3005
|
+
(s(!0), p(D, null, j(t.value, ({ file: i }, u) => (s(), p("span", null, [
|
|
2916
3006
|
(s(), w(Ca, S({
|
|
2917
|
-
key:
|
|
3007
|
+
key: i.name,
|
|
2918
3008
|
class: u === t.value.length - 1 || t.value.length == 1 ? "" : "border-bottom",
|
|
2919
3009
|
file: t.value[u].file,
|
|
2920
|
-
"onUpdate:file": (
|
|
3010
|
+
"onUpdate:file": (b) => t.value[u].file = b,
|
|
2921
3011
|
"blob-file-name": t.value[u].blobFileName,
|
|
2922
|
-
"onUpdate:blobFileName": (
|
|
3012
|
+
"onUpdate:blobFileName": (b) => t.value[u].blobFileName = b,
|
|
2923
3013
|
"upload-status": t.value[u].status,
|
|
2924
|
-
"onUpdate:uploadStatus": (
|
|
3014
|
+
"onUpdate:uploadStatus": (b) => t.value[u].status = b,
|
|
2925
3015
|
ref_for: !0
|
|
2926
|
-
},
|
|
3016
|
+
}, n, { onDeleted: a }), null, 16, ["class", "file", "onUpdate:file", "blob-file-name", "onUpdate:blobFileName", "upload-status", "onUpdate:uploadStatus"]))
|
|
2927
3017
|
]))), 256))
|
|
2928
3018
|
]),
|
|
2929
3019
|
_: 1
|
|
2930
3020
|
}, 8, ["max-file-input", "max-file-size", "accepted-file-types", "modelValue"]),
|
|
2931
|
-
y(
|
|
2932
|
-
"max-file-size":
|
|
3021
|
+
y(Ma, {
|
|
3022
|
+
"max-file-size": n.maxFileSize
|
|
2933
3023
|
}, null, 8, ["max-file-size"])
|
|
2934
|
-
])) :
|
|
3024
|
+
])) : F("", !0)
|
|
2935
3025
|
]));
|
|
2936
3026
|
}
|
|
2937
3027
|
});
|
|
@@ -2942,22 +3032,22 @@ export {
|
|
|
2942
3032
|
me as ForgeCheckbox,
|
|
2943
3033
|
fl as ForgeChips,
|
|
2944
3034
|
Et as ForgeDatepicker,
|
|
2945
|
-
|
|
2946
|
-
|
|
3035
|
+
_l as ForgeFileUploader,
|
|
3036
|
+
kl as ForgeFilterHeader,
|
|
2947
3037
|
vl as ForgeForm,
|
|
2948
3038
|
bl as ForgeFormField,
|
|
2949
|
-
|
|
3039
|
+
xt as ForgeInlineEditor,
|
|
2950
3040
|
dl as ForgeLink,
|
|
2951
3041
|
pe as ForgeLoader,
|
|
2952
3042
|
ul as ForgeModal,
|
|
2953
|
-
|
|
3043
|
+
Ct as ForgeMultiSelect,
|
|
2954
3044
|
ml as ForgeMultiSelectPreview,
|
|
2955
3045
|
cl as ForgeNavbar,
|
|
2956
3046
|
pl as ForgePageHeader,
|
|
2957
|
-
|
|
3047
|
+
Yt as ForgeProgressBar,
|
|
2958
3048
|
yl as ForgeRemainingCharacters,
|
|
2959
3049
|
gl as ForgeStatWidget,
|
|
2960
3050
|
hl as ForgeStepper,
|
|
2961
|
-
|
|
3051
|
+
xl as ForgeTable,
|
|
2962
3052
|
wl as ForgeTile
|
|
2963
3053
|
};
|