@dynamicforms/vuetify-inputs 0.12.1 → 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 +1474 -1087
- 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 +342 -354
- package/package.json +6 -7
- package/readme.md +16 -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 { CachedIcon as
|
|
3
|
-
import z, { Action as B, ExecuteAction as ne, MdString as re, MessagesWidget as V, 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";
|
|
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 J(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,155 +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
|
+
});
|
|
939
1119
|
//#endregion
|
|
940
1120
|
//#region src/helpers/shown-errors.ts
|
|
941
|
-
function
|
|
1121
|
+
function Zt(e, t, n, r) {
|
|
942
1122
|
let i = !t || t.effectiveAccess !== "disabled";
|
|
943
1123
|
return e.filter((e) => {
|
|
944
1124
|
let a = i && (e.origin === "server" || n);
|
|
945
1125
|
return r.shownErrors ? r.shownErrors(e, t, a) : a;
|
|
946
1126
|
});
|
|
947
1127
|
}
|
|
948
|
-
function
|
|
949
|
-
let n =
|
|
1128
|
+
function Qt(e) {
|
|
1129
|
+
let n = p(Yt, {});
|
|
950
1130
|
return t(() => {
|
|
951
|
-
let t =
|
|
952
|
-
return t ?
|
|
1131
|
+
let t = N(e);
|
|
1132
|
+
return t ? Zt(t.errors, t, t.touched, n) : [];
|
|
953
1133
|
});
|
|
954
1134
|
}
|
|
955
1135
|
//#endregion
|
|
956
1136
|
//#region src/helpers/input-base.ts
|
|
957
|
-
var
|
|
1137
|
+
var $t = class {
|
|
958
1138
|
constructor(e, t, n = "v-icon") {
|
|
959
|
-
|
|
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;
|
|
960
1140
|
}
|
|
961
|
-
},
|
|
1141
|
+
}, en = {
|
|
962
1142
|
enabled: void 0,
|
|
963
1143
|
clearable: !0
|
|
964
1144
|
};
|
|
965
|
-
function
|
|
966
|
-
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({
|
|
967
1147
|
get() {
|
|
968
|
-
return
|
|
1148
|
+
return c.value ? c.value.value : e.control ? e.control.value : e.modelValue === void 0 ? s.value : e.modelValue;
|
|
969
1149
|
},
|
|
970
1150
|
set(t) {
|
|
971
1151
|
try {
|
|
972
1152
|
e.control && (e.control.value = t);
|
|
973
1153
|
} finally {
|
|
974
|
-
e.control && !Object.is(
|
|
975
|
-
|
|
1154
|
+
e.control && !Object.is(j(e.control.value), j(t)) && (c.value = { value: t }, _(() => {
|
|
1155
|
+
c.value = null;
|
|
976
1156
|
}));
|
|
977
1157
|
}
|
|
978
|
-
e.modelValue === void 0 && (
|
|
1158
|
+
e.modelValue === void 0 && (s.value = t), n("update:modelValue", e.control ? e.control.value : t);
|
|
979
1159
|
}
|
|
980
1160
|
});
|
|
981
|
-
if (e.control && !(e.control instanceof
|
|
982
|
-
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({
|
|
983
1163
|
get() {
|
|
984
1164
|
return e.control.touched;
|
|
985
1165
|
},
|
|
986
1166
|
set(t) {
|
|
987
1167
|
e.control.touched = t;
|
|
988
1168
|
}
|
|
989
|
-
}),
|
|
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(() => {
|
|
1177
|
+
var t;
|
|
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(() => {
|
|
990
1183
|
if (e.control) return e.control.visibility;
|
|
991
|
-
if (e.visibility == null) return
|
|
992
|
-
if (!
|
|
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(", ")}`);
|
|
993
1186
|
return e.visibility;
|
|
994
|
-
}),
|
|
995
|
-
"d-none":
|
|
996
|
-
invisible:
|
|
997
|
-
})),
|
|
1187
|
+
}), x = t(() => b.value !== "suppress"), S = t(() => ({
|
|
1188
|
+
"d-none": b.value === "hidden",
|
|
1189
|
+
invisible: b.value === "invisible"
|
|
1190
|
+
})), C = t(() => {
|
|
998
1191
|
var t, n;
|
|
999
1192
|
return (t = (n = e.control) == null ? void 0 : n.extra) == null ? {} : t;
|
|
1000
|
-
}), C = t(() => {
|
|
1001
|
-
var t;
|
|
1002
|
-
let n = (t = e.label) == null ? x.value.label : t;
|
|
1003
|
-
return K(n || "") ? new Pt(n || "") : n;
|
|
1004
|
-
}), w = t(() => {
|
|
1005
|
-
var t, n;
|
|
1006
|
-
return (t = (n = e.placeholder) == null ? x.value.placeholder : n) == null ? "" : t;
|
|
1007
1193
|
}), T = t(() => {
|
|
1008
|
-
var t
|
|
1009
|
-
|
|
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);
|
|
1010
1197
|
}), E = t(() => {
|
|
1011
1198
|
var t, n;
|
|
1012
|
-
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;
|
|
1013
1203
|
}), O = t(() => {
|
|
1014
1204
|
var t, n;
|
|
1015
|
-
return (t = (n = e.
|
|
1205
|
+
return (t = (n = e.hint) == null ? C.value.hint : n) == null ? "" : t;
|
|
1016
1206
|
}), A = t(() => {
|
|
1017
|
-
var t, n
|
|
1018
|
-
return (t = (n =
|
|
1019
|
-
}),
|
|
1020
|
-
var t, n,
|
|
1021
|
-
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;
|
|
1022
1215
|
});
|
|
1023
1216
|
return {
|
|
1024
|
-
value:
|
|
1217
|
+
value: l,
|
|
1025
1218
|
valid: f,
|
|
1026
|
-
enabled:
|
|
1027
|
-
errors:
|
|
1028
|
-
shownErrors:
|
|
1029
|
-
visibility:
|
|
1030
|
-
isRendered:
|
|
1031
|
-
visibilityClass:
|
|
1032
|
-
label:
|
|
1033
|
-
touched:
|
|
1034
|
-
density:
|
|
1035
|
-
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}`),
|
|
1036
1229
|
vuetifyBindings: t(() => {
|
|
1037
1230
|
var t;
|
|
1038
|
-
return
|
|
1231
|
+
return Z({
|
|
1039
1232
|
name: (t = e.control) == null ? void 0 : t.fieldName,
|
|
1040
|
-
class:
|
|
1041
|
-
density:
|
|
1042
|
-
variant:
|
|
1043
|
-
label:
|
|
1044
|
-
errorMessages:
|
|
1045
|
-
readonly: !
|
|
1046
|
-
disabled: !
|
|
1047
|
-
placeholder:
|
|
1048
|
-
"persistent-placeholder": !
|
|
1049
|
-
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,
|
|
1050
1243
|
persistentHint: !0,
|
|
1051
1244
|
hideDetails: "auto",
|
|
1052
|
-
helpText:
|
|
1245
|
+
helpText: D.value
|
|
1053
1246
|
}, e.passthroughAttrs || {});
|
|
1054
1247
|
})
|
|
1055
1248
|
};
|
|
1056
1249
|
}
|
|
1057
1250
|
//#endregion
|
|
1058
1251
|
//#region src/helpers/input-base.vue?vue&type=script&setup=true&lang.ts
|
|
1059
|
-
var
|
|
1252
|
+
var nn = { class: "d-flex w-100 df-style-resetting df-sub-field" }, rn = /* @__PURE__ */ l({
|
|
1060
1253
|
__name: "input-base",
|
|
1061
1254
|
props: {
|
|
1062
1255
|
control: {},
|
|
@@ -1081,49 +1274,49 @@ var Ft = { class: "d-flex w-100 df-style-resetting df-sub-field" }, It = /* @__P
|
|
|
1081
1274
|
"blur"
|
|
1082
1275
|
],
|
|
1083
1276
|
setup(e, { emit: i }) {
|
|
1084
|
-
let s = e, l = i, { isRendered:
|
|
1085
|
-
function
|
|
1086
|
-
|
|
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"));
|
|
1087
1280
|
}
|
|
1088
1281
|
return (t, i) => {
|
|
1089
|
-
let s =
|
|
1090
|
-
return
|
|
1282
|
+
let s = D("v-field"), m = D("v-input");
|
|
1283
|
+
return P(u) ? (C(), n(m, {
|
|
1091
1284
|
key: 0,
|
|
1092
|
-
name:
|
|
1093
|
-
density:
|
|
1094
|
-
hint:
|
|
1095
|
-
"persistent-hint":
|
|
1096
|
-
"hide-details":
|
|
1097
|
-
"error-messages":
|
|
1098
|
-
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)])
|
|
1099
1292
|
}, o({
|
|
1100
|
-
message:
|
|
1293
|
+
message: R(({ message: e }) => [c(Q, {
|
|
1101
1294
|
message: e,
|
|
1102
|
-
errors:
|
|
1295
|
+
errors: P(p)
|
|
1103
1296
|
}, null, 8, ["message", "errors"])]),
|
|
1104
|
-
default:
|
|
1105
|
-
variant:
|
|
1106
|
-
density:
|
|
1107
|
-
label:
|
|
1108
|
-
disabled:
|
|
1297
|
+
default: R(() => [c(s, {
|
|
1298
|
+
variant: P(_).variant,
|
|
1299
|
+
density: P(_).density,
|
|
1300
|
+
label: P(_).label,
|
|
1301
|
+
disabled: P(_).disabled,
|
|
1109
1302
|
clearable: b.value,
|
|
1110
1303
|
"persistent-clear": !0,
|
|
1111
|
-
dirty: !!
|
|
1112
|
-
active:
|
|
1304
|
+
dirty: !!P(h) || !!P(_).placeholder,
|
|
1305
|
+
active: x.value,
|
|
1113
1306
|
loading: e.loading,
|
|
1114
1307
|
"onClick:clear": i[0] || (i[0] = (e) => l("click:clear")),
|
|
1115
|
-
"onUpdate:focused": i[1] || (i[1] = (e) =>
|
|
1308
|
+
"onUpdate:focused": i[1] || (i[1] = (e) => S(e))
|
|
1116
1309
|
}, o({
|
|
1117
|
-
label:
|
|
1310
|
+
label: R((e) => [c($, {
|
|
1118
1311
|
data: e,
|
|
1119
|
-
label:
|
|
1312
|
+
label: P(f)
|
|
1120
1313
|
}, null, 8, ["data", "label"])]),
|
|
1121
|
-
default:
|
|
1122
|
-
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)))]),
|
|
1123
1316
|
_: 2
|
|
1124
1317
|
}, [t.$slots["prepend-inner"] ? {
|
|
1125
1318
|
name: "prepend-inner",
|
|
1126
|
-
fn:
|
|
1319
|
+
fn: R((e) => [E(t.$slots, "prepend-inner", y(d(e)))]),
|
|
1127
1320
|
key: "0"
|
|
1128
1321
|
} : void 0]), 1032, [
|
|
1129
1322
|
"variant",
|
|
@@ -1138,7 +1331,7 @@ var Ft = { class: "d-flex w-100 df-style-resetting df-sub-field" }, It = /* @__P
|
|
|
1138
1331
|
_: 2
|
|
1139
1332
|
}, [t.$slots.prepend ? {
|
|
1140
1333
|
name: "prepend",
|
|
1141
|
-
fn:
|
|
1334
|
+
fn: R((e) => [E(t.$slots, "prepend", y(d(e)))]),
|
|
1142
1335
|
key: "0"
|
|
1143
1336
|
} : void 0]), 1032, [
|
|
1144
1337
|
"name",
|
|
@@ -1151,10 +1344,12 @@ var Ft = { class: "d-flex w-100 df-style-resetting df-sub-field" }, It = /* @__P
|
|
|
1151
1344
|
])) : r("", !0);
|
|
1152
1345
|
};
|
|
1153
1346
|
}
|
|
1154
|
-
}),
|
|
1347
|
+
}), an = {
|
|
1155
1348
|
Yes: "Yes",
|
|
1156
1349
|
No: "No",
|
|
1157
1350
|
Close: "Close",
|
|
1351
|
+
Cancel: "Cancel",
|
|
1352
|
+
Ok: "OK",
|
|
1158
1353
|
Paragraph: "Paragraph",
|
|
1159
1354
|
Heading1: "Heading 1",
|
|
1160
1355
|
Heading2: "Heading 2",
|
|
@@ -1212,23 +1407,37 @@ var Ft = { class: "d-flex w-100 df-style-resetting df-sub-field" }, It = /* @__P
|
|
|
1212
1407
|
Style: "Style",
|
|
1213
1408
|
MediaEmbed: "Insert media",
|
|
1214
1409
|
MediaEmbedUrl: "Video URL",
|
|
1215
|
-
MediaEmbedInsert: "Insert"
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
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);
|
|
1220
1429
|
}
|
|
1221
1430
|
//#endregion
|
|
1222
1431
|
//#region src/helpers/action/responsive-render-options.ts
|
|
1223
|
-
var
|
|
1432
|
+
var hn = [
|
|
1224
1433
|
"xs",
|
|
1225
1434
|
"sm",
|
|
1226
1435
|
"md",
|
|
1227
1436
|
"lg",
|
|
1228
1437
|
"xl"
|
|
1229
|
-
],
|
|
1438
|
+
], gn = class {
|
|
1230
1439
|
constructor(e) {
|
|
1231
|
-
|
|
1440
|
+
X(this, "_value", void 0), this._value = this.cleanBreakpoint(e, !0), e && hn.forEach((t) => {
|
|
1232
1441
|
let n = this.cleanBreakpoint(e[t]);
|
|
1233
1442
|
n && (this._value[t] = n);
|
|
1234
1443
|
});
|
|
@@ -1236,50 +1445,51 @@ var Ht = [
|
|
|
1236
1445
|
getOptionsForBreakpoint(e) {
|
|
1237
1446
|
var t;
|
|
1238
1447
|
let n = (t = this.cleanBreakpoint(this._value)) == null ? {} : t;
|
|
1239
|
-
for (let t of
|
|
1448
|
+
for (let t of hn) {
|
|
1240
1449
|
var r;
|
|
1241
1450
|
let i = (r = this._value[t]) == null ? {} : r;
|
|
1242
1451
|
for (let e of Object.keys(i)) {
|
|
1243
1452
|
let t = i[e];
|
|
1244
|
-
t != null && (n[e] =
|
|
1453
|
+
t != null && (n[e] = le(t) ? Z(Z({}, n[e]), t) : t);
|
|
1245
1454
|
}
|
|
1246
1455
|
if (t === e) break;
|
|
1247
1456
|
}
|
|
1248
1457
|
return n;
|
|
1249
1458
|
}
|
|
1250
1459
|
};
|
|
1251
|
-
function
|
|
1460
|
+
function _n(e) {
|
|
1252
1461
|
return e.xlAndUp.value ? "xl" : e.lgAndUp.value ? "lg" : e.mdAndUp.value ? "md" : e.smAndUp.value ? "sm" : "xs";
|
|
1253
1462
|
}
|
|
1254
|
-
function
|
|
1255
|
-
let e =
|
|
1256
|
-
return t(() =>
|
|
1463
|
+
function vn() {
|
|
1464
|
+
let e = fe();
|
|
1465
|
+
return t(() => _n(e));
|
|
1257
1466
|
}
|
|
1258
1467
|
//#endregion
|
|
1259
1468
|
//#region src/helpers/action/action-render-options.ts
|
|
1260
|
-
var
|
|
1469
|
+
var yn = class extends gn {
|
|
1261
1470
|
cleanBreakpoint(e, t = !1) {
|
|
1262
|
-
if ((!e || !
|
|
1471
|
+
if ((!e || !ce(e)) && !t) return null;
|
|
1263
1472
|
let n = {};
|
|
1264
|
-
if (t && (n.renderAs =
|
|
1473
|
+
if (t && (n.renderAs = pn, n.showLabel = !0, n.showIcon = !0), e) {
|
|
1265
1474
|
if (e.renderAs != null) {
|
|
1266
|
-
if (!
|
|
1475
|
+
if (!mn(e.renderAs)) throw Error(`'${e.renderAs}' is not an action display style: ${fn.join(", ")}`);
|
|
1267
1476
|
n.renderAs = e.renderAs;
|
|
1268
1477
|
}
|
|
1269
|
-
|
|
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));
|
|
1270
1480
|
}
|
|
1271
1481
|
return Object.keys(n).length ? n : null;
|
|
1272
1482
|
}
|
|
1273
1483
|
};
|
|
1274
|
-
function
|
|
1275
|
-
let n = new
|
|
1484
|
+
function bn(e, t) {
|
|
1485
|
+
let n = new yn(e).getOptionsForBreakpoint(t), r = n.label;
|
|
1276
1486
|
return {
|
|
1277
1487
|
name: n.name,
|
|
1278
|
-
label: n.showLabel ?
|
|
1488
|
+
label: n.showLabel ? r : void 0,
|
|
1279
1489
|
icon: n.showIcon ? n.icon : void 0,
|
|
1280
1490
|
renderAs: n.renderAs,
|
|
1281
|
-
showLabel:
|
|
1282
|
-
showIcon:
|
|
1491
|
+
showLabel: J(r) && !q(r) ? n.showLabel : !1,
|
|
1492
|
+
showIcon: J(n.icon) && !q(n.icon) ? n.showIcon : !1,
|
|
1283
1493
|
defaultConfirm: n.defaultConfirm,
|
|
1284
1494
|
defaultReject: n.defaultReject,
|
|
1285
1495
|
passthroughAttrs: n.passthroughAttrs
|
|
@@ -1287,78 +1497,79 @@ function qt(e, t) {
|
|
|
1287
1497
|
}
|
|
1288
1498
|
//#endregion
|
|
1289
1499
|
//#region src/helpers/action/action.ts
|
|
1290
|
-
var
|
|
1500
|
+
var xn = class e extends te {
|
|
1291
1501
|
getBreakpointValue(e) {
|
|
1292
|
-
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;
|
|
1293
1509
|
}
|
|
1294
1510
|
get name() {
|
|
1295
1511
|
return this.value.name;
|
|
1296
1512
|
}
|
|
1297
1513
|
get renderedLabel() {
|
|
1298
|
-
return this.value.showLabel ? this.value.label : void 0;
|
|
1514
|
+
return this.value.showLabel ? N(this.value.label) : void 0;
|
|
1299
1515
|
}
|
|
1300
1516
|
get showLabel() {
|
|
1301
|
-
|
|
1517
|
+
let e = N(this.value.label);
|
|
1518
|
+
return J(e) && !q(e) ? this.value.showLabel : !1;
|
|
1302
1519
|
}
|
|
1303
1520
|
get renderedIcon() {
|
|
1304
1521
|
return this.value.showIcon ? this.value.icon : void 0;
|
|
1305
1522
|
}
|
|
1306
1523
|
get showIcon() {
|
|
1307
|
-
return
|
|
1524
|
+
return J(this.value.icon) && !q(this.value.icon) ? this.value.showIcon : !1;
|
|
1308
1525
|
}
|
|
1309
1526
|
get renderAs() {
|
|
1310
1527
|
return this.value.renderAs;
|
|
1311
1528
|
}
|
|
1312
|
-
get defaultConfirm() {
|
|
1313
|
-
return this.value.defaultConfirm;
|
|
1314
|
-
}
|
|
1315
|
-
get defaultReject() {
|
|
1316
|
-
return this.value.defaultReject;
|
|
1317
|
-
}
|
|
1318
1529
|
get passthroughAttrs() {
|
|
1319
1530
|
return this.value.passthroughAttrs;
|
|
1320
1531
|
}
|
|
1321
1532
|
static closeAction(t) {
|
|
1322
1533
|
var n;
|
|
1323
|
-
let r =
|
|
1534
|
+
let r = Z(Z({}, t == null ? {} : t), {}, { value: {
|
|
1324
1535
|
name: "close",
|
|
1325
|
-
label:
|
|
1536
|
+
label: () => un("Close"),
|
|
1326
1537
|
icon: "ion-close-outline",
|
|
1327
1538
|
renderAs: "button",
|
|
1328
1539
|
showLabel: !0,
|
|
1329
1540
|
showIcon: !0
|
|
1330
1541
|
} });
|
|
1331
|
-
return r.value =
|
|
1542
|
+
return r.value = Z(Z({}, r.value), (n = t == null ? void 0 : t.value) == null ? {} : n), new e(r);
|
|
1332
1543
|
}
|
|
1333
1544
|
static yesAction(t) {
|
|
1334
1545
|
var n;
|
|
1335
|
-
let r =
|
|
1546
|
+
let r = Z(Z({}, t == null ? {} : t), {}, { value: {
|
|
1336
1547
|
name: "yes",
|
|
1337
|
-
label:
|
|
1548
|
+
label: () => un("Yes"),
|
|
1338
1549
|
icon: "ion-thumbs-up-outline",
|
|
1339
1550
|
renderAs: "button",
|
|
1340
1551
|
showLabel: !0,
|
|
1341
1552
|
showIcon: !0
|
|
1342
1553
|
} });
|
|
1343
|
-
return r.value =
|
|
1554
|
+
return r.value = Z(Z({}, r.value), (n = t == null ? void 0 : t.value) == null ? {} : n), new e(r);
|
|
1344
1555
|
}
|
|
1345
1556
|
static noAction(t) {
|
|
1346
1557
|
var n;
|
|
1347
|
-
let r =
|
|
1558
|
+
let r = Z(Z({}, t == null ? {} : t), {}, { value: {
|
|
1348
1559
|
name: "no",
|
|
1349
|
-
label:
|
|
1560
|
+
label: () => un("No"),
|
|
1350
1561
|
icon: "ion-thumbs-down-outline",
|
|
1351
1562
|
renderAs: "button",
|
|
1352
1563
|
showLabel: !0,
|
|
1353
1564
|
showIcon: !0
|
|
1354
1565
|
} });
|
|
1355
|
-
return r.value =
|
|
1566
|
+
return r.value = Z(Z({}, r.value), (n = t == null ? void 0 : t.value) == null ? {} : n), new e(r);
|
|
1356
1567
|
}
|
|
1357
1568
|
};
|
|
1358
1569
|
//#endregion
|
|
1359
1570
|
//#region src/helpers/use-file-touch-keepalive.ts
|
|
1360
|
-
function
|
|
1361
|
-
let i =
|
|
1571
|
+
function Sn(e, t, n, r) {
|
|
1572
|
+
let i = p(Yt, {}), a = w(null);
|
|
1362
1573
|
function o() {
|
|
1363
1574
|
a.value && window.clearInterval(a.value);
|
|
1364
1575
|
}
|
|
@@ -1368,24 +1579,24 @@ function Yt(e, t, n, r) {
|
|
|
1368
1579
|
let l = (s = (c = n()) == null ? i.defaultTouchInterval : c) == null ? 6e4 : s;
|
|
1369
1580
|
a.value = window.setInterval(() => {
|
|
1370
1581
|
e.value && t().touch(e.value).catch((e) => {
|
|
1371
|
-
e instanceof
|
|
1582
|
+
e instanceof Pt && r(e.errorText);
|
|
1372
1583
|
});
|
|
1373
1584
|
}, l);
|
|
1374
1585
|
}
|
|
1375
|
-
return
|
|
1586
|
+
return x(() => o()), I(e, (e) => e ? s() : o()), {
|
|
1376
1587
|
setupTouchInterval: s,
|
|
1377
1588
|
clearTouchInterval: o
|
|
1378
1589
|
};
|
|
1379
1590
|
}
|
|
1380
|
-
function
|
|
1381
|
-
e && (e.errors = [new
|
|
1591
|
+
function Cn(e, t) {
|
|
1592
|
+
e && (e.errors = [new G("file_gone", {}, t, "server")]);
|
|
1382
1593
|
}
|
|
1383
1594
|
//#endregion
|
|
1384
1595
|
//#region src/df-actions.vue?vue&type=script&setup=true&lang.ts
|
|
1385
|
-
var
|
|
1596
|
+
var wn = {
|
|
1386
1597
|
key: 1,
|
|
1387
1598
|
style: { width: "0.5rem" }
|
|
1388
|
-
},
|
|
1599
|
+
}, Tn = { key: 2 }, En = /* @__PURE__ */ l({
|
|
1389
1600
|
__name: "df-actions",
|
|
1390
1601
|
props: {
|
|
1391
1602
|
actions: {},
|
|
@@ -1394,20 +1605,20 @@ var Zt = {
|
|
|
1394
1605
|
showAsGroup: { default: "no" }
|
|
1395
1606
|
},
|
|
1396
1607
|
setup(a) {
|
|
1397
|
-
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))));
|
|
1398
1609
|
function u(e) {
|
|
1399
1610
|
if (e.defaultConfirm) return "primary";
|
|
1400
1611
|
if (e.defaultReject) return "secondary";
|
|
1401
1612
|
}
|
|
1402
1613
|
return (t, o) => {
|
|
1403
|
-
let s =
|
|
1404
|
-
return c.value.length > 0 ? (
|
|
1614
|
+
let s = D("v-btn");
|
|
1615
|
+
return c.value.length > 0 ? (C(), i("div", {
|
|
1405
1616
|
key: 0,
|
|
1406
|
-
class:
|
|
1617
|
+
class: v(["text-end df-actions", {
|
|
1407
1618
|
"button-group": a.showAsGroup === "grouped" || a.showAsGroup === "grouped-no-borders",
|
|
1408
1619
|
"with-border": a.showAsGroup === "grouped"
|
|
1409
1620
|
}])
|
|
1410
|
-
}, [(
|
|
1621
|
+
}, [(C(!0), i(e, null, T(l.value, (e, t) => (C(), n(s, g({
|
|
1411
1622
|
key: t,
|
|
1412
1623
|
variant: e.renderAs === "button" ? "tonal" : "text",
|
|
1413
1624
|
color: u(e),
|
|
@@ -1420,14 +1631,14 @@ var Zt = {
|
|
|
1420
1631
|
"d-none": e.action.visibility === "hidden",
|
|
1421
1632
|
invisible: e.action.visibility === "invisible"
|
|
1422
1633
|
}
|
|
1423
|
-
}, { ref_for: !0 }, e.passthroughAttrs, { onClick:
|
|
1424
|
-
default:
|
|
1425
|
-
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), {
|
|
1426
1637
|
key: 0,
|
|
1427
1638
|
name: e.icon
|
|
1428
1639
|
}, null, 8, ["name"])) : r("", !0),
|
|
1429
|
-
e.icon && e.label ? (
|
|
1430
|
-
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)
|
|
1431
1642
|
]),
|
|
1432
1643
|
_: 2
|
|
1433
1644
|
}, 1040, [
|
|
@@ -1442,9 +1653,9 @@ var Zt = {
|
|
|
1442
1653
|
]))), 128))], 2)) : r("", !0);
|
|
1443
1654
|
};
|
|
1444
1655
|
}
|
|
1445
|
-
}),
|
|
1656
|
+
}), Dn = /* @__PURE__ */ l({
|
|
1446
1657
|
__name: "df-checkbox",
|
|
1447
|
-
props: /*@__PURE__*/
|
|
1658
|
+
props: /*@__PURE__*/ h({
|
|
1448
1659
|
allowNull: { type: Boolean },
|
|
1449
1660
|
control: {},
|
|
1450
1661
|
modelValue: {},
|
|
@@ -1460,42 +1671,42 @@ var Zt = {
|
|
|
1460
1671
|
passthroughAttrs: {},
|
|
1461
1672
|
density: {},
|
|
1462
1673
|
variant: {}
|
|
1463
|
-
},
|
|
1674
|
+
}, Z(Z({}, en), {}, { allowNull: !1 })),
|
|
1464
1675
|
emits: ["update:modelValue", "click:clear"],
|
|
1465
1676
|
setup(e, { emit: i }) {
|
|
1466
|
-
let a = e, { densityClass: o, isRendered: s, label: l, shownErrors: u, touched: d, value: f, visibilityClass: p, vuetifyBindings:
|
|
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({
|
|
1467
1678
|
get() {
|
|
1468
1679
|
return f.value;
|
|
1469
1680
|
},
|
|
1470
1681
|
set() {}
|
|
1471
1682
|
});
|
|
1472
1683
|
function v() {
|
|
1473
|
-
let e =
|
|
1684
|
+
let e = re(f.value);
|
|
1474
1685
|
e === !0 ? f.value = a.allowNull ? null : !1 : f.value = e === !1;
|
|
1475
1686
|
}
|
|
1476
1687
|
return (e, t) => {
|
|
1477
|
-
let i =
|
|
1478
|
-
return
|
|
1688
|
+
let i = D("v-checkbox");
|
|
1689
|
+
return P(s) ? (C(), n(i, g({
|
|
1479
1690
|
key: 0,
|
|
1480
1691
|
modelValue: _.value,
|
|
1481
1692
|
"onUpdate:modelValue": t[0] || (t[0] = (e) => _.value = e),
|
|
1482
1693
|
density: "compact",
|
|
1483
|
-
class: [
|
|
1484
|
-
indeterminate:
|
|
1694
|
+
class: [P(o), P(p)],
|
|
1695
|
+
indeterminate: h.value,
|
|
1485
1696
|
"false-value": !1,
|
|
1486
1697
|
"true-value": !0
|
|
1487
|
-
},
|
|
1698
|
+
}, P(m), {
|
|
1488
1699
|
onChange: v,
|
|
1489
1700
|
onBlur: t[1] || (t[1] = (e) => d.value = !0)
|
|
1490
1701
|
}), {
|
|
1491
|
-
label:
|
|
1702
|
+
label: R((e) => [c(P($), {
|
|
1492
1703
|
"allow-wrap": !0,
|
|
1493
1704
|
data: e,
|
|
1494
|
-
label:
|
|
1705
|
+
label: P(l)
|
|
1495
1706
|
}, null, 8, ["data", "label"])]),
|
|
1496
|
-
message:
|
|
1707
|
+
message: R(({ message: e }) => [c(P(Q), {
|
|
1497
1708
|
message: e,
|
|
1498
|
-
errors:
|
|
1709
|
+
errors: P(u)
|
|
1499
1710
|
}, null, 8, ["message", "errors"])]),
|
|
1500
1711
|
_: 1
|
|
1501
1712
|
}, 16, [
|
|
@@ -1505,9 +1716,62 @@ var Zt = {
|
|
|
1505
1716
|
])) : r("", !0);
|
|
1506
1717
|
};
|
|
1507
1718
|
}
|
|
1508
|
-
})
|
|
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({
|
|
1509
1773
|
__name: "df-color",
|
|
1510
|
-
props: /*@__PURE__*/
|
|
1774
|
+
props: /*@__PURE__*/ h({
|
|
1511
1775
|
allowNull: { type: Boolean },
|
|
1512
1776
|
control: {},
|
|
1513
1777
|
modelValue: {},
|
|
@@ -1523,60 +1787,95 @@ var Zt = {
|
|
|
1523
1787
|
passthroughAttrs: {},
|
|
1524
1788
|
density: {},
|
|
1525
1789
|
variant: {}
|
|
1526
|
-
},
|
|
1790
|
+
}, Z(Z({}, en), {}, { allowNull: !1 })),
|
|
1527
1791
|
emits: ["update:modelValue", "click:clear"],
|
|
1528
|
-
setup(e, { emit:
|
|
1529
|
-
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
|
+
}
|
|
1530
1802
|
return (t, i) => {
|
|
1531
|
-
let o =
|
|
1532
|
-
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({
|
|
1533
1805
|
key: 0,
|
|
1534
|
-
modelValue:
|
|
1535
|
-
"onUpdate:modelValue": i[
|
|
1536
|
-
class: [
|
|
1806
|
+
modelValue: P(_),
|
|
1807
|
+
"onUpdate:modelValue": i[3] || (i[3] = (e) => m(_) ? _.value = e : null),
|
|
1808
|
+
class: [P(u), P(v)],
|
|
1537
1809
|
clearable: e.allowNull,
|
|
1538
|
-
type: "text"
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
label: F((e) => [c(j(X), {
|
|
1810
|
+
type: "text"
|
|
1811
|
+
}, P(y), { onBlur: i[4] || (i[4] = (e) => h.value = !0) }), {
|
|
1812
|
+
label: R((e) => [c(P($), {
|
|
1542
1813
|
data: e,
|
|
1543
|
-
label:
|
|
1814
|
+
label: P(f)
|
|
1544
1815
|
}, null, 8, ["data", "label"])]),
|
|
1545
|
-
message:
|
|
1816
|
+
message: R(({ message: e }) => [c(P(Q), {
|
|
1546
1817
|
message: e,
|
|
1547
|
-
errors:
|
|
1818
|
+
errors: P(p)
|
|
1548
1819
|
}, null, 8, ["message", "errors"])]),
|
|
1549
|
-
"prepend-inner":
|
|
1820
|
+
"prepend-inner": R(() => [a("div", { style: b([{
|
|
1550
1821
|
width: "24px",
|
|
1551
1822
|
height: "24px",
|
|
1552
1823
|
"border-radius": "4px",
|
|
1553
1824
|
border: "1px solid #ccc"
|
|
1554
|
-
}, { backgroundColor:
|
|
1555
|
-
default:
|
|
1556
|
-
|
|
1557
|
-
|
|
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),
|
|
1558
1830
|
"close-on-content-click": !1,
|
|
1559
1831
|
activator: "parent"
|
|
1560
1832
|
}, {
|
|
1561
|
-
default:
|
|
1562
|
-
modelValue:
|
|
1563
|
-
"onUpdate:modelValue": i[0] || (i[0] = (e) =>
|
|
1564
|
-
|
|
1565
|
-
|
|
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"])]),
|
|
1566
1866
|
_: 1
|
|
1567
|
-
}, 8, ["modelValue"])]),
|
|
1867
|
+
}, 8, ["modelValue"])) : r("", !0)]),
|
|
1568
1868
|
_: 1
|
|
1569
1869
|
}, 16, [
|
|
1570
1870
|
"modelValue",
|
|
1571
1871
|
"class",
|
|
1572
|
-
"clearable"
|
|
1573
|
-
"rules"
|
|
1872
|
+
"clearable"
|
|
1574
1873
|
])) : r("", !0);
|
|
1575
1874
|
};
|
|
1576
1875
|
}
|
|
1577
|
-
}),
|
|
1876
|
+
}), Nn = /* @__PURE__ */ l({
|
|
1578
1877
|
__name: "df-datetime",
|
|
1579
|
-
props: /*@__PURE__*/
|
|
1878
|
+
props: /*@__PURE__*/ h({
|
|
1580
1879
|
inputType: {},
|
|
1581
1880
|
displayFormatDate: {},
|
|
1582
1881
|
displayFormatTime: {},
|
|
@@ -1595,156 +1894,182 @@ var Zt = {
|
|
|
1595
1894
|
passthroughAttrs: {},
|
|
1596
1895
|
density: {},
|
|
1597
1896
|
variant: {}
|
|
1598
|
-
},
|
|
1897
|
+
}, Z(Z({}, en), {}, {
|
|
1599
1898
|
inputType: "datetime",
|
|
1600
1899
|
displayFormatDate: "P",
|
|
1601
1900
|
displayFormatTime: "p"
|
|
1602
1901
|
})),
|
|
1603
1902
|
emits: ["update:modelValue", "click:clear"],
|
|
1604
1903
|
setup(e, { emit: i }) {
|
|
1605
|
-
let o = e, s = i, l = t(() => {
|
|
1606
|
-
var e;
|
|
1607
|
-
return (e = o.locale) == null ?
|
|
1608
|
-
}),
|
|
1904
|
+
let o = e, s = i, l = p(Yt, {}), u = t(() => {
|
|
1905
|
+
var e, t;
|
|
1906
|
+
return (e = (t = o.locale) == null ? P(l.dateTimeLocale) : t) == null ? P(Nt.dateTimeLocale) : e;
|
|
1907
|
+
}), d = t(() => {
|
|
1609
1908
|
var e, t;
|
|
1610
|
-
return (e = (t =
|
|
1611
|
-
}), { density:
|
|
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({
|
|
1612
1911
|
get() {
|
|
1613
|
-
return
|
|
1912
|
+
return P(T) === "date";
|
|
1614
1913
|
},
|
|
1615
1914
|
set(e) {
|
|
1616
|
-
|
|
1915
|
+
T.value = e ? "date" : "";
|
|
1617
1916
|
}
|
|
1618
|
-
}),
|
|
1917
|
+
}), k = t({
|
|
1619
1918
|
get() {
|
|
1620
|
-
return
|
|
1919
|
+
return P(T) === "time";
|
|
1621
1920
|
},
|
|
1622
1921
|
set(e) {
|
|
1623
|
-
|
|
1922
|
+
T.value = e ? "time" : "";
|
|
1624
1923
|
}
|
|
1625
|
-
})
|
|
1626
|
-
function
|
|
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) {
|
|
1627
1934
|
let r = e.split(/[TZ]/g);
|
|
1628
1935
|
return r[n] = t.split(/[TZ]/g)[n], r;
|
|
1629
1936
|
}
|
|
1630
|
-
let
|
|
1631
|
-
function
|
|
1632
|
-
if (e == null)
|
|
1633
|
-
else if (t === -1)
|
|
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));
|
|
1634
1941
|
else {
|
|
1635
1942
|
var n;
|
|
1636
|
-
let r =
|
|
1637
|
-
|
|
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");
|
|
1638
1945
|
}
|
|
1639
1946
|
}
|
|
1640
|
-
|
|
1641
|
-
let
|
|
1947
|
+
I(_, (e) => H(e, -1), { immediate: !0 });
|
|
1948
|
+
let U = t({
|
|
1642
1949
|
get() {
|
|
1643
|
-
let e =
|
|
1950
|
+
let e = P(L);
|
|
1644
1951
|
if (e == null) return null;
|
|
1645
1952
|
let t = new Date(e);
|
|
1646
1953
|
return Number.isNaN(t.getTime()) ? null : t;
|
|
1647
1954
|
},
|
|
1648
1955
|
set(e) {
|
|
1649
|
-
|
|
1956
|
+
H(F(e), 0);
|
|
1650
1957
|
}
|
|
1651
|
-
}),
|
|
1958
|
+
}), te = t({
|
|
1652
1959
|
get() {
|
|
1653
|
-
let e =
|
|
1960
|
+
let e = P(L);
|
|
1654
1961
|
return e == null ? "" : e.split(/[TZ]/g)[1].split(".")[0];
|
|
1655
1962
|
},
|
|
1656
1963
|
set(e) {
|
|
1657
|
-
|
|
1964
|
+
H(`T${e}`, 1);
|
|
1658
1965
|
}
|
|
1659
|
-
}),
|
|
1966
|
+
}), W = t({
|
|
1660
1967
|
get() {
|
|
1661
|
-
let e =
|
|
1662
|
-
return e == null ? "" :
|
|
1968
|
+
let e = P(U);
|
|
1969
|
+
return e == null ? "" : pe(e, P(x), { locale: u.value });
|
|
1663
1970
|
},
|
|
1664
1971
|
set(e) {
|
|
1665
1972
|
try {
|
|
1666
|
-
let t =
|
|
1667
|
-
|
|
1973
|
+
let t = me(e, P(x), /* @__PURE__ */ new Date(), { locale: u.value });
|
|
1974
|
+
H(F(t), 0);
|
|
1668
1975
|
} catch (e) {
|
|
1669
1976
|
console.error(e);
|
|
1670
1977
|
}
|
|
1671
1978
|
}
|
|
1672
|
-
}),
|
|
1979
|
+
}), G = t({
|
|
1673
1980
|
get() {
|
|
1674
|
-
let e =
|
|
1675
|
-
return e == null ? "" :
|
|
1981
|
+
let e = P(U);
|
|
1982
|
+
return e == null ? "" : pe(e, P(S), { locale: u.value });
|
|
1676
1983
|
},
|
|
1677
1984
|
set(e) {
|
|
1678
1985
|
let t = e.match(/(\d+):(\d+)\s?([a-zA-Z]+)?/);
|
|
1679
1986
|
if (t == null) return;
|
|
1680
|
-
let n =
|
|
1681
|
-
|
|
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));
|
|
1682
1989
|
}
|
|
1683
1990
|
});
|
|
1684
1991
|
return (t, i) => {
|
|
1685
|
-
let s =
|
|
1686
|
-
return
|
|
1687
|
-
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),
|
|
1688
1995
|
clearable: e.clearable,
|
|
1689
|
-
"onClick:clear":
|
|
1690
|
-
onBlur: i[
|
|
1996
|
+
"onClick:clear": ee,
|
|
1997
|
+
onBlur: i[12] || (i[12] = (e) => h.value = !0)
|
|
1691
1998
|
}), {
|
|
1692
|
-
default:
|
|
1999
|
+
default: R((t) => [a("div", { class: v([
|
|
1693
2000
|
"d-flex",
|
|
1694
2001
|
"w-100",
|
|
1695
|
-
["plain", "underlined"].includes(
|
|
2002
|
+
["plain", "underlined"].includes(P(y).variant) ? void 0 : "ml-4",
|
|
1696
2003
|
"df-input-wrapper",
|
|
1697
|
-
|
|
1698
|
-
]) }, [["date", "datetime"].includes(
|
|
2004
|
+
P(f)
|
|
2005
|
+
]) }, [["date", "datetime"].includes(P(b)) ? (C(), n(p, g({
|
|
1699
2006
|
key: 0,
|
|
1700
|
-
modelValue:
|
|
1701
|
-
"onUpdate:modelValue": i[
|
|
2007
|
+
modelValue: W.value,
|
|
2008
|
+
"onUpdate:modelValue": i[3] || (i[3] = (e) => W.value = e),
|
|
1702
2009
|
style: { "flex-grow": "4" },
|
|
1703
2010
|
density: "compact",
|
|
1704
2011
|
variant: "plain",
|
|
1705
2012
|
clearable: !1,
|
|
1706
2013
|
"hide-details": !0,
|
|
1707
|
-
readonly:
|
|
1708
|
-
disabled:
|
|
1709
|
-
name: `${
|
|
1710
|
-
placeholder:
|
|
2014
|
+
readonly: P(y).readonly,
|
|
2015
|
+
disabled: P(y).disabled,
|
|
2016
|
+
name: `${P(y).name}-date`,
|
|
2017
|
+
placeholder: P(y).placeholder
|
|
1711
2018
|
}, e.passthroughAttrs, {
|
|
1712
|
-
onClick: i[
|
|
1713
|
-
onKeydown: i[
|
|
2019
|
+
onClick: i[4] || (i[4] = (e) => T.value = "date"),
|
|
2020
|
+
onKeydown: i[5] || (i[5] = z((e) => T.value = "date", ["space"])),
|
|
1714
2021
|
onFocus: (e) => t.focus(),
|
|
1715
2022
|
onBlur: (e) => t.blur()
|
|
1716
2023
|
}), {
|
|
1717
|
-
default:
|
|
1718
|
-
|
|
1719
|
-
|
|
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),
|
|
1720
2028
|
"close-on-content-click": !1,
|
|
1721
2029
|
activator: "parent"
|
|
1722
2030
|
}, {
|
|
1723
|
-
default:
|
|
1724
|
-
modelValue:
|
|
1725
|
-
"onUpdate:modelValue": i[0] || (i[0] = (e) =>
|
|
1726
|
-
|
|
1727
|
-
|
|
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
|
|
1728
2037
|
}, {
|
|
1729
|
-
default:
|
|
2038
|
+
default: R(({ model: e, save: t, cancel: n, isPristine: r }) => [c(s, {
|
|
1730
2039
|
modelValue: e.value,
|
|
1731
2040
|
"onUpdate:modelValue": (t) => e.value = t,
|
|
1732
2041
|
"hide-header": !0,
|
|
1733
|
-
"first-day-of-week":
|
|
2042
|
+
"first-day-of-week": d.value,
|
|
1734
2043
|
"show-adjacent-months": !0,
|
|
1735
|
-
"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)
|
|
1736
2049
|
}, {
|
|
1737
|
-
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
|
+
])]),
|
|
1738
2059
|
_: 2
|
|
1739
2060
|
}, 1032, [
|
|
1740
2061
|
"modelValue",
|
|
1741
2062
|
"onUpdate:modelValue",
|
|
1742
|
-
"first-day-of-week"
|
|
2063
|
+
"first-day-of-week",
|
|
2064
|
+
"onUpdate:viewMode",
|
|
2065
|
+
"onUpdate:month",
|
|
2066
|
+
"onUpdate:year",
|
|
2067
|
+
"onDblclick"
|
|
1743
2068
|
])]),
|
|
1744
2069
|
_: 1
|
|
1745
2070
|
}, 8, ["modelValue"])]),
|
|
1746
2071
|
_: 1
|
|
1747
|
-
}, 8, ["modelValue"])]),
|
|
2072
|
+
}, 8, ["modelValue"])) : r("", !0)]),
|
|
1748
2073
|
_: 1
|
|
1749
2074
|
}, 16, [
|
|
1750
2075
|
"modelValue",
|
|
@@ -1754,50 +2079,67 @@ var Zt = {
|
|
|
1754
2079
|
"placeholder",
|
|
1755
2080
|
"onFocus",
|
|
1756
2081
|
"onBlur"
|
|
1757
|
-
])) : r("", !0), ["time", "datetime"].includes(
|
|
2082
|
+
])) : r("", !0), ["time", "datetime"].includes(P(b)) ? (C(), n(p, g({
|
|
1758
2083
|
key: 1,
|
|
1759
|
-
modelValue:
|
|
1760
|
-
"onUpdate:modelValue": i[
|
|
2084
|
+
modelValue: G.value,
|
|
2085
|
+
"onUpdate:modelValue": i[9] || (i[9] = (e) => G.value = e),
|
|
1761
2086
|
style: { "flex-grow": "3" },
|
|
1762
2087
|
density: "compact",
|
|
1763
2088
|
variant: "plain",
|
|
1764
2089
|
clearable: !1,
|
|
1765
2090
|
"hide-details": !0,
|
|
1766
|
-
readonly:
|
|
1767
|
-
disabled:
|
|
1768
|
-
name: `${
|
|
1769
|
-
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
|
|
1770
2095
|
}, e.passthroughAttrs, {
|
|
1771
|
-
onClick: i[
|
|
1772
|
-
onKeydown: i[
|
|
2096
|
+
onClick: i[10] || (i[10] = (e) => T.value = "time"),
|
|
2097
|
+
onKeydown: i[11] || (i[11] = z((e) => T.value = "time", ["space"])),
|
|
1773
2098
|
onFocus: (e) => t.focus(),
|
|
1774
2099
|
onBlur: (e) => t.blur()
|
|
1775
2100
|
}), {
|
|
1776
|
-
default:
|
|
1777
|
-
|
|
1778
|
-
|
|
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),
|
|
1779
2105
|
"close-on-content-click": !1,
|
|
1780
2106
|
activator: "parent"
|
|
1781
2107
|
}, {
|
|
1782
|
-
default:
|
|
1783
|
-
modelValue:
|
|
1784
|
-
"onUpdate:modelValue": i[
|
|
1785
|
-
|
|
1786
|
-
|
|
2108
|
+
default: R(() => [c(l, {
|
|
2109
|
+
modelValue: te.value,
|
|
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
|
|
1787
2114
|
}, {
|
|
1788
|
-
default:
|
|
2115
|
+
default: R(({ model: e, save: t, cancel: n, isPristine: r }) => [c(_, {
|
|
1789
2116
|
modelValue: e.value,
|
|
1790
2117
|
"onUpdate:modelValue": (t) => e.value = t,
|
|
1791
2118
|
"hide-header": !0,
|
|
1792
|
-
format: "24hr"
|
|
2119
|
+
format: "24hr",
|
|
2120
|
+
"onUpdate:viewMode": P(j),
|
|
2121
|
+
onDblclick: (e) => P(N)(e, ".v-time-picker-clock", t)
|
|
1793
2122
|
}, {
|
|
1794
|
-
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
|
+
])]),
|
|
1795
2132
|
_: 2
|
|
1796
|
-
}, 1032, [
|
|
2133
|
+
}, 1032, [
|
|
2134
|
+
"modelValue",
|
|
2135
|
+
"onUpdate:modelValue",
|
|
2136
|
+
"onUpdate:viewMode",
|
|
2137
|
+
"onDblclick"
|
|
2138
|
+
])]),
|
|
1797
2139
|
_: 1
|
|
1798
2140
|
}, 8, ["modelValue"])]),
|
|
1799
2141
|
_: 1
|
|
1800
|
-
}, 8, ["modelValue"])]),
|
|
2142
|
+
}, 8, ["modelValue"])) : r("", !0)]),
|
|
1801
2143
|
_: 1
|
|
1802
2144
|
}, 16, [
|
|
1803
2145
|
"modelValue",
|
|
@@ -1815,7 +2157,7 @@ var Zt = {
|
|
|
1815
2157
|
});
|
|
1816
2158
|
//#endregion
|
|
1817
2159
|
//#region \0@oxc-project+runtime@0.146.0/helpers/esm/asyncToGenerator.js
|
|
1818
|
-
function
|
|
2160
|
+
function Pn(e, t, n, r, i, a, o) {
|
|
1819
2161
|
try {
|
|
1820
2162
|
var s = e[a](o), c = s.value;
|
|
1821
2163
|
} catch (e) {
|
|
@@ -1824,16 +2166,16 @@ function rn(e, t, n, r, i, a, o) {
|
|
|
1824
2166
|
}
|
|
1825
2167
|
s.done ? t(c) : Promise.resolve(c).then(r, i);
|
|
1826
2168
|
}
|
|
1827
|
-
function
|
|
2169
|
+
function Fn(e) {
|
|
1828
2170
|
return function() {
|
|
1829
2171
|
var t = this, n = arguments;
|
|
1830
2172
|
return new Promise(function(r, i) {
|
|
1831
2173
|
var a = e.apply(t, n);
|
|
1832
2174
|
function o(e) {
|
|
1833
|
-
|
|
2175
|
+
Pn(a, r, i, o, s, "next", e);
|
|
1834
2176
|
}
|
|
1835
2177
|
function s(e) {
|
|
1836
|
-
|
|
2178
|
+
Pn(a, r, i, o, s, "throw", e);
|
|
1837
2179
|
}
|
|
1838
2180
|
o(void 0);
|
|
1839
2181
|
});
|
|
@@ -1841,9 +2183,9 @@ function an(e) {
|
|
|
1841
2183
|
}
|
|
1842
2184
|
//#endregion
|
|
1843
2185
|
//#region src/df-file.vue?vue&type=script&setup=true&lang.ts
|
|
1844
|
-
var
|
|
2186
|
+
var In = ["title", "aria-label"], Ln = /* @__PURE__ */ l({
|
|
1845
2187
|
__name: "df-file",
|
|
1846
|
-
props: /*@__PURE__*/
|
|
2188
|
+
props: /*@__PURE__*/ h({
|
|
1847
2189
|
comms: {},
|
|
1848
2190
|
touchInterval: {},
|
|
1849
2191
|
control: {},
|
|
@@ -1860,95 +2202,95 @@ var on = ["title", "aria-label"], sn = /* @__PURE__ */ l({
|
|
|
1860
2202
|
passthroughAttrs: {},
|
|
1861
2203
|
density: {},
|
|
1862
2204
|
variant: {}
|
|
1863
|
-
},
|
|
2205
|
+
}, en),
|
|
1864
2206
|
emits: ["update:modelValue", "click:clear"],
|
|
1865
2207
|
setup(e, { emit: i }) {
|
|
1866
|
-
let s = e, { density: l, densityClass: u, touched: d, value: f, vuetifyBindings: p } =
|
|
1867
|
-
function
|
|
1868
|
-
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);
|
|
1869
2211
|
}
|
|
1870
|
-
function
|
|
1871
|
-
return
|
|
2212
|
+
function E() {
|
|
2213
|
+
return E = Fn(function* () {
|
|
1872
2214
|
if (!f.value || !s.comms.getDownloadUrl) return;
|
|
1873
2215
|
let e = yield s.comms.getDownloadUrl(f.value), t = document.createElement("a");
|
|
1874
2216
|
t.href = e, t.download = "", t.rel = "noopener", t.click();
|
|
1875
|
-
}),
|
|
2217
|
+
}), E.apply(this, arguments);
|
|
1876
2218
|
}
|
|
1877
|
-
function
|
|
1878
|
-
f.value = null,
|
|
2219
|
+
function O() {
|
|
2220
|
+
f.value = null, _.value = 0, h.value = null, y.value = null, j();
|
|
1879
2221
|
}
|
|
1880
|
-
function
|
|
1881
|
-
|
|
2222
|
+
function k(e) {
|
|
2223
|
+
O(), Cn(s.control, e);
|
|
1882
2224
|
}
|
|
1883
|
-
let { setupTouchInterval:
|
|
1884
|
-
function
|
|
2225
|
+
let { setupTouchInterval: A, clearTouchInterval: j } = Sn(f, () => s.comms, () => s.touchInterval, k);
|
|
2226
|
+
function M() {
|
|
1885
2227
|
return N.apply(this, arguments);
|
|
1886
2228
|
}
|
|
1887
2229
|
function N() {
|
|
1888
|
-
return N =
|
|
1889
|
-
f.value && (yield s.comms.delete(f.value)),
|
|
2230
|
+
return N = Fn(function* () {
|
|
2231
|
+
f.value && (yield s.comms.delete(f.value)), O(), d.value = !0;
|
|
1890
2232
|
}), N.apply(this, arguments);
|
|
1891
2233
|
}
|
|
1892
|
-
function
|
|
1893
|
-
return
|
|
2234
|
+
function ee(e) {
|
|
2235
|
+
return F.apply(this, arguments);
|
|
1894
2236
|
}
|
|
1895
|
-
function
|
|
1896
|
-
return
|
|
1897
|
-
|
|
2237
|
+
function F() {
|
|
2238
|
+
return F = Fn(function* (e) {
|
|
2239
|
+
_.value = -1, h.value = e;
|
|
1898
2240
|
try {
|
|
1899
2241
|
f.value = yield s.comms.upload(e, (e, t) => {
|
|
1900
|
-
|
|
1901
|
-
}),
|
|
2242
|
+
_.value = Math.round(e * 100 / t);
|
|
2243
|
+
}), _.value = 100, d.value = !0, A();
|
|
1902
2244
|
} catch (e) {
|
|
1903
|
-
throw
|
|
2245
|
+
throw _.value = 0, h.value = null, y.value = null, e;
|
|
1904
2246
|
}
|
|
1905
|
-
}),
|
|
2247
|
+
}), F.apply(this, arguments);
|
|
1906
2248
|
}
|
|
1907
|
-
function
|
|
1908
|
-
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));
|
|
1909
2251
|
}
|
|
1910
2252
|
return (t, i) => {
|
|
1911
|
-
let f =
|
|
1912
|
-
return
|
|
1913
|
-
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),
|
|
1914
2256
|
clearable: "",
|
|
1915
|
-
"onClick:clear":
|
|
2257
|
+
"onClick:clear": M,
|
|
1916
2258
|
onBlur: i[1] || (i[1] = (e) => d.value = !0)
|
|
1917
2259
|
}), {
|
|
1918
|
-
"prepend-inner":
|
|
1919
|
-
loader:
|
|
2260
|
+
"prepend-inner": R(() => [c(P(V), { name: "mdi-paperclip" })]),
|
|
2261
|
+
loader: R(() => [h.value && _.value < 100 ? (C(), n(f, {
|
|
1920
2262
|
key: 0,
|
|
1921
|
-
"model-value":
|
|
1922
|
-
indeterminate:
|
|
2263
|
+
"model-value": _.value,
|
|
2264
|
+
indeterminate: _.value === -1
|
|
1923
2265
|
}, null, 8, ["model-value", "indeterminate"])) : r("", !0)]),
|
|
1924
|
-
default:
|
|
1925
|
-
modelValue:
|
|
1926
|
-
"onUpdate:modelValue": i[0] || (i[0] = (e) =>
|
|
1927
|
-
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,
|
|
1928
2270
|
density: "compact",
|
|
1929
2271
|
variant: "plain",
|
|
1930
|
-
readonly:
|
|
1931
|
-
disabled:
|
|
1932
|
-
name:
|
|
2272
|
+
readonly: P(p).readonly,
|
|
2273
|
+
disabled: P(p).disabled,
|
|
2274
|
+
name: P(p).name,
|
|
1933
2275
|
"hide-details": !0,
|
|
1934
2276
|
"show-size": !0,
|
|
1935
2277
|
multiple: !1,
|
|
1936
|
-
style:
|
|
2278
|
+
style: h.value && _.value < 100 ? "visibility: hidden" : "",
|
|
1937
2279
|
clearable: !1
|
|
1938
2280
|
}, e.passthroughAttrs, {
|
|
1939
2281
|
"prepend-icon": "",
|
|
1940
|
-
"onUpdate:modelValue":
|
|
2282
|
+
"onUpdate:modelValue": I,
|
|
1941
2283
|
onFocus: (e) => t.focus(),
|
|
1942
2284
|
onBlur: (e) => t.blur()
|
|
1943
|
-
}), o({ _: 2 }, [
|
|
2285
|
+
}), o({ _: 2 }, [S.value ? {
|
|
1944
2286
|
name: "append-inner",
|
|
1945
|
-
fn:
|
|
2287
|
+
fn: R(() => [a("button", {
|
|
1946
2288
|
type: "button",
|
|
1947
2289
|
class: "df-file-download-btn",
|
|
1948
|
-
title:
|
|
1949
|
-
"aria-label":
|
|
1950
|
-
onClick:
|
|
1951
|
-
}, [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)]),
|
|
1952
2294
|
key: "0"
|
|
1953
2295
|
} : void 0]), 1040, [
|
|
1954
2296
|
"modelValue",
|
|
@@ -1964,19 +2306,19 @@ var on = ["title", "aria-label"], sn = /* @__PURE__ */ l({
|
|
|
1964
2306
|
}, 16, ["class"]);
|
|
1965
2307
|
};
|
|
1966
2308
|
}
|
|
1967
|
-
}),
|
|
2309
|
+
}), Rn = [
|
|
1968
2310
|
"id",
|
|
1969
2311
|
"disabled",
|
|
1970
2312
|
"name",
|
|
1971
2313
|
"onFocus",
|
|
1972
2314
|
"onBlur"
|
|
1973
|
-
],
|
|
2315
|
+
], zn = ["for"], Bn = ["for"], Vn = ["for", "title"], Hn = [
|
|
1974
2316
|
"href",
|
|
1975
2317
|
"title",
|
|
1976
2318
|
"aria-label"
|
|
1977
|
-
],
|
|
2319
|
+
], Un = /* @__PURE__ */ l({
|
|
1978
2320
|
__name: "df-image",
|
|
1979
|
-
props: /*@__PURE__*/
|
|
2321
|
+
props: /*@__PURE__*/ h({
|
|
1980
2322
|
comms: {},
|
|
1981
2323
|
touchInterval: {},
|
|
1982
2324
|
control: {},
|
|
@@ -1993,146 +2335,146 @@ var on = ["title", "aria-label"], sn = /* @__PURE__ */ l({
|
|
|
1993
2335
|
passthroughAttrs: {},
|
|
1994
2336
|
density: {},
|
|
1995
2337
|
variant: {}
|
|
1996
|
-
},
|
|
2338
|
+
}, en),
|
|
1997
2339
|
emits: ["update:modelValue", "click:clear"],
|
|
1998
2340
|
setup(e, { emit: o }) {
|
|
1999
|
-
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(() => {
|
|
2000
2342
|
var e;
|
|
2001
|
-
return (e =
|
|
2343
|
+
return (e = S.value) == null ? f.value ? f.value : null : e;
|
|
2002
2344
|
}), N = t(() => !!f.value);
|
|
2003
|
-
function
|
|
2004
|
-
|
|
2345
|
+
function ee() {
|
|
2346
|
+
S.value && (URL.revokeObjectURL(S.value), S.value = null);
|
|
2005
2347
|
}
|
|
2006
2348
|
function I() {
|
|
2007
|
-
f.value = null,
|
|
2349
|
+
f.value = null, y.value = 0, _.value = null, ee(), H();
|
|
2008
2350
|
}
|
|
2009
|
-
function
|
|
2010
|
-
I(),
|
|
2351
|
+
function L(e) {
|
|
2352
|
+
I(), Cn(s.control, e);
|
|
2011
2353
|
}
|
|
2012
|
-
let { setupTouchInterval:
|
|
2013
|
-
|
|
2014
|
-
function
|
|
2015
|
-
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);
|
|
2016
2358
|
}
|
|
2017
|
-
function
|
|
2018
|
-
return
|
|
2019
|
-
f.value && (yield s.comms.delete(f.value)), I();
|
|
2020
|
-
}),
|
|
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);
|
|
2021
2363
|
}
|
|
2022
|
-
function
|
|
2023
|
-
return
|
|
2364
|
+
function W(e) {
|
|
2365
|
+
return G.apply(this, arguments);
|
|
2024
2366
|
}
|
|
2025
|
-
function
|
|
2026
|
-
return
|
|
2027
|
-
|
|
2367
|
+
function G() {
|
|
2368
|
+
return G = Fn(function* (e) {
|
|
2369
|
+
y.value = -1, _.value = e, ee(), S.value = URL.createObjectURL(e);
|
|
2028
2370
|
try {
|
|
2029
2371
|
f.value = yield s.comms.upload(e, (e, t) => {
|
|
2030
|
-
|
|
2031
|
-
}),
|
|
2372
|
+
y.value = Math.round(e * 100 / t);
|
|
2373
|
+
}), y.value = 100, d.value = !0, z();
|
|
2032
2374
|
} catch (e) {
|
|
2033
|
-
throw
|
|
2375
|
+
throw y.value = 0, _.value = null, ee(), e;
|
|
2034
2376
|
}
|
|
2035
|
-
}),
|
|
2377
|
+
}), G.apply(this, arguments);
|
|
2036
2378
|
}
|
|
2037
|
-
function
|
|
2379
|
+
function ne(e) {
|
|
2038
2380
|
if (!e.type.startsWith("image/")) {
|
|
2039
2381
|
console.error("Only image files are supported");
|
|
2040
2382
|
return;
|
|
2041
2383
|
}
|
|
2042
|
-
|
|
2384
|
+
W(e);
|
|
2043
2385
|
}
|
|
2044
|
-
function
|
|
2386
|
+
function re(e) {
|
|
2045
2387
|
var t;
|
|
2046
2388
|
let n = e.target, r = (t = n.files) == null ? void 0 : t[0];
|
|
2047
|
-
n.value = "", r &&
|
|
2389
|
+
n.value = "", r && ne(r);
|
|
2048
2390
|
}
|
|
2049
|
-
function
|
|
2050
|
-
|
|
2391
|
+
function ie() {
|
|
2392
|
+
k.value || (T.value += 1);
|
|
2051
2393
|
}
|
|
2052
|
-
function
|
|
2053
|
-
|
|
2394
|
+
function ae() {
|
|
2395
|
+
T.value = Math.max(0, T.value - 1);
|
|
2054
2396
|
}
|
|
2055
|
-
function
|
|
2397
|
+
function K(e) {
|
|
2056
2398
|
var t;
|
|
2057
|
-
if (
|
|
2399
|
+
if (T.value = 0, k.value) return;
|
|
2058
2400
|
let n = (t = e.dataTransfer) == null || (t = t.files) == null ? void 0 : t[0];
|
|
2059
|
-
n &&
|
|
2401
|
+
n && ne(n);
|
|
2060
2402
|
}
|
|
2061
2403
|
return (e, t) => {
|
|
2062
|
-
let o =
|
|
2063
|
-
return
|
|
2064
|
-
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)],
|
|
2065
2407
|
clearable: "",
|
|
2066
|
-
"onClick:clear":
|
|
2408
|
+
"onClick:clear": U,
|
|
2067
2409
|
onBlur: t[2] || (t[2] = (e) => d.value = !0)
|
|
2068
2410
|
}), {
|
|
2069
|
-
"prepend-inner":
|
|
2070
|
-
loader:
|
|
2411
|
+
"prepend-inner": R(() => [c(P(V), { name: "mdi-image" })]),
|
|
2412
|
+
loader: R(() => [_.value && y.value < 100 ? (C(), n(o, {
|
|
2071
2413
|
key: 0,
|
|
2072
|
-
"model-value":
|
|
2073
|
-
indeterminate:
|
|
2414
|
+
"model-value": y.value,
|
|
2415
|
+
indeterminate: y.value === -1
|
|
2074
2416
|
}, null, 8, ["model-value", "indeterminate"])) : r("", !0)]),
|
|
2075
|
-
default:
|
|
2076
|
-
class:
|
|
2077
|
-
"df-image-dragging":
|
|
2078
|
-
"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
|
|
2079
2421
|
}]]),
|
|
2080
|
-
onDragenter:
|
|
2081
|
-
onDragover: t[0] || (t[0] =
|
|
2082
|
-
onDragleave:
|
|
2083
|
-
onDrop:
|
|
2084
|
-
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"]))
|
|
2085
2427
|
}, [
|
|
2086
2428
|
a("input", {
|
|
2087
|
-
id:
|
|
2429
|
+
id: P(h),
|
|
2088
2430
|
ref_key: "fileInputRef",
|
|
2089
|
-
ref:
|
|
2431
|
+
ref: E,
|
|
2090
2432
|
type: "file",
|
|
2091
2433
|
accept: "image/*",
|
|
2092
2434
|
class: "df-image-native-input",
|
|
2093
|
-
disabled:
|
|
2094
|
-
name:
|
|
2095
|
-
onChange:
|
|
2435
|
+
disabled: k.value,
|
|
2436
|
+
name: P(p).name,
|
|
2437
|
+
onChange: re,
|
|
2096
2438
|
onFocus: (t) => e.focus(),
|
|
2097
2439
|
onBlur: (t) => e.blur()
|
|
2098
|
-
}, null, 40,
|
|
2099
|
-
M.value ? (
|
|
2440
|
+
}, null, 40, Rn),
|
|
2441
|
+
M.value ? (C(), i("label", {
|
|
2100
2442
|
key: 0,
|
|
2101
|
-
for:
|
|
2443
|
+
for: P(h),
|
|
2102
2444
|
class: "df-image-preview-label"
|
|
2103
|
-
}, [c(
|
|
2445
|
+
}, [c(x, {
|
|
2104
2446
|
src: M.value,
|
|
2105
2447
|
class: "df-image-preview",
|
|
2106
|
-
style:
|
|
2107
|
-
}, null, 8, ["src", "style"])], 8,
|
|
2448
|
+
style: b(_.value && y.value < 100 ? "visibility: hidden" : "")
|
|
2449
|
+
}, null, 8, ["src", "style"])], 8, zn)) : (C(), i("label", {
|
|
2108
2450
|
key: 1,
|
|
2109
|
-
for:
|
|
2451
|
+
for: P(h),
|
|
2110
2452
|
class: "df-image-placeholder"
|
|
2111
|
-
}, [c(
|
|
2112
|
-
M.value && !
|
|
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", {
|
|
2113
2455
|
key: 2,
|
|
2114
|
-
for:
|
|
2456
|
+
for: P(h),
|
|
2115
2457
|
class: "df-image-replace-btn",
|
|
2116
|
-
title:
|
|
2117
|
-
}, [c(
|
|
2118
|
-
N.value ? (
|
|
2458
|
+
title: P(m)("ImageReplace")
|
|
2459
|
+
}, [c(P(V), { name: "mdi-pencil" })], 8, Vn)) : r("", !0),
|
|
2460
|
+
N.value ? (C(), i("a", {
|
|
2119
2461
|
key: 3,
|
|
2120
|
-
href:
|
|
2462
|
+
href: P(f),
|
|
2121
2463
|
download: "",
|
|
2122
2464
|
target: "_blank",
|
|
2123
2465
|
rel: "noopener",
|
|
2124
2466
|
class: "df-image-download-btn",
|
|
2125
|
-
title:
|
|
2126
|
-
"aria-label":
|
|
2127
|
-
}, [c(
|
|
2467
|
+
title: P(m)("ImageDownload"),
|
|
2468
|
+
"aria-label": P(m)("ImageDownload")
|
|
2469
|
+
}, [c(P(V), { name: "mdi-download" })], 8, Hn)) : r("", !0)
|
|
2128
2470
|
], 34)]),
|
|
2129
2471
|
_: 1
|
|
2130
2472
|
}, 16, ["class"]);
|
|
2131
2473
|
};
|
|
2132
2474
|
}
|
|
2133
|
-
}),
|
|
2475
|
+
}), Wn = /* @__PURE__ */ l({
|
|
2134
2476
|
__name: "df-input",
|
|
2135
|
-
props: /*@__PURE__*/
|
|
2477
|
+
props: /*@__PURE__*/ h({
|
|
2136
2478
|
inputType: {},
|
|
2137
2479
|
precision: {},
|
|
2138
2480
|
step: {},
|
|
@@ -2152,7 +2494,7 @@ var on = ["title", "aria-label"], sn = /* @__PURE__ */ l({
|
|
|
2152
2494
|
passthroughAttrs: {},
|
|
2153
2495
|
density: {},
|
|
2154
2496
|
variant: {}
|
|
2155
|
-
},
|
|
2497
|
+
}, Z(Z({}, en), {}, {
|
|
2156
2498
|
inputType: "text",
|
|
2157
2499
|
precision: null,
|
|
2158
2500
|
step: void 0,
|
|
@@ -2161,52 +2503,52 @@ var on = ["title", "aria-label"], sn = /* @__PURE__ */ l({
|
|
|
2161
2503
|
})),
|
|
2162
2504
|
emits: ["update:modelValue", "click:clear"],
|
|
2163
2505
|
setup(e, { emit: a }) {
|
|
2164
|
-
let o = e, { densityClass: s, isRendered: l, label: u, shownErrors: d, touched:
|
|
2165
|
-
min:
|
|
2166
|
-
max:
|
|
2167
|
-
precision:
|
|
2168
|
-
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)
|
|
2169
2511
|
} : {});
|
|
2170
2512
|
return (e, t) => {
|
|
2171
|
-
let a =
|
|
2172
|
-
return
|
|
2513
|
+
let a = D("v-text-field"), o = D("v-number-input");
|
|
2514
|
+
return P(l) ? (C(), i("div", {
|
|
2173
2515
|
key: 0,
|
|
2174
|
-
class:
|
|
2175
|
-
}, [
|
|
2516
|
+
class: v(["df-input-container", [P(s), P(h)]])
|
|
2517
|
+
}, [T.value ? (C(), n(o, g({
|
|
2176
2518
|
key: 1,
|
|
2177
|
-
modelValue:
|
|
2178
|
-
"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),
|
|
2179
2521
|
density: "compact",
|
|
2180
2522
|
"control-variant": "stacked"
|
|
2181
|
-
},
|
|
2182
|
-
label:
|
|
2523
|
+
}, Z(Z({}, P(_)), E.value), { onBlur: t[3] || (t[3] = (e) => f.value = !0) }), {
|
|
2524
|
+
label: R((e) => [c(P($), {
|
|
2183
2525
|
data: e,
|
|
2184
|
-
label:
|
|
2526
|
+
label: P(u)
|
|
2185
2527
|
}, null, 8, ["data", "label"])]),
|
|
2186
|
-
message:
|
|
2528
|
+
message: R(({ message: e }) => [c(P(Q), {
|
|
2187
2529
|
message: e,
|
|
2188
|
-
errors:
|
|
2530
|
+
errors: P(d)
|
|
2189
2531
|
}, null, 8, ["message", "errors"])]),
|
|
2190
2532
|
_: 1
|
|
2191
|
-
}, 16, ["modelValue"])) : (
|
|
2533
|
+
}, 16, ["modelValue"])) : (C(), n(a, g({
|
|
2192
2534
|
key: 0,
|
|
2193
|
-
modelValue:
|
|
2194
|
-
"onUpdate:modelValue": t[0] || (t[0] = (e) =>
|
|
2195
|
-
type:
|
|
2196
|
-
},
|
|
2197
|
-
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($), {
|
|
2198
2540
|
data: e,
|
|
2199
|
-
label:
|
|
2541
|
+
label: P(u)
|
|
2200
2542
|
}, null, 8, ["data", "label"])]),
|
|
2201
|
-
message:
|
|
2543
|
+
message: R(({ message: e }) => [c(P(Q), {
|
|
2202
2544
|
message: e,
|
|
2203
|
-
errors:
|
|
2545
|
+
errors: P(d)
|
|
2204
2546
|
}, null, 8, ["message", "errors"])]),
|
|
2205
2547
|
_: 1
|
|
2206
2548
|
}, 16, ["modelValue", "type"]))], 2)) : r("", !0);
|
|
2207
2549
|
};
|
|
2208
2550
|
}
|
|
2209
|
-
}),
|
|
2551
|
+
}), Gn = Oe.create({
|
|
2210
2552
|
name: "classAttribute",
|
|
2211
2553
|
addGlobalAttributes() {
|
|
2212
2554
|
return [{
|
|
@@ -2224,8 +2566,8 @@ var on = ["title", "aria-label"], sn = /* @__PURE__ */ l({
|
|
|
2224
2566
|
}];
|
|
2225
2567
|
}
|
|
2226
2568
|
});
|
|
2227
|
-
function
|
|
2228
|
-
return
|
|
2569
|
+
function Kn(e, t) {
|
|
2570
|
+
return ke.create({
|
|
2229
2571
|
name: e,
|
|
2230
2572
|
parseHTML() {
|
|
2231
2573
|
return [{ tag: `span.${t}` }];
|
|
@@ -2233,13 +2575,13 @@ function gn(e, t) {
|
|
|
2233
2575
|
renderHTML({ HTMLAttributes: e }) {
|
|
2234
2576
|
return [
|
|
2235
2577
|
"span",
|
|
2236
|
-
|
|
2578
|
+
je(e, { class: t }),
|
|
2237
2579
|
0
|
|
2238
2580
|
];
|
|
2239
2581
|
}
|
|
2240
2582
|
});
|
|
2241
2583
|
}
|
|
2242
|
-
var
|
|
2584
|
+
var qn = Kn("marker", "marker"), Jn = Kn("spoiler", "spoiler"), Yn = [
|
|
2243
2585
|
{
|
|
2244
2586
|
key: "ArticleCategory",
|
|
2245
2587
|
kind: "heading",
|
|
@@ -2289,67 +2631,67 @@ var _n = gn("marker", "marker"), vn = gn("spoiler", "spoiler"), yn = [
|
|
|
2289
2631
|
className: "fancy-code fancy-code-bright"
|
|
2290
2632
|
}
|
|
2291
2633
|
];
|
|
2292
|
-
function
|
|
2634
|
+
function Xn(e) {
|
|
2293
2635
|
let { state: t } = e, { $from: n } = t.selection;
|
|
2294
2636
|
return n.depth > 0 || t.doc.content.size === 0 ? n : t.doc.resolve(Math.min(1, t.doc.content.size));
|
|
2295
2637
|
}
|
|
2296
|
-
function
|
|
2297
|
-
return
|
|
2638
|
+
function Zn(e) {
|
|
2639
|
+
return Xn(e).parent;
|
|
2298
2640
|
}
|
|
2299
|
-
function
|
|
2300
|
-
let n =
|
|
2641
|
+
function Qn(e, t) {
|
|
2642
|
+
let n = Xn(e);
|
|
2301
2643
|
for (let e = n.depth; e >= 0; --e) if (n.node(e).type.name === t) return n.node(e);
|
|
2302
2644
|
return null;
|
|
2303
2645
|
}
|
|
2304
|
-
function
|
|
2646
|
+
function $n(e, t) {
|
|
2305
2647
|
switch (t.kind) {
|
|
2306
2648
|
case "heading": {
|
|
2307
|
-
let n =
|
|
2649
|
+
let n = Zn(e);
|
|
2308
2650
|
return n.type.name === "heading" && n.attrs.level === t.level && n.attrs.class === t.className;
|
|
2309
2651
|
}
|
|
2310
2652
|
case "paragraph": {
|
|
2311
|
-
let n =
|
|
2653
|
+
let n = Zn(e);
|
|
2312
2654
|
return n.type.name === "paragraph" && n.attrs.class === t.className;
|
|
2313
2655
|
}
|
|
2314
2656
|
case "codeBlock": {
|
|
2315
|
-
let n =
|
|
2657
|
+
let n = Zn(e);
|
|
2316
2658
|
return n.type.name === "codeBlock" && n.attrs.class === t.className;
|
|
2317
2659
|
}
|
|
2318
2660
|
case "blockquote": {
|
|
2319
|
-
let n =
|
|
2661
|
+
let n = Qn(e, "blockquote");
|
|
2320
2662
|
return !!n && n.attrs.class === t.className;
|
|
2321
2663
|
}
|
|
2322
2664
|
case "mark": return e.isActive(t.markName);
|
|
2323
2665
|
default: return !1;
|
|
2324
2666
|
}
|
|
2325
2667
|
}
|
|
2326
|
-
function
|
|
2668
|
+
function er(e, t) {
|
|
2327
2669
|
let n = e.chain().focus(), { $from: r } = e.state.selection;
|
|
2328
|
-
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) {
|
|
2329
2671
|
case "heading":
|
|
2330
|
-
|
|
2672
|
+
$n(e, t) ? n.setParagraph().updateAttributes("paragraph", { class: null }).run() : n.setNode("heading", { level: t.level }).updateAttributes("heading", { class: t.className }).run();
|
|
2331
2673
|
break;
|
|
2332
2674
|
case "paragraph":
|
|
2333
|
-
|
|
2675
|
+
$n(e, t) ? n.setParagraph().updateAttributes("paragraph", { class: null }).run() : n.setParagraph().updateAttributes("paragraph", { class: t.className }).run();
|
|
2334
2676
|
break;
|
|
2335
2677
|
case "blockquote":
|
|
2336
|
-
|
|
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();
|
|
2337
2679
|
break;
|
|
2338
2680
|
case "codeBlock":
|
|
2339
|
-
|
|
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();
|
|
2340
2682
|
break;
|
|
2341
2683
|
case "mark": n.toggleMark(t.markName).run();
|
|
2342
2684
|
}
|
|
2343
2685
|
}
|
|
2344
2686
|
//#endregion
|
|
2345
2687
|
//#region src/helpers/rtf-editor/image-paste.ts
|
|
2346
|
-
function
|
|
2688
|
+
function tr(e) {
|
|
2347
2689
|
return new Promise((t, n) => {
|
|
2348
2690
|
let r = new FileReader();
|
|
2349
2691
|
r.onload = () => t(r.result), r.onerror = () => n(r.error), r.readAsDataURL(e);
|
|
2350
2692
|
});
|
|
2351
2693
|
}
|
|
2352
|
-
function
|
|
2694
|
+
function nr(e) {
|
|
2353
2695
|
if (!e) return [];
|
|
2354
2696
|
let t = [];
|
|
2355
2697
|
return Array.from(e.items || []).forEach((e) => {
|
|
@@ -2361,25 +2703,25 @@ function En(e) {
|
|
|
2361
2703
|
e.type.startsWith("image/") && t.push(e);
|
|
2362
2704
|
}), t;
|
|
2363
2705
|
}
|
|
2364
|
-
function
|
|
2706
|
+
function rr(e) {
|
|
2365
2707
|
let t = 0;
|
|
2366
2708
|
return e.forEach((e) => {
|
|
2367
|
-
e.type.name === "image" ? t += 1 : e.content.size && (t +=
|
|
2709
|
+
e.type.name === "image" ? t += 1 : e.content.size && (t += rr(e.content));
|
|
2368
2710
|
}), t;
|
|
2369
2711
|
}
|
|
2370
|
-
function
|
|
2712
|
+
function ir(e, t, n) {
|
|
2371
2713
|
let r = [];
|
|
2372
2714
|
return e.forEach((e) => {
|
|
2373
|
-
e.type.name === "image" && n.index < t.length ? (r.push(e.type.create(
|
|
2374
|
-
}),
|
|
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);
|
|
2375
2717
|
}
|
|
2376
|
-
function
|
|
2718
|
+
function ar(e) {
|
|
2377
2719
|
return (t, n, r) => {
|
|
2378
|
-
let i =
|
|
2379
|
-
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) => {
|
|
2380
2722
|
var i;
|
|
2381
|
-
if (
|
|
2382
|
-
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);
|
|
2383
2725
|
t.dispatch(t.state.tr.replaceSelection(i).scrollIntoView());
|
|
2384
2726
|
return;
|
|
2385
2727
|
}
|
|
@@ -2392,11 +2734,11 @@ function kn(e) {
|
|
|
2392
2734
|
}
|
|
2393
2735
|
//#endregion
|
|
2394
2736
|
//#region src/helpers/rtf-editor/link-with-download.ts
|
|
2395
|
-
var
|
|
2737
|
+
var or = Pe.extend({
|
|
2396
2738
|
name: "link",
|
|
2397
2739
|
addAttributes() {
|
|
2398
2740
|
var e;
|
|
2399
|
-
return
|
|
2741
|
+
return Z(Z({}, (e = this.parent) == null ? void 0 : e.call(this)), {}, { download: {
|
|
2400
2742
|
default: null,
|
|
2401
2743
|
parseHTML: (e) => e.getAttribute("download"),
|
|
2402
2744
|
renderHTML: (e) => e.download ? { download: e.download } : {}
|
|
@@ -2405,7 +2747,7 @@ var An = Ie.extend({
|
|
|
2405
2747
|
});
|
|
2406
2748
|
//#endregion
|
|
2407
2749
|
//#region src/helpers/rtf-editor/media-embed.ts
|
|
2408
|
-
function
|
|
2750
|
+
function sr(e) {
|
|
2409
2751
|
let t;
|
|
2410
2752
|
try {
|
|
2411
2753
|
t = new URL(e);
|
|
@@ -2431,7 +2773,7 @@ function jn(e) {
|
|
|
2431
2773
|
}
|
|
2432
2774
|
return null;
|
|
2433
2775
|
}
|
|
2434
|
-
var
|
|
2776
|
+
var cr = Ae.create({
|
|
2435
2777
|
name: "mediaEmbed",
|
|
2436
2778
|
group: "block",
|
|
2437
2779
|
atom: !0,
|
|
@@ -2443,7 +2785,7 @@ var Mn = Me.create({
|
|
|
2443
2785
|
return [{ tag: "iframe.media-embed" }];
|
|
2444
2786
|
},
|
|
2445
2787
|
renderHTML({ HTMLAttributes: e }) {
|
|
2446
|
-
return ["iframe",
|
|
2788
|
+
return ["iframe", je({
|
|
2447
2789
|
class: "media-embed",
|
|
2448
2790
|
frameborder: "0",
|
|
2449
2791
|
allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",
|
|
@@ -2453,32 +2795,32 @@ var Mn = Me.create({
|
|
|
2453
2795
|
});
|
|
2454
2796
|
//#endregion
|
|
2455
2797
|
//#region src/helpers/rtf-editor/use-editor-tick.ts
|
|
2456
|
-
function
|
|
2457
|
-
let t =
|
|
2798
|
+
function lr(e) {
|
|
2799
|
+
let t = w(0), n, r = () => {
|
|
2458
2800
|
t.value += 1;
|
|
2459
2801
|
}, i = (e) => {
|
|
2460
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);
|
|
2461
2803
|
};
|
|
2462
|
-
return
|
|
2804
|
+
return I(e, i, { immediate: !0 }), x(() => i(void 0)), t;
|
|
2463
2805
|
}
|
|
2464
2806
|
//#endregion
|
|
2465
2807
|
//#region src/helpers/rtf-editor/rtf-toolbar.vue?vue&type=script&setup=true&lang.ts
|
|
2466
|
-
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({
|
|
2467
2809
|
__name: "rtf-toolbar",
|
|
2468
2810
|
props: {
|
|
2469
2811
|
editor: { default: void 0 },
|
|
2470
2812
|
buttonSize: { default: "small" }
|
|
2471
2813
|
},
|
|
2472
2814
|
setup(o) {
|
|
2473
|
-
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(() => {
|
|
2474
2816
|
var e;
|
|
2475
2817
|
return p.value, !!((e = l.editor) != null && e.isEditable);
|
|
2476
|
-
}),
|
|
2818
|
+
}), h = t(() => ({
|
|
2477
2819
|
size: u.value,
|
|
2478
2820
|
density: "comfortable",
|
|
2479
2821
|
variant: "text",
|
|
2480
|
-
disabled: !
|
|
2481
|
-
})),
|
|
2822
|
+
disabled: !m.value
|
|
2823
|
+
})), _ = t(() => ({
|
|
2482
2824
|
buttonSize: u.value,
|
|
2483
2825
|
buttonDensity: "comfortable"
|
|
2484
2826
|
})), y = t(() => {
|
|
@@ -2507,210 +2849,210 @@ var Pn = { class: "rtf-toolbar-group" }, Fn = { class: "d-flex justify-end ga-2
|
|
|
2507
2849
|
if (y.value.alignRight) return "right";
|
|
2508
2850
|
if (y.value.alignJustify) return "justify";
|
|
2509
2851
|
});
|
|
2510
|
-
function
|
|
2852
|
+
function x(e) {
|
|
2511
2853
|
var t;
|
|
2512
2854
|
typeof e == "string" && ((t = f.value) == null || t.chain().focus().setTextAlign(e).run());
|
|
2513
2855
|
}
|
|
2514
|
-
let
|
|
2515
|
-
function
|
|
2516
|
-
let a = new
|
|
2856
|
+
let S = [];
|
|
2857
|
+
function E(e, t, n, r, i) {
|
|
2858
|
+
let a = new te({
|
|
2517
2859
|
value: {
|
|
2518
2860
|
icon: e,
|
|
2519
2861
|
renderAs: "text",
|
|
2520
2862
|
showIcon: !0,
|
|
2521
2863
|
showLabel: !1
|
|
2522
2864
|
},
|
|
2523
|
-
actions: [new
|
|
2865
|
+
actions: [new W((e, n, r) => (t(), n(e, r)))]
|
|
2524
2866
|
});
|
|
2525
|
-
return
|
|
2867
|
+
return S.push({
|
|
2526
2868
|
action: a,
|
|
2527
2869
|
title: n,
|
|
2528
2870
|
disabled: r,
|
|
2529
2871
|
active: i
|
|
2530
2872
|
}), a;
|
|
2531
2873
|
}
|
|
2532
|
-
function
|
|
2874
|
+
function O({ action: e, title: t, disabled: n, active: r }) {
|
|
2533
2875
|
var i;
|
|
2534
2876
|
let a = {
|
|
2535
2877
|
title: t(),
|
|
2536
2878
|
icon: !0
|
|
2537
2879
|
};
|
|
2538
|
-
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 }));
|
|
2539
2881
|
let o = !n();
|
|
2540
2882
|
e.enabled !== o && (e.access = o ? "editable" : "disabled");
|
|
2541
2883
|
}
|
|
2542
|
-
let
|
|
2884
|
+
let k = [E("mdi-undo", () => {
|
|
2543
2885
|
var e;
|
|
2544
2886
|
return (e = f.value) == null ? void 0 : e.chain().focus().undo().run();
|
|
2545
|
-
}, () => d
|
|
2887
|
+
}, () => d("Undo"), () => !m.value || !y.value.canUndo), E("mdi-redo", () => {
|
|
2546
2888
|
var e;
|
|
2547
2889
|
return (e = f.value) == null ? void 0 : e.chain().focus().redo().run();
|
|
2548
|
-
}, () => d
|
|
2890
|
+
}, () => d("Redo"), () => !m.value || !y.value.canRedo)], j = [E("mdi-format-bold", () => {
|
|
2549
2891
|
var e;
|
|
2550
2892
|
return (e = f.value) == null ? void 0 : e.chain().focus().toggleBold().run();
|
|
2551
|
-
}, () => d
|
|
2893
|
+
}, () => d("Bold"), () => !m.value, () => y.value.bold), E("mdi-format-italic", () => {
|
|
2552
2894
|
var e;
|
|
2553
2895
|
return (e = f.value) == null ? void 0 : e.chain().focus().toggleItalic().run();
|
|
2554
|
-
}, () => d
|
|
2896
|
+
}, () => d("Italic"), () => !m.value, () => y.value.italic)], M = [
|
|
2555
2897
|
{
|
|
2556
2898
|
value: "left",
|
|
2557
2899
|
icon: "mdi-format-align-left",
|
|
2558
|
-
title: () => d
|
|
2900
|
+
title: () => d("AlignLeft")
|
|
2559
2901
|
},
|
|
2560
2902
|
{
|
|
2561
2903
|
value: "center",
|
|
2562
2904
|
icon: "mdi-format-align-center",
|
|
2563
|
-
title: () => d
|
|
2905
|
+
title: () => d("AlignCenter")
|
|
2564
2906
|
},
|
|
2565
2907
|
{
|
|
2566
2908
|
value: "right",
|
|
2567
2909
|
icon: "mdi-format-align-right",
|
|
2568
|
-
title: () => d
|
|
2910
|
+
title: () => d("AlignRight")
|
|
2569
2911
|
},
|
|
2570
2912
|
{
|
|
2571
2913
|
value: "justify",
|
|
2572
2914
|
icon: "mdi-format-align-justify",
|
|
2573
|
-
title: () => d
|
|
2915
|
+
title: () => d("AlignJustify")
|
|
2574
2916
|
}
|
|
2575
|
-
].map((e) =>
|
|
2576
|
-
|
|
2917
|
+
].map((e) => E(e.icon, () => x(e.value), e.title, () => !m.value, () => b.value === e.value)), N = [
|
|
2918
|
+
E("mdi-format-list-bulleted", () => {
|
|
2577
2919
|
var e;
|
|
2578
2920
|
return (e = f.value) == null ? void 0 : e.chain().focus().toggleBulletList().run();
|
|
2579
|
-
}, () => d
|
|
2580
|
-
|
|
2921
|
+
}, () => d("BulletedList"), () => !m.value, () => y.value.bulletList),
|
|
2922
|
+
E("mdi-format-list-numbered", () => {
|
|
2581
2923
|
var e;
|
|
2582
2924
|
return (e = f.value) == null ? void 0 : e.chain().focus().toggleOrderedList().run();
|
|
2583
|
-
}, () => d
|
|
2584
|
-
|
|
2925
|
+
}, () => d("NumberedList"), () => !m.value, () => y.value.orderedList),
|
|
2926
|
+
E("mdi-format-indent-decrease", () => {
|
|
2585
2927
|
var e;
|
|
2586
2928
|
return (e = f.value) == null ? void 0 : e.chain().focus().liftListItem("listItem").run();
|
|
2587
|
-
}, () => d
|
|
2588
|
-
|
|
2929
|
+
}, () => d("Outdent"), () => !m.value || !y.value.canLift),
|
|
2930
|
+
E("mdi-format-indent-increase", () => {
|
|
2589
2931
|
var e;
|
|
2590
2932
|
return (e = f.value) == null ? void 0 : e.chain().focus().sinkListItem("listItem").run();
|
|
2591
|
-
}, () => d
|
|
2933
|
+
}, () => d("Indent"), () => !m.value || !y.value.canSink)
|
|
2592
2934
|
];
|
|
2593
|
-
|
|
2594
|
-
|
|
2935
|
+
L(() => {
|
|
2936
|
+
S.forEach(O);
|
|
2595
2937
|
});
|
|
2596
|
-
let
|
|
2938
|
+
let ee = t(() => [
|
|
2597
2939
|
{
|
|
2598
2940
|
level: 0,
|
|
2599
|
-
label: d
|
|
2941
|
+
label: d("Paragraph")
|
|
2600
2942
|
},
|
|
2601
2943
|
{
|
|
2602
2944
|
level: 1,
|
|
2603
|
-
label: d
|
|
2945
|
+
label: d("Heading1")
|
|
2604
2946
|
},
|
|
2605
2947
|
{
|
|
2606
2948
|
level: 2,
|
|
2607
|
-
label: d
|
|
2949
|
+
label: d("Heading2")
|
|
2608
2950
|
},
|
|
2609
2951
|
{
|
|
2610
2952
|
level: 3,
|
|
2611
|
-
label: d
|
|
2953
|
+
label: d("Heading3")
|
|
2612
2954
|
},
|
|
2613
2955
|
{
|
|
2614
2956
|
level: 4,
|
|
2615
|
-
label: d
|
|
2957
|
+
label: d("Heading4")
|
|
2616
2958
|
},
|
|
2617
2959
|
{
|
|
2618
2960
|
level: 5,
|
|
2619
|
-
label: d
|
|
2961
|
+
label: d("Heading5")
|
|
2620
2962
|
},
|
|
2621
2963
|
{
|
|
2622
2964
|
level: 6,
|
|
2623
|
-
label: d
|
|
2965
|
+
label: d("Heading6")
|
|
2624
2966
|
}
|
|
2625
2967
|
]);
|
|
2626
|
-
function
|
|
2968
|
+
function F(e) {
|
|
2627
2969
|
var t, n;
|
|
2628
2970
|
return p.value, e === 0 ? !!((t = f.value) != null && t.isActive("paragraph")) : !!((n = f.value) != null && n.isActive("heading", { level: e }));
|
|
2629
2971
|
}
|
|
2630
|
-
let
|
|
2972
|
+
let I = t(() => {
|
|
2631
2973
|
var e, t;
|
|
2632
|
-
return (e = (t =
|
|
2974
|
+
return (e = (t = ee.value.find((e) => F(e.level))) == null ? void 0 : t.label) == null ? d("Paragraph") : e;
|
|
2633
2975
|
});
|
|
2634
|
-
function
|
|
2976
|
+
function B(e) {
|
|
2635
2977
|
var t;
|
|
2636
2978
|
let n = (t = f.value) == null ? void 0 : t.chain().focus();
|
|
2637
2979
|
n && (e === 0 ? n.setParagraph().run() : n.toggleHeading({ level: e }).run());
|
|
2638
2980
|
}
|
|
2639
|
-
let
|
|
2640
|
-
function
|
|
2641
|
-
return p.value, !!f.value &&
|
|
2981
|
+
let H = Yn;
|
|
2982
|
+
function U(e) {
|
|
2983
|
+
return p.value, !!f.value && $n(f.value, e);
|
|
2642
2984
|
}
|
|
2643
|
-
let
|
|
2644
|
-
function
|
|
2985
|
+
let G = w(""), ne = w(!1);
|
|
2986
|
+
function re() {
|
|
2645
2987
|
var e, t, n;
|
|
2646
2988
|
let r = (e = (t = f.value) == null ? void 0 : t.getAttributes("link")) == null ? {} : e;
|
|
2647
|
-
|
|
2989
|
+
G.value = (n = r.href) == null ? "" : n, ne.value = !!r.download;
|
|
2648
2990
|
}
|
|
2649
|
-
function
|
|
2991
|
+
function ie() {
|
|
2650
2992
|
var e;
|
|
2651
|
-
|
|
2993
|
+
G.value && ((e = f.value) == null || e.chain().focus().extendMarkRange("link").setLink({ href: G.value }).updateAttributes("link", { download: ne.value ? "file" : null }).run());
|
|
2652
2994
|
}
|
|
2653
|
-
function
|
|
2995
|
+
function ae() {
|
|
2654
2996
|
var e;
|
|
2655
2997
|
(e = f.value) == null || e.chain().focus().unsetLink().run();
|
|
2656
2998
|
}
|
|
2657
|
-
let
|
|
2658
|
-
function
|
|
2999
|
+
let K = w(""), q = w();
|
|
3000
|
+
function se() {
|
|
2659
3001
|
var e;
|
|
2660
|
-
|
|
3002
|
+
K.value && ((e = f.value) == null || e.chain().focus().setImage({ src: K.value }).run(), K.value = "");
|
|
2661
3003
|
}
|
|
2662
|
-
function
|
|
3004
|
+
function ce() {
|
|
2663
3005
|
var e;
|
|
2664
|
-
(e =
|
|
3006
|
+
(e = q.value) == null || e.click();
|
|
2665
3007
|
}
|
|
2666
|
-
function
|
|
2667
|
-
return
|
|
3008
|
+
function le(e) {
|
|
3009
|
+
return J.apply(this, arguments);
|
|
2668
3010
|
}
|
|
2669
|
-
function
|
|
2670
|
-
return
|
|
3011
|
+
function J() {
|
|
3012
|
+
return J = Fn(function* (e) {
|
|
2671
3013
|
var t, n;
|
|
2672
3014
|
let r = (t = e.target.files) == null ? void 0 : t[0];
|
|
2673
3015
|
if (!r) return;
|
|
2674
|
-
let i = yield
|
|
3016
|
+
let i = yield tr(r);
|
|
2675
3017
|
(n = f.value) == null || n.chain().focus().setImage({ src: i }).run(), e.target.value = "";
|
|
2676
|
-
}),
|
|
3018
|
+
}), J.apply(this, arguments);
|
|
2677
3019
|
}
|
|
2678
|
-
let
|
|
2679
|
-
function
|
|
3020
|
+
let Y = w("");
|
|
3021
|
+
function ue() {
|
|
2680
3022
|
var e;
|
|
2681
|
-
if (!
|
|
2682
|
-
let t =
|
|
3023
|
+
if (!Y.value) return;
|
|
3024
|
+
let t = sr(Y.value), n = (e = f.value) == null ? void 0 : e.chain().focus();
|
|
2683
3025
|
n && (t ? n.insertContent({
|
|
2684
3026
|
type: "mediaEmbed",
|
|
2685
3027
|
attrs: { src: t }
|
|
2686
3028
|
}).run() : n.insertContent({
|
|
2687
3029
|
type: "text",
|
|
2688
|
-
text:
|
|
3030
|
+
text: Y.value,
|
|
2689
3031
|
marks: [{
|
|
2690
3032
|
type: "link",
|
|
2691
|
-
attrs: { href:
|
|
3033
|
+
attrs: { href: Y.value }
|
|
2692
3034
|
}]
|
|
2693
|
-
}).run(),
|
|
3035
|
+
}).run(), Y.value = "");
|
|
2694
3036
|
}
|
|
2695
3037
|
return (t, o) => {
|
|
2696
|
-
let l =
|
|
2697
|
-
return
|
|
2698
|
-
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),
|
|
2699
3041
|
c(l, {
|
|
2700
3042
|
vertical: "",
|
|
2701
3043
|
inset: "",
|
|
2702
3044
|
class: "mx-1"
|
|
2703
3045
|
}),
|
|
2704
|
-
c(u,
|
|
3046
|
+
c(u, g(h.value, {
|
|
2705
3047
|
icon: "",
|
|
2706
3048
|
rounded: "sm",
|
|
2707
|
-
title:
|
|
3049
|
+
title: P(d)("SelectAll"),
|
|
2708
3050
|
onClick: o[0] || (o[0] = (e) => {
|
|
2709
3051
|
var t;
|
|
2710
3052
|
return (t = f.value) == null ? void 0 : t.chain().focus().selectAll().run();
|
|
2711
3053
|
})
|
|
2712
3054
|
}), {
|
|
2713
|
-
default:
|
|
3055
|
+
default: R(() => [c(P(V), { name: "mdi-select-all" })]),
|
|
2714
3056
|
_: 1
|
|
2715
3057
|
}, 16, ["title"]),
|
|
2716
3058
|
c(l, {
|
|
@@ -2718,19 +3060,19 @@ var Pn = { class: "rtf-toolbar-group" }, Fn = { class: "d-flex justify-end ga-2
|
|
|
2718
3060
|
inset: "",
|
|
2719
3061
|
class: "mx-1"
|
|
2720
3062
|
}),
|
|
2721
|
-
c(
|
|
2722
|
-
activator:
|
|
2723
|
-
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)]),
|
|
2724
3066
|
_: 1
|
|
2725
3067
|
}, 16)]),
|
|
2726
|
-
default:
|
|
2727
|
-
default:
|
|
3068
|
+
default: R(() => [c(x, { density: "compact" }, {
|
|
3069
|
+
default: R(() => [(C(!0), i(e, null, T(ee.value, (e) => (C(), n(b, {
|
|
2728
3070
|
key: e.level,
|
|
2729
|
-
active:
|
|
2730
|
-
onClick: (t) =>
|
|
3071
|
+
active: F(e.level),
|
|
3072
|
+
onClick: (t) => B(e.level)
|
|
2731
3073
|
}, {
|
|
2732
|
-
default:
|
|
2733
|
-
default:
|
|
3074
|
+
default: R(() => [c(p, null, {
|
|
3075
|
+
default: R(() => [s(A(e.label), 1)]),
|
|
2734
3076
|
_: 2
|
|
2735
3077
|
}, 1024)]),
|
|
2736
3078
|
_: 2
|
|
@@ -2739,19 +3081,19 @@ var Pn = { class: "rtf-toolbar-group" }, Fn = { class: "d-flex justify-end ga-2
|
|
|
2739
3081
|
})]),
|
|
2740
3082
|
_: 1
|
|
2741
3083
|
}),
|
|
2742
|
-
c(
|
|
2743
|
-
activator:
|
|
2744
|
-
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)]),
|
|
2745
3087
|
_: 1
|
|
2746
3088
|
}, 16)]),
|
|
2747
|
-
default:
|
|
2748
|
-
default:
|
|
3089
|
+
default: R(() => [c(x, { density: "compact" }, {
|
|
3090
|
+
default: R(() => [(C(!0), i(e, null, T(P(H), (e) => (C(), n(b, {
|
|
2749
3091
|
key: e.key,
|
|
2750
|
-
active:
|
|
2751
|
-
onClick: (t) => f.value &&
|
|
3092
|
+
active: U(e),
|
|
3093
|
+
onClick: (t) => f.value && P(er)(f.value, e)
|
|
2752
3094
|
}, {
|
|
2753
|
-
default:
|
|
2754
|
-
default:
|
|
3095
|
+
default: R(() => [c(p, null, {
|
|
3096
|
+
default: R(() => [s(A(P(d)(e.key)), 1)]),
|
|
2755
3097
|
_: 2
|
|
2756
3098
|
}, 1024)]),
|
|
2757
3099
|
_: 2
|
|
@@ -2765,73 +3107,73 @@ var Pn = { class: "rtf-toolbar-group" }, Fn = { class: "d-flex justify-end ga-2
|
|
|
2765
3107
|
inset: "",
|
|
2766
3108
|
class: "mx-1"
|
|
2767
3109
|
}),
|
|
2768
|
-
c(
|
|
3110
|
+
c(En, g({ actions: j }, _.value, { "show-as-group": "grouped-no-borders" }), null, 16),
|
|
2769
3111
|
c(l, {
|
|
2770
3112
|
vertical: "",
|
|
2771
3113
|
inset: "",
|
|
2772
3114
|
class: "mx-1"
|
|
2773
3115
|
}),
|
|
2774
|
-
a("div",
|
|
2775
|
-
c(u,
|
|
3116
|
+
a("div", ur, [
|
|
3117
|
+
c(u, g(h.value, {
|
|
2776
3118
|
icon: "",
|
|
2777
|
-
title:
|
|
3119
|
+
title: P(d)("HorizontalLine"),
|
|
2778
3120
|
onClick: o[1] || (o[1] = (e) => {
|
|
2779
3121
|
var t;
|
|
2780
3122
|
return (t = f.value) == null ? void 0 : t.chain().focus().setHorizontalRule().run();
|
|
2781
3123
|
})
|
|
2782
3124
|
}), {
|
|
2783
|
-
default:
|
|
3125
|
+
default: R(() => [c(P(V), { name: "mdi-minus" })]),
|
|
2784
3126
|
_: 1
|
|
2785
3127
|
}, 16, ["title"]),
|
|
2786
|
-
c(
|
|
3128
|
+
c(S, {
|
|
2787
3129
|
"close-on-content-click": !1,
|
|
2788
|
-
"onUpdate:modelValue": o[4] || (o[4] = (e) => e &&
|
|
3130
|
+
"onUpdate:modelValue": o[4] || (o[4] = (e) => e && re())
|
|
2789
3131
|
}, {
|
|
2790
|
-
activator:
|
|
3132
|
+
activator: R(({ props: e }) => [c(u, g(Z(Z({}, h.value), e), {
|
|
2791
3133
|
icon: "",
|
|
2792
|
-
title:
|
|
3134
|
+
title: P(d)("Link"),
|
|
2793
3135
|
active: y.value.link
|
|
2794
3136
|
}), {
|
|
2795
|
-
default:
|
|
3137
|
+
default: R(() => [c(P(V), { name: "mdi-link-variant" })]),
|
|
2796
3138
|
_: 1
|
|
2797
3139
|
}, 16, ["title", "active"])]),
|
|
2798
|
-
default:
|
|
3140
|
+
default: R(() => [c(O, {
|
|
2799
3141
|
"min-width": "280",
|
|
2800
3142
|
class: "pa-3"
|
|
2801
3143
|
}, {
|
|
2802
|
-
default:
|
|
2803
|
-
c(
|
|
2804
|
-
modelValue:
|
|
2805
|
-
"onUpdate:modelValue": o[2] || (o[2] = (e) =>
|
|
2806
|
-
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"),
|
|
2807
3149
|
density: "compact",
|
|
2808
3150
|
"hide-details": "",
|
|
2809
3151
|
autofocus: "",
|
|
2810
|
-
onKeydown:
|
|
3152
|
+
onKeydown: z(ie, ["enter"])
|
|
2811
3153
|
}, null, 8, ["modelValue", "label"]),
|
|
2812
|
-
c(
|
|
2813
|
-
modelValue:
|
|
2814
|
-
"onUpdate:modelValue": o[3] || (o[3] = (e) =>
|
|
2815
|
-
label:
|
|
3154
|
+
c(E, {
|
|
3155
|
+
modelValue: ne.value,
|
|
3156
|
+
"onUpdate:modelValue": o[3] || (o[3] = (e) => ne.value = e),
|
|
3157
|
+
label: P(d)("Downloadable"),
|
|
2816
3158
|
density: "compact",
|
|
2817
3159
|
"hide-details": "",
|
|
2818
3160
|
class: "mt-1"
|
|
2819
3161
|
}, null, 8, ["modelValue", "label"]),
|
|
2820
|
-
a("div",
|
|
3162
|
+
a("div", dr, [y.value.link ? (C(), n(u, {
|
|
2821
3163
|
key: 0,
|
|
2822
3164
|
size: "small",
|
|
2823
3165
|
variant: "text",
|
|
2824
|
-
onClick:
|
|
3166
|
+
onClick: ae
|
|
2825
3167
|
}, {
|
|
2826
|
-
default:
|
|
3168
|
+
default: R(() => [s(A(P(d)("LinkRemove")), 1)]),
|
|
2827
3169
|
_: 1
|
|
2828
3170
|
})) : r("", !0), c(u, {
|
|
2829
3171
|
size: "small",
|
|
2830
3172
|
color: "primary",
|
|
2831
3173
|
variant: "tonal",
|
|
2832
|
-
onClick:
|
|
3174
|
+
onClick: ie
|
|
2833
3175
|
}, {
|
|
2834
|
-
default:
|
|
3176
|
+
default: R(() => [s(A(P(d)("LinkApply")), 1)]),
|
|
2835
3177
|
_: 1
|
|
2836
3178
|
})])
|
|
2837
3179
|
]),
|
|
@@ -2839,41 +3181,41 @@ var Pn = { class: "rtf-toolbar-group" }, Fn = { class: "d-flex justify-end ga-2
|
|
|
2839
3181
|
})]),
|
|
2840
3182
|
_: 1
|
|
2841
3183
|
}),
|
|
2842
|
-
c(
|
|
2843
|
-
activator:
|
|
3184
|
+
c(S, { "close-on-content-click": !1 }, {
|
|
3185
|
+
activator: R(({ props: e }) => [c(u, g(Z(Z({}, h.value), e), {
|
|
2844
3186
|
icon: "",
|
|
2845
|
-
title:
|
|
3187
|
+
title: P(d)("Image")
|
|
2846
3188
|
}), {
|
|
2847
|
-
default:
|
|
3189
|
+
default: R(() => [c(P(V), { name: "mdi-image-plus" })]),
|
|
2848
3190
|
_: 1
|
|
2849
3191
|
}, 16, ["title"])]),
|
|
2850
|
-
default:
|
|
3192
|
+
default: R(() => [c(O, {
|
|
2851
3193
|
"min-width": "280",
|
|
2852
3194
|
class: "pa-3"
|
|
2853
3195
|
}, {
|
|
2854
|
-
default:
|
|
2855
|
-
modelValue:
|
|
2856
|
-
"onUpdate:modelValue": o[5] || (o[5] = (e) =>
|
|
2857
|
-
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"),
|
|
2858
3200
|
density: "compact",
|
|
2859
3201
|
"hide-details": "",
|
|
2860
3202
|
autofocus: "",
|
|
2861
|
-
onKeydown:
|
|
2862
|
-
}, null, 8, ["modelValue", "label"]), a("div",
|
|
3203
|
+
onKeydown: z(se, ["enter"])
|
|
3204
|
+
}, null, 8, ["modelValue", "label"]), a("div", fr, [c(u, {
|
|
2863
3205
|
size: "small",
|
|
2864
3206
|
variant: "text",
|
|
2865
3207
|
"prepend-icon": "mdi-upload",
|
|
2866
|
-
onClick:
|
|
3208
|
+
onClick: ce
|
|
2867
3209
|
}, {
|
|
2868
|
-
default:
|
|
3210
|
+
default: R(() => [s(A(P(d)("ImageUpload")), 1)]),
|
|
2869
3211
|
_: 1
|
|
2870
3212
|
}), c(u, {
|
|
2871
3213
|
size: "small",
|
|
2872
3214
|
color: "primary",
|
|
2873
3215
|
variant: "tonal",
|
|
2874
|
-
onClick:
|
|
3216
|
+
onClick: se
|
|
2875
3217
|
}, {
|
|
2876
|
-
default:
|
|
3218
|
+
default: R(() => [s(A(P(d)("ImageInsert")), 1)]),
|
|
2877
3219
|
_: 1
|
|
2878
3220
|
})])]),
|
|
2879
3221
|
_: 1
|
|
@@ -2882,55 +3224,55 @@ var Pn = { class: "rtf-toolbar-group" }, Fn = { class: "d-flex justify-end ga-2
|
|
|
2882
3224
|
}),
|
|
2883
3225
|
a("input", {
|
|
2884
3226
|
ref_key: "imageInput",
|
|
2885
|
-
ref:
|
|
3227
|
+
ref: q,
|
|
2886
3228
|
type: "file",
|
|
2887
3229
|
accept: "image/*",
|
|
2888
3230
|
class: "d-none",
|
|
2889
|
-
onChange:
|
|
3231
|
+
onChange: le
|
|
2890
3232
|
}, null, 544),
|
|
2891
|
-
c(
|
|
2892
|
-
activator:
|
|
3233
|
+
c(S, { "close-on-content-click": !1 }, {
|
|
3234
|
+
activator: R(({ props: e }) => [c(u, g(Z(Z({}, h.value), e), {
|
|
2893
3235
|
icon: "",
|
|
2894
|
-
title:
|
|
3236
|
+
title: P(d)("MediaEmbed")
|
|
2895
3237
|
}), {
|
|
2896
|
-
default:
|
|
3238
|
+
default: R(() => [c(P(V), { name: "mdi-video-plus" })]),
|
|
2897
3239
|
_: 1
|
|
2898
3240
|
}, 16, ["title"])]),
|
|
2899
|
-
default:
|
|
3241
|
+
default: R(() => [c(O, {
|
|
2900
3242
|
"min-width": "280",
|
|
2901
3243
|
class: "pa-3"
|
|
2902
3244
|
}, {
|
|
2903
|
-
default:
|
|
2904
|
-
modelValue:
|
|
2905
|
-
"onUpdate:modelValue": o[6] || (o[6] = (e) =>
|
|
2906
|
-
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"),
|
|
2907
3249
|
density: "compact",
|
|
2908
3250
|
"hide-details": "",
|
|
2909
3251
|
autofocus: "",
|
|
2910
|
-
onKeydown:
|
|
2911
|
-
}, null, 8, ["modelValue", "label"]), a("div",
|
|
3252
|
+
onKeydown: z(ue, ["enter"])
|
|
3253
|
+
}, null, 8, ["modelValue", "label"]), a("div", pr, [c(u, {
|
|
2912
3254
|
size: "small",
|
|
2913
3255
|
color: "primary",
|
|
2914
3256
|
variant: "tonal",
|
|
2915
|
-
onClick:
|
|
3257
|
+
onClick: ue
|
|
2916
3258
|
}, {
|
|
2917
|
-
default:
|
|
3259
|
+
default: R(() => [s(A(P(d)("MediaEmbedInsert")), 1)]),
|
|
2918
3260
|
_: 1
|
|
2919
3261
|
})])]),
|
|
2920
3262
|
_: 1
|
|
2921
3263
|
})]),
|
|
2922
3264
|
_: 1
|
|
2923
3265
|
}),
|
|
2924
|
-
c(
|
|
2925
|
-
activator:
|
|
3266
|
+
c(S, null, {
|
|
3267
|
+
activator: R(({ props: e }) => [c(u, g(Z(Z({}, h.value), e), {
|
|
2926
3268
|
icon: "",
|
|
2927
|
-
title:
|
|
3269
|
+
title: P(d)("Table")
|
|
2928
3270
|
}), {
|
|
2929
|
-
default:
|
|
3271
|
+
default: R(() => [c(P(V), { name: "mdi-table" })]),
|
|
2930
3272
|
_: 1
|
|
2931
3273
|
}, 16, ["title"])]),
|
|
2932
|
-
default:
|
|
2933
|
-
default:
|
|
3274
|
+
default: R(() => [c(x, { density: "compact" }, {
|
|
3275
|
+
default: R(() => [
|
|
2934
3276
|
c(b, { onClick: o[7] || (o[7] = (e) => {
|
|
2935
3277
|
var t;
|
|
2936
3278
|
return (t = f.value) == null ? void 0 : t.chain().focus().insertTable({
|
|
@@ -2939,9 +3281,9 @@ var Pn = { class: "rtf-toolbar-group" }, Fn = { class: "d-flex justify-end ga-2
|
|
|
2939
3281
|
withHeaderRow: !0
|
|
2940
3282
|
}).run();
|
|
2941
3283
|
}) }, {
|
|
2942
|
-
prepend:
|
|
2943
|
-
default:
|
|
2944
|
-
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)]),
|
|
2945
3287
|
_: 1
|
|
2946
3288
|
})]),
|
|
2947
3289
|
_: 1
|
|
@@ -2954,9 +3296,9 @@ var Pn = { class: "rtf-toolbar-group" }, Fn = { class: "d-flex justify-end ga-2
|
|
|
2954
3296
|
return (t = f.value) == null ? void 0 : t.chain().focus().addRowBefore().run();
|
|
2955
3297
|
})
|
|
2956
3298
|
}, {
|
|
2957
|
-
prepend:
|
|
2958
|
-
default:
|
|
2959
|
-
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)]),
|
|
2960
3302
|
_: 1
|
|
2961
3303
|
})]),
|
|
2962
3304
|
_: 1
|
|
@@ -2968,9 +3310,9 @@ var Pn = { class: "rtf-toolbar-group" }, Fn = { class: "d-flex justify-end ga-2
|
|
|
2968
3310
|
return (t = f.value) == null ? void 0 : t.chain().focus().addRowAfter().run();
|
|
2969
3311
|
})
|
|
2970
3312
|
}, {
|
|
2971
|
-
prepend:
|
|
2972
|
-
default:
|
|
2973
|
-
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)]),
|
|
2974
3316
|
_: 1
|
|
2975
3317
|
})]),
|
|
2976
3318
|
_: 1
|
|
@@ -2982,9 +3324,9 @@ var Pn = { class: "rtf-toolbar-group" }, Fn = { class: "d-flex justify-end ga-2
|
|
|
2982
3324
|
return (t = f.value) == null ? void 0 : t.chain().focus().deleteRow().run();
|
|
2983
3325
|
})
|
|
2984
3326
|
}, {
|
|
2985
|
-
prepend:
|
|
2986
|
-
default:
|
|
2987
|
-
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)]),
|
|
2988
3330
|
_: 1
|
|
2989
3331
|
})]),
|
|
2990
3332
|
_: 1
|
|
@@ -2997,9 +3339,9 @@ var Pn = { class: "rtf-toolbar-group" }, Fn = { class: "d-flex justify-end ga-2
|
|
|
2997
3339
|
return (t = f.value) == null ? void 0 : t.chain().focus().addColumnBefore().run();
|
|
2998
3340
|
})
|
|
2999
3341
|
}, {
|
|
3000
|
-
prepend:
|
|
3001
|
-
default:
|
|
3002
|
-
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)]),
|
|
3003
3345
|
_: 1
|
|
3004
3346
|
})]),
|
|
3005
3347
|
_: 1
|
|
@@ -3011,9 +3353,9 @@ var Pn = { class: "rtf-toolbar-group" }, Fn = { class: "d-flex justify-end ga-2
|
|
|
3011
3353
|
return (t = f.value) == null ? void 0 : t.chain().focus().addColumnAfter().run();
|
|
3012
3354
|
})
|
|
3013
3355
|
}, {
|
|
3014
|
-
prepend:
|
|
3015
|
-
default:
|
|
3016
|
-
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)]),
|
|
3017
3359
|
_: 1
|
|
3018
3360
|
})]),
|
|
3019
3361
|
_: 1
|
|
@@ -3025,9 +3367,9 @@ var Pn = { class: "rtf-toolbar-group" }, Fn = { class: "d-flex justify-end ga-2
|
|
|
3025
3367
|
return (t = f.value) == null ? void 0 : t.chain().focus().deleteColumn().run();
|
|
3026
3368
|
})
|
|
3027
3369
|
}, {
|
|
3028
|
-
prepend:
|
|
3029
|
-
default:
|
|
3030
|
-
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)]),
|
|
3031
3373
|
_: 1
|
|
3032
3374
|
})]),
|
|
3033
3375
|
_: 1
|
|
@@ -3040,9 +3382,9 @@ var Pn = { class: "rtf-toolbar-group" }, Fn = { class: "d-flex justify-end ga-2
|
|
|
3040
3382
|
return (t = f.value) == null ? void 0 : t.chain().focus().toggleHeaderRow().run();
|
|
3041
3383
|
})
|
|
3042
3384
|
}, {
|
|
3043
|
-
prepend:
|
|
3044
|
-
default:
|
|
3045
|
-
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)]),
|
|
3046
3388
|
_: 1
|
|
3047
3389
|
})]),
|
|
3048
3390
|
_: 1
|
|
@@ -3054,9 +3396,9 @@ var Pn = { class: "rtf-toolbar-group" }, Fn = { class: "d-flex justify-end ga-2
|
|
|
3054
3396
|
return (t = f.value) == null ? void 0 : t.chain().focus().deleteTable().run();
|
|
3055
3397
|
})
|
|
3056
3398
|
}, {
|
|
3057
|
-
prepend:
|
|
3058
|
-
default:
|
|
3059
|
-
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)]),
|
|
3060
3402
|
_: 1
|
|
3061
3403
|
})]),
|
|
3062
3404
|
_: 1
|
|
@@ -3066,16 +3408,16 @@ var Pn = { class: "rtf-toolbar-group" }, Fn = { class: "d-flex justify-end ga-2
|
|
|
3066
3408
|
})]),
|
|
3067
3409
|
_: 1
|
|
3068
3410
|
}),
|
|
3069
|
-
c(u,
|
|
3411
|
+
c(u, g(h.value, {
|
|
3070
3412
|
icon: "",
|
|
3071
|
-
title:
|
|
3413
|
+
title: P(d)("Blockquote"),
|
|
3072
3414
|
active: y.value.blockquote,
|
|
3073
3415
|
onClick: o[16] || (o[16] = (e) => {
|
|
3074
3416
|
var t;
|
|
3075
3417
|
return (t = f.value) == null ? void 0 : t.chain().focus().toggleBlockquote().run();
|
|
3076
3418
|
})
|
|
3077
3419
|
}), {
|
|
3078
|
-
default:
|
|
3420
|
+
default: R(() => [c(P(V), { name: "mdi-format-quote-close" })]),
|
|
3079
3421
|
_: 1
|
|
3080
3422
|
}, 16, ["title", "active"])
|
|
3081
3423
|
]),
|
|
@@ -3084,18 +3426,18 @@ var Pn = { class: "rtf-toolbar-group" }, Fn = { class: "d-flex justify-end ga-2
|
|
|
3084
3426
|
inset: "",
|
|
3085
3427
|
class: "mx-1"
|
|
3086
3428
|
}),
|
|
3087
|
-
c(
|
|
3429
|
+
c(En, g({ actions: P(M) }, _.value, { "show-as-group": "grouped-no-borders" }), null, 16, ["actions"]),
|
|
3088
3430
|
c(l, {
|
|
3089
3431
|
vertical: "",
|
|
3090
3432
|
inset: "",
|
|
3091
3433
|
class: "mx-1"
|
|
3092
3434
|
}),
|
|
3093
|
-
c(
|
|
3435
|
+
c(En, g({ actions: N }, _.value, { "show-as-group": "grouped-no-borders" }), null, 16)
|
|
3094
3436
|
], 2);
|
|
3095
3437
|
};
|
|
3096
3438
|
}
|
|
3097
|
-
}),
|
|
3098
|
-
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) {
|
|
3099
3441
|
let t = document.createTreeWalker(e, NodeFilter.SHOW_COMMENT), n = [];
|
|
3100
3442
|
for (let e = t.nextNode(); e; e = t.nextNode()) n.push(e);
|
|
3101
3443
|
n.forEach((e) => {
|
|
@@ -3103,42 +3445,45 @@ function Un(e) {
|
|
|
3103
3445
|
return (t = e.parentNode) == null ? void 0 : t.removeChild(e);
|
|
3104
3446
|
});
|
|
3105
3447
|
}
|
|
3106
|
-
function
|
|
3448
|
+
function br(e) {
|
|
3107
3449
|
let t = e.parentNode;
|
|
3108
3450
|
if (t) {
|
|
3109
3451
|
for (; e.firstChild;) t.insertBefore(e.firstChild, e);
|
|
3110
3452
|
t.removeChild(e);
|
|
3111
3453
|
}
|
|
3112
3454
|
}
|
|
3113
|
-
function
|
|
3455
|
+
function xr(e) {
|
|
3114
3456
|
let t = e.getAttribute("style");
|
|
3115
3457
|
if (t != null) {
|
|
3116
|
-
let n = t.replace(
|
|
3458
|
+
let n = t.replace(gr, "").replace(vr, "").trim();
|
|
3117
3459
|
n ? e.setAttribute("style", n) : e.removeAttribute("style");
|
|
3118
3460
|
}
|
|
3119
3461
|
let n = e.getAttribute("class");
|
|
3120
3462
|
if (n != null) {
|
|
3121
|
-
let t = n.split(/\s+/).filter((e) => e && !
|
|
3463
|
+
let t = n.split(/\s+/).filter((e) => e && !_r.test(e)).join(" ");
|
|
3122
3464
|
t ? e.setAttribute("class", t) : e.removeAttribute("class");
|
|
3123
3465
|
}
|
|
3124
3466
|
e.removeAttribute("lang"), e.removeAttribute("xml:lang"), e.removeAttribute("id"), e.removeAttribute("align"), e.removeAttribute("bgcolor");
|
|
3125
3467
|
}
|
|
3126
|
-
function
|
|
3468
|
+
function Sr(e) {
|
|
3127
3469
|
if (!e || typeof DOMParser > "u") return e;
|
|
3128
3470
|
let t = new DOMParser().parseFromString(e, "text/html").body;
|
|
3129
|
-
return t ? (
|
|
3130
|
-
if (
|
|
3131
|
-
|
|
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);
|
|
3132
3474
|
return;
|
|
3133
3475
|
}
|
|
3134
|
-
|
|
3476
|
+
xr(e);
|
|
3135
3477
|
}), Array.from(t.querySelectorAll("span, div")).forEach((e) => {
|
|
3136
|
-
e.attributes.length === 0 &&
|
|
3478
|
+
e.attributes.length === 0 && br(e);
|
|
3137
3479
|
}), t.innerHTML) : e;
|
|
3138
3480
|
}
|
|
3139
3481
|
//#endregion
|
|
3140
3482
|
//#region src/helpers/rtf-editor/editor-core.vue?vue&type=script&setup=true&lang.ts
|
|
3141
|
-
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({
|
|
3142
3487
|
__name: "editor-core",
|
|
3143
3488
|
props: {
|
|
3144
3489
|
modelValue: { default: "" },
|
|
@@ -3152,29 +3497,36 @@ var qn = { class: "editor-container" }, Jn = { class: "rtf-bubble-menu" }, Yn =
|
|
|
3152
3497
|
},
|
|
3153
3498
|
emits: ["update:modelValue"],
|
|
3154
3499
|
setup(e, { emit: o }) {
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3500
|
+
ee((e) => ({
|
|
3501
|
+
a2b42c4a: e.fontFamily,
|
|
3502
|
+
v6b6187d1: e.minHeight
|
|
3158
3503
|
}));
|
|
3159
|
-
let s = e, l = o, u =
|
|
3160
|
-
|
|
3504
|
+
let s = e, l = o, u = w(null);
|
|
3505
|
+
function d(e) {
|
|
3506
|
+
u.value = e;
|
|
3507
|
+
}
|
|
3508
|
+
let f = On(), p = t(() => {
|
|
3161
3509
|
var e;
|
|
3162
|
-
|
|
3163
|
-
|
|
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]) => {
|
|
3164
3516
|
n.style.setProperty("--rtf-toolbar-height", `${e.contentRect.height}px`);
|
|
3165
|
-
}),
|
|
3166
|
-
}),
|
|
3167
|
-
let
|
|
3517
|
+
}), h.observe(t));
|
|
3518
|
+
}, { flush: "post" }), x(() => h == null ? void 0 : h.disconnect());
|
|
3519
|
+
let _ = Ee({
|
|
3168
3520
|
content: s.modelValue,
|
|
3169
3521
|
editable: !s.disabled,
|
|
3170
3522
|
extensions: [
|
|
3171
|
-
|
|
3172
|
-
|
|
3523
|
+
we.configure({ link: !1 }),
|
|
3524
|
+
or.configure({
|
|
3173
3525
|
openOnClick: !1,
|
|
3174
3526
|
autolink: !0,
|
|
3175
3527
|
defaultProtocol: "https"
|
|
3176
3528
|
}),
|
|
3177
|
-
|
|
3529
|
+
ge.configure({
|
|
3178
3530
|
inline: !0,
|
|
3179
3531
|
allowBase64: !0,
|
|
3180
3532
|
resize: {
|
|
@@ -3193,119 +3545,120 @@ var qn = { class: "editor-container" }, Jn = { class: "rtf-bubble-menu" }, Yn =
|
|
|
3193
3545
|
minHeight: 24
|
|
3194
3546
|
}
|
|
3195
3547
|
}),
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
Ce,
|
|
3199
|
-
Se,
|
|
3548
|
+
Se.configure({ types: ["heading", "paragraph"] }),
|
|
3549
|
+
ve.configure({ resizable: !0 }),
|
|
3200
3550
|
xe,
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3551
|
+
be,
|
|
3552
|
+
ye,
|
|
3553
|
+
_e.configure({ placeholder: "" }),
|
|
3554
|
+
Gn,
|
|
3555
|
+
qn,
|
|
3556
|
+
Jn,
|
|
3557
|
+
cr
|
|
3206
3558
|
],
|
|
3207
3559
|
editorProps: {
|
|
3208
3560
|
attributes: { class: "rtf-content" },
|
|
3209
|
-
transformPastedHTML: (e) =>
|
|
3210
|
-
handlePaste:
|
|
3561
|
+
transformPastedHTML: (e) => Sr(e),
|
|
3562
|
+
handlePaste: ar(() => _.value)
|
|
3211
3563
|
},
|
|
3212
3564
|
onUpdate: ({ editor: e }) => {
|
|
3213
3565
|
l("update:modelValue", e.isEmpty ? "" : e.getHTML());
|
|
3214
3566
|
}
|
|
3215
3567
|
});
|
|
3216
|
-
|
|
3217
|
-
let t =
|
|
3568
|
+
I(() => s.modelValue, (e) => {
|
|
3569
|
+
let t = _.value;
|
|
3218
3570
|
if (!t) return;
|
|
3219
3571
|
let n = e == null ? "" : e;
|
|
3220
3572
|
n !== t.getHTML() && t.commands.setContent(n, { emitUpdate: !1 });
|
|
3221
|
-
}),
|
|
3573
|
+
}), I(() => s.disabled, (e) => {
|
|
3222
3574
|
var t;
|
|
3223
|
-
return (t =
|
|
3224
|
-
}),
|
|
3225
|
-
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 = {
|
|
3226
3578
|
icon: !0,
|
|
3227
3579
|
size: "small",
|
|
3228
3580
|
density: "comfortable",
|
|
3229
3581
|
variant: "text"
|
|
3230
|
-
},
|
|
3582
|
+
}, y = lr(_), b = t(() => {
|
|
3231
3583
|
var e, t, n, r, i;
|
|
3232
|
-
return
|
|
3233
|
-
bold: !!((e =
|
|
3234
|
-
italic: !!((t =
|
|
3235
|
-
link: !!((n =
|
|
3236
|
-
bulletList: !!((r =
|
|
3237
|
-
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"))
|
|
3238
3590
|
};
|
|
3239
3591
|
});
|
|
3240
|
-
function
|
|
3241
|
-
return !e.selection.empty && !(e.selection instanceof
|
|
3592
|
+
function S({ state: e }) {
|
|
3593
|
+
return !e.selection.empty && !(e.selection instanceof Ce);
|
|
3242
3594
|
}
|
|
3243
|
-
function
|
|
3595
|
+
function T(e) {
|
|
3244
3596
|
var t;
|
|
3245
|
-
(t =
|
|
3597
|
+
(t = _.value) == null || t.chain().focus()[e]().run();
|
|
3246
3598
|
}
|
|
3247
|
-
function
|
|
3248
|
-
let e =
|
|
3599
|
+
function E() {
|
|
3600
|
+
let e = _.value;
|
|
3249
3601
|
if (!e) return;
|
|
3250
3602
|
if (e.isActive("link")) {
|
|
3251
3603
|
e.chain().focus().unsetLink().run();
|
|
3252
3604
|
return;
|
|
3253
3605
|
}
|
|
3254
|
-
let t = window.prompt(
|
|
3606
|
+
let t = window.prompt(m("LinkUrl"));
|
|
3255
3607
|
t && e.chain().focus().extendMarkRange("link").setLink({ href: t }).run();
|
|
3256
3608
|
}
|
|
3257
3609
|
return (t, o) => {
|
|
3258
|
-
let s =
|
|
3259
|
-
return
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
ref:
|
|
3263
|
-
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(_),
|
|
3264
3616
|
"button-size": e.toolbarButtonSize
|
|
3265
|
-
}, null, 8, ["editor", "button-size"]),
|
|
3266
|
-
|
|
3617
|
+
}, null, 8, ["editor", "button-size"])) : r("", !0),
|
|
3618
|
+
P(f) ? (C(), n(P(Te), {
|
|
3619
|
+
key: 1,
|
|
3267
3620
|
class: "editor-container__editor",
|
|
3268
|
-
editor:
|
|
3269
|
-
}, null, 8, ["editor"]),
|
|
3270
|
-
|
|
3271
|
-
key:
|
|
3272
|
-
editor:
|
|
3273
|
-
"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
|
|
3274
3627
|
}, {
|
|
3275
|
-
default:
|
|
3276
|
-
c(s,
|
|
3277
|
-
active:
|
|
3278
|
-
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"))
|
|
3279
3632
|
}), {
|
|
3280
|
-
default:
|
|
3633
|
+
default: R(() => [c(P(V), { name: "mdi-format-bold" })]),
|
|
3281
3634
|
_: 1
|
|
3282
3635
|
}, 16, ["active"]),
|
|
3283
|
-
c(s,
|
|
3284
|
-
active:
|
|
3285
|
-
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"))
|
|
3286
3639
|
}), {
|
|
3287
|
-
default:
|
|
3640
|
+
default: R(() => [c(P(V), { name: "mdi-format-italic" })]),
|
|
3288
3641
|
_: 1
|
|
3289
3642
|
}, 16, ["active"]),
|
|
3290
|
-
c(s,
|
|
3291
|
-
active:
|
|
3292
|
-
onClick:
|
|
3643
|
+
c(s, g(v, {
|
|
3644
|
+
active: b.value.link,
|
|
3645
|
+
onClick: E
|
|
3293
3646
|
}), {
|
|
3294
|
-
default:
|
|
3647
|
+
default: R(() => [c(P(V), { name: "mdi-link-variant" })]),
|
|
3295
3648
|
_: 1
|
|
3296
3649
|
}, 16, ["active"]),
|
|
3297
|
-
c(s,
|
|
3298
|
-
active:
|
|
3299
|
-
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"))
|
|
3300
3653
|
}), {
|
|
3301
|
-
default:
|
|
3654
|
+
default: R(() => [c(P(V), { name: "mdi-format-list-bulleted" })]),
|
|
3302
3655
|
_: 1
|
|
3303
3656
|
}, 16, ["active"]),
|
|
3304
|
-
c(s,
|
|
3305
|
-
active:
|
|
3306
|
-
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"))
|
|
3307
3660
|
}), {
|
|
3308
|
-
default:
|
|
3661
|
+
default: R(() => [c(P(V), { name: "mdi-format-list-numbered" })]),
|
|
3309
3662
|
_: 1
|
|
3310
3663
|
}, 16, ["active"])
|
|
3311
3664
|
])]),
|
|
@@ -3314,9 +3667,9 @@ var qn = { class: "editor-container" }, Jn = { class: "rtf-bubble-menu" }, Yn =
|
|
|
3314
3667
|
]);
|
|
3315
3668
|
};
|
|
3316
3669
|
}
|
|
3317
|
-
}),
|
|
3670
|
+
}), Dr = /* @__PURE__ */ l({
|
|
3318
3671
|
__name: "df-rtf-editor",
|
|
3319
|
-
props: /*@__PURE__*/
|
|
3672
|
+
props: /*@__PURE__*/ h({
|
|
3320
3673
|
minHeight: {},
|
|
3321
3674
|
toolbarButtonSize: {},
|
|
3322
3675
|
fontFamily: {},
|
|
@@ -3334,18 +3687,17 @@ var qn = { class: "editor-container" }, Jn = { class: "rtf-bubble-menu" }, Yn =
|
|
|
3334
3687
|
passthroughAttrs: {},
|
|
3335
3688
|
density: {},
|
|
3336
3689
|
variant: {}
|
|
3337
|
-
},
|
|
3690
|
+
}, Z(Z({}, en), {}, { minHeight: void 0 })),
|
|
3338
3691
|
emits: ["update:modelValue", "click:clear"],
|
|
3339
3692
|
setup(e, { emit: t }) {
|
|
3340
|
-
let r = e, { densityClass: i, value: a, vuetifyBindings: o } =
|
|
3341
|
-
return (t, s) => (
|
|
3342
|
-
default:
|
|
3343
|
-
|
|
3344
|
-
modelValue:
|
|
3345
|
-
"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),
|
|
3346
3698
|
class: { "mt-6": !!e.label },
|
|
3347
3699
|
"min-height": e.minHeight,
|
|
3348
|
-
disabled:
|
|
3700
|
+
disabled: P(o).disabled,
|
|
3349
3701
|
"toolbar-button-size": e.toolbarButtonSize,
|
|
3350
3702
|
"font-family": e.fontFamily
|
|
3351
3703
|
}, e.passthroughAttrs, {
|
|
@@ -3367,48 +3719,48 @@ var qn = { class: "editor-container" }, Jn = { class: "rtf-bubble-menu" }, Yn =
|
|
|
3367
3719
|
});
|
|
3368
3720
|
//#endregion
|
|
3369
3721
|
//#region src/helpers/df-select.helper.ts
|
|
3370
|
-
function
|
|
3722
|
+
function Or(e) {
|
|
3371
3723
|
return e.map((e) => ({
|
|
3372
3724
|
value: e.id,
|
|
3373
3725
|
title: e.text,
|
|
3374
3726
|
icon: e.icon
|
|
3375
3727
|
}));
|
|
3376
3728
|
}
|
|
3377
|
-
function
|
|
3729
|
+
function kr(e, t) {
|
|
3378
3730
|
var n;
|
|
3379
|
-
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;
|
|
3380
3732
|
}
|
|
3381
|
-
function
|
|
3733
|
+
function Ar(e, t) {
|
|
3382
3734
|
if (t == null) return [];
|
|
3383
|
-
let n =
|
|
3735
|
+
let n = ne(t);
|
|
3384
3736
|
return e.filter((e) => n.some((t) => t === e.id));
|
|
3385
3737
|
}
|
|
3386
|
-
function
|
|
3387
|
-
let a =
|
|
3738
|
+
function jr(e, t, n, r, i) {
|
|
3739
|
+
let a = kr(e, n);
|
|
3388
3740
|
if (a == null) {
|
|
3389
3741
|
t.value = n ? [] : null;
|
|
3390
3742
|
return;
|
|
3391
3743
|
}
|
|
3392
|
-
if (n) t.value = r ? a :
|
|
3744
|
+
if (n) t.value = r ? a : Ar(i, a).map((e) => e.id);
|
|
3393
3745
|
else if (r) t.value = a;
|
|
3394
3746
|
else {
|
|
3395
3747
|
var o;
|
|
3396
|
-
let e =
|
|
3748
|
+
let e = ie(Ar(i, a));
|
|
3397
3749
|
t.value = (o = e == null ? void 0 : e.id) == null ? null : o;
|
|
3398
3750
|
}
|
|
3399
3751
|
}
|
|
3400
3752
|
//#endregion
|
|
3401
3753
|
//#region src/df-select.vue?vue&type=script&setup=true&lang.ts
|
|
3402
|
-
var
|
|
3754
|
+
var Mr = {
|
|
3403
3755
|
key: 0,
|
|
3404
3756
|
class: "me-1"
|
|
3405
|
-
},
|
|
3757
|
+
}, Nr = /*#__PURE__*/ ((e, t) => {
|
|
3406
3758
|
let n = e.__vccOpts || e;
|
|
3407
3759
|
for (let [e, r] of t) n[e] = r;
|
|
3408
3760
|
return n;
|
|
3409
3761
|
})(/* @__PURE__ */ l({
|
|
3410
3762
|
__name: "df-select",
|
|
3411
|
-
props: /*@__PURE__*/
|
|
3763
|
+
props: /*@__PURE__*/ h({
|
|
3412
3764
|
choices: {},
|
|
3413
3765
|
multiple: { type: Boolean },
|
|
3414
3766
|
allowTags: { type: Boolean },
|
|
@@ -3428,7 +3780,7 @@ var er = {
|
|
|
3428
3780
|
passthroughAttrs: {},
|
|
3429
3781
|
density: {},
|
|
3430
3782
|
variant: {}
|
|
3431
|
-
},
|
|
3783
|
+
}, Z(Z({}, en), {}, {
|
|
3432
3784
|
choices: void 0,
|
|
3433
3785
|
multiple: !1,
|
|
3434
3786
|
allowTags: !1,
|
|
@@ -3442,204 +3794,232 @@ var er = {
|
|
|
3442
3794
|
],
|
|
3443
3795
|
setup(e, { emit: s }) {
|
|
3444
3796
|
var l;
|
|
3445
|
-
let
|
|
3446
|
-
(l = f.value) != null && l.length &&
|
|
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.");
|
|
3447
3799
|
function le(e) {
|
|
3448
|
-
|
|
3800
|
+
x("update:modelValueDisplay", Ar(W.value, e));
|
|
3449
3801
|
}
|
|
3450
|
-
let
|
|
3451
|
-
function
|
|
3452
|
-
|
|
3802
|
+
let J = w(!1);
|
|
3803
|
+
function Y(e) {
|
|
3804
|
+
J.value = !0;
|
|
3453
3805
|
try {
|
|
3454
|
-
|
|
3806
|
+
F.value = e;
|
|
3455
3807
|
} finally {
|
|
3456
|
-
|
|
3457
|
-
let t =
|
|
3458
|
-
|
|
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;
|
|
3459
3811
|
});
|
|
3460
3812
|
}
|
|
3461
3813
|
}
|
|
3462
|
-
function
|
|
3814
|
+
function de(e) {
|
|
3463
3815
|
if (!e) return 0;
|
|
3464
3816
|
let t = e.getBoundingClientRect(), n = window.getComputedStyle(e);
|
|
3465
3817
|
return t.width + parseFloat(n.marginLeft) + parseFloat(n.marginRight);
|
|
3466
3818
|
}
|
|
3467
|
-
function
|
|
3468
|
-
if (p.value &&
|
|
3819
|
+
function fe() {
|
|
3820
|
+
if (p.value && h.value && H.value != null && H.value.length > 0 && S.value) {
|
|
3469
3821
|
var e;
|
|
3470
|
-
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);
|
|
3471
3823
|
i.forEach((e) => {
|
|
3472
|
-
o +=
|
|
3824
|
+
o += de(e);
|
|
3473
3825
|
});
|
|
3474
|
-
let s =
|
|
3475
|
-
|
|
3476
|
-
} 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;
|
|
3477
3829
|
}
|
|
3478
3830
|
function pe(e) {
|
|
3479
3831
|
let t = e.target;
|
|
3480
3832
|
t instanceof HTMLElement && t.closest(".v-chip__close") && (e.stopPropagation(), e.preventDefault());
|
|
3481
3833
|
}
|
|
3482
|
-
|
|
3483
|
-
z.value.readonly ||
|
|
3484
|
-
let t =
|
|
3485
|
-
le(t),
|
|
3834
|
+
I(H, (e) => {
|
|
3835
|
+
z.value.readonly || q.value > 0 || _(() => {
|
|
3836
|
+
let t = kr(e, p.value);
|
|
3837
|
+
le(t), Y(t);
|
|
3486
3838
|
});
|
|
3487
|
-
}, { deep: !0 }),
|
|
3488
|
-
if (
|
|
3489
|
-
let t =
|
|
3490
|
-
|
|
3491
|
-
|
|
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);
|
|
3492
3844
|
});
|
|
3493
|
-
}, { deep: !0 }),
|
|
3494
|
-
|
|
3845
|
+
}, { deep: !0 }), I(J, () => {
|
|
3846
|
+
J.value || fe();
|
|
3495
3847
|
});
|
|
3496
3848
|
function me() {
|
|
3497
|
-
|
|
3849
|
+
ie.value != null && ie.value.length > 0 && (ie.value = null, _e());
|
|
3498
3850
|
}
|
|
3499
3851
|
function he() {
|
|
3500
|
-
if (me(), z.value.readonly ||
|
|
3501
|
-
let e =
|
|
3502
|
-
|
|
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);
|
|
3503
3855
|
}
|
|
3504
3856
|
function ge(e, t) {
|
|
3505
|
-
if (e.stopPropagation(), z.value.readonly ||
|
|
3506
|
-
|
|
3857
|
+
if (e.stopPropagation(), z.value.readonly || m.value) {
|
|
3858
|
+
m.value && (H.value = H.value.filter((e) => e !== t));
|
|
3507
3859
|
return;
|
|
3508
3860
|
}
|
|
3509
3861
|
let n;
|
|
3510
|
-
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);
|
|
3511
3863
|
}
|
|
3512
3864
|
function _e(e, t) {
|
|
3513
3865
|
return ve.apply(this, arguments);
|
|
3514
3866
|
}
|
|
3515
3867
|
function ve() {
|
|
3516
|
-
return ve =
|
|
3517
|
-
if (z.value.readonly || (
|
|
3868
|
+
return ve = Fn(function* (e, t) {
|
|
3869
|
+
if (z.value.readonly || (ie.value = e, f.value || u.fetchChoices === void 0)) return;
|
|
3518
3870
|
let n = ++ae.value;
|
|
3519
|
-
|
|
3871
|
+
se.value++;
|
|
3520
3872
|
try {
|
|
3521
|
-
let r = yield
|
|
3873
|
+
let r = yield u.fetchChoices(e, t);
|
|
3522
3874
|
if (n !== ae.value) return;
|
|
3523
|
-
let i =
|
|
3524
|
-
|
|
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);
|
|
3525
3879
|
} finally {
|
|
3526
|
-
|
|
3880
|
+
se.value--;
|
|
3527
3881
|
}
|
|
3528
3882
|
}), ve.apply(this, arguments);
|
|
3529
3883
|
}
|
|
3530
3884
|
function ye(e) {
|
|
3531
|
-
let t =
|
|
3532
|
-
if (t === void 0 ||
|
|
3533
|
-
let n =
|
|
3534
|
-
return n.length ? (
|
|
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* () {
|
|
3535
3889
|
try {
|
|
3536
3890
|
let e = yield t(void 0, p.value ? n : n[0]);
|
|
3537
|
-
|
|
3891
|
+
te.value = ue([...W.value, ...e], "id"), U.value = !0;
|
|
3892
|
+
} catch (e) {
|
|
3893
|
+
console.error(e);
|
|
3538
3894
|
} finally {
|
|
3539
|
-
|
|
3895
|
+
q.value--;
|
|
3540
3896
|
}
|
|
3541
3897
|
})()) : null;
|
|
3542
3898
|
}
|
|
3543
3899
|
function be() {
|
|
3544
|
-
let e = z.value.readonly, t =
|
|
3545
|
-
!e && !
|
|
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));
|
|
3546
3902
|
}
|
|
3547
|
-
let xe = null;
|
|
3548
|
-
if (
|
|
3549
|
-
var
|
|
3550
|
-
|
|
3903
|
+
let xe = typeof window < "u", Se = null;
|
|
3904
|
+
if (u.fetchChoices !== void 0 && xe) {
|
|
3905
|
+
var Ce;
|
|
3906
|
+
Se = (Ce = ye(kr(F.value, p.value))) == null ? _e(void 0, F.value) : Ce;
|
|
3551
3907
|
}
|
|
3552
|
-
return be(),
|
|
3908
|
+
return (xe || u.fetchChoices === void 0) && be(), Se == null || Se.then(() => {
|
|
3553
3909
|
be();
|
|
3554
|
-
}),
|
|
3910
|
+
}), I(() => z.value.readonly, (e) => {
|
|
3555
3911
|
e || be();
|
|
3556
3912
|
}), (e, t) => {
|
|
3557
|
-
|
|
3558
|
-
|
|
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({
|
|
3559
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,
|
|
3560
3935
|
ref_key: "dfSelectRef",
|
|
3561
|
-
ref:
|
|
3562
|
-
modelValue:
|
|
3563
|
-
"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),
|
|
3564
3939
|
class: [
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
{
|
|
3940
|
+
P(b),
|
|
3941
|
+
P(T),
|
|
3942
|
+
P(L),
|
|
3943
|
+
{
|
|
3944
|
+
"df-select-multirow": K.value,
|
|
3945
|
+
"df-select-single": !P(p)
|
|
3946
|
+
}
|
|
3569
3947
|
],
|
|
3570
|
-
|
|
3948
|
+
style: { "--df-select-search-width": `${((s = (l = ie.value) == null ? void 0 : l.length) == null ? 0 : s) + 1}ch` },
|
|
3949
|
+
items: G.value,
|
|
3571
3950
|
"return-object": !1,
|
|
3572
3951
|
chips: "",
|
|
3573
3952
|
"auto-select-first": !0,
|
|
3574
|
-
"closable-chips":
|
|
3575
|
-
clearable:
|
|
3576
|
-
multiple:
|
|
3577
|
-
loading:
|
|
3953
|
+
"closable-chips": P(h) || P(p) && H.value.length > 1,
|
|
3954
|
+
clearable: P(h),
|
|
3955
|
+
multiple: P(p),
|
|
3956
|
+
loading: ce.value,
|
|
3578
3957
|
"hide-selected": !1,
|
|
3579
|
-
"aria-describedby":
|
|
3958
|
+
"aria-describedby": P(z).helpText ? `${P(z).name}-help` : null,
|
|
3580
3959
|
"menu-props": { maxHeight: "400" },
|
|
3581
|
-
search:
|
|
3582
|
-
},
|
|
3960
|
+
search: ie.value
|
|
3961
|
+
}, P(z), {
|
|
3583
3962
|
"onUpdate:search": t[1] || (t[1] = (e) => _e(e, void 0)),
|
|
3584
3963
|
"onUpdate:modelValue": he,
|
|
3585
|
-
"onClick:clear": t[2] || (t[2] = (e) =>
|
|
3586
|
-
onBlur: t[3] || (t[3] = (e) =>
|
|
3964
|
+
"onClick:clear": t[2] || (t[2] = (e) => H.value = null),
|
|
3965
|
+
onBlur: t[3] || (t[3] = (e) => ee.value = !0),
|
|
3587
3966
|
onMousedownCapture: t[4] || (t[4] = (e) => pe(e))
|
|
3588
3967
|
}), o({
|
|
3589
|
-
chip:
|
|
3968
|
+
chip: R(({ item: e }) => [(C(), n(f, {
|
|
3590
3969
|
key: e.value,
|
|
3591
3970
|
label: "",
|
|
3592
3971
|
size: "small",
|
|
3593
3972
|
class: "d-flex align-middle",
|
|
3594
|
-
variant:
|
|
3595
|
-
closable:
|
|
3973
|
+
variant: P(p) ? "tonal" : "text",
|
|
3974
|
+
closable: P(p),
|
|
3596
3975
|
"onClick:close": (t) => ge(t, e.value)
|
|
3597
3976
|
}, {
|
|
3598
|
-
prepend:
|
|
3977
|
+
prepend: R(() => {
|
|
3599
3978
|
var t;
|
|
3600
|
-
return [(t = e.raw) != null && t.icon ? (
|
|
3979
|
+
return [(t = e.raw) != null && t.icon ? (C(), n(P(V), {
|
|
3601
3980
|
key: 0,
|
|
3602
3981
|
class: "me-1",
|
|
3603
3982
|
name: e.raw.icon
|
|
3604
3983
|
}, null, 8, ["name"])) : r("", !0)];
|
|
3605
3984
|
}),
|
|
3606
|
-
default:
|
|
3985
|
+
default: R(() => [a("span", { class: v({ "text-body-1": !P(p) }) }, A(e.title), 3)]),
|
|
3607
3986
|
_: 2
|
|
3608
3987
|
}, 1032, [
|
|
3609
3988
|
"variant",
|
|
3610
3989
|
"closable",
|
|
3611
3990
|
"onClick:close"
|
|
3612
3991
|
]))]),
|
|
3613
|
-
label:
|
|
3992
|
+
label: R((e) => [c(P($), {
|
|
3614
3993
|
data: e,
|
|
3615
|
-
label: j
|
|
3994
|
+
label: P(j)
|
|
3616
3995
|
}, null, 8, ["data", "label"])]),
|
|
3617
|
-
item:
|
|
3618
|
-
prepend:
|
|
3996
|
+
item: R(({ props: e, item: t }) => [c(_, y(d(e)), {
|
|
3997
|
+
prepend: R(() => {
|
|
3619
3998
|
var e;
|
|
3620
|
-
return [(e = t.raw) != null && e.icon ? (
|
|
3999
|
+
return [(e = t.raw) != null && e.icon ? (C(), i("span", Mr, [c(P(V), {
|
|
3621
4000
|
class: "action-icon",
|
|
3622
4001
|
name: t.raw.icon
|
|
3623
4002
|
}, null, 8, ["name"])])) : r("", !0)];
|
|
3624
4003
|
}),
|
|
3625
4004
|
_: 2
|
|
3626
4005
|
}, 1040)]),
|
|
3627
|
-
message:
|
|
4006
|
+
message: R(({ message: e }) => [c(P(Q), {
|
|
3628
4007
|
message: e,
|
|
3629
|
-
errors:
|
|
4008
|
+
errors: P(N)
|
|
3630
4009
|
}, null, 8, ["message", "errors"])]),
|
|
3631
4010
|
_: 2
|
|
3632
4011
|
}, [e.$slots["append-inner"] ? {
|
|
3633
4012
|
name: "append-inner",
|
|
3634
|
-
fn:
|
|
4013
|
+
fn: R((t) => [E(e.$slots, "append-inner", y(d(t)), void 0, !0)]),
|
|
3635
4014
|
key: "0"
|
|
3636
4015
|
} : void 0, e.$slots["prepend-inner"] ? {
|
|
3637
4016
|
name: "prepend-inner",
|
|
3638
|
-
fn:
|
|
4017
|
+
fn: R((t) => [E(e.$slots, "prepend-inner", y(d(t)), void 0, !0)]),
|
|
3639
4018
|
key: "1"
|
|
3640
4019
|
} : void 0]), 1040, [
|
|
3641
4020
|
"modelValue",
|
|
3642
4021
|
"class",
|
|
4022
|
+
"style",
|
|
3643
4023
|
"items",
|
|
3644
4024
|
"closable-chips",
|
|
3645
4025
|
"clearable",
|
|
@@ -3650,9 +4030,9 @@ var er = {
|
|
|
3650
4030
|
])) : r("", !0);
|
|
3651
4031
|
};
|
|
3652
4032
|
}
|
|
3653
|
-
}), [["__scopeId", "data-v-
|
|
4033
|
+
}), [["__scopeId", "data-v-1c000b27"]]), Pr = /* @__PURE__ */ l({
|
|
3654
4034
|
__name: "df-text-area",
|
|
3655
|
-
props: /*@__PURE__*/
|
|
4035
|
+
props: /*@__PURE__*/ h({
|
|
3656
4036
|
rows: {},
|
|
3657
4037
|
maxRows: {},
|
|
3658
4038
|
control: {},
|
|
@@ -3669,33 +4049,33 @@ var er = {
|
|
|
3669
4049
|
passthroughAttrs: {},
|
|
3670
4050
|
density: {},
|
|
3671
4051
|
variant: {}
|
|
3672
|
-
},
|
|
4052
|
+
}, Z(Z({}, en), {}, {
|
|
3673
4053
|
rows: void 0,
|
|
3674
4054
|
maxRows: void 0
|
|
3675
4055
|
})),
|
|
3676
4056
|
emits: ["update:modelValue", "click:clear"],
|
|
3677
4057
|
setup(e, { emit: t }) {
|
|
3678
|
-
let n = e, { densityClass: a, isRendered: o, label: s, shownErrors: l, touched: u, value: d, visibilityClass:
|
|
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);
|
|
3679
4059
|
return (t, n) => {
|
|
3680
|
-
let
|
|
3681
|
-
return
|
|
4060
|
+
let _ = D("v-textarea");
|
|
4061
|
+
return P(o) ? (C(), i("div", {
|
|
3682
4062
|
key: 0,
|
|
3683
|
-
class:
|
|
3684
|
-
}, [c(
|
|
3685
|
-
modelValue:
|
|
3686
|
-
"onUpdate:modelValue": n[0] || (n[0] = (e) =>
|
|
3687
|
-
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),
|
|
3688
4068
|
rows: e.rows,
|
|
3689
4069
|
"auto-grow": (e.maxRows || 0) > 0,
|
|
3690
4070
|
"max-rows": e.maxRows
|
|
3691
|
-
},
|
|
3692
|
-
label:
|
|
4071
|
+
}, P(p), { onBlur: n[1] || (n[1] = (e) => u.value = !0) }), {
|
|
4072
|
+
label: R((e) => [c(P($), {
|
|
3693
4073
|
data: e,
|
|
3694
|
-
label:
|
|
4074
|
+
label: P(s)
|
|
3695
4075
|
}, null, 8, ["data", "label"])]),
|
|
3696
|
-
message:
|
|
4076
|
+
message: R(({ message: e }) => [c(P(Q), {
|
|
3697
4077
|
message: e,
|
|
3698
|
-
errors:
|
|
4078
|
+
errors: P(l)
|
|
3699
4079
|
}, null, 8, ["message", "errors"])]),
|
|
3700
4080
|
_: 1
|
|
3701
4081
|
}, 16, [
|
|
@@ -3707,62 +4087,69 @@ var er = {
|
|
|
3707
4087
|
])], 2)) : r("", !0);
|
|
3708
4088
|
};
|
|
3709
4089
|
}
|
|
3710
|
-
}),
|
|
3711
|
-
DfActions: () =>
|
|
3712
|
-
DfCheckbox: () =>
|
|
3713
|
-
DfColor: () =>
|
|
3714
|
-
DfDateTime: () =>
|
|
3715
|
-
DfFile: () =>
|
|
3716
|
-
DfImage: () =>
|
|
3717
|
-
DfInput: () =>
|
|
3718
|
-
DfInputHint: () =>
|
|
3719
|
-
DfLabel: () =>
|
|
3720
|
-
DfRtfEditor: () =>
|
|
3721
|
-
DfSelect: () =>
|
|
3722
|
-
DfTextArea: () =>
|
|
3723
|
-
}),
|
|
3724
|
-
VAutocomplete: () =>
|
|
3725
|
-
VBtn: () =>
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
|
|
3754
|
-
|
|
3755
|
-
|
|
3756
|
-
"df-
|
|
3757
|
-
"df-
|
|
3758
|
-
"df-
|
|
3759
|
-
"df-
|
|
3760
|
-
"df-
|
|
3761
|
-
|
|
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) => {
|
|
3762
4149
|
var n, r;
|
|
3763
|
-
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));
|
|
3764
4151
|
} };
|
|
3765
4152
|
//#endregion
|
|
3766
|
-
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 };
|
|
3767
4154
|
|
|
3768
4155
|
//# sourceMappingURL=dynamicforms-vuetify-inputs.js.map
|