@dynamicforms/vuetify-inputs 0.9.2 → 0.10.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 +2544 -1416
- 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 +81 -26
- package/package.json +22 -5
- package/readme.md +3 -4
|
@@ -1,255 +1,80 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
for (var
|
|
7
|
-
|
|
8
|
-
if (
|
|
9
|
-
for (var
|
|
10
|
-
|
|
11
|
-
return
|
|
12
|
-
},
|
|
13
|
-
var
|
|
14
|
-
var
|
|
15
|
-
var
|
|
1
|
+
var St = Object.defineProperty, Mt = Object.defineProperties;
|
|
2
|
+
var Rt = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var Ze = Object.getOwnPropertySymbols;
|
|
4
|
+
var Pt = Object.prototype.hasOwnProperty, Nt = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var He = (t, l, e) => l in t ? St(t, l, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[l] = e, H = (t, l) => {
|
|
6
|
+
for (var e in l || (l = {}))
|
|
7
|
+
Pt.call(l, e) && He(t, e, l[e]);
|
|
8
|
+
if (Ze)
|
|
9
|
+
for (var e of Ze(l))
|
|
10
|
+
Nt.call(l, e) && He(t, e, l[e]);
|
|
11
|
+
return t;
|
|
12
|
+
}, te = (t, l) => Mt(t, Rt(l));
|
|
13
|
+
var Ve = (t, l, e) => He(t, typeof l != "symbol" ? l + "" : l, e);
|
|
14
|
+
var ge = (t, l, e) => new Promise((a, r) => {
|
|
15
|
+
var c = (C) => {
|
|
16
16
|
try {
|
|
17
|
-
|
|
18
|
-
} catch (
|
|
19
|
-
|
|
17
|
+
g(e.next(C));
|
|
18
|
+
} catch (f) {
|
|
19
|
+
r(f);
|
|
20
20
|
}
|
|
21
|
-
},
|
|
21
|
+
}, d = (C) => {
|
|
22
22
|
try {
|
|
23
|
-
|
|
24
|
-
} catch (
|
|
25
|
-
|
|
23
|
+
g(e.throw(C));
|
|
24
|
+
} catch (f) {
|
|
25
|
+
r(f);
|
|
26
26
|
}
|
|
27
|
-
},
|
|
28
|
-
|
|
27
|
+
}, g = (C) => C.done ? a(C.value) : Promise.resolve(C.value).then(c, d);
|
|
28
|
+
g((e = e.apply(t, l)).next());
|
|
29
29
|
});
|
|
30
|
-
import
|
|
31
|
-
import
|
|
32
|
-
import {
|
|
33
|
-
import
|
|
34
|
-
import {
|
|
35
|
-
import Zt from "vue-markdown-render";
|
|
30
|
+
import { ref as M, isRef as Ce, defineComponent as le, computed as A, openBlock as j, createBlock as O, unref as n, resolveComponent as N, createElementBlock as Z, normalizeClass as ue, Fragment as Se, resolveDynamicComponent as Ue, createCommentVNode as G, createTextVNode as Q, toDisplayString as X, inject as Oe, shallowRef as Ut, toRaw as et, nextTick as Ke, createSlots as Xe, withCtx as s, createVNode as i, renderSlot as _e, normalizeProps as ye, guardReactiveProps as ke, createElementVNode as ae, renderList as Ye, mergeProps as Y, withModifiers as xe, mergeDefaults as pe, normalizeStyle as rt, toRefs as Ee, watch as re, withKeys as De, onBeforeUnmount as Ge, useId as zt, useCssVars as Et } from "vue";
|
|
31
|
+
import Ae, { MessagesWidget as Ft, MdString as Ht, ValidationErrorRenderContent as Ot, Action as Wt, DisplayMode as We } from "@dynamicforms/vue-forms";
|
|
32
|
+
import { CachedIcon as L } from "vue-cached-icon";
|
|
33
|
+
import qt from "vue-markdown-render";
|
|
34
|
+
import { isString as he, isEmpty as Me, isPlainObject as st, isObjectLike as Kt, isBoolean as Re, clone as Xt, toNumber as tt, isNaN as lt, isArray as nt, castArray as ut, first as ct, isEqual as Yt, unionBy as Gt } from "lodash-es";
|
|
36
35
|
import { useDisplay as Jt } from "vuetify";
|
|
37
|
-
import { parse as
|
|
38
|
-
import
|
|
39
|
-
import
|
|
40
|
-
import {
|
|
41
|
-
import
|
|
42
|
-
import
|
|
43
|
-
import
|
|
44
|
-
import
|
|
45
|
-
import {
|
|
46
|
-
import
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
return e ? ["nightly", "alpha", "internal", "nightly-", "staging"].some((t) => e.includes(t)) : !1;
|
|
78
|
-
}
|
|
79
|
-
function po(e) {
|
|
80
|
-
return We(e) || He(e);
|
|
81
|
-
}
|
|
82
|
-
function ho(e, t) {
|
|
83
|
-
const n = e.extraPlugins || [];
|
|
84
|
-
return W(x({}, e), {
|
|
85
|
-
extraPlugins: [
|
|
86
|
-
...n,
|
|
87
|
-
...t.filter((l) => !n.includes(l))
|
|
88
|
-
]
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
function bo(e) {
|
|
92
|
-
if (He(e))
|
|
93
|
-
return 3;
|
|
94
|
-
const { major: t } = ct(e);
|
|
95
|
-
switch (!0) {
|
|
96
|
-
case t >= 44:
|
|
97
|
-
return 3;
|
|
98
|
-
case t >= 38:
|
|
99
|
-
return 2;
|
|
100
|
-
default:
|
|
101
|
-
return 1;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
function dt() {
|
|
105
|
-
const { CKEDITOR_VERSION: e, CKEDITOR: t } = window;
|
|
106
|
-
return po(e) ? {
|
|
107
|
-
source: t ? "cdn" : "npm",
|
|
108
|
-
version: e
|
|
109
|
-
} : null;
|
|
110
|
-
}
|
|
111
|
-
function go() {
|
|
112
|
-
const e = dt();
|
|
113
|
-
return e ? bo(e.version) : null;
|
|
114
|
-
}
|
|
115
|
-
function mt(e, t) {
|
|
116
|
-
switch (t || (t = go() || void 0), t) {
|
|
117
|
-
case 1:
|
|
118
|
-
case 2:
|
|
119
|
-
return e === void 0;
|
|
120
|
-
case 3:
|
|
121
|
-
return e === "GPL";
|
|
122
|
-
default:
|
|
123
|
-
return !1;
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
function yo(e, t) {
|
|
127
|
-
return function(l) {
|
|
128
|
-
mt(l.config.get("licenseKey")) || l.on("collectUsageData", (a, { setUsageData: r }) => {
|
|
129
|
-
r(`integration.${e}`, t);
|
|
130
|
-
});
|
|
131
|
-
};
|
|
132
|
-
}
|
|
133
|
-
const wo = yo(
|
|
134
|
-
"vue",
|
|
135
|
-
{
|
|
136
|
-
version: "7.4.0",
|
|
137
|
-
frameworkVersion: Rt
|
|
138
|
-
}
|
|
139
|
-
);
|
|
140
|
-
function ko(e) {
|
|
141
|
-
return mt(e.licenseKey) ? e : ho(e, [
|
|
142
|
-
/**
|
|
143
|
-
* This part of the code is not executed in open-source implementations using a GPL key.
|
|
144
|
-
* It only runs when a specific license key is provided. If you are uncertain whether
|
|
145
|
-
* this applies to your installation, please contact our support team.
|
|
146
|
-
*/
|
|
147
|
-
wo
|
|
148
|
-
]);
|
|
149
|
-
}
|
|
150
|
-
function Co(e, t) {
|
|
151
|
-
var n;
|
|
152
|
-
if (ft()) {
|
|
153
|
-
const l = W(x({}, e), {
|
|
154
|
-
roots: W(x({}, e.roots), {
|
|
155
|
-
main: W(x(x({}, e.root), (n = e.roots) == null ? void 0 : n.main), {
|
|
156
|
-
initialData: t
|
|
157
|
-
})
|
|
158
|
-
})
|
|
159
|
-
});
|
|
160
|
-
return delete l.root, delete l.initialData, l;
|
|
161
|
-
}
|
|
162
|
-
return W(x({}, e), {
|
|
163
|
-
initialData: t
|
|
164
|
-
});
|
|
165
|
-
}
|
|
166
|
-
function Vo(e) {
|
|
167
|
-
var t, n;
|
|
168
|
-
return ft() ? (n = (t = e.roots) == null ? void 0 : t.main) == null ? void 0 : n.initialData : e.initialData;
|
|
169
|
-
}
|
|
170
|
-
function ft() {
|
|
171
|
-
const e = dt();
|
|
172
|
-
return e ? !We(e.version) || He(e.version) || ct(e.version).major >= 48 : !1;
|
|
173
|
-
}
|
|
174
|
-
const Re = "Lock from Vue integration (@ckeditor/ckeditor5-vue)", jo = 300, To = /* @__PURE__ */ K({
|
|
175
|
-
name: "CKEditor",
|
|
176
|
-
__name: "ckeditor",
|
|
177
|
-
props: /* @__PURE__ */ Ye({
|
|
178
|
-
editor: {},
|
|
179
|
-
config: { default: () => ({}) },
|
|
180
|
-
tagName: { default: "div" },
|
|
181
|
-
disabled: { type: Boolean, default: !1 },
|
|
182
|
-
disableTwoWayDataBinding: { type: Boolean, default: !1 }
|
|
183
|
-
}, {
|
|
184
|
-
modelValue: { type: String, default: "" },
|
|
185
|
-
modelModifiers: {}
|
|
186
|
-
}),
|
|
187
|
-
emits: /* @__PURE__ */ Ye(["ready", "destroy", "blur", "focus", "input", "update:modelValue"], ["update:modelValue"]),
|
|
188
|
-
setup(e, { expose: t, emit: n }) {
|
|
189
|
-
const l = $t(e, "modelValue"), a = e, r = n, u = R(), c = R(), p = R();
|
|
190
|
-
t({
|
|
191
|
-
instance: c,
|
|
192
|
-
lastEditorData: p
|
|
193
|
-
}), de(l, (s) => {
|
|
194
|
-
c.value && s !== p.value && c.value.data.set(s);
|
|
195
|
-
}), de(() => a.disabled, (s) => {
|
|
196
|
-
s ? c.value.enableReadOnlyMode(Re) : c.value.disableReadOnlyMode(Re);
|
|
197
|
-
});
|
|
198
|
-
function i() {
|
|
199
|
-
const s = window.CKEDITOR_VERSION;
|
|
200
|
-
if (!s)
|
|
201
|
-
return console.warn('Cannot find the "CKEDITOR_VERSION" in the "window" scope.');
|
|
202
|
-
const [C] = s.split(".").map(Number);
|
|
203
|
-
C >= 42 || s.startsWith("0.0.0") || console.warn("The <CKEditor> component requires using CKEditor 5 in version 42+ or nightly build.");
|
|
204
|
-
}
|
|
205
|
-
function f(s) {
|
|
206
|
-
const C = Wt((_) => {
|
|
207
|
-
if (a.disableTwoWayDataBinding)
|
|
208
|
-
return;
|
|
209
|
-
const h = p.value = s.data.get();
|
|
210
|
-
r("update:modelValue", h, _, s), r("input", h, _, s);
|
|
211
|
-
}, jo, { leading: !0 });
|
|
212
|
-
s.model.document.on("change:data", C), s.editing.view.document.on("focus", (_) => {
|
|
213
|
-
r("focus", _, s);
|
|
214
|
-
}), s.editing.view.document.on("blur", (_) => {
|
|
215
|
-
r("blur", _, s);
|
|
216
|
-
});
|
|
217
|
-
}
|
|
218
|
-
return i(), lt(() => {
|
|
219
|
-
let s = ko(
|
|
220
|
-
Object.assign({}, a.config)
|
|
221
|
-
);
|
|
222
|
-
l.value && (s = Co(s, l.value)), a.editor.create(u.value, s).then((C) => {
|
|
223
|
-
c.value = Mt(C), f(C), l.value !== Vo(s) && C.data.set(l.value), a.disabled && C.enableReadOnlyMode(Re), r("ready", C);
|
|
224
|
-
}).catch((C) => {
|
|
225
|
-
console.error(C);
|
|
226
|
-
});
|
|
227
|
-
}), at(() => {
|
|
228
|
-
c.value && (c.value.destroy(), c.value = void 0), r("destroy");
|
|
229
|
-
}), (s, C) => (V(), F(je(e.tagName), {
|
|
230
|
-
ref_key: "element",
|
|
231
|
-
ref: u
|
|
232
|
-
}, null, 512));
|
|
233
|
-
}
|
|
234
|
-
});
|
|
235
|
-
if (!Ge.version || !Ge.version.startsWith("3."))
|
|
236
|
-
throw new Error(
|
|
237
|
-
"The CKEditor plugin works only with Vue 3+. For more information, please refer to https://ckeditor.com/docs/ckeditor5/latest/builds/guides/integration/frameworks/vuejs-v3.html"
|
|
238
|
-
);
|
|
239
|
-
const xo = {
|
|
240
|
-
/**
|
|
241
|
-
* Installs the plugin, registering the `<ckeditor>` component.
|
|
242
|
-
*
|
|
243
|
-
* @param app The application instance.
|
|
244
|
-
*/
|
|
245
|
-
install(e) {
|
|
246
|
-
e.component("Ckeditor", To);
|
|
247
|
-
}
|
|
248
|
-
};
|
|
249
|
-
function _o(e) {
|
|
250
|
-
return e.one !== void 0;
|
|
36
|
+
import { parse as Qt, format as je } from "date-fns";
|
|
37
|
+
import Zt from "@tiptap/extension-image";
|
|
38
|
+
import el from "@tiptap/extension-placeholder";
|
|
39
|
+
import { Table as tl } from "@tiptap/extension-table";
|
|
40
|
+
import ll from "@tiptap/extension-table-cell";
|
|
41
|
+
import nl from "@tiptap/extension-table-header";
|
|
42
|
+
import al from "@tiptap/extension-table-row";
|
|
43
|
+
import ol from "@tiptap/extension-text-align";
|
|
44
|
+
import { NodeSelection as il } from "@tiptap/pm/state";
|
|
45
|
+
import rl from "@tiptap/starter-kit";
|
|
46
|
+
import { useEditor as sl, EditorContent as ul } from "@tiptap/vue-3";
|
|
47
|
+
import { BubbleMenu as cl } from "@tiptap/vue-3/menus";
|
|
48
|
+
import { Extension as dl, Mark as ml, mergeAttributes as dt, Node as vl } from "@tiptap/core";
|
|
49
|
+
import { Slice as fl, Fragment as pl } from "@tiptap/pm/model";
|
|
50
|
+
import bl from "@tiptap/extension-link";
|
|
51
|
+
import { VAutocomplete as hl } from "vuetify/components/VAutocomplete";
|
|
52
|
+
import { VBtn as gl } from "vuetify/components/VBtn";
|
|
53
|
+
import { VCheckbox as yl } from "vuetify/components/VCheckbox";
|
|
54
|
+
import { VChip as kl } from "vuetify/components/VChip";
|
|
55
|
+
import { VCombobox as wl } from "vuetify/components/VCombobox";
|
|
56
|
+
import { VColorPicker as Cl } from "vuetify/components/VColorPicker";
|
|
57
|
+
import { VConfirmEdit as Al } from "vuetify/components/VConfirmEdit";
|
|
58
|
+
import { VDatePicker as xl } from "vuetify/components/VDatePicker";
|
|
59
|
+
import { VField as _l } from "vuetify/components/VField";
|
|
60
|
+
import { VFileInput as Tl } from "vuetify/components/VFileInput";
|
|
61
|
+
import { VCol as Vl, VRow as jl } from "vuetify/components/VGrid";
|
|
62
|
+
import { VIcon as Bl } from "vuetify/components/VIcon";
|
|
63
|
+
import { VImg as Ll } from "vuetify/components/VImg";
|
|
64
|
+
import { VInput as $l } from "vuetify/components/VInput";
|
|
65
|
+
import { VListItem as Il } from "vuetify/components/VList";
|
|
66
|
+
import { VMenu as Dl } from "vuetify/components/VMenu";
|
|
67
|
+
import { VNumberInput as Sl } from "vuetify/components/VNumberInput";
|
|
68
|
+
import { VProgressLinear as Ml } from "vuetify/components/VProgressLinear";
|
|
69
|
+
import { VSelect as Rl } from "vuetify/components/VSelect";
|
|
70
|
+
import { VSwitch as Pl } from "vuetify/components/VSwitch";
|
|
71
|
+
import { VTextarea as Nl } from "vuetify/components/VTextarea";
|
|
72
|
+
import { VTextField as Ul } from "vuetify/components/VTextField";
|
|
73
|
+
import { VTimePicker as zl } from "vuetify/components/VTimePicker";
|
|
74
|
+
function El(t) {
|
|
75
|
+
return t.one !== void 0;
|
|
251
76
|
}
|
|
252
|
-
const
|
|
77
|
+
const Fl = {
|
|
253
78
|
lessThanXSeconds: {
|
|
254
79
|
present: {
|
|
255
80
|
one: "manj kot {{count}} sekunda",
|
|
@@ -526,8 +351,8 @@ const Bo = {
|
|
|
526
351
|
}
|
|
527
352
|
}
|
|
528
353
|
};
|
|
529
|
-
function
|
|
530
|
-
switch (
|
|
354
|
+
function Hl(t) {
|
|
355
|
+
switch (t % 100) {
|
|
531
356
|
case 1:
|
|
532
357
|
return "one";
|
|
533
358
|
case 2:
|
|
@@ -539,55 +364,55 @@ function Do(e) {
|
|
|
539
364
|
return "other";
|
|
540
365
|
}
|
|
541
366
|
}
|
|
542
|
-
const
|
|
543
|
-
let
|
|
544
|
-
|
|
545
|
-
const
|
|
546
|
-
if (typeof
|
|
547
|
-
|
|
367
|
+
const Ol = (t, l, e) => {
|
|
368
|
+
let a = "", r = "present";
|
|
369
|
+
e != null && e.addSuffix && (e.comparison && e.comparison > 0 ? (r = "future", a = "čez ") : (r = "past", a = "pred "));
|
|
370
|
+
const c = Fl[t];
|
|
371
|
+
if (typeof c == "string")
|
|
372
|
+
a += c;
|
|
548
373
|
else {
|
|
549
|
-
const
|
|
550
|
-
|
|
374
|
+
const d = Hl(l);
|
|
375
|
+
El(c) ? a += c[d].replace("{{count}}", String(l)) : a += c[r][d].replace("{{count}}", String(l));
|
|
551
376
|
}
|
|
552
|
-
return
|
|
377
|
+
return a;
|
|
553
378
|
};
|
|
554
|
-
function
|
|
555
|
-
return (
|
|
556
|
-
const
|
|
557
|
-
return
|
|
379
|
+
function qe(t) {
|
|
380
|
+
return (l = {}) => {
|
|
381
|
+
const e = l.width ? String(l.width) : t.defaultWidth;
|
|
382
|
+
return t.formats[e] || t.formats[t.defaultWidth];
|
|
558
383
|
};
|
|
559
384
|
}
|
|
560
|
-
const
|
|
385
|
+
const Wl = {
|
|
561
386
|
full: "EEEE, dd. MMMM y",
|
|
562
387
|
long: "dd. MMMM y",
|
|
563
388
|
medium: "d. MMM y",
|
|
564
389
|
short: "d. MM. yy"
|
|
565
|
-
},
|
|
390
|
+
}, ql = {
|
|
566
391
|
full: "HH:mm:ss zzzz",
|
|
567
392
|
long: "HH:mm:ss z",
|
|
568
393
|
medium: "HH:mm:ss",
|
|
569
394
|
short: "HH:mm"
|
|
570
|
-
},
|
|
395
|
+
}, Kl = {
|
|
571
396
|
full: "{{date}} {{time}}",
|
|
572
397
|
long: "{{date}} {{time}}",
|
|
573
398
|
medium: "{{date}} {{time}}",
|
|
574
399
|
short: "{{date}} {{time}}"
|
|
575
|
-
},
|
|
576
|
-
date:
|
|
577
|
-
formats:
|
|
400
|
+
}, Xl = {
|
|
401
|
+
date: qe({
|
|
402
|
+
formats: Wl,
|
|
578
403
|
defaultWidth: "full"
|
|
579
404
|
}),
|
|
580
|
-
time:
|
|
581
|
-
formats:
|
|
405
|
+
time: qe({
|
|
406
|
+
formats: ql,
|
|
582
407
|
defaultWidth: "full"
|
|
583
408
|
}),
|
|
584
|
-
dateTime:
|
|
585
|
-
formats:
|
|
409
|
+
dateTime: qe({
|
|
410
|
+
formats: Kl,
|
|
586
411
|
defaultWidth: "full"
|
|
587
412
|
})
|
|
588
|
-
},
|
|
589
|
-
lastWeek: (
|
|
590
|
-
switch (
|
|
413
|
+
}, Yl = {
|
|
414
|
+
lastWeek: (t) => {
|
|
415
|
+
switch (t.getDay()) {
|
|
591
416
|
case 0:
|
|
592
417
|
return "'prejšnjo nedeljo ob' p";
|
|
593
418
|
case 3:
|
|
@@ -601,8 +426,8 @@ const So = {
|
|
|
601
426
|
yesterday: "'včeraj ob' p",
|
|
602
427
|
today: "'danes ob' p",
|
|
603
428
|
tomorrow: "'jutri ob' p",
|
|
604
|
-
nextWeek: (
|
|
605
|
-
switch (
|
|
429
|
+
nextWeek: (t) => {
|
|
430
|
+
switch (t.getDay()) {
|
|
606
431
|
case 0:
|
|
607
432
|
return "'naslednjo nedeljo ob' p";
|
|
608
433
|
case 3:
|
|
@@ -614,34 +439,34 @@ const So = {
|
|
|
614
439
|
}
|
|
615
440
|
},
|
|
616
441
|
other: "P"
|
|
617
|
-
},
|
|
618
|
-
const
|
|
619
|
-
return typeof
|
|
442
|
+
}, Gl = (t, l, e, a) => {
|
|
443
|
+
const r = Yl[t];
|
|
444
|
+
return typeof r == "function" ? r(l) : r;
|
|
620
445
|
};
|
|
621
|
-
function
|
|
622
|
-
return (
|
|
623
|
-
const
|
|
624
|
-
let
|
|
625
|
-
if (
|
|
626
|
-
const
|
|
627
|
-
|
|
446
|
+
function Be(t) {
|
|
447
|
+
return (l, e) => {
|
|
448
|
+
const a = e != null && e.context ? String(e.context) : "standalone";
|
|
449
|
+
let r;
|
|
450
|
+
if (a === "formatting" && t.formattingValues) {
|
|
451
|
+
const d = t.defaultFormattingWidth || t.defaultWidth, g = e != null && e.width ? String(e.width) : d;
|
|
452
|
+
r = t.formattingValues[g] || t.formattingValues[d];
|
|
628
453
|
} else {
|
|
629
|
-
const
|
|
630
|
-
|
|
454
|
+
const d = t.defaultWidth, g = e != null && e.width ? String(e.width) : t.defaultWidth;
|
|
455
|
+
r = t.values[g] || t.values[d];
|
|
631
456
|
}
|
|
632
|
-
const
|
|
633
|
-
return
|
|
457
|
+
const c = t.argumentCallback ? t.argumentCallback(l) : l;
|
|
458
|
+
return r[c];
|
|
634
459
|
};
|
|
635
460
|
}
|
|
636
|
-
const
|
|
461
|
+
const Jl = {
|
|
637
462
|
narrow: ["pr. n. št.", "po n. št."],
|
|
638
463
|
abbreviated: ["pr. n. št.", "po n. št."],
|
|
639
464
|
wide: ["pred našim štetjem", "po našem štetju"]
|
|
640
|
-
},
|
|
465
|
+
}, Ql = {
|
|
641
466
|
narrow: ["1", "2", "3", "4"],
|
|
642
467
|
abbreviated: ["1. čet.", "2. čet.", "3. čet.", "4. čet."],
|
|
643
468
|
wide: ["1. četrtletje", "2. četrtletje", "3. četrtletje", "4. četrtletje"]
|
|
644
|
-
},
|
|
469
|
+
}, Zl = {
|
|
645
470
|
narrow: ["j", "f", "m", "a", "m", "j", "j", "a", "s", "o", "n", "d"],
|
|
646
471
|
abbreviated: [
|
|
647
472
|
"jan.",
|
|
@@ -671,7 +496,7 @@ const Ro = {
|
|
|
671
496
|
"november",
|
|
672
497
|
"december"
|
|
673
498
|
]
|
|
674
|
-
},
|
|
499
|
+
}, en = {
|
|
675
500
|
narrow: ["n", "p", "t", "s", "č", "p", "s"],
|
|
676
501
|
short: ["ned.", "pon.", "tor.", "sre.", "čet.", "pet.", "sob."],
|
|
677
502
|
abbreviated: ["ned.", "pon.", "tor.", "sre.", "čet.", "pet.", "sob."],
|
|
@@ -684,7 +509,7 @@ const Ro = {
|
|
|
684
509
|
"petek",
|
|
685
510
|
"sobota"
|
|
686
511
|
]
|
|
687
|
-
},
|
|
512
|
+
}, tn = {
|
|
688
513
|
narrow: {
|
|
689
514
|
am: "d",
|
|
690
515
|
pm: "p",
|
|
@@ -715,7 +540,7 @@ const Ro = {
|
|
|
715
540
|
evening: "večer",
|
|
716
541
|
night: "noč"
|
|
717
542
|
}
|
|
718
|
-
},
|
|
543
|
+
}, ln = {
|
|
719
544
|
narrow: {
|
|
720
545
|
am: "d",
|
|
721
546
|
pm: "p",
|
|
@@ -746,88 +571,88 @@ const Ro = {
|
|
|
746
571
|
evening: "zvečer",
|
|
747
572
|
night: "ponoči"
|
|
748
573
|
}
|
|
749
|
-
},
|
|
750
|
-
ordinalNumber:
|
|
751
|
-
era:
|
|
752
|
-
values:
|
|
574
|
+
}, nn = (t, l) => Number(t) + ".", an = {
|
|
575
|
+
ordinalNumber: nn,
|
|
576
|
+
era: Be({
|
|
577
|
+
values: Jl,
|
|
753
578
|
defaultWidth: "wide"
|
|
754
579
|
}),
|
|
755
|
-
quarter:
|
|
756
|
-
values:
|
|
580
|
+
quarter: Be({
|
|
581
|
+
values: Ql,
|
|
757
582
|
defaultWidth: "wide",
|
|
758
|
-
argumentCallback: (
|
|
583
|
+
argumentCallback: (t) => t - 1
|
|
759
584
|
}),
|
|
760
|
-
month:
|
|
761
|
-
values:
|
|
585
|
+
month: Be({
|
|
586
|
+
values: Zl,
|
|
762
587
|
defaultWidth: "wide"
|
|
763
588
|
}),
|
|
764
|
-
day:
|
|
765
|
-
values:
|
|
589
|
+
day: Be({
|
|
590
|
+
values: en,
|
|
766
591
|
defaultWidth: "wide"
|
|
767
592
|
}),
|
|
768
|
-
dayPeriod:
|
|
769
|
-
values:
|
|
593
|
+
dayPeriod: Be({
|
|
594
|
+
values: tn,
|
|
770
595
|
defaultWidth: "wide",
|
|
771
|
-
formattingValues:
|
|
596
|
+
formattingValues: ln,
|
|
772
597
|
defaultFormattingWidth: "wide"
|
|
773
598
|
})
|
|
774
599
|
};
|
|
775
|
-
function
|
|
776
|
-
return (
|
|
777
|
-
const
|
|
778
|
-
if (!
|
|
600
|
+
function Le(t) {
|
|
601
|
+
return (l, e = {}) => {
|
|
602
|
+
const a = e.width, r = a && t.matchPatterns[a] || t.matchPatterns[t.defaultMatchWidth], c = l.match(r);
|
|
603
|
+
if (!c)
|
|
779
604
|
return null;
|
|
780
|
-
const
|
|
605
|
+
const d = c[0], g = a && t.parsePatterns[a] || t.parsePatterns[t.defaultParseWidth], C = Array.isArray(g) ? rn(g, (h) => h.test(d)) : (
|
|
781
606
|
// [TODO] -- I challenge you to fix the type
|
|
782
|
-
|
|
607
|
+
on(g, (h) => h.test(d))
|
|
783
608
|
);
|
|
784
|
-
let
|
|
785
|
-
|
|
609
|
+
let f;
|
|
610
|
+
f = t.valueCallback ? t.valueCallback(C) : C, f = e.valueCallback ? (
|
|
786
611
|
// [TODO] -- I challenge you to fix the type
|
|
787
|
-
|
|
788
|
-
) :
|
|
789
|
-
const
|
|
790
|
-
return { value:
|
|
612
|
+
e.valueCallback(f)
|
|
613
|
+
) : f;
|
|
614
|
+
const v = l.slice(d.length);
|
|
615
|
+
return { value: f, rest: v };
|
|
791
616
|
};
|
|
792
617
|
}
|
|
793
|
-
function
|
|
794
|
-
for (const
|
|
795
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
796
|
-
return
|
|
618
|
+
function on(t, l) {
|
|
619
|
+
for (const e in t)
|
|
620
|
+
if (Object.prototype.hasOwnProperty.call(t, e) && l(t[e]))
|
|
621
|
+
return e;
|
|
797
622
|
}
|
|
798
|
-
function
|
|
799
|
-
for (let
|
|
800
|
-
if (t
|
|
801
|
-
return
|
|
623
|
+
function rn(t, l) {
|
|
624
|
+
for (let e = 0; e < t.length; e++)
|
|
625
|
+
if (l(t[e]))
|
|
626
|
+
return e;
|
|
802
627
|
}
|
|
803
|
-
function
|
|
804
|
-
return (
|
|
805
|
-
const
|
|
806
|
-
if (!
|
|
807
|
-
const
|
|
808
|
-
if (!
|
|
809
|
-
let
|
|
810
|
-
|
|
811
|
-
const
|
|
812
|
-
return { value:
|
|
628
|
+
function sn(t) {
|
|
629
|
+
return (l, e = {}) => {
|
|
630
|
+
const a = l.match(t.matchPattern);
|
|
631
|
+
if (!a) return null;
|
|
632
|
+
const r = a[0], c = l.match(t.parsePattern);
|
|
633
|
+
if (!c) return null;
|
|
634
|
+
let d = t.valueCallback ? t.valueCallback(c[0]) : c[0];
|
|
635
|
+
d = e.valueCallback ? e.valueCallback(d) : d;
|
|
636
|
+
const g = l.slice(r.length);
|
|
637
|
+
return { value: d, rest: g };
|
|
813
638
|
};
|
|
814
639
|
}
|
|
815
|
-
const
|
|
640
|
+
const un = /^(\d+)\./i, cn = /\d+/i, dn = {
|
|
816
641
|
abbreviated: /^(pr\. n\. št\.|po n\. št\.)/i,
|
|
817
642
|
wide: /^(pred Kristusom|pred na[sš]im [sš]tetjem|po Kristusu|po na[sš]em [sš]tetju|na[sš]ega [sš]tetja)/i
|
|
818
|
-
},
|
|
643
|
+
}, mn = {
|
|
819
644
|
any: [/^pr/i, /^(po|na[sš]em)/i]
|
|
820
|
-
},
|
|
645
|
+
}, vn = {
|
|
821
646
|
narrow: /^[1234]/i,
|
|
822
647
|
abbreviated: /^[1234]\.\s?[čc]et\.?/i,
|
|
823
648
|
wide: /^[1234]\. [čc]etrtletje/i
|
|
824
|
-
},
|
|
649
|
+
}, fn = {
|
|
825
650
|
any: [/1/i, /2/i, /3/i, /4/i]
|
|
826
|
-
},
|
|
651
|
+
}, pn = {
|
|
827
652
|
narrow: /^[jfmasond]/i,
|
|
828
653
|
abbreviated: /^(jan\.|feb\.|mar\.|apr\.|maj|jun\.|jul\.|avg\.|sep\.|okt\.|nov\.|dec\.)/i,
|
|
829
654
|
wide: /^(januar|februar|marec|april|maj|junij|julij|avgust|september|oktober|november|december)/i
|
|
830
|
-
},
|
|
655
|
+
}, bn = {
|
|
831
656
|
narrow: [
|
|
832
657
|
/^j/i,
|
|
833
658
|
/^f/i,
|
|
@@ -870,18 +695,18 @@ const qo = /^(\d+)\./i, Go = /\d+/i, Yo = {
|
|
|
870
695
|
/^n/i,
|
|
871
696
|
/^d/i
|
|
872
697
|
]
|
|
873
|
-
},
|
|
698
|
+
}, hn = {
|
|
874
699
|
narrow: /^[nptsčc]/i,
|
|
875
700
|
short: /^(ned\.|pon\.|tor\.|sre\.|[cč]et\.|pet\.|sob\.)/i,
|
|
876
701
|
abbreviated: /^(ned\.|pon\.|tor\.|sre\.|[cč]et\.|pet\.|sob\.)/i,
|
|
877
702
|
wide: /^(nedelja|ponedeljek|torek|sreda|[cč]etrtek|petek|sobota)/i
|
|
878
|
-
},
|
|
703
|
+
}, gn = {
|
|
879
704
|
narrow: [/^n/i, /^p/i, /^t/i, /^s/i, /^[cč]/i, /^p/i, /^s/i],
|
|
880
705
|
any: [/^n/i, /^po/i, /^t/i, /^sr/i, /^[cč]/i, /^pe/i, /^so/i]
|
|
881
|
-
},
|
|
706
|
+
}, yn = {
|
|
882
707
|
narrow: /^(d|po?|z?v|n|z?j|24\.00|12\.00)/i,
|
|
883
708
|
any: /^(dop\.|pop\.|o?poln(\.|o[cč]i?)|o?pold(\.|ne)|z?ve[cč](\.|er)|(po)?no[cč]i?|popold(ne|an)|jut(\.|ro)|zjut(\.|raj))/i
|
|
884
|
-
},
|
|
709
|
+
}, kn = {
|
|
885
710
|
narrow: {
|
|
886
711
|
am: /^d/i,
|
|
887
712
|
pm: /^p/i,
|
|
@@ -902,60 +727,60 @@ const qo = /^(\d+)\./i, Go = /\d+/i, Yo = {
|
|
|
902
727
|
evening: /^z?ve/i,
|
|
903
728
|
night: /(po)?no/i
|
|
904
729
|
}
|
|
905
|
-
},
|
|
906
|
-
ordinalNumber:
|
|
907
|
-
matchPattern:
|
|
908
|
-
parsePattern:
|
|
909
|
-
valueCallback: (
|
|
730
|
+
}, wn = {
|
|
731
|
+
ordinalNumber: sn({
|
|
732
|
+
matchPattern: un,
|
|
733
|
+
parsePattern: cn,
|
|
734
|
+
valueCallback: (t) => parseInt(t, 10)
|
|
910
735
|
}),
|
|
911
|
-
era:
|
|
912
|
-
matchPatterns:
|
|
736
|
+
era: Le({
|
|
737
|
+
matchPatterns: dn,
|
|
913
738
|
defaultMatchWidth: "wide",
|
|
914
|
-
parsePatterns:
|
|
739
|
+
parsePatterns: mn,
|
|
915
740
|
defaultParseWidth: "any"
|
|
916
741
|
}),
|
|
917
|
-
quarter:
|
|
918
|
-
matchPatterns:
|
|
742
|
+
quarter: Le({
|
|
743
|
+
matchPatterns: vn,
|
|
919
744
|
defaultMatchWidth: "wide",
|
|
920
|
-
parsePatterns:
|
|
745
|
+
parsePatterns: fn,
|
|
921
746
|
defaultParseWidth: "any",
|
|
922
|
-
valueCallback: (
|
|
747
|
+
valueCallback: (t) => t + 1
|
|
923
748
|
}),
|
|
924
|
-
month:
|
|
925
|
-
matchPatterns:
|
|
749
|
+
month: Le({
|
|
750
|
+
matchPatterns: pn,
|
|
926
751
|
defaultMatchWidth: "wide",
|
|
927
|
-
parsePatterns:
|
|
752
|
+
parsePatterns: bn,
|
|
928
753
|
defaultParseWidth: "wide"
|
|
929
754
|
}),
|
|
930
|
-
day:
|
|
931
|
-
matchPatterns:
|
|
755
|
+
day: Le({
|
|
756
|
+
matchPatterns: hn,
|
|
932
757
|
defaultMatchWidth: "wide",
|
|
933
|
-
parsePatterns:
|
|
758
|
+
parsePatterns: gn,
|
|
934
759
|
defaultParseWidth: "any"
|
|
935
760
|
}),
|
|
936
|
-
dayPeriod:
|
|
937
|
-
matchPatterns:
|
|
761
|
+
dayPeriod: Le({
|
|
762
|
+
matchPatterns: yn,
|
|
938
763
|
defaultMatchWidth: "any",
|
|
939
|
-
parsePatterns:
|
|
764
|
+
parsePatterns: kn,
|
|
940
765
|
defaultParseWidth: "any"
|
|
941
766
|
})
|
|
942
|
-
},
|
|
767
|
+
}, Cn = {
|
|
943
768
|
code: "sl",
|
|
944
|
-
formatDistance:
|
|
945
|
-
formatLong:
|
|
946
|
-
formatRelative:
|
|
947
|
-
localize:
|
|
948
|
-
match:
|
|
769
|
+
formatDistance: Ol,
|
|
770
|
+
formatLong: Xl,
|
|
771
|
+
formatRelative: Gl,
|
|
772
|
+
localize: an,
|
|
773
|
+
match: wn,
|
|
949
774
|
options: {
|
|
950
775
|
weekStartsOn: 1,
|
|
951
776
|
firstWeekContainsDate: 1
|
|
952
777
|
}
|
|
953
|
-
},
|
|
954
|
-
dateTimeLocale:
|
|
955
|
-
setDateTimeLocale(
|
|
956
|
-
|
|
778
|
+
}, An = {
|
|
779
|
+
dateTimeLocale: M(Cn),
|
|
780
|
+
setDateTimeLocale(t) {
|
|
781
|
+
Ce(t) ? this.dateTimeLocale = t : this.dateTimeLocale.value = t;
|
|
957
782
|
}
|
|
958
|
-
},
|
|
783
|
+
}, ve = /* @__PURE__ */ le({
|
|
959
784
|
__name: "df-input-hint",
|
|
960
785
|
props: {
|
|
961
786
|
errors: { default: "" },
|
|
@@ -963,161 +788,161 @@ const qo = /^(\d+)\./i, Go = /\d+/i, Yo = {
|
|
|
963
788
|
errorClasses: { default: "text-error" },
|
|
964
789
|
messageClasses: { default: "" }
|
|
965
790
|
},
|
|
966
|
-
setup(
|
|
967
|
-
const
|
|
968
|
-
return (
|
|
969
|
-
message:
|
|
970
|
-
classes:
|
|
791
|
+
setup(t) {
|
|
792
|
+
const l = t, e = A(() => l.errors ? typeof l.errors == "string" ? l.errors.trim().length > 0 : l.errors.length > 0 : !1), a = A(() => e.value ? l.errors : l.message), r = A(() => e.value ? l.errorClasses : l.messageClasses);
|
|
793
|
+
return (c, d) => (j(), O(n(Ft), {
|
|
794
|
+
message: a.value,
|
|
795
|
+
classes: r.value
|
|
971
796
|
}, null, 8, ["message", "classes"]));
|
|
972
797
|
}
|
|
973
|
-
}),
|
|
798
|
+
}), fe = /* @__PURE__ */ le({
|
|
974
799
|
__name: "df-label",
|
|
975
800
|
props: {
|
|
976
801
|
data: {},
|
|
977
802
|
label: {},
|
|
978
803
|
allowWrap: { type: Boolean }
|
|
979
804
|
},
|
|
980
|
-
setup(
|
|
981
|
-
const
|
|
982
|
-
return (
|
|
983
|
-
const
|
|
984
|
-
return
|
|
985
|
-
class:
|
|
805
|
+
setup(t) {
|
|
806
|
+
const l = t, e = A(() => l.data ? l.data.label : l.label.text);
|
|
807
|
+
return (a, r) => {
|
|
808
|
+
const c = N("v-img");
|
|
809
|
+
return j(), Z("div", {
|
|
810
|
+
class: ue(["df-label", { "allow-wrap": t.allowWrap }])
|
|
986
811
|
}, [
|
|
987
|
-
|
|
988
|
-
|
|
812
|
+
t.label.icon ? (j(), Z(Se, { key: 0 }, [
|
|
813
|
+
t.label.iconComponent === "v-icon" ? (j(), O(n(L), {
|
|
989
814
|
key: 0,
|
|
990
|
-
name:
|
|
815
|
+
name: t.label.icon,
|
|
991
816
|
size: "1.25em"
|
|
992
|
-
}, null, 8, ["name"])) :
|
|
817
|
+
}, null, 8, ["name"])) : t.label.iconComponent === "v-img" ? (j(), O(c, {
|
|
993
818
|
key: 1,
|
|
994
819
|
class: "icon",
|
|
995
|
-
src:
|
|
996
|
-
}, null, 8, ["src"])) : (
|
|
820
|
+
src: t.label.icon
|
|
821
|
+
}, null, 8, ["src"])) : (j(), O(Ue(t.label.iconComponent), {
|
|
997
822
|
key: 2,
|
|
998
|
-
src:
|
|
823
|
+
src: t.label.icon
|
|
999
824
|
}, null, 8, ["src"]))
|
|
1000
|
-
], 64)) :
|
|
1001
|
-
|
|
825
|
+
], 64)) : G("", !0),
|
|
826
|
+
e.value instanceof n(Ht) ? (j(), O(n(qt), {
|
|
1002
827
|
key: 1,
|
|
1003
828
|
class: "markdown",
|
|
1004
|
-
source:
|
|
1005
|
-
options:
|
|
1006
|
-
plugins:
|
|
1007
|
-
}, null, 8, ["source", "options", "plugins"])) : (
|
|
1008
|
-
|
|
829
|
+
source: e.value.toString(),
|
|
830
|
+
options: e.value.options,
|
|
831
|
+
plugins: e.value.plugins
|
|
832
|
+
}, null, 8, ["source", "options", "plugins"])) : (j(), Z(Se, { key: 2 }, [
|
|
833
|
+
Q(X(e.value), 1)
|
|
1009
834
|
], 64))
|
|
1010
835
|
], 2);
|
|
1011
836
|
};
|
|
1012
837
|
}
|
|
1013
|
-
}),
|
|
1014
|
-
class
|
|
1015
|
-
constructor(
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
this.text =
|
|
838
|
+
}), mt = /* @__PURE__ */ Symbol("vuetifyInputsSettingsKey");
|
|
839
|
+
class xn {
|
|
840
|
+
constructor(l, e, a = "v-icon") {
|
|
841
|
+
Ve(this, "text");
|
|
842
|
+
Ve(this, "icon");
|
|
843
|
+
Ve(this, "iconComponent");
|
|
844
|
+
this.text = l, this.icon = e, this.iconComponent = a;
|
|
1020
845
|
}
|
|
1021
846
|
}
|
|
1022
|
-
const
|
|
1023
|
-
function
|
|
1024
|
-
const
|
|
847
|
+
const be = { enabled: void 0, clearable: !0 };
|
|
848
|
+
function ce(t, l) {
|
|
849
|
+
const e = Oe(mt, {}), a = Oe("field-density", null), r = Oe("field-variant", null), c = M(null), d = Ut(null), g = A({
|
|
1025
850
|
get() {
|
|
1026
|
-
return
|
|
851
|
+
return d.value ? d.value.value : t.control ? t.control.value : t.modelValue === void 0 ? c.value : t.modelValue;
|
|
1027
852
|
},
|
|
1028
|
-
set(
|
|
853
|
+
set(m) {
|
|
1029
854
|
try {
|
|
1030
|
-
|
|
855
|
+
t.control && (t.control.value = m);
|
|
1031
856
|
} finally {
|
|
1032
|
-
|
|
1033
|
-
|
|
857
|
+
t.control && !Object.is(et(t.control.value), et(m)) && (d.value = { value: m }, Ke(() => {
|
|
858
|
+
d.value = null;
|
|
1034
859
|
}));
|
|
1035
860
|
}
|
|
1036
|
-
|
|
861
|
+
t.modelValue === void 0 && (c.value = m), l("update:modelValue", t.control ? t.control.value : m);
|
|
1037
862
|
}
|
|
1038
863
|
});
|
|
1039
|
-
if (
|
|
864
|
+
if (t.control && !(t.control instanceof Ae.FieldBase))
|
|
1040
865
|
throw new Error("control prop is not a vue-form control instance");
|
|
1041
|
-
const
|
|
866
|
+
const C = A({
|
|
1042
867
|
get() {
|
|
1043
|
-
return
|
|
868
|
+
return t.control.touched;
|
|
1044
869
|
},
|
|
1045
|
-
set(
|
|
1046
|
-
|
|
1047
|
-
}
|
|
1048
|
-
}),
|
|
1049
|
-
() =>
|
|
1050
|
-
),
|
|
1051
|
-
"d-none":
|
|
1052
|
-
invisible:
|
|
1053
|
-
})),
|
|
1054
|
-
var
|
|
1055
|
-
return (
|
|
1056
|
-
}),
|
|
1057
|
-
var
|
|
1058
|
-
const
|
|
1059
|
-
return
|
|
1060
|
-
}),
|
|
1061
|
-
var
|
|
1062
|
-
return (
|
|
1063
|
-
}),
|
|
1064
|
-
var
|
|
1065
|
-
return (
|
|
1066
|
-
}),
|
|
1067
|
-
var
|
|
1068
|
-
return (
|
|
1069
|
-
}),
|
|
1070
|
-
var
|
|
1071
|
-
return (
|
|
1072
|
-
}),
|
|
870
|
+
set(m) {
|
|
871
|
+
t.control.touched = m;
|
|
872
|
+
}
|
|
873
|
+
}), f = t.control ? C : M(!1), v = A(() => t.control ? t.control.valid : !0), h = A(
|
|
874
|
+
() => t.control ? t.control.errors : (t.errors || []).map((m) => new Ot(m))
|
|
875
|
+
), B = A(() => f.value && h.value.length > 0 ? " " : void 0), V = A(() => f.value ? h.value : void 0), w = A(() => t.control ? t.control.effectiveEnabled : t.enabled !== !1), T = A(() => t.control ? t.control.visibility : t.visibility == null ? Ae.DisplayMode.FULL : Ae.DisplayMode.fromAny(t.visibility)), D = A(() => T.value !== Ae.DisplayMode.SUPPRESS), R = A(() => ({
|
|
876
|
+
"d-none": T.value === Ae.DisplayMode.HIDDEN,
|
|
877
|
+
invisible: T.value === Ae.DisplayMode.INVISIBLE
|
|
878
|
+
})), p = A(() => {
|
|
879
|
+
var m, _;
|
|
880
|
+
return (_ = (m = t.control) == null ? void 0 : m.extra) != null ? _ : {};
|
|
881
|
+
}), S = A(() => {
|
|
882
|
+
var _;
|
|
883
|
+
const m = (_ = t.label) != null ? _ : p.value.label;
|
|
884
|
+
return he(m || "") ? new xn(m || "") : m;
|
|
885
|
+
}), W = A(() => {
|
|
886
|
+
var m, _;
|
|
887
|
+
return (_ = (m = t.placeholder) != null ? m : p.value.placeholder) != null ? _ : "";
|
|
888
|
+
}), P = A(() => {
|
|
889
|
+
var m, _;
|
|
890
|
+
return (_ = (m = t.helpText) != null ? m : p.value.helpText) != null ? _ : "";
|
|
891
|
+
}), K = A(() => {
|
|
892
|
+
var m, _;
|
|
893
|
+
return (_ = (m = t.hint) != null ? m : p.value.hint) != null ? _ : "";
|
|
894
|
+
}), I = A(() => {
|
|
895
|
+
var m, _;
|
|
896
|
+
return (_ = (m = t.cssClass) != null ? m : p.value.cssClass) != null ? _ : "";
|
|
897
|
+
}), k = A(
|
|
1073
898
|
() => {
|
|
1074
|
-
var
|
|
1075
|
-
return (
|
|
899
|
+
var m, _, U, q;
|
|
900
|
+
return (q = (U = (_ = (m = t.density) != null ? m : p.value.density) != null ? _ : a) != null ? U : e.defaultDensity) != null ? q : "default";
|
|
1076
901
|
}
|
|
1077
|
-
),
|
|
902
|
+
), o = A(() => k.value === "inline" ? "default" : k.value), u = A(
|
|
1078
903
|
() => {
|
|
1079
|
-
var
|
|
1080
|
-
return (
|
|
904
|
+
var m, _, U, q;
|
|
905
|
+
return (q = (U = (_ = (m = t.variant) != null ? m : p.value.variant) != null ? _ : r) != null ? U : e.defaultVariant) != null ? q : "underlined";
|
|
1081
906
|
}
|
|
1082
907
|
);
|
|
1083
908
|
return {
|
|
1084
|
-
value:
|
|
1085
|
-
valid:
|
|
1086
|
-
enabled:
|
|
1087
|
-
errors:
|
|
1088
|
-
showErrors:
|
|
1089
|
-
visibility:
|
|
909
|
+
value: g,
|
|
910
|
+
valid: v,
|
|
911
|
+
enabled: w,
|
|
912
|
+
errors: h,
|
|
913
|
+
showErrors: V,
|
|
914
|
+
visibility: T,
|
|
1090
915
|
isRendered: D,
|
|
1091
|
-
visibilityClass:
|
|
1092
|
-
label:
|
|
1093
|
-
touched:
|
|
1094
|
-
density:
|
|
1095
|
-
densityClass:
|
|
1096
|
-
vuetifyBindings:
|
|
1097
|
-
var
|
|
1098
|
-
return
|
|
1099
|
-
name: (
|
|
1100
|
-
class:
|
|
1101
|
-
density:
|
|
1102
|
-
variant:
|
|
1103
|
-
label:
|
|
1104
|
-
errorMessages:
|
|
916
|
+
visibilityClass: R,
|
|
917
|
+
label: S,
|
|
918
|
+
touched: f,
|
|
919
|
+
density: k,
|
|
920
|
+
densityClass: A(() => `df-density-${k.value}`),
|
|
921
|
+
vuetifyBindings: A(() => {
|
|
922
|
+
var m;
|
|
923
|
+
return H({
|
|
924
|
+
name: (m = t.control) == null ? void 0 : m.fieldName,
|
|
925
|
+
class: I.value,
|
|
926
|
+
density: o.value,
|
|
927
|
+
variant: u.value,
|
|
928
|
+
label: S.value.text,
|
|
929
|
+
errorMessages: B.value,
|
|
1105
930
|
// 'error-count': errors?.value.length || 0,
|
|
1106
|
-
readonly: !
|
|
1107
|
-
disabled: !
|
|
1108
|
-
placeholder:
|
|
1109
|
-
"persistent-placeholder": !
|
|
1110
|
-
hint:
|
|
931
|
+
readonly: !w.value,
|
|
932
|
+
disabled: !w.value,
|
|
933
|
+
placeholder: W.value,
|
|
934
|
+
"persistent-placeholder": !Me(W.value),
|
|
935
|
+
hint: K.value,
|
|
1111
936
|
persistentHint: !0,
|
|
1112
937
|
// we want persistent hint always
|
|
1113
938
|
hideDetails: "auto",
|
|
1114
939
|
// we want to hide the hint element when hint isn't there
|
|
1115
|
-
helpText:
|
|
1116
|
-
},
|
|
940
|
+
helpText: P.value
|
|
941
|
+
}, t.passthroughAttrs || {});
|
|
1117
942
|
})
|
|
1118
943
|
};
|
|
1119
944
|
}
|
|
1120
|
-
const
|
|
945
|
+
const _n = { class: "d-flex w-100 df-style-resetting df-sub-field" }, Fe = /* @__PURE__ */ le({
|
|
1121
946
|
__name: "input-base",
|
|
1122
947
|
props: {
|
|
1123
948
|
control: {},
|
|
@@ -1137,63 +962,63 @@ const cl = { class: "d-flex w-100 df-style-resetting df-sub-field" }, ze = /* @_
|
|
|
1137
962
|
loading: { type: Boolean }
|
|
1138
963
|
},
|
|
1139
964
|
emits: ["update:modelValue", "click:clear", "blur"],
|
|
1140
|
-
setup(
|
|
1141
|
-
const
|
|
1142
|
-
function
|
|
1143
|
-
|
|
1144
|
-
}
|
|
1145
|
-
return (
|
|
1146
|
-
const D = N("v-field"),
|
|
1147
|
-
return
|
|
965
|
+
setup(t, { emit: l }) {
|
|
966
|
+
const e = t, a = l, { isRendered: r, label: c, showErrors: d, touched: g, value: C, visibilityClass: f, vuetifyBindings: v } = ce(e, a), h = A(() => !!(n(e.clearable) && n(C))), B = M(!1);
|
|
967
|
+
function V(w) {
|
|
968
|
+
B.value = w, w || (g.value = !0, a("blur"));
|
|
969
|
+
}
|
|
970
|
+
return (w, T) => {
|
|
971
|
+
const D = N("v-field"), R = N("v-input");
|
|
972
|
+
return n(r) ? (j(), O(R, {
|
|
1148
973
|
key: 0,
|
|
1149
|
-
name:
|
|
1150
|
-
density:
|
|
1151
|
-
hint:
|
|
1152
|
-
"persistent-hint":
|
|
1153
|
-
"hide-details":
|
|
1154
|
-
"error-messages":
|
|
1155
|
-
class:
|
|
1156
|
-
},
|
|
1157
|
-
message:
|
|
1158
|
-
|
|
1159
|
-
message:
|
|
1160
|
-
errors:
|
|
974
|
+
name: n(v).name,
|
|
975
|
+
density: n(v).density,
|
|
976
|
+
hint: n(v).hint,
|
|
977
|
+
"persistent-hint": n(v).persistentHint,
|
|
978
|
+
"hide-details": n(v).hideDetails,
|
|
979
|
+
"error-messages": n(v).errorMessages,
|
|
980
|
+
class: ue([t.cssClass, n(f)])
|
|
981
|
+
}, Xe({
|
|
982
|
+
message: s(({ message: p }) => [
|
|
983
|
+
i(ve, {
|
|
984
|
+
message: p,
|
|
985
|
+
errors: n(d)
|
|
1161
986
|
}, null, 8, ["message", "errors"])
|
|
1162
987
|
]),
|
|
1163
|
-
default:
|
|
1164
|
-
|
|
1165
|
-
variant:
|
|
1166
|
-
density:
|
|
1167
|
-
label:
|
|
1168
|
-
disabled:
|
|
1169
|
-
clearable:
|
|
988
|
+
default: s(() => [
|
|
989
|
+
i(D, {
|
|
990
|
+
variant: n(v).variant,
|
|
991
|
+
density: n(v).density,
|
|
992
|
+
label: n(v).label,
|
|
993
|
+
disabled: n(v).disabled,
|
|
994
|
+
clearable: h.value,
|
|
1170
995
|
"persistent-clear": !0,
|
|
1171
|
-
dirty: !!
|
|
1172
|
-
active:
|
|
1173
|
-
loading:
|
|
1174
|
-
"onClick:clear":
|
|
1175
|
-
"onUpdate:focused":
|
|
1176
|
-
},
|
|
1177
|
-
label:
|
|
1178
|
-
|
|
1179
|
-
data:
|
|
1180
|
-
label:
|
|
996
|
+
dirty: !!n(C) || !!n(v).placeholder,
|
|
997
|
+
active: B.value,
|
|
998
|
+
loading: t.loading,
|
|
999
|
+
"onClick:clear": T[0] || (T[0] = (p) => a("click:clear")),
|
|
1000
|
+
"onUpdate:focused": T[1] || (T[1] = (p) => V(p))
|
|
1001
|
+
}, Xe({
|
|
1002
|
+
label: s((p) => [
|
|
1003
|
+
i(fe, {
|
|
1004
|
+
data: p,
|
|
1005
|
+
label: n(c)
|
|
1181
1006
|
}, null, 8, ["data", "label"])
|
|
1182
1007
|
]),
|
|
1183
|
-
default:
|
|
1184
|
-
|
|
1185
|
-
|
|
1008
|
+
default: s((p) => [
|
|
1009
|
+
ae("div", _n, [
|
|
1010
|
+
_e(w.$slots, "default", ye(ke(p)))
|
|
1186
1011
|
])
|
|
1187
1012
|
]),
|
|
1188
|
-
loader:
|
|
1189
|
-
|
|
1013
|
+
loader: s((p) => [
|
|
1014
|
+
_e(w.$slots, "loader", ye(ke(p)))
|
|
1190
1015
|
]),
|
|
1191
1016
|
_: 2
|
|
1192
1017
|
}, [
|
|
1193
|
-
|
|
1018
|
+
w.$slots["prepend-inner"] ? {
|
|
1194
1019
|
name: "prepend-inner",
|
|
1195
|
-
fn:
|
|
1196
|
-
|
|
1020
|
+
fn: s((p) => [
|
|
1021
|
+
_e(w.$slots, "prepend-inner", ye(ke(p)))
|
|
1197
1022
|
]),
|
|
1198
1023
|
key: "0"
|
|
1199
1024
|
} : void 0
|
|
@@ -1201,17 +1026,17 @@ const cl = { class: "d-flex w-100 df-style-resetting df-sub-field" }, ze = /* @_
|
|
|
1201
1026
|
]),
|
|
1202
1027
|
_: 2
|
|
1203
1028
|
}, [
|
|
1204
|
-
|
|
1029
|
+
w.$slots.prepend ? {
|
|
1205
1030
|
name: "prepend",
|
|
1206
|
-
fn:
|
|
1207
|
-
|
|
1031
|
+
fn: s((p) => [
|
|
1032
|
+
_e(w.$slots, "prepend", ye(ke(p)))
|
|
1208
1033
|
]),
|
|
1209
1034
|
key: "0"
|
|
1210
1035
|
} : void 0
|
|
1211
|
-
]), 1032, ["name", "density", "hint", "persistent-hint", "hide-details", "error-messages", "class"])) :
|
|
1036
|
+
]), 1032, ["name", "density", "hint", "persistent-hint", "hide-details", "error-messages", "class"])) : G("", !0);
|
|
1212
1037
|
};
|
|
1213
1038
|
}
|
|
1214
|
-
}),
|
|
1039
|
+
}), we = {
|
|
1215
1040
|
Yes: "Yes",
|
|
1216
1041
|
No: "No",
|
|
1217
1042
|
Close: "Close",
|
|
@@ -1231,95 +1056,127 @@ const cl = { class: "d-flex w-100 df-style-resetting df-sub-field" }, ze = /* @_
|
|
|
1231
1056
|
Marker: "Marker",
|
|
1232
1057
|
Spoiler: "Spoiler",
|
|
1233
1058
|
CodeDark: "Code (dark)",
|
|
1234
|
-
CodeBright: "Code (bright)"
|
|
1059
|
+
CodeBright: "Code (bright)",
|
|
1060
|
+
Undo: "Undo",
|
|
1061
|
+
Redo: "Redo",
|
|
1062
|
+
SelectAll: "Select all",
|
|
1063
|
+
Bold: "Bold",
|
|
1064
|
+
Italic: "Italic",
|
|
1065
|
+
HorizontalLine: "Horizontal line",
|
|
1066
|
+
Blockquote: "Block quote",
|
|
1067
|
+
BulletedList: "Bulleted list",
|
|
1068
|
+
NumberedList: "Numbered list",
|
|
1069
|
+
Outdent: "Decrease indent",
|
|
1070
|
+
Indent: "Increase indent",
|
|
1071
|
+
AlignLeft: "Align left",
|
|
1072
|
+
AlignCenter: "Align center",
|
|
1073
|
+
AlignRight: "Align right",
|
|
1074
|
+
AlignJustify: "Justify",
|
|
1075
|
+
Link: "Link",
|
|
1076
|
+
LinkUrl: "URL",
|
|
1077
|
+
LinkApply: "Apply",
|
|
1078
|
+
LinkRemove: "Remove link",
|
|
1079
|
+
Image: "Image",
|
|
1080
|
+
ImageUrl: "Image URL",
|
|
1081
|
+
ImageUpload: "Upload image",
|
|
1082
|
+
ImageInsert: "Insert",
|
|
1083
|
+
ImageDropHint: "Drop image here or click to browse",
|
|
1084
|
+
ImageReplace: "Replace image",
|
|
1085
|
+
Table: "Table",
|
|
1086
|
+
TableInsert: "Insert table",
|
|
1087
|
+
TableAddRowAbove: "Add row above",
|
|
1088
|
+
TableAddRowBelow: "Add row below",
|
|
1089
|
+
TableDeleteRow: "Delete row",
|
|
1090
|
+
TableAddColumnBefore: "Add column before",
|
|
1091
|
+
TableAddColumnAfter: "Add column after",
|
|
1092
|
+
TableDeleteColumn: "Delete column",
|
|
1093
|
+
TableToggleHeaderRow: "Toggle header row",
|
|
1094
|
+
TableDeleteTable: "Delete table",
|
|
1095
|
+
Style: "Style",
|
|
1096
|
+
MediaEmbed: "Insert media",
|
|
1097
|
+
MediaEmbedUrl: "Video URL",
|
|
1098
|
+
MediaEmbedInsert: "Insert"
|
|
1235
1099
|
};
|
|
1236
|
-
function
|
|
1237
|
-
Object.keys(
|
|
1238
|
-
const
|
|
1239
|
-
|
|
1100
|
+
function no(t) {
|
|
1101
|
+
Object.keys(we).forEach((l) => {
|
|
1102
|
+
const e = t(l);
|
|
1103
|
+
e != null && (we[l] = e);
|
|
1240
1104
|
});
|
|
1241
1105
|
}
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
translations: void 0
|
|
1248
|
-
};
|
|
1249
|
-
var J = /* @__PURE__ */ ((e) => (e[e.BUTTON = 0] = "BUTTON", e[e.TEXT = 1] = "TEXT", e))(J || {});
|
|
1250
|
-
const nt = 0;
|
|
1251
|
-
((e) => {
|
|
1252
|
-
function t(a) {
|
|
1253
|
-
return a.toUpperCase() === "BUTTON" ? 0 : a.toUpperCase() === "TEXT" ? 1 : nt;
|
|
1106
|
+
var se = /* @__PURE__ */ ((t) => (t[t.BUTTON = 0] = "BUTTON", t[t.TEXT = 1] = "TEXT", t))(se || {});
|
|
1107
|
+
const at = 0;
|
|
1108
|
+
((t) => {
|
|
1109
|
+
function l(r) {
|
|
1110
|
+
return r.toUpperCase() === "BUTTON" ? 0 : r.toUpperCase() === "TEXT" ? 1 : at;
|
|
1254
1111
|
}
|
|
1255
|
-
|
|
1256
|
-
function
|
|
1257
|
-
const
|
|
1258
|
-
return Object.values(
|
|
1112
|
+
t.fromString = l;
|
|
1113
|
+
function e(r) {
|
|
1114
|
+
const c = typeof r == "number" ? r : t.fromString(r);
|
|
1115
|
+
return Object.values(t).includes(c) ? c : at;
|
|
1259
1116
|
}
|
|
1260
|
-
|
|
1261
|
-
function
|
|
1262
|
-
const
|
|
1263
|
-
return Object.values(
|
|
1117
|
+
t.fromAny = e;
|
|
1118
|
+
function a(r) {
|
|
1119
|
+
const c = typeof r == "number" ? r : t.fromString(r);
|
|
1120
|
+
return Object.values(t).includes(c);
|
|
1264
1121
|
}
|
|
1265
|
-
|
|
1266
|
-
})(
|
|
1267
|
-
Object.freeze(
|
|
1122
|
+
t.isDefined = a;
|
|
1123
|
+
})(se || (se = {}));
|
|
1124
|
+
Object.freeze(se);
|
|
1268
1125
|
const ot = ["xs", "sm", "md", "lg", "xl"];
|
|
1269
|
-
class
|
|
1270
|
-
constructor(
|
|
1271
|
-
|
|
1272
|
-
this._value = this.cleanBreakpoint(
|
|
1273
|
-
const
|
|
1274
|
-
|
|
1126
|
+
class Tn {
|
|
1127
|
+
constructor(l) {
|
|
1128
|
+
Ve(this, "_value");
|
|
1129
|
+
this._value = this.cleanBreakpoint(l, !0), l && ot.forEach((e) => {
|
|
1130
|
+
const a = this.cleanBreakpoint(l[e]);
|
|
1131
|
+
a && (this._value[e] = a);
|
|
1275
1132
|
});
|
|
1276
1133
|
}
|
|
1277
|
-
getOptionsForBreakpoint(
|
|
1278
|
-
var
|
|
1279
|
-
const
|
|
1280
|
-
for (const
|
|
1281
|
-
const
|
|
1282
|
-
for (const
|
|
1283
|
-
const
|
|
1284
|
-
|
|
1134
|
+
getOptionsForBreakpoint(l) {
|
|
1135
|
+
var a, r;
|
|
1136
|
+
const e = (a = this.cleanBreakpoint(this._value)) != null ? a : {};
|
|
1137
|
+
for (const c of ot) {
|
|
1138
|
+
const d = (r = this._value[c]) != null ? r : {};
|
|
1139
|
+
for (const g of Object.keys(d)) {
|
|
1140
|
+
const C = d[g];
|
|
1141
|
+
C != null && (st(C) ? e[g] = H(H({}, e[g]), C) : e[g] = C);
|
|
1285
1142
|
}
|
|
1286
|
-
if (
|
|
1143
|
+
if (c === l) break;
|
|
1287
1144
|
}
|
|
1288
|
-
return
|
|
1145
|
+
return e;
|
|
1289
1146
|
}
|
|
1290
1147
|
}
|
|
1291
|
-
function
|
|
1292
|
-
return
|
|
1148
|
+
function Vn(t) {
|
|
1149
|
+
return t.xlAndUp.value ? "xl" : t.lgAndUp.value ? "lg" : t.mdAndUp.value ? "md" : t.smAndUp.value ? "sm" : "xs";
|
|
1293
1150
|
}
|
|
1294
|
-
function
|
|
1295
|
-
const
|
|
1296
|
-
return
|
|
1151
|
+
function jn() {
|
|
1152
|
+
const t = Jt();
|
|
1153
|
+
return A(() => Vn(t));
|
|
1297
1154
|
}
|
|
1298
|
-
class
|
|
1299
|
-
cleanBreakpoint(
|
|
1300
|
-
if ((!
|
|
1301
|
-
const
|
|
1302
|
-
return
|
|
1155
|
+
class Bn extends Tn {
|
|
1156
|
+
cleanBreakpoint(l, e = !1) {
|
|
1157
|
+
if ((!l || !Kt(l)) && !e) return null;
|
|
1158
|
+
const a = {};
|
|
1159
|
+
return e && (a.renderAs = se.BUTTON, a.showLabel = !0, a.showIcon = !0), l && (l.renderAs != null && (a.renderAs = se.fromAny(l.renderAs)), he(l.label) && (a.label = l.label), he(l.icon) && (a.icon = l.icon), Re(l.showLabel) && (a.showLabel = l.showLabel), Re(l.showIcon) && (a.showIcon = l.showIcon), he(l.name) && (a.name = l.name), Re(l.defaultConfirm) && (a.defaultConfirm = l.defaultConfirm), Re(l.defaultReject) && (a.defaultReject = l.defaultReject), st(l.passthroughAttrs) && (a.passthroughAttrs = H({}, l.passthroughAttrs))), Object.keys(a).length ? a : null;
|
|
1303
1160
|
}
|
|
1304
1161
|
}
|
|
1305
|
-
function
|
|
1306
|
-
const
|
|
1162
|
+
function vt(t, l) {
|
|
1163
|
+
const a = new Bn(t).getOptionsForBreakpoint(l);
|
|
1307
1164
|
return {
|
|
1308
|
-
name:
|
|
1309
|
-
label:
|
|
1310
|
-
icon:
|
|
1311
|
-
renderAs:
|
|
1312
|
-
showLabel:
|
|
1313
|
-
showIcon:
|
|
1314
|
-
defaultConfirm:
|
|
1315
|
-
defaultReject:
|
|
1316
|
-
passthroughAttrs:
|
|
1165
|
+
name: a.name,
|
|
1166
|
+
label: a.showLabel ? a.label : void 0,
|
|
1167
|
+
icon: a.showIcon ? a.icon : void 0,
|
|
1168
|
+
renderAs: a.renderAs,
|
|
1169
|
+
showLabel: he(a.label) && !Me(a.label) ? a.showLabel : !1,
|
|
1170
|
+
showIcon: he(a.icon) && !Me(a.icon) ? a.showIcon : !1,
|
|
1171
|
+
defaultConfirm: a.defaultConfirm,
|
|
1172
|
+
defaultReject: a.defaultReject,
|
|
1173
|
+
passthroughAttrs: a.passthroughAttrs
|
|
1317
1174
|
};
|
|
1318
1175
|
}
|
|
1319
|
-
class
|
|
1176
|
+
class Pe extends Wt {
|
|
1320
1177
|
/** @see getRenderOptionsForBreakpoint, which answers the same for the value of any `Action` */
|
|
1321
|
-
getBreakpointValue(
|
|
1322
|
-
return
|
|
1178
|
+
getBreakpointValue(l) {
|
|
1179
|
+
return A(() => vt(this.value, l.value));
|
|
1323
1180
|
}
|
|
1324
1181
|
/** @see ActionRenderOptions.name */
|
|
1325
1182
|
get name() {
|
|
@@ -1334,7 +1191,7 @@ class De extends Qt {
|
|
|
1334
1191
|
}
|
|
1335
1192
|
/** @see ActionRenderOptions.showLabel */
|
|
1336
1193
|
get showLabel() {
|
|
1337
|
-
return
|
|
1194
|
+
return he(this.value.label) && !Me(this.value.label) ? this.value.showLabel : !1;
|
|
1338
1195
|
}
|
|
1339
1196
|
/**
|
|
1340
1197
|
* The icon as this action renders it: the name where {@link ActionRenderOptions.showIcon} states it is shown,
|
|
@@ -1345,7 +1202,7 @@ class De extends Qt {
|
|
|
1345
1202
|
}
|
|
1346
1203
|
/** @see ActionRenderOptions.showIcon */
|
|
1347
1204
|
get showIcon() {
|
|
1348
|
-
return
|
|
1205
|
+
return he(this.value.icon) && !Me(this.value.icon) ? this.value.showIcon : !1;
|
|
1349
1206
|
}
|
|
1350
1207
|
/** @see ActionRenderOptions.renderAs */
|
|
1351
1208
|
get renderAs() {
|
|
@@ -1363,112 +1220,112 @@ class De extends Qt {
|
|
|
1363
1220
|
get passthroughAttrs() {
|
|
1364
1221
|
return this.value.passthroughAttrs;
|
|
1365
1222
|
}
|
|
1366
|
-
static closeAction(
|
|
1367
|
-
var
|
|
1368
|
-
const
|
|
1223
|
+
static closeAction(l) {
|
|
1224
|
+
var a;
|
|
1225
|
+
const e = te(H({}, l != null ? l : {}), {
|
|
1369
1226
|
// any properties in data should overwrite properties in the constant
|
|
1370
1227
|
value: {
|
|
1371
1228
|
name: "close",
|
|
1372
|
-
label:
|
|
1229
|
+
label: we.Close,
|
|
1373
1230
|
icon: "ion-close-outline",
|
|
1374
|
-
renderAs:
|
|
1231
|
+
renderAs: se.BUTTON,
|
|
1375
1232
|
showLabel: !0,
|
|
1376
1233
|
showIcon: !0
|
|
1377
1234
|
}
|
|
1378
1235
|
});
|
|
1379
|
-
return
|
|
1236
|
+
return e.value = H(H({}, e.value), (a = l == null ? void 0 : l.value) != null ? a : {}), new Pe(e);
|
|
1380
1237
|
}
|
|
1381
|
-
static yesAction(
|
|
1382
|
-
var
|
|
1383
|
-
const
|
|
1238
|
+
static yesAction(l) {
|
|
1239
|
+
var a;
|
|
1240
|
+
const e = te(H({}, l != null ? l : {}), {
|
|
1384
1241
|
// any properties in data should overwrite properties in the constant
|
|
1385
1242
|
value: {
|
|
1386
1243
|
name: "yes",
|
|
1387
|
-
label:
|
|
1244
|
+
label: we.Yes,
|
|
1388
1245
|
icon: "ion-thumbs-up-outline",
|
|
1389
|
-
renderAs:
|
|
1246
|
+
renderAs: se.BUTTON,
|
|
1390
1247
|
showLabel: !0,
|
|
1391
1248
|
showIcon: !0
|
|
1392
1249
|
}
|
|
1393
1250
|
});
|
|
1394
|
-
return
|
|
1251
|
+
return e.value = H(H({}, e.value), (a = l == null ? void 0 : l.value) != null ? a : {}), new Pe(e);
|
|
1395
1252
|
}
|
|
1396
|
-
static noAction(
|
|
1397
|
-
var
|
|
1398
|
-
const
|
|
1253
|
+
static noAction(l) {
|
|
1254
|
+
var a;
|
|
1255
|
+
const e = te(H({}, l != null ? l : {}), {
|
|
1399
1256
|
// any properties in data should overwrite properties in the constant
|
|
1400
1257
|
value: {
|
|
1401
1258
|
name: "no",
|
|
1402
|
-
label:
|
|
1259
|
+
label: we.No,
|
|
1403
1260
|
icon: "ion-thumbs-down-outline",
|
|
1404
|
-
renderAs:
|
|
1261
|
+
renderAs: se.BUTTON,
|
|
1405
1262
|
showLabel: !0,
|
|
1406
1263
|
showIcon: !0
|
|
1407
1264
|
}
|
|
1408
1265
|
});
|
|
1409
|
-
return
|
|
1266
|
+
return e.value = H(H({}, e.value), (a = l == null ? void 0 : l.value) != null ? a : {}), new Pe(e);
|
|
1410
1267
|
}
|
|
1411
1268
|
}
|
|
1412
|
-
const
|
|
1269
|
+
const Ln = {
|
|
1413
1270
|
key: 1,
|
|
1414
1271
|
style: { width: "0.5rem" }
|
|
1415
|
-
},
|
|
1272
|
+
}, $n = { key: 2 }, ft = /* @__PURE__ */ le({
|
|
1416
1273
|
__name: "df-actions",
|
|
1417
1274
|
props: {
|
|
1418
1275
|
actions: {},
|
|
1419
1276
|
buttonSize: { default: "default" },
|
|
1420
1277
|
showAsGroup: { default: "no" }
|
|
1421
1278
|
},
|
|
1422
|
-
setup(
|
|
1423
|
-
const
|
|
1424
|
-
() =>
|
|
1425
|
-
action:
|
|
1426
|
-
},
|
|
1279
|
+
setup(t) {
|
|
1280
|
+
const l = t, e = jn(), a = A(() => n(l.actions).filter((d) => d.visibility !== We.SUPPRESS)), r = A(
|
|
1281
|
+
() => a.value.map((d) => H({
|
|
1282
|
+
action: d
|
|
1283
|
+
}, vt(d.value, e.value)))
|
|
1427
1284
|
);
|
|
1428
|
-
function
|
|
1429
|
-
if (
|
|
1430
|
-
if (
|
|
1285
|
+
function c(d) {
|
|
1286
|
+
if (d.defaultConfirm) return "primary";
|
|
1287
|
+
if (d.defaultReject) return "secondary";
|
|
1431
1288
|
}
|
|
1432
|
-
return (
|
|
1433
|
-
const
|
|
1434
|
-
return
|
|
1289
|
+
return (d, g) => {
|
|
1290
|
+
const C = N("v-btn");
|
|
1291
|
+
return a.value.length > 0 ? (j(), Z("div", {
|
|
1435
1292
|
key: 0,
|
|
1436
|
-
class:
|
|
1437
|
-
"button-group":
|
|
1438
|
-
"with-border":
|
|
1293
|
+
class: ue(["text-end df-actions", {
|
|
1294
|
+
"button-group": t.showAsGroup === "grouped" || t.showAsGroup === "grouped-no-borders",
|
|
1295
|
+
"with-border": t.showAsGroup === "grouped"
|
|
1439
1296
|
}])
|
|
1440
1297
|
}, [
|
|
1441
|
-
(
|
|
1442
|
-
key:
|
|
1443
|
-
variant:
|
|
1444
|
-
color:
|
|
1445
|
-
disabled: !
|
|
1446
|
-
loading:
|
|
1298
|
+
(j(!0), Z(Se, null, Ye(r.value, (f, v) => (j(), O(C, Y({
|
|
1299
|
+
key: v,
|
|
1300
|
+
variant: f.renderAs === n(se).BUTTON ? "tonal" : "text",
|
|
1301
|
+
color: c(f),
|
|
1302
|
+
disabled: !f.action.effectiveEnabled || f.action.busy,
|
|
1303
|
+
loading: f.action.busy,
|
|
1447
1304
|
elevation: 0,
|
|
1448
|
-
size:
|
|
1305
|
+
size: t.buttonSize,
|
|
1449
1306
|
class: {
|
|
1450
|
-
"d-none":
|
|
1451
|
-
invisible:
|
|
1307
|
+
"d-none": f.action.visibility === n(We).HIDDEN,
|
|
1308
|
+
invisible: f.action.visibility === n(We).INVISIBLE
|
|
1452
1309
|
}
|
|
1453
|
-
}, { ref_for: !0 },
|
|
1454
|
-
onClick:
|
|
1310
|
+
}, { ref_for: !0 }, f.passthroughAttrs, {
|
|
1311
|
+
onClick: xe((h) => f.action.execute(h), ["stop"])
|
|
1455
1312
|
}), {
|
|
1456
|
-
default:
|
|
1457
|
-
|
|
1313
|
+
default: s(() => [
|
|
1314
|
+
f.icon ? (j(), O(n(L), {
|
|
1458
1315
|
key: 0,
|
|
1459
|
-
name:
|
|
1460
|
-
}, null, 8, ["name"])) :
|
|
1461
|
-
|
|
1462
|
-
|
|
1316
|
+
name: f.icon
|
|
1317
|
+
}, null, 8, ["name"])) : G("", !0),
|
|
1318
|
+
f.icon && f.label ? (j(), Z("span", Ln)) : G("", !0),
|
|
1319
|
+
f.label ? (j(), Z("span", $n, X(f.label), 1)) : G("", !0)
|
|
1463
1320
|
]),
|
|
1464
1321
|
_: 2
|
|
1465
1322
|
}, 1040, ["variant", "color", "disabled", "loading", "size", "class", "onClick"]))), 128))
|
|
1466
|
-
], 2)) :
|
|
1323
|
+
], 2)) : G("", !0);
|
|
1467
1324
|
};
|
|
1468
1325
|
}
|
|
1469
|
-
}),
|
|
1326
|
+
}), pt = /* @__PURE__ */ le({
|
|
1470
1327
|
__name: "df-checkbox",
|
|
1471
|
-
props: /* @__PURE__ */
|
|
1328
|
+
props: /* @__PURE__ */ pe({
|
|
1472
1329
|
allowNull: { type: Boolean },
|
|
1473
1330
|
control: {},
|
|
1474
1331
|
modelValue: {},
|
|
@@ -1484,58 +1341,58 @@ const pl = {
|
|
|
1484
1341
|
passthroughAttrs: {},
|
|
1485
1342
|
density: {},
|
|
1486
1343
|
variant: {}
|
|
1487
|
-
},
|
|
1344
|
+
}, te(H({}, be), { allowNull: !1 })),
|
|
1488
1345
|
emits: ["update:modelValue", "click:clear"],
|
|
1489
|
-
setup(
|
|
1490
|
-
const
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
),
|
|
1346
|
+
setup(t, { emit: l }) {
|
|
1347
|
+
const e = t, a = l, { densityClass: r, isRendered: c, label: d, showErrors: g, touched: C, value: f, visibilityClass: v, vuetifyBindings: h } = ce(
|
|
1348
|
+
e,
|
|
1349
|
+
a
|
|
1350
|
+
), B = A(() => e.allowNull && f.value == null), V = A({
|
|
1494
1351
|
get() {
|
|
1495
|
-
return
|
|
1352
|
+
return f.value;
|
|
1496
1353
|
},
|
|
1497
1354
|
set() {
|
|
1498
1355
|
}
|
|
1499
1356
|
});
|
|
1500
|
-
function
|
|
1501
|
-
const
|
|
1502
|
-
|
|
1357
|
+
function w() {
|
|
1358
|
+
const T = Xt(f.value);
|
|
1359
|
+
T === !0 ? f.value = e.allowNull ? null : !1 : f.value = T === !1;
|
|
1503
1360
|
}
|
|
1504
|
-
return (
|
|
1505
|
-
const
|
|
1506
|
-
return
|
|
1361
|
+
return (T, D) => {
|
|
1362
|
+
const R = N("v-checkbox");
|
|
1363
|
+
return n(c) ? (j(), O(R, Y({
|
|
1507
1364
|
key: 0,
|
|
1508
|
-
modelValue:
|
|
1509
|
-
"onUpdate:modelValue": D[0] || (D[0] = (
|
|
1365
|
+
modelValue: V.value,
|
|
1366
|
+
"onUpdate:modelValue": D[0] || (D[0] = (p) => V.value = p),
|
|
1510
1367
|
density: "compact",
|
|
1511
|
-
class: [
|
|
1512
|
-
indeterminate:
|
|
1368
|
+
class: [n(r), n(v)],
|
|
1369
|
+
indeterminate: B.value,
|
|
1513
1370
|
"false-value": !1,
|
|
1514
1371
|
"true-value": !0
|
|
1515
|
-
},
|
|
1516
|
-
onChange:
|
|
1517
|
-
onBlur: D[1] || (D[1] = (
|
|
1372
|
+
}, n(h), {
|
|
1373
|
+
onChange: w,
|
|
1374
|
+
onBlur: D[1] || (D[1] = (p) => C.value = !0)
|
|
1518
1375
|
}), {
|
|
1519
|
-
label:
|
|
1520
|
-
|
|
1376
|
+
label: s((p) => [
|
|
1377
|
+
i(n(fe), {
|
|
1521
1378
|
"allow-wrap": !0,
|
|
1522
|
-
data:
|
|
1523
|
-
label:
|
|
1379
|
+
data: p,
|
|
1380
|
+
label: n(d)
|
|
1524
1381
|
}, null, 8, ["data", "label"])
|
|
1525
1382
|
]),
|
|
1526
|
-
message:
|
|
1527
|
-
|
|
1528
|
-
message:
|
|
1529
|
-
errors:
|
|
1383
|
+
message: s(({ message: p }) => [
|
|
1384
|
+
i(n(ve), {
|
|
1385
|
+
message: p,
|
|
1386
|
+
errors: n(g)
|
|
1530
1387
|
}, null, 8, ["message", "errors"])
|
|
1531
1388
|
]),
|
|
1532
1389
|
_: 1
|
|
1533
|
-
}, 16, ["modelValue", "class", "indeterminate"])) :
|
|
1390
|
+
}, 16, ["modelValue", "class", "indeterminate"])) : G("", !0);
|
|
1534
1391
|
};
|
|
1535
1392
|
}
|
|
1536
|
-
}),
|
|
1393
|
+
}), bt = /* @__PURE__ */ le({
|
|
1537
1394
|
__name: "df-color",
|
|
1538
|
-
props: /* @__PURE__ */
|
|
1395
|
+
props: /* @__PURE__ */ pe({
|
|
1539
1396
|
allowNull: { type: Boolean },
|
|
1540
1397
|
control: {},
|
|
1541
1398
|
modelValue: {},
|
|
@@ -1551,56 +1408,56 @@ const pl = {
|
|
|
1551
1408
|
passthroughAttrs: {},
|
|
1552
1409
|
density: {},
|
|
1553
1410
|
variant: {}
|
|
1554
|
-
},
|
|
1411
|
+
}, te(H({}, be), { allowNull: !1 })),
|
|
1555
1412
|
emits: ["update:modelValue", "click:clear"],
|
|
1556
|
-
setup(
|
|
1557
|
-
const
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
),
|
|
1561
|
-
(
|
|
1413
|
+
setup(t, { emit: l }) {
|
|
1414
|
+
const e = t, a = l, { densityClass: r, isRendered: c, label: d, showErrors: g, touched: C, value: f, visibilityClass: v, vuetifyBindings: h } = ce(
|
|
1415
|
+
e,
|
|
1416
|
+
a
|
|
1417
|
+
), B = M(!1), V = A(() => [
|
|
1418
|
+
(w) => e.control || !w && e.allowNull || /^#?([a-fA-F0-9]{3}|[a-fA-F0-9]{4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})$/.test(w) ? !0 : "Not a valid hex string."
|
|
1562
1419
|
]);
|
|
1563
|
-
return (
|
|
1564
|
-
const D = N("v-color-picker"),
|
|
1565
|
-
return
|
|
1420
|
+
return (w, T) => {
|
|
1421
|
+
const D = N("v-color-picker"), R = N("v-menu"), p = N("v-text-field");
|
|
1422
|
+
return n(c) ? (j(), O(p, Y({
|
|
1566
1423
|
key: 0,
|
|
1567
|
-
modelValue:
|
|
1568
|
-
"onUpdate:modelValue":
|
|
1569
|
-
class: [
|
|
1570
|
-
clearable:
|
|
1424
|
+
modelValue: n(f),
|
|
1425
|
+
"onUpdate:modelValue": T[2] || (T[2] = (S) => Ce(f) ? f.value = S : null),
|
|
1426
|
+
class: [n(r), n(v)],
|
|
1427
|
+
clearable: t.allowNull,
|
|
1571
1428
|
type: "text",
|
|
1572
|
-
rules:
|
|
1573
|
-
},
|
|
1574
|
-
onBlur:
|
|
1429
|
+
rules: V.value
|
|
1430
|
+
}, n(h), {
|
|
1431
|
+
onBlur: T[3] || (T[3] = (S) => C.value = !0)
|
|
1575
1432
|
}), {
|
|
1576
|
-
label:
|
|
1577
|
-
|
|
1578
|
-
data:
|
|
1579
|
-
label:
|
|
1433
|
+
label: s((S) => [
|
|
1434
|
+
i(n(fe), {
|
|
1435
|
+
data: S,
|
|
1436
|
+
label: n(d)
|
|
1580
1437
|
}, null, 8, ["data", "label"])
|
|
1581
1438
|
]),
|
|
1582
|
-
message:
|
|
1583
|
-
|
|
1584
|
-
message:
|
|
1585
|
-
errors:
|
|
1439
|
+
message: s(({ message: S }) => [
|
|
1440
|
+
i(n(ve), {
|
|
1441
|
+
message: S,
|
|
1442
|
+
errors: n(g)
|
|
1586
1443
|
}, null, 8, ["message", "errors"])
|
|
1587
1444
|
]),
|
|
1588
|
-
"prepend-inner":
|
|
1589
|
-
|
|
1590
|
-
style: rt([{ width: "24px", height: "24px", "border-radius": "4px", border: "1px solid #ccc" }, { backgroundColor:
|
|
1445
|
+
"prepend-inner": s(() => [
|
|
1446
|
+
ae("div", {
|
|
1447
|
+
style: rt([{ width: "24px", height: "24px", "border-radius": "4px", border: "1px solid #ccc" }, { backgroundColor: n(f) }])
|
|
1591
1448
|
}, null, 4)
|
|
1592
1449
|
]),
|
|
1593
|
-
default:
|
|
1594
|
-
|
|
1595
|
-
modelValue:
|
|
1596
|
-
"onUpdate:modelValue":
|
|
1450
|
+
default: s(() => [
|
|
1451
|
+
i(R, {
|
|
1452
|
+
modelValue: B.value,
|
|
1453
|
+
"onUpdate:modelValue": T[1] || (T[1] = (S) => B.value = S),
|
|
1597
1454
|
"close-on-content-click": !1,
|
|
1598
1455
|
activator: "parent"
|
|
1599
1456
|
}, {
|
|
1600
|
-
default:
|
|
1601
|
-
|
|
1602
|
-
modelValue:
|
|
1603
|
-
"onUpdate:modelValue":
|
|
1457
|
+
default: s(() => [
|
|
1458
|
+
i(D, {
|
|
1459
|
+
modelValue: n(f),
|
|
1460
|
+
"onUpdate:modelValue": T[0] || (T[0] = (S) => Ce(f) ? f.value = S : null),
|
|
1604
1461
|
mode: "hexa"
|
|
1605
1462
|
}, null, 8, ["modelValue"])
|
|
1606
1463
|
]),
|
|
@@ -1608,12 +1465,12 @@ const pl = {
|
|
|
1608
1465
|
}, 8, ["modelValue"])
|
|
1609
1466
|
]),
|
|
1610
1467
|
_: 1
|
|
1611
|
-
}, 16, ["modelValue", "class", "clearable", "rules"])) :
|
|
1468
|
+
}, 16, ["modelValue", "class", "clearable", "rules"])) : G("", !0);
|
|
1612
1469
|
};
|
|
1613
1470
|
}
|
|
1614
|
-
}),
|
|
1471
|
+
}), ht = /* @__PURE__ */ le({
|
|
1615
1472
|
__name: "df-datetime",
|
|
1616
|
-
props: /* @__PURE__ */
|
|
1473
|
+
props: /* @__PURE__ */ pe({
|
|
1617
1474
|
inputType: {},
|
|
1618
1475
|
displayFormatDate: {},
|
|
1619
1476
|
displayFormatTime: {},
|
|
@@ -1632,157 +1489,157 @@ const pl = {
|
|
|
1632
1489
|
passthroughAttrs: {},
|
|
1633
1490
|
density: {},
|
|
1634
1491
|
variant: {}
|
|
1635
|
-
},
|
|
1492
|
+
}, te(H({}, be), {
|
|
1636
1493
|
inputType: "datetime",
|
|
1637
1494
|
displayFormatDate: "P",
|
|
1638
1495
|
displayFormatTime: "p"
|
|
1639
1496
|
})),
|
|
1640
1497
|
emits: ["update:modelValue", "click:clear"],
|
|
1641
|
-
setup(
|
|
1642
|
-
const
|
|
1643
|
-
var
|
|
1644
|
-
return (
|
|
1645
|
-
}),
|
|
1646
|
-
var
|
|
1647
|
-
return (
|
|
1648
|
-
}), { density:
|
|
1498
|
+
setup(t, { emit: l }) {
|
|
1499
|
+
const e = t, a = l, r = A(() => {
|
|
1500
|
+
var k;
|
|
1501
|
+
return (k = e.locale) != null ? k : n(An.dateTimeLocale);
|
|
1502
|
+
}), c = A(() => {
|
|
1503
|
+
var k, o;
|
|
1504
|
+
return (o = (k = r.value.options) == null ? void 0 : k.weekStartsOn) != null ? o : 1;
|
|
1505
|
+
}), { density: d, densityClass: g, touched: C, value: f, vuetifyBindings: v } = ce(e, a), { inputType: h, displayFormatDate: B, displayFormatTime: V } = Ee(e), w = M(""), T = A({
|
|
1649
1506
|
get() {
|
|
1650
|
-
return
|
|
1507
|
+
return n(w) === "date";
|
|
1651
1508
|
},
|
|
1652
|
-
set(
|
|
1653
|
-
|
|
1509
|
+
set(k) {
|
|
1510
|
+
w.value = k ? "date" : "";
|
|
1654
1511
|
}
|
|
1655
|
-
}), D =
|
|
1512
|
+
}), D = A({
|
|
1656
1513
|
get() {
|
|
1657
|
-
return
|
|
1514
|
+
return n(w) === "time";
|
|
1658
1515
|
},
|
|
1659
|
-
set(
|
|
1660
|
-
|
|
1516
|
+
set(k) {
|
|
1517
|
+
w.value = k ? "time" : "";
|
|
1661
1518
|
}
|
|
1662
|
-
}),
|
|
1663
|
-
function
|
|
1664
|
-
if (
|
|
1665
|
-
|
|
1666
|
-
else if (
|
|
1667
|
-
if (
|
|
1668
|
-
|
|
1519
|
+
}), R = (k) => `${je(k, "yyyy-MM-dd")}T${je(k, "HH:mm")}:00`, p = M(null);
|
|
1520
|
+
function S(k, o) {
|
|
1521
|
+
if (k == null)
|
|
1522
|
+
p.value = null;
|
|
1523
|
+
else if (o === -1)
|
|
1524
|
+
if (n(h) === "time")
|
|
1525
|
+
p.value = R(/* @__PURE__ */ new Date()), S(`T${k}`, 1);
|
|
1669
1526
|
else {
|
|
1670
|
-
const
|
|
1671
|
-
|
|
1527
|
+
const u = R(new Date(k));
|
|
1528
|
+
S(u, 0), S(u, 1);
|
|
1672
1529
|
}
|
|
1673
1530
|
else {
|
|
1674
|
-
|
|
1675
|
-
const
|
|
1676
|
-
|
|
1531
|
+
p.value == null && (p.value = R(/* @__PURE__ */ new Date()));
|
|
1532
|
+
const u = p.value.split(/[TZ]/g), m = k.split(/[TZ]/g);
|
|
1533
|
+
u[o] = m[o], p.value = R(/* @__PURE__ */ new Date(`${u[0]}T${u[1].split(".")[0]}`)), n(h) === "date" ? f.value = u[0] : n(h) === "time" ? f.value = u[1] : f.value = n(p) + je(/* @__PURE__ */ new Date(), "XXX");
|
|
1677
1534
|
}
|
|
1678
1535
|
}
|
|
1679
|
-
|
|
1680
|
-
const
|
|
1536
|
+
re(f, (k) => S(k, -1), { immediate: !0 });
|
|
1537
|
+
const W = A({
|
|
1681
1538
|
get() {
|
|
1682
|
-
const
|
|
1683
|
-
if (
|
|
1684
|
-
const
|
|
1685
|
-
return Number.isNaN(
|
|
1539
|
+
const k = n(p);
|
|
1540
|
+
if (k == null) return null;
|
|
1541
|
+
const o = new Date(k);
|
|
1542
|
+
return Number.isNaN(o.getTime()) ? null : o;
|
|
1686
1543
|
},
|
|
1687
|
-
set(
|
|
1688
|
-
|
|
1544
|
+
set(k) {
|
|
1545
|
+
S(R(k), 0);
|
|
1689
1546
|
}
|
|
1690
|
-
}),
|
|
1547
|
+
}), P = A({
|
|
1691
1548
|
get() {
|
|
1692
|
-
const
|
|
1693
|
-
return
|
|
1549
|
+
const k = n(p);
|
|
1550
|
+
return k == null ? "" : k.split(/[TZ]/g)[1].split(".")[0];
|
|
1694
1551
|
},
|
|
1695
|
-
set(
|
|
1696
|
-
|
|
1552
|
+
set(k) {
|
|
1553
|
+
S(`T${k}`, 1);
|
|
1697
1554
|
}
|
|
1698
|
-
}),
|
|
1555
|
+
}), K = A({
|
|
1699
1556
|
get() {
|
|
1700
|
-
const
|
|
1701
|
-
return
|
|
1557
|
+
const k = n(W);
|
|
1558
|
+
return k == null ? "" : je(k, n(B), { locale: r.value });
|
|
1702
1559
|
},
|
|
1703
|
-
set(
|
|
1560
|
+
set(k) {
|
|
1704
1561
|
try {
|
|
1705
|
-
const
|
|
1706
|
-
|
|
1707
|
-
} catch (
|
|
1708
|
-
console.error(
|
|
1562
|
+
const o = Qt(k, n(B), /* @__PURE__ */ new Date(), { locale: r.value });
|
|
1563
|
+
S(R(o), 0);
|
|
1564
|
+
} catch (o) {
|
|
1565
|
+
console.error(o);
|
|
1709
1566
|
}
|
|
1710
1567
|
}
|
|
1711
|
-
}),
|
|
1568
|
+
}), I = A({
|
|
1712
1569
|
get() {
|
|
1713
|
-
const
|
|
1714
|
-
return
|
|
1570
|
+
const k = n(W);
|
|
1571
|
+
return k == null ? "" : je(k, n(V), { locale: r.value });
|
|
1715
1572
|
},
|
|
1716
|
-
set(
|
|
1717
|
-
const
|
|
1718
|
-
if (
|
|
1719
|
-
let
|
|
1720
|
-
const
|
|
1721
|
-
|
|
1573
|
+
set(k) {
|
|
1574
|
+
const o = k.match(/(\d+):(\d+)\s?([a-zA-Z]+)?/);
|
|
1575
|
+
if (o == null) return;
|
|
1576
|
+
let u = tt(o[1]);
|
|
1577
|
+
const m = tt(o[2]);
|
|
1578
|
+
lt(u) || lt(m) || (o[3] && o[3].toLowerCase() === "pm" && u < 13 && (u += 12), S(`T${u.toString().padStart(2, "0")}:${m.toString().padStart(2, "0")}:00`, 1));
|
|
1722
1579
|
}
|
|
1723
1580
|
});
|
|
1724
|
-
return (
|
|
1725
|
-
const
|
|
1726
|
-
return
|
|
1727
|
-
class:
|
|
1728
|
-
clearable:
|
|
1729
|
-
"onClick:clear":
|
|
1730
|
-
onBlur:
|
|
1581
|
+
return (k, o) => {
|
|
1582
|
+
const u = N("v-date-picker"), m = N("v-confirm-edit"), _ = N("v-menu"), U = N("v-text-field"), q = N("v-time-picker");
|
|
1583
|
+
return j(), O(n(Fe), Y(e, {
|
|
1584
|
+
class: n(g),
|
|
1585
|
+
clearable: t.clearable,
|
|
1586
|
+
"onClick:clear": o[14] || (o[14] = (E) => f.value = null),
|
|
1587
|
+
onBlur: o[15] || (o[15] = (E) => C.value = !0)
|
|
1731
1588
|
}), {
|
|
1732
|
-
default:
|
|
1733
|
-
|
|
1734
|
-
class:
|
|
1589
|
+
default: s((E) => [
|
|
1590
|
+
ae("div", {
|
|
1591
|
+
class: ue([
|
|
1735
1592
|
"d-flex",
|
|
1736
1593
|
"w-100",
|
|
1737
|
-
["plain", "underlined"].includes(
|
|
1594
|
+
["plain", "underlined"].includes(n(v).variant) ? void 0 : "ml-4",
|
|
1738
1595
|
"df-input-wrapper",
|
|
1739
|
-
|
|
1596
|
+
n(d)
|
|
1740
1597
|
])
|
|
1741
1598
|
}, [
|
|
1742
|
-
["date", "datetime"].includes(
|
|
1599
|
+
["date", "datetime"].includes(n(h)) ? (j(), O(U, Y({
|
|
1743
1600
|
key: 0,
|
|
1744
|
-
modelValue:
|
|
1745
|
-
"onUpdate:modelValue":
|
|
1601
|
+
modelValue: K.value,
|
|
1602
|
+
"onUpdate:modelValue": o[4] || (o[4] = (x) => K.value = x),
|
|
1746
1603
|
style: { "flex-grow": "4" },
|
|
1747
1604
|
density: "compact",
|
|
1748
1605
|
variant: "plain",
|
|
1749
1606
|
clearable: !1,
|
|
1750
1607
|
"hide-details": !0,
|
|
1751
|
-
readonly:
|
|
1752
|
-
disabled:
|
|
1753
|
-
name: `${
|
|
1754
|
-
placeholder:
|
|
1755
|
-
},
|
|
1756
|
-
onClick:
|
|
1757
|
-
onKeydown:
|
|
1758
|
-
onFocus: (
|
|
1759
|
-
onBlur: (
|
|
1608
|
+
readonly: n(v).readonly,
|
|
1609
|
+
disabled: n(v).disabled,
|
|
1610
|
+
name: `${n(v).name}-date`,
|
|
1611
|
+
placeholder: n(v).placeholder
|
|
1612
|
+
}, t.passthroughAttrs, {
|
|
1613
|
+
onClick: o[5] || (o[5] = (x) => w.value = "date"),
|
|
1614
|
+
onKeydown: o[6] || (o[6] = De((x) => w.value = "date", ["space"])),
|
|
1615
|
+
onFocus: (x) => E.focus(),
|
|
1616
|
+
onBlur: (x) => E.blur()
|
|
1760
1617
|
}), {
|
|
1761
|
-
default:
|
|
1762
|
-
|
|
1763
|
-
modelValue:
|
|
1764
|
-
"onUpdate:modelValue":
|
|
1618
|
+
default: s(() => [
|
|
1619
|
+
i(_, {
|
|
1620
|
+
modelValue: T.value,
|
|
1621
|
+
"onUpdate:modelValue": o[3] || (o[3] = (x) => T.value = x),
|
|
1765
1622
|
"close-on-content-click": !1,
|
|
1766
1623
|
activator: "parent"
|
|
1767
1624
|
}, {
|
|
1768
|
-
default:
|
|
1769
|
-
|
|
1770
|
-
modelValue:
|
|
1771
|
-
"onUpdate:modelValue":
|
|
1772
|
-
onCancel:
|
|
1773
|
-
onSave:
|
|
1625
|
+
default: s(() => [
|
|
1626
|
+
i(m, {
|
|
1627
|
+
modelValue: W.value,
|
|
1628
|
+
"onUpdate:modelValue": o[0] || (o[0] = (x) => W.value = x),
|
|
1629
|
+
onCancel: o[1] || (o[1] = (x) => w.value = ""),
|
|
1630
|
+
onSave: o[2] || (o[2] = (x) => w.value = "")
|
|
1774
1631
|
}, {
|
|
1775
|
-
default:
|
|
1776
|
-
|
|
1777
|
-
modelValue:
|
|
1778
|
-
"onUpdate:modelValue": (
|
|
1632
|
+
default: s(({ model: x, actions: J }) => [
|
|
1633
|
+
i(u, {
|
|
1634
|
+
modelValue: x.value,
|
|
1635
|
+
"onUpdate:modelValue": (ee) => x.value = ee,
|
|
1779
1636
|
"hide-header": !0,
|
|
1780
|
-
"first-day-of-week":
|
|
1637
|
+
"first-day-of-week": c.value,
|
|
1781
1638
|
"show-adjacent-months": !0,
|
|
1782
1639
|
"show-week": !0
|
|
1783
1640
|
}, {
|
|
1784
|
-
actions:
|
|
1785
|
-
(
|
|
1641
|
+
actions: s(() => [
|
|
1642
|
+
(j(), O(Ue(J)))
|
|
1786
1643
|
]),
|
|
1787
1644
|
_: 2
|
|
1788
1645
|
}, 1032, ["modelValue", "onUpdate:modelValue", "first-day-of-week"])
|
|
@@ -1794,49 +1651,49 @@ const pl = {
|
|
|
1794
1651
|
}, 8, ["modelValue"])
|
|
1795
1652
|
]),
|
|
1796
1653
|
_: 1
|
|
1797
|
-
}, 16, ["modelValue", "readonly", "disabled", "name", "placeholder", "onFocus", "onBlur"])) :
|
|
1798
|
-
["time", "datetime"].includes(
|
|
1654
|
+
}, 16, ["modelValue", "readonly", "disabled", "name", "placeholder", "onFocus", "onBlur"])) : G("", !0),
|
|
1655
|
+
["time", "datetime"].includes(n(h)) ? (j(), O(U, Y({
|
|
1799
1656
|
key: 1,
|
|
1800
|
-
modelValue:
|
|
1801
|
-
"onUpdate:modelValue":
|
|
1657
|
+
modelValue: I.value,
|
|
1658
|
+
"onUpdate:modelValue": o[11] || (o[11] = (x) => I.value = x),
|
|
1802
1659
|
style: { "flex-grow": "3" },
|
|
1803
1660
|
density: "compact",
|
|
1804
1661
|
variant: "plain",
|
|
1805
1662
|
clearable: !1,
|
|
1806
1663
|
"hide-details": !0,
|
|
1807
|
-
readonly:
|
|
1808
|
-
disabled:
|
|
1809
|
-
name: `${
|
|
1810
|
-
placeholder:
|
|
1811
|
-
},
|
|
1812
|
-
onClick:
|
|
1813
|
-
onKeydown:
|
|
1814
|
-
onFocus: (
|
|
1815
|
-
onBlur: (
|
|
1664
|
+
readonly: n(v).readonly,
|
|
1665
|
+
disabled: n(v).disabled,
|
|
1666
|
+
name: `${n(v).name}-time`,
|
|
1667
|
+
placeholder: n(h) === "time" ? n(v).placeholder : void 0
|
|
1668
|
+
}, t.passthroughAttrs, {
|
|
1669
|
+
onClick: o[12] || (o[12] = (x) => w.value = "time"),
|
|
1670
|
+
onKeydown: o[13] || (o[13] = De((x) => w.value = "time", ["space"])),
|
|
1671
|
+
onFocus: (x) => E.focus(),
|
|
1672
|
+
onBlur: (x) => E.blur()
|
|
1816
1673
|
}), {
|
|
1817
|
-
default:
|
|
1818
|
-
|
|
1674
|
+
default: s(() => [
|
|
1675
|
+
i(_, {
|
|
1819
1676
|
modelValue: D.value,
|
|
1820
|
-
"onUpdate:modelValue":
|
|
1677
|
+
"onUpdate:modelValue": o[10] || (o[10] = (x) => D.value = x),
|
|
1821
1678
|
"close-on-content-click": !1,
|
|
1822
1679
|
activator: "parent"
|
|
1823
1680
|
}, {
|
|
1824
|
-
default:
|
|
1825
|
-
|
|
1826
|
-
modelValue:
|
|
1827
|
-
"onUpdate:modelValue":
|
|
1828
|
-
onCancel:
|
|
1829
|
-
onSave:
|
|
1681
|
+
default: s(() => [
|
|
1682
|
+
i(m, {
|
|
1683
|
+
modelValue: P.value,
|
|
1684
|
+
"onUpdate:modelValue": o[7] || (o[7] = (x) => P.value = x),
|
|
1685
|
+
onCancel: o[8] || (o[8] = (x) => w.value = ""),
|
|
1686
|
+
onSave: o[9] || (o[9] = (x) => w.value = "")
|
|
1830
1687
|
}, {
|
|
1831
|
-
default:
|
|
1832
|
-
|
|
1833
|
-
modelValue:
|
|
1834
|
-
"onUpdate:modelValue": (
|
|
1688
|
+
default: s(({ model: x, actions: J }) => [
|
|
1689
|
+
i(q, {
|
|
1690
|
+
modelValue: x.value,
|
|
1691
|
+
"onUpdate:modelValue": (ee) => x.value = ee,
|
|
1835
1692
|
"hide-header": !0,
|
|
1836
1693
|
format: "24hr"
|
|
1837
1694
|
}, {
|
|
1838
|
-
actions:
|
|
1839
|
-
(
|
|
1695
|
+
actions: s(() => [
|
|
1696
|
+
(j(), O(Ue(J)))
|
|
1840
1697
|
]),
|
|
1841
1698
|
_: 2
|
|
1842
1699
|
}, 1032, ["modelValue", "onUpdate:modelValue"])
|
|
@@ -1848,16 +1705,16 @@ const pl = {
|
|
|
1848
1705
|
}, 8, ["modelValue"])
|
|
1849
1706
|
]),
|
|
1850
1707
|
_: 1
|
|
1851
|
-
}, 16, ["modelValue", "readonly", "disabled", "name", "placeholder", "onFocus", "onBlur"])) :
|
|
1708
|
+
}, 16, ["modelValue", "readonly", "disabled", "name", "placeholder", "onFocus", "onBlur"])) : G("", !0)
|
|
1852
1709
|
], 2)
|
|
1853
1710
|
]),
|
|
1854
1711
|
_: 1
|
|
1855
1712
|
}, 16, ["class", "clearable"]);
|
|
1856
1713
|
};
|
|
1857
1714
|
}
|
|
1858
|
-
}),
|
|
1715
|
+
}), gt = /* @__PURE__ */ le({
|
|
1859
1716
|
__name: "df-file",
|
|
1860
|
-
props: /* @__PURE__ */
|
|
1717
|
+
props: /* @__PURE__ */ pe({
|
|
1861
1718
|
comms: {},
|
|
1862
1719
|
control: {},
|
|
1863
1720
|
modelValue: {},
|
|
@@ -1873,82 +1730,82 @@ const pl = {
|
|
|
1873
1730
|
passthroughAttrs: {},
|
|
1874
1731
|
density: {},
|
|
1875
1732
|
variant: {}
|
|
1876
|
-
},
|
|
1733
|
+
}, be),
|
|
1877
1734
|
emits: ["update:modelValue", "click:clear"],
|
|
1878
|
-
setup(
|
|
1879
|
-
const
|
|
1735
|
+
setup(t, { emit: l }) {
|
|
1736
|
+
const e = t, a = l, { density: r, densityClass: c, touched: d, value: g, vuetifyBindings: C } = ce(e, a), f = M(null), v = M(null), h = M(0), B = M(Math.round(Math.random() * 1e3)), V = M(), w = A(() => v.value && h.value < 100), T = A(() => !V.value && g.value ? e.modelValue : "");
|
|
1880
1737
|
function D() {
|
|
1881
|
-
|
|
1738
|
+
f.value && window.clearInterval(f.value);
|
|
1882
1739
|
}
|
|
1883
|
-
function
|
|
1884
|
-
D(),
|
|
1885
|
-
|
|
1740
|
+
function R() {
|
|
1741
|
+
D(), f.value = window.setInterval(() => {
|
|
1742
|
+
g.value && e.comms.touch(g.value);
|
|
1886
1743
|
}, 60 * 1e3);
|
|
1887
1744
|
}
|
|
1888
|
-
|
|
1889
|
-
|
|
1745
|
+
Ge(() => D()), re(g, (P) => {
|
|
1746
|
+
P ? R() : D();
|
|
1890
1747
|
});
|
|
1891
|
-
function
|
|
1892
|
-
return
|
|
1893
|
-
|
|
1748
|
+
function p() {
|
|
1749
|
+
return ge(this, null, function* () {
|
|
1750
|
+
g.value && (yield e.comms.delete(g.value)), g.value = null, h.value = 0, B.value = Math.round(Math.random() * 1e3), v.value = null, V.value = null, D();
|
|
1894
1751
|
});
|
|
1895
1752
|
}
|
|
1896
|
-
function P
|
|
1897
|
-
return
|
|
1898
|
-
|
|
1753
|
+
function S(P) {
|
|
1754
|
+
return ge(this, null, function* () {
|
|
1755
|
+
h.value = -1, v.value = P;
|
|
1899
1756
|
try {
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
}),
|
|
1903
|
-
} catch (
|
|
1904
|
-
throw
|
|
1757
|
+
g.value = yield e.comms.upload(P, (K, I) => {
|
|
1758
|
+
h.value = Math.round(K * 100 / I);
|
|
1759
|
+
}), h.value = 100, R();
|
|
1760
|
+
} catch (K) {
|
|
1761
|
+
throw h.value = 0, v.value = null, B.value = Math.round(Math.random() * 1e3), V.value = null, K;
|
|
1905
1762
|
}
|
|
1906
1763
|
});
|
|
1907
1764
|
}
|
|
1908
|
-
function
|
|
1909
|
-
|
|
1765
|
+
function W(P) {
|
|
1766
|
+
P && (Array.isArray(P) ? console.error("Uploading multiple files not supported right now") : S(P));
|
|
1910
1767
|
}
|
|
1911
|
-
return (
|
|
1912
|
-
const
|
|
1913
|
-
return
|
|
1914
|
-
class:
|
|
1768
|
+
return (P, K) => {
|
|
1769
|
+
const I = N("v-progress-linear"), k = N("v-file-input");
|
|
1770
|
+
return j(), O(n(Fe), Y(te(H({}, e), { loading: w.value }), {
|
|
1771
|
+
class: n(c),
|
|
1915
1772
|
clearable: "",
|
|
1916
|
-
"onClick:clear":
|
|
1917
|
-
onBlur:
|
|
1773
|
+
"onClick:clear": p,
|
|
1774
|
+
onBlur: K[1] || (K[1] = (o) => d.value = !0)
|
|
1918
1775
|
}), {
|
|
1919
|
-
"prepend-inner":
|
|
1920
|
-
|
|
1776
|
+
"prepend-inner": s(() => [
|
|
1777
|
+
i(n(L), { name: "mdi-paperclip" })
|
|
1921
1778
|
]),
|
|
1922
|
-
loader:
|
|
1923
|
-
|
|
1779
|
+
loader: s(() => [
|
|
1780
|
+
v.value && h.value < 100 ? (j(), O(I, {
|
|
1924
1781
|
key: 0,
|
|
1925
|
-
"model-value":
|
|
1926
|
-
indeterminate:
|
|
1927
|
-
}, null, 8, ["model-value", "indeterminate"])) :
|
|
1782
|
+
"model-value": h.value,
|
|
1783
|
+
indeterminate: h.value === -1
|
|
1784
|
+
}, null, 8, ["model-value", "indeterminate"])) : G("", !0)
|
|
1928
1785
|
]),
|
|
1929
|
-
default:
|
|
1930
|
-
|
|
1931
|
-
class:
|
|
1786
|
+
default: s((o) => [
|
|
1787
|
+
ae("div", {
|
|
1788
|
+
class: ue(["d-flex w-100 position-relative df-input-wrapper", n(r)])
|
|
1932
1789
|
}, [
|
|
1933
|
-
|
|
1934
|
-
modelValue:
|
|
1935
|
-
"onUpdate:modelValue":
|
|
1936
|
-
label:
|
|
1790
|
+
i(k, Y({
|
|
1791
|
+
modelValue: V.value,
|
|
1792
|
+
"onUpdate:modelValue": K[0] || (K[0] = (u) => V.value = u),
|
|
1793
|
+
label: T.value,
|
|
1937
1794
|
density: "compact",
|
|
1938
1795
|
variant: "plain",
|
|
1939
|
-
readonly:
|
|
1940
|
-
disabled:
|
|
1941
|
-
name:
|
|
1796
|
+
readonly: n(C).readonly,
|
|
1797
|
+
disabled: n(C).disabled,
|
|
1798
|
+
name: n(C).name,
|
|
1942
1799
|
"hide-details": !0,
|
|
1943
1800
|
"show-size": !0,
|
|
1944
1801
|
multiple: !1,
|
|
1945
|
-
style:
|
|
1802
|
+
style: v.value && h.value < 100 ? "visibility: hidden" : "",
|
|
1946
1803
|
clearable: !1
|
|
1947
|
-
},
|
|
1804
|
+
}, t.passthroughAttrs, {
|
|
1948
1805
|
"prepend-icon": "",
|
|
1949
|
-
"onUpdate:modelValue":
|
|
1950
|
-
onFocus: (
|
|
1951
|
-
onBlur: (
|
|
1806
|
+
"onUpdate:modelValue": W,
|
|
1807
|
+
onFocus: (u) => o.focus(),
|
|
1808
|
+
onBlur: (u) => o.blur()
|
|
1952
1809
|
}), null, 16, ["modelValue", "label", "readonly", "disabled", "name", "style", "onFocus", "onBlur"])
|
|
1953
1810
|
], 2)
|
|
1954
1811
|
]),
|
|
@@ -1956,9 +1813,164 @@ const pl = {
|
|
|
1956
1813
|
}, 16, ["class"]);
|
|
1957
1814
|
};
|
|
1958
1815
|
}
|
|
1959
|
-
}),
|
|
1816
|
+
}), In = ["id", "disabled", "name", "onFocus", "onBlur"], Dn = ["for"], Sn = ["for"], Mn = ["for", "title"], yt = /* @__PURE__ */ le({
|
|
1817
|
+
__name: "df-image",
|
|
1818
|
+
props: /* @__PURE__ */ pe({
|
|
1819
|
+
comms: {},
|
|
1820
|
+
control: {},
|
|
1821
|
+
modelValue: {},
|
|
1822
|
+
label: {},
|
|
1823
|
+
errors: {},
|
|
1824
|
+
placeholder: {},
|
|
1825
|
+
helpText: {},
|
|
1826
|
+
hint: {},
|
|
1827
|
+
enabled: { type: Boolean },
|
|
1828
|
+
visibility: {},
|
|
1829
|
+
cssClass: {},
|
|
1830
|
+
clearable: { type: Boolean },
|
|
1831
|
+
passthroughAttrs: {},
|
|
1832
|
+
density: {},
|
|
1833
|
+
variant: {}
|
|
1834
|
+
}, be),
|
|
1835
|
+
emits: ["update:modelValue", "click:clear"],
|
|
1836
|
+
setup(t, { emit: l }) {
|
|
1837
|
+
const e = t, a = l, { density: r, densityClass: c, touched: d, value: g, vuetifyBindings: C } = ce(e, a), f = we, v = M(null), h = zt(), B = M(null), V = M(0), w = M(null), T = M(0), D = M(null), R = A(() => B.value && V.value < 100), p = A(() => !!(C.value.disabled || C.value.readonly)), S = A(() => T.value > 0), W = A(() => {
|
|
1838
|
+
var E;
|
|
1839
|
+
return (E = w.value) != null ? E : g.value ? g.value : null;
|
|
1840
|
+
});
|
|
1841
|
+
function P() {
|
|
1842
|
+
v.value && window.clearInterval(v.value);
|
|
1843
|
+
}
|
|
1844
|
+
function K() {
|
|
1845
|
+
P(), v.value = window.setInterval(() => {
|
|
1846
|
+
g.value && e.comms.touch(g.value);
|
|
1847
|
+
}, 60 * 1e3);
|
|
1848
|
+
}
|
|
1849
|
+
function I() {
|
|
1850
|
+
w.value && (URL.revokeObjectURL(w.value), w.value = null);
|
|
1851
|
+
}
|
|
1852
|
+
Ge(() => {
|
|
1853
|
+
P(), I();
|
|
1854
|
+
}), re(g, (E) => {
|
|
1855
|
+
E ? K() : P();
|
|
1856
|
+
});
|
|
1857
|
+
function k() {
|
|
1858
|
+
return ge(this, null, function* () {
|
|
1859
|
+
g.value && (yield e.comms.delete(g.value)), g.value = null, V.value = 0, B.value = null, I(), P();
|
|
1860
|
+
});
|
|
1861
|
+
}
|
|
1862
|
+
function o(E) {
|
|
1863
|
+
return ge(this, null, function* () {
|
|
1864
|
+
V.value = -1, B.value = E, I(), w.value = URL.createObjectURL(E);
|
|
1865
|
+
try {
|
|
1866
|
+
g.value = yield e.comms.upload(E, (x, J) => {
|
|
1867
|
+
V.value = Math.round(x * 100 / J);
|
|
1868
|
+
}), V.value = 100, K();
|
|
1869
|
+
} catch (x) {
|
|
1870
|
+
throw V.value = 0, B.value = null, I(), x;
|
|
1871
|
+
}
|
|
1872
|
+
});
|
|
1873
|
+
}
|
|
1874
|
+
function u(E) {
|
|
1875
|
+
if (!E.type.startsWith("image/")) {
|
|
1876
|
+
console.error("Only image files are supported");
|
|
1877
|
+
return;
|
|
1878
|
+
}
|
|
1879
|
+
o(E);
|
|
1880
|
+
}
|
|
1881
|
+
function m(E) {
|
|
1882
|
+
var ee;
|
|
1883
|
+
const x = E.target, J = (ee = x.files) == null ? void 0 : ee[0];
|
|
1884
|
+
x.value = "", J && u(J);
|
|
1885
|
+
}
|
|
1886
|
+
function _() {
|
|
1887
|
+
p.value || (T.value += 1);
|
|
1888
|
+
}
|
|
1889
|
+
function U() {
|
|
1890
|
+
T.value = Math.max(0, T.value - 1);
|
|
1891
|
+
}
|
|
1892
|
+
function q(E) {
|
|
1893
|
+
var J, ee;
|
|
1894
|
+
if (T.value = 0, p.value) return;
|
|
1895
|
+
const x = (ee = (J = E.dataTransfer) == null ? void 0 : J.files) == null ? void 0 : ee[0];
|
|
1896
|
+
x && u(x);
|
|
1897
|
+
}
|
|
1898
|
+
return (E, x) => {
|
|
1899
|
+
const J = N("v-progress-linear"), ee = N("v-img");
|
|
1900
|
+
return j(), O(n(Fe), Y(te(H({}, e), { loading: R.value }), {
|
|
1901
|
+
class: ["df-image-field", n(c)],
|
|
1902
|
+
clearable: "",
|
|
1903
|
+
"onClick:clear": k,
|
|
1904
|
+
onBlur: x[1] || (x[1] = (de) => d.value = !0)
|
|
1905
|
+
}), {
|
|
1906
|
+
"prepend-inner": s(() => [
|
|
1907
|
+
i(n(L), { name: "mdi-image" })
|
|
1908
|
+
]),
|
|
1909
|
+
loader: s(() => [
|
|
1910
|
+
B.value && V.value < 100 ? (j(), O(J, {
|
|
1911
|
+
key: 0,
|
|
1912
|
+
"model-value": V.value,
|
|
1913
|
+
indeterminate: V.value === -1
|
|
1914
|
+
}, null, 8, ["model-value", "indeterminate"])) : G("", !0)
|
|
1915
|
+
]),
|
|
1916
|
+
default: s((de) => [
|
|
1917
|
+
ae("div", {
|
|
1918
|
+
class: ue(["d-flex w-100 position-relative df-input-wrapper df-image-wrapper", [n(r), { "df-image-dragging": S.value, "df-image-disabled": p.value }]]),
|
|
1919
|
+
onDragenter: xe(_, ["prevent"]),
|
|
1920
|
+
onDragover: xe(_, ["prevent"]),
|
|
1921
|
+
onDragleave: xe(U, ["prevent"]),
|
|
1922
|
+
onDrop: xe(q, ["prevent"]),
|
|
1923
|
+
onClick: x[0] || (x[0] = xe(() => {
|
|
1924
|
+
}, ["stop"]))
|
|
1925
|
+
}, [
|
|
1926
|
+
ae("input", {
|
|
1927
|
+
id: n(h),
|
|
1928
|
+
ref_key: "fileInputRef",
|
|
1929
|
+
ref: D,
|
|
1930
|
+
type: "file",
|
|
1931
|
+
accept: "image/*",
|
|
1932
|
+
class: "df-image-native-input",
|
|
1933
|
+
disabled: p.value,
|
|
1934
|
+
name: n(C).name,
|
|
1935
|
+
onChange: m,
|
|
1936
|
+
onFocus: (y) => de.focus(),
|
|
1937
|
+
onBlur: (y) => de.blur()
|
|
1938
|
+
}, null, 40, In),
|
|
1939
|
+
W.value ? (j(), Z("label", {
|
|
1940
|
+
key: 0,
|
|
1941
|
+
for: n(h),
|
|
1942
|
+
class: "df-image-preview-label"
|
|
1943
|
+
}, [
|
|
1944
|
+
i(ee, {
|
|
1945
|
+
src: W.value,
|
|
1946
|
+
class: "df-image-preview",
|
|
1947
|
+
style: rt(B.value && V.value < 100 ? "visibility: hidden" : "")
|
|
1948
|
+
}, null, 8, ["src", "style"])
|
|
1949
|
+
], 8, Dn)) : (j(), Z("label", {
|
|
1950
|
+
key: 1,
|
|
1951
|
+
for: n(h),
|
|
1952
|
+
class: "df-image-placeholder"
|
|
1953
|
+
}, [
|
|
1954
|
+
i(n(L), { name: "mdi-tray-arrow-up" }),
|
|
1955
|
+
ae("span", null, X(n(f).ImageDropHint), 1)
|
|
1956
|
+
], 8, Sn)),
|
|
1957
|
+
W.value && !p.value ? (j(), Z("label", {
|
|
1958
|
+
key: 2,
|
|
1959
|
+
for: n(h),
|
|
1960
|
+
class: "df-image-replace-btn",
|
|
1961
|
+
title: n(f).ImageReplace
|
|
1962
|
+
}, [
|
|
1963
|
+
i(n(L), { name: "mdi-pencil" })
|
|
1964
|
+
], 8, Mn)) : G("", !0)
|
|
1965
|
+
], 34)
|
|
1966
|
+
]),
|
|
1967
|
+
_: 1
|
|
1968
|
+
}, 16, ["class"]);
|
|
1969
|
+
};
|
|
1970
|
+
}
|
|
1971
|
+
}), kt = /* @__PURE__ */ le({
|
|
1960
1972
|
__name: "df-input",
|
|
1961
|
-
props: /* @__PURE__ */
|
|
1973
|
+
props: /* @__PURE__ */ pe({
|
|
1962
1974
|
inputType: {},
|
|
1963
1975
|
precision: {},
|
|
1964
1976
|
step: {},
|
|
@@ -1978,7 +1990,7 @@ const pl = {
|
|
|
1978
1990
|
passthroughAttrs: {},
|
|
1979
1991
|
density: {},
|
|
1980
1992
|
variant: {}
|
|
1981
|
-
},
|
|
1993
|
+
}, te(H({}, be), {
|
|
1982
1994
|
inputType: "text",
|
|
1983
1995
|
precision: null,
|
|
1984
1996
|
step: void 0,
|
|
@@ -1986,235 +1998,1350 @@ const pl = {
|
|
|
1986
1998
|
max: void 0
|
|
1987
1999
|
})),
|
|
1988
2000
|
emits: ["update:modelValue", "click:clear"],
|
|
1989
|
-
setup(
|
|
1990
|
-
const
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
), { inputType:
|
|
1994
|
-
() =>
|
|
2001
|
+
setup(t, { emit: l }) {
|
|
2002
|
+
const e = t, a = l, { densityClass: r, isRendered: c, label: d, showErrors: g, touched: C, value: f, visibilityClass: v, vuetifyBindings: h } = ce(
|
|
2003
|
+
e,
|
|
2004
|
+
a
|
|
2005
|
+
), { inputType: B, max: V, min: w, precision: T, step: D } = Ee(e), R = A(() => B.value === "number"), p = A(
|
|
2006
|
+
() => R.value ? { min: n(w), max: n(V), precision: n(T), step: n(D) } : {}
|
|
1995
2007
|
);
|
|
1996
|
-
return (
|
|
1997
|
-
const
|
|
1998
|
-
return
|
|
2008
|
+
return (S, W) => {
|
|
2009
|
+
const P = N("v-text-field"), K = N("v-number-input");
|
|
2010
|
+
return n(c) ? (j(), Z("div", {
|
|
1999
2011
|
key: 0,
|
|
2000
|
-
class:
|
|
2012
|
+
class: ue(["df-input-container", [n(r), n(v)]])
|
|
2001
2013
|
}, [
|
|
2002
|
-
|
|
2014
|
+
R.value ? (j(), O(K, Y({
|
|
2003
2015
|
key: 1,
|
|
2004
|
-
modelValue:
|
|
2005
|
-
"onUpdate:modelValue":
|
|
2016
|
+
modelValue: n(f),
|
|
2017
|
+
"onUpdate:modelValue": W[2] || (W[2] = (I) => Ce(f) ? f.value = I : null),
|
|
2006
2018
|
density: "compact",
|
|
2007
2019
|
"control-variant": "stacked"
|
|
2008
|
-
},
|
|
2009
|
-
label:
|
|
2010
|
-
|
|
2011
|
-
data:
|
|
2012
|
-
label:
|
|
2020
|
+
}, H(H({}, n(h)), p.value)), {
|
|
2021
|
+
label: s((I) => [
|
|
2022
|
+
i(n(fe), {
|
|
2023
|
+
data: I,
|
|
2024
|
+
label: n(d)
|
|
2013
2025
|
}, null, 8, ["data", "label"])
|
|
2014
2026
|
]),
|
|
2015
|
-
message:
|
|
2016
|
-
|
|
2017
|
-
message:
|
|
2018
|
-
errors:
|
|
2027
|
+
message: s(({ message: I }) => [
|
|
2028
|
+
i(n(ve), {
|
|
2029
|
+
message: I,
|
|
2030
|
+
errors: n(g)
|
|
2019
2031
|
}, null, 8, ["message", "errors"])
|
|
2020
2032
|
]),
|
|
2021
2033
|
_: 1
|
|
2022
|
-
}, 16, ["modelValue"])) : (
|
|
2034
|
+
}, 16, ["modelValue"])) : (j(), O(P, Y({
|
|
2023
2035
|
key: 0,
|
|
2024
|
-
modelValue:
|
|
2025
|
-
"onUpdate:modelValue":
|
|
2026
|
-
type:
|
|
2027
|
-
},
|
|
2028
|
-
onBlur:
|
|
2036
|
+
modelValue: n(f),
|
|
2037
|
+
"onUpdate:modelValue": W[0] || (W[0] = (I) => Ce(f) ? f.value = I : null),
|
|
2038
|
+
type: n(B)
|
|
2039
|
+
}, n(h), {
|
|
2040
|
+
onBlur: W[1] || (W[1] = (I) => C.value = !0)
|
|
2029
2041
|
}), {
|
|
2030
|
-
label:
|
|
2031
|
-
|
|
2032
|
-
data:
|
|
2033
|
-
label:
|
|
2042
|
+
label: s((I) => [
|
|
2043
|
+
i(n(fe), {
|
|
2044
|
+
data: I,
|
|
2045
|
+
label: n(d)
|
|
2034
2046
|
}, null, 8, ["data", "label"])
|
|
2035
2047
|
]),
|
|
2036
|
-
message:
|
|
2037
|
-
|
|
2038
|
-
message:
|
|
2039
|
-
errors:
|
|
2048
|
+
message: s(({ message: I }) => [
|
|
2049
|
+
i(n(ve), {
|
|
2050
|
+
message: I,
|
|
2051
|
+
errors: n(g)
|
|
2040
2052
|
}, null, 8, ["message", "errors"])
|
|
2041
2053
|
]),
|
|
2042
2054
|
_: 1
|
|
2043
2055
|
}, 16, ["modelValue", "type"]))
|
|
2044
|
-
], 2)) :
|
|
2056
|
+
], 2)) : G("", !0);
|
|
2057
|
+
};
|
|
2058
|
+
}
|
|
2059
|
+
}), Rn = dl.create({
|
|
2060
|
+
name: "classAttribute",
|
|
2061
|
+
addGlobalAttributes() {
|
|
2062
|
+
return [
|
|
2063
|
+
{
|
|
2064
|
+
types: ["paragraph", "heading", "blockquote", "codeBlock"],
|
|
2065
|
+
attributes: {
|
|
2066
|
+
class: {
|
|
2067
|
+
default: null,
|
|
2068
|
+
parseHTML: (t) => t.getAttribute("class"),
|
|
2069
|
+
renderHTML: (t) => t.class ? { class: t.class } : {}
|
|
2070
|
+
}
|
|
2071
|
+
}
|
|
2072
|
+
}
|
|
2073
|
+
];
|
|
2074
|
+
}
|
|
2075
|
+
});
|
|
2076
|
+
function wt(t, l) {
|
|
2077
|
+
return ml.create({
|
|
2078
|
+
name: t,
|
|
2079
|
+
parseHTML() {
|
|
2080
|
+
return [{ tag: `span.${l}` }];
|
|
2081
|
+
},
|
|
2082
|
+
renderHTML({ HTMLAttributes: e }) {
|
|
2083
|
+
return ["span", dt(e, { class: l }), 0];
|
|
2084
|
+
}
|
|
2085
|
+
});
|
|
2086
|
+
}
|
|
2087
|
+
const Pn = wt("marker", "marker"), Nn = wt("spoiler", "spoiler"), Un = [
|
|
2088
|
+
{ key: "ArticleCategory", kind: "heading", level: 3, className: "category" },
|
|
2089
|
+
{ key: "Title", kind: "heading", level: 2, className: "document-title" },
|
|
2090
|
+
{ key: "Subtitle", kind: "heading", level: 3, className: "document-subtitle" },
|
|
2091
|
+
{ key: "InfoBox", kind: "paragraph", className: "info-box" },
|
|
2092
|
+
{ key: "SideQuote", kind: "blockquote", className: "side-quote" },
|
|
2093
|
+
{ key: "Marker", kind: "mark", markName: "marker" },
|
|
2094
|
+
{ key: "Spoiler", kind: "mark", markName: "spoiler" },
|
|
2095
|
+
{ key: "CodeDark", kind: "codeBlock", className: "fancy-code fancy-code-dark" },
|
|
2096
|
+
{ key: "CodeBright", kind: "codeBlock", className: "fancy-code fancy-code-bright" }
|
|
2097
|
+
];
|
|
2098
|
+
function Je(t) {
|
|
2099
|
+
const { state: l } = t, { $from: e } = l.selection;
|
|
2100
|
+
return e.depth > 0 || l.doc.content.size === 0 ? e : l.doc.resolve(Math.min(1, l.doc.content.size));
|
|
2101
|
+
}
|
|
2102
|
+
function Ne(t) {
|
|
2103
|
+
return Je(t).parent;
|
|
2104
|
+
}
|
|
2105
|
+
function Ct(t, l) {
|
|
2106
|
+
const e = Je(t);
|
|
2107
|
+
for (let a = e.depth; a >= 0; a -= 1)
|
|
2108
|
+
if (e.node(a).type.name === l) return e.node(a);
|
|
2109
|
+
return null;
|
|
2110
|
+
}
|
|
2111
|
+
function Ie(t, l) {
|
|
2112
|
+
switch (l.kind) {
|
|
2113
|
+
case "heading": {
|
|
2114
|
+
const e = Ne(t);
|
|
2115
|
+
return e.type.name === "heading" && e.attrs.level === l.level && e.attrs.class === l.className;
|
|
2116
|
+
}
|
|
2117
|
+
case "paragraph": {
|
|
2118
|
+
const e = Ne(t);
|
|
2119
|
+
return e.type.name === "paragraph" && e.attrs.class === l.className;
|
|
2120
|
+
}
|
|
2121
|
+
case "codeBlock": {
|
|
2122
|
+
const e = Ne(t);
|
|
2123
|
+
return e.type.name === "codeBlock" && e.attrs.class === l.className;
|
|
2124
|
+
}
|
|
2125
|
+
case "blockquote": {
|
|
2126
|
+
const e = Ct(t, "blockquote");
|
|
2127
|
+
return !!e && e.attrs.class === l.className;
|
|
2128
|
+
}
|
|
2129
|
+
case "mark":
|
|
2130
|
+
return t.isActive(l.markName);
|
|
2131
|
+
default:
|
|
2132
|
+
return !1;
|
|
2133
|
+
}
|
|
2134
|
+
}
|
|
2135
|
+
function zn(t, l) {
|
|
2136
|
+
const e = t.chain().focus(), { $from: a } = t.state.selection;
|
|
2137
|
+
switch (l.kind !== "mark" && a.depth === 0 && t.state.doc.content.size > 0 && e.setTextSelection(Je(t).pos), l.kind) {
|
|
2138
|
+
case "heading":
|
|
2139
|
+
Ie(t, l) ? e.setParagraph().updateAttributes("paragraph", { class: null }).run() : e.setNode("heading", { level: l.level }).updateAttributes("heading", { class: l.className }).run();
|
|
2140
|
+
break;
|
|
2141
|
+
case "paragraph":
|
|
2142
|
+
Ie(t, l) ? e.setParagraph().updateAttributes("paragraph", { class: null }).run() : e.setParagraph().updateAttributes("paragraph", { class: l.className }).run();
|
|
2143
|
+
break;
|
|
2144
|
+
case "blockquote":
|
|
2145
|
+
Ie(t, l) ? e.unsetBlockquote().run() : Ct(t, "blockquote") ? e.updateAttributes("blockquote", { class: l.className }).run() : e.setBlockquote().updateAttributes("blockquote", { class: l.className }).run();
|
|
2146
|
+
break;
|
|
2147
|
+
case "codeBlock":
|
|
2148
|
+
Ie(t, l) ? e.toggleCodeBlock().updateAttributes("paragraph", { class: null }).run() : Ne(t).type.name === "codeBlock" ? e.updateAttributes("codeBlock", { class: l.className }).run() : e.setCodeBlock().updateAttributes("codeBlock", { class: l.className }).run();
|
|
2149
|
+
break;
|
|
2150
|
+
case "mark":
|
|
2151
|
+
e.toggleMark(l.markName).run();
|
|
2152
|
+
break;
|
|
2153
|
+
}
|
|
2154
|
+
}
|
|
2155
|
+
function At(t) {
|
|
2156
|
+
return new Promise((l, e) => {
|
|
2157
|
+
const a = new FileReader();
|
|
2158
|
+
a.onload = () => l(a.result), a.onerror = () => e(a.error), a.readAsDataURL(t);
|
|
2159
|
+
});
|
|
2160
|
+
}
|
|
2161
|
+
function En(t) {
|
|
2162
|
+
if (!t) return [];
|
|
2163
|
+
const l = [];
|
|
2164
|
+
return Array.from(t.items || []).forEach((e) => {
|
|
2165
|
+
if (e.kind === "file") {
|
|
2166
|
+
const a = e.getAsFile();
|
|
2167
|
+
a && a.type.startsWith("image/") && l.push(a);
|
|
2168
|
+
}
|
|
2169
|
+
}), l.length === 0 && Array.from(t.files || []).forEach((e) => {
|
|
2170
|
+
e.type.startsWith("image/") && l.push(e);
|
|
2171
|
+
}), l;
|
|
2172
|
+
}
|
|
2173
|
+
function xt(t) {
|
|
2174
|
+
let l = 0;
|
|
2175
|
+
return t.forEach((e) => {
|
|
2176
|
+
e.type.name === "image" ? l += 1 : e.content.size && (l += xt(e.content));
|
|
2177
|
+
}), l;
|
|
2178
|
+
}
|
|
2179
|
+
function _t(t, l, e) {
|
|
2180
|
+
const a = [];
|
|
2181
|
+
return t.forEach((r) => {
|
|
2182
|
+
r.type.name === "image" && e.index < l.length ? (a.push(r.type.create(te(H({}, r.attrs), { src: l[e.index] }), r.content, r.marks)), e.index += 1) : r.content.size ? a.push(r.copy(_t(r.content, l, e))) : a.push(r);
|
|
2183
|
+
}), pl.fromArray(a);
|
|
2184
|
+
}
|
|
2185
|
+
function Fn(t) {
|
|
2186
|
+
return (l, e, a) => {
|
|
2187
|
+
const r = En(e.clipboardData);
|
|
2188
|
+
return r.length === 0 ? !1 : (e.preventDefault(), Promise.all(r.map(At)).then((c) => {
|
|
2189
|
+
var d;
|
|
2190
|
+
if (xt(a.content) > 0) {
|
|
2191
|
+
const g = _t(a.content, c, { index: 0 }), C = new fl(g, a.openStart, a.openEnd);
|
|
2192
|
+
l.dispatch(l.state.tr.replaceSelection(C).scrollIntoView());
|
|
2193
|
+
return;
|
|
2194
|
+
}
|
|
2195
|
+
(d = t()) == null || d.chain().focus().insertContent(c.map((g) => ({ type: "image", attrs: { src: g } }))).run();
|
|
2196
|
+
}), !0);
|
|
2197
|
+
};
|
|
2198
|
+
}
|
|
2199
|
+
const Hn = bl.extend({
|
|
2200
|
+
name: "link",
|
|
2201
|
+
addAttributes() {
|
|
2202
|
+
var t;
|
|
2203
|
+
return te(H({}, (t = this.parent) == null ? void 0 : t.call(this)), {
|
|
2204
|
+
download: {
|
|
2205
|
+
default: null,
|
|
2206
|
+
parseHTML: (l) => l.getAttribute("download"),
|
|
2207
|
+
renderHTML: (l) => l.download ? { download: l.download } : {}
|
|
2208
|
+
}
|
|
2209
|
+
});
|
|
2210
|
+
}
|
|
2211
|
+
});
|
|
2212
|
+
function On(t) {
|
|
2213
|
+
let l;
|
|
2214
|
+
try {
|
|
2215
|
+
l = new URL(t);
|
|
2216
|
+
} catch (a) {
|
|
2217
|
+
return null;
|
|
2218
|
+
}
|
|
2219
|
+
const e = l.hostname.replace(/^www\.|^m\./, "");
|
|
2220
|
+
if (e === "youtube.com") {
|
|
2221
|
+
const a = l.searchParams.get("v");
|
|
2222
|
+
if (a) return `https://www.youtube.com/embed/${a}`;
|
|
2223
|
+
const r = l.pathname.match(/^\/embed\/([\w-]+)/);
|
|
2224
|
+
if (r) return `https://www.youtube.com/embed/${r[1]}`;
|
|
2225
|
+
const c = l.pathname.match(/^\/shorts\/([\w-]+)/);
|
|
2226
|
+
return c ? `https://www.youtube.com/embed/${c[1]}` : null;
|
|
2227
|
+
}
|
|
2228
|
+
if (e === "youtu.be") {
|
|
2229
|
+
const a = l.pathname.slice(1);
|
|
2230
|
+
return a ? `https://www.youtube.com/embed/${a}` : null;
|
|
2231
|
+
}
|
|
2232
|
+
if (e === "vimeo.com") {
|
|
2233
|
+
const a = l.pathname.split("/").filter(Boolean).pop();
|
|
2234
|
+
return a && /^\d+$/.test(a) ? `https://player.vimeo.com/video/${a}` : null;
|
|
2235
|
+
}
|
|
2236
|
+
return null;
|
|
2237
|
+
}
|
|
2238
|
+
const Wn = vl.create({
|
|
2239
|
+
name: "mediaEmbed",
|
|
2240
|
+
group: "block",
|
|
2241
|
+
atom: !0,
|
|
2242
|
+
draggable: !0,
|
|
2243
|
+
addAttributes() {
|
|
2244
|
+
return {
|
|
2245
|
+
src: { default: null }
|
|
2246
|
+
};
|
|
2247
|
+
},
|
|
2248
|
+
parseHTML() {
|
|
2249
|
+
return [{ tag: "iframe.media-embed" }];
|
|
2250
|
+
},
|
|
2251
|
+
renderHTML({ HTMLAttributes: t }) {
|
|
2252
|
+
return [
|
|
2253
|
+
"iframe",
|
|
2254
|
+
dt(
|
|
2255
|
+
{
|
|
2256
|
+
class: "media-embed",
|
|
2257
|
+
frameborder: "0",
|
|
2258
|
+
allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",
|
|
2259
|
+
allowfullscreen: "true"
|
|
2260
|
+
},
|
|
2261
|
+
t
|
|
2262
|
+
)
|
|
2263
|
+
];
|
|
2264
|
+
}
|
|
2265
|
+
});
|
|
2266
|
+
function Tt(t) {
|
|
2267
|
+
const l = M(0);
|
|
2268
|
+
let e;
|
|
2269
|
+
const a = () => {
|
|
2270
|
+
l.value += 1;
|
|
2271
|
+
}, r = (c) => {
|
|
2272
|
+
e == null || e.off("transaction", a), e = c, e == null || e.on("transaction", a);
|
|
2273
|
+
};
|
|
2274
|
+
return re(t, r, { immediate: !0 }), Ge(() => r(void 0)), l;
|
|
2275
|
+
}
|
|
2276
|
+
const qn = { class: "d-flex justify-end ga-2 mt-2" }, Kn = { class: "d-flex justify-space-between align-center ga-2 mt-2" }, Xn = { class: "d-flex justify-end mt-2" }, Yn = /* @__PURE__ */ le({
|
|
2277
|
+
__name: "rtf-toolbar",
|
|
2278
|
+
props: {
|
|
2279
|
+
editor: {}
|
|
2280
|
+
},
|
|
2281
|
+
setup(t) {
|
|
2282
|
+
const l = t, e = we, a = A(() => l.editor), r = Tt(a), c = A(() => {
|
|
2283
|
+
var o;
|
|
2284
|
+
return !!((o = l.editor) != null && o.isEditable);
|
|
2285
|
+
}), d = A(() => {
|
|
2286
|
+
r.value;
|
|
2287
|
+
const o = l.editor;
|
|
2288
|
+
return {
|
|
2289
|
+
canUndo: !!(o != null && o.can().undo()),
|
|
2290
|
+
canRedo: !!(o != null && o.can().redo()),
|
|
2291
|
+
bold: !!(o != null && o.isActive("bold")),
|
|
2292
|
+
italic: !!(o != null && o.isActive("italic")),
|
|
2293
|
+
link: !!(o != null && o.isActive("link")),
|
|
2294
|
+
blockquote: !!(o != null && o.isActive("blockquote")),
|
|
2295
|
+
bulletList: !!(o != null && o.isActive("bulletList")),
|
|
2296
|
+
orderedList: !!(o != null && o.isActive("orderedList")),
|
|
2297
|
+
alignLeft: !!(o != null && o.isActive({ textAlign: "left" })),
|
|
2298
|
+
alignCenter: !!(o != null && o.isActive({ textAlign: "center" })),
|
|
2299
|
+
alignRight: !!(o != null && o.isActive({ textAlign: "right" })),
|
|
2300
|
+
alignJustify: !!(o != null && o.isActive({ textAlign: "justify" })),
|
|
2301
|
+
inTable: !!(o != null && o.isActive("table")),
|
|
2302
|
+
canLift: !!(o != null && o.can().liftListItem("listItem")),
|
|
2303
|
+
canSink: !!(o != null && o.can().sinkListItem("listItem"))
|
|
2304
|
+
};
|
|
2305
|
+
}), g = [
|
|
2306
|
+
{ level: 0, label: e.Paragraph },
|
|
2307
|
+
{ level: 1, label: e.Heading1 },
|
|
2308
|
+
{ level: 2, label: e.Heading2 },
|
|
2309
|
+
{ level: 3, label: e.Heading3 },
|
|
2310
|
+
{ level: 4, label: e.Heading4 },
|
|
2311
|
+
{ level: 5, label: e.Heading5 },
|
|
2312
|
+
{ level: 6, label: e.Heading6 }
|
|
2313
|
+
];
|
|
2314
|
+
function C(o) {
|
|
2315
|
+
var u, m;
|
|
2316
|
+
return r.value, o === 0 ? !!((u = a.value) != null && u.isActive("paragraph")) : !!((m = a.value) != null && m.isActive("heading", { level: o }));
|
|
2317
|
+
}
|
|
2318
|
+
const f = A(
|
|
2319
|
+
() => {
|
|
2320
|
+
var o, u;
|
|
2321
|
+
return (u = (o = g.find((m) => C(m.level))) == null ? void 0 : o.label) != null ? u : e.Paragraph;
|
|
2322
|
+
}
|
|
2323
|
+
);
|
|
2324
|
+
function v(o) {
|
|
2325
|
+
var m;
|
|
2326
|
+
const u = (m = a.value) == null ? void 0 : m.chain().focus();
|
|
2327
|
+
u && (o === 0 ? u.setParagraph().run() : u.toggleHeading({ level: o }).run());
|
|
2328
|
+
}
|
|
2329
|
+
const h = Un;
|
|
2330
|
+
function B(o) {
|
|
2331
|
+
return r.value, !!a.value && Ie(a.value, o);
|
|
2332
|
+
}
|
|
2333
|
+
const V = M(""), w = M(!1);
|
|
2334
|
+
function T() {
|
|
2335
|
+
var u, m, _;
|
|
2336
|
+
const o = (m = (u = a.value) == null ? void 0 : u.getAttributes("link")) != null ? m : {};
|
|
2337
|
+
V.value = (_ = o.href) != null ? _ : "", w.value = !!o.download;
|
|
2338
|
+
}
|
|
2339
|
+
function D() {
|
|
2340
|
+
var o;
|
|
2341
|
+
V.value && ((o = a.value) == null || o.chain().focus().extendMarkRange("link").setLink({ href: V.value }).updateAttributes("link", { download: w.value ? "file" : null }).run());
|
|
2342
|
+
}
|
|
2343
|
+
function R() {
|
|
2344
|
+
var o;
|
|
2345
|
+
(o = a.value) == null || o.chain().focus().unsetLink().run();
|
|
2346
|
+
}
|
|
2347
|
+
const p = M(""), S = M();
|
|
2348
|
+
function W() {
|
|
2349
|
+
var o;
|
|
2350
|
+
p.value && ((o = a.value) == null || o.chain().focus().setImage({ src: p.value }).run(), p.value = "");
|
|
2351
|
+
}
|
|
2352
|
+
function P() {
|
|
2353
|
+
var o;
|
|
2354
|
+
(o = S.value) == null || o.click();
|
|
2355
|
+
}
|
|
2356
|
+
function K(o) {
|
|
2357
|
+
return ge(this, null, function* () {
|
|
2358
|
+
var _, U;
|
|
2359
|
+
const u = (_ = o.target.files) == null ? void 0 : _[0];
|
|
2360
|
+
if (!u) return;
|
|
2361
|
+
const m = yield At(u);
|
|
2362
|
+
(U = a.value) == null || U.chain().focus().setImage({ src: m }).run(), o.target.value = "";
|
|
2363
|
+
});
|
|
2364
|
+
}
|
|
2365
|
+
const I = M("");
|
|
2366
|
+
function k() {
|
|
2367
|
+
var m;
|
|
2368
|
+
if (!I.value) return;
|
|
2369
|
+
const o = On(I.value), u = (m = a.value) == null ? void 0 : m.chain().focus();
|
|
2370
|
+
u && (o ? u.insertContent({ type: "mediaEmbed", attrs: { src: o } }).run() : u.insertContent({ type: "text", text: I.value, marks: [{ type: "link", attrs: { href: I.value } }] }).run(), I.value = "");
|
|
2371
|
+
}
|
|
2372
|
+
return (o, u) => {
|
|
2373
|
+
const m = N("v-btn"), _ = N("v-divider"), U = N("v-list-item-title"), q = N("v-list-item"), E = N("v-list"), x = N("v-menu"), J = N("v-text-field"), ee = N("v-checkbox"), de = N("v-card");
|
|
2374
|
+
return j(), Z("div", {
|
|
2375
|
+
class: ue(["rtf-toolbar", { "rtf-toolbar--disabled": !c.value }])
|
|
2376
|
+
}, [
|
|
2377
|
+
i(m, {
|
|
2378
|
+
icon: "",
|
|
2379
|
+
size: "small",
|
|
2380
|
+
variant: "text",
|
|
2381
|
+
title: n(e).Undo,
|
|
2382
|
+
disabled: !c.value || !d.value.canUndo,
|
|
2383
|
+
onClick: u[0] || (u[0] = (y) => {
|
|
2384
|
+
var b;
|
|
2385
|
+
return (b = a.value) == null ? void 0 : b.chain().focus().undo().run();
|
|
2386
|
+
})
|
|
2387
|
+
}, {
|
|
2388
|
+
default: s(() => [
|
|
2389
|
+
i(n(L), { name: "mdi-undo" })
|
|
2390
|
+
]),
|
|
2391
|
+
_: 1
|
|
2392
|
+
}, 8, ["title", "disabled"]),
|
|
2393
|
+
i(m, {
|
|
2394
|
+
icon: "",
|
|
2395
|
+
size: "small",
|
|
2396
|
+
variant: "text",
|
|
2397
|
+
title: n(e).Redo,
|
|
2398
|
+
disabled: !c.value || !d.value.canRedo,
|
|
2399
|
+
onClick: u[1] || (u[1] = (y) => {
|
|
2400
|
+
var b;
|
|
2401
|
+
return (b = a.value) == null ? void 0 : b.chain().focus().redo().run();
|
|
2402
|
+
})
|
|
2403
|
+
}, {
|
|
2404
|
+
default: s(() => [
|
|
2405
|
+
i(n(L), { name: "mdi-redo" })
|
|
2406
|
+
]),
|
|
2407
|
+
_: 1
|
|
2408
|
+
}, 8, ["title", "disabled"]),
|
|
2409
|
+
i(_, {
|
|
2410
|
+
vertical: "",
|
|
2411
|
+
inset: "",
|
|
2412
|
+
class: "mx-1"
|
|
2413
|
+
}),
|
|
2414
|
+
i(m, {
|
|
2415
|
+
icon: "",
|
|
2416
|
+
size: "small",
|
|
2417
|
+
variant: "text",
|
|
2418
|
+
title: n(e).SelectAll,
|
|
2419
|
+
disabled: !c.value,
|
|
2420
|
+
onClick: u[2] || (u[2] = (y) => {
|
|
2421
|
+
var b;
|
|
2422
|
+
return (b = a.value) == null ? void 0 : b.chain().focus().selectAll().run();
|
|
2423
|
+
})
|
|
2424
|
+
}, {
|
|
2425
|
+
default: s(() => [
|
|
2426
|
+
i(n(L), { name: "mdi-select-all" })
|
|
2427
|
+
]),
|
|
2428
|
+
_: 1
|
|
2429
|
+
}, 8, ["title", "disabled"]),
|
|
2430
|
+
i(_, {
|
|
2431
|
+
vertical: "",
|
|
2432
|
+
inset: "",
|
|
2433
|
+
class: "mx-1"
|
|
2434
|
+
}),
|
|
2435
|
+
i(x, null, {
|
|
2436
|
+
activator: s(({ props: y }) => [
|
|
2437
|
+
i(m, Y({
|
|
2438
|
+
size: "small",
|
|
2439
|
+
variant: "text",
|
|
2440
|
+
disabled: !c.value
|
|
2441
|
+
}, y, { "append-icon": "mdi-chevron-down" }), {
|
|
2442
|
+
default: s(() => [
|
|
2443
|
+
Q(X(f.value), 1)
|
|
2444
|
+
]),
|
|
2445
|
+
_: 1
|
|
2446
|
+
}, 16, ["disabled"])
|
|
2447
|
+
]),
|
|
2448
|
+
default: s(() => [
|
|
2449
|
+
i(E, { density: "compact" }, {
|
|
2450
|
+
default: s(() => [
|
|
2451
|
+
(j(), Z(Se, null, Ye(g, (y) => i(q, {
|
|
2452
|
+
key: y.level,
|
|
2453
|
+
active: C(y.level),
|
|
2454
|
+
onClick: (b) => v(y.level)
|
|
2455
|
+
}, {
|
|
2456
|
+
default: s(() => [
|
|
2457
|
+
i(U, null, {
|
|
2458
|
+
default: s(() => [
|
|
2459
|
+
Q(X(y.label), 1)
|
|
2460
|
+
]),
|
|
2461
|
+
_: 2
|
|
2462
|
+
}, 1024)
|
|
2463
|
+
]),
|
|
2464
|
+
_: 2
|
|
2465
|
+
}, 1032, ["active", "onClick"])), 64))
|
|
2466
|
+
]),
|
|
2467
|
+
_: 1
|
|
2468
|
+
})
|
|
2469
|
+
]),
|
|
2470
|
+
_: 1
|
|
2471
|
+
}),
|
|
2472
|
+
i(x, null, {
|
|
2473
|
+
activator: s(({ props: y }) => [
|
|
2474
|
+
i(m, Y({
|
|
2475
|
+
size: "small",
|
|
2476
|
+
variant: "text",
|
|
2477
|
+
disabled: !c.value
|
|
2478
|
+
}, y, { "append-icon": "mdi-chevron-down" }), {
|
|
2479
|
+
default: s(() => [
|
|
2480
|
+
Q(X(n(e).Style), 1)
|
|
2481
|
+
]),
|
|
2482
|
+
_: 1
|
|
2483
|
+
}, 16, ["disabled"])
|
|
2484
|
+
]),
|
|
2485
|
+
default: s(() => [
|
|
2486
|
+
i(E, { density: "compact" }, {
|
|
2487
|
+
default: s(() => [
|
|
2488
|
+
(j(!0), Z(Se, null, Ye(n(h), (y) => (j(), O(q, {
|
|
2489
|
+
key: y.key,
|
|
2490
|
+
active: B(y),
|
|
2491
|
+
onClick: (b) => a.value && n(zn)(a.value, y)
|
|
2492
|
+
}, {
|
|
2493
|
+
default: s(() => [
|
|
2494
|
+
i(U, null, {
|
|
2495
|
+
default: s(() => [
|
|
2496
|
+
Q(X(n(e)[y.key]), 1)
|
|
2497
|
+
]),
|
|
2498
|
+
_: 2
|
|
2499
|
+
}, 1024)
|
|
2500
|
+
]),
|
|
2501
|
+
_: 2
|
|
2502
|
+
}, 1032, ["active", "onClick"]))), 128))
|
|
2503
|
+
]),
|
|
2504
|
+
_: 1
|
|
2505
|
+
})
|
|
2506
|
+
]),
|
|
2507
|
+
_: 1
|
|
2508
|
+
}),
|
|
2509
|
+
i(_, {
|
|
2510
|
+
vertical: "",
|
|
2511
|
+
inset: "",
|
|
2512
|
+
class: "mx-1"
|
|
2513
|
+
}),
|
|
2514
|
+
i(m, {
|
|
2515
|
+
icon: "",
|
|
2516
|
+
size: "small",
|
|
2517
|
+
variant: "text",
|
|
2518
|
+
title: n(e).Bold,
|
|
2519
|
+
disabled: !c.value,
|
|
2520
|
+
active: d.value.bold,
|
|
2521
|
+
onClick: u[3] || (u[3] = (y) => {
|
|
2522
|
+
var b;
|
|
2523
|
+
return (b = a.value) == null ? void 0 : b.chain().focus().toggleBold().run();
|
|
2524
|
+
})
|
|
2525
|
+
}, {
|
|
2526
|
+
default: s(() => [
|
|
2527
|
+
i(n(L), { name: "mdi-format-bold" })
|
|
2528
|
+
]),
|
|
2529
|
+
_: 1
|
|
2530
|
+
}, 8, ["title", "disabled", "active"]),
|
|
2531
|
+
i(m, {
|
|
2532
|
+
icon: "",
|
|
2533
|
+
size: "small",
|
|
2534
|
+
variant: "text",
|
|
2535
|
+
title: n(e).Italic,
|
|
2536
|
+
disabled: !c.value,
|
|
2537
|
+
active: d.value.italic,
|
|
2538
|
+
onClick: u[4] || (u[4] = (y) => {
|
|
2539
|
+
var b;
|
|
2540
|
+
return (b = a.value) == null ? void 0 : b.chain().focus().toggleItalic().run();
|
|
2541
|
+
})
|
|
2542
|
+
}, {
|
|
2543
|
+
default: s(() => [
|
|
2544
|
+
i(n(L), { name: "mdi-format-italic" })
|
|
2545
|
+
]),
|
|
2546
|
+
_: 1
|
|
2547
|
+
}, 8, ["title", "disabled", "active"]),
|
|
2548
|
+
i(_, {
|
|
2549
|
+
vertical: "",
|
|
2550
|
+
inset: "",
|
|
2551
|
+
class: "mx-1"
|
|
2552
|
+
}),
|
|
2553
|
+
i(m, {
|
|
2554
|
+
icon: "",
|
|
2555
|
+
size: "small",
|
|
2556
|
+
variant: "text",
|
|
2557
|
+
title: n(e).HorizontalLine,
|
|
2558
|
+
disabled: !c.value,
|
|
2559
|
+
onClick: u[5] || (u[5] = (y) => {
|
|
2560
|
+
var b;
|
|
2561
|
+
return (b = a.value) == null ? void 0 : b.chain().focus().setHorizontalRule().run();
|
|
2562
|
+
})
|
|
2563
|
+
}, {
|
|
2564
|
+
default: s(() => [
|
|
2565
|
+
i(n(L), { name: "mdi-minus" })
|
|
2566
|
+
]),
|
|
2567
|
+
_: 1
|
|
2568
|
+
}, 8, ["title", "disabled"]),
|
|
2569
|
+
i(x, {
|
|
2570
|
+
"close-on-content-click": !1,
|
|
2571
|
+
"onUpdate:modelValue": u[8] || (u[8] = (y) => y && T())
|
|
2572
|
+
}, {
|
|
2573
|
+
activator: s(({ props: y }) => [
|
|
2574
|
+
i(m, Y({
|
|
2575
|
+
icon: "",
|
|
2576
|
+
size: "small",
|
|
2577
|
+
variant: "text",
|
|
2578
|
+
title: n(e).Link,
|
|
2579
|
+
disabled: !c.value,
|
|
2580
|
+
active: d.value.link
|
|
2581
|
+
}, y), {
|
|
2582
|
+
default: s(() => [
|
|
2583
|
+
i(n(L), { name: "mdi-link-variant" })
|
|
2584
|
+
]),
|
|
2585
|
+
_: 1
|
|
2586
|
+
}, 16, ["title", "disabled", "active"])
|
|
2587
|
+
]),
|
|
2588
|
+
default: s(() => [
|
|
2589
|
+
i(de, {
|
|
2590
|
+
"min-width": "280",
|
|
2591
|
+
class: "pa-3"
|
|
2592
|
+
}, {
|
|
2593
|
+
default: s(() => [
|
|
2594
|
+
i(J, {
|
|
2595
|
+
modelValue: V.value,
|
|
2596
|
+
"onUpdate:modelValue": u[6] || (u[6] = (y) => V.value = y),
|
|
2597
|
+
label: n(e).LinkUrl,
|
|
2598
|
+
density: "compact",
|
|
2599
|
+
"hide-details": "",
|
|
2600
|
+
autofocus: "",
|
|
2601
|
+
onKeydown: De(D, ["enter"])
|
|
2602
|
+
}, null, 8, ["modelValue", "label"]),
|
|
2603
|
+
i(ee, {
|
|
2604
|
+
modelValue: w.value,
|
|
2605
|
+
"onUpdate:modelValue": u[7] || (u[7] = (y) => w.value = y),
|
|
2606
|
+
label: n(e).Downloadable,
|
|
2607
|
+
density: "compact",
|
|
2608
|
+
"hide-details": "",
|
|
2609
|
+
class: "mt-1"
|
|
2610
|
+
}, null, 8, ["modelValue", "label"]),
|
|
2611
|
+
ae("div", qn, [
|
|
2612
|
+
d.value.link ? (j(), O(m, {
|
|
2613
|
+
key: 0,
|
|
2614
|
+
size: "small",
|
|
2615
|
+
variant: "text",
|
|
2616
|
+
onClick: R
|
|
2617
|
+
}, {
|
|
2618
|
+
default: s(() => [
|
|
2619
|
+
Q(X(n(e).LinkRemove), 1)
|
|
2620
|
+
]),
|
|
2621
|
+
_: 1
|
|
2622
|
+
})) : G("", !0),
|
|
2623
|
+
i(m, {
|
|
2624
|
+
size: "small",
|
|
2625
|
+
color: "primary",
|
|
2626
|
+
variant: "tonal",
|
|
2627
|
+
onClick: D
|
|
2628
|
+
}, {
|
|
2629
|
+
default: s(() => [
|
|
2630
|
+
Q(X(n(e).LinkApply), 1)
|
|
2631
|
+
]),
|
|
2632
|
+
_: 1
|
|
2633
|
+
})
|
|
2634
|
+
])
|
|
2635
|
+
]),
|
|
2636
|
+
_: 1
|
|
2637
|
+
})
|
|
2638
|
+
]),
|
|
2639
|
+
_: 1
|
|
2640
|
+
}),
|
|
2641
|
+
i(x, { "close-on-content-click": !1 }, {
|
|
2642
|
+
activator: s(({ props: y }) => [
|
|
2643
|
+
i(m, Y({
|
|
2644
|
+
icon: "",
|
|
2645
|
+
size: "small",
|
|
2646
|
+
variant: "text",
|
|
2647
|
+
title: n(e).Image,
|
|
2648
|
+
disabled: !c.value
|
|
2649
|
+
}, y), {
|
|
2650
|
+
default: s(() => [
|
|
2651
|
+
i(n(L), { name: "mdi-image-plus" })
|
|
2652
|
+
]),
|
|
2653
|
+
_: 1
|
|
2654
|
+
}, 16, ["title", "disabled"])
|
|
2655
|
+
]),
|
|
2656
|
+
default: s(() => [
|
|
2657
|
+
i(de, {
|
|
2658
|
+
"min-width": "280",
|
|
2659
|
+
class: "pa-3"
|
|
2660
|
+
}, {
|
|
2661
|
+
default: s(() => [
|
|
2662
|
+
i(J, {
|
|
2663
|
+
modelValue: p.value,
|
|
2664
|
+
"onUpdate:modelValue": u[9] || (u[9] = (y) => p.value = y),
|
|
2665
|
+
label: n(e).ImageUrl,
|
|
2666
|
+
density: "compact",
|
|
2667
|
+
"hide-details": "",
|
|
2668
|
+
autofocus: "",
|
|
2669
|
+
onKeydown: De(W, ["enter"])
|
|
2670
|
+
}, null, 8, ["modelValue", "label"]),
|
|
2671
|
+
ae("div", Kn, [
|
|
2672
|
+
i(m, {
|
|
2673
|
+
size: "small",
|
|
2674
|
+
variant: "text",
|
|
2675
|
+
"prepend-icon": "mdi-upload",
|
|
2676
|
+
onClick: P
|
|
2677
|
+
}, {
|
|
2678
|
+
default: s(() => [
|
|
2679
|
+
Q(X(n(e).ImageUpload), 1)
|
|
2680
|
+
]),
|
|
2681
|
+
_: 1
|
|
2682
|
+
}),
|
|
2683
|
+
i(m, {
|
|
2684
|
+
size: "small",
|
|
2685
|
+
color: "primary",
|
|
2686
|
+
variant: "tonal",
|
|
2687
|
+
onClick: W
|
|
2688
|
+
}, {
|
|
2689
|
+
default: s(() => [
|
|
2690
|
+
Q(X(n(e).ImageInsert), 1)
|
|
2691
|
+
]),
|
|
2692
|
+
_: 1
|
|
2693
|
+
})
|
|
2694
|
+
])
|
|
2695
|
+
]),
|
|
2696
|
+
_: 1
|
|
2697
|
+
})
|
|
2698
|
+
]),
|
|
2699
|
+
_: 1
|
|
2700
|
+
}),
|
|
2701
|
+
ae("input", {
|
|
2702
|
+
ref_key: "imageInput",
|
|
2703
|
+
ref: S,
|
|
2704
|
+
type: "file",
|
|
2705
|
+
accept: "image/*",
|
|
2706
|
+
class: "d-none",
|
|
2707
|
+
onChange: K
|
|
2708
|
+
}, null, 544),
|
|
2709
|
+
i(x, { "close-on-content-click": !1 }, {
|
|
2710
|
+
activator: s(({ props: y }) => [
|
|
2711
|
+
i(m, Y({
|
|
2712
|
+
icon: "",
|
|
2713
|
+
size: "small",
|
|
2714
|
+
variant: "text",
|
|
2715
|
+
title: n(e).MediaEmbed,
|
|
2716
|
+
disabled: !c.value
|
|
2717
|
+
}, y), {
|
|
2718
|
+
default: s(() => [
|
|
2719
|
+
i(n(L), { name: "mdi-video-plus" })
|
|
2720
|
+
]),
|
|
2721
|
+
_: 1
|
|
2722
|
+
}, 16, ["title", "disabled"])
|
|
2723
|
+
]),
|
|
2724
|
+
default: s(() => [
|
|
2725
|
+
i(de, {
|
|
2726
|
+
"min-width": "280",
|
|
2727
|
+
class: "pa-3"
|
|
2728
|
+
}, {
|
|
2729
|
+
default: s(() => [
|
|
2730
|
+
i(J, {
|
|
2731
|
+
modelValue: I.value,
|
|
2732
|
+
"onUpdate:modelValue": u[10] || (u[10] = (y) => I.value = y),
|
|
2733
|
+
label: n(e).MediaEmbedUrl,
|
|
2734
|
+
density: "compact",
|
|
2735
|
+
"hide-details": "",
|
|
2736
|
+
autofocus: "",
|
|
2737
|
+
onKeydown: De(k, ["enter"])
|
|
2738
|
+
}, null, 8, ["modelValue", "label"]),
|
|
2739
|
+
ae("div", Xn, [
|
|
2740
|
+
i(m, {
|
|
2741
|
+
size: "small",
|
|
2742
|
+
color: "primary",
|
|
2743
|
+
variant: "tonal",
|
|
2744
|
+
onClick: k
|
|
2745
|
+
}, {
|
|
2746
|
+
default: s(() => [
|
|
2747
|
+
Q(X(n(e).MediaEmbedInsert), 1)
|
|
2748
|
+
]),
|
|
2749
|
+
_: 1
|
|
2750
|
+
})
|
|
2751
|
+
])
|
|
2752
|
+
]),
|
|
2753
|
+
_: 1
|
|
2754
|
+
})
|
|
2755
|
+
]),
|
|
2756
|
+
_: 1
|
|
2757
|
+
}),
|
|
2758
|
+
i(x, null, {
|
|
2759
|
+
activator: s(({ props: y }) => [
|
|
2760
|
+
i(m, Y({
|
|
2761
|
+
icon: "",
|
|
2762
|
+
size: "small",
|
|
2763
|
+
variant: "text",
|
|
2764
|
+
title: n(e).Table,
|
|
2765
|
+
disabled: !c.value
|
|
2766
|
+
}, y), {
|
|
2767
|
+
default: s(() => [
|
|
2768
|
+
i(n(L), { name: "mdi-table" })
|
|
2769
|
+
]),
|
|
2770
|
+
_: 1
|
|
2771
|
+
}, 16, ["title", "disabled"])
|
|
2772
|
+
]),
|
|
2773
|
+
default: s(() => [
|
|
2774
|
+
i(E, { density: "compact" }, {
|
|
2775
|
+
default: s(() => [
|
|
2776
|
+
i(q, {
|
|
2777
|
+
onClick: u[11] || (u[11] = (y) => {
|
|
2778
|
+
var b;
|
|
2779
|
+
return (b = a.value) == null ? void 0 : b.chain().focus().insertTable({ rows: 3, cols: 3, withHeaderRow: !0 }).run();
|
|
2780
|
+
})
|
|
2781
|
+
}, {
|
|
2782
|
+
prepend: s(() => [
|
|
2783
|
+
i(n(L), { name: "mdi-table-plus" })
|
|
2784
|
+
]),
|
|
2785
|
+
default: s(() => [
|
|
2786
|
+
i(U, null, {
|
|
2787
|
+
default: s(() => [
|
|
2788
|
+
Q(X(n(e).TableInsert), 1)
|
|
2789
|
+
]),
|
|
2790
|
+
_: 1
|
|
2791
|
+
})
|
|
2792
|
+
]),
|
|
2793
|
+
_: 1
|
|
2794
|
+
}),
|
|
2795
|
+
i(_),
|
|
2796
|
+
i(q, {
|
|
2797
|
+
disabled: !d.value.inTable,
|
|
2798
|
+
onClick: u[12] || (u[12] = (y) => {
|
|
2799
|
+
var b;
|
|
2800
|
+
return (b = a.value) == null ? void 0 : b.chain().focus().addRowBefore().run();
|
|
2801
|
+
})
|
|
2802
|
+
}, {
|
|
2803
|
+
prepend: s(() => [
|
|
2804
|
+
i(n(L), { name: "mdi-table-row-plus-before" })
|
|
2805
|
+
]),
|
|
2806
|
+
default: s(() => [
|
|
2807
|
+
i(U, null, {
|
|
2808
|
+
default: s(() => [
|
|
2809
|
+
Q(X(n(e).TableAddRowAbove), 1)
|
|
2810
|
+
]),
|
|
2811
|
+
_: 1
|
|
2812
|
+
})
|
|
2813
|
+
]),
|
|
2814
|
+
_: 1
|
|
2815
|
+
}, 8, ["disabled"]),
|
|
2816
|
+
i(q, {
|
|
2817
|
+
disabled: !d.value.inTable,
|
|
2818
|
+
onClick: u[13] || (u[13] = (y) => {
|
|
2819
|
+
var b;
|
|
2820
|
+
return (b = a.value) == null ? void 0 : b.chain().focus().addRowAfter().run();
|
|
2821
|
+
})
|
|
2822
|
+
}, {
|
|
2823
|
+
prepend: s(() => [
|
|
2824
|
+
i(n(L), { name: "mdi-table-row-plus-after" })
|
|
2825
|
+
]),
|
|
2826
|
+
default: s(() => [
|
|
2827
|
+
i(U, null, {
|
|
2828
|
+
default: s(() => [
|
|
2829
|
+
Q(X(n(e).TableAddRowBelow), 1)
|
|
2830
|
+
]),
|
|
2831
|
+
_: 1
|
|
2832
|
+
})
|
|
2833
|
+
]),
|
|
2834
|
+
_: 1
|
|
2835
|
+
}, 8, ["disabled"]),
|
|
2836
|
+
i(q, {
|
|
2837
|
+
disabled: !d.value.inTable,
|
|
2838
|
+
onClick: u[14] || (u[14] = (y) => {
|
|
2839
|
+
var b;
|
|
2840
|
+
return (b = a.value) == null ? void 0 : b.chain().focus().deleteRow().run();
|
|
2841
|
+
})
|
|
2842
|
+
}, {
|
|
2843
|
+
prepend: s(() => [
|
|
2844
|
+
i(n(L), { name: "mdi-table-row-remove" })
|
|
2845
|
+
]),
|
|
2846
|
+
default: s(() => [
|
|
2847
|
+
i(U, null, {
|
|
2848
|
+
default: s(() => [
|
|
2849
|
+
Q(X(n(e).TableDeleteRow), 1)
|
|
2850
|
+
]),
|
|
2851
|
+
_: 1
|
|
2852
|
+
})
|
|
2853
|
+
]),
|
|
2854
|
+
_: 1
|
|
2855
|
+
}, 8, ["disabled"]),
|
|
2856
|
+
i(_),
|
|
2857
|
+
i(q, {
|
|
2858
|
+
disabled: !d.value.inTable,
|
|
2859
|
+
onClick: u[15] || (u[15] = (y) => {
|
|
2860
|
+
var b;
|
|
2861
|
+
return (b = a.value) == null ? void 0 : b.chain().focus().addColumnBefore().run();
|
|
2862
|
+
})
|
|
2863
|
+
}, {
|
|
2864
|
+
prepend: s(() => [
|
|
2865
|
+
i(n(L), { name: "mdi-table-column-plus-before" })
|
|
2866
|
+
]),
|
|
2867
|
+
default: s(() => [
|
|
2868
|
+
i(U, null, {
|
|
2869
|
+
default: s(() => [
|
|
2870
|
+
Q(X(n(e).TableAddColumnBefore), 1)
|
|
2871
|
+
]),
|
|
2872
|
+
_: 1
|
|
2873
|
+
})
|
|
2874
|
+
]),
|
|
2875
|
+
_: 1
|
|
2876
|
+
}, 8, ["disabled"]),
|
|
2877
|
+
i(q, {
|
|
2878
|
+
disabled: !d.value.inTable,
|
|
2879
|
+
onClick: u[16] || (u[16] = (y) => {
|
|
2880
|
+
var b;
|
|
2881
|
+
return (b = a.value) == null ? void 0 : b.chain().focus().addColumnAfter().run();
|
|
2882
|
+
})
|
|
2883
|
+
}, {
|
|
2884
|
+
prepend: s(() => [
|
|
2885
|
+
i(n(L), { name: "mdi-table-column-plus-after" })
|
|
2886
|
+
]),
|
|
2887
|
+
default: s(() => [
|
|
2888
|
+
i(U, null, {
|
|
2889
|
+
default: s(() => [
|
|
2890
|
+
Q(X(n(e).TableAddColumnAfter), 1)
|
|
2891
|
+
]),
|
|
2892
|
+
_: 1
|
|
2893
|
+
})
|
|
2894
|
+
]),
|
|
2895
|
+
_: 1
|
|
2896
|
+
}, 8, ["disabled"]),
|
|
2897
|
+
i(q, {
|
|
2898
|
+
disabled: !d.value.inTable,
|
|
2899
|
+
onClick: u[17] || (u[17] = (y) => {
|
|
2900
|
+
var b;
|
|
2901
|
+
return (b = a.value) == null ? void 0 : b.chain().focus().deleteColumn().run();
|
|
2902
|
+
})
|
|
2903
|
+
}, {
|
|
2904
|
+
prepend: s(() => [
|
|
2905
|
+
i(n(L), { name: "mdi-table-column-remove" })
|
|
2906
|
+
]),
|
|
2907
|
+
default: s(() => [
|
|
2908
|
+
i(U, null, {
|
|
2909
|
+
default: s(() => [
|
|
2910
|
+
Q(X(n(e).TableDeleteColumn), 1)
|
|
2911
|
+
]),
|
|
2912
|
+
_: 1
|
|
2913
|
+
})
|
|
2914
|
+
]),
|
|
2915
|
+
_: 1
|
|
2916
|
+
}, 8, ["disabled"]),
|
|
2917
|
+
i(_),
|
|
2918
|
+
i(q, {
|
|
2919
|
+
disabled: !d.value.inTable,
|
|
2920
|
+
onClick: u[18] || (u[18] = (y) => {
|
|
2921
|
+
var b;
|
|
2922
|
+
return (b = a.value) == null ? void 0 : b.chain().focus().toggleHeaderRow().run();
|
|
2923
|
+
})
|
|
2924
|
+
}, {
|
|
2925
|
+
prepend: s(() => [
|
|
2926
|
+
i(n(L), { name: "mdi-table-row" })
|
|
2927
|
+
]),
|
|
2928
|
+
default: s(() => [
|
|
2929
|
+
i(U, null, {
|
|
2930
|
+
default: s(() => [
|
|
2931
|
+
Q(X(n(e).TableToggleHeaderRow), 1)
|
|
2932
|
+
]),
|
|
2933
|
+
_: 1
|
|
2934
|
+
})
|
|
2935
|
+
]),
|
|
2936
|
+
_: 1
|
|
2937
|
+
}, 8, ["disabled"]),
|
|
2938
|
+
i(q, {
|
|
2939
|
+
disabled: !d.value.inTable,
|
|
2940
|
+
onClick: u[19] || (u[19] = (y) => {
|
|
2941
|
+
var b;
|
|
2942
|
+
return (b = a.value) == null ? void 0 : b.chain().focus().deleteTable().run();
|
|
2943
|
+
})
|
|
2944
|
+
}, {
|
|
2945
|
+
prepend: s(() => [
|
|
2946
|
+
i(n(L), { name: "mdi-table-remove" })
|
|
2947
|
+
]),
|
|
2948
|
+
default: s(() => [
|
|
2949
|
+
i(U, null, {
|
|
2950
|
+
default: s(() => [
|
|
2951
|
+
Q(X(n(e).TableDeleteTable), 1)
|
|
2952
|
+
]),
|
|
2953
|
+
_: 1
|
|
2954
|
+
})
|
|
2955
|
+
]),
|
|
2956
|
+
_: 1
|
|
2957
|
+
}, 8, ["disabled"])
|
|
2958
|
+
]),
|
|
2959
|
+
_: 1
|
|
2960
|
+
})
|
|
2961
|
+
]),
|
|
2962
|
+
_: 1
|
|
2963
|
+
}),
|
|
2964
|
+
i(m, {
|
|
2965
|
+
icon: "",
|
|
2966
|
+
size: "small",
|
|
2967
|
+
variant: "text",
|
|
2968
|
+
title: n(e).Blockquote,
|
|
2969
|
+
disabled: !c.value,
|
|
2970
|
+
active: d.value.blockquote,
|
|
2971
|
+
onClick: u[20] || (u[20] = (y) => {
|
|
2972
|
+
var b;
|
|
2973
|
+
return (b = a.value) == null ? void 0 : b.chain().focus().toggleBlockquote().run();
|
|
2974
|
+
})
|
|
2975
|
+
}, {
|
|
2976
|
+
default: s(() => [
|
|
2977
|
+
i(n(L), { name: "mdi-format-quote-close" })
|
|
2978
|
+
]),
|
|
2979
|
+
_: 1
|
|
2980
|
+
}, 8, ["title", "disabled", "active"]),
|
|
2981
|
+
i(_, {
|
|
2982
|
+
vertical: "",
|
|
2983
|
+
inset: "",
|
|
2984
|
+
class: "mx-1"
|
|
2985
|
+
}),
|
|
2986
|
+
i(m, {
|
|
2987
|
+
icon: "",
|
|
2988
|
+
size: "small",
|
|
2989
|
+
variant: "text",
|
|
2990
|
+
title: n(e).AlignLeft,
|
|
2991
|
+
disabled: !c.value,
|
|
2992
|
+
active: d.value.alignLeft,
|
|
2993
|
+
onClick: u[21] || (u[21] = (y) => {
|
|
2994
|
+
var b;
|
|
2995
|
+
return (b = a.value) == null ? void 0 : b.chain().focus().setTextAlign("left").run();
|
|
2996
|
+
})
|
|
2997
|
+
}, {
|
|
2998
|
+
default: s(() => [
|
|
2999
|
+
i(n(L), { name: "mdi-format-align-left" })
|
|
3000
|
+
]),
|
|
3001
|
+
_: 1
|
|
3002
|
+
}, 8, ["title", "disabled", "active"]),
|
|
3003
|
+
i(m, {
|
|
3004
|
+
icon: "",
|
|
3005
|
+
size: "small",
|
|
3006
|
+
variant: "text",
|
|
3007
|
+
title: n(e).AlignCenter,
|
|
3008
|
+
disabled: !c.value,
|
|
3009
|
+
active: d.value.alignCenter,
|
|
3010
|
+
onClick: u[22] || (u[22] = (y) => {
|
|
3011
|
+
var b;
|
|
3012
|
+
return (b = a.value) == null ? void 0 : b.chain().focus().setTextAlign("center").run();
|
|
3013
|
+
})
|
|
3014
|
+
}, {
|
|
3015
|
+
default: s(() => [
|
|
3016
|
+
i(n(L), { name: "mdi-format-align-center" })
|
|
3017
|
+
]),
|
|
3018
|
+
_: 1
|
|
3019
|
+
}, 8, ["title", "disabled", "active"]),
|
|
3020
|
+
i(m, {
|
|
3021
|
+
icon: "",
|
|
3022
|
+
size: "small",
|
|
3023
|
+
variant: "text",
|
|
3024
|
+
title: n(e).AlignRight,
|
|
3025
|
+
disabled: !c.value,
|
|
3026
|
+
active: d.value.alignRight,
|
|
3027
|
+
onClick: u[23] || (u[23] = (y) => {
|
|
3028
|
+
var b;
|
|
3029
|
+
return (b = a.value) == null ? void 0 : b.chain().focus().setTextAlign("right").run();
|
|
3030
|
+
})
|
|
3031
|
+
}, {
|
|
3032
|
+
default: s(() => [
|
|
3033
|
+
i(n(L), { name: "mdi-format-align-right" })
|
|
3034
|
+
]),
|
|
3035
|
+
_: 1
|
|
3036
|
+
}, 8, ["title", "disabled", "active"]),
|
|
3037
|
+
i(m, {
|
|
3038
|
+
icon: "",
|
|
3039
|
+
size: "small",
|
|
3040
|
+
variant: "text",
|
|
3041
|
+
title: n(e).AlignJustify,
|
|
3042
|
+
disabled: !c.value,
|
|
3043
|
+
active: d.value.alignJustify,
|
|
3044
|
+
onClick: u[24] || (u[24] = (y) => {
|
|
3045
|
+
var b;
|
|
3046
|
+
return (b = a.value) == null ? void 0 : b.chain().focus().setTextAlign("justify").run();
|
|
3047
|
+
})
|
|
3048
|
+
}, {
|
|
3049
|
+
default: s(() => [
|
|
3050
|
+
i(n(L), { name: "mdi-format-align-justify" })
|
|
3051
|
+
]),
|
|
3052
|
+
_: 1
|
|
3053
|
+
}, 8, ["title", "disabled", "active"]),
|
|
3054
|
+
i(_, {
|
|
3055
|
+
vertical: "",
|
|
3056
|
+
inset: "",
|
|
3057
|
+
class: "mx-1"
|
|
3058
|
+
}),
|
|
3059
|
+
i(m, {
|
|
3060
|
+
icon: "",
|
|
3061
|
+
size: "small",
|
|
3062
|
+
variant: "text",
|
|
3063
|
+
title: n(e).BulletedList,
|
|
3064
|
+
disabled: !c.value,
|
|
3065
|
+
active: d.value.bulletList,
|
|
3066
|
+
onClick: u[25] || (u[25] = (y) => {
|
|
3067
|
+
var b;
|
|
3068
|
+
return (b = a.value) == null ? void 0 : b.chain().focus().toggleBulletList().run();
|
|
3069
|
+
})
|
|
3070
|
+
}, {
|
|
3071
|
+
default: s(() => [
|
|
3072
|
+
i(n(L), { name: "mdi-format-list-bulleted" })
|
|
3073
|
+
]),
|
|
3074
|
+
_: 1
|
|
3075
|
+
}, 8, ["title", "disabled", "active"]),
|
|
3076
|
+
i(m, {
|
|
3077
|
+
icon: "",
|
|
3078
|
+
size: "small",
|
|
3079
|
+
variant: "text",
|
|
3080
|
+
title: n(e).NumberedList,
|
|
3081
|
+
disabled: !c.value,
|
|
3082
|
+
active: d.value.orderedList,
|
|
3083
|
+
onClick: u[26] || (u[26] = (y) => {
|
|
3084
|
+
var b;
|
|
3085
|
+
return (b = a.value) == null ? void 0 : b.chain().focus().toggleOrderedList().run();
|
|
3086
|
+
})
|
|
3087
|
+
}, {
|
|
3088
|
+
default: s(() => [
|
|
3089
|
+
i(n(L), { name: "mdi-format-list-numbered" })
|
|
3090
|
+
]),
|
|
3091
|
+
_: 1
|
|
3092
|
+
}, 8, ["title", "disabled", "active"]),
|
|
3093
|
+
i(m, {
|
|
3094
|
+
icon: "",
|
|
3095
|
+
size: "small",
|
|
3096
|
+
variant: "text",
|
|
3097
|
+
title: n(e).Outdent,
|
|
3098
|
+
disabled: !c.value || !d.value.canLift,
|
|
3099
|
+
onClick: u[27] || (u[27] = (y) => {
|
|
3100
|
+
var b;
|
|
3101
|
+
return (b = a.value) == null ? void 0 : b.chain().focus().liftListItem("listItem").run();
|
|
3102
|
+
})
|
|
3103
|
+
}, {
|
|
3104
|
+
default: s(() => [
|
|
3105
|
+
i(n(L), { name: "mdi-format-indent-decrease" })
|
|
3106
|
+
]),
|
|
3107
|
+
_: 1
|
|
3108
|
+
}, 8, ["title", "disabled"]),
|
|
3109
|
+
i(m, {
|
|
3110
|
+
icon: "",
|
|
3111
|
+
size: "small",
|
|
3112
|
+
variant: "text",
|
|
3113
|
+
title: n(e).Indent,
|
|
3114
|
+
disabled: !c.value || !d.value.canSink,
|
|
3115
|
+
onClick: u[28] || (u[28] = (y) => {
|
|
3116
|
+
var b;
|
|
3117
|
+
return (b = a.value) == null ? void 0 : b.chain().focus().sinkListItem("listItem").run();
|
|
3118
|
+
})
|
|
3119
|
+
}, {
|
|
3120
|
+
default: s(() => [
|
|
3121
|
+
i(n(L), { name: "mdi-format-indent-increase" })
|
|
3122
|
+
]),
|
|
3123
|
+
_: 1
|
|
3124
|
+
}, 8, ["title", "disabled"])
|
|
3125
|
+
], 2);
|
|
2045
3126
|
};
|
|
2046
3127
|
}
|
|
2047
|
-
}),
|
|
2048
|
-
|
|
3128
|
+
}), Gn = /^[a-z][a-z0-9]*:[a-z]/i, Jn = /mso-[a-z-]+\s*:[^;]+;?/gi, Qn = /^Mso/i, Zn = /background(?:-color)?\s*:[^;]+;?/gi;
|
|
3129
|
+
function ea(t) {
|
|
3130
|
+
const l = document.createTreeWalker(t, NodeFilter.SHOW_COMMENT), e = [];
|
|
3131
|
+
for (let a = l.nextNode(); a; a = l.nextNode()) e.push(a);
|
|
3132
|
+
e.forEach((a) => {
|
|
3133
|
+
var r;
|
|
3134
|
+
return (r = a.parentNode) == null ? void 0 : r.removeChild(a);
|
|
3135
|
+
});
|
|
3136
|
+
}
|
|
3137
|
+
function it(t) {
|
|
3138
|
+
const l = t.parentNode;
|
|
3139
|
+
if (l) {
|
|
3140
|
+
for (; t.firstChild; ) l.insertBefore(t.firstChild, t);
|
|
3141
|
+
l.removeChild(t);
|
|
3142
|
+
}
|
|
3143
|
+
}
|
|
3144
|
+
function ta(t) {
|
|
3145
|
+
const l = t.getAttribute("style");
|
|
3146
|
+
if (l != null) {
|
|
3147
|
+
const a = l.replace(Jn, "").replace(Zn, "").trim();
|
|
3148
|
+
a ? t.setAttribute("style", a) : t.removeAttribute("style");
|
|
3149
|
+
}
|
|
3150
|
+
const e = t.getAttribute("class");
|
|
3151
|
+
if (e != null) {
|
|
3152
|
+
const a = e.split(/\s+/).filter((r) => r && !Qn.test(r)).join(" ");
|
|
3153
|
+
a ? t.setAttribute("class", a) : t.removeAttribute("class");
|
|
3154
|
+
}
|
|
3155
|
+
t.removeAttribute("lang"), t.removeAttribute("xml:lang"), t.removeAttribute("id"), t.removeAttribute("align"), t.removeAttribute("bgcolor");
|
|
3156
|
+
}
|
|
3157
|
+
function la(t) {
|
|
3158
|
+
if (!t || typeof DOMParser == "undefined") return t;
|
|
3159
|
+
const e = new DOMParser().parseFromString(t, "text/html").body;
|
|
3160
|
+
return e ? (ea(e), e.querySelectorAll("xml, style, script, meta, link").forEach((a) => a.remove()), Array.from(e.querySelectorAll("*")).forEach((a) => {
|
|
3161
|
+
if (Gn.test(a.tagName) || a.tagName === "FONT") {
|
|
3162
|
+
it(a);
|
|
3163
|
+
return;
|
|
3164
|
+
}
|
|
3165
|
+
ta(a);
|
|
3166
|
+
}), Array.from(e.querySelectorAll("span, div")).forEach((a) => {
|
|
3167
|
+
a.attributes.length === 0 && it(a);
|
|
3168
|
+
}), e.innerHTML) : t;
|
|
3169
|
+
}
|
|
3170
|
+
const na = { class: "editor-container" }, aa = { class: "rtf-bubble-menu" }, oa = /* @__PURE__ */ le({
|
|
3171
|
+
__name: "editor-core",
|
|
2049
3172
|
props: {
|
|
2050
3173
|
modelValue: { default: "" },
|
|
2051
3174
|
minHeight: { default: "7em" },
|
|
2052
3175
|
disabled: { type: Boolean, default: !1 }
|
|
2053
3176
|
},
|
|
2054
3177
|
emits: ["update:modelValue"],
|
|
2055
|
-
setup(
|
|
2056
|
-
|
|
2057
|
-
|
|
3178
|
+
setup(t, { emit: l }) {
|
|
3179
|
+
Et((v) => ({
|
|
3180
|
+
v3d306a89: v.minHeight
|
|
2058
3181
|
}));
|
|
2059
|
-
const
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
"
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
"link",
|
|
2074
|
-
"mediaEmbed",
|
|
2075
|
-
"insertTable",
|
|
2076
|
-
"blockQuote",
|
|
2077
|
-
"|",
|
|
2078
|
-
"alignment",
|
|
2079
|
-
"|",
|
|
2080
|
-
"bulletedList",
|
|
2081
|
-
"numberedList",
|
|
2082
|
-
"outdent",
|
|
2083
|
-
"indent",
|
|
2084
|
-
"|",
|
|
2085
|
-
"accessibilityHelp"
|
|
2086
|
-
],
|
|
2087
|
-
shouldNotGroupWhenFull: !1
|
|
2088
|
-
}, c = [
|
|
2089
|
-
tn,
|
|
2090
|
-
nn,
|
|
2091
|
-
on,
|
|
2092
|
-
ln,
|
|
2093
|
-
an,
|
|
2094
|
-
rn,
|
|
2095
|
-
sn,
|
|
2096
|
-
un,
|
|
2097
|
-
cn,
|
|
2098
|
-
dn,
|
|
2099
|
-
mn,
|
|
2100
|
-
fn,
|
|
2101
|
-
vn,
|
|
2102
|
-
pn,
|
|
2103
|
-
hn,
|
|
2104
|
-
bn,
|
|
2105
|
-
gn,
|
|
2106
|
-
yn,
|
|
2107
|
-
wn,
|
|
2108
|
-
kn,
|
|
2109
|
-
Cn,
|
|
2110
|
-
Vn,
|
|
2111
|
-
jn,
|
|
2112
|
-
Tn,
|
|
2113
|
-
xn,
|
|
2114
|
-
_n,
|
|
2115
|
-
Bn,
|
|
2116
|
-
Dn,
|
|
2117
|
-
In,
|
|
2118
|
-
Sn,
|
|
2119
|
-
Pn,
|
|
2120
|
-
En,
|
|
2121
|
-
An,
|
|
2122
|
-
$n,
|
|
2123
|
-
Mn,
|
|
2124
|
-
Rn,
|
|
2125
|
-
Fn,
|
|
2126
|
-
Ln,
|
|
2127
|
-
Nn,
|
|
2128
|
-
Un,
|
|
2129
|
-
On
|
|
2130
|
-
], p = {
|
|
2131
|
-
options: [
|
|
2132
|
-
{ model: "paragraph", title: L.Paragraph, class: "ck-heading_paragraph" },
|
|
2133
|
-
{ model: "heading1", view: "h1", title: L.Heading1, class: "ck-heading_heading1" },
|
|
2134
|
-
{ model: "heading2", view: "h2", title: L.Heading2, class: "ck-heading_heading2" },
|
|
2135
|
-
{ model: "heading3", view: "h3", title: L.Heading3, class: "ck-heading_heading3" },
|
|
2136
|
-
{ model: "heading4", view: "h4", title: L.Heading4, class: "ck-heading_heading4" },
|
|
2137
|
-
{ model: "heading5", view: "h5", title: L.Heading5, class: "ck-heading_heading5" },
|
|
2138
|
-
{ model: "heading6", view: "h6", title: L.Heading6, class: "ck-heading_heading6" }
|
|
2139
|
-
]
|
|
2140
|
-
}, i = {
|
|
2141
|
-
language: Ie.language,
|
|
2142
|
-
toolbar: u,
|
|
2143
|
-
plugins: c,
|
|
2144
|
-
balloonToolbar: ["bold", "italic", "|", "link", "|", "bulletedList", "numberedList"],
|
|
2145
|
-
heading: p,
|
|
2146
|
-
htmlSupport: {
|
|
2147
|
-
allow: [{ name: /^.*$/, styles: !0, attributes: !0, classes: !0 }]
|
|
2148
|
-
},
|
|
2149
|
-
image: {
|
|
2150
|
-
toolbar: [
|
|
2151
|
-
"toggleImageCaption",
|
|
2152
|
-
"imageTextAlternative",
|
|
2153
|
-
"|",
|
|
2154
|
-
"imageStyle:inline",
|
|
2155
|
-
"imageStyle:wrapText",
|
|
2156
|
-
"imageStyle:breakText",
|
|
2157
|
-
"|",
|
|
2158
|
-
"resizeImage"
|
|
2159
|
-
]
|
|
2160
|
-
},
|
|
2161
|
-
// initialData: '',
|
|
2162
|
-
link: {
|
|
2163
|
-
addTargetToExternalLinks: !0,
|
|
2164
|
-
defaultProtocol: "https://",
|
|
2165
|
-
decorators: {
|
|
2166
|
-
toggleDownloadable: {
|
|
2167
|
-
mode: "manual",
|
|
2168
|
-
label: L.Downloadable,
|
|
2169
|
-
attributes: { download: "file" }
|
|
3182
|
+
const e = t, a = l, r = sl({
|
|
3183
|
+
content: e.modelValue,
|
|
3184
|
+
editable: !e.disabled,
|
|
3185
|
+
extensions: [
|
|
3186
|
+
rl.configure({ link: !1 }),
|
|
3187
|
+
Hn.configure({ openOnClick: !1, autolink: !0, defaultProtocol: "https" }),
|
|
3188
|
+
Zt.configure({
|
|
3189
|
+
inline: !0,
|
|
3190
|
+
allowBase64: !0,
|
|
3191
|
+
resize: {
|
|
3192
|
+
enabled: !0,
|
|
3193
|
+
directions: ["top", "right", "bottom", "left", "top-left", "top-right", "bottom-left", "bottom-right"],
|
|
3194
|
+
minWidth: 24,
|
|
3195
|
+
minHeight: 24
|
|
2170
3196
|
}
|
|
2171
|
-
}
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
3197
|
+
}),
|
|
3198
|
+
ol.configure({ types: ["heading", "paragraph"] }),
|
|
3199
|
+
tl.configure({ resizable: !0 }),
|
|
3200
|
+
al,
|
|
3201
|
+
nl,
|
|
3202
|
+
ll,
|
|
3203
|
+
el.configure({ placeholder: "" }),
|
|
3204
|
+
Rn,
|
|
3205
|
+
Pn,
|
|
3206
|
+
Nn,
|
|
3207
|
+
Wn
|
|
3208
|
+
],
|
|
3209
|
+
editorProps: {
|
|
3210
|
+
attributes: { class: "rtf-content" },
|
|
3211
|
+
transformPastedHTML: (v) => la(v),
|
|
3212
|
+
handlePaste: Fn(() => r.value)
|
|
2186
3213
|
},
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
lt(() => {
|
|
2191
|
-
a.value = !0;
|
|
3214
|
+
onUpdate: ({ editor: v }) => {
|
|
3215
|
+
a("update:modelValue", v.getHTML());
|
|
3216
|
+
}
|
|
2192
3217
|
});
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
3218
|
+
re(
|
|
3219
|
+
() => e.modelValue,
|
|
3220
|
+
(v) => {
|
|
3221
|
+
const h = r.value;
|
|
3222
|
+
if (!h) return;
|
|
3223
|
+
const B = v != null ? v : "";
|
|
3224
|
+
B !== h.getHTML() && h.commands.setContent(B, { emitUpdate: !1 });
|
|
3225
|
+
}
|
|
3226
|
+
), re(
|
|
3227
|
+
() => e.disabled,
|
|
3228
|
+
(v) => {
|
|
3229
|
+
var h;
|
|
3230
|
+
return (h = r.value) == null ? void 0 : h.setEditable(!v);
|
|
3231
|
+
}
|
|
3232
|
+
), re(r, (v) => v == null ? void 0 : v.setEditable(!e.disabled));
|
|
3233
|
+
const c = Tt(r), d = A(() => {
|
|
3234
|
+
var v, h, B, V, w;
|
|
3235
|
+
return c.value, {
|
|
3236
|
+
bold: !!((v = r.value) != null && v.isActive("bold")),
|
|
3237
|
+
italic: !!((h = r.value) != null && h.isActive("italic")),
|
|
3238
|
+
link: !!((B = r.value) != null && B.isActive("link")),
|
|
3239
|
+
bulletList: !!((V = r.value) != null && V.isActive("bulletList")),
|
|
3240
|
+
orderedList: !!((w = r.value) != null && w.isActive("orderedList"))
|
|
3241
|
+
};
|
|
3242
|
+
});
|
|
3243
|
+
function g({ state: v }) {
|
|
3244
|
+
return !v.selection.empty && !(v.selection instanceof il);
|
|
3245
|
+
}
|
|
3246
|
+
function C(v) {
|
|
3247
|
+
var h;
|
|
3248
|
+
(h = r.value) == null || h.chain().focus()[v]().run();
|
|
3249
|
+
}
|
|
3250
|
+
function f() {
|
|
3251
|
+
const v = r.value;
|
|
3252
|
+
if (!v) return;
|
|
3253
|
+
if (v.isActive("link")) {
|
|
3254
|
+
v.chain().focus().unsetLink().run();
|
|
3255
|
+
return;
|
|
3256
|
+
}
|
|
3257
|
+
const h = window.prompt("URL");
|
|
3258
|
+
h && v.chain().focus().extendMarkRange("link").setLink({ href: h }).run();
|
|
3259
|
+
}
|
|
3260
|
+
return (v, h) => {
|
|
3261
|
+
const B = N("v-btn");
|
|
3262
|
+
return j(), Z("div", na, [
|
|
3263
|
+
i(Yn, { editor: n(r) }, null, 8, ["editor"]),
|
|
3264
|
+
i(n(ul), {
|
|
3265
|
+
class: "editor-container__editor",
|
|
3266
|
+
editor: n(r)
|
|
3267
|
+
}, null, 8, ["editor"]),
|
|
3268
|
+
n(r) ? (j(), O(n(cl), {
|
|
3269
|
+
key: 0,
|
|
3270
|
+
editor: n(r),
|
|
3271
|
+
"should-show": g
|
|
3272
|
+
}, {
|
|
3273
|
+
default: s(() => [
|
|
3274
|
+
ae("div", aa, [
|
|
3275
|
+
i(B, {
|
|
3276
|
+
icon: "",
|
|
3277
|
+
size: "small",
|
|
3278
|
+
variant: "text",
|
|
3279
|
+
active: d.value.bold,
|
|
3280
|
+
onClick: h[0] || (h[0] = (V) => C("toggleBold"))
|
|
3281
|
+
}, {
|
|
3282
|
+
default: s(() => [
|
|
3283
|
+
i(n(L), { name: "mdi-format-bold" })
|
|
3284
|
+
]),
|
|
3285
|
+
_: 1
|
|
3286
|
+
}, 8, ["active"]),
|
|
3287
|
+
i(B, {
|
|
3288
|
+
icon: "",
|
|
3289
|
+
size: "small",
|
|
3290
|
+
variant: "text",
|
|
3291
|
+
active: d.value.italic,
|
|
3292
|
+
onClick: h[1] || (h[1] = (V) => C("toggleItalic"))
|
|
3293
|
+
}, {
|
|
3294
|
+
default: s(() => [
|
|
3295
|
+
i(n(L), { name: "mdi-format-italic" })
|
|
3296
|
+
]),
|
|
3297
|
+
_: 1
|
|
3298
|
+
}, 8, ["active"]),
|
|
3299
|
+
i(B, {
|
|
3300
|
+
icon: "",
|
|
3301
|
+
size: "small",
|
|
3302
|
+
variant: "text",
|
|
3303
|
+
active: d.value.link,
|
|
3304
|
+
onClick: f
|
|
3305
|
+
}, {
|
|
3306
|
+
default: s(() => [
|
|
3307
|
+
i(n(L), { name: "mdi-link-variant" })
|
|
3308
|
+
]),
|
|
3309
|
+
_: 1
|
|
3310
|
+
}, 8, ["active"]),
|
|
3311
|
+
i(B, {
|
|
3312
|
+
icon: "",
|
|
3313
|
+
size: "small",
|
|
3314
|
+
variant: "text",
|
|
3315
|
+
active: d.value.bulletList,
|
|
3316
|
+
onClick: h[2] || (h[2] = (V) => C("toggleBulletList"))
|
|
3317
|
+
}, {
|
|
3318
|
+
default: s(() => [
|
|
3319
|
+
i(n(L), { name: "mdi-format-list-bulleted" })
|
|
3320
|
+
]),
|
|
3321
|
+
_: 1
|
|
3322
|
+
}, 8, ["active"]),
|
|
3323
|
+
i(B, {
|
|
3324
|
+
icon: "",
|
|
3325
|
+
size: "small",
|
|
3326
|
+
variant: "text",
|
|
3327
|
+
active: d.value.orderedList,
|
|
3328
|
+
onClick: h[3] || (h[3] = (V) => C("toggleOrderedList"))
|
|
3329
|
+
}, {
|
|
3330
|
+
default: s(() => [
|
|
3331
|
+
i(n(L), { name: "mdi-format-list-numbered" })
|
|
3332
|
+
]),
|
|
3333
|
+
_: 1
|
|
3334
|
+
}, 8, ["active"])
|
|
3335
|
+
])
|
|
3336
|
+
]),
|
|
3337
|
+
_: 1
|
|
3338
|
+
}, 8, ["editor"])) : G("", !0)
|
|
2212
3339
|
]);
|
|
2213
3340
|
};
|
|
2214
3341
|
}
|
|
2215
|
-
}),
|
|
3342
|
+
}), Vt = /* @__PURE__ */ le({
|
|
2216
3343
|
__name: "df-rtf-editor",
|
|
2217
|
-
props: /* @__PURE__ */
|
|
3344
|
+
props: /* @__PURE__ */ pe({
|
|
2218
3345
|
minHeight: {},
|
|
2219
3346
|
control: {},
|
|
2220
3347
|
modelValue: {},
|
|
@@ -2230,64 +3357,64 @@ const pl = {
|
|
|
2230
3357
|
passthroughAttrs: {},
|
|
2231
3358
|
density: {},
|
|
2232
3359
|
variant: {}
|
|
2233
|
-
},
|
|
3360
|
+
}, te(H({}, be), { minHeight: void 0 })),
|
|
2234
3361
|
emits: ["update:modelValue", "click:clear"],
|
|
2235
|
-
setup(
|
|
2236
|
-
const
|
|
2237
|
-
return (
|
|
2238
|
-
class: ["
|
|
3362
|
+
setup(t, { emit: l }) {
|
|
3363
|
+
const e = t, a = l, { densityClass: r, value: c, vuetifyBindings: d } = ce(e, a);
|
|
3364
|
+
return (g, C) => (j(), O(n(Fe), Y(e, {
|
|
3365
|
+
class: ["rtf-editor", n(r)]
|
|
2239
3366
|
}), {
|
|
2240
|
-
default:
|
|
2241
|
-
|
|
3367
|
+
default: s((f) => [
|
|
3368
|
+
i(oa, Y({
|
|
2242
3369
|
ref: "$editor",
|
|
2243
|
-
modelValue:
|
|
2244
|
-
"onUpdate:modelValue":
|
|
2245
|
-
class: { "mt-6": !!
|
|
2246
|
-
"min-height":
|
|
2247
|
-
disabled:
|
|
2248
|
-
},
|
|
2249
|
-
onFocusin: (
|
|
2250
|
-
onFocusout: (
|
|
3370
|
+
modelValue: n(c),
|
|
3371
|
+
"onUpdate:modelValue": C[0] || (C[0] = (v) => Ce(c) ? c.value = v : null),
|
|
3372
|
+
class: { "mt-6": !!t.label },
|
|
3373
|
+
"min-height": t.minHeight,
|
|
3374
|
+
disabled: n(d).disabled
|
|
3375
|
+
}, t.passthroughAttrs, {
|
|
3376
|
+
onFocusin: (v) => f.focus(),
|
|
3377
|
+
onFocusout: (v) => f.blur()
|
|
2251
3378
|
}), null, 16, ["modelValue", "class", "min-height", "disabled", "onFocusin", "onFocusout"])
|
|
2252
3379
|
]),
|
|
2253
3380
|
_: 1
|
|
2254
3381
|
}, 16, ["class"]));
|
|
2255
3382
|
}
|
|
2256
3383
|
});
|
|
2257
|
-
function
|
|
2258
|
-
return
|
|
3384
|
+
function ia(t) {
|
|
3385
|
+
return t.map((l) => ({ value: l.id, title: l.text, icon: l.icon }));
|
|
2259
3386
|
}
|
|
2260
|
-
function
|
|
2261
|
-
var
|
|
2262
|
-
return
|
|
3387
|
+
function me(t, l) {
|
|
3388
|
+
var e;
|
|
3389
|
+
return t == null || nt(t) && t.length === 0 ? null : l ? ut(t) : nt(t) ? (e = ct(t)) != null ? e : null : t;
|
|
2263
3390
|
}
|
|
2264
|
-
function
|
|
2265
|
-
if (
|
|
2266
|
-
const
|
|
2267
|
-
return
|
|
3391
|
+
function ze(t, l) {
|
|
3392
|
+
if (l == null) return [];
|
|
3393
|
+
const e = ut(l);
|
|
3394
|
+
return t.filter((a) => e.some((r) => r === a.id));
|
|
2268
3395
|
}
|
|
2269
|
-
function
|
|
2270
|
-
var
|
|
2271
|
-
const
|
|
2272
|
-
if (
|
|
2273
|
-
|
|
3396
|
+
function $e(t, l, e, a, r) {
|
|
3397
|
+
var d;
|
|
3398
|
+
const c = me(t, e);
|
|
3399
|
+
if (c == null) {
|
|
3400
|
+
l.value = e ? [] : null;
|
|
2274
3401
|
return;
|
|
2275
3402
|
}
|
|
2276
|
-
if (
|
|
2277
|
-
|
|
2278
|
-
else if (
|
|
2279
|
-
|
|
3403
|
+
if (e)
|
|
3404
|
+
a ? l.value = c : l.value = ze(r, c).map((g) => g.id);
|
|
3405
|
+
else if (a)
|
|
3406
|
+
l.value = c;
|
|
2280
3407
|
else {
|
|
2281
|
-
const
|
|
2282
|
-
|
|
3408
|
+
const g = ct(ze(r, c));
|
|
3409
|
+
l.value = (d = g == null ? void 0 : g.id) != null ? d : null;
|
|
2283
3410
|
}
|
|
2284
3411
|
}
|
|
2285
|
-
const
|
|
3412
|
+
const ra = {
|
|
2286
3413
|
key: 0,
|
|
2287
3414
|
class: "me-1"
|
|
2288
|
-
},
|
|
3415
|
+
}, sa = /* @__PURE__ */ le({
|
|
2289
3416
|
__name: "df-select",
|
|
2290
|
-
props: /* @__PURE__ */
|
|
3417
|
+
props: /* @__PURE__ */ pe({
|
|
2291
3418
|
choices: {},
|
|
2292
3419
|
multiple: { type: Boolean },
|
|
2293
3420
|
allowTags: { type: Boolean },
|
|
@@ -2307,7 +3434,7 @@ const Cl = {
|
|
|
2307
3434
|
passthroughAttrs: {},
|
|
2308
3435
|
density: {},
|
|
2309
3436
|
variant: {}
|
|
2310
|
-
},
|
|
3437
|
+
}, te(H({}, be), {
|
|
2311
3438
|
choices: void 0,
|
|
2312
3439
|
multiple: !1,
|
|
2313
3440
|
allowTags: !1,
|
|
@@ -2315,235 +3442,235 @@ const Cl = {
|
|
|
2315
3442
|
fetchChoices: void 0
|
|
2316
3443
|
})),
|
|
2317
3444
|
emits: ["update:modelValueDisplay", "update:modelValue", "click:clear"],
|
|
2318
|
-
setup(
|
|
2319
|
-
var
|
|
2320
|
-
const
|
|
2321
|
-
densityClass:
|
|
2322
|
-
isRendered:
|
|
2323
|
-
label:
|
|
2324
|
-
showErrors:
|
|
2325
|
-
touched:
|
|
2326
|
-
value:
|
|
3445
|
+
setup(t, { emit: l }) {
|
|
3446
|
+
var Qe;
|
|
3447
|
+
const e = t, { choices: a, multiple: r, allowTags: c, allowNull: d, cssClass: g } = Ee(e), C = l, f = M(null), {
|
|
3448
|
+
densityClass: v,
|
|
3449
|
+
isRendered: h,
|
|
3450
|
+
label: B,
|
|
3451
|
+
showErrors: V,
|
|
3452
|
+
touched: w,
|
|
3453
|
+
value: T,
|
|
2327
3454
|
visibilityClass: D,
|
|
2328
|
-
vuetifyBindings:
|
|
2329
|
-
} =
|
|
2330
|
-
(
|
|
2331
|
-
function
|
|
2332
|
-
|
|
2333
|
-
}
|
|
2334
|
-
const
|
|
2335
|
-
function
|
|
2336
|
-
|
|
3455
|
+
vuetifyBindings: R
|
|
3456
|
+
} = ce(e, C), p = M(null), S = M(!1), W = M([]), P = A(() => n(S) ? n(W) : n(a) || []), K = M(!1), I = A(() => ia(P.value)), k = M(null), o = M(0), u = M(!1);
|
|
3457
|
+
(Qe = a.value) != null && Qe.length && e.fetchChoices !== void 0 && console.warn("Both choices and fetchChoices are set. Only one of them should be set.");
|
|
3458
|
+
function m($) {
|
|
3459
|
+
C("update:modelValueDisplay", ze(P.value, $));
|
|
3460
|
+
}
|
|
3461
|
+
const _ = M(!1);
|
|
3462
|
+
function U($) {
|
|
3463
|
+
_.value = !0;
|
|
2337
3464
|
try {
|
|
2338
|
-
|
|
3465
|
+
T.value = $;
|
|
2339
3466
|
} finally {
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
a.value,
|
|
3467
|
+
Yt(me(T.value, r.value), $) || $e(
|
|
3468
|
+
me(T.value, r.value),
|
|
3469
|
+
p,
|
|
2344
3470
|
r.value,
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
3471
|
+
c.value,
|
|
3472
|
+
P.value
|
|
3473
|
+
), Ke(() => {
|
|
3474
|
+
_.value = !1;
|
|
2348
3475
|
});
|
|
2349
3476
|
}
|
|
2350
3477
|
}
|
|
2351
|
-
function
|
|
2352
|
-
if (
|
|
2353
|
-
const
|
|
2354
|
-
return
|
|
2355
|
-
}
|
|
2356
|
-
function
|
|
2357
|
-
var
|
|
2358
|
-
if (
|
|
2359
|
-
const
|
|
2360
|
-
let
|
|
2361
|
-
|
|
2362
|
-
|
|
3478
|
+
function q($) {
|
|
3479
|
+
if (!$) return 0;
|
|
3480
|
+
const z = $.getBoundingClientRect(), ne = window.getComputedStyle($);
|
|
3481
|
+
return z.width + parseFloat(ne.marginLeft) + parseFloat(ne.marginRight);
|
|
3482
|
+
}
|
|
3483
|
+
function E() {
|
|
3484
|
+
var $;
|
|
3485
|
+
if (r.value && d.value && p.value != null && p.value.length > 0 && f.value) {
|
|
3486
|
+
const z = f.value.$el, ne = ($ = z.querySelector(".v-input__control")) == null ? void 0 : $.clientWidth, oe = z.querySelector(".v-field__input"), F = oe.querySelectorAll(".v-autocomplete__selection, .v-combobox__selection"), ie = window.getComputedStyle(oe);
|
|
3487
|
+
let Te = parseFloat(ie.paddingLeft) + parseFloat(ie.paddingRight);
|
|
3488
|
+
F.forEach((Dt) => {
|
|
3489
|
+
Te += q(Dt);
|
|
2363
3490
|
});
|
|
2364
|
-
const
|
|
2365
|
-
|
|
3491
|
+
const Lt = q(z.querySelector(".v-field .v-field__clearable")), $t = q(z.querySelector(".v-field .v-field__append-inner")), It = 2;
|
|
3492
|
+
u.value = ne - Te - F.length * It - $t < Lt;
|
|
2366
3493
|
} else
|
|
2367
|
-
|
|
2368
|
-
}
|
|
2369
|
-
function
|
|
2370
|
-
const
|
|
2371
|
-
|
|
2372
|
-
}
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
(
|
|
2376
|
-
|
|
2377
|
-
const
|
|
2378
|
-
|
|
3494
|
+
u.value = !1;
|
|
3495
|
+
}
|
|
3496
|
+
function x($) {
|
|
3497
|
+
const z = $.target;
|
|
3498
|
+
z instanceof HTMLElement && z.closest(".v-chip__close") && ($.stopPropagation(), $.preventDefault());
|
|
3499
|
+
}
|
|
3500
|
+
re(
|
|
3501
|
+
p,
|
|
3502
|
+
($) => {
|
|
3503
|
+
R.value.readonly || Ke(() => {
|
|
3504
|
+
const z = me($, r.value);
|
|
3505
|
+
m(z), U(z);
|
|
2379
3506
|
});
|
|
2380
3507
|
},
|
|
2381
3508
|
{ deep: !0 }
|
|
2382
|
-
),
|
|
2383
|
-
|
|
2384
|
-
(
|
|
2385
|
-
if (!
|
|
2386
|
-
const
|
|
2387
|
-
|
|
3509
|
+
), re(
|
|
3510
|
+
T,
|
|
3511
|
+
($) => {
|
|
3512
|
+
if (!_.value) {
|
|
3513
|
+
const z = me($, r.value);
|
|
3514
|
+
$e(z, p, r.value, !1, P.value);
|
|
2388
3515
|
}
|
|
2389
3516
|
},
|
|
2390
3517
|
{ deep: !0 }
|
|
2391
|
-
),
|
|
2392
|
-
|
|
3518
|
+
), re(_, () => {
|
|
3519
|
+
_.value || E();
|
|
2393
3520
|
});
|
|
2394
|
-
function
|
|
2395
|
-
|
|
3521
|
+
function J() {
|
|
3522
|
+
k.value != null && k.value.length > 0 && (k.value = null, y());
|
|
2396
3523
|
}
|
|
2397
|
-
function
|
|
2398
|
-
if (
|
|
2399
|
-
const
|
|
2400
|
-
|
|
3524
|
+
function ee() {
|
|
3525
|
+
if (J(), R.value.readonly || c.value) return;
|
|
3526
|
+
const $ = me(p.value, r.value);
|
|
3527
|
+
$e($, p, r.value, !1, P.value), U($);
|
|
2401
3528
|
}
|
|
2402
|
-
function
|
|
2403
|
-
if (
|
|
2404
|
-
|
|
3529
|
+
function de($, z) {
|
|
3530
|
+
if ($.stopPropagation(), R.value.readonly || c.value) {
|
|
3531
|
+
c.value && (p.value = p.value.filter((oe) => oe !== z));
|
|
2405
3532
|
return;
|
|
2406
3533
|
}
|
|
2407
|
-
let
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
) :
|
|
2412
|
-
}
|
|
2413
|
-
function
|
|
2414
|
-
return
|
|
2415
|
-
if (
|
|
2416
|
-
const
|
|
2417
|
-
|
|
3534
|
+
let ne;
|
|
3535
|
+
r.value && Array.isArray(p.value) ? ne = me(
|
|
3536
|
+
p.value.filter((oe) => oe !== z),
|
|
3537
|
+
r.value
|
|
3538
|
+
) : ne = null, $e(ne, p, r.value, !1, P.value), U(ne);
|
|
3539
|
+
}
|
|
3540
|
+
function y($, z) {
|
|
3541
|
+
return ge(this, null, function* () {
|
|
3542
|
+
if (R.value.readonly || (k.value = $, a.value || e.fetchChoices === void 0)) return;
|
|
3543
|
+
const ne = ++o.value;
|
|
3544
|
+
K.value = !0;
|
|
2418
3545
|
try {
|
|
2419
|
-
const
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
),
|
|
2423
|
-
if (
|
|
2424
|
-
|
|
3546
|
+
const oe = ze(
|
|
3547
|
+
P.value,
|
|
3548
|
+
me(p.value, r.value)
|
|
3549
|
+
), F = yield e.fetchChoices($, z);
|
|
3550
|
+
if (ne !== o.value) return;
|
|
3551
|
+
W.value = Gt([...oe, ...F], "id"), S.value = !0;
|
|
2425
3552
|
} finally {
|
|
2426
|
-
|
|
3553
|
+
K.value = !1;
|
|
2427
3554
|
}
|
|
2428
3555
|
});
|
|
2429
3556
|
}
|
|
2430
|
-
function
|
|
2431
|
-
let
|
|
2432
|
-
!
|
|
3557
|
+
function b() {
|
|
3558
|
+
let $ = T.value;
|
|
3559
|
+
!d.value && $ == null && I.value.length && ($ = I.value[0].value), $ = me($, r.value), $e($, p, r.value, c.value, P.value), m($), U($);
|
|
2433
3560
|
}
|
|
2434
|
-
return
|
|
2435
|
-
|
|
2436
|
-
}), (
|
|
2437
|
-
const
|
|
2438
|
-
return
|
|
3561
|
+
return b(), e.fetchChoices !== void 0 && y(void 0, T.value).then(() => {
|
|
3562
|
+
b();
|
|
3563
|
+
}), ($, z) => {
|
|
3564
|
+
const ne = N("v-chip"), oe = N("v-list-item");
|
|
3565
|
+
return n(h) ? (j(), O(Ue(n(c) ? "v-combobox" : "v-autocomplete"), Y({
|
|
2439
3566
|
key: 0,
|
|
2440
3567
|
ref_key: "dfSelectRef",
|
|
2441
|
-
ref:
|
|
2442
|
-
modelValue:
|
|
2443
|
-
"onUpdate:modelValue":
|
|
2444
|
-
class: [
|
|
2445
|
-
items:
|
|
3568
|
+
ref: f,
|
|
3569
|
+
modelValue: p.value,
|
|
3570
|
+
"onUpdate:modelValue": z[0] || (z[0] = (F) => p.value = F),
|
|
3571
|
+
class: [n(g), n(v), n(D), { "df-select-multirow": u.value }],
|
|
3572
|
+
items: I.value,
|
|
2446
3573
|
"return-object": !1,
|
|
2447
3574
|
chips: "",
|
|
2448
3575
|
"auto-select-first": !0,
|
|
2449
|
-
"closable-chips":
|
|
2450
|
-
clearable:
|
|
2451
|
-
multiple:
|
|
2452
|
-
loading:
|
|
3576
|
+
"closable-chips": n(d) || n(r) && p.value.length > 1,
|
|
3577
|
+
clearable: n(d),
|
|
3578
|
+
multiple: n(r),
|
|
3579
|
+
loading: K.value,
|
|
2453
3580
|
"hide-selected": !1,
|
|
2454
|
-
"aria-describedby":
|
|
3581
|
+
"aria-describedby": n(R).helpText ? `${n(R).name}-help` : null,
|
|
2455
3582
|
"menu-props": { maxHeight: "400" },
|
|
2456
|
-
search:
|
|
2457
|
-
},
|
|
2458
|
-
"onUpdate:search":
|
|
2459
|
-
"onUpdate:modelValue":
|
|
2460
|
-
"onClick:clear":
|
|
2461
|
-
onBlur:
|
|
2462
|
-
onMousedownCapture:
|
|
2463
|
-
}),
|
|
2464
|
-
chip:
|
|
2465
|
-
(
|
|
2466
|
-
key:
|
|
3583
|
+
search: k.value
|
|
3584
|
+
}, n(R), {
|
|
3585
|
+
"onUpdate:search": z[1] || (z[1] = (F) => y(F, void 0)),
|
|
3586
|
+
"onUpdate:modelValue": ee,
|
|
3587
|
+
"onClick:clear": z[2] || (z[2] = (F) => p.value = null),
|
|
3588
|
+
onBlur: z[3] || (z[3] = (F) => w.value = !0),
|
|
3589
|
+
onMousedownCapture: z[4] || (z[4] = (F) => x(F))
|
|
3590
|
+
}), Xe({
|
|
3591
|
+
chip: s(({ item: F }) => [
|
|
3592
|
+
(j(), O(ne, {
|
|
3593
|
+
key: F.value,
|
|
2467
3594
|
label: "",
|
|
2468
3595
|
size: "small",
|
|
2469
3596
|
class: "d-flex align-middle",
|
|
2470
|
-
variant:
|
|
2471
|
-
closable:
|
|
2472
|
-
"onClick:close": (
|
|
3597
|
+
variant: n(r) ? "tonal" : "text",
|
|
3598
|
+
closable: n(r),
|
|
3599
|
+
"onClick:close": (ie) => de(ie, F.value)
|
|
2473
3600
|
}, {
|
|
2474
|
-
prepend:
|
|
2475
|
-
var
|
|
3601
|
+
prepend: s(() => {
|
|
3602
|
+
var ie;
|
|
2476
3603
|
return [
|
|
2477
|
-
(
|
|
3604
|
+
(ie = F.raw) != null && ie.icon ? (j(), O(n(L), {
|
|
2478
3605
|
key: 0,
|
|
2479
3606
|
class: "me-1",
|
|
2480
|
-
name:
|
|
2481
|
-
}, null, 8, ["name"])) :
|
|
3607
|
+
name: F.raw.icon
|
|
3608
|
+
}, null, 8, ["name"])) : G("", !0)
|
|
2482
3609
|
];
|
|
2483
3610
|
}),
|
|
2484
|
-
default:
|
|
2485
|
-
|
|
2486
|
-
class:
|
|
2487
|
-
},
|
|
3611
|
+
default: s(() => [
|
|
3612
|
+
ae("span", {
|
|
3613
|
+
class: ue({ "text-body-1": !n(r) })
|
|
3614
|
+
}, X(F.title), 3)
|
|
2488
3615
|
]),
|
|
2489
3616
|
_: 2
|
|
2490
3617
|
}, 1032, ["variant", "closable", "onClick:close"]))
|
|
2491
3618
|
]),
|
|
2492
|
-
label:
|
|
2493
|
-
|
|
2494
|
-
data:
|
|
2495
|
-
label:
|
|
3619
|
+
label: s((F) => [
|
|
3620
|
+
i(n(fe), {
|
|
3621
|
+
data: F,
|
|
3622
|
+
label: n(B)
|
|
2496
3623
|
}, null, 8, ["data", "label"])
|
|
2497
3624
|
]),
|
|
2498
|
-
item:
|
|
2499
|
-
|
|
2500
|
-
prepend:
|
|
2501
|
-
var
|
|
3625
|
+
item: s(({ props: F, item: ie }) => [
|
|
3626
|
+
i(oe, ye(ke(F)), {
|
|
3627
|
+
prepend: s(() => {
|
|
3628
|
+
var Te;
|
|
2502
3629
|
return [
|
|
2503
|
-
(
|
|
2504
|
-
|
|
3630
|
+
(Te = ie.raw) != null && Te.icon ? (j(), Z("span", ra, [
|
|
3631
|
+
i(n(L), {
|
|
2505
3632
|
class: "action-icon",
|
|
2506
|
-
name:
|
|
3633
|
+
name: ie.raw.icon
|
|
2507
3634
|
}, null, 8, ["name"])
|
|
2508
|
-
])) :
|
|
3635
|
+
])) : G("", !0)
|
|
2509
3636
|
];
|
|
2510
3637
|
}),
|
|
2511
3638
|
_: 2
|
|
2512
3639
|
}, 1040)
|
|
2513
3640
|
]),
|
|
2514
|
-
message:
|
|
2515
|
-
|
|
2516
|
-
message:
|
|
2517
|
-
errors:
|
|
3641
|
+
message: s(({ message: F }) => [
|
|
3642
|
+
i(n(ve), {
|
|
3643
|
+
message: F,
|
|
3644
|
+
errors: n(V)
|
|
2518
3645
|
}, null, 8, ["message", "errors"])
|
|
2519
3646
|
]),
|
|
2520
3647
|
_: 2
|
|
2521
3648
|
}, [
|
|
2522
|
-
|
|
3649
|
+
$.$slots["append-inner"] ? {
|
|
2523
3650
|
name: "append-inner",
|
|
2524
|
-
fn:
|
|
2525
|
-
|
|
3651
|
+
fn: s((F) => [
|
|
3652
|
+
_e($.$slots, "append-inner", ye(ke(F)), void 0, !0)
|
|
2526
3653
|
]),
|
|
2527
3654
|
key: "0"
|
|
2528
3655
|
} : void 0,
|
|
2529
|
-
|
|
3656
|
+
$.$slots["prepend-inner"] ? {
|
|
2530
3657
|
name: "prepend-inner",
|
|
2531
|
-
fn:
|
|
2532
|
-
|
|
3658
|
+
fn: s((F) => [
|
|
3659
|
+
_e($.$slots, "prepend-inner", ye(ke(F)), void 0, !0)
|
|
2533
3660
|
]),
|
|
2534
3661
|
key: "1"
|
|
2535
3662
|
} : void 0
|
|
2536
|
-
]), 1040, ["modelValue", "class", "items", "closable-chips", "clearable", "multiple", "loading", "aria-describedby", "search"])) :
|
|
3663
|
+
]), 1040, ["modelValue", "class", "items", "closable-chips", "clearable", "multiple", "loading", "aria-describedby", "search"])) : G("", !0);
|
|
2537
3664
|
};
|
|
2538
3665
|
}
|
|
2539
|
-
}),
|
|
2540
|
-
const
|
|
2541
|
-
for (const [
|
|
2542
|
-
|
|
2543
|
-
return
|
|
2544
|
-
},
|
|
3666
|
+
}), ua = (t, l) => {
|
|
3667
|
+
const e = t.__vccOpts || t;
|
|
3668
|
+
for (const [a, r] of l)
|
|
3669
|
+
e[a] = r;
|
|
3670
|
+
return e;
|
|
3671
|
+
}, jt = /* @__PURE__ */ ua(sa, [["__scopeId", "data-v-7e5aa3b6"]]), Bt = /* @__PURE__ */ le({
|
|
2545
3672
|
__name: "df-text-area",
|
|
2546
|
-
props: /* @__PURE__ */
|
|
3673
|
+
props: /* @__PURE__ */ pe({
|
|
2547
3674
|
rows: {},
|
|
2548
3675
|
maxRows: {},
|
|
2549
3676
|
control: {},
|
|
@@ -2560,143 +3687,144 @@ const Cl = {
|
|
|
2560
3687
|
passthroughAttrs: {},
|
|
2561
3688
|
density: {},
|
|
2562
3689
|
variant: {}
|
|
2563
|
-
},
|
|
3690
|
+
}, te(H({}, be), {
|
|
2564
3691
|
rows: void 0,
|
|
2565
3692
|
maxRows: void 0
|
|
2566
3693
|
})),
|
|
2567
3694
|
emits: ["update:modelValue", "click:clear"],
|
|
2568
|
-
setup(
|
|
2569
|
-
const
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
), { cssClass:
|
|
2573
|
-
return (
|
|
2574
|
-
const
|
|
2575
|
-
return
|
|
3695
|
+
setup(t, { emit: l }) {
|
|
3696
|
+
const e = t, a = l, { densityClass: r, isRendered: c, label: d, showErrors: g, touched: C, value: f, visibilityClass: v, vuetifyBindings: h } = ce(
|
|
3697
|
+
e,
|
|
3698
|
+
a
|
|
3699
|
+
), { cssClass: B } = Ee(e);
|
|
3700
|
+
return (V, w) => {
|
|
3701
|
+
const T = N("v-textarea");
|
|
3702
|
+
return n(c) ? (j(), Z("div", {
|
|
2576
3703
|
key: 0,
|
|
2577
|
-
class:
|
|
3704
|
+
class: ue(["df-textarea-container", [n(r), n(v)]])
|
|
2578
3705
|
}, [
|
|
2579
|
-
|
|
2580
|
-
modelValue:
|
|
2581
|
-
"onUpdate:modelValue":
|
|
2582
|
-
class:
|
|
2583
|
-
rows:
|
|
2584
|
-
"auto-grow": (
|
|
2585
|
-
"max-rows":
|
|
2586
|
-
},
|
|
2587
|
-
onBlur:
|
|
3706
|
+
i(T, Y({
|
|
3707
|
+
modelValue: n(f),
|
|
3708
|
+
"onUpdate:modelValue": w[0] || (w[0] = (D) => Ce(f) ? f.value = D : null),
|
|
3709
|
+
class: n(B),
|
|
3710
|
+
rows: t.rows,
|
|
3711
|
+
"auto-grow": (t.maxRows || 0) > 0,
|
|
3712
|
+
"max-rows": t.maxRows
|
|
3713
|
+
}, n(h), {
|
|
3714
|
+
onBlur: w[1] || (w[1] = (D) => C.value = !0)
|
|
2588
3715
|
}), {
|
|
2589
|
-
label:
|
|
2590
|
-
|
|
3716
|
+
label: s((D) => [
|
|
3717
|
+
i(n(fe), {
|
|
2591
3718
|
data: D,
|
|
2592
|
-
label:
|
|
3719
|
+
label: n(d)
|
|
2593
3720
|
}, null, 8, ["data", "label"])
|
|
2594
3721
|
]),
|
|
2595
|
-
message:
|
|
2596
|
-
|
|
3722
|
+
message: s(({ message: D }) => [
|
|
3723
|
+
i(n(ve), {
|
|
2597
3724
|
message: D,
|
|
2598
|
-
errors:
|
|
3725
|
+
errors: n(g)
|
|
2599
3726
|
}, null, 8, ["message", "errors"])
|
|
2600
3727
|
]),
|
|
2601
3728
|
_: 1
|
|
2602
3729
|
}, 16, ["modelValue", "class", "rows", "auto-grow", "max-rows"])
|
|
2603
|
-
], 2)) :
|
|
3730
|
+
], 2)) : G("", !0);
|
|
2604
3731
|
};
|
|
2605
3732
|
}
|
|
2606
|
-
}),
|
|
3733
|
+
}), ca = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2607
3734
|
__proto__: null,
|
|
2608
|
-
DfActions:
|
|
2609
|
-
DfCheckbox:
|
|
2610
|
-
DfColor:
|
|
2611
|
-
DfDateTime:
|
|
2612
|
-
DfFile:
|
|
3735
|
+
DfActions: ft,
|
|
3736
|
+
DfCheckbox: pt,
|
|
3737
|
+
DfColor: bt,
|
|
3738
|
+
DfDateTime: ht,
|
|
3739
|
+
DfFile: gt,
|
|
3740
|
+
DfImage: yt,
|
|
2613
3741
|
DfInput: kt,
|
|
2614
|
-
DfInputHint:
|
|
2615
|
-
DfLabel:
|
|
2616
|
-
DfRtfEditor:
|
|
2617
|
-
DfSelect:
|
|
2618
|
-
DfTextArea:
|
|
2619
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
3742
|
+
DfInputHint: ve,
|
|
3743
|
+
DfLabel: fe,
|
|
3744
|
+
DfRtfEditor: Vt,
|
|
3745
|
+
DfSelect: jt,
|
|
3746
|
+
DfTextArea: Bt
|
|
3747
|
+
}, Symbol.toStringTag, { value: "Module" })), da = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2620
3748
|
__proto__: null,
|
|
2621
|
-
VAutocomplete:
|
|
2622
|
-
VBtn:
|
|
2623
|
-
VCheckbox:
|
|
2624
|
-
VChip:
|
|
2625
|
-
VCol:
|
|
2626
|
-
VColorPicker:
|
|
2627
|
-
VCombobox:
|
|
2628
|
-
VConfirmEdit:
|
|
2629
|
-
VDatePicker:
|
|
2630
|
-
VField:
|
|
2631
|
-
VFileInput:
|
|
2632
|
-
VIcon:
|
|
2633
|
-
VImg:
|
|
2634
|
-
VInput:
|
|
2635
|
-
VListItem:
|
|
2636
|
-
VMenu:
|
|
2637
|
-
VNumberInput:
|
|
2638
|
-
VProgressLinear:
|
|
2639
|
-
VRow:
|
|
2640
|
-
VSelect:
|
|
2641
|
-
VSwitch:
|
|
2642
|
-
VTextField:
|
|
2643
|
-
VTextarea:
|
|
2644
|
-
VTimePicker:
|
|
2645
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
2646
|
-
"df-actions":
|
|
2647
|
-
"df-checkbox":
|
|
2648
|
-
"df-color":
|
|
2649
|
-
"df-date-time":
|
|
2650
|
-
"df-file":
|
|
3749
|
+
VAutocomplete: hl,
|
|
3750
|
+
VBtn: gl,
|
|
3751
|
+
VCheckbox: yl,
|
|
3752
|
+
VChip: kl,
|
|
3753
|
+
VCol: Vl,
|
|
3754
|
+
VColorPicker: Cl,
|
|
3755
|
+
VCombobox: wl,
|
|
3756
|
+
VConfirmEdit: Al,
|
|
3757
|
+
VDatePicker: xl,
|
|
3758
|
+
VField: _l,
|
|
3759
|
+
VFileInput: Tl,
|
|
3760
|
+
VIcon: Bl,
|
|
3761
|
+
VImg: Ll,
|
|
3762
|
+
VInput: $l,
|
|
3763
|
+
VListItem: Il,
|
|
3764
|
+
VMenu: Dl,
|
|
3765
|
+
VNumberInput: Sl,
|
|
3766
|
+
VProgressLinear: Ml,
|
|
3767
|
+
VRow: jl,
|
|
3768
|
+
VSelect: Rl,
|
|
3769
|
+
VSwitch: Pl,
|
|
3770
|
+
VTextField: Ul,
|
|
3771
|
+
VTextarea: Nl,
|
|
3772
|
+
VTimePicker: zl
|
|
3773
|
+
}, Symbol.toStringTag, { value: "Module" })), ao = {
|
|
3774
|
+
"df-actions": ft,
|
|
3775
|
+
"df-checkbox": pt,
|
|
3776
|
+
"df-color": bt,
|
|
3777
|
+
"df-date-time": ht,
|
|
3778
|
+
"df-file": gt,
|
|
3779
|
+
"df-image": yt,
|
|
2651
3780
|
"df-input": kt,
|
|
2652
|
-
"df-input-hint":
|
|
2653
|
-
"df-label":
|
|
2654
|
-
"df-rtf-editor":
|
|
2655
|
-
"df-select":
|
|
2656
|
-
"df-text-area":
|
|
2657
|
-
},
|
|
3781
|
+
"df-input-hint": ve,
|
|
3782
|
+
"df-label": fe,
|
|
3783
|
+
"df-rtf-editor": Vt,
|
|
3784
|
+
"df-select": jt,
|
|
3785
|
+
"df-text-area": Bt
|
|
3786
|
+
}, oo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2658
3787
|
__proto__: null
|
|
2659
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
2660
|
-
install: (
|
|
2661
|
-
var
|
|
2662
|
-
|
|
3788
|
+
}, Symbol.toStringTag, { value: "Module" })), io = {
|
|
3789
|
+
install: (t, l) => {
|
|
3790
|
+
var e, a;
|
|
3791
|
+
t.provide(mt, l != null ? l : {}), (e = l == null ? void 0 : l.registerComponents) != null && e && Object.entries(ca).map(([r, c]) => t.component(r, c)), (a = l == null ? void 0 : l.registerVuetifyComponents) != null && a && Object.entries(da).map(([r, c]) => t.component(r, c));
|
|
2663
3792
|
}
|
|
2664
3793
|
};
|
|
2665
3794
|
export {
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
3795
|
+
Pe as Action,
|
|
3796
|
+
se as ActionDisplayStyle,
|
|
3797
|
+
An as DateTimeLocaleConfig,
|
|
3798
|
+
ft as DfActions,
|
|
3799
|
+
pt as DfCheckbox,
|
|
3800
|
+
bt as DfColor,
|
|
3801
|
+
ht as DfDateTime,
|
|
3802
|
+
gt as DfFile,
|
|
3803
|
+
yt as DfImage,
|
|
2674
3804
|
kt as DfInput,
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
pt as getRenderOptionsForBreakpoint,
|
|
3805
|
+
oo as DfInputComponentProps,
|
|
3806
|
+
ca as DfInputComponents,
|
|
3807
|
+
ve as DfInputHint,
|
|
3808
|
+
fe as DfLabel,
|
|
3809
|
+
Vt as DfRtfEditor,
|
|
3810
|
+
jt as DfSelect,
|
|
3811
|
+
Bt as DfTextArea,
|
|
3812
|
+
io as DynamicFormsInputs,
|
|
3813
|
+
Fe as InputBase,
|
|
3814
|
+
xn as Label,
|
|
3815
|
+
Bn as ResponsiveActionRenderOptions,
|
|
3816
|
+
Tn as ResponsiveRenderOptions,
|
|
3817
|
+
da as VuetifyComponents,
|
|
3818
|
+
be as defaultBaseProps,
|
|
3819
|
+
at as defaultDisplayStyle,
|
|
3820
|
+
ao as dfInputComponentsByTag,
|
|
3821
|
+
Vn as getBreakpointName,
|
|
3822
|
+
vt as getRenderOptionsForBreakpoint,
|
|
2694
3823
|
ot as responsiveBreakpoints,
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
vt as vuetifyInputsSettingsKey
|
|
3824
|
+
we as translatableStrings,
|
|
3825
|
+
no as translateStrings,
|
|
3826
|
+
jn as useBreakpoint,
|
|
3827
|
+
ce as useInputBase,
|
|
3828
|
+
mt as vuetifyInputsSettingsKey
|
|
2701
3829
|
};
|
|
2702
3830
|
//# sourceMappingURL=dynamicforms-vuetify-inputs.js.map
|