@3squared/forge-ui-3 2.1.0 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/esm/forge-ui-3.js
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
import he from "primevue/message";
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
import { Icon as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
2
|
+
import { defineComponent as S, openBlock as d, createBlock as g, normalizeProps as X, guardReactiveProps as Q, withCtx as f, createElementVNode as u, normalizeClass as B, unref as c, createCommentVNode as z, createVNode as y, renderSlot as k, ref as P, createElementBlock as v, Fragment as O, mergeProps as F, renderList as A, mergeModels as q, useModel as D, computed as C, createTextVNode as _, toDisplayString as w, withDirectives as R, vShow as W, createSlots as ae, onMounted as ie, isRef as we, withKeys as K, normalizeStyle as ke, withModifiers as Y, watch as pe, h as $e, useTemplateRef as Be } from "vue";
|
|
3
|
+
import { Icon as j } from "@iconify/vue";
|
|
4
|
+
import N from "primevue/button";
|
|
5
|
+
import Se from "primevue/toast";
|
|
6
6
|
import Fe from "primevue/autocomplete";
|
|
7
|
-
import
|
|
7
|
+
import ze from "primevue/checkbox";
|
|
8
8
|
import { useField as ee } from "vee-validate";
|
|
9
|
-
import
|
|
10
|
-
import
|
|
9
|
+
import Ce from "primevue/progressspinner";
|
|
10
|
+
import Te from "primevue/dialog";
|
|
11
11
|
import le from "primevue/inputtext";
|
|
12
|
-
import { vOnClickOutside as
|
|
13
|
-
import
|
|
12
|
+
import { vOnClickOutside as je } from "@vueuse/components";
|
|
13
|
+
import Ie from "primevue/menubar";
|
|
14
14
|
import oe from "primevue/multiselect";
|
|
15
|
-
import
|
|
16
|
-
import
|
|
15
|
+
import Pe from "primevue/datepicker";
|
|
16
|
+
import te from "primevue/select";
|
|
17
17
|
import _e from "primevue/inputmask";
|
|
18
18
|
import Ve from "primevue/textarea";
|
|
19
19
|
import ce from "primevue/inputnumber";
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import
|
|
20
|
+
import Me from "primevue/chip";
|
|
21
|
+
import De from "primevue/progressbar";
|
|
22
|
+
import Oe from "primevue/step";
|
|
23
|
+
import Ne from "primevue/stepper";
|
|
24
|
+
import Ue from "primevue/steplist";
|
|
25
|
+
import Ae from "primevue/steppanel";
|
|
26
26
|
import qe from "primevue/steppanels";
|
|
27
|
-
import
|
|
27
|
+
import Le from "primevue/datatable";
|
|
28
28
|
import { BlockBlobClient as me } from "@azure/storage-blob";
|
|
29
29
|
import ue from "primevue/popover";
|
|
30
|
-
import
|
|
31
|
-
const
|
|
30
|
+
import Ee from "primevue/image";
|
|
31
|
+
const Re = {
|
|
32
32
|
autoComplete: {
|
|
33
33
|
root: ({ props: e }) => ({
|
|
34
34
|
class: [
|
|
@@ -57,7 +57,7 @@ const Ee = {
|
|
|
57
57
|
}),
|
|
58
58
|
emptyMessage: "mx-3 my-2"
|
|
59
59
|
}
|
|
60
|
-
},
|
|
60
|
+
}, He = {
|
|
61
61
|
button: {
|
|
62
62
|
root: ({ props: e }) => ({
|
|
63
63
|
class: [
|
|
@@ -158,23 +158,23 @@ const Ee = {
|
|
|
158
158
|
})
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
|
-
},
|
|
161
|
+
}, We = {
|
|
162
162
|
checkbox: {
|
|
163
163
|
root: () => ({
|
|
164
164
|
class: ["form-check"]
|
|
165
165
|
}),
|
|
166
|
-
input: ({ context: e, state:
|
|
166
|
+
input: ({ context: e, state: t }) => ({
|
|
167
167
|
class: [
|
|
168
168
|
"form-check-input px-2 py-2 rounded",
|
|
169
169
|
{
|
|
170
170
|
"bg-primary": e == null ? void 0 : e.checked,
|
|
171
171
|
"cursor-pointer": !(e != null && e.disabled),
|
|
172
|
-
"form-check-input__focus":
|
|
172
|
+
"form-check-input__focus": t.focused
|
|
173
173
|
}
|
|
174
174
|
]
|
|
175
175
|
})
|
|
176
176
|
}
|
|
177
|
-
},
|
|
177
|
+
}, Ye = {
|
|
178
178
|
select: {
|
|
179
179
|
root: ({ props: e }) => ({
|
|
180
180
|
class: [
|
|
@@ -222,17 +222,17 @@ const Ee = {
|
|
|
222
222
|
]
|
|
223
223
|
})
|
|
224
224
|
}
|
|
225
|
-
},
|
|
225
|
+
}, Ge = {
|
|
226
226
|
column: {
|
|
227
227
|
pcSortBadge: "ms-2 my-auto cursor-pointer",
|
|
228
228
|
headerCell: (e) => {
|
|
229
|
-
var
|
|
229
|
+
var t, a, i, l;
|
|
230
230
|
return {
|
|
231
231
|
class: [
|
|
232
232
|
"align-top",
|
|
233
233
|
{
|
|
234
234
|
"cursor-move": e.props.reorderableColumns,
|
|
235
|
-
"position-sticky": ((
|
|
235
|
+
"position-sticky": ((t = e.column) == null ? void 0 : t.context.frozen) !== void 0 || ((a = e.column) == null ? void 0 : a.context.frozen) || ((i = e.column) == null ? void 0 : i.context.frozen) === "",
|
|
236
236
|
"overflow-hidden position-relative bg-clip-padding": (l = e.column) == null ? void 0 : l.context.resizable
|
|
237
237
|
}
|
|
238
238
|
]
|
|
@@ -246,10 +246,10 @@ const Ee = {
|
|
|
246
246
|
pcRowEditorSave: "btn",
|
|
247
247
|
pcRowEditorCancel: "btn",
|
|
248
248
|
bodyCell: (e) => {
|
|
249
|
-
var
|
|
249
|
+
var t;
|
|
250
250
|
return {
|
|
251
251
|
class: {
|
|
252
|
-
"position-sticky": ((
|
|
252
|
+
"position-sticky": ((t = e.column.props) == null ? void 0 : t.frozen) !== void 0,
|
|
253
253
|
"overflow-hidden text-nowrap": e.props.resizableColumns
|
|
254
254
|
}
|
|
255
255
|
};
|
|
@@ -264,12 +264,12 @@ const Ee = {
|
|
|
264
264
|
]
|
|
265
265
|
}),
|
|
266
266
|
pcColumnFilterClearButton: ({ props: e }) => {
|
|
267
|
-
var
|
|
267
|
+
var t;
|
|
268
268
|
return {
|
|
269
269
|
class: [
|
|
270
270
|
"btn",
|
|
271
271
|
{
|
|
272
|
-
"d-none": e.filters[e.field] ? ((
|
|
272
|
+
"d-none": e.filters[e.field] ? ((t = e.filters[e.field]) == null ? void 0 : t.value) === null : !1
|
|
273
273
|
}
|
|
274
274
|
]
|
|
275
275
|
};
|
|
@@ -288,13 +288,13 @@ const Ee = {
|
|
|
288
288
|
filterElementContainer: "w-100",
|
|
289
289
|
filterConstraintList: "ps-0",
|
|
290
290
|
filterConstraint: (e) => {
|
|
291
|
-
var
|
|
291
|
+
var t;
|
|
292
292
|
return {
|
|
293
293
|
class: [
|
|
294
294
|
"dropdown-item cursor-pointer",
|
|
295
295
|
{
|
|
296
296
|
//@ts-ignore
|
|
297
|
-
active: (
|
|
297
|
+
active: (t = e.column.context) == null ? void 0 : t.highlighted
|
|
298
298
|
}
|
|
299
299
|
]
|
|
300
300
|
};
|
|
@@ -325,22 +325,22 @@ const Ee = {
|
|
|
325
325
|
]
|
|
326
326
|
})
|
|
327
327
|
}
|
|
328
|
-
},
|
|
328
|
+
}, Je = {
|
|
329
329
|
inputtext: {
|
|
330
330
|
root: (e) => {
|
|
331
|
-
var
|
|
331
|
+
var t, a;
|
|
332
332
|
return {
|
|
333
333
|
class: [
|
|
334
334
|
"form-control",
|
|
335
335
|
{
|
|
336
|
-
"form-control-lg": ((
|
|
337
|
-
"form-control-sm": ((
|
|
336
|
+
"form-control-lg": ((t = e.props.size) == null ? void 0 : t.toLowerCase()) == "large",
|
|
337
|
+
"form-control-sm": ((a = e.props.size) == null ? void 0 : a.toLowerCase()) == "small"
|
|
338
338
|
}
|
|
339
339
|
]
|
|
340
340
|
};
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
|
-
},
|
|
343
|
+
}, Ke = {
|
|
344
344
|
inputmask: {
|
|
345
345
|
root: () => ({
|
|
346
346
|
class: [
|
|
@@ -348,24 +348,24 @@ const Ee = {
|
|
|
348
348
|
]
|
|
349
349
|
})
|
|
350
350
|
}
|
|
351
|
-
},
|
|
351
|
+
}, Ze = {
|
|
352
352
|
toggleSwitch: {
|
|
353
353
|
root: "form-check form-switch",
|
|
354
354
|
input: "form-check-input"
|
|
355
355
|
}
|
|
356
|
-
},
|
|
356
|
+
}, Xe = {
|
|
357
357
|
tag: {
|
|
358
358
|
root: ({ props: e }) => ({
|
|
359
359
|
class: [
|
|
360
360
|
"badge d-inline-flex align-items-center border me-1 p-1",
|
|
361
361
|
{
|
|
362
362
|
"bg-primary-subtle text-primary border-primary": e.severity === null || e.severity === void 0 || e.severity === "primary",
|
|
363
|
-
"bg-
|
|
364
|
-
"bg-
|
|
365
|
-
"bg-
|
|
366
|
-
"bg-
|
|
367
|
-
"bg-
|
|
368
|
-
"bg-
|
|
363
|
+
"bg-brand-shade-1 text-brand border-brand": e.severity === "brand",
|
|
364
|
+
"bg-secondary-subtle text-secondary border-secondary": e.severity === "secondary",
|
|
365
|
+
"bg-success-subtle text-success border-success": e.severity === "success",
|
|
366
|
+
"bg-warning-subtle text-warning border-warning": e.severity === "warning" || e.severity === "warn",
|
|
367
|
+
"bg-danger-subtle text-danger border-danger": e.severity === "danger",
|
|
368
|
+
"bg-info-subtle text-info border-info": e.severity === "info"
|
|
369
369
|
},
|
|
370
370
|
{
|
|
371
371
|
"rounded-pill": e.rounded
|
|
@@ -373,7 +373,7 @@ const Ee = {
|
|
|
373
373
|
]
|
|
374
374
|
})
|
|
375
375
|
}
|
|
376
|
-
},
|
|
376
|
+
}, Qe = {
|
|
377
377
|
textarea: {
|
|
378
378
|
root: () => ({
|
|
379
379
|
class: [
|
|
@@ -381,13 +381,13 @@ const Ee = {
|
|
|
381
381
|
]
|
|
382
382
|
})
|
|
383
383
|
}
|
|
384
|
-
},
|
|
384
|
+
}, et = {
|
|
385
385
|
chip: {
|
|
386
386
|
root: "badge rounded-pill bg-primary-subtle text-primary d-inline-flex align-items-center border border-primary me-1 p-1",
|
|
387
387
|
label: "px-2 fs-6 fw-400",
|
|
388
388
|
removeIcon: "ms-auto my-auto"
|
|
389
389
|
}
|
|
390
|
-
},
|
|
390
|
+
}, tt = {
|
|
391
391
|
dialog: {
|
|
392
392
|
header: () => ({
|
|
393
393
|
class: ["modal-header"]
|
|
@@ -434,7 +434,7 @@ const Ee = {
|
|
|
434
434
|
]
|
|
435
435
|
})
|
|
436
436
|
}
|
|
437
|
-
},
|
|
437
|
+
}, at = {
|
|
438
438
|
popover: {
|
|
439
439
|
root: (e) => ({
|
|
440
440
|
class: [
|
|
@@ -448,7 +448,7 @@ const Ee = {
|
|
|
448
448
|
content: "d-flex position-relative",
|
|
449
449
|
closeButton: "position-absolute top-0 end-0 p-1 btn btn-link text-black ms-2"
|
|
450
450
|
}
|
|
451
|
-
},
|
|
451
|
+
}, it = {
|
|
452
452
|
message: {
|
|
453
453
|
root: ({ props: e }) => ({
|
|
454
454
|
class: [
|
|
@@ -477,7 +477,7 @@ const Ee = {
|
|
|
477
477
|
class: ["px-0 ms-2 btn d-flex"]
|
|
478
478
|
})
|
|
479
479
|
}
|
|
480
|
-
},
|
|
480
|
+
}, lt = {
|
|
481
481
|
// More PT options defined in ForgeStepper.
|
|
482
482
|
stepList: {
|
|
483
483
|
root: "d-flex mb-2 w-100"
|
|
@@ -505,7 +505,7 @@ const Ee = {
|
|
|
505
505
|
}),
|
|
506
506
|
separator: "border border-1 separator"
|
|
507
507
|
}
|
|
508
|
-
},
|
|
508
|
+
}, ot = {
|
|
509
509
|
tabList: {
|
|
510
510
|
root: () => ({
|
|
511
511
|
class: ["nav nav-tabs position-relative"]
|
|
@@ -530,7 +530,7 @@ const Ee = {
|
|
|
530
530
|
class: ["p-2"]
|
|
531
531
|
})
|
|
532
532
|
}
|
|
533
|
-
},
|
|
533
|
+
}, nt = {
|
|
534
534
|
// More PassThrough options defined in ForgeDatepicker.
|
|
535
535
|
datepicker: {
|
|
536
536
|
root: "d-inline-flex relative w-100",
|
|
@@ -605,7 +605,7 @@ const Ee = {
|
|
|
605
605
|
pcDecrementButton: { root: "btn btn-sm", label: "d-none" },
|
|
606
606
|
pcIncrementButton: { root: "btn btn-sm", label: "d-none" }
|
|
607
607
|
}
|
|
608
|
-
},
|
|
608
|
+
}, st = {
|
|
609
609
|
multiselect: {
|
|
610
610
|
root: ({ props: e }) => ({
|
|
611
611
|
class: [
|
|
@@ -633,7 +633,7 @@ const Ee = {
|
|
|
633
633
|
class: "d-none"
|
|
634
634
|
})
|
|
635
635
|
}
|
|
636
|
-
},
|
|
636
|
+
}, rt = {
|
|
637
637
|
// More PassThrough options in component file.
|
|
638
638
|
progressbar: {
|
|
639
639
|
root: () => ({
|
|
@@ -643,14 +643,14 @@ const Ee = {
|
|
|
643
643
|
class: ["text-white m-1"]
|
|
644
644
|
})
|
|
645
645
|
}
|
|
646
|
-
},
|
|
646
|
+
}, dt = {
|
|
647
647
|
panel: {
|
|
648
648
|
root: "card w-100",
|
|
649
|
-
header: "d-flex justify-content-between align-items-center fw-600
|
|
649
|
+
header: "d-flex justify-content-between align-items-center fw-600 ms-4 me-3 my-2",
|
|
650
650
|
pcToggleButton: "btn",
|
|
651
|
-
contentContainer: "
|
|
651
|
+
contentContainer: "mt-2 mx-4 mb-4"
|
|
652
652
|
}
|
|
653
|
-
},
|
|
653
|
+
}, pt = {
|
|
654
654
|
// More PT options can be found in the ForgeTable file.
|
|
655
655
|
dataTable: {
|
|
656
656
|
root: "position-relative",
|
|
@@ -687,12 +687,12 @@ const Ee = {
|
|
|
687
687
|
},
|
|
688
688
|
paginator: {
|
|
689
689
|
root: (e) => {
|
|
690
|
-
var
|
|
690
|
+
var t;
|
|
691
691
|
return {
|
|
692
692
|
class: [
|
|
693
693
|
"",
|
|
694
694
|
{
|
|
695
|
-
"opacity-50": (
|
|
695
|
+
"opacity-50": (t = e.parent) == null ? void 0 : t.props.loading
|
|
696
696
|
}
|
|
697
697
|
]
|
|
698
698
|
};
|
|
@@ -713,7 +713,7 @@ const Ee = {
|
|
|
713
713
|
]
|
|
714
714
|
})
|
|
715
715
|
}
|
|
716
|
-
},
|
|
716
|
+
}, ct = {
|
|
717
717
|
badge: {
|
|
718
718
|
root: ({ props: e }) => ({
|
|
719
719
|
class: [
|
|
@@ -734,7 +734,7 @@ const Ee = {
|
|
|
734
734
|
]
|
|
735
735
|
})
|
|
736
736
|
}
|
|
737
|
-
},
|
|
737
|
+
}, mt = {
|
|
738
738
|
// More PassThrough options in component file.
|
|
739
739
|
menubar: {
|
|
740
740
|
rootList: ({ instance: e }) => ({
|
|
@@ -746,17 +746,17 @@ const Ee = {
|
|
|
746
746
|
]
|
|
747
747
|
}),
|
|
748
748
|
item: ({ context: e }) => {
|
|
749
|
-
var
|
|
749
|
+
var t;
|
|
750
750
|
return {
|
|
751
751
|
class: [
|
|
752
752
|
"nav-item",
|
|
753
753
|
{
|
|
754
|
-
dropdown: ((
|
|
754
|
+
dropdown: ((t = e.item.items) == null ? void 0 : t.length) > 0
|
|
755
755
|
}
|
|
756
756
|
]
|
|
757
757
|
};
|
|
758
758
|
},
|
|
759
|
-
itemLink: ({ context: e, instance:
|
|
759
|
+
itemLink: ({ context: e, instance: t }) => ({
|
|
760
760
|
class: [
|
|
761
761
|
"cursor-pointer",
|
|
762
762
|
{
|
|
@@ -764,7 +764,7 @@ const Ee = {
|
|
|
764
764
|
"nav-link": e.level === 0,
|
|
765
765
|
"dropdown-item": e.level > 0,
|
|
766
766
|
disabled: e.item.disabled,
|
|
767
|
-
"px-3":
|
|
767
|
+
"px-3": t.mobileActive
|
|
768
768
|
}
|
|
769
769
|
]
|
|
770
770
|
}),
|
|
@@ -815,7 +815,7 @@ const Ee = {
|
|
|
815
815
|
]
|
|
816
816
|
})
|
|
817
817
|
}
|
|
818
|
-
},
|
|
818
|
+
}, ut = {
|
|
819
819
|
tooltip: {
|
|
820
820
|
root: ({ context: e }) => ({
|
|
821
821
|
class: [
|
|
@@ -837,7 +837,7 @@ const Ee = {
|
|
|
837
837
|
class: ["tooltip-inner"]
|
|
838
838
|
}
|
|
839
839
|
}
|
|
840
|
-
},
|
|
840
|
+
}, vt = {
|
|
841
841
|
selectButton: {
|
|
842
842
|
root: () => ({
|
|
843
843
|
class: ["btn-group"]
|
|
@@ -854,7 +854,7 @@ const Ee = {
|
|
|
854
854
|
]
|
|
855
855
|
})
|
|
856
856
|
}
|
|
857
|
-
},
|
|
857
|
+
}, ft = {
|
|
858
858
|
splitbutton: {
|
|
859
859
|
root: () => ({
|
|
860
860
|
class: ["btn-group"]
|
|
@@ -890,7 +890,7 @@ const Ee = {
|
|
|
890
890
|
separator: "border-bottom w-100"
|
|
891
891
|
}
|
|
892
892
|
}
|
|
893
|
-
},
|
|
893
|
+
}, gt = {
|
|
894
894
|
progressspinner: {
|
|
895
895
|
spin: () => ({
|
|
896
896
|
class: [
|
|
@@ -898,7 +898,7 @@ const Ee = {
|
|
|
898
898
|
]
|
|
899
899
|
})
|
|
900
900
|
}
|
|
901
|
-
},
|
|
901
|
+
}, bt = {
|
|
902
902
|
card: {
|
|
903
903
|
root: () => ({
|
|
904
904
|
class: ["card"]
|
|
@@ -922,11 +922,11 @@ const Ee = {
|
|
|
922
922
|
class: ["card-header"]
|
|
923
923
|
})
|
|
924
924
|
}
|
|
925
|
-
},
|
|
925
|
+
}, xt = {
|
|
926
926
|
divider: {
|
|
927
927
|
root: "border-bottom w-100 m-1"
|
|
928
928
|
}
|
|
929
|
-
},
|
|
929
|
+
}, yt = {
|
|
930
930
|
image: {
|
|
931
931
|
root: "position-relative d-inline-block",
|
|
932
932
|
previewMask: "preview-button",
|
|
@@ -939,7 +939,7 @@ const Ee = {
|
|
|
939
939
|
zoominbutton: "btn text-white",
|
|
940
940
|
closebutton: "btn text-white"
|
|
941
941
|
}
|
|
942
|
-
},
|
|
942
|
+
}, ht = {
|
|
943
943
|
toast: {
|
|
944
944
|
message: () => ({
|
|
945
945
|
class: ["toast-container w-100 position-relative"]
|
|
@@ -960,13 +960,13 @@ const Ee = {
|
|
|
960
960
|
class: ["ps-1"]
|
|
961
961
|
}),
|
|
962
962
|
messageIcon: ({ props: e }) => {
|
|
963
|
-
var
|
|
963
|
+
var t, a, i, l;
|
|
964
964
|
return {
|
|
965
965
|
class: [
|
|
966
966
|
"toast-icon",
|
|
967
967
|
{
|
|
968
|
-
"text-primary": ((
|
|
969
|
-
"text-success": ((
|
|
968
|
+
"text-primary": ((t = e.message) == null ? void 0 : t.severity) === "info",
|
|
969
|
+
"text-success": ((a = e.message) == null ? void 0 : a.severity) === "success",
|
|
970
970
|
"text-danger": ((i = e.message) == null ? void 0 : i.severity) === "error",
|
|
971
971
|
"text-warning": ((l = e.message) == null ? void 0 : l.severity) === "warn"
|
|
972
972
|
}
|
|
@@ -974,7 +974,7 @@ const Ee = {
|
|
|
974
974
|
};
|
|
975
975
|
}
|
|
976
976
|
}
|
|
977
|
-
},
|
|
977
|
+
}, wt = {
|
|
978
978
|
fieldset: {
|
|
979
979
|
root: () => ({
|
|
980
980
|
class: [
|
|
@@ -1000,42 +1000,42 @@ const Ee = {
|
|
|
1000
1000
|
]
|
|
1001
1001
|
})
|
|
1002
1002
|
}
|
|
1003
|
-
},
|
|
1004
|
-
...Ee,
|
|
1005
|
-
...pa,
|
|
1006
|
-
...Ne,
|
|
1007
|
-
...fa,
|
|
1003
|
+
}, Fi = {
|
|
1008
1004
|
...Re,
|
|
1009
|
-
...
|
|
1010
|
-
...We,
|
|
1011
|
-
...la,
|
|
1012
|
-
...Qe,
|
|
1013
|
-
...ba,
|
|
1005
|
+
...ct,
|
|
1014
1006
|
...He,
|
|
1015
|
-
...
|
|
1007
|
+
...bt,
|
|
1008
|
+
...We,
|
|
1009
|
+
...et,
|
|
1016
1010
|
...Ge,
|
|
1011
|
+
...nt,
|
|
1012
|
+
...tt,
|
|
1013
|
+
...xt,
|
|
1017
1014
|
...Ye,
|
|
1015
|
+
...yt,
|
|
1016
|
+
...Je,
|
|
1018
1017
|
...Ke,
|
|
1019
|
-
...aa,
|
|
1020
|
-
...oa,
|
|
1021
|
-
...da,
|
|
1022
|
-
...ea,
|
|
1023
|
-
...na,
|
|
1024
|
-
...va,
|
|
1025
|
-
...sa,
|
|
1026
|
-
...ma,
|
|
1027
|
-
...ua,
|
|
1028
|
-
...ta,
|
|
1029
|
-
...ra,
|
|
1030
1018
|
...Ze,
|
|
1031
|
-
...
|
|
1032
|
-
...
|
|
1033
|
-
...
|
|
1034
|
-
...
|
|
1019
|
+
...it,
|
|
1020
|
+
...st,
|
|
1021
|
+
...mt,
|
|
1022
|
+
...at,
|
|
1023
|
+
...rt,
|
|
1024
|
+
...gt,
|
|
1025
|
+
...dt,
|
|
1026
|
+
...vt,
|
|
1027
|
+
...ft,
|
|
1028
|
+
...lt,
|
|
1029
|
+
...pt,
|
|
1030
|
+
...Xe,
|
|
1031
|
+
...ot,
|
|
1032
|
+
...ht,
|
|
1033
|
+
...Qe,
|
|
1034
|
+
...wt,
|
|
1035
1035
|
directives: {
|
|
1036
|
-
...
|
|
1036
|
+
...ut
|
|
1037
1037
|
}
|
|
1038
|
-
}, ne = /* @__PURE__ */
|
|
1038
|
+
}, ne = /* @__PURE__ */ S({
|
|
1039
1039
|
__name: "ForgeAlert",
|
|
1040
1040
|
props: {
|
|
1041
1041
|
severity: { default: "primary" },
|
|
@@ -1053,34 +1053,34 @@ const Ee = {
|
|
|
1053
1053
|
variant: {}
|
|
1054
1054
|
},
|
|
1055
1055
|
setup(e) {
|
|
1056
|
-
const
|
|
1057
|
-
return (
|
|
1056
|
+
const t = e;
|
|
1057
|
+
return (a, i) => {
|
|
1058
1058
|
const l = he;
|
|
1059
|
-
return
|
|
1060
|
-
icon:
|
|
1061
|
-
|
|
1062
|
-
class:
|
|
1059
|
+
return d(), g(l, X(Q({ ...a.$attrs, ...t })), {
|
|
1060
|
+
icon: f(() => [
|
|
1061
|
+
u("div", {
|
|
1062
|
+
class: B(t.icon ? "me-2 pe-1" : "")
|
|
1063
1063
|
}, [
|
|
1064
|
-
|
|
1064
|
+
t.icon ? (d(), g(c(j), {
|
|
1065
1065
|
key: 0,
|
|
1066
1066
|
"data-cy": "message-icon",
|
|
1067
|
-
icon:
|
|
1068
|
-
class:
|
|
1067
|
+
icon: t.icon,
|
|
1068
|
+
class: B(`text-${t.severity}`),
|
|
1069
1069
|
height: 35
|
|
1070
|
-
}, null, 8, ["icon", "class"])) :
|
|
1070
|
+
}, null, 8, ["icon", "class"])) : z("", !0)
|
|
1071
1071
|
], 2)
|
|
1072
1072
|
]),
|
|
1073
|
-
closeicon:
|
|
1074
|
-
|
|
1073
|
+
closeicon: f(() => [
|
|
1074
|
+
y(c(j), { icon: "bi:x" })
|
|
1075
1075
|
]),
|
|
1076
|
-
default:
|
|
1077
|
-
|
|
1076
|
+
default: f(() => [
|
|
1077
|
+
k(a.$slots, "default")
|
|
1078
1078
|
]),
|
|
1079
1079
|
_: 3
|
|
1080
1080
|
}, 16);
|
|
1081
1081
|
};
|
|
1082
1082
|
}
|
|
1083
|
-
}),
|
|
1083
|
+
}), zi = /* @__PURE__ */ S({
|
|
1084
1084
|
__name: "ForgeActionButton",
|
|
1085
1085
|
props: {
|
|
1086
1086
|
action: {},
|
|
@@ -1089,38 +1089,38 @@ const Ee = {
|
|
|
1089
1089
|
params: { default: Array }
|
|
1090
1090
|
},
|
|
1091
1091
|
setup(e) {
|
|
1092
|
-
const
|
|
1093
|
-
|
|
1092
|
+
const t = P(!1), a = e, i = async () => {
|
|
1093
|
+
t.value = !0;
|
|
1094
1094
|
try {
|
|
1095
|
-
await
|
|
1095
|
+
await a.action.apply(this, a.params);
|
|
1096
1096
|
} catch (l) {
|
|
1097
|
-
await
|
|
1097
|
+
await a.errorAction.apply(this, a.errorParams ? [...a.errorParams, l] : [l]);
|
|
1098
1098
|
}
|
|
1099
|
-
|
|
1099
|
+
t.value = !1;
|
|
1100
1100
|
};
|
|
1101
1101
|
return (l, o) => {
|
|
1102
|
-
const
|
|
1103
|
-
return
|
|
1104
|
-
|
|
1105
|
-
loading:
|
|
1106
|
-
disabled:
|
|
1102
|
+
const r = N;
|
|
1103
|
+
return d(), v(O, null, [
|
|
1104
|
+
y(r, F({ ...a, ...l.$attrs }, {
|
|
1105
|
+
loading: t.value,
|
|
1106
|
+
disabled: t.value || a.disabled,
|
|
1107
1107
|
onClick: i
|
|
1108
1108
|
}), null, 16, ["loading", "disabled"]),
|
|
1109
|
-
|
|
1109
|
+
y(c(Se))
|
|
1110
1110
|
], 64);
|
|
1111
1111
|
};
|
|
1112
1112
|
}
|
|
1113
|
-
}),
|
|
1113
|
+
}), Ci = /* @__PURE__ */ S({
|
|
1114
1114
|
__name: "ForgeAutoComplete",
|
|
1115
1115
|
setup(e) {
|
|
1116
|
-
return (
|
|
1117
|
-
default:
|
|
1118
|
-
(
|
|
1116
|
+
return (t, a) => (d(), g(c(Fe), F({ ...t.$attrs, ...t.$props }, { inputClass: "form-control border-0" }), {
|
|
1117
|
+
default: f(() => [
|
|
1118
|
+
(d(!0), v(O, null, A(t.$slots, (i, l) => k(t.$slots, l, { slot: l })), 256))
|
|
1119
1119
|
]),
|
|
1120
1120
|
_: 3
|
|
1121
1121
|
}, 16));
|
|
1122
1122
|
}
|
|
1123
|
-
}),
|
|
1123
|
+
}), kt = { class: "d-flex flex-column" }, $t = ["for"], ve = /* @__PURE__ */ S({
|
|
1124
1124
|
__name: "ForgeCheckbox",
|
|
1125
1125
|
props: /* @__PURE__ */ q({
|
|
1126
1126
|
label: { default: "" },
|
|
@@ -1155,69 +1155,69 @@ const Ee = {
|
|
|
1155
1155
|
}),
|
|
1156
1156
|
emits: ["update:modelValue"],
|
|
1157
1157
|
setup(e) {
|
|
1158
|
-
const
|
|
1159
|
-
() =>
|
|
1158
|
+
const t = e, a = D(e, "modelValue"), { handleChange: i, errors: l, errorMessage: o } = ee(
|
|
1159
|
+
() => t.name ?? "",
|
|
1160
1160
|
void 0,
|
|
1161
1161
|
{
|
|
1162
1162
|
type: "checkbox",
|
|
1163
|
-
checkedValue:
|
|
1163
|
+
checkedValue: a.value
|
|
1164
1164
|
}
|
|
1165
|
-
),
|
|
1166
|
-
|
|
1167
|
-
},
|
|
1168
|
-
return (
|
|
1169
|
-
const
|
|
1170
|
-
return
|
|
1171
|
-
|
|
1165
|
+
), r = (p) => {
|
|
1166
|
+
t.name ? i(p) : a.value = p;
|
|
1167
|
+
}, s = C(() => l.value.length > 0);
|
|
1168
|
+
return (p, m) => {
|
|
1169
|
+
const b = ze;
|
|
1170
|
+
return d(), v("div", kt, [
|
|
1171
|
+
u("div", F({
|
|
1172
1172
|
class: "d-flex",
|
|
1173
1173
|
"data-cy": "checkbox-container",
|
|
1174
|
-
onClick:
|
|
1175
|
-
}, { ...
|
|
1176
|
-
|
|
1174
|
+
onClick: m[2] || (m[2] = (n) => r(a.value))
|
|
1175
|
+
}, { ...p.$attrs }), [
|
|
1176
|
+
y(b, F({ ...t }, {
|
|
1177
1177
|
binary: "",
|
|
1178
|
-
modelValue:
|
|
1179
|
-
"onUpdate:modelValue":
|
|
1180
|
-
"input-id":
|
|
1181
|
-
"input-class": { "is-invalid":
|
|
1182
|
-
class:
|
|
1178
|
+
modelValue: a.value,
|
|
1179
|
+
"onUpdate:modelValue": m[0] || (m[0] = (n) => a.value = n),
|
|
1180
|
+
"input-id": t.name,
|
|
1181
|
+
"input-class": { "is-invalid": s.value },
|
|
1182
|
+
class: t.disabled ? "" : "cursor-pointer"
|
|
1183
1183
|
}), null, 16, ["modelValue", "input-id", "input-class", "class"]),
|
|
1184
|
-
|
|
1185
|
-
for:
|
|
1186
|
-
onClick:
|
|
1187
|
-
class:
|
|
1184
|
+
u("label", {
|
|
1185
|
+
for: t.name,
|
|
1186
|
+
onClick: m[1] || (m[1] = (n) => r(!a.value)),
|
|
1187
|
+
class: B([`${t.disabled ? "opacity-50" : "cursor-pointer"} ${s.value ? "text-danger-dark" : ""}`, "w-100 my-auto"])
|
|
1188
1188
|
}, [
|
|
1189
|
-
|
|
1190
|
-
|
|
1189
|
+
k(p.$slots, "default", {}, () => [
|
|
1190
|
+
_(w(t.label), 1)
|
|
1191
1191
|
])
|
|
1192
|
-
], 10,
|
|
1192
|
+
], 10, $t)
|
|
1193
1193
|
], 16),
|
|
1194
|
-
R(
|
|
1194
|
+
R(u("small", {
|
|
1195
1195
|
"data-cy": "error",
|
|
1196
1196
|
class: "text-invalid"
|
|
1197
|
-
},
|
|
1198
|
-
[W,
|
|
1197
|
+
}, w(c(o)), 513), [
|
|
1198
|
+
[W, s.value]
|
|
1199
1199
|
])
|
|
1200
1200
|
]);
|
|
1201
1201
|
};
|
|
1202
1202
|
}
|
|
1203
|
-
}),
|
|
1203
|
+
}), Bt = { class: "forge-loader" }, fe = /* @__PURE__ */ S({
|
|
1204
1204
|
__name: "ForgeLoader",
|
|
1205
1205
|
props: {
|
|
1206
1206
|
severity: { default: "primary" }
|
|
1207
1207
|
},
|
|
1208
1208
|
setup(e) {
|
|
1209
|
-
const
|
|
1210
|
-
return (
|
|
1211
|
-
const l =
|
|
1212
|
-
return
|
|
1213
|
-
|
|
1209
|
+
const t = e;
|
|
1210
|
+
return (a, i) => {
|
|
1211
|
+
const l = Ce;
|
|
1212
|
+
return d(), v("div", Bt, [
|
|
1213
|
+
y(l, {
|
|
1214
1214
|
"animation-duration": ".75",
|
|
1215
|
-
class:
|
|
1215
|
+
class: B(`text-${t.severity === void 0 ? "primary" : t.severity}`)
|
|
1216
1216
|
}, null, 8, ["class"])
|
|
1217
1217
|
]);
|
|
1218
1218
|
};
|
|
1219
1219
|
}
|
|
1220
|
-
}),
|
|
1220
|
+
}), St = ["href", "target"], Ti = /* @__PURE__ */ S({
|
|
1221
1221
|
__name: "ForgeLink",
|
|
1222
1222
|
props: {
|
|
1223
1223
|
url: {},
|
|
@@ -1235,7 +1235,7 @@ const Ee = {
|
|
|
1235
1235
|
iconName: {}
|
|
1236
1236
|
},
|
|
1237
1237
|
setup(e) {
|
|
1238
|
-
const
|
|
1238
|
+
const t = C(() => ({
|
|
1239
1239
|
[`link-${e.severity}`]: e.severity,
|
|
1240
1240
|
[`link-underline-${e.underlineSeverity}`]: e.underlineSeverity,
|
|
1241
1241
|
[`link-opacity-${e.opacity}`]: e.opacity,
|
|
@@ -1244,52 +1244,52 @@ const Ee = {
|
|
|
1244
1244
|
[`link-underline-opacity-${e.underlineHoverOpacity ?? e.hoverOpacity}-hover`]: e.underlineHoverOpacity || e.hoverOpacity,
|
|
1245
1245
|
[`link-offset-${e.underlineOffset}`]: e.underlineOffset,
|
|
1246
1246
|
"icon-link icon-link-hover": e.animateIconOnHover
|
|
1247
|
-
})),
|
|
1247
|
+
})), a = C(() => ({
|
|
1248
1248
|
"order-2": e.positionIconEnd,
|
|
1249
1249
|
"me-1": !e.positionIconEnd && !e.animateIconOnHover,
|
|
1250
1250
|
"ms-1": e.positionIconEnd && !e.animateIconOnHover,
|
|
1251
1251
|
"ms-0": e.positionIconEnd && e.animateIconOnHover,
|
|
1252
1252
|
"me-0": e.animateIconOnHover
|
|
1253
1253
|
}));
|
|
1254
|
-
return (i, l) => (
|
|
1254
|
+
return (i, l) => (d(), v("a", {
|
|
1255
1255
|
id: "link",
|
|
1256
|
-
class:
|
|
1256
|
+
class: B(["cursor-pointer d-flex text-break", t.value]),
|
|
1257
1257
|
href: i.url,
|
|
1258
1258
|
target: i.target
|
|
1259
1259
|
}, [
|
|
1260
|
-
|
|
1261
|
-
i.iconName ? (
|
|
1260
|
+
k(i.$slots, "default", {}, () => [
|
|
1261
|
+
i.iconName ? (d(), g(c(j), {
|
|
1262
1262
|
key: 0,
|
|
1263
1263
|
id: "link-icon",
|
|
1264
1264
|
icon: i.iconName,
|
|
1265
|
-
class:
|
|
1266
|
-
}, null, 8, ["icon", "class"])) :
|
|
1267
|
-
|
|
1265
|
+
class: B(["bi my-auto", a.value])
|
|
1266
|
+
}, null, 8, ["icon", "class"])) : z("", !0),
|
|
1267
|
+
_(" " + w(i.label), 1)
|
|
1268
1268
|
])
|
|
1269
|
-
], 10,
|
|
1269
|
+
], 10, St));
|
|
1270
1270
|
}
|
|
1271
1271
|
});
|
|
1272
|
-
function
|
|
1273
|
-
const
|
|
1272
|
+
function Ft(e) {
|
|
1273
|
+
const t = {
|
|
1274
1274
|
errorMessage: "",
|
|
1275
1275
|
errorDetails: []
|
|
1276
1276
|
};
|
|
1277
|
-
if (e.exception && (
|
|
1278
|
-
const
|
|
1279
|
-
|
|
1277
|
+
if (e.exception && (t.errorMessage = e.exception), e.message && (Array.isArray(e.message) ? t.errorDetails = e.message : t.errorMessage = e.message), e.response) {
|
|
1278
|
+
const a = JSON.parse(e.response);
|
|
1279
|
+
a.errors && (t.errorDetails = Object.values(a.errors).flat()), a.message && (t.errorDetails = a.message);
|
|
1280
1280
|
}
|
|
1281
|
-
return
|
|
1281
|
+
return t.errorMessage === "" && t.errorDetails.length === 0 && (t.errorMessage = e), t;
|
|
1282
1282
|
}
|
|
1283
|
-
function
|
|
1284
|
-
return e.map((
|
|
1283
|
+
function ji(e, t) {
|
|
1284
|
+
return e.map((a) => ({ id: a, label: t ? t(a) : `${a}` }));
|
|
1285
1285
|
}
|
|
1286
|
-
function
|
|
1287
|
-
return { id: e, label:
|
|
1286
|
+
function Ii(e, t, a) {
|
|
1287
|
+
return { id: e, label: t ?? e.toString(), shortLabel: a };
|
|
1288
1288
|
}
|
|
1289
|
-
const
|
|
1289
|
+
const zt = { key: 0 }, Ct = {
|
|
1290
1290
|
class: "d-flex w-100",
|
|
1291
1291
|
"data-cy": "footer"
|
|
1292
|
-
},
|
|
1292
|
+
}, Pi = /* @__PURE__ */ S({
|
|
1293
1293
|
__name: "ForgeModal",
|
|
1294
1294
|
props: /* @__PURE__ */ q({
|
|
1295
1295
|
cancelText: { default: "Cancel" },
|
|
@@ -1339,106 +1339,106 @@ const Ba = { key: 0 }, za = {
|
|
|
1339
1339
|
}),
|
|
1340
1340
|
emits: ["update:visible"],
|
|
1341
1341
|
setup(e) {
|
|
1342
|
-
const
|
|
1342
|
+
const t = D(e, "visible"), a = P(!1), i = e, l = P(!1), o = P({
|
|
1343
1343
|
hasError: !1,
|
|
1344
1344
|
header: "",
|
|
1345
1345
|
message: []
|
|
1346
|
-
}),
|
|
1347
|
-
t.value = !1;
|
|
1348
|
-
}, r = () => {
|
|
1349
|
-
t.value = !0;
|
|
1350
|
-
}, d = () => {
|
|
1346
|
+
}), r = () => {
|
|
1351
1347
|
a.value = !1;
|
|
1352
|
-
},
|
|
1348
|
+
}, s = () => {
|
|
1349
|
+
a.value = !0;
|
|
1350
|
+
}, p = () => {
|
|
1351
|
+
t.value = !1;
|
|
1352
|
+
}, m = async () => {
|
|
1353
1353
|
if (i.onConfirm) {
|
|
1354
1354
|
l.value = !0, o.value.hasError = !1;
|
|
1355
1355
|
try {
|
|
1356
|
-
const
|
|
1357
|
-
(
|
|
1358
|
-
} catch (
|
|
1356
|
+
const n = await i.onConfirm();
|
|
1357
|
+
(n || n == null) && p();
|
|
1358
|
+
} catch (n) {
|
|
1359
1359
|
o.value.hasError = !0;
|
|
1360
|
-
const
|
|
1361
|
-
o.value.header =
|
|
1360
|
+
const $ = Ft(n);
|
|
1361
|
+
o.value.header = $.errorMessage, o.value.message = $.errorDetails;
|
|
1362
1362
|
}
|
|
1363
1363
|
l.value = !1;
|
|
1364
1364
|
}
|
|
1365
|
-
},
|
|
1365
|
+
}, b = C(() => ({
|
|
1366
1366
|
root: [
|
|
1367
1367
|
"modal modal-dialog modal-content h-auto m-0",
|
|
1368
1368
|
{
|
|
1369
|
-
"mw-100 vh-100 vw-100 top-0 start-0":
|
|
1369
|
+
"mw-100 vh-100 vw-100 top-0 start-0": a.value,
|
|
1370
1370
|
"modal-sm": i.size === "sm",
|
|
1371
1371
|
"modal-lg": i.size === "lg",
|
|
1372
1372
|
"modal-xl": i.size === "xl"
|
|
1373
1373
|
}
|
|
1374
1374
|
]
|
|
1375
1375
|
}));
|
|
1376
|
-
return (
|
|
1377
|
-
const
|
|
1378
|
-
return
|
|
1379
|
-
onMaximize:
|
|
1380
|
-
onUnmaximize:
|
|
1381
|
-
pt:
|
|
1382
|
-
}),
|
|
1383
|
-
closeicon:
|
|
1384
|
-
|
|
1376
|
+
return (n, $) => {
|
|
1377
|
+
const T = N, V = Te;
|
|
1378
|
+
return d(), g(V, F(i, {
|
|
1379
|
+
onMaximize: s,
|
|
1380
|
+
onUnmaximize: r,
|
|
1381
|
+
pt: b.value
|
|
1382
|
+
}), ae({
|
|
1383
|
+
closeicon: f(() => [
|
|
1384
|
+
y(c(j), {
|
|
1385
1385
|
"data-cy": "close-icon",
|
|
1386
1386
|
icon: "bi:x-lg",
|
|
1387
1387
|
width: "18",
|
|
1388
1388
|
height: "18",
|
|
1389
|
-
onClick:
|
|
1389
|
+
onClick: p
|
|
1390
1390
|
})
|
|
1391
1391
|
]),
|
|
1392
|
-
maximizeicon:
|
|
1393
|
-
|
|
1392
|
+
maximizeicon: f(() => [
|
|
1393
|
+
y(c(j), {
|
|
1394
1394
|
"data-cy": "maximisable-icon",
|
|
1395
|
-
icon:
|
|
1395
|
+
icon: a.value ? "bi:arrows-angle-contract" : "bi:arrows-angle-expand",
|
|
1396
1396
|
width: "16",
|
|
1397
1397
|
height: "16"
|
|
1398
1398
|
}, null, 8, ["icon"])
|
|
1399
1399
|
]),
|
|
1400
1400
|
_: 2
|
|
1401
1401
|
}, [
|
|
1402
|
-
|
|
1403
|
-
name:
|
|
1404
|
-
fn:
|
|
1405
|
-
o.value.hasError ? (
|
|
1402
|
+
A(n.$slots, (M, I) => ({
|
|
1403
|
+
name: I,
|
|
1404
|
+
fn: f((x) => [
|
|
1405
|
+
o.value.hasError ? (d(), g(ne, {
|
|
1406
1406
|
key: 0,
|
|
1407
1407
|
severity: "danger",
|
|
1408
1408
|
"data-cy": "error"
|
|
1409
1409
|
}, {
|
|
1410
|
-
default:
|
|
1411
|
-
|
|
1412
|
-
class:
|
|
1413
|
-
},
|
|
1414
|
-
o.value.message.length > 0 ? (
|
|
1415
|
-
(
|
|
1416
|
-
])) :
|
|
1410
|
+
default: f(() => [
|
|
1411
|
+
u("p", {
|
|
1412
|
+
class: B(o.value.message.length > 0 ? "my-auto" : "mb-0")
|
|
1413
|
+
}, w(o.value.header), 3),
|
|
1414
|
+
o.value.message.length > 0 ? (d(), v("ul", zt, [
|
|
1415
|
+
(d(!0), v(O, null, A(o.value.message, (h) => (d(), v("li", { key: h }, w(h), 1))), 128))
|
|
1416
|
+
])) : z("", !0)
|
|
1417
1417
|
]),
|
|
1418
1418
|
_: 1
|
|
1419
|
-
})) :
|
|
1420
|
-
|
|
1421
|
-
l.value ?
|
|
1422
|
-
|
|
1423
|
-
]) :
|
|
1419
|
+
})) : z("", !0),
|
|
1420
|
+
k(n.$slots, I, X(Q(x || {}))),
|
|
1421
|
+
l.value ? k(n.$slots, "loader", { key: 1 }, () => [
|
|
1422
|
+
y(fe, { "data-cy": "loader" })
|
|
1423
|
+
]) : z("", !0)
|
|
1424
1424
|
])
|
|
1425
1425
|
})),
|
|
1426
|
-
|
|
1426
|
+
n.showFooter ? {
|
|
1427
1427
|
name: "footer",
|
|
1428
|
-
fn:
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
label:
|
|
1432
|
-
class:
|
|
1428
|
+
fn: f(() => [
|
|
1429
|
+
u("div", Ct, [
|
|
1430
|
+
y(T, {
|
|
1431
|
+
label: n.cancelText,
|
|
1432
|
+
class: B(i.cancelClass),
|
|
1433
1433
|
outlined: "",
|
|
1434
|
-
onClick:
|
|
1434
|
+
onClick: p,
|
|
1435
1435
|
id: "cancel-button",
|
|
1436
1436
|
type: i.cancelButtonType
|
|
1437
1437
|
}, null, 8, ["label", "class", "type"]),
|
|
1438
|
-
|
|
1439
|
-
label:
|
|
1440
|
-
class:
|
|
1441
|
-
onClick:
|
|
1438
|
+
y(T, {
|
|
1439
|
+
label: n.submitText,
|
|
1440
|
+
class: B([i.submitClass, "ms-auto"]),
|
|
1441
|
+
onClick: m,
|
|
1442
1442
|
id: "submit-button",
|
|
1443
1443
|
type: i.submitButtonType
|
|
1444
1444
|
}, null, 8, ["label", "class", "type"])
|
|
@@ -1449,7 +1449,7 @@ const Ba = { key: 0 }, za = {
|
|
|
1449
1449
|
]), 1040, ["pt"]);
|
|
1450
1450
|
};
|
|
1451
1451
|
}
|
|
1452
|
-
}),
|
|
1452
|
+
}), Tt = ["id"], jt = { key: 0 }, It = { key: 0 }, Pt = { class: "d-flex justify-content-between align-items-center position-relative" }, _t = { key: 1 }, Vt = { "data-cy": "readonly-value" }, Mt = /* @__PURE__ */ S({
|
|
1453
1453
|
__name: "ForgeInlineEditor",
|
|
1454
1454
|
props: /* @__PURE__ */ q({
|
|
1455
1455
|
name: { default: "" },
|
|
@@ -1464,111 +1464,111 @@ const Ba = { key: 0 }, za = {
|
|
|
1464
1464
|
}),
|
|
1465
1465
|
emits: ["update:modelValue"],
|
|
1466
1466
|
setup(e) {
|
|
1467
|
-
const
|
|
1468
|
-
var
|
|
1469
|
-
i.value = !i.value, (
|
|
1470
|
-
},
|
|
1471
|
-
if (
|
|
1467
|
+
const t = e, a = D(e, "modelValue"), i = P(!1), l = P(), o = () => {
|
|
1468
|
+
var T;
|
|
1469
|
+
i.value = !i.value, (T = l.value) == null || T.focus();
|
|
1470
|
+
}, r = async () => {
|
|
1471
|
+
if ($.value)
|
|
1472
1472
|
return !1;
|
|
1473
|
-
if (
|
|
1473
|
+
if (a.value = n.value, t.completeAction)
|
|
1474
1474
|
try {
|
|
1475
|
-
await
|
|
1475
|
+
await t.completeAction.apply(this, t.params), i.value = !i.value;
|
|
1476
1476
|
} catch {
|
|
1477
|
-
|
|
1477
|
+
t.errorAction && await t.errorAction.apply(this, t.errorParams);
|
|
1478
1478
|
}
|
|
1479
1479
|
else
|
|
1480
1480
|
i.value = !i.value;
|
|
1481
|
-
},
|
|
1481
|
+
}, s = () => {
|
|
1482
1482
|
i.value = !i.value;
|
|
1483
|
-
},
|
|
1484
|
-
|
|
1485
|
-
}, { errorMessage:
|
|
1486
|
-
initialValue:
|
|
1483
|
+
}, p = () => {
|
|
1484
|
+
n.value = null;
|
|
1485
|
+
}, { errorMessage: m, errors: b, value: n } = ee(() => t.name, void 0, {
|
|
1486
|
+
initialValue: a.value
|
|
1487
1487
|
});
|
|
1488
1488
|
ie(() => {
|
|
1489
|
-
|
|
1489
|
+
n.value = a.value;
|
|
1490
1490
|
});
|
|
1491
|
-
const
|
|
1492
|
-
return (
|
|
1493
|
-
const
|
|
1494
|
-
return
|
|
1495
|
-
id:
|
|
1491
|
+
const $ = C(() => b.value.length > 0);
|
|
1492
|
+
return (T, V) => {
|
|
1493
|
+
const M = le, I = N;
|
|
1494
|
+
return d(), v("div", {
|
|
1495
|
+
id: t.name
|
|
1496
1496
|
}, [
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1497
|
+
T.readonly ? (d(), v("div", _t, [
|
|
1498
|
+
k(T.$slots, "default", {}, () => [
|
|
1499
|
+
u("span", Vt, w(c(n)), 1)
|
|
1500
1500
|
])
|
|
1501
|
-
])) : (
|
|
1502
|
-
i.value ? (
|
|
1503
|
-
R((
|
|
1504
|
-
|
|
1505
|
-
class:
|
|
1506
|
-
editFinished:
|
|
1507
|
-
cancel:
|
|
1508
|
-
val: c(
|
|
1501
|
+
])) : (d(), v("div", jt, [
|
|
1502
|
+
i.value ? (d(), v("div", It, [
|
|
1503
|
+
R((d(), v("div", Pt, [
|
|
1504
|
+
k(T.$slots, "editor", {
|
|
1505
|
+
class: B({ "is-invalid": $.value }),
|
|
1506
|
+
editFinished: r,
|
|
1507
|
+
cancel: s,
|
|
1508
|
+
val: c(n)
|
|
1509
1509
|
}, () => [
|
|
1510
|
-
|
|
1510
|
+
y(M, {
|
|
1511
1511
|
"data-cy": "input",
|
|
1512
1512
|
ref_key: "input",
|
|
1513
1513
|
ref: l,
|
|
1514
|
-
modelValue: c(
|
|
1515
|
-
"onUpdate:modelValue":
|
|
1514
|
+
modelValue: c(n),
|
|
1515
|
+
"onUpdate:modelValue": V[0] || (V[0] = (x) => we(n) ? n.value = x : null),
|
|
1516
1516
|
modelModifiers: { trim: !0 },
|
|
1517
|
-
class:
|
|
1517
|
+
class: B({ "is-invalid": $.value }),
|
|
1518
1518
|
onKeydown: [
|
|
1519
|
-
|
|
1520
|
-
|
|
1519
|
+
K(r, ["enter"]),
|
|
1520
|
+
K(s, ["esc"])
|
|
1521
1521
|
]
|
|
1522
1522
|
}, null, 8, ["modelValue", "class"])
|
|
1523
1523
|
]),
|
|
1524
|
-
|
|
1524
|
+
y(c(j), {
|
|
1525
1525
|
icon: "bi:x-circle",
|
|
1526
1526
|
class: "mx-2 cursor-pointer",
|
|
1527
|
-
onClick:
|
|
1528
|
-
onKeydown:
|
|
1527
|
+
onClick: p,
|
|
1528
|
+
onKeydown: K(p, ["enter"]),
|
|
1529
1529
|
"data-cy": "clear-icon"
|
|
1530
1530
|
})
|
|
1531
1531
|
])), [
|
|
1532
|
-
[c(
|
|
1532
|
+
[c(je), r]
|
|
1533
1533
|
])
|
|
1534
|
-
])) : (
|
|
1534
|
+
])) : (d(), v("div", {
|
|
1535
1535
|
key: 1,
|
|
1536
1536
|
class: "d-flex text-muted",
|
|
1537
1537
|
onClick: o,
|
|
1538
1538
|
onFocus: o
|
|
1539
1539
|
}, [
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
class:
|
|
1540
|
+
k(T.$slots, "default", {}, () => [
|
|
1541
|
+
u("div", {
|
|
1542
|
+
class: B(["pe-2 cursor-pointer", { "text-invalid": $.value }]),
|
|
1543
1543
|
"data-cy": "value"
|
|
1544
|
-
},
|
|
1544
|
+
}, w(c(n) ? c(n) : "Click to edit"), 3)
|
|
1545
1545
|
]),
|
|
1546
|
-
|
|
1546
|
+
y(I, {
|
|
1547
1547
|
link: "",
|
|
1548
1548
|
class: "p-0 m-0"
|
|
1549
1549
|
}, {
|
|
1550
|
-
default:
|
|
1551
|
-
|
|
1550
|
+
default: f(() => [
|
|
1551
|
+
y(c(j), {
|
|
1552
1552
|
icon: "bi:pencil",
|
|
1553
|
-
class:
|
|
1553
|
+
class: B($.value ? "text-invalid" : "text-muted"),
|
|
1554
1554
|
"data-cy": "edit-icon",
|
|
1555
|
-
onKeydown:
|
|
1555
|
+
onKeydown: K(o, ["enter"])
|
|
1556
1556
|
}, null, 8, ["class"])
|
|
1557
1557
|
]),
|
|
1558
1558
|
_: 1
|
|
1559
1559
|
})
|
|
1560
1560
|
], 32))
|
|
1561
1561
|
])),
|
|
1562
|
-
R(
|
|
1562
|
+
R(u("small", {
|
|
1563
1563
|
"data-cy": "error",
|
|
1564
1564
|
class: "text-invalid"
|
|
1565
|
-
},
|
|
1566
|
-
[W,
|
|
1565
|
+
}, w(c(m)), 513), [
|
|
1566
|
+
[W, $.value]
|
|
1567
1567
|
])
|
|
1568
|
-
], 8,
|
|
1568
|
+
], 8, Tt);
|
|
1569
1569
|
};
|
|
1570
1570
|
}
|
|
1571
|
-
}),
|
|
1571
|
+
}), Dt = ["href"], _i = /* @__PURE__ */ S({
|
|
1572
1572
|
__name: "ForgeNavbar",
|
|
1573
1573
|
props: {
|
|
1574
1574
|
severity: { default: "light" },
|
|
@@ -1585,53 +1585,53 @@ const Ba = { key: 0 }, za = {
|
|
|
1585
1585
|
unstyled: { type: Boolean }
|
|
1586
1586
|
},
|
|
1587
1587
|
setup(e) {
|
|
1588
|
-
const
|
|
1588
|
+
const t = e, a = C(() => ({
|
|
1589
1589
|
root: () => ({
|
|
1590
1590
|
class: [
|
|
1591
1591
|
"navbar container-fluid navbar-expand-lg",
|
|
1592
1592
|
{
|
|
1593
|
-
"bg-light":
|
|
1594
|
-
"bg-dark":
|
|
1595
|
-
"bg-primary":
|
|
1596
|
-
"bg-brand":
|
|
1597
|
-
"bg-secondary":
|
|
1598
|
-
"bg-success":
|
|
1599
|
-
"bg-warning":
|
|
1600
|
-
"bg-danger":
|
|
1601
|
-
"bg-info":
|
|
1593
|
+
"bg-light": t.severity === "light",
|
|
1594
|
+
"bg-dark": t.severity === "dark",
|
|
1595
|
+
"bg-primary": t.severity === "primary",
|
|
1596
|
+
"bg-brand": t.severity === "brand",
|
|
1597
|
+
"bg-secondary": t.severity === "secondary",
|
|
1598
|
+
"bg-success": t.severity === "success",
|
|
1599
|
+
"bg-warning": t.severity === "warning",
|
|
1600
|
+
"bg-danger": t.severity === "danger",
|
|
1601
|
+
"bg-info": t.severity === "info"
|
|
1602
1602
|
},
|
|
1603
1603
|
{
|
|
1604
|
-
"navbar-light":
|
|
1605
|
-
"navbar-dark":
|
|
1604
|
+
"navbar-light": t.severity === "light",
|
|
1605
|
+
"navbar-dark": t.severity !== "light"
|
|
1606
1606
|
},
|
|
1607
1607
|
{
|
|
1608
|
-
"fixed-top":
|
|
1609
|
-
"fixed-bottom":
|
|
1610
|
-
"sticky-top":
|
|
1608
|
+
"fixed-top": t.position === "fixed-top",
|
|
1609
|
+
"fixed-bottom": t.position === "fixed-bottom",
|
|
1610
|
+
"sticky-top": t.position === "sticky-top"
|
|
1611
1611
|
}
|
|
1612
1612
|
]
|
|
1613
1613
|
})
|
|
1614
1614
|
}));
|
|
1615
|
-
return (i, l) => (
|
|
1616
|
-
pt:
|
|
1615
|
+
return (i, l) => (d(), g(c(Ie), F({ ...t, ...i.$attrs }, {
|
|
1616
|
+
pt: a.value,
|
|
1617
1617
|
"data-cy": "navbar"
|
|
1618
|
-
}),
|
|
1619
|
-
start:
|
|
1620
|
-
|
|
1618
|
+
}), ae({
|
|
1619
|
+
start: f(() => [
|
|
1620
|
+
u("a", {
|
|
1621
1621
|
href: i.logoUrl,
|
|
1622
1622
|
class: "navbar-brand ms-3",
|
|
1623
1623
|
"data-cy": "logo"
|
|
1624
1624
|
}, [
|
|
1625
|
-
|
|
1626
|
-
l[0] || (l[0] =
|
|
1625
|
+
k(i.$slots, "logo", {}, () => [
|
|
1626
|
+
l[0] || (l[0] = _(" Logo "))
|
|
1627
1627
|
])
|
|
1628
|
-
], 8,
|
|
1628
|
+
], 8, Dt)
|
|
1629
1629
|
]),
|
|
1630
|
-
buttonicon:
|
|
1631
|
-
|
|
1632
|
-
|
|
1630
|
+
buttonicon: f(() => [
|
|
1631
|
+
k(i.$slots, "buttonIcon", {}, () => [
|
|
1632
|
+
y(c(j), {
|
|
1633
1633
|
icon: "bi:list",
|
|
1634
|
-
class:
|
|
1634
|
+
class: B(t.severity === "light" ? "text-black" : "text-white"),
|
|
1635
1635
|
height: "24",
|
|
1636
1636
|
"data-cy": "burger-icon"
|
|
1637
1637
|
}, null, 8, ["class"])
|
|
@@ -1639,22 +1639,22 @@ const Ba = { key: 0 }, za = {
|
|
|
1639
1639
|
]),
|
|
1640
1640
|
_: 2
|
|
1641
1641
|
}, [
|
|
1642
|
-
|
|
1643
|
-
name:
|
|
1644
|
-
fn:
|
|
1645
|
-
|
|
1642
|
+
A(i.$slots, (o, r) => ({
|
|
1643
|
+
name: r,
|
|
1644
|
+
fn: f((s) => [
|
|
1645
|
+
k(i.$slots, r, X(Q(s)))
|
|
1646
1646
|
])
|
|
1647
1647
|
}))
|
|
1648
1648
|
]), 1040, ["pt"]));
|
|
1649
1649
|
}
|
|
1650
|
-
}),
|
|
1650
|
+
}), Ot = { class: "border alternating-item-list" }, Nt = {
|
|
1651
1651
|
key: 0,
|
|
1652
1652
|
class: "p-2 border-top border-bottom",
|
|
1653
1653
|
"data-cy": "title"
|
|
1654
|
-
},
|
|
1654
|
+
}, Ut = { class: "d-inline-block" }, At = {
|
|
1655
1655
|
key: 1,
|
|
1656
1656
|
class: "p-2 item d-flex justify-content-between align-items-center"
|
|
1657
|
-
},
|
|
1657
|
+
}, qt = /* @__PURE__ */ S({
|
|
1658
1658
|
__name: "ForgeMultiSelectPreview",
|
|
1659
1659
|
props: /* @__PURE__ */ q({
|
|
1660
1660
|
title: { default: "Selected Items" },
|
|
@@ -1670,96 +1670,96 @@ const Ba = { key: 0 }, za = {
|
|
|
1670
1670
|
}),
|
|
1671
1671
|
emits: ["update:modelValue"],
|
|
1672
1672
|
setup(e) {
|
|
1673
|
-
const
|
|
1674
|
-
|
|
1673
|
+
const t = e, a = D(e, "modelValue"), i = (l) => {
|
|
1674
|
+
a.value = a.value.filter((o) => o.id !== l);
|
|
1675
1675
|
};
|
|
1676
1676
|
return (l, o) => {
|
|
1677
|
-
const
|
|
1678
|
-
return
|
|
1679
|
-
class:
|
|
1677
|
+
const r = oe, s = N;
|
|
1678
|
+
return d(), v("div", {
|
|
1679
|
+
class: B(l.orientation === "column" ? "row" : ""),
|
|
1680
1680
|
"data-cy": "multiselect-preview"
|
|
1681
1681
|
}, [
|
|
1682
|
-
|
|
1683
|
-
class:
|
|
1682
|
+
u("div", {
|
|
1683
|
+
class: B(l.orientation === "row" ? "col-12 mb-1" : "col"),
|
|
1684
1684
|
"data-cy": "multiselect-container"
|
|
1685
1685
|
}, [
|
|
1686
|
-
|
|
1687
|
-
modelValue:
|
|
1688
|
-
"onUpdate:modelValue": o[0] || (o[0] = (
|
|
1686
|
+
y(r, F({
|
|
1687
|
+
modelValue: a.value,
|
|
1688
|
+
"onUpdate:modelValue": o[0] || (o[0] = (p) => a.value = p)
|
|
1689
1689
|
}, { ...l.$attrs }, {
|
|
1690
|
-
options:
|
|
1690
|
+
options: t.options ?? [],
|
|
1691
1691
|
optionLabel: "label",
|
|
1692
1692
|
placeholder: l.multiselectPlaceholder,
|
|
1693
1693
|
"data-cy": "multiselect"
|
|
1694
1694
|
}), {
|
|
1695
|
-
default:
|
|
1696
|
-
(
|
|
1695
|
+
default: f(() => [
|
|
1696
|
+
(d(!0), v(O, null, A(l.$slots, (p, m) => k(l.$slots, m, { slot: m })), 256))
|
|
1697
1697
|
]),
|
|
1698
1698
|
_: 3
|
|
1699
1699
|
}, 16, ["modelValue", "options", "placeholder"]),
|
|
1700
|
-
|
|
1700
|
+
k(l.$slots, "after-multi-select")
|
|
1701
1701
|
], 2),
|
|
1702
|
-
|
|
1703
|
-
class:
|
|
1702
|
+
u("div", {
|
|
1703
|
+
class: B(l.orientation === "row" ? "col-12" : "col"),
|
|
1704
1704
|
"data-cy": "options-preview"
|
|
1705
1705
|
}, [
|
|
1706
|
-
|
|
1706
|
+
u("div", {
|
|
1707
1707
|
style: ke({ height: l.height }),
|
|
1708
1708
|
class: "overflow-auto"
|
|
1709
1709
|
}, [
|
|
1710
|
-
|
|
1711
|
-
l.title ? (
|
|
1712
|
-
(
|
|
1713
|
-
key:
|
|
1710
|
+
u("div", Ot, [
|
|
1711
|
+
l.title ? (d(), v("div", Nt, w(l.title), 1)) : z("", !0),
|
|
1712
|
+
(d(!0), v(O, null, A(a.value, (p) => (d(), v("div", {
|
|
1713
|
+
key: p.id,
|
|
1714
1714
|
class: "p-2 item d-flex justify-content-between align-items-center"
|
|
1715
1715
|
}, [
|
|
1716
|
-
|
|
1717
|
-
|
|
1716
|
+
k(l.$slots, "list-item", { item: p }, () => [
|
|
1717
|
+
u("span", Ut, w(p.shortLabel ? p.shortLabel : p.label), 1)
|
|
1718
1718
|
]),
|
|
1719
|
-
l.canRemoveItemFromPreview ? (
|
|
1719
|
+
l.canRemoveItemFromPreview ? (d(), g(s, {
|
|
1720
1720
|
key: 0,
|
|
1721
1721
|
link: "",
|
|
1722
1722
|
class: "m-0 p-0 d-flex align-items-center",
|
|
1723
|
-
onClick: (
|
|
1723
|
+
onClick: (m) => i(p.id)
|
|
1724
1724
|
}, {
|
|
1725
|
-
default:
|
|
1726
|
-
|
|
1725
|
+
default: f(() => [
|
|
1726
|
+
y(c(j), {
|
|
1727
1727
|
icon: "bi:x",
|
|
1728
1728
|
class: "close-icon",
|
|
1729
|
-
"data-cy": `close-icon-${
|
|
1729
|
+
"data-cy": `close-icon-${p.id}`
|
|
1730
1730
|
}, null, 8, ["data-cy"])
|
|
1731
1731
|
]),
|
|
1732
1732
|
_: 2
|
|
1733
|
-
}, 1032, ["onClick"])) :
|
|
1733
|
+
}, 1032, ["onClick"])) : z("", !0)
|
|
1734
1734
|
]))), 128)),
|
|
1735
|
-
|
|
1735
|
+
a.value == null || a.value.length == 0 ? (d(), v("div", At, w(t.optionsPreviewEmptyText), 1)) : z("", !0)
|
|
1736
1736
|
])
|
|
1737
1737
|
], 4)
|
|
1738
1738
|
], 2)
|
|
1739
1739
|
], 2);
|
|
1740
1740
|
};
|
|
1741
1741
|
}
|
|
1742
|
-
}),
|
|
1742
|
+
}), Lt = { class: "d-flex justify-content-between pb-2" }, Et = {
|
|
1743
1743
|
"data-cy": "title",
|
|
1744
1744
|
class: "my-auto"
|
|
1745
|
-
},
|
|
1745
|
+
}, Rt = {
|
|
1746
1746
|
"data-cy": "slot",
|
|
1747
1747
|
class: "d-flex align-items-center"
|
|
1748
|
-
},
|
|
1748
|
+
}, Vi = /* @__PURE__ */ S({
|
|
1749
1749
|
__name: "ForgePageHeader",
|
|
1750
1750
|
props: {
|
|
1751
1751
|
title: {}
|
|
1752
1752
|
},
|
|
1753
1753
|
setup(e) {
|
|
1754
|
-
const
|
|
1755
|
-
return (
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1754
|
+
const t = e;
|
|
1755
|
+
return (a, i) => (d(), v("div", Lt, [
|
|
1756
|
+
u("h3", Et, w(t.title), 1),
|
|
1757
|
+
u("div", Rt, [
|
|
1758
|
+
k(a.$slots, "default")
|
|
1759
1759
|
])
|
|
1760
1760
|
]));
|
|
1761
1761
|
}
|
|
1762
|
-
}),
|
|
1762
|
+
}), Ht = { class: "d-flex" }, Wt = { "data-cy": "before-slot" }, Yt = { class: "position-relative w-100" }, Gt = { "data-cy": "after-slot" }, ge = /* @__PURE__ */ S({
|
|
1763
1763
|
__name: "ForgeDatepicker",
|
|
1764
1764
|
props: /* @__PURE__ */ q({
|
|
1765
1765
|
severity: { default: "primary" },
|
|
@@ -1835,37 +1835,37 @@ const Ba = { key: 0 }, za = {
|
|
|
1835
1835
|
}),
|
|
1836
1836
|
emits: ["update:modelValue"],
|
|
1837
1837
|
setup(e) {
|
|
1838
|
-
const
|
|
1839
|
-
initialValue:
|
|
1840
|
-
}),
|
|
1841
|
-
|
|
1842
|
-
},
|
|
1843
|
-
dayCell: ({ context:
|
|
1838
|
+
const t = e, a = D(e, "modelValue"), { errors: i, errorMessage: l, handleChange: o, handleBlur: r, setValue: s } = ee(() => t.name, void 0, {
|
|
1839
|
+
initialValue: a.value
|
|
1840
|
+
}), p = () => {
|
|
1841
|
+
s(null), a.value = null;
|
|
1842
|
+
}, m = C(() => i.value.length > 0), b = C(() => ({
|
|
1843
|
+
dayCell: ({ context: n }) => ({
|
|
1844
1844
|
class: [
|
|
1845
|
-
`text-center date-${
|
|
1845
|
+
`text-center date-${t.severity === void 0 ? "primary" : t.severity}`,
|
|
1846
1846
|
{
|
|
1847
|
-
"cursor-pointer": !
|
|
1848
|
-
"pe-none":
|
|
1849
|
-
"text-white":
|
|
1847
|
+
"cursor-pointer": !n.disabled,
|
|
1848
|
+
"pe-none": n.disabled,
|
|
1849
|
+
"text-white": n.selected
|
|
1850
1850
|
},
|
|
1851
1851
|
// Severities
|
|
1852
1852
|
{
|
|
1853
|
-
selected:
|
|
1854
|
-
"text-primary": !
|
|
1855
|
-
"text-brand": !
|
|
1856
|
-
"text-secondary": !
|
|
1857
|
-
"text-success": !
|
|
1858
|
-
"text-warning": !
|
|
1859
|
-
"text-danger": !
|
|
1860
|
-
"text-info": !
|
|
1853
|
+
selected: n.selected && !n.disabled,
|
|
1854
|
+
"text-primary": !n.selected && n.today && (t.severity === void 0 || t.severity === "primary"),
|
|
1855
|
+
"text-brand": !n.selected && n.today && t.severity === "brand",
|
|
1856
|
+
"text-secondary": !n.selected && n.today && t.severity === "secondary",
|
|
1857
|
+
"text-success": !n.selected && n.today && t.severity === "success",
|
|
1858
|
+
"text-warning": !n.selected && n.today && t.severity === "warning",
|
|
1859
|
+
"text-danger": !n.selected && n.today && t.severity === "danger",
|
|
1860
|
+
"text-info": !n.selected && n.today && t.severity === "info"
|
|
1861
1861
|
}
|
|
1862
1862
|
]
|
|
1863
1863
|
}),
|
|
1864
|
-
dayLabel: ({ context:
|
|
1864
|
+
dayLabel: ({ context: n }) => ({
|
|
1865
1865
|
class: [
|
|
1866
1866
|
// Disabled States
|
|
1867
1867
|
{
|
|
1868
|
-
"text-muted":
|
|
1868
|
+
"text-muted": n.disabled
|
|
1869
1869
|
}
|
|
1870
1870
|
]
|
|
1871
1871
|
}),
|
|
@@ -1874,13 +1874,13 @@ const Ba = { key: 0 }, za = {
|
|
|
1874
1874
|
class: [
|
|
1875
1875
|
"btn ms-auto",
|
|
1876
1876
|
{
|
|
1877
|
-
"btn-link text-primary":
|
|
1878
|
-
"btn-link text-brand":
|
|
1879
|
-
"btn-link text-secondary":
|
|
1880
|
-
"btn-link text-success":
|
|
1881
|
-
"btn-link text-warning":
|
|
1882
|
-
"btn-link text-danger":
|
|
1883
|
-
"btn-link text-info":
|
|
1877
|
+
"btn-link text-primary": t.severity === void 0 || t.severity === "primary",
|
|
1878
|
+
"btn-link text-brand": t.severity === "brand",
|
|
1879
|
+
"btn-link text-secondary": t.severity === "secondary",
|
|
1880
|
+
"btn-link text-success": t.severity === "success",
|
|
1881
|
+
"btn-link text-warning": t.severity === "warning",
|
|
1882
|
+
"btn-link text-danger": t.severity === "danger",
|
|
1883
|
+
"btn-link text-info": t.severity === "info"
|
|
1884
1884
|
}
|
|
1885
1885
|
]
|
|
1886
1886
|
})
|
|
@@ -1890,106 +1890,106 @@ const Ba = { key: 0 }, za = {
|
|
|
1890
1890
|
class: [
|
|
1891
1891
|
"btn",
|
|
1892
1892
|
{
|
|
1893
|
-
"btn-link text-primary":
|
|
1894
|
-
"btn-link text-brand":
|
|
1895
|
-
"btn-link text-secondary":
|
|
1896
|
-
"btn-link text-success":
|
|
1897
|
-
"btn-link text-warning":
|
|
1898
|
-
"btn-link text-danger":
|
|
1899
|
-
"btn-link text-info":
|
|
1893
|
+
"btn-link text-primary": t.severity === void 0 || t.severity === "primary",
|
|
1894
|
+
"btn-link text-brand": t.severity === "brand",
|
|
1895
|
+
"btn-link text-secondary": t.severity === "secondary",
|
|
1896
|
+
"btn-link text-success": t.severity === "success",
|
|
1897
|
+
"btn-link text-warning": t.severity === "warning",
|
|
1898
|
+
"btn-link text-danger": t.severity === "danger",
|
|
1899
|
+
"btn-link text-info": t.severity === "info"
|
|
1900
1900
|
}
|
|
1901
1901
|
]
|
|
1902
1902
|
})
|
|
1903
1903
|
},
|
|
1904
|
-
year: ({ context:
|
|
1904
|
+
year: ({ context: n }) => ({
|
|
1905
1905
|
class: [
|
|
1906
1906
|
"col-3 text-center cursor-pointer py-2",
|
|
1907
1907
|
{
|
|
1908
|
-
"text-primary": (
|
|
1909
|
-
"text-brand":
|
|
1910
|
-
"text-secondary":
|
|
1911
|
-
"text-success":
|
|
1912
|
-
"text-warning":
|
|
1913
|
-
"text-danger":
|
|
1914
|
-
"text-info":
|
|
1908
|
+
"text-primary": (t.severity === void 0 || t.severity === "primary") && n.year.value === (/* @__PURE__ */ new Date()).getFullYear(),
|
|
1909
|
+
"text-brand": t.severity === "brand" && n.year.value === (/* @__PURE__ */ new Date()).getFullYear(),
|
|
1910
|
+
"text-secondary": t.severity === "secondary" && n.year.value === (/* @__PURE__ */ new Date()).getFullYear(),
|
|
1911
|
+
"text-success": t.severity === "success" && n.year.value === (/* @__PURE__ */ new Date()).getFullYear(),
|
|
1912
|
+
"text-warning": t.severity === "warning" && n.year.value === (/* @__PURE__ */ new Date()).getFullYear(),
|
|
1913
|
+
"text-danger": t.severity === "danger" && n.year.value === (/* @__PURE__ */ new Date()).getFullYear(),
|
|
1914
|
+
"text-info": t.severity === "info" && n.year.value === (/* @__PURE__ */ new Date()).getFullYear()
|
|
1915
1915
|
}
|
|
1916
1916
|
]
|
|
1917
1917
|
}),
|
|
1918
|
-
month: ({ context:
|
|
1918
|
+
month: ({ context: n }) => ({
|
|
1919
1919
|
class: [
|
|
1920
1920
|
"col-3 text-center cursor-pointer py-2",
|
|
1921
1921
|
{
|
|
1922
|
-
"text-primary": (
|
|
1923
|
-
"text-brand":
|
|
1924
|
-
"text-secondary":
|
|
1925
|
-
"text-success":
|
|
1926
|
-
"text-warning":
|
|
1927
|
-
"text-danger":
|
|
1928
|
-
"text-info":
|
|
1922
|
+
"text-primary": (t.severity === void 0 || t.severity === "primary") && n.monthIndex + 1 === (/* @__PURE__ */ new Date()).getMonth() + 1,
|
|
1923
|
+
"text-brand": t.severity === "brand" && n.monthIndex + 1 === (/* @__PURE__ */ new Date()).getMonth() + 1,
|
|
1924
|
+
"text-secondary": t.severity === "secondary" && n.monthIndex + 1 === (/* @__PURE__ */ new Date()).getMonth() + 1,
|
|
1925
|
+
"text-success": t.severity === "success" && n.monthIndex + 1 === (/* @__PURE__ */ new Date()).getMonth() + 1,
|
|
1926
|
+
"text-warning": t.severity === "warning" && n.monthIndex + 1 === (/* @__PURE__ */ new Date()).getMonth() + 1,
|
|
1927
|
+
"text-danger": t.severity === "danger" && n.monthIndex + 1 === (/* @__PURE__ */ new Date()).getMonth() + 1,
|
|
1928
|
+
"text-info": t.severity === "info" && n.monthIndex + 1 === (/* @__PURE__ */ new Date()).getMonth() + 1
|
|
1929
1929
|
}
|
|
1930
1930
|
]
|
|
1931
1931
|
})
|
|
1932
1932
|
}));
|
|
1933
|
-
return (
|
|
1934
|
-
const
|
|
1935
|
-
return
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1933
|
+
return (n, $) => {
|
|
1934
|
+
const T = Pe;
|
|
1935
|
+
return d(), v(O, null, [
|
|
1936
|
+
u("div", Ht, [
|
|
1937
|
+
u("span", Wt, [
|
|
1938
|
+
k(n.$slots, "before")
|
|
1939
1939
|
]),
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
pt:
|
|
1943
|
-
modelValue:
|
|
1940
|
+
u("div", Yt, [
|
|
1941
|
+
y(T, F({ ...t, ...n.$attrs }, {
|
|
1942
|
+
pt: b.value,
|
|
1943
|
+
modelValue: a.value,
|
|
1944
1944
|
"onUpdate:modelValue": [
|
|
1945
|
-
|
|
1945
|
+
$[0] || ($[0] = (V) => a.value = V),
|
|
1946
1946
|
c(o)
|
|
1947
1947
|
],
|
|
1948
|
-
onBlur:
|
|
1949
|
-
"input-class": { "datepicker-invalid":
|
|
1948
|
+
onBlur: $[1] || ($[1] = () => c(r)),
|
|
1949
|
+
"input-class": { "datepicker-invalid": m.value }
|
|
1950
1950
|
}), null, 16, ["pt", "modelValue", "onUpdate:modelValue", "input-class"]),
|
|
1951
|
-
R(
|
|
1951
|
+
R(y(c(j), {
|
|
1952
1952
|
"data-cy": "icon",
|
|
1953
1953
|
icon: "bi:calendar4",
|
|
1954
|
-
class:
|
|
1954
|
+
class: B(["position-absolute end-0 top-50 bottom-50 my-auto me-2 bg-white", `${m.value ? "text-danger-dark" : "text-muted"}`])
|
|
1955
1955
|
}, null, 8, ["class"]), [
|
|
1956
|
-
[W,
|
|
1956
|
+
[W, t.showIcon]
|
|
1957
1957
|
]),
|
|
1958
|
-
R(
|
|
1958
|
+
R(y(c(j), {
|
|
1959
1959
|
"data-cy": "icon",
|
|
1960
1960
|
icon: "bi:x",
|
|
1961
|
-
onClick:
|
|
1962
|
-
class:
|
|
1961
|
+
onClick: p,
|
|
1962
|
+
class: B(["position-absolute end-0 top-50 bottom-50 my-auto text-muted cursor-pointer bg-white", t.showIcon ? "datepicker-close-icon" : "me-2"])
|
|
1963
1963
|
}, null, 8, ["class"]), [
|
|
1964
|
-
[W,
|
|
1964
|
+
[W, t.modelValue]
|
|
1965
1965
|
])
|
|
1966
1966
|
]),
|
|
1967
|
-
|
|
1968
|
-
|
|
1967
|
+
u("span", Gt, [
|
|
1968
|
+
k(n.$slots, "after")
|
|
1969
1969
|
])
|
|
1970
1970
|
]),
|
|
1971
|
-
R(
|
|
1971
|
+
R(u("small", {
|
|
1972
1972
|
"data-cy": "error",
|
|
1973
1973
|
class: "text-invalid"
|
|
1974
|
-
},
|
|
1975
|
-
[W,
|
|
1974
|
+
}, w(c(l)), 513), [
|
|
1975
|
+
[W, m.value]
|
|
1976
1976
|
])
|
|
1977
1977
|
], 64);
|
|
1978
1978
|
};
|
|
1979
1979
|
}
|
|
1980
|
-
}),
|
|
1980
|
+
}), Mi = /* @__PURE__ */ S({
|
|
1981
1981
|
__name: "ForgeRemainingCharacters",
|
|
1982
1982
|
props: {
|
|
1983
1983
|
maxCount: { default: 300 },
|
|
1984
1984
|
currentCount: {}
|
|
1985
1985
|
},
|
|
1986
1986
|
setup(e) {
|
|
1987
|
-
const
|
|
1988
|
-
return (i, l) => (
|
|
1989
|
-
class:
|
|
1990
|
-
}, "Remaining characters: " +
|
|
1987
|
+
const t = e, a = C(() => t.maxCount - t.currentCount);
|
|
1988
|
+
return (i, l) => (d(), v("div", {
|
|
1989
|
+
class: B(a.value < 0 ? "text-danger" : "")
|
|
1990
|
+
}, "Remaining characters: " + w(a.value), 3));
|
|
1991
1991
|
}
|
|
1992
|
-
}),
|
|
1992
|
+
}), Jt = { class: "d-flex justify-content-between" }, Di = /* @__PURE__ */ S({
|
|
1993
1993
|
__name: "ForgeForm",
|
|
1994
1994
|
props: {
|
|
1995
1995
|
onSubmit: {},
|
|
@@ -2001,91 +2001,91 @@ const Ba = { key: 0 }, za = {
|
|
|
2001
2001
|
hideCancel: { type: Boolean, default: !1 }
|
|
2002
2002
|
},
|
|
2003
2003
|
setup(e) {
|
|
2004
|
-
const
|
|
2004
|
+
const t = e, a = P(!1), i = P({
|
|
2005
2005
|
hasError: !1,
|
|
2006
2006
|
message: ""
|
|
2007
2007
|
});
|
|
2008
2008
|
async function l() {
|
|
2009
|
-
|
|
2009
|
+
a.value = !0, i.value.hasError = !1;
|
|
2010
2010
|
try {
|
|
2011
|
-
await
|
|
2011
|
+
await t.onSubmit();
|
|
2012
2012
|
} catch (o) {
|
|
2013
2013
|
i.value.hasError = !0, o.message && (i.value.message = o.message);
|
|
2014
2014
|
}
|
|
2015
|
-
|
|
2015
|
+
a.value = !1;
|
|
2016
2016
|
}
|
|
2017
|
-
return (o,
|
|
2018
|
-
const
|
|
2019
|
-
return
|
|
2017
|
+
return (o, r) => {
|
|
2018
|
+
const s = N;
|
|
2019
|
+
return d(), v("form", F(o.$attrs, {
|
|
2020
2020
|
novalidate: "",
|
|
2021
2021
|
class: "position-relative shadow-sm border p-4 bg-white",
|
|
2022
|
-
onSubmit:
|
|
2022
|
+
onSubmit: Y(l, ["prevent"])
|
|
2023
2023
|
}), [
|
|
2024
|
-
o.hideTitle ?
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
class:
|
|
2024
|
+
o.hideTitle ? z("", !0) : (d(), v(O, { key: 0 }, [
|
|
2025
|
+
k(o.$slots, "title", {}, () => [
|
|
2026
|
+
u("h3", {
|
|
2027
|
+
class: B(o.titleClass),
|
|
2028
2028
|
"data-cy": "form-title"
|
|
2029
|
-
},
|
|
2029
|
+
}, w(o.title), 3)
|
|
2030
2030
|
]),
|
|
2031
|
-
|
|
2031
|
+
r[1] || (r[1] = u("hr", null, null, -1))
|
|
2032
2032
|
], 64)),
|
|
2033
|
-
i.value.hasError ? (
|
|
2033
|
+
i.value.hasError ? (d(), g(ne, {
|
|
2034
2034
|
key: 1,
|
|
2035
2035
|
severity: "danger",
|
|
2036
2036
|
"data-cy": "error"
|
|
2037
2037
|
}, {
|
|
2038
|
-
default:
|
|
2039
|
-
|
|
2038
|
+
default: f(() => [
|
|
2039
|
+
k(o.$slots, "error", {
|
|
2040
2040
|
error: i.value.message
|
|
2041
2041
|
}, () => [
|
|
2042
|
-
|
|
2042
|
+
_(w(i.value.message), 1)
|
|
2043
2043
|
])
|
|
2044
2044
|
]),
|
|
2045
2045
|
_: 3
|
|
2046
|
-
})) :
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
o.hideCancel ?
|
|
2046
|
+
})) : z("", !0),
|
|
2047
|
+
k(o.$slots, "default"),
|
|
2048
|
+
u("div", Jt, [
|
|
2049
|
+
k(o.$slots, "cancel", {}, () => [
|
|
2050
|
+
o.hideCancel ? z("", !0) : (d(), g(s, {
|
|
2051
2051
|
key: 0,
|
|
2052
2052
|
"data-cy": "cancel-btn",
|
|
2053
2053
|
type: "reset",
|
|
2054
2054
|
severity: "secondary",
|
|
2055
2055
|
outlined: "",
|
|
2056
|
-
onClick:
|
|
2056
|
+
onClick: r[0] || (r[0] = (p) => o.$emit("cancel"))
|
|
2057
2057
|
}, {
|
|
2058
|
-
default:
|
|
2059
|
-
|
|
2058
|
+
default: f(() => [
|
|
2059
|
+
_(w(o.cancelText), 1)
|
|
2060
2060
|
]),
|
|
2061
2061
|
_: 1
|
|
2062
2062
|
}))
|
|
2063
2063
|
]),
|
|
2064
|
-
|
|
2065
|
-
|
|
2064
|
+
k(o.$slots, "submit", { submit: l }, () => [
|
|
2065
|
+
y(s, {
|
|
2066
2066
|
"data-cy": "submit-btn",
|
|
2067
2067
|
type: "submit",
|
|
2068
2068
|
severity: "primary",
|
|
2069
2069
|
class: "ms-auto"
|
|
2070
2070
|
}, {
|
|
2071
|
-
default:
|
|
2072
|
-
|
|
2071
|
+
default: f(() => [
|
|
2072
|
+
_(w(o.submitText), 1)
|
|
2073
2073
|
]),
|
|
2074
2074
|
_: 1
|
|
2075
2075
|
})
|
|
2076
2076
|
])
|
|
2077
2077
|
]),
|
|
2078
|
-
|
|
2078
|
+
a.value ? (d(), g(fe, {
|
|
2079
2079
|
key: 2,
|
|
2080
2080
|
"data-cy": "loading-spinner"
|
|
2081
|
-
})) :
|
|
2081
|
+
})) : z("", !0)
|
|
2082
2082
|
], 16);
|
|
2083
2083
|
};
|
|
2084
2084
|
}
|
|
2085
|
-
}),
|
|
2085
|
+
}), Kt = {
|
|
2086
2086
|
key: 1,
|
|
2087
2087
|
class: "d-flex flex-column w-100"
|
|
2088
|
-
},
|
|
2088
|
+
}, Zt = ["for"], Oi = /* @__PURE__ */ S({
|
|
2089
2089
|
__name: "ForgeFormField",
|
|
2090
2090
|
props: /* @__PURE__ */ q({
|
|
2091
2091
|
name: {},
|
|
@@ -2101,101 +2101,101 @@ const Ba = { key: 0 }, za = {
|
|
|
2101
2101
|
}),
|
|
2102
2102
|
emits: ["update:modelValue"],
|
|
2103
2103
|
setup(e) {
|
|
2104
|
-
const
|
|
2105
|
-
|
|
2106
|
-
}, { errors: l, value: o, errorMessage:
|
|
2107
|
-
initialValue:
|
|
2108
|
-
}),
|
|
2109
|
-
return
|
|
2110
|
-
|
|
2111
|
-
}, { immediate: !0 }), (
|
|
2112
|
-
const
|
|
2113
|
-
return
|
|
2104
|
+
const t = D(e, "modelValue"), a = e, i = (b) => {
|
|
2105
|
+
a.type == "number" ? s(b.value) : s(b);
|
|
2106
|
+
}, { errors: l, value: o, errorMessage: r, handleChange: s, handleBlur: p } = ee(() => a.name, void 0, {
|
|
2107
|
+
initialValue: t.value
|
|
2108
|
+
}), m = C(() => l.value.length > 0);
|
|
2109
|
+
return pe(() => o.value, (b) => {
|
|
2110
|
+
t.value = b;
|
|
2111
|
+
}, { immediate: !0 }), (b, n) => {
|
|
2112
|
+
const $ = Ve, T = _e, V = le, M = te, I = oe, x = ge;
|
|
2113
|
+
return a.type === "checkbox" ? (d(), g(ve, F({
|
|
2114
2114
|
key: 0,
|
|
2115
|
-
id:
|
|
2116
|
-
label:
|
|
2117
|
-
},
|
|
2118
|
-
name:
|
|
2119
|
-
modelValue:
|
|
2120
|
-
"onUpdate:modelValue":
|
|
2121
|
-
}), null, 16, ["id", "label", "name", "modelValue"])) : (
|
|
2122
|
-
|
|
2115
|
+
id: a.name,
|
|
2116
|
+
label: a.fieldLabel
|
|
2117
|
+
}, b.$attrs, {
|
|
2118
|
+
name: a.name,
|
|
2119
|
+
modelValue: t.value,
|
|
2120
|
+
"onUpdate:modelValue": n[0] || (n[0] = (h) => t.value = h)
|
|
2121
|
+
}), null, 16, ["id", "label", "name", "modelValue"])) : (d(), v("div", Kt, [
|
|
2122
|
+
u("div", {
|
|
2123
2123
|
"data-cy": "input-wrapper",
|
|
2124
|
-
class:
|
|
2124
|
+
class: B(["d-flex", a.fieldLabelPosition === "top" ? "flex-column" : "flex-row"])
|
|
2125
2125
|
}, [
|
|
2126
|
-
|
|
2127
|
-
for:
|
|
2128
|
-
class:
|
|
2129
|
-
},
|
|
2130
|
-
|
|
2126
|
+
u("label", {
|
|
2127
|
+
for: a.name,
|
|
2128
|
+
class: B(a.fieldLabelPosition === "top" ? "mb-1" : "me-2 " + a.labelWidthClass)
|
|
2129
|
+
}, w(a.fieldLabel), 11, Zt),
|
|
2130
|
+
a.type === "number" ? (d(), g(c(ce), F({
|
|
2131
2131
|
key: 0,
|
|
2132
|
-
id:
|
|
2133
|
-
},
|
|
2134
|
-
placeholder:
|
|
2135
|
-
"input-class": { "is-invalid":
|
|
2136
|
-
class: { "is-invalid":
|
|
2137
|
-
modelValue:
|
|
2138
|
-
"onUpdate:modelValue":
|
|
2132
|
+
id: a.name
|
|
2133
|
+
}, b.$attrs, {
|
|
2134
|
+
placeholder: a.placeholder,
|
|
2135
|
+
"input-class": { "is-invalid": m.value },
|
|
2136
|
+
class: { "is-invalid": m.value },
|
|
2137
|
+
modelValue: t.value,
|
|
2138
|
+
"onUpdate:modelValue": n[1] || (n[1] = (h) => t.value = h),
|
|
2139
2139
|
onInput: i
|
|
2140
|
-
}), null, 16, ["id", "placeholder", "input-class", "class", "modelValue"])) :
|
|
2140
|
+
}), null, 16, ["id", "placeholder", "input-class", "class", "modelValue"])) : a.type === "textarea" ? (d(), g($, F({
|
|
2141
2141
|
key: 1,
|
|
2142
|
-
id:
|
|
2143
|
-
},
|
|
2144
|
-
placeholder:
|
|
2145
|
-
class: { "is-invalid":
|
|
2146
|
-
modelValue:
|
|
2147
|
-
"onUpdate:modelValue":
|
|
2142
|
+
id: a.name
|
|
2143
|
+
}, b.$attrs, {
|
|
2144
|
+
placeholder: a.placeholder,
|
|
2145
|
+
class: { "is-invalid": m.value },
|
|
2146
|
+
modelValue: t.value,
|
|
2147
|
+
"onUpdate:modelValue": n[2] || (n[2] = (h) => t.value = h),
|
|
2148
2148
|
onInput: i,
|
|
2149
|
-
onBlur: c(
|
|
2150
|
-
}), null, 16, ["id", "placeholder", "class", "modelValue", "onBlur"])) :
|
|
2149
|
+
onBlur: c(p)
|
|
2150
|
+
}), null, 16, ["id", "placeholder", "class", "modelValue", "onBlur"])) : a.type === "mask" ? (d(), g(T, F({
|
|
2151
2151
|
key: 2,
|
|
2152
|
-
id:
|
|
2153
|
-
},
|
|
2154
|
-
placeholder:
|
|
2155
|
-
mask:
|
|
2156
|
-
class: { "is-invalid":
|
|
2157
|
-
modelValue:
|
|
2158
|
-
"onUpdate:modelValue":
|
|
2152
|
+
id: a.name
|
|
2153
|
+
}, b.$attrs, {
|
|
2154
|
+
placeholder: a.placeholder,
|
|
2155
|
+
mask: a.mask,
|
|
2156
|
+
class: { "is-invalid": m.value },
|
|
2157
|
+
modelValue: t.value,
|
|
2158
|
+
"onUpdate:modelValue": n[3] || (n[3] = (h) => t.value = h),
|
|
2159
2159
|
onComplete: i,
|
|
2160
|
-
onBlur: c(
|
|
2161
|
-
}), null, 16, ["id", "placeholder", "mask", "class", "modelValue", "onBlur"])) :
|
|
2160
|
+
onBlur: c(p)
|
|
2161
|
+
}), null, 16, ["id", "placeholder", "mask", "class", "modelValue", "onBlur"])) : a.type === "text" ? (d(), g(V, F({
|
|
2162
2162
|
key: 3,
|
|
2163
|
-
id:
|
|
2164
|
-
},
|
|
2165
|
-
placeholder:
|
|
2166
|
-
class: { "is-invalid":
|
|
2167
|
-
modelValue:
|
|
2168
|
-
"onUpdate:modelValue":
|
|
2163
|
+
id: a.name
|
|
2164
|
+
}, b.$attrs, {
|
|
2165
|
+
placeholder: a.placeholder,
|
|
2166
|
+
class: { "is-invalid": m.value },
|
|
2167
|
+
modelValue: t.value,
|
|
2168
|
+
"onUpdate:modelValue": n[4] || (n[4] = (h) => t.value = h),
|
|
2169
2169
|
onInput: i,
|
|
2170
|
-
onBlur: c(
|
|
2171
|
-
}), null, 16, ["id", "placeholder", "class", "modelValue", "onBlur"])) :
|
|
2172
|
-
modelValue:
|
|
2173
|
-
"onUpdate:modelValue":
|
|
2174
|
-
class: { "is-invalid":
|
|
2175
|
-
}), null, 16, ["modelValue", "class"])) :
|
|
2176
|
-
modelValue:
|
|
2177
|
-
"onUpdate:modelValue":
|
|
2178
|
-
class: { "is-invalid":
|
|
2179
|
-
}), null, 16, ["modelValue", "class"])) :
|
|
2180
|
-
modelValue:
|
|
2181
|
-
"onUpdate:modelValue":
|
|
2182
|
-
class: { "is-invalid":
|
|
2183
|
-
}), null, 16, ["modelValue", "class"])) :
|
|
2184
|
-
modelValue:
|
|
2185
|
-
"onUpdate:modelValue":
|
|
2186
|
-
class: { "is-invalid":
|
|
2187
|
-
}), null, 16, ["modelValue", "class"])) :
|
|
2170
|
+
onBlur: c(p)
|
|
2171
|
+
}), null, 16, ["id", "placeholder", "class", "modelValue", "onBlur"])) : a.type === "select" ? (d(), g(M, F({ key: 4 }, { ...a, ...b.$attrs }, {
|
|
2172
|
+
modelValue: t.value,
|
|
2173
|
+
"onUpdate:modelValue": n[5] || (n[5] = (h) => t.value = h),
|
|
2174
|
+
class: { "is-invalid": m.value }
|
|
2175
|
+
}), null, 16, ["modelValue", "class"])) : a.type === "multiselect" ? (d(), g(I, F({ key: 5 }, { ...a, ...b.$attrs }, {
|
|
2176
|
+
modelValue: t.value,
|
|
2177
|
+
"onUpdate:modelValue": n[6] || (n[6] = (h) => t.value = h),
|
|
2178
|
+
class: { "is-invalid": m.value }
|
|
2179
|
+
}), null, 16, ["modelValue", "class"])) : a.type === "multiselect-preview" ? (d(), g(qt, F({ key: 6 }, { ...a, ...b.$attrs }, {
|
|
2180
|
+
modelValue: t.value,
|
|
2181
|
+
"onUpdate:modelValue": n[7] || (n[7] = (h) => t.value = h),
|
|
2182
|
+
class: { "is-invalid": m.value }
|
|
2183
|
+
}), null, 16, ["modelValue", "class"])) : a.type === "datepicker" ? (d(), g(x, F({ key: 7 }, { ...a, ...b.$attrs }, {
|
|
2184
|
+
modelValue: t.value,
|
|
2185
|
+
"onUpdate:modelValue": n[8] || (n[8] = (h) => t.value = h),
|
|
2186
|
+
class: { "is-invalid": m.value }
|
|
2187
|
+
}), null, 16, ["modelValue", "class"])) : z("", !0)
|
|
2188
2188
|
], 2),
|
|
2189
|
-
R(
|
|
2189
|
+
R(u("small", {
|
|
2190
2190
|
"data-cy": "error",
|
|
2191
2191
|
class: "invalid-feedback"
|
|
2192
|
-
},
|
|
2193
|
-
[W,
|
|
2192
|
+
}, w(c(r)), 513), [
|
|
2193
|
+
[W, m.value && a.type !== "multiselect" && a.type !== "datepicker"]
|
|
2194
2194
|
])
|
|
2195
2195
|
]));
|
|
2196
2196
|
};
|
|
2197
2197
|
}
|
|
2198
|
-
}),
|
|
2198
|
+
}), Ni = /* @__PURE__ */ S({
|
|
2199
2199
|
__name: "ForgeChip",
|
|
2200
2200
|
props: {
|
|
2201
2201
|
chipSeverity: { default: "primary" },
|
|
@@ -2211,34 +2211,34 @@ const Ba = { key: 0 }, za = {
|
|
|
2211
2211
|
unstyled: { type: Boolean }
|
|
2212
2212
|
},
|
|
2213
2213
|
setup(e) {
|
|
2214
|
-
const
|
|
2214
|
+
const t = e, a = C(() => ({
|
|
2215
2215
|
root: [
|
|
2216
2216
|
"badge d-inline-flex align-items-center border me-1 p-1",
|
|
2217
2217
|
{
|
|
2218
|
-
"rounded-pill":
|
|
2218
|
+
"rounded-pill": t.pill
|
|
2219
2219
|
},
|
|
2220
2220
|
{
|
|
2221
|
-
"bg-primary-subtle border-primary text-primary":
|
|
2222
|
-
"bg-brand-subtle border-brand text-brand":
|
|
2223
|
-
"bg-secondary-subtle border-secondary text-secondary":
|
|
2224
|
-
"bg-success-subtle border-success text-success":
|
|
2225
|
-
"bg-warning-subtle border-warning text-warning":
|
|
2226
|
-
"bg-danger-subtle border-danger text-danger":
|
|
2227
|
-
"bg-info-subtle border-info text-info":
|
|
2221
|
+
"bg-primary-subtle border-primary text-primary": t.chipSeverity === void 0 || t.chipSeverity === "primary",
|
|
2222
|
+
"bg-brand-subtle border-brand text-brand": t.chipSeverity === "brand",
|
|
2223
|
+
"bg-secondary-subtle border-secondary text-secondary": t.chipSeverity === "secondary",
|
|
2224
|
+
"bg-success-subtle border-success text-success": t.chipSeverity === "success",
|
|
2225
|
+
"bg-warning-subtle border-warning text-warning": t.chipSeverity === "warning",
|
|
2226
|
+
"bg-danger-subtle border-danger text-danger": t.chipSeverity === "danger",
|
|
2227
|
+
"bg-info-subtle border-info text-info": t.chipSeverity === "info"
|
|
2228
2228
|
}
|
|
2229
2229
|
]
|
|
2230
2230
|
}));
|
|
2231
2231
|
return (i, l) => {
|
|
2232
|
-
const o =
|
|
2233
|
-
return
|
|
2234
|
-
default:
|
|
2235
|
-
(
|
|
2232
|
+
const o = Me;
|
|
2233
|
+
return d(), g(o, F({ ...i.$attrs, ...i.$props }, { pt: a.value }), {
|
|
2234
|
+
default: f(() => [
|
|
2235
|
+
(d(!0), v(O, null, A(i.$slots, (r, s) => k(i.$slots, s, { slot: s })), 256))
|
|
2236
2236
|
]),
|
|
2237
2237
|
_: 3
|
|
2238
2238
|
}, 16, ["pt"]);
|
|
2239
2239
|
};
|
|
2240
2240
|
}
|
|
2241
|
-
}),
|
|
2241
|
+
}), Xt = /* @__PURE__ */ S({
|
|
2242
2242
|
__name: "ForgeProgressBar",
|
|
2243
2243
|
props: {
|
|
2244
2244
|
severity: { default: "primary" },
|
|
@@ -2254,8 +2254,8 @@ const Ba = { key: 0 }, za = {
|
|
|
2254
2254
|
unstyled: { type: Boolean }
|
|
2255
2255
|
},
|
|
2256
2256
|
setup(e) {
|
|
2257
|
-
const
|
|
2258
|
-
switch (
|
|
2257
|
+
const t = e, a = C(() => t.striped ? "progress-bar-striped" : null), i = C(() => t.animate ? "progress-bar-animated" : null), l = C(() => {
|
|
2258
|
+
switch (t.severity) {
|
|
2259
2259
|
case "brand":
|
|
2260
2260
|
return "bg-brand";
|
|
2261
2261
|
case "secondary":
|
|
@@ -2273,41 +2273,517 @@ const Ba = { key: 0 }, za = {
|
|
|
2273
2273
|
default:
|
|
2274
2274
|
return "bg-primary";
|
|
2275
2275
|
}
|
|
2276
|
-
}), o =
|
|
2276
|
+
}), o = C(() => ({
|
|
2277
2277
|
root: {
|
|
2278
|
-
style:
|
|
2278
|
+
style: t.pixelWidth ? `width: ${t.pixelWidth}px` : ""
|
|
2279
2279
|
},
|
|
2280
2280
|
value: {
|
|
2281
|
-
class: [l.value,
|
|
2281
|
+
class: [l.value, a.value, i.value, "progress-bar"]
|
|
2282
2282
|
}
|
|
2283
2283
|
}));
|
|
2284
|
-
return (
|
|
2285
|
-
const
|
|
2286
|
-
return
|
|
2287
|
-
default:
|
|
2288
|
-
|
|
2284
|
+
return (r, s) => {
|
|
2285
|
+
const p = De;
|
|
2286
|
+
return d(), g(p, F({ ...r.$attrs, ...t }, { pt: o.value }), {
|
|
2287
|
+
default: f(() => [
|
|
2288
|
+
k(r.$slots, "default")
|
|
2289
2289
|
]),
|
|
2290
2290
|
_: 3
|
|
2291
2291
|
}, 16, ["pt"]);
|
|
2292
2292
|
};
|
|
2293
2293
|
}
|
|
2294
|
-
})
|
|
2294
|
+
});
|
|
2295
|
+
var Qt = /* @__PURE__ */ S({
|
|
2296
|
+
name: "VueDrawingCanvas",
|
|
2297
|
+
props: {
|
|
2298
|
+
strokeType: {
|
|
2299
|
+
type: String,
|
|
2300
|
+
validator: (e) => ["dash", "line", "square", "circle", "triangle", "half_triangle"].indexOf(e) !== -1,
|
|
2301
|
+
default: () => "dash"
|
|
2302
|
+
},
|
|
2303
|
+
fillShape: {
|
|
2304
|
+
type: Boolean,
|
|
2305
|
+
default: () => !1
|
|
2306
|
+
},
|
|
2307
|
+
width: {
|
|
2308
|
+
type: [String, Number],
|
|
2309
|
+
default: () => 600
|
|
2310
|
+
},
|
|
2311
|
+
height: {
|
|
2312
|
+
type: [String, Number],
|
|
2313
|
+
default: () => 400
|
|
2314
|
+
},
|
|
2315
|
+
image: {
|
|
2316
|
+
type: String,
|
|
2317
|
+
default: () => ""
|
|
2318
|
+
},
|
|
2319
|
+
eraser: {
|
|
2320
|
+
type: Boolean,
|
|
2321
|
+
default: () => !1
|
|
2322
|
+
},
|
|
2323
|
+
color: {
|
|
2324
|
+
type: String,
|
|
2325
|
+
default: () => "#000000"
|
|
2326
|
+
},
|
|
2327
|
+
lineWidth: {
|
|
2328
|
+
type: Number,
|
|
2329
|
+
default: () => 5
|
|
2330
|
+
},
|
|
2331
|
+
lineCap: {
|
|
2332
|
+
type: String,
|
|
2333
|
+
validator: (e) => ["round", "square", "butt"].indexOf(e) !== -1,
|
|
2334
|
+
default: () => "round"
|
|
2335
|
+
},
|
|
2336
|
+
lineJoin: {
|
|
2337
|
+
type: String,
|
|
2338
|
+
validator: (e) => ["miter", "round", "bevel"].indexOf(e) !== -1,
|
|
2339
|
+
default: () => "miter"
|
|
2340
|
+
},
|
|
2341
|
+
lock: {
|
|
2342
|
+
type: Boolean,
|
|
2343
|
+
default: () => !1
|
|
2344
|
+
},
|
|
2345
|
+
styles: {
|
|
2346
|
+
type: [Array, String, Object]
|
|
2347
|
+
},
|
|
2348
|
+
classes: {
|
|
2349
|
+
type: [Array, String, Object]
|
|
2350
|
+
},
|
|
2351
|
+
backgroundColor: {
|
|
2352
|
+
type: String,
|
|
2353
|
+
default: () => "#FFFFFF"
|
|
2354
|
+
},
|
|
2355
|
+
backgroundImage: {
|
|
2356
|
+
type: String,
|
|
2357
|
+
default: () => null
|
|
2358
|
+
},
|
|
2359
|
+
watermark: {
|
|
2360
|
+
type: Object,
|
|
2361
|
+
default: () => null
|
|
2362
|
+
},
|
|
2363
|
+
saveAs: {
|
|
2364
|
+
type: String,
|
|
2365
|
+
validator: (e) => ["jpeg", "png"].indexOf(e) !== -1,
|
|
2366
|
+
default: () => "png"
|
|
2367
|
+
},
|
|
2368
|
+
canvasId: {
|
|
2369
|
+
type: String,
|
|
2370
|
+
default: () => "VueDrawingCanvas"
|
|
2371
|
+
},
|
|
2372
|
+
initialImage: {
|
|
2373
|
+
type: Array,
|
|
2374
|
+
default: () => []
|
|
2375
|
+
},
|
|
2376
|
+
additionalImages: {
|
|
2377
|
+
type: Array,
|
|
2378
|
+
default: () => []
|
|
2379
|
+
},
|
|
2380
|
+
outputWidth: {
|
|
2381
|
+
type: Number
|
|
2382
|
+
},
|
|
2383
|
+
outputHeight: {
|
|
2384
|
+
type: Number
|
|
2385
|
+
}
|
|
2386
|
+
},
|
|
2387
|
+
data() {
|
|
2388
|
+
return {
|
|
2389
|
+
loadedImage: null,
|
|
2390
|
+
drawing: !1,
|
|
2391
|
+
context: null,
|
|
2392
|
+
images: [],
|
|
2393
|
+
strokes: {
|
|
2394
|
+
type: "",
|
|
2395
|
+
from: {
|
|
2396
|
+
x: 0,
|
|
2397
|
+
y: 0
|
|
2398
|
+
},
|
|
2399
|
+
coordinates: [],
|
|
2400
|
+
color: "",
|
|
2401
|
+
width: "",
|
|
2402
|
+
fill: !1,
|
|
2403
|
+
lineCap: "",
|
|
2404
|
+
lineJoin: ""
|
|
2405
|
+
},
|
|
2406
|
+
guides: [],
|
|
2407
|
+
trash: []
|
|
2408
|
+
};
|
|
2409
|
+
},
|
|
2410
|
+
mounted() {
|
|
2411
|
+
this.setContext(), this.$nextTick(() => {
|
|
2412
|
+
this.drawInitialImage(), this.drawAdditionalImages();
|
|
2413
|
+
});
|
|
2414
|
+
},
|
|
2415
|
+
watch: {
|
|
2416
|
+
backgroundImage: function() {
|
|
2417
|
+
this.loadedImage = null;
|
|
2418
|
+
}
|
|
2419
|
+
},
|
|
2420
|
+
methods: {
|
|
2421
|
+
async setContext() {
|
|
2422
|
+
let e = document.querySelector("#" + this.canvasId);
|
|
2423
|
+
this.context = this.context ? this.context : e.getContext("2d"), await this.setBackground();
|
|
2424
|
+
},
|
|
2425
|
+
drawInitialImage() {
|
|
2426
|
+
this.initialImage && this.initialImage.length > 0 && (this.images = [].concat(this.images, this.initialImage), this.redraw(!0));
|
|
2427
|
+
},
|
|
2428
|
+
drawAdditionalImages() {
|
|
2429
|
+
if (this.additionalImages && this.additionalImages.length > 0) {
|
|
2430
|
+
let e = document.querySelector("#" + this.canvasId);
|
|
2431
|
+
this.additionalImages.forEach((t) => {
|
|
2432
|
+
this.drawWatermark(e, this.context, t);
|
|
2433
|
+
});
|
|
2434
|
+
}
|
|
2435
|
+
},
|
|
2436
|
+
clear() {
|
|
2437
|
+
this.context.clearRect(0, 0, Number(this.width), Number(this.height));
|
|
2438
|
+
},
|
|
2439
|
+
async setBackground() {
|
|
2440
|
+
this.clear(), this.context.fillStyle = this.backgroundColor, this.context.fillRect(0, 0, Number(this.width), Number(this.height)), await this.$nextTick(async () => {
|
|
2441
|
+
await this.drawBackgroundImage();
|
|
2442
|
+
}), this.save();
|
|
2443
|
+
},
|
|
2444
|
+
async drawBackgroundImage() {
|
|
2445
|
+
if (this.loadedImage)
|
|
2446
|
+
this.context.drawImage(this.loadedImage, 0, 0, Number(this.width), Number(this.height));
|
|
2447
|
+
else
|
|
2448
|
+
return new Promise((e) => {
|
|
2449
|
+
if (!this.backgroundImage) {
|
|
2450
|
+
e();
|
|
2451
|
+
return;
|
|
2452
|
+
}
|
|
2453
|
+
const t = new Image();
|
|
2454
|
+
t.src = this.backgroundImage, t.onload = () => {
|
|
2455
|
+
this.context.drawImage(t, 0, 0, Number(this.width), Number(this.height)), this.loadedImage = t, e();
|
|
2456
|
+
};
|
|
2457
|
+
});
|
|
2458
|
+
},
|
|
2459
|
+
getCoordinates(e) {
|
|
2460
|
+
let t, a;
|
|
2461
|
+
if (e.touches && e.touches.length > 0) {
|
|
2462
|
+
let l = document.querySelector("#" + this.canvasId).getBoundingClientRect();
|
|
2463
|
+
t = e.touches[0].clientX - l.left, a = e.touches[0].clientY - l.top;
|
|
2464
|
+
} else
|
|
2465
|
+
t = e.offsetX, a = e.offsetY;
|
|
2466
|
+
return {
|
|
2467
|
+
x: t,
|
|
2468
|
+
y: a
|
|
2469
|
+
};
|
|
2470
|
+
},
|
|
2471
|
+
startDraw(e) {
|
|
2472
|
+
if (!this.lock) {
|
|
2473
|
+
this.drawing = !0;
|
|
2474
|
+
let t = this.getCoordinates(e);
|
|
2475
|
+
this.strokes = {
|
|
2476
|
+
type: this.eraser ? "eraser" : this.strokeType,
|
|
2477
|
+
from: t,
|
|
2478
|
+
coordinates: [],
|
|
2479
|
+
color: this.eraser ? this.backgroundColor : this.color,
|
|
2480
|
+
width: this.lineWidth,
|
|
2481
|
+
fill: this.eraser || this.strokeType === "dash" || this.strokeType === "line" ? !1 : this.fillShape,
|
|
2482
|
+
lineCap: this.lineCap,
|
|
2483
|
+
lineJoin: this.lineJoin
|
|
2484
|
+
}, this.guides = [];
|
|
2485
|
+
}
|
|
2486
|
+
},
|
|
2487
|
+
draw(e) {
|
|
2488
|
+
if (this.drawing) {
|
|
2489
|
+
this.context || this.setContext();
|
|
2490
|
+
let t = this.getCoordinates(e);
|
|
2491
|
+
if (this.eraser || this.strokeType === "dash")
|
|
2492
|
+
this.strokes.coordinates.push(t), this.drawShape(this.context, this.strokes, !1);
|
|
2493
|
+
else {
|
|
2494
|
+
switch (this.strokeType) {
|
|
2495
|
+
case "line":
|
|
2496
|
+
this.guides = [{
|
|
2497
|
+
x: t.x,
|
|
2498
|
+
y: t.y
|
|
2499
|
+
}];
|
|
2500
|
+
break;
|
|
2501
|
+
case "square":
|
|
2502
|
+
this.guides = [{
|
|
2503
|
+
x: t.x,
|
|
2504
|
+
y: this.strokes.from.y
|
|
2505
|
+
}, {
|
|
2506
|
+
x: t.x,
|
|
2507
|
+
y: t.y
|
|
2508
|
+
}, {
|
|
2509
|
+
x: this.strokes.from.x,
|
|
2510
|
+
y: t.y
|
|
2511
|
+
}, {
|
|
2512
|
+
x: this.strokes.from.x,
|
|
2513
|
+
y: this.strokes.from.y
|
|
2514
|
+
}];
|
|
2515
|
+
break;
|
|
2516
|
+
case "triangle":
|
|
2517
|
+
let a = Math.floor((t.x - this.strokes.from.x) / 2) < 0 ? Math.floor((t.x - this.strokes.from.x) / 2) * -1 : Math.floor((t.x - this.strokes.from.x) / 2), i = this.strokes.from.x < t.x ? this.strokes.from.x + a : this.strokes.from.x - a;
|
|
2518
|
+
this.guides = [{
|
|
2519
|
+
x: t.x,
|
|
2520
|
+
y: this.strokes.from.y
|
|
2521
|
+
}, {
|
|
2522
|
+
x: i,
|
|
2523
|
+
y: t.y
|
|
2524
|
+
}, {
|
|
2525
|
+
x: this.strokes.from.x,
|
|
2526
|
+
y: this.strokes.from.y
|
|
2527
|
+
}];
|
|
2528
|
+
break;
|
|
2529
|
+
case "half_triangle":
|
|
2530
|
+
this.guides = [{
|
|
2531
|
+
x: t.x,
|
|
2532
|
+
y: this.strokes.from.y
|
|
2533
|
+
}, {
|
|
2534
|
+
x: this.strokes.from.x,
|
|
2535
|
+
y: t.y
|
|
2536
|
+
}, {
|
|
2537
|
+
x: this.strokes.from.x,
|
|
2538
|
+
y: this.strokes.from.y
|
|
2539
|
+
}];
|
|
2540
|
+
break;
|
|
2541
|
+
case "circle":
|
|
2542
|
+
let l = this.strokes.from.x - t.x < 0 ? (this.strokes.from.x - t.x) * -1 : this.strokes.from.x - t.x;
|
|
2543
|
+
this.guides = [{
|
|
2544
|
+
x: this.strokes.from.x > t.x ? this.strokes.from.x - l : this.strokes.from.x + l,
|
|
2545
|
+
y: this.strokes.from.y
|
|
2546
|
+
}, {
|
|
2547
|
+
x: l,
|
|
2548
|
+
y: l
|
|
2549
|
+
}];
|
|
2550
|
+
break;
|
|
2551
|
+
}
|
|
2552
|
+
this.drawGuide(!0);
|
|
2553
|
+
}
|
|
2554
|
+
}
|
|
2555
|
+
},
|
|
2556
|
+
drawGuide(e) {
|
|
2557
|
+
this.redraw(!0), this.$nextTick(() => {
|
|
2558
|
+
this.context.strokeStyle = this.color, this.context.lineWidth = 1, this.context.lineJoin = this.lineJoin, this.context.lineCap = this.lineCap, this.context.beginPath(), this.context.setLineDash([15, 15]), this.strokes.type === "circle" ? this.context.ellipse(this.guides[0].x, this.guides[0].y, this.guides[1].x, this.guides[1].y, 0, 0, Math.PI * 2) : (this.context.moveTo(this.strokes.from.x, this.strokes.from.y), this.guides.forEach((t) => {
|
|
2559
|
+
this.context.lineTo(t.x, t.y);
|
|
2560
|
+
}), e && this.context.closePath()), this.context.stroke();
|
|
2561
|
+
});
|
|
2562
|
+
},
|
|
2563
|
+
drawShape(e, t, a) {
|
|
2564
|
+
e.strokeStyle = t.color, e.fillStyle = t.color, e.lineWidth = t.width, e.lineJoin = t.lineJoin === void 0 ? this.lineJoin : t.lineJoin, e.lineCap = t.lineCap === void 0 ? this.lineCap : t.lineCap, e.beginPath(), e.setLineDash([]), t.type === "circle" ? e.ellipse(t.coordinates[0].x, t.coordinates[0].y, t.coordinates[1].x, t.coordinates[1].y, 0, 0, Math.PI * 2) : (e.moveTo(t.from.x, t.from.y), t.coordinates.forEach((i) => {
|
|
2565
|
+
e.lineTo(i.x, i.y);
|
|
2566
|
+
}), a && e.closePath()), t.fill ? e.fill() : e.stroke();
|
|
2567
|
+
},
|
|
2568
|
+
stopDraw() {
|
|
2569
|
+
this.drawing && (this.strokes.coordinates = this.guides.length > 0 ? this.guides : this.strokes.coordinates, this.images.push(this.strokes), this.redraw(!0), this.drawing = !1, this.trash = []);
|
|
2570
|
+
},
|
|
2571
|
+
reset() {
|
|
2572
|
+
this.lock || (this.images = [], this.strokes = {
|
|
2573
|
+
type: "",
|
|
2574
|
+
coordinates: [],
|
|
2575
|
+
color: "",
|
|
2576
|
+
width: "",
|
|
2577
|
+
fill: !1,
|
|
2578
|
+
lineCap: "",
|
|
2579
|
+
lineJoin: ""
|
|
2580
|
+
}, this.guides = [], this.trash = [], this.redraw(!0));
|
|
2581
|
+
},
|
|
2582
|
+
undo() {
|
|
2583
|
+
if (!this.lock) {
|
|
2584
|
+
let e = this.images.pop();
|
|
2585
|
+
e && (this.trash.push(e), this.redraw(!0));
|
|
2586
|
+
}
|
|
2587
|
+
},
|
|
2588
|
+
redo() {
|
|
2589
|
+
if (!this.lock) {
|
|
2590
|
+
let e = this.trash.pop();
|
|
2591
|
+
e && (this.images.push(e), this.redraw(!0));
|
|
2592
|
+
}
|
|
2593
|
+
},
|
|
2594
|
+
async redraw(e) {
|
|
2595
|
+
e = typeof e < "u" ? e : !0, await this.setBackground().then(() => {
|
|
2596
|
+
this.drawAdditionalImages();
|
|
2597
|
+
}).then(() => {
|
|
2598
|
+
let t = document.createElement("canvas"), a = t.getContext("2d");
|
|
2599
|
+
t.width = Number(this.width), t.height = Number(this.height), a && (this.images.forEach((i) => {
|
|
2600
|
+
a && (a.globalCompositeOperation = i.type === "eraser" ? "destination-out" : "source-over", (i.type !== "circle" || i.type === "circle" && i.coordinates.length > 0) && this.drawShape(a, i, !(i.type === "eraser" || i.type === "dash" || i.type === "line")));
|
|
2601
|
+
}), this.context.drawImage(t, 0, 0, Number(this.width), Number(this.height)));
|
|
2602
|
+
}).then(() => {
|
|
2603
|
+
e && this.save();
|
|
2604
|
+
});
|
|
2605
|
+
},
|
|
2606
|
+
wrapText(e, t, a, i, l, o) {
|
|
2607
|
+
const r = /(\r\n|\n\r|\n|\r)+/g, s = /\s+/g;
|
|
2608
|
+
var p = t.split(r).filter((M) => M.length > 0);
|
|
2609
|
+
for (let M = 0; M < p.length; M++) {
|
|
2610
|
+
for (var m = p[M].split(s).filter((I) => I.length > 0), b = "", n = 0; n < m.length; n++) {
|
|
2611
|
+
var $ = b + m[n] + " ", T = e.measureText($), V = T.width;
|
|
2612
|
+
V > l && n > 0 ? (this.watermark && this.watermark.fontStyle && this.watermark.fontStyle.drawType && this.watermark.fontStyle.drawType === "stroke" ? e.strokeText(b, a, i) : e.fillText(b, a, i), b = m[n] + " ", i += o) : b = $;
|
|
2613
|
+
}
|
|
2614
|
+
this.watermark && this.watermark.fontStyle && this.watermark.fontStyle.drawType && this.watermark.fontStyle.drawType === "stroke" ? e.strokeText(b, a, i) : e.fillText(b, a, i), i += m.length > 0 ? o : 0;
|
|
2615
|
+
}
|
|
2616
|
+
},
|
|
2617
|
+
save() {
|
|
2618
|
+
let e = document.querySelector("#" + this.canvasId);
|
|
2619
|
+
if (this.watermark) {
|
|
2620
|
+
let t = document.createElement("canvas"), a = t.getContext("2d");
|
|
2621
|
+
a && (t.width = Number(this.width), t.height = Number(this.height), a.drawImage(e, 0, 0, Number(this.width), Number(this.height)), this.drawWatermark(t, a, this.watermark));
|
|
2622
|
+
} else {
|
|
2623
|
+
let t = document.createElement("canvas"), a = t.getContext("2d"), i = this.outputWidth === void 0 ? this.width : this.outputWidth, l = this.outputHeight === void 0 ? this.height : this.outputHeight;
|
|
2624
|
+
if (t.width = Number(i), t.height = Number(l), a)
|
|
2625
|
+
return a.drawImage(e, 0, 0, Number(i), Number(l)), this.$emit("update:image", t.toDataURL("image/" + this.saveAs, 1)), t.toDataURL("image/" + this.saveAs, 1);
|
|
2626
|
+
}
|
|
2627
|
+
},
|
|
2628
|
+
drawWatermark(e, t, a) {
|
|
2629
|
+
if (a.type === "Image") {
|
|
2630
|
+
let i = a.imageStyle ? a.imageStyle.width ? a.imageStyle.width : Number(this.width) : Number(this.width), l = a.imageStyle ? a.imageStyle.height ? a.imageStyle.height : Number(this.height) : Number(this.height);
|
|
2631
|
+
const o = new Image();
|
|
2632
|
+
o.src = a.source, o.onload = () => {
|
|
2633
|
+
a && t && t.drawImage(o, a.x, a.y, Number(i), Number(l));
|
|
2634
|
+
let r = document.createElement("canvas"), s = r.getContext("2d"), p = this.outputWidth === void 0 ? this.width : this.outputWidth, m = this.outputHeight === void 0 ? this.height : this.outputHeight;
|
|
2635
|
+
if (r.width = Number(p), r.height = Number(m), s)
|
|
2636
|
+
return s.drawImage(e, 0, 0, Number(p), Number(m)), this.$emit("update:image", r.toDataURL("image/" + this.saveAs, 1)), r.toDataURL("image/" + this.saveAs, 1);
|
|
2637
|
+
};
|
|
2638
|
+
} else if (a.type === "Text") {
|
|
2639
|
+
let i = a.fontStyle && a.fontStyle.font ? a.fontStyle.font : "20px serif", l = a.fontStyle && a.fontStyle.textAlign ? a.fontStyle.textAlign : "start", o = a.fontStyle && a.fontStyle.textBaseline ? a.fontStyle.textBaseline : "alphabetic", r = a.fontStyle && a.fontStyle.color ? a.fontStyle.color : "#000000";
|
|
2640
|
+
if (t.font = i, t.textAlign = l, t.textBaseline = o, a.fontStyle && a.fontStyle.rotate) {
|
|
2641
|
+
let n, $;
|
|
2642
|
+
a.fontStyle && a.fontStyle.width ? n = a.x + Math.floor(a.fontStyle.width / 2) : n = a.x, a.fontStyle && a.fontStyle.lineHeight ? $ = a.y + Math.floor(a.fontStyle.lineHeight / 2) : $ = a.y, t.translate(n, $), t.rotate(a.fontStyle.rotate * Math.PI / 180), t.translate(n * -1, $ * -1);
|
|
2643
|
+
}
|
|
2644
|
+
a.fontStyle && a.fontStyle.drawType && a.fontStyle.drawType === "stroke" ? (t.strokeStyle = a.fontStyle.color, a.fontStyle && a.fontStyle.width ? this.wrapText(t, a.source, a.x, a.y, a.fontStyle.width, a.fontStyle.lineHeight) : t.strokeText(a.source, a.x, a.y)) : (t.fillStyle = r, a.fontStyle && a.fontStyle.width ? this.wrapText(t, a.source, a.x, a.y, a.fontStyle.width, a.fontStyle.lineHeight) : t.fillText(a.source, a.x, a.y));
|
|
2645
|
+
let s = document.createElement("canvas"), p = s.getContext("2d"), m = this.outputWidth === void 0 ? this.width : this.outputWidth, b = this.outputHeight === void 0 ? this.height : this.outputHeight;
|
|
2646
|
+
if (s.width = Number(m), s.height = Number(b), p)
|
|
2647
|
+
return p.drawImage(e, 0, 0, Number(m), Number(b)), this.$emit("update:image", s.toDataURL("image/" + this.saveAs, 1)), s.toDataURL("image/" + this.saveAs, 1);
|
|
2648
|
+
}
|
|
2649
|
+
},
|
|
2650
|
+
isEmpty() {
|
|
2651
|
+
return !(this.images.length > 0);
|
|
2652
|
+
},
|
|
2653
|
+
getAllStrokes() {
|
|
2654
|
+
return this.images;
|
|
2655
|
+
}
|
|
2656
|
+
},
|
|
2657
|
+
render() {
|
|
2658
|
+
return $e("canvas", {
|
|
2659
|
+
id: this.canvasId,
|
|
2660
|
+
height: Number(this.height),
|
|
2661
|
+
width: Number(this.width),
|
|
2662
|
+
style: {
|
|
2663
|
+
touchAction: "none",
|
|
2664
|
+
// @ts-ignore
|
|
2665
|
+
...this.styles
|
|
2666
|
+
},
|
|
2667
|
+
class: this.classes,
|
|
2668
|
+
onMousedown: (e) => this.startDraw(e),
|
|
2669
|
+
onMousemove: (e) => this.draw(e),
|
|
2670
|
+
onMouseup: () => this.stopDraw(),
|
|
2671
|
+
onMouseleave: () => this.stopDraw(),
|
|
2672
|
+
onTouchstart: (e) => this.startDraw(e),
|
|
2673
|
+
onTouchmove: (e) => this.draw(e),
|
|
2674
|
+
onTouchend: () => this.stopDraw(),
|
|
2675
|
+
onTouchleave: () => this.stopDraw(),
|
|
2676
|
+
onTouchcancel: () => this.stopDraw(),
|
|
2677
|
+
onPointerdown: (e) => this.startDraw(e),
|
|
2678
|
+
onPointermove: (e) => this.draw(e),
|
|
2679
|
+
onPointerup: () => this.stopDraw(),
|
|
2680
|
+
onPointerleave: () => this.stopDraw(),
|
|
2681
|
+
onPointercancel: () => this.stopDraw()
|
|
2682
|
+
});
|
|
2683
|
+
}
|
|
2684
|
+
});
|
|
2685
|
+
const ea = { class: "d-flex flex-column" }, ta = { class: "d-flex flex-row mt-1 gap-1" }, Ui = /* @__PURE__ */ S({
|
|
2686
|
+
__name: "ForgeScratchpad",
|
|
2687
|
+
props: {
|
|
2688
|
+
showClear: { type: Boolean, default: !0 },
|
|
2689
|
+
showUndo: { type: Boolean, default: !0 },
|
|
2690
|
+
showRedo: { type: Boolean, default: !0 },
|
|
2691
|
+
showSave: { type: Boolean, default: !0 },
|
|
2692
|
+
height: { default: 300 },
|
|
2693
|
+
width: { default: 600 }
|
|
2694
|
+
},
|
|
2695
|
+
emits: ["save"],
|
|
2696
|
+
setup(e, { emit: t }) {
|
|
2697
|
+
const a = e, i = t, l = Be("drawingCanvas"), o = P(), r = () => {
|
|
2698
|
+
l == null || l.value.reset();
|
|
2699
|
+
}, s = () => {
|
|
2700
|
+
l == null || l.value.redo();
|
|
2701
|
+
}, p = () => {
|
|
2702
|
+
l == null || l.value.undo();
|
|
2703
|
+
}, m = () => {
|
|
2704
|
+
i("save", l.value.isEmpty());
|
|
2705
|
+
};
|
|
2706
|
+
return (b, n) => {
|
|
2707
|
+
const $ = N;
|
|
2708
|
+
return d(), v("div", ea, [
|
|
2709
|
+
y(c(Qt), F({
|
|
2710
|
+
ref_key: "drawingCanvas",
|
|
2711
|
+
ref: l,
|
|
2712
|
+
image: o.value,
|
|
2713
|
+
"onUpdate:image": n[0] || (n[0] = (T) => o.value = T),
|
|
2714
|
+
"data-cy": "drawing-canvas",
|
|
2715
|
+
class: "border canvas"
|
|
2716
|
+
}, { ...b.$attrs }, {
|
|
2717
|
+
height: b.height,
|
|
2718
|
+
width: b.width,
|
|
2719
|
+
style: `height: ${b.height}px; width: ${b.width}px`
|
|
2720
|
+
}), null, 16, ["image", "height", "width", "style"]),
|
|
2721
|
+
u("div", ta, [
|
|
2722
|
+
a.showUndo ? (d(), g($, {
|
|
2723
|
+
key: 0,
|
|
2724
|
+
onClick: p,
|
|
2725
|
+
outlined: "",
|
|
2726
|
+
"data-cy": "undo-button"
|
|
2727
|
+
}, {
|
|
2728
|
+
default: f(() => n[1] || (n[1] = [
|
|
2729
|
+
_("Undo")
|
|
2730
|
+
])),
|
|
2731
|
+
_: 1
|
|
2732
|
+
})) : z("", !0),
|
|
2733
|
+
a.showRedo ? (d(), g($, {
|
|
2734
|
+
key: 1,
|
|
2735
|
+
onClick: s,
|
|
2736
|
+
outlined: "",
|
|
2737
|
+
"data-cy": "redo-button"
|
|
2738
|
+
}, {
|
|
2739
|
+
default: f(() => n[2] || (n[2] = [
|
|
2740
|
+
_("Redo")
|
|
2741
|
+
])),
|
|
2742
|
+
_: 1
|
|
2743
|
+
})) : z("", !0),
|
|
2744
|
+
a.showClear ? (d(), g($, {
|
|
2745
|
+
key: 2,
|
|
2746
|
+
onClick: r,
|
|
2747
|
+
outlined: "",
|
|
2748
|
+
"data-cy": "clear-button"
|
|
2749
|
+
}, {
|
|
2750
|
+
default: f(() => n[3] || (n[3] = [
|
|
2751
|
+
_("Clear")
|
|
2752
|
+
])),
|
|
2753
|
+
_: 1
|
|
2754
|
+
})) : z("", !0),
|
|
2755
|
+
a.showSave ? (d(), g($, {
|
|
2756
|
+
key: 3,
|
|
2757
|
+
onClick: m,
|
|
2758
|
+
class: "ms-auto",
|
|
2759
|
+
"data-cy": "save-button"
|
|
2760
|
+
}, {
|
|
2761
|
+
default: f(() => n[4] || (n[4] = [
|
|
2762
|
+
_("Save")
|
|
2763
|
+
])),
|
|
2764
|
+
_: 1
|
|
2765
|
+
})) : z("", !0)
|
|
2766
|
+
])
|
|
2767
|
+
]);
|
|
2768
|
+
};
|
|
2769
|
+
}
|
|
2770
|
+
}), aa = { class: "value text-white w-100 text-center" }, Ai = /* @__PURE__ */ S({
|
|
2295
2771
|
__name: "ForgeStatWidget",
|
|
2296
2772
|
props: {
|
|
2297
2773
|
size: { default: "md" },
|
|
2298
2774
|
severity: { default: "primary" }
|
|
2299
2775
|
},
|
|
2300
2776
|
setup(e) {
|
|
2301
|
-
const
|
|
2302
|
-
return (
|
|
2303
|
-
class: `d-flex shadow m-2 align-items-center widget--${
|
|
2777
|
+
const t = e;
|
|
2778
|
+
return (a, i) => (d(), v("div", F(a.$attrs, {
|
|
2779
|
+
class: `d-flex shadow m-2 align-items-center widget--${t.size} bg-${t.severity}`
|
|
2304
2780
|
}), [
|
|
2305
|
-
|
|
2306
|
-
|
|
2781
|
+
u("span", aa, [
|
|
2782
|
+
k(a.$slots, "default")
|
|
2307
2783
|
])
|
|
2308
2784
|
], 16));
|
|
2309
2785
|
}
|
|
2310
|
-
}),
|
|
2786
|
+
}), ia = { key: 0 }, qi = /* @__PURE__ */ S({
|
|
2311
2787
|
__name: "ForgeStepper",
|
|
2312
2788
|
props: {
|
|
2313
2789
|
currentStep: { default: 1 },
|
|
@@ -2325,13 +2801,13 @@ const Ba = { key: 0 }, za = {
|
|
|
2325
2801
|
unstyled: { type: Boolean }
|
|
2326
2802
|
},
|
|
2327
2803
|
setup(e) {
|
|
2328
|
-
const
|
|
2804
|
+
const t = e, a = C(() => ({
|
|
2329
2805
|
header: {
|
|
2330
2806
|
class: [
|
|
2331
2807
|
"p-0 m-0 d-flex align-items-center border border-0 bg-transparent gap-1",
|
|
2332
2808
|
{
|
|
2333
|
-
"flex-row":
|
|
2334
|
-
"flex-column": !
|
|
2809
|
+
"flex-row": t.inlineSteps,
|
|
2810
|
+
"flex-column": !t.inlineSteps
|
|
2335
2811
|
}
|
|
2336
2812
|
]
|
|
2337
2813
|
},
|
|
@@ -2340,7 +2816,7 @@ const Ba = { key: 0 }, za = {
|
|
|
2340
2816
|
"step mb-2 d-flex align-items-center justify-content-center",
|
|
2341
2817
|
{
|
|
2342
2818
|
inactive: i.disabled,
|
|
2343
|
-
[`bg-${
|
|
2819
|
+
[`bg-${t.severity} text-white`]: i.active
|
|
2344
2820
|
}
|
|
2345
2821
|
]
|
|
2346
2822
|
}),
|
|
@@ -2349,37 +2825,37 @@ const Ba = { key: 0 }, za = {
|
|
|
2349
2825
|
"h5",
|
|
2350
2826
|
{
|
|
2351
2827
|
inactive: i.disabled,
|
|
2352
|
-
[`border-bottom border-2 border-${
|
|
2828
|
+
[`border-bottom border-2 border-${t.severity}`]: i.active
|
|
2353
2829
|
}
|
|
2354
2830
|
]
|
|
2355
2831
|
})
|
|
2356
2832
|
}));
|
|
2357
|
-
return (i, l) => (
|
|
2358
|
-
default:
|
|
2359
|
-
|
|
2360
|
-
default:
|
|
2361
|
-
(
|
|
2833
|
+
return (i, l) => (d(), g(c(Ne), { value: i.currentStep }, {
|
|
2834
|
+
default: f(() => [
|
|
2835
|
+
y(c(Ue), null, {
|
|
2836
|
+
default: f(() => [
|
|
2837
|
+
(d(!0), v(O, null, A(i.steps, (o) => (d(), g(c(Oe), F({
|
|
2362
2838
|
key: o.value,
|
|
2363
2839
|
value: o.value,
|
|
2364
2840
|
disabled: o.disabled,
|
|
2365
2841
|
ref_for: !0
|
|
2366
|
-
}, { ...i.$attrs }, { pt:
|
|
2367
|
-
default:
|
|
2368
|
-
i.showStepLabel ? (
|
|
2842
|
+
}, { ...i.$attrs }, { pt: a.value }), {
|
|
2843
|
+
default: f(() => [
|
|
2844
|
+
i.showStepLabel ? (d(), v("div", ia, w(o.label), 1)) : z("", !0)
|
|
2369
2845
|
]),
|
|
2370
2846
|
_: 2
|
|
2371
2847
|
}, 1040, ["value", "disabled", "pt"]))), 128))
|
|
2372
2848
|
]),
|
|
2373
2849
|
_: 1
|
|
2374
2850
|
}),
|
|
2375
|
-
|
|
2376
|
-
default:
|
|
2377
|
-
(
|
|
2851
|
+
y(c(qe), null, {
|
|
2852
|
+
default: f(() => [
|
|
2853
|
+
(d(!0), v(O, null, A(i.steps, (o) => (d(), g(c(Ae), {
|
|
2378
2854
|
key: o.value,
|
|
2379
2855
|
value: o.value
|
|
2380
2856
|
}, {
|
|
2381
|
-
default:
|
|
2382
|
-
|
|
2857
|
+
default: f(() => [
|
|
2858
|
+
k(i.$slots, "step" + o.value)
|
|
2383
2859
|
]),
|
|
2384
2860
|
_: 2
|
|
2385
2861
|
}, 1032, ["value"]))), 128))
|
|
@@ -2390,7 +2866,7 @@ const Ba = { key: 0 }, za = {
|
|
|
2390
2866
|
_: 3
|
|
2391
2867
|
}, 8, ["value"]));
|
|
2392
2868
|
}
|
|
2393
|
-
}),
|
|
2869
|
+
}), la = { class: "p-4 text-wrap w-100" }, oa = { class: "p-4 text-wrap w-100" }, Li = /* @__PURE__ */ S({
|
|
2394
2870
|
__name: "ForgeTile",
|
|
2395
2871
|
props: {
|
|
2396
2872
|
severity: { default: "primary" },
|
|
@@ -2399,48 +2875,48 @@ const Ba = { key: 0 }, za = {
|
|
|
2399
2875
|
selected: { type: Boolean, default: !1 }
|
|
2400
2876
|
},
|
|
2401
2877
|
setup(e) {
|
|
2402
|
-
const
|
|
2878
|
+
const t = e, a = C(() => `${t.severity === void 0 ? "tile-primary" : `tile-${t.severity}`} ${t.barPosition === "none" ? "" : `tile-bar-${t.barPosition}`} ${t.selected ? "selected" : ""}`), i = C(() => `${t.severity === void 0 ? "tile-primary border-primary" : `tile-${t.severity} border-${t.severity}`} ${t.barPosition === "none" ? "" : `tile-bar-${t.barPosition}`} ${t.selected ? "selected" : ""}`);
|
|
2403
2879
|
return (l, o) => {
|
|
2404
|
-
const
|
|
2405
|
-
return
|
|
2880
|
+
const r = N;
|
|
2881
|
+
return t.clickable ? (d(), g(r, {
|
|
2406
2882
|
key: 0,
|
|
2407
|
-
class:
|
|
2408
|
-
severity:
|
|
2883
|
+
class: B(["d-flex w-100 p-0 text-body", a.value]),
|
|
2884
|
+
severity: t.severity,
|
|
2409
2885
|
unstyled: "",
|
|
2410
2886
|
"data-cy": "button-tile"
|
|
2411
2887
|
}, {
|
|
2412
|
-
default:
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
o[0] || (o[0] =
|
|
2888
|
+
default: f(() => [
|
|
2889
|
+
u("div", la, [
|
|
2890
|
+
k(l.$slots, "default", {}, () => [
|
|
2891
|
+
o[0] || (o[0] = _("Tile Content"))
|
|
2416
2892
|
])
|
|
2417
2893
|
])
|
|
2418
2894
|
]),
|
|
2419
2895
|
_: 3
|
|
2420
|
-
}, 8, ["severity", "class"])) : (
|
|
2896
|
+
}, 8, ["severity", "class"])) : (d(), v("div", {
|
|
2421
2897
|
key: 1,
|
|
2422
|
-
class:
|
|
2898
|
+
class: B(["d-flex w-100", i.value]),
|
|
2423
2899
|
"data-cy": "tile"
|
|
2424
2900
|
}, [
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
o[1] || (o[1] =
|
|
2901
|
+
u("div", oa, [
|
|
2902
|
+
k(l.$slots, "default", {}, () => [
|
|
2903
|
+
o[1] || (o[1] = _("Tile Content"))
|
|
2428
2904
|
])
|
|
2429
2905
|
])
|
|
2430
2906
|
], 2));
|
|
2431
2907
|
};
|
|
2432
2908
|
}
|
|
2433
2909
|
});
|
|
2434
|
-
function
|
|
2435
|
-
return e > 1 ? `${
|
|
2910
|
+
function Z(e, t) {
|
|
2911
|
+
return e > 1 ? `${t}s` : t;
|
|
2436
2912
|
}
|
|
2437
|
-
const
|
|
2913
|
+
const na = {
|
|
2438
2914
|
class: "d-flex justify-content-start align-items-baseline",
|
|
2439
2915
|
"data-cy": "pagination-header"
|
|
2440
|
-
},
|
|
2916
|
+
}, sa = { class: "ms-2" }, ra = { key: 0 }, da = {
|
|
2441
2917
|
class: "w-auto",
|
|
2442
2918
|
"data-cy": "total"
|
|
2443
|
-
},
|
|
2919
|
+
}, pa = /* @__PURE__ */ S({
|
|
2444
2920
|
__name: "ForgePaginationHeader",
|
|
2445
2921
|
props: {
|
|
2446
2922
|
total: {},
|
|
@@ -2448,33 +2924,33 @@ const at = {
|
|
|
2448
2924
|
perPage: { default: 10 }
|
|
2449
2925
|
},
|
|
2450
2926
|
emits: ["update:perPage"],
|
|
2451
|
-
setup(e, { emit:
|
|
2452
|
-
const
|
|
2453
|
-
|
|
2454
|
-
}, o =
|
|
2455
|
-
const
|
|
2456
|
-
return `${
|
|
2927
|
+
setup(e, { emit: t }) {
|
|
2928
|
+
const a = t, i = e, l = (r) => {
|
|
2929
|
+
a("update:perPage", r.value);
|
|
2930
|
+
}, o = C(() => {
|
|
2931
|
+
const r = Math.ceil(i.total / i.perPage);
|
|
2932
|
+
return `${r} ${Z(r, "page")}`;
|
|
2457
2933
|
});
|
|
2458
|
-
return (
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2934
|
+
return (r, s) => (d(), v("div", na, [
|
|
2935
|
+
s[2] || (s[2] = _(" Number of results per page ")),
|
|
2936
|
+
u("div", sa, [
|
|
2937
|
+
y(c(te), {
|
|
2462
2938
|
options: i.pageSizes,
|
|
2463
2939
|
"model-value": i.perPage,
|
|
2464
2940
|
class: "page-size",
|
|
2465
|
-
onChange:
|
|
2941
|
+
onChange: s[0] || (s[0] = (p) => l(p))
|
|
2466
2942
|
}, null, 8, ["options", "model-value"])
|
|
2467
2943
|
]),
|
|
2468
|
-
i.total ? (
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
])) :
|
|
2944
|
+
i.total ? (d(), v("div", ra, [
|
|
2945
|
+
s[1] || (s[1] = u("span", { class: "mx-2" }, "|", -1)),
|
|
2946
|
+
u("span", da, w(i.total) + " " + w(c(Z)(i.total, "result")) + " across " + w(o.value), 1)
|
|
2947
|
+
])) : z("", !0)
|
|
2472
2948
|
]));
|
|
2473
2949
|
}
|
|
2474
|
-
}),
|
|
2950
|
+
}), ca = { class: "position-relative" }, ma = { "data-cy": "above-table-slot" }, ua = { class: "d-flex w-100" }, va = {
|
|
2475
2951
|
class: "mx-auto",
|
|
2476
2952
|
"data-cy": "empty-message"
|
|
2477
|
-
},
|
|
2953
|
+
}, fa = { class: "d-flex" }, ga = { class: "d-flex align-items-end mb-2" }, ba = { key: 0 }, xa = { class: "ms-auto" }, Ei = /* @__PURE__ */ S({
|
|
2478
2954
|
__name: "ForgeTable",
|
|
2479
2955
|
props: {
|
|
2480
2956
|
value: {},
|
|
@@ -2559,18 +3035,18 @@ const at = {
|
|
|
2559
3035
|
unstyled: { type: Boolean }
|
|
2560
3036
|
},
|
|
2561
3037
|
emits: ["update:filters", "update:tableContext", "sort", "page"],
|
|
2562
|
-
setup(e, { emit:
|
|
2563
|
-
const
|
|
3038
|
+
setup(e, { emit: t }) {
|
|
3039
|
+
const a = t, i = e, l = P(), o = P([5, 10, 20, 50, 100]), r = P(10), s = P({
|
|
2564
3040
|
filters: i.filters,
|
|
2565
|
-
perPage:
|
|
3041
|
+
perPage: r.value,
|
|
2566
3042
|
page: 0,
|
|
2567
3043
|
sortDirection: "None",
|
|
2568
3044
|
sortField: "",
|
|
2569
3045
|
total: i.totalRecords ?? i.value.length
|
|
2570
|
-
}),
|
|
2571
|
-
const
|
|
2572
|
-
return `${
|
|
2573
|
-
}),
|
|
3046
|
+
}), p = C(() => i.totalRecords ?? i.value.length), m = C(() => {
|
|
3047
|
+
const x = Math.ceil(p.value / r.value);
|
|
3048
|
+
return `${x} ${Z(x, "page")}`;
|
|
3049
|
+
}), b = C(() => ({
|
|
2574
3050
|
thead: () => ({
|
|
2575
3051
|
class: [
|
|
2576
3052
|
{
|
|
@@ -2592,152 +3068,152 @@ const at = {
|
|
|
2592
3068
|
}
|
|
2593
3069
|
]
|
|
2594
3070
|
})
|
|
2595
|
-
})),
|
|
3071
|
+
})), n = () => {
|
|
2596
3072
|
if (i.clearAll)
|
|
2597
3073
|
i.clearAll();
|
|
2598
3074
|
else
|
|
2599
|
-
for (const
|
|
2600
|
-
typeof i.filters[
|
|
2601
|
-
|
|
2602
|
-
},
|
|
3075
|
+
for (const x in i.filters)
|
|
3076
|
+
typeof i.filters[x] == "string" ? i.filters[x] = "" : i.filters[x].value = null;
|
|
3077
|
+
V(i.filters);
|
|
3078
|
+
}, $ = () => {
|
|
2603
3079
|
l.value.exportCSV();
|
|
2604
|
-
},
|
|
2605
|
-
var
|
|
2606
|
-
|
|
2607
|
-
},
|
|
2608
|
-
|
|
2609
|
-
},
|
|
2610
|
-
|
|
2611
|
-
},
|
|
2612
|
-
|
|
3080
|
+
}, T = (x) => {
|
|
3081
|
+
var h;
|
|
3082
|
+
s.value.sortDirection = x.sortOrder === 1 ? "Asc" : x.sortOrder === -1 ? "Desc" : "None", s.value.sortField = ((h = x.sortField) == null ? void 0 : h.toString()) ?? "", a("update:tableContext", s.value), a("sort", x);
|
|
3083
|
+
}, V = (x) => {
|
|
3084
|
+
s.value.filters = x, a("update:tableContext", s.value), a("update:filters", x);
|
|
3085
|
+
}, M = (x) => {
|
|
3086
|
+
s.value.page = x.page, a("update:tableContext", s.value), a("page", x);
|
|
3087
|
+
}, I = () => {
|
|
3088
|
+
s.value.perPage = r.value, a("update:tableContext", s.value);
|
|
2613
3089
|
};
|
|
2614
|
-
return
|
|
2615
|
-
|
|
2616
|
-
}, { deep: !0 }), ie(() =>
|
|
2617
|
-
|
|
2618
|
-
|
|
3090
|
+
return pe(() => i.filters, (x) => {
|
|
3091
|
+
s.value.filters = x, a("update:tableContext", s.value);
|
|
3092
|
+
}, { deep: !0 }), ie(() => a("update:tableContext", s.value)), (x, h) => (d(), v("div", ca, [
|
|
3093
|
+
u("span", ma, [
|
|
3094
|
+
k(x.$slots, "above-table")
|
|
2619
3095
|
]),
|
|
2620
|
-
|
|
3096
|
+
y(c(Le), F({
|
|
2621
3097
|
class: ["w-100", `${i.severity ? `forge-table-${i.severity}` : ""}`]
|
|
2622
|
-
}, { ...i, ...
|
|
2623
|
-
pt:
|
|
2624
|
-
rows:
|
|
2625
|
-
"total-records":
|
|
3098
|
+
}, { ...i, ...x.$attrs }, {
|
|
3099
|
+
pt: b.value,
|
|
3100
|
+
rows: r.value,
|
|
3101
|
+
"total-records": p.value,
|
|
2626
3102
|
"filter-display": i.filters ? "row" : void 0,
|
|
2627
3103
|
ref_key: "forgeTable",
|
|
2628
3104
|
ref: l,
|
|
2629
3105
|
"data-cy": "table",
|
|
2630
|
-
"onUpdate:filters":
|
|
2631
|
-
onSort:
|
|
2632
|
-
onPage:
|
|
3106
|
+
"onUpdate:filters": V,
|
|
3107
|
+
onSort: T,
|
|
3108
|
+
onPage: M,
|
|
2633
3109
|
showHeaders: ""
|
|
2634
|
-
}),
|
|
2635
|
-
empty:
|
|
2636
|
-
|
|
2637
|
-
|
|
3110
|
+
}), ae({
|
|
3111
|
+
empty: f(() => [
|
|
3112
|
+
u("div", ua, [
|
|
3113
|
+
u("h5", va, w(x.emptyMessage ?? "No items Found."), 1)
|
|
2638
3114
|
])
|
|
2639
3115
|
]),
|
|
2640
|
-
header:
|
|
2641
|
-
|
|
2642
|
-
class:
|
|
3116
|
+
header: f(() => [
|
|
3117
|
+
u("div", {
|
|
3118
|
+
class: B(i.loading ? "opacity-50" : "")
|
|
2643
3119
|
}, [
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
total:
|
|
3120
|
+
u("div", fa, [
|
|
3121
|
+
u("div", ga, [
|
|
3122
|
+
x.paginator && !x.legacyPaginationFooter ? (d(), v("span", ba, [
|
|
3123
|
+
y(pa, {
|
|
3124
|
+
total: p.value,
|
|
2649
3125
|
"page-sizes": o.value,
|
|
2650
|
-
"per-page":
|
|
3126
|
+
"per-page": r.value,
|
|
2651
3127
|
"onUpdate:perPage": [
|
|
2652
|
-
|
|
2653
|
-
|
|
3128
|
+
h[0] || (h[0] = (L) => r.value = L),
|
|
3129
|
+
I
|
|
2654
3130
|
]
|
|
2655
3131
|
}, null, 8, ["total", "page-sizes", "per-page"])
|
|
2656
|
-
])) :
|
|
3132
|
+
])) : z("", !0)
|
|
2657
3133
|
]),
|
|
2658
|
-
|
|
2659
|
-
|
|
3134
|
+
u("div", xa, [
|
|
3135
|
+
x.showClearButton ? (d(), g(c(N), {
|
|
2660
3136
|
key: 0,
|
|
2661
3137
|
outlined: "",
|
|
2662
|
-
class:
|
|
2663
|
-
onClick:
|
|
3138
|
+
class: B(x.showExporterButton ? "me-2" : ""),
|
|
3139
|
+
onClick: n,
|
|
2664
3140
|
"data-cy": "clear-all"
|
|
2665
3141
|
}, {
|
|
2666
|
-
default:
|
|
2667
|
-
|
|
3142
|
+
default: f(() => [
|
|
3143
|
+
y(c(j), {
|
|
2668
3144
|
icon: "bi:funnel-fill",
|
|
2669
3145
|
width: "24",
|
|
2670
3146
|
height: "24"
|
|
2671
3147
|
}),
|
|
2672
|
-
|
|
3148
|
+
h[2] || (h[2] = _(" Clear "))
|
|
2673
3149
|
]),
|
|
2674
3150
|
_: 1
|
|
2675
|
-
}, 8, ["class"])) :
|
|
2676
|
-
|
|
3151
|
+
}, 8, ["class"])) : z("", !0),
|
|
3152
|
+
x.showExporterButton ? (d(), g(c(N), {
|
|
2677
3153
|
key: 1,
|
|
2678
3154
|
outlined: "",
|
|
2679
|
-
onClick:
|
|
3155
|
+
onClick: $,
|
|
2680
3156
|
"data-cy": "exporter"
|
|
2681
3157
|
}, {
|
|
2682
|
-
default:
|
|
2683
|
-
|
|
3158
|
+
default: f(() => [
|
|
3159
|
+
y(c(j), {
|
|
2684
3160
|
icon: "typcn:export",
|
|
2685
3161
|
width: "24",
|
|
2686
3162
|
height: "24"
|
|
2687
3163
|
}),
|
|
2688
|
-
|
|
3164
|
+
h[3] || (h[3] = _(" Export "))
|
|
2689
3165
|
]),
|
|
2690
3166
|
_: 1
|
|
2691
|
-
})) :
|
|
2692
|
-
|
|
3167
|
+
})) : z("", !0),
|
|
3168
|
+
k(x.$slots, "column-customiser")
|
|
2693
3169
|
])
|
|
2694
3170
|
])
|
|
2695
3171
|
], 2)
|
|
2696
3172
|
]),
|
|
2697
|
-
default:
|
|
2698
|
-
|
|
3173
|
+
default: f(() => [
|
|
3174
|
+
k(x.$slots, "default")
|
|
2699
3175
|
]),
|
|
2700
3176
|
_: 2
|
|
2701
3177
|
}, [
|
|
2702
|
-
|
|
2703
|
-
name:
|
|
2704
|
-
fn:
|
|
2705
|
-
|
|
3178
|
+
A(x.$slots, (L, J) => ({
|
|
3179
|
+
name: J,
|
|
3180
|
+
fn: f((ye) => [
|
|
3181
|
+
k(x.$slots, J, X(Q(ye || {})))
|
|
2706
3182
|
])
|
|
2707
3183
|
})),
|
|
2708
|
-
|
|
3184
|
+
x.legacyPaginationFooter ? {
|
|
2709
3185
|
name: "paginatorstart",
|
|
2710
|
-
fn:
|
|
2711
|
-
|
|
2712
|
-
class:
|
|
3186
|
+
fn: f(() => [
|
|
3187
|
+
u("span", {
|
|
3188
|
+
class: B(["d-flex", i.loading ? "opacity-50" : ""]),
|
|
2713
3189
|
"data-cy": "legacy-page-size"
|
|
2714
3190
|
}, [
|
|
2715
|
-
|
|
2716
|
-
|
|
3191
|
+
h[4] || (h[4] = u("span", { class: "me-2 my-auto text-nowrap" }, "Page Size:", -1)),
|
|
3192
|
+
y(c(te), {
|
|
2717
3193
|
options: o.value,
|
|
2718
|
-
modelValue:
|
|
2719
|
-
"onUpdate:modelValue":
|
|
3194
|
+
modelValue: r.value,
|
|
3195
|
+
"onUpdate:modelValue": h[1] || (h[1] = (L) => r.value = L),
|
|
2720
3196
|
class: "ms-2",
|
|
2721
|
-
onClick:
|
|
3197
|
+
onClick: I
|
|
2722
3198
|
}, null, 8, ["options", "modelValue"])
|
|
2723
3199
|
], 2)
|
|
2724
3200
|
]),
|
|
2725
3201
|
key: "0"
|
|
2726
3202
|
} : void 0,
|
|
2727
|
-
|
|
3203
|
+
x.legacyPaginationFooter ? {
|
|
2728
3204
|
name: "paginatorend",
|
|
2729
|
-
fn:
|
|
2730
|
-
|
|
3205
|
+
fn: f(() => [
|
|
3206
|
+
u("span", {
|
|
2731
3207
|
"data-cy": "legacy-total",
|
|
2732
|
-
class:
|
|
2733
|
-
},
|
|
3208
|
+
class: B(i.loading ? "opacity-50" : "")
|
|
3209
|
+
}, w(p.value) + " " + w(c(Z)(p.value, "result")) + " across " + w(m.value), 3)
|
|
2734
3210
|
]),
|
|
2735
3211
|
key: "1"
|
|
2736
3212
|
} : void 0
|
|
2737
3213
|
]), 1040, ["class", "pt", "rows", "total-records", "filter-display"])
|
|
2738
3214
|
]));
|
|
2739
3215
|
}
|
|
2740
|
-
}),
|
|
3216
|
+
}), ya = { class: "d-flex position-relative" }, ha = { class: "d-flex w-100" }, Ri = /* @__PURE__ */ S({
|
|
2741
3217
|
__name: "ForgeFilterHeader",
|
|
2742
3218
|
props: /* @__PURE__ */ q({
|
|
2743
3219
|
dataType: {},
|
|
@@ -2752,56 +3228,56 @@ const at = {
|
|
|
2752
3228
|
}),
|
|
2753
3229
|
emits: ["update:modelValue"],
|
|
2754
3230
|
setup(e) {
|
|
2755
|
-
const
|
|
3231
|
+
const t = D(e, "modelValue"), a = (l, o) => {
|
|
2756
3232
|
if (!l || Array.isArray(l) && l.length === 0)
|
|
2757
3233
|
return o;
|
|
2758
|
-
const
|
|
2759
|
-
var
|
|
2760
|
-
const
|
|
2761
|
-
(
|
|
3234
|
+
const r = (s) => {
|
|
3235
|
+
var m;
|
|
3236
|
+
const p = (m = e.dropdownOptions) == null ? void 0 : m.find(
|
|
3237
|
+
(b) => e.optionValue ? b[e.optionValue] === s : Object.keys(b).every((n) => s.hasOwnProperty(n) && b[n] === s[n])
|
|
2762
3238
|
);
|
|
2763
|
-
return e.optionLabel ?
|
|
3239
|
+
return e.optionLabel ? p[e.optionLabel] : p;
|
|
2764
3240
|
};
|
|
2765
|
-
return Array.isArray(l) ? l.map(
|
|
3241
|
+
return Array.isArray(l) ? l.map(r).join(", ") : r(l);
|
|
2766
3242
|
}, i = () => {
|
|
2767
|
-
e.clearFilter ? e.clearFilter() :
|
|
3243
|
+
e.clearFilter ? e.clearFilter() : t.value = null;
|
|
2768
3244
|
};
|
|
2769
3245
|
return (l, o) => {
|
|
2770
|
-
const
|
|
2771
|
-
return
|
|
2772
|
-
l.dataType === "numeric" ? (
|
|
3246
|
+
const r = ce, s = N;
|
|
3247
|
+
return d(), v("div", ya, [
|
|
3248
|
+
l.dataType === "numeric" ? (d(), g(r, F({
|
|
2773
3249
|
key: 0,
|
|
2774
|
-
modelValue:
|
|
2775
|
-
"onUpdate:modelValue": o[0] || (o[0] = (
|
|
2776
|
-
}, l.$attrs), null, 16, ["modelValue"])) : l.dataType === "date" ? (
|
|
3250
|
+
modelValue: t.value,
|
|
3251
|
+
"onUpdate:modelValue": o[0] || (o[0] = (p) => t.value = p)
|
|
3252
|
+
}, l.$attrs), null, 16, ["modelValue"])) : l.dataType === "date" ? (d(), g(ge, F({
|
|
2777
3253
|
key: 1,
|
|
2778
|
-
modelValue:
|
|
2779
|
-
"onUpdate:modelValue": o[1] || (o[1] = (
|
|
3254
|
+
modelValue: t.value,
|
|
3255
|
+
"onUpdate:modelValue": o[1] || (o[1] = (p) => t.value = p)
|
|
2780
3256
|
}, l.$attrs, {
|
|
2781
3257
|
"show-icon": !1,
|
|
2782
3258
|
"show-on-focus": !0
|
|
2783
|
-
}), null, 16, ["modelValue"])) : l.dataType === "select" ? (
|
|
3259
|
+
}), null, 16, ["modelValue"])) : l.dataType === "select" ? (d(), g(c(te), F({
|
|
2784
3260
|
key: 2,
|
|
2785
|
-
modelValue:
|
|
2786
|
-
"onUpdate:modelValue": o[2] || (o[2] = (
|
|
3261
|
+
modelValue: t.value,
|
|
3262
|
+
"onUpdate:modelValue": o[2] || (o[2] = (p) => t.value = p)
|
|
2787
3263
|
}, l.$attrs, {
|
|
2788
3264
|
options: l.dropdownOptions,
|
|
2789
3265
|
"option-value": l.optionValue,
|
|
2790
3266
|
"option-label": l.optionLabel
|
|
2791
3267
|
}), {
|
|
2792
|
-
value:
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
class:
|
|
2796
|
-
},
|
|
2797
|
-
l.showClearButton &&
|
|
3268
|
+
value: f(({ value: p, placeholder: m }) => [
|
|
3269
|
+
u("div", ha, [
|
|
3270
|
+
u("span", {
|
|
3271
|
+
class: B({ "filter-placeholder": p === null })
|
|
3272
|
+
}, w(a(p, m)), 3),
|
|
3273
|
+
l.showClearButton && t.value !== null ? (d(), g(s, {
|
|
2798
3274
|
key: 0,
|
|
2799
|
-
onClick:
|
|
3275
|
+
onClick: Y(i, ["prevent"]),
|
|
2800
3276
|
size: "small",
|
|
2801
3277
|
class: "bg-transparent border-0 ms-auto p-0 pe-1"
|
|
2802
3278
|
}, {
|
|
2803
|
-
default:
|
|
2804
|
-
|
|
3279
|
+
default: f(() => [
|
|
3280
|
+
y(c(j), {
|
|
2805
3281
|
icon: "bi:x",
|
|
2806
3282
|
width: "1rem",
|
|
2807
3283
|
height: "1rem",
|
|
@@ -2809,33 +3285,33 @@ const at = {
|
|
|
2809
3285
|
})
|
|
2810
3286
|
]),
|
|
2811
3287
|
_: 1
|
|
2812
|
-
})) :
|
|
3288
|
+
})) : z("", !0)
|
|
2813
3289
|
])
|
|
2814
3290
|
]),
|
|
2815
3291
|
_: 1
|
|
2816
|
-
}, 16, ["modelValue", "options", "option-value", "option-label"])) : l.dataType === "multiselect" ? (
|
|
3292
|
+
}, 16, ["modelValue", "options", "option-value", "option-label"])) : l.dataType === "multiselect" ? (d(), g(c(oe), F({
|
|
2817
3293
|
key: 3,
|
|
2818
|
-
modelValue:
|
|
2819
|
-
"onUpdate:modelValue": o[3] || (o[3] = (
|
|
3294
|
+
modelValue: t.value,
|
|
3295
|
+
"onUpdate:modelValue": o[3] || (o[3] = (p) => t.value = p)
|
|
2820
3296
|
}, l.$attrs, {
|
|
2821
3297
|
options: l.dropdownOptions,
|
|
2822
3298
|
showToggleAll: !1,
|
|
2823
3299
|
"option-label": l.optionLabel,
|
|
2824
3300
|
"option-value": l.optionValue,
|
|
2825
3301
|
filter: ""
|
|
2826
|
-
}), null, 16, ["modelValue", "options", "option-label", "option-value"])) : (
|
|
3302
|
+
}), null, 16, ["modelValue", "options", "option-label", "option-value"])) : (d(), g(c(le), F({
|
|
2827
3303
|
key: 4,
|
|
2828
|
-
modelValue:
|
|
2829
|
-
"onUpdate:modelValue": o[4] || (o[4] = (
|
|
3304
|
+
modelValue: t.value,
|
|
3305
|
+
"onUpdate:modelValue": o[4] || (o[4] = (p) => t.value = p)
|
|
2830
3306
|
}, l.$attrs), null, 16, ["modelValue"])),
|
|
2831
|
-
l.showClearButton &&
|
|
3307
|
+
l.showClearButton && t.value !== null && l.dataType !== "select" && l.dataType !== "multiselect" && l.dataType !== "date" ? (d(), g(s, {
|
|
2832
3308
|
key: 5,
|
|
2833
|
-
onClick:
|
|
3309
|
+
onClick: Y(i, ["prevent"]),
|
|
2834
3310
|
size: "small",
|
|
2835
3311
|
class: "bg-transparent border-0 ms-auto p-0 pe-1 position-absolute end-0 top-0 bottom-0"
|
|
2836
3312
|
}, {
|
|
2837
|
-
default:
|
|
2838
|
-
|
|
3313
|
+
default: f(() => [
|
|
3314
|
+
y(c(j), {
|
|
2839
3315
|
icon: "bi:x",
|
|
2840
3316
|
width: "1rem",
|
|
2841
3317
|
height: "1rem",
|
|
@@ -2843,7 +3319,7 @@ const at = {
|
|
|
2843
3319
|
})
|
|
2844
3320
|
]),
|
|
2845
3321
|
_: 1
|
|
2846
|
-
})) :
|
|
3322
|
+
})) : z("", !0)
|
|
2847
3323
|
]);
|
|
2848
3324
|
};
|
|
2849
3325
|
}
|
|
@@ -3900,113 +4376,113 @@ const re = {
|
|
|
3900
4376
|
"video/webm": ["webm"]
|
|
3901
4377
|
};
|
|
3902
4378
|
Object.freeze(re);
|
|
3903
|
-
var
|
|
3904
|
-
if (
|
|
3905
|
-
if (typeof
|
|
3906
|
-
return
|
|
3907
|
-
}, H,
|
|
3908
|
-
class
|
|
3909
|
-
constructor(...
|
|
3910
|
-
H.set(this, /* @__PURE__ */ new Map()),
|
|
3911
|
-
for (const
|
|
3912
|
-
this.define(
|
|
4379
|
+
var U = function(e, t, a, i) {
|
|
4380
|
+
if (a === "a" && !i) throw new TypeError("Private accessor was defined without a getter");
|
|
4381
|
+
if (typeof t == "function" ? e !== t || !i : !t.has(e)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4382
|
+
return a === "m" ? i : a === "a" ? i.call(e) : i ? i.value : t.get(e);
|
|
4383
|
+
}, H, G, E;
|
|
4384
|
+
class be {
|
|
4385
|
+
constructor(...t) {
|
|
4386
|
+
H.set(this, /* @__PURE__ */ new Map()), G.set(this, /* @__PURE__ */ new Map()), E.set(this, /* @__PURE__ */ new Map());
|
|
4387
|
+
for (const a of t)
|
|
4388
|
+
this.define(a);
|
|
3913
4389
|
}
|
|
3914
|
-
define(
|
|
3915
|
-
for (let [i, l] of Object.entries(
|
|
3916
|
-
i = i.toLowerCase(), l = l.map((
|
|
3917
|
-
const o =
|
|
3918
|
-
let
|
|
3919
|
-
for (let
|
|
3920
|
-
const
|
|
3921
|
-
if (
|
|
4390
|
+
define(t, a = !1) {
|
|
4391
|
+
for (let [i, l] of Object.entries(t)) {
|
|
4392
|
+
i = i.toLowerCase(), l = l.map((s) => s.toLowerCase()), U(this, E, "f").has(i) || U(this, E, "f").set(i, /* @__PURE__ */ new Set());
|
|
4393
|
+
const o = U(this, E, "f").get(i);
|
|
4394
|
+
let r = !0;
|
|
4395
|
+
for (let s of l) {
|
|
4396
|
+
const p = s.startsWith("*");
|
|
4397
|
+
if (s = p ? s.slice(1) : s, o == null || o.add(s), r && U(this, G, "f").set(i, s), r = !1, p)
|
|
3922
4398
|
continue;
|
|
3923
|
-
const
|
|
3924
|
-
if (
|
|
3925
|
-
throw new Error(`"${i} -> ${
|
|
3926
|
-
|
|
4399
|
+
const m = U(this, H, "f").get(s);
|
|
4400
|
+
if (m && m != i && !a)
|
|
4401
|
+
throw new Error(`"${i} -> ${s}" conflicts with "${m} -> ${s}". Pass \`force=true\` to override this definition.`);
|
|
4402
|
+
U(this, H, "f").set(s, i);
|
|
3927
4403
|
}
|
|
3928
4404
|
}
|
|
3929
4405
|
return this;
|
|
3930
4406
|
}
|
|
3931
|
-
getType(
|
|
3932
|
-
if (typeof
|
|
4407
|
+
getType(t) {
|
|
4408
|
+
if (typeof t != "string")
|
|
3933
4409
|
return null;
|
|
3934
|
-
const
|
|
3935
|
-
return !(i.length <
|
|
4410
|
+
const a = t.replace(/^.*[/\\]/, "").toLowerCase(), i = a.replace(/^.*\./, "").toLowerCase(), l = a.length < t.length;
|
|
4411
|
+
return !(i.length < a.length - 1) && l ? null : U(this, H, "f").get(i) ?? null;
|
|
3936
4412
|
}
|
|
3937
|
-
getExtension(
|
|
3938
|
-
var
|
|
3939
|
-
return typeof
|
|
4413
|
+
getExtension(t) {
|
|
4414
|
+
var a;
|
|
4415
|
+
return typeof t != "string" ? null : (t = (a = t == null ? void 0 : t.split) == null ? void 0 : a.call(t, ";")[0], (t && U(this, G, "f").get(t.trim().toLowerCase())) ?? null);
|
|
3940
4416
|
}
|
|
3941
|
-
getAllExtensions(
|
|
3942
|
-
return typeof
|
|
4417
|
+
getAllExtensions(t) {
|
|
4418
|
+
return typeof t != "string" ? null : U(this, E, "f").get(t.toLowerCase()) ?? null;
|
|
3943
4419
|
}
|
|
3944
4420
|
_freeze() {
|
|
3945
4421
|
this.define = () => {
|
|
3946
4422
|
throw new Error("define() not allowed for built-in Mime objects. See https://github.com/broofa/mime/blob/main/README.md#custom-mime-instances");
|
|
3947
4423
|
}, Object.freeze(this);
|
|
3948
|
-
for (const
|
|
3949
|
-
Object.freeze(
|
|
4424
|
+
for (const t of U(this, E, "f").values())
|
|
4425
|
+
Object.freeze(t);
|
|
3950
4426
|
return this;
|
|
3951
4427
|
}
|
|
3952
4428
|
_getTestState() {
|
|
3953
4429
|
return {
|
|
3954
|
-
types:
|
|
3955
|
-
extensions:
|
|
4430
|
+
types: U(this, H, "f"),
|
|
4431
|
+
extensions: U(this, G, "f")
|
|
3956
4432
|
};
|
|
3957
4433
|
}
|
|
3958
4434
|
}
|
|
3959
|
-
H = /* @__PURE__ */ new WeakMap(),
|
|
3960
|
-
new
|
|
3961
|
-
function xe(e,
|
|
3962
|
-
const l =
|
|
3963
|
-
return
|
|
3964
|
-
const
|
|
3965
|
-
let
|
|
3966
|
-
|
|
4435
|
+
H = /* @__PURE__ */ new WeakMap(), G = /* @__PURE__ */ new WeakMap(), E = /* @__PURE__ */ new WeakMap();
|
|
4436
|
+
new be(re, se)._freeze();
|
|
4437
|
+
function xe(e, t, a, i) {
|
|
4438
|
+
const l = t.flatMap((o) => o.file);
|
|
4439
|
+
return t = t.map((o) => ({ ...o, status: o.status == "Duplicate" ? "Not Uploaded" : o.status })), e.forEach((o) => {
|
|
4440
|
+
const r = l.findIndex((p) => p.name === o.name);
|
|
4441
|
+
let s = "Not Uploaded";
|
|
4442
|
+
r === -1 ? ((!a.includes(o.type) || !(o.size <= i)) && (s = a.includes(o.type) ? "InvalidFileSize" : "InvalidFileType"), t.unshift({
|
|
3967
4443
|
file: o,
|
|
3968
|
-
status:
|
|
4444
|
+
status: s,
|
|
3969
4445
|
blobFileName: null
|
|
3970
|
-
})) :
|
|
3971
|
-
}),
|
|
4446
|
+
})) : t[r].status = "Duplicate";
|
|
4447
|
+
}), t;
|
|
3972
4448
|
}
|
|
3973
|
-
async function
|
|
3974
|
-
if (e === "Uploaded" &&
|
|
4449
|
+
async function wa(e, t) {
|
|
4450
|
+
if (e === "Uploaded" && t !== null)
|
|
3975
4451
|
try {
|
|
3976
|
-
await new me(
|
|
3977
|
-
} catch (
|
|
3978
|
-
if (
|
|
4452
|
+
await new me(t).delete();
|
|
4453
|
+
} catch (a) {
|
|
4454
|
+
if (a !== "BlobNotFound") {
|
|
3979
4455
|
e = "DeleteFileFailed";
|
|
3980
4456
|
return;
|
|
3981
4457
|
}
|
|
3982
4458
|
}
|
|
3983
4459
|
}
|
|
3984
|
-
function
|
|
3985
|
-
const i =
|
|
4460
|
+
function de(e, t = !0, a = 1) {
|
|
4461
|
+
const i = t ? 1e3 : 1024;
|
|
3986
4462
|
if (Math.abs(e) < i)
|
|
3987
4463
|
return e + " B";
|
|
3988
|
-
const l =
|
|
4464
|
+
const l = t ? ["kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"] : ["KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"];
|
|
3989
4465
|
let o = -1;
|
|
3990
|
-
const
|
|
4466
|
+
const r = 10 ** a;
|
|
3991
4467
|
do
|
|
3992
4468
|
e /= i, ++o;
|
|
3993
|
-
while (Math.round(Math.abs(e) *
|
|
3994
|
-
return e.toFixed(
|
|
4469
|
+
while (Math.round(Math.abs(e) * r) / r >= i && o < l.length - 1);
|
|
4470
|
+
return e.toFixed(a) + " " + l[o];
|
|
3995
4471
|
}
|
|
3996
|
-
function
|
|
4472
|
+
function ka(e) {
|
|
3997
4473
|
return ["image/gif", "image/png", "image/jpeg", "image/svg"].includes(e);
|
|
3998
4474
|
}
|
|
3999
|
-
function
|
|
4475
|
+
function $a(e) {
|
|
4000
4476
|
return URL.createObjectURL(e);
|
|
4001
4477
|
}
|
|
4002
|
-
function
|
|
4003
|
-
const e = new
|
|
4478
|
+
function Ba() {
|
|
4479
|
+
const e = new be(re, se);
|
|
4004
4480
|
return e.define({ "application/vnd.ms-outlook": ["pst"] }), e;
|
|
4005
4481
|
}
|
|
4006
|
-
const
|
|
4482
|
+
const Sa = { class: "d-flex justify-content-between" }, Fa = ["accept", "disabled", "multiple"], za = {
|
|
4007
4483
|
class: "text-break accepted-file-types-container",
|
|
4008
4484
|
id: "accepted-file-types-overlay"
|
|
4009
|
-
},
|
|
4485
|
+
}, Ca = /* @__PURE__ */ S({
|
|
4010
4486
|
__name: "UploadButton",
|
|
4011
4487
|
props: /* @__PURE__ */ q({
|
|
4012
4488
|
acceptedFileTypes: {},
|
|
@@ -4018,71 +4494,71 @@ const ht = { class: "d-flex justify-content-between" }, wt = ["accept", "disable
|
|
|
4018
4494
|
}),
|
|
4019
4495
|
emits: ["update:modelValue"],
|
|
4020
4496
|
setup(e) {
|
|
4021
|
-
const
|
|
4022
|
-
|
|
4497
|
+
const t = D(e, "modelValue"), a = P(), i = (r) => a.value.toggle(r), l = C(() => e.maxFileInput <= t.value.length), o = (r) => {
|
|
4498
|
+
t.value = xe(r, t.value, e.acceptedFileTypes.map((s) => s.fileType), e.maxFileInput);
|
|
4023
4499
|
};
|
|
4024
|
-
return (
|
|
4025
|
-
const
|
|
4026
|
-
return
|
|
4027
|
-
|
|
4028
|
-
|
|
4029
|
-
|
|
4500
|
+
return (r, s) => {
|
|
4501
|
+
const p = N;
|
|
4502
|
+
return d(), v("div", Sa, [
|
|
4503
|
+
k(r.$slots, "message"),
|
|
4504
|
+
u("div", null, [
|
|
4505
|
+
u("input", {
|
|
4030
4506
|
id: "file-input",
|
|
4031
4507
|
type: "file",
|
|
4032
4508
|
class: "d-none",
|
|
4033
|
-
accept:
|
|
4509
|
+
accept: r.acceptedFileTypes.join(", "),
|
|
4034
4510
|
disabled: l.value,
|
|
4035
|
-
multiple:
|
|
4036
|
-
onInput:
|
|
4037
|
-
}, null, 40,
|
|
4038
|
-
|
|
4039
|
-
class:
|
|
4511
|
+
multiple: r.maxFileInput > 1,
|
|
4512
|
+
onInput: s[0] || (s[0] = (m) => o([...m.target.files]))
|
|
4513
|
+
}, null, 40, Fa),
|
|
4514
|
+
u("label", {
|
|
4515
|
+
class: B([{ disabled: l.value }, "btn btn-primary"]),
|
|
4040
4516
|
id: "file-input-button",
|
|
4041
4517
|
for: "file-input"
|
|
4042
4518
|
}, [
|
|
4043
|
-
|
|
4044
|
-
|
|
4519
|
+
k(r.$slots, "button-content", {}, () => [
|
|
4520
|
+
y(c(j), {
|
|
4045
4521
|
icon: "bi:upload",
|
|
4046
4522
|
class: "me-2",
|
|
4047
4523
|
height: "20px",
|
|
4048
4524
|
width: "20px"
|
|
4049
4525
|
}),
|
|
4050
|
-
|
|
4526
|
+
s[1] || (s[1] = _(" Browse your computer "))
|
|
4051
4527
|
])
|
|
4052
4528
|
], 2)
|
|
4053
4529
|
]),
|
|
4054
|
-
|
|
4530
|
+
r.showDragDropArea ? (d(), g(p, {
|
|
4055
4531
|
link: "",
|
|
4056
4532
|
class: "ms-auto",
|
|
4057
|
-
key:
|
|
4533
|
+
key: r.acceptedFileTypes.length,
|
|
4058
4534
|
id: "accepted-file-types",
|
|
4059
4535
|
onClick: i
|
|
4060
4536
|
}, {
|
|
4061
|
-
default:
|
|
4062
|
-
|
|
4537
|
+
default: f(() => s[2] || (s[2] = [
|
|
4538
|
+
_("Accepted File Types")
|
|
4063
4539
|
])),
|
|
4064
4540
|
_: 1
|
|
4065
|
-
})) :
|
|
4066
|
-
|
|
4541
|
+
})) : z("", !0),
|
|
4542
|
+
y(c(ue), {
|
|
4067
4543
|
ref_key: "acceptedFilesOverlay",
|
|
4068
|
-
ref:
|
|
4544
|
+
ref: a
|
|
4069
4545
|
}, {
|
|
4070
|
-
default:
|
|
4071
|
-
|
|
4546
|
+
default: f(() => [
|
|
4547
|
+
u("div", za, w(r.acceptedFileTypes.map((m) => m.label ?? m.fileType.split("/").pop()).join(", ")), 1)
|
|
4072
4548
|
]),
|
|
4073
4549
|
_: 1
|
|
4074
4550
|
}, 512)
|
|
4075
4551
|
]);
|
|
4076
4552
|
};
|
|
4077
4553
|
}
|
|
4078
|
-
}),
|
|
4554
|
+
}), Ta = {
|
|
4079
4555
|
key: 0,
|
|
4080
4556
|
class: "py-4 px-3",
|
|
4081
4557
|
id: "placeholder-message"
|
|
4082
|
-
},
|
|
4558
|
+
}, ja = {
|
|
4083
4559
|
key: 1,
|
|
4084
4560
|
class: "d-flex flex-column"
|
|
4085
|
-
},
|
|
4561
|
+
}, Ia = /* @__PURE__ */ S({
|
|
4086
4562
|
__name: "DragDropArea",
|
|
4087
4563
|
props: /* @__PURE__ */ q({
|
|
4088
4564
|
maxFileInput: {},
|
|
@@ -4094,30 +4570,30 @@ const ht = { class: "d-flex justify-content-between" }, wt = ["accept", "disable
|
|
|
4094
4570
|
}),
|
|
4095
4571
|
emits: ["update:modelValue"],
|
|
4096
4572
|
setup(e) {
|
|
4097
|
-
const
|
|
4098
|
-
|
|
4573
|
+
const t = D(e, "modelValue"), a = P(!1), i = C(() => e.maxFileInput <= t.value.length), l = (o) => {
|
|
4574
|
+
a.value = !1, o.dataTransfer.files.length > e.maxFileInput || i.value ? o.preventDefault() : t.value = xe([...o.dataTransfer.files], t.value, e.acceptedFileTypes.map((r) => r.fileType), e.maxFileSize);
|
|
4099
4575
|
};
|
|
4100
|
-
return (o,
|
|
4576
|
+
return (o, r) => (d(), v("div", {
|
|
4101
4577
|
id: "drag-drop-area",
|
|
4102
|
-
class:
|
|
4103
|
-
onDragleave:
|
|
4104
|
-
onDragover:
|
|
4105
|
-
onDrop:
|
|
4578
|
+
class: B(`${a.value ? "border-2 border-primary bg-body-tertiary" : ""} mt-3 file-container border-dashed border-2`),
|
|
4579
|
+
onDragleave: r[0] || (r[0] = Y((s) => a.value = !1, ["prevent"])),
|
|
4580
|
+
onDragover: r[1] || (r[1] = Y((s) => a.value = !0, ["prevent"])),
|
|
4581
|
+
onDrop: Y(l, ["prevent"])
|
|
4106
4582
|
}, [
|
|
4107
|
-
|
|
4108
|
-
|
|
4583
|
+
t.value.length === 0 ? (d(), v("div", Ta, [
|
|
4584
|
+
y(c(j), {
|
|
4109
4585
|
icon: "bi:upload",
|
|
4110
4586
|
class: "me-2",
|
|
4111
4587
|
height: "20px",
|
|
4112
4588
|
width: "20px"
|
|
4113
4589
|
}),
|
|
4114
|
-
|
|
4115
|
-
])) : (
|
|
4116
|
-
|
|
4590
|
+
r[2] || (r[2] = _(" Drag and drop files here "))
|
|
4591
|
+
])) : (d(), v("div", ja, [
|
|
4592
|
+
k(o.$slots, "default")
|
|
4117
4593
|
]))
|
|
4118
4594
|
], 34));
|
|
4119
4595
|
}
|
|
4120
|
-
}),
|
|
4596
|
+
}), Pa = { class: "d-flex align-items-center me-2" }, _a = /* @__PURE__ */ S({
|
|
4121
4597
|
__name: "UploadStatus",
|
|
4122
4598
|
props: {
|
|
4123
4599
|
fileSize: {},
|
|
@@ -4126,12 +4602,12 @@ const ht = { class: "d-flex justify-content-between" }, wt = ["accept", "disable
|
|
|
4126
4602
|
uploadStatus: {}
|
|
4127
4603
|
},
|
|
4128
4604
|
setup(e) {
|
|
4129
|
-
const
|
|
4605
|
+
const t = C(() => e.uploadStatus === "Failed" || e.uploadStatus === "InvalidFileType" || e.uploadStatus === "InvalidFileSize" ? "danger" : "warning"), a = C(() => {
|
|
4130
4606
|
switch (e.uploadStatus) {
|
|
4131
4607
|
case "InvalidFileType":
|
|
4132
4608
|
return "Upload Failed: File type is not accepted.";
|
|
4133
4609
|
case "InvalidFileSize":
|
|
4134
|
-
return `Upload Failed: File size exceeds the ${
|
|
4610
|
+
return `Upload Failed: File size exceeds the ${de(e.maxFileSize)} limit.`;
|
|
4135
4611
|
case "Aborted":
|
|
4136
4612
|
return "Upload Failed: User cancelled.";
|
|
4137
4613
|
case "DeleteFileFailed":
|
|
@@ -4142,41 +4618,41 @@ const ht = { class: "d-flex justify-content-between" }, wt = ["accept", "disable
|
|
|
4142
4618
|
return "Upload Failed: Connection error, please try again.";
|
|
4143
4619
|
}
|
|
4144
4620
|
});
|
|
4145
|
-
return (i, l) => (
|
|
4146
|
-
i.uploadStatus === "Uploading" ? (
|
|
4621
|
+
return (i, l) => (d(), v("div", Pa, [
|
|
4622
|
+
i.uploadStatus === "Uploading" ? (d(), g(Xt, {
|
|
4147
4623
|
key: 0,
|
|
4148
4624
|
pixelWidth: 200,
|
|
4149
4625
|
animate: "",
|
|
4150
4626
|
striped: ""
|
|
4151
4627
|
}, {
|
|
4152
|
-
default:
|
|
4153
|
-
|
|
4628
|
+
default: f(() => [
|
|
4629
|
+
_(w((i.bytesUploaded / i.fileSize * 100).toFixed(0)) + "%", 1)
|
|
4154
4630
|
]),
|
|
4155
4631
|
_: 1
|
|
4156
|
-
})) :
|
|
4157
|
-
i.uploadStatus !== "Uploading" && i.uploadStatus !== "Not Uploaded" && i.uploadStatus !== "Uploaded" && i.uploadStatus !== "Preparing" ? (
|
|
4632
|
+
})) : z("", !0),
|
|
4633
|
+
i.uploadStatus !== "Uploading" && i.uploadStatus !== "Not Uploaded" && i.uploadStatus !== "Uploaded" && i.uploadStatus !== "Preparing" ? (d(), g(ne, {
|
|
4158
4634
|
key: 1,
|
|
4159
4635
|
id: "upload-status-alert",
|
|
4160
|
-
severity:
|
|
4636
|
+
severity: t.value,
|
|
4161
4637
|
class: "mb-0 w-75 ms-auto"
|
|
4162
4638
|
}, {
|
|
4163
|
-
default:
|
|
4164
|
-
|
|
4639
|
+
default: f(() => [
|
|
4640
|
+
_(w(a.value), 1)
|
|
4165
4641
|
]),
|
|
4166
4642
|
_: 1
|
|
4167
|
-
}, 8, ["severity"])) :
|
|
4643
|
+
}, 8, ["severity"])) : z("", !0)
|
|
4168
4644
|
]));
|
|
4169
4645
|
}
|
|
4170
|
-
}),
|
|
4646
|
+
}), Va = ["data-cy"], Ma = { class: "ms-3 d-flex flex-column" }, Da = {
|
|
4171
4647
|
key: 1,
|
|
4172
4648
|
id: "file-name"
|
|
4173
|
-
},
|
|
4649
|
+
}, Oa = {
|
|
4174
4650
|
class: "text-black-50",
|
|
4175
4651
|
id: "file-type"
|
|
4176
|
-
},
|
|
4652
|
+
}, Na = {
|
|
4177
4653
|
class: "text-black-50",
|
|
4178
4654
|
id: "file-size"
|
|
4179
|
-
},
|
|
4655
|
+
}, Ua = { class: "ms-auto my-auto d-flex" }, Aa = /* @__PURE__ */ S({
|
|
4180
4656
|
__name: "FileInfo",
|
|
4181
4657
|
props: /* @__PURE__ */ q({
|
|
4182
4658
|
editableFileName: { type: Boolean },
|
|
@@ -4194,60 +4670,60 @@ const ht = { class: "d-flex justify-content-between" }, wt = ["accept", "disable
|
|
|
4194
4670
|
uploadStatusModifiers: {}
|
|
4195
4671
|
}),
|
|
4196
4672
|
emits: /* @__PURE__ */ q(["deleted"], ["update:file", "update:blobFileName", "update:uploadStatus"]),
|
|
4197
|
-
setup(e, { emit:
|
|
4198
|
-
const
|
|
4199
|
-
|
|
4200
|
-
},
|
|
4201
|
-
if (
|
|
4202
|
-
l.value =
|
|
4673
|
+
setup(e, { emit: t }) {
|
|
4674
|
+
const a = D(e, "file"), i = D(e, "blobFileName"), l = D(e, "uploadStatus"), o = t, r = P(a.value.name), s = P(""), p = P(0), m = P(), b = C(() => e.acceptedFileTypes.some(({ fileType: I }) => I === a.value.type)), n = C(() => a.value.size <= e.maxFileSize), $ = C(() => a.value.type ? a.value.type : Ba().getType(a.value.name)), T = () => {
|
|
4675
|
+
r.value != null && (a.value = new File([a.value], r.value, { type: a.value.type, lastModified: (/* @__PURE__ */ new Date()).valueOf() }));
|
|
4676
|
+
}, V = async () => {
|
|
4677
|
+
if (!b.value || !n.value) {
|
|
4678
|
+
l.value = b.value ? "InvalidFileSize" : "InvalidFileType";
|
|
4203
4679
|
return;
|
|
4204
4680
|
}
|
|
4205
|
-
l.value = "Preparing",
|
|
4206
|
-
const [
|
|
4207
|
-
if (!
|
|
4681
|
+
l.value = "Preparing", m.value = new AbortController();
|
|
4682
|
+
const [I, x] = await e.getFileUrlAction(a.value.name);
|
|
4683
|
+
if (!I) {
|
|
4208
4684
|
l.value = "Failed";
|
|
4209
4685
|
return;
|
|
4210
4686
|
}
|
|
4211
4687
|
try {
|
|
4212
4688
|
l.value = "Uploading";
|
|
4213
|
-
const
|
|
4214
|
-
abortSignal:
|
|
4215
|
-
onProgress: (
|
|
4689
|
+
const h = new me(I), L = {
|
|
4690
|
+
abortSignal: m.value.signal,
|
|
4691
|
+
onProgress: (J) => p.value = J.loadedBytes,
|
|
4216
4692
|
blobHTTPHeaders: {
|
|
4217
|
-
blobContentType:
|
|
4218
|
-
blobContentDisposition: `attachment; filename="${
|
|
4693
|
+
blobContentType: $.value,
|
|
4694
|
+
blobContentDisposition: `attachment; filename="${a.value.name}"`
|
|
4219
4695
|
},
|
|
4220
4696
|
tags: { temp: "true" }
|
|
4221
4697
|
};
|
|
4222
|
-
await
|
|
4223
|
-
} catch (
|
|
4224
|
-
if (
|
|
4698
|
+
await h.uploadData(a.value, L), s.value = I, l.value = "Uploaded", i.value = x;
|
|
4699
|
+
} catch (h) {
|
|
4700
|
+
if (h.name === "AbortError") {
|
|
4225
4701
|
l.value = "Aborted";
|
|
4226
4702
|
return;
|
|
4227
4703
|
}
|
|
4228
4704
|
l.value = "Failed";
|
|
4229
4705
|
}
|
|
4230
|
-
},
|
|
4231
|
-
await
|
|
4706
|
+
}, M = async () => {
|
|
4707
|
+
await wa(l.value, s.value), o("deleted", a.value);
|
|
4232
4708
|
};
|
|
4233
4709
|
return ie(() => {
|
|
4234
|
-
e.autoUploadToBlob &&
|
|
4235
|
-
}), (
|
|
4236
|
-
const
|
|
4237
|
-
return
|
|
4710
|
+
e.autoUploadToBlob && V();
|
|
4711
|
+
}), (I, x) => {
|
|
4712
|
+
const h = N;
|
|
4713
|
+
return d(), v("div", {
|
|
4238
4714
|
class: "py-4 px-3 d-flex",
|
|
4239
|
-
"data-cy": `file-info-${
|
|
4715
|
+
"data-cy": `file-info-${a.value.name}`
|
|
4240
4716
|
}, [
|
|
4241
|
-
|
|
4242
|
-
c(
|
|
4717
|
+
u("div", null, [
|
|
4718
|
+
c(ka)(a.value.type) ? (d(), g(c(Ee), {
|
|
4243
4719
|
key: 0,
|
|
4244
4720
|
id: "thumbnail-image",
|
|
4245
4721
|
"image-class": "image-file-thumbnail border",
|
|
4246
|
-
src: c(
|
|
4247
|
-
alt:
|
|
4722
|
+
src: c($a)(a.value),
|
|
4723
|
+
alt: a.value.name,
|
|
4248
4724
|
width: "75px",
|
|
4249
4725
|
preview: ""
|
|
4250
|
-
}, null, 8, ["src", "alt"])) : (
|
|
4726
|
+
}, null, 8, ["src", "alt"])) : (d(), g(c(j), {
|
|
4251
4727
|
key: 1,
|
|
4252
4728
|
id: "file-earmark",
|
|
4253
4729
|
icon: "bi:file-earmark",
|
|
@@ -4255,76 +4731,76 @@ const ht = { class: "d-flex justify-content-between" }, wt = ["accept", "disable
|
|
|
4255
4731
|
width: "75px"
|
|
4256
4732
|
}))
|
|
4257
4733
|
]),
|
|
4258
|
-
|
|
4259
|
-
|
|
4260
|
-
|
|
4734
|
+
u("div", Ma, [
|
|
4735
|
+
u("div", null, [
|
|
4736
|
+
I.editableFileName ? (d(), g(Mt, {
|
|
4261
4737
|
key: 0,
|
|
4262
4738
|
id: "edit-file-name",
|
|
4263
|
-
modelValue:
|
|
4264
|
-
"onUpdate:modelValue":
|
|
4265
|
-
rules:
|
|
4266
|
-
name:
|
|
4267
|
-
"complete-action":
|
|
4268
|
-
}, null, 8, ["modelValue", "rules", "name"])) : (
|
|
4739
|
+
modelValue: r.value,
|
|
4740
|
+
"onUpdate:modelValue": x[0] || (x[0] = (L) => r.value = L),
|
|
4741
|
+
rules: I.customFileNameRules,
|
|
4742
|
+
name: a.value.name,
|
|
4743
|
+
"complete-action": T
|
|
4744
|
+
}, null, 8, ["modelValue", "rules", "name"])) : (d(), v("span", Da, w(a.value.name), 1))
|
|
4269
4745
|
]),
|
|
4270
|
-
|
|
4271
|
-
|
|
4746
|
+
u("span", Oa, "File type: " + w(a.value.type.split("/").pop()), 1),
|
|
4747
|
+
u("span", Na, "File size: " + w(c(de)(a.value.size)), 1)
|
|
4272
4748
|
]),
|
|
4273
|
-
|
|
4274
|
-
(
|
|
4749
|
+
u("div", Ua, [
|
|
4750
|
+
(d(), g(_a, {
|
|
4275
4751
|
key: l.value,
|
|
4276
|
-
"file-size":
|
|
4752
|
+
"file-size": a.value.size,
|
|
4277
4753
|
"upload-status": l.value,
|
|
4278
|
-
"bytes-uploaded":
|
|
4279
|
-
"max-file-size":
|
|
4754
|
+
"bytes-uploaded": p.value,
|
|
4755
|
+
"max-file-size": I.maxFileSize
|
|
4280
4756
|
}, null, 8, ["file-size", "upload-status", "bytes-uploaded", "max-file-size"])),
|
|
4281
|
-
l.value === "Not Uploaded" || l.value === "Failed" || l.value === "Duplicate" || l.value === "Aborted" ? (
|
|
4757
|
+
l.value === "Not Uploaded" || l.value === "Failed" || l.value === "Duplicate" || l.value === "Aborted" ? (d(), g(h, {
|
|
4282
4758
|
key: 0,
|
|
4283
4759
|
link: "",
|
|
4284
|
-
onClick:
|
|
4760
|
+
onClick: V
|
|
4285
4761
|
}, {
|
|
4286
|
-
default:
|
|
4287
|
-
|
|
4762
|
+
default: f(() => [
|
|
4763
|
+
y(c(j), {
|
|
4288
4764
|
icon: l.value === "Not Uploaded" || l.value === "Duplicate" ? "bi:upload" : "bi:arrow-clockwise"
|
|
4289
4765
|
}, null, 8, ["icon"])
|
|
4290
4766
|
]),
|
|
4291
4767
|
_: 1
|
|
4292
|
-
})) :
|
|
4293
|
-
l.value === "Uploading" ? (
|
|
4768
|
+
})) : z("", !0),
|
|
4769
|
+
l.value === "Uploading" ? (d(), g(h, {
|
|
4294
4770
|
key: 1,
|
|
4295
4771
|
link: "",
|
|
4296
|
-
onClick:
|
|
4772
|
+
onClick: x[1] || (x[1] = (L) => m.value.value.abort())
|
|
4297
4773
|
}, {
|
|
4298
|
-
default:
|
|
4299
|
-
|
|
4774
|
+
default: f(() => [
|
|
4775
|
+
y(c(j), { icon: "bi:x-circle-fill" })
|
|
4300
4776
|
]),
|
|
4301
4777
|
_: 1
|
|
4302
|
-
})) : (
|
|
4778
|
+
})) : (d(), g(h, {
|
|
4303
4779
|
key: 2,
|
|
4304
4780
|
link: "",
|
|
4305
|
-
onClick:
|
|
4781
|
+
onClick: M,
|
|
4306
4782
|
id: "delete-button"
|
|
4307
4783
|
}, {
|
|
4308
|
-
default:
|
|
4309
|
-
|
|
4784
|
+
default: f(() => [
|
|
4785
|
+
y(c(j), { icon: "bi:trash" })
|
|
4310
4786
|
]),
|
|
4311
4787
|
_: 1
|
|
4312
4788
|
}))
|
|
4313
4789
|
])
|
|
4314
|
-
], 8,
|
|
4790
|
+
], 8, Va);
|
|
4315
4791
|
};
|
|
4316
4792
|
}
|
|
4317
|
-
}),
|
|
4793
|
+
}), qa = { class: "d-flex justify-content-end mt-1" }, La = { id: "max-file-size" }, Ea = /* @__PURE__ */ S({
|
|
4318
4794
|
__name: "MaxFileSize",
|
|
4319
4795
|
props: {
|
|
4320
4796
|
maxFileSize: {}
|
|
4321
4797
|
},
|
|
4322
4798
|
setup(e) {
|
|
4323
|
-
return (
|
|
4324
|
-
|
|
4799
|
+
return (t, a) => (d(), v("div", qa, [
|
|
4800
|
+
u("div", La, "Max file size: " + w(c(de)(t.maxFileSize)), 1)
|
|
4325
4801
|
]));
|
|
4326
4802
|
}
|
|
4327
|
-
}),
|
|
4803
|
+
}), Ra = { "data-cy": "file-uploader" }, Ha = { key: 0 }, Hi = /* @__PURE__ */ S({
|
|
4328
4804
|
__name: "ForgeFileUploader",
|
|
4329
4805
|
props: /* @__PURE__ */ q({
|
|
4330
4806
|
acceptedFileTypes: {},
|
|
@@ -4341,46 +4817,46 @@ const ht = { class: "d-flex justify-content-between" }, wt = ["accept", "disable
|
|
|
4341
4817
|
}),
|
|
4342
4818
|
emits: ["update:modelValue"],
|
|
4343
4819
|
setup(e) {
|
|
4344
|
-
const
|
|
4345
|
-
|
|
4820
|
+
const t = D(e, "modelValue"), a = e, i = (l) => {
|
|
4821
|
+
t.value = t.value.filter((o) => o.file != l);
|
|
4346
4822
|
};
|
|
4347
|
-
return (l, o) => (
|
|
4348
|
-
|
|
4349
|
-
modelValue:
|
|
4350
|
-
"onUpdate:modelValue": o[0] || (o[0] = (
|
|
4823
|
+
return (l, o) => (d(), v("div", Ra, [
|
|
4824
|
+
y(Ca, F(a, {
|
|
4825
|
+
modelValue: t.value,
|
|
4826
|
+
"onUpdate:modelValue": o[0] || (o[0] = (r) => t.value = r)
|
|
4351
4827
|
}), null, 16, ["modelValue"]),
|
|
4352
|
-
l.showDragDropArea ? (
|
|
4353
|
-
|
|
4354
|
-
"max-file-input":
|
|
4355
|
-
"max-file-size":
|
|
4356
|
-
"accepted-file-types":
|
|
4357
|
-
modelValue:
|
|
4358
|
-
"onUpdate:modelValue": o[1] || (o[1] = (
|
|
4828
|
+
l.showDragDropArea ? (d(), v("div", Ha, [
|
|
4829
|
+
y(Ia, {
|
|
4830
|
+
"max-file-input": a.maxFileInput,
|
|
4831
|
+
"max-file-size": a.maxFileSize,
|
|
4832
|
+
"accepted-file-types": a.acceptedFileTypes,
|
|
4833
|
+
modelValue: t.value,
|
|
4834
|
+
"onUpdate:modelValue": o[1] || (o[1] = (r) => t.value = r)
|
|
4359
4835
|
}, {
|
|
4360
|
-
default:
|
|
4361
|
-
(
|
|
4362
|
-
(
|
|
4363
|
-
key:
|
|
4364
|
-
class:
|
|
4365
|
-
file:
|
|
4366
|
-
"onUpdate:file": (
|
|
4367
|
-
"blob-file-name":
|
|
4368
|
-
"onUpdate:blobFileName": (
|
|
4369
|
-
"upload-status":
|
|
4370
|
-
"onUpdate:uploadStatus": (
|
|
4836
|
+
default: f(() => [
|
|
4837
|
+
(d(!0), v(O, null, A(t.value, ({ file: r }, s) => (d(), v("span", null, [
|
|
4838
|
+
(d(), g(Aa, F({
|
|
4839
|
+
key: r.name,
|
|
4840
|
+
class: s === t.value.length - 1 || t.value.length == 1 ? "" : "border-bottom",
|
|
4841
|
+
file: t.value[s].file,
|
|
4842
|
+
"onUpdate:file": (p) => t.value[s].file = p,
|
|
4843
|
+
"blob-file-name": t.value[s].blobFileName,
|
|
4844
|
+
"onUpdate:blobFileName": (p) => t.value[s].blobFileName = p,
|
|
4845
|
+
"upload-status": t.value[s].status,
|
|
4846
|
+
"onUpdate:uploadStatus": (p) => t.value[s].status = p,
|
|
4371
4847
|
ref_for: !0
|
|
4372
|
-
},
|
|
4848
|
+
}, a, { onDeleted: i }), null, 16, ["class", "file", "onUpdate:file", "blob-file-name", "onUpdate:blobFileName", "upload-status", "onUpdate:uploadStatus"]))
|
|
4373
4849
|
]))), 256))
|
|
4374
4850
|
]),
|
|
4375
4851
|
_: 1
|
|
4376
4852
|
}, 8, ["max-file-input", "max-file-size", "accepted-file-types", "modelValue"]),
|
|
4377
|
-
|
|
4378
|
-
"max-file-size":
|
|
4853
|
+
y(Ea, {
|
|
4854
|
+
"max-file-size": a.maxFileSize
|
|
4379
4855
|
}, null, 8, ["max-file-size"])
|
|
4380
|
-
])) :
|
|
4856
|
+
])) : z("", !0)
|
|
4381
4857
|
]));
|
|
4382
4858
|
}
|
|
4383
|
-
}),
|
|
4859
|
+
}), Wa = { class: "d-flex" }, Ya = { class: "me-3" }, Ga = { class: "ms-2" }, Ja = { class: "d-flex flex-column w-100" }, Wi = /* @__PURE__ */ S({
|
|
4384
4860
|
__name: "ForgeColumnCustomiser",
|
|
4385
4861
|
props: {
|
|
4386
4862
|
modelValue: { required: !0 },
|
|
@@ -4388,22 +4864,22 @@ const ht = { class: "d-flex justify-content-between" }, wt = ["accept", "disable
|
|
|
4388
4864
|
},
|
|
4389
4865
|
emits: ["update:modelValue"],
|
|
4390
4866
|
setup(e) {
|
|
4391
|
-
const
|
|
4392
|
-
|
|
4867
|
+
const t = D(e, "modelValue"), a = P(), i = P(!1), l = (o) => {
|
|
4868
|
+
a.value.toggle(o);
|
|
4393
4869
|
};
|
|
4394
|
-
return (o,
|
|
4395
|
-
|
|
4870
|
+
return (o, r) => (d(), v(O, null, [
|
|
4871
|
+
y(c(N), {
|
|
4396
4872
|
onClick: l,
|
|
4397
4873
|
class: "ms-2"
|
|
4398
4874
|
}, {
|
|
4399
|
-
default:
|
|
4400
|
-
|
|
4401
|
-
|
|
4402
|
-
|
|
4875
|
+
default: f(() => [
|
|
4876
|
+
u("div", Wa, [
|
|
4877
|
+
u("div", Ya, [
|
|
4878
|
+
y(c(j), { icon: "bi:layout-three-columns" })
|
|
4403
4879
|
]),
|
|
4404
|
-
|
|
4405
|
-
|
|
4406
|
-
|
|
4880
|
+
_(" Columns (" + w(t.value.filter((s) => s.selected).length ?? 0) + "/" + w(t.value.length ?? 0) + ") ", 1),
|
|
4881
|
+
u("div", Ga, [
|
|
4882
|
+
y(c(j), {
|
|
4407
4883
|
icon: i.value ? "bi:chevron-up" : "bi:chevron-down"
|
|
4408
4884
|
}, null, 8, ["icon"])
|
|
4409
4885
|
])
|
|
@@ -4411,30 +4887,30 @@ const ht = { class: "d-flex justify-content-between" }, wt = ["accept", "disable
|
|
|
4411
4887
|
]),
|
|
4412
4888
|
_: 1
|
|
4413
4889
|
}),
|
|
4414
|
-
|
|
4890
|
+
y(c(ue), {
|
|
4415
4891
|
ref_key: "columnCustomiserPanel",
|
|
4416
|
-
ref:
|
|
4892
|
+
ref: a,
|
|
4417
4893
|
class: "column-customiser",
|
|
4418
|
-
onHide:
|
|
4419
|
-
onShow:
|
|
4894
|
+
onHide: r[0] || (r[0] = () => i.value = !1),
|
|
4895
|
+
onShow: r[1] || (r[1] = () => i.value = !0)
|
|
4420
4896
|
}, {
|
|
4421
|
-
default:
|
|
4422
|
-
|
|
4423
|
-
(
|
|
4424
|
-
class:
|
|
4425
|
-
"border-top":
|
|
4426
|
-
"py-1":
|
|
4427
|
-
"pt-1":
|
|
4428
|
-
"pb-1":
|
|
4897
|
+
default: f(() => [
|
|
4898
|
+
u("div", Ja, [
|
|
4899
|
+
(d(!0), v(O, null, A(t.value, (s, p) => (d(), v("div", {
|
|
4900
|
+
class: B(["d-flex cursor-pointer", {
|
|
4901
|
+
"border-top": p !== 0,
|
|
4902
|
+
"py-1": p !== 0 && t.value.length - 1 !== p,
|
|
4903
|
+
"pt-1": t.value.length - 1 === p,
|
|
4904
|
+
"pb-1": p === 0
|
|
4429
4905
|
}])
|
|
4430
4906
|
}, [
|
|
4431
|
-
|
|
4432
|
-
id:
|
|
4433
|
-
modelValue:
|
|
4434
|
-
"onUpdate:modelValue": (
|
|
4907
|
+
y(ve, {
|
|
4908
|
+
id: s.field,
|
|
4909
|
+
modelValue: s.selected,
|
|
4910
|
+
"onUpdate:modelValue": (m) => s.selected = m,
|
|
4435
4911
|
binary: "",
|
|
4436
4912
|
class: "cursor-pointer",
|
|
4437
|
-
label:
|
|
4913
|
+
label: s.header
|
|
4438
4914
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "label"])
|
|
4439
4915
|
], 2))), 256))
|
|
4440
4916
|
])
|
|
@@ -4445,32 +4921,33 @@ const ht = { class: "d-flex justify-content-between" }, wt = ["accept", "disable
|
|
|
4445
4921
|
}
|
|
4446
4922
|
});
|
|
4447
4923
|
export {
|
|
4448
|
-
|
|
4449
|
-
|
|
4924
|
+
Fi as Bootstrap_PT,
|
|
4925
|
+
zi as ForgeActionButton,
|
|
4450
4926
|
ne as ForgeAlert,
|
|
4451
|
-
|
|
4927
|
+
Ci as ForgeAutoComplete,
|
|
4452
4928
|
ve as ForgeCheckbox,
|
|
4453
|
-
|
|
4454
|
-
|
|
4455
|
-
|
|
4456
|
-
|
|
4457
|
-
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
|
|
4929
|
+
Ni as ForgeChip,
|
|
4930
|
+
Wi as ForgeColumnCustomiser,
|
|
4931
|
+
ge as ForgeDatepicker,
|
|
4932
|
+
Hi as ForgeFileUploader,
|
|
4933
|
+
Ri as ForgeFilterHeader,
|
|
4934
|
+
Di as ForgeForm,
|
|
4935
|
+
Oi as ForgeFormField,
|
|
4936
|
+
Mt as ForgeInlineEditor,
|
|
4937
|
+
Ti as ForgeLink,
|
|
4462
4938
|
fe as ForgeLoader,
|
|
4463
|
-
|
|
4464
|
-
|
|
4465
|
-
|
|
4466
|
-
|
|
4467
|
-
|
|
4468
|
-
|
|
4469
|
-
|
|
4470
|
-
|
|
4471
|
-
|
|
4472
|
-
|
|
4473
|
-
|
|
4474
|
-
|
|
4475
|
-
|
|
4939
|
+
Pi as ForgeModal,
|
|
4940
|
+
qt as ForgeMultiSelectPreview,
|
|
4941
|
+
_i as ForgeNavbar,
|
|
4942
|
+
Vi as ForgePageHeader,
|
|
4943
|
+
Xt as ForgeProgressBar,
|
|
4944
|
+
Mi as ForgeRemainingCharacters,
|
|
4945
|
+
Ui as ForgeScratchpad,
|
|
4946
|
+
Ai as ForgeStatWidget,
|
|
4947
|
+
qi as ForgeStepper,
|
|
4948
|
+
Ei as ForgeTable,
|
|
4949
|
+
Li as ForgeTile,
|
|
4950
|
+
Ii as convertToMultiSelectOption,
|
|
4951
|
+
ji as enumToMultiSelectList,
|
|
4952
|
+
Ft as parseError
|
|
4476
4953
|
};
|