@3squared/forge-ui-3 0.1.3 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cypress/support/component.d.ts +1 -3
- package/dist/esm/forge-ui-3.mjs +744 -692
- package/dist/esm/style.css +1 -1
- package/dist/index.d.ts +26 -25
- package/dist/src/Bootstrap_PT.d.ts +2 -1
- package/dist/src/components/ForgeActionButton.vue.d.ts +3 -2
- package/dist/src/components/ForgeAlert.vue.d.ts +3 -2
- package/dist/src/components/ForgeCheckbox.vue.d.ts +4 -3
- package/dist/src/components/ForgeChips.vue.d.ts +5 -4
- package/dist/src/components/ForgeDatepicker.vue.d.ts +4 -3
- package/dist/src/components/ForgeForm.vue.d.ts +1 -1
- package/dist/src/components/ForgeFormField.vue.d.ts +3 -2
- package/dist/src/components/ForgeInlineEditor.vue.d.ts +3 -2
- package/dist/src/components/ForgeLink.vue.d.ts +38 -0
- package/dist/src/components/ForgeLoader.vue.d.ts +3 -2
- package/dist/src/components/ForgeModal.vue.d.ts +3 -2
- package/dist/src/components/ForgeMultiSelect.vue.d.ts +4 -3
- package/dist/src/components/ForgeMultiSelectPreview.vue.d.ts +3 -2
- package/dist/src/components/ForgeNavbar.vue.d.ts +4 -3
- package/dist/src/components/ForgePageHeader.vue.d.ts +1 -1
- package/dist/src/components/ForgeProgressBar.vue.d.ts +4 -3
- package/dist/src/components/ForgeRemainingCharacters.vue.d.ts +1 -1
- package/dist/src/components/ForgeStatWidget.vue.d.ts +3 -2
- package/dist/src/components/ForgeStepper.vue.d.ts +4 -3
- package/dist/src/components/ForgeTile.vue.d.ts +3 -2
- package/dist/src/components/file-uploader/ForgeFileUploader.vue.d.ts +4 -3
- package/dist/src/components/file-uploader/components/DragDropArea.vue.d.ts +3 -2
- package/dist/src/components/file-uploader/components/FileInfo.vue.d.ts +3 -2
- package/dist/src/components/file-uploader/components/MaxFileSize.vue.d.ts +1 -1
- package/dist/src/components/file-uploader/components/UploadButton.vue.d.ts +3 -2
- package/dist/src/components/file-uploader/components/UploadStatus.vue.d.ts +3 -2
- package/dist/src/components/file-uploader/utilities/utilities.d.ts +2 -1
- package/dist/src/components/table/ForgeFilterHeader.vue.d.ts +1 -1
- package/dist/src/components/table/ForgePaginationHeader.vue.d.ts +1 -1
- package/dist/src/components/table/ForgeTable.vue.d.ts +3 -2
- package/dist/src/types/forge-types.d.ts +4 -3
- package/dist/tests/component/link/link.cy.d.ts +1 -0
- package/package.json +5 -5
- package/src/styles/components/_link.scss +7 -0
- package/src/styles/main.scss +1 -0
package/dist/esm/forge-ui-3.mjs
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { defineComponent as $, openBlock as n, createBlock as w, normalizeProps as
|
|
1
|
+
import pe from "primevue/message";
|
|
2
|
+
import { defineComponent as $, openBlock as n, createBlock as w, normalizeProps as te, guardReactiveProps as ae, withCtx as b, createElementVNode as c, normalizeClass as B, unref as u, createCommentVNode as F, createVNode as v, renderSlot as k, ref as z, createElementBlock as p, Fragment as M, mergeProps as S, computed as h, createTextVNode as T, toDisplayString as g, withDirectives as R, vShow as H, mergeModels as q, useModel as E, createSlots as J, renderList as L, onMounted as ne, isRef as j, withKeys as Z, useAttrs as ie, withModifiers as K, normalizeStyle as ye } from "vue";
|
|
3
3
|
import { Icon as C } from "@iconify/vue";
|
|
4
4
|
import A from "primevue/button";
|
|
5
5
|
import ve from "primevue/toast";
|
|
6
|
-
import
|
|
6
|
+
import be from "primevue/checkbox";
|
|
7
7
|
import { useField as W } from "vee-validate";
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { vOnClickOutside as
|
|
12
|
-
import
|
|
8
|
+
import fe from "primevue/progressspinner";
|
|
9
|
+
import ge from "primevue/dialog";
|
|
10
|
+
import le from "primevue/inputtext";
|
|
11
|
+
import { vOnClickOutside as he } from "@vueuse/components";
|
|
12
|
+
import we from "primevue/menubar";
|
|
13
13
|
import ke from "vue-multiselect";
|
|
14
|
-
import
|
|
14
|
+
import _e from "primevue/calendar";
|
|
15
15
|
import $e from "primevue/inputmask";
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
16
|
+
import xe from "primevue/textarea";
|
|
17
|
+
import re from "primevue/inputnumber";
|
|
18
|
+
import Fe from "primevue/chips";
|
|
19
|
+
import Be from "primevue/progressbar";
|
|
20
|
+
import Se from "primevue/divider";
|
|
21
|
+
import Ce from "primevue/steps";
|
|
22
|
+
import Ve from "primevue/datatable";
|
|
23
|
+
import oe from "primevue/dropdown";
|
|
24
24
|
import Ie from "primevue/multiselect";
|
|
25
|
-
import { BlockBlobClient as
|
|
26
|
-
import
|
|
27
|
-
const
|
|
25
|
+
import { BlockBlobClient as de } from "@azure/storage-blob";
|
|
26
|
+
import ze from "primevue/image";
|
|
27
|
+
const za = {
|
|
28
28
|
button: {
|
|
29
29
|
root: ({ props: e }) => ({
|
|
30
30
|
class: [
|
|
@@ -140,7 +140,7 @@ const Ia = {
|
|
|
140
140
|
class: ["toast-body ps-1"]
|
|
141
141
|
}),
|
|
142
142
|
icon: ({ props: e }) => {
|
|
143
|
-
var t, l, a,
|
|
143
|
+
var t, l, a, o;
|
|
144
144
|
return {
|
|
145
145
|
class: [
|
|
146
146
|
"toast-icon",
|
|
@@ -148,7 +148,7 @@ const Ia = {
|
|
|
148
148
|
"text-primary": ((t = e.message) == null ? void 0 : t.severity) === "info",
|
|
149
149
|
"text-success": ((l = e.message) == null ? void 0 : l.severity) === "success",
|
|
150
150
|
"text-danger": ((a = e.message) == null ? void 0 : a.severity) === "error",
|
|
151
|
-
"text-warning": ((
|
|
151
|
+
"text-warning": ((o = e.message) == null ? void 0 : o.severity) === "warn"
|
|
152
152
|
}
|
|
153
153
|
]
|
|
154
154
|
};
|
|
@@ -207,12 +207,12 @@ const Ia = {
|
|
|
207
207
|
column: {
|
|
208
208
|
sortBadge: "ms-2 my-auto cursor-pointer",
|
|
209
209
|
headerCell: (e) => {
|
|
210
|
-
var t, l, a,
|
|
210
|
+
var t, l, a, o;
|
|
211
211
|
return {
|
|
212
212
|
class: [{
|
|
213
213
|
"cursor-move": e.props.reorderableColumns,
|
|
214
214
|
"position-sticky": ((t = e.column) == null ? void 0 : t.context.frozen) !== void 0 || ((l = e.column) == null ? void 0 : l.context.frozen) || ((a = e.column) == null ? void 0 : a.context.frozen) === "",
|
|
215
|
-
"overflow-hidden position-relative bg-clip-padding": (
|
|
215
|
+
"overflow-hidden position-relative bg-clip-padding": (o = e.column) == null ? void 0 : o.context.resizable
|
|
216
216
|
}]
|
|
217
217
|
};
|
|
218
218
|
},
|
|
@@ -681,7 +681,7 @@ const Ia = {
|
|
|
681
681
|
class: [
|
|
682
682
|
"dropdown-menu w-fit-content",
|
|
683
683
|
{
|
|
684
|
-
"position-absolute
|
|
684
|
+
"position-absolute start-100 top-0": e.level > 1
|
|
685
685
|
}
|
|
686
686
|
]
|
|
687
687
|
}),
|
|
@@ -798,7 +798,7 @@ const Ia = {
|
|
|
798
798
|
zoominbutton: "btn text-white",
|
|
799
799
|
closebutton: "btn text-white"
|
|
800
800
|
}
|
|
801
|
-
},
|
|
801
|
+
}, X = /* @__PURE__ */ $({
|
|
802
802
|
__name: "ForgeAlert",
|
|
803
803
|
props: {
|
|
804
804
|
severity: { default: "primary" },
|
|
@@ -815,25 +815,25 @@ const Ia = {
|
|
|
815
815
|
setup(e) {
|
|
816
816
|
const t = e;
|
|
817
817
|
return (l, a) => {
|
|
818
|
-
const
|
|
819
|
-
return n(), w(
|
|
820
|
-
messageicon:
|
|
821
|
-
|
|
822
|
-
class:
|
|
818
|
+
const o = pe;
|
|
819
|
+
return n(), w(o, te(ae({ ...l.$attrs, ...t })), {
|
|
820
|
+
messageicon: b(() => [
|
|
821
|
+
c("div", {
|
|
822
|
+
class: B(t.icon ? "me-2 pe-1" : "")
|
|
823
823
|
}, [
|
|
824
|
-
t.icon ? (n(), w(
|
|
824
|
+
t.icon ? (n(), w(u(C), {
|
|
825
825
|
key: 0,
|
|
826
826
|
"data-cy": "message-icon",
|
|
827
827
|
icon: t.icon,
|
|
828
|
-
class:
|
|
828
|
+
class: B(`text-${t.severity}`),
|
|
829
829
|
height: 35
|
|
830
830
|
}, null, 8, ["icon", "class"])) : F("", !0)
|
|
831
831
|
], 2)
|
|
832
832
|
]),
|
|
833
|
-
closeicon:
|
|
834
|
-
v(
|
|
833
|
+
closeicon: b(() => [
|
|
834
|
+
v(u(C), { icon: "bi:x" })
|
|
835
835
|
]),
|
|
836
|
-
default:
|
|
836
|
+
default: b(() => [
|
|
837
837
|
k(l.$slots, "default")
|
|
838
838
|
]),
|
|
839
839
|
_: 3
|
|
@@ -849,31 +849,31 @@ const Ia = {
|
|
|
849
849
|
params: { default: Array }
|
|
850
850
|
},
|
|
851
851
|
setup(e) {
|
|
852
|
-
const t =
|
|
852
|
+
const t = z(!1), l = e, a = async () => {
|
|
853
853
|
t.value = !0;
|
|
854
854
|
try {
|
|
855
855
|
await l.action.apply(this, l.params);
|
|
856
|
-
} catch (
|
|
857
|
-
await l.errorAction.apply(this, l.errorParams ? [...l.errorParams,
|
|
856
|
+
} catch (o) {
|
|
857
|
+
await l.errorAction.apply(this, l.errorParams ? [...l.errorParams, o] : [o]);
|
|
858
858
|
}
|
|
859
859
|
t.value = !1;
|
|
860
860
|
};
|
|
861
|
-
return (
|
|
862
|
-
const
|
|
863
|
-
return n(),
|
|
864
|
-
v(
|
|
861
|
+
return (o, s) => {
|
|
862
|
+
const i = A;
|
|
863
|
+
return n(), p(M, null, [
|
|
864
|
+
v(i, S({ ...l, ...o.$attrs }, {
|
|
865
865
|
loading: t.value,
|
|
866
866
|
disabled: t.value || l.disabled,
|
|
867
867
|
onClick: a
|
|
868
868
|
}), null, 16, ["loading", "disabled"]),
|
|
869
|
-
v(
|
|
869
|
+
v(u(ve))
|
|
870
870
|
], 64);
|
|
871
871
|
};
|
|
872
872
|
}
|
|
873
|
-
}),
|
|
873
|
+
}), Te = {
|
|
874
874
|
class: "d-flex",
|
|
875
875
|
"data-cy": "checkbox-container"
|
|
876
|
-
},
|
|
876
|
+
}, Me = /* @__PURE__ */ c("div", null, null, -1), Pe = ["for"], Ue = /* @__PURE__ */ $({
|
|
877
877
|
__name: "ForgeCheckbox",
|
|
878
878
|
props: {
|
|
879
879
|
label: { default: "" },
|
|
@@ -901,49 +901,49 @@ const Ia = {
|
|
|
901
901
|
},
|
|
902
902
|
emits: ["update:modelValue"],
|
|
903
903
|
setup(e, { emit: t }) {
|
|
904
|
-
const l = t, a = e, { checked:
|
|
904
|
+
const l = t, a = e, { checked: o, handleChange: s, errors: i, errorMessage: m } = W(() => a.name ?? a.label, a.rules, {
|
|
905
905
|
type: "checkbox",
|
|
906
906
|
checkedValue: !0,
|
|
907
907
|
initialValue: a.modelValue
|
|
908
|
-
}),
|
|
909
|
-
a.disabled || (
|
|
910
|
-
},
|
|
911
|
-
return (
|
|
912
|
-
const
|
|
913
|
-
return n(),
|
|
914
|
-
|
|
915
|
-
v(
|
|
908
|
+
}), y = (_) => {
|
|
909
|
+
a.disabled || (s(_), l("update:modelValue", !a.modelValue));
|
|
910
|
+
}, r = h(() => i.value.length > 0);
|
|
911
|
+
return (_, d) => {
|
|
912
|
+
const f = be;
|
|
913
|
+
return n(), p(M, null, [
|
|
914
|
+
c("div", Te, [
|
|
915
|
+
v(f, S({
|
|
916
916
|
id: a.name
|
|
917
|
-
}, { ...
|
|
918
|
-
value:
|
|
919
|
-
"input-class": { "is-invalid":
|
|
920
|
-
onChange:
|
|
917
|
+
}, { ..._.$attrs, ...a }, {
|
|
918
|
+
value: u(o),
|
|
919
|
+
"input-class": { "is-invalid": r.value },
|
|
920
|
+
onChange: y
|
|
921
921
|
}), {
|
|
922
|
-
icon:
|
|
923
|
-
|
|
922
|
+
icon: b(() => [
|
|
923
|
+
Me
|
|
924
924
|
]),
|
|
925
925
|
_: 1
|
|
926
926
|
}, 16, ["id", "value", "input-class"]),
|
|
927
|
-
|
|
927
|
+
c("label", {
|
|
928
928
|
for: a.name,
|
|
929
|
-
class:
|
|
930
|
-
onClick:
|
|
929
|
+
class: B(`${a.disabled ? "opacity-50" : "cursor-pointer"}`),
|
|
930
|
+
onClick: y
|
|
931
931
|
}, [
|
|
932
|
-
k(
|
|
933
|
-
|
|
932
|
+
k(_.$slots, "default", {}, () => [
|
|
933
|
+
T(g(a.label), 1)
|
|
934
934
|
])
|
|
935
|
-
], 10,
|
|
935
|
+
], 10, Pe)
|
|
936
936
|
]),
|
|
937
|
-
R(
|
|
937
|
+
R(c("small", {
|
|
938
938
|
"data-cy": "error",
|
|
939
939
|
class: "text-invalid"
|
|
940
|
-
},
|
|
941
|
-
[
|
|
940
|
+
}, g(u(m)), 513), [
|
|
941
|
+
[H, r.value]
|
|
942
942
|
])
|
|
943
943
|
], 64);
|
|
944
944
|
};
|
|
945
945
|
}
|
|
946
|
-
}),
|
|
946
|
+
}), Oe = { class: "forge-loader" }, ue = /* @__PURE__ */ $({
|
|
947
947
|
__name: "ForgeLoader",
|
|
948
948
|
props: {
|
|
949
949
|
severity: { default: "primary" }
|
|
@@ -951,17 +951,68 @@ const Ia = {
|
|
|
951
951
|
setup(e) {
|
|
952
952
|
const t = e;
|
|
953
953
|
return (l, a) => {
|
|
954
|
-
const
|
|
955
|
-
return n(),
|
|
956
|
-
v(
|
|
954
|
+
const o = fe;
|
|
955
|
+
return n(), p("div", Oe, [
|
|
956
|
+
v(o, {
|
|
957
957
|
"animation-duration": ".75",
|
|
958
|
-
class:
|
|
958
|
+
class: B(`text-${t.severity === void 0 ? "primary" : t.severity}`)
|
|
959
959
|
}, null, 8, ["class"])
|
|
960
960
|
]);
|
|
961
961
|
};
|
|
962
962
|
}
|
|
963
|
+
}), De = ["href", "target"], Ma = /* @__PURE__ */ $({
|
|
964
|
+
__name: "ForgeLink",
|
|
965
|
+
props: {
|
|
966
|
+
url: {},
|
|
967
|
+
label: {},
|
|
968
|
+
target: { default: "_blank" },
|
|
969
|
+
opacity: {},
|
|
970
|
+
severity: { default: "primary" },
|
|
971
|
+
underlineSeverity: {},
|
|
972
|
+
underlineOffset: {},
|
|
973
|
+
underlineOpacity: {},
|
|
974
|
+
hoverOpacity: {},
|
|
975
|
+
underlineHoverOpacity: {},
|
|
976
|
+
animateIconOnHover: { type: Boolean },
|
|
977
|
+
positionIconEnd: { type: Boolean },
|
|
978
|
+
iconName: {}
|
|
979
|
+
},
|
|
980
|
+
setup(e) {
|
|
981
|
+
const t = h(() => ({
|
|
982
|
+
[`link-${e.severity}`]: e.severity,
|
|
983
|
+
[`link-underline-${e.underlineSeverity}`]: e.underlineSeverity,
|
|
984
|
+
[`link-opacity-${e.opacity}`]: e.opacity,
|
|
985
|
+
[`link-opacity-${e.hoverOpacity}-hover`]: e.hoverOpacity,
|
|
986
|
+
[`link-underline-opacity-${e.underlineOpacity ?? e.opacity}`]: e.underlineOpacity || e.opacity,
|
|
987
|
+
[`link-underline-opacity-${e.underlineHoverOpacity ?? e.hoverOpacity}-hover`]: e.underlineHoverOpacity || e.hoverOpacity,
|
|
988
|
+
[`link-offset-${e.underlineOffset}`]: e.underlineOffset,
|
|
989
|
+
"icon-link icon-link-hover": e.animateIconOnHover
|
|
990
|
+
})), l = h(() => ({
|
|
991
|
+
"order-2": e.positionIconEnd,
|
|
992
|
+
"me-1": !e.positionIconEnd && !e.animateIconOnHover,
|
|
993
|
+
"ms-1": e.positionIconEnd && !e.animateIconOnHover,
|
|
994
|
+
"ms-0": e.positionIconEnd && e.animateIconOnHover,
|
|
995
|
+
"me-0": e.animateIconOnHover
|
|
996
|
+
}));
|
|
997
|
+
return (a, o) => (n(), p("a", {
|
|
998
|
+
id: "link",
|
|
999
|
+
class: B(["cursor-pointer d-flex", t.value]),
|
|
1000
|
+
href: a.url,
|
|
1001
|
+
target: a.target
|
|
1002
|
+
}, [
|
|
1003
|
+
k(a.$slots, "default", {}, () => [
|
|
1004
|
+
a.iconName ? (n(), w(u(C), {
|
|
1005
|
+
key: 0,
|
|
1006
|
+
id: "link-icon",
|
|
1007
|
+
icon: a.iconName,
|
|
1008
|
+
class: B(["bi my-auto", l.value])
|
|
1009
|
+
}, null, 8, ["icon", "class"])) : F("", !0),
|
|
1010
|
+
T(" " + g(a.label), 1)
|
|
1011
|
+
])
|
|
1012
|
+
], 10, De));
|
|
1013
|
+
}
|
|
963
1014
|
});
|
|
964
|
-
function
|
|
1015
|
+
function Ae(e) {
|
|
965
1016
|
const t = {
|
|
966
1017
|
errorMessage: "",
|
|
967
1018
|
errorDetails: []
|
|
@@ -972,12 +1023,12 @@ function Ne(e) {
|
|
|
972
1023
|
}
|
|
973
1024
|
return t.errorMessage === "" && t.errorDetails.length === 0 && (t.errorMessage = e), t;
|
|
974
1025
|
}
|
|
975
|
-
const
|
|
1026
|
+
const Ne = { key: 0 }, Ee = {
|
|
976
1027
|
class: "d-flex w-100",
|
|
977
1028
|
"data-cy": "footer"
|
|
978
|
-
},
|
|
1029
|
+
}, Pa = /* @__PURE__ */ $({
|
|
979
1030
|
__name: "ForgeModal",
|
|
980
|
-
props: /* @__PURE__ */
|
|
1031
|
+
props: /* @__PURE__ */ q({
|
|
981
1032
|
cancelText: { default: "Cancel" },
|
|
982
1033
|
submitText: { default: "Submit" },
|
|
983
1034
|
showFooter: { type: Boolean, default: !0 },
|
|
@@ -1018,30 +1069,30 @@ const Oe = { key: 0 }, Re = {
|
|
|
1018
1069
|
}),
|
|
1019
1070
|
emits: ["update:visible"],
|
|
1020
1071
|
setup(e) {
|
|
1021
|
-
const t =
|
|
1072
|
+
const t = E(e, "visible"), l = z(!1), a = e, o = z(!1), s = z({
|
|
1022
1073
|
hasError: !1,
|
|
1023
1074
|
header: "",
|
|
1024
1075
|
message: []
|
|
1025
|
-
}),
|
|
1076
|
+
}), i = () => {
|
|
1026
1077
|
l.value = !1;
|
|
1027
|
-
},
|
|
1078
|
+
}, m = () => {
|
|
1028
1079
|
l.value = !0;
|
|
1029
|
-
},
|
|
1080
|
+
}, y = () => {
|
|
1030
1081
|
t.value = !1;
|
|
1031
|
-
},
|
|
1082
|
+
}, r = async () => {
|
|
1032
1083
|
if (a.onConfirm) {
|
|
1033
|
-
|
|
1084
|
+
o.value = !0, s.value.hasError = !1;
|
|
1034
1085
|
try {
|
|
1035
|
-
const
|
|
1036
|
-
(
|
|
1037
|
-
} catch (
|
|
1038
|
-
|
|
1039
|
-
const
|
|
1040
|
-
|
|
1086
|
+
const d = await a.onConfirm();
|
|
1087
|
+
(d || d == null) && y();
|
|
1088
|
+
} catch (d) {
|
|
1089
|
+
s.value.hasError = !0;
|
|
1090
|
+
const f = Ae(d);
|
|
1091
|
+
s.value.header = f.errorMessage, s.value.message = f.errorDetails;
|
|
1041
1092
|
}
|
|
1042
|
-
|
|
1093
|
+
o.value = !1;
|
|
1043
1094
|
}
|
|
1044
|
-
},
|
|
1095
|
+
}, _ = h(() => ({
|
|
1045
1096
|
root: [
|
|
1046
1097
|
"modal modal-dialog modal-content h-auto m-0",
|
|
1047
1098
|
{
|
|
@@ -1049,65 +1100,65 @@ const Oe = { key: 0 }, Re = {
|
|
|
1049
1100
|
}
|
|
1050
1101
|
]
|
|
1051
1102
|
}));
|
|
1052
|
-
return (
|
|
1053
|
-
const x = A,
|
|
1054
|
-
return n(), w(
|
|
1055
|
-
onMaximize:
|
|
1056
|
-
onUnmaximize:
|
|
1057
|
-
pt:
|
|
1058
|
-
}),
|
|
1059
|
-
closeicon:
|
|
1060
|
-
v(
|
|
1103
|
+
return (d, f) => {
|
|
1104
|
+
const x = A, I = ge;
|
|
1105
|
+
return n(), w(I, S(a, {
|
|
1106
|
+
onMaximize: m,
|
|
1107
|
+
onUnmaximize: i,
|
|
1108
|
+
pt: _.value
|
|
1109
|
+
}), J({
|
|
1110
|
+
closeicon: b(() => [
|
|
1111
|
+
v(u(C), {
|
|
1061
1112
|
"data-cy": "close-icon",
|
|
1062
1113
|
icon: "bi:x-lg",
|
|
1063
1114
|
width: "21",
|
|
1064
1115
|
height: "21",
|
|
1065
|
-
onClick:
|
|
1116
|
+
onClick: y
|
|
1066
1117
|
})
|
|
1067
1118
|
]),
|
|
1068
|
-
maximizeicon:
|
|
1069
|
-
v(
|
|
1119
|
+
maximizeicon: b(() => [
|
|
1120
|
+
v(u(C), {
|
|
1070
1121
|
"data-cy": "maximisable-icon",
|
|
1071
1122
|
icon: "bi:arrows-fullscreen"
|
|
1072
1123
|
})
|
|
1073
1124
|
]),
|
|
1074
|
-
default:
|
|
1075
|
-
|
|
1125
|
+
default: b(() => [
|
|
1126
|
+
s.value.hasError ? (n(), w(X, {
|
|
1076
1127
|
key: 0,
|
|
1077
1128
|
severity: "danger",
|
|
1078
1129
|
"data-cy": "error"
|
|
1079
1130
|
}, {
|
|
1080
|
-
default:
|
|
1081
|
-
|
|
1082
|
-
class:
|
|
1083
|
-
},
|
|
1084
|
-
|
|
1085
|
-
(n(!0),
|
|
1131
|
+
default: b(() => [
|
|
1132
|
+
c("p", {
|
|
1133
|
+
class: B(s.value.message.length > 0 ? "my-auto" : "mb-0")
|
|
1134
|
+
}, g(s.value.header), 3),
|
|
1135
|
+
s.value.message.length > 0 ? (n(), p("ul", Ne, [
|
|
1136
|
+
(n(!0), p(M, null, L(s.value.message, (V) => (n(), p("li", { key: V }, g(V), 1))), 128))
|
|
1086
1137
|
])) : F("", !0)
|
|
1087
1138
|
]),
|
|
1088
1139
|
_: 1
|
|
1089
1140
|
})) : F("", !0),
|
|
1090
|
-
k(
|
|
1091
|
-
|
|
1092
|
-
v(
|
|
1141
|
+
k(d.$slots, "default"),
|
|
1142
|
+
o.value ? k(d.$slots, "loader", { key: 1 }, () => [
|
|
1143
|
+
v(ue, { "data-cy": "loader" })
|
|
1093
1144
|
]) : F("", !0)
|
|
1094
1145
|
]),
|
|
1095
1146
|
_: 2
|
|
1096
1147
|
}, [
|
|
1097
|
-
|
|
1148
|
+
d.showFooter ? {
|
|
1098
1149
|
name: "footer",
|
|
1099
|
-
fn:
|
|
1100
|
-
|
|
1150
|
+
fn: b(() => [
|
|
1151
|
+
c("div", Ee, [
|
|
1101
1152
|
v(x, {
|
|
1102
|
-
label:
|
|
1153
|
+
label: d.cancelText,
|
|
1103
1154
|
outlined: "",
|
|
1104
|
-
onClick:
|
|
1155
|
+
onClick: y,
|
|
1105
1156
|
"data-cy": "cancel-button"
|
|
1106
1157
|
}, null, 8, ["label"]),
|
|
1107
1158
|
v(x, {
|
|
1108
|
-
label:
|
|
1159
|
+
label: d.submitText,
|
|
1109
1160
|
class: "ms-auto",
|
|
1110
|
-
onClick:
|
|
1161
|
+
onClick: r,
|
|
1111
1162
|
"data-cy": "submit-button"
|
|
1112
1163
|
}, null, 8, ["label"])
|
|
1113
1164
|
])
|
|
@@ -1117,9 +1168,9 @@ const Oe = { key: 0 }, Re = {
|
|
|
1117
1168
|
]), 1040, ["pt"]);
|
|
1118
1169
|
};
|
|
1119
1170
|
}
|
|
1120
|
-
}),
|
|
1171
|
+
}), Re = ["id"], Le = { key: 0 }, je = { key: 0 }, He = { class: "d-flex justify-content-between align-items-center position-relative" }, qe = { key: 1 }, Ge = { "data-cy": "readonly-value" }, Ke = /* @__PURE__ */ $({
|
|
1121
1172
|
__name: "ForgeInlineEditor",
|
|
1122
|
-
props: /* @__PURE__ */
|
|
1173
|
+
props: /* @__PURE__ */ q({
|
|
1123
1174
|
name: { default: "" },
|
|
1124
1175
|
rules: {},
|
|
1125
1176
|
completeAction: {},
|
|
@@ -1133,13 +1184,13 @@ const Oe = { key: 0 }, Re = {
|
|
|
1133
1184
|
}),
|
|
1134
1185
|
emits: ["update:modelValue"],
|
|
1135
1186
|
setup(e) {
|
|
1136
|
-
const t = e, l =
|
|
1187
|
+
const t = e, l = E(e, "modelValue"), a = z(!1), o = z(), s = () => {
|
|
1137
1188
|
var x;
|
|
1138
|
-
a.value = !a.value, (x =
|
|
1139
|
-
},
|
|
1140
|
-
if (
|
|
1189
|
+
a.value = !a.value, (x = o.value) == null || x.focus();
|
|
1190
|
+
}, i = async () => {
|
|
1191
|
+
if (f.value)
|
|
1141
1192
|
return !1;
|
|
1142
|
-
if (l.value =
|
|
1193
|
+
if (l.value = d.value, t.completeAction)
|
|
1143
1194
|
try {
|
|
1144
1195
|
await t.completeAction.apply(this, t.params), a.value = !a.value;
|
|
1145
1196
|
} catch {
|
|
@@ -1147,95 +1198,95 @@ const Oe = { key: 0 }, Re = {
|
|
|
1147
1198
|
}
|
|
1148
1199
|
else
|
|
1149
1200
|
a.value = !a.value;
|
|
1150
|
-
},
|
|
1201
|
+
}, m = () => {
|
|
1151
1202
|
a.value = !a.value;
|
|
1152
|
-
},
|
|
1153
|
-
|
|
1154
|
-
}, { errorMessage:
|
|
1155
|
-
|
|
1156
|
-
|
|
1203
|
+
}, y = () => {
|
|
1204
|
+
d.value = null;
|
|
1205
|
+
}, { errorMessage: r, errors: _, value: d } = W(() => t.name, t.rules);
|
|
1206
|
+
ne(() => {
|
|
1207
|
+
d.value = l.value;
|
|
1157
1208
|
});
|
|
1158
|
-
const
|
|
1159
|
-
return (x,
|
|
1160
|
-
const
|
|
1161
|
-
return n(),
|
|
1209
|
+
const f = h(() => _.value.length > 0);
|
|
1210
|
+
return (x, I) => {
|
|
1211
|
+
const V = le, U = A;
|
|
1212
|
+
return n(), p("div", {
|
|
1162
1213
|
id: t.name
|
|
1163
1214
|
}, [
|
|
1164
|
-
x.readonly ? (n(),
|
|
1215
|
+
x.readonly ? (n(), p("div", qe, [
|
|
1165
1216
|
k(x.$slots, "default", {}, () => [
|
|
1166
|
-
|
|
1217
|
+
c("span", Ge, g(u(d)), 1)
|
|
1167
1218
|
])
|
|
1168
|
-
])) : (n(),
|
|
1169
|
-
a.value ? (n(),
|
|
1170
|
-
R((n(),
|
|
1219
|
+
])) : (n(), p("div", Le, [
|
|
1220
|
+
a.value ? (n(), p("div", je, [
|
|
1221
|
+
R((n(), p("div", He, [
|
|
1171
1222
|
k(x.$slots, "editor", {
|
|
1172
|
-
class:
|
|
1173
|
-
editFinished:
|
|
1174
|
-
cancel:
|
|
1175
|
-
val:
|
|
1223
|
+
class: B({ "is-invalid": f.value }),
|
|
1224
|
+
editFinished: i,
|
|
1225
|
+
cancel: m,
|
|
1226
|
+
val: u(d)
|
|
1176
1227
|
}, () => [
|
|
1177
|
-
v(
|
|
1228
|
+
v(V, {
|
|
1178
1229
|
"data-cy": "input",
|
|
1179
1230
|
ref_key: "input",
|
|
1180
|
-
ref:
|
|
1181
|
-
modelValue:
|
|
1182
|
-
"onUpdate:modelValue":
|
|
1231
|
+
ref: o,
|
|
1232
|
+
modelValue: u(d),
|
|
1233
|
+
"onUpdate:modelValue": I[0] || (I[0] = (P) => j(d) ? d.value = P : null),
|
|
1183
1234
|
modelModifiers: { trim: !0 },
|
|
1184
|
-
class:
|
|
1235
|
+
class: B({ "is-invalid": f.value }),
|
|
1185
1236
|
onKeydown: [
|
|
1186
|
-
|
|
1187
|
-
|
|
1237
|
+
Z(i, ["enter"]),
|
|
1238
|
+
Z(m, ["esc"])
|
|
1188
1239
|
]
|
|
1189
1240
|
}, null, 8, ["modelValue", "class"])
|
|
1190
1241
|
]),
|
|
1191
|
-
v(
|
|
1242
|
+
v(u(C), {
|
|
1192
1243
|
icon: "bi:x-circle",
|
|
1193
1244
|
class: "mx-2 cursor-pointer",
|
|
1194
|
-
onClick:
|
|
1195
|
-
onKeydown:
|
|
1245
|
+
onClick: y,
|
|
1246
|
+
onKeydown: Z(y, ["enter"]),
|
|
1196
1247
|
"data-cy": "clear-icon"
|
|
1197
1248
|
})
|
|
1198
1249
|
])), [
|
|
1199
|
-
[
|
|
1250
|
+
[u(he), i]
|
|
1200
1251
|
])
|
|
1201
|
-
])) : (n(),
|
|
1252
|
+
])) : (n(), p("div", {
|
|
1202
1253
|
key: 1,
|
|
1203
1254
|
class: "d-flex text-muted",
|
|
1204
|
-
onClick:
|
|
1205
|
-
onFocus:
|
|
1255
|
+
onClick: s,
|
|
1256
|
+
onFocus: s
|
|
1206
1257
|
}, [
|
|
1207
1258
|
k(x.$slots, "default", {}, () => [
|
|
1208
|
-
|
|
1209
|
-
class:
|
|
1259
|
+
c("div", {
|
|
1260
|
+
class: B(["pe-2 cursor-pointer", { "text-invalid": f.value }]),
|
|
1210
1261
|
"data-cy": "value"
|
|
1211
|
-
},
|
|
1262
|
+
}, g(u(d) ? u(d) : "Click to edit"), 3)
|
|
1212
1263
|
]),
|
|
1213
|
-
v(
|
|
1264
|
+
v(U, {
|
|
1214
1265
|
link: "",
|
|
1215
1266
|
class: "p-0 m-0"
|
|
1216
1267
|
}, {
|
|
1217
|
-
default:
|
|
1218
|
-
v(
|
|
1268
|
+
default: b(() => [
|
|
1269
|
+
v(u(C), {
|
|
1219
1270
|
icon: "bi:pencil",
|
|
1220
|
-
class:
|
|
1271
|
+
class: B(f.value ? "text-invalid" : "text-muted"),
|
|
1221
1272
|
"data-cy": "edit-icon",
|
|
1222
|
-
onKeydown:
|
|
1273
|
+
onKeydown: Z(s, ["enter"])
|
|
1223
1274
|
}, null, 8, ["class"])
|
|
1224
1275
|
]),
|
|
1225
1276
|
_: 1
|
|
1226
1277
|
})
|
|
1227
1278
|
], 32))
|
|
1228
1279
|
])),
|
|
1229
|
-
R(
|
|
1280
|
+
R(c("small", {
|
|
1230
1281
|
"data-cy": "error",
|
|
1231
1282
|
class: "text-invalid"
|
|
1232
|
-
},
|
|
1233
|
-
[
|
|
1283
|
+
}, g(u(r)), 513), [
|
|
1284
|
+
[H, f.value]
|
|
1234
1285
|
])
|
|
1235
|
-
], 8,
|
|
1286
|
+
], 8, Re);
|
|
1236
1287
|
};
|
|
1237
1288
|
}
|
|
1238
|
-
}), We = ["href"],
|
|
1289
|
+
}), We = ["href"], Ua = /* @__PURE__ */ $({
|
|
1239
1290
|
__name: "ForgeNavbar",
|
|
1240
1291
|
props: {
|
|
1241
1292
|
severity: { default: "light" },
|
|
@@ -1252,7 +1303,7 @@ const Oe = { key: 0 }, Re = {
|
|
|
1252
1303
|
unstyled: { type: Boolean }
|
|
1253
1304
|
},
|
|
1254
1305
|
setup(e) {
|
|
1255
|
-
const t = e, l =
|
|
1306
|
+
const t = e, l = h(() => ({
|
|
1256
1307
|
root: () => ({
|
|
1257
1308
|
class: [
|
|
1258
1309
|
"navbar container-fluid navbar-expand-lg",
|
|
@@ -1278,28 +1329,28 @@ const Oe = { key: 0 }, Re = {
|
|
|
1278
1329
|
]
|
|
1279
1330
|
})
|
|
1280
1331
|
}));
|
|
1281
|
-
return (a,
|
|
1282
|
-
const
|
|
1283
|
-
return n(), w(
|
|
1332
|
+
return (a, o) => {
|
|
1333
|
+
const s = we;
|
|
1334
|
+
return n(), w(s, S({ ...t, ...a.$attrs }, {
|
|
1284
1335
|
pt: l.value,
|
|
1285
1336
|
"data-cy": "navbar"
|
|
1286
|
-
}),
|
|
1287
|
-
start:
|
|
1288
|
-
|
|
1337
|
+
}), J({
|
|
1338
|
+
start: b(() => [
|
|
1339
|
+
c("a", {
|
|
1289
1340
|
href: a.logoUrl,
|
|
1290
1341
|
class: "navbar-brand ms-3",
|
|
1291
1342
|
"data-cy": "logo"
|
|
1292
1343
|
}, [
|
|
1293
1344
|
k(a.$slots, "logo", {}, () => [
|
|
1294
|
-
|
|
1345
|
+
T(" Logo ")
|
|
1295
1346
|
])
|
|
1296
1347
|
], 8, We)
|
|
1297
1348
|
]),
|
|
1298
|
-
menubuttonicon:
|
|
1349
|
+
menubuttonicon: b(() => [
|
|
1299
1350
|
k(a.$slots, "menubuttonicon", {}, () => [
|
|
1300
|
-
v(
|
|
1351
|
+
v(u(C), {
|
|
1301
1352
|
icon: "bi:list",
|
|
1302
|
-
class:
|
|
1353
|
+
class: B(t.severity === "light" ? "text-black" : "text-white"),
|
|
1303
1354
|
height: "24",
|
|
1304
1355
|
"data-cy": "burger-icon"
|
|
1305
1356
|
}, null, 8, ["class"])
|
|
@@ -1307,16 +1358,16 @@ const Oe = { key: 0 }, Re = {
|
|
|
1307
1358
|
]),
|
|
1308
1359
|
_: 2
|
|
1309
1360
|
}, [
|
|
1310
|
-
|
|
1311
|
-
name:
|
|
1312
|
-
fn:
|
|
1313
|
-
k(a.$slots,
|
|
1361
|
+
L(a.$slots, (i, m) => ({
|
|
1362
|
+
name: m,
|
|
1363
|
+
fn: b((y) => [
|
|
1364
|
+
k(a.$slots, m, te(ae(y)))
|
|
1314
1365
|
])
|
|
1315
1366
|
}))
|
|
1316
1367
|
]), 1040, ["pt"]);
|
|
1317
1368
|
};
|
|
1318
1369
|
}
|
|
1319
|
-
}), Ze = ["onMousedown"], Ye = ["checked"], Je = /* @__PURE__ */
|
|
1370
|
+
}), Ze = ["onMousedown"], Ye = ["checked"], Je = /* @__PURE__ */ c("strong", null, "Select all", -1), Xe = ["data-cy"], Qe = ["checked"], et = /* @__PURE__ */ $({
|
|
1320
1371
|
__name: "ForgeMultiSelect",
|
|
1321
1372
|
props: {
|
|
1322
1373
|
severity: { default: "primary" },
|
|
@@ -1329,72 +1380,72 @@ const Oe = { key: 0 }, Re = {
|
|
|
1329
1380
|
},
|
|
1330
1381
|
emits: ["update:modelValue"],
|
|
1331
1382
|
setup(e, { emit: t }) {
|
|
1332
|
-
const l = e, a =
|
|
1383
|
+
const l = e, a = ie(), o = t, { errors: s, value: i, errorMessage: m } = W(() => l.name, l.rules), y = z(!1), r = h(() => ({
|
|
1333
1384
|
multiple: !0,
|
|
1334
1385
|
label: "label",
|
|
1335
1386
|
trackBy: "id",
|
|
1336
|
-
showPointer: !
|
|
1387
|
+
showPointer: !y.value,
|
|
1337
1388
|
placeholder: "Select...",
|
|
1338
1389
|
allowEmpty: !0,
|
|
1339
1390
|
selectValue: "",
|
|
1340
1391
|
closeOnSelect: !!(a.multiple === null || a.multiple),
|
|
1341
1392
|
clearOnSelect: !!(a.multiple === null || a.multiple),
|
|
1342
|
-
searchable: !!((a.searchable === null || a.searchable) && !
|
|
1393
|
+
searchable: !!((a.searchable === null || a.searchable) && !f.value),
|
|
1343
1394
|
async: !1,
|
|
1344
1395
|
...a
|
|
1345
|
-
})),
|
|
1346
|
-
|
|
1347
|
-
},
|
|
1348
|
-
|
|
1349
|
-
},
|
|
1350
|
-
|
|
1396
|
+
})), _ = h(() => `forge-multiselect-${l.severity}`), d = h(() => `multiselect-option ${y.value ? " multiselect__option--highlight" : ""} ${f.value ? " multiselect__option--selected" : ""}`), f = h(() => r.value && !(r.value.multiple || !l.showSelectAll || r.value.async) ? !1 : a.modelValue.length === a.options.length), x = h(() => s.value.length > 0), I = h(() => !!((a.allowEmpty == null || a.allowEmpty) && l.showClearSelection && (r.value.multiple ? a.modelValue.length > 0 : a.modelValue))), V = () => y.value = !0, U = () => y.value = !1, P = () => {
|
|
1397
|
+
i.value = r.value.multiple ? [] : null, o("update:modelValue", i.value);
|
|
1398
|
+
}, G = (O) => {
|
|
1399
|
+
o("update:modelValue", l.selectValue ? O.map((D) => D[l.selectValue]) : O);
|
|
1400
|
+
}, Q = (O) => a.modelValue !== null ? a.modelValue.some((D) => r.value.selectValue ? O[l.selectValue] === D : O.id === D.id && O.label === D.label) : !1, me = () => {
|
|
1401
|
+
f.value ? P() : (i.value = [...a.options], o("update:modelValue", [...a.options]));
|
|
1351
1402
|
};
|
|
1352
|
-
return (
|
|
1353
|
-
v(
|
|
1354
|
-
class: [
|
|
1403
|
+
return (O, D) => (n(), p(M, null, [
|
|
1404
|
+
v(u(ke), S(r.value, {
|
|
1405
|
+
class: [_.value, x.value ? "is-invalid" : ""],
|
|
1355
1406
|
"data-cy": "multiselect",
|
|
1356
1407
|
"onUpdate:modelValue": [
|
|
1357
|
-
|
|
1358
|
-
|
|
1408
|
+
G,
|
|
1409
|
+
D[1] || (D[1] = (N) => j(i) ? i.value = N : null)
|
|
1359
1410
|
],
|
|
1360
|
-
modelValue:
|
|
1361
|
-
}),
|
|
1362
|
-
default:
|
|
1363
|
-
(n(!0),
|
|
1411
|
+
modelValue: u(i)
|
|
1412
|
+
}), J({
|
|
1413
|
+
default: b(() => [
|
|
1414
|
+
(n(!0), p(M, null, L(O.$slots, (N, ee) => k(O.$slots, ee, { slot: ee })), 256))
|
|
1364
1415
|
]),
|
|
1365
1416
|
_: 2
|
|
1366
1417
|
}, [
|
|
1367
|
-
|
|
1418
|
+
I.value ? {
|
|
1368
1419
|
name: "caret",
|
|
1369
|
-
fn:
|
|
1370
|
-
v(
|
|
1420
|
+
fn: b(({ toggle: N }) => [
|
|
1421
|
+
v(u(C), {
|
|
1371
1422
|
icon: "bi:x",
|
|
1372
1423
|
class: "my-auto multiselect__clear-icon",
|
|
1373
|
-
onMousedown:
|
|
1424
|
+
onMousedown: D[0] || (D[0] = K((ee) => P(), ["prevent", "stop"])),
|
|
1374
1425
|
"data-cy": "clear"
|
|
1375
1426
|
}),
|
|
1376
|
-
|
|
1427
|
+
c("div", {
|
|
1377
1428
|
class: "multiselect__select",
|
|
1378
|
-
onMousedown: K(
|
|
1429
|
+
onMousedown: K(N, ["prevent", "stop"])
|
|
1379
1430
|
}, null, 40, Ze)
|
|
1380
1431
|
]),
|
|
1381
1432
|
key: "0"
|
|
1382
1433
|
} : void 0,
|
|
1383
|
-
|
|
1434
|
+
r.value.multiple && O.showSelectAll && !r.value.async ? {
|
|
1384
1435
|
name: "beforeList",
|
|
1385
|
-
fn:
|
|
1386
|
-
|
|
1436
|
+
fn: b(() => [
|
|
1437
|
+
c("li", {
|
|
1387
1438
|
class: "multiselect__element",
|
|
1388
|
-
onClick:
|
|
1389
|
-
onMouseover:
|
|
1390
|
-
onMouseleave:
|
|
1439
|
+
onClick: me,
|
|
1440
|
+
onMouseover: V,
|
|
1441
|
+
onMouseleave: U,
|
|
1391
1442
|
"data-cy": "toggle-all"
|
|
1392
1443
|
}, [
|
|
1393
|
-
|
|
1394
|
-
class:
|
|
1444
|
+
c("span", {
|
|
1445
|
+
class: B(`multiselect__option ${d.value}`)
|
|
1395
1446
|
}, [
|
|
1396
|
-
|
|
1397
|
-
checked:
|
|
1447
|
+
c("input", {
|
|
1448
|
+
checked: f.value,
|
|
1398
1449
|
name: "selected",
|
|
1399
1450
|
type: "checkbox",
|
|
1400
1451
|
class: "multiselect__option--checkbox"
|
|
@@ -1405,29 +1456,29 @@ const Oe = { key: 0 }, Re = {
|
|
|
1405
1456
|
]),
|
|
1406
1457
|
key: "1"
|
|
1407
1458
|
} : void 0,
|
|
1408
|
-
|
|
1459
|
+
r.value.multiple ? {
|
|
1409
1460
|
name: "option",
|
|
1410
|
-
fn:
|
|
1411
|
-
|
|
1412
|
-
"data-cy":
|
|
1461
|
+
fn: b(({ option: N }) => [
|
|
1462
|
+
c("div", {
|
|
1463
|
+
"data-cy": N.label
|
|
1413
1464
|
}, [
|
|
1414
|
-
|
|
1415
|
-
checked:
|
|
1465
|
+
c("input", {
|
|
1466
|
+
checked: Q(N),
|
|
1416
1467
|
name: "selected",
|
|
1417
1468
|
type: "checkbox",
|
|
1418
1469
|
class: "multiselect__option--checkbox"
|
|
1419
1470
|
}, null, 8, Qe),
|
|
1420
|
-
|
|
1471
|
+
T(" " + g(N[r.value.label]), 1)
|
|
1421
1472
|
], 8, Xe)
|
|
1422
1473
|
]),
|
|
1423
1474
|
key: "2"
|
|
1424
1475
|
} : void 0
|
|
1425
1476
|
]), 1040, ["class", "modelValue"]),
|
|
1426
|
-
R(
|
|
1477
|
+
R(c("small", {
|
|
1427
1478
|
"data-cy": "error",
|
|
1428
1479
|
class: "invalid-feedback"
|
|
1429
|
-
},
|
|
1430
|
-
[
|
|
1480
|
+
}, g(u(m)), 513), [
|
|
1481
|
+
[H, x.value]
|
|
1431
1482
|
])
|
|
1432
1483
|
], 64));
|
|
1433
1484
|
}
|
|
@@ -1441,7 +1492,7 @@ const Oe = { key: 0 }, Re = {
|
|
|
1441
1492
|
}, ot = { class: "d-inline-block" }, st = {
|
|
1442
1493
|
key: 1,
|
|
1443
1494
|
class: "p-2 item d-flex justify-content-between align-items-center"
|
|
1444
|
-
},
|
|
1495
|
+
}, Oa = /* @__PURE__ */ $({
|
|
1445
1496
|
__name: "ForgeMultiSelectPreview",
|
|
1446
1497
|
props: {
|
|
1447
1498
|
title: { default: "Selected Items" },
|
|
@@ -1452,77 +1503,77 @@ const Oe = { key: 0 }, Re = {
|
|
|
1452
1503
|
},
|
|
1453
1504
|
emits: ["update:modelValue"],
|
|
1454
1505
|
setup(e, { emit: t }) {
|
|
1455
|
-
const l = e, a =
|
|
1456
|
-
|
|
1457
|
-
},
|
|
1458
|
-
|
|
1506
|
+
const l = e, a = ie(), o = t, s = h(() => `${a.modelValue.length} selected`), i = h(() => a.modelValue.length), m = (r) => {
|
|
1507
|
+
o("update:modelValue", r);
|
|
1508
|
+
}, y = (r) => {
|
|
1509
|
+
m(a.modelValue.filter((_) => _.id !== r));
|
|
1459
1510
|
};
|
|
1460
|
-
return (
|
|
1461
|
-
const
|
|
1462
|
-
return n(),
|
|
1463
|
-
class:
|
|
1511
|
+
return (r, _) => {
|
|
1512
|
+
const d = A;
|
|
1513
|
+
return n(), p("div", {
|
|
1514
|
+
class: B(r.orientation === "column" ? "row" : ""),
|
|
1464
1515
|
"data-cy": "multiselect-preview"
|
|
1465
1516
|
}, [
|
|
1466
|
-
|
|
1467
|
-
class:
|
|
1517
|
+
c("div", {
|
|
1518
|
+
class: B(r.orientation === "row" ? "col-12 mb-1" : "col"),
|
|
1468
1519
|
"data-cy": "multiselect-container"
|
|
1469
1520
|
}, [
|
|
1470
1521
|
v(et, {
|
|
1471
1522
|
"onUpdate:modelValue": [
|
|
1472
|
-
|
|
1473
|
-
|
|
1523
|
+
_[0] || (_[0] = (f) => m(f)),
|
|
1524
|
+
_[1] || (_[1] = (f) => r.$attrs.modelValue = f)
|
|
1474
1525
|
],
|
|
1475
|
-
modelValue:
|
|
1476
|
-
"limit-text":
|
|
1526
|
+
modelValue: r.$attrs.modelValue,
|
|
1527
|
+
"limit-text": s.value,
|
|
1477
1528
|
options: l.options
|
|
1478
1529
|
}, {
|
|
1479
|
-
tag:
|
|
1480
|
-
|
|
1530
|
+
tag: b(() => [
|
|
1531
|
+
T(g(""))
|
|
1481
1532
|
]),
|
|
1482
|
-
selection:
|
|
1483
|
-
|
|
1533
|
+
selection: b(() => [
|
|
1534
|
+
r.$attrs.modelValue.length > 0 ? (n(), p("span", tt, g(i.value) + " items selected", 1)) : F("", !0)
|
|
1484
1535
|
]),
|
|
1485
|
-
default:
|
|
1486
|
-
(n(!0),
|
|
1536
|
+
default: b(() => [
|
|
1537
|
+
(n(!0), p(M, null, L(r.$slots, (f, x) => k(r.$slots, x, { slot: x })), 256))
|
|
1487
1538
|
]),
|
|
1488
1539
|
_: 3
|
|
1489
1540
|
}, 8, ["modelValue", "limit-text", "options"]),
|
|
1490
|
-
k(
|
|
1541
|
+
k(r.$slots, "after-multi-select")
|
|
1491
1542
|
], 2),
|
|
1492
|
-
|
|
1493
|
-
class:
|
|
1543
|
+
c("div", {
|
|
1544
|
+
class: B(r.orientation === "row" ? "col-12" : "col"),
|
|
1494
1545
|
"data-cy": "options-preview"
|
|
1495
1546
|
}, [
|
|
1496
|
-
|
|
1497
|
-
style:
|
|
1547
|
+
c("div", {
|
|
1548
|
+
style: ye({ height: r.height }),
|
|
1498
1549
|
class: "overflow-auto"
|
|
1499
1550
|
}, [
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
(n(!0),
|
|
1503
|
-
key:
|
|
1551
|
+
c("div", at, [
|
|
1552
|
+
r.title ? (n(), p("div", lt, g(r.title), 1)) : F("", !0),
|
|
1553
|
+
(n(!0), p(M, null, L(r.$attrs.modelValue, (f) => (n(), p("div", {
|
|
1554
|
+
key: f.id,
|
|
1504
1555
|
class: "p-2 item d-flex justify-content-between align-items-center"
|
|
1505
1556
|
}, [
|
|
1506
|
-
k(
|
|
1507
|
-
|
|
1557
|
+
k(r.$slots, "list-item", { item: f }, () => [
|
|
1558
|
+
c("span", ot, g(f.shortLabel ? f.shortLabel : f.label), 1)
|
|
1508
1559
|
]),
|
|
1509
|
-
|
|
1560
|
+
r.canRemoveItemFromPreview ? (n(), w(d, {
|
|
1510
1561
|
key: 0,
|
|
1511
1562
|
link: "",
|
|
1512
1563
|
class: "m-0 p-0 d-flex align-items-center",
|
|
1513
|
-
onClick: (x) =>
|
|
1564
|
+
onClick: (x) => y(f.id)
|
|
1514
1565
|
}, {
|
|
1515
|
-
default:
|
|
1516
|
-
v(
|
|
1566
|
+
default: b(() => [
|
|
1567
|
+
v(u(C), {
|
|
1517
1568
|
icon: "bi:x",
|
|
1518
1569
|
class: "close-icon",
|
|
1519
|
-
"data-cy": `close-icon-${
|
|
1570
|
+
"data-cy": `close-icon-${f.id}`
|
|
1520
1571
|
}, null, 8, ["data-cy"])
|
|
1521
1572
|
]),
|
|
1522
1573
|
_: 2
|
|
1523
1574
|
}, 1032, ["onClick"])) : F("", !0)
|
|
1524
1575
|
]))), 128)),
|
|
1525
|
-
|
|
1576
|
+
r.$attrs.modelValue.length === 0 ? (n(), p("div", st, "No Items Selected.")) : F("", !0)
|
|
1526
1577
|
])
|
|
1527
1578
|
], 4)
|
|
1528
1579
|
], 2)
|
|
@@ -1542,9 +1593,9 @@ const Oe = { key: 0 }, Re = {
|
|
|
1542
1593
|
},
|
|
1543
1594
|
setup(e) {
|
|
1544
1595
|
const t = e;
|
|
1545
|
-
return (l, a) => (n(),
|
|
1546
|
-
|
|
1547
|
-
|
|
1596
|
+
return (l, a) => (n(), p("div", nt, [
|
|
1597
|
+
c("h1", it, g(t.title), 1),
|
|
1598
|
+
c("div", rt, [
|
|
1548
1599
|
k(l.$slots, "default")
|
|
1549
1600
|
])
|
|
1550
1601
|
]));
|
|
@@ -1617,7 +1668,7 @@ const Oe = { key: 0 }, Re = {
|
|
|
1617
1668
|
unstyled: { type: Boolean }
|
|
1618
1669
|
},
|
|
1619
1670
|
setup(e) {
|
|
1620
|
-
const t = e, l =
|
|
1671
|
+
const t = e, l = h(() => ({
|
|
1621
1672
|
dayLabel: ({ context: a }) => ({
|
|
1622
1673
|
class: [
|
|
1623
1674
|
"btn rounded-circle w-100 py-2",
|
|
@@ -1659,23 +1710,23 @@ const Oe = { key: 0 }, Re = {
|
|
|
1659
1710
|
]
|
|
1660
1711
|
})
|
|
1661
1712
|
}));
|
|
1662
|
-
return (a,
|
|
1663
|
-
const
|
|
1664
|
-
return n(),
|
|
1665
|
-
|
|
1713
|
+
return (a, o) => {
|
|
1714
|
+
const s = _e;
|
|
1715
|
+
return n(), p(M, null, [
|
|
1716
|
+
c("span", dt, [
|
|
1666
1717
|
k(a.$slots, "before")
|
|
1667
1718
|
]),
|
|
1668
|
-
v(
|
|
1669
|
-
R(v(
|
|
1719
|
+
v(s, S({ ...t, ...a.$attrs }, { pt: l.value }), null, 16, ["pt"]),
|
|
1720
|
+
R(v(u(C), {
|
|
1670
1721
|
"data-cy": "icon",
|
|
1671
1722
|
icon: "bi:calendar3",
|
|
1672
1723
|
width: "32",
|
|
1673
1724
|
height: "32",
|
|
1674
|
-
class:
|
|
1725
|
+
class: B(["ps-2", t.severity == null ? "text-primary" : `text-${t.severity}`])
|
|
1675
1726
|
}, null, 8, ["class"]), [
|
|
1676
|
-
[
|
|
1727
|
+
[H, t.showIcon]
|
|
1677
1728
|
]),
|
|
1678
|
-
|
|
1729
|
+
c("span", ut, [
|
|
1679
1730
|
k(a.$slots, "after")
|
|
1680
1731
|
])
|
|
1681
1732
|
], 64);
|
|
@@ -1688,12 +1739,12 @@ const Oe = { key: 0 }, Re = {
|
|
|
1688
1739
|
currentCount: {}
|
|
1689
1740
|
},
|
|
1690
1741
|
setup(e) {
|
|
1691
|
-
const t = e, l =
|
|
1692
|
-
return (a,
|
|
1693
|
-
class:
|
|
1694
|
-
}, "Remaining characters: " +
|
|
1742
|
+
const t = e, l = h(() => t.maxCount - t.currentCount);
|
|
1743
|
+
return (a, o) => (n(), p("div", {
|
|
1744
|
+
class: B(l.value < 0 ? "text-danger" : "")
|
|
1745
|
+
}, "Remaining characters: " + g(l.value), 3));
|
|
1695
1746
|
}
|
|
1696
|
-
}),
|
|
1747
|
+
}), mt = /* @__PURE__ */ c("hr", null, null, -1), pt = { class: "d-flex justify-content-between" }, Na = /* @__PURE__ */ $({
|
|
1697
1748
|
__name: "ForgeForm",
|
|
1698
1749
|
props: {
|
|
1699
1750
|
onSubmit: {},
|
|
@@ -1705,88 +1756,88 @@ const Oe = { key: 0 }, Re = {
|
|
|
1705
1756
|
hideCancel: { type: Boolean, default: !1 }
|
|
1706
1757
|
},
|
|
1707
1758
|
setup(e) {
|
|
1708
|
-
const t = e, l =
|
|
1759
|
+
const t = e, l = z(!1), a = z({
|
|
1709
1760
|
hasError: !1,
|
|
1710
1761
|
message: ""
|
|
1711
1762
|
});
|
|
1712
|
-
async function
|
|
1763
|
+
async function o() {
|
|
1713
1764
|
l.value = !0, a.value.hasError = !1;
|
|
1714
1765
|
try {
|
|
1715
1766
|
await t.onSubmit();
|
|
1716
|
-
} catch (
|
|
1717
|
-
a.value.hasError = !0,
|
|
1767
|
+
} catch (s) {
|
|
1768
|
+
a.value.hasError = !0, s.message && (a.value.message = s.message);
|
|
1718
1769
|
}
|
|
1719
1770
|
l.value = !1;
|
|
1720
1771
|
}
|
|
1721
|
-
return (
|
|
1722
|
-
const
|
|
1723
|
-
return n(),
|
|
1772
|
+
return (s, i) => {
|
|
1773
|
+
const m = A;
|
|
1774
|
+
return n(), p("form", S(s.$attrs, {
|
|
1724
1775
|
novalidate: "",
|
|
1725
1776
|
class: "position-relative shadow-sm border p-4 bg-white",
|
|
1726
|
-
onSubmit: K(
|
|
1777
|
+
onSubmit: K(o, ["prevent"])
|
|
1727
1778
|
}), [
|
|
1728
|
-
|
|
1729
|
-
k(
|
|
1730
|
-
|
|
1731
|
-
class:
|
|
1779
|
+
s.hideTitle ? F("", !0) : (n(), p(M, { key: 0 }, [
|
|
1780
|
+
k(s.$slots, "title", {}, () => [
|
|
1781
|
+
c("h3", {
|
|
1782
|
+
class: B(s.titleClass),
|
|
1732
1783
|
"data-cy": "form-title"
|
|
1733
|
-
},
|
|
1784
|
+
}, g(s.title), 3)
|
|
1734
1785
|
]),
|
|
1735
|
-
|
|
1786
|
+
mt
|
|
1736
1787
|
], 64)),
|
|
1737
|
-
a.value.hasError ? (n(), w(
|
|
1788
|
+
a.value.hasError ? (n(), w(X, {
|
|
1738
1789
|
key: 1,
|
|
1739
1790
|
severity: "danger",
|
|
1740
1791
|
"data-cy": "error"
|
|
1741
1792
|
}, {
|
|
1742
|
-
default:
|
|
1743
|
-
k(
|
|
1793
|
+
default: b(() => [
|
|
1794
|
+
k(s.$slots, "error", {
|
|
1744
1795
|
error: a.value.message
|
|
1745
1796
|
}, () => [
|
|
1746
|
-
|
|
1797
|
+
T(g(a.value.message), 1)
|
|
1747
1798
|
])
|
|
1748
1799
|
]),
|
|
1749
1800
|
_: 3
|
|
1750
1801
|
})) : F("", !0),
|
|
1751
|
-
k(
|
|
1752
|
-
|
|
1753
|
-
k(
|
|
1754
|
-
|
|
1802
|
+
k(s.$slots, "default"),
|
|
1803
|
+
c("div", pt, [
|
|
1804
|
+
k(s.$slots, "cancel", {}, () => [
|
|
1805
|
+
s.hideCancel ? F("", !0) : (n(), w(m, {
|
|
1755
1806
|
key: 0,
|
|
1756
1807
|
"data-cy": "cancel-btn",
|
|
1757
1808
|
type: "reset",
|
|
1758
1809
|
severity: "secondary",
|
|
1759
1810
|
outlined: "",
|
|
1760
|
-
onClick:
|
|
1811
|
+
onClick: i[0] || (i[0] = (y) => s.$emit("cancel"))
|
|
1761
1812
|
}, {
|
|
1762
|
-
default:
|
|
1763
|
-
|
|
1813
|
+
default: b(() => [
|
|
1814
|
+
T(g(s.cancelText), 1)
|
|
1764
1815
|
]),
|
|
1765
1816
|
_: 1
|
|
1766
1817
|
}))
|
|
1767
1818
|
]),
|
|
1768
|
-
k(
|
|
1769
|
-
v(
|
|
1819
|
+
k(s.$slots, "submit", { submit: o }, () => [
|
|
1820
|
+
v(m, {
|
|
1770
1821
|
"data-cy": "submit-btn",
|
|
1771
1822
|
type: "submit",
|
|
1772
1823
|
severity: "primary",
|
|
1773
1824
|
class: "ms-auto"
|
|
1774
1825
|
}, {
|
|
1775
|
-
default:
|
|
1776
|
-
|
|
1826
|
+
default: b(() => [
|
|
1827
|
+
T(g(s.submitText), 1)
|
|
1777
1828
|
]),
|
|
1778
1829
|
_: 1
|
|
1779
1830
|
})
|
|
1780
1831
|
])
|
|
1781
1832
|
]),
|
|
1782
|
-
l.value ? (n(), w(
|
|
1833
|
+
l.value ? (n(), w(ue, {
|
|
1783
1834
|
key: 2,
|
|
1784
1835
|
"data-cy": "loading-spinner"
|
|
1785
1836
|
})) : F("", !0)
|
|
1786
1837
|
], 16);
|
|
1787
1838
|
};
|
|
1788
1839
|
}
|
|
1789
|
-
}), yt = { class: "d-flex flex-column" },
|
|
1840
|
+
}), yt = { class: "d-flex flex-column" }, vt = ["for"], Ea = /* @__PURE__ */ $({
|
|
1790
1841
|
__name: "ForgeFormField",
|
|
1791
1842
|
props: {
|
|
1792
1843
|
name: {},
|
|
@@ -1797,56 +1848,56 @@ const Oe = { key: 0 }, Re = {
|
|
|
1797
1848
|
placeholder: { default: "" }
|
|
1798
1849
|
},
|
|
1799
1850
|
setup(e) {
|
|
1800
|
-
const t = e, { errors: l, value: a, errorMessage:
|
|
1801
|
-
return (
|
|
1802
|
-
const
|
|
1803
|
-
return n(),
|
|
1804
|
-
t.type !== "checkbox" ? (n(),
|
|
1851
|
+
const t = e, { errors: l, value: a, errorMessage: o } = W(() => t.name, t.rules), s = h(() => l.value.length > 0);
|
|
1852
|
+
return (i, m) => {
|
|
1853
|
+
const y = xe, r = $e, _ = le;
|
|
1854
|
+
return n(), p("div", yt, [
|
|
1855
|
+
t.type !== "checkbox" ? (n(), p("label", {
|
|
1805
1856
|
key: 0,
|
|
1806
1857
|
for: t.name
|
|
1807
|
-
},
|
|
1808
|
-
t.type === "checkbox" ? (n(), w(
|
|
1858
|
+
}, g(t.label), 9, vt)) : F("", !0),
|
|
1859
|
+
t.type === "checkbox" ? (n(), w(Ue, S({
|
|
1809
1860
|
key: 1,
|
|
1810
1861
|
id: t.name,
|
|
1811
|
-
rules:
|
|
1862
|
+
rules: i.rules,
|
|
1812
1863
|
label: t.label
|
|
1813
|
-
},
|
|
1864
|
+
}, i.$attrs), null, 16, ["id", "rules", "label"])) : t.type === "number" ? (n(), w(u(re), S({
|
|
1814
1865
|
key: 2,
|
|
1815
1866
|
id: t.name,
|
|
1816
1867
|
placeholder: t.placeholder,
|
|
1817
|
-
modelValue:
|
|
1818
|
-
"onUpdate:modelValue":
|
|
1819
|
-
"input-class": { "is-invalid":
|
|
1820
|
-
class: { "is-invalid":
|
|
1821
|
-
},
|
|
1868
|
+
modelValue: u(a),
|
|
1869
|
+
"onUpdate:modelValue": m[0] || (m[0] = (d) => j(a) ? a.value = d : null),
|
|
1870
|
+
"input-class": { "is-invalid": s.value },
|
|
1871
|
+
class: { "is-invalid": s.value }
|
|
1872
|
+
}, i.$attrs), null, 16, ["id", "placeholder", "modelValue", "input-class", "class"])) : t.type === "textarea" ? (n(), w(y, S({
|
|
1822
1873
|
key: 3,
|
|
1823
1874
|
id: t.name,
|
|
1824
1875
|
placeholder: t.placeholder,
|
|
1825
|
-
modelValue:
|
|
1826
|
-
"onUpdate:modelValue":
|
|
1827
|
-
class: { "is-invalid":
|
|
1828
|
-
},
|
|
1876
|
+
modelValue: u(a),
|
|
1877
|
+
"onUpdate:modelValue": m[1] || (m[1] = (d) => j(a) ? a.value = d : null),
|
|
1878
|
+
class: { "is-invalid": s.value }
|
|
1879
|
+
}, i.$attrs), null, 16, ["id", "placeholder", "modelValue", "class"])) : t.type === "mask" ? (n(), w(r, S({
|
|
1829
1880
|
key: 4,
|
|
1830
1881
|
id: t.name,
|
|
1831
1882
|
placeholder: t.placeholder,
|
|
1832
|
-
modelValue:
|
|
1833
|
-
"onUpdate:modelValue":
|
|
1883
|
+
modelValue: u(a),
|
|
1884
|
+
"onUpdate:modelValue": m[2] || (m[2] = (d) => j(a) ? a.value = d : null),
|
|
1834
1885
|
mask: t.mask,
|
|
1835
|
-
class: { "is-invalid":
|
|
1836
|
-
},
|
|
1886
|
+
class: { "is-invalid": s.value }
|
|
1887
|
+
}, i.$attrs), null, 16, ["id", "placeholder", "modelValue", "mask", "class"])) : t.type === "text" ? (n(), w(_, S({
|
|
1837
1888
|
key: 5,
|
|
1838
1889
|
id: t.name,
|
|
1839
1890
|
placeholder: t.placeholder,
|
|
1840
|
-
modelValue:
|
|
1841
|
-
"onUpdate:modelValue":
|
|
1842
|
-
class: { "is-invalid":
|
|
1843
|
-
},
|
|
1844
|
-
t.type !== "checkbox" ? R((n(),
|
|
1891
|
+
modelValue: u(a),
|
|
1892
|
+
"onUpdate:modelValue": m[3] || (m[3] = (d) => j(a) ? a.value = d : null),
|
|
1893
|
+
class: { "is-invalid": s.value }
|
|
1894
|
+
}, i.$attrs), null, 16, ["id", "placeholder", "modelValue", "class"])) : F("", !0),
|
|
1895
|
+
t.type !== "checkbox" ? R((n(), p("small", {
|
|
1845
1896
|
key: 6,
|
|
1846
1897
|
"data-cy": "error",
|
|
1847
1898
|
class: "invalid-feedback"
|
|
1848
|
-
},
|
|
1849
|
-
[
|
|
1899
|
+
}, g(u(o)), 513)), [
|
|
1900
|
+
[H, s.value]
|
|
1850
1901
|
]) : F("", !0)
|
|
1851
1902
|
]);
|
|
1852
1903
|
};
|
|
@@ -1879,15 +1930,15 @@ const Oe = { key: 0 }, Re = {
|
|
|
1879
1930
|
unstyled: { type: Boolean }
|
|
1880
1931
|
},
|
|
1881
1932
|
setup(e) {
|
|
1882
|
-
const t = e, { errors: l, value: a, errorMessage:
|
|
1933
|
+
const t = e, { errors: l, value: a, errorMessage: o } = W(() => t.name, t.rules);
|
|
1883
1934
|
a.value = t.modelValue;
|
|
1884
|
-
const
|
|
1885
|
-
container: ({ props:
|
|
1935
|
+
const s = h(() => l.value.length > 0), i = h(() => ({
|
|
1936
|
+
container: ({ props: m }) => ({
|
|
1886
1937
|
class: [
|
|
1887
1938
|
"form-control mb-0",
|
|
1888
1939
|
{
|
|
1889
|
-
disabled:
|
|
1890
|
-
"is-invalid":
|
|
1940
|
+
disabled: m.disabled,
|
|
1941
|
+
"is-invalid": s.value
|
|
1891
1942
|
}
|
|
1892
1943
|
]
|
|
1893
1944
|
}),
|
|
@@ -1909,35 +1960,35 @@ const Oe = { key: 0 }, Re = {
|
|
|
1909
1960
|
]
|
|
1910
1961
|
}
|
|
1911
1962
|
}));
|
|
1912
|
-
return (
|
|
1913
|
-
const
|
|
1914
|
-
return n(),
|
|
1915
|
-
v(
|
|
1916
|
-
pt:
|
|
1917
|
-
"model-value":
|
|
1918
|
-
"onUpdate:modelValue":
|
|
1963
|
+
return (m, y) => {
|
|
1964
|
+
const r = Fe;
|
|
1965
|
+
return n(), p(M, null, [
|
|
1966
|
+
v(r, S({ ...t, ...m.$attrs }, {
|
|
1967
|
+
pt: i.value,
|
|
1968
|
+
"model-value": u(a),
|
|
1969
|
+
"onUpdate:modelValue": y[0] || (y[0] = (_) => j(a) ? a.value = _ : null)
|
|
1919
1970
|
}), {
|
|
1920
|
-
removetokenicon:
|
|
1921
|
-
R(v(
|
|
1971
|
+
removetokenicon: b(({ removeCallback: _ }) => [
|
|
1972
|
+
R(v(u(C), {
|
|
1922
1973
|
icon: "bi:x",
|
|
1923
1974
|
class: "cursor-pointer",
|
|
1924
|
-
onClick:
|
|
1975
|
+
onClick: _
|
|
1925
1976
|
}, null, 8, ["onClick"]), [
|
|
1926
|
-
[
|
|
1977
|
+
[H, !t.disabled]
|
|
1927
1978
|
])
|
|
1928
1979
|
]),
|
|
1929
1980
|
_: 1
|
|
1930
1981
|
}, 16, ["pt", "model-value"]),
|
|
1931
|
-
R(
|
|
1982
|
+
R(c("small", {
|
|
1932
1983
|
"data-cy": "error",
|
|
1933
1984
|
class: "text-invalid"
|
|
1934
|
-
},
|
|
1935
|
-
[
|
|
1985
|
+
}, g(u(o)), 513), [
|
|
1986
|
+
[H, s.value]
|
|
1936
1987
|
])
|
|
1937
1988
|
], 64);
|
|
1938
1989
|
};
|
|
1939
1990
|
}
|
|
1940
|
-
}),
|
|
1991
|
+
}), bt = /* @__PURE__ */ $({
|
|
1941
1992
|
__name: "ForgeProgressBar",
|
|
1942
1993
|
props: {
|
|
1943
1994
|
severity: { default: "primary" },
|
|
@@ -1952,7 +2003,7 @@ const Oe = { key: 0 }, Re = {
|
|
|
1952
2003
|
unstyled: { type: Boolean }
|
|
1953
2004
|
},
|
|
1954
2005
|
setup(e) {
|
|
1955
|
-
const t = e, l =
|
|
2006
|
+
const t = e, l = h(() => t.striped ? "progress-bar-striped" : null), a = h(() => t.animate ? "progress-bar-animated" : null), o = h(() => {
|
|
1956
2007
|
switch (t.severity) {
|
|
1957
2008
|
case "secondary":
|
|
1958
2009
|
return "bg-secondary";
|
|
@@ -1969,25 +2020,25 @@ const Oe = { key: 0 }, Re = {
|
|
|
1969
2020
|
default:
|
|
1970
2021
|
return "bg-primary";
|
|
1971
2022
|
}
|
|
1972
|
-
}),
|
|
2023
|
+
}), s = h(() => ({
|
|
1973
2024
|
root: {
|
|
1974
2025
|
style: t.pixelWidth ? `width: ${t.pixelWidth}px` : ""
|
|
1975
2026
|
},
|
|
1976
2027
|
value: {
|
|
1977
|
-
class: [
|
|
2028
|
+
class: [o.value, l.value, a.value]
|
|
1978
2029
|
}
|
|
1979
2030
|
}));
|
|
1980
|
-
return (
|
|
1981
|
-
const
|
|
1982
|
-
return n(), w(
|
|
1983
|
-
default:
|
|
1984
|
-
k(
|
|
2031
|
+
return (i, m) => {
|
|
2032
|
+
const y = Be;
|
|
2033
|
+
return n(), w(y, S({ ...i.$attrs, ...t }, { pt: s.value }), {
|
|
2034
|
+
default: b(() => [
|
|
2035
|
+
k(i.$slots, "default")
|
|
1985
2036
|
]),
|
|
1986
2037
|
_: 3
|
|
1987
2038
|
}, 16, ["pt"]);
|
|
1988
2039
|
};
|
|
1989
2040
|
}
|
|
1990
|
-
}), ft = { class: "value text-light w-100 text-center" },
|
|
2041
|
+
}), ft = { class: "value text-light w-100 text-center" }, La = /* @__PURE__ */ $({
|
|
1991
2042
|
__name: "ForgeStatWidget",
|
|
1992
2043
|
props: {
|
|
1993
2044
|
size: { default: "md" },
|
|
@@ -1995,10 +2046,10 @@ const Oe = { key: 0 }, Re = {
|
|
|
1995
2046
|
},
|
|
1996
2047
|
setup(e) {
|
|
1997
2048
|
const t = e;
|
|
1998
|
-
return (l, a) => (n(),
|
|
2049
|
+
return (l, a) => (n(), p("div", S(l.$attrs, {
|
|
1999
2050
|
class: `d-flex shadow m-2 align-items-center widget--${t.size} bg-${t.severity}`
|
|
2000
2051
|
}), [
|
|
2001
|
-
|
|
2052
|
+
c("span", ft, [
|
|
2002
2053
|
k(l.$slots, "default")
|
|
2003
2054
|
])
|
|
2004
2055
|
], 16));
|
|
@@ -2022,101 +2073,101 @@ const Oe = { key: 0 }, Re = {
|
|
|
2022
2073
|
},
|
|
2023
2074
|
emits: ["update:currentStep"],
|
|
2024
2075
|
setup(e, { emit: t }) {
|
|
2025
|
-
const l = t, a = e,
|
|
2076
|
+
const l = t, a = e, o = z(a.currentStep), s = () => {
|
|
2026
2077
|
do
|
|
2027
|
-
|
|
2028
|
-
while (a.model[
|
|
2029
|
-
l("update:currentStep",
|
|
2030
|
-
},
|
|
2031
|
-
if (
|
|
2078
|
+
o.value--;
|
|
2079
|
+
while (a.model[o.value].disabled);
|
|
2080
|
+
l("update:currentStep", o.value);
|
|
2081
|
+
}, i = () => {
|
|
2082
|
+
if (o.value < a.model.length - 1)
|
|
2032
2083
|
do
|
|
2033
|
-
|
|
2034
|
-
while (a.model[
|
|
2035
|
-
l("update:currentStep",
|
|
2036
|
-
},
|
|
2037
|
-
const
|
|
2038
|
-
return !(
|
|
2039
|
-
}),
|
|
2040
|
-
menuitem: (
|
|
2084
|
+
o.value++;
|
|
2085
|
+
while (a.model[o.value].disabled);
|
|
2086
|
+
l("update:currentStep", o.value);
|
|
2087
|
+
}, m = h(() => {
|
|
2088
|
+
const r = a.model.findIndex((_) => !_.disabled);
|
|
2089
|
+
return !(r < o.value && r > -1);
|
|
2090
|
+
}), y = h(() => ({
|
|
2091
|
+
menuitem: (r) => ({
|
|
2041
2092
|
class: [{
|
|
2042
|
-
"cursor-pointer": !
|
|
2093
|
+
"cursor-pointer": !r.context.disabled
|
|
2043
2094
|
}]
|
|
2044
2095
|
}),
|
|
2045
|
-
step: (
|
|
2096
|
+
step: (r) => ({
|
|
2046
2097
|
class: [
|
|
2047
2098
|
"d-flex align-items-center justify-content-center mb-2 step",
|
|
2048
2099
|
{
|
|
2049
|
-
inactive:
|
|
2050
|
-
"bg-primary text-white":
|
|
2051
|
-
"bg-secondary text-white":
|
|
2052
|
-
"bg-success text-white":
|
|
2053
|
-
"bg-warning text-white":
|
|
2054
|
-
"bg-danger text-white":
|
|
2055
|
-
"bg-info text-white":
|
|
2100
|
+
inactive: r.context.disabled,
|
|
2101
|
+
"bg-primary text-white": r.context.index === o.value && (a.severity === void 0 || a.severity === "primary"),
|
|
2102
|
+
"bg-secondary text-white": r.context.index === o.value && a.severity === "secondary",
|
|
2103
|
+
"bg-success text-white": r.context.index === o.value && a.severity === "success",
|
|
2104
|
+
"bg-warning text-white": r.context.index === o.value && a.severity === "warning",
|
|
2105
|
+
"bg-danger text-white": r.context.index === o.value && a.severity === "danger",
|
|
2106
|
+
"bg-info text-white": r.context.index === o.value && a.severity === "info"
|
|
2056
2107
|
}
|
|
2057
2108
|
]
|
|
2058
2109
|
}),
|
|
2059
|
-
label: (
|
|
2110
|
+
label: (r) => ({
|
|
2060
2111
|
class: [
|
|
2061
2112
|
"h5",
|
|
2062
2113
|
{
|
|
2063
|
-
"border-bottom border-2 border-primary":
|
|
2064
|
-
"border-bottom border-2 border-secondary":
|
|
2065
|
-
"border-bottom border-2 border-success":
|
|
2066
|
-
"border-bottom border-2 border-warning":
|
|
2067
|
-
"border-bottom border-2 border-danger":
|
|
2068
|
-
"border-bottom border-2 border-info":
|
|
2114
|
+
"border-bottom border-2 border-primary": r.context.index === o.value && (a.severity === void 0 || a.severity === "primary"),
|
|
2115
|
+
"border-bottom border-2 border-secondary": r.context.index === o.value && a.severity === "secondary",
|
|
2116
|
+
"border-bottom border-2 border-success": r.context.index === o.value && a.severity === "success",
|
|
2117
|
+
"border-bottom border-2 border-warning": r.context.index === o.value && a.severity === "warning",
|
|
2118
|
+
"border-bottom border-2 border-danger": r.context.index === o.value && a.severity === "danger",
|
|
2119
|
+
"border-bottom border-2 border-info": r.context.index === o.value && a.severity === "info"
|
|
2069
2120
|
}
|
|
2070
2121
|
]
|
|
2071
2122
|
})
|
|
2072
2123
|
}));
|
|
2073
|
-
return (
|
|
2074
|
-
const
|
|
2075
|
-
return n(),
|
|
2076
|
-
|
|
2077
|
-
v(
|
|
2124
|
+
return (r, _) => {
|
|
2125
|
+
const d = A, f = Ce, x = Se;
|
|
2126
|
+
return n(), p("div", gt, [
|
|
2127
|
+
c("div", ht, [
|
|
2128
|
+
v(d, {
|
|
2078
2129
|
severity: a.severity,
|
|
2079
|
-
disabled:
|
|
2080
|
-
onClick:
|
|
2130
|
+
disabled: m.value,
|
|
2131
|
+
onClick: s,
|
|
2081
2132
|
class: "rounded-circle py-2 me-4",
|
|
2082
2133
|
"data-cy": "back-button"
|
|
2083
2134
|
}, {
|
|
2084
|
-
default:
|
|
2085
|
-
v(
|
|
2135
|
+
default: b(() => [
|
|
2136
|
+
v(u(C), {
|
|
2086
2137
|
icon: "bi:chevron-left",
|
|
2087
2138
|
class: "mb-1"
|
|
2088
2139
|
})
|
|
2089
2140
|
]),
|
|
2090
2141
|
_: 1
|
|
2091
2142
|
}, 8, ["severity", "disabled"]),
|
|
2092
|
-
v(
|
|
2093
|
-
"active-step":
|
|
2094
|
-
"onUpdate:activeStep":
|
|
2143
|
+
v(f, {
|
|
2144
|
+
"active-step": o.value,
|
|
2145
|
+
"onUpdate:activeStep": _[0] || (_[0] = (I) => o.value = I),
|
|
2095
2146
|
model: a.model,
|
|
2096
|
-
pt:
|
|
2147
|
+
pt: y.value,
|
|
2097
2148
|
readonly: !1
|
|
2098
2149
|
}, null, 8, ["active-step", "model", "pt"])
|
|
2099
2150
|
]),
|
|
2100
2151
|
v(x),
|
|
2101
|
-
(n(!0),
|
|
2102
|
-
key:
|
|
2152
|
+
(n(!0), p(M, null, L(a.model, (I, V) => (n(), p("div", {
|
|
2153
|
+
key: V,
|
|
2103
2154
|
class: "w-100"
|
|
2104
2155
|
}, [
|
|
2105
|
-
|
|
2156
|
+
V === o.value ? k(r.$slots, I.key ?? I.label, {
|
|
2106
2157
|
key: 0,
|
|
2107
|
-
nextStep:
|
|
2108
|
-
previousStep:
|
|
2158
|
+
nextStep: i,
|
|
2159
|
+
previousStep: s
|
|
2109
2160
|
}, () => [
|
|
2110
|
-
v(
|
|
2161
|
+
v(X, {
|
|
2111
2162
|
severity: "info",
|
|
2112
2163
|
"data-cy": "alert"
|
|
2113
2164
|
}, {
|
|
2114
|
-
default:
|
|
2115
|
-
|
|
2116
|
-
v(
|
|
2165
|
+
default: b(() => [
|
|
2166
|
+
T(" Please add Slot Content for the key " + g(I.key ?? I.label) + " ", 1),
|
|
2167
|
+
v(d, {
|
|
2117
2168
|
severity: "primary",
|
|
2118
2169
|
label: "Next",
|
|
2119
|
-
onClick:
|
|
2170
|
+
onClick: i,
|
|
2120
2171
|
class: "ms-2"
|
|
2121
2172
|
})
|
|
2122
2173
|
]),
|
|
@@ -2127,7 +2178,7 @@ const Oe = { key: 0 }, Re = {
|
|
|
2127
2178
|
]);
|
|
2128
2179
|
};
|
|
2129
2180
|
}
|
|
2130
|
-
}), wt = { class: "p-4 text-wrap w-100" },
|
|
2181
|
+
}), wt = { class: "p-4 text-wrap w-100" }, kt = { class: "p-4 text-wrap w-100" }, Ha = /* @__PURE__ */ $({
|
|
2131
2182
|
__name: "ForgeTile",
|
|
2132
2183
|
props: {
|
|
2133
2184
|
severity: { default: "primary" },
|
|
@@ -2135,45 +2186,45 @@ const Oe = { key: 0 }, Re = {
|
|
|
2135
2186
|
clickable: { type: Boolean, default: !1 }
|
|
2136
2187
|
},
|
|
2137
2188
|
setup(e) {
|
|
2138
|
-
const t = e, l =
|
|
2139
|
-
return (
|
|
2140
|
-
const
|
|
2141
|
-
return t.clickable ? (n(), w(
|
|
2189
|
+
const t = e, l = h(() => `${t.severity === void 0 ? "tile-primary" : `tile-${t.severity}`} ${t.barPosition === "none" ? "border-0" : `tile-bar-${t.barPosition}`}`), a = h(() => `${t.severity === void 0 ? "tile-primary border-primary" : `tile-${t.severity} border-${t.severity}`} ${t.barPosition === "none" ? "" : `tile-bar-${t.barPosition}`}`);
|
|
2190
|
+
return (o, s) => {
|
|
2191
|
+
const i = A;
|
|
2192
|
+
return t.clickable ? (n(), w(i, {
|
|
2142
2193
|
key: 0,
|
|
2143
|
-
class:
|
|
2194
|
+
class: B(["d-flex w-100 p-0 text-body", l.value]),
|
|
2144
2195
|
severity: t.severity,
|
|
2145
2196
|
unstyled: "",
|
|
2146
2197
|
"data-cy": "button-tile"
|
|
2147
2198
|
}, {
|
|
2148
|
-
default:
|
|
2149
|
-
|
|
2150
|
-
k(
|
|
2151
|
-
|
|
2199
|
+
default: b(() => [
|
|
2200
|
+
c("div", wt, [
|
|
2201
|
+
k(o.$slots, "default", {}, () => [
|
|
2202
|
+
T("Tile Content")
|
|
2152
2203
|
])
|
|
2153
2204
|
])
|
|
2154
2205
|
]),
|
|
2155
2206
|
_: 3
|
|
2156
|
-
}, 8, ["severity", "class"])) : (n(),
|
|
2207
|
+
}, 8, ["severity", "class"])) : (n(), p("div", {
|
|
2157
2208
|
key: 1,
|
|
2158
|
-
class:
|
|
2209
|
+
class: B(["d-flex w-100", a.value]),
|
|
2159
2210
|
"data-cy": "tile"
|
|
2160
2211
|
}, [
|
|
2161
|
-
|
|
2162
|
-
k(
|
|
2163
|
-
|
|
2212
|
+
c("div", kt, [
|
|
2213
|
+
k(o.$slots, "default", {}, () => [
|
|
2214
|
+
T("Tile Content")
|
|
2164
2215
|
])
|
|
2165
2216
|
])
|
|
2166
2217
|
], 2));
|
|
2167
2218
|
};
|
|
2168
2219
|
}
|
|
2169
2220
|
});
|
|
2170
|
-
function
|
|
2221
|
+
function Y(e, t) {
|
|
2171
2222
|
return e > 1 ? `${t}s` : t;
|
|
2172
2223
|
}
|
|
2173
|
-
const
|
|
2224
|
+
const _t = {
|
|
2174
2225
|
class: "d-flex justify-content-start align-items-baseline",
|
|
2175
2226
|
"data-cy": "pagination-header"
|
|
2176
|
-
},
|
|
2227
|
+
}, $t = { class: "ms-2" }, xt = { key: 0 }, Ft = /* @__PURE__ */ c("span", { class: "mx-2" }, "|", -1), Bt = {
|
|
2177
2228
|
class: "w-auto",
|
|
2178
2229
|
"data-cy": "total"
|
|
2179
2230
|
}, St = /* @__PURE__ */ $({
|
|
@@ -2185,31 +2236,31 @@ const kt = {
|
|
|
2185
2236
|
},
|
|
2186
2237
|
emits: ["update:perPage"],
|
|
2187
2238
|
setup(e, { emit: t }) {
|
|
2188
|
-
const l = t, a = e,
|
|
2189
|
-
l("update:perPage",
|
|
2190
|
-
},
|
|
2191
|
-
const
|
|
2192
|
-
return `${
|
|
2239
|
+
const l = t, a = e, o = (i) => {
|
|
2240
|
+
l("update:perPage", i.value);
|
|
2241
|
+
}, s = h(() => {
|
|
2242
|
+
const i = Math.ceil(a.total / a.perPage);
|
|
2243
|
+
return `${i} ${Y(i, "page")}`;
|
|
2193
2244
|
});
|
|
2194
|
-
return (
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
v(
|
|
2245
|
+
return (i, m) => (n(), p("div", _t, [
|
|
2246
|
+
T(" Number of results per page "),
|
|
2247
|
+
c("div", $t, [
|
|
2248
|
+
v(u(oe), {
|
|
2198
2249
|
options: a.pageSizes,
|
|
2199
2250
|
"model-value": a.perPage,
|
|
2200
|
-
onChange:
|
|
2251
|
+
onChange: m[0] || (m[0] = (y) => o(y))
|
|
2201
2252
|
}, null, 8, ["options", "model-value"])
|
|
2202
2253
|
]),
|
|
2203
|
-
a.total ? (n(),
|
|
2254
|
+
a.total ? (n(), p("div", xt, [
|
|
2204
2255
|
Ft,
|
|
2205
|
-
|
|
2256
|
+
c("span", Bt, g(a.total) + " " + g(u(Y)(a.total, "result")) + " across " + g(s.value), 1)
|
|
2206
2257
|
])) : F("", !0)
|
|
2207
2258
|
]));
|
|
2208
2259
|
}
|
|
2209
|
-
}), Ct = { "data-cy": "above-table-slot" }, Vt = { class: "d-flex" },
|
|
2260
|
+
}), Ct = { "data-cy": "above-table-slot" }, Vt = { class: "d-flex" }, It = { class: "d-flex align-items-end mb-2" }, zt = { key: 0 }, Tt = { class: "ms-auto" }, Mt = {
|
|
2210
2261
|
class: "d-flex",
|
|
2211
2262
|
"data-cy": "legacy-page-size"
|
|
2212
|
-
}, Pt = /* @__PURE__ */
|
|
2263
|
+
}, Pt = /* @__PURE__ */ c("span", { class: "me-2 my-auto text-nowrap" }, "Page Size:", -1), Ut = { "data-cy": "legacy-total" }, qa = /* @__PURE__ */ $({
|
|
2213
2264
|
__name: "ForgeTable",
|
|
2214
2265
|
props: {
|
|
2215
2266
|
value: {},
|
|
@@ -2288,117 +2339,117 @@ const kt = {
|
|
|
2288
2339
|
},
|
|
2289
2340
|
emits: ["update:filters"],
|
|
2290
2341
|
setup(e, { emit: t }) {
|
|
2291
|
-
const l = t, a = e,
|
|
2292
|
-
for (const
|
|
2293
|
-
a.filters[
|
|
2294
|
-
|
|
2295
|
-
},
|
|
2296
|
-
l("update:filters",
|
|
2297
|
-
},
|
|
2298
|
-
const
|
|
2299
|
-
return `${
|
|
2300
|
-
}),
|
|
2301
|
-
|
|
2342
|
+
const l = t, a = e, o = z([10, 20, 50, 100]), s = z(20), i = z(), m = () => {
|
|
2343
|
+
for (const d in a.filters)
|
|
2344
|
+
a.filters[d].value = null;
|
|
2345
|
+
y(a.filters);
|
|
2346
|
+
}, y = (d) => {
|
|
2347
|
+
l("update:filters", d);
|
|
2348
|
+
}, r = h(() => {
|
|
2349
|
+
const d = Math.ceil((a.total ?? a.value.length) / s.value);
|
|
2350
|
+
return `${d} ${Y(d, "page")}`;
|
|
2351
|
+
}), _ = () => {
|
|
2352
|
+
i.value.exportCSV();
|
|
2302
2353
|
};
|
|
2303
|
-
return (
|
|
2304
|
-
|
|
2305
|
-
k(
|
|
2354
|
+
return (d, f) => (n(), p(M, null, [
|
|
2355
|
+
c("span", Ct, [
|
|
2356
|
+
k(d.$slots, "above-table")
|
|
2306
2357
|
]),
|
|
2307
|
-
v(
|
|
2308
|
-
rows:
|
|
2309
|
-
"total-records":
|
|
2358
|
+
v(u(Ve), S({ class: "w-100" }, { ...a, ...d.$attrs }, {
|
|
2359
|
+
rows: s.value,
|
|
2360
|
+
"total-records": d.total,
|
|
2310
2361
|
"filter-display": a.filters ? "row" : void 0,
|
|
2311
2362
|
ref_key: "forgeTable",
|
|
2312
|
-
ref:
|
|
2313
|
-
"onUpdate:filters":
|
|
2363
|
+
ref: i,
|
|
2364
|
+
"onUpdate:filters": y,
|
|
2314
2365
|
"data-cy": "table"
|
|
2315
|
-
}),
|
|
2316
|
-
header:
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2366
|
+
}), J({
|
|
2367
|
+
header: b(() => [
|
|
2368
|
+
c("div", Vt, [
|
|
2369
|
+
c("div", It, [
|
|
2370
|
+
d.paginator && !d.legacyPaginationFooter ? (n(), p("span", zt, [
|
|
2320
2371
|
v(St, {
|
|
2321
|
-
total:
|
|
2322
|
-
"page-sizes":
|
|
2323
|
-
"per-page":
|
|
2324
|
-
"onUpdate:perPage":
|
|
2372
|
+
total: d.total ?? d.value.length,
|
|
2373
|
+
"page-sizes": o.value,
|
|
2374
|
+
"per-page": s.value,
|
|
2375
|
+
"onUpdate:perPage": f[0] || (f[0] = (x) => s.value = x)
|
|
2325
2376
|
}, null, 8, ["total", "page-sizes", "per-page"])
|
|
2326
2377
|
])) : F("", !0)
|
|
2327
2378
|
]),
|
|
2328
|
-
|
|
2329
|
-
|
|
2379
|
+
c("div", Tt, [
|
|
2380
|
+
d.showClearButton ? (n(), w(u(A), {
|
|
2330
2381
|
key: 0,
|
|
2331
2382
|
outlined: "",
|
|
2332
|
-
class:
|
|
2333
|
-
onClick:
|
|
2383
|
+
class: B(d.showExporterButton ? "me-2" : ""),
|
|
2384
|
+
onClick: m,
|
|
2334
2385
|
"data-cy": "clear-all"
|
|
2335
2386
|
}, {
|
|
2336
|
-
default:
|
|
2337
|
-
v(
|
|
2387
|
+
default: b(() => [
|
|
2388
|
+
v(u(C), {
|
|
2338
2389
|
icon: "bi:funnel-fill",
|
|
2339
2390
|
width: "24",
|
|
2340
2391
|
height: "24"
|
|
2341
2392
|
}),
|
|
2342
|
-
|
|
2393
|
+
T(" Clear ")
|
|
2343
2394
|
]),
|
|
2344
2395
|
_: 1
|
|
2345
2396
|
}, 8, ["class"])) : F("", !0),
|
|
2346
|
-
|
|
2397
|
+
d.showExporterButton ? (n(), w(u(A), {
|
|
2347
2398
|
key: 1,
|
|
2348
2399
|
outlined: "",
|
|
2349
|
-
onClick:
|
|
2400
|
+
onClick: _,
|
|
2350
2401
|
"data-cy": "exporter"
|
|
2351
2402
|
}, {
|
|
2352
|
-
default:
|
|
2353
|
-
v(
|
|
2403
|
+
default: b(() => [
|
|
2404
|
+
v(u(C), {
|
|
2354
2405
|
icon: "typcn:export",
|
|
2355
2406
|
width: "24",
|
|
2356
2407
|
height: "24"
|
|
2357
2408
|
}),
|
|
2358
|
-
|
|
2409
|
+
T(" Export ")
|
|
2359
2410
|
]),
|
|
2360
2411
|
_: 1
|
|
2361
2412
|
})) : F("", !0)
|
|
2362
2413
|
])
|
|
2363
2414
|
])
|
|
2364
2415
|
]),
|
|
2365
|
-
default:
|
|
2366
|
-
k(
|
|
2416
|
+
default: b(() => [
|
|
2417
|
+
k(d.$slots, "default")
|
|
2367
2418
|
]),
|
|
2368
2419
|
_: 2
|
|
2369
2420
|
}, [
|
|
2370
|
-
|
|
2371
|
-
name:
|
|
2372
|
-
fn:
|
|
2373
|
-
k(
|
|
2421
|
+
L(d.$slots, (x, I) => ({
|
|
2422
|
+
name: I,
|
|
2423
|
+
fn: b((V) => [
|
|
2424
|
+
k(d.$slots, I, te(ae(V || {})))
|
|
2374
2425
|
])
|
|
2375
2426
|
})),
|
|
2376
|
-
|
|
2427
|
+
d.legacyPaginationFooter ? {
|
|
2377
2428
|
name: "paginatorstart",
|
|
2378
|
-
fn:
|
|
2379
|
-
|
|
2429
|
+
fn: b(() => [
|
|
2430
|
+
c("span", Mt, [
|
|
2380
2431
|
Pt,
|
|
2381
|
-
v(
|
|
2382
|
-
options:
|
|
2383
|
-
modelValue:
|
|
2384
|
-
"onUpdate:modelValue":
|
|
2432
|
+
v(u(oe), {
|
|
2433
|
+
options: o.value,
|
|
2434
|
+
modelValue: s.value,
|
|
2435
|
+
"onUpdate:modelValue": f[1] || (f[1] = (x) => s.value = x),
|
|
2385
2436
|
class: "ms-2"
|
|
2386
2437
|
}, null, 8, ["options", "modelValue"])
|
|
2387
2438
|
])
|
|
2388
2439
|
]),
|
|
2389
2440
|
key: "0"
|
|
2390
2441
|
} : void 0,
|
|
2391
|
-
|
|
2442
|
+
d.legacyPaginationFooter ? {
|
|
2392
2443
|
name: "paginatorend",
|
|
2393
|
-
fn:
|
|
2394
|
-
|
|
2444
|
+
fn: b(() => [
|
|
2445
|
+
c("span", Ut, g(d.total ?? d.value.length) + " " + g(u(Y)(d.total ?? d.value.length, "result")) + " across " + g(r.value), 1)
|
|
2395
2446
|
]),
|
|
2396
2447
|
key: "1"
|
|
2397
2448
|
} : void 0
|
|
2398
2449
|
]), 1040, ["rows", "total-records", "filter-display"])
|
|
2399
2450
|
], 64));
|
|
2400
2451
|
}
|
|
2401
|
-
}),
|
|
2452
|
+
}), Ga = /* @__PURE__ */ $({
|
|
2402
2453
|
__name: "ForgeFilterHeader",
|
|
2403
2454
|
props: {
|
|
2404
2455
|
dataType: {},
|
|
@@ -2406,40 +2457,40 @@ const kt = {
|
|
|
2406
2457
|
},
|
|
2407
2458
|
setup(e) {
|
|
2408
2459
|
return (t, l) => {
|
|
2409
|
-
const a =
|
|
2410
|
-
return t.dataType === "numeric" ? (n(), w(a,
|
|
2460
|
+
const a = re;
|
|
2461
|
+
return t.dataType === "numeric" ? (n(), w(a, S({ key: 0 }, t.$attrs, { class: "w-100" }), null, 16)) : t.dataType === "date" ? (n(), w(ct, S({ key: 1 }, t.$attrs, {
|
|
2411
2462
|
"show-icon": !1,
|
|
2412
2463
|
"show-on-focus": !0,
|
|
2413
2464
|
class: "w-100"
|
|
2414
|
-
}), null, 16)) : t.dataType === "select" ? (n(), w(
|
|
2465
|
+
}), null, 16)) : t.dataType === "select" ? (n(), w(u(oe), S({ key: 2 }, t.$attrs, {
|
|
2415
2466
|
options: t.dropdownOptions,
|
|
2416
2467
|
class: "dropdown-input w-100"
|
|
2417
|
-
}), null, 16, ["options"])) : t.dataType === "multiselect" ? (n(), w(
|
|
2468
|
+
}), null, 16, ["options"])) : t.dataType === "multiselect" ? (n(), w(u(Ie), S({ key: 3 }, t.$attrs, {
|
|
2418
2469
|
options: t.dropdownOptions,
|
|
2419
2470
|
showToggleAll: !1,
|
|
2420
2471
|
placeholder: " ",
|
|
2421
2472
|
filter: "",
|
|
2422
2473
|
class: "w-100 dropdown-input"
|
|
2423
|
-
}), null, 16, ["options"])) : (n(), w(
|
|
2474
|
+
}), null, 16, ["options"])) : (n(), w(u(le), S({ key: 4 }, t.$attrs, { class: "w-100" }), null, 16));
|
|
2424
2475
|
};
|
|
2425
2476
|
}
|
|
2426
2477
|
});
|
|
2427
|
-
function
|
|
2428
|
-
const
|
|
2429
|
-
return t = t.map((
|
|
2430
|
-
const
|
|
2431
|
-
let
|
|
2432
|
-
|
|
2433
|
-
file:
|
|
2434
|
-
status:
|
|
2478
|
+
function ce(e, t, l, a) {
|
|
2479
|
+
const o = t.flatMap((s) => s.file);
|
|
2480
|
+
return t = t.map((s) => ({ ...s, status: s.status == "Duplicate" ? "Not Uploaded" : s.status })), e.forEach((s) => {
|
|
2481
|
+
const i = o.findIndex((y) => y.name === s.name);
|
|
2482
|
+
let m = "Not Uploaded";
|
|
2483
|
+
i === -1 ? ((!l.includes(s.type) || !(s.size <= a)) && (m = l.includes(s.type) ? "InvalidFileSize" : "InvalidFileType"), t.unshift({
|
|
2484
|
+
file: s,
|
|
2485
|
+
status: m,
|
|
2435
2486
|
blobFileName: null
|
|
2436
|
-
})) : t[
|
|
2487
|
+
})) : t[i].status = "Duplicate";
|
|
2437
2488
|
}), t;
|
|
2438
2489
|
}
|
|
2439
|
-
async function
|
|
2490
|
+
async function Ot(e, t) {
|
|
2440
2491
|
if (e === "Uploaded" && t !== null)
|
|
2441
2492
|
try {
|
|
2442
|
-
await new
|
|
2493
|
+
await new de(t).delete();
|
|
2443
2494
|
} catch (l) {
|
|
2444
2495
|
if (l !== "BlobNotFound") {
|
|
2445
2496
|
e = "DeleteFileFailed";
|
|
@@ -2447,27 +2498,27 @@ async function Dt(e, t) {
|
|
|
2447
2498
|
}
|
|
2448
2499
|
}
|
|
2449
2500
|
}
|
|
2450
|
-
function
|
|
2501
|
+
function se(e, t = !0, l = 1) {
|
|
2451
2502
|
const a = t ? 1e3 : 1024;
|
|
2452
2503
|
if (Math.abs(e) < a)
|
|
2453
2504
|
return e + " B";
|
|
2454
|
-
const
|
|
2455
|
-
let
|
|
2456
|
-
const
|
|
2505
|
+
const o = t ? ["kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"] : ["KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"];
|
|
2506
|
+
let s = -1;
|
|
2507
|
+
const i = 10 ** l;
|
|
2457
2508
|
do
|
|
2458
|
-
e /= a, ++
|
|
2459
|
-
while (Math.round(Math.abs(e) *
|
|
2460
|
-
return e.toFixed(l) + " " + s
|
|
2509
|
+
e /= a, ++s;
|
|
2510
|
+
while (Math.round(Math.abs(e) * i) / i >= a && s < o.length - 1);
|
|
2511
|
+
return e.toFixed(l) + " " + o[s];
|
|
2461
2512
|
}
|
|
2462
|
-
function
|
|
2513
|
+
function Dt(e) {
|
|
2463
2514
|
return ["image/gif", "image/png", "image/jpeg", "image/svg"].includes(e);
|
|
2464
2515
|
}
|
|
2465
|
-
function
|
|
2516
|
+
function At(e) {
|
|
2466
2517
|
return URL.createObjectURL(e);
|
|
2467
2518
|
}
|
|
2468
|
-
const
|
|
2519
|
+
const Nt = { class: "d-flex justify-content-between" }, Et = ["accept", "disabled", "multiple"], Rt = /* @__PURE__ */ $({
|
|
2469
2520
|
__name: "UploadButton",
|
|
2470
|
-
props: /* @__PURE__ */
|
|
2521
|
+
props: /* @__PURE__ */ q({
|
|
2471
2522
|
acceptedFileTypes: {},
|
|
2472
2523
|
maxFileInput: {},
|
|
2473
2524
|
showDragDropArea: { type: Boolean }
|
|
@@ -2477,54 +2528,54 @@ const Ot = { class: "d-flex justify-content-between" }, Rt = ["accept", "disable
|
|
|
2477
2528
|
}),
|
|
2478
2529
|
emits: ["update:modelValue"],
|
|
2479
2530
|
setup(e) {
|
|
2480
|
-
const t =
|
|
2481
|
-
t.value =
|
|
2531
|
+
const t = E(e, "modelValue"), l = h(() => e.maxFileInput <= t.value.length), a = (o) => {
|
|
2532
|
+
t.value = ce(o, t.value, e.acceptedFileTypes, e.maxFileInput);
|
|
2482
2533
|
};
|
|
2483
|
-
return (
|
|
2484
|
-
k(
|
|
2485
|
-
|
|
2486
|
-
|
|
2534
|
+
return (o, s) => (n(), p("div", Nt, [
|
|
2535
|
+
k(o.$slots, "message"),
|
|
2536
|
+
c("div", null, [
|
|
2537
|
+
c("input", {
|
|
2487
2538
|
id: "file-input",
|
|
2488
2539
|
type: "file",
|
|
2489
2540
|
class: "d-none",
|
|
2490
|
-
accept:
|
|
2491
|
-
disabled:
|
|
2492
|
-
multiple:
|
|
2493
|
-
onInput:
|
|
2494
|
-
}, null, 40,
|
|
2495
|
-
|
|
2496
|
-
class:
|
|
2541
|
+
accept: o.acceptedFileTypes.join(", "),
|
|
2542
|
+
disabled: l.value,
|
|
2543
|
+
multiple: o.maxFileInput > 1,
|
|
2544
|
+
onInput: s[0] || (s[0] = (i) => a([...i.target.files]))
|
|
2545
|
+
}, null, 40, Et),
|
|
2546
|
+
c("label", {
|
|
2547
|
+
class: B([{ disabled: l.value }, "btn btn-primary"]),
|
|
2497
2548
|
id: "file-input-button",
|
|
2498
2549
|
for: "file-input"
|
|
2499
2550
|
}, [
|
|
2500
|
-
k(
|
|
2501
|
-
v(
|
|
2551
|
+
k(o.$slots, "button-content", {}, () => [
|
|
2552
|
+
v(u(C), {
|
|
2502
2553
|
icon: "bi:upload",
|
|
2503
2554
|
class: "me-2",
|
|
2504
2555
|
height: "20px",
|
|
2505
2556
|
width: "20px"
|
|
2506
2557
|
}),
|
|
2507
|
-
|
|
2558
|
+
T(" Browse your computer ")
|
|
2508
2559
|
])
|
|
2509
2560
|
], 2)
|
|
2510
2561
|
]),
|
|
2511
|
-
|
|
2562
|
+
o.showDragDropArea ? (n(), p("div", {
|
|
2512
2563
|
class: "ms-auto",
|
|
2513
|
-
key:
|
|
2564
|
+
key: o.acceptedFileTypes.length,
|
|
2514
2565
|
id: "accepted-file-types"
|
|
2515
|
-
}, "Accepted File Types: " +
|
|
2566
|
+
}, "Accepted File Types: " + g(o.acceptedFileTypes.map((i) => i.split("/").pop()).join(", ")), 1)) : F("", !0)
|
|
2516
2567
|
]));
|
|
2517
2568
|
}
|
|
2518
|
-
}),
|
|
2569
|
+
}), Lt = {
|
|
2519
2570
|
key: 0,
|
|
2520
2571
|
class: "py-4 px-3",
|
|
2521
2572
|
id: "placeholder-message"
|
|
2522
|
-
},
|
|
2573
|
+
}, jt = {
|
|
2523
2574
|
key: 1,
|
|
2524
2575
|
class: "d-flex flex-column"
|
|
2525
2576
|
}, Ht = /* @__PURE__ */ $({
|
|
2526
2577
|
__name: "DragDropArea",
|
|
2527
|
-
props: /* @__PURE__ */
|
|
2578
|
+
props: /* @__PURE__ */ q({
|
|
2528
2579
|
maxFileInput: {},
|
|
2529
2580
|
maxFileSize: {},
|
|
2530
2581
|
acceptedFileTypes: {}
|
|
@@ -2534,26 +2585,26 @@ const Ot = { class: "d-flex justify-content-between" }, Rt = ["accept", "disable
|
|
|
2534
2585
|
}),
|
|
2535
2586
|
emits: ["update:modelValue"],
|
|
2536
2587
|
setup(e) {
|
|
2537
|
-
const
|
|
2538
|
-
|
|
2588
|
+
const t = E(e, "modelValue"), l = z(!1), a = h(() => e.maxFileInput <= t.value.length), o = (s) => {
|
|
2589
|
+
l.value = !1, s.dataTransfer.files.length > e.maxFileInput || a.value ? s.preventDefault() : t.value = ce([...s.dataTransfer.files], t.value, e.acceptedFileTypes, e.maxFileSize);
|
|
2539
2590
|
};
|
|
2540
|
-
return (
|
|
2591
|
+
return (s, i) => (n(), p("div", {
|
|
2541
2592
|
id: "drag-drop-area",
|
|
2542
|
-
class:
|
|
2543
|
-
onDragleave: i[0] || (i[0] = K((
|
|
2544
|
-
onDragover: i[1] || (i[1] = K((
|
|
2545
|
-
onDrop: K(
|
|
2593
|
+
class: B(`${l.value ? "border-2 border-primary bg-body-tertiary" : ""} mt-3 file-container border-dashed border-2`),
|
|
2594
|
+
onDragleave: i[0] || (i[0] = K((m) => l.value = !1, ["prevent"])),
|
|
2595
|
+
onDragover: i[1] || (i[1] = K((m) => l.value = !0, ["prevent"])),
|
|
2596
|
+
onDrop: K(o, ["prevent"])
|
|
2546
2597
|
}, [
|
|
2547
|
-
|
|
2548
|
-
v(
|
|
2598
|
+
t.value.length === 0 ? (n(), p("div", Lt, [
|
|
2599
|
+
v(u(C), {
|
|
2549
2600
|
icon: "bi:upload",
|
|
2550
2601
|
class: "me-2",
|
|
2551
2602
|
height: "20px",
|
|
2552
2603
|
width: "20px"
|
|
2553
2604
|
}),
|
|
2554
|
-
|
|
2555
|
-
])) : (n(),
|
|
2556
|
-
k(
|
|
2605
|
+
T(" Drag and drop files here ")
|
|
2606
|
+
])) : (n(), p("div", jt, [
|
|
2607
|
+
k(s.$slots, "default")
|
|
2557
2608
|
]))
|
|
2558
2609
|
], 34));
|
|
2559
2610
|
}
|
|
@@ -2566,12 +2617,12 @@ const Ot = { class: "d-flex justify-content-between" }, Rt = ["accept", "disable
|
|
|
2566
2617
|
uploadStatus: {}
|
|
2567
2618
|
},
|
|
2568
2619
|
setup(e) {
|
|
2569
|
-
const
|
|
2570
|
-
switch (
|
|
2620
|
+
const t = h(() => e.uploadStatus === "Failed" || e.uploadStatus === "InvalidFileType" || e.uploadStatus === "InvalidFileSize" ? "danger" : "warning"), l = h(() => {
|
|
2621
|
+
switch (e.uploadStatus) {
|
|
2571
2622
|
case "InvalidFileType":
|
|
2572
2623
|
return "Upload Failed: File type is not accepted.";
|
|
2573
2624
|
case "InvalidFileSize":
|
|
2574
|
-
return `Upload Failed: File size exceeds the ${
|
|
2625
|
+
return `Upload Failed: File size exceeds the ${se(e.maxFileSize)} limit.`;
|
|
2575
2626
|
case "Aborted":
|
|
2576
2627
|
return "Upload Failed: User cancelled.";
|
|
2577
2628
|
case "DeleteFileFailed":
|
|
@@ -2582,26 +2633,26 @@ const Ot = { class: "d-flex justify-content-between" }, Rt = ["accept", "disable
|
|
|
2582
2633
|
return "Upload Failed: Connection error, please try again.";
|
|
2583
2634
|
}
|
|
2584
2635
|
});
|
|
2585
|
-
return (
|
|
2586
|
-
|
|
2636
|
+
return (a, o) => (n(), p("div", qt, [
|
|
2637
|
+
a.uploadStatus === "Uploading" ? (n(), w(bt, {
|
|
2587
2638
|
key: 0,
|
|
2588
2639
|
pixelWidth: 200,
|
|
2589
2640
|
animate: "",
|
|
2590
2641
|
striped: ""
|
|
2591
2642
|
}, {
|
|
2592
|
-
default:
|
|
2593
|
-
|
|
2643
|
+
default: b(() => [
|
|
2644
|
+
T(g((a.bytesUploaded / a.fileSize * 100).toFixed(0)) + "%", 1)
|
|
2594
2645
|
]),
|
|
2595
2646
|
_: 1
|
|
2596
2647
|
})) : F("", !0),
|
|
2597
|
-
|
|
2648
|
+
a.uploadStatus !== "Uploading" && a.uploadStatus !== "Not Uploaded" && a.uploadStatus !== "Uploaded" && a.uploadStatus !== "Preparing" ? (n(), w(X, {
|
|
2598
2649
|
key: 1,
|
|
2599
2650
|
id: "upload-status-alert",
|
|
2600
|
-
severity:
|
|
2651
|
+
severity: t.value,
|
|
2601
2652
|
class: "mb-0 w-75 ms-auto"
|
|
2602
2653
|
}, {
|
|
2603
|
-
default:
|
|
2604
|
-
|
|
2654
|
+
default: b(() => [
|
|
2655
|
+
T(g(l.value), 1)
|
|
2605
2656
|
]),
|
|
2606
2657
|
_: 1
|
|
2607
2658
|
}, 8, ["severity"])) : F("", !0)
|
|
@@ -2618,7 +2669,7 @@ const Ot = { class: "d-flex justify-content-between" }, Rt = ["accept", "disable
|
|
|
2618
2669
|
id: "file-size"
|
|
2619
2670
|
}, Xt = { class: "ms-auto my-auto d-flex" }, Qt = /* @__PURE__ */ $({
|
|
2620
2671
|
__name: "FileInfo",
|
|
2621
|
-
props: /* @__PURE__ */
|
|
2672
|
+
props: /* @__PURE__ */ q({
|
|
2622
2673
|
editableFileName: { type: Boolean },
|
|
2623
2674
|
acceptedFileTypes: {},
|
|
2624
2675
|
maxFileSize: {},
|
|
@@ -2633,57 +2684,57 @@ const Ot = { class: "d-flex justify-content-between" }, Rt = ["accept", "disable
|
|
|
2633
2684
|
uploadStatus: { required: !0 },
|
|
2634
2685
|
uploadStatusModifiers: {}
|
|
2635
2686
|
}),
|
|
2636
|
-
emits: /* @__PURE__ */
|
|
2687
|
+
emits: /* @__PURE__ */ q(["deleted"], ["update:file", "update:blobFileName", "update:uploadStatus"]),
|
|
2637
2688
|
setup(e, { emit: t }) {
|
|
2638
|
-
const
|
|
2639
|
-
|
|
2640
|
-
},
|
|
2641
|
-
if (!
|
|
2642
|
-
|
|
2689
|
+
const l = E(e, "file"), a = E(e, "blobFileName"), o = E(e, "uploadStatus"), s = t, i = z(l.value.name), m = z(""), y = z(0), r = z(), _ = h(() => e.acceptedFileTypes.includes(l.value.type)), d = h(() => l.value.size <= e.maxFileSize), f = () => {
|
|
2690
|
+
l.value = new File([l.value], i.value, { type: l.value.type, lastModified: (/* @__PURE__ */ new Date()).valueOf() });
|
|
2691
|
+
}, x = async () => {
|
|
2692
|
+
if (!_.value || !d.value) {
|
|
2693
|
+
o.value = _.value ? "InvalidFileSize" : "InvalidFileType";
|
|
2643
2694
|
return;
|
|
2644
2695
|
}
|
|
2645
|
-
|
|
2646
|
-
const [
|
|
2647
|
-
if (!
|
|
2648
|
-
|
|
2696
|
+
o.value = "Preparing", r.value = new AbortController();
|
|
2697
|
+
const [V, U] = await e.getFileUrlAction(l.value.name);
|
|
2698
|
+
if (!V) {
|
|
2699
|
+
o.value = "Failed";
|
|
2649
2700
|
return;
|
|
2650
2701
|
}
|
|
2651
2702
|
try {
|
|
2652
|
-
|
|
2653
|
-
const P = new
|
|
2654
|
-
abortSignal:
|
|
2655
|
-
onProgress: (
|
|
2703
|
+
o.value = "Uploading";
|
|
2704
|
+
const P = new de(V), G = {
|
|
2705
|
+
abortSignal: r.value.signal,
|
|
2706
|
+
onProgress: (Q) => y.value = Q.loadedBytes,
|
|
2656
2707
|
tags: { temp: "true" }
|
|
2657
2708
|
};
|
|
2658
|
-
await P.uploadData(
|
|
2709
|
+
await P.uploadData(l.value, G), m.value = V, o.value = "Uploaded", a.value = U;
|
|
2659
2710
|
} catch (P) {
|
|
2660
2711
|
if (P.name === "AbortError") {
|
|
2661
|
-
|
|
2712
|
+
o.value = "Aborted";
|
|
2662
2713
|
return;
|
|
2663
2714
|
}
|
|
2664
|
-
|
|
2715
|
+
o.value = "Failed";
|
|
2665
2716
|
}
|
|
2666
|
-
},
|
|
2667
|
-
await
|
|
2717
|
+
}, I = async () => {
|
|
2718
|
+
await Ot(o.value, m.value), s("deleted", l.value);
|
|
2668
2719
|
};
|
|
2669
|
-
return
|
|
2670
|
-
|
|
2671
|
-
}), (
|
|
2720
|
+
return ne(() => {
|
|
2721
|
+
e.autoUploadToBlob && x();
|
|
2722
|
+
}), (V, U) => {
|
|
2672
2723
|
const P = A;
|
|
2673
|
-
return n(),
|
|
2724
|
+
return n(), p("div", {
|
|
2674
2725
|
class: "py-4 px-3 d-flex",
|
|
2675
|
-
"data-cy": `file-info-${
|
|
2726
|
+
"data-cy": `file-info-${l.value.name}`
|
|
2676
2727
|
}, [
|
|
2677
|
-
|
|
2678
|
-
|
|
2728
|
+
c("div", null, [
|
|
2729
|
+
u(Dt)(l.value.type) ? (n(), w(u(ze), {
|
|
2679
2730
|
key: 0,
|
|
2680
2731
|
id: "thumbnail-image",
|
|
2681
2732
|
"image-class": "image-file-thumbnail border",
|
|
2682
|
-
src:
|
|
2683
|
-
alt:
|
|
2733
|
+
src: u(At)(l.value),
|
|
2734
|
+
alt: l.value.name,
|
|
2684
2735
|
width: "75px",
|
|
2685
2736
|
preview: ""
|
|
2686
|
-
}, null, 8, ["src", "alt"])) : (n(), w(
|
|
2737
|
+
}, null, 8, ["src", "alt"])) : (n(), w(u(C), {
|
|
2687
2738
|
key: 1,
|
|
2688
2739
|
id: "file-earmark",
|
|
2689
2740
|
icon: "bi:file-earmark",
|
|
@@ -2691,58 +2742,58 @@ const Ot = { class: "d-flex justify-content-between" }, Rt = ["accept", "disable
|
|
|
2691
2742
|
width: "75px"
|
|
2692
2743
|
}))
|
|
2693
2744
|
]),
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2745
|
+
c("div", Wt, [
|
|
2746
|
+
c("div", null, [
|
|
2747
|
+
V.editableFileName ? (n(), w(Ke, {
|
|
2697
2748
|
key: 0,
|
|
2698
2749
|
id: "edit-file-name",
|
|
2699
|
-
modelValue:
|
|
2700
|
-
"onUpdate:modelValue":
|
|
2701
|
-
rules:
|
|
2702
|
-
name:
|
|
2703
|
-
"complete-action":
|
|
2704
|
-
}, null, 8, ["modelValue", "rules", "name"])) : (n(),
|
|
2750
|
+
modelValue: i.value,
|
|
2751
|
+
"onUpdate:modelValue": U[0] || (U[0] = (G) => i.value = G),
|
|
2752
|
+
rules: V.customFileNameRules,
|
|
2753
|
+
name: l.value.name,
|
|
2754
|
+
"complete-action": f
|
|
2755
|
+
}, null, 8, ["modelValue", "rules", "name"])) : (n(), p("span", Zt, g(l.value.name), 1))
|
|
2705
2756
|
]),
|
|
2706
|
-
|
|
2707
|
-
|
|
2757
|
+
c("span", Yt, "File type: " + g(l.value.type.split("/").pop()), 1),
|
|
2758
|
+
c("span", Jt, "File size: " + g(u(se)(l.value.size)), 1)
|
|
2708
2759
|
]),
|
|
2709
|
-
|
|
2760
|
+
c("div", Xt, [
|
|
2710
2761
|
(n(), w(Gt, {
|
|
2711
|
-
key:
|
|
2712
|
-
"file-size":
|
|
2713
|
-
"upload-status":
|
|
2714
|
-
"bytes-uploaded":
|
|
2715
|
-
"max-file-size":
|
|
2762
|
+
key: o.value,
|
|
2763
|
+
"file-size": l.value.size,
|
|
2764
|
+
"upload-status": o.value,
|
|
2765
|
+
"bytes-uploaded": y.value,
|
|
2766
|
+
"max-file-size": V.maxFileSize
|
|
2716
2767
|
}, null, 8, ["file-size", "upload-status", "bytes-uploaded", "max-file-size"])),
|
|
2717
|
-
|
|
2768
|
+
o.value === "Not Uploaded" || o.value === "Failed" || o.value === "Duplicate" || o.value === "Aborted" ? (n(), w(P, {
|
|
2718
2769
|
key: 0,
|
|
2719
2770
|
link: "",
|
|
2720
|
-
onClick:
|
|
2771
|
+
onClick: x
|
|
2721
2772
|
}, {
|
|
2722
|
-
default:
|
|
2723
|
-
v(
|
|
2724
|
-
icon:
|
|
2773
|
+
default: b(() => [
|
|
2774
|
+
v(u(C), {
|
|
2775
|
+
icon: o.value === "Not Uploaded" || o.value === "Duplicate" ? "bi:upload" : "bi:arrow-clockwise"
|
|
2725
2776
|
}, null, 8, ["icon"])
|
|
2726
2777
|
]),
|
|
2727
2778
|
_: 1
|
|
2728
2779
|
})) : F("", !0),
|
|
2729
|
-
|
|
2780
|
+
o.value === "Uploading" ? (n(), w(P, {
|
|
2730
2781
|
key: 1,
|
|
2731
2782
|
link: "",
|
|
2732
|
-
onClick:
|
|
2783
|
+
onClick: U[1] || (U[1] = (G) => r.value.value.abort())
|
|
2733
2784
|
}, {
|
|
2734
|
-
default:
|
|
2735
|
-
v(
|
|
2785
|
+
default: b(() => [
|
|
2786
|
+
v(u(C), { icon: "bi:x-circle-fill" })
|
|
2736
2787
|
]),
|
|
2737
2788
|
_: 1
|
|
2738
2789
|
})) : (n(), w(P, {
|
|
2739
2790
|
key: 2,
|
|
2740
2791
|
link: "",
|
|
2741
|
-
onClick:
|
|
2792
|
+
onClick: I,
|
|
2742
2793
|
id: "delete-button"
|
|
2743
2794
|
}, {
|
|
2744
|
-
default:
|
|
2745
|
-
v(
|
|
2795
|
+
default: b(() => [
|
|
2796
|
+
v(u(C), { icon: "bi:trash" })
|
|
2746
2797
|
]),
|
|
2747
2798
|
_: 1
|
|
2748
2799
|
}))
|
|
@@ -2756,13 +2807,13 @@ const Ot = { class: "d-flex justify-content-between" }, Rt = ["accept", "disable
|
|
|
2756
2807
|
maxFileSize: {}
|
|
2757
2808
|
},
|
|
2758
2809
|
setup(e) {
|
|
2759
|
-
return (t, l) => (n(),
|
|
2760
|
-
|
|
2810
|
+
return (t, l) => (n(), p("div", ea, [
|
|
2811
|
+
c("div", ta, "Max file size: " + g(u(se)(t.maxFileSize)), 1)
|
|
2761
2812
|
]));
|
|
2762
2813
|
}
|
|
2763
|
-
}), la = { "data-cy": "file-uploader" }, oa = { key: 0 },
|
|
2814
|
+
}), la = { "data-cy": "file-uploader" }, oa = { key: 0 }, Ka = /* @__PURE__ */ $({
|
|
2764
2815
|
__name: "ForgeFileUploader",
|
|
2765
|
-
props: /* @__PURE__ */
|
|
2816
|
+
props: /* @__PURE__ */ q({
|
|
2766
2817
|
acceptedFileTypes: {},
|
|
2767
2818
|
maxFileSize: {},
|
|
2768
2819
|
getFileUrlAction: {},
|
|
@@ -2777,33 +2828,33 @@ const Ot = { class: "d-flex justify-content-between" }, Rt = ["accept", "disable
|
|
|
2777
2828
|
}),
|
|
2778
2829
|
emits: ["update:modelValue"],
|
|
2779
2830
|
setup(e) {
|
|
2780
|
-
const t =
|
|
2781
|
-
t.value = t.value.filter((
|
|
2831
|
+
const t = E(e, "modelValue"), l = e, a = (o) => {
|
|
2832
|
+
t.value = t.value.filter((s) => s.file != o);
|
|
2782
2833
|
};
|
|
2783
|
-
return (
|
|
2784
|
-
v(
|
|
2834
|
+
return (o, s) => (n(), p("div", la, [
|
|
2835
|
+
v(Rt, S(l, {
|
|
2785
2836
|
modelValue: t.value,
|
|
2786
|
-
"onUpdate:modelValue":
|
|
2837
|
+
"onUpdate:modelValue": s[0] || (s[0] = (i) => t.value = i)
|
|
2787
2838
|
}), null, 16, ["modelValue"]),
|
|
2788
|
-
|
|
2839
|
+
o.showDragDropArea ? (n(), p("div", oa, [
|
|
2789
2840
|
v(Ht, {
|
|
2790
2841
|
"max-file-input": l.maxFileInput,
|
|
2791
2842
|
"max-file-size": l.maxFileSize,
|
|
2792
2843
|
"accepted-file-types": l.acceptedFileTypes,
|
|
2793
2844
|
modelValue: t.value,
|
|
2794
|
-
"onUpdate:modelValue":
|
|
2845
|
+
"onUpdate:modelValue": s[1] || (s[1] = (i) => t.value = i)
|
|
2795
2846
|
}, {
|
|
2796
|
-
default:
|
|
2797
|
-
(n(!0),
|
|
2798
|
-
(n(), w(Qt,
|
|
2799
|
-
key:
|
|
2800
|
-
class:
|
|
2801
|
-
file: t.value[
|
|
2802
|
-
"onUpdate:file": (
|
|
2803
|
-
"blob-file-name": t.value[
|
|
2804
|
-
"onUpdate:blobFileName": (
|
|
2805
|
-
"upload-status": t.value[
|
|
2806
|
-
"onUpdate:uploadStatus": (
|
|
2847
|
+
default: b(() => [
|
|
2848
|
+
(n(!0), p(M, null, L(t.value, ({ file: i }, m) => (n(), p("span", null, [
|
|
2849
|
+
(n(), w(Qt, S({
|
|
2850
|
+
key: i.name,
|
|
2851
|
+
class: m === t.value.length - 1 || t.value.length == 1 ? "" : "border-bottom",
|
|
2852
|
+
file: t.value[m].file,
|
|
2853
|
+
"onUpdate:file": (y) => t.value[m].file = y,
|
|
2854
|
+
"blob-file-name": t.value[m].blobFileName,
|
|
2855
|
+
"onUpdate:blobFileName": (y) => t.value[m].blobFileName = y,
|
|
2856
|
+
"upload-status": t.value[m].status,
|
|
2857
|
+
"onUpdate:uploadStatus": (y) => t.value[m].status = y
|
|
2807
2858
|
}, l, { onDeleted: a }), null, 16, ["class", "file", "onUpdate:file", "blob-file-name", "onUpdate:blobFileName", "upload-status", "onUpdate:uploadStatus"]))
|
|
2808
2859
|
]))), 256))
|
|
2809
2860
|
]),
|
|
@@ -2817,27 +2868,28 @@ const Ot = { class: "d-flex justify-content-between" }, Rt = ["accept", "disable
|
|
|
2817
2868
|
}
|
|
2818
2869
|
});
|
|
2819
2870
|
export {
|
|
2820
|
-
|
|
2871
|
+
za as Bootstrap_PT,
|
|
2821
2872
|
Ta as ForgeActionButton,
|
|
2822
|
-
|
|
2823
|
-
|
|
2873
|
+
X as ForgeAlert,
|
|
2874
|
+
Ue as ForgeCheckbox,
|
|
2824
2875
|
Ra as ForgeChips,
|
|
2825
2876
|
ct as ForgeDatepicker,
|
|
2826
|
-
|
|
2827
|
-
|
|
2877
|
+
Ka as ForgeFileUploader,
|
|
2878
|
+
Ga as ForgeFilterHeader,
|
|
2828
2879
|
Na as ForgeForm,
|
|
2829
|
-
|
|
2880
|
+
Ea as ForgeFormField,
|
|
2830
2881
|
Ke as ForgeInlineEditor,
|
|
2831
|
-
|
|
2832
|
-
|
|
2882
|
+
Ma as ForgeLink,
|
|
2883
|
+
ue as ForgeLoader,
|
|
2884
|
+
Pa as ForgeModal,
|
|
2833
2885
|
et as ForgeMultiSelect,
|
|
2834
|
-
|
|
2835
|
-
|
|
2886
|
+
Oa as ForgeMultiSelectPreview,
|
|
2887
|
+
Ua as ForgeNavbar,
|
|
2836
2888
|
Da as ForgePageHeader,
|
|
2837
|
-
|
|
2889
|
+
bt as ForgeProgressBar,
|
|
2838
2890
|
Aa as ForgeRemainingCharacters,
|
|
2839
|
-
|
|
2891
|
+
La as ForgeStatWidget,
|
|
2840
2892
|
ja as ForgeStepper,
|
|
2841
|
-
|
|
2842
|
-
|
|
2893
|
+
qa as ForgeTable,
|
|
2894
|
+
Ha as ForgeTile
|
|
2843
2895
|
};
|