@dynamicforms/vuetify-inputs 0.11.6 → 0.12.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/dynamicforms-vuetify-inputs.css +1 -1
- package/dist/dynamicforms-vuetify-inputs.js +580 -561
- package/dist/dynamicforms-vuetify-inputs.js.map +1 -1
- package/dist/dynamicforms-vuetify-inputs.umd.cjs +1 -1
- package/dist/dynamicforms-vuetify-inputs.umd.cjs.map +1 -1
- package/dist/index.d.ts +45 -20
- package/package.json +2 -2
- package/readme.md +3 -2
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createSlots as o, createTextVNode as s, createVNode as c, defineComponent as l, guardReactiveProps as u, inject as d, isRef as f, mergeDefaults as p, mergeProps as m, nextTick as h, normalizeClass as g, normalizeProps as _, normalizeStyle as v, onBeforeUnmount as y, onMounted as b, openBlock as x, ref as S, renderList as C, renderSlot as w, resolveComponent as T, resolveDynamicComponent as E, shallowRef as D, toDisplayString as O, toRaw as k, toRefs as A, unref as j, useCssVars as M, useId as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
1
|
+
import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createSlots as o, createTextVNode as s, createVNode as c, defineComponent as l, guardReactiveProps as u, inject as d, isRef as f, mergeDefaults as p, mergeProps as m, nextTick as h, normalizeClass as g, normalizeProps as _, normalizeStyle as v, onBeforeUnmount as y, onMounted as b, openBlock as x, ref as S, renderList as C, renderSlot as w, resolveComponent as T, resolveDynamicComponent as E, shallowRef as D, toDisplayString as O, toRaw as k, toRefs as A, toValue as ee, unref as j, useCssVars as M, useId as te, watch as N, watchEffect as P, withCtx as F, withKeys as I, withModifiers as L } from "vue";
|
|
2
|
+
import { CachedIcon as R } from "vue-cached-icon";
|
|
3
|
+
import z, { Action as B, ExecuteAction as ne, MdString as re, MessagesWidget as V, ValidationErrorRenderContent as ie } from "@dynamicforms/vue-forms";
|
|
4
4
|
import H from "vue-markdown-render";
|
|
5
|
-
import { castArray as U, clone as ae, first as oe, isArray as
|
|
6
|
-
import { createTranslatable as
|
|
7
|
-
import { useDisplay as
|
|
8
|
-
import { format as
|
|
5
|
+
import { castArray as U, clone as ae, first as oe, isArray as W, isBoolean as G, isEmpty as se, isEqual as ce, isNaN as le, isObjectLike as ue, isPlainObject as de, isString as K, toNumber as q, unionBy as fe } from "lodash-es";
|
|
6
|
+
import { createTranslatable as pe } from "@dynamicforms/translatable";
|
|
7
|
+
import { useDisplay as me } from "vuetify";
|
|
8
|
+
import { format as he, parse as ge, parseISO as _e } from "date-fns";
|
|
9
9
|
import ve from "@tiptap/extension-image";
|
|
10
10
|
import ye from "@tiptap/extension-placeholder";
|
|
11
11
|
import { Table as be } from "@tiptap/extension-table";
|
|
@@ -102,7 +102,7 @@ function pt(e, t) {
|
|
|
102
102
|
}
|
|
103
103
|
return n;
|
|
104
104
|
}
|
|
105
|
-
function
|
|
105
|
+
function J(e) {
|
|
106
106
|
for (var t = 1; t < arguments.length; t++) {
|
|
107
107
|
var n = arguments[t] == null ? {} : arguments[t];
|
|
108
108
|
t % 2 ? pt(Object(n), !0).forEach(function(t) {
|
|
@@ -885,7 +885,7 @@ var Ot = {
|
|
|
885
885
|
constructor(e) {
|
|
886
886
|
super(e), ft(this, "errorText", void 0), this.errorText = e;
|
|
887
887
|
}
|
|
888
|
-
},
|
|
888
|
+
}, Y = /* @__PURE__ */ l({
|
|
889
889
|
__name: "df-input-hint",
|
|
890
890
|
props: {
|
|
891
891
|
errors: { default: "" },
|
|
@@ -895,12 +895,12 @@ var Ot = {
|
|
|
895
895
|
},
|
|
896
896
|
setup(e) {
|
|
897
897
|
let r = e, i = t(() => r.errors ? typeof r.errors == "string" ? r.errors.trim().length > 0 : r.errors.length > 0 : !1), a = t(() => i.value ? r.errors : r.message), o = t(() => i.value ? r.errorClasses : r.messageClasses);
|
|
898
|
-
return (e, t) => (x(), n(j(
|
|
898
|
+
return (e, t) => (x(), n(j(V), {
|
|
899
899
|
message: a.value,
|
|
900
900
|
classes: o.value
|
|
901
901
|
}, null, 8, ["message", "classes"]));
|
|
902
902
|
}
|
|
903
|
-
}),
|
|
903
|
+
}), X = /* @__PURE__ */ l({
|
|
904
904
|
__name: "df-label",
|
|
905
905
|
props: {
|
|
906
906
|
data: {},
|
|
@@ -911,7 +911,7 @@ var Ot = {
|
|
|
911
911
|
let o = a, c = t(() => o.data ? o.data.label : o.label.text);
|
|
912
912
|
return (t, o) => {
|
|
913
913
|
let l = T("v-img");
|
|
914
|
-
return x(), i("div", { class: g(["df-label", { "allow-wrap": a.allowWrap }]) }, [a.label.icon ? (x(), i(e, { key: 0 }, [a.label.iconComponent === "v-icon" ? (x(), n(j(
|
|
914
|
+
return x(), i("div", { class: g(["df-label", { "allow-wrap": a.allowWrap }]) }, [a.label.icon ? (x(), i(e, { key: 0 }, [a.label.iconComponent === "v-icon" ? (x(), n(j(R), {
|
|
915
915
|
key: 0,
|
|
916
916
|
name: a.label.icon,
|
|
917
917
|
size: "1.25em"
|
|
@@ -935,15 +935,34 @@ var Ot = {
|
|
|
935
935
|
])) : (x(), i(e, { key: 2 }, [s(O(c.value), 1)], 64))], 2);
|
|
936
936
|
};
|
|
937
937
|
}
|
|
938
|
-
}), jt = Symbol("vuetifyInputsSettingsKey")
|
|
938
|
+
}), jt = Symbol("vuetifyInputsSettingsKey");
|
|
939
|
+
//#endregion
|
|
940
|
+
//#region src/helpers/shown-errors.ts
|
|
941
|
+
function Mt(e, t, n, r) {
|
|
942
|
+
let i = !t || t.effectiveAccess !== "disabled";
|
|
943
|
+
return e.filter((e) => {
|
|
944
|
+
let a = i && (e.origin === "server" || n);
|
|
945
|
+
return r.shownErrors ? r.shownErrors(e, t, a) : a;
|
|
946
|
+
});
|
|
947
|
+
}
|
|
948
|
+
function Nt(e) {
|
|
949
|
+
let n = d(jt, {});
|
|
950
|
+
return t(() => {
|
|
951
|
+
let t = ee(e);
|
|
952
|
+
return t ? Mt(t.errors, t, t.touched, n) : [];
|
|
953
|
+
});
|
|
954
|
+
}
|
|
955
|
+
//#endregion
|
|
956
|
+
//#region src/helpers/input-base.ts
|
|
957
|
+
var Pt = class {
|
|
939
958
|
constructor(e, t, n = "v-icon") {
|
|
940
959
|
ft(this, "text", void 0), ft(this, "icon", void 0), ft(this, "iconComponent", void 0), this.text = e, this.icon = t, this.iconComponent = n;
|
|
941
960
|
}
|
|
942
|
-
},
|
|
961
|
+
}, Z = {
|
|
943
962
|
enabled: void 0,
|
|
944
963
|
clearable: !0
|
|
945
964
|
};
|
|
946
|
-
function
|
|
965
|
+
function Q(e, n) {
|
|
947
966
|
let r = d(jt, {}), i = d("field-density", null), a = d("field-variant", null), o = S(null), s = D(null), c = t({
|
|
948
967
|
get() {
|
|
949
968
|
return s.value ? s.value.value : e.control ? e.control.value : e.modelValue === void 0 ? o.value : e.modelValue;
|
|
@@ -959,7 +978,7 @@ function Z(e, n) {
|
|
|
959
978
|
e.modelValue === void 0 && (o.value = t), n("update:modelValue", e.control ? e.control.value : t);
|
|
960
979
|
}
|
|
961
980
|
});
|
|
962
|
-
if (e.control && !(e.control instanceof
|
|
981
|
+
if (e.control && !(e.control instanceof z.FieldBase)) throw Error("control prop is not a vue-form control instance");
|
|
963
982
|
let l = t({
|
|
964
983
|
get() {
|
|
965
984
|
return e.control.touched;
|
|
@@ -967,16 +986,21 @@ function Z(e, n) {
|
|
|
967
986
|
set(t) {
|
|
968
987
|
e.control.touched = t;
|
|
969
988
|
}
|
|
970
|
-
}), u = e.control ? l : S(!1), f = t(() => !e.control || e.control.valid), p = t(() => e.control ? e.control.errors : (e.errors || []).map((e) => new ie(e))), m = t(() =>
|
|
971
|
-
|
|
972
|
-
|
|
989
|
+
}), u = e.control ? l : S(!1), f = t(() => !e.control || e.control.valid), p = t(() => e.control ? e.control.errors : (e.errors || []).map((e) => new ie(e))), m = t(() => Mt(p.value, e.control, u.value, r)), g = t(() => m.value.length > 0 ? " " : void 0), _ = t(() => e.control ? e.control.effectiveEnabled : e.enabled !== !1), v = t(() => {
|
|
990
|
+
if (e.control) return e.control.visibility;
|
|
991
|
+
if (e.visibility == null) return z.defaultVisibility;
|
|
992
|
+
if (!z.isVisibility(e.visibility)) throw Error(`'${e.visibility}' is not a visibility: ${z.visibilityValues.join(", ")}`);
|
|
993
|
+
return e.visibility;
|
|
994
|
+
}), y = t(() => v.value !== "suppress"), b = t(() => ({
|
|
995
|
+
"d-none": v.value === "hidden",
|
|
996
|
+
invisible: v.value === "invisible"
|
|
973
997
|
})), x = t(() => {
|
|
974
998
|
var t, n;
|
|
975
999
|
return (t = (n = e.control) == null ? void 0 : n.extra) == null ? {} : t;
|
|
976
1000
|
}), C = t(() => {
|
|
977
1001
|
var t;
|
|
978
1002
|
let n = (t = e.label) == null ? x.value.label : t;
|
|
979
|
-
return
|
|
1003
|
+
return K(n || "") ? new Pt(n || "") : n;
|
|
980
1004
|
}), w = t(() => {
|
|
981
1005
|
var t, n;
|
|
982
1006
|
return (t = (n = e.placeholder) == null ? x.value.placeholder : n) == null ? "" : t;
|
|
@@ -992,7 +1016,7 @@ function Z(e, n) {
|
|
|
992
1016
|
}), A = t(() => {
|
|
993
1017
|
var t, n, a, o;
|
|
994
1018
|
return (t = (n = (a = (o = e.density) == null ? x.value.density : o) == null ? i : a) == null ? r.defaultDensity : n) == null ? "default" : t;
|
|
995
|
-
}),
|
|
1019
|
+
}), ee = t(() => A.value === "inline" ? "default" : A.value), j = t(() => {
|
|
996
1020
|
var t, n, i, o;
|
|
997
1021
|
return (t = (n = (i = (o = e.variant) == null ? x.value.variant : o) == null ? a : i) == null ? r.defaultVariant : n) == null ? "underlined" : t;
|
|
998
1022
|
});
|
|
@@ -1001,7 +1025,7 @@ function Z(e, n) {
|
|
|
1001
1025
|
valid: f,
|
|
1002
1026
|
enabled: _,
|
|
1003
1027
|
errors: p,
|
|
1004
|
-
|
|
1028
|
+
shownErrors: m,
|
|
1005
1029
|
visibility: v,
|
|
1006
1030
|
isRendered: y,
|
|
1007
1031
|
visibilityClass: b,
|
|
@@ -1011,17 +1035,17 @@ function Z(e, n) {
|
|
|
1011
1035
|
densityClass: t(() => `df-density-${A.value}`),
|
|
1012
1036
|
vuetifyBindings: t(() => {
|
|
1013
1037
|
var t;
|
|
1014
|
-
return
|
|
1038
|
+
return J({
|
|
1015
1039
|
name: (t = e.control) == null ? void 0 : t.fieldName,
|
|
1016
1040
|
class: O.value,
|
|
1017
|
-
density:
|
|
1018
|
-
variant:
|
|
1041
|
+
density: ee.value,
|
|
1042
|
+
variant: j.value,
|
|
1019
1043
|
label: C.value.text,
|
|
1020
|
-
errorMessages:
|
|
1044
|
+
errorMessages: g.value,
|
|
1021
1045
|
readonly: !_.value,
|
|
1022
1046
|
disabled: !_.value,
|
|
1023
1047
|
placeholder: w.value,
|
|
1024
|
-
"persistent-placeholder": !
|
|
1048
|
+
"persistent-placeholder": !se(w.value),
|
|
1025
1049
|
hint: E.value,
|
|
1026
1050
|
persistentHint: !0,
|
|
1027
1051
|
hideDetails: "auto",
|
|
@@ -1032,7 +1056,7 @@ function Z(e, n) {
|
|
|
1032
1056
|
}
|
|
1033
1057
|
//#endregion
|
|
1034
1058
|
//#region src/helpers/input-base.vue?vue&type=script&setup=true&lang.ts
|
|
1035
|
-
var
|
|
1059
|
+
var Ft = { class: "d-flex w-100 df-style-resetting df-sub-field" }, It = /* @__PURE__ */ l({
|
|
1036
1060
|
__name: "input-base",
|
|
1037
1061
|
props: {
|
|
1038
1062
|
control: {},
|
|
@@ -1057,7 +1081,7 @@ var Nt = { class: "d-flex w-100 df-style-resetting df-sub-field" }, Pt = /* @__P
|
|
|
1057
1081
|
"blur"
|
|
1058
1082
|
],
|
|
1059
1083
|
setup(e, { emit: i }) {
|
|
1060
|
-
let s = e, l = i, { isRendered: d, label: f,
|
|
1084
|
+
let s = e, l = i, { isRendered: d, label: f, shownErrors: p, touched: m, value: h, visibilityClass: v, vuetifyBindings: y } = Q(s, l), b = t(() => !!(j(s.clearable) && j(h))), C = S(!1);
|
|
1061
1085
|
function E(e) {
|
|
1062
1086
|
C.value = e, e || (m.value = !0, l("blur"));
|
|
1063
1087
|
}
|
|
@@ -1073,11 +1097,11 @@ var Nt = { class: "d-flex w-100 df-style-resetting df-sub-field" }, Pt = /* @__P
|
|
|
1073
1097
|
"error-messages": j(y).errorMessages,
|
|
1074
1098
|
class: g([e.cssClass, j(v)])
|
|
1075
1099
|
}, o({
|
|
1076
|
-
message:
|
|
1100
|
+
message: F(({ message: e }) => [c(Y, {
|
|
1077
1101
|
message: e,
|
|
1078
1102
|
errors: j(p)
|
|
1079
1103
|
}, null, 8, ["message", "errors"])]),
|
|
1080
|
-
default:
|
|
1104
|
+
default: F(() => [c(s, {
|
|
1081
1105
|
variant: j(y).variant,
|
|
1082
1106
|
density: j(y).density,
|
|
1083
1107
|
label: j(y).label,
|
|
@@ -1090,16 +1114,16 @@ var Nt = { class: "d-flex w-100 df-style-resetting df-sub-field" }, Pt = /* @__P
|
|
|
1090
1114
|
"onClick:clear": i[0] || (i[0] = (e) => l("click:clear")),
|
|
1091
1115
|
"onUpdate:focused": i[1] || (i[1] = (e) => E(e))
|
|
1092
1116
|
}, o({
|
|
1093
|
-
label:
|
|
1117
|
+
label: F((e) => [c(X, {
|
|
1094
1118
|
data: e,
|
|
1095
1119
|
label: j(f)
|
|
1096
1120
|
}, null, 8, ["data", "label"])]),
|
|
1097
|
-
default:
|
|
1098
|
-
loader:
|
|
1121
|
+
default: F((e) => [a("div", Ft, [w(t.$slots, "default", _(u(e)))])]),
|
|
1122
|
+
loader: F((e) => [w(t.$slots, "loader", _(u(e)))]),
|
|
1099
1123
|
_: 2
|
|
1100
1124
|
}, [t.$slots["prepend-inner"] ? {
|
|
1101
1125
|
name: "prepend-inner",
|
|
1102
|
-
fn:
|
|
1126
|
+
fn: F((e) => [w(t.$slots, "prepend-inner", _(u(e)))]),
|
|
1103
1127
|
key: "0"
|
|
1104
1128
|
} : void 0]), 1032, [
|
|
1105
1129
|
"variant",
|
|
@@ -1114,7 +1138,7 @@ var Nt = { class: "d-flex w-100 df-style-resetting df-sub-field" }, Pt = /* @__P
|
|
|
1114
1138
|
_: 2
|
|
1115
1139
|
}, [t.$slots.prepend ? {
|
|
1116
1140
|
name: "prepend",
|
|
1117
|
-
fn:
|
|
1141
|
+
fn: F((e) => [w(t.$slots, "prepend", _(u(e)))]),
|
|
1118
1142
|
key: "0"
|
|
1119
1143
|
} : void 0]), 1032, [
|
|
1120
1144
|
"name",
|
|
@@ -1127,7 +1151,7 @@ var Nt = { class: "d-flex w-100 df-style-resetting df-sub-field" }, Pt = /* @__P
|
|
|
1127
1151
|
])) : r("", !0);
|
|
1128
1152
|
};
|
|
1129
1153
|
}
|
|
1130
|
-
}), { strings:
|
|
1154
|
+
}), { strings: Lt, translateStrings: Rt } = pe({
|
|
1131
1155
|
Yes: "Yes",
|
|
1132
1156
|
No: "No",
|
|
1133
1157
|
Close: "Close",
|
|
@@ -1190,36 +1214,21 @@ var Nt = { class: "d-flex w-100 df-style-resetting df-sub-field" }, Pt = /* @__P
|
|
|
1190
1214
|
MediaEmbedUrl: "Video URL",
|
|
1191
1215
|
MediaEmbedInsert: "Insert",
|
|
1192
1216
|
InvalidHexColor: "Not a valid hex string."
|
|
1193
|
-
}),
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
function t(e) {
|
|
1198
|
-
return e.toUpperCase() === "BUTTON" ? 0 : +(e.toUpperCase() === "TEXT");
|
|
1199
|
-
}
|
|
1200
|
-
e.fromString = t;
|
|
1201
|
-
function n(e) {
|
|
1202
|
-
let t = typeof e == "number" ? e : Q.fromString(e);
|
|
1203
|
-
return Object.values(Q).includes(t) ? t : 0;
|
|
1204
|
-
}
|
|
1205
|
-
e.fromAny = n;
|
|
1206
|
-
function r(e) {
|
|
1207
|
-
let t = typeof e == "number" ? e : Q.fromString(e);
|
|
1208
|
-
return Object.values(Q).includes(t);
|
|
1209
|
-
}
|
|
1210
|
-
e.isDefined = r;
|
|
1211
|
-
})(Q || (Q = {})), Object.freeze(Q);
|
|
1217
|
+
}), zt = Object.freeze(["button", "text"]), Bt = "button";
|
|
1218
|
+
function Vt(e) {
|
|
1219
|
+
return zt.includes(e);
|
|
1220
|
+
}
|
|
1212
1221
|
//#endregion
|
|
1213
1222
|
//#region src/helpers/action/responsive-render-options.ts
|
|
1214
|
-
var
|
|
1223
|
+
var Ht = [
|
|
1215
1224
|
"xs",
|
|
1216
1225
|
"sm",
|
|
1217
1226
|
"md",
|
|
1218
1227
|
"lg",
|
|
1219
1228
|
"xl"
|
|
1220
|
-
],
|
|
1229
|
+
], Ut = class {
|
|
1221
1230
|
constructor(e) {
|
|
1222
|
-
ft(this, "_value", void 0), this._value = this.cleanBreakpoint(e, !0), e &&
|
|
1231
|
+
ft(this, "_value", void 0), this._value = this.cleanBreakpoint(e, !0), e && Ht.forEach((t) => {
|
|
1223
1232
|
let n = this.cleanBreakpoint(e[t]);
|
|
1224
1233
|
n && (this._value[t] = n);
|
|
1225
1234
|
});
|
|
@@ -1227,43 +1236,50 @@ var Rt = [
|
|
|
1227
1236
|
getOptionsForBreakpoint(e) {
|
|
1228
1237
|
var t;
|
|
1229
1238
|
let n = (t = this.cleanBreakpoint(this._value)) == null ? {} : t;
|
|
1230
|
-
for (let t of
|
|
1239
|
+
for (let t of Ht) {
|
|
1231
1240
|
var r;
|
|
1232
1241
|
let i = (r = this._value[t]) == null ? {} : r;
|
|
1233
1242
|
for (let e of Object.keys(i)) {
|
|
1234
1243
|
let t = i[e];
|
|
1235
|
-
t != null && (n[e] =
|
|
1244
|
+
t != null && (n[e] = de(t) ? J(J({}, n[e]), t) : t);
|
|
1236
1245
|
}
|
|
1237
1246
|
if (t === e) break;
|
|
1238
1247
|
}
|
|
1239
1248
|
return n;
|
|
1240
1249
|
}
|
|
1241
1250
|
};
|
|
1242
|
-
function
|
|
1251
|
+
function Wt(e) {
|
|
1243
1252
|
return e.xlAndUp.value ? "xl" : e.lgAndUp.value ? "lg" : e.mdAndUp.value ? "md" : e.smAndUp.value ? "sm" : "xs";
|
|
1244
1253
|
}
|
|
1245
|
-
function
|
|
1246
|
-
let e =
|
|
1247
|
-
return t(() =>
|
|
1254
|
+
function Gt() {
|
|
1255
|
+
let e = me();
|
|
1256
|
+
return t(() => Wt(e));
|
|
1248
1257
|
}
|
|
1249
1258
|
//#endregion
|
|
1250
1259
|
//#region src/helpers/action/action-render-options.ts
|
|
1251
|
-
var
|
|
1260
|
+
var Kt = class extends Ut {
|
|
1252
1261
|
cleanBreakpoint(e, t = !1) {
|
|
1253
|
-
if ((!e || !
|
|
1262
|
+
if ((!e || !ue(e)) && !t) return null;
|
|
1254
1263
|
let n = {};
|
|
1255
|
-
|
|
1264
|
+
if (t && (n.renderAs = Bt, n.showLabel = !0, n.showIcon = !0), e) {
|
|
1265
|
+
if (e.renderAs != null) {
|
|
1266
|
+
if (!Vt(e.renderAs)) throw Error(`'${e.renderAs}' is not an action display style: ${zt.join(", ")}`);
|
|
1267
|
+
n.renderAs = e.renderAs;
|
|
1268
|
+
}
|
|
1269
|
+
K(e.label) && (n.label = e.label), K(e.icon) && (n.icon = e.icon), G(e.showLabel) && (n.showLabel = e.showLabel), G(e.showIcon) && (n.showIcon = e.showIcon), K(e.name) && (n.name = e.name), G(e.defaultConfirm) && (n.defaultConfirm = e.defaultConfirm), G(e.defaultReject) && (n.defaultReject = e.defaultReject), de(e.passthroughAttrs) && (n.passthroughAttrs = J({}, e.passthroughAttrs));
|
|
1270
|
+
}
|
|
1271
|
+
return Object.keys(n).length ? n : null;
|
|
1256
1272
|
}
|
|
1257
1273
|
};
|
|
1258
|
-
function
|
|
1259
|
-
let n = new
|
|
1274
|
+
function qt(e, t) {
|
|
1275
|
+
let n = new Kt(e).getOptionsForBreakpoint(t);
|
|
1260
1276
|
return {
|
|
1261
1277
|
name: n.name,
|
|
1262
1278
|
label: n.showLabel ? n.label : void 0,
|
|
1263
1279
|
icon: n.showIcon ? n.icon : void 0,
|
|
1264
1280
|
renderAs: n.renderAs,
|
|
1265
|
-
showLabel:
|
|
1266
|
-
showIcon:
|
|
1281
|
+
showLabel: K(n.label) && !se(n.label) ? n.showLabel : !1,
|
|
1282
|
+
showIcon: K(n.icon) && !se(n.icon) ? n.showIcon : !1,
|
|
1267
1283
|
defaultConfirm: n.defaultConfirm,
|
|
1268
1284
|
defaultReject: n.defaultReject,
|
|
1269
1285
|
passthroughAttrs: n.passthroughAttrs
|
|
@@ -1271,9 +1287,9 @@ function Ut(e, t) {
|
|
|
1271
1287
|
}
|
|
1272
1288
|
//#endregion
|
|
1273
1289
|
//#region src/helpers/action/action.ts
|
|
1274
|
-
var
|
|
1290
|
+
var Jt = class e extends B {
|
|
1275
1291
|
getBreakpointValue(e) {
|
|
1276
|
-
return t(() =>
|
|
1292
|
+
return t(() => qt(this.value, e.value));
|
|
1277
1293
|
}
|
|
1278
1294
|
get name() {
|
|
1279
1295
|
return this.value.name;
|
|
@@ -1282,13 +1298,13 @@ var Wt = class e extends R {
|
|
|
1282
1298
|
return this.value.showLabel ? this.value.label : void 0;
|
|
1283
1299
|
}
|
|
1284
1300
|
get showLabel() {
|
|
1285
|
-
return
|
|
1301
|
+
return K(this.value.label) && !se(this.value.label) ? this.value.showLabel : !1;
|
|
1286
1302
|
}
|
|
1287
1303
|
get renderedIcon() {
|
|
1288
1304
|
return this.value.showIcon ? this.value.icon : void 0;
|
|
1289
1305
|
}
|
|
1290
1306
|
get showIcon() {
|
|
1291
|
-
return
|
|
1307
|
+
return K(this.value.icon) && !se(this.value.icon) ? this.value.showIcon : !1;
|
|
1292
1308
|
}
|
|
1293
1309
|
get renderAs() {
|
|
1294
1310
|
return this.value.renderAs;
|
|
@@ -1304,44 +1320,44 @@ var Wt = class e extends R {
|
|
|
1304
1320
|
}
|
|
1305
1321
|
static closeAction(t) {
|
|
1306
1322
|
var n;
|
|
1307
|
-
let r =
|
|
1323
|
+
let r = J(J({}, t == null ? {} : t), {}, { value: {
|
|
1308
1324
|
name: "close",
|
|
1309
|
-
label:
|
|
1325
|
+
label: Lt.Close,
|
|
1310
1326
|
icon: "ion-close-outline",
|
|
1311
|
-
renderAs:
|
|
1327
|
+
renderAs: "button",
|
|
1312
1328
|
showLabel: !0,
|
|
1313
1329
|
showIcon: !0
|
|
1314
1330
|
} });
|
|
1315
|
-
return r.value =
|
|
1331
|
+
return r.value = J(J({}, r.value), (n = t == null ? void 0 : t.value) == null ? {} : n), new e(r);
|
|
1316
1332
|
}
|
|
1317
1333
|
static yesAction(t) {
|
|
1318
1334
|
var n;
|
|
1319
|
-
let r =
|
|
1335
|
+
let r = J(J({}, t == null ? {} : t), {}, { value: {
|
|
1320
1336
|
name: "yes",
|
|
1321
|
-
label:
|
|
1337
|
+
label: Lt.Yes,
|
|
1322
1338
|
icon: "ion-thumbs-up-outline",
|
|
1323
|
-
renderAs:
|
|
1339
|
+
renderAs: "button",
|
|
1324
1340
|
showLabel: !0,
|
|
1325
1341
|
showIcon: !0
|
|
1326
1342
|
} });
|
|
1327
|
-
return r.value =
|
|
1343
|
+
return r.value = J(J({}, r.value), (n = t == null ? void 0 : t.value) == null ? {} : n), new e(r);
|
|
1328
1344
|
}
|
|
1329
1345
|
static noAction(t) {
|
|
1330
1346
|
var n;
|
|
1331
|
-
let r =
|
|
1347
|
+
let r = J(J({}, t == null ? {} : t), {}, { value: {
|
|
1332
1348
|
name: "no",
|
|
1333
|
-
label:
|
|
1349
|
+
label: Lt.No,
|
|
1334
1350
|
icon: "ion-thumbs-down-outline",
|
|
1335
|
-
renderAs:
|
|
1351
|
+
renderAs: "button",
|
|
1336
1352
|
showLabel: !0,
|
|
1337
1353
|
showIcon: !0
|
|
1338
1354
|
} });
|
|
1339
|
-
return r.value =
|
|
1355
|
+
return r.value = J(J({}, r.value), (n = t == null ? void 0 : t.value) == null ? {} : n), new e(r);
|
|
1340
1356
|
}
|
|
1341
1357
|
};
|
|
1342
1358
|
//#endregion
|
|
1343
1359
|
//#region src/helpers/use-file-touch-keepalive.ts
|
|
1344
|
-
function
|
|
1360
|
+
function Yt(e, t, n, r) {
|
|
1345
1361
|
let i = d(jt, {}), a = S(null);
|
|
1346
1362
|
function o() {
|
|
1347
1363
|
a.value && window.clearInterval(a.value);
|
|
@@ -1361,15 +1377,15 @@ function Gt(e, t, n, r) {
|
|
|
1361
1377
|
clearTouchInterval: o
|
|
1362
1378
|
};
|
|
1363
1379
|
}
|
|
1364
|
-
function
|
|
1380
|
+
function Xt(e, t) {
|
|
1365
1381
|
e && (e.errors = [new ie(t)]);
|
|
1366
1382
|
}
|
|
1367
1383
|
//#endregion
|
|
1368
1384
|
//#region src/df-actions.vue?vue&type=script&setup=true&lang.ts
|
|
1369
|
-
var
|
|
1385
|
+
var Zt = {
|
|
1370
1386
|
key: 1,
|
|
1371
1387
|
style: { width: "0.5rem" }
|
|
1372
|
-
},
|
|
1388
|
+
}, Qt = { key: 2 }, $t = /* @__PURE__ */ l({
|
|
1373
1389
|
__name: "df-actions",
|
|
1374
1390
|
props: {
|
|
1375
1391
|
actions: {},
|
|
@@ -1378,7 +1394,7 @@ var qt = {
|
|
|
1378
1394
|
showAsGroup: { default: "no" }
|
|
1379
1395
|
},
|
|
1380
1396
|
setup(a) {
|
|
1381
|
-
let o = a, s =
|
|
1397
|
+
let o = a, s = Gt(), c = t(() => j(o.actions).filter((e) => e.visibility !== "suppress")), l = t(() => c.value.map((e) => J({ action: e }, qt(e.value, s.value))));
|
|
1382
1398
|
function u(e) {
|
|
1383
1399
|
if (e.defaultConfirm) return "primary";
|
|
1384
1400
|
if (e.defaultReject) return "secondary";
|
|
@@ -1393,7 +1409,7 @@ var qt = {
|
|
|
1393
1409
|
}])
|
|
1394
1410
|
}, [(x(!0), i(e, null, C(l.value, (e, t) => (x(), n(s, m({
|
|
1395
1411
|
key: t,
|
|
1396
|
-
variant: e.renderAs ===
|
|
1412
|
+
variant: e.renderAs === "button" ? "tonal" : "text",
|
|
1397
1413
|
color: u(e),
|
|
1398
1414
|
disabled: !e.action.effectiveEnabled || e.action.busy,
|
|
1399
1415
|
loading: e.action.busy,
|
|
@@ -1401,17 +1417,17 @@ var qt = {
|
|
|
1401
1417
|
size: a.buttonSize,
|
|
1402
1418
|
density: a.buttonDensity,
|
|
1403
1419
|
class: {
|
|
1404
|
-
"d-none": e.action.visibility ===
|
|
1405
|
-
invisible: e.action.visibility ===
|
|
1420
|
+
"d-none": e.action.visibility === "hidden",
|
|
1421
|
+
invisible: e.action.visibility === "invisible"
|
|
1406
1422
|
}
|
|
1407
|
-
}, { ref_for: !0 }, e.passthroughAttrs, { onClick:
|
|
1408
|
-
default:
|
|
1409
|
-
e.icon ? (x(), n(j(
|
|
1423
|
+
}, { ref_for: !0 }, e.passthroughAttrs, { onClick: L((t) => e.action.execute(t), ["stop"]) }), {
|
|
1424
|
+
default: F(() => [
|
|
1425
|
+
e.icon ? (x(), n(j(R), {
|
|
1410
1426
|
key: 0,
|
|
1411
1427
|
name: e.icon
|
|
1412
1428
|
}, null, 8, ["name"])) : r("", !0),
|
|
1413
|
-
e.icon && e.label ? (x(), i("span",
|
|
1414
|
-
e.label ? (x(), i("span",
|
|
1429
|
+
e.icon && e.label ? (x(), i("span", Zt)) : r("", !0),
|
|
1430
|
+
e.label ? (x(), i("span", Qt, O(e.label), 1)) : r("", !0)
|
|
1415
1431
|
]),
|
|
1416
1432
|
_: 2
|
|
1417
1433
|
}, 1040, [
|
|
@@ -1426,7 +1442,7 @@ var qt = {
|
|
|
1426
1442
|
]))), 128))], 2)) : r("", !0);
|
|
1427
1443
|
};
|
|
1428
1444
|
}
|
|
1429
|
-
}),
|
|
1445
|
+
}), en = /* @__PURE__ */ l({
|
|
1430
1446
|
__name: "df-checkbox",
|
|
1431
1447
|
props: /*@__PURE__*/ p({
|
|
1432
1448
|
allowNull: { type: Boolean },
|
|
@@ -1444,10 +1460,10 @@ var qt = {
|
|
|
1444
1460
|
passthroughAttrs: {},
|
|
1445
1461
|
density: {},
|
|
1446
1462
|
variant: {}
|
|
1447
|
-
},
|
|
1463
|
+
}, J(J({}, Z), {}, { allowNull: !1 })),
|
|
1448
1464
|
emits: ["update:modelValue", "click:clear"],
|
|
1449
1465
|
setup(e, { emit: i }) {
|
|
1450
|
-
let a = e, { densityClass: o, isRendered: s, label: l,
|
|
1466
|
+
let a = e, { densityClass: o, isRendered: s, label: l, shownErrors: u, touched: d, value: f, visibilityClass: p, vuetifyBindings: h } = Q(a, i), g = t(() => a.allowNull && f.value == null), _ = t({
|
|
1451
1467
|
get() {
|
|
1452
1468
|
return f.value;
|
|
1453
1469
|
},
|
|
@@ -1472,12 +1488,12 @@ var qt = {
|
|
|
1472
1488
|
onChange: v,
|
|
1473
1489
|
onBlur: t[1] || (t[1] = (e) => d.value = !0)
|
|
1474
1490
|
}), {
|
|
1475
|
-
label:
|
|
1491
|
+
label: F((e) => [c(j(X), {
|
|
1476
1492
|
"allow-wrap": !0,
|
|
1477
1493
|
data: e,
|
|
1478
1494
|
label: j(l)
|
|
1479
1495
|
}, null, 8, ["data", "label"])]),
|
|
1480
|
-
message:
|
|
1496
|
+
message: F(({ message: e }) => [c(j(Y), {
|
|
1481
1497
|
message: e,
|
|
1482
1498
|
errors: j(u)
|
|
1483
1499
|
}, null, 8, ["message", "errors"])]),
|
|
@@ -1489,7 +1505,7 @@ var qt = {
|
|
|
1489
1505
|
])) : r("", !0);
|
|
1490
1506
|
};
|
|
1491
1507
|
}
|
|
1492
|
-
}),
|
|
1508
|
+
}), tn = /* @__PURE__ */ l({
|
|
1493
1509
|
__name: "df-color",
|
|
1494
1510
|
props: /*@__PURE__*/ p({
|
|
1495
1511
|
allowNull: { type: Boolean },
|
|
@@ -1507,10 +1523,10 @@ var qt = {
|
|
|
1507
1523
|
passthroughAttrs: {},
|
|
1508
1524
|
density: {},
|
|
1509
1525
|
variant: {}
|
|
1510
|
-
},
|
|
1526
|
+
}, J(J({}, Z), {}, { allowNull: !1 })),
|
|
1511
1527
|
emits: ["update:modelValue", "click:clear"],
|
|
1512
1528
|
setup(e, { emit: i }) {
|
|
1513
|
-
let o = e, { densityClass: s, isRendered: l, label: u,
|
|
1529
|
+
let o = e, { densityClass: s, isRendered: l, label: u, shownErrors: d, touched: p, value: h, visibilityClass: g, vuetifyBindings: _ } = Q(o, i), y = S(!1), b = t(() => [(e) => o.control || !e && o.allowNull || /^#?([a-fA-F0-9]{3}|[a-fA-F0-9]{4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})$/.test(e) ? !0 : Lt.InvalidHexColor]);
|
|
1514
1530
|
return (t, i) => {
|
|
1515
1531
|
let o = T("v-color-picker"), S = T("v-menu"), C = T("v-text-field");
|
|
1516
1532
|
return j(l) ? (x(), n(C, m({
|
|
@@ -1522,27 +1538,27 @@ var qt = {
|
|
|
1522
1538
|
type: "text",
|
|
1523
1539
|
rules: b.value
|
|
1524
1540
|
}, j(_), { onBlur: i[3] || (i[3] = (e) => p.value = !0) }), {
|
|
1525
|
-
label:
|
|
1541
|
+
label: F((e) => [c(j(X), {
|
|
1526
1542
|
data: e,
|
|
1527
1543
|
label: j(u)
|
|
1528
1544
|
}, null, 8, ["data", "label"])]),
|
|
1529
|
-
message:
|
|
1545
|
+
message: F(({ message: e }) => [c(j(Y), {
|
|
1530
1546
|
message: e,
|
|
1531
1547
|
errors: j(d)
|
|
1532
1548
|
}, null, 8, ["message", "errors"])]),
|
|
1533
|
-
"prepend-inner":
|
|
1549
|
+
"prepend-inner": F(() => [a("div", { style: v([{
|
|
1534
1550
|
width: "24px",
|
|
1535
1551
|
height: "24px",
|
|
1536
1552
|
"border-radius": "4px",
|
|
1537
1553
|
border: "1px solid #ccc"
|
|
1538
1554
|
}, { backgroundColor: j(h) }]) }, null, 4)]),
|
|
1539
|
-
default:
|
|
1555
|
+
default: F(() => [c(S, {
|
|
1540
1556
|
modelValue: y.value,
|
|
1541
1557
|
"onUpdate:modelValue": i[1] || (i[1] = (e) => y.value = e),
|
|
1542
1558
|
"close-on-content-click": !1,
|
|
1543
1559
|
activator: "parent"
|
|
1544
1560
|
}, {
|
|
1545
|
-
default:
|
|
1561
|
+
default: F(() => [c(o, {
|
|
1546
1562
|
modelValue: j(h),
|
|
1547
1563
|
"onUpdate:modelValue": i[0] || (i[0] = (e) => f(h) ? h.value = e : null),
|
|
1548
1564
|
mode: "hexa"
|
|
@@ -1558,7 +1574,7 @@ var qt = {
|
|
|
1558
1574
|
])) : r("", !0);
|
|
1559
1575
|
};
|
|
1560
1576
|
}
|
|
1561
|
-
}),
|
|
1577
|
+
}), nn = /* @__PURE__ */ l({
|
|
1562
1578
|
__name: "df-datetime",
|
|
1563
1579
|
props: /*@__PURE__*/ p({
|
|
1564
1580
|
inputType: {},
|
|
@@ -1579,7 +1595,7 @@ var qt = {
|
|
|
1579
1595
|
passthroughAttrs: {},
|
|
1580
1596
|
density: {},
|
|
1581
1597
|
variant: {}
|
|
1582
|
-
},
|
|
1598
|
+
}, J(J({}, Z), {}, {
|
|
1583
1599
|
inputType: "datetime",
|
|
1584
1600
|
displayFormatDate: "P",
|
|
1585
1601
|
displayFormatTime: "p"
|
|
@@ -1592,7 +1608,7 @@ var qt = {
|
|
|
1592
1608
|
}), u = t(() => {
|
|
1593
1609
|
var e, t;
|
|
1594
1610
|
return (e = (t = l.value.options) == null ? void 0 : t.weekStartsOn) == null ? 1 : e;
|
|
1595
|
-
}), { density: d, densityClass: f, touched: p, value: h, vuetifyBindings: _ } =
|
|
1611
|
+
}), { density: d, densityClass: f, touched: p, value: h, vuetifyBindings: _ } = Q(o, s), { inputType: v, displayFormatDate: y, displayFormatTime: b } = A(o), C = S(""), w = t({
|
|
1596
1612
|
get() {
|
|
1597
1613
|
return j(C) === "date";
|
|
1598
1614
|
},
|
|
@@ -1606,23 +1622,23 @@ var qt = {
|
|
|
1606
1622
|
set(e) {
|
|
1607
1623
|
C.value = e ? "time" : "";
|
|
1608
1624
|
}
|
|
1609
|
-
}), O = (e) => `${
|
|
1610
|
-
function
|
|
1625
|
+
}), O = (e) => `${he(e, "yyyy-MM-dd")}T${he(e, "HH:mm")}:00`, k = S(null);
|
|
1626
|
+
function ee(e, t, n) {
|
|
1627
|
+
let r = e.split(/[TZ]/g);
|
|
1628
|
+
return r[n] = t.split(/[TZ]/g)[n], r;
|
|
1629
|
+
}
|
|
1630
|
+
let M = (e) => O(/* @__PURE__ */ new Date(`${e[0]}T${e[1].split(".")[0]}`));
|
|
1631
|
+
function te(e, t) {
|
|
1611
1632
|
if (e == null) k.value = null;
|
|
1612
|
-
else if (t === -1) {
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
}
|
|
1618
|
-
} else {
|
|
1619
|
-
k.value == null && (k.value = O(/* @__PURE__ */ new Date()));
|
|
1620
|
-
let n = k.value.split(/[TZ]/g);
|
|
1621
|
-
n[t] = e.split(/[TZ]/g)[t], k.value = O(/* @__PURE__ */ new Date(`${n[0]}T${n[1].split(".")[0]}`)), j(v) === "date" ? h.value = n[0] : j(v) === "time" ? h.value = n[1] : h.value = j(k) + ge(/* @__PURE__ */ new Date(), "XXX");
|
|
1633
|
+
else if (t === -1) j(v) === "time" ? k.value = M(ee(O(/* @__PURE__ */ new Date()), `T${e}`, 1)) : k.value = O(_e(e));
|
|
1634
|
+
else {
|
|
1635
|
+
var n;
|
|
1636
|
+
let r = ee((n = k.value) == null ? O(/* @__PURE__ */ new Date()) : n, e, t);
|
|
1637
|
+
k.value = M(r), j(v) === "date" ? h.value = r[0] : j(v) === "time" ? h.value = r[1] : h.value = k.value + he(new Date(k.value), "XXX");
|
|
1622
1638
|
}
|
|
1623
1639
|
}
|
|
1624
|
-
N(h, (e) =>
|
|
1625
|
-
let
|
|
1640
|
+
N(h, (e) => te(e, -1), { immediate: !0 });
|
|
1641
|
+
let P = t({
|
|
1626
1642
|
get() {
|
|
1627
1643
|
let e = j(k);
|
|
1628
1644
|
if (e == null) return null;
|
|
@@ -1630,50 +1646,50 @@ var qt = {
|
|
|
1630
1646
|
return Number.isNaN(t.getTime()) ? null : t;
|
|
1631
1647
|
},
|
|
1632
1648
|
set(e) {
|
|
1633
|
-
|
|
1649
|
+
te(O(e), 0);
|
|
1634
1650
|
}
|
|
1635
|
-
}),
|
|
1651
|
+
}), L = t({
|
|
1636
1652
|
get() {
|
|
1637
1653
|
let e = j(k);
|
|
1638
1654
|
return e == null ? "" : e.split(/[TZ]/g)[1].split(".")[0];
|
|
1639
1655
|
},
|
|
1640
1656
|
set(e) {
|
|
1641
|
-
|
|
1657
|
+
te(`T${e}`, 1);
|
|
1642
1658
|
}
|
|
1643
|
-
}),
|
|
1659
|
+
}), R = t({
|
|
1644
1660
|
get() {
|
|
1645
|
-
let e = j(
|
|
1646
|
-
return e == null ? "" :
|
|
1661
|
+
let e = j(P);
|
|
1662
|
+
return e == null ? "" : he(e, j(y), { locale: l.value });
|
|
1647
1663
|
},
|
|
1648
1664
|
set(e) {
|
|
1649
1665
|
try {
|
|
1650
|
-
let t =
|
|
1651
|
-
|
|
1666
|
+
let t = ge(e, j(y), /* @__PURE__ */ new Date(), { locale: l.value });
|
|
1667
|
+
te(O(t), 0);
|
|
1652
1668
|
} catch (e) {
|
|
1653
1669
|
console.error(e);
|
|
1654
1670
|
}
|
|
1655
1671
|
}
|
|
1656
|
-
}),
|
|
1672
|
+
}), z = t({
|
|
1657
1673
|
get() {
|
|
1658
|
-
let e = j(
|
|
1659
|
-
return e == null ? "" :
|
|
1674
|
+
let e = j(P);
|
|
1675
|
+
return e == null ? "" : he(e, j(b), { locale: l.value });
|
|
1660
1676
|
},
|
|
1661
1677
|
set(e) {
|
|
1662
1678
|
let t = e.match(/(\d+):(\d+)\s?([a-zA-Z]+)?/);
|
|
1663
1679
|
if (t == null) return;
|
|
1664
|
-
let n =
|
|
1665
|
-
|
|
1680
|
+
let n = q(t[1]), r = q(t[2]);
|
|
1681
|
+
le(n) || le(r) || (t[3] && t[3].toLowerCase() === "pm" && n < 13 && (n += 12), te(`T${n.toString().padStart(2, "0")}:${r.toString().padStart(2, "0")}:00`, 1));
|
|
1666
1682
|
}
|
|
1667
1683
|
});
|
|
1668
1684
|
return (t, i) => {
|
|
1669
1685
|
let s = T("v-date-picker"), l = T("v-confirm-edit"), y = T("v-menu"), b = T("v-text-field"), S = T("v-time-picker");
|
|
1670
|
-
return x(), n(j(
|
|
1686
|
+
return x(), n(j(It), m(o, {
|
|
1671
1687
|
class: j(f),
|
|
1672
1688
|
clearable: e.clearable,
|
|
1673
1689
|
"onClick:clear": i[14] || (i[14] = (e) => h.value = null),
|
|
1674
1690
|
onBlur: i[15] || (i[15] = (e) => p.value = !0)
|
|
1675
1691
|
}), {
|
|
1676
|
-
default:
|
|
1692
|
+
default: F((t) => [a("div", { class: g([
|
|
1677
1693
|
"d-flex",
|
|
1678
1694
|
"w-100",
|
|
1679
1695
|
["plain", "underlined"].includes(j(_).variant) ? void 0 : "ml-4",
|
|
@@ -1681,8 +1697,8 @@ var qt = {
|
|
|
1681
1697
|
j(d)
|
|
1682
1698
|
]) }, [["date", "datetime"].includes(j(v)) ? (x(), n(b, m({
|
|
1683
1699
|
key: 0,
|
|
1684
|
-
modelValue:
|
|
1685
|
-
"onUpdate:modelValue": i[4] || (i[4] = (e) =>
|
|
1700
|
+
modelValue: R.value,
|
|
1701
|
+
"onUpdate:modelValue": i[4] || (i[4] = (e) => R.value = e),
|
|
1686
1702
|
style: { "flex-grow": "4" },
|
|
1687
1703
|
density: "compact",
|
|
1688
1704
|
variant: "plain",
|
|
@@ -1694,23 +1710,23 @@ var qt = {
|
|
|
1694
1710
|
placeholder: j(_).placeholder
|
|
1695
1711
|
}, e.passthroughAttrs, {
|
|
1696
1712
|
onClick: i[5] || (i[5] = (e) => C.value = "date"),
|
|
1697
|
-
onKeydown: i[6] || (i[6] =
|
|
1713
|
+
onKeydown: i[6] || (i[6] = I((e) => C.value = "date", ["space"])),
|
|
1698
1714
|
onFocus: (e) => t.focus(),
|
|
1699
1715
|
onBlur: (e) => t.blur()
|
|
1700
1716
|
}), {
|
|
1701
|
-
default:
|
|
1717
|
+
default: F(() => [c(y, {
|
|
1702
1718
|
modelValue: w.value,
|
|
1703
1719
|
"onUpdate:modelValue": i[3] || (i[3] = (e) => w.value = e),
|
|
1704
1720
|
"close-on-content-click": !1,
|
|
1705
1721
|
activator: "parent"
|
|
1706
1722
|
}, {
|
|
1707
|
-
default:
|
|
1708
|
-
modelValue:
|
|
1709
|
-
"onUpdate:modelValue": i[0] || (i[0] = (e) =>
|
|
1723
|
+
default: F(() => [c(l, {
|
|
1724
|
+
modelValue: P.value,
|
|
1725
|
+
"onUpdate:modelValue": i[0] || (i[0] = (e) => P.value = e),
|
|
1710
1726
|
onCancel: i[1] || (i[1] = (e) => C.value = ""),
|
|
1711
1727
|
onSave: i[2] || (i[2] = (e) => C.value = "")
|
|
1712
1728
|
}, {
|
|
1713
|
-
default:
|
|
1729
|
+
default: F(({ model: e, actions: t }) => [c(s, {
|
|
1714
1730
|
modelValue: e.value,
|
|
1715
1731
|
"onUpdate:modelValue": (t) => e.value = t,
|
|
1716
1732
|
"hide-header": !0,
|
|
@@ -1718,7 +1734,7 @@ var qt = {
|
|
|
1718
1734
|
"show-adjacent-months": !0,
|
|
1719
1735
|
"show-week": !0
|
|
1720
1736
|
}, {
|
|
1721
|
-
actions:
|
|
1737
|
+
actions: F(() => [(x(), n(E(t)))]),
|
|
1722
1738
|
_: 2
|
|
1723
1739
|
}, 1032, [
|
|
1724
1740
|
"modelValue",
|
|
@@ -1740,8 +1756,8 @@ var qt = {
|
|
|
1740
1756
|
"onBlur"
|
|
1741
1757
|
])) : r("", !0), ["time", "datetime"].includes(j(v)) ? (x(), n(b, m({
|
|
1742
1758
|
key: 1,
|
|
1743
|
-
modelValue:
|
|
1744
|
-
"onUpdate:modelValue": i[11] || (i[11] = (e) =>
|
|
1759
|
+
modelValue: z.value,
|
|
1760
|
+
"onUpdate:modelValue": i[11] || (i[11] = (e) => z.value = e),
|
|
1745
1761
|
style: { "flex-grow": "3" },
|
|
1746
1762
|
density: "compact",
|
|
1747
1763
|
variant: "plain",
|
|
@@ -1753,29 +1769,29 @@ var qt = {
|
|
|
1753
1769
|
placeholder: j(v) === "time" ? j(_).placeholder : void 0
|
|
1754
1770
|
}, e.passthroughAttrs, {
|
|
1755
1771
|
onClick: i[12] || (i[12] = (e) => C.value = "time"),
|
|
1756
|
-
onKeydown: i[13] || (i[13] =
|
|
1772
|
+
onKeydown: i[13] || (i[13] = I((e) => C.value = "time", ["space"])),
|
|
1757
1773
|
onFocus: (e) => t.focus(),
|
|
1758
1774
|
onBlur: (e) => t.blur()
|
|
1759
1775
|
}), {
|
|
1760
|
-
default:
|
|
1776
|
+
default: F(() => [c(y, {
|
|
1761
1777
|
modelValue: D.value,
|
|
1762
1778
|
"onUpdate:modelValue": i[10] || (i[10] = (e) => D.value = e),
|
|
1763
1779
|
"close-on-content-click": !1,
|
|
1764
1780
|
activator: "parent"
|
|
1765
1781
|
}, {
|
|
1766
|
-
default:
|
|
1767
|
-
modelValue:
|
|
1768
|
-
"onUpdate:modelValue": i[7] || (i[7] = (e) =>
|
|
1782
|
+
default: F(() => [c(l, {
|
|
1783
|
+
modelValue: L.value,
|
|
1784
|
+
"onUpdate:modelValue": i[7] || (i[7] = (e) => L.value = e),
|
|
1769
1785
|
onCancel: i[8] || (i[8] = (e) => C.value = ""),
|
|
1770
1786
|
onSave: i[9] || (i[9] = (e) => C.value = "")
|
|
1771
1787
|
}, {
|
|
1772
|
-
default:
|
|
1788
|
+
default: F(({ model: e, actions: t }) => [c(S, {
|
|
1773
1789
|
modelValue: e.value,
|
|
1774
1790
|
"onUpdate:modelValue": (t) => e.value = t,
|
|
1775
1791
|
"hide-header": !0,
|
|
1776
1792
|
format: "24hr"
|
|
1777
1793
|
}, {
|
|
1778
|
-
actions:
|
|
1794
|
+
actions: F(() => [(x(), n(E(t)))]),
|
|
1779
1795
|
_: 2
|
|
1780
1796
|
}, 1032, ["modelValue", "onUpdate:modelValue"])]),
|
|
1781
1797
|
_: 1
|
|
@@ -1799,7 +1815,7 @@ var qt = {
|
|
|
1799
1815
|
});
|
|
1800
1816
|
//#endregion
|
|
1801
1817
|
//#region \0@oxc-project+runtime@0.146.0/helpers/esm/asyncToGenerator.js
|
|
1802
|
-
function
|
|
1818
|
+
function rn(e, t, n, r, i, a, o) {
|
|
1803
1819
|
try {
|
|
1804
1820
|
var s = e[a](o), c = s.value;
|
|
1805
1821
|
} catch (e) {
|
|
@@ -1808,16 +1824,16 @@ function $t(e, t, n, r, i, a, o) {
|
|
|
1808
1824
|
}
|
|
1809
1825
|
s.done ? t(c) : Promise.resolve(c).then(r, i);
|
|
1810
1826
|
}
|
|
1811
|
-
function
|
|
1827
|
+
function an(e) {
|
|
1812
1828
|
return function() {
|
|
1813
1829
|
var t = this, n = arguments;
|
|
1814
1830
|
return new Promise(function(r, i) {
|
|
1815
1831
|
var a = e.apply(t, n);
|
|
1816
1832
|
function o(e) {
|
|
1817
|
-
|
|
1833
|
+
rn(a, r, i, o, s, "next", e);
|
|
1818
1834
|
}
|
|
1819
1835
|
function s(e) {
|
|
1820
|
-
|
|
1836
|
+
rn(a, r, i, o, s, "throw", e);
|
|
1821
1837
|
}
|
|
1822
1838
|
o(void 0);
|
|
1823
1839
|
});
|
|
@@ -1825,7 +1841,7 @@ function en(e) {
|
|
|
1825
1841
|
}
|
|
1826
1842
|
//#endregion
|
|
1827
1843
|
//#region src/df-file.vue?vue&type=script&setup=true&lang.ts
|
|
1828
|
-
var
|
|
1844
|
+
var on = ["title", "aria-label"], sn = /* @__PURE__ */ l({
|
|
1829
1845
|
__name: "df-file",
|
|
1830
1846
|
props: /*@__PURE__*/ p({
|
|
1831
1847
|
comms: {},
|
|
@@ -1844,68 +1860,68 @@ var tn = ["title", "aria-label"], nn = /* @__PURE__ */ l({
|
|
|
1844
1860
|
passthroughAttrs: {},
|
|
1845
1861
|
density: {},
|
|
1846
1862
|
variant: {}
|
|
1847
|
-
},
|
|
1863
|
+
}, Z),
|
|
1848
1864
|
emits: ["update:modelValue", "click:clear"],
|
|
1849
1865
|
setup(e, { emit: i }) {
|
|
1850
|
-
let s = e, { density: l, densityClass: u, touched: d, value: f, vuetifyBindings: p } =
|
|
1866
|
+
let s = e, { density: l, densityClass: u, touched: d, value: f, vuetifyBindings: p } = Q(s, i), h = Lt, _ = S(null), v = S(0), y = S(Math.round(Math.random() * 1e3)), b = S(), C = t(() => _.value && v.value < 100), w = t(() => !b.value && f.value ? f.value : ""), E = t(() => !b.value && !!f.value && !!s.comms.getDownloadUrl);
|
|
1851
1867
|
function D() {
|
|
1852
1868
|
return O.apply(this, arguments);
|
|
1853
1869
|
}
|
|
1854
1870
|
function O() {
|
|
1855
|
-
return O =
|
|
1871
|
+
return O = an(function* () {
|
|
1856
1872
|
if (!f.value || !s.comms.getDownloadUrl) return;
|
|
1857
1873
|
let e = yield s.comms.getDownloadUrl(f.value), t = document.createElement("a");
|
|
1858
1874
|
t.href = e, t.download = "", t.rel = "noopener", t.click();
|
|
1859
1875
|
}), O.apply(this, arguments);
|
|
1860
1876
|
}
|
|
1861
1877
|
function k() {
|
|
1862
|
-
f.value = null, v.value = 0, y.value = Math.round(Math.random() * 1e3), _.value = null, b.value = null,
|
|
1878
|
+
f.value = null, v.value = 0, y.value = Math.round(Math.random() * 1e3), _.value = null, b.value = null, M();
|
|
1863
1879
|
}
|
|
1864
1880
|
function A(e) {
|
|
1865
|
-
k(),
|
|
1866
|
-
}
|
|
1867
|
-
let { setupTouchInterval: M, clearTouchInterval: ee } = Gt(f, () => s.comms, () => s.touchInterval, A);
|
|
1868
|
-
function N() {
|
|
1869
|
-
return te.apply(this, arguments);
|
|
1881
|
+
k(), Xt(s.control, e);
|
|
1870
1882
|
}
|
|
1883
|
+
let { setupTouchInterval: ee, clearTouchInterval: M } = Yt(f, () => s.comms, () => s.touchInterval, A);
|
|
1871
1884
|
function te() {
|
|
1872
|
-
return
|
|
1885
|
+
return N.apply(this, arguments);
|
|
1886
|
+
}
|
|
1887
|
+
function N() {
|
|
1888
|
+
return N = an(function* () {
|
|
1873
1889
|
f.value && (yield s.comms.delete(f.value)), k();
|
|
1874
|
-
}),
|
|
1890
|
+
}), N.apply(this, arguments);
|
|
1875
1891
|
}
|
|
1876
|
-
function
|
|
1877
|
-
return
|
|
1892
|
+
function P(e) {
|
|
1893
|
+
return I.apply(this, arguments);
|
|
1878
1894
|
}
|
|
1879
|
-
function
|
|
1880
|
-
return
|
|
1895
|
+
function I() {
|
|
1896
|
+
return I = an(function* (e) {
|
|
1881
1897
|
v.value = -1, _.value = e;
|
|
1882
1898
|
try {
|
|
1883
1899
|
f.value = yield s.comms.upload(e, (e, t) => {
|
|
1884
1900
|
v.value = Math.round(e * 100 / t);
|
|
1885
|
-
}), v.value = 100,
|
|
1901
|
+
}), v.value = 100, ee();
|
|
1886
1902
|
} catch (e) {
|
|
1887
1903
|
throw v.value = 0, _.value = null, y.value = Math.round(Math.random() * 1e3), b.value = null, e;
|
|
1888
1904
|
}
|
|
1889
|
-
}),
|
|
1905
|
+
}), I.apply(this, arguments);
|
|
1890
1906
|
}
|
|
1891
|
-
function
|
|
1892
|
-
e && (Array.isArray(e) ? console.error("Uploading multiple files not supported right now") :
|
|
1907
|
+
function z(e) {
|
|
1908
|
+
e && (Array.isArray(e) ? console.error("Uploading multiple files not supported right now") : P(e));
|
|
1893
1909
|
}
|
|
1894
1910
|
return (t, i) => {
|
|
1895
1911
|
let f = T("v-progress-linear"), y = T("v-file-input");
|
|
1896
|
-
return x(), n(j(
|
|
1912
|
+
return x(), n(j(It), m(J(J({}, s), {}, { loading: C.value }), {
|
|
1897
1913
|
class: j(u),
|
|
1898
1914
|
clearable: "",
|
|
1899
|
-
"onClick:clear":
|
|
1915
|
+
"onClick:clear": te,
|
|
1900
1916
|
onBlur: i[1] || (i[1] = (e) => d.value = !0)
|
|
1901
1917
|
}), {
|
|
1902
|
-
"prepend-inner":
|
|
1903
|
-
loader:
|
|
1918
|
+
"prepend-inner": F(() => [c(j(R), { name: "mdi-paperclip" })]),
|
|
1919
|
+
loader: F(() => [_.value && v.value < 100 ? (x(), n(f, {
|
|
1904
1920
|
key: 0,
|
|
1905
1921
|
"model-value": v.value,
|
|
1906
1922
|
indeterminate: v.value === -1
|
|
1907
1923
|
}, null, 8, ["model-value", "indeterminate"])) : r("", !0)]),
|
|
1908
|
-
default:
|
|
1924
|
+
default: F((t) => [a("div", { class: g(["d-flex w-100 position-relative df-input-wrapper", j(l)]) }, [c(y, m({
|
|
1909
1925
|
modelValue: b.value,
|
|
1910
1926
|
"onUpdate:modelValue": i[0] || (i[0] = (e) => b.value = e),
|
|
1911
1927
|
label: w.value,
|
|
@@ -1921,18 +1937,18 @@ var tn = ["title", "aria-label"], nn = /* @__PURE__ */ l({
|
|
|
1921
1937
|
clearable: !1
|
|
1922
1938
|
}, e.passthroughAttrs, {
|
|
1923
1939
|
"prepend-icon": "",
|
|
1924
|
-
"onUpdate:modelValue":
|
|
1940
|
+
"onUpdate:modelValue": z,
|
|
1925
1941
|
onFocus: (e) => t.focus(),
|
|
1926
1942
|
onBlur: (e) => t.blur()
|
|
1927
1943
|
}), o({ _: 2 }, [E.value ? {
|
|
1928
1944
|
name: "append-inner",
|
|
1929
|
-
fn:
|
|
1945
|
+
fn: F(() => [a("button", {
|
|
1930
1946
|
type: "button",
|
|
1931
1947
|
class: "df-file-download-btn",
|
|
1932
1948
|
title: j(h).FileDownload,
|
|
1933
1949
|
"aria-label": j(h).FileDownload,
|
|
1934
|
-
onClick:
|
|
1935
|
-
}, [c(j(
|
|
1950
|
+
onClick: L(D, ["stop", "prevent"])
|
|
1951
|
+
}, [c(j(R), { name: "mdi-download" })], 8, on)]),
|
|
1936
1952
|
key: "0"
|
|
1937
1953
|
} : void 0]), 1040, [
|
|
1938
1954
|
"modelValue",
|
|
@@ -1948,17 +1964,17 @@ var tn = ["title", "aria-label"], nn = /* @__PURE__ */ l({
|
|
|
1948
1964
|
}, 16, ["class"]);
|
|
1949
1965
|
};
|
|
1950
1966
|
}
|
|
1951
|
-
}),
|
|
1967
|
+
}), cn = [
|
|
1952
1968
|
"id",
|
|
1953
1969
|
"disabled",
|
|
1954
1970
|
"name",
|
|
1955
1971
|
"onFocus",
|
|
1956
1972
|
"onBlur"
|
|
1957
|
-
],
|
|
1973
|
+
], ln = ["for"], un = ["for"], dn = ["for", "title"], fn = [
|
|
1958
1974
|
"href",
|
|
1959
1975
|
"title",
|
|
1960
1976
|
"aria-label"
|
|
1961
|
-
],
|
|
1977
|
+
], pn = /* @__PURE__ */ l({
|
|
1962
1978
|
__name: "df-image",
|
|
1963
1979
|
props: /*@__PURE__*/ p({
|
|
1964
1980
|
comms: {},
|
|
@@ -1977,44 +1993,44 @@ var tn = ["title", "aria-label"], nn = /* @__PURE__ */ l({
|
|
|
1977
1993
|
passthroughAttrs: {},
|
|
1978
1994
|
density: {},
|
|
1979
1995
|
variant: {}
|
|
1980
|
-
},
|
|
1996
|
+
}, Z),
|
|
1981
1997
|
emits: ["update:modelValue", "click:clear"],
|
|
1982
1998
|
setup(e, { emit: o }) {
|
|
1983
|
-
let s = e, { density: l, densityClass: u, touched: d, value: f, vuetifyBindings: p } =
|
|
1999
|
+
let s = e, { density: l, densityClass: u, touched: d, value: f, vuetifyBindings: p } = Q(s, o), h = Lt, _ = te(), b = S(null), C = S(0), w = S(null), E = S(0), D = S(null), k = t(() => b.value && C.value < 100), A = t(() => !!(p.value.disabled || p.value.readonly)), ee = t(() => E.value > 0), M = t(() => {
|
|
1984
2000
|
var e;
|
|
1985
2001
|
return (e = w.value) == null ? f.value ? f.value : null : e;
|
|
1986
|
-
}),
|
|
1987
|
-
function
|
|
2002
|
+
}), N = t(() => !!f.value);
|
|
2003
|
+
function P() {
|
|
1988
2004
|
w.value && (URL.revokeObjectURL(w.value), w.value = null);
|
|
1989
2005
|
}
|
|
1990
|
-
function
|
|
1991
|
-
f.value = null, C.value = 0, b.value = null,
|
|
2006
|
+
function I() {
|
|
2007
|
+
f.value = null, C.value = 0, b.value = null, P(), ne();
|
|
1992
2008
|
}
|
|
1993
|
-
function
|
|
1994
|
-
|
|
2009
|
+
function z(e) {
|
|
2010
|
+
I(), Xt(s.control, e);
|
|
1995
2011
|
}
|
|
1996
|
-
let { setupTouchInterval:
|
|
1997
|
-
y(() =>
|
|
2012
|
+
let { setupTouchInterval: B, clearTouchInterval: ne } = Yt(f, () => s.comms, () => s.touchInterval, z);
|
|
2013
|
+
y(() => P());
|
|
1998
2014
|
function re() {
|
|
1999
|
-
return
|
|
2015
|
+
return V.apply(this, arguments);
|
|
2000
2016
|
}
|
|
2001
|
-
function
|
|
2002
|
-
return
|
|
2003
|
-
f.value && (yield s.comms.delete(f.value)),
|
|
2004
|
-
}),
|
|
2017
|
+
function V() {
|
|
2018
|
+
return V = an(function* () {
|
|
2019
|
+
f.value && (yield s.comms.delete(f.value)), I();
|
|
2020
|
+
}), V.apply(this, arguments);
|
|
2005
2021
|
}
|
|
2006
2022
|
function ie(e) {
|
|
2007
2023
|
return H.apply(this, arguments);
|
|
2008
2024
|
}
|
|
2009
2025
|
function H() {
|
|
2010
|
-
return H =
|
|
2011
|
-
C.value = -1, b.value = e,
|
|
2026
|
+
return H = an(function* (e) {
|
|
2027
|
+
C.value = -1, b.value = e, P(), w.value = URL.createObjectURL(e);
|
|
2012
2028
|
try {
|
|
2013
2029
|
f.value = yield s.comms.upload(e, (e, t) => {
|
|
2014
2030
|
C.value = Math.round(e * 100 / t);
|
|
2015
|
-
}), C.value = 100,
|
|
2031
|
+
}), C.value = 100, B();
|
|
2016
2032
|
} catch (e) {
|
|
2017
|
-
throw C.value = 0, b.value = null,
|
|
2033
|
+
throw C.value = 0, b.value = null, P(), e;
|
|
2018
2034
|
}
|
|
2019
2035
|
}), H.apply(this, arguments);
|
|
2020
2036
|
}
|
|
@@ -2033,10 +2049,10 @@ var tn = ["title", "aria-label"], nn = /* @__PURE__ */ l({
|
|
|
2033
2049
|
function oe() {
|
|
2034
2050
|
A.value || (E.value += 1);
|
|
2035
2051
|
}
|
|
2036
|
-
function
|
|
2052
|
+
function W() {
|
|
2037
2053
|
E.value = Math.max(0, E.value - 1);
|
|
2038
2054
|
}
|
|
2039
|
-
function
|
|
2055
|
+
function G(e) {
|
|
2040
2056
|
var t;
|
|
2041
2057
|
if (E.value = 0, A.value) return;
|
|
2042
2058
|
let n = (t = e.dataTransfer) == null || (t = t.files) == null ? void 0 : t[0];
|
|
@@ -2044,28 +2060,28 @@ var tn = ["title", "aria-label"], nn = /* @__PURE__ */ l({
|
|
|
2044
2060
|
}
|
|
2045
2061
|
return (e, t) => {
|
|
2046
2062
|
let o = T("v-progress-linear"), y = T("v-img");
|
|
2047
|
-
return x(), n(j(
|
|
2063
|
+
return x(), n(j(It), m(J(J({}, s), {}, { loading: k.value }), {
|
|
2048
2064
|
class: ["df-image-field", j(u)],
|
|
2049
2065
|
clearable: "",
|
|
2050
2066
|
"onClick:clear": re,
|
|
2051
2067
|
onBlur: t[2] || (t[2] = (e) => d.value = !0)
|
|
2052
2068
|
}), {
|
|
2053
|
-
"prepend-inner":
|
|
2054
|
-
loader:
|
|
2069
|
+
"prepend-inner": F(() => [c(j(R), { name: "mdi-image" })]),
|
|
2070
|
+
loader: F(() => [b.value && C.value < 100 ? (x(), n(o, {
|
|
2055
2071
|
key: 0,
|
|
2056
2072
|
"model-value": C.value,
|
|
2057
2073
|
indeterminate: C.value === -1
|
|
2058
2074
|
}, null, 8, ["model-value", "indeterminate"])) : r("", !0)]),
|
|
2059
|
-
default:
|
|
2075
|
+
default: F((e) => [a("div", {
|
|
2060
2076
|
class: g(["d-flex w-100 position-relative df-input-wrapper df-image-wrapper", [j(l), {
|
|
2061
|
-
"df-image-dragging":
|
|
2077
|
+
"df-image-dragging": ee.value,
|
|
2062
2078
|
"df-image-disabled": A.value
|
|
2063
2079
|
}]]),
|
|
2064
|
-
onDragenter:
|
|
2065
|
-
onDragover: t[0] || (t[0] =
|
|
2066
|
-
onDragleave:
|
|
2067
|
-
onDrop:
|
|
2068
|
-
onClick: t[1] || (t[1] =
|
|
2080
|
+
onDragenter: L(oe, ["prevent"]),
|
|
2081
|
+
onDragover: t[0] || (t[0] = L(() => {}, ["prevent"])),
|
|
2082
|
+
onDragleave: L(W, ["prevent"]),
|
|
2083
|
+
onDrop: L(G, ["prevent"]),
|
|
2084
|
+
onClick: t[1] || (t[1] = L(() => {}, ["stop"]))
|
|
2069
2085
|
}, [
|
|
2070
2086
|
a("input", {
|
|
2071
2087
|
id: j(_),
|
|
@@ -2079,27 +2095,27 @@ var tn = ["title", "aria-label"], nn = /* @__PURE__ */ l({
|
|
|
2079
2095
|
onChange: ae,
|
|
2080
2096
|
onFocus: (t) => e.focus(),
|
|
2081
2097
|
onBlur: (t) => e.blur()
|
|
2082
|
-
}, null, 40,
|
|
2083
|
-
|
|
2098
|
+
}, null, 40, cn),
|
|
2099
|
+
M.value ? (x(), i("label", {
|
|
2084
2100
|
key: 0,
|
|
2085
2101
|
for: j(_),
|
|
2086
2102
|
class: "df-image-preview-label"
|
|
2087
2103
|
}, [c(y, {
|
|
2088
|
-
src:
|
|
2104
|
+
src: M.value,
|
|
2089
2105
|
class: "df-image-preview",
|
|
2090
2106
|
style: v(b.value && C.value < 100 ? "visibility: hidden" : "")
|
|
2091
|
-
}, null, 8, ["src", "style"])], 8,
|
|
2107
|
+
}, null, 8, ["src", "style"])], 8, ln)) : (x(), i("label", {
|
|
2092
2108
|
key: 1,
|
|
2093
2109
|
for: j(_),
|
|
2094
2110
|
class: "df-image-placeholder"
|
|
2095
|
-
}, [c(j(
|
|
2096
|
-
|
|
2111
|
+
}, [c(j(R), { name: "mdi-tray-arrow-up" }), a("span", null, O(j(h).ImageDropHint), 1)], 8, un)),
|
|
2112
|
+
M.value && !A.value ? (x(), i("label", {
|
|
2097
2113
|
key: 2,
|
|
2098
2114
|
for: j(_),
|
|
2099
2115
|
class: "df-image-replace-btn",
|
|
2100
2116
|
title: j(h).ImageReplace
|
|
2101
|
-
}, [c(j(
|
|
2102
|
-
|
|
2117
|
+
}, [c(j(R), { name: "mdi-pencil" })], 8, dn)) : r("", !0),
|
|
2118
|
+
N.value ? (x(), i("a", {
|
|
2103
2119
|
key: 3,
|
|
2104
2120
|
href: j(f),
|
|
2105
2121
|
download: "",
|
|
@@ -2108,13 +2124,13 @@ var tn = ["title", "aria-label"], nn = /* @__PURE__ */ l({
|
|
|
2108
2124
|
class: "df-image-download-btn",
|
|
2109
2125
|
title: j(h).ImageDownload,
|
|
2110
2126
|
"aria-label": j(h).ImageDownload
|
|
2111
|
-
}, [c(j(
|
|
2127
|
+
}, [c(j(R), { name: "mdi-download" })], 8, fn)) : r("", !0)
|
|
2112
2128
|
], 34)]),
|
|
2113
2129
|
_: 1
|
|
2114
2130
|
}, 16, ["class"]);
|
|
2115
2131
|
};
|
|
2116
2132
|
}
|
|
2117
|
-
}),
|
|
2133
|
+
}), mn = /* @__PURE__ */ l({
|
|
2118
2134
|
__name: "df-input",
|
|
2119
2135
|
props: /*@__PURE__*/ p({
|
|
2120
2136
|
inputType: {},
|
|
@@ -2136,7 +2152,7 @@ var tn = ["title", "aria-label"], nn = /* @__PURE__ */ l({
|
|
|
2136
2152
|
passthroughAttrs: {},
|
|
2137
2153
|
density: {},
|
|
2138
2154
|
variant: {}
|
|
2139
|
-
},
|
|
2155
|
+
}, J(J({}, Z), {}, {
|
|
2140
2156
|
inputType: "text",
|
|
2141
2157
|
precision: null,
|
|
2142
2158
|
step: void 0,
|
|
@@ -2145,7 +2161,7 @@ var tn = ["title", "aria-label"], nn = /* @__PURE__ */ l({
|
|
|
2145
2161
|
})),
|
|
2146
2162
|
emits: ["update:modelValue", "click:clear"],
|
|
2147
2163
|
setup(e, { emit: a }) {
|
|
2148
|
-
let o = e, { densityClass: s, isRendered: l, label: u,
|
|
2164
|
+
let o = e, { densityClass: s, isRendered: l, label: u, shownErrors: d, touched: p, value: h, visibilityClass: _, vuetifyBindings: v } = Q(o, a), { inputType: y, max: b, min: S, precision: C, step: w } = A(o), E = t(() => y.value === "number"), D = t(() => E.value ? {
|
|
2149
2165
|
min: j(S),
|
|
2150
2166
|
max: j(b),
|
|
2151
2167
|
precision: j(C),
|
|
@@ -2162,12 +2178,12 @@ var tn = ["title", "aria-label"], nn = /* @__PURE__ */ l({
|
|
|
2162
2178
|
"onUpdate:modelValue": t[2] || (t[2] = (e) => f(h) ? h.value = e : null),
|
|
2163
2179
|
density: "compact",
|
|
2164
2180
|
"control-variant": "stacked"
|
|
2165
|
-
},
|
|
2166
|
-
label:
|
|
2181
|
+
}, J(J({}, j(v)), D.value)), {
|
|
2182
|
+
label: F((e) => [c(j(X), {
|
|
2167
2183
|
data: e,
|
|
2168
2184
|
label: j(u)
|
|
2169
2185
|
}, null, 8, ["data", "label"])]),
|
|
2170
|
-
message:
|
|
2186
|
+
message: F(({ message: e }) => [c(j(Y), {
|
|
2171
2187
|
message: e,
|
|
2172
2188
|
errors: j(d)
|
|
2173
2189
|
}, null, 8, ["message", "errors"])]),
|
|
@@ -2178,11 +2194,11 @@ var tn = ["title", "aria-label"], nn = /* @__PURE__ */ l({
|
|
|
2178
2194
|
"onUpdate:modelValue": t[0] || (t[0] = (e) => f(h) ? h.value = e : null),
|
|
2179
2195
|
type: j(y)
|
|
2180
2196
|
}, j(v), { onBlur: t[1] || (t[1] = (e) => p.value = !0) }), {
|
|
2181
|
-
label:
|
|
2197
|
+
label: F((e) => [c(j(X), {
|
|
2182
2198
|
data: e,
|
|
2183
2199
|
label: j(u)
|
|
2184
2200
|
}, null, 8, ["data", "label"])]),
|
|
2185
|
-
message:
|
|
2201
|
+
message: F(({ message: e }) => [c(j(Y), {
|
|
2186
2202
|
message: e,
|
|
2187
2203
|
errors: j(d)
|
|
2188
2204
|
}, null, 8, ["message", "errors"])]),
|
|
@@ -2190,7 +2206,7 @@ var tn = ["title", "aria-label"], nn = /* @__PURE__ */ l({
|
|
|
2190
2206
|
}, 16, ["modelValue", "type"]))], 2)) : r("", !0);
|
|
2191
2207
|
};
|
|
2192
2208
|
}
|
|
2193
|
-
}),
|
|
2209
|
+
}), hn = Ae.create({
|
|
2194
2210
|
name: "classAttribute",
|
|
2195
2211
|
addGlobalAttributes() {
|
|
2196
2212
|
return [{
|
|
@@ -2208,7 +2224,7 @@ var tn = ["title", "aria-label"], nn = /* @__PURE__ */ l({
|
|
|
2208
2224
|
}];
|
|
2209
2225
|
}
|
|
2210
2226
|
});
|
|
2211
|
-
function
|
|
2227
|
+
function gn(e, t) {
|
|
2212
2228
|
return je.create({
|
|
2213
2229
|
name: e,
|
|
2214
2230
|
parseHTML() {
|
|
@@ -2223,7 +2239,7 @@ function fn(e, t) {
|
|
|
2223
2239
|
}
|
|
2224
2240
|
});
|
|
2225
2241
|
}
|
|
2226
|
-
var
|
|
2242
|
+
var _n = gn("marker", "marker"), vn = gn("spoiler", "spoiler"), yn = [
|
|
2227
2243
|
{
|
|
2228
2244
|
key: "ArticleCategory",
|
|
2229
2245
|
kind: "heading",
|
|
@@ -2273,67 +2289,67 @@ var pn = fn("marker", "marker"), mn = fn("spoiler", "spoiler"), hn = [
|
|
|
2273
2289
|
className: "fancy-code fancy-code-bright"
|
|
2274
2290
|
}
|
|
2275
2291
|
];
|
|
2276
|
-
function
|
|
2292
|
+
function bn(e) {
|
|
2277
2293
|
let { state: t } = e, { $from: n } = t.selection;
|
|
2278
2294
|
return n.depth > 0 || t.doc.content.size === 0 ? n : t.doc.resolve(Math.min(1, t.doc.content.size));
|
|
2279
2295
|
}
|
|
2280
|
-
function
|
|
2281
|
-
return
|
|
2296
|
+
function xn(e) {
|
|
2297
|
+
return bn(e).parent;
|
|
2282
2298
|
}
|
|
2283
|
-
function
|
|
2284
|
-
let n =
|
|
2299
|
+
function Sn(e, t) {
|
|
2300
|
+
let n = bn(e);
|
|
2285
2301
|
for (let e = n.depth; e >= 0; --e) if (n.node(e).type.name === t) return n.node(e);
|
|
2286
2302
|
return null;
|
|
2287
2303
|
}
|
|
2288
|
-
function
|
|
2304
|
+
function Cn(e, t) {
|
|
2289
2305
|
switch (t.kind) {
|
|
2290
2306
|
case "heading": {
|
|
2291
|
-
let n =
|
|
2307
|
+
let n = xn(e);
|
|
2292
2308
|
return n.type.name === "heading" && n.attrs.level === t.level && n.attrs.class === t.className;
|
|
2293
2309
|
}
|
|
2294
2310
|
case "paragraph": {
|
|
2295
|
-
let n =
|
|
2311
|
+
let n = xn(e);
|
|
2296
2312
|
return n.type.name === "paragraph" && n.attrs.class === t.className;
|
|
2297
2313
|
}
|
|
2298
2314
|
case "codeBlock": {
|
|
2299
|
-
let n =
|
|
2315
|
+
let n = xn(e);
|
|
2300
2316
|
return n.type.name === "codeBlock" && n.attrs.class === t.className;
|
|
2301
2317
|
}
|
|
2302
2318
|
case "blockquote": {
|
|
2303
|
-
let n =
|
|
2319
|
+
let n = Sn(e, "blockquote");
|
|
2304
2320
|
return !!n && n.attrs.class === t.className;
|
|
2305
2321
|
}
|
|
2306
2322
|
case "mark": return e.isActive(t.markName);
|
|
2307
2323
|
default: return !1;
|
|
2308
2324
|
}
|
|
2309
2325
|
}
|
|
2310
|
-
function
|
|
2326
|
+
function wn(e, t) {
|
|
2311
2327
|
let n = e.chain().focus(), { $from: r } = e.state.selection;
|
|
2312
|
-
switch (t.kind !== "mark" && r.depth === 0 && e.state.doc.content.size > 0 && n.setTextSelection(
|
|
2328
|
+
switch (t.kind !== "mark" && r.depth === 0 && e.state.doc.content.size > 0 && n.setTextSelection(bn(e).pos), t.kind) {
|
|
2313
2329
|
case "heading":
|
|
2314
|
-
|
|
2330
|
+
Cn(e, t) ? n.setParagraph().updateAttributes("paragraph", { class: null }).run() : n.setNode("heading", { level: t.level }).updateAttributes("heading", { class: t.className }).run();
|
|
2315
2331
|
break;
|
|
2316
2332
|
case "paragraph":
|
|
2317
|
-
|
|
2333
|
+
Cn(e, t) ? n.setParagraph().updateAttributes("paragraph", { class: null }).run() : n.setParagraph().updateAttributes("paragraph", { class: t.className }).run();
|
|
2318
2334
|
break;
|
|
2319
2335
|
case "blockquote":
|
|
2320
|
-
|
|
2336
|
+
Cn(e, t) ? n.unsetBlockquote().run() : Sn(e, "blockquote") ? n.updateAttributes("blockquote", { class: t.className }).run() : n.setBlockquote().updateAttributes("blockquote", { class: t.className }).run();
|
|
2321
2337
|
break;
|
|
2322
2338
|
case "codeBlock":
|
|
2323
|
-
|
|
2339
|
+
Cn(e, t) ? n.toggleCodeBlock().updateAttributes("paragraph", { class: null }).run() : xn(e).type.name === "codeBlock" ? n.updateAttributes("codeBlock", { class: t.className }).run() : n.setCodeBlock().updateAttributes("codeBlock", { class: t.className }).run();
|
|
2324
2340
|
break;
|
|
2325
2341
|
case "mark": n.toggleMark(t.markName).run();
|
|
2326
2342
|
}
|
|
2327
2343
|
}
|
|
2328
2344
|
//#endregion
|
|
2329
2345
|
//#region src/helpers/rtf-editor/image-paste.ts
|
|
2330
|
-
function
|
|
2346
|
+
function Tn(e) {
|
|
2331
2347
|
return new Promise((t, n) => {
|
|
2332
2348
|
let r = new FileReader();
|
|
2333
2349
|
r.onload = () => t(r.result), r.onerror = () => n(r.error), r.readAsDataURL(e);
|
|
2334
2350
|
});
|
|
2335
2351
|
}
|
|
2336
|
-
function
|
|
2352
|
+
function En(e) {
|
|
2337
2353
|
if (!e) return [];
|
|
2338
2354
|
let t = [];
|
|
2339
2355
|
return Array.from(e.items || []).forEach((e) => {
|
|
@@ -2345,25 +2361,25 @@ function Sn(e) {
|
|
|
2345
2361
|
e.type.startsWith("image/") && t.push(e);
|
|
2346
2362
|
}), t;
|
|
2347
2363
|
}
|
|
2348
|
-
function
|
|
2364
|
+
function Dn(e) {
|
|
2349
2365
|
let t = 0;
|
|
2350
2366
|
return e.forEach((e) => {
|
|
2351
|
-
e.type.name === "image" ? t += 1 : e.content.size && (t +=
|
|
2367
|
+
e.type.name === "image" ? t += 1 : e.content.size && (t += Dn(e.content));
|
|
2352
2368
|
}), t;
|
|
2353
2369
|
}
|
|
2354
|
-
function
|
|
2370
|
+
function On(e, t, n) {
|
|
2355
2371
|
let r = [];
|
|
2356
2372
|
return e.forEach((e) => {
|
|
2357
|
-
e.type.name === "image" && n.index < t.length ? (r.push(e.type.create(
|
|
2373
|
+
e.type.name === "image" && n.index < t.length ? (r.push(e.type.create(J(J({}, e.attrs), {}, { src: t[n.index] }), e.content, e.marks)), n.index += 1) : e.content.size ? r.push(e.copy(On(e.content, t, n))) : r.push(e);
|
|
2358
2374
|
}), Pe.fromArray(r);
|
|
2359
2375
|
}
|
|
2360
|
-
function
|
|
2376
|
+
function kn(e) {
|
|
2361
2377
|
return (t, n, r) => {
|
|
2362
|
-
let i =
|
|
2363
|
-
return i.length !== 0 && (n.preventDefault(), Promise.all(i.map(
|
|
2378
|
+
let i = En(n.clipboardData);
|
|
2379
|
+
return i.length !== 0 && (n.preventDefault(), Promise.all(i.map(Tn)).then((n) => {
|
|
2364
2380
|
var i;
|
|
2365
|
-
if (
|
|
2366
|
-
let e =
|
|
2381
|
+
if (Dn(r.content) > 0) {
|
|
2382
|
+
let e = On(r.content, n, { index: 0 }), i = new Fe(e, r.openStart, r.openEnd);
|
|
2367
2383
|
t.dispatch(t.state.tr.replaceSelection(i).scrollIntoView());
|
|
2368
2384
|
return;
|
|
2369
2385
|
}
|
|
@@ -2376,11 +2392,11 @@ function Tn(e) {
|
|
|
2376
2392
|
}
|
|
2377
2393
|
//#endregion
|
|
2378
2394
|
//#region src/helpers/rtf-editor/link-with-download.ts
|
|
2379
|
-
var
|
|
2395
|
+
var An = Ie.extend({
|
|
2380
2396
|
name: "link",
|
|
2381
2397
|
addAttributes() {
|
|
2382
2398
|
var e;
|
|
2383
|
-
return
|
|
2399
|
+
return J(J({}, (e = this.parent) == null ? void 0 : e.call(this)), {}, { download: {
|
|
2384
2400
|
default: null,
|
|
2385
2401
|
parseHTML: (e) => e.getAttribute("download"),
|
|
2386
2402
|
renderHTML: (e) => e.download ? { download: e.download } : {}
|
|
@@ -2389,7 +2405,7 @@ var En = Ie.extend({
|
|
|
2389
2405
|
});
|
|
2390
2406
|
//#endregion
|
|
2391
2407
|
//#region src/helpers/rtf-editor/media-embed.ts
|
|
2392
|
-
function
|
|
2408
|
+
function jn(e) {
|
|
2393
2409
|
let t;
|
|
2394
2410
|
try {
|
|
2395
2411
|
t = new URL(e);
|
|
@@ -2415,7 +2431,7 @@ function Dn(e) {
|
|
|
2415
2431
|
}
|
|
2416
2432
|
return null;
|
|
2417
2433
|
}
|
|
2418
|
-
var
|
|
2434
|
+
var Mn = Me.create({
|
|
2419
2435
|
name: "mediaEmbed",
|
|
2420
2436
|
group: "block",
|
|
2421
2437
|
atom: !0,
|
|
@@ -2437,7 +2453,7 @@ var On = Me.create({
|
|
|
2437
2453
|
});
|
|
2438
2454
|
//#endregion
|
|
2439
2455
|
//#region src/helpers/rtf-editor/use-editor-tick.ts
|
|
2440
|
-
function
|
|
2456
|
+
function Nn(e) {
|
|
2441
2457
|
let t = S(0), n, r = () => {
|
|
2442
2458
|
t.value += 1;
|
|
2443
2459
|
}, i = (e) => {
|
|
@@ -2447,14 +2463,14 @@ function kn(e) {
|
|
|
2447
2463
|
}
|
|
2448
2464
|
//#endregion
|
|
2449
2465
|
//#region src/helpers/rtf-editor/rtf-toolbar.vue?vue&type=script&setup=true&lang.ts
|
|
2450
|
-
var
|
|
2466
|
+
var Pn = { class: "rtf-toolbar-group" }, Fn = { class: "d-flex justify-end ga-2 mt-2" }, In = { class: "d-flex justify-space-between align-center ga-2 mt-2" }, Ln = { class: "d-flex justify-end mt-2" }, Rn = /* @__PURE__ */ l({
|
|
2451
2467
|
__name: "rtf-toolbar",
|
|
2452
2468
|
props: {
|
|
2453
2469
|
editor: { default: void 0 },
|
|
2454
2470
|
buttonSize: { default: "small" }
|
|
2455
2471
|
},
|
|
2456
2472
|
setup(o) {
|
|
2457
|
-
let l = o, u = t(() => l.buttonSize), d =
|
|
2473
|
+
let l = o, u = t(() => l.buttonSize), d = Lt, f = t(() => l.editor), p = Nn(f), h = t(() => {
|
|
2458
2474
|
var e;
|
|
2459
2475
|
return p.value, !!((e = l.editor) != null && e.isEditable);
|
|
2460
2476
|
}), _ = t(() => ({
|
|
@@ -2497,10 +2513,10 @@ var An = { class: "rtf-toolbar-group" }, jn = { class: "d-flex justify-end ga-2
|
|
|
2497
2513
|
}
|
|
2498
2514
|
let E = [];
|
|
2499
2515
|
function D(e, t, n, r, i) {
|
|
2500
|
-
let a = new
|
|
2516
|
+
let a = new B({
|
|
2501
2517
|
value: {
|
|
2502
2518
|
icon: e,
|
|
2503
|
-
renderAs:
|
|
2519
|
+
renderAs: "text",
|
|
2504
2520
|
showIcon: !0,
|
|
2505
2521
|
showLabel: !1
|
|
2506
2522
|
},
|
|
@@ -2519,9 +2535,9 @@ var An = { class: "rtf-toolbar-group" }, jn = { class: "d-flex justify-end ga-2
|
|
|
2519
2535
|
title: t(),
|
|
2520
2536
|
icon: !0
|
|
2521
2537
|
};
|
|
2522
|
-
r && (a.active = r()),
|
|
2538
|
+
r && (a.active = r()), ce((i = e.value.passthroughAttrs) == null ? {} : i, a) || (e.value = J(J({}, e.value), {}, { passthroughAttrs: a }));
|
|
2523
2539
|
let o = !n();
|
|
2524
|
-
e.enabled !== o && (e.
|
|
2540
|
+
e.enabled !== o && (e.access = o ? "editable" : "disabled");
|
|
2525
2541
|
}
|
|
2526
2542
|
let A = [D("mdi-undo", () => {
|
|
2527
2543
|
var e;
|
|
@@ -2529,13 +2545,13 @@ var An = { class: "rtf-toolbar-group" }, jn = { class: "d-flex justify-end ga-2
|
|
|
2529
2545
|
}, () => d.Undo, () => !h.value || !y.value.canUndo), D("mdi-redo", () => {
|
|
2530
2546
|
var e;
|
|
2531
2547
|
return (e = f.value) == null ? void 0 : e.chain().focus().redo().run();
|
|
2532
|
-
}, () => d.Redo, () => !h.value || !y.value.canRedo)],
|
|
2548
|
+
}, () => d.Redo, () => !h.value || !y.value.canRedo)], ee = [D("mdi-format-bold", () => {
|
|
2533
2549
|
var e;
|
|
2534
2550
|
return (e = f.value) == null ? void 0 : e.chain().focus().toggleBold().run();
|
|
2535
2551
|
}, () => d.Bold, () => !h.value, () => y.value.bold), D("mdi-format-italic", () => {
|
|
2536
2552
|
var e;
|
|
2537
2553
|
return (e = f.value) == null ? void 0 : e.chain().focus().toggleItalic().run();
|
|
2538
|
-
}, () => d.Italic, () => !h.value, () => y.value.italic)],
|
|
2554
|
+
}, () => d.Italic, () => !h.value, () => y.value.italic)], M = [
|
|
2539
2555
|
{
|
|
2540
2556
|
value: "left",
|
|
2541
2557
|
icon: "mdi-format-align-left",
|
|
@@ -2556,7 +2572,7 @@ var An = { class: "rtf-toolbar-group" }, jn = { class: "d-flex justify-end ga-2
|
|
|
2556
2572
|
icon: "mdi-format-align-justify",
|
|
2557
2573
|
title: () => d.AlignJustify
|
|
2558
2574
|
}
|
|
2559
|
-
].map((e) => D(e.icon, () => w(e.value), e.title, () => !h.value, () => b.value === e.value)),
|
|
2575
|
+
].map((e) => D(e.icon, () => w(e.value), e.title, () => !h.value, () => b.value === e.value)), te = [
|
|
2560
2576
|
D("mdi-format-list-bulleted", () => {
|
|
2561
2577
|
var e;
|
|
2562
2578
|
return (e = f.value) == null ? void 0 : e.chain().focus().toggleBulletList().run();
|
|
@@ -2574,10 +2590,10 @@ var An = { class: "rtf-toolbar-group" }, jn = { class: "d-flex justify-end ga-2
|
|
|
2574
2590
|
return (e = f.value) == null ? void 0 : e.chain().focus().sinkListItem("listItem").run();
|
|
2575
2591
|
}, () => d.Indent, () => !h.value || !y.value.canSink)
|
|
2576
2592
|
];
|
|
2577
|
-
|
|
2593
|
+
P(() => {
|
|
2578
2594
|
E.forEach(k);
|
|
2579
2595
|
});
|
|
2580
|
-
let
|
|
2596
|
+
let N = t(() => [
|
|
2581
2597
|
{
|
|
2582
2598
|
level: 0,
|
|
2583
2599
|
label: d.Paragraph
|
|
@@ -2613,16 +2629,16 @@ var An = { class: "rtf-toolbar-group" }, jn = { class: "d-flex justify-end ga-2
|
|
|
2613
2629
|
}
|
|
2614
2630
|
let z = t(() => {
|
|
2615
2631
|
var e, t;
|
|
2616
|
-
return (e = (t =
|
|
2632
|
+
return (e = (t = N.value.find((e) => L(e.level))) == null ? void 0 : t.label) == null ? d.Paragraph : e;
|
|
2617
2633
|
});
|
|
2618
2634
|
function re(e) {
|
|
2619
2635
|
var t;
|
|
2620
2636
|
let n = (t = f.value) == null ? void 0 : t.chain().focus();
|
|
2621
2637
|
n && (e === 0 ? n.setParagraph().run() : n.toggleHeading({ level: e }).run());
|
|
2622
2638
|
}
|
|
2623
|
-
let
|
|
2639
|
+
let V = yn;
|
|
2624
2640
|
function ie(e) {
|
|
2625
|
-
return p.value, !!f.value &&
|
|
2641
|
+
return p.value, !!f.value && Cn(f.value, e);
|
|
2626
2642
|
}
|
|
2627
2643
|
let H = S(""), U = S(!1);
|
|
2628
2644
|
function ae() {
|
|
@@ -2634,52 +2650,52 @@ var An = { class: "rtf-toolbar-group" }, jn = { class: "d-flex justify-end ga-2
|
|
|
2634
2650
|
var e;
|
|
2635
2651
|
H.value && ((e = f.value) == null || e.chain().focus().extendMarkRange("link").setLink({ href: H.value }).updateAttributes("link", { download: U.value ? "file" : null }).run());
|
|
2636
2652
|
}
|
|
2637
|
-
function
|
|
2653
|
+
function W() {
|
|
2638
2654
|
var e;
|
|
2639
2655
|
(e = f.value) == null || e.chain().focus().unsetLink().run();
|
|
2640
2656
|
}
|
|
2641
|
-
let
|
|
2642
|
-
function
|
|
2657
|
+
let G = S(""), se = S();
|
|
2658
|
+
function le() {
|
|
2643
2659
|
var e;
|
|
2644
|
-
|
|
2660
|
+
G.value && ((e = f.value) == null || e.chain().focus().setImage({ src: G.value }).run(), G.value = "");
|
|
2645
2661
|
}
|
|
2646
|
-
function
|
|
2662
|
+
function ue() {
|
|
2647
2663
|
var e;
|
|
2648
|
-
(e =
|
|
2664
|
+
(e = se.value) == null || e.click();
|
|
2649
2665
|
}
|
|
2650
|
-
function
|
|
2651
|
-
return
|
|
2666
|
+
function de(e) {
|
|
2667
|
+
return K.apply(this, arguments);
|
|
2652
2668
|
}
|
|
2653
|
-
function
|
|
2654
|
-
return
|
|
2669
|
+
function K() {
|
|
2670
|
+
return K = an(function* (e) {
|
|
2655
2671
|
var t, n;
|
|
2656
2672
|
let r = (t = e.target.files) == null ? void 0 : t[0];
|
|
2657
2673
|
if (!r) return;
|
|
2658
|
-
let i = yield
|
|
2674
|
+
let i = yield Tn(r);
|
|
2659
2675
|
(n = f.value) == null || n.chain().focus().setImage({ src: i }).run(), e.target.value = "";
|
|
2660
|
-
}),
|
|
2676
|
+
}), K.apply(this, arguments);
|
|
2661
2677
|
}
|
|
2662
|
-
let
|
|
2663
|
-
function
|
|
2678
|
+
let q = S("");
|
|
2679
|
+
function fe() {
|
|
2664
2680
|
var e;
|
|
2665
|
-
if (!
|
|
2666
|
-
let t =
|
|
2681
|
+
if (!q.value) return;
|
|
2682
|
+
let t = jn(q.value), n = (e = f.value) == null ? void 0 : e.chain().focus();
|
|
2667
2683
|
n && (t ? n.insertContent({
|
|
2668
2684
|
type: "mediaEmbed",
|
|
2669
2685
|
attrs: { src: t }
|
|
2670
2686
|
}).run() : n.insertContent({
|
|
2671
2687
|
type: "text",
|
|
2672
|
-
text:
|
|
2688
|
+
text: q.value,
|
|
2673
2689
|
marks: [{
|
|
2674
2690
|
type: "link",
|
|
2675
|
-
attrs: { href:
|
|
2691
|
+
attrs: { href: q.value }
|
|
2676
2692
|
}]
|
|
2677
|
-
}).run(),
|
|
2693
|
+
}).run(), q.value = "");
|
|
2678
2694
|
}
|
|
2679
2695
|
return (t, o) => {
|
|
2680
2696
|
let l = T("v-divider"), u = T("v-btn"), p = T("v-list-item-title"), b = T("v-list-item"), S = T("v-list"), w = T("v-menu"), E = T("v-text-field"), D = T("v-checkbox"), k = T("v-card");
|
|
2681
2697
|
return x(), i("div", { class: g(["rtf-toolbar", { "rtf-toolbar--disabled": !h.value }]) }, [
|
|
2682
|
-
c(
|
|
2698
|
+
c($t, m({ actions: A }, v.value, { "show-as-group": "grouped-no-borders" }), null, 16),
|
|
2683
2699
|
c(l, {
|
|
2684
2700
|
vertical: "",
|
|
2685
2701
|
inset: "",
|
|
@@ -2694,7 +2710,7 @@ var An = { class: "rtf-toolbar-group" }, jn = { class: "d-flex justify-end ga-2
|
|
|
2694
2710
|
return (t = f.value) == null ? void 0 : t.chain().focus().selectAll().run();
|
|
2695
2711
|
})
|
|
2696
2712
|
}), {
|
|
2697
|
-
default:
|
|
2713
|
+
default: F(() => [c(j(R), { name: "mdi-select-all" })]),
|
|
2698
2714
|
_: 1
|
|
2699
2715
|
}, 16, ["title"]),
|
|
2700
2716
|
c(l, {
|
|
@@ -2703,18 +2719,18 @@ var An = { class: "rtf-toolbar-group" }, jn = { class: "d-flex justify-end ga-2
|
|
|
2703
2719
|
class: "mx-1"
|
|
2704
2720
|
}),
|
|
2705
2721
|
c(w, null, {
|
|
2706
|
-
activator:
|
|
2707
|
-
default:
|
|
2722
|
+
activator: F(({ props: e }) => [c(u, m(J(J({}, _.value), e), { "append-icon": "mdi-chevron-down" }), {
|
|
2723
|
+
default: F(() => [s(O(z.value), 1)]),
|
|
2708
2724
|
_: 1
|
|
2709
2725
|
}, 16)]),
|
|
2710
|
-
default:
|
|
2711
|
-
default:
|
|
2726
|
+
default: F(() => [c(S, { density: "compact" }, {
|
|
2727
|
+
default: F(() => [(x(!0), i(e, null, C(N.value, (e) => (x(), n(b, {
|
|
2712
2728
|
key: e.level,
|
|
2713
2729
|
active: L(e.level),
|
|
2714
2730
|
onClick: (t) => re(e.level)
|
|
2715
2731
|
}, {
|
|
2716
|
-
default:
|
|
2717
|
-
default:
|
|
2732
|
+
default: F(() => [c(p, null, {
|
|
2733
|
+
default: F(() => [s(O(e.label), 1)]),
|
|
2718
2734
|
_: 2
|
|
2719
2735
|
}, 1024)]),
|
|
2720
2736
|
_: 2
|
|
@@ -2724,18 +2740,18 @@ var An = { class: "rtf-toolbar-group" }, jn = { class: "d-flex justify-end ga-2
|
|
|
2724
2740
|
_: 1
|
|
2725
2741
|
}),
|
|
2726
2742
|
c(w, null, {
|
|
2727
|
-
activator:
|
|
2728
|
-
default:
|
|
2743
|
+
activator: F(({ props: e }) => [c(u, m(J(J({}, _.value), e), { "append-icon": "mdi-chevron-down" }), {
|
|
2744
|
+
default: F(() => [s(O(j(d).Style), 1)]),
|
|
2729
2745
|
_: 1
|
|
2730
2746
|
}, 16)]),
|
|
2731
|
-
default:
|
|
2732
|
-
default:
|
|
2747
|
+
default: F(() => [c(S, { density: "compact" }, {
|
|
2748
|
+
default: F(() => [(x(!0), i(e, null, C(j(V), (e) => (x(), n(b, {
|
|
2733
2749
|
key: e.key,
|
|
2734
2750
|
active: ie(e),
|
|
2735
|
-
onClick: (t) => f.value && j(
|
|
2751
|
+
onClick: (t) => f.value && j(wn)(f.value, e)
|
|
2736
2752
|
}, {
|
|
2737
|
-
default:
|
|
2738
|
-
default:
|
|
2753
|
+
default: F(() => [c(p, null, {
|
|
2754
|
+
default: F(() => [s(O(j(d)[e.key]), 1)]),
|
|
2739
2755
|
_: 2
|
|
2740
2756
|
}, 1024)]),
|
|
2741
2757
|
_: 2
|
|
@@ -2749,13 +2765,13 @@ var An = { class: "rtf-toolbar-group" }, jn = { class: "d-flex justify-end ga-2
|
|
|
2749
2765
|
inset: "",
|
|
2750
2766
|
class: "mx-1"
|
|
2751
2767
|
}),
|
|
2752
|
-
c(
|
|
2768
|
+
c($t, m({ actions: ee }, v.value, { "show-as-group": "grouped-no-borders" }), null, 16),
|
|
2753
2769
|
c(l, {
|
|
2754
2770
|
vertical: "",
|
|
2755
2771
|
inset: "",
|
|
2756
2772
|
class: "mx-1"
|
|
2757
2773
|
}),
|
|
2758
|
-
a("div",
|
|
2774
|
+
a("div", Pn, [
|
|
2759
2775
|
c(u, m(_.value, {
|
|
2760
2776
|
icon: "",
|
|
2761
2777
|
title: j(d).HorizontalLine,
|
|
@@ -2764,26 +2780,26 @@ var An = { class: "rtf-toolbar-group" }, jn = { class: "d-flex justify-end ga-2
|
|
|
2764
2780
|
return (t = f.value) == null ? void 0 : t.chain().focus().setHorizontalRule().run();
|
|
2765
2781
|
})
|
|
2766
2782
|
}), {
|
|
2767
|
-
default:
|
|
2783
|
+
default: F(() => [c(j(R), { name: "mdi-minus" })]),
|
|
2768
2784
|
_: 1
|
|
2769
2785
|
}, 16, ["title"]),
|
|
2770
2786
|
c(w, {
|
|
2771
2787
|
"close-on-content-click": !1,
|
|
2772
2788
|
"onUpdate:modelValue": o[4] || (o[4] = (e) => e && ae())
|
|
2773
2789
|
}, {
|
|
2774
|
-
activator:
|
|
2790
|
+
activator: F(({ props: e }) => [c(u, m(J(J({}, _.value), e), {
|
|
2775
2791
|
icon: "",
|
|
2776
2792
|
title: j(d).Link,
|
|
2777
2793
|
active: y.value.link
|
|
2778
2794
|
}), {
|
|
2779
|
-
default:
|
|
2795
|
+
default: F(() => [c(j(R), { name: "mdi-link-variant" })]),
|
|
2780
2796
|
_: 1
|
|
2781
2797
|
}, 16, ["title", "active"])]),
|
|
2782
|
-
default:
|
|
2798
|
+
default: F(() => [c(k, {
|
|
2783
2799
|
"min-width": "280",
|
|
2784
2800
|
class: "pa-3"
|
|
2785
2801
|
}, {
|
|
2786
|
-
default:
|
|
2802
|
+
default: F(() => [
|
|
2787
2803
|
c(E, {
|
|
2788
2804
|
modelValue: H.value,
|
|
2789
2805
|
"onUpdate:modelValue": o[2] || (o[2] = (e) => H.value = e),
|
|
@@ -2791,7 +2807,7 @@ var An = { class: "rtf-toolbar-group" }, jn = { class: "d-flex justify-end ga-2
|
|
|
2791
2807
|
density: "compact",
|
|
2792
2808
|
"hide-details": "",
|
|
2793
2809
|
autofocus: "",
|
|
2794
|
-
onKeydown:
|
|
2810
|
+
onKeydown: I(oe, ["enter"])
|
|
2795
2811
|
}, null, 8, ["modelValue", "label"]),
|
|
2796
2812
|
c(D, {
|
|
2797
2813
|
modelValue: U.value,
|
|
@@ -2801,13 +2817,13 @@ var An = { class: "rtf-toolbar-group" }, jn = { class: "d-flex justify-end ga-2
|
|
|
2801
2817
|
"hide-details": "",
|
|
2802
2818
|
class: "mt-1"
|
|
2803
2819
|
}, null, 8, ["modelValue", "label"]),
|
|
2804
|
-
a("div",
|
|
2820
|
+
a("div", Fn, [y.value.link ? (x(), n(u, {
|
|
2805
2821
|
key: 0,
|
|
2806
2822
|
size: "small",
|
|
2807
2823
|
variant: "text",
|
|
2808
|
-
onClick:
|
|
2824
|
+
onClick: W
|
|
2809
2825
|
}, {
|
|
2810
|
-
default:
|
|
2826
|
+
default: F(() => [s(O(j(d).LinkRemove), 1)]),
|
|
2811
2827
|
_: 1
|
|
2812
2828
|
})) : r("", !0), c(u, {
|
|
2813
2829
|
size: "small",
|
|
@@ -2815,7 +2831,7 @@ var An = { class: "rtf-toolbar-group" }, jn = { class: "d-flex justify-end ga-2
|
|
|
2815
2831
|
variant: "tonal",
|
|
2816
2832
|
onClick: oe
|
|
2817
2833
|
}, {
|
|
2818
|
-
default:
|
|
2834
|
+
default: F(() => [s(O(j(d).LinkApply), 1)]),
|
|
2819
2835
|
_: 1
|
|
2820
2836
|
})])
|
|
2821
2837
|
]),
|
|
@@ -2824,40 +2840,40 @@ var An = { class: "rtf-toolbar-group" }, jn = { class: "d-flex justify-end ga-2
|
|
|
2824
2840
|
_: 1
|
|
2825
2841
|
}),
|
|
2826
2842
|
c(w, { "close-on-content-click": !1 }, {
|
|
2827
|
-
activator:
|
|
2843
|
+
activator: F(({ props: e }) => [c(u, m(J(J({}, _.value), e), {
|
|
2828
2844
|
icon: "",
|
|
2829
2845
|
title: j(d).Image
|
|
2830
2846
|
}), {
|
|
2831
|
-
default:
|
|
2847
|
+
default: F(() => [c(j(R), { name: "mdi-image-plus" })]),
|
|
2832
2848
|
_: 1
|
|
2833
2849
|
}, 16, ["title"])]),
|
|
2834
|
-
default:
|
|
2850
|
+
default: F(() => [c(k, {
|
|
2835
2851
|
"min-width": "280",
|
|
2836
2852
|
class: "pa-3"
|
|
2837
2853
|
}, {
|
|
2838
|
-
default:
|
|
2839
|
-
modelValue:
|
|
2840
|
-
"onUpdate:modelValue": o[5] || (o[5] = (e) =>
|
|
2854
|
+
default: F(() => [c(E, {
|
|
2855
|
+
modelValue: G.value,
|
|
2856
|
+
"onUpdate:modelValue": o[5] || (o[5] = (e) => G.value = e),
|
|
2841
2857
|
label: j(d).ImageUrl,
|
|
2842
2858
|
density: "compact",
|
|
2843
2859
|
"hide-details": "",
|
|
2844
2860
|
autofocus: "",
|
|
2845
|
-
onKeydown:
|
|
2846
|
-
}, null, 8, ["modelValue", "label"]), a("div",
|
|
2861
|
+
onKeydown: I(le, ["enter"])
|
|
2862
|
+
}, null, 8, ["modelValue", "label"]), a("div", In, [c(u, {
|
|
2847
2863
|
size: "small",
|
|
2848
2864
|
variant: "text",
|
|
2849
2865
|
"prepend-icon": "mdi-upload",
|
|
2850
|
-
onClick:
|
|
2866
|
+
onClick: ue
|
|
2851
2867
|
}, {
|
|
2852
|
-
default:
|
|
2868
|
+
default: F(() => [s(O(j(d).ImageUpload), 1)]),
|
|
2853
2869
|
_: 1
|
|
2854
2870
|
}), c(u, {
|
|
2855
2871
|
size: "small",
|
|
2856
2872
|
color: "primary",
|
|
2857
2873
|
variant: "tonal",
|
|
2858
|
-
onClick:
|
|
2874
|
+
onClick: le
|
|
2859
2875
|
}, {
|
|
2860
|
-
default:
|
|
2876
|
+
default: F(() => [s(O(j(d).ImageInsert), 1)]),
|
|
2861
2877
|
_: 1
|
|
2862
2878
|
})])]),
|
|
2863
2879
|
_: 1
|
|
@@ -2866,39 +2882,39 @@ var An = { class: "rtf-toolbar-group" }, jn = { class: "d-flex justify-end ga-2
|
|
|
2866
2882
|
}),
|
|
2867
2883
|
a("input", {
|
|
2868
2884
|
ref_key: "imageInput",
|
|
2869
|
-
ref:
|
|
2885
|
+
ref: se,
|
|
2870
2886
|
type: "file",
|
|
2871
2887
|
accept: "image/*",
|
|
2872
2888
|
class: "d-none",
|
|
2873
|
-
onChange:
|
|
2889
|
+
onChange: de
|
|
2874
2890
|
}, null, 544),
|
|
2875
2891
|
c(w, { "close-on-content-click": !1 }, {
|
|
2876
|
-
activator:
|
|
2892
|
+
activator: F(({ props: e }) => [c(u, m(J(J({}, _.value), e), {
|
|
2877
2893
|
icon: "",
|
|
2878
2894
|
title: j(d).MediaEmbed
|
|
2879
2895
|
}), {
|
|
2880
|
-
default:
|
|
2896
|
+
default: F(() => [c(j(R), { name: "mdi-video-plus" })]),
|
|
2881
2897
|
_: 1
|
|
2882
2898
|
}, 16, ["title"])]),
|
|
2883
|
-
default:
|
|
2899
|
+
default: F(() => [c(k, {
|
|
2884
2900
|
"min-width": "280",
|
|
2885
2901
|
class: "pa-3"
|
|
2886
2902
|
}, {
|
|
2887
|
-
default:
|
|
2888
|
-
modelValue:
|
|
2889
|
-
"onUpdate:modelValue": o[6] || (o[6] = (e) =>
|
|
2903
|
+
default: F(() => [c(E, {
|
|
2904
|
+
modelValue: q.value,
|
|
2905
|
+
"onUpdate:modelValue": o[6] || (o[6] = (e) => q.value = e),
|
|
2890
2906
|
label: j(d).MediaEmbedUrl,
|
|
2891
2907
|
density: "compact",
|
|
2892
2908
|
"hide-details": "",
|
|
2893
2909
|
autofocus: "",
|
|
2894
|
-
onKeydown:
|
|
2895
|
-
}, null, 8, ["modelValue", "label"]), a("div",
|
|
2910
|
+
onKeydown: I(fe, ["enter"])
|
|
2911
|
+
}, null, 8, ["modelValue", "label"]), a("div", Ln, [c(u, {
|
|
2896
2912
|
size: "small",
|
|
2897
2913
|
color: "primary",
|
|
2898
2914
|
variant: "tonal",
|
|
2899
|
-
onClick:
|
|
2915
|
+
onClick: fe
|
|
2900
2916
|
}, {
|
|
2901
|
-
default:
|
|
2917
|
+
default: F(() => [s(O(j(d).MediaEmbedInsert), 1)]),
|
|
2902
2918
|
_: 1
|
|
2903
2919
|
})])]),
|
|
2904
2920
|
_: 1
|
|
@@ -2906,15 +2922,15 @@ var An = { class: "rtf-toolbar-group" }, jn = { class: "d-flex justify-end ga-2
|
|
|
2906
2922
|
_: 1
|
|
2907
2923
|
}),
|
|
2908
2924
|
c(w, null, {
|
|
2909
|
-
activator:
|
|
2925
|
+
activator: F(({ props: e }) => [c(u, m(J(J({}, _.value), e), {
|
|
2910
2926
|
icon: "",
|
|
2911
2927
|
title: j(d).Table
|
|
2912
2928
|
}), {
|
|
2913
|
-
default:
|
|
2929
|
+
default: F(() => [c(j(R), { name: "mdi-table" })]),
|
|
2914
2930
|
_: 1
|
|
2915
2931
|
}, 16, ["title"])]),
|
|
2916
|
-
default:
|
|
2917
|
-
default:
|
|
2932
|
+
default: F(() => [c(S, { density: "compact" }, {
|
|
2933
|
+
default: F(() => [
|
|
2918
2934
|
c(b, { onClick: o[7] || (o[7] = (e) => {
|
|
2919
2935
|
var t;
|
|
2920
2936
|
return (t = f.value) == null ? void 0 : t.chain().focus().insertTable({
|
|
@@ -2923,9 +2939,9 @@ var An = { class: "rtf-toolbar-group" }, jn = { class: "d-flex justify-end ga-2
|
|
|
2923
2939
|
withHeaderRow: !0
|
|
2924
2940
|
}).run();
|
|
2925
2941
|
}) }, {
|
|
2926
|
-
prepend:
|
|
2927
|
-
default:
|
|
2928
|
-
default:
|
|
2942
|
+
prepend: F(() => [c(j(R), { name: "mdi-table-plus" })]),
|
|
2943
|
+
default: F(() => [c(p, null, {
|
|
2944
|
+
default: F(() => [s(O(j(d).TableInsert), 1)]),
|
|
2929
2945
|
_: 1
|
|
2930
2946
|
})]),
|
|
2931
2947
|
_: 1
|
|
@@ -2938,9 +2954,9 @@ var An = { class: "rtf-toolbar-group" }, jn = { class: "d-flex justify-end ga-2
|
|
|
2938
2954
|
return (t = f.value) == null ? void 0 : t.chain().focus().addRowBefore().run();
|
|
2939
2955
|
})
|
|
2940
2956
|
}, {
|
|
2941
|
-
prepend:
|
|
2942
|
-
default:
|
|
2943
|
-
default:
|
|
2957
|
+
prepend: F(() => [c(j(R), { name: "mdi-table-row-plus-before" })]),
|
|
2958
|
+
default: F(() => [c(p, null, {
|
|
2959
|
+
default: F(() => [s(O(j(d).TableAddRowAbove), 1)]),
|
|
2944
2960
|
_: 1
|
|
2945
2961
|
})]),
|
|
2946
2962
|
_: 1
|
|
@@ -2952,9 +2968,9 @@ var An = { class: "rtf-toolbar-group" }, jn = { class: "d-flex justify-end ga-2
|
|
|
2952
2968
|
return (t = f.value) == null ? void 0 : t.chain().focus().addRowAfter().run();
|
|
2953
2969
|
})
|
|
2954
2970
|
}, {
|
|
2955
|
-
prepend:
|
|
2956
|
-
default:
|
|
2957
|
-
default:
|
|
2971
|
+
prepend: F(() => [c(j(R), { name: "mdi-table-row-plus-after" })]),
|
|
2972
|
+
default: F(() => [c(p, null, {
|
|
2973
|
+
default: F(() => [s(O(j(d).TableAddRowBelow), 1)]),
|
|
2958
2974
|
_: 1
|
|
2959
2975
|
})]),
|
|
2960
2976
|
_: 1
|
|
@@ -2966,9 +2982,9 @@ var An = { class: "rtf-toolbar-group" }, jn = { class: "d-flex justify-end ga-2
|
|
|
2966
2982
|
return (t = f.value) == null ? void 0 : t.chain().focus().deleteRow().run();
|
|
2967
2983
|
})
|
|
2968
2984
|
}, {
|
|
2969
|
-
prepend:
|
|
2970
|
-
default:
|
|
2971
|
-
default:
|
|
2985
|
+
prepend: F(() => [c(j(R), { name: "mdi-table-row-remove" })]),
|
|
2986
|
+
default: F(() => [c(p, null, {
|
|
2987
|
+
default: F(() => [s(O(j(d).TableDeleteRow), 1)]),
|
|
2972
2988
|
_: 1
|
|
2973
2989
|
})]),
|
|
2974
2990
|
_: 1
|
|
@@ -2981,9 +2997,9 @@ var An = { class: "rtf-toolbar-group" }, jn = { class: "d-flex justify-end ga-2
|
|
|
2981
2997
|
return (t = f.value) == null ? void 0 : t.chain().focus().addColumnBefore().run();
|
|
2982
2998
|
})
|
|
2983
2999
|
}, {
|
|
2984
|
-
prepend:
|
|
2985
|
-
default:
|
|
2986
|
-
default:
|
|
3000
|
+
prepend: F(() => [c(j(R), { name: "mdi-table-column-plus-before" })]),
|
|
3001
|
+
default: F(() => [c(p, null, {
|
|
3002
|
+
default: F(() => [s(O(j(d).TableAddColumnBefore), 1)]),
|
|
2987
3003
|
_: 1
|
|
2988
3004
|
})]),
|
|
2989
3005
|
_: 1
|
|
@@ -2995,9 +3011,9 @@ var An = { class: "rtf-toolbar-group" }, jn = { class: "d-flex justify-end ga-2
|
|
|
2995
3011
|
return (t = f.value) == null ? void 0 : t.chain().focus().addColumnAfter().run();
|
|
2996
3012
|
})
|
|
2997
3013
|
}, {
|
|
2998
|
-
prepend:
|
|
2999
|
-
default:
|
|
3000
|
-
default:
|
|
3014
|
+
prepend: F(() => [c(j(R), { name: "mdi-table-column-plus-after" })]),
|
|
3015
|
+
default: F(() => [c(p, null, {
|
|
3016
|
+
default: F(() => [s(O(j(d).TableAddColumnAfter), 1)]),
|
|
3001
3017
|
_: 1
|
|
3002
3018
|
})]),
|
|
3003
3019
|
_: 1
|
|
@@ -3009,9 +3025,9 @@ var An = { class: "rtf-toolbar-group" }, jn = { class: "d-flex justify-end ga-2
|
|
|
3009
3025
|
return (t = f.value) == null ? void 0 : t.chain().focus().deleteColumn().run();
|
|
3010
3026
|
})
|
|
3011
3027
|
}, {
|
|
3012
|
-
prepend:
|
|
3013
|
-
default:
|
|
3014
|
-
default:
|
|
3028
|
+
prepend: F(() => [c(j(R), { name: "mdi-table-column-remove" })]),
|
|
3029
|
+
default: F(() => [c(p, null, {
|
|
3030
|
+
default: F(() => [s(O(j(d).TableDeleteColumn), 1)]),
|
|
3015
3031
|
_: 1
|
|
3016
3032
|
})]),
|
|
3017
3033
|
_: 1
|
|
@@ -3024,9 +3040,9 @@ var An = { class: "rtf-toolbar-group" }, jn = { class: "d-flex justify-end ga-2
|
|
|
3024
3040
|
return (t = f.value) == null ? void 0 : t.chain().focus().toggleHeaderRow().run();
|
|
3025
3041
|
})
|
|
3026
3042
|
}, {
|
|
3027
|
-
prepend:
|
|
3028
|
-
default:
|
|
3029
|
-
default:
|
|
3043
|
+
prepend: F(() => [c(j(R), { name: "mdi-table-row" })]),
|
|
3044
|
+
default: F(() => [c(p, null, {
|
|
3045
|
+
default: F(() => [s(O(j(d).TableToggleHeaderRow), 1)]),
|
|
3030
3046
|
_: 1
|
|
3031
3047
|
})]),
|
|
3032
3048
|
_: 1
|
|
@@ -3038,9 +3054,9 @@ var An = { class: "rtf-toolbar-group" }, jn = { class: "d-flex justify-end ga-2
|
|
|
3038
3054
|
return (t = f.value) == null ? void 0 : t.chain().focus().deleteTable().run();
|
|
3039
3055
|
})
|
|
3040
3056
|
}, {
|
|
3041
|
-
prepend:
|
|
3042
|
-
default:
|
|
3043
|
-
default:
|
|
3057
|
+
prepend: F(() => [c(j(R), { name: "mdi-table-remove" })]),
|
|
3058
|
+
default: F(() => [c(p, null, {
|
|
3059
|
+
default: F(() => [s(O(j(d).TableDeleteTable), 1)]),
|
|
3044
3060
|
_: 1
|
|
3045
3061
|
})]),
|
|
3046
3062
|
_: 1
|
|
@@ -3059,7 +3075,7 @@ var An = { class: "rtf-toolbar-group" }, jn = { class: "d-flex justify-end ga-2
|
|
|
3059
3075
|
return (t = f.value) == null ? void 0 : t.chain().focus().toggleBlockquote().run();
|
|
3060
3076
|
})
|
|
3061
3077
|
}), {
|
|
3062
|
-
default:
|
|
3078
|
+
default: F(() => [c(j(R), { name: "mdi-format-quote-close" })]),
|
|
3063
3079
|
_: 1
|
|
3064
3080
|
}, 16, ["title", "active"])
|
|
3065
3081
|
]),
|
|
@@ -3068,18 +3084,18 @@ var An = { class: "rtf-toolbar-group" }, jn = { class: "d-flex justify-end ga-2
|
|
|
3068
3084
|
inset: "",
|
|
3069
3085
|
class: "mx-1"
|
|
3070
3086
|
}),
|
|
3071
|
-
c(
|
|
3087
|
+
c($t, m({ actions: j(M) }, v.value, { "show-as-group": "grouped-no-borders" }), null, 16, ["actions"]),
|
|
3072
3088
|
c(l, {
|
|
3073
3089
|
vertical: "",
|
|
3074
3090
|
inset: "",
|
|
3075
3091
|
class: "mx-1"
|
|
3076
3092
|
}),
|
|
3077
|
-
c(
|
|
3093
|
+
c($t, m({ actions: te }, v.value, { "show-as-group": "grouped-no-borders" }), null, 16)
|
|
3078
3094
|
], 2);
|
|
3079
3095
|
};
|
|
3080
3096
|
}
|
|
3081
|
-
}),
|
|
3082
|
-
function
|
|
3097
|
+
}), zn = /^[a-z][a-z0-9]*:[a-z]/i, Bn = /mso-[a-z-]+\s*:[^;]+;?/gi, Vn = /^Mso/i, Hn = /background(?:-color)?\s*:[^;]+;?/gi;
|
|
3098
|
+
function Un(e) {
|
|
3083
3099
|
let t = document.createTreeWalker(e, NodeFilter.SHOW_COMMENT), n = [];
|
|
3084
3100
|
for (let e = t.nextNode(); e; e = t.nextNode()) n.push(e);
|
|
3085
3101
|
n.forEach((e) => {
|
|
@@ -3087,42 +3103,42 @@ function zn(e) {
|
|
|
3087
3103
|
return (t = e.parentNode) == null ? void 0 : t.removeChild(e);
|
|
3088
3104
|
});
|
|
3089
3105
|
}
|
|
3090
|
-
function
|
|
3106
|
+
function Wn(e) {
|
|
3091
3107
|
let t = e.parentNode;
|
|
3092
3108
|
if (t) {
|
|
3093
3109
|
for (; e.firstChild;) t.insertBefore(e.firstChild, e);
|
|
3094
3110
|
t.removeChild(e);
|
|
3095
3111
|
}
|
|
3096
3112
|
}
|
|
3097
|
-
function
|
|
3113
|
+
function Gn(e) {
|
|
3098
3114
|
let t = e.getAttribute("style");
|
|
3099
3115
|
if (t != null) {
|
|
3100
|
-
let n = t.replace(
|
|
3116
|
+
let n = t.replace(Bn, "").replace(Hn, "").trim();
|
|
3101
3117
|
n ? e.setAttribute("style", n) : e.removeAttribute("style");
|
|
3102
3118
|
}
|
|
3103
3119
|
let n = e.getAttribute("class");
|
|
3104
3120
|
if (n != null) {
|
|
3105
|
-
let t = n.split(/\s+/).filter((e) => e && !
|
|
3121
|
+
let t = n.split(/\s+/).filter((e) => e && !Vn.test(e)).join(" ");
|
|
3106
3122
|
t ? e.setAttribute("class", t) : e.removeAttribute("class");
|
|
3107
3123
|
}
|
|
3108
3124
|
e.removeAttribute("lang"), e.removeAttribute("xml:lang"), e.removeAttribute("id"), e.removeAttribute("align"), e.removeAttribute("bgcolor");
|
|
3109
3125
|
}
|
|
3110
|
-
function
|
|
3126
|
+
function Kn(e) {
|
|
3111
3127
|
if (!e || typeof DOMParser > "u") return e;
|
|
3112
3128
|
let t = new DOMParser().parseFromString(e, "text/html").body;
|
|
3113
|
-
return t ? (
|
|
3114
|
-
if (
|
|
3115
|
-
|
|
3129
|
+
return t ? (Un(t), t.querySelectorAll("xml, style, script, meta, link").forEach((e) => e.remove()), Array.from(t.querySelectorAll("*")).forEach((e) => {
|
|
3130
|
+
if (zn.test(e.tagName) || e.tagName === "FONT") {
|
|
3131
|
+
Wn(e);
|
|
3116
3132
|
return;
|
|
3117
3133
|
}
|
|
3118
|
-
|
|
3134
|
+
Gn(e);
|
|
3119
3135
|
}), Array.from(t.querySelectorAll("span, div")).forEach((e) => {
|
|
3120
|
-
e.attributes.length === 0 &&
|
|
3136
|
+
e.attributes.length === 0 && Wn(e);
|
|
3121
3137
|
}), t.innerHTML) : e;
|
|
3122
3138
|
}
|
|
3123
3139
|
//#endregion
|
|
3124
3140
|
//#region src/helpers/rtf-editor/editor-core.vue?vue&type=script&setup=true&lang.ts
|
|
3125
|
-
var
|
|
3141
|
+
var qn = { class: "editor-container" }, Jn = { class: "rtf-bubble-menu" }, Yn = /* @__PURE__ */ l({
|
|
3126
3142
|
__name: "editor-core",
|
|
3127
3143
|
props: {
|
|
3128
3144
|
modelValue: { default: "" },
|
|
@@ -3153,7 +3169,7 @@ var Un = { class: "editor-container" }, Wn = { class: "rtf-bubble-menu" }, Gn =
|
|
|
3153
3169
|
editable: !s.disabled,
|
|
3154
3170
|
extensions: [
|
|
3155
3171
|
Ee.configure({ link: !1 }),
|
|
3156
|
-
|
|
3172
|
+
An.configure({
|
|
3157
3173
|
openOnClick: !1,
|
|
3158
3174
|
autolink: !0,
|
|
3159
3175
|
defaultProtocol: "https"
|
|
@@ -3183,15 +3199,15 @@ var Un = { class: "editor-container" }, Wn = { class: "rtf-bubble-menu" }, Gn =
|
|
|
3183
3199
|
Se,
|
|
3184
3200
|
xe,
|
|
3185
3201
|
ye.configure({ placeholder: "" }),
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3202
|
+
hn,
|
|
3203
|
+
_n,
|
|
3204
|
+
vn,
|
|
3205
|
+
Mn
|
|
3190
3206
|
],
|
|
3191
3207
|
editorProps: {
|
|
3192
3208
|
attributes: { class: "rtf-content" },
|
|
3193
|
-
transformPastedHTML: (e) =>
|
|
3194
|
-
handlePaste:
|
|
3209
|
+
transformPastedHTML: (e) => Kn(e),
|
|
3210
|
+
handlePaste: kn(() => f.value)
|
|
3195
3211
|
},
|
|
3196
3212
|
onUpdate: ({ editor: e }) => {
|
|
3197
3213
|
l("update:modelValue", e.isEmpty ? "" : e.getHTML());
|
|
@@ -3211,7 +3227,7 @@ var Un = { class: "editor-container" }, Wn = { class: "rtf-bubble-menu" }, Gn =
|
|
|
3211
3227
|
size: "small",
|
|
3212
3228
|
density: "comfortable",
|
|
3213
3229
|
variant: "text"
|
|
3214
|
-
}, h =
|
|
3230
|
+
}, h = Nn(f), g = t(() => {
|
|
3215
3231
|
var e, t, n, r, i;
|
|
3216
3232
|
return h.value, {
|
|
3217
3233
|
bold: !!((e = f.value) != null && e.isActive("bold")),
|
|
@@ -3235,13 +3251,13 @@ var Un = { class: "editor-container" }, Wn = { class: "rtf-bubble-menu" }, Gn =
|
|
|
3235
3251
|
e.chain().focus().unsetLink().run();
|
|
3236
3252
|
return;
|
|
3237
3253
|
}
|
|
3238
|
-
let t = window.prompt(
|
|
3254
|
+
let t = window.prompt(Lt.LinkUrl);
|
|
3239
3255
|
t && e.chain().focus().extendMarkRange("link").setLink({ href: t }).run();
|
|
3240
3256
|
}
|
|
3241
3257
|
return (t, o) => {
|
|
3242
3258
|
let s = T("v-btn");
|
|
3243
|
-
return x(), i("div",
|
|
3244
|
-
c(
|
|
3259
|
+
return x(), i("div", qn, [
|
|
3260
|
+
c(Rn, {
|
|
3245
3261
|
ref_key: "toolbarRef",
|
|
3246
3262
|
ref: u,
|
|
3247
3263
|
editor: j(f),
|
|
@@ -3256,40 +3272,40 @@ var Un = { class: "editor-container" }, Wn = { class: "rtf-bubble-menu" }, Gn =
|
|
|
3256
3272
|
editor: j(f),
|
|
3257
3273
|
"should-show": _
|
|
3258
3274
|
}, {
|
|
3259
|
-
default:
|
|
3275
|
+
default: F(() => [a("div", Jn, [
|
|
3260
3276
|
c(s, m(p, {
|
|
3261
3277
|
active: g.value.bold,
|
|
3262
3278
|
onClick: o[0] || (o[0] = (e) => v("toggleBold"))
|
|
3263
3279
|
}), {
|
|
3264
|
-
default:
|
|
3280
|
+
default: F(() => [c(j(R), { name: "mdi-format-bold" })]),
|
|
3265
3281
|
_: 1
|
|
3266
3282
|
}, 16, ["active"]),
|
|
3267
3283
|
c(s, m(p, {
|
|
3268
3284
|
active: g.value.italic,
|
|
3269
3285
|
onClick: o[1] || (o[1] = (e) => v("toggleItalic"))
|
|
3270
3286
|
}), {
|
|
3271
|
-
default:
|
|
3287
|
+
default: F(() => [c(j(R), { name: "mdi-format-italic" })]),
|
|
3272
3288
|
_: 1
|
|
3273
3289
|
}, 16, ["active"]),
|
|
3274
3290
|
c(s, m(p, {
|
|
3275
3291
|
active: g.value.link,
|
|
3276
3292
|
onClick: C
|
|
3277
3293
|
}), {
|
|
3278
|
-
default:
|
|
3294
|
+
default: F(() => [c(j(R), { name: "mdi-link-variant" })]),
|
|
3279
3295
|
_: 1
|
|
3280
3296
|
}, 16, ["active"]),
|
|
3281
3297
|
c(s, m(p, {
|
|
3282
3298
|
active: g.value.bulletList,
|
|
3283
3299
|
onClick: o[2] || (o[2] = (e) => v("toggleBulletList"))
|
|
3284
3300
|
}), {
|
|
3285
|
-
default:
|
|
3301
|
+
default: F(() => [c(j(R), { name: "mdi-format-list-bulleted" })]),
|
|
3286
3302
|
_: 1
|
|
3287
3303
|
}, 16, ["active"]),
|
|
3288
3304
|
c(s, m(p, {
|
|
3289
3305
|
active: g.value.orderedList,
|
|
3290
3306
|
onClick: o[3] || (o[3] = (e) => v("toggleOrderedList"))
|
|
3291
3307
|
}), {
|
|
3292
|
-
default:
|
|
3308
|
+
default: F(() => [c(j(R), { name: "mdi-format-list-numbered" })]),
|
|
3293
3309
|
_: 1
|
|
3294
3310
|
}, 16, ["active"])
|
|
3295
3311
|
])]),
|
|
@@ -3298,7 +3314,7 @@ var Un = { class: "editor-container" }, Wn = { class: "rtf-bubble-menu" }, Gn =
|
|
|
3298
3314
|
]);
|
|
3299
3315
|
};
|
|
3300
3316
|
}
|
|
3301
|
-
}),
|
|
3317
|
+
}), Xn = /* @__PURE__ */ l({
|
|
3302
3318
|
__name: "df-rtf-editor",
|
|
3303
3319
|
props: /*@__PURE__*/ p({
|
|
3304
3320
|
minHeight: {},
|
|
@@ -3318,12 +3334,12 @@ var Un = { class: "editor-container" }, Wn = { class: "rtf-bubble-menu" }, Gn =
|
|
|
3318
3334
|
passthroughAttrs: {},
|
|
3319
3335
|
density: {},
|
|
3320
3336
|
variant: {}
|
|
3321
|
-
},
|
|
3337
|
+
}, J(J({}, Z), {}, { minHeight: void 0 })),
|
|
3322
3338
|
emits: ["update:modelValue", "click:clear"],
|
|
3323
3339
|
setup(e, { emit: t }) {
|
|
3324
|
-
let r = e, { densityClass: i, value: a, vuetifyBindings: o } =
|
|
3325
|
-
return (t, s) => (x(), n(j(
|
|
3326
|
-
default:
|
|
3340
|
+
let r = e, { densityClass: i, value: a, vuetifyBindings: o } = Q(r, t);
|
|
3341
|
+
return (t, s) => (x(), n(j(It), m(r, { class: ["rtf-editor", j(i)] }), {
|
|
3342
|
+
default: F((t) => [c(Yn, m({
|
|
3327
3343
|
ref: "$editor",
|
|
3328
3344
|
modelValue: j(a),
|
|
3329
3345
|
"onUpdate:modelValue": s[0] || (s[0] = (e) => f(a) ? a.value = e : null),
|
|
@@ -3351,7 +3367,7 @@ var Un = { class: "editor-container" }, Wn = { class: "rtf-bubble-menu" }, Gn =
|
|
|
3351
3367
|
});
|
|
3352
3368
|
//#endregion
|
|
3353
3369
|
//#region src/helpers/df-select.helper.ts
|
|
3354
|
-
function
|
|
3370
|
+
function Zn(e) {
|
|
3355
3371
|
return e.map((e) => ({
|
|
3356
3372
|
value: e.id,
|
|
3357
3373
|
title: e.text,
|
|
@@ -3360,33 +3376,33 @@ function qn(e) {
|
|
|
3360
3376
|
}
|
|
3361
3377
|
function $(e, t) {
|
|
3362
3378
|
var n;
|
|
3363
|
-
return e == null ||
|
|
3379
|
+
return e == null || W(e) && e.length === 0 ? null : t ? U(e) : W(e) ? (n = oe(e)) == null ? null : n : e;
|
|
3364
3380
|
}
|
|
3365
|
-
function
|
|
3381
|
+
function Qn(e, t) {
|
|
3366
3382
|
if (t == null) return [];
|
|
3367
3383
|
let n = U(t);
|
|
3368
3384
|
return e.filter((e) => n.some((t) => t === e.id));
|
|
3369
3385
|
}
|
|
3370
|
-
function
|
|
3386
|
+
function $n(e, t, n, r, i) {
|
|
3371
3387
|
let a = $(e, n);
|
|
3372
3388
|
if (a == null) {
|
|
3373
3389
|
t.value = n ? [] : null;
|
|
3374
3390
|
return;
|
|
3375
3391
|
}
|
|
3376
|
-
if (n) t.value = r ? a :
|
|
3392
|
+
if (n) t.value = r ? a : Qn(i, a).map((e) => e.id);
|
|
3377
3393
|
else if (r) t.value = a;
|
|
3378
3394
|
else {
|
|
3379
3395
|
var o;
|
|
3380
|
-
let e = oe(
|
|
3396
|
+
let e = oe(Qn(i, a));
|
|
3381
3397
|
t.value = (o = e == null ? void 0 : e.id) == null ? null : o;
|
|
3382
3398
|
}
|
|
3383
3399
|
}
|
|
3384
3400
|
//#endregion
|
|
3385
3401
|
//#region src/df-select.vue?vue&type=script&setup=true&lang.ts
|
|
3386
|
-
var
|
|
3402
|
+
var er = {
|
|
3387
3403
|
key: 0,
|
|
3388
3404
|
class: "me-1"
|
|
3389
|
-
},
|
|
3405
|
+
}, tr = /*#__PURE__*/ ((e, t) => {
|
|
3390
3406
|
let n = e.__vccOpts || e;
|
|
3391
3407
|
for (let [e, r] of t) n[e] = r;
|
|
3392
3408
|
return n;
|
|
@@ -3412,7 +3428,7 @@ var Xn = {
|
|
|
3412
3428
|
passthroughAttrs: {},
|
|
3413
3429
|
density: {},
|
|
3414
3430
|
variant: {}
|
|
3415
|
-
},
|
|
3431
|
+
}, J(J({}, Z), {}, {
|
|
3416
3432
|
choices: void 0,
|
|
3417
3433
|
multiple: !1,
|
|
3418
3434
|
allowTags: !1,
|
|
@@ -3426,122 +3442,125 @@ var Xn = {
|
|
|
3426
3442
|
],
|
|
3427
3443
|
setup(e, { emit: s }) {
|
|
3428
3444
|
var l;
|
|
3429
|
-
let d = e, { choices: f, multiple: p, allowTags: v, allowNull: y, cssClass: b } = A(d), C = s, D = S(null), { densityClass: k, isRendered:
|
|
3445
|
+
let d = e, { choices: f, multiple: p, allowTags: v, allowNull: y, cssClass: b } = A(d), C = s, D = S(null), { densityClass: k, isRendered: ee, label: M, shownErrors: te, touched: P, value: I, visibilityClass: L, vuetifyBindings: z } = Q(d, C), B = S(null), ne = S(!1), re = S([]), V = t(() => j(ne) ? j(re) : j(f) || []), ie = t(() => Zn(V.value)), H = S(null), ae = S(0), oe = S(!1), W = S(0), G = S(0), se = t(() => G.value > 0 || W.value > 0);
|
|
3430
3446
|
(l = f.value) != null && l.length && d.fetchChoices !== void 0 && console.warn("Both choices and fetchChoices are set. Only one of them should be set.");
|
|
3431
|
-
function
|
|
3432
|
-
C("update:modelValueDisplay",
|
|
3447
|
+
function le(e) {
|
|
3448
|
+
C("update:modelValueDisplay", Qn(V.value, e));
|
|
3433
3449
|
}
|
|
3434
|
-
let
|
|
3435
|
-
function
|
|
3436
|
-
|
|
3450
|
+
let ue = S(!1);
|
|
3451
|
+
function de(e) {
|
|
3452
|
+
ue.value = !0;
|
|
3437
3453
|
try {
|
|
3438
3454
|
I.value = e;
|
|
3439
3455
|
} finally {
|
|
3440
|
-
|
|
3441
|
-
|
|
3456
|
+
h(() => {
|
|
3457
|
+
let t = $(I.value, p.value);
|
|
3458
|
+
ce(t, e) || $n(t, B, p.value, v.value, V.value), ue.value = !1;
|
|
3442
3459
|
});
|
|
3443
3460
|
}
|
|
3444
3461
|
}
|
|
3445
|
-
function
|
|
3462
|
+
function K(e) {
|
|
3446
3463
|
if (!e) return 0;
|
|
3447
3464
|
let t = e.getBoundingClientRect(), n = window.getComputedStyle(e);
|
|
3448
3465
|
return t.width + parseFloat(n.marginLeft) + parseFloat(n.marginRight);
|
|
3449
3466
|
}
|
|
3450
|
-
function
|
|
3451
|
-
if (p.value && y.value &&
|
|
3467
|
+
function q() {
|
|
3468
|
+
if (p.value && y.value && B.value != null && B.value.length > 0 && D.value) {
|
|
3452
3469
|
var e;
|
|
3453
3470
|
let t = D.value.$el, n = (e = t.querySelector(".v-input__control")) == null ? void 0 : e.clientWidth, r = t.querySelector(".v-field__input"), i = r.querySelectorAll(".v-autocomplete__selection, .v-combobox__selection"), a = window.getComputedStyle(r), o = parseFloat(a.paddingLeft) + parseFloat(a.paddingRight);
|
|
3454
3471
|
i.forEach((e) => {
|
|
3455
|
-
o +=
|
|
3472
|
+
o += K(e);
|
|
3456
3473
|
});
|
|
3457
|
-
let s =
|
|
3474
|
+
let s = K(t.querySelector(".v-field .v-field__clearable")), c = K(t.querySelector(".v-field .v-field__append-inner"));
|
|
3458
3475
|
oe.value = n - o - i.length * 2 - c < s;
|
|
3459
3476
|
} else oe.value = !1;
|
|
3460
3477
|
}
|
|
3461
|
-
function
|
|
3478
|
+
function pe(e) {
|
|
3462
3479
|
let t = e.target;
|
|
3463
3480
|
t instanceof HTMLElement && t.closest(".v-chip__close") && (e.stopPropagation(), e.preventDefault());
|
|
3464
3481
|
}
|
|
3465
|
-
N(
|
|
3466
|
-
|
|
3482
|
+
N(B, (e) => {
|
|
3483
|
+
z.value.readonly || W.value > 0 || h(() => {
|
|
3467
3484
|
let t = $(e, p.value);
|
|
3468
|
-
|
|
3485
|
+
le(t), de(t);
|
|
3469
3486
|
});
|
|
3470
3487
|
}, { deep: !0 }), N(I, (e) => {
|
|
3471
|
-
if (
|
|
3472
|
-
let t = $(e, p.value), n =
|
|
3473
|
-
|
|
3474
|
-
|
|
3488
|
+
if (ue.value) return;
|
|
3489
|
+
let t = $(e, p.value), n = ye(t);
|
|
3490
|
+
$n(t, B, p.value, !1, V.value), n == null || n.then(() => {
|
|
3491
|
+
ce($(I.value, p.value), t) && $n(t, B, p.value, !1, V.value);
|
|
3475
3492
|
});
|
|
3476
|
-
}, { deep: !0 }), N(
|
|
3477
|
-
|
|
3493
|
+
}, { deep: !0 }), N(ue, () => {
|
|
3494
|
+
ue.value || q();
|
|
3478
3495
|
});
|
|
3479
|
-
function
|
|
3480
|
-
H.value != null && H.value.length > 0 && (H.value = null,
|
|
3496
|
+
function me() {
|
|
3497
|
+
H.value != null && H.value.length > 0 && (H.value = null, _e());
|
|
3481
3498
|
}
|
|
3482
|
-
function
|
|
3483
|
-
if (
|
|
3484
|
-
let e = $(
|
|
3485
|
-
|
|
3499
|
+
function he() {
|
|
3500
|
+
if (me(), z.value.readonly || v.value) return;
|
|
3501
|
+
let e = $(B.value, p.value);
|
|
3502
|
+
$n(e, B, p.value, !1, V.value), de(e);
|
|
3486
3503
|
}
|
|
3487
|
-
function
|
|
3488
|
-
if (e.stopPropagation(),
|
|
3489
|
-
v.value && (
|
|
3504
|
+
function ge(e, t) {
|
|
3505
|
+
if (e.stopPropagation(), z.value.readonly || v.value) {
|
|
3506
|
+
v.value && (B.value = B.value.filter((e) => e !== t));
|
|
3490
3507
|
return;
|
|
3491
3508
|
}
|
|
3492
3509
|
let n;
|
|
3493
|
-
n = p.value && Array.isArray(
|
|
3510
|
+
n = p.value && Array.isArray(B.value) ? $(B.value.filter((e) => e !== t), p.value) : null, $n(n, B, p.value, !1, V.value), de(n);
|
|
3494
3511
|
}
|
|
3495
|
-
function
|
|
3496
|
-
return
|
|
3512
|
+
function _e(e, t) {
|
|
3513
|
+
return ve.apply(this, arguments);
|
|
3497
3514
|
}
|
|
3498
|
-
function
|
|
3499
|
-
return
|
|
3500
|
-
if (
|
|
3515
|
+
function ve() {
|
|
3516
|
+
return ve = an(function* (e, t) {
|
|
3517
|
+
if (z.value.readonly || (H.value = e, f.value || d.fetchChoices === void 0)) return;
|
|
3501
3518
|
let n = ++ae.value;
|
|
3502
|
-
|
|
3519
|
+
G.value++;
|
|
3503
3520
|
try {
|
|
3504
3521
|
let r = yield d.fetchChoices(e, t);
|
|
3505
3522
|
if (n !== ae.value) return;
|
|
3506
|
-
let i =
|
|
3507
|
-
re.value =
|
|
3523
|
+
let i = Qn(V.value, $(I.value, p.value));
|
|
3524
|
+
re.value = fe([...i, ...r], "id"), ne.value = !0;
|
|
3508
3525
|
} finally {
|
|
3509
|
-
|
|
3526
|
+
G.value--;
|
|
3510
3527
|
}
|
|
3511
|
-
}),
|
|
3528
|
+
}), ve.apply(this, arguments);
|
|
3512
3529
|
}
|
|
3513
|
-
function
|
|
3530
|
+
function ye(e) {
|
|
3514
3531
|
let t = d.fetchChoices;
|
|
3515
3532
|
if (t === void 0 || v.value || e == null) return null;
|
|
3516
|
-
let n = U(e).filter((e) => !
|
|
3517
|
-
return n.length ? (
|
|
3533
|
+
let n = U(e).filter((e) => !V.value.some((t) => t.id === e));
|
|
3534
|
+
return n.length ? (W.value++, an(function* () {
|
|
3518
3535
|
try {
|
|
3519
3536
|
let e = yield t(void 0, p.value ? n : n[0]);
|
|
3520
|
-
re.value =
|
|
3537
|
+
re.value = fe([...V.value, ...e], "id"), ne.value = !0;
|
|
3521
3538
|
} finally {
|
|
3522
|
-
|
|
3539
|
+
W.value--;
|
|
3523
3540
|
}
|
|
3524
3541
|
})()) : null;
|
|
3525
3542
|
}
|
|
3526
|
-
function
|
|
3527
|
-
let e = I.value;
|
|
3528
|
-
!y.value &&
|
|
3543
|
+
function be() {
|
|
3544
|
+
let e = z.value.readonly, t = I.value;
|
|
3545
|
+
!e && !y.value && t == null && ie.value.length && (t = ie.value[0].value), t = $(t, p.value), $n(t, B, p.value, v.value, V.value), !(W.value > 0) && (le(t), e || de(t));
|
|
3529
3546
|
}
|
|
3530
|
-
let
|
|
3547
|
+
let xe = null;
|
|
3531
3548
|
if (d.fetchChoices !== void 0) {
|
|
3532
|
-
var
|
|
3533
|
-
|
|
3549
|
+
var Se;
|
|
3550
|
+
xe = (Se = ye($(I.value, p.value))) == null ? _e(void 0, I.value) : Se;
|
|
3534
3551
|
}
|
|
3535
|
-
return
|
|
3536
|
-
|
|
3552
|
+
return be(), xe == null || xe.then(() => {
|
|
3553
|
+
be();
|
|
3554
|
+
}), N(() => z.value.readonly, (e) => {
|
|
3555
|
+
e || be();
|
|
3537
3556
|
}), (e, t) => {
|
|
3538
3557
|
let s = T("v-chip"), l = T("v-list-item");
|
|
3539
|
-
return j(
|
|
3558
|
+
return j(ee) ? (x(), n(E(j(v) ? "v-combobox" : "v-autocomplete"), m({
|
|
3540
3559
|
key: 0,
|
|
3541
3560
|
ref_key: "dfSelectRef",
|
|
3542
3561
|
ref: D,
|
|
3543
|
-
modelValue:
|
|
3544
|
-
"onUpdate:modelValue": t[0] || (t[0] = (e) =>
|
|
3562
|
+
modelValue: B.value,
|
|
3563
|
+
"onUpdate:modelValue": t[0] || (t[0] = (e) => B.value = e),
|
|
3545
3564
|
class: [
|
|
3546
3565
|
j(b),
|
|
3547
3566
|
j(k),
|
|
@@ -3552,71 +3571,71 @@ var Xn = {
|
|
|
3552
3571
|
"return-object": !1,
|
|
3553
3572
|
chips: "",
|
|
3554
3573
|
"auto-select-first": !0,
|
|
3555
|
-
"closable-chips": j(y) || j(p) &&
|
|
3574
|
+
"closable-chips": j(y) || j(p) && B.value.length > 1,
|
|
3556
3575
|
clearable: j(y),
|
|
3557
3576
|
multiple: j(p),
|
|
3558
|
-
loading:
|
|
3577
|
+
loading: se.value,
|
|
3559
3578
|
"hide-selected": !1,
|
|
3560
|
-
"aria-describedby": j(
|
|
3579
|
+
"aria-describedby": j(z).helpText ? `${j(z).name}-help` : null,
|
|
3561
3580
|
"menu-props": { maxHeight: "400" },
|
|
3562
3581
|
search: H.value
|
|
3563
|
-
}, j(
|
|
3564
|
-
"onUpdate:search": t[1] || (t[1] = (e) =>
|
|
3565
|
-
"onUpdate:modelValue":
|
|
3566
|
-
"onClick:clear": t[2] || (t[2] = (e) =>
|
|
3567
|
-
onBlur: t[3] || (t[3] = (e) =>
|
|
3568
|
-
onMousedownCapture: t[4] || (t[4] = (e) =>
|
|
3582
|
+
}, j(z), {
|
|
3583
|
+
"onUpdate:search": t[1] || (t[1] = (e) => _e(e, void 0)),
|
|
3584
|
+
"onUpdate:modelValue": he,
|
|
3585
|
+
"onClick:clear": t[2] || (t[2] = (e) => B.value = null),
|
|
3586
|
+
onBlur: t[3] || (t[3] = (e) => P.value = !0),
|
|
3587
|
+
onMousedownCapture: t[4] || (t[4] = (e) => pe(e))
|
|
3569
3588
|
}), o({
|
|
3570
|
-
chip:
|
|
3589
|
+
chip: F(({ item: e }) => [(x(), n(s, {
|
|
3571
3590
|
key: e.value,
|
|
3572
3591
|
label: "",
|
|
3573
3592
|
size: "small",
|
|
3574
3593
|
class: "d-flex align-middle",
|
|
3575
3594
|
variant: j(p) ? "tonal" : "text",
|
|
3576
3595
|
closable: j(p),
|
|
3577
|
-
"onClick:close": (t) =>
|
|
3596
|
+
"onClick:close": (t) => ge(t, e.value)
|
|
3578
3597
|
}, {
|
|
3579
|
-
prepend:
|
|
3598
|
+
prepend: F(() => {
|
|
3580
3599
|
var t;
|
|
3581
|
-
return [(t = e.raw) != null && t.icon ? (x(), n(j(
|
|
3600
|
+
return [(t = e.raw) != null && t.icon ? (x(), n(j(R), {
|
|
3582
3601
|
key: 0,
|
|
3583
3602
|
class: "me-1",
|
|
3584
3603
|
name: e.raw.icon
|
|
3585
3604
|
}, null, 8, ["name"])) : r("", !0)];
|
|
3586
3605
|
}),
|
|
3587
|
-
default:
|
|
3606
|
+
default: F(() => [a("span", { class: g({ "text-body-1": !j(p) }) }, O(e.title), 3)]),
|
|
3588
3607
|
_: 2
|
|
3589
3608
|
}, 1032, [
|
|
3590
3609
|
"variant",
|
|
3591
3610
|
"closable",
|
|
3592
3611
|
"onClick:close"
|
|
3593
3612
|
]))]),
|
|
3594
|
-
label:
|
|
3613
|
+
label: F((e) => [c(j(X), {
|
|
3595
3614
|
data: e,
|
|
3596
|
-
label: j(
|
|
3615
|
+
label: j(M)
|
|
3597
3616
|
}, null, 8, ["data", "label"])]),
|
|
3598
|
-
item:
|
|
3599
|
-
prepend:
|
|
3617
|
+
item: F(({ props: e, item: t }) => [c(l, _(u(e)), {
|
|
3618
|
+
prepend: F(() => {
|
|
3600
3619
|
var e;
|
|
3601
|
-
return [(e = t.raw) != null && e.icon ? (x(), i("span",
|
|
3620
|
+
return [(e = t.raw) != null && e.icon ? (x(), i("span", er, [c(j(R), {
|
|
3602
3621
|
class: "action-icon",
|
|
3603
3622
|
name: t.raw.icon
|
|
3604
3623
|
}, null, 8, ["name"])])) : r("", !0)];
|
|
3605
3624
|
}),
|
|
3606
3625
|
_: 2
|
|
3607
3626
|
}, 1040)]),
|
|
3608
|
-
message:
|
|
3627
|
+
message: F(({ message: e }) => [c(j(Y), {
|
|
3609
3628
|
message: e,
|
|
3610
3629
|
errors: j(te)
|
|
3611
3630
|
}, null, 8, ["message", "errors"])]),
|
|
3612
3631
|
_: 2
|
|
3613
3632
|
}, [e.$slots["append-inner"] ? {
|
|
3614
3633
|
name: "append-inner",
|
|
3615
|
-
fn:
|
|
3634
|
+
fn: F((t) => [w(e.$slots, "append-inner", _(u(t)), void 0, !0)]),
|
|
3616
3635
|
key: "0"
|
|
3617
3636
|
} : void 0, e.$slots["prepend-inner"] ? {
|
|
3618
3637
|
name: "prepend-inner",
|
|
3619
|
-
fn:
|
|
3638
|
+
fn: F((t) => [w(e.$slots, "prepend-inner", _(u(t)), void 0, !0)]),
|
|
3620
3639
|
key: "1"
|
|
3621
3640
|
} : void 0]), 1040, [
|
|
3622
3641
|
"modelValue",
|
|
@@ -3631,7 +3650,7 @@ var Xn = {
|
|
|
3631
3650
|
])) : r("", !0);
|
|
3632
3651
|
};
|
|
3633
3652
|
}
|
|
3634
|
-
}), [["__scopeId", "data-v-
|
|
3653
|
+
}), [["__scopeId", "data-v-94b008ba"]]), nr = /* @__PURE__ */ l({
|
|
3635
3654
|
__name: "df-text-area",
|
|
3636
3655
|
props: /*@__PURE__*/ p({
|
|
3637
3656
|
rows: {},
|
|
@@ -3650,13 +3669,13 @@ var Xn = {
|
|
|
3650
3669
|
passthroughAttrs: {},
|
|
3651
3670
|
density: {},
|
|
3652
3671
|
variant: {}
|
|
3653
|
-
},
|
|
3672
|
+
}, J(J({}, Z), {}, {
|
|
3654
3673
|
rows: void 0,
|
|
3655
3674
|
maxRows: void 0
|
|
3656
3675
|
})),
|
|
3657
3676
|
emits: ["update:modelValue", "click:clear"],
|
|
3658
3677
|
setup(e, { emit: t }) {
|
|
3659
|
-
let n = e, { densityClass: a, isRendered: o, label: s,
|
|
3678
|
+
let n = e, { densityClass: a, isRendered: o, label: s, shownErrors: l, touched: u, value: d, visibilityClass: p, vuetifyBindings: h } = Q(n, t), { cssClass: _ } = A(n);
|
|
3660
3679
|
return (t, n) => {
|
|
3661
3680
|
let v = T("v-textarea");
|
|
3662
3681
|
return j(o) ? (x(), i("div", {
|
|
@@ -3670,11 +3689,11 @@ var Xn = {
|
|
|
3670
3689
|
"auto-grow": (e.maxRows || 0) > 0,
|
|
3671
3690
|
"max-rows": e.maxRows
|
|
3672
3691
|
}, j(h), { onBlur: n[1] || (n[1] = (e) => u.value = !0) }), {
|
|
3673
|
-
label:
|
|
3692
|
+
label: F((e) => [c(j(X), {
|
|
3674
3693
|
data: e,
|
|
3675
3694
|
label: j(s)
|
|
3676
3695
|
}, null, 8, ["data", "label"])]),
|
|
3677
|
-
message:
|
|
3696
|
+
message: F(({ message: e }) => [c(j(Y), {
|
|
3678
3697
|
message: e,
|
|
3679
3698
|
errors: j(l)
|
|
3680
3699
|
}, null, 8, ["message", "errors"])]),
|
|
@@ -3688,20 +3707,20 @@ var Xn = {
|
|
|
3688
3707
|
])], 2)) : r("", !0);
|
|
3689
3708
|
};
|
|
3690
3709
|
}
|
|
3691
|
-
}),
|
|
3692
|
-
DfActions: () =>
|
|
3693
|
-
DfCheckbox: () =>
|
|
3694
|
-
DfColor: () =>
|
|
3695
|
-
DfDateTime: () =>
|
|
3696
|
-
DfFile: () =>
|
|
3697
|
-
DfImage: () =>
|
|
3698
|
-
DfInput: () =>
|
|
3699
|
-
DfInputHint: () =>
|
|
3700
|
-
DfLabel: () =>
|
|
3701
|
-
DfRtfEditor: () =>
|
|
3702
|
-
DfSelect: () =>
|
|
3703
|
-
DfTextArea: () =>
|
|
3704
|
-
}),
|
|
3710
|
+
}), rr = /* @__PURE__ */ ct({
|
|
3711
|
+
DfActions: () => $t,
|
|
3712
|
+
DfCheckbox: () => en,
|
|
3713
|
+
DfColor: () => tn,
|
|
3714
|
+
DfDateTime: () => nn,
|
|
3715
|
+
DfFile: () => sn,
|
|
3716
|
+
DfImage: () => pn,
|
|
3717
|
+
DfInput: () => mn,
|
|
3718
|
+
DfInputHint: () => Y,
|
|
3719
|
+
DfLabel: () => X,
|
|
3720
|
+
DfRtfEditor: () => Xn,
|
|
3721
|
+
DfSelect: () => tr,
|
|
3722
|
+
DfTextArea: () => nr
|
|
3723
|
+
}), ir = /* @__PURE__ */ ct({
|
|
3705
3724
|
VAutocomplete: () => Le,
|
|
3706
3725
|
VBtn: () => Re,
|
|
3707
3726
|
VCheckbox: () => ze,
|
|
@@ -3726,24 +3745,24 @@ var Xn = {
|
|
|
3726
3745
|
VTextField: () => at,
|
|
3727
3746
|
VTextarea: () => it,
|
|
3728
3747
|
VTimePicker: () => ot
|
|
3729
|
-
}),
|
|
3730
|
-
"df-actions":
|
|
3731
|
-
"df-checkbox":
|
|
3732
|
-
"df-color":
|
|
3733
|
-
"df-date-time":
|
|
3734
|
-
"df-file":
|
|
3735
|
-
"df-image":
|
|
3736
|
-
"df-input":
|
|
3737
|
-
"df-input-hint":
|
|
3738
|
-
"df-label":
|
|
3739
|
-
"df-rtf-editor":
|
|
3740
|
-
"df-select":
|
|
3741
|
-
"df-text-area":
|
|
3742
|
-
},
|
|
3748
|
+
}), ar = {
|
|
3749
|
+
"df-actions": $t,
|
|
3750
|
+
"df-checkbox": en,
|
|
3751
|
+
"df-color": tn,
|
|
3752
|
+
"df-date-time": nn,
|
|
3753
|
+
"df-file": sn,
|
|
3754
|
+
"df-image": pn,
|
|
3755
|
+
"df-input": mn,
|
|
3756
|
+
"df-input-hint": Y,
|
|
3757
|
+
"df-label": X,
|
|
3758
|
+
"df-rtf-editor": Xn,
|
|
3759
|
+
"df-select": tr,
|
|
3760
|
+
"df-text-area": nr
|
|
3761
|
+
}, or = /* @__PURE__ */ ct({}), sr = { install: (e, t) => {
|
|
3743
3762
|
var n, r;
|
|
3744
|
-
e.provide(jt, t == null ? {} : t), (n = t == null ? void 0 : t.registerComponents) != null && n && Object.entries(
|
|
3763
|
+
e.provide(jt, t == null ? {} : t), (n = t == null ? void 0 : t.registerComponents) != null && n && Object.entries(rr).map(([t, n]) => e.component(t, n)), (r = t == null ? void 0 : t.registerVuetifyComponents) != null && r && Object.entries(ir).map(([t, n]) => e.component(t, n));
|
|
3745
3764
|
} };
|
|
3746
3765
|
//#endregion
|
|
3747
|
-
export {
|
|
3766
|
+
export { Jt as Action, kt as DateTimeLocaleConfig, $t as DfActions, en as DfCheckbox, tn as DfColor, nn as DfDateTime, sn as DfFile, pn as DfImage, mn as DfInput, or as DfInputComponentProps, rr as DfInputComponents, Y as DfInputHint, X as DfLabel, Xn as DfRtfEditor, tr as DfSelect, nr as DfTextArea, sr as DynamicFormsInputs, At as FileGoneError, It as InputBase, Pt as Label, Kt as ResponsiveActionRenderOptions, Ut as ResponsiveRenderOptions, ir as VuetifyComponents, zt as actionDisplayStyles, Z as defaultBaseProps, Bt as defaultDisplayStyle, ar as dfInputComponentsByTag, Wt as getBreakpointName, qt as getRenderOptionsForBreakpoint, Vt as isActionDisplayStyle, Ht as responsiveBreakpoints, Mt as selectShownErrors, Xt as setFileGoneError, Lt as translatableStrings, Rt as translateStrings, Gt as useBreakpoint, Yt as useFileTouchKeepAlive, Q as useInputBase, Nt as useShownErrors, jt as vuetifyInputsSettingsKey };
|
|
3748
3767
|
|
|
3749
3768
|
//# sourceMappingURL=dynamicforms-vuetify-inputs.js.map
|