@dynamicforms/vuetify-inputs 0.11.7 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dynamicforms-vuetify-inputs.css +1 -1
- package/dist/dynamicforms-vuetify-inputs.js +1527 -1122
- 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 +377 -364
- package/package.json +6 -7
- package/readme.md +17 -15
|
@@ -1,89 +1,93 @@
|
|
|
1
|
-
import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createSlots as o, createTextVNode as s, createVNode as c, defineComponent as l,
|
|
2
|
-
import L, { Action as R, DisplayMode as z, ExecuteAction as ne, MdString as re, MessagesWidget as B, ValidationErrorRenderContent as ie } from "@dynamicforms/vue-forms";
|
|
1
|
+
import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createSlots as o, createTextVNode as s, createVNode as c, defineComponent as l, getCurrentInstance as u, guardReactiveProps as d, h as f, inject as p, isRef as m, mergeDefaults as h, mergeProps as g, nextTick as _, normalizeClass as v, normalizeProps as y, normalizeStyle as b, onBeforeUnmount as x, onMounted as S, openBlock as C, ref as w, renderList as T, renderSlot as E, resolveComponent as D, resolveDynamicComponent as O, shallowRef as k, toDisplayString as A, toRaw as j, toRefs as M, toValue as N, unref as P, useCssVars as ee, useId as F, watch as I, watchEffect as L, withCtx as R, withKeys as z, withModifiers as B } from "vue";
|
|
3
2
|
import { CachedIcon as V } from "vue-cached-icon";
|
|
4
3
|
import H from "vue-markdown-render";
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
4
|
+
import U, { Action as te, ExecuteAction as W, ValidationError as G } from "@dynamicforms/vue-forms";
|
|
5
|
+
import { castArray as ne, clone as re, first as ie, isArray as ae, isBoolean as K, isEmpty as q, isEqual as oe, isNaN as se, isObjectLike as ce, isPlainObject as le, isString as J, toNumber as Y, unionBy as ue } from "lodash-es";
|
|
6
|
+
import { createTranslatable as de } from "@dynamicforms/translatable";
|
|
7
|
+
import { useDisplay as fe } from "vuetify";
|
|
8
|
+
import { format as pe, parse as me, parseISO as he } from "date-fns";
|
|
9
|
+
import ge from "@tiptap/extension-image";
|
|
10
|
+
import _e from "@tiptap/extension-placeholder";
|
|
11
|
+
import { Table as ve } from "@tiptap/extension-table";
|
|
12
|
+
import ye from "@tiptap/extension-table-cell";
|
|
13
|
+
import be from "@tiptap/extension-table-header";
|
|
14
|
+
import xe from "@tiptap/extension-table-row";
|
|
15
|
+
import Se from "@tiptap/extension-text-align";
|
|
16
|
+
import { NodeSelection as Ce } from "@tiptap/pm/state";
|
|
17
|
+
import we from "@tiptap/starter-kit";
|
|
18
|
+
import { EditorContent as Te, useEditor as Ee } from "@tiptap/vue-3";
|
|
19
|
+
import { BubbleMenu as De } from "@tiptap/vue-3/menus";
|
|
20
|
+
import { Extension as Oe, Mark as ke, Node as Ae, mergeAttributes as je } from "@tiptap/core";
|
|
21
|
+
import { Fragment as Me, Slice as Ne } from "@tiptap/pm/model";
|
|
22
|
+
import Pe from "@tiptap/extension-link";
|
|
23
|
+
import { VAutocomplete as Fe } from "vuetify/components/VAutocomplete";
|
|
24
|
+
import { VBtn as Ie } from "vuetify/components/VBtn";
|
|
25
|
+
import { VBtnGroup as Le } from "vuetify/components/VBtnGroup";
|
|
26
|
+
import { VBtnToggle as Re } from "vuetify/components/VBtnToggle";
|
|
27
|
+
import { VCard as ze, VCardActions as Be } from "vuetify/components/VCard";
|
|
28
|
+
import { VCheckbox as Ve } from "vuetify/components/VCheckbox";
|
|
29
|
+
import { VChip as He } from "vuetify/components/VChip";
|
|
30
|
+
import { VCombobox as Ue } from "vuetify/components/VCombobox";
|
|
31
|
+
import { VColorPicker as We } from "vuetify/components/VColorPicker";
|
|
32
|
+
import { VConfirmEdit as Ge } from "vuetify/components/VConfirmEdit";
|
|
33
|
+
import { VDatePicker as Ke } from "vuetify/components/VDatePicker";
|
|
34
|
+
import { VDivider as qe } from "vuetify/components/VDivider";
|
|
35
|
+
import { VField as Je } from "vuetify/components/VField";
|
|
36
|
+
import { VFileInput as Ye } from "vuetify/components/VFileInput";
|
|
37
|
+
import { VCol as Xe, VRow as Ze } from "vuetify/components/VGrid";
|
|
38
|
+
import { VIcon as Qe } from "vuetify/components/VIcon";
|
|
39
|
+
import { VImg as $e } from "vuetify/components/VImg";
|
|
40
|
+
import { VInput as et } from "vuetify/components/VInput";
|
|
41
|
+
import { VList as tt, VListItem as nt, VListItemTitle as rt } from "vuetify/components/VList";
|
|
42
|
+
import { VMenu as it } from "vuetify/components/VMenu";
|
|
43
|
+
import { VNumberInput as at } from "vuetify/components/VNumberInput";
|
|
44
|
+
import { VProgressLinear as ot } from "vuetify/components/VProgressLinear";
|
|
45
|
+
import { VSelect as st } from "vuetify/components/VSelect";
|
|
46
|
+
import { VSwitch as ct } from "vuetify/components/VSwitch";
|
|
47
|
+
import { VTextarea as lt } from "vuetify/components/VTextarea";
|
|
48
|
+
import { VTextField as ut } from "vuetify/components/VTextField";
|
|
49
|
+
import { VTimePicker as dt } from "vuetify/components/VTimePicker";
|
|
46
50
|
//#region \0rolldown/runtime.js
|
|
47
|
-
var
|
|
51
|
+
var ft = Object.defineProperty, pt = (e, t) => {
|
|
48
52
|
let n = {};
|
|
49
|
-
for (var r in e)
|
|
53
|
+
for (var r in e) ft(n, r, {
|
|
50
54
|
get: e[r],
|
|
51
55
|
enumerable: !0
|
|
52
56
|
});
|
|
53
|
-
return t ||
|
|
57
|
+
return t || ft(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
54
58
|
};
|
|
55
59
|
//#endregion
|
|
56
60
|
//#region \0@oxc-project+runtime@0.146.0/helpers/esm/typeof.js
|
|
57
|
-
function
|
|
61
|
+
function mt(e) {
|
|
58
62
|
"@babel/helpers - typeof";
|
|
59
|
-
return
|
|
63
|
+
return mt = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
60
64
|
return typeof e;
|
|
61
65
|
} : function(e) {
|
|
62
66
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
63
|
-
},
|
|
67
|
+
}, mt(e);
|
|
64
68
|
}
|
|
65
69
|
//#endregion
|
|
66
70
|
//#region \0@oxc-project+runtime@0.146.0/helpers/esm/toPrimitive.js
|
|
67
|
-
function
|
|
68
|
-
if (
|
|
71
|
+
function ht(e, t) {
|
|
72
|
+
if (mt(e) != "object" || !e) return e;
|
|
69
73
|
var n = e[Symbol.toPrimitive];
|
|
70
74
|
if (n !== void 0) {
|
|
71
75
|
var r = n.call(e, t || "default");
|
|
72
|
-
if (
|
|
76
|
+
if (mt(r) != "object") return r;
|
|
73
77
|
throw TypeError("@@toPrimitive must return a primitive value.");
|
|
74
78
|
}
|
|
75
79
|
return (t === "string" ? String : Number)(e);
|
|
76
80
|
}
|
|
77
81
|
//#endregion
|
|
78
82
|
//#region \0@oxc-project+runtime@0.146.0/helpers/esm/toPropertyKey.js
|
|
79
|
-
function
|
|
80
|
-
var t =
|
|
81
|
-
return
|
|
83
|
+
function gt(e) {
|
|
84
|
+
var t = ht(e, "string");
|
|
85
|
+
return mt(t) == "symbol" ? t : t + "";
|
|
82
86
|
}
|
|
83
87
|
//#endregion
|
|
84
88
|
//#region \0@oxc-project+runtime@0.146.0/helpers/esm/defineProperty.js
|
|
85
|
-
function
|
|
86
|
-
return (t =
|
|
89
|
+
function X(e, t, n) {
|
|
90
|
+
return (t = gt(t)) in e ? Object.defineProperty(e, t, {
|
|
87
91
|
value: n,
|
|
88
92
|
enumerable: !0,
|
|
89
93
|
configurable: !0,
|
|
@@ -92,7 +96,7 @@ function ft(e, t, n) {
|
|
|
92
96
|
}
|
|
93
97
|
//#endregion
|
|
94
98
|
//#region \0@oxc-project+runtime@0.146.0/helpers/esm/objectSpread2.js
|
|
95
|
-
function
|
|
99
|
+
function _t(e, t) {
|
|
96
100
|
var n = Object.keys(e);
|
|
97
101
|
if (Object.getOwnPropertySymbols) {
|
|
98
102
|
var r = Object.getOwnPropertySymbols(e);
|
|
@@ -102,12 +106,12 @@ function pt(e, t) {
|
|
|
102
106
|
}
|
|
103
107
|
return n;
|
|
104
108
|
}
|
|
105
|
-
function
|
|
109
|
+
function Z(e) {
|
|
106
110
|
for (var t = 1; t < arguments.length; t++) {
|
|
107
111
|
var n = arguments[t] == null ? {} : arguments[t];
|
|
108
|
-
t % 2 ?
|
|
109
|
-
|
|
110
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) :
|
|
112
|
+
t % 2 ? _t(Object(n), !0).forEach(function(t) {
|
|
113
|
+
X(e, t, n[t]);
|
|
114
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : _t(Object(n)).forEach(function(t) {
|
|
111
115
|
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
|
|
112
116
|
});
|
|
113
117
|
}
|
|
@@ -115,10 +119,10 @@ function q(e) {
|
|
|
115
119
|
}
|
|
116
120
|
//#endregion
|
|
117
121
|
//#region node_modules/date-fns/locale/sl/_lib/formatDistance.js
|
|
118
|
-
function
|
|
122
|
+
function vt(e) {
|
|
119
123
|
return e.one !== void 0;
|
|
120
124
|
}
|
|
121
|
-
var
|
|
125
|
+
var yt = {
|
|
122
126
|
lessThanXSeconds: {
|
|
123
127
|
present: {
|
|
124
128
|
one: "manj kot {{count}} sekunda",
|
|
@@ -393,7 +397,7 @@ var ht = {
|
|
|
393
397
|
}
|
|
394
398
|
}
|
|
395
399
|
};
|
|
396
|
-
function
|
|
400
|
+
function bt(e) {
|
|
397
401
|
switch (e % 100) {
|
|
398
402
|
case 1: return "one";
|
|
399
403
|
case 2: return "two";
|
|
@@ -402,27 +406,27 @@ function gt(e) {
|
|
|
402
406
|
default: return "other";
|
|
403
407
|
}
|
|
404
408
|
}
|
|
405
|
-
var
|
|
409
|
+
var xt = (e, t, n) => {
|
|
406
410
|
let r = "", i = "present";
|
|
407
411
|
n != null && n.addSuffix && (n.comparison && n.comparison > 0 ? (i = "future", r = "čez ") : (i = "past", r = "pred "));
|
|
408
|
-
let a =
|
|
412
|
+
let a = yt[e];
|
|
409
413
|
if (typeof a == "string") r += a;
|
|
410
414
|
else {
|
|
411
|
-
let e =
|
|
412
|
-
|
|
415
|
+
let e = bt(t);
|
|
416
|
+
vt(a) ? r += a[e].replace("{{count}}", String(t)) : r += a[i][e].replace("{{count}}", String(t));
|
|
413
417
|
}
|
|
414
418
|
return r;
|
|
415
419
|
};
|
|
416
420
|
//#endregion
|
|
417
421
|
//#region node_modules/date-fns/locale/_lib/buildFormatLongFn.js
|
|
418
|
-
function
|
|
422
|
+
function St(e) {
|
|
419
423
|
return (t = {}) => {
|
|
420
424
|
let n = t.width ? String(t.width) : e.defaultWidth;
|
|
421
425
|
return e.formats[n] || e.formats[e.defaultWidth];
|
|
422
426
|
};
|
|
423
427
|
}
|
|
424
|
-
var
|
|
425
|
-
date:
|
|
428
|
+
var Ct = {
|
|
429
|
+
date: St({
|
|
426
430
|
formats: {
|
|
427
431
|
full: "EEEE, dd. MMMM y",
|
|
428
432
|
long: "dd. MMMM y",
|
|
@@ -431,7 +435,7 @@ var yt = {
|
|
|
431
435
|
},
|
|
432
436
|
defaultWidth: "full"
|
|
433
437
|
}),
|
|
434
|
-
time:
|
|
438
|
+
time: St({
|
|
435
439
|
formats: {
|
|
436
440
|
full: "HH:mm:ss zzzz",
|
|
437
441
|
long: "HH:mm:ss z",
|
|
@@ -440,7 +444,7 @@ var yt = {
|
|
|
440
444
|
},
|
|
441
445
|
defaultWidth: "full"
|
|
442
446
|
}),
|
|
443
|
-
dateTime:
|
|
447
|
+
dateTime: St({
|
|
444
448
|
formats: {
|
|
445
449
|
full: "{{date}} {{time}}",
|
|
446
450
|
long: "{{date}} {{time}}",
|
|
@@ -449,7 +453,7 @@ var yt = {
|
|
|
449
453
|
},
|
|
450
454
|
defaultWidth: "full"
|
|
451
455
|
})
|
|
452
|
-
},
|
|
456
|
+
}, wt = {
|
|
453
457
|
lastWeek: (e) => {
|
|
454
458
|
switch (e.getDay()) {
|
|
455
459
|
case 0: return "'prejšnjo nedeljo ob' p";
|
|
@@ -470,13 +474,13 @@ var yt = {
|
|
|
470
474
|
}
|
|
471
475
|
},
|
|
472
476
|
other: "P"
|
|
473
|
-
},
|
|
474
|
-
let i =
|
|
477
|
+
}, Tt = (e, t, n, r) => {
|
|
478
|
+
let i = wt[e];
|
|
475
479
|
return typeof i == "function" ? i(t) : i;
|
|
476
480
|
};
|
|
477
481
|
//#endregion
|
|
478
482
|
//#region node_modules/date-fns/locale/_lib/buildLocalizeFn.js
|
|
479
|
-
function
|
|
483
|
+
function Et(e) {
|
|
480
484
|
return (t, n) => {
|
|
481
485
|
let r = n != null && n.context ? String(n.context) : "standalone", i;
|
|
482
486
|
if (r === "formatting" && e.formattingValues) {
|
|
@@ -490,9 +494,9 @@ function St(e) {
|
|
|
490
494
|
return i[a];
|
|
491
495
|
};
|
|
492
496
|
}
|
|
493
|
-
var
|
|
497
|
+
var Dt = {
|
|
494
498
|
ordinalNumber: (e, t) => Number(e) + ".",
|
|
495
|
-
era:
|
|
499
|
+
era: Et({
|
|
496
500
|
values: {
|
|
497
501
|
narrow: ["pr. n. št.", "po n. št."],
|
|
498
502
|
abbreviated: ["pr. n. št.", "po n. št."],
|
|
@@ -500,7 +504,7 @@ var Ct = {
|
|
|
500
504
|
},
|
|
501
505
|
defaultWidth: "wide"
|
|
502
506
|
}),
|
|
503
|
-
quarter:
|
|
507
|
+
quarter: Et({
|
|
504
508
|
values: {
|
|
505
509
|
narrow: [
|
|
506
510
|
"1",
|
|
@@ -524,7 +528,7 @@ var Ct = {
|
|
|
524
528
|
defaultWidth: "wide",
|
|
525
529
|
argumentCallback: (e) => e - 1
|
|
526
530
|
}),
|
|
527
|
-
month:
|
|
531
|
+
month: Et({
|
|
528
532
|
values: {
|
|
529
533
|
narrow: [
|
|
530
534
|
"j",
|
|
@@ -571,7 +575,7 @@ var Ct = {
|
|
|
571
575
|
},
|
|
572
576
|
defaultWidth: "wide"
|
|
573
577
|
}),
|
|
574
|
-
day:
|
|
578
|
+
day: Et({
|
|
575
579
|
values: {
|
|
576
580
|
narrow: [
|
|
577
581
|
"n",
|
|
@@ -612,7 +616,7 @@ var Ct = {
|
|
|
612
616
|
},
|
|
613
617
|
defaultWidth: "wide"
|
|
614
618
|
}),
|
|
615
|
-
dayPeriod:
|
|
619
|
+
dayPeriod: Et({
|
|
616
620
|
values: {
|
|
617
621
|
narrow: {
|
|
618
622
|
am: "d",
|
|
@@ -683,11 +687,11 @@ var Ct = {
|
|
|
683
687
|
};
|
|
684
688
|
//#endregion
|
|
685
689
|
//#region node_modules/date-fns/locale/_lib/buildMatchFn.js
|
|
686
|
-
function
|
|
690
|
+
function Ot(e) {
|
|
687
691
|
return (t, n = {}) => {
|
|
688
692
|
let r = n.width, i = r && e.matchPatterns[r] || e.matchPatterns[e.defaultMatchWidth], a = t.match(i);
|
|
689
693
|
if (!a) return null;
|
|
690
|
-
let o = a[0], s = r && e.parsePatterns[r] || e.parsePatterns[e.defaultParseWidth], c = Array.isArray(s) ?
|
|
694
|
+
let o = a[0], s = r && e.parsePatterns[r] || e.parsePatterns[e.defaultParseWidth], c = Array.isArray(s) ? At(s, (e) => e.test(o)) : kt(s, (e) => e.test(o)), l;
|
|
691
695
|
l = e.valueCallback ? e.valueCallback(c) : c, l = n.valueCallback ? n.valueCallback(l) : l;
|
|
692
696
|
let u = t.slice(o.length);
|
|
693
697
|
return {
|
|
@@ -696,15 +700,15 @@ function wt(e) {
|
|
|
696
700
|
};
|
|
697
701
|
};
|
|
698
702
|
}
|
|
699
|
-
function
|
|
703
|
+
function kt(e, t) {
|
|
700
704
|
for (let n in e) if (Object.prototype.hasOwnProperty.call(e, n) && t(e[n])) return n;
|
|
701
705
|
}
|
|
702
|
-
function
|
|
706
|
+
function At(e, t) {
|
|
703
707
|
for (let n = 0; n < e.length; n++) if (t(e[n])) return n;
|
|
704
708
|
}
|
|
705
709
|
//#endregion
|
|
706
710
|
//#region node_modules/date-fns/locale/_lib/buildMatchPatternFn.js
|
|
707
|
-
function
|
|
711
|
+
function jt(e) {
|
|
708
712
|
return (t, n = {}) => {
|
|
709
713
|
let r = t.match(e.matchPattern);
|
|
710
714
|
if (!r) return null;
|
|
@@ -721,19 +725,19 @@ function Dt(e) {
|
|
|
721
725
|
}
|
|
722
726
|
//#endregion
|
|
723
727
|
//#region node_modules/date-fns/locale/sl.js
|
|
724
|
-
var
|
|
728
|
+
var Mt = {
|
|
725
729
|
code: "sl",
|
|
726
|
-
formatDistance:
|
|
727
|
-
formatLong:
|
|
728
|
-
formatRelative:
|
|
729
|
-
localize:
|
|
730
|
+
formatDistance: xt,
|
|
731
|
+
formatLong: Ct,
|
|
732
|
+
formatRelative: Tt,
|
|
733
|
+
localize: Dt,
|
|
730
734
|
match: {
|
|
731
|
-
ordinalNumber:
|
|
735
|
+
ordinalNumber: jt({
|
|
732
736
|
matchPattern: /^(\d+)\./i,
|
|
733
737
|
parsePattern: /\d+/i,
|
|
734
738
|
valueCallback: (e) => parseInt(e, 10)
|
|
735
739
|
}),
|
|
736
|
-
era:
|
|
740
|
+
era: Ot({
|
|
737
741
|
matchPatterns: {
|
|
738
742
|
abbreviated: /^(pr\. n\. št\.|po n\. št\.)/i,
|
|
739
743
|
wide: /^(pred Kristusom|pred na[sš]im [sš]tetjem|po Kristusu|po na[sš]em [sš]tetju|na[sš]ega [sš]tetja)/i
|
|
@@ -742,7 +746,7 @@ var Ot = {
|
|
|
742
746
|
parsePatterns: { any: [/^pr/i, /^(po|na[sš]em)/i] },
|
|
743
747
|
defaultParseWidth: "any"
|
|
744
748
|
}),
|
|
745
|
-
quarter:
|
|
749
|
+
quarter: Ot({
|
|
746
750
|
matchPatterns: {
|
|
747
751
|
narrow: /^[1234]/i,
|
|
748
752
|
abbreviated: /^[1234]\.\s?[čc]et\.?/i,
|
|
@@ -758,7 +762,7 @@ var Ot = {
|
|
|
758
762
|
defaultParseWidth: "any",
|
|
759
763
|
valueCallback: (e) => e + 1
|
|
760
764
|
}),
|
|
761
|
-
month:
|
|
765
|
+
month: Ot({
|
|
762
766
|
matchPatterns: {
|
|
763
767
|
narrow: /^[jfmasond]/i,
|
|
764
768
|
abbreviated: /^(jan\.|feb\.|mar\.|apr\.|maj|jun\.|jul\.|avg\.|sep\.|okt\.|nov\.|dec\.)/i,
|
|
@@ -811,7 +815,7 @@ var Ot = {
|
|
|
811
815
|
},
|
|
812
816
|
defaultParseWidth: "wide"
|
|
813
817
|
}),
|
|
814
|
-
day:
|
|
818
|
+
day: Ot({
|
|
815
819
|
matchPatterns: {
|
|
816
820
|
narrow: /^[nptsčc]/i,
|
|
817
821
|
short: /^(ned\.|pon\.|tor\.|sre\.|[cč]et\.|pet\.|sob\.)/i,
|
|
@@ -841,7 +845,7 @@ var Ot = {
|
|
|
841
845
|
},
|
|
842
846
|
defaultParseWidth: "any"
|
|
843
847
|
}),
|
|
844
|
-
dayPeriod:
|
|
848
|
+
dayPeriod: Ot({
|
|
845
849
|
matchPatterns: {
|
|
846
850
|
narrow: /^(d|po?|z?v|n|z?j|24\.00|12\.00)/i,
|
|
847
851
|
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
|
|
@@ -876,31 +880,211 @@ var Ot = {
|
|
|
876
880
|
weekStartsOn: 1,
|
|
877
881
|
firstWeekContainsDate: 1
|
|
878
882
|
}
|
|
879
|
-
},
|
|
880
|
-
dateTimeLocale:
|
|
883
|
+
}, Nt = {
|
|
884
|
+
dateTimeLocale: w(Mt),
|
|
881
885
|
setDateTimeLocale(e) {
|
|
882
|
-
|
|
886
|
+
m(e) ? this.dateTimeLocale = e : this.dateTimeLocale.value = e;
|
|
883
887
|
}
|
|
884
|
-
},
|
|
888
|
+
}, Pt = class extends Error {
|
|
885
889
|
constructor(e) {
|
|
886
|
-
super(e),
|
|
890
|
+
super(e), X(this, "errorText", void 0), this.errorText = e;
|
|
891
|
+
}
|
|
892
|
+
}, Ft = class extends String {
|
|
893
|
+
constructor(e, t, n) {
|
|
894
|
+
super(e), X(this, "plugins", void 0), X(this, "options", void 0), this.plugins = n, this.options = t;
|
|
895
|
+
}
|
|
896
|
+
}, It = class extends String {};
|
|
897
|
+
function Lt(e) {
|
|
898
|
+
let t = P(e);
|
|
899
|
+
return typeof t == "object" && !!t && "componentName" in t;
|
|
900
|
+
}
|
|
901
|
+
function Rt(e) {
|
|
902
|
+
return typeof e == "string" || e instanceof String || Lt(e);
|
|
903
|
+
}
|
|
904
|
+
var zt = RegExp(`</?(?:${(/* @__PURE__ */ "address.article.aside.blockquote.br.dd.div.dl.dt.figcaption.figure.footer.h[1-6].header.hr.li.main.nav.ol.p.pre.section.table.td.th.tr.ul".split(".")).join("|")})\\b[^>]*>`, "gi"), Bt = "", Vt = {
|
|
905
|
+
"<": "<",
|
|
906
|
+
">": ">",
|
|
907
|
+
""": "\"",
|
|
908
|
+
"'": "'",
|
|
909
|
+
" ": Bt,
|
|
910
|
+
"&": "&"
|
|
911
|
+
};
|
|
912
|
+
function Ht(e) {
|
|
913
|
+
if (e instanceof It) {
|
|
914
|
+
let t = e.toString().replace(zt, " ").replace(/<[^>]*>/g, "").replace(/\s+/g, " ");
|
|
915
|
+
return Object.entries(Vt).reduce((e, [t, n]) => e.replaceAll(t, n), t);
|
|
916
|
+
}
|
|
917
|
+
return Lt(e) ? Wt(e).map(Ht).join("") : e.toString();
|
|
918
|
+
}
|
|
919
|
+
function Ut(e) {
|
|
920
|
+
return !(e instanceof It) && !Lt(e) ? e.toString() : Ht(e).replace(/\s+/g, " ").trim().replaceAll(Bt, " ");
|
|
921
|
+
}
|
|
922
|
+
function Wt(e) {
|
|
923
|
+
let { children: t } = e;
|
|
924
|
+
return t === void 0 ? [] : Array.isArray(t) ? t : [t];
|
|
925
|
+
}
|
|
926
|
+
function Gt(e) {
|
|
927
|
+
return typeof P(e) == "function";
|
|
928
|
+
}
|
|
929
|
+
var Kt = class {
|
|
930
|
+
constructor(e = "", n = "") {
|
|
931
|
+
X(this, "content", void 0), X(this, "classes", void 0), X(this, "kindRef", void 0), this.content = e, this.classes = n, this.kindRef = t(() => {
|
|
932
|
+
let e = this.resolvedText;
|
|
933
|
+
return e instanceof Ft ? "md" : e instanceof It ? "html" : Lt(e) ? "component" : "string";
|
|
934
|
+
});
|
|
935
|
+
}
|
|
936
|
+
get resolvedText() {
|
|
937
|
+
let e = P(this.content);
|
|
938
|
+
return Gt(e) ? e() : e;
|
|
939
|
+
}
|
|
940
|
+
get kind() {
|
|
941
|
+
return P(this.kindRef);
|
|
942
|
+
}
|
|
943
|
+
get componentName() {
|
|
944
|
+
switch (this.kind) {
|
|
945
|
+
case "md": return "vue-markdown";
|
|
946
|
+
case "html": return "html";
|
|
947
|
+
case "component": return this.resolvedText.componentName;
|
|
948
|
+
default: return "template";
|
|
949
|
+
}
|
|
950
|
+
}
|
|
951
|
+
get componentBindings() {
|
|
952
|
+
switch (this.kind) {
|
|
953
|
+
case "md": {
|
|
954
|
+
let e = this.resolvedText;
|
|
955
|
+
return {
|
|
956
|
+
source: e.toString(),
|
|
957
|
+
options: e.options,
|
|
958
|
+
plugins: e.plugins
|
|
959
|
+
};
|
|
960
|
+
}
|
|
961
|
+
case "component": {
|
|
962
|
+
let e = Z({}, this.resolvedText.componentProps);
|
|
963
|
+
return delete e.innerHTML, e;
|
|
964
|
+
}
|
|
965
|
+
default: return {};
|
|
966
|
+
}
|
|
967
|
+
}
|
|
968
|
+
get componentChildren() {
|
|
969
|
+
return this.kind === "component" ? Wt(this.resolvedText) : [];
|
|
970
|
+
}
|
|
971
|
+
get componentBody() {
|
|
972
|
+
switch (this.kind) {
|
|
973
|
+
case "md":
|
|
974
|
+
case "component": return "";
|
|
975
|
+
default: return this.resolvedText.toString();
|
|
976
|
+
}
|
|
977
|
+
}
|
|
978
|
+
get extraClasses() {
|
|
979
|
+
return this.classes;
|
|
980
|
+
}
|
|
981
|
+
};
|
|
982
|
+
//#endregion
|
|
983
|
+
//#region src/helpers/error-text.ts
|
|
984
|
+
function qt(e) {
|
|
985
|
+
var t;
|
|
986
|
+
return Rt(e) ? {
|
|
987
|
+
code: "",
|
|
988
|
+
params: {},
|
|
989
|
+
detail: Ut(e),
|
|
990
|
+
origin: "application"
|
|
991
|
+
} : {
|
|
992
|
+
code: typeof e.code == "string" ? e.code : "",
|
|
993
|
+
params: (t = e.params) == null ? {} : t,
|
|
994
|
+
detail: typeof e.detail == "string" ? e.detail : "",
|
|
995
|
+
origin: typeof e.origin == "string" && e.origin ? e.origin : "application"
|
|
996
|
+
};
|
|
997
|
+
}
|
|
998
|
+
function Jt(e, t) {
|
|
999
|
+
var n, r;
|
|
1000
|
+
if (Rt(e)) return e;
|
|
1001
|
+
let i = qt(e);
|
|
1002
|
+
return i.code ? (n = (r = t.errorText) == null ? void 0 : r.call(t, i)) == null ? i.detail : n : i.detail;
|
|
1003
|
+
}
|
|
1004
|
+
//#endregion
|
|
1005
|
+
//#region src/helpers/settings.ts
|
|
1006
|
+
var Yt = Symbol("vuetifyInputsSettingsKey"), Xt = /* @__PURE__ */ l({
|
|
1007
|
+
__name: "messages-widget",
|
|
1008
|
+
props: {
|
|
1009
|
+
message: {},
|
|
1010
|
+
classes: {}
|
|
1011
|
+
},
|
|
1012
|
+
setup(e) {
|
|
1013
|
+
let t = e, r = p(Yt, {}), i = /* @__PURE__ */ new Set(/* @__PURE__ */ "div.span.p.h1.h2.h3.h4.h5.h6.section.article.aside.nav.header.footer.main.figure.figcaption.blockquote.pre.code.em.strong.small.mark.del.ins.sub.sup.i.b.u.s.a.img.button.input.textarea.select.option.label.form.table.tr.td.th.thead.tbody.tfoot.ul.ol.li.dl.dt.dd".split("."));
|
|
1014
|
+
function a(e) {
|
|
1015
|
+
return e instanceof Kt ? e : new Kt(Jt(e, r));
|
|
1016
|
+
}
|
|
1017
|
+
function o(e, t, n) {
|
|
1018
|
+
let r = () => n.map(s);
|
|
1019
|
+
return i.has(e.toLowerCase()) ? f(e, t, r()) : f(D(e), t, n.length ? { default: r } : void 0);
|
|
1020
|
+
}
|
|
1021
|
+
function s(e) {
|
|
1022
|
+
let t = new Kt(e);
|
|
1023
|
+
switch (t.componentName) {
|
|
1024
|
+
case "template": return t.componentBody;
|
|
1025
|
+
case "html": return f("span", { innerHTML: t.componentBody });
|
|
1026
|
+
case "vue-markdown": {
|
|
1027
|
+
let { source: e, options: n, plugins: r } = t.componentBindings;
|
|
1028
|
+
return f(H, {
|
|
1029
|
+
class: "df-messages-widget-markdown",
|
|
1030
|
+
source: e,
|
|
1031
|
+
options: n,
|
|
1032
|
+
plugins: r
|
|
1033
|
+
});
|
|
1034
|
+
}
|
|
1035
|
+
default: return o(t.componentName, t.componentBindings, t.componentChildren);
|
|
1036
|
+
}
|
|
1037
|
+
}
|
|
1038
|
+
let c = () => typeof t.message == "string" ? f("span", { class: t.classes }, t.message) : t.message.map((e) => {
|
|
1039
|
+
let n = a(e), r = [t.classes, n.extraClasses];
|
|
1040
|
+
switch (n.componentName) {
|
|
1041
|
+
case "template": return f("div", { class: r }, n.componentBody);
|
|
1042
|
+
case "html": return f("div", {
|
|
1043
|
+
class: r,
|
|
1044
|
+
innerHTML: n.componentBody
|
|
1045
|
+
});
|
|
1046
|
+
case "vue-markdown": {
|
|
1047
|
+
let { source: e, options: t, plugins: i } = n.componentBindings;
|
|
1048
|
+
return f(H, {
|
|
1049
|
+
class: [...r, "df-messages-widget-markdown"],
|
|
1050
|
+
source: e,
|
|
1051
|
+
options: t,
|
|
1052
|
+
plugins: i
|
|
1053
|
+
});
|
|
1054
|
+
}
|
|
1055
|
+
default: return o(n.componentName, Z(Z({}, n.componentBindings), {}, { class: [r, n.componentBindings.class] }), n.componentChildren);
|
|
1056
|
+
}
|
|
1057
|
+
});
|
|
1058
|
+
return (e, t) => (C(), n(c));
|
|
887
1059
|
}
|
|
888
|
-
},
|
|
1060
|
+
}), Q = /* @__PURE__ */ l({
|
|
889
1061
|
__name: "df-input-hint",
|
|
890
1062
|
props: {
|
|
891
1063
|
errors: { default: "" },
|
|
892
|
-
message: {
|
|
1064
|
+
message: {
|
|
1065
|
+
type: [
|
|
1066
|
+
String,
|
|
1067
|
+
Object,
|
|
1068
|
+
Function,
|
|
1069
|
+
Array
|
|
1070
|
+
],
|
|
1071
|
+
default: ""
|
|
1072
|
+
},
|
|
893
1073
|
errorClasses: { default: "text-error" },
|
|
894
1074
|
messageClasses: { default: "" }
|
|
895
1075
|
},
|
|
896
1076
|
setup(e) {
|
|
897
|
-
let r = e, i = t(() => r.errors ? typeof r.errors == "string" ? r.errors.trim().length > 0 : r.errors.length > 0 : !1), a = t(() =>
|
|
898
|
-
|
|
1077
|
+
let r = e, i = t(() => r.errors ? typeof r.errors == "string" ? r.errors.trim().length > 0 : r.errors.length > 0 : !1), a = t(() => {
|
|
1078
|
+
if (i.value) return r.errors;
|
|
1079
|
+
let e = r.message;
|
|
1080
|
+
return typeof e == "string" || Array.isArray(e) ? e : [new Kt(e)];
|
|
1081
|
+
}), o = t(() => i.value ? r.errorClasses : r.messageClasses);
|
|
1082
|
+
return (e, t) => (C(), n(Xt, {
|
|
899
1083
|
message: a.value,
|
|
900
1084
|
classes: o.value
|
|
901
1085
|
}, null, 8, ["message", "classes"]));
|
|
902
1086
|
}
|
|
903
|
-
}),
|
|
1087
|
+
}), $ = /* @__PURE__ */ l({
|
|
904
1088
|
__name: "df-label",
|
|
905
1089
|
props: {
|
|
906
1090
|
data: {},
|
|
@@ -908,131 +1092,164 @@ var Ot = {
|
|
|
908
1092
|
allowWrap: { type: Boolean }
|
|
909
1093
|
},
|
|
910
1094
|
setup(a) {
|
|
911
|
-
let o = a, c = t(() =>
|
|
1095
|
+
let o = a, c = t(() => {
|
|
1096
|
+
var e;
|
|
1097
|
+
return o.label.text || ((e = o.data) == null ? void 0 : e.label) || "";
|
|
1098
|
+
}), l = t(() => new Kt(c.value));
|
|
912
1099
|
return (t, o) => {
|
|
913
|
-
let
|
|
914
|
-
return
|
|
1100
|
+
let u = D("v-img");
|
|
1101
|
+
return C(), i("div", { class: v(["df-label", { "allow-wrap": a.allowWrap }]) }, [a.label.icon ? (C(), i(e, { key: 0 }, [a.label.iconComponent === "v-icon" ? (C(), n(P(V), {
|
|
915
1102
|
key: 0,
|
|
916
1103
|
name: a.label.icon,
|
|
917
1104
|
size: "1.25em"
|
|
918
|
-
}, null, 8, ["name"])) : a.label.iconComponent === "v-img" ? (
|
|
1105
|
+
}, null, 8, ["name"])) : a.label.iconComponent === "v-img" ? (C(), n(u, {
|
|
919
1106
|
key: 1,
|
|
920
1107
|
class: "icon",
|
|
921
1108
|
src: a.label.icon
|
|
922
|
-
}, null, 8, ["src"])) : (
|
|
1109
|
+
}, null, 8, ["src"])) : (C(), n(O(a.label.iconComponent), {
|
|
923
1110
|
key: 2,
|
|
924
1111
|
src: a.label.icon
|
|
925
|
-
}, null, 8, ["src"]))], 64)) : r("", !0), c.value
|
|
926
|
-
key:
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
options: c.value.options,
|
|
930
|
-
plugins: c.value.plugins
|
|
931
|
-
}, null, 8, [
|
|
932
|
-
"source",
|
|
933
|
-
"options",
|
|
934
|
-
"plugins"
|
|
935
|
-
])) : (x(), i(e, { key: 2 }, [s(O(c.value), 1)], 64))], 2);
|
|
1112
|
+
}, null, 8, ["src"]))], 64)) : r("", !0), typeof c.value == "string" ? (C(), i(e, { key: 1 }, [s(A(c.value), 1)], 64)) : (C(), n(Xt, {
|
|
1113
|
+
key: 2,
|
|
1114
|
+
message: [l.value]
|
|
1115
|
+
}, null, 8, ["message"]))], 2);
|
|
936
1116
|
};
|
|
937
1117
|
}
|
|
938
|
-
})
|
|
1118
|
+
});
|
|
1119
|
+
//#endregion
|
|
1120
|
+
//#region src/helpers/shown-errors.ts
|
|
1121
|
+
function Zt(e, t, n, r) {
|
|
1122
|
+
let i = !t || t.effectiveAccess !== "disabled";
|
|
1123
|
+
return e.filter((e) => {
|
|
1124
|
+
let a = i && (e.origin === "server" || n);
|
|
1125
|
+
return r.shownErrors ? r.shownErrors(e, t, a) : a;
|
|
1126
|
+
});
|
|
1127
|
+
}
|
|
1128
|
+
function Qt(e) {
|
|
1129
|
+
let n = p(Yt, {});
|
|
1130
|
+
return t(() => {
|
|
1131
|
+
let t = N(e);
|
|
1132
|
+
return t ? Zt(t.errors, t, t.touched, n) : [];
|
|
1133
|
+
});
|
|
1134
|
+
}
|
|
1135
|
+
//#endregion
|
|
1136
|
+
//#region src/helpers/input-base.ts
|
|
1137
|
+
var $t = class {
|
|
939
1138
|
constructor(e, t, n = "v-icon") {
|
|
940
|
-
|
|
1139
|
+
X(this, "text", void 0), X(this, "icon", void 0), X(this, "iconComponent", void 0), this.text = e, this.icon = t, this.iconComponent = n;
|
|
941
1140
|
}
|
|
942
|
-
},
|
|
1141
|
+
}, en = {
|
|
943
1142
|
enabled: void 0,
|
|
944
1143
|
clearable: !0
|
|
945
1144
|
};
|
|
946
|
-
function
|
|
947
|
-
let
|
|
1145
|
+
function tn(e, n, r) {
|
|
1146
|
+
let i = p(Yt, {}), a = p("field-density", null), o = p("field-variant", null), s = w(null), c = k(null), l = t({
|
|
948
1147
|
get() {
|
|
949
|
-
return
|
|
1148
|
+
return c.value ? c.value.value : e.control ? e.control.value : e.modelValue === void 0 ? s.value : e.modelValue;
|
|
950
1149
|
},
|
|
951
1150
|
set(t) {
|
|
952
1151
|
try {
|
|
953
1152
|
e.control && (e.control.value = t);
|
|
954
1153
|
} finally {
|
|
955
|
-
e.control && !Object.is(
|
|
956
|
-
|
|
1154
|
+
e.control && !Object.is(j(e.control.value), j(t)) && (c.value = { value: t }, _(() => {
|
|
1155
|
+
c.value = null;
|
|
957
1156
|
}));
|
|
958
1157
|
}
|
|
959
|
-
e.modelValue === void 0 && (
|
|
1158
|
+
e.modelValue === void 0 && (s.value = t), n("update:modelValue", e.control ? e.control.value : t);
|
|
960
1159
|
}
|
|
961
1160
|
});
|
|
962
|
-
if (e.control && !(e.control instanceof
|
|
963
|
-
let
|
|
1161
|
+
if (e.control && !(e.control instanceof U.FieldBase)) throw Error("control prop is not a vue-form control instance");
|
|
1162
|
+
let u = t({
|
|
964
1163
|
get() {
|
|
965
1164
|
return e.control.touched;
|
|
966
1165
|
},
|
|
967
1166
|
set(t) {
|
|
968
1167
|
e.control.touched = t;
|
|
969
1168
|
}
|
|
970
|
-
}),
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
1169
|
+
}), d = e.control ? u : w(!1), f = t(() => !e.control || e.control.valid), m = t(() => {
|
|
1170
|
+
var t;
|
|
1171
|
+
let n = /* @__PURE__ */ new Map();
|
|
1172
|
+
return ((t = e.errors) == null ? [] : t).forEach((e) => {
|
|
1173
|
+
let { code: t, params: r, detail: i, origin: a } = qt(e);
|
|
1174
|
+
n.set(new G(t, r, i, a), e);
|
|
1175
|
+
}), n;
|
|
1176
|
+
}), h = t(() => {
|
|
977
1177
|
var t;
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
1178
|
+
return e.control ? e.control.errors : [...m.value.keys(), ...(t = r == null ? void 0 : r()) == null ? [] : t];
|
|
1179
|
+
}), g = t(() => Zt(h.value, e.control, d.value, i).map((e) => {
|
|
1180
|
+
var t;
|
|
1181
|
+
return (t = m.value.get(e)) == null ? e : t;
|
|
1182
|
+
})), v = t(() => g.value.length > 0 ? " " : void 0), y = t(() => e.control ? e.control.effectiveEnabled : e.enabled !== !1), b = t(() => {
|
|
1183
|
+
if (e.control) return e.control.visibility;
|
|
1184
|
+
if (e.visibility == null) return U.defaultVisibility;
|
|
1185
|
+
if (!U.isVisibility(e.visibility)) throw Error(`'${e.visibility}' is not a visibility: ${U.visibilityValues.join(", ")}`);
|
|
1186
|
+
return e.visibility;
|
|
1187
|
+
}), x = t(() => b.value !== "suppress"), S = t(() => ({
|
|
1188
|
+
"d-none": b.value === "hidden",
|
|
1189
|
+
invisible: b.value === "invisible"
|
|
1190
|
+
})), C = t(() => {
|
|
981
1191
|
var t, n;
|
|
982
|
-
return (t = (n = e.
|
|
1192
|
+
return (t = (n = e.control) == null ? void 0 : n.extra) == null ? {} : t;
|
|
983
1193
|
}), T = t(() => {
|
|
984
|
-
var t
|
|
985
|
-
|
|
1194
|
+
var t;
|
|
1195
|
+
let n = (t = e.label) == null ? C.value.label : t;
|
|
1196
|
+
return n instanceof $t ? n : new $t(n == null ? "" : n);
|
|
986
1197
|
}), E = t(() => {
|
|
987
1198
|
var t, n;
|
|
988
|
-
return (t = (n = e.
|
|
1199
|
+
return (t = (n = e.placeholder) == null ? C.value.placeholder : n) == null ? "" : t;
|
|
1200
|
+
}), D = t(() => {
|
|
1201
|
+
var t, n;
|
|
1202
|
+
return (t = (n = e.helpText) == null ? C.value.helpText : n) == null ? "" : t;
|
|
989
1203
|
}), O = t(() => {
|
|
990
1204
|
var t, n;
|
|
991
|
-
return (t = (n = e.
|
|
1205
|
+
return (t = (n = e.hint) == null ? C.value.hint : n) == null ? "" : t;
|
|
992
1206
|
}), A = t(() => {
|
|
993
|
-
var t, n
|
|
994
|
-
return (t = (n =
|
|
995
|
-
}),
|
|
996
|
-
var t, n,
|
|
997
|
-
return (t = (n = (
|
|
1207
|
+
var t, n;
|
|
1208
|
+
return (t = (n = e.cssClass) == null ? C.value.cssClass : n) == null ? "" : t;
|
|
1209
|
+
}), M = t(() => {
|
|
1210
|
+
var t, n, r, o;
|
|
1211
|
+
return (t = (n = (r = (o = e.density) == null ? C.value.density : o) == null ? a : r) == null ? i.defaultDensity : n) == null ? "default" : t;
|
|
1212
|
+
}), N = t(() => M.value === "inline" ? "default" : M.value), P = t(() => {
|
|
1213
|
+
var t, n, r, a;
|
|
1214
|
+
return (t = (n = (r = (a = e.variant) == null ? C.value.variant : a) == null ? o : r) == null ? i.defaultVariant : n) == null ? "underlined" : t;
|
|
998
1215
|
});
|
|
999
1216
|
return {
|
|
1000
|
-
value:
|
|
1217
|
+
value: l,
|
|
1001
1218
|
valid: f,
|
|
1002
|
-
enabled:
|
|
1003
|
-
errors:
|
|
1004
|
-
|
|
1005
|
-
visibility:
|
|
1006
|
-
isRendered:
|
|
1007
|
-
visibilityClass:
|
|
1008
|
-
label:
|
|
1009
|
-
touched:
|
|
1010
|
-
density:
|
|
1011
|
-
densityClass: t(() => `df-density-${
|
|
1219
|
+
enabled: y,
|
|
1220
|
+
errors: h,
|
|
1221
|
+
shownErrors: g,
|
|
1222
|
+
visibility: b,
|
|
1223
|
+
isRendered: x,
|
|
1224
|
+
visibilityClass: S,
|
|
1225
|
+
label: T,
|
|
1226
|
+
touched: d,
|
|
1227
|
+
density: M,
|
|
1228
|
+
densityClass: t(() => `df-density-${M.value}`),
|
|
1012
1229
|
vuetifyBindings: t(() => {
|
|
1013
1230
|
var t;
|
|
1014
|
-
return
|
|
1231
|
+
return Z({
|
|
1015
1232
|
name: (t = e.control) == null ? void 0 : t.fieldName,
|
|
1016
|
-
class:
|
|
1017
|
-
density:
|
|
1018
|
-
variant:
|
|
1019
|
-
label:
|
|
1020
|
-
errorMessages:
|
|
1021
|
-
readonly: !
|
|
1022
|
-
disabled: !
|
|
1023
|
-
placeholder:
|
|
1024
|
-
"persistent-placeholder": !
|
|
1025
|
-
hint:
|
|
1233
|
+
class: A.value,
|
|
1234
|
+
density: N.value,
|
|
1235
|
+
variant: P.value,
|
|
1236
|
+
label: Ut(T.value.text),
|
|
1237
|
+
errorMessages: v.value,
|
|
1238
|
+
readonly: !y.value,
|
|
1239
|
+
disabled: !y.value,
|
|
1240
|
+
placeholder: E.value,
|
|
1241
|
+
"persistent-placeholder": !q(E.value),
|
|
1242
|
+
hint: O.value,
|
|
1026
1243
|
persistentHint: !0,
|
|
1027
1244
|
hideDetails: "auto",
|
|
1028
|
-
helpText:
|
|
1245
|
+
helpText: D.value
|
|
1029
1246
|
}, e.passthroughAttrs || {});
|
|
1030
1247
|
})
|
|
1031
1248
|
};
|
|
1032
1249
|
}
|
|
1033
1250
|
//#endregion
|
|
1034
1251
|
//#region src/helpers/input-base.vue?vue&type=script&setup=true&lang.ts
|
|
1035
|
-
var
|
|
1252
|
+
var nn = { class: "d-flex w-100 df-style-resetting df-sub-field" }, rn = /* @__PURE__ */ l({
|
|
1036
1253
|
__name: "input-base",
|
|
1037
1254
|
props: {
|
|
1038
1255
|
control: {},
|
|
@@ -1057,49 +1274,49 @@ var Nt = { class: "d-flex w-100 df-style-resetting df-sub-field" }, Pt = /* @__P
|
|
|
1057
1274
|
"blur"
|
|
1058
1275
|
],
|
|
1059
1276
|
setup(e, { emit: i }) {
|
|
1060
|
-
let s = e, l = i, { isRendered:
|
|
1061
|
-
function
|
|
1062
|
-
|
|
1277
|
+
let s = e, l = i, { isRendered: u, label: f, shownErrors: p, touched: m, value: h, visibilityClass: g, vuetifyBindings: _ } = tn(s, l), b = t(() => !!(P(s.clearable) && P(h))), x = w(!1);
|
|
1278
|
+
function S(e) {
|
|
1279
|
+
x.value = e, e || (m.value = !0, l("blur"));
|
|
1063
1280
|
}
|
|
1064
1281
|
return (t, i) => {
|
|
1065
|
-
let s =
|
|
1066
|
-
return
|
|
1282
|
+
let s = D("v-field"), m = D("v-input");
|
|
1283
|
+
return P(u) ? (C(), n(m, {
|
|
1067
1284
|
key: 0,
|
|
1068
|
-
name:
|
|
1069
|
-
density:
|
|
1070
|
-
hint:
|
|
1071
|
-
"persistent-hint":
|
|
1072
|
-
"hide-details":
|
|
1073
|
-
"error-messages":
|
|
1074
|
-
class:
|
|
1285
|
+
name: P(_).name,
|
|
1286
|
+
density: P(_).density,
|
|
1287
|
+
hint: P(_).hint,
|
|
1288
|
+
"persistent-hint": P(_).persistentHint,
|
|
1289
|
+
"hide-details": P(_).hideDetails,
|
|
1290
|
+
"error-messages": P(_).errorMessages,
|
|
1291
|
+
class: v([e.cssClass, P(g)])
|
|
1075
1292
|
}, o({
|
|
1076
|
-
message:
|
|
1293
|
+
message: R(({ message: e }) => [c(Q, {
|
|
1077
1294
|
message: e,
|
|
1078
|
-
errors:
|
|
1295
|
+
errors: P(p)
|
|
1079
1296
|
}, null, 8, ["message", "errors"])]),
|
|
1080
|
-
default:
|
|
1081
|
-
variant:
|
|
1082
|
-
density:
|
|
1083
|
-
label:
|
|
1084
|
-
disabled:
|
|
1297
|
+
default: R(() => [c(s, {
|
|
1298
|
+
variant: P(_).variant,
|
|
1299
|
+
density: P(_).density,
|
|
1300
|
+
label: P(_).label,
|
|
1301
|
+
disabled: P(_).disabled,
|
|
1085
1302
|
clearable: b.value,
|
|
1086
1303
|
"persistent-clear": !0,
|
|
1087
|
-
dirty: !!
|
|
1088
|
-
active:
|
|
1304
|
+
dirty: !!P(h) || !!P(_).placeholder,
|
|
1305
|
+
active: x.value,
|
|
1089
1306
|
loading: e.loading,
|
|
1090
1307
|
"onClick:clear": i[0] || (i[0] = (e) => l("click:clear")),
|
|
1091
|
-
"onUpdate:focused": i[1] || (i[1] = (e) =>
|
|
1308
|
+
"onUpdate:focused": i[1] || (i[1] = (e) => S(e))
|
|
1092
1309
|
}, o({
|
|
1093
|
-
label:
|
|
1310
|
+
label: R((e) => [c($, {
|
|
1094
1311
|
data: e,
|
|
1095
|
-
label:
|
|
1312
|
+
label: P(f)
|
|
1096
1313
|
}, null, 8, ["data", "label"])]),
|
|
1097
|
-
default:
|
|
1098
|
-
loader:
|
|
1314
|
+
default: R((e) => [a("div", nn, [E(t.$slots, "default", y(d(e)))])]),
|
|
1315
|
+
loader: R((e) => [E(t.$slots, "loader", y(d(e)))]),
|
|
1099
1316
|
_: 2
|
|
1100
1317
|
}, [t.$slots["prepend-inner"] ? {
|
|
1101
1318
|
name: "prepend-inner",
|
|
1102
|
-
fn:
|
|
1319
|
+
fn: R((e) => [E(t.$slots, "prepend-inner", y(d(e)))]),
|
|
1103
1320
|
key: "0"
|
|
1104
1321
|
} : void 0]), 1032, [
|
|
1105
1322
|
"variant",
|
|
@@ -1114,7 +1331,7 @@ var Nt = { class: "d-flex w-100 df-style-resetting df-sub-field" }, Pt = /* @__P
|
|
|
1114
1331
|
_: 2
|
|
1115
1332
|
}, [t.$slots.prepend ? {
|
|
1116
1333
|
name: "prepend",
|
|
1117
|
-
fn:
|
|
1334
|
+
fn: R((e) => [E(t.$slots, "prepend", y(d(e)))]),
|
|
1118
1335
|
key: "0"
|
|
1119
1336
|
} : void 0]), 1032, [
|
|
1120
1337
|
"name",
|
|
@@ -1127,10 +1344,12 @@ var Nt = { class: "d-flex w-100 df-style-resetting df-sub-field" }, Pt = /* @__P
|
|
|
1127
1344
|
])) : r("", !0);
|
|
1128
1345
|
};
|
|
1129
1346
|
}
|
|
1130
|
-
}),
|
|
1347
|
+
}), an = {
|
|
1131
1348
|
Yes: "Yes",
|
|
1132
1349
|
No: "No",
|
|
1133
1350
|
Close: "Close",
|
|
1351
|
+
Cancel: "Cancel",
|
|
1352
|
+
Ok: "OK",
|
|
1134
1353
|
Paragraph: "Paragraph",
|
|
1135
1354
|
Heading1: "Heading 1",
|
|
1136
1355
|
Heading2: "Heading 2",
|
|
@@ -1188,38 +1407,37 @@ var Nt = { class: "d-flex w-100 df-style-resetting df-sub-field" }, Pt = /* @__P
|
|
|
1188
1407
|
Style: "Style",
|
|
1189
1408
|
MediaEmbed: "Insert media",
|
|
1190
1409
|
MediaEmbedUrl: "Video URL",
|
|
1191
|
-
MediaEmbedInsert: "Insert"
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
(
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
}
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
})(Q || (Q = {})), Object.freeze(Q);
|
|
1410
|
+
MediaEmbedInsert: "Insert"
|
|
1411
|
+
}, on = de(an), { translateStrings: sn } = on, cn = /* @__PURE__ */ new WeakMap();
|
|
1412
|
+
function ln(e) {
|
|
1413
|
+
if (!(e != null && e.translate)) return on;
|
|
1414
|
+
let t = cn.get(e);
|
|
1415
|
+
return t || (t = de(an), t.translateStrings(e.translate, e.translateNamespace), cn.set(e, t)), t;
|
|
1416
|
+
}
|
|
1417
|
+
function un(e, t) {
|
|
1418
|
+
return ln(u() ? p(Yt, {}) : void 0).translate(e, t);
|
|
1419
|
+
}
|
|
1420
|
+
function dn() {
|
|
1421
|
+
let e = ln(p(Yt, {}));
|
|
1422
|
+
return (t, n) => e.translate(t, n);
|
|
1423
|
+
}
|
|
1424
|
+
//#endregion
|
|
1425
|
+
//#region src/helpers/action/action-display-style.ts
|
|
1426
|
+
var fn = Object.freeze(["button", "text"]), pn = "button";
|
|
1427
|
+
function mn(e) {
|
|
1428
|
+
return fn.includes(e);
|
|
1429
|
+
}
|
|
1212
1430
|
//#endregion
|
|
1213
1431
|
//#region src/helpers/action/responsive-render-options.ts
|
|
1214
|
-
var
|
|
1432
|
+
var hn = [
|
|
1215
1433
|
"xs",
|
|
1216
1434
|
"sm",
|
|
1217
1435
|
"md",
|
|
1218
1436
|
"lg",
|
|
1219
1437
|
"xl"
|
|
1220
|
-
],
|
|
1438
|
+
], gn = class {
|
|
1221
1439
|
constructor(e) {
|
|
1222
|
-
|
|
1440
|
+
X(this, "_value", void 0), this._value = this.cleanBreakpoint(e, !0), e && hn.forEach((t) => {
|
|
1223
1441
|
let n = this.cleanBreakpoint(e[t]);
|
|
1224
1442
|
n && (this._value[t] = n);
|
|
1225
1443
|
});
|
|
@@ -1227,43 +1445,51 @@ var Rt = [
|
|
|
1227
1445
|
getOptionsForBreakpoint(e) {
|
|
1228
1446
|
var t;
|
|
1229
1447
|
let n = (t = this.cleanBreakpoint(this._value)) == null ? {} : t;
|
|
1230
|
-
for (let t of
|
|
1448
|
+
for (let t of hn) {
|
|
1231
1449
|
var r;
|
|
1232
1450
|
let i = (r = this._value[t]) == null ? {} : r;
|
|
1233
1451
|
for (let e of Object.keys(i)) {
|
|
1234
1452
|
let t = i[e];
|
|
1235
|
-
t != null && (n[e] =
|
|
1453
|
+
t != null && (n[e] = le(t) ? Z(Z({}, n[e]), t) : t);
|
|
1236
1454
|
}
|
|
1237
1455
|
if (t === e) break;
|
|
1238
1456
|
}
|
|
1239
1457
|
return n;
|
|
1240
1458
|
}
|
|
1241
1459
|
};
|
|
1242
|
-
function
|
|
1460
|
+
function _n(e) {
|
|
1243
1461
|
return e.xlAndUp.value ? "xl" : e.lgAndUp.value ? "lg" : e.mdAndUp.value ? "md" : e.smAndUp.value ? "sm" : "xs";
|
|
1244
1462
|
}
|
|
1245
|
-
function
|
|
1246
|
-
let e =
|
|
1247
|
-
return t(() =>
|
|
1463
|
+
function vn() {
|
|
1464
|
+
let e = fe();
|
|
1465
|
+
return t(() => _n(e));
|
|
1248
1466
|
}
|
|
1249
1467
|
//#endregion
|
|
1250
1468
|
//#region src/helpers/action/action-render-options.ts
|
|
1251
|
-
var
|
|
1469
|
+
var yn = class extends gn {
|
|
1252
1470
|
cleanBreakpoint(e, t = !1) {
|
|
1253
|
-
if ((!e || !
|
|
1471
|
+
if ((!e || !ce(e)) && !t) return null;
|
|
1254
1472
|
let n = {};
|
|
1255
|
-
|
|
1473
|
+
if (t && (n.renderAs = pn, n.showLabel = !0, n.showIcon = !0), e) {
|
|
1474
|
+
if (e.renderAs != null) {
|
|
1475
|
+
if (!mn(e.renderAs)) throw Error(`'${e.renderAs}' is not an action display style: ${fn.join(", ")}`);
|
|
1476
|
+
n.renderAs = e.renderAs;
|
|
1477
|
+
}
|
|
1478
|
+
let t = N(e.label);
|
|
1479
|
+
J(t) && (n.label = t), J(e.icon) && (n.icon = e.icon), K(e.showLabel) && (n.showLabel = e.showLabel), K(e.showIcon) && (n.showIcon = e.showIcon), J(e.name) && (n.name = e.name), K(e.defaultConfirm) && (n.defaultConfirm = e.defaultConfirm), K(e.defaultReject) && (n.defaultReject = e.defaultReject), le(e.passthroughAttrs) && (n.passthroughAttrs = Z({}, e.passthroughAttrs));
|
|
1480
|
+
}
|
|
1481
|
+
return Object.keys(n).length ? n : null;
|
|
1256
1482
|
}
|
|
1257
1483
|
};
|
|
1258
|
-
function
|
|
1259
|
-
let n = new
|
|
1484
|
+
function bn(e, t) {
|
|
1485
|
+
let n = new yn(e).getOptionsForBreakpoint(t), r = n.label;
|
|
1260
1486
|
return {
|
|
1261
1487
|
name: n.name,
|
|
1262
|
-
label: n.showLabel ?
|
|
1488
|
+
label: n.showLabel ? r : void 0,
|
|
1263
1489
|
icon: n.showIcon ? n.icon : void 0,
|
|
1264
1490
|
renderAs: n.renderAs,
|
|
1265
|
-
showLabel:
|
|
1266
|
-
showIcon:
|
|
1491
|
+
showLabel: J(r) && !q(r) ? n.showLabel : !1,
|
|
1492
|
+
showIcon: J(n.icon) && !q(n.icon) ? n.showIcon : !1,
|
|
1267
1493
|
defaultConfirm: n.defaultConfirm,
|
|
1268
1494
|
defaultReject: n.defaultReject,
|
|
1269
1495
|
passthroughAttrs: n.passthroughAttrs
|
|
@@ -1271,78 +1497,79 @@ function Ut(e, t) {
|
|
|
1271
1497
|
}
|
|
1272
1498
|
//#endregion
|
|
1273
1499
|
//#region src/helpers/action/action.ts
|
|
1274
|
-
var
|
|
1500
|
+
var xn = class e extends te {
|
|
1275
1501
|
getBreakpointValue(e) {
|
|
1276
|
-
return t(() =>
|
|
1502
|
+
return t(() => bn(this.value, e.value));
|
|
1503
|
+
}
|
|
1504
|
+
get label() {
|
|
1505
|
+
return N(this.value.label);
|
|
1506
|
+
}
|
|
1507
|
+
set label(e) {
|
|
1508
|
+
super.label = e;
|
|
1277
1509
|
}
|
|
1278
1510
|
get name() {
|
|
1279
1511
|
return this.value.name;
|
|
1280
1512
|
}
|
|
1281
1513
|
get renderedLabel() {
|
|
1282
|
-
return this.value.showLabel ? this.value.label : void 0;
|
|
1514
|
+
return this.value.showLabel ? N(this.value.label) : void 0;
|
|
1283
1515
|
}
|
|
1284
1516
|
get showLabel() {
|
|
1285
|
-
|
|
1517
|
+
let e = N(this.value.label);
|
|
1518
|
+
return J(e) && !q(e) ? this.value.showLabel : !1;
|
|
1286
1519
|
}
|
|
1287
1520
|
get renderedIcon() {
|
|
1288
1521
|
return this.value.showIcon ? this.value.icon : void 0;
|
|
1289
1522
|
}
|
|
1290
1523
|
get showIcon() {
|
|
1291
|
-
return
|
|
1524
|
+
return J(this.value.icon) && !q(this.value.icon) ? this.value.showIcon : !1;
|
|
1292
1525
|
}
|
|
1293
1526
|
get renderAs() {
|
|
1294
1527
|
return this.value.renderAs;
|
|
1295
1528
|
}
|
|
1296
|
-
get defaultConfirm() {
|
|
1297
|
-
return this.value.defaultConfirm;
|
|
1298
|
-
}
|
|
1299
|
-
get defaultReject() {
|
|
1300
|
-
return this.value.defaultReject;
|
|
1301
|
-
}
|
|
1302
1529
|
get passthroughAttrs() {
|
|
1303
1530
|
return this.value.passthroughAttrs;
|
|
1304
1531
|
}
|
|
1305
1532
|
static closeAction(t) {
|
|
1306
1533
|
var n;
|
|
1307
|
-
let r =
|
|
1534
|
+
let r = Z(Z({}, t == null ? {} : t), {}, { value: {
|
|
1308
1535
|
name: "close",
|
|
1309
|
-
label:
|
|
1536
|
+
label: () => un("Close"),
|
|
1310
1537
|
icon: "ion-close-outline",
|
|
1311
|
-
renderAs:
|
|
1538
|
+
renderAs: "button",
|
|
1312
1539
|
showLabel: !0,
|
|
1313
1540
|
showIcon: !0
|
|
1314
1541
|
} });
|
|
1315
|
-
return r.value =
|
|
1542
|
+
return r.value = Z(Z({}, r.value), (n = t == null ? void 0 : t.value) == null ? {} : n), new e(r);
|
|
1316
1543
|
}
|
|
1317
1544
|
static yesAction(t) {
|
|
1318
1545
|
var n;
|
|
1319
|
-
let r =
|
|
1546
|
+
let r = Z(Z({}, t == null ? {} : t), {}, { value: {
|
|
1320
1547
|
name: "yes",
|
|
1321
|
-
label:
|
|
1548
|
+
label: () => un("Yes"),
|
|
1322
1549
|
icon: "ion-thumbs-up-outline",
|
|
1323
|
-
renderAs:
|
|
1550
|
+
renderAs: "button",
|
|
1324
1551
|
showLabel: !0,
|
|
1325
1552
|
showIcon: !0
|
|
1326
1553
|
} });
|
|
1327
|
-
return r.value =
|
|
1554
|
+
return r.value = Z(Z({}, r.value), (n = t == null ? void 0 : t.value) == null ? {} : n), new e(r);
|
|
1328
1555
|
}
|
|
1329
1556
|
static noAction(t) {
|
|
1330
1557
|
var n;
|
|
1331
|
-
let r =
|
|
1558
|
+
let r = Z(Z({}, t == null ? {} : t), {}, { value: {
|
|
1332
1559
|
name: "no",
|
|
1333
|
-
label:
|
|
1560
|
+
label: () => un("No"),
|
|
1334
1561
|
icon: "ion-thumbs-down-outline",
|
|
1335
|
-
renderAs:
|
|
1562
|
+
renderAs: "button",
|
|
1336
1563
|
showLabel: !0,
|
|
1337
1564
|
showIcon: !0
|
|
1338
1565
|
} });
|
|
1339
|
-
return r.value =
|
|
1566
|
+
return r.value = Z(Z({}, r.value), (n = t == null ? void 0 : t.value) == null ? {} : n), new e(r);
|
|
1340
1567
|
}
|
|
1341
1568
|
};
|
|
1342
1569
|
//#endregion
|
|
1343
1570
|
//#region src/helpers/use-file-touch-keepalive.ts
|
|
1344
|
-
function
|
|
1345
|
-
let i =
|
|
1571
|
+
function Sn(e, t, n, r) {
|
|
1572
|
+
let i = p(Yt, {}), a = w(null);
|
|
1346
1573
|
function o() {
|
|
1347
1574
|
a.value && window.clearInterval(a.value);
|
|
1348
1575
|
}
|
|
@@ -1352,24 +1579,24 @@ function Gt(e, t, n, r) {
|
|
|
1352
1579
|
let l = (s = (c = n()) == null ? i.defaultTouchInterval : c) == null ? 6e4 : s;
|
|
1353
1580
|
a.value = window.setInterval(() => {
|
|
1354
1581
|
e.value && t().touch(e.value).catch((e) => {
|
|
1355
|
-
e instanceof
|
|
1582
|
+
e instanceof Pt && r(e.errorText);
|
|
1356
1583
|
});
|
|
1357
1584
|
}, l);
|
|
1358
1585
|
}
|
|
1359
|
-
return
|
|
1586
|
+
return x(() => o()), I(e, (e) => e ? s() : o()), {
|
|
1360
1587
|
setupTouchInterval: s,
|
|
1361
1588
|
clearTouchInterval: o
|
|
1362
1589
|
};
|
|
1363
1590
|
}
|
|
1364
|
-
function
|
|
1365
|
-
e && (e.errors = [new
|
|
1591
|
+
function Cn(e, t) {
|
|
1592
|
+
e && (e.errors = [new G("file_gone", {}, t, "server")]);
|
|
1366
1593
|
}
|
|
1367
1594
|
//#endregion
|
|
1368
1595
|
//#region src/df-actions.vue?vue&type=script&setup=true&lang.ts
|
|
1369
|
-
var
|
|
1596
|
+
var wn = {
|
|
1370
1597
|
key: 1,
|
|
1371
1598
|
style: { width: "0.5rem" }
|
|
1372
|
-
},
|
|
1599
|
+
}, Tn = { key: 2 }, En = /* @__PURE__ */ l({
|
|
1373
1600
|
__name: "df-actions",
|
|
1374
1601
|
props: {
|
|
1375
1602
|
actions: {},
|
|
@@ -1378,22 +1605,22 @@ var qt = {
|
|
|
1378
1605
|
showAsGroup: { default: "no" }
|
|
1379
1606
|
},
|
|
1380
1607
|
setup(a) {
|
|
1381
|
-
let o = a, s =
|
|
1608
|
+
let o = a, s = vn(), c = t(() => P(o.actions).filter((e) => e.visibility !== "suppress")), l = t(() => c.value.map((e) => Z({ action: e }, bn(e.value, s.value))));
|
|
1382
1609
|
function u(e) {
|
|
1383
1610
|
if (e.defaultConfirm) return "primary";
|
|
1384
1611
|
if (e.defaultReject) return "secondary";
|
|
1385
1612
|
}
|
|
1386
1613
|
return (t, o) => {
|
|
1387
|
-
let s =
|
|
1388
|
-
return c.value.length > 0 ? (
|
|
1614
|
+
let s = D("v-btn");
|
|
1615
|
+
return c.value.length > 0 ? (C(), i("div", {
|
|
1389
1616
|
key: 0,
|
|
1390
|
-
class:
|
|
1617
|
+
class: v(["text-end df-actions", {
|
|
1391
1618
|
"button-group": a.showAsGroup === "grouped" || a.showAsGroup === "grouped-no-borders",
|
|
1392
1619
|
"with-border": a.showAsGroup === "grouped"
|
|
1393
1620
|
}])
|
|
1394
|
-
}, [(
|
|
1621
|
+
}, [(C(!0), i(e, null, T(l.value, (e, t) => (C(), n(s, g({
|
|
1395
1622
|
key: t,
|
|
1396
|
-
variant: e.renderAs ===
|
|
1623
|
+
variant: e.renderAs === "button" ? "tonal" : "text",
|
|
1397
1624
|
color: u(e),
|
|
1398
1625
|
disabled: !e.action.effectiveEnabled || e.action.busy,
|
|
1399
1626
|
loading: e.action.busy,
|
|
@@ -1401,17 +1628,17 @@ var qt = {
|
|
|
1401
1628
|
size: a.buttonSize,
|
|
1402
1629
|
density: a.buttonDensity,
|
|
1403
1630
|
class: {
|
|
1404
|
-
"d-none": e.action.visibility ===
|
|
1405
|
-
invisible: e.action.visibility ===
|
|
1631
|
+
"d-none": e.action.visibility === "hidden",
|
|
1632
|
+
invisible: e.action.visibility === "invisible"
|
|
1406
1633
|
}
|
|
1407
|
-
}, { ref_for: !0 }, e.passthroughAttrs, { onClick:
|
|
1408
|
-
default:
|
|
1409
|
-
e.icon ? (
|
|
1634
|
+
}, { ref_for: !0 }, e.passthroughAttrs, { onClick: B((t) => e.action.execute(t), ["stop"]) }), {
|
|
1635
|
+
default: R(() => [
|
|
1636
|
+
e.icon ? (C(), n(P(V), {
|
|
1410
1637
|
key: 0,
|
|
1411
1638
|
name: e.icon
|
|
1412
1639
|
}, null, 8, ["name"])) : r("", !0),
|
|
1413
|
-
e.icon && e.label ? (
|
|
1414
|
-
e.label ? (
|
|
1640
|
+
e.icon && e.label ? (C(), i("span", wn)) : r("", !0),
|
|
1641
|
+
e.label ? (C(), i("span", Tn, A(e.label), 1)) : r("", !0)
|
|
1415
1642
|
]),
|
|
1416
1643
|
_: 2
|
|
1417
1644
|
}, 1040, [
|
|
@@ -1426,9 +1653,9 @@ var qt = {
|
|
|
1426
1653
|
]))), 128))], 2)) : r("", !0);
|
|
1427
1654
|
};
|
|
1428
1655
|
}
|
|
1429
|
-
}),
|
|
1656
|
+
}), Dn = /* @__PURE__ */ l({
|
|
1430
1657
|
__name: "df-checkbox",
|
|
1431
|
-
props: /*@__PURE__*/
|
|
1658
|
+
props: /*@__PURE__*/ h({
|
|
1432
1659
|
allowNull: { type: Boolean },
|
|
1433
1660
|
control: {},
|
|
1434
1661
|
modelValue: {},
|
|
@@ -1444,42 +1671,42 @@ var qt = {
|
|
|
1444
1671
|
passthroughAttrs: {},
|
|
1445
1672
|
density: {},
|
|
1446
1673
|
variant: {}
|
|
1447
|
-
},
|
|
1674
|
+
}, Z(Z({}, en), {}, { allowNull: !1 })),
|
|
1448
1675
|
emits: ["update:modelValue", "click:clear"],
|
|
1449
1676
|
setup(e, { emit: i }) {
|
|
1450
|
-
let a = e, { densityClass: o, isRendered: s, label: l,
|
|
1677
|
+
let a = e, { densityClass: o, isRendered: s, label: l, shownErrors: u, touched: d, value: f, visibilityClass: p, vuetifyBindings: m } = tn(a, i), h = t(() => a.allowNull && f.value == null), _ = t({
|
|
1451
1678
|
get() {
|
|
1452
1679
|
return f.value;
|
|
1453
1680
|
},
|
|
1454
1681
|
set() {}
|
|
1455
1682
|
});
|
|
1456
1683
|
function v() {
|
|
1457
|
-
let e =
|
|
1684
|
+
let e = re(f.value);
|
|
1458
1685
|
e === !0 ? f.value = a.allowNull ? null : !1 : f.value = e === !1;
|
|
1459
1686
|
}
|
|
1460
1687
|
return (e, t) => {
|
|
1461
|
-
let i =
|
|
1462
|
-
return
|
|
1688
|
+
let i = D("v-checkbox");
|
|
1689
|
+
return P(s) ? (C(), n(i, g({
|
|
1463
1690
|
key: 0,
|
|
1464
1691
|
modelValue: _.value,
|
|
1465
1692
|
"onUpdate:modelValue": t[0] || (t[0] = (e) => _.value = e),
|
|
1466
1693
|
density: "compact",
|
|
1467
|
-
class: [
|
|
1468
|
-
indeterminate:
|
|
1694
|
+
class: [P(o), P(p)],
|
|
1695
|
+
indeterminate: h.value,
|
|
1469
1696
|
"false-value": !1,
|
|
1470
1697
|
"true-value": !0
|
|
1471
|
-
},
|
|
1698
|
+
}, P(m), {
|
|
1472
1699
|
onChange: v,
|
|
1473
1700
|
onBlur: t[1] || (t[1] = (e) => d.value = !0)
|
|
1474
1701
|
}), {
|
|
1475
|
-
label:
|
|
1702
|
+
label: R((e) => [c(P($), {
|
|
1476
1703
|
"allow-wrap": !0,
|
|
1477
1704
|
data: e,
|
|
1478
|
-
label:
|
|
1705
|
+
label: P(l)
|
|
1479
1706
|
}, null, 8, ["data", "label"])]),
|
|
1480
|
-
message:
|
|
1707
|
+
message: R(({ message: e }) => [c(P(Q), {
|
|
1481
1708
|
message: e,
|
|
1482
|
-
errors:
|
|
1709
|
+
errors: P(u)
|
|
1483
1710
|
}, null, 8, ["message", "errors"])]),
|
|
1484
1711
|
_: 1
|
|
1485
1712
|
}, 16, [
|
|
@@ -1489,9 +1716,62 @@ var qt = {
|
|
|
1489
1716
|
])) : r("", !0);
|
|
1490
1717
|
};
|
|
1491
1718
|
}
|
|
1492
|
-
})
|
|
1719
|
+
});
|
|
1720
|
+
//#endregion
|
|
1721
|
+
//#region src/helpers/client-rendered.ts
|
|
1722
|
+
function On() {
|
|
1723
|
+
if (typeof window > "u") return k(!1);
|
|
1724
|
+
if (!fe().ssr) return k(!0);
|
|
1725
|
+
let e = k(!1);
|
|
1726
|
+
return S(() => {
|
|
1727
|
+
e.value = !0;
|
|
1728
|
+
}), e;
|
|
1729
|
+
}
|
|
1730
|
+
//#endregion
|
|
1731
|
+
//#region src/helpers/confirm-actions.vue
|
|
1732
|
+
var kn = /* @__PURE__ */ l({
|
|
1733
|
+
__name: "confirm-actions",
|
|
1734
|
+
props: {
|
|
1735
|
+
save: { type: Function },
|
|
1736
|
+
cancel: { type: Function },
|
|
1737
|
+
isPristine: { type: Boolean }
|
|
1738
|
+
},
|
|
1739
|
+
setup(t) {
|
|
1740
|
+
return (n, r) => {
|
|
1741
|
+
let a = D("v-btn");
|
|
1742
|
+
return C(), i(e, null, [c(a, {
|
|
1743
|
+
variant: "text",
|
|
1744
|
+
text: P(un)("Cancel"),
|
|
1745
|
+
onClick: t.cancel
|
|
1746
|
+
}, null, 8, ["text", "onClick"]), c(a, {
|
|
1747
|
+
variant: "text",
|
|
1748
|
+
disabled: t.isPristine,
|
|
1749
|
+
text: P(un)("Ok"),
|
|
1750
|
+
onClick: t.save
|
|
1751
|
+
}, null, 8, [
|
|
1752
|
+
"disabled",
|
|
1753
|
+
"text",
|
|
1754
|
+
"onClick"
|
|
1755
|
+
])], 64);
|
|
1756
|
+
};
|
|
1757
|
+
}
|
|
1758
|
+
});
|
|
1759
|
+
function An() {
|
|
1760
|
+
let e = -Infinity;
|
|
1761
|
+
return {
|
|
1762
|
+
viewChanged() {
|
|
1763
|
+
e = Date.now();
|
|
1764
|
+
},
|
|
1765
|
+
saveOnDoubleClick(t, n, r) {
|
|
1766
|
+
Date.now() - e < 600 || t.target instanceof Element && t.target.closest(n) && r();
|
|
1767
|
+
}
|
|
1768
|
+
};
|
|
1769
|
+
}
|
|
1770
|
+
//#endregion
|
|
1771
|
+
//#region src/df-color.vue?vue&type=script&setup=true&lang.ts
|
|
1772
|
+
var jn = ".v-color-picker-canvas", Mn = /* @__PURE__ */ l({
|
|
1493
1773
|
__name: "df-color",
|
|
1494
|
-
props: /*@__PURE__*/
|
|
1774
|
+
props: /*@__PURE__*/ h({
|
|
1495
1775
|
allowNull: { type: Boolean },
|
|
1496
1776
|
control: {},
|
|
1497
1777
|
modelValue: {},
|
|
@@ -1507,60 +1787,95 @@ var qt = {
|
|
|
1507
1787
|
passthroughAttrs: {},
|
|
1508
1788
|
density: {},
|
|
1509
1789
|
variant: {}
|
|
1510
|
-
},
|
|
1790
|
+
}, Z(Z({}, en), {}, { allowNull: !1 })),
|
|
1511
1791
|
emits: ["update:modelValue", "click:clear"],
|
|
1512
|
-
setup(e, { emit:
|
|
1513
|
-
let
|
|
1792
|
+
setup(e, { emit: t }) {
|
|
1793
|
+
let i = e, o = t, s = /^#?([a-fA-F0-9]{3}|[a-fA-F0-9]{4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})$/;
|
|
1794
|
+
function l() {
|
|
1795
|
+
let e = _.value;
|
|
1796
|
+
return !e && i.allowNull || s.test(e == null ? "" : e) ? [] : [new G("invalid_hex_color", {}, "Not a valid hex string.", "validator")];
|
|
1797
|
+
}
|
|
1798
|
+
let { densityClass: u, isRendered: d, label: f, shownErrors: p, touched: h, value: _, visibilityClass: v, vuetifyBindings: y } = tn(i, o, l), x = w(!1), S = On(), { saveOnDoubleClick: T } = An();
|
|
1799
|
+
function E() {
|
|
1800
|
+
x.value = !1, h.value = !0;
|
|
1801
|
+
}
|
|
1514
1802
|
return (t, i) => {
|
|
1515
|
-
let o =
|
|
1516
|
-
return
|
|
1803
|
+
let o = D("v-color-picker"), s = D("v-card-actions"), l = D("v-card"), w = D("v-confirm-edit"), O = D("v-menu"), k = D("v-text-field");
|
|
1804
|
+
return P(d) ? (C(), n(k, g({
|
|
1517
1805
|
key: 0,
|
|
1518
|
-
modelValue:
|
|
1519
|
-
"onUpdate:modelValue": i[
|
|
1520
|
-
class: [
|
|
1806
|
+
modelValue: P(_),
|
|
1807
|
+
"onUpdate:modelValue": i[3] || (i[3] = (e) => m(_) ? _.value = e : null),
|
|
1808
|
+
class: [P(u), P(v)],
|
|
1521
1809
|
clearable: e.allowNull,
|
|
1522
|
-
type: "text"
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
label: P((e) => [c(j(Y), {
|
|
1810
|
+
type: "text"
|
|
1811
|
+
}, P(y), { onBlur: i[4] || (i[4] = (e) => h.value = !0) }), {
|
|
1812
|
+
label: R((e) => [c(P($), {
|
|
1526
1813
|
data: e,
|
|
1527
|
-
label:
|
|
1814
|
+
label: P(f)
|
|
1528
1815
|
}, null, 8, ["data", "label"])]),
|
|
1529
|
-
message:
|
|
1816
|
+
message: R(({ message: e }) => [c(P(Q), {
|
|
1530
1817
|
message: e,
|
|
1531
|
-
errors:
|
|
1818
|
+
errors: P(p)
|
|
1532
1819
|
}, null, 8, ["message", "errors"])]),
|
|
1533
|
-
"prepend-inner":
|
|
1820
|
+
"prepend-inner": R(() => [a("div", { style: b([{
|
|
1534
1821
|
width: "24px",
|
|
1535
1822
|
height: "24px",
|
|
1536
1823
|
"border-radius": "4px",
|
|
1537
1824
|
border: "1px solid #ccc"
|
|
1538
|
-
}, { backgroundColor:
|
|
1539
|
-
default:
|
|
1540
|
-
|
|
1541
|
-
|
|
1825
|
+
}, { backgroundColor: P(_) }]) }, null, 4)]),
|
|
1826
|
+
default: R(() => [P(S) ? (C(), n(O, {
|
|
1827
|
+
key: 0,
|
|
1828
|
+
modelValue: x.value,
|
|
1829
|
+
"onUpdate:modelValue": i[2] || (i[2] = (e) => x.value = e),
|
|
1542
1830
|
"close-on-content-click": !1,
|
|
1543
1831
|
activator: "parent"
|
|
1544
1832
|
}, {
|
|
1545
|
-
default:
|
|
1546
|
-
modelValue:
|
|
1547
|
-
"onUpdate:modelValue": i[0] || (i[0] = (e) =>
|
|
1548
|
-
|
|
1549
|
-
|
|
1833
|
+
default: R(() => [c(w, {
|
|
1834
|
+
modelValue: P(_),
|
|
1835
|
+
"onUpdate:modelValue": i[0] || (i[0] = (e) => m(_) ? _.value = e : null),
|
|
1836
|
+
"hide-actions": "",
|
|
1837
|
+
onCancel: i[1] || (i[1] = (e) => x.value = !1),
|
|
1838
|
+
onSave: E
|
|
1839
|
+
}, {
|
|
1840
|
+
default: R(({ model: e, save: t, cancel: n, isPristine: r }) => [c(l, null, {
|
|
1841
|
+
default: R(() => [c(o, {
|
|
1842
|
+
modelValue: e.value,
|
|
1843
|
+
"onUpdate:modelValue": (t) => e.value = t,
|
|
1844
|
+
mode: "hexa",
|
|
1845
|
+
onDblclick: (e) => P(T)(e, jn, t)
|
|
1846
|
+
}, null, 8, [
|
|
1847
|
+
"modelValue",
|
|
1848
|
+
"onUpdate:modelValue",
|
|
1849
|
+
"onDblclick"
|
|
1850
|
+
]), c(s, { class: "justify-end" }, {
|
|
1851
|
+
default: R(() => [c(kn, {
|
|
1852
|
+
save: t,
|
|
1853
|
+
cancel: n,
|
|
1854
|
+
"is-pristine": r
|
|
1855
|
+
}, null, 8, [
|
|
1856
|
+
"save",
|
|
1857
|
+
"cancel",
|
|
1858
|
+
"is-pristine"
|
|
1859
|
+
])]),
|
|
1860
|
+
_: 2
|
|
1861
|
+
}, 1024)]),
|
|
1862
|
+
_: 2
|
|
1863
|
+
}, 1024)]),
|
|
1864
|
+
_: 1
|
|
1865
|
+
}, 8, ["modelValue"])]),
|
|
1550
1866
|
_: 1
|
|
1551
|
-
}, 8, ["modelValue"])]),
|
|
1867
|
+
}, 8, ["modelValue"])) : r("", !0)]),
|
|
1552
1868
|
_: 1
|
|
1553
1869
|
}, 16, [
|
|
1554
1870
|
"modelValue",
|
|
1555
1871
|
"class",
|
|
1556
|
-
"clearable"
|
|
1557
|
-
"rules"
|
|
1872
|
+
"clearable"
|
|
1558
1873
|
])) : r("", !0);
|
|
1559
1874
|
};
|
|
1560
1875
|
}
|
|
1561
|
-
}),
|
|
1876
|
+
}), Nn = /* @__PURE__ */ l({
|
|
1562
1877
|
__name: "df-datetime",
|
|
1563
|
-
props: /*@__PURE__*/
|
|
1878
|
+
props: /*@__PURE__*/ h({
|
|
1564
1879
|
inputType: {},
|
|
1565
1880
|
displayFormatDate: {},
|
|
1566
1881
|
displayFormatTime: {},
|
|
@@ -1579,156 +1894,182 @@ var qt = {
|
|
|
1579
1894
|
passthroughAttrs: {},
|
|
1580
1895
|
density: {},
|
|
1581
1896
|
variant: {}
|
|
1582
|
-
},
|
|
1897
|
+
}, Z(Z({}, en), {}, {
|
|
1583
1898
|
inputType: "datetime",
|
|
1584
1899
|
displayFormatDate: "P",
|
|
1585
1900
|
displayFormatTime: "p"
|
|
1586
1901
|
})),
|
|
1587
1902
|
emits: ["update:modelValue", "click:clear"],
|
|
1588
1903
|
setup(e, { emit: i }) {
|
|
1589
|
-
let o = e, s = i, l = t(() => {
|
|
1590
|
-
var e;
|
|
1591
|
-
return (e = o.locale) == null ? j(kt.dateTimeLocale) : e;
|
|
1592
|
-
}), u = t(() => {
|
|
1904
|
+
let o = e, s = i, l = p(Yt, {}), u = t(() => {
|
|
1593
1905
|
var e, t;
|
|
1594
|
-
return (e = (t =
|
|
1595
|
-
}),
|
|
1906
|
+
return (e = (t = o.locale) == null ? P(l.dateTimeLocale) : t) == null ? P(Nt.dateTimeLocale) : e;
|
|
1907
|
+
}), d = t(() => {
|
|
1908
|
+
var e, t;
|
|
1909
|
+
return (e = (t = u.value.options) == null ? void 0 : t.weekStartsOn) == null ? 1 : e;
|
|
1910
|
+
}), { density: f, densityClass: m, touched: h, value: _, vuetifyBindings: y } = tn(o, s), { inputType: b, displayFormatDate: x, displayFormatTime: S } = M(o), T = w(""), E = On(), O = t({
|
|
1596
1911
|
get() {
|
|
1597
|
-
return
|
|
1912
|
+
return P(T) === "date";
|
|
1598
1913
|
},
|
|
1599
1914
|
set(e) {
|
|
1600
|
-
|
|
1915
|
+
T.value = e ? "date" : "";
|
|
1601
1916
|
}
|
|
1602
|
-
}),
|
|
1917
|
+
}), k = t({
|
|
1603
1918
|
get() {
|
|
1604
|
-
return
|
|
1919
|
+
return P(T) === "time";
|
|
1605
1920
|
},
|
|
1606
1921
|
set(e) {
|
|
1607
|
-
|
|
1922
|
+
T.value = e ? "time" : "";
|
|
1608
1923
|
}
|
|
1609
|
-
})
|
|
1610
|
-
function
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1924
|
+
});
|
|
1925
|
+
function A() {
|
|
1926
|
+
T.value = "", h.value = !0;
|
|
1927
|
+
}
|
|
1928
|
+
let { viewChanged: j, saveOnDoubleClick: N } = An();
|
|
1929
|
+
function ee() {
|
|
1930
|
+
_.value = null, h.value = !0;
|
|
1931
|
+
}
|
|
1932
|
+
let F = (e) => `${pe(e, "yyyy-MM-dd")}T${pe(e, "HH:mm")}:00`, L = w(null);
|
|
1933
|
+
function B(e, t, n) {
|
|
1934
|
+
let r = e.split(/[TZ]/g);
|
|
1935
|
+
return r[n] = t.split(/[TZ]/g)[n], r;
|
|
1936
|
+
}
|
|
1937
|
+
let V = (e) => F(/* @__PURE__ */ new Date(`${e[0]}T${e[1].split(".")[0]}`));
|
|
1938
|
+
function H(e, t) {
|
|
1939
|
+
if (e == null) L.value = null;
|
|
1940
|
+
else if (t === -1) P(b) === "time" ? L.value = V(B(F(/* @__PURE__ */ new Date()), `T${e}`, 1)) : L.value = F(he(e));
|
|
1941
|
+
else {
|
|
1942
|
+
var n;
|
|
1943
|
+
let r = B((n = L.value) == null ? F(/* @__PURE__ */ new Date()) : n, e, t);
|
|
1944
|
+
L.value = V(r), P(b) === "date" ? _.value = r[0] : P(b) === "time" ? _.value = r[1] : _.value = L.value + pe(new Date(L.value), "XXX");
|
|
1622
1945
|
}
|
|
1623
1946
|
}
|
|
1624
|
-
|
|
1625
|
-
let
|
|
1947
|
+
I(_, (e) => H(e, -1), { immediate: !0 });
|
|
1948
|
+
let U = t({
|
|
1626
1949
|
get() {
|
|
1627
|
-
let e =
|
|
1950
|
+
let e = P(L);
|
|
1628
1951
|
if (e == null) return null;
|
|
1629
1952
|
let t = new Date(e);
|
|
1630
1953
|
return Number.isNaN(t.getTime()) ? null : t;
|
|
1631
1954
|
},
|
|
1632
1955
|
set(e) {
|
|
1633
|
-
|
|
1956
|
+
H(F(e), 0);
|
|
1634
1957
|
}
|
|
1635
1958
|
}), te = t({
|
|
1636
1959
|
get() {
|
|
1637
|
-
let e =
|
|
1960
|
+
let e = P(L);
|
|
1638
1961
|
return e == null ? "" : e.split(/[TZ]/g)[1].split(".")[0];
|
|
1639
1962
|
},
|
|
1640
1963
|
set(e) {
|
|
1641
|
-
|
|
1964
|
+
H(`T${e}`, 1);
|
|
1642
1965
|
}
|
|
1643
|
-
}),
|
|
1966
|
+
}), W = t({
|
|
1644
1967
|
get() {
|
|
1645
|
-
let e =
|
|
1646
|
-
return e == null ? "" :
|
|
1968
|
+
let e = P(U);
|
|
1969
|
+
return e == null ? "" : pe(e, P(x), { locale: u.value });
|
|
1647
1970
|
},
|
|
1648
1971
|
set(e) {
|
|
1649
1972
|
try {
|
|
1650
|
-
let t =
|
|
1651
|
-
|
|
1973
|
+
let t = me(e, P(x), /* @__PURE__ */ new Date(), { locale: u.value });
|
|
1974
|
+
H(F(t), 0);
|
|
1652
1975
|
} catch (e) {
|
|
1653
1976
|
console.error(e);
|
|
1654
1977
|
}
|
|
1655
1978
|
}
|
|
1656
|
-
}),
|
|
1979
|
+
}), G = t({
|
|
1657
1980
|
get() {
|
|
1658
|
-
let e =
|
|
1659
|
-
return e == null ? "" :
|
|
1981
|
+
let e = P(U);
|
|
1982
|
+
return e == null ? "" : pe(e, P(S), { locale: u.value });
|
|
1660
1983
|
},
|
|
1661
1984
|
set(e) {
|
|
1662
1985
|
let t = e.match(/(\d+):(\d+)\s?([a-zA-Z]+)?/);
|
|
1663
1986
|
if (t == null) return;
|
|
1664
|
-
let n =
|
|
1665
|
-
|
|
1987
|
+
let n = Y(t[1]), r = Y(t[2]);
|
|
1988
|
+
se(n) || se(r) || (t[3] && t[3].toLowerCase() === "pm" && n < 13 && (n += 12), H(`T${n.toString().padStart(2, "0")}:${r.toString().padStart(2, "0")}:00`, 1));
|
|
1666
1989
|
}
|
|
1667
1990
|
});
|
|
1668
1991
|
return (t, i) => {
|
|
1669
|
-
let s =
|
|
1670
|
-
return
|
|
1671
|
-
class:
|
|
1992
|
+
let s = D("v-date-picker"), l = D("v-confirm-edit"), u = D("v-menu"), p = D("v-text-field"), _ = D("v-time-picker");
|
|
1993
|
+
return C(), n(P(rn), g(o, {
|
|
1994
|
+
class: P(m),
|
|
1672
1995
|
clearable: e.clearable,
|
|
1673
|
-
"onClick:clear":
|
|
1674
|
-
onBlur: i[
|
|
1996
|
+
"onClick:clear": ee,
|
|
1997
|
+
onBlur: i[12] || (i[12] = (e) => h.value = !0)
|
|
1675
1998
|
}), {
|
|
1676
|
-
default:
|
|
1999
|
+
default: R((t) => [a("div", { class: v([
|
|
1677
2000
|
"d-flex",
|
|
1678
2001
|
"w-100",
|
|
1679
|
-
["plain", "underlined"].includes(
|
|
2002
|
+
["plain", "underlined"].includes(P(y).variant) ? void 0 : "ml-4",
|
|
1680
2003
|
"df-input-wrapper",
|
|
1681
|
-
|
|
1682
|
-
]) }, [["date", "datetime"].includes(
|
|
2004
|
+
P(f)
|
|
2005
|
+
]) }, [["date", "datetime"].includes(P(b)) ? (C(), n(p, g({
|
|
1683
2006
|
key: 0,
|
|
1684
|
-
modelValue:
|
|
1685
|
-
"onUpdate:modelValue": i[
|
|
2007
|
+
modelValue: W.value,
|
|
2008
|
+
"onUpdate:modelValue": i[3] || (i[3] = (e) => W.value = e),
|
|
1686
2009
|
style: { "flex-grow": "4" },
|
|
1687
2010
|
density: "compact",
|
|
1688
2011
|
variant: "plain",
|
|
1689
2012
|
clearable: !1,
|
|
1690
2013
|
"hide-details": !0,
|
|
1691
|
-
readonly:
|
|
1692
|
-
disabled:
|
|
1693
|
-
name: `${
|
|
1694
|
-
placeholder:
|
|
2014
|
+
readonly: P(y).readonly,
|
|
2015
|
+
disabled: P(y).disabled,
|
|
2016
|
+
name: `${P(y).name}-date`,
|
|
2017
|
+
placeholder: P(y).placeholder
|
|
1695
2018
|
}, e.passthroughAttrs, {
|
|
1696
|
-
onClick: i[
|
|
1697
|
-
onKeydown: i[
|
|
2019
|
+
onClick: i[4] || (i[4] = (e) => T.value = "date"),
|
|
2020
|
+
onKeydown: i[5] || (i[5] = z((e) => T.value = "date", ["space"])),
|
|
1698
2021
|
onFocus: (e) => t.focus(),
|
|
1699
2022
|
onBlur: (e) => t.blur()
|
|
1700
2023
|
}), {
|
|
1701
|
-
default:
|
|
1702
|
-
|
|
1703
|
-
|
|
2024
|
+
default: R(() => [P(E) ? (C(), n(u, {
|
|
2025
|
+
key: 0,
|
|
2026
|
+
modelValue: O.value,
|
|
2027
|
+
"onUpdate:modelValue": i[2] || (i[2] = (e) => O.value = e),
|
|
1704
2028
|
"close-on-content-click": !1,
|
|
1705
2029
|
activator: "parent"
|
|
1706
2030
|
}, {
|
|
1707
|
-
default:
|
|
1708
|
-
modelValue:
|
|
1709
|
-
"onUpdate:modelValue": i[0] || (i[0] = (e) =>
|
|
1710
|
-
|
|
1711
|
-
|
|
2031
|
+
default: R(() => [c(l, {
|
|
2032
|
+
modelValue: U.value,
|
|
2033
|
+
"onUpdate:modelValue": i[0] || (i[0] = (e) => U.value = e),
|
|
2034
|
+
"hide-actions": "",
|
|
2035
|
+
onCancel: i[1] || (i[1] = (e) => T.value = ""),
|
|
2036
|
+
onSave: A
|
|
1712
2037
|
}, {
|
|
1713
|
-
default:
|
|
2038
|
+
default: R(({ model: e, save: t, cancel: n, isPristine: r }) => [c(s, {
|
|
1714
2039
|
modelValue: e.value,
|
|
1715
2040
|
"onUpdate:modelValue": (t) => e.value = t,
|
|
1716
2041
|
"hide-header": !0,
|
|
1717
|
-
"first-day-of-week":
|
|
2042
|
+
"first-day-of-week": d.value,
|
|
1718
2043
|
"show-adjacent-months": !0,
|
|
1719
|
-
"show-week": !0
|
|
2044
|
+
"show-week": !0,
|
|
2045
|
+
"onUpdate:viewMode": P(j),
|
|
2046
|
+
"onUpdate:month": P(j),
|
|
2047
|
+
"onUpdate:year": P(j),
|
|
2048
|
+
onDblclick: (e) => P(N)(e, ".v-date-picker-month__day", t)
|
|
1720
2049
|
}, {
|
|
1721
|
-
actions:
|
|
2050
|
+
actions: R(() => [c(kn, {
|
|
2051
|
+
save: t,
|
|
2052
|
+
cancel: n,
|
|
2053
|
+
"is-pristine": r
|
|
2054
|
+
}, null, 8, [
|
|
2055
|
+
"save",
|
|
2056
|
+
"cancel",
|
|
2057
|
+
"is-pristine"
|
|
2058
|
+
])]),
|
|
1722
2059
|
_: 2
|
|
1723
2060
|
}, 1032, [
|
|
1724
2061
|
"modelValue",
|
|
1725
2062
|
"onUpdate:modelValue",
|
|
1726
|
-
"first-day-of-week"
|
|
2063
|
+
"first-day-of-week",
|
|
2064
|
+
"onUpdate:viewMode",
|
|
2065
|
+
"onUpdate:month",
|
|
2066
|
+
"onUpdate:year",
|
|
2067
|
+
"onDblclick"
|
|
1727
2068
|
])]),
|
|
1728
2069
|
_: 1
|
|
1729
2070
|
}, 8, ["modelValue"])]),
|
|
1730
2071
|
_: 1
|
|
1731
|
-
}, 8, ["modelValue"])]),
|
|
2072
|
+
}, 8, ["modelValue"])) : r("", !0)]),
|
|
1732
2073
|
_: 1
|
|
1733
2074
|
}, 16, [
|
|
1734
2075
|
"modelValue",
|
|
@@ -1738,50 +2079,67 @@ var qt = {
|
|
|
1738
2079
|
"placeholder",
|
|
1739
2080
|
"onFocus",
|
|
1740
2081
|
"onBlur"
|
|
1741
|
-
])) : r("", !0), ["time", "datetime"].includes(
|
|
2082
|
+
])) : r("", !0), ["time", "datetime"].includes(P(b)) ? (C(), n(p, g({
|
|
1742
2083
|
key: 1,
|
|
1743
|
-
modelValue:
|
|
1744
|
-
"onUpdate:modelValue": i[
|
|
2084
|
+
modelValue: G.value,
|
|
2085
|
+
"onUpdate:modelValue": i[9] || (i[9] = (e) => G.value = e),
|
|
1745
2086
|
style: { "flex-grow": "3" },
|
|
1746
2087
|
density: "compact",
|
|
1747
2088
|
variant: "plain",
|
|
1748
2089
|
clearable: !1,
|
|
1749
2090
|
"hide-details": !0,
|
|
1750
|
-
readonly:
|
|
1751
|
-
disabled:
|
|
1752
|
-
name: `${
|
|
1753
|
-
placeholder:
|
|
2091
|
+
readonly: P(y).readonly,
|
|
2092
|
+
disabled: P(y).disabled,
|
|
2093
|
+
name: `${P(y).name}-time`,
|
|
2094
|
+
placeholder: P(b) === "time" ? P(y).placeholder : void 0
|
|
1754
2095
|
}, e.passthroughAttrs, {
|
|
1755
|
-
onClick: i[
|
|
1756
|
-
onKeydown: i[
|
|
2096
|
+
onClick: i[10] || (i[10] = (e) => T.value = "time"),
|
|
2097
|
+
onKeydown: i[11] || (i[11] = z((e) => T.value = "time", ["space"])),
|
|
1757
2098
|
onFocus: (e) => t.focus(),
|
|
1758
2099
|
onBlur: (e) => t.blur()
|
|
1759
2100
|
}), {
|
|
1760
|
-
default:
|
|
1761
|
-
|
|
1762
|
-
|
|
2101
|
+
default: R(() => [P(E) ? (C(), n(u, {
|
|
2102
|
+
key: 0,
|
|
2103
|
+
modelValue: k.value,
|
|
2104
|
+
"onUpdate:modelValue": i[8] || (i[8] = (e) => k.value = e),
|
|
1763
2105
|
"close-on-content-click": !1,
|
|
1764
2106
|
activator: "parent"
|
|
1765
2107
|
}, {
|
|
1766
|
-
default:
|
|
2108
|
+
default: R(() => [c(l, {
|
|
1767
2109
|
modelValue: te.value,
|
|
1768
|
-
"onUpdate:modelValue": i[
|
|
1769
|
-
|
|
1770
|
-
|
|
2110
|
+
"onUpdate:modelValue": i[6] || (i[6] = (e) => te.value = e),
|
|
2111
|
+
"hide-actions": "",
|
|
2112
|
+
onCancel: i[7] || (i[7] = (e) => T.value = ""),
|
|
2113
|
+
onSave: A
|
|
1771
2114
|
}, {
|
|
1772
|
-
default:
|
|
2115
|
+
default: R(({ model: e, save: t, cancel: n, isPristine: r }) => [c(_, {
|
|
1773
2116
|
modelValue: e.value,
|
|
1774
2117
|
"onUpdate:modelValue": (t) => e.value = t,
|
|
1775
2118
|
"hide-header": !0,
|
|
1776
|
-
format: "24hr"
|
|
2119
|
+
format: "24hr",
|
|
2120
|
+
"onUpdate:viewMode": P(j),
|
|
2121
|
+
onDblclick: (e) => P(N)(e, ".v-time-picker-clock", t)
|
|
1777
2122
|
}, {
|
|
1778
|
-
actions:
|
|
2123
|
+
actions: R(() => [c(kn, {
|
|
2124
|
+
save: t,
|
|
2125
|
+
cancel: n,
|
|
2126
|
+
"is-pristine": r
|
|
2127
|
+
}, null, 8, [
|
|
2128
|
+
"save",
|
|
2129
|
+
"cancel",
|
|
2130
|
+
"is-pristine"
|
|
2131
|
+
])]),
|
|
1779
2132
|
_: 2
|
|
1780
|
-
}, 1032, [
|
|
2133
|
+
}, 1032, [
|
|
2134
|
+
"modelValue",
|
|
2135
|
+
"onUpdate:modelValue",
|
|
2136
|
+
"onUpdate:viewMode",
|
|
2137
|
+
"onDblclick"
|
|
2138
|
+
])]),
|
|
1781
2139
|
_: 1
|
|
1782
2140
|
}, 8, ["modelValue"])]),
|
|
1783
2141
|
_: 1
|
|
1784
|
-
}, 8, ["modelValue"])]),
|
|
2142
|
+
}, 8, ["modelValue"])) : r("", !0)]),
|
|
1785
2143
|
_: 1
|
|
1786
2144
|
}, 16, [
|
|
1787
2145
|
"modelValue",
|
|
@@ -1799,7 +2157,7 @@ var qt = {
|
|
|
1799
2157
|
});
|
|
1800
2158
|
//#endregion
|
|
1801
2159
|
//#region \0@oxc-project+runtime@0.146.0/helpers/esm/asyncToGenerator.js
|
|
1802
|
-
function
|
|
2160
|
+
function Pn(e, t, n, r, i, a, o) {
|
|
1803
2161
|
try {
|
|
1804
2162
|
var s = e[a](o), c = s.value;
|
|
1805
2163
|
} catch (e) {
|
|
@@ -1808,16 +2166,16 @@ function $t(e, t, n, r, i, a, o) {
|
|
|
1808
2166
|
}
|
|
1809
2167
|
s.done ? t(c) : Promise.resolve(c).then(r, i);
|
|
1810
2168
|
}
|
|
1811
|
-
function
|
|
2169
|
+
function Fn(e) {
|
|
1812
2170
|
return function() {
|
|
1813
2171
|
var t = this, n = arguments;
|
|
1814
2172
|
return new Promise(function(r, i) {
|
|
1815
2173
|
var a = e.apply(t, n);
|
|
1816
2174
|
function o(e) {
|
|
1817
|
-
|
|
2175
|
+
Pn(a, r, i, o, s, "next", e);
|
|
1818
2176
|
}
|
|
1819
2177
|
function s(e) {
|
|
1820
|
-
|
|
2178
|
+
Pn(a, r, i, o, s, "throw", e);
|
|
1821
2179
|
}
|
|
1822
2180
|
o(void 0);
|
|
1823
2181
|
});
|
|
@@ -1825,9 +2183,9 @@ function en(e) {
|
|
|
1825
2183
|
}
|
|
1826
2184
|
//#endregion
|
|
1827
2185
|
//#region src/df-file.vue?vue&type=script&setup=true&lang.ts
|
|
1828
|
-
var
|
|
2186
|
+
var In = ["title", "aria-label"], Ln = /* @__PURE__ */ l({
|
|
1829
2187
|
__name: "df-file",
|
|
1830
|
-
props: /*@__PURE__*/
|
|
2188
|
+
props: /*@__PURE__*/ h({
|
|
1831
2189
|
comms: {},
|
|
1832
2190
|
touchInterval: {},
|
|
1833
2191
|
control: {},
|
|
@@ -1844,95 +2202,95 @@ var tn = ["title", "aria-label"], nn = /* @__PURE__ */ l({
|
|
|
1844
2202
|
passthroughAttrs: {},
|
|
1845
2203
|
density: {},
|
|
1846
2204
|
variant: {}
|
|
1847
|
-
},
|
|
2205
|
+
}, en),
|
|
1848
2206
|
emits: ["update:modelValue", "click:clear"],
|
|
1849
2207
|
setup(e, { emit: i }) {
|
|
1850
|
-
let s = e, { density: l, densityClass: u, touched: d, value: f, vuetifyBindings: p } =
|
|
1851
|
-
function
|
|
1852
|
-
return
|
|
2208
|
+
let s = e, { density: l, densityClass: u, touched: d, value: f, vuetifyBindings: p } = tn(s, i), m = un, h = w(null), _ = w(0), y = w(), b = t(() => h.value && _.value < 100), x = t(() => !y.value && f.value ? f.value : ""), S = t(() => !y.value && !!f.value && !!s.comms.getDownloadUrl);
|
|
2209
|
+
function T() {
|
|
2210
|
+
return E.apply(this, arguments);
|
|
1853
2211
|
}
|
|
1854
|
-
function
|
|
1855
|
-
return
|
|
2212
|
+
function E() {
|
|
2213
|
+
return E = Fn(function* () {
|
|
1856
2214
|
if (!f.value || !s.comms.getDownloadUrl) return;
|
|
1857
2215
|
let e = yield s.comms.getDownloadUrl(f.value), t = document.createElement("a");
|
|
1858
2216
|
t.href = e, t.download = "", t.rel = "noopener", t.click();
|
|
1859
|
-
}),
|
|
2217
|
+
}), E.apply(this, arguments);
|
|
1860
2218
|
}
|
|
1861
|
-
function
|
|
1862
|
-
f.value = null,
|
|
2219
|
+
function O() {
|
|
2220
|
+
f.value = null, _.value = 0, h.value = null, y.value = null, j();
|
|
1863
2221
|
}
|
|
1864
|
-
function
|
|
1865
|
-
|
|
2222
|
+
function k(e) {
|
|
2223
|
+
O(), Cn(s.control, e);
|
|
1866
2224
|
}
|
|
1867
|
-
let { setupTouchInterval:
|
|
1868
|
-
function
|
|
1869
|
-
return
|
|
2225
|
+
let { setupTouchInterval: A, clearTouchInterval: j } = Sn(f, () => s.comms, () => s.touchInterval, k);
|
|
2226
|
+
function M() {
|
|
2227
|
+
return N.apply(this, arguments);
|
|
1870
2228
|
}
|
|
1871
|
-
function
|
|
1872
|
-
return
|
|
1873
|
-
f.value && (yield s.comms.delete(f.value)),
|
|
1874
|
-
}),
|
|
2229
|
+
function N() {
|
|
2230
|
+
return N = Fn(function* () {
|
|
2231
|
+
f.value && (yield s.comms.delete(f.value)), O(), d.value = !0;
|
|
2232
|
+
}), N.apply(this, arguments);
|
|
1875
2233
|
}
|
|
1876
|
-
function
|
|
1877
|
-
return
|
|
2234
|
+
function ee(e) {
|
|
2235
|
+
return F.apply(this, arguments);
|
|
1878
2236
|
}
|
|
1879
|
-
function
|
|
1880
|
-
return
|
|
1881
|
-
|
|
2237
|
+
function F() {
|
|
2238
|
+
return F = Fn(function* (e) {
|
|
2239
|
+
_.value = -1, h.value = e;
|
|
1882
2240
|
try {
|
|
1883
2241
|
f.value = yield s.comms.upload(e, (e, t) => {
|
|
1884
|
-
|
|
1885
|
-
}),
|
|
2242
|
+
_.value = Math.round(e * 100 / t);
|
|
2243
|
+
}), _.value = 100, d.value = !0, A();
|
|
1886
2244
|
} catch (e) {
|
|
1887
|
-
throw
|
|
2245
|
+
throw _.value = 0, h.value = null, y.value = null, e;
|
|
1888
2246
|
}
|
|
1889
|
-
}),
|
|
2247
|
+
}), F.apply(this, arguments);
|
|
1890
2248
|
}
|
|
1891
|
-
function
|
|
1892
|
-
e && (Array.isArray(e) ? console.error("Uploading multiple files not supported right now") :
|
|
2249
|
+
function I(e) {
|
|
2250
|
+
e && (Array.isArray(e) ? console.error("Uploading multiple files not supported right now") : ee(e));
|
|
1893
2251
|
}
|
|
1894
2252
|
return (t, i) => {
|
|
1895
|
-
let f =
|
|
1896
|
-
return
|
|
1897
|
-
class:
|
|
2253
|
+
let f = D("v-progress-linear"), w = D("v-file-input");
|
|
2254
|
+
return C(), n(P(rn), g(Z(Z({}, s), {}, { loading: b.value }), {
|
|
2255
|
+
class: P(u),
|
|
1898
2256
|
clearable: "",
|
|
1899
|
-
"onClick:clear":
|
|
2257
|
+
"onClick:clear": M,
|
|
1900
2258
|
onBlur: i[1] || (i[1] = (e) => d.value = !0)
|
|
1901
2259
|
}), {
|
|
1902
|
-
"prepend-inner":
|
|
1903
|
-
loader:
|
|
2260
|
+
"prepend-inner": R(() => [c(P(V), { name: "mdi-paperclip" })]),
|
|
2261
|
+
loader: R(() => [h.value && _.value < 100 ? (C(), n(f, {
|
|
1904
2262
|
key: 0,
|
|
1905
|
-
"model-value":
|
|
1906
|
-
indeterminate:
|
|
2263
|
+
"model-value": _.value,
|
|
2264
|
+
indeterminate: _.value === -1
|
|
1907
2265
|
}, null, 8, ["model-value", "indeterminate"])) : r("", !0)]),
|
|
1908
|
-
default:
|
|
1909
|
-
modelValue:
|
|
1910
|
-
"onUpdate:modelValue": i[0] || (i[0] = (e) =>
|
|
1911
|
-
label:
|
|
2266
|
+
default: R((t) => [a("div", { class: v(["d-flex w-100 position-relative df-input-wrapper", P(l)]) }, [c(w, g({
|
|
2267
|
+
modelValue: y.value,
|
|
2268
|
+
"onUpdate:modelValue": i[0] || (i[0] = (e) => y.value = e),
|
|
2269
|
+
label: x.value,
|
|
1912
2270
|
density: "compact",
|
|
1913
2271
|
variant: "plain",
|
|
1914
|
-
readonly:
|
|
1915
|
-
disabled:
|
|
1916
|
-
name:
|
|
2272
|
+
readonly: P(p).readonly,
|
|
2273
|
+
disabled: P(p).disabled,
|
|
2274
|
+
name: P(p).name,
|
|
1917
2275
|
"hide-details": !0,
|
|
1918
2276
|
"show-size": !0,
|
|
1919
2277
|
multiple: !1,
|
|
1920
|
-
style:
|
|
2278
|
+
style: h.value && _.value < 100 ? "visibility: hidden" : "",
|
|
1921
2279
|
clearable: !1
|
|
1922
2280
|
}, e.passthroughAttrs, {
|
|
1923
2281
|
"prepend-icon": "",
|
|
1924
|
-
"onUpdate:modelValue":
|
|
2282
|
+
"onUpdate:modelValue": I,
|
|
1925
2283
|
onFocus: (e) => t.focus(),
|
|
1926
2284
|
onBlur: (e) => t.blur()
|
|
1927
|
-
}), o({ _: 2 }, [
|
|
2285
|
+
}), o({ _: 2 }, [S.value ? {
|
|
1928
2286
|
name: "append-inner",
|
|
1929
|
-
fn:
|
|
2287
|
+
fn: R(() => [a("button", {
|
|
1930
2288
|
type: "button",
|
|
1931
2289
|
class: "df-file-download-btn",
|
|
1932
|
-
title:
|
|
1933
|
-
"aria-label":
|
|
1934
|
-
onClick:
|
|
1935
|
-
}, [c(
|
|
2290
|
+
title: P(m)("FileDownload"),
|
|
2291
|
+
"aria-label": P(m)("FileDownload"),
|
|
2292
|
+
onClick: B(T, ["stop", "prevent"])
|
|
2293
|
+
}, [c(P(V), { name: "mdi-download" })], 8, In)]),
|
|
1936
2294
|
key: "0"
|
|
1937
2295
|
} : void 0]), 1040, [
|
|
1938
2296
|
"modelValue",
|
|
@@ -1948,19 +2306,19 @@ var tn = ["title", "aria-label"], nn = /* @__PURE__ */ l({
|
|
|
1948
2306
|
}, 16, ["class"]);
|
|
1949
2307
|
};
|
|
1950
2308
|
}
|
|
1951
|
-
}),
|
|
2309
|
+
}), Rn = [
|
|
1952
2310
|
"id",
|
|
1953
2311
|
"disabled",
|
|
1954
2312
|
"name",
|
|
1955
2313
|
"onFocus",
|
|
1956
2314
|
"onBlur"
|
|
1957
|
-
],
|
|
2315
|
+
], zn = ["for"], Bn = ["for"], Vn = ["for", "title"], Hn = [
|
|
1958
2316
|
"href",
|
|
1959
2317
|
"title",
|
|
1960
2318
|
"aria-label"
|
|
1961
|
-
],
|
|
2319
|
+
], Un = /* @__PURE__ */ l({
|
|
1962
2320
|
__name: "df-image",
|
|
1963
|
-
props: /*@__PURE__*/
|
|
2321
|
+
props: /*@__PURE__*/ h({
|
|
1964
2322
|
comms: {},
|
|
1965
2323
|
touchInterval: {},
|
|
1966
2324
|
control: {},
|
|
@@ -1977,146 +2335,146 @@ var tn = ["title", "aria-label"], nn = /* @__PURE__ */ l({
|
|
|
1977
2335
|
passthroughAttrs: {},
|
|
1978
2336
|
density: {},
|
|
1979
2337
|
variant: {}
|
|
1980
|
-
},
|
|
2338
|
+
}, en),
|
|
1981
2339
|
emits: ["update:modelValue", "click:clear"],
|
|
1982
2340
|
setup(e, { emit: o }) {
|
|
1983
|
-
let s = e, { density: l, densityClass: u, touched: d, value: f, vuetifyBindings: p } =
|
|
2341
|
+
let s = e, { density: l, densityClass: u, touched: d, value: f, vuetifyBindings: p } = tn(s, o), m = un, h = F(), _ = w(null), y = w(0), S = w(null), T = w(0), E = w(null), O = t(() => _.value && y.value < 100), k = t(() => !!(p.value.disabled || p.value.readonly)), j = t(() => T.value > 0), M = t(() => {
|
|
1984
2342
|
var e;
|
|
1985
|
-
return (e =
|
|
1986
|
-
}),
|
|
1987
|
-
function
|
|
1988
|
-
|
|
2343
|
+
return (e = S.value) == null ? f.value ? f.value : null : e;
|
|
2344
|
+
}), N = t(() => !!f.value);
|
|
2345
|
+
function ee() {
|
|
2346
|
+
S.value && (URL.revokeObjectURL(S.value), S.value = null);
|
|
1989
2347
|
}
|
|
1990
|
-
function
|
|
1991
|
-
f.value = null,
|
|
2348
|
+
function I() {
|
|
2349
|
+
f.value = null, y.value = 0, _.value = null, ee(), H();
|
|
1992
2350
|
}
|
|
1993
|
-
function
|
|
1994
|
-
|
|
2351
|
+
function L(e) {
|
|
2352
|
+
I(), Cn(s.control, e);
|
|
1995
2353
|
}
|
|
1996
|
-
let { setupTouchInterval: z, clearTouchInterval:
|
|
1997
|
-
|
|
1998
|
-
function
|
|
1999
|
-
return
|
|
2354
|
+
let { setupTouchInterval: z, clearTouchInterval: H } = Sn(f, () => s.comms, () => s.touchInterval, L);
|
|
2355
|
+
x(() => ee());
|
|
2356
|
+
function U() {
|
|
2357
|
+
return te.apply(this, arguments);
|
|
2000
2358
|
}
|
|
2001
|
-
function
|
|
2002
|
-
return
|
|
2003
|
-
f.value && (yield s.comms.delete(f.value)),
|
|
2004
|
-
}),
|
|
2359
|
+
function te() {
|
|
2360
|
+
return te = Fn(function* () {
|
|
2361
|
+
f.value && (yield s.comms.delete(f.value)), I(), d.value = !0;
|
|
2362
|
+
}), te.apply(this, arguments);
|
|
2005
2363
|
}
|
|
2006
|
-
function
|
|
2007
|
-
return
|
|
2364
|
+
function W(e) {
|
|
2365
|
+
return G.apply(this, arguments);
|
|
2008
2366
|
}
|
|
2009
|
-
function
|
|
2010
|
-
return
|
|
2011
|
-
|
|
2367
|
+
function G() {
|
|
2368
|
+
return G = Fn(function* (e) {
|
|
2369
|
+
y.value = -1, _.value = e, ee(), S.value = URL.createObjectURL(e);
|
|
2012
2370
|
try {
|
|
2013
2371
|
f.value = yield s.comms.upload(e, (e, t) => {
|
|
2014
|
-
|
|
2015
|
-
}),
|
|
2372
|
+
y.value = Math.round(e * 100 / t);
|
|
2373
|
+
}), y.value = 100, d.value = !0, z();
|
|
2016
2374
|
} catch (e) {
|
|
2017
|
-
throw
|
|
2375
|
+
throw y.value = 0, _.value = null, ee(), e;
|
|
2018
2376
|
}
|
|
2019
|
-
}),
|
|
2377
|
+
}), G.apply(this, arguments);
|
|
2020
2378
|
}
|
|
2021
|
-
function
|
|
2379
|
+
function ne(e) {
|
|
2022
2380
|
if (!e.type.startsWith("image/")) {
|
|
2023
2381
|
console.error("Only image files are supported");
|
|
2024
2382
|
return;
|
|
2025
2383
|
}
|
|
2026
|
-
|
|
2384
|
+
W(e);
|
|
2027
2385
|
}
|
|
2028
|
-
function
|
|
2386
|
+
function re(e) {
|
|
2029
2387
|
var t;
|
|
2030
2388
|
let n = e.target, r = (t = n.files) == null ? void 0 : t[0];
|
|
2031
|
-
n.value = "", r &&
|
|
2389
|
+
n.value = "", r && ne(r);
|
|
2032
2390
|
}
|
|
2033
|
-
function
|
|
2034
|
-
|
|
2391
|
+
function ie() {
|
|
2392
|
+
k.value || (T.value += 1);
|
|
2035
2393
|
}
|
|
2036
|
-
function
|
|
2037
|
-
|
|
2394
|
+
function ae() {
|
|
2395
|
+
T.value = Math.max(0, T.value - 1);
|
|
2038
2396
|
}
|
|
2039
|
-
function
|
|
2397
|
+
function K(e) {
|
|
2040
2398
|
var t;
|
|
2041
|
-
if (
|
|
2399
|
+
if (T.value = 0, k.value) return;
|
|
2042
2400
|
let n = (t = e.dataTransfer) == null || (t = t.files) == null ? void 0 : t[0];
|
|
2043
|
-
n &&
|
|
2401
|
+
n && ne(n);
|
|
2044
2402
|
}
|
|
2045
2403
|
return (e, t) => {
|
|
2046
|
-
let o =
|
|
2047
|
-
return
|
|
2048
|
-
class: ["df-image-field",
|
|
2404
|
+
let o = D("v-progress-linear"), x = D("v-img");
|
|
2405
|
+
return C(), n(P(rn), g(Z(Z({}, s), {}, { loading: O.value }), {
|
|
2406
|
+
class: ["df-image-field", P(u)],
|
|
2049
2407
|
clearable: "",
|
|
2050
|
-
"onClick:clear":
|
|
2408
|
+
"onClick:clear": U,
|
|
2051
2409
|
onBlur: t[2] || (t[2] = (e) => d.value = !0)
|
|
2052
2410
|
}), {
|
|
2053
|
-
"prepend-inner":
|
|
2054
|
-
loader:
|
|
2411
|
+
"prepend-inner": R(() => [c(P(V), { name: "mdi-image" })]),
|
|
2412
|
+
loader: R(() => [_.value && y.value < 100 ? (C(), n(o, {
|
|
2055
2413
|
key: 0,
|
|
2056
|
-
"model-value":
|
|
2057
|
-
indeterminate:
|
|
2414
|
+
"model-value": y.value,
|
|
2415
|
+
indeterminate: y.value === -1
|
|
2058
2416
|
}, null, 8, ["model-value", "indeterminate"])) : r("", !0)]),
|
|
2059
|
-
default:
|
|
2060
|
-
class:
|
|
2061
|
-
"df-image-dragging":
|
|
2062
|
-
"df-image-disabled":
|
|
2417
|
+
default: R((e) => [a("div", {
|
|
2418
|
+
class: v(["d-flex w-100 position-relative df-input-wrapper df-image-wrapper", [P(l), {
|
|
2419
|
+
"df-image-dragging": j.value,
|
|
2420
|
+
"df-image-disabled": k.value
|
|
2063
2421
|
}]]),
|
|
2064
|
-
onDragenter:
|
|
2065
|
-
onDragover: t[0] || (t[0] =
|
|
2066
|
-
onDragleave:
|
|
2067
|
-
onDrop:
|
|
2068
|
-
onClick: t[1] || (t[1] =
|
|
2422
|
+
onDragenter: B(ie, ["prevent"]),
|
|
2423
|
+
onDragover: t[0] || (t[0] = B(() => {}, ["prevent"])),
|
|
2424
|
+
onDragleave: B(ae, ["prevent"]),
|
|
2425
|
+
onDrop: B(K, ["prevent"]),
|
|
2426
|
+
onClick: t[1] || (t[1] = B(() => {}, ["stop"]))
|
|
2069
2427
|
}, [
|
|
2070
2428
|
a("input", {
|
|
2071
|
-
id:
|
|
2429
|
+
id: P(h),
|
|
2072
2430
|
ref_key: "fileInputRef",
|
|
2073
|
-
ref:
|
|
2431
|
+
ref: E,
|
|
2074
2432
|
type: "file",
|
|
2075
2433
|
accept: "image/*",
|
|
2076
2434
|
class: "df-image-native-input",
|
|
2077
|
-
disabled:
|
|
2078
|
-
name:
|
|
2079
|
-
onChange:
|
|
2435
|
+
disabled: k.value,
|
|
2436
|
+
name: P(p).name,
|
|
2437
|
+
onChange: re,
|
|
2080
2438
|
onFocus: (t) => e.focus(),
|
|
2081
2439
|
onBlur: (t) => e.blur()
|
|
2082
|
-
}, null, 40,
|
|
2083
|
-
|
|
2440
|
+
}, null, 40, Rn),
|
|
2441
|
+
M.value ? (C(), i("label", {
|
|
2084
2442
|
key: 0,
|
|
2085
|
-
for:
|
|
2443
|
+
for: P(h),
|
|
2086
2444
|
class: "df-image-preview-label"
|
|
2087
|
-
}, [c(
|
|
2088
|
-
src:
|
|
2445
|
+
}, [c(x, {
|
|
2446
|
+
src: M.value,
|
|
2089
2447
|
class: "df-image-preview",
|
|
2090
|
-
style:
|
|
2091
|
-
}, null, 8, ["src", "style"])], 8,
|
|
2448
|
+
style: b(_.value && y.value < 100 ? "visibility: hidden" : "")
|
|
2449
|
+
}, null, 8, ["src", "style"])], 8, zn)) : (C(), i("label", {
|
|
2092
2450
|
key: 1,
|
|
2093
|
-
for:
|
|
2451
|
+
for: P(h),
|
|
2094
2452
|
class: "df-image-placeholder"
|
|
2095
|
-
}, [c(
|
|
2096
|
-
|
|
2453
|
+
}, [c(P(V), { name: "mdi-tray-arrow-up" }), a("span", null, A(P(m)("ImageDropHint")), 1)], 8, Bn)),
|
|
2454
|
+
M.value && !k.value ? (C(), i("label", {
|
|
2097
2455
|
key: 2,
|
|
2098
|
-
for:
|
|
2456
|
+
for: P(h),
|
|
2099
2457
|
class: "df-image-replace-btn",
|
|
2100
|
-
title:
|
|
2101
|
-
}, [c(
|
|
2102
|
-
|
|
2458
|
+
title: P(m)("ImageReplace")
|
|
2459
|
+
}, [c(P(V), { name: "mdi-pencil" })], 8, Vn)) : r("", !0),
|
|
2460
|
+
N.value ? (C(), i("a", {
|
|
2103
2461
|
key: 3,
|
|
2104
|
-
href:
|
|
2462
|
+
href: P(f),
|
|
2105
2463
|
download: "",
|
|
2106
2464
|
target: "_blank",
|
|
2107
2465
|
rel: "noopener",
|
|
2108
2466
|
class: "df-image-download-btn",
|
|
2109
|
-
title:
|
|
2110
|
-
"aria-label":
|
|
2111
|
-
}, [c(
|
|
2467
|
+
title: P(m)("ImageDownload"),
|
|
2468
|
+
"aria-label": P(m)("ImageDownload")
|
|
2469
|
+
}, [c(P(V), { name: "mdi-download" })], 8, Hn)) : r("", !0)
|
|
2112
2470
|
], 34)]),
|
|
2113
2471
|
_: 1
|
|
2114
2472
|
}, 16, ["class"]);
|
|
2115
2473
|
};
|
|
2116
2474
|
}
|
|
2117
|
-
}),
|
|
2475
|
+
}), Wn = /* @__PURE__ */ l({
|
|
2118
2476
|
__name: "df-input",
|
|
2119
|
-
props: /*@__PURE__*/
|
|
2477
|
+
props: /*@__PURE__*/ h({
|
|
2120
2478
|
inputType: {},
|
|
2121
2479
|
precision: {},
|
|
2122
2480
|
step: {},
|
|
@@ -2136,7 +2494,7 @@ var tn = ["title", "aria-label"], nn = /* @__PURE__ */ l({
|
|
|
2136
2494
|
passthroughAttrs: {},
|
|
2137
2495
|
density: {},
|
|
2138
2496
|
variant: {}
|
|
2139
|
-
},
|
|
2497
|
+
}, Z(Z({}, en), {}, {
|
|
2140
2498
|
inputType: "text",
|
|
2141
2499
|
precision: null,
|
|
2142
2500
|
step: void 0,
|
|
@@ -2145,52 +2503,52 @@ var tn = ["title", "aria-label"], nn = /* @__PURE__ */ l({
|
|
|
2145
2503
|
})),
|
|
2146
2504
|
emits: ["update:modelValue", "click:clear"],
|
|
2147
2505
|
setup(e, { emit: a }) {
|
|
2148
|
-
let o = e, { densityClass: s, isRendered: l, label: u,
|
|
2149
|
-
min:
|
|
2150
|
-
max:
|
|
2151
|
-
precision:
|
|
2152
|
-
step:
|
|
2506
|
+
let o = e, { densityClass: s, isRendered: l, label: u, shownErrors: d, touched: f, value: p, visibilityClass: h, vuetifyBindings: _ } = tn(o, a), { inputType: y, max: b, min: x, precision: S, step: w } = M(o), T = t(() => y.value === "number"), E = t(() => T.value ? {
|
|
2507
|
+
min: P(x),
|
|
2508
|
+
max: P(b),
|
|
2509
|
+
precision: P(S),
|
|
2510
|
+
step: P(w)
|
|
2153
2511
|
} : {});
|
|
2154
2512
|
return (e, t) => {
|
|
2155
|
-
let a =
|
|
2156
|
-
return
|
|
2513
|
+
let a = D("v-text-field"), o = D("v-number-input");
|
|
2514
|
+
return P(l) ? (C(), i("div", {
|
|
2157
2515
|
key: 0,
|
|
2158
|
-
class:
|
|
2159
|
-
}, [
|
|
2516
|
+
class: v(["df-input-container", [P(s), P(h)]])
|
|
2517
|
+
}, [T.value ? (C(), n(o, g({
|
|
2160
2518
|
key: 1,
|
|
2161
|
-
modelValue:
|
|
2162
|
-
"onUpdate:modelValue": t[2] || (t[2] = (e) =>
|
|
2519
|
+
modelValue: P(p),
|
|
2520
|
+
"onUpdate:modelValue": t[2] || (t[2] = (e) => m(p) ? p.value = e : null),
|
|
2163
2521
|
density: "compact",
|
|
2164
2522
|
"control-variant": "stacked"
|
|
2165
|
-
},
|
|
2166
|
-
label:
|
|
2523
|
+
}, Z(Z({}, P(_)), E.value), { onBlur: t[3] || (t[3] = (e) => f.value = !0) }), {
|
|
2524
|
+
label: R((e) => [c(P($), {
|
|
2167
2525
|
data: e,
|
|
2168
|
-
label:
|
|
2526
|
+
label: P(u)
|
|
2169
2527
|
}, null, 8, ["data", "label"])]),
|
|
2170
|
-
message:
|
|
2528
|
+
message: R(({ message: e }) => [c(P(Q), {
|
|
2171
2529
|
message: e,
|
|
2172
|
-
errors:
|
|
2530
|
+
errors: P(d)
|
|
2173
2531
|
}, null, 8, ["message", "errors"])]),
|
|
2174
2532
|
_: 1
|
|
2175
|
-
}, 16, ["modelValue"])) : (
|
|
2533
|
+
}, 16, ["modelValue"])) : (C(), n(a, g({
|
|
2176
2534
|
key: 0,
|
|
2177
|
-
modelValue:
|
|
2178
|
-
"onUpdate:modelValue": t[0] || (t[0] = (e) =>
|
|
2179
|
-
type:
|
|
2180
|
-
},
|
|
2181
|
-
label:
|
|
2535
|
+
modelValue: P(p),
|
|
2536
|
+
"onUpdate:modelValue": t[0] || (t[0] = (e) => m(p) ? p.value = e : null),
|
|
2537
|
+
type: P(y)
|
|
2538
|
+
}, P(_), { onBlur: t[1] || (t[1] = (e) => f.value = !0) }), {
|
|
2539
|
+
label: R((e) => [c(P($), {
|
|
2182
2540
|
data: e,
|
|
2183
|
-
label:
|
|
2541
|
+
label: P(u)
|
|
2184
2542
|
}, null, 8, ["data", "label"])]),
|
|
2185
|
-
message:
|
|
2543
|
+
message: R(({ message: e }) => [c(P(Q), {
|
|
2186
2544
|
message: e,
|
|
2187
|
-
errors:
|
|
2545
|
+
errors: P(d)
|
|
2188
2546
|
}, null, 8, ["message", "errors"])]),
|
|
2189
2547
|
_: 1
|
|
2190
2548
|
}, 16, ["modelValue", "type"]))], 2)) : r("", !0);
|
|
2191
2549
|
};
|
|
2192
2550
|
}
|
|
2193
|
-
}),
|
|
2551
|
+
}), Gn = Oe.create({
|
|
2194
2552
|
name: "classAttribute",
|
|
2195
2553
|
addGlobalAttributes() {
|
|
2196
2554
|
return [{
|
|
@@ -2208,8 +2566,8 @@ var tn = ["title", "aria-label"], nn = /* @__PURE__ */ l({
|
|
|
2208
2566
|
}];
|
|
2209
2567
|
}
|
|
2210
2568
|
});
|
|
2211
|
-
function
|
|
2212
|
-
return
|
|
2569
|
+
function Kn(e, t) {
|
|
2570
|
+
return ke.create({
|
|
2213
2571
|
name: e,
|
|
2214
2572
|
parseHTML() {
|
|
2215
2573
|
return [{ tag: `span.${t}` }];
|
|
@@ -2217,13 +2575,13 @@ function fn(e, t) {
|
|
|
2217
2575
|
renderHTML({ HTMLAttributes: e }) {
|
|
2218
2576
|
return [
|
|
2219
2577
|
"span",
|
|
2220
|
-
|
|
2578
|
+
je(e, { class: t }),
|
|
2221
2579
|
0
|
|
2222
2580
|
];
|
|
2223
2581
|
}
|
|
2224
2582
|
});
|
|
2225
2583
|
}
|
|
2226
|
-
var
|
|
2584
|
+
var qn = Kn("marker", "marker"), Jn = Kn("spoiler", "spoiler"), Yn = [
|
|
2227
2585
|
{
|
|
2228
2586
|
key: "ArticleCategory",
|
|
2229
2587
|
kind: "heading",
|
|
@@ -2273,67 +2631,67 @@ var pn = fn("marker", "marker"), mn = fn("spoiler", "spoiler"), hn = [
|
|
|
2273
2631
|
className: "fancy-code fancy-code-bright"
|
|
2274
2632
|
}
|
|
2275
2633
|
];
|
|
2276
|
-
function
|
|
2634
|
+
function Xn(e) {
|
|
2277
2635
|
let { state: t } = e, { $from: n } = t.selection;
|
|
2278
2636
|
return n.depth > 0 || t.doc.content.size === 0 ? n : t.doc.resolve(Math.min(1, t.doc.content.size));
|
|
2279
2637
|
}
|
|
2280
|
-
function
|
|
2281
|
-
return
|
|
2638
|
+
function Zn(e) {
|
|
2639
|
+
return Xn(e).parent;
|
|
2282
2640
|
}
|
|
2283
|
-
function
|
|
2284
|
-
let n =
|
|
2641
|
+
function Qn(e, t) {
|
|
2642
|
+
let n = Xn(e);
|
|
2285
2643
|
for (let e = n.depth; e >= 0; --e) if (n.node(e).type.name === t) return n.node(e);
|
|
2286
2644
|
return null;
|
|
2287
2645
|
}
|
|
2288
|
-
function
|
|
2646
|
+
function $n(e, t) {
|
|
2289
2647
|
switch (t.kind) {
|
|
2290
2648
|
case "heading": {
|
|
2291
|
-
let n =
|
|
2649
|
+
let n = Zn(e);
|
|
2292
2650
|
return n.type.name === "heading" && n.attrs.level === t.level && n.attrs.class === t.className;
|
|
2293
2651
|
}
|
|
2294
2652
|
case "paragraph": {
|
|
2295
|
-
let n =
|
|
2653
|
+
let n = Zn(e);
|
|
2296
2654
|
return n.type.name === "paragraph" && n.attrs.class === t.className;
|
|
2297
2655
|
}
|
|
2298
2656
|
case "codeBlock": {
|
|
2299
|
-
let n =
|
|
2657
|
+
let n = Zn(e);
|
|
2300
2658
|
return n.type.name === "codeBlock" && n.attrs.class === t.className;
|
|
2301
2659
|
}
|
|
2302
2660
|
case "blockquote": {
|
|
2303
|
-
let n =
|
|
2661
|
+
let n = Qn(e, "blockquote");
|
|
2304
2662
|
return !!n && n.attrs.class === t.className;
|
|
2305
2663
|
}
|
|
2306
2664
|
case "mark": return e.isActive(t.markName);
|
|
2307
2665
|
default: return !1;
|
|
2308
2666
|
}
|
|
2309
2667
|
}
|
|
2310
|
-
function
|
|
2668
|
+
function er(e, t) {
|
|
2311
2669
|
let n = e.chain().focus(), { $from: r } = e.state.selection;
|
|
2312
|
-
switch (t.kind !== "mark" && r.depth === 0 && e.state.doc.content.size > 0 && n.setTextSelection(
|
|
2670
|
+
switch (t.kind !== "mark" && r.depth === 0 && e.state.doc.content.size > 0 && n.setTextSelection(Xn(e).pos), t.kind) {
|
|
2313
2671
|
case "heading":
|
|
2314
|
-
|
|
2672
|
+
$n(e, t) ? n.setParagraph().updateAttributes("paragraph", { class: null }).run() : n.setNode("heading", { level: t.level }).updateAttributes("heading", { class: t.className }).run();
|
|
2315
2673
|
break;
|
|
2316
2674
|
case "paragraph":
|
|
2317
|
-
|
|
2675
|
+
$n(e, t) ? n.setParagraph().updateAttributes("paragraph", { class: null }).run() : n.setParagraph().updateAttributes("paragraph", { class: t.className }).run();
|
|
2318
2676
|
break;
|
|
2319
2677
|
case "blockquote":
|
|
2320
|
-
|
|
2678
|
+
$n(e, t) ? n.unsetBlockquote().run() : Qn(e, "blockquote") ? n.updateAttributes("blockquote", { class: t.className }).run() : n.setBlockquote().updateAttributes("blockquote", { class: t.className }).run();
|
|
2321
2679
|
break;
|
|
2322
2680
|
case "codeBlock":
|
|
2323
|
-
|
|
2681
|
+
$n(e, t) ? n.toggleCodeBlock().updateAttributes("paragraph", { class: null }).run() : Zn(e).type.name === "codeBlock" ? n.updateAttributes("codeBlock", { class: t.className }).run() : n.setCodeBlock().updateAttributes("codeBlock", { class: t.className }).run();
|
|
2324
2682
|
break;
|
|
2325
2683
|
case "mark": n.toggleMark(t.markName).run();
|
|
2326
2684
|
}
|
|
2327
2685
|
}
|
|
2328
2686
|
//#endregion
|
|
2329
2687
|
//#region src/helpers/rtf-editor/image-paste.ts
|
|
2330
|
-
function
|
|
2688
|
+
function tr(e) {
|
|
2331
2689
|
return new Promise((t, n) => {
|
|
2332
2690
|
let r = new FileReader();
|
|
2333
2691
|
r.onload = () => t(r.result), r.onerror = () => n(r.error), r.readAsDataURL(e);
|
|
2334
2692
|
});
|
|
2335
2693
|
}
|
|
2336
|
-
function
|
|
2694
|
+
function nr(e) {
|
|
2337
2695
|
if (!e) return [];
|
|
2338
2696
|
let t = [];
|
|
2339
2697
|
return Array.from(e.items || []).forEach((e) => {
|
|
@@ -2345,25 +2703,25 @@ function Sn(e) {
|
|
|
2345
2703
|
e.type.startsWith("image/") && t.push(e);
|
|
2346
2704
|
}), t;
|
|
2347
2705
|
}
|
|
2348
|
-
function
|
|
2706
|
+
function rr(e) {
|
|
2349
2707
|
let t = 0;
|
|
2350
2708
|
return e.forEach((e) => {
|
|
2351
|
-
e.type.name === "image" ? t += 1 : e.content.size && (t +=
|
|
2709
|
+
e.type.name === "image" ? t += 1 : e.content.size && (t += rr(e.content));
|
|
2352
2710
|
}), t;
|
|
2353
2711
|
}
|
|
2354
|
-
function
|
|
2712
|
+
function ir(e, t, n) {
|
|
2355
2713
|
let r = [];
|
|
2356
2714
|
return e.forEach((e) => {
|
|
2357
|
-
e.type.name === "image" && n.index < t.length ? (r.push(e.type.create(
|
|
2358
|
-
}),
|
|
2715
|
+
e.type.name === "image" && n.index < t.length ? (r.push(e.type.create(Z(Z({}, e.attrs), {}, { src: t[n.index] }), e.content, e.marks)), n.index += 1) : e.content.size ? r.push(e.copy(ir(e.content, t, n))) : r.push(e);
|
|
2716
|
+
}), Me.fromArray(r);
|
|
2359
2717
|
}
|
|
2360
|
-
function
|
|
2718
|
+
function ar(e) {
|
|
2361
2719
|
return (t, n, r) => {
|
|
2362
|
-
let i =
|
|
2363
|
-
return i.length !== 0 && (n.preventDefault(), Promise.all(i.map(
|
|
2720
|
+
let i = nr(n.clipboardData);
|
|
2721
|
+
return i.length !== 0 && (n.preventDefault(), Promise.all(i.map(tr)).then((n) => {
|
|
2364
2722
|
var i;
|
|
2365
|
-
if (
|
|
2366
|
-
let e =
|
|
2723
|
+
if (rr(r.content) > 0) {
|
|
2724
|
+
let e = ir(r.content, n, { index: 0 }), i = new Ne(e, r.openStart, r.openEnd);
|
|
2367
2725
|
t.dispatch(t.state.tr.replaceSelection(i).scrollIntoView());
|
|
2368
2726
|
return;
|
|
2369
2727
|
}
|
|
@@ -2376,11 +2734,11 @@ function Tn(e) {
|
|
|
2376
2734
|
}
|
|
2377
2735
|
//#endregion
|
|
2378
2736
|
//#region src/helpers/rtf-editor/link-with-download.ts
|
|
2379
|
-
var
|
|
2737
|
+
var or = Pe.extend({
|
|
2380
2738
|
name: "link",
|
|
2381
2739
|
addAttributes() {
|
|
2382
2740
|
var e;
|
|
2383
|
-
return
|
|
2741
|
+
return Z(Z({}, (e = this.parent) == null ? void 0 : e.call(this)), {}, { download: {
|
|
2384
2742
|
default: null,
|
|
2385
2743
|
parseHTML: (e) => e.getAttribute("download"),
|
|
2386
2744
|
renderHTML: (e) => e.download ? { download: e.download } : {}
|
|
@@ -2389,7 +2747,7 @@ var En = Ie.extend({
|
|
|
2389
2747
|
});
|
|
2390
2748
|
//#endregion
|
|
2391
2749
|
//#region src/helpers/rtf-editor/media-embed.ts
|
|
2392
|
-
function
|
|
2750
|
+
function sr(e) {
|
|
2393
2751
|
let t;
|
|
2394
2752
|
try {
|
|
2395
2753
|
t = new URL(e);
|
|
@@ -2415,7 +2773,7 @@ function Dn(e) {
|
|
|
2415
2773
|
}
|
|
2416
2774
|
return null;
|
|
2417
2775
|
}
|
|
2418
|
-
var
|
|
2776
|
+
var cr = Ae.create({
|
|
2419
2777
|
name: "mediaEmbed",
|
|
2420
2778
|
group: "block",
|
|
2421
2779
|
atom: !0,
|
|
@@ -2427,7 +2785,7 @@ var On = Me.create({
|
|
|
2427
2785
|
return [{ tag: "iframe.media-embed" }];
|
|
2428
2786
|
},
|
|
2429
2787
|
renderHTML({ HTMLAttributes: e }) {
|
|
2430
|
-
return ["iframe",
|
|
2788
|
+
return ["iframe", je({
|
|
2431
2789
|
class: "media-embed",
|
|
2432
2790
|
frameborder: "0",
|
|
2433
2791
|
allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",
|
|
@@ -2437,32 +2795,32 @@ var On = Me.create({
|
|
|
2437
2795
|
});
|
|
2438
2796
|
//#endregion
|
|
2439
2797
|
//#region src/helpers/rtf-editor/use-editor-tick.ts
|
|
2440
|
-
function
|
|
2441
|
-
let t =
|
|
2798
|
+
function lr(e) {
|
|
2799
|
+
let t = w(0), n, r = () => {
|
|
2442
2800
|
t.value += 1;
|
|
2443
2801
|
}, i = (e) => {
|
|
2444
2802
|
n == null || n.off("transaction", r), n == null || n.off("update", r), n = e, n == null || n.on("transaction", r), n == null || n.on("update", r);
|
|
2445
2803
|
};
|
|
2446
|
-
return
|
|
2804
|
+
return I(e, i, { immediate: !0 }), x(() => i(void 0)), t;
|
|
2447
2805
|
}
|
|
2448
2806
|
//#endregion
|
|
2449
2807
|
//#region src/helpers/rtf-editor/rtf-toolbar.vue?vue&type=script&setup=true&lang.ts
|
|
2450
|
-
var
|
|
2808
|
+
var ur = { class: "rtf-toolbar-group" }, dr = { class: "d-flex justify-end ga-2 mt-2" }, fr = { class: "d-flex justify-space-between align-center ga-2 mt-2" }, pr = { class: "d-flex justify-end mt-2" }, mr = /* @__PURE__ */ l({
|
|
2451
2809
|
__name: "rtf-toolbar",
|
|
2452
2810
|
props: {
|
|
2453
2811
|
editor: { default: void 0 },
|
|
2454
2812
|
buttonSize: { default: "small" }
|
|
2455
2813
|
},
|
|
2456
2814
|
setup(o) {
|
|
2457
|
-
let l = o, u = t(() => l.buttonSize), d =
|
|
2815
|
+
let l = o, u = t(() => l.buttonSize), d = un, f = t(() => l.editor), p = lr(f), m = t(() => {
|
|
2458
2816
|
var e;
|
|
2459
2817
|
return p.value, !!((e = l.editor) != null && e.isEditable);
|
|
2460
|
-
}),
|
|
2818
|
+
}), h = t(() => ({
|
|
2461
2819
|
size: u.value,
|
|
2462
2820
|
density: "comfortable",
|
|
2463
2821
|
variant: "text",
|
|
2464
|
-
disabled: !
|
|
2465
|
-
})),
|
|
2822
|
+
disabled: !m.value
|
|
2823
|
+
})), _ = t(() => ({
|
|
2466
2824
|
buttonSize: u.value,
|
|
2467
2825
|
buttonDensity: "comfortable"
|
|
2468
2826
|
})), y = t(() => {
|
|
@@ -2491,210 +2849,210 @@ var An = { class: "rtf-toolbar-group" }, jn = { class: "d-flex justify-end ga-2
|
|
|
2491
2849
|
if (y.value.alignRight) return "right";
|
|
2492
2850
|
if (y.value.alignJustify) return "justify";
|
|
2493
2851
|
});
|
|
2494
|
-
function
|
|
2852
|
+
function x(e) {
|
|
2495
2853
|
var t;
|
|
2496
2854
|
typeof e == "string" && ((t = f.value) == null || t.chain().focus().setTextAlign(e).run());
|
|
2497
2855
|
}
|
|
2498
|
-
let
|
|
2499
|
-
function
|
|
2500
|
-
let a = new
|
|
2856
|
+
let S = [];
|
|
2857
|
+
function E(e, t, n, r, i) {
|
|
2858
|
+
let a = new te({
|
|
2501
2859
|
value: {
|
|
2502
2860
|
icon: e,
|
|
2503
|
-
renderAs:
|
|
2861
|
+
renderAs: "text",
|
|
2504
2862
|
showIcon: !0,
|
|
2505
2863
|
showLabel: !1
|
|
2506
2864
|
},
|
|
2507
|
-
actions: [new
|
|
2865
|
+
actions: [new W((e, n, r) => (t(), n(e, r)))]
|
|
2508
2866
|
});
|
|
2509
|
-
return
|
|
2867
|
+
return S.push({
|
|
2510
2868
|
action: a,
|
|
2511
2869
|
title: n,
|
|
2512
2870
|
disabled: r,
|
|
2513
2871
|
active: i
|
|
2514
2872
|
}), a;
|
|
2515
2873
|
}
|
|
2516
|
-
function
|
|
2874
|
+
function O({ action: e, title: t, disabled: n, active: r }) {
|
|
2517
2875
|
var i;
|
|
2518
2876
|
let a = {
|
|
2519
2877
|
title: t(),
|
|
2520
2878
|
icon: !0
|
|
2521
2879
|
};
|
|
2522
|
-
r && (a.active = r()),
|
|
2880
|
+
r && (a.active = r()), oe((i = e.value.passthroughAttrs) == null ? {} : i, a) || (e.value = Z(Z({}, e.value), {}, { passthroughAttrs: a }));
|
|
2523
2881
|
let o = !n();
|
|
2524
|
-
e.enabled !== o && (e.
|
|
2882
|
+
e.enabled !== o && (e.access = o ? "editable" : "disabled");
|
|
2525
2883
|
}
|
|
2526
|
-
let
|
|
2884
|
+
let k = [E("mdi-undo", () => {
|
|
2527
2885
|
var e;
|
|
2528
2886
|
return (e = f.value) == null ? void 0 : e.chain().focus().undo().run();
|
|
2529
|
-
}, () => d
|
|
2887
|
+
}, () => d("Undo"), () => !m.value || !y.value.canUndo), E("mdi-redo", () => {
|
|
2530
2888
|
var e;
|
|
2531
2889
|
return (e = f.value) == null ? void 0 : e.chain().focus().redo().run();
|
|
2532
|
-
}, () => d
|
|
2890
|
+
}, () => d("Redo"), () => !m.value || !y.value.canRedo)], j = [E("mdi-format-bold", () => {
|
|
2533
2891
|
var e;
|
|
2534
2892
|
return (e = f.value) == null ? void 0 : e.chain().focus().toggleBold().run();
|
|
2535
|
-
}, () => d
|
|
2893
|
+
}, () => d("Bold"), () => !m.value, () => y.value.bold), E("mdi-format-italic", () => {
|
|
2536
2894
|
var e;
|
|
2537
2895
|
return (e = f.value) == null ? void 0 : e.chain().focus().toggleItalic().run();
|
|
2538
|
-
}, () => d
|
|
2896
|
+
}, () => d("Italic"), () => !m.value, () => y.value.italic)], M = [
|
|
2539
2897
|
{
|
|
2540
2898
|
value: "left",
|
|
2541
2899
|
icon: "mdi-format-align-left",
|
|
2542
|
-
title: () => d
|
|
2900
|
+
title: () => d("AlignLeft")
|
|
2543
2901
|
},
|
|
2544
2902
|
{
|
|
2545
2903
|
value: "center",
|
|
2546
2904
|
icon: "mdi-format-align-center",
|
|
2547
|
-
title: () => d
|
|
2905
|
+
title: () => d("AlignCenter")
|
|
2548
2906
|
},
|
|
2549
2907
|
{
|
|
2550
2908
|
value: "right",
|
|
2551
2909
|
icon: "mdi-format-align-right",
|
|
2552
|
-
title: () => d
|
|
2910
|
+
title: () => d("AlignRight")
|
|
2553
2911
|
},
|
|
2554
2912
|
{
|
|
2555
2913
|
value: "justify",
|
|
2556
2914
|
icon: "mdi-format-align-justify",
|
|
2557
|
-
title: () => d
|
|
2915
|
+
title: () => d("AlignJustify")
|
|
2558
2916
|
}
|
|
2559
|
-
].map((e) =>
|
|
2560
|
-
|
|
2917
|
+
].map((e) => E(e.icon, () => x(e.value), e.title, () => !m.value, () => b.value === e.value)), N = [
|
|
2918
|
+
E("mdi-format-list-bulleted", () => {
|
|
2561
2919
|
var e;
|
|
2562
2920
|
return (e = f.value) == null ? void 0 : e.chain().focus().toggleBulletList().run();
|
|
2563
|
-
}, () => d
|
|
2564
|
-
|
|
2921
|
+
}, () => d("BulletedList"), () => !m.value, () => y.value.bulletList),
|
|
2922
|
+
E("mdi-format-list-numbered", () => {
|
|
2565
2923
|
var e;
|
|
2566
2924
|
return (e = f.value) == null ? void 0 : e.chain().focus().toggleOrderedList().run();
|
|
2567
|
-
}, () => d
|
|
2568
|
-
|
|
2925
|
+
}, () => d("NumberedList"), () => !m.value, () => y.value.orderedList),
|
|
2926
|
+
E("mdi-format-indent-decrease", () => {
|
|
2569
2927
|
var e;
|
|
2570
2928
|
return (e = f.value) == null ? void 0 : e.chain().focus().liftListItem("listItem").run();
|
|
2571
|
-
}, () => d
|
|
2572
|
-
|
|
2929
|
+
}, () => d("Outdent"), () => !m.value || !y.value.canLift),
|
|
2930
|
+
E("mdi-format-indent-increase", () => {
|
|
2573
2931
|
var e;
|
|
2574
2932
|
return (e = f.value) == null ? void 0 : e.chain().focus().sinkListItem("listItem").run();
|
|
2575
|
-
}, () => d
|
|
2933
|
+
}, () => d("Indent"), () => !m.value || !y.value.canSink)
|
|
2576
2934
|
];
|
|
2577
|
-
|
|
2578
|
-
|
|
2935
|
+
L(() => {
|
|
2936
|
+
S.forEach(O);
|
|
2579
2937
|
});
|
|
2580
|
-
let
|
|
2938
|
+
let ee = t(() => [
|
|
2581
2939
|
{
|
|
2582
2940
|
level: 0,
|
|
2583
|
-
label: d
|
|
2941
|
+
label: d("Paragraph")
|
|
2584
2942
|
},
|
|
2585
2943
|
{
|
|
2586
2944
|
level: 1,
|
|
2587
|
-
label: d
|
|
2945
|
+
label: d("Heading1")
|
|
2588
2946
|
},
|
|
2589
2947
|
{
|
|
2590
2948
|
level: 2,
|
|
2591
|
-
label: d
|
|
2949
|
+
label: d("Heading2")
|
|
2592
2950
|
},
|
|
2593
2951
|
{
|
|
2594
2952
|
level: 3,
|
|
2595
|
-
label: d
|
|
2953
|
+
label: d("Heading3")
|
|
2596
2954
|
},
|
|
2597
2955
|
{
|
|
2598
2956
|
level: 4,
|
|
2599
|
-
label: d
|
|
2957
|
+
label: d("Heading4")
|
|
2600
2958
|
},
|
|
2601
2959
|
{
|
|
2602
2960
|
level: 5,
|
|
2603
|
-
label: d
|
|
2961
|
+
label: d("Heading5")
|
|
2604
2962
|
},
|
|
2605
2963
|
{
|
|
2606
2964
|
level: 6,
|
|
2607
|
-
label: d
|
|
2965
|
+
label: d("Heading6")
|
|
2608
2966
|
}
|
|
2609
2967
|
]);
|
|
2610
|
-
function
|
|
2968
|
+
function F(e) {
|
|
2611
2969
|
var t, n;
|
|
2612
2970
|
return p.value, e === 0 ? !!((t = f.value) != null && t.isActive("paragraph")) : !!((n = f.value) != null && n.isActive("heading", { level: e }));
|
|
2613
2971
|
}
|
|
2614
|
-
let
|
|
2972
|
+
let I = t(() => {
|
|
2615
2973
|
var e, t;
|
|
2616
|
-
return (e = (t =
|
|
2974
|
+
return (e = (t = ee.value.find((e) => F(e.level))) == null ? void 0 : t.label) == null ? d("Paragraph") : e;
|
|
2617
2975
|
});
|
|
2618
|
-
function
|
|
2976
|
+
function B(e) {
|
|
2619
2977
|
var t;
|
|
2620
2978
|
let n = (t = f.value) == null ? void 0 : t.chain().focus();
|
|
2621
2979
|
n && (e === 0 ? n.setParagraph().run() : n.toggleHeading({ level: e }).run());
|
|
2622
2980
|
}
|
|
2623
|
-
let
|
|
2624
|
-
function
|
|
2625
|
-
return p.value, !!f.value &&
|
|
2981
|
+
let H = Yn;
|
|
2982
|
+
function U(e) {
|
|
2983
|
+
return p.value, !!f.value && $n(f.value, e);
|
|
2626
2984
|
}
|
|
2627
|
-
let
|
|
2628
|
-
function
|
|
2985
|
+
let G = w(""), ne = w(!1);
|
|
2986
|
+
function re() {
|
|
2629
2987
|
var e, t, n;
|
|
2630
2988
|
let r = (e = (t = f.value) == null ? void 0 : t.getAttributes("link")) == null ? {} : e;
|
|
2631
|
-
|
|
2989
|
+
G.value = (n = r.href) == null ? "" : n, ne.value = !!r.download;
|
|
2632
2990
|
}
|
|
2633
|
-
function
|
|
2991
|
+
function ie() {
|
|
2634
2992
|
var e;
|
|
2635
|
-
|
|
2993
|
+
G.value && ((e = f.value) == null || e.chain().focus().extendMarkRange("link").setLink({ href: G.value }).updateAttributes("link", { download: ne.value ? "file" : null }).run());
|
|
2636
2994
|
}
|
|
2637
|
-
function
|
|
2995
|
+
function ae() {
|
|
2638
2996
|
var e;
|
|
2639
2997
|
(e = f.value) == null || e.chain().focus().unsetLink().run();
|
|
2640
2998
|
}
|
|
2641
|
-
let
|
|
2642
|
-
function
|
|
2999
|
+
let K = w(""), q = w();
|
|
3000
|
+
function se() {
|
|
2643
3001
|
var e;
|
|
2644
|
-
|
|
3002
|
+
K.value && ((e = f.value) == null || e.chain().focus().setImage({ src: K.value }).run(), K.value = "");
|
|
2645
3003
|
}
|
|
2646
|
-
function
|
|
3004
|
+
function ce() {
|
|
2647
3005
|
var e;
|
|
2648
|
-
(e =
|
|
3006
|
+
(e = q.value) == null || e.click();
|
|
2649
3007
|
}
|
|
2650
|
-
function
|
|
2651
|
-
return
|
|
3008
|
+
function le(e) {
|
|
3009
|
+
return J.apply(this, arguments);
|
|
2652
3010
|
}
|
|
2653
|
-
function
|
|
2654
|
-
return
|
|
3011
|
+
function J() {
|
|
3012
|
+
return J = Fn(function* (e) {
|
|
2655
3013
|
var t, n;
|
|
2656
3014
|
let r = (t = e.target.files) == null ? void 0 : t[0];
|
|
2657
3015
|
if (!r) return;
|
|
2658
|
-
let i = yield
|
|
3016
|
+
let i = yield tr(r);
|
|
2659
3017
|
(n = f.value) == null || n.chain().focus().setImage({ src: i }).run(), e.target.value = "";
|
|
2660
|
-
}),
|
|
3018
|
+
}), J.apply(this, arguments);
|
|
2661
3019
|
}
|
|
2662
|
-
let
|
|
2663
|
-
function
|
|
3020
|
+
let Y = w("");
|
|
3021
|
+
function ue() {
|
|
2664
3022
|
var e;
|
|
2665
|
-
if (!
|
|
2666
|
-
let t =
|
|
3023
|
+
if (!Y.value) return;
|
|
3024
|
+
let t = sr(Y.value), n = (e = f.value) == null ? void 0 : e.chain().focus();
|
|
2667
3025
|
n && (t ? n.insertContent({
|
|
2668
3026
|
type: "mediaEmbed",
|
|
2669
3027
|
attrs: { src: t }
|
|
2670
3028
|
}).run() : n.insertContent({
|
|
2671
3029
|
type: "text",
|
|
2672
|
-
text:
|
|
3030
|
+
text: Y.value,
|
|
2673
3031
|
marks: [{
|
|
2674
3032
|
type: "link",
|
|
2675
|
-
attrs: { href:
|
|
3033
|
+
attrs: { href: Y.value }
|
|
2676
3034
|
}]
|
|
2677
|
-
}).run(),
|
|
3035
|
+
}).run(), Y.value = "");
|
|
2678
3036
|
}
|
|
2679
3037
|
return (t, o) => {
|
|
2680
|
-
let l =
|
|
2681
|
-
return
|
|
2682
|
-
c(
|
|
3038
|
+
let l = D("v-divider"), u = D("v-btn"), p = D("v-list-item-title"), b = D("v-list-item"), x = D("v-list"), S = D("v-menu"), w = D("v-text-field"), E = D("v-checkbox"), O = D("v-card");
|
|
3039
|
+
return C(), i("div", { class: v(["rtf-toolbar", { "rtf-toolbar--disabled": !m.value }]) }, [
|
|
3040
|
+
c(En, g({ actions: k }, _.value, { "show-as-group": "grouped-no-borders" }), null, 16),
|
|
2683
3041
|
c(l, {
|
|
2684
3042
|
vertical: "",
|
|
2685
3043
|
inset: "",
|
|
2686
3044
|
class: "mx-1"
|
|
2687
3045
|
}),
|
|
2688
|
-
c(u,
|
|
3046
|
+
c(u, g(h.value, {
|
|
2689
3047
|
icon: "",
|
|
2690
3048
|
rounded: "sm",
|
|
2691
|
-
title:
|
|
3049
|
+
title: P(d)("SelectAll"),
|
|
2692
3050
|
onClick: o[0] || (o[0] = (e) => {
|
|
2693
3051
|
var t;
|
|
2694
3052
|
return (t = f.value) == null ? void 0 : t.chain().focus().selectAll().run();
|
|
2695
3053
|
})
|
|
2696
3054
|
}), {
|
|
2697
|
-
default:
|
|
3055
|
+
default: R(() => [c(P(V), { name: "mdi-select-all" })]),
|
|
2698
3056
|
_: 1
|
|
2699
3057
|
}, 16, ["title"]),
|
|
2700
3058
|
c(l, {
|
|
@@ -2702,19 +3060,19 @@ var An = { class: "rtf-toolbar-group" }, jn = { class: "d-flex justify-end ga-2
|
|
|
2702
3060
|
inset: "",
|
|
2703
3061
|
class: "mx-1"
|
|
2704
3062
|
}),
|
|
2705
|
-
c(
|
|
2706
|
-
activator:
|
|
2707
|
-
default:
|
|
3063
|
+
c(S, null, {
|
|
3064
|
+
activator: R(({ props: e }) => [c(u, g(Z(Z({}, h.value), e), { "append-icon": "mdi-chevron-down" }), {
|
|
3065
|
+
default: R(() => [s(A(I.value), 1)]),
|
|
2708
3066
|
_: 1
|
|
2709
3067
|
}, 16)]),
|
|
2710
|
-
default:
|
|
2711
|
-
default:
|
|
3068
|
+
default: R(() => [c(x, { density: "compact" }, {
|
|
3069
|
+
default: R(() => [(C(!0), i(e, null, T(ee.value, (e) => (C(), n(b, {
|
|
2712
3070
|
key: e.level,
|
|
2713
|
-
active:
|
|
2714
|
-
onClick: (t) =>
|
|
3071
|
+
active: F(e.level),
|
|
3072
|
+
onClick: (t) => B(e.level)
|
|
2715
3073
|
}, {
|
|
2716
|
-
default:
|
|
2717
|
-
default:
|
|
3074
|
+
default: R(() => [c(p, null, {
|
|
3075
|
+
default: R(() => [s(A(e.label), 1)]),
|
|
2718
3076
|
_: 2
|
|
2719
3077
|
}, 1024)]),
|
|
2720
3078
|
_: 2
|
|
@@ -2723,19 +3081,19 @@ var An = { class: "rtf-toolbar-group" }, jn = { class: "d-flex justify-end ga-2
|
|
|
2723
3081
|
})]),
|
|
2724
3082
|
_: 1
|
|
2725
3083
|
}),
|
|
2726
|
-
c(
|
|
2727
|
-
activator:
|
|
2728
|
-
default:
|
|
3084
|
+
c(S, null, {
|
|
3085
|
+
activator: R(({ props: e }) => [c(u, g(Z(Z({}, h.value), e), { "append-icon": "mdi-chevron-down" }), {
|
|
3086
|
+
default: R(() => [s(A(P(d)("Style")), 1)]),
|
|
2729
3087
|
_: 1
|
|
2730
3088
|
}, 16)]),
|
|
2731
|
-
default:
|
|
2732
|
-
default:
|
|
3089
|
+
default: R(() => [c(x, { density: "compact" }, {
|
|
3090
|
+
default: R(() => [(C(!0), i(e, null, T(P(H), (e) => (C(), n(b, {
|
|
2733
3091
|
key: e.key,
|
|
2734
|
-
active:
|
|
2735
|
-
onClick: (t) => f.value &&
|
|
3092
|
+
active: U(e),
|
|
3093
|
+
onClick: (t) => f.value && P(er)(f.value, e)
|
|
2736
3094
|
}, {
|
|
2737
|
-
default:
|
|
2738
|
-
default:
|
|
3095
|
+
default: R(() => [c(p, null, {
|
|
3096
|
+
default: R(() => [s(A(P(d)(e.key)), 1)]),
|
|
2739
3097
|
_: 2
|
|
2740
3098
|
}, 1024)]),
|
|
2741
3099
|
_: 2
|
|
@@ -2749,73 +3107,73 @@ var An = { class: "rtf-toolbar-group" }, jn = { class: "d-flex justify-end ga-2
|
|
|
2749
3107
|
inset: "",
|
|
2750
3108
|
class: "mx-1"
|
|
2751
3109
|
}),
|
|
2752
|
-
c(
|
|
3110
|
+
c(En, g({ actions: j }, _.value, { "show-as-group": "grouped-no-borders" }), null, 16),
|
|
2753
3111
|
c(l, {
|
|
2754
3112
|
vertical: "",
|
|
2755
3113
|
inset: "",
|
|
2756
3114
|
class: "mx-1"
|
|
2757
3115
|
}),
|
|
2758
|
-
a("div",
|
|
2759
|
-
c(u,
|
|
3116
|
+
a("div", ur, [
|
|
3117
|
+
c(u, g(h.value, {
|
|
2760
3118
|
icon: "",
|
|
2761
|
-
title:
|
|
3119
|
+
title: P(d)("HorizontalLine"),
|
|
2762
3120
|
onClick: o[1] || (o[1] = (e) => {
|
|
2763
3121
|
var t;
|
|
2764
3122
|
return (t = f.value) == null ? void 0 : t.chain().focus().setHorizontalRule().run();
|
|
2765
3123
|
})
|
|
2766
3124
|
}), {
|
|
2767
|
-
default:
|
|
3125
|
+
default: R(() => [c(P(V), { name: "mdi-minus" })]),
|
|
2768
3126
|
_: 1
|
|
2769
3127
|
}, 16, ["title"]),
|
|
2770
|
-
c(
|
|
3128
|
+
c(S, {
|
|
2771
3129
|
"close-on-content-click": !1,
|
|
2772
|
-
"onUpdate:modelValue": o[4] || (o[4] = (e) => e &&
|
|
3130
|
+
"onUpdate:modelValue": o[4] || (o[4] = (e) => e && re())
|
|
2773
3131
|
}, {
|
|
2774
|
-
activator:
|
|
3132
|
+
activator: R(({ props: e }) => [c(u, g(Z(Z({}, h.value), e), {
|
|
2775
3133
|
icon: "",
|
|
2776
|
-
title:
|
|
3134
|
+
title: P(d)("Link"),
|
|
2777
3135
|
active: y.value.link
|
|
2778
3136
|
}), {
|
|
2779
|
-
default:
|
|
3137
|
+
default: R(() => [c(P(V), { name: "mdi-link-variant" })]),
|
|
2780
3138
|
_: 1
|
|
2781
3139
|
}, 16, ["title", "active"])]),
|
|
2782
|
-
default:
|
|
3140
|
+
default: R(() => [c(O, {
|
|
2783
3141
|
"min-width": "280",
|
|
2784
3142
|
class: "pa-3"
|
|
2785
3143
|
}, {
|
|
2786
|
-
default:
|
|
2787
|
-
c(
|
|
2788
|
-
modelValue:
|
|
2789
|
-
"onUpdate:modelValue": o[2] || (o[2] = (e) =>
|
|
2790
|
-
label:
|
|
3144
|
+
default: R(() => [
|
|
3145
|
+
c(w, {
|
|
3146
|
+
modelValue: G.value,
|
|
3147
|
+
"onUpdate:modelValue": o[2] || (o[2] = (e) => G.value = e),
|
|
3148
|
+
label: P(d)("LinkUrl"),
|
|
2791
3149
|
density: "compact",
|
|
2792
3150
|
"hide-details": "",
|
|
2793
3151
|
autofocus: "",
|
|
2794
|
-
onKeydown:
|
|
3152
|
+
onKeydown: z(ie, ["enter"])
|
|
2795
3153
|
}, null, 8, ["modelValue", "label"]),
|
|
2796
|
-
c(
|
|
2797
|
-
modelValue:
|
|
2798
|
-
"onUpdate:modelValue": o[3] || (o[3] = (e) =>
|
|
2799
|
-
label:
|
|
3154
|
+
c(E, {
|
|
3155
|
+
modelValue: ne.value,
|
|
3156
|
+
"onUpdate:modelValue": o[3] || (o[3] = (e) => ne.value = e),
|
|
3157
|
+
label: P(d)("Downloadable"),
|
|
2800
3158
|
density: "compact",
|
|
2801
3159
|
"hide-details": "",
|
|
2802
3160
|
class: "mt-1"
|
|
2803
3161
|
}, null, 8, ["modelValue", "label"]),
|
|
2804
|
-
a("div",
|
|
3162
|
+
a("div", dr, [y.value.link ? (C(), n(u, {
|
|
2805
3163
|
key: 0,
|
|
2806
3164
|
size: "small",
|
|
2807
3165
|
variant: "text",
|
|
2808
|
-
onClick:
|
|
3166
|
+
onClick: ae
|
|
2809
3167
|
}, {
|
|
2810
|
-
default:
|
|
3168
|
+
default: R(() => [s(A(P(d)("LinkRemove")), 1)]),
|
|
2811
3169
|
_: 1
|
|
2812
3170
|
})) : r("", !0), c(u, {
|
|
2813
3171
|
size: "small",
|
|
2814
3172
|
color: "primary",
|
|
2815
3173
|
variant: "tonal",
|
|
2816
|
-
onClick:
|
|
3174
|
+
onClick: ie
|
|
2817
3175
|
}, {
|
|
2818
|
-
default:
|
|
3176
|
+
default: R(() => [s(A(P(d)("LinkApply")), 1)]),
|
|
2819
3177
|
_: 1
|
|
2820
3178
|
})])
|
|
2821
3179
|
]),
|
|
@@ -2823,41 +3181,41 @@ var An = { class: "rtf-toolbar-group" }, jn = { class: "d-flex justify-end ga-2
|
|
|
2823
3181
|
})]),
|
|
2824
3182
|
_: 1
|
|
2825
3183
|
}),
|
|
2826
|
-
c(
|
|
2827
|
-
activator:
|
|
3184
|
+
c(S, { "close-on-content-click": !1 }, {
|
|
3185
|
+
activator: R(({ props: e }) => [c(u, g(Z(Z({}, h.value), e), {
|
|
2828
3186
|
icon: "",
|
|
2829
|
-
title:
|
|
3187
|
+
title: P(d)("Image")
|
|
2830
3188
|
}), {
|
|
2831
|
-
default:
|
|
3189
|
+
default: R(() => [c(P(V), { name: "mdi-image-plus" })]),
|
|
2832
3190
|
_: 1
|
|
2833
3191
|
}, 16, ["title"])]),
|
|
2834
|
-
default:
|
|
3192
|
+
default: R(() => [c(O, {
|
|
2835
3193
|
"min-width": "280",
|
|
2836
3194
|
class: "pa-3"
|
|
2837
3195
|
}, {
|
|
2838
|
-
default:
|
|
2839
|
-
modelValue:
|
|
2840
|
-
"onUpdate:modelValue": o[5] || (o[5] = (e) =>
|
|
2841
|
-
label:
|
|
3196
|
+
default: R(() => [c(w, {
|
|
3197
|
+
modelValue: K.value,
|
|
3198
|
+
"onUpdate:modelValue": o[5] || (o[5] = (e) => K.value = e),
|
|
3199
|
+
label: P(d)("ImageUrl"),
|
|
2842
3200
|
density: "compact",
|
|
2843
3201
|
"hide-details": "",
|
|
2844
3202
|
autofocus: "",
|
|
2845
|
-
onKeydown:
|
|
2846
|
-
}, null, 8, ["modelValue", "label"]), a("div",
|
|
3203
|
+
onKeydown: z(se, ["enter"])
|
|
3204
|
+
}, null, 8, ["modelValue", "label"]), a("div", fr, [c(u, {
|
|
2847
3205
|
size: "small",
|
|
2848
3206
|
variant: "text",
|
|
2849
3207
|
"prepend-icon": "mdi-upload",
|
|
2850
|
-
onClick:
|
|
3208
|
+
onClick: ce
|
|
2851
3209
|
}, {
|
|
2852
|
-
default:
|
|
3210
|
+
default: R(() => [s(A(P(d)("ImageUpload")), 1)]),
|
|
2853
3211
|
_: 1
|
|
2854
3212
|
}), c(u, {
|
|
2855
3213
|
size: "small",
|
|
2856
3214
|
color: "primary",
|
|
2857
3215
|
variant: "tonal",
|
|
2858
|
-
onClick:
|
|
3216
|
+
onClick: se
|
|
2859
3217
|
}, {
|
|
2860
|
-
default:
|
|
3218
|
+
default: R(() => [s(A(P(d)("ImageInsert")), 1)]),
|
|
2861
3219
|
_: 1
|
|
2862
3220
|
})])]),
|
|
2863
3221
|
_: 1
|
|
@@ -2866,55 +3224,55 @@ var An = { class: "rtf-toolbar-group" }, jn = { class: "d-flex justify-end ga-2
|
|
|
2866
3224
|
}),
|
|
2867
3225
|
a("input", {
|
|
2868
3226
|
ref_key: "imageInput",
|
|
2869
|
-
ref:
|
|
3227
|
+
ref: q,
|
|
2870
3228
|
type: "file",
|
|
2871
3229
|
accept: "image/*",
|
|
2872
3230
|
class: "d-none",
|
|
2873
|
-
onChange:
|
|
3231
|
+
onChange: le
|
|
2874
3232
|
}, null, 544),
|
|
2875
|
-
c(
|
|
2876
|
-
activator:
|
|
3233
|
+
c(S, { "close-on-content-click": !1 }, {
|
|
3234
|
+
activator: R(({ props: e }) => [c(u, g(Z(Z({}, h.value), e), {
|
|
2877
3235
|
icon: "",
|
|
2878
|
-
title:
|
|
3236
|
+
title: P(d)("MediaEmbed")
|
|
2879
3237
|
}), {
|
|
2880
|
-
default:
|
|
3238
|
+
default: R(() => [c(P(V), { name: "mdi-video-plus" })]),
|
|
2881
3239
|
_: 1
|
|
2882
3240
|
}, 16, ["title"])]),
|
|
2883
|
-
default:
|
|
3241
|
+
default: R(() => [c(O, {
|
|
2884
3242
|
"min-width": "280",
|
|
2885
3243
|
class: "pa-3"
|
|
2886
3244
|
}, {
|
|
2887
|
-
default:
|
|
2888
|
-
modelValue:
|
|
2889
|
-
"onUpdate:modelValue": o[6] || (o[6] = (e) =>
|
|
2890
|
-
label:
|
|
3245
|
+
default: R(() => [c(w, {
|
|
3246
|
+
modelValue: Y.value,
|
|
3247
|
+
"onUpdate:modelValue": o[6] || (o[6] = (e) => Y.value = e),
|
|
3248
|
+
label: P(d)("MediaEmbedUrl"),
|
|
2891
3249
|
density: "compact",
|
|
2892
3250
|
"hide-details": "",
|
|
2893
3251
|
autofocus: "",
|
|
2894
|
-
onKeydown:
|
|
2895
|
-
}, null, 8, ["modelValue", "label"]), a("div",
|
|
3252
|
+
onKeydown: z(ue, ["enter"])
|
|
3253
|
+
}, null, 8, ["modelValue", "label"]), a("div", pr, [c(u, {
|
|
2896
3254
|
size: "small",
|
|
2897
3255
|
color: "primary",
|
|
2898
3256
|
variant: "tonal",
|
|
2899
|
-
onClick:
|
|
3257
|
+
onClick: ue
|
|
2900
3258
|
}, {
|
|
2901
|
-
default:
|
|
3259
|
+
default: R(() => [s(A(P(d)("MediaEmbedInsert")), 1)]),
|
|
2902
3260
|
_: 1
|
|
2903
3261
|
})])]),
|
|
2904
3262
|
_: 1
|
|
2905
3263
|
})]),
|
|
2906
3264
|
_: 1
|
|
2907
3265
|
}),
|
|
2908
|
-
c(
|
|
2909
|
-
activator:
|
|
3266
|
+
c(S, null, {
|
|
3267
|
+
activator: R(({ props: e }) => [c(u, g(Z(Z({}, h.value), e), {
|
|
2910
3268
|
icon: "",
|
|
2911
|
-
title:
|
|
3269
|
+
title: P(d)("Table")
|
|
2912
3270
|
}), {
|
|
2913
|
-
default:
|
|
3271
|
+
default: R(() => [c(P(V), { name: "mdi-table" })]),
|
|
2914
3272
|
_: 1
|
|
2915
3273
|
}, 16, ["title"])]),
|
|
2916
|
-
default:
|
|
2917
|
-
default:
|
|
3274
|
+
default: R(() => [c(x, { density: "compact" }, {
|
|
3275
|
+
default: R(() => [
|
|
2918
3276
|
c(b, { onClick: o[7] || (o[7] = (e) => {
|
|
2919
3277
|
var t;
|
|
2920
3278
|
return (t = f.value) == null ? void 0 : t.chain().focus().insertTable({
|
|
@@ -2923,9 +3281,9 @@ var An = { class: "rtf-toolbar-group" }, jn = { class: "d-flex justify-end ga-2
|
|
|
2923
3281
|
withHeaderRow: !0
|
|
2924
3282
|
}).run();
|
|
2925
3283
|
}) }, {
|
|
2926
|
-
prepend:
|
|
2927
|
-
default:
|
|
2928
|
-
default:
|
|
3284
|
+
prepend: R(() => [c(P(V), { name: "mdi-table-plus" })]),
|
|
3285
|
+
default: R(() => [c(p, null, {
|
|
3286
|
+
default: R(() => [s(A(P(d)("TableInsert")), 1)]),
|
|
2929
3287
|
_: 1
|
|
2930
3288
|
})]),
|
|
2931
3289
|
_: 1
|
|
@@ -2938,9 +3296,9 @@ var An = { class: "rtf-toolbar-group" }, jn = { class: "d-flex justify-end ga-2
|
|
|
2938
3296
|
return (t = f.value) == null ? void 0 : t.chain().focus().addRowBefore().run();
|
|
2939
3297
|
})
|
|
2940
3298
|
}, {
|
|
2941
|
-
prepend:
|
|
2942
|
-
default:
|
|
2943
|
-
default:
|
|
3299
|
+
prepend: R(() => [c(P(V), { name: "mdi-table-row-plus-before" })]),
|
|
3300
|
+
default: R(() => [c(p, null, {
|
|
3301
|
+
default: R(() => [s(A(P(d)("TableAddRowAbove")), 1)]),
|
|
2944
3302
|
_: 1
|
|
2945
3303
|
})]),
|
|
2946
3304
|
_: 1
|
|
@@ -2952,9 +3310,9 @@ var An = { class: "rtf-toolbar-group" }, jn = { class: "d-flex justify-end ga-2
|
|
|
2952
3310
|
return (t = f.value) == null ? void 0 : t.chain().focus().addRowAfter().run();
|
|
2953
3311
|
})
|
|
2954
3312
|
}, {
|
|
2955
|
-
prepend:
|
|
2956
|
-
default:
|
|
2957
|
-
default:
|
|
3313
|
+
prepend: R(() => [c(P(V), { name: "mdi-table-row-plus-after" })]),
|
|
3314
|
+
default: R(() => [c(p, null, {
|
|
3315
|
+
default: R(() => [s(A(P(d)("TableAddRowBelow")), 1)]),
|
|
2958
3316
|
_: 1
|
|
2959
3317
|
})]),
|
|
2960
3318
|
_: 1
|
|
@@ -2966,9 +3324,9 @@ var An = { class: "rtf-toolbar-group" }, jn = { class: "d-flex justify-end ga-2
|
|
|
2966
3324
|
return (t = f.value) == null ? void 0 : t.chain().focus().deleteRow().run();
|
|
2967
3325
|
})
|
|
2968
3326
|
}, {
|
|
2969
|
-
prepend:
|
|
2970
|
-
default:
|
|
2971
|
-
default:
|
|
3327
|
+
prepend: R(() => [c(P(V), { name: "mdi-table-row-remove" })]),
|
|
3328
|
+
default: R(() => [c(p, null, {
|
|
3329
|
+
default: R(() => [s(A(P(d)("TableDeleteRow")), 1)]),
|
|
2972
3330
|
_: 1
|
|
2973
3331
|
})]),
|
|
2974
3332
|
_: 1
|
|
@@ -2981,9 +3339,9 @@ var An = { class: "rtf-toolbar-group" }, jn = { class: "d-flex justify-end ga-2
|
|
|
2981
3339
|
return (t = f.value) == null ? void 0 : t.chain().focus().addColumnBefore().run();
|
|
2982
3340
|
})
|
|
2983
3341
|
}, {
|
|
2984
|
-
prepend:
|
|
2985
|
-
default:
|
|
2986
|
-
default:
|
|
3342
|
+
prepend: R(() => [c(P(V), { name: "mdi-table-column-plus-before" })]),
|
|
3343
|
+
default: R(() => [c(p, null, {
|
|
3344
|
+
default: R(() => [s(A(P(d)("TableAddColumnBefore")), 1)]),
|
|
2987
3345
|
_: 1
|
|
2988
3346
|
})]),
|
|
2989
3347
|
_: 1
|
|
@@ -2995,9 +3353,9 @@ var An = { class: "rtf-toolbar-group" }, jn = { class: "d-flex justify-end ga-2
|
|
|
2995
3353
|
return (t = f.value) == null ? void 0 : t.chain().focus().addColumnAfter().run();
|
|
2996
3354
|
})
|
|
2997
3355
|
}, {
|
|
2998
|
-
prepend:
|
|
2999
|
-
default:
|
|
3000
|
-
default:
|
|
3356
|
+
prepend: R(() => [c(P(V), { name: "mdi-table-column-plus-after" })]),
|
|
3357
|
+
default: R(() => [c(p, null, {
|
|
3358
|
+
default: R(() => [s(A(P(d)("TableAddColumnAfter")), 1)]),
|
|
3001
3359
|
_: 1
|
|
3002
3360
|
})]),
|
|
3003
3361
|
_: 1
|
|
@@ -3009,9 +3367,9 @@ var An = { class: "rtf-toolbar-group" }, jn = { class: "d-flex justify-end ga-2
|
|
|
3009
3367
|
return (t = f.value) == null ? void 0 : t.chain().focus().deleteColumn().run();
|
|
3010
3368
|
})
|
|
3011
3369
|
}, {
|
|
3012
|
-
prepend:
|
|
3013
|
-
default:
|
|
3014
|
-
default:
|
|
3370
|
+
prepend: R(() => [c(P(V), { name: "mdi-table-column-remove" })]),
|
|
3371
|
+
default: R(() => [c(p, null, {
|
|
3372
|
+
default: R(() => [s(A(P(d)("TableDeleteColumn")), 1)]),
|
|
3015
3373
|
_: 1
|
|
3016
3374
|
})]),
|
|
3017
3375
|
_: 1
|
|
@@ -3024,9 +3382,9 @@ var An = { class: "rtf-toolbar-group" }, jn = { class: "d-flex justify-end ga-2
|
|
|
3024
3382
|
return (t = f.value) == null ? void 0 : t.chain().focus().toggleHeaderRow().run();
|
|
3025
3383
|
})
|
|
3026
3384
|
}, {
|
|
3027
|
-
prepend:
|
|
3028
|
-
default:
|
|
3029
|
-
default:
|
|
3385
|
+
prepend: R(() => [c(P(V), { name: "mdi-table-row" })]),
|
|
3386
|
+
default: R(() => [c(p, null, {
|
|
3387
|
+
default: R(() => [s(A(P(d)("TableToggleHeaderRow")), 1)]),
|
|
3030
3388
|
_: 1
|
|
3031
3389
|
})]),
|
|
3032
3390
|
_: 1
|
|
@@ -3038,9 +3396,9 @@ var An = { class: "rtf-toolbar-group" }, jn = { class: "d-flex justify-end ga-2
|
|
|
3038
3396
|
return (t = f.value) == null ? void 0 : t.chain().focus().deleteTable().run();
|
|
3039
3397
|
})
|
|
3040
3398
|
}, {
|
|
3041
|
-
prepend:
|
|
3042
|
-
default:
|
|
3043
|
-
default:
|
|
3399
|
+
prepend: R(() => [c(P(V), { name: "mdi-table-remove" })]),
|
|
3400
|
+
default: R(() => [c(p, null, {
|
|
3401
|
+
default: R(() => [s(A(P(d)("TableDeleteTable")), 1)]),
|
|
3044
3402
|
_: 1
|
|
3045
3403
|
})]),
|
|
3046
3404
|
_: 1
|
|
@@ -3050,16 +3408,16 @@ var An = { class: "rtf-toolbar-group" }, jn = { class: "d-flex justify-end ga-2
|
|
|
3050
3408
|
})]),
|
|
3051
3409
|
_: 1
|
|
3052
3410
|
}),
|
|
3053
|
-
c(u,
|
|
3411
|
+
c(u, g(h.value, {
|
|
3054
3412
|
icon: "",
|
|
3055
|
-
title:
|
|
3413
|
+
title: P(d)("Blockquote"),
|
|
3056
3414
|
active: y.value.blockquote,
|
|
3057
3415
|
onClick: o[16] || (o[16] = (e) => {
|
|
3058
3416
|
var t;
|
|
3059
3417
|
return (t = f.value) == null ? void 0 : t.chain().focus().toggleBlockquote().run();
|
|
3060
3418
|
})
|
|
3061
3419
|
}), {
|
|
3062
|
-
default:
|
|
3420
|
+
default: R(() => [c(P(V), { name: "mdi-format-quote-close" })]),
|
|
3063
3421
|
_: 1
|
|
3064
3422
|
}, 16, ["title", "active"])
|
|
3065
3423
|
]),
|
|
@@ -3068,18 +3426,18 @@ var An = { class: "rtf-toolbar-group" }, jn = { class: "d-flex justify-end ga-2
|
|
|
3068
3426
|
inset: "",
|
|
3069
3427
|
class: "mx-1"
|
|
3070
3428
|
}),
|
|
3071
|
-
c(
|
|
3429
|
+
c(En, g({ actions: P(M) }, _.value, { "show-as-group": "grouped-no-borders" }), null, 16, ["actions"]),
|
|
3072
3430
|
c(l, {
|
|
3073
3431
|
vertical: "",
|
|
3074
3432
|
inset: "",
|
|
3075
3433
|
class: "mx-1"
|
|
3076
3434
|
}),
|
|
3077
|
-
c(
|
|
3435
|
+
c(En, g({ actions: N }, _.value, { "show-as-group": "grouped-no-borders" }), null, 16)
|
|
3078
3436
|
], 2);
|
|
3079
3437
|
};
|
|
3080
3438
|
}
|
|
3081
|
-
}),
|
|
3082
|
-
function
|
|
3439
|
+
}), hr = /^[a-z][a-z0-9]*:[a-z]/i, gr = /mso-[a-z-]+\s*:[^;]+;?/gi, _r = /^Mso/i, vr = /background(?:-color)?\s*:[^;]+;?/gi;
|
|
3440
|
+
function yr(e) {
|
|
3083
3441
|
let t = document.createTreeWalker(e, NodeFilter.SHOW_COMMENT), n = [];
|
|
3084
3442
|
for (let e = t.nextNode(); e; e = t.nextNode()) n.push(e);
|
|
3085
3443
|
n.forEach((e) => {
|
|
@@ -3087,42 +3445,45 @@ function zn(e) {
|
|
|
3087
3445
|
return (t = e.parentNode) == null ? void 0 : t.removeChild(e);
|
|
3088
3446
|
});
|
|
3089
3447
|
}
|
|
3090
|
-
function
|
|
3448
|
+
function br(e) {
|
|
3091
3449
|
let t = e.parentNode;
|
|
3092
3450
|
if (t) {
|
|
3093
3451
|
for (; e.firstChild;) t.insertBefore(e.firstChild, e);
|
|
3094
3452
|
t.removeChild(e);
|
|
3095
3453
|
}
|
|
3096
3454
|
}
|
|
3097
|
-
function
|
|
3455
|
+
function xr(e) {
|
|
3098
3456
|
let t = e.getAttribute("style");
|
|
3099
3457
|
if (t != null) {
|
|
3100
|
-
let n = t.replace(
|
|
3458
|
+
let n = t.replace(gr, "").replace(vr, "").trim();
|
|
3101
3459
|
n ? e.setAttribute("style", n) : e.removeAttribute("style");
|
|
3102
3460
|
}
|
|
3103
3461
|
let n = e.getAttribute("class");
|
|
3104
3462
|
if (n != null) {
|
|
3105
|
-
let t = n.split(/\s+/).filter((e) => e && !
|
|
3463
|
+
let t = n.split(/\s+/).filter((e) => e && !_r.test(e)).join(" ");
|
|
3106
3464
|
t ? e.setAttribute("class", t) : e.removeAttribute("class");
|
|
3107
3465
|
}
|
|
3108
3466
|
e.removeAttribute("lang"), e.removeAttribute("xml:lang"), e.removeAttribute("id"), e.removeAttribute("align"), e.removeAttribute("bgcolor");
|
|
3109
3467
|
}
|
|
3110
|
-
function
|
|
3468
|
+
function Sr(e) {
|
|
3111
3469
|
if (!e || typeof DOMParser > "u") return e;
|
|
3112
3470
|
let t = new DOMParser().parseFromString(e, "text/html").body;
|
|
3113
|
-
return t ? (
|
|
3114
|
-
if (
|
|
3115
|
-
|
|
3471
|
+
return t ? (yr(t), t.querySelectorAll("xml, style, script, meta, link").forEach((e) => e.remove()), Array.from(t.querySelectorAll("*")).forEach((e) => {
|
|
3472
|
+
if (hr.test(e.tagName) || e.tagName === "FONT") {
|
|
3473
|
+
br(e);
|
|
3116
3474
|
return;
|
|
3117
3475
|
}
|
|
3118
|
-
|
|
3476
|
+
xr(e);
|
|
3119
3477
|
}), Array.from(t.querySelectorAll("span, div")).forEach((e) => {
|
|
3120
|
-
e.attributes.length === 0 &&
|
|
3478
|
+
e.attributes.length === 0 && br(e);
|
|
3121
3479
|
}), t.innerHTML) : e;
|
|
3122
3480
|
}
|
|
3123
3481
|
//#endregion
|
|
3124
3482
|
//#region src/helpers/rtf-editor/editor-core.vue?vue&type=script&setup=true&lang.ts
|
|
3125
|
-
var
|
|
3483
|
+
var Cr = { class: "editor-container" }, wr = {
|
|
3484
|
+
key: 2,
|
|
3485
|
+
class: "editor-container__editor"
|
|
3486
|
+
}, Tr = { class: "rtf-bubble-menu" }, Er = /* @__PURE__ */ l({
|
|
3126
3487
|
__name: "editor-core",
|
|
3127
3488
|
props: {
|
|
3128
3489
|
modelValue: { default: "" },
|
|
@@ -3136,29 +3497,36 @@ var Un = { class: "editor-container" }, Wn = { class: "rtf-bubble-menu" }, Gn =
|
|
|
3136
3497
|
},
|
|
3137
3498
|
emits: ["update:modelValue"],
|
|
3138
3499
|
setup(e, { emit: o }) {
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3500
|
+
ee((e) => ({
|
|
3501
|
+
a2b42c4a: e.fontFamily,
|
|
3502
|
+
v6b6187d1: e.minHeight
|
|
3142
3503
|
}));
|
|
3143
|
-
let s = e, l = o, u =
|
|
3144
|
-
|
|
3504
|
+
let s = e, l = o, u = w(null);
|
|
3505
|
+
function d(e) {
|
|
3506
|
+
u.value = e;
|
|
3507
|
+
}
|
|
3508
|
+
let f = On(), p = t(() => {
|
|
3145
3509
|
var e;
|
|
3146
|
-
|
|
3147
|
-
|
|
3510
|
+
return Ut(new It((e = s.modelValue) == null ? "" : e));
|
|
3511
|
+
}), m = dn(), h;
|
|
3512
|
+
I(u, (e) => {
|
|
3513
|
+
h == null || h.disconnect();
|
|
3514
|
+
let t = e == null ? void 0 : e.$el, n = t == null ? void 0 : t.closest(".v-field");
|
|
3515
|
+
!t || !n || (h = new ResizeObserver(([e]) => {
|
|
3148
3516
|
n.style.setProperty("--rtf-toolbar-height", `${e.contentRect.height}px`);
|
|
3149
|
-
}),
|
|
3150
|
-
}),
|
|
3151
|
-
let
|
|
3517
|
+
}), h.observe(t));
|
|
3518
|
+
}, { flush: "post" }), x(() => h == null ? void 0 : h.disconnect());
|
|
3519
|
+
let _ = Ee({
|
|
3152
3520
|
content: s.modelValue,
|
|
3153
3521
|
editable: !s.disabled,
|
|
3154
3522
|
extensions: [
|
|
3155
|
-
|
|
3156
|
-
|
|
3523
|
+
we.configure({ link: !1 }),
|
|
3524
|
+
or.configure({
|
|
3157
3525
|
openOnClick: !1,
|
|
3158
3526
|
autolink: !0,
|
|
3159
3527
|
defaultProtocol: "https"
|
|
3160
3528
|
}),
|
|
3161
|
-
|
|
3529
|
+
ge.configure({
|
|
3162
3530
|
inline: !0,
|
|
3163
3531
|
allowBase64: !0,
|
|
3164
3532
|
resize: {
|
|
@@ -3177,119 +3545,120 @@ var Un = { class: "editor-container" }, Wn = { class: "rtf-bubble-menu" }, Gn =
|
|
|
3177
3545
|
minHeight: 24
|
|
3178
3546
|
}
|
|
3179
3547
|
}),
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
Ce,
|
|
3183
|
-
Se,
|
|
3548
|
+
Se.configure({ types: ["heading", "paragraph"] }),
|
|
3549
|
+
ve.configure({ resizable: !0 }),
|
|
3184
3550
|
xe,
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3551
|
+
be,
|
|
3552
|
+
ye,
|
|
3553
|
+
_e.configure({ placeholder: "" }),
|
|
3554
|
+
Gn,
|
|
3555
|
+
qn,
|
|
3556
|
+
Jn,
|
|
3557
|
+
cr
|
|
3190
3558
|
],
|
|
3191
3559
|
editorProps: {
|
|
3192
3560
|
attributes: { class: "rtf-content" },
|
|
3193
|
-
transformPastedHTML: (e) =>
|
|
3194
|
-
handlePaste:
|
|
3561
|
+
transformPastedHTML: (e) => Sr(e),
|
|
3562
|
+
handlePaste: ar(() => _.value)
|
|
3195
3563
|
},
|
|
3196
3564
|
onUpdate: ({ editor: e }) => {
|
|
3197
3565
|
l("update:modelValue", e.isEmpty ? "" : e.getHTML());
|
|
3198
3566
|
}
|
|
3199
3567
|
});
|
|
3200
|
-
|
|
3201
|
-
let t =
|
|
3568
|
+
I(() => s.modelValue, (e) => {
|
|
3569
|
+
let t = _.value;
|
|
3202
3570
|
if (!t) return;
|
|
3203
3571
|
let n = e == null ? "" : e;
|
|
3204
3572
|
n !== t.getHTML() && t.commands.setContent(n, { emitUpdate: !1 });
|
|
3205
|
-
}),
|
|
3573
|
+
}), I(() => s.disabled, (e) => {
|
|
3206
3574
|
var t;
|
|
3207
|
-
return (t =
|
|
3208
|
-
}),
|
|
3209
|
-
let
|
|
3575
|
+
return (t = _.value) == null ? void 0 : t.setEditable(!e, !1);
|
|
3576
|
+
}), I(_, (e) => e == null ? void 0 : e.setEditable(!s.disabled, !1));
|
|
3577
|
+
let v = {
|
|
3210
3578
|
icon: !0,
|
|
3211
3579
|
size: "small",
|
|
3212
3580
|
density: "comfortable",
|
|
3213
3581
|
variant: "text"
|
|
3214
|
-
},
|
|
3582
|
+
}, y = lr(_), b = t(() => {
|
|
3215
3583
|
var e, t, n, r, i;
|
|
3216
|
-
return
|
|
3217
|
-
bold: !!((e =
|
|
3218
|
-
italic: !!((t =
|
|
3219
|
-
link: !!((n =
|
|
3220
|
-
bulletList: !!((r =
|
|
3221
|
-
orderedList: !!((i =
|
|
3584
|
+
return y.value, {
|
|
3585
|
+
bold: !!((e = _.value) != null && e.isActive("bold")),
|
|
3586
|
+
italic: !!((t = _.value) != null && t.isActive("italic")),
|
|
3587
|
+
link: !!((n = _.value) != null && n.isActive("link")),
|
|
3588
|
+
bulletList: !!((r = _.value) != null && r.isActive("bulletList")),
|
|
3589
|
+
orderedList: !!((i = _.value) != null && i.isActive("orderedList"))
|
|
3222
3590
|
};
|
|
3223
3591
|
});
|
|
3224
|
-
function
|
|
3225
|
-
return !e.selection.empty && !(e.selection instanceof
|
|
3592
|
+
function S({ state: e }) {
|
|
3593
|
+
return !e.selection.empty && !(e.selection instanceof Ce);
|
|
3226
3594
|
}
|
|
3227
|
-
function
|
|
3595
|
+
function T(e) {
|
|
3228
3596
|
var t;
|
|
3229
|
-
(t =
|
|
3597
|
+
(t = _.value) == null || t.chain().focus()[e]().run();
|
|
3230
3598
|
}
|
|
3231
|
-
function
|
|
3232
|
-
let e =
|
|
3599
|
+
function E() {
|
|
3600
|
+
let e = _.value;
|
|
3233
3601
|
if (!e) return;
|
|
3234
3602
|
if (e.isActive("link")) {
|
|
3235
3603
|
e.chain().focus().unsetLink().run();
|
|
3236
3604
|
return;
|
|
3237
3605
|
}
|
|
3238
|
-
let t = window.prompt(
|
|
3606
|
+
let t = window.prompt(m("LinkUrl"));
|
|
3239
3607
|
t && e.chain().focus().extendMarkRange("link").setLink({ href: t }).run();
|
|
3240
3608
|
}
|
|
3241
3609
|
return (t, o) => {
|
|
3242
|
-
let s =
|
|
3243
|
-
return
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
ref:
|
|
3247
|
-
editor:
|
|
3610
|
+
let s = D("v-btn");
|
|
3611
|
+
return C(), i("div", Cr, [
|
|
3612
|
+
P(f) ? (C(), n(mr, {
|
|
3613
|
+
key: 0,
|
|
3614
|
+
ref: d,
|
|
3615
|
+
editor: P(_),
|
|
3248
3616
|
"button-size": e.toolbarButtonSize
|
|
3249
|
-
}, null, 8, ["editor", "button-size"]),
|
|
3250
|
-
|
|
3617
|
+
}, null, 8, ["editor", "button-size"])) : r("", !0),
|
|
3618
|
+
P(f) ? (C(), n(P(Te), {
|
|
3619
|
+
key: 1,
|
|
3251
3620
|
class: "editor-container__editor",
|
|
3252
|
-
editor:
|
|
3253
|
-
}, null, 8, ["editor"]),
|
|
3254
|
-
|
|
3255
|
-
key:
|
|
3256
|
-
editor:
|
|
3257
|
-
"should-show":
|
|
3621
|
+
editor: P(_)
|
|
3622
|
+
}, null, 8, ["editor"])) : (C(), i("div", wr, A(p.value), 1)),
|
|
3623
|
+
P(_) ? (C(), n(P(De), {
|
|
3624
|
+
key: 3,
|
|
3625
|
+
editor: P(_),
|
|
3626
|
+
"should-show": S
|
|
3258
3627
|
}, {
|
|
3259
|
-
default:
|
|
3260
|
-
c(s,
|
|
3261
|
-
active:
|
|
3262
|
-
onClick: o[0] || (o[0] = (e) =>
|
|
3628
|
+
default: R(() => [a("div", Tr, [
|
|
3629
|
+
c(s, g(v, {
|
|
3630
|
+
active: b.value.bold,
|
|
3631
|
+
onClick: o[0] || (o[0] = (e) => T("toggleBold"))
|
|
3263
3632
|
}), {
|
|
3264
|
-
default:
|
|
3633
|
+
default: R(() => [c(P(V), { name: "mdi-format-bold" })]),
|
|
3265
3634
|
_: 1
|
|
3266
3635
|
}, 16, ["active"]),
|
|
3267
|
-
c(s,
|
|
3268
|
-
active:
|
|
3269
|
-
onClick: o[1] || (o[1] = (e) =>
|
|
3636
|
+
c(s, g(v, {
|
|
3637
|
+
active: b.value.italic,
|
|
3638
|
+
onClick: o[1] || (o[1] = (e) => T("toggleItalic"))
|
|
3270
3639
|
}), {
|
|
3271
|
-
default:
|
|
3640
|
+
default: R(() => [c(P(V), { name: "mdi-format-italic" })]),
|
|
3272
3641
|
_: 1
|
|
3273
3642
|
}, 16, ["active"]),
|
|
3274
|
-
c(s,
|
|
3275
|
-
active:
|
|
3276
|
-
onClick:
|
|
3643
|
+
c(s, g(v, {
|
|
3644
|
+
active: b.value.link,
|
|
3645
|
+
onClick: E
|
|
3277
3646
|
}), {
|
|
3278
|
-
default:
|
|
3647
|
+
default: R(() => [c(P(V), { name: "mdi-link-variant" })]),
|
|
3279
3648
|
_: 1
|
|
3280
3649
|
}, 16, ["active"]),
|
|
3281
|
-
c(s,
|
|
3282
|
-
active:
|
|
3283
|
-
onClick: o[2] || (o[2] = (e) =>
|
|
3650
|
+
c(s, g(v, {
|
|
3651
|
+
active: b.value.bulletList,
|
|
3652
|
+
onClick: o[2] || (o[2] = (e) => T("toggleBulletList"))
|
|
3284
3653
|
}), {
|
|
3285
|
-
default:
|
|
3654
|
+
default: R(() => [c(P(V), { name: "mdi-format-list-bulleted" })]),
|
|
3286
3655
|
_: 1
|
|
3287
3656
|
}, 16, ["active"]),
|
|
3288
|
-
c(s,
|
|
3289
|
-
active:
|
|
3290
|
-
onClick: o[3] || (o[3] = (e) =>
|
|
3657
|
+
c(s, g(v, {
|
|
3658
|
+
active: b.value.orderedList,
|
|
3659
|
+
onClick: o[3] || (o[3] = (e) => T("toggleOrderedList"))
|
|
3291
3660
|
}), {
|
|
3292
|
-
default:
|
|
3661
|
+
default: R(() => [c(P(V), { name: "mdi-format-list-numbered" })]),
|
|
3293
3662
|
_: 1
|
|
3294
3663
|
}, 16, ["active"])
|
|
3295
3664
|
])]),
|
|
@@ -3298,9 +3667,9 @@ var Un = { class: "editor-container" }, Wn = { class: "rtf-bubble-menu" }, Gn =
|
|
|
3298
3667
|
]);
|
|
3299
3668
|
};
|
|
3300
3669
|
}
|
|
3301
|
-
}),
|
|
3670
|
+
}), Dr = /* @__PURE__ */ l({
|
|
3302
3671
|
__name: "df-rtf-editor",
|
|
3303
|
-
props: /*@__PURE__*/
|
|
3672
|
+
props: /*@__PURE__*/ h({
|
|
3304
3673
|
minHeight: {},
|
|
3305
3674
|
toolbarButtonSize: {},
|
|
3306
3675
|
fontFamily: {},
|
|
@@ -3318,18 +3687,17 @@ var Un = { class: "editor-container" }, Wn = { class: "rtf-bubble-menu" }, Gn =
|
|
|
3318
3687
|
passthroughAttrs: {},
|
|
3319
3688
|
density: {},
|
|
3320
3689
|
variant: {}
|
|
3321
|
-
},
|
|
3690
|
+
}, Z(Z({}, en), {}, { minHeight: void 0 })),
|
|
3322
3691
|
emits: ["update:modelValue", "click:clear"],
|
|
3323
3692
|
setup(e, { emit: t }) {
|
|
3324
|
-
let r = e, { densityClass: i, value: a, vuetifyBindings: o } =
|
|
3325
|
-
return (t, s) => (
|
|
3326
|
-
default:
|
|
3327
|
-
|
|
3328
|
-
modelValue:
|
|
3329
|
-
"onUpdate:modelValue": s[0] || (s[0] = (e) => f(a) ? a.value = e : null),
|
|
3693
|
+
let r = e, { densityClass: i, value: a, vuetifyBindings: o } = tn(r, t);
|
|
3694
|
+
return (t, s) => (C(), n(P(rn), g(r, { class: ["rtf-editor", P(i)] }), {
|
|
3695
|
+
default: R((t) => [c(Er, g({
|
|
3696
|
+
modelValue: P(a),
|
|
3697
|
+
"onUpdate:modelValue": s[0] || (s[0] = (e) => m(a) ? a.value = e : null),
|
|
3330
3698
|
class: { "mt-6": !!e.label },
|
|
3331
3699
|
"min-height": e.minHeight,
|
|
3332
|
-
disabled:
|
|
3700
|
+
disabled: P(o).disabled,
|
|
3333
3701
|
"toolbar-button-size": e.toolbarButtonSize,
|
|
3334
3702
|
"font-family": e.fontFamily
|
|
3335
3703
|
}, e.passthroughAttrs, {
|
|
@@ -3351,48 +3719,48 @@ var Un = { class: "editor-container" }, Wn = { class: "rtf-bubble-menu" }, Gn =
|
|
|
3351
3719
|
});
|
|
3352
3720
|
//#endregion
|
|
3353
3721
|
//#region src/helpers/df-select.helper.ts
|
|
3354
|
-
function
|
|
3722
|
+
function Or(e) {
|
|
3355
3723
|
return e.map((e) => ({
|
|
3356
3724
|
value: e.id,
|
|
3357
3725
|
title: e.text,
|
|
3358
3726
|
icon: e.icon
|
|
3359
3727
|
}));
|
|
3360
3728
|
}
|
|
3361
|
-
function
|
|
3729
|
+
function kr(e, t) {
|
|
3362
3730
|
var n;
|
|
3363
|
-
return e == null ||
|
|
3731
|
+
return e == null || ae(e) && e.length === 0 ? null : t ? ne(e) : ae(e) ? (n = ie(e)) == null ? null : n : e;
|
|
3364
3732
|
}
|
|
3365
|
-
function
|
|
3733
|
+
function Ar(e, t) {
|
|
3366
3734
|
if (t == null) return [];
|
|
3367
|
-
let n =
|
|
3735
|
+
let n = ne(t);
|
|
3368
3736
|
return e.filter((e) => n.some((t) => t === e.id));
|
|
3369
3737
|
}
|
|
3370
|
-
function
|
|
3371
|
-
let a =
|
|
3738
|
+
function jr(e, t, n, r, i) {
|
|
3739
|
+
let a = kr(e, n);
|
|
3372
3740
|
if (a == null) {
|
|
3373
3741
|
t.value = n ? [] : null;
|
|
3374
3742
|
return;
|
|
3375
3743
|
}
|
|
3376
|
-
if (n) t.value = r ? a :
|
|
3744
|
+
if (n) t.value = r ? a : Ar(i, a).map((e) => e.id);
|
|
3377
3745
|
else if (r) t.value = a;
|
|
3378
3746
|
else {
|
|
3379
3747
|
var o;
|
|
3380
|
-
let e =
|
|
3748
|
+
let e = ie(Ar(i, a));
|
|
3381
3749
|
t.value = (o = e == null ? void 0 : e.id) == null ? null : o;
|
|
3382
3750
|
}
|
|
3383
3751
|
}
|
|
3384
3752
|
//#endregion
|
|
3385
3753
|
//#region src/df-select.vue?vue&type=script&setup=true&lang.ts
|
|
3386
|
-
var
|
|
3754
|
+
var Mr = {
|
|
3387
3755
|
key: 0,
|
|
3388
3756
|
class: "me-1"
|
|
3389
|
-
},
|
|
3757
|
+
}, Nr = /*#__PURE__*/ ((e, t) => {
|
|
3390
3758
|
let n = e.__vccOpts || e;
|
|
3391
3759
|
for (let [e, r] of t) n[e] = r;
|
|
3392
3760
|
return n;
|
|
3393
3761
|
})(/* @__PURE__ */ l({
|
|
3394
3762
|
__name: "df-select",
|
|
3395
|
-
props: /*@__PURE__*/
|
|
3763
|
+
props: /*@__PURE__*/ h({
|
|
3396
3764
|
choices: {},
|
|
3397
3765
|
multiple: { type: Boolean },
|
|
3398
3766
|
allowTags: { type: Boolean },
|
|
@@ -3412,7 +3780,7 @@ var Xn = {
|
|
|
3412
3780
|
passthroughAttrs: {},
|
|
3413
3781
|
density: {},
|
|
3414
3782
|
variant: {}
|
|
3415
|
-
},
|
|
3783
|
+
}, Z(Z({}, en), {}, {
|
|
3416
3784
|
choices: void 0,
|
|
3417
3785
|
multiple: !1,
|
|
3418
3786
|
allowTags: !1,
|
|
@@ -3426,202 +3794,232 @@ var Xn = {
|
|
|
3426
3794
|
],
|
|
3427
3795
|
setup(e, { emit: s }) {
|
|
3428
3796
|
var l;
|
|
3429
|
-
let
|
|
3430
|
-
(l = f.value) != null && l.length &&
|
|
3431
|
-
function
|
|
3432
|
-
|
|
3433
|
-
}
|
|
3434
|
-
let
|
|
3435
|
-
function
|
|
3436
|
-
|
|
3797
|
+
let u = e, { choices: f, multiple: p, allowTags: m, allowNull: h, cssClass: b } = M(u), x = s, S = w(null), { densityClass: T, isRendered: k, label: j, shownErrors: N, touched: ee, value: F, visibilityClass: L, vuetifyBindings: z } = tn(u, x), B = On(), H = w(null), U = w(!1), te = w([]), W = t(() => P(U) ? P(te) : P(f) || []), G = t(() => Or(W.value)), re = t(() => Ar(W.value, kr(F.value, p.value)).map((e) => e.text).join(", ")), ie = w(null), ae = w(0), K = w(!1), q = w(0), se = w(0), ce = t(() => se.value > 0 || q.value > 0);
|
|
3798
|
+
(l = f.value) != null && l.length && u.fetchChoices !== void 0 && console.warn("Both choices and fetchChoices are set. Only one of them should be set.");
|
|
3799
|
+
function le(e) {
|
|
3800
|
+
x("update:modelValueDisplay", Ar(W.value, e));
|
|
3801
|
+
}
|
|
3802
|
+
let J = w(!1);
|
|
3803
|
+
function Y(e) {
|
|
3804
|
+
J.value = !0;
|
|
3437
3805
|
try {
|
|
3438
|
-
|
|
3806
|
+
F.value = e;
|
|
3439
3807
|
} finally {
|
|
3440
|
-
|
|
3441
|
-
let t =
|
|
3442
|
-
|
|
3808
|
+
_(() => {
|
|
3809
|
+
let t = kr(F.value, p.value);
|
|
3810
|
+
oe(t, e) || jr(t, H, p.value, m.value, W.value), J.value = !1;
|
|
3443
3811
|
});
|
|
3444
3812
|
}
|
|
3445
3813
|
}
|
|
3446
|
-
function
|
|
3814
|
+
function de(e) {
|
|
3447
3815
|
if (!e) return 0;
|
|
3448
3816
|
let t = e.getBoundingClientRect(), n = window.getComputedStyle(e);
|
|
3449
3817
|
return t.width + parseFloat(n.marginLeft) + parseFloat(n.marginRight);
|
|
3450
3818
|
}
|
|
3451
|
-
function
|
|
3452
|
-
if (p.value &&
|
|
3819
|
+
function fe() {
|
|
3820
|
+
if (p.value && h.value && H.value != null && H.value.length > 0 && S.value) {
|
|
3453
3821
|
var e;
|
|
3454
|
-
let t =
|
|
3822
|
+
let t = S.value.$el, n = (e = t.querySelector(".v-input__control")) == null ? void 0 : e.clientWidth, r = t.querySelector(".v-field__input"), i = r.querySelectorAll(".v-autocomplete__selection, .v-combobox__selection"), a = window.getComputedStyle(r), o = parseFloat(a.paddingLeft) + parseFloat(a.paddingRight);
|
|
3455
3823
|
i.forEach((e) => {
|
|
3456
|
-
o +=
|
|
3824
|
+
o += de(e);
|
|
3457
3825
|
});
|
|
3458
|
-
let s =
|
|
3459
|
-
|
|
3460
|
-
} else
|
|
3826
|
+
let s = de(t.querySelector(".v-field .v-field__clearable")), c = de(t.querySelector(".v-field .v-field__append-inner"));
|
|
3827
|
+
K.value = n - o - i.length * 2 - c < s;
|
|
3828
|
+
} else K.value = !1;
|
|
3461
3829
|
}
|
|
3462
|
-
function
|
|
3830
|
+
function pe(e) {
|
|
3463
3831
|
let t = e.target;
|
|
3464
3832
|
t instanceof HTMLElement && t.closest(".v-chip__close") && (e.stopPropagation(), e.preventDefault());
|
|
3465
3833
|
}
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
let t =
|
|
3469
|
-
|
|
3834
|
+
I(H, (e) => {
|
|
3835
|
+
z.value.readonly || q.value > 0 || _(() => {
|
|
3836
|
+
let t = kr(e, p.value);
|
|
3837
|
+
le(t), Y(t);
|
|
3470
3838
|
});
|
|
3471
|
-
}, { deep: !0 }),
|
|
3472
|
-
if (
|
|
3473
|
-
let t =
|
|
3474
|
-
|
|
3475
|
-
|
|
3839
|
+
}, { deep: !0 }), I(F, (e) => {
|
|
3840
|
+
if (J.value) return;
|
|
3841
|
+
let t = kr(e, p.value), n = ye(t);
|
|
3842
|
+
jr(t, H, p.value, !1, W.value), n == null || n.then(() => {
|
|
3843
|
+
oe(kr(F.value, p.value), t) && jr(t, H, p.value, !1, W.value);
|
|
3476
3844
|
});
|
|
3477
|
-
}, { deep: !0 }),
|
|
3478
|
-
|
|
3845
|
+
}, { deep: !0 }), I(J, () => {
|
|
3846
|
+
J.value || fe();
|
|
3479
3847
|
});
|
|
3480
|
-
function
|
|
3481
|
-
|
|
3848
|
+
function me() {
|
|
3849
|
+
ie.value != null && ie.value.length > 0 && (ie.value = null, _e());
|
|
3482
3850
|
}
|
|
3483
|
-
function
|
|
3484
|
-
if (
|
|
3485
|
-
let e =
|
|
3486
|
-
|
|
3851
|
+
function he() {
|
|
3852
|
+
if (me(), z.value.readonly || m.value) return;
|
|
3853
|
+
let e = kr(H.value, p.value);
|
|
3854
|
+
jr(e, H, p.value, !1, W.value), Y(e);
|
|
3487
3855
|
}
|
|
3488
|
-
function
|
|
3489
|
-
if (e.stopPropagation(),
|
|
3490
|
-
|
|
3856
|
+
function ge(e, t) {
|
|
3857
|
+
if (e.stopPropagation(), z.value.readonly || m.value) {
|
|
3858
|
+
m.value && (H.value = H.value.filter((e) => e !== t));
|
|
3491
3859
|
return;
|
|
3492
3860
|
}
|
|
3493
3861
|
let n;
|
|
3494
|
-
n = p.value && Array.isArray(
|
|
3862
|
+
n = p.value && Array.isArray(H.value) ? kr(H.value.filter((e) => e !== t), p.value) : null, jr(n, H, p.value, !1, W.value), Y(n);
|
|
3495
3863
|
}
|
|
3496
|
-
function
|
|
3497
|
-
return
|
|
3864
|
+
function _e(e, t) {
|
|
3865
|
+
return ve.apply(this, arguments);
|
|
3498
3866
|
}
|
|
3499
|
-
function
|
|
3500
|
-
return
|
|
3501
|
-
if (
|
|
3867
|
+
function ve() {
|
|
3868
|
+
return ve = Fn(function* (e, t) {
|
|
3869
|
+
if (z.value.readonly || (ie.value = e, f.value || u.fetchChoices === void 0)) return;
|
|
3502
3870
|
let n = ++ae.value;
|
|
3503
|
-
|
|
3871
|
+
se.value++;
|
|
3504
3872
|
try {
|
|
3505
|
-
let r = yield
|
|
3873
|
+
let r = yield u.fetchChoices(e, t);
|
|
3506
3874
|
if (n !== ae.value) return;
|
|
3507
|
-
let i =
|
|
3508
|
-
|
|
3875
|
+
let i = Ar(W.value, kr(F.value, p.value));
|
|
3876
|
+
te.value = ue([...i, ...r], "id"), U.value = !0;
|
|
3877
|
+
} catch (e) {
|
|
3878
|
+
console.error(e);
|
|
3509
3879
|
} finally {
|
|
3510
|
-
|
|
3880
|
+
se.value--;
|
|
3511
3881
|
}
|
|
3512
|
-
}),
|
|
3882
|
+
}), ve.apply(this, arguments);
|
|
3513
3883
|
}
|
|
3514
|
-
function
|
|
3515
|
-
let t =
|
|
3516
|
-
if (t === void 0 ||
|
|
3517
|
-
let n =
|
|
3518
|
-
return n.length ? (
|
|
3884
|
+
function ye(e) {
|
|
3885
|
+
let t = u.fetchChoices;
|
|
3886
|
+
if (t === void 0 || m.value || e == null) return null;
|
|
3887
|
+
let n = ne(e).filter((e) => !W.value.some((t) => t.id === e));
|
|
3888
|
+
return n.length ? (q.value++, Fn(function* () {
|
|
3519
3889
|
try {
|
|
3520
3890
|
let e = yield t(void 0, p.value ? n : n[0]);
|
|
3521
|
-
|
|
3891
|
+
te.value = ue([...W.value, ...e], "id"), U.value = !0;
|
|
3892
|
+
} catch (e) {
|
|
3893
|
+
console.error(e);
|
|
3522
3894
|
} finally {
|
|
3523
|
-
|
|
3895
|
+
q.value--;
|
|
3524
3896
|
}
|
|
3525
3897
|
})()) : null;
|
|
3526
3898
|
}
|
|
3527
|
-
function
|
|
3528
|
-
let e =
|
|
3529
|
-
!
|
|
3899
|
+
function be() {
|
|
3900
|
+
let e = z.value.readonly, t = F.value;
|
|
3901
|
+
!e && !h.value && t == null && G.value.length && (t = G.value[0].value), t = kr(t, p.value), jr(t, H, p.value, m.value, W.value), !(q.value > 0) && (le(t), e || Y(t));
|
|
3530
3902
|
}
|
|
3531
|
-
let Se = null;
|
|
3532
|
-
if (
|
|
3903
|
+
let xe = typeof window < "u", Se = null;
|
|
3904
|
+
if (u.fetchChoices !== void 0 && xe) {
|
|
3533
3905
|
var Ce;
|
|
3534
|
-
Se = (Ce =
|
|
3906
|
+
Se = (Ce = ye(kr(F.value, p.value))) == null ? _e(void 0, F.value) : Ce;
|
|
3535
3907
|
}
|
|
3536
|
-
return xe(), Se == null || Se.then(() => {
|
|
3537
|
-
|
|
3908
|
+
return (xe || u.fetchChoices === void 0) && be(), Se == null || Se.then(() => {
|
|
3909
|
+
be();
|
|
3910
|
+
}), I(() => z.value.readonly, (e) => {
|
|
3911
|
+
e || be();
|
|
3538
3912
|
}), (e, t) => {
|
|
3539
|
-
|
|
3540
|
-
|
|
3913
|
+
var s, l;
|
|
3914
|
+
let u = D("v-text-field"), f = D("v-chip"), _ = D("v-list-item");
|
|
3915
|
+
return P(k) && !P(B) ? (C(), n(u, g({
|
|
3541
3916
|
key: 0,
|
|
3917
|
+
class: [
|
|
3918
|
+
P(b),
|
|
3919
|
+
P(T),
|
|
3920
|
+
P(L)
|
|
3921
|
+
],
|
|
3922
|
+
"model-value": re.value
|
|
3923
|
+
}, P(z), { readonly: "" }), {
|
|
3924
|
+
label: R((e) => [c(P($), {
|
|
3925
|
+
data: e,
|
|
3926
|
+
label: P(j)
|
|
3927
|
+
}, null, 8, ["data", "label"])]),
|
|
3928
|
+
message: R(({ message: e }) => [c(P(Q), {
|
|
3929
|
+
message: e,
|
|
3930
|
+
errors: P(N)
|
|
3931
|
+
}, null, 8, ["message", "errors"])]),
|
|
3932
|
+
_: 1
|
|
3933
|
+
}, 16, ["class", "model-value"])) : P(k) ? (C(), n(O(P(m) ? "v-combobox" : "v-autocomplete"), g({
|
|
3934
|
+
key: 1,
|
|
3542
3935
|
ref_key: "dfSelectRef",
|
|
3543
|
-
ref:
|
|
3544
|
-
modelValue:
|
|
3545
|
-
"onUpdate:modelValue": t[0] || (t[0] = (e) =>
|
|
3936
|
+
ref: S,
|
|
3937
|
+
modelValue: H.value,
|
|
3938
|
+
"onUpdate:modelValue": t[0] || (t[0] = (e) => H.value = e),
|
|
3546
3939
|
class: [
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
|
|
3550
|
-
{
|
|
3940
|
+
P(b),
|
|
3941
|
+
P(T),
|
|
3942
|
+
P(L),
|
|
3943
|
+
{
|
|
3944
|
+
"df-select-multirow": K.value,
|
|
3945
|
+
"df-select-single": !P(p)
|
|
3946
|
+
}
|
|
3551
3947
|
],
|
|
3552
|
-
|
|
3948
|
+
style: { "--df-select-search-width": `${((s = (l = ie.value) == null ? void 0 : l.length) == null ? 0 : s) + 1}ch` },
|
|
3949
|
+
items: G.value,
|
|
3553
3950
|
"return-object": !1,
|
|
3554
3951
|
chips: "",
|
|
3555
3952
|
"auto-select-first": !0,
|
|
3556
|
-
"closable-chips":
|
|
3557
|
-
clearable:
|
|
3558
|
-
multiple:
|
|
3953
|
+
"closable-chips": P(h) || P(p) && H.value.length > 1,
|
|
3954
|
+
clearable: P(h),
|
|
3955
|
+
multiple: P(p),
|
|
3559
3956
|
loading: ce.value,
|
|
3560
3957
|
"hide-selected": !1,
|
|
3561
|
-
"aria-describedby":
|
|
3958
|
+
"aria-describedby": P(z).helpText ? `${P(z).name}-help` : null,
|
|
3562
3959
|
"menu-props": { maxHeight: "400" },
|
|
3563
|
-
search:
|
|
3564
|
-
},
|
|
3565
|
-
"onUpdate:search": t[1] || (t[1] = (e) =>
|
|
3566
|
-
"onUpdate:modelValue":
|
|
3567
|
-
"onClick:clear": t[2] || (t[2] = (e) =>
|
|
3568
|
-
onBlur: t[3] || (t[3] = (e) =>
|
|
3569
|
-
onMousedownCapture: t[4] || (t[4] = (e) =>
|
|
3960
|
+
search: ie.value
|
|
3961
|
+
}, P(z), {
|
|
3962
|
+
"onUpdate:search": t[1] || (t[1] = (e) => _e(e, void 0)),
|
|
3963
|
+
"onUpdate:modelValue": he,
|
|
3964
|
+
"onClick:clear": t[2] || (t[2] = (e) => H.value = null),
|
|
3965
|
+
onBlur: t[3] || (t[3] = (e) => ee.value = !0),
|
|
3966
|
+
onMousedownCapture: t[4] || (t[4] = (e) => pe(e))
|
|
3570
3967
|
}), o({
|
|
3571
|
-
chip:
|
|
3968
|
+
chip: R(({ item: e }) => [(C(), n(f, {
|
|
3572
3969
|
key: e.value,
|
|
3573
3970
|
label: "",
|
|
3574
3971
|
size: "small",
|
|
3575
3972
|
class: "d-flex align-middle",
|
|
3576
|
-
variant:
|
|
3577
|
-
closable:
|
|
3578
|
-
"onClick:close": (t) =>
|
|
3973
|
+
variant: P(p) ? "tonal" : "text",
|
|
3974
|
+
closable: P(p),
|
|
3975
|
+
"onClick:close": (t) => ge(t, e.value)
|
|
3579
3976
|
}, {
|
|
3580
|
-
prepend:
|
|
3977
|
+
prepend: R(() => {
|
|
3581
3978
|
var t;
|
|
3582
|
-
return [(t = e.raw) != null && t.icon ? (
|
|
3979
|
+
return [(t = e.raw) != null && t.icon ? (C(), n(P(V), {
|
|
3583
3980
|
key: 0,
|
|
3584
3981
|
class: "me-1",
|
|
3585
3982
|
name: e.raw.icon
|
|
3586
3983
|
}, null, 8, ["name"])) : r("", !0)];
|
|
3587
3984
|
}),
|
|
3588
|
-
default:
|
|
3985
|
+
default: R(() => [a("span", { class: v({ "text-body-1": !P(p) }) }, A(e.title), 3)]),
|
|
3589
3986
|
_: 2
|
|
3590
3987
|
}, 1032, [
|
|
3591
3988
|
"variant",
|
|
3592
3989
|
"closable",
|
|
3593
3990
|
"onClick:close"
|
|
3594
3991
|
]))]),
|
|
3595
|
-
label:
|
|
3992
|
+
label: R((e) => [c(P($), {
|
|
3596
3993
|
data: e,
|
|
3597
|
-
label: j
|
|
3994
|
+
label: P(j)
|
|
3598
3995
|
}, null, 8, ["data", "label"])]),
|
|
3599
|
-
item:
|
|
3600
|
-
prepend:
|
|
3996
|
+
item: R(({ props: e, item: t }) => [c(_, y(d(e)), {
|
|
3997
|
+
prepend: R(() => {
|
|
3601
3998
|
var e;
|
|
3602
|
-
return [(e = t.raw) != null && e.icon ? (
|
|
3999
|
+
return [(e = t.raw) != null && e.icon ? (C(), i("span", Mr, [c(P(V), {
|
|
3603
4000
|
class: "action-icon",
|
|
3604
4001
|
name: t.raw.icon
|
|
3605
4002
|
}, null, 8, ["name"])])) : r("", !0)];
|
|
3606
4003
|
}),
|
|
3607
4004
|
_: 2
|
|
3608
4005
|
}, 1040)]),
|
|
3609
|
-
message:
|
|
4006
|
+
message: R(({ message: e }) => [c(P(Q), {
|
|
3610
4007
|
message: e,
|
|
3611
|
-
errors:
|
|
4008
|
+
errors: P(N)
|
|
3612
4009
|
}, null, 8, ["message", "errors"])]),
|
|
3613
4010
|
_: 2
|
|
3614
4011
|
}, [e.$slots["append-inner"] ? {
|
|
3615
4012
|
name: "append-inner",
|
|
3616
|
-
fn:
|
|
4013
|
+
fn: R((t) => [E(e.$slots, "append-inner", y(d(t)), void 0, !0)]),
|
|
3617
4014
|
key: "0"
|
|
3618
4015
|
} : void 0, e.$slots["prepend-inner"] ? {
|
|
3619
4016
|
name: "prepend-inner",
|
|
3620
|
-
fn:
|
|
4017
|
+
fn: R((t) => [E(e.$slots, "prepend-inner", y(d(t)), void 0, !0)]),
|
|
3621
4018
|
key: "1"
|
|
3622
4019
|
} : void 0]), 1040, [
|
|
3623
4020
|
"modelValue",
|
|
3624
4021
|
"class",
|
|
4022
|
+
"style",
|
|
3625
4023
|
"items",
|
|
3626
4024
|
"closable-chips",
|
|
3627
4025
|
"clearable",
|
|
@@ -3632,9 +4030,9 @@ var Xn = {
|
|
|
3632
4030
|
])) : r("", !0);
|
|
3633
4031
|
};
|
|
3634
4032
|
}
|
|
3635
|
-
}), [["__scopeId", "data-v-
|
|
4033
|
+
}), [["__scopeId", "data-v-1c000b27"]]), Pr = /* @__PURE__ */ l({
|
|
3636
4034
|
__name: "df-text-area",
|
|
3637
|
-
props: /*@__PURE__*/
|
|
4035
|
+
props: /*@__PURE__*/ h({
|
|
3638
4036
|
rows: {},
|
|
3639
4037
|
maxRows: {},
|
|
3640
4038
|
control: {},
|
|
@@ -3651,33 +4049,33 @@ var Xn = {
|
|
|
3651
4049
|
passthroughAttrs: {},
|
|
3652
4050
|
density: {},
|
|
3653
4051
|
variant: {}
|
|
3654
|
-
},
|
|
4052
|
+
}, Z(Z({}, en), {}, {
|
|
3655
4053
|
rows: void 0,
|
|
3656
4054
|
maxRows: void 0
|
|
3657
4055
|
})),
|
|
3658
4056
|
emits: ["update:modelValue", "click:clear"],
|
|
3659
4057
|
setup(e, { emit: t }) {
|
|
3660
|
-
let n = e, { densityClass: a, isRendered: o, label: s,
|
|
4058
|
+
let n = e, { densityClass: a, isRendered: o, label: s, shownErrors: l, touched: u, value: d, visibilityClass: f, vuetifyBindings: p } = tn(n, t), { cssClass: h } = M(n);
|
|
3661
4059
|
return (t, n) => {
|
|
3662
|
-
let
|
|
3663
|
-
return
|
|
4060
|
+
let _ = D("v-textarea");
|
|
4061
|
+
return P(o) ? (C(), i("div", {
|
|
3664
4062
|
key: 0,
|
|
3665
|
-
class:
|
|
3666
|
-
}, [c(
|
|
3667
|
-
modelValue:
|
|
3668
|
-
"onUpdate:modelValue": n[0] || (n[0] = (e) =>
|
|
3669
|
-
class:
|
|
4063
|
+
class: v(["df-textarea-container", [P(a), P(f)]])
|
|
4064
|
+
}, [c(_, g({
|
|
4065
|
+
modelValue: P(d),
|
|
4066
|
+
"onUpdate:modelValue": n[0] || (n[0] = (e) => m(d) ? d.value = e : null),
|
|
4067
|
+
class: P(h),
|
|
3670
4068
|
rows: e.rows,
|
|
3671
4069
|
"auto-grow": (e.maxRows || 0) > 0,
|
|
3672
4070
|
"max-rows": e.maxRows
|
|
3673
|
-
},
|
|
3674
|
-
label:
|
|
4071
|
+
}, P(p), { onBlur: n[1] || (n[1] = (e) => u.value = !0) }), {
|
|
4072
|
+
label: R((e) => [c(P($), {
|
|
3675
4073
|
data: e,
|
|
3676
|
-
label:
|
|
4074
|
+
label: P(s)
|
|
3677
4075
|
}, null, 8, ["data", "label"])]),
|
|
3678
|
-
message:
|
|
4076
|
+
message: R(({ message: e }) => [c(P(Q), {
|
|
3679
4077
|
message: e,
|
|
3680
|
-
errors:
|
|
4078
|
+
errors: P(l)
|
|
3681
4079
|
}, null, 8, ["message", "errors"])]),
|
|
3682
4080
|
_: 1
|
|
3683
4081
|
}, 16, [
|
|
@@ -3689,62 +4087,69 @@ var Xn = {
|
|
|
3689
4087
|
])], 2)) : r("", !0);
|
|
3690
4088
|
};
|
|
3691
4089
|
}
|
|
3692
|
-
}),
|
|
3693
|
-
DfActions: () =>
|
|
3694
|
-
DfCheckbox: () =>
|
|
3695
|
-
DfColor: () =>
|
|
3696
|
-
DfDateTime: () =>
|
|
3697
|
-
DfFile: () =>
|
|
3698
|
-
DfImage: () =>
|
|
3699
|
-
DfInput: () =>
|
|
3700
|
-
DfInputHint: () =>
|
|
3701
|
-
DfLabel: () =>
|
|
3702
|
-
DfRtfEditor: () =>
|
|
3703
|
-
DfSelect: () =>
|
|
3704
|
-
DfTextArea: () =>
|
|
3705
|
-
}),
|
|
3706
|
-
VAutocomplete: () =>
|
|
3707
|
-
VBtn: () =>
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
"df-
|
|
3739
|
-
"df-
|
|
3740
|
-
"df-
|
|
3741
|
-
"df-
|
|
3742
|
-
"df-
|
|
3743
|
-
|
|
4090
|
+
}), Fr = /* @__PURE__ */ pt({
|
|
4091
|
+
DfActions: () => En,
|
|
4092
|
+
DfCheckbox: () => Dn,
|
|
4093
|
+
DfColor: () => Mn,
|
|
4094
|
+
DfDateTime: () => Nn,
|
|
4095
|
+
DfFile: () => Ln,
|
|
4096
|
+
DfImage: () => Un,
|
|
4097
|
+
DfInput: () => Wn,
|
|
4098
|
+
DfInputHint: () => Q,
|
|
4099
|
+
DfLabel: () => $,
|
|
4100
|
+
DfRtfEditor: () => Dr,
|
|
4101
|
+
DfSelect: () => Nr,
|
|
4102
|
+
DfTextArea: () => Pr
|
|
4103
|
+
}), Ir = /* @__PURE__ */ pt({
|
|
4104
|
+
VAutocomplete: () => Fe,
|
|
4105
|
+
VBtn: () => Ie,
|
|
4106
|
+
VBtnGroup: () => Le,
|
|
4107
|
+
VBtnToggle: () => Re,
|
|
4108
|
+
VCard: () => ze,
|
|
4109
|
+
VCardActions: () => Be,
|
|
4110
|
+
VCheckbox: () => Ve,
|
|
4111
|
+
VChip: () => He,
|
|
4112
|
+
VCol: () => Xe,
|
|
4113
|
+
VColorPicker: () => We,
|
|
4114
|
+
VCombobox: () => Ue,
|
|
4115
|
+
VConfirmEdit: () => Ge,
|
|
4116
|
+
VDatePicker: () => Ke,
|
|
4117
|
+
VDivider: () => qe,
|
|
4118
|
+
VField: () => Je,
|
|
4119
|
+
VFileInput: () => Ye,
|
|
4120
|
+
VIcon: () => Qe,
|
|
4121
|
+
VImg: () => $e,
|
|
4122
|
+
VInput: () => et,
|
|
4123
|
+
VList: () => tt,
|
|
4124
|
+
VListItem: () => nt,
|
|
4125
|
+
VListItemTitle: () => rt,
|
|
4126
|
+
VMenu: () => it,
|
|
4127
|
+
VNumberInput: () => at,
|
|
4128
|
+
VProgressLinear: () => ot,
|
|
4129
|
+
VRow: () => Ze,
|
|
4130
|
+
VSelect: () => st,
|
|
4131
|
+
VSwitch: () => ct,
|
|
4132
|
+
VTextField: () => ut,
|
|
4133
|
+
VTextarea: () => lt,
|
|
4134
|
+
VTimePicker: () => dt
|
|
4135
|
+
}), Lr = {
|
|
4136
|
+
"df-actions": En,
|
|
4137
|
+
"df-checkbox": Dn,
|
|
4138
|
+
"df-color": Mn,
|
|
4139
|
+
"df-date-time": Nn,
|
|
4140
|
+
"df-file": Ln,
|
|
4141
|
+
"df-image": Un,
|
|
4142
|
+
"df-input": Wn,
|
|
4143
|
+
"df-input-hint": Q,
|
|
4144
|
+
"df-label": $,
|
|
4145
|
+
"df-rtf-editor": Dr,
|
|
4146
|
+
"df-select": Nr,
|
|
4147
|
+
"df-text-area": Pr
|
|
4148
|
+
}, Rr = /* @__PURE__ */ pt({}), zr = { install: (e, t) => {
|
|
3744
4149
|
var n, r;
|
|
3745
|
-
e.provide(
|
|
4150
|
+
e.provide(Yt, t == null ? {} : t), (n = t == null ? void 0 : t.registerComponents) != null && n && Object.entries(Fr).map(([t, n]) => e.component(t, n)), (r = t == null ? void 0 : t.registerVuetifyComponents) != null && r && Object.entries(Ir).map(([t, n]) => e.component(t, n));
|
|
3746
4151
|
} };
|
|
3747
4152
|
//#endregion
|
|
3748
|
-
export {
|
|
4153
|
+
export { xn as Action, Nt as DateTimeLocaleConfig, En as DfActions, Dn as DfCheckbox, Mn as DfColor, Nn as DfDateTime, Ln as DfFile, Un as DfImage, Wn as DfInput, Rr as DfInputComponentProps, Fr as DfInputComponents, Q as DfInputHint, $ as DfLabel, Dr as DfRtfEditor, Nr as DfSelect, Pr as DfTextArea, zr as DynamicFormsInputs, Pt as FileGoneError, It as HtmlString, rn as InputBase, $t as Label, Ft as MdString, Xt as MessagesWidget, Kt as RenderableValue, yn as ResponsiveActionRenderOptions, gn as ResponsiveRenderOptions, Ir as VuetifyComponents, fn as actionDisplayStyles, en as defaultBaseProps, pn as defaultDisplayStyle, Lr as dfInputComponentsByTag, Jt as errorText, _n as getBreakpointName, bn as getRenderOptionsForBreakpoint, mn as isActionDisplayStyle, Gt as isCallableFunction, Rt as isRenderContent, Lt as isSimpleComponentDef, Ut as renderContentText, hn as responsiveBreakpoints, Zt as selectShownErrors, Cn as setFileGoneError, qt as toErrorDescription, un as translate, sn as translateStrings, vn as useBreakpoint, Sn as useFileTouchKeepAlive, tn as useInputBase, Qt as useShownErrors, dn as useTranslate, Yt as vuetifyInputsSettingsKey };
|
|
3749
4154
|
|
|
3750
4155
|
//# sourceMappingURL=dynamicforms-vuetify-inputs.js.map
|