@3squared/forge-ui-3 2.0.0 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/forge-ui-3.js +1503 -997
- package/dist/index.d.ts +2 -1
- package/dist/src/components/ForgeScratchpad.vue.d.ts +52 -0
- package/dist/src/passthroughs/SplitButton.pt.d.ts +50 -0
- package/dist/src/types/forge-types.d.ts +1 -0
- package/dist/tests/component/scratchpad/scratchpad.cy.d.ts +1 -0
- package/dist/tests/component/split-button/split-button.cy.d.ts +1 -0
- package/package.json +12 -11
- package/src/types/forge-types.ts +1 -1
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
|
|
8
|
-
import { useField as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
7
|
+
import ze from "primevue/checkbox";
|
|
8
|
+
import { useField as ee } from "vee-validate";
|
|
9
|
+
import Ce from "primevue/progressspinner";
|
|
10
|
+
import Te from "primevue/dialog";
|
|
11
11
|
import le from "primevue/inputtext";
|
|
12
12
|
import { vOnClickOutside as je } from "@vueuse/components";
|
|
13
|
-
import
|
|
13
|
+
import Ie from "primevue/menubar";
|
|
14
14
|
import oe from "primevue/multiselect";
|
|
15
|
-
import
|
|
15
|
+
import Pe from "primevue/datepicker";
|
|
16
16
|
import te from "primevue/select";
|
|
17
17
|
import _e from "primevue/inputmask";
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import { BlockBlobClient as
|
|
29
|
-
import
|
|
30
|
-
import
|
|
31
|
-
const
|
|
18
|
+
import Ve from "primevue/textarea";
|
|
19
|
+
import ce from "primevue/inputnumber";
|
|
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
|
+
import qe from "primevue/steppanels";
|
|
27
|
+
import Le from "primevue/datatable";
|
|
28
|
+
import { BlockBlobClient as me } from "@azure/storage-blob";
|
|
29
|
+
import ue from "primevue/popover";
|
|
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 Le = {
|
|
|
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 Le = {
|
|
|
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 Le = {
|
|
|
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 Le = {
|
|
|
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 Le = {
|
|
|
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 Le = {
|
|
|
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 Le = {
|
|
|
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,12 +348,12 @@ const Le = {
|
|
|
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: [
|
|
@@ -373,7 +373,7 @@ const Le = {
|
|
|
373
373
|
]
|
|
374
374
|
})
|
|
375
375
|
}
|
|
376
|
-
},
|
|
376
|
+
}, Qe = {
|
|
377
377
|
textarea: {
|
|
378
378
|
root: () => ({
|
|
379
379
|
class: [
|
|
@@ -381,13 +381,13 @@ const Le = {
|
|
|
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 Le = {
|
|
|
434
434
|
]
|
|
435
435
|
})
|
|
436
436
|
}
|
|
437
|
-
},
|
|
437
|
+
}, at = {
|
|
438
438
|
popover: {
|
|
439
439
|
root: (e) => ({
|
|
440
440
|
class: [
|
|
@@ -448,7 +448,7 @@ const Le = {
|
|
|
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 Le = {
|
|
|
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 Le = {
|
|
|
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 Le = {
|
|
|
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 Le = {
|
|
|
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 Le = {
|
|
|
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 Le = {
|
|
|
643
643
|
class: ["text-white m-1"]
|
|
644
644
|
})
|
|
645
645
|
}
|
|
646
|
-
},
|
|
646
|
+
}, dt = {
|
|
647
647
|
panel: {
|
|
648
648
|
root: "card w-100",
|
|
649
649
|
header: "d-flex justify-content-between align-items-center fw-600 mx-2",
|
|
650
650
|
pcToggleButton: "btn",
|
|
651
651
|
contentContainer: "m-2"
|
|
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 Le = {
|
|
|
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 Le = {
|
|
|
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 Le = {
|
|
|
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 Le = {
|
|
|
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 Le = {
|
|
|
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 Le = {
|
|
|
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 Le = {
|
|
|
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,43 @@ const Le = {
|
|
|
854
854
|
]
|
|
855
855
|
})
|
|
856
856
|
}
|
|
857
|
-
},
|
|
857
|
+
}, ft = {
|
|
858
|
+
splitbutton: {
|
|
859
|
+
root: () => ({
|
|
860
|
+
class: ["btn-group"]
|
|
861
|
+
}),
|
|
862
|
+
pcDropdown: {
|
|
863
|
+
root: ({ props: e }) => ({
|
|
864
|
+
class: [
|
|
865
|
+
"btn dropdown-toggle-split",
|
|
866
|
+
{
|
|
867
|
+
"btn-primary": (e.severity === void 0 || e.severity === "primary" || e.severity === null) && !e.outlined,
|
|
868
|
+
"btn-brand": e.severity === "brand" && !e.outlined,
|
|
869
|
+
"btn-secondary": e.severity === "secondary" && !e.outlined,
|
|
870
|
+
"btn-success": e.severity === "success" && !e.outlined,
|
|
871
|
+
"btn-warning": (e.severity === "warning" || e.severity === "warn") && !e.outlined,
|
|
872
|
+
"btn-danger": e.severity === "danger" && !e.outlined,
|
|
873
|
+
"btn-info": e.severity === "info" && !e.outlined
|
|
874
|
+
},
|
|
875
|
+
{
|
|
876
|
+
"btn-outline-primary ": (e.severity === void 0 || e.severity === "primary" || e.severity === null) && e.outlined,
|
|
877
|
+
"btn-outline-brand": e.severity === "brand" && e.outlined,
|
|
878
|
+
"btn-outline-secondary": e.severity === "secondary" && e.outlined,
|
|
879
|
+
"btn-outline-success": e.severity === "success" && e.outlined,
|
|
880
|
+
"btn-outline-warning": (e.severity === "warning" || e.severity === "warn") && e.outlined,
|
|
881
|
+
"btn-outline-danger": e.severity === "danger" && e.outlined,
|
|
882
|
+
"btn-outline-info": e.severity === "info" && e.outlined
|
|
883
|
+
}
|
|
884
|
+
]
|
|
885
|
+
})
|
|
886
|
+
},
|
|
887
|
+
pcMenu: {
|
|
888
|
+
rootList: "dropdown-menu show w-100",
|
|
889
|
+
item: "dropdown-item",
|
|
890
|
+
separator: "border-bottom w-100"
|
|
891
|
+
}
|
|
892
|
+
}
|
|
893
|
+
}, gt = {
|
|
858
894
|
progressspinner: {
|
|
859
895
|
spin: () => ({
|
|
860
896
|
class: [
|
|
@@ -862,7 +898,7 @@ const Le = {
|
|
|
862
898
|
]
|
|
863
899
|
})
|
|
864
900
|
}
|
|
865
|
-
},
|
|
901
|
+
}, bt = {
|
|
866
902
|
card: {
|
|
867
903
|
root: () => ({
|
|
868
904
|
class: ["card"]
|
|
@@ -886,11 +922,11 @@ const Le = {
|
|
|
886
922
|
class: ["card-header"]
|
|
887
923
|
})
|
|
888
924
|
}
|
|
889
|
-
},
|
|
925
|
+
}, xt = {
|
|
890
926
|
divider: {
|
|
891
927
|
root: "border-bottom w-100 m-1"
|
|
892
928
|
}
|
|
893
|
-
},
|
|
929
|
+
}, yt = {
|
|
894
930
|
image: {
|
|
895
931
|
root: "position-relative d-inline-block",
|
|
896
932
|
previewMask: "preview-button",
|
|
@@ -903,7 +939,7 @@ const Le = {
|
|
|
903
939
|
zoominbutton: "btn text-white",
|
|
904
940
|
closebutton: "btn text-white"
|
|
905
941
|
}
|
|
906
|
-
},
|
|
942
|
+
}, ht = {
|
|
907
943
|
toast: {
|
|
908
944
|
message: () => ({
|
|
909
945
|
class: ["toast-container w-100 position-relative"]
|
|
@@ -924,13 +960,13 @@ const Le = {
|
|
|
924
960
|
class: ["ps-1"]
|
|
925
961
|
}),
|
|
926
962
|
messageIcon: ({ props: e }) => {
|
|
927
|
-
var
|
|
963
|
+
var t, a, i, l;
|
|
928
964
|
return {
|
|
929
965
|
class: [
|
|
930
966
|
"toast-icon",
|
|
931
967
|
{
|
|
932
|
-
"text-primary": ((
|
|
933
|
-
"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",
|
|
934
970
|
"text-danger": ((i = e.message) == null ? void 0 : i.severity) === "error",
|
|
935
971
|
"text-warning": ((l = e.message) == null ? void 0 : l.severity) === "warn"
|
|
936
972
|
}
|
|
@@ -938,7 +974,7 @@ const Le = {
|
|
|
938
974
|
};
|
|
939
975
|
}
|
|
940
976
|
}
|
|
941
|
-
},
|
|
977
|
+
}, wt = {
|
|
942
978
|
fieldset: {
|
|
943
979
|
root: () => ({
|
|
944
980
|
class: [
|
|
@@ -964,41 +1000,42 @@ const Le = {
|
|
|
964
1000
|
]
|
|
965
1001
|
})
|
|
966
1002
|
}
|
|
967
|
-
},
|
|
968
|
-
...Le,
|
|
969
|
-
...ra,
|
|
970
|
-
...Ee,
|
|
971
|
-
...ua,
|
|
972
|
-
...Ne,
|
|
973
|
-
...Je,
|
|
974
|
-
...He,
|
|
975
|
-
...ia,
|
|
976
|
-
...Xe,
|
|
977
|
-
...va,
|
|
1003
|
+
}, Fi = {
|
|
978
1004
|
...Re,
|
|
979
|
-
...
|
|
1005
|
+
...ct,
|
|
1006
|
+
...He,
|
|
1007
|
+
...bt,
|
|
980
1008
|
...We,
|
|
1009
|
+
...et,
|
|
981
1010
|
...Ge,
|
|
1011
|
+
...nt,
|
|
1012
|
+
...tt,
|
|
1013
|
+
...xt,
|
|
982
1014
|
...Ye,
|
|
983
|
-
...
|
|
984
|
-
...
|
|
985
|
-
...pa,
|
|
986
|
-
...Qe,
|
|
987
|
-
...oa,
|
|
988
|
-
...ma,
|
|
989
|
-
...na,
|
|
990
|
-
...ca,
|
|
991
|
-
...aa,
|
|
992
|
-
...sa,
|
|
1015
|
+
...yt,
|
|
1016
|
+
...Je,
|
|
993
1017
|
...Ke,
|
|
994
|
-
...ta,
|
|
995
|
-
...ba,
|
|
996
1018
|
...Ze,
|
|
997
|
-
...
|
|
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,
|
|
998
1035
|
directives: {
|
|
999
|
-
...
|
|
1036
|
+
...ut
|
|
1000
1037
|
}
|
|
1001
|
-
}, ne = /* @__PURE__ */
|
|
1038
|
+
}, ne = /* @__PURE__ */ S({
|
|
1002
1039
|
__name: "ForgeAlert",
|
|
1003
1040
|
props: {
|
|
1004
1041
|
severity: { default: "primary" },
|
|
@@ -1016,34 +1053,34 @@ const Le = {
|
|
|
1016
1053
|
variant: {}
|
|
1017
1054
|
},
|
|
1018
1055
|
setup(e) {
|
|
1019
|
-
const
|
|
1020
|
-
return (
|
|
1056
|
+
const t = e;
|
|
1057
|
+
return (a, i) => {
|
|
1021
1058
|
const l = he;
|
|
1022
|
-
return
|
|
1023
|
-
icon:
|
|
1024
|
-
|
|
1025
|
-
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" : "")
|
|
1026
1063
|
}, [
|
|
1027
|
-
|
|
1064
|
+
t.icon ? (d(), g(c(j), {
|
|
1028
1065
|
key: 0,
|
|
1029
1066
|
"data-cy": "message-icon",
|
|
1030
|
-
icon:
|
|
1031
|
-
class:
|
|
1067
|
+
icon: t.icon,
|
|
1068
|
+
class: B(`text-${t.severity}`),
|
|
1032
1069
|
height: 35
|
|
1033
|
-
}, null, 8, ["icon", "class"])) :
|
|
1070
|
+
}, null, 8, ["icon", "class"])) : z("", !0)
|
|
1034
1071
|
], 2)
|
|
1035
1072
|
]),
|
|
1036
|
-
closeicon:
|
|
1037
|
-
|
|
1073
|
+
closeicon: f(() => [
|
|
1074
|
+
y(c(j), { icon: "bi:x" })
|
|
1038
1075
|
]),
|
|
1039
|
-
default:
|
|
1040
|
-
k(
|
|
1076
|
+
default: f(() => [
|
|
1077
|
+
k(a.$slots, "default")
|
|
1041
1078
|
]),
|
|
1042
1079
|
_: 3
|
|
1043
1080
|
}, 16);
|
|
1044
1081
|
};
|
|
1045
1082
|
}
|
|
1046
|
-
}),
|
|
1083
|
+
}), zi = /* @__PURE__ */ S({
|
|
1047
1084
|
__name: "ForgeActionButton",
|
|
1048
1085
|
props: {
|
|
1049
1086
|
action: {},
|
|
@@ -1052,38 +1089,38 @@ const Le = {
|
|
|
1052
1089
|
params: { default: Array }
|
|
1053
1090
|
},
|
|
1054
1091
|
setup(e) {
|
|
1055
|
-
const
|
|
1056
|
-
|
|
1092
|
+
const t = P(!1), a = e, i = async () => {
|
|
1093
|
+
t.value = !0;
|
|
1057
1094
|
try {
|
|
1058
|
-
await
|
|
1095
|
+
await a.action.apply(this, a.params);
|
|
1059
1096
|
} catch (l) {
|
|
1060
|
-
await
|
|
1097
|
+
await a.errorAction.apply(this, a.errorParams ? [...a.errorParams, l] : [l]);
|
|
1061
1098
|
}
|
|
1062
|
-
|
|
1099
|
+
t.value = !1;
|
|
1063
1100
|
};
|
|
1064
1101
|
return (l, o) => {
|
|
1065
|
-
const r =
|
|
1066
|
-
return
|
|
1067
|
-
|
|
1068
|
-
loading:
|
|
1069
|
-
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,
|
|
1070
1107
|
onClick: i
|
|
1071
1108
|
}), null, 16, ["loading", "disabled"]),
|
|
1072
|
-
|
|
1109
|
+
y(c(Se))
|
|
1073
1110
|
], 64);
|
|
1074
1111
|
};
|
|
1075
1112
|
}
|
|
1076
|
-
}),
|
|
1113
|
+
}), Ci = /* @__PURE__ */ S({
|
|
1077
1114
|
__name: "ForgeAutoComplete",
|
|
1078
1115
|
setup(e) {
|
|
1079
|
-
return (
|
|
1080
|
-
default:
|
|
1081
|
-
(
|
|
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))
|
|
1082
1119
|
]),
|
|
1083
1120
|
_: 3
|
|
1084
1121
|
}, 16));
|
|
1085
1122
|
}
|
|
1086
|
-
}),
|
|
1123
|
+
}), kt = { class: "d-flex flex-column" }, $t = ["for"], ve = /* @__PURE__ */ S({
|
|
1087
1124
|
__name: "ForgeCheckbox",
|
|
1088
1125
|
props: /* @__PURE__ */ q({
|
|
1089
1126
|
label: { default: "" },
|
|
@@ -1118,69 +1155,69 @@ const Le = {
|
|
|
1118
1155
|
}),
|
|
1119
1156
|
emits: ["update:modelValue"],
|
|
1120
1157
|
setup(e) {
|
|
1121
|
-
const
|
|
1122
|
-
() =>
|
|
1158
|
+
const t = e, a = D(e, "modelValue"), { handleChange: i, errors: l, errorMessage: o } = ee(
|
|
1159
|
+
() => t.name ?? "",
|
|
1123
1160
|
void 0,
|
|
1124
1161
|
{
|
|
1125
1162
|
type: "checkbox",
|
|
1126
|
-
checkedValue:
|
|
1163
|
+
checkedValue: a.value
|
|
1127
1164
|
}
|
|
1128
|
-
), r = (
|
|
1129
|
-
|
|
1130
|
-
},
|
|
1131
|
-
return (
|
|
1132
|
-
const
|
|
1133
|
-
return
|
|
1134
|
-
|
|
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({
|
|
1135
1172
|
class: "d-flex",
|
|
1136
1173
|
"data-cy": "checkbox-container",
|
|
1137
|
-
onClick:
|
|
1138
|
-
}, { ...
|
|
1139
|
-
|
|
1174
|
+
onClick: m[2] || (m[2] = (n) => r(a.value))
|
|
1175
|
+
}, { ...p.$attrs }), [
|
|
1176
|
+
y(b, F({ ...t }, {
|
|
1140
1177
|
binary: "",
|
|
1141
|
-
modelValue:
|
|
1142
|
-
"onUpdate:modelValue":
|
|
1143
|
-
"input-id":
|
|
1144
|
-
"input-class": { "is-invalid":
|
|
1145
|
-
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"
|
|
1146
1183
|
}), null, 16, ["modelValue", "input-id", "input-class", "class"]),
|
|
1147
|
-
|
|
1148
|
-
for:
|
|
1149
|
-
onClick:
|
|
1150
|
-
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"])
|
|
1151
1188
|
}, [
|
|
1152
|
-
k(
|
|
1153
|
-
|
|
1189
|
+
k(p.$slots, "default", {}, () => [
|
|
1190
|
+
_(w(t.label), 1)
|
|
1154
1191
|
])
|
|
1155
|
-
], 10,
|
|
1192
|
+
], 10, $t)
|
|
1156
1193
|
], 16),
|
|
1157
|
-
R(
|
|
1194
|
+
R(u("small", {
|
|
1158
1195
|
"data-cy": "error",
|
|
1159
1196
|
class: "text-invalid"
|
|
1160
1197
|
}, w(c(o)), 513), [
|
|
1161
|
-
[W,
|
|
1198
|
+
[W, s.value]
|
|
1162
1199
|
])
|
|
1163
1200
|
]);
|
|
1164
1201
|
};
|
|
1165
1202
|
}
|
|
1166
|
-
}),
|
|
1203
|
+
}), Bt = { class: "forge-loader" }, fe = /* @__PURE__ */ S({
|
|
1167
1204
|
__name: "ForgeLoader",
|
|
1168
1205
|
props: {
|
|
1169
1206
|
severity: { default: "primary" }
|
|
1170
1207
|
},
|
|
1171
1208
|
setup(e) {
|
|
1172
|
-
const
|
|
1173
|
-
return (
|
|
1174
|
-
const l =
|
|
1175
|
-
return
|
|
1176
|
-
|
|
1209
|
+
const t = e;
|
|
1210
|
+
return (a, i) => {
|
|
1211
|
+
const l = Ce;
|
|
1212
|
+
return d(), v("div", Bt, [
|
|
1213
|
+
y(l, {
|
|
1177
1214
|
"animation-duration": ".75",
|
|
1178
|
-
class:
|
|
1215
|
+
class: B(`text-${t.severity === void 0 ? "primary" : t.severity}`)
|
|
1179
1216
|
}, null, 8, ["class"])
|
|
1180
1217
|
]);
|
|
1181
1218
|
};
|
|
1182
1219
|
}
|
|
1183
|
-
}),
|
|
1220
|
+
}), St = ["href", "target"], Ti = /* @__PURE__ */ S({
|
|
1184
1221
|
__name: "ForgeLink",
|
|
1185
1222
|
props: {
|
|
1186
1223
|
url: {},
|
|
@@ -1198,7 +1235,7 @@ const Le = {
|
|
|
1198
1235
|
iconName: {}
|
|
1199
1236
|
},
|
|
1200
1237
|
setup(e) {
|
|
1201
|
-
const
|
|
1238
|
+
const t = C(() => ({
|
|
1202
1239
|
[`link-${e.severity}`]: e.severity,
|
|
1203
1240
|
[`link-underline-${e.underlineSeverity}`]: e.underlineSeverity,
|
|
1204
1241
|
[`link-opacity-${e.opacity}`]: e.opacity,
|
|
@@ -1207,52 +1244,52 @@ const Le = {
|
|
|
1207
1244
|
[`link-underline-opacity-${e.underlineHoverOpacity ?? e.hoverOpacity}-hover`]: e.underlineHoverOpacity || e.hoverOpacity,
|
|
1208
1245
|
[`link-offset-${e.underlineOffset}`]: e.underlineOffset,
|
|
1209
1246
|
"icon-link icon-link-hover": e.animateIconOnHover
|
|
1210
|
-
})),
|
|
1247
|
+
})), a = C(() => ({
|
|
1211
1248
|
"order-2": e.positionIconEnd,
|
|
1212
1249
|
"me-1": !e.positionIconEnd && !e.animateIconOnHover,
|
|
1213
1250
|
"ms-1": e.positionIconEnd && !e.animateIconOnHover,
|
|
1214
1251
|
"ms-0": e.positionIconEnd && e.animateIconOnHover,
|
|
1215
1252
|
"me-0": e.animateIconOnHover
|
|
1216
1253
|
}));
|
|
1217
|
-
return (i, l) => (
|
|
1254
|
+
return (i, l) => (d(), v("a", {
|
|
1218
1255
|
id: "link",
|
|
1219
|
-
class:
|
|
1256
|
+
class: B(["cursor-pointer d-flex text-break", t.value]),
|
|
1220
1257
|
href: i.url,
|
|
1221
1258
|
target: i.target
|
|
1222
1259
|
}, [
|
|
1223
1260
|
k(i.$slots, "default", {}, () => [
|
|
1224
|
-
i.iconName ? (
|
|
1261
|
+
i.iconName ? (d(), g(c(j), {
|
|
1225
1262
|
key: 0,
|
|
1226
1263
|
id: "link-icon",
|
|
1227
1264
|
icon: i.iconName,
|
|
1228
|
-
class:
|
|
1229
|
-
}, null, 8, ["icon", "class"])) :
|
|
1230
|
-
|
|
1265
|
+
class: B(["bi my-auto", a.value])
|
|
1266
|
+
}, null, 8, ["icon", "class"])) : z("", !0),
|
|
1267
|
+
_(" " + w(i.label), 1)
|
|
1231
1268
|
])
|
|
1232
|
-
], 10,
|
|
1269
|
+
], 10, St));
|
|
1233
1270
|
}
|
|
1234
1271
|
});
|
|
1235
|
-
function
|
|
1236
|
-
const
|
|
1272
|
+
function Ft(e) {
|
|
1273
|
+
const t = {
|
|
1237
1274
|
errorMessage: "",
|
|
1238
1275
|
errorDetails: []
|
|
1239
1276
|
};
|
|
1240
|
-
if (e.exception && (
|
|
1241
|
-
const
|
|
1242
|
-
|
|
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);
|
|
1243
1280
|
}
|
|
1244
|
-
return
|
|
1281
|
+
return t.errorMessage === "" && t.errorDetails.length === 0 && (t.errorMessage = e), t;
|
|
1245
1282
|
}
|
|
1246
|
-
function
|
|
1247
|
-
return e.map((
|
|
1283
|
+
function ji(e, t) {
|
|
1284
|
+
return e.map((a) => ({ id: a, label: t ? t(a) : `${a}` }));
|
|
1248
1285
|
}
|
|
1249
|
-
function
|
|
1250
|
-
return { id: e, label:
|
|
1286
|
+
function Ii(e, t, a) {
|
|
1287
|
+
return { id: e, label: t ?? e.toString(), shortLabel: a };
|
|
1251
1288
|
}
|
|
1252
|
-
const
|
|
1289
|
+
const zt = { key: 0 }, Ct = {
|
|
1253
1290
|
class: "d-flex w-100",
|
|
1254
1291
|
"data-cy": "footer"
|
|
1255
|
-
},
|
|
1292
|
+
}, Pi = /* @__PURE__ */ S({
|
|
1256
1293
|
__name: "ForgeModal",
|
|
1257
1294
|
props: /* @__PURE__ */ q({
|
|
1258
1295
|
cancelText: { default: "Cancel" },
|
|
@@ -1302,106 +1339,106 @@ const Fa = { key: 0 }, Ba = {
|
|
|
1302
1339
|
}),
|
|
1303
1340
|
emits: ["update:visible"],
|
|
1304
1341
|
setup(e) {
|
|
1305
|
-
const
|
|
1342
|
+
const t = D(e, "visible"), a = P(!1), i = e, l = P(!1), o = P({
|
|
1306
1343
|
hasError: !1,
|
|
1307
1344
|
header: "",
|
|
1308
1345
|
message: []
|
|
1309
1346
|
}), r = () => {
|
|
1310
|
-
t.value = !1;
|
|
1311
|
-
}, p = () => {
|
|
1312
|
-
t.value = !0;
|
|
1313
|
-
}, d = () => {
|
|
1314
1347
|
a.value = !1;
|
|
1315
|
-
},
|
|
1348
|
+
}, s = () => {
|
|
1349
|
+
a.value = !0;
|
|
1350
|
+
}, p = () => {
|
|
1351
|
+
t.value = !1;
|
|
1352
|
+
}, m = async () => {
|
|
1316
1353
|
if (i.onConfirm) {
|
|
1317
1354
|
l.value = !0, o.value.hasError = !1;
|
|
1318
1355
|
try {
|
|
1319
1356
|
const n = await i.onConfirm();
|
|
1320
|
-
(n || n == null) &&
|
|
1357
|
+
(n || n == null) && p();
|
|
1321
1358
|
} catch (n) {
|
|
1322
1359
|
o.value.hasError = !0;
|
|
1323
|
-
const
|
|
1324
|
-
o.value.header =
|
|
1360
|
+
const $ = Ft(n);
|
|
1361
|
+
o.value.header = $.errorMessage, o.value.message = $.errorDetails;
|
|
1325
1362
|
}
|
|
1326
1363
|
l.value = !1;
|
|
1327
1364
|
}
|
|
1328
|
-
},
|
|
1365
|
+
}, b = C(() => ({
|
|
1329
1366
|
root: [
|
|
1330
1367
|
"modal modal-dialog modal-content h-auto m-0",
|
|
1331
1368
|
{
|
|
1332
|
-
"mw-100 vh-100 vw-100 top-0 start-0":
|
|
1369
|
+
"mw-100 vh-100 vw-100 top-0 start-0": a.value,
|
|
1333
1370
|
"modal-sm": i.size === "sm",
|
|
1334
1371
|
"modal-lg": i.size === "lg",
|
|
1335
1372
|
"modal-xl": i.size === "xl"
|
|
1336
1373
|
}
|
|
1337
1374
|
]
|
|
1338
1375
|
}));
|
|
1339
|
-
return (n,
|
|
1340
|
-
const
|
|
1341
|
-
return
|
|
1342
|
-
onMaximize:
|
|
1376
|
+
return (n, $) => {
|
|
1377
|
+
const T = N, V = Te;
|
|
1378
|
+
return d(), g(V, F(i, {
|
|
1379
|
+
onMaximize: s,
|
|
1343
1380
|
onUnmaximize: r,
|
|
1344
|
-
pt:
|
|
1345
|
-
}),
|
|
1346
|
-
closeicon:
|
|
1347
|
-
|
|
1381
|
+
pt: b.value
|
|
1382
|
+
}), ae({
|
|
1383
|
+
closeicon: f(() => [
|
|
1384
|
+
y(c(j), {
|
|
1348
1385
|
"data-cy": "close-icon",
|
|
1349
1386
|
icon: "bi:x-lg",
|
|
1350
1387
|
width: "18",
|
|
1351
1388
|
height: "18",
|
|
1352
|
-
onClick:
|
|
1389
|
+
onClick: p
|
|
1353
1390
|
})
|
|
1354
1391
|
]),
|
|
1355
|
-
maximizeicon:
|
|
1356
|
-
|
|
1392
|
+
maximizeicon: f(() => [
|
|
1393
|
+
y(c(j), {
|
|
1357
1394
|
"data-cy": "maximisable-icon",
|
|
1358
|
-
icon:
|
|
1395
|
+
icon: a.value ? "bi:arrows-angle-contract" : "bi:arrows-angle-expand",
|
|
1359
1396
|
width: "16",
|
|
1360
1397
|
height: "16"
|
|
1361
1398
|
}, null, 8, ["icon"])
|
|
1362
1399
|
]),
|
|
1363
1400
|
_: 2
|
|
1364
1401
|
}, [
|
|
1365
|
-
|
|
1366
|
-
name:
|
|
1367
|
-
fn:
|
|
1368
|
-
o.value.hasError ? (
|
|
1402
|
+
A(n.$slots, (M, I) => ({
|
|
1403
|
+
name: I,
|
|
1404
|
+
fn: f((x) => [
|
|
1405
|
+
o.value.hasError ? (d(), g(ne, {
|
|
1369
1406
|
key: 0,
|
|
1370
1407
|
severity: "danger",
|
|
1371
1408
|
"data-cy": "error"
|
|
1372
1409
|
}, {
|
|
1373
|
-
default:
|
|
1374
|
-
|
|
1375
|
-
class:
|
|
1410
|
+
default: f(() => [
|
|
1411
|
+
u("p", {
|
|
1412
|
+
class: B(o.value.message.length > 0 ? "my-auto" : "mb-0")
|
|
1376
1413
|
}, w(o.value.header), 3),
|
|
1377
|
-
o.value.message.length > 0 ? (
|
|
1378
|
-
(
|
|
1379
|
-
])) :
|
|
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)
|
|
1380
1417
|
]),
|
|
1381
1418
|
_: 1
|
|
1382
|
-
})) :
|
|
1383
|
-
k(n.$slots,
|
|
1419
|
+
})) : z("", !0),
|
|
1420
|
+
k(n.$slots, I, X(Q(x || {}))),
|
|
1384
1421
|
l.value ? k(n.$slots, "loader", { key: 1 }, () => [
|
|
1385
|
-
|
|
1386
|
-
]) :
|
|
1422
|
+
y(fe, { "data-cy": "loader" })
|
|
1423
|
+
]) : z("", !0)
|
|
1387
1424
|
])
|
|
1388
1425
|
})),
|
|
1389
1426
|
n.showFooter ? {
|
|
1390
1427
|
name: "footer",
|
|
1391
|
-
fn:
|
|
1392
|
-
|
|
1393
|
-
|
|
1428
|
+
fn: f(() => [
|
|
1429
|
+
u("div", Ct, [
|
|
1430
|
+
y(T, {
|
|
1394
1431
|
label: n.cancelText,
|
|
1395
|
-
class:
|
|
1432
|
+
class: B(i.cancelClass),
|
|
1396
1433
|
outlined: "",
|
|
1397
|
-
onClick:
|
|
1434
|
+
onClick: p,
|
|
1398
1435
|
id: "cancel-button",
|
|
1399
1436
|
type: i.cancelButtonType
|
|
1400
1437
|
}, null, 8, ["label", "class", "type"]),
|
|
1401
|
-
|
|
1438
|
+
y(T, {
|
|
1402
1439
|
label: n.submitText,
|
|
1403
|
-
class:
|
|
1404
|
-
onClick:
|
|
1440
|
+
class: B([i.submitClass, "ms-auto"]),
|
|
1441
|
+
onClick: m,
|
|
1405
1442
|
id: "submit-button",
|
|
1406
1443
|
type: i.submitButtonType
|
|
1407
1444
|
}, null, 8, ["label", "class", "type"])
|
|
@@ -1412,7 +1449,7 @@ const Fa = { key: 0 }, Ba = {
|
|
|
1412
1449
|
]), 1040, ["pt"]);
|
|
1413
1450
|
};
|
|
1414
1451
|
}
|
|
1415
|
-
}),
|
|
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({
|
|
1416
1453
|
__name: "ForgeInlineEditor",
|
|
1417
1454
|
props: /* @__PURE__ */ q({
|
|
1418
1455
|
name: { default: "" },
|
|
@@ -1427,111 +1464,111 @@ const Fa = { key: 0 }, Ba = {
|
|
|
1427
1464
|
}),
|
|
1428
1465
|
emits: ["update:modelValue"],
|
|
1429
1466
|
setup(e) {
|
|
1430
|
-
const
|
|
1431
|
-
var
|
|
1432
|
-
i.value = !i.value, (
|
|
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();
|
|
1433
1470
|
}, r = async () => {
|
|
1434
|
-
if (
|
|
1471
|
+
if ($.value)
|
|
1435
1472
|
return !1;
|
|
1436
|
-
if (
|
|
1473
|
+
if (a.value = n.value, t.completeAction)
|
|
1437
1474
|
try {
|
|
1438
|
-
await
|
|
1475
|
+
await t.completeAction.apply(this, t.params), i.value = !i.value;
|
|
1439
1476
|
} catch {
|
|
1440
|
-
|
|
1477
|
+
t.errorAction && await t.errorAction.apply(this, t.errorParams);
|
|
1441
1478
|
}
|
|
1442
1479
|
else
|
|
1443
1480
|
i.value = !i.value;
|
|
1444
|
-
},
|
|
1481
|
+
}, s = () => {
|
|
1445
1482
|
i.value = !i.value;
|
|
1446
|
-
},
|
|
1483
|
+
}, p = () => {
|
|
1447
1484
|
n.value = null;
|
|
1448
|
-
}, { errorMessage:
|
|
1449
|
-
initialValue:
|
|
1485
|
+
}, { errorMessage: m, errors: b, value: n } = ee(() => t.name, void 0, {
|
|
1486
|
+
initialValue: a.value
|
|
1450
1487
|
});
|
|
1451
|
-
|
|
1452
|
-
n.value =
|
|
1488
|
+
ie(() => {
|
|
1489
|
+
n.value = a.value;
|
|
1453
1490
|
});
|
|
1454
|
-
const
|
|
1455
|
-
return (
|
|
1456
|
-
const
|
|
1457
|
-
return
|
|
1458
|
-
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
|
|
1459
1496
|
}, [
|
|
1460
|
-
|
|
1461
|
-
k(
|
|
1462
|
-
|
|
1497
|
+
T.readonly ? (d(), v("div", _t, [
|
|
1498
|
+
k(T.$slots, "default", {}, () => [
|
|
1499
|
+
u("span", Vt, w(c(n)), 1)
|
|
1463
1500
|
])
|
|
1464
|
-
])) : (
|
|
1465
|
-
i.value ? (
|
|
1466
|
-
R((
|
|
1467
|
-
k(
|
|
1468
|
-
class:
|
|
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 }),
|
|
1469
1506
|
editFinished: r,
|
|
1470
|
-
cancel:
|
|
1507
|
+
cancel: s,
|
|
1471
1508
|
val: c(n)
|
|
1472
1509
|
}, () => [
|
|
1473
|
-
|
|
1510
|
+
y(M, {
|
|
1474
1511
|
"data-cy": "input",
|
|
1475
1512
|
ref_key: "input",
|
|
1476
1513
|
ref: l,
|
|
1477
1514
|
modelValue: c(n),
|
|
1478
|
-
"onUpdate:modelValue":
|
|
1515
|
+
"onUpdate:modelValue": V[0] || (V[0] = (x) => we(n) ? n.value = x : null),
|
|
1479
1516
|
modelModifiers: { trim: !0 },
|
|
1480
|
-
class:
|
|
1517
|
+
class: B({ "is-invalid": $.value }),
|
|
1481
1518
|
onKeydown: [
|
|
1482
|
-
|
|
1483
|
-
|
|
1519
|
+
K(r, ["enter"]),
|
|
1520
|
+
K(s, ["esc"])
|
|
1484
1521
|
]
|
|
1485
1522
|
}, null, 8, ["modelValue", "class"])
|
|
1486
1523
|
]),
|
|
1487
|
-
|
|
1524
|
+
y(c(j), {
|
|
1488
1525
|
icon: "bi:x-circle",
|
|
1489
1526
|
class: "mx-2 cursor-pointer",
|
|
1490
|
-
onClick:
|
|
1491
|
-
onKeydown:
|
|
1527
|
+
onClick: p,
|
|
1528
|
+
onKeydown: K(p, ["enter"]),
|
|
1492
1529
|
"data-cy": "clear-icon"
|
|
1493
1530
|
})
|
|
1494
1531
|
])), [
|
|
1495
1532
|
[c(je), r]
|
|
1496
1533
|
])
|
|
1497
|
-
])) : (
|
|
1534
|
+
])) : (d(), v("div", {
|
|
1498
1535
|
key: 1,
|
|
1499
1536
|
class: "d-flex text-muted",
|
|
1500
1537
|
onClick: o,
|
|
1501
1538
|
onFocus: o
|
|
1502
1539
|
}, [
|
|
1503
|
-
k(
|
|
1504
|
-
|
|
1505
|
-
class:
|
|
1540
|
+
k(T.$slots, "default", {}, () => [
|
|
1541
|
+
u("div", {
|
|
1542
|
+
class: B(["pe-2 cursor-pointer", { "text-invalid": $.value }]),
|
|
1506
1543
|
"data-cy": "value"
|
|
1507
1544
|
}, w(c(n) ? c(n) : "Click to edit"), 3)
|
|
1508
1545
|
]),
|
|
1509
|
-
|
|
1546
|
+
y(I, {
|
|
1510
1547
|
link: "",
|
|
1511
1548
|
class: "p-0 m-0"
|
|
1512
1549
|
}, {
|
|
1513
|
-
default:
|
|
1514
|
-
|
|
1550
|
+
default: f(() => [
|
|
1551
|
+
y(c(j), {
|
|
1515
1552
|
icon: "bi:pencil",
|
|
1516
|
-
class:
|
|
1553
|
+
class: B($.value ? "text-invalid" : "text-muted"),
|
|
1517
1554
|
"data-cy": "edit-icon",
|
|
1518
|
-
onKeydown:
|
|
1555
|
+
onKeydown: K(o, ["enter"])
|
|
1519
1556
|
}, null, 8, ["class"])
|
|
1520
1557
|
]),
|
|
1521
1558
|
_: 1
|
|
1522
1559
|
})
|
|
1523
1560
|
], 32))
|
|
1524
1561
|
])),
|
|
1525
|
-
R(
|
|
1562
|
+
R(u("small", {
|
|
1526
1563
|
"data-cy": "error",
|
|
1527
1564
|
class: "text-invalid"
|
|
1528
|
-
}, w(c(
|
|
1529
|
-
[W,
|
|
1565
|
+
}, w(c(m)), 513), [
|
|
1566
|
+
[W, $.value]
|
|
1530
1567
|
])
|
|
1531
|
-
], 8,
|
|
1568
|
+
], 8, Tt);
|
|
1532
1569
|
};
|
|
1533
1570
|
}
|
|
1534
|
-
}),
|
|
1571
|
+
}), Dt = ["href"], _i = /* @__PURE__ */ S({
|
|
1535
1572
|
__name: "ForgeNavbar",
|
|
1536
1573
|
props: {
|
|
1537
1574
|
severity: { default: "light" },
|
|
@@ -1548,53 +1585,53 @@ const Fa = { key: 0 }, Ba = {
|
|
|
1548
1585
|
unstyled: { type: Boolean }
|
|
1549
1586
|
},
|
|
1550
1587
|
setup(e) {
|
|
1551
|
-
const
|
|
1588
|
+
const t = e, a = C(() => ({
|
|
1552
1589
|
root: () => ({
|
|
1553
1590
|
class: [
|
|
1554
1591
|
"navbar container-fluid navbar-expand-lg",
|
|
1555
1592
|
{
|
|
1556
|
-
"bg-light":
|
|
1557
|
-
"bg-dark":
|
|
1558
|
-
"bg-primary":
|
|
1559
|
-
"bg-brand":
|
|
1560
|
-
"bg-secondary":
|
|
1561
|
-
"bg-success":
|
|
1562
|
-
"bg-warning":
|
|
1563
|
-
"bg-danger":
|
|
1564
|
-
"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"
|
|
1565
1602
|
},
|
|
1566
1603
|
{
|
|
1567
|
-
"navbar-light":
|
|
1568
|
-
"navbar-dark":
|
|
1604
|
+
"navbar-light": t.severity === "light",
|
|
1605
|
+
"navbar-dark": t.severity !== "light"
|
|
1569
1606
|
},
|
|
1570
1607
|
{
|
|
1571
|
-
"fixed-top":
|
|
1572
|
-
"fixed-bottom":
|
|
1573
|
-
"sticky-top":
|
|
1608
|
+
"fixed-top": t.position === "fixed-top",
|
|
1609
|
+
"fixed-bottom": t.position === "fixed-bottom",
|
|
1610
|
+
"sticky-top": t.position === "sticky-top"
|
|
1574
1611
|
}
|
|
1575
1612
|
]
|
|
1576
1613
|
})
|
|
1577
1614
|
}));
|
|
1578
|
-
return (i, l) => (
|
|
1579
|
-
pt:
|
|
1615
|
+
return (i, l) => (d(), g(c(Ie), F({ ...t, ...i.$attrs }, {
|
|
1616
|
+
pt: a.value,
|
|
1580
1617
|
"data-cy": "navbar"
|
|
1581
|
-
}),
|
|
1582
|
-
start:
|
|
1583
|
-
|
|
1618
|
+
}), ae({
|
|
1619
|
+
start: f(() => [
|
|
1620
|
+
u("a", {
|
|
1584
1621
|
href: i.logoUrl,
|
|
1585
1622
|
class: "navbar-brand ms-3",
|
|
1586
1623
|
"data-cy": "logo"
|
|
1587
1624
|
}, [
|
|
1588
1625
|
k(i.$slots, "logo", {}, () => [
|
|
1589
|
-
l[0] || (l[0] =
|
|
1626
|
+
l[0] || (l[0] = _(" Logo "))
|
|
1590
1627
|
])
|
|
1591
|
-
], 8,
|
|
1628
|
+
], 8, Dt)
|
|
1592
1629
|
]),
|
|
1593
|
-
buttonicon:
|
|
1630
|
+
buttonicon: f(() => [
|
|
1594
1631
|
k(i.$slots, "buttonIcon", {}, () => [
|
|
1595
|
-
|
|
1632
|
+
y(c(j), {
|
|
1596
1633
|
icon: "bi:list",
|
|
1597
|
-
class:
|
|
1634
|
+
class: B(t.severity === "light" ? "text-black" : "text-white"),
|
|
1598
1635
|
height: "24",
|
|
1599
1636
|
"data-cy": "burger-icon"
|
|
1600
1637
|
}, null, 8, ["class"])
|
|
@@ -1602,22 +1639,22 @@ const Fa = { key: 0 }, Ba = {
|
|
|
1602
1639
|
]),
|
|
1603
1640
|
_: 2
|
|
1604
1641
|
}, [
|
|
1605
|
-
|
|
1642
|
+
A(i.$slots, (o, r) => ({
|
|
1606
1643
|
name: r,
|
|
1607
|
-
fn:
|
|
1608
|
-
k(i.$slots, r, X(Q(
|
|
1644
|
+
fn: f((s) => [
|
|
1645
|
+
k(i.$slots, r, X(Q(s)))
|
|
1609
1646
|
])
|
|
1610
1647
|
}))
|
|
1611
1648
|
]), 1040, ["pt"]));
|
|
1612
1649
|
}
|
|
1613
|
-
}),
|
|
1650
|
+
}), Ot = { class: "border alternating-item-list" }, Nt = {
|
|
1614
1651
|
key: 0,
|
|
1615
1652
|
class: "p-2 border-top border-bottom",
|
|
1616
1653
|
"data-cy": "title"
|
|
1617
|
-
},
|
|
1654
|
+
}, Ut = { class: "d-inline-block" }, At = {
|
|
1618
1655
|
key: 1,
|
|
1619
1656
|
class: "p-2 item d-flex justify-content-between align-items-center"
|
|
1620
|
-
},
|
|
1657
|
+
}, qt = /* @__PURE__ */ S({
|
|
1621
1658
|
__name: "ForgeMultiSelectPreview",
|
|
1622
1659
|
props: /* @__PURE__ */ q({
|
|
1623
1660
|
title: { default: "Selected Items" },
|
|
@@ -1633,96 +1670,96 @@ const Fa = { key: 0 }, Ba = {
|
|
|
1633
1670
|
}),
|
|
1634
1671
|
emits: ["update:modelValue"],
|
|
1635
1672
|
setup(e) {
|
|
1636
|
-
const
|
|
1637
|
-
|
|
1673
|
+
const t = e, a = D(e, "modelValue"), i = (l) => {
|
|
1674
|
+
a.value = a.value.filter((o) => o.id !== l);
|
|
1638
1675
|
};
|
|
1639
1676
|
return (l, o) => {
|
|
1640
|
-
const r = oe,
|
|
1641
|
-
return
|
|
1642
|
-
class:
|
|
1677
|
+
const r = oe, s = N;
|
|
1678
|
+
return d(), v("div", {
|
|
1679
|
+
class: B(l.orientation === "column" ? "row" : ""),
|
|
1643
1680
|
"data-cy": "multiselect-preview"
|
|
1644
1681
|
}, [
|
|
1645
|
-
|
|
1646
|
-
class:
|
|
1682
|
+
u("div", {
|
|
1683
|
+
class: B(l.orientation === "row" ? "col-12 mb-1" : "col"),
|
|
1647
1684
|
"data-cy": "multiselect-container"
|
|
1648
1685
|
}, [
|
|
1649
|
-
|
|
1650
|
-
modelValue:
|
|
1651
|
-
"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)
|
|
1652
1689
|
}, { ...l.$attrs }, {
|
|
1653
|
-
options:
|
|
1690
|
+
options: t.options ?? [],
|
|
1654
1691
|
optionLabel: "label",
|
|
1655
1692
|
placeholder: l.multiselectPlaceholder,
|
|
1656
1693
|
"data-cy": "multiselect"
|
|
1657
1694
|
}), {
|
|
1658
|
-
default:
|
|
1659
|
-
(
|
|
1695
|
+
default: f(() => [
|
|
1696
|
+
(d(!0), v(O, null, A(l.$slots, (p, m) => k(l.$slots, m, { slot: m })), 256))
|
|
1660
1697
|
]),
|
|
1661
1698
|
_: 3
|
|
1662
1699
|
}, 16, ["modelValue", "options", "placeholder"]),
|
|
1663
1700
|
k(l.$slots, "after-multi-select")
|
|
1664
1701
|
], 2),
|
|
1665
|
-
|
|
1666
|
-
class:
|
|
1702
|
+
u("div", {
|
|
1703
|
+
class: B(l.orientation === "row" ? "col-12" : "col"),
|
|
1667
1704
|
"data-cy": "options-preview"
|
|
1668
1705
|
}, [
|
|
1669
|
-
|
|
1706
|
+
u("div", {
|
|
1670
1707
|
style: ke({ height: l.height }),
|
|
1671
1708
|
class: "overflow-auto"
|
|
1672
1709
|
}, [
|
|
1673
|
-
|
|
1674
|
-
l.title ? (
|
|
1675
|
-
(
|
|
1676
|
-
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,
|
|
1677
1714
|
class: "p-2 item d-flex justify-content-between align-items-center"
|
|
1678
1715
|
}, [
|
|
1679
|
-
k(l.$slots, "list-item", { item:
|
|
1680
|
-
|
|
1716
|
+
k(l.$slots, "list-item", { item: p }, () => [
|
|
1717
|
+
u("span", Ut, w(p.shortLabel ? p.shortLabel : p.label), 1)
|
|
1681
1718
|
]),
|
|
1682
|
-
l.canRemoveItemFromPreview ? (
|
|
1719
|
+
l.canRemoveItemFromPreview ? (d(), g(s, {
|
|
1683
1720
|
key: 0,
|
|
1684
1721
|
link: "",
|
|
1685
1722
|
class: "m-0 p-0 d-flex align-items-center",
|
|
1686
|
-
onClick: (
|
|
1723
|
+
onClick: (m) => i(p.id)
|
|
1687
1724
|
}, {
|
|
1688
|
-
default:
|
|
1689
|
-
|
|
1725
|
+
default: f(() => [
|
|
1726
|
+
y(c(j), {
|
|
1690
1727
|
icon: "bi:x",
|
|
1691
1728
|
class: "close-icon",
|
|
1692
|
-
"data-cy": `close-icon-${
|
|
1729
|
+
"data-cy": `close-icon-${p.id}`
|
|
1693
1730
|
}, null, 8, ["data-cy"])
|
|
1694
1731
|
]),
|
|
1695
1732
|
_: 2
|
|
1696
|
-
}, 1032, ["onClick"])) :
|
|
1733
|
+
}, 1032, ["onClick"])) : z("", !0)
|
|
1697
1734
|
]))), 128)),
|
|
1698
|
-
|
|
1735
|
+
a.value == null || a.value.length == 0 ? (d(), v("div", At, w(t.optionsPreviewEmptyText), 1)) : z("", !0)
|
|
1699
1736
|
])
|
|
1700
1737
|
], 4)
|
|
1701
1738
|
], 2)
|
|
1702
1739
|
], 2);
|
|
1703
1740
|
};
|
|
1704
1741
|
}
|
|
1705
|
-
}),
|
|
1742
|
+
}), Lt = { class: "d-flex justify-content-between pb-2" }, Et = {
|
|
1706
1743
|
"data-cy": "title",
|
|
1707
1744
|
class: "my-auto"
|
|
1708
|
-
},
|
|
1745
|
+
}, Rt = {
|
|
1709
1746
|
"data-cy": "slot",
|
|
1710
1747
|
class: "d-flex align-items-center"
|
|
1711
|
-
},
|
|
1748
|
+
}, Vi = /* @__PURE__ */ S({
|
|
1712
1749
|
__name: "ForgePageHeader",
|
|
1713
1750
|
props: {
|
|
1714
1751
|
title: {}
|
|
1715
1752
|
},
|
|
1716
1753
|
setup(e) {
|
|
1717
|
-
const
|
|
1718
|
-
return (
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
k(
|
|
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")
|
|
1722
1759
|
])
|
|
1723
1760
|
]));
|
|
1724
1761
|
}
|
|
1725
|
-
}),
|
|
1762
|
+
}), Ht = { class: "d-flex" }, Wt = { "data-cy": "before-slot" }, Yt = { class: "position-relative w-100" }, Gt = { "data-cy": "after-slot" }, ge = /* @__PURE__ */ S({
|
|
1726
1763
|
__name: "ForgeDatepicker",
|
|
1727
1764
|
props: /* @__PURE__ */ q({
|
|
1728
1765
|
severity: { default: "primary" },
|
|
@@ -1798,14 +1835,14 @@ const Fa = { key: 0 }, Ba = {
|
|
|
1798
1835
|
}),
|
|
1799
1836
|
emits: ["update:modelValue"],
|
|
1800
1837
|
setup(e) {
|
|
1801
|
-
const
|
|
1802
|
-
initialValue:
|
|
1803
|
-
}),
|
|
1804
|
-
|
|
1805
|
-
},
|
|
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(() => ({
|
|
1806
1843
|
dayCell: ({ context: n }) => ({
|
|
1807
1844
|
class: [
|
|
1808
|
-
`text-center date-${
|
|
1845
|
+
`text-center date-${t.severity === void 0 ? "primary" : t.severity}`,
|
|
1809
1846
|
{
|
|
1810
1847
|
"cursor-pointer": !n.disabled,
|
|
1811
1848
|
"pe-none": n.disabled,
|
|
@@ -1814,13 +1851,13 @@ const Fa = { key: 0 }, Ba = {
|
|
|
1814
1851
|
// Severities
|
|
1815
1852
|
{
|
|
1816
1853
|
selected: n.selected && !n.disabled,
|
|
1817
|
-
"text-primary": !n.selected && n.today && (
|
|
1818
|
-
"text-brand": !n.selected && n.today &&
|
|
1819
|
-
"text-secondary": !n.selected && n.today &&
|
|
1820
|
-
"text-success": !n.selected && n.today &&
|
|
1821
|
-
"text-warning": !n.selected && n.today &&
|
|
1822
|
-
"text-danger": !n.selected && n.today &&
|
|
1823
|
-
"text-info": !n.selected && n.today &&
|
|
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"
|
|
1824
1861
|
}
|
|
1825
1862
|
]
|
|
1826
1863
|
}),
|
|
@@ -1837,13 +1874,13 @@ const Fa = { key: 0 }, Ba = {
|
|
|
1837
1874
|
class: [
|
|
1838
1875
|
"btn ms-auto",
|
|
1839
1876
|
{
|
|
1840
|
-
"btn-link text-primary":
|
|
1841
|
-
"btn-link text-brand":
|
|
1842
|
-
"btn-link text-secondary":
|
|
1843
|
-
"btn-link text-success":
|
|
1844
|
-
"btn-link text-warning":
|
|
1845
|
-
"btn-link text-danger":
|
|
1846
|
-
"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"
|
|
1847
1884
|
}
|
|
1848
1885
|
]
|
|
1849
1886
|
})
|
|
@@ -1853,13 +1890,13 @@ const Fa = { key: 0 }, Ba = {
|
|
|
1853
1890
|
class: [
|
|
1854
1891
|
"btn",
|
|
1855
1892
|
{
|
|
1856
|
-
"btn-link text-primary":
|
|
1857
|
-
"btn-link text-brand":
|
|
1858
|
-
"btn-link text-secondary":
|
|
1859
|
-
"btn-link text-success":
|
|
1860
|
-
"btn-link text-warning":
|
|
1861
|
-
"btn-link text-danger":
|
|
1862
|
-
"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"
|
|
1863
1900
|
}
|
|
1864
1901
|
]
|
|
1865
1902
|
})
|
|
@@ -1868,13 +1905,13 @@ const Fa = { key: 0 }, Ba = {
|
|
|
1868
1905
|
class: [
|
|
1869
1906
|
"col-3 text-center cursor-pointer py-2",
|
|
1870
1907
|
{
|
|
1871
|
-
"text-primary": (
|
|
1872
|
-
"text-brand":
|
|
1873
|
-
"text-secondary":
|
|
1874
|
-
"text-success":
|
|
1875
|
-
"text-warning":
|
|
1876
|
-
"text-danger":
|
|
1877
|
-
"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()
|
|
1878
1915
|
}
|
|
1879
1916
|
]
|
|
1880
1917
|
}),
|
|
@@ -1882,77 +1919,77 @@ const Fa = { key: 0 }, Ba = {
|
|
|
1882
1919
|
class: [
|
|
1883
1920
|
"col-3 text-center cursor-pointer py-2",
|
|
1884
1921
|
{
|
|
1885
|
-
"text-primary": (
|
|
1886
|
-
"text-brand":
|
|
1887
|
-
"text-secondary":
|
|
1888
|
-
"text-success":
|
|
1889
|
-
"text-warning":
|
|
1890
|
-
"text-danger":
|
|
1891
|
-
"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
|
|
1892
1929
|
}
|
|
1893
1930
|
]
|
|
1894
1931
|
})
|
|
1895
1932
|
}));
|
|
1896
|
-
return (n,
|
|
1897
|
-
const
|
|
1898
|
-
return
|
|
1899
|
-
|
|
1900
|
-
|
|
1933
|
+
return (n, $) => {
|
|
1934
|
+
const T = Pe;
|
|
1935
|
+
return d(), v(O, null, [
|
|
1936
|
+
u("div", Ht, [
|
|
1937
|
+
u("span", Wt, [
|
|
1901
1938
|
k(n.$slots, "before")
|
|
1902
1939
|
]),
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
pt:
|
|
1906
|
-
modelValue:
|
|
1940
|
+
u("div", Yt, [
|
|
1941
|
+
y(T, F({ ...t, ...n.$attrs }, {
|
|
1942
|
+
pt: b.value,
|
|
1943
|
+
modelValue: a.value,
|
|
1907
1944
|
"onUpdate:modelValue": [
|
|
1908
|
-
|
|
1945
|
+
$[0] || ($[0] = (V) => a.value = V),
|
|
1909
1946
|
c(o)
|
|
1910
1947
|
],
|
|
1911
|
-
onBlur:
|
|
1912
|
-
"input-class": { "datepicker-invalid":
|
|
1948
|
+
onBlur: $[1] || ($[1] = () => c(r)),
|
|
1949
|
+
"input-class": { "datepicker-invalid": m.value }
|
|
1913
1950
|
}), null, 16, ["pt", "modelValue", "onUpdate:modelValue", "input-class"]),
|
|
1914
|
-
R(
|
|
1951
|
+
R(y(c(j), {
|
|
1915
1952
|
"data-cy": "icon",
|
|
1916
1953
|
icon: "bi:calendar4",
|
|
1917
|
-
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"}`])
|
|
1918
1955
|
}, null, 8, ["class"]), [
|
|
1919
|
-
[W,
|
|
1956
|
+
[W, t.showIcon]
|
|
1920
1957
|
]),
|
|
1921
|
-
R(
|
|
1958
|
+
R(y(c(j), {
|
|
1922
1959
|
"data-cy": "icon",
|
|
1923
1960
|
icon: "bi:x",
|
|
1924
|
-
onClick:
|
|
1925
|
-
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"])
|
|
1926
1963
|
}, null, 8, ["class"]), [
|
|
1927
|
-
[W,
|
|
1964
|
+
[W, t.modelValue]
|
|
1928
1965
|
])
|
|
1929
1966
|
]),
|
|
1930
|
-
|
|
1967
|
+
u("span", Gt, [
|
|
1931
1968
|
k(n.$slots, "after")
|
|
1932
1969
|
])
|
|
1933
1970
|
]),
|
|
1934
|
-
R(
|
|
1971
|
+
R(u("small", {
|
|
1935
1972
|
"data-cy": "error",
|
|
1936
1973
|
class: "text-invalid"
|
|
1937
1974
|
}, w(c(l)), 513), [
|
|
1938
|
-
[W,
|
|
1975
|
+
[W, m.value]
|
|
1939
1976
|
])
|
|
1940
1977
|
], 64);
|
|
1941
1978
|
};
|
|
1942
1979
|
}
|
|
1943
|
-
}),
|
|
1980
|
+
}), Mi = /* @__PURE__ */ S({
|
|
1944
1981
|
__name: "ForgeRemainingCharacters",
|
|
1945
1982
|
props: {
|
|
1946
1983
|
maxCount: { default: 300 },
|
|
1947
1984
|
currentCount: {}
|
|
1948
1985
|
},
|
|
1949
1986
|
setup(e) {
|
|
1950
|
-
const
|
|
1951
|
-
return (i, l) => (
|
|
1952
|
-
class:
|
|
1953
|
-
}, "Remaining characters: " + w(
|
|
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));
|
|
1954
1991
|
}
|
|
1955
|
-
}),
|
|
1992
|
+
}), Jt = { class: "d-flex justify-content-between" }, Di = /* @__PURE__ */ S({
|
|
1956
1993
|
__name: "ForgeForm",
|
|
1957
1994
|
props: {
|
|
1958
1995
|
onSubmit: {},
|
|
@@ -1964,91 +2001,91 @@ const Fa = { key: 0 }, Ba = {
|
|
|
1964
2001
|
hideCancel: { type: Boolean, default: !1 }
|
|
1965
2002
|
},
|
|
1966
2003
|
setup(e) {
|
|
1967
|
-
const
|
|
2004
|
+
const t = e, a = P(!1), i = P({
|
|
1968
2005
|
hasError: !1,
|
|
1969
2006
|
message: ""
|
|
1970
2007
|
});
|
|
1971
2008
|
async function l() {
|
|
1972
|
-
|
|
2009
|
+
a.value = !0, i.value.hasError = !1;
|
|
1973
2010
|
try {
|
|
1974
|
-
await
|
|
2011
|
+
await t.onSubmit();
|
|
1975
2012
|
} catch (o) {
|
|
1976
2013
|
i.value.hasError = !0, o.message && (i.value.message = o.message);
|
|
1977
2014
|
}
|
|
1978
|
-
|
|
2015
|
+
a.value = !1;
|
|
1979
2016
|
}
|
|
1980
2017
|
return (o, r) => {
|
|
1981
|
-
const
|
|
1982
|
-
return
|
|
2018
|
+
const s = N;
|
|
2019
|
+
return d(), v("form", F(o.$attrs, {
|
|
1983
2020
|
novalidate: "",
|
|
1984
2021
|
class: "position-relative shadow-sm border p-4 bg-white",
|
|
1985
|
-
onSubmit:
|
|
2022
|
+
onSubmit: Y(l, ["prevent"])
|
|
1986
2023
|
}), [
|
|
1987
|
-
o.hideTitle ?
|
|
2024
|
+
o.hideTitle ? z("", !0) : (d(), v(O, { key: 0 }, [
|
|
1988
2025
|
k(o.$slots, "title", {}, () => [
|
|
1989
|
-
|
|
1990
|
-
class:
|
|
2026
|
+
u("h3", {
|
|
2027
|
+
class: B(o.titleClass),
|
|
1991
2028
|
"data-cy": "form-title"
|
|
1992
2029
|
}, w(o.title), 3)
|
|
1993
2030
|
]),
|
|
1994
|
-
r[1] || (r[1] =
|
|
2031
|
+
r[1] || (r[1] = u("hr", null, null, -1))
|
|
1995
2032
|
], 64)),
|
|
1996
|
-
i.value.hasError ? (
|
|
2033
|
+
i.value.hasError ? (d(), g(ne, {
|
|
1997
2034
|
key: 1,
|
|
1998
2035
|
severity: "danger",
|
|
1999
2036
|
"data-cy": "error"
|
|
2000
2037
|
}, {
|
|
2001
|
-
default:
|
|
2038
|
+
default: f(() => [
|
|
2002
2039
|
k(o.$slots, "error", {
|
|
2003
2040
|
error: i.value.message
|
|
2004
2041
|
}, () => [
|
|
2005
|
-
|
|
2042
|
+
_(w(i.value.message), 1)
|
|
2006
2043
|
])
|
|
2007
2044
|
]),
|
|
2008
2045
|
_: 3
|
|
2009
|
-
})) :
|
|
2046
|
+
})) : z("", !0),
|
|
2010
2047
|
k(o.$slots, "default"),
|
|
2011
|
-
|
|
2048
|
+
u("div", Jt, [
|
|
2012
2049
|
k(o.$slots, "cancel", {}, () => [
|
|
2013
|
-
o.hideCancel ?
|
|
2050
|
+
o.hideCancel ? z("", !0) : (d(), g(s, {
|
|
2014
2051
|
key: 0,
|
|
2015
2052
|
"data-cy": "cancel-btn",
|
|
2016
2053
|
type: "reset",
|
|
2017
2054
|
severity: "secondary",
|
|
2018
2055
|
outlined: "",
|
|
2019
|
-
onClick: r[0] || (r[0] = (
|
|
2056
|
+
onClick: r[0] || (r[0] = (p) => o.$emit("cancel"))
|
|
2020
2057
|
}, {
|
|
2021
|
-
default:
|
|
2022
|
-
|
|
2058
|
+
default: f(() => [
|
|
2059
|
+
_(w(o.cancelText), 1)
|
|
2023
2060
|
]),
|
|
2024
2061
|
_: 1
|
|
2025
2062
|
}))
|
|
2026
2063
|
]),
|
|
2027
2064
|
k(o.$slots, "submit", { submit: l }, () => [
|
|
2028
|
-
|
|
2065
|
+
y(s, {
|
|
2029
2066
|
"data-cy": "submit-btn",
|
|
2030
2067
|
type: "submit",
|
|
2031
2068
|
severity: "primary",
|
|
2032
2069
|
class: "ms-auto"
|
|
2033
2070
|
}, {
|
|
2034
|
-
default:
|
|
2035
|
-
|
|
2071
|
+
default: f(() => [
|
|
2072
|
+
_(w(o.submitText), 1)
|
|
2036
2073
|
]),
|
|
2037
2074
|
_: 1
|
|
2038
2075
|
})
|
|
2039
2076
|
])
|
|
2040
2077
|
]),
|
|
2041
|
-
|
|
2078
|
+
a.value ? (d(), g(fe, {
|
|
2042
2079
|
key: 2,
|
|
2043
2080
|
"data-cy": "loading-spinner"
|
|
2044
|
-
})) :
|
|
2081
|
+
})) : z("", !0)
|
|
2045
2082
|
], 16);
|
|
2046
2083
|
};
|
|
2047
2084
|
}
|
|
2048
|
-
}),
|
|
2085
|
+
}), Kt = {
|
|
2049
2086
|
key: 1,
|
|
2050
2087
|
class: "d-flex flex-column w-100"
|
|
2051
|
-
},
|
|
2088
|
+
}, Zt = ["for"], Oi = /* @__PURE__ */ S({
|
|
2052
2089
|
__name: "ForgeFormField",
|
|
2053
2090
|
props: /* @__PURE__ */ q({
|
|
2054
2091
|
name: {},
|
|
@@ -2064,101 +2101,101 @@ const Fa = { key: 0 }, Ba = {
|
|
|
2064
2101
|
}),
|
|
2065
2102
|
emits: ["update:modelValue"],
|
|
2066
2103
|
setup(e) {
|
|
2067
|
-
const
|
|
2068
|
-
|
|
2069
|
-
}, { errors: l, value: o, errorMessage: r, handleChange:
|
|
2070
|
-
initialValue:
|
|
2071
|
-
}),
|
|
2072
|
-
return
|
|
2073
|
-
|
|
2074
|
-
}, { immediate: !0 }), (
|
|
2075
|
-
const
|
|
2076
|
-
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({
|
|
2077
2114
|
key: 0,
|
|
2078
|
-
id:
|
|
2079
|
-
label:
|
|
2080
|
-
},
|
|
2081
|
-
name:
|
|
2082
|
-
modelValue:
|
|
2083
|
-
"onUpdate:modelValue": n[0] || (n[0] = (
|
|
2084
|
-
}), null, 16, ["id", "label", "name", "modelValue"])) : (
|
|
2085
|
-
|
|
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", {
|
|
2086
2123
|
"data-cy": "input-wrapper",
|
|
2087
|
-
class:
|
|
2124
|
+
class: B(["d-flex", a.fieldLabelPosition === "top" ? "flex-column" : "flex-row"])
|
|
2088
2125
|
}, [
|
|
2089
|
-
|
|
2090
|
-
for:
|
|
2091
|
-
class:
|
|
2092
|
-
}, w(
|
|
2093
|
-
|
|
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({
|
|
2094
2131
|
key: 0,
|
|
2095
|
-
id:
|
|
2096
|
-
},
|
|
2097
|
-
placeholder:
|
|
2098
|
-
"input-class": { "is-invalid":
|
|
2099
|
-
class: { "is-invalid":
|
|
2100
|
-
modelValue:
|
|
2101
|
-
"onUpdate:modelValue": n[1] || (n[1] = (
|
|
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),
|
|
2102
2139
|
onInput: i
|
|
2103
|
-
}), null, 16, ["id", "placeholder", "input-class", "class", "modelValue"])) :
|
|
2140
|
+
}), null, 16, ["id", "placeholder", "input-class", "class", "modelValue"])) : a.type === "textarea" ? (d(), g($, F({
|
|
2104
2141
|
key: 1,
|
|
2105
|
-
id:
|
|
2106
|
-
},
|
|
2107
|
-
placeholder:
|
|
2108
|
-
class: { "is-invalid":
|
|
2109
|
-
modelValue:
|
|
2110
|
-
"onUpdate:modelValue": n[2] || (n[2] = (
|
|
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),
|
|
2111
2148
|
onInput: i,
|
|
2112
|
-
onBlur: c(
|
|
2113
|
-
}), 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({
|
|
2114
2151
|
key: 2,
|
|
2115
|
-
id:
|
|
2116
|
-
},
|
|
2117
|
-
placeholder:
|
|
2118
|
-
mask:
|
|
2119
|
-
class: { "is-invalid":
|
|
2120
|
-
modelValue:
|
|
2121
|
-
"onUpdate:modelValue": n[3] || (n[3] = (
|
|
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),
|
|
2122
2159
|
onComplete: i,
|
|
2123
|
-
onBlur: c(
|
|
2124
|
-
}), 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({
|
|
2125
2162
|
key: 3,
|
|
2126
|
-
id:
|
|
2127
|
-
},
|
|
2128
|
-
placeholder:
|
|
2129
|
-
class: { "is-invalid":
|
|
2130
|
-
modelValue:
|
|
2131
|
-
"onUpdate:modelValue": n[4] || (n[4] = (
|
|
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),
|
|
2132
2169
|
onInput: i,
|
|
2133
|
-
onBlur: c(
|
|
2134
|
-
}), null, 16, ["id", "placeholder", "class", "modelValue", "onBlur"])) :
|
|
2135
|
-
modelValue:
|
|
2136
|
-
"onUpdate:modelValue": n[5] || (n[5] = (
|
|
2137
|
-
class: { "is-invalid":
|
|
2138
|
-
}), null, 16, ["modelValue", "class"])) :
|
|
2139
|
-
modelValue:
|
|
2140
|
-
"onUpdate:modelValue": n[6] || (n[6] = (
|
|
2141
|
-
class: { "is-invalid":
|
|
2142
|
-
}), null, 16, ["modelValue", "class"])) :
|
|
2143
|
-
modelValue:
|
|
2144
|
-
"onUpdate:modelValue": n[7] || (n[7] = (
|
|
2145
|
-
class: { "is-invalid":
|
|
2146
|
-
}), null, 16, ["modelValue", "class"])) :
|
|
2147
|
-
modelValue:
|
|
2148
|
-
"onUpdate:modelValue": n[8] || (n[8] = (
|
|
2149
|
-
class: { "is-invalid":
|
|
2150
|
-
}), 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)
|
|
2151
2188
|
], 2),
|
|
2152
|
-
R(
|
|
2189
|
+
R(u("small", {
|
|
2153
2190
|
"data-cy": "error",
|
|
2154
2191
|
class: "invalid-feedback"
|
|
2155
2192
|
}, w(c(r)), 513), [
|
|
2156
|
-
[W,
|
|
2193
|
+
[W, m.value && a.type !== "multiselect" && a.type !== "datepicker"]
|
|
2157
2194
|
])
|
|
2158
2195
|
]));
|
|
2159
2196
|
};
|
|
2160
2197
|
}
|
|
2161
|
-
}),
|
|
2198
|
+
}), Ni = /* @__PURE__ */ S({
|
|
2162
2199
|
__name: "ForgeChip",
|
|
2163
2200
|
props: {
|
|
2164
2201
|
chipSeverity: { default: "primary" },
|
|
@@ -2174,34 +2211,34 @@ const Fa = { key: 0 }, Ba = {
|
|
|
2174
2211
|
unstyled: { type: Boolean }
|
|
2175
2212
|
},
|
|
2176
2213
|
setup(e) {
|
|
2177
|
-
const
|
|
2214
|
+
const t = e, a = C(() => ({
|
|
2178
2215
|
root: [
|
|
2179
2216
|
"badge d-inline-flex align-items-center border me-1 p-1",
|
|
2180
2217
|
{
|
|
2181
|
-
"rounded-pill":
|
|
2218
|
+
"rounded-pill": t.pill
|
|
2182
2219
|
},
|
|
2183
2220
|
{
|
|
2184
|
-
"bg-primary-subtle border-primary text-primary":
|
|
2185
|
-
"bg-brand-subtle border-brand text-brand":
|
|
2186
|
-
"bg-secondary-subtle border-secondary text-secondary":
|
|
2187
|
-
"bg-success-subtle border-success text-success":
|
|
2188
|
-
"bg-warning-subtle border-warning text-warning":
|
|
2189
|
-
"bg-danger-subtle border-danger text-danger":
|
|
2190
|
-
"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"
|
|
2191
2228
|
}
|
|
2192
2229
|
]
|
|
2193
2230
|
}));
|
|
2194
2231
|
return (i, l) => {
|
|
2195
|
-
const o =
|
|
2196
|
-
return
|
|
2197
|
-
default:
|
|
2198
|
-
(
|
|
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))
|
|
2199
2236
|
]),
|
|
2200
2237
|
_: 3
|
|
2201
2238
|
}, 16, ["pt"]);
|
|
2202
2239
|
};
|
|
2203
2240
|
}
|
|
2204
|
-
}),
|
|
2241
|
+
}), Xt = /* @__PURE__ */ S({
|
|
2205
2242
|
__name: "ForgeProgressBar",
|
|
2206
2243
|
props: {
|
|
2207
2244
|
severity: { default: "primary" },
|
|
@@ -2217,8 +2254,8 @@ const Fa = { key: 0 }, Ba = {
|
|
|
2217
2254
|
unstyled: { type: Boolean }
|
|
2218
2255
|
},
|
|
2219
2256
|
setup(e) {
|
|
2220
|
-
const
|
|
2221
|
-
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) {
|
|
2222
2259
|
case "brand":
|
|
2223
2260
|
return "bg-brand";
|
|
2224
2261
|
case "secondary":
|
|
@@ -2236,41 +2273,517 @@ const Fa = { key: 0 }, Ba = {
|
|
|
2236
2273
|
default:
|
|
2237
2274
|
return "bg-primary";
|
|
2238
2275
|
}
|
|
2239
|
-
}), o =
|
|
2276
|
+
}), o = C(() => ({
|
|
2240
2277
|
root: {
|
|
2241
|
-
style:
|
|
2278
|
+
style: t.pixelWidth ? `width: ${t.pixelWidth}px` : ""
|
|
2242
2279
|
},
|
|
2243
2280
|
value: {
|
|
2244
|
-
class: [l.value,
|
|
2281
|
+
class: [l.value, a.value, i.value, "progress-bar"]
|
|
2245
2282
|
}
|
|
2246
2283
|
}));
|
|
2247
|
-
return (r,
|
|
2248
|
-
const
|
|
2249
|
-
return
|
|
2250
|
-
default:
|
|
2284
|
+
return (r, s) => {
|
|
2285
|
+
const p = De;
|
|
2286
|
+
return d(), g(p, F({ ...r.$attrs, ...t }, { pt: o.value }), {
|
|
2287
|
+
default: f(() => [
|
|
2251
2288
|
k(r.$slots, "default")
|
|
2252
2289
|
]),
|
|
2253
2290
|
_: 3
|
|
2254
2291
|
}, 16, ["pt"]);
|
|
2255
2292
|
};
|
|
2256
2293
|
}
|
|
2257
|
-
})
|
|
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({
|
|
2258
2771
|
__name: "ForgeStatWidget",
|
|
2259
2772
|
props: {
|
|
2260
2773
|
size: { default: "md" },
|
|
2261
2774
|
severity: { default: "primary" }
|
|
2262
2775
|
},
|
|
2263
2776
|
setup(e) {
|
|
2264
|
-
const
|
|
2265
|
-
return (
|
|
2266
|
-
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}`
|
|
2267
2780
|
}), [
|
|
2268
|
-
|
|
2269
|
-
k(
|
|
2781
|
+
u("span", aa, [
|
|
2782
|
+
k(a.$slots, "default")
|
|
2270
2783
|
])
|
|
2271
2784
|
], 16));
|
|
2272
2785
|
}
|
|
2273
|
-
}),
|
|
2786
|
+
}), ia = { key: 0 }, qi = /* @__PURE__ */ S({
|
|
2274
2787
|
__name: "ForgeStepper",
|
|
2275
2788
|
props: {
|
|
2276
2789
|
currentStep: { default: 1 },
|
|
@@ -2288,13 +2801,13 @@ const Fa = { key: 0 }, Ba = {
|
|
|
2288
2801
|
unstyled: { type: Boolean }
|
|
2289
2802
|
},
|
|
2290
2803
|
setup(e) {
|
|
2291
|
-
const
|
|
2804
|
+
const t = e, a = C(() => ({
|
|
2292
2805
|
header: {
|
|
2293
2806
|
class: [
|
|
2294
2807
|
"p-0 m-0 d-flex align-items-center border border-0 bg-transparent gap-1",
|
|
2295
2808
|
{
|
|
2296
|
-
"flex-row":
|
|
2297
|
-
"flex-column": !
|
|
2809
|
+
"flex-row": t.inlineSteps,
|
|
2810
|
+
"flex-column": !t.inlineSteps
|
|
2298
2811
|
}
|
|
2299
2812
|
]
|
|
2300
2813
|
},
|
|
@@ -2303,7 +2816,7 @@ const Fa = { key: 0 }, Ba = {
|
|
|
2303
2816
|
"step mb-2 d-flex align-items-center justify-content-center",
|
|
2304
2817
|
{
|
|
2305
2818
|
inactive: i.disabled,
|
|
2306
|
-
[`bg-${
|
|
2819
|
+
[`bg-${t.severity} text-white`]: i.active
|
|
2307
2820
|
}
|
|
2308
2821
|
]
|
|
2309
2822
|
}),
|
|
@@ -2312,36 +2825,36 @@ const Fa = { key: 0 }, Ba = {
|
|
|
2312
2825
|
"h5",
|
|
2313
2826
|
{
|
|
2314
2827
|
inactive: i.disabled,
|
|
2315
|
-
[`border-bottom border-2 border-${
|
|
2828
|
+
[`border-bottom border-2 border-${t.severity}`]: i.active
|
|
2316
2829
|
}
|
|
2317
2830
|
]
|
|
2318
2831
|
})
|
|
2319
2832
|
}));
|
|
2320
|
-
return (i, l) => (
|
|
2321
|
-
default:
|
|
2322
|
-
|
|
2323
|
-
default:
|
|
2324
|
-
(
|
|
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({
|
|
2325
2838
|
key: o.value,
|
|
2326
2839
|
value: o.value,
|
|
2327
2840
|
disabled: o.disabled,
|
|
2328
2841
|
ref_for: !0
|
|
2329
|
-
}, { ...i.$attrs }, { pt:
|
|
2330
|
-
default:
|
|
2331
|
-
i.showStepLabel ? (
|
|
2842
|
+
}, { ...i.$attrs }, { pt: a.value }), {
|
|
2843
|
+
default: f(() => [
|
|
2844
|
+
i.showStepLabel ? (d(), v("div", ia, w(o.label), 1)) : z("", !0)
|
|
2332
2845
|
]),
|
|
2333
2846
|
_: 2
|
|
2334
2847
|
}, 1040, ["value", "disabled", "pt"]))), 128))
|
|
2335
2848
|
]),
|
|
2336
2849
|
_: 1
|
|
2337
2850
|
}),
|
|
2338
|
-
|
|
2339
|
-
default:
|
|
2340
|
-
(
|
|
2851
|
+
y(c(qe), null, {
|
|
2852
|
+
default: f(() => [
|
|
2853
|
+
(d(!0), v(O, null, A(i.steps, (o) => (d(), g(c(Ae), {
|
|
2341
2854
|
key: o.value,
|
|
2342
2855
|
value: o.value
|
|
2343
2856
|
}, {
|
|
2344
|
-
default:
|
|
2857
|
+
default: f(() => [
|
|
2345
2858
|
k(i.$slots, "step" + o.value)
|
|
2346
2859
|
]),
|
|
2347
2860
|
_: 2
|
|
@@ -2353,7 +2866,7 @@ const Fa = { key: 0 }, Ba = {
|
|
|
2353
2866
|
_: 3
|
|
2354
2867
|
}, 8, ["value"]));
|
|
2355
2868
|
}
|
|
2356
|
-
}),
|
|
2869
|
+
}), la = { class: "p-4 text-wrap w-100" }, oa = { class: "p-4 text-wrap w-100" }, Li = /* @__PURE__ */ S({
|
|
2357
2870
|
__name: "ForgeTile",
|
|
2358
2871
|
props: {
|
|
2359
2872
|
severity: { default: "primary" },
|
|
@@ -2362,48 +2875,48 @@ const Fa = { key: 0 }, Ba = {
|
|
|
2362
2875
|
selected: { type: Boolean, default: !1 }
|
|
2363
2876
|
},
|
|
2364
2877
|
setup(e) {
|
|
2365
|
-
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" : ""}`);
|
|
2366
2879
|
return (l, o) => {
|
|
2367
|
-
const r =
|
|
2368
|
-
return
|
|
2880
|
+
const r = N;
|
|
2881
|
+
return t.clickable ? (d(), g(r, {
|
|
2369
2882
|
key: 0,
|
|
2370
|
-
class:
|
|
2371
|
-
severity:
|
|
2883
|
+
class: B(["d-flex w-100 p-0 text-body", a.value]),
|
|
2884
|
+
severity: t.severity,
|
|
2372
2885
|
unstyled: "",
|
|
2373
2886
|
"data-cy": "button-tile"
|
|
2374
2887
|
}, {
|
|
2375
|
-
default:
|
|
2376
|
-
|
|
2888
|
+
default: f(() => [
|
|
2889
|
+
u("div", la, [
|
|
2377
2890
|
k(l.$slots, "default", {}, () => [
|
|
2378
|
-
o[0] || (o[0] =
|
|
2891
|
+
o[0] || (o[0] = _("Tile Content"))
|
|
2379
2892
|
])
|
|
2380
2893
|
])
|
|
2381
2894
|
]),
|
|
2382
2895
|
_: 3
|
|
2383
|
-
}, 8, ["severity", "class"])) : (
|
|
2896
|
+
}, 8, ["severity", "class"])) : (d(), v("div", {
|
|
2384
2897
|
key: 1,
|
|
2385
|
-
class:
|
|
2898
|
+
class: B(["d-flex w-100", i.value]),
|
|
2386
2899
|
"data-cy": "tile"
|
|
2387
2900
|
}, [
|
|
2388
|
-
|
|
2901
|
+
u("div", oa, [
|
|
2389
2902
|
k(l.$slots, "default", {}, () => [
|
|
2390
|
-
o[1] || (o[1] =
|
|
2903
|
+
o[1] || (o[1] = _("Tile Content"))
|
|
2391
2904
|
])
|
|
2392
2905
|
])
|
|
2393
2906
|
], 2));
|
|
2394
2907
|
};
|
|
2395
2908
|
}
|
|
2396
2909
|
});
|
|
2397
|
-
function
|
|
2398
|
-
return e > 1 ? `${
|
|
2910
|
+
function Z(e, t) {
|
|
2911
|
+
return e > 1 ? `${t}s` : t;
|
|
2399
2912
|
}
|
|
2400
|
-
const
|
|
2913
|
+
const na = {
|
|
2401
2914
|
class: "d-flex justify-content-start align-items-baseline",
|
|
2402
2915
|
"data-cy": "pagination-header"
|
|
2403
|
-
},
|
|
2916
|
+
}, sa = { class: "ms-2" }, ra = { key: 0 }, da = {
|
|
2404
2917
|
class: "w-auto",
|
|
2405
2918
|
"data-cy": "total"
|
|
2406
|
-
},
|
|
2919
|
+
}, pa = /* @__PURE__ */ S({
|
|
2407
2920
|
__name: "ForgePaginationHeader",
|
|
2408
2921
|
props: {
|
|
2409
2922
|
total: {},
|
|
@@ -2411,33 +2924,33 @@ const et = {
|
|
|
2411
2924
|
perPage: { default: 10 }
|
|
2412
2925
|
},
|
|
2413
2926
|
emits: ["update:perPage"],
|
|
2414
|
-
setup(e, { emit:
|
|
2415
|
-
const
|
|
2416
|
-
|
|
2417
|
-
}, o =
|
|
2927
|
+
setup(e, { emit: t }) {
|
|
2928
|
+
const a = t, i = e, l = (r) => {
|
|
2929
|
+
a("update:perPage", r.value);
|
|
2930
|
+
}, o = C(() => {
|
|
2418
2931
|
const r = Math.ceil(i.total / i.perPage);
|
|
2419
|
-
return `${r} ${
|
|
2932
|
+
return `${r} ${Z(r, "page")}`;
|
|
2420
2933
|
});
|
|
2421
|
-
return (r,
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
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), {
|
|
2425
2938
|
options: i.pageSizes,
|
|
2426
2939
|
"model-value": i.perPage,
|
|
2427
2940
|
class: "page-size",
|
|
2428
|
-
onChange:
|
|
2941
|
+
onChange: s[0] || (s[0] = (p) => l(p))
|
|
2429
2942
|
}, null, 8, ["options", "model-value"])
|
|
2430
2943
|
]),
|
|
2431
|
-
i.total ? (
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
])) :
|
|
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)
|
|
2435
2948
|
]));
|
|
2436
2949
|
}
|
|
2437
|
-
}),
|
|
2950
|
+
}), ca = { class: "position-relative" }, ma = { "data-cy": "above-table-slot" }, ua = { class: "d-flex w-100" }, va = {
|
|
2438
2951
|
class: "mx-auto",
|
|
2439
2952
|
"data-cy": "empty-message"
|
|
2440
|
-
},
|
|
2953
|
+
}, fa = { class: "d-flex" }, ga = { class: "d-flex align-items-end mb-2" }, ba = { key: 0 }, xa = { class: "ms-auto" }, Ei = /* @__PURE__ */ S({
|
|
2441
2954
|
__name: "ForgeTable",
|
|
2442
2955
|
props: {
|
|
2443
2956
|
value: {},
|
|
@@ -2522,18 +3035,18 @@ const et = {
|
|
|
2522
3035
|
unstyled: { type: Boolean }
|
|
2523
3036
|
},
|
|
2524
3037
|
emits: ["update:filters", "update:tableContext", "sort", "page"],
|
|
2525
|
-
setup(e, { emit:
|
|
2526
|
-
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({
|
|
2527
3040
|
filters: i.filters,
|
|
2528
3041
|
perPage: r.value,
|
|
2529
3042
|
page: 0,
|
|
2530
3043
|
sortDirection: "None",
|
|
2531
3044
|
sortField: "",
|
|
2532
3045
|
total: i.totalRecords ?? i.value.length
|
|
2533
|
-
}),
|
|
2534
|
-
const
|
|
2535
|
-
return `${
|
|
2536
|
-
}),
|
|
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(() => ({
|
|
2537
3050
|
thead: () => ({
|
|
2538
3051
|
class: [
|
|
2539
3052
|
{
|
|
@@ -2559,148 +3072,148 @@ const et = {
|
|
|
2559
3072
|
if (i.clearAll)
|
|
2560
3073
|
i.clearAll();
|
|
2561
3074
|
else
|
|
2562
|
-
for (const
|
|
2563
|
-
typeof i.filters[
|
|
2564
|
-
|
|
2565
|
-
},
|
|
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
|
+
}, $ = () => {
|
|
2566
3079
|
l.value.exportCSV();
|
|
2567
|
-
},
|
|
2568
|
-
var
|
|
2569
|
-
|
|
2570
|
-
},
|
|
2571
|
-
|
|
2572
|
-
},
|
|
2573
|
-
|
|
2574
|
-
},
|
|
2575
|
-
|
|
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);
|
|
2576
3089
|
};
|
|
2577
|
-
return
|
|
2578
|
-
|
|
2579
|
-
}, { deep: !0 }),
|
|
2580
|
-
|
|
2581
|
-
k(
|
|
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")
|
|
2582
3095
|
]),
|
|
2583
|
-
|
|
3096
|
+
y(c(Le), F({
|
|
2584
3097
|
class: ["w-100", `${i.severity ? `forge-table-${i.severity}` : ""}`]
|
|
2585
|
-
}, { ...i, ...
|
|
2586
|
-
pt:
|
|
3098
|
+
}, { ...i, ...x.$attrs }, {
|
|
3099
|
+
pt: b.value,
|
|
2587
3100
|
rows: r.value,
|
|
2588
|
-
"total-records":
|
|
3101
|
+
"total-records": p.value,
|
|
2589
3102
|
"filter-display": i.filters ? "row" : void 0,
|
|
2590
3103
|
ref_key: "forgeTable",
|
|
2591
3104
|
ref: l,
|
|
2592
3105
|
"data-cy": "table",
|
|
2593
|
-
"onUpdate:filters":
|
|
2594
|
-
onSort:
|
|
2595
|
-
onPage:
|
|
3106
|
+
"onUpdate:filters": V,
|
|
3107
|
+
onSort: T,
|
|
3108
|
+
onPage: M,
|
|
2596
3109
|
showHeaders: ""
|
|
2597
|
-
}),
|
|
2598
|
-
empty:
|
|
2599
|
-
|
|
2600
|
-
|
|
3110
|
+
}), ae({
|
|
3111
|
+
empty: f(() => [
|
|
3112
|
+
u("div", ua, [
|
|
3113
|
+
u("h5", va, w(x.emptyMessage ?? "No items Found."), 1)
|
|
2601
3114
|
])
|
|
2602
3115
|
]),
|
|
2603
|
-
header:
|
|
2604
|
-
|
|
2605
|
-
class:
|
|
3116
|
+
header: f(() => [
|
|
3117
|
+
u("div", {
|
|
3118
|
+
class: B(i.loading ? "opacity-50" : "")
|
|
2606
3119
|
}, [
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
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,
|
|
2612
3125
|
"page-sizes": o.value,
|
|
2613
3126
|
"per-page": r.value,
|
|
2614
3127
|
"onUpdate:perPage": [
|
|
2615
|
-
|
|
2616
|
-
|
|
3128
|
+
h[0] || (h[0] = (L) => r.value = L),
|
|
3129
|
+
I
|
|
2617
3130
|
]
|
|
2618
3131
|
}, null, 8, ["total", "page-sizes", "per-page"])
|
|
2619
|
-
])) :
|
|
3132
|
+
])) : z("", !0)
|
|
2620
3133
|
]),
|
|
2621
|
-
|
|
2622
|
-
|
|
3134
|
+
u("div", xa, [
|
|
3135
|
+
x.showClearButton ? (d(), g(c(N), {
|
|
2623
3136
|
key: 0,
|
|
2624
3137
|
outlined: "",
|
|
2625
|
-
class:
|
|
3138
|
+
class: B(x.showExporterButton ? "me-2" : ""),
|
|
2626
3139
|
onClick: n,
|
|
2627
3140
|
"data-cy": "clear-all"
|
|
2628
3141
|
}, {
|
|
2629
|
-
default:
|
|
2630
|
-
|
|
3142
|
+
default: f(() => [
|
|
3143
|
+
y(c(j), {
|
|
2631
3144
|
icon: "bi:funnel-fill",
|
|
2632
3145
|
width: "24",
|
|
2633
3146
|
height: "24"
|
|
2634
3147
|
}),
|
|
2635
|
-
|
|
3148
|
+
h[2] || (h[2] = _(" Clear "))
|
|
2636
3149
|
]),
|
|
2637
3150
|
_: 1
|
|
2638
|
-
}, 8, ["class"])) :
|
|
2639
|
-
|
|
3151
|
+
}, 8, ["class"])) : z("", !0),
|
|
3152
|
+
x.showExporterButton ? (d(), g(c(N), {
|
|
2640
3153
|
key: 1,
|
|
2641
3154
|
outlined: "",
|
|
2642
|
-
onClick:
|
|
3155
|
+
onClick: $,
|
|
2643
3156
|
"data-cy": "exporter"
|
|
2644
3157
|
}, {
|
|
2645
|
-
default:
|
|
2646
|
-
|
|
3158
|
+
default: f(() => [
|
|
3159
|
+
y(c(j), {
|
|
2647
3160
|
icon: "typcn:export",
|
|
2648
3161
|
width: "24",
|
|
2649
3162
|
height: "24"
|
|
2650
3163
|
}),
|
|
2651
|
-
|
|
3164
|
+
h[3] || (h[3] = _(" Export "))
|
|
2652
3165
|
]),
|
|
2653
3166
|
_: 1
|
|
2654
|
-
})) :
|
|
2655
|
-
k(
|
|
3167
|
+
})) : z("", !0),
|
|
3168
|
+
k(x.$slots, "column-customiser")
|
|
2656
3169
|
])
|
|
2657
3170
|
])
|
|
2658
3171
|
], 2)
|
|
2659
3172
|
]),
|
|
2660
|
-
default:
|
|
2661
|
-
k(
|
|
3173
|
+
default: f(() => [
|
|
3174
|
+
k(x.$slots, "default")
|
|
2662
3175
|
]),
|
|
2663
3176
|
_: 2
|
|
2664
3177
|
}, [
|
|
2665
|
-
|
|
2666
|
-
name:
|
|
2667
|
-
fn:
|
|
2668
|
-
k(
|
|
3178
|
+
A(x.$slots, (L, J) => ({
|
|
3179
|
+
name: J,
|
|
3180
|
+
fn: f((ye) => [
|
|
3181
|
+
k(x.$slots, J, X(Q(ye || {})))
|
|
2669
3182
|
])
|
|
2670
3183
|
})),
|
|
2671
|
-
|
|
3184
|
+
x.legacyPaginationFooter ? {
|
|
2672
3185
|
name: "paginatorstart",
|
|
2673
|
-
fn:
|
|
2674
|
-
|
|
2675
|
-
class:
|
|
3186
|
+
fn: f(() => [
|
|
3187
|
+
u("span", {
|
|
3188
|
+
class: B(["d-flex", i.loading ? "opacity-50" : ""]),
|
|
2676
3189
|
"data-cy": "legacy-page-size"
|
|
2677
3190
|
}, [
|
|
2678
|
-
|
|
2679
|
-
|
|
3191
|
+
h[4] || (h[4] = u("span", { class: "me-2 my-auto text-nowrap" }, "Page Size:", -1)),
|
|
3192
|
+
y(c(te), {
|
|
2680
3193
|
options: o.value,
|
|
2681
3194
|
modelValue: r.value,
|
|
2682
|
-
"onUpdate:modelValue":
|
|
3195
|
+
"onUpdate:modelValue": h[1] || (h[1] = (L) => r.value = L),
|
|
2683
3196
|
class: "ms-2",
|
|
2684
|
-
onClick:
|
|
3197
|
+
onClick: I
|
|
2685
3198
|
}, null, 8, ["options", "modelValue"])
|
|
2686
3199
|
], 2)
|
|
2687
3200
|
]),
|
|
2688
3201
|
key: "0"
|
|
2689
3202
|
} : void 0,
|
|
2690
|
-
|
|
3203
|
+
x.legacyPaginationFooter ? {
|
|
2691
3204
|
name: "paginatorend",
|
|
2692
|
-
fn:
|
|
2693
|
-
|
|
3205
|
+
fn: f(() => [
|
|
3206
|
+
u("span", {
|
|
2694
3207
|
"data-cy": "legacy-total",
|
|
2695
|
-
class:
|
|
2696
|
-
}, w(
|
|
3208
|
+
class: B(i.loading ? "opacity-50" : "")
|
|
3209
|
+
}, w(p.value) + " " + w(c(Z)(p.value, "result")) + " across " + w(m.value), 3)
|
|
2697
3210
|
]),
|
|
2698
3211
|
key: "1"
|
|
2699
3212
|
} : void 0
|
|
2700
3213
|
]), 1040, ["class", "pt", "rows", "total-records", "filter-display"])
|
|
2701
3214
|
]));
|
|
2702
3215
|
}
|
|
2703
|
-
}),
|
|
3216
|
+
}), ya = { class: "d-flex position-relative" }, ha = { class: "d-flex w-100" }, Ri = /* @__PURE__ */ S({
|
|
2704
3217
|
__name: "ForgeFilterHeader",
|
|
2705
3218
|
props: /* @__PURE__ */ q({
|
|
2706
3219
|
dataType: {},
|
|
@@ -2715,56 +3228,56 @@ const et = {
|
|
|
2715
3228
|
}),
|
|
2716
3229
|
emits: ["update:modelValue"],
|
|
2717
3230
|
setup(e) {
|
|
2718
|
-
const
|
|
3231
|
+
const t = D(e, "modelValue"), a = (l, o) => {
|
|
2719
3232
|
if (!l || Array.isArray(l) && l.length === 0)
|
|
2720
3233
|
return o;
|
|
2721
|
-
const r = (
|
|
2722
|
-
var
|
|
2723
|
-
const
|
|
2724
|
-
(
|
|
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])
|
|
2725
3238
|
);
|
|
2726
|
-
return e.optionLabel ?
|
|
3239
|
+
return e.optionLabel ? p[e.optionLabel] : p;
|
|
2727
3240
|
};
|
|
2728
3241
|
return Array.isArray(l) ? l.map(r).join(", ") : r(l);
|
|
2729
3242
|
}, i = () => {
|
|
2730
|
-
e.clearFilter ? e.clearFilter() :
|
|
3243
|
+
e.clearFilter ? e.clearFilter() : t.value = null;
|
|
2731
3244
|
};
|
|
2732
3245
|
return (l, o) => {
|
|
2733
|
-
const r =
|
|
2734
|
-
return
|
|
2735
|
-
l.dataType === "numeric" ? (
|
|
3246
|
+
const r = ce, s = N;
|
|
3247
|
+
return d(), v("div", ya, [
|
|
3248
|
+
l.dataType === "numeric" ? (d(), g(r, F({
|
|
2736
3249
|
key: 0,
|
|
2737
|
-
modelValue:
|
|
2738
|
-
"onUpdate:modelValue": o[0] || (o[0] = (
|
|
2739
|
-
}, 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({
|
|
2740
3253
|
key: 1,
|
|
2741
|
-
modelValue:
|
|
2742
|
-
"onUpdate:modelValue": o[1] || (o[1] = (
|
|
3254
|
+
modelValue: t.value,
|
|
3255
|
+
"onUpdate:modelValue": o[1] || (o[1] = (p) => t.value = p)
|
|
2743
3256
|
}, l.$attrs, {
|
|
2744
3257
|
"show-icon": !1,
|
|
2745
3258
|
"show-on-focus": !0
|
|
2746
|
-
}), null, 16, ["modelValue"])) : l.dataType === "select" ? (
|
|
3259
|
+
}), null, 16, ["modelValue"])) : l.dataType === "select" ? (d(), g(c(te), F({
|
|
2747
3260
|
key: 2,
|
|
2748
|
-
modelValue:
|
|
2749
|
-
"onUpdate:modelValue": o[2] || (o[2] = (
|
|
3261
|
+
modelValue: t.value,
|
|
3262
|
+
"onUpdate:modelValue": o[2] || (o[2] = (p) => t.value = p)
|
|
2750
3263
|
}, l.$attrs, {
|
|
2751
3264
|
options: l.dropdownOptions,
|
|
2752
3265
|
"option-value": l.optionValue,
|
|
2753
3266
|
"option-label": l.optionLabel
|
|
2754
3267
|
}), {
|
|
2755
|
-
value:
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
class:
|
|
2759
|
-
}, w(
|
|
2760
|
-
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, {
|
|
2761
3274
|
key: 0,
|
|
2762
|
-
onClick:
|
|
3275
|
+
onClick: Y(i, ["prevent"]),
|
|
2763
3276
|
size: "small",
|
|
2764
3277
|
class: "bg-transparent border-0 ms-auto p-0 pe-1"
|
|
2765
3278
|
}, {
|
|
2766
|
-
default:
|
|
2767
|
-
|
|
3279
|
+
default: f(() => [
|
|
3280
|
+
y(c(j), {
|
|
2768
3281
|
icon: "bi:x",
|
|
2769
3282
|
width: "1rem",
|
|
2770
3283
|
height: "1rem",
|
|
@@ -2772,33 +3285,33 @@ const et = {
|
|
|
2772
3285
|
})
|
|
2773
3286
|
]),
|
|
2774
3287
|
_: 1
|
|
2775
|
-
})) :
|
|
3288
|
+
})) : z("", !0)
|
|
2776
3289
|
])
|
|
2777
3290
|
]),
|
|
2778
3291
|
_: 1
|
|
2779
|
-
}, 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({
|
|
2780
3293
|
key: 3,
|
|
2781
|
-
modelValue:
|
|
2782
|
-
"onUpdate:modelValue": o[3] || (o[3] = (
|
|
3294
|
+
modelValue: t.value,
|
|
3295
|
+
"onUpdate:modelValue": o[3] || (o[3] = (p) => t.value = p)
|
|
2783
3296
|
}, l.$attrs, {
|
|
2784
3297
|
options: l.dropdownOptions,
|
|
2785
3298
|
showToggleAll: !1,
|
|
2786
3299
|
"option-label": l.optionLabel,
|
|
2787
3300
|
"option-value": l.optionValue,
|
|
2788
3301
|
filter: ""
|
|
2789
|
-
}), null, 16, ["modelValue", "options", "option-label", "option-value"])) : (
|
|
3302
|
+
}), null, 16, ["modelValue", "options", "option-label", "option-value"])) : (d(), g(c(le), F({
|
|
2790
3303
|
key: 4,
|
|
2791
|
-
modelValue:
|
|
2792
|
-
"onUpdate:modelValue": o[4] || (o[4] = (
|
|
3304
|
+
modelValue: t.value,
|
|
3305
|
+
"onUpdate:modelValue": o[4] || (o[4] = (p) => t.value = p)
|
|
2793
3306
|
}, l.$attrs), null, 16, ["modelValue"])),
|
|
2794
|
-
l.showClearButton &&
|
|
3307
|
+
l.showClearButton && t.value !== null && l.dataType !== "select" && l.dataType !== "multiselect" && l.dataType !== "date" ? (d(), g(s, {
|
|
2795
3308
|
key: 5,
|
|
2796
|
-
onClick:
|
|
3309
|
+
onClick: Y(i, ["prevent"]),
|
|
2797
3310
|
size: "small",
|
|
2798
3311
|
class: "bg-transparent border-0 ms-auto p-0 pe-1 position-absolute end-0 top-0 bottom-0"
|
|
2799
3312
|
}, {
|
|
2800
|
-
default:
|
|
2801
|
-
|
|
3313
|
+
default: f(() => [
|
|
3314
|
+
y(c(j), {
|
|
2802
3315
|
icon: "bi:x",
|
|
2803
3316
|
width: "1rem",
|
|
2804
3317
|
height: "1rem",
|
|
@@ -2806,7 +3319,7 @@ const et = {
|
|
|
2806
3319
|
})
|
|
2807
3320
|
]),
|
|
2808
3321
|
_: 1
|
|
2809
|
-
})) :
|
|
3322
|
+
})) : z("", !0)
|
|
2810
3323
|
]);
|
|
2811
3324
|
};
|
|
2812
3325
|
}
|
|
@@ -3863,113 +4376,113 @@ const re = {
|
|
|
3863
4376
|
"video/webm": ["webm"]
|
|
3864
4377
|
};
|
|
3865
4378
|
Object.freeze(re);
|
|
3866
|
-
var
|
|
3867
|
-
if (
|
|
3868
|
-
if (typeof
|
|
3869
|
-
return
|
|
3870
|
-
}, H,
|
|
3871
|
-
class
|
|
3872
|
-
constructor(...
|
|
3873
|
-
H.set(this, /* @__PURE__ */ new Map()),
|
|
3874
|
-
for (const
|
|
3875
|
-
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);
|
|
3876
4389
|
}
|
|
3877
|
-
define(
|
|
3878
|
-
for (let [i, l] of Object.entries(
|
|
3879
|
-
i = i.toLowerCase(), l = l.map((
|
|
3880
|
-
const o =
|
|
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);
|
|
3881
4394
|
let r = !0;
|
|
3882
|
-
for (let
|
|
3883
|
-
const
|
|
3884
|
-
if (
|
|
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)
|
|
3885
4398
|
continue;
|
|
3886
|
-
const
|
|
3887
|
-
if (
|
|
3888
|
-
throw new Error(`"${i} -> ${
|
|
3889
|
-
|
|
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);
|
|
3890
4403
|
}
|
|
3891
4404
|
}
|
|
3892
4405
|
return this;
|
|
3893
4406
|
}
|
|
3894
|
-
getType(
|
|
3895
|
-
if (typeof
|
|
4407
|
+
getType(t) {
|
|
4408
|
+
if (typeof t != "string")
|
|
3896
4409
|
return null;
|
|
3897
|
-
const
|
|
3898
|
-
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;
|
|
3899
4412
|
}
|
|
3900
|
-
getExtension(
|
|
3901
|
-
var
|
|
3902
|
-
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);
|
|
3903
4416
|
}
|
|
3904
|
-
getAllExtensions(
|
|
3905
|
-
return typeof
|
|
4417
|
+
getAllExtensions(t) {
|
|
4418
|
+
return typeof t != "string" ? null : U(this, E, "f").get(t.toLowerCase()) ?? null;
|
|
3906
4419
|
}
|
|
3907
4420
|
_freeze() {
|
|
3908
4421
|
this.define = () => {
|
|
3909
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");
|
|
3910
4423
|
}, Object.freeze(this);
|
|
3911
|
-
for (const
|
|
3912
|
-
Object.freeze(
|
|
4424
|
+
for (const t of U(this, E, "f").values())
|
|
4425
|
+
Object.freeze(t);
|
|
3913
4426
|
return this;
|
|
3914
4427
|
}
|
|
3915
4428
|
_getTestState() {
|
|
3916
4429
|
return {
|
|
3917
|
-
types:
|
|
3918
|
-
extensions:
|
|
4430
|
+
types: U(this, H, "f"),
|
|
4431
|
+
extensions: U(this, G, "f")
|
|
3919
4432
|
};
|
|
3920
4433
|
}
|
|
3921
4434
|
}
|
|
3922
|
-
H = /* @__PURE__ */ new WeakMap(),
|
|
3923
|
-
new
|
|
3924
|
-
function xe(e,
|
|
3925
|
-
const l =
|
|
3926
|
-
return
|
|
3927
|
-
const r = l.findIndex((
|
|
3928
|
-
let
|
|
3929
|
-
r === -1 ? ((!
|
|
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({
|
|
3930
4443
|
file: o,
|
|
3931
|
-
status:
|
|
4444
|
+
status: s,
|
|
3932
4445
|
blobFileName: null
|
|
3933
|
-
})) :
|
|
3934
|
-
}),
|
|
4446
|
+
})) : t[r].status = "Duplicate";
|
|
4447
|
+
}), t;
|
|
3935
4448
|
}
|
|
3936
|
-
async function
|
|
3937
|
-
if (e === "Uploaded" &&
|
|
4449
|
+
async function wa(e, t) {
|
|
4450
|
+
if (e === "Uploaded" && t !== null)
|
|
3938
4451
|
try {
|
|
3939
|
-
await new
|
|
3940
|
-
} catch (
|
|
3941
|
-
if (
|
|
4452
|
+
await new me(t).delete();
|
|
4453
|
+
} catch (a) {
|
|
4454
|
+
if (a !== "BlobNotFound") {
|
|
3942
4455
|
e = "DeleteFileFailed";
|
|
3943
4456
|
return;
|
|
3944
4457
|
}
|
|
3945
4458
|
}
|
|
3946
4459
|
}
|
|
3947
|
-
function
|
|
3948
|
-
const i =
|
|
4460
|
+
function de(e, t = !0, a = 1) {
|
|
4461
|
+
const i = t ? 1e3 : 1024;
|
|
3949
4462
|
if (Math.abs(e) < i)
|
|
3950
4463
|
return e + " B";
|
|
3951
|
-
const l =
|
|
4464
|
+
const l = t ? ["kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"] : ["KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"];
|
|
3952
4465
|
let o = -1;
|
|
3953
|
-
const r = 10 **
|
|
4466
|
+
const r = 10 ** a;
|
|
3954
4467
|
do
|
|
3955
4468
|
e /= i, ++o;
|
|
3956
4469
|
while (Math.round(Math.abs(e) * r) / r >= i && o < l.length - 1);
|
|
3957
|
-
return e.toFixed(
|
|
4470
|
+
return e.toFixed(a) + " " + l[o];
|
|
3958
4471
|
}
|
|
3959
|
-
function
|
|
4472
|
+
function ka(e) {
|
|
3960
4473
|
return ["image/gif", "image/png", "image/jpeg", "image/svg"].includes(e);
|
|
3961
4474
|
}
|
|
3962
|
-
function
|
|
4475
|
+
function $a(e) {
|
|
3963
4476
|
return URL.createObjectURL(e);
|
|
3964
4477
|
}
|
|
3965
|
-
function
|
|
3966
|
-
const e = new
|
|
4478
|
+
function Ba() {
|
|
4479
|
+
const e = new be(re, se);
|
|
3967
4480
|
return e.define({ "application/vnd.ms-outlook": ["pst"] }), e;
|
|
3968
4481
|
}
|
|
3969
|
-
const
|
|
4482
|
+
const Sa = { class: "d-flex justify-content-between" }, Fa = ["accept", "disabled", "multiple"], za = {
|
|
3970
4483
|
class: "text-break accepted-file-types-container",
|
|
3971
4484
|
id: "accepted-file-types-overlay"
|
|
3972
|
-
},
|
|
4485
|
+
}, Ca = /* @__PURE__ */ S({
|
|
3973
4486
|
__name: "UploadButton",
|
|
3974
4487
|
props: /* @__PURE__ */ q({
|
|
3975
4488
|
acceptedFileTypes: {},
|
|
@@ -3981,71 +4494,71 @@ const yt = { class: "d-flex justify-content-between" }, ht = ["accept", "disable
|
|
|
3981
4494
|
}),
|
|
3982
4495
|
emits: ["update:modelValue"],
|
|
3983
4496
|
setup(e) {
|
|
3984
|
-
const
|
|
3985
|
-
|
|
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);
|
|
3986
4499
|
};
|
|
3987
|
-
return (r,
|
|
3988
|
-
const
|
|
3989
|
-
return
|
|
4500
|
+
return (r, s) => {
|
|
4501
|
+
const p = N;
|
|
4502
|
+
return d(), v("div", Sa, [
|
|
3990
4503
|
k(r.$slots, "message"),
|
|
3991
|
-
|
|
3992
|
-
|
|
4504
|
+
u("div", null, [
|
|
4505
|
+
u("input", {
|
|
3993
4506
|
id: "file-input",
|
|
3994
4507
|
type: "file",
|
|
3995
4508
|
class: "d-none",
|
|
3996
4509
|
accept: r.acceptedFileTypes.join(", "),
|
|
3997
4510
|
disabled: l.value,
|
|
3998
4511
|
multiple: r.maxFileInput > 1,
|
|
3999
|
-
onInput:
|
|
4000
|
-
}, null, 40,
|
|
4001
|
-
|
|
4002
|
-
class:
|
|
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"]),
|
|
4003
4516
|
id: "file-input-button",
|
|
4004
4517
|
for: "file-input"
|
|
4005
4518
|
}, [
|
|
4006
4519
|
k(r.$slots, "button-content", {}, () => [
|
|
4007
|
-
|
|
4520
|
+
y(c(j), {
|
|
4008
4521
|
icon: "bi:upload",
|
|
4009
4522
|
class: "me-2",
|
|
4010
4523
|
height: "20px",
|
|
4011
4524
|
width: "20px"
|
|
4012
4525
|
}),
|
|
4013
|
-
|
|
4526
|
+
s[1] || (s[1] = _(" Browse your computer "))
|
|
4014
4527
|
])
|
|
4015
4528
|
], 2)
|
|
4016
4529
|
]),
|
|
4017
|
-
r.showDragDropArea ? (
|
|
4530
|
+
r.showDragDropArea ? (d(), g(p, {
|
|
4018
4531
|
link: "",
|
|
4019
4532
|
class: "ms-auto",
|
|
4020
4533
|
key: r.acceptedFileTypes.length,
|
|
4021
4534
|
id: "accepted-file-types",
|
|
4022
4535
|
onClick: i
|
|
4023
4536
|
}, {
|
|
4024
|
-
default:
|
|
4025
|
-
|
|
4537
|
+
default: f(() => s[2] || (s[2] = [
|
|
4538
|
+
_("Accepted File Types")
|
|
4026
4539
|
])),
|
|
4027
4540
|
_: 1
|
|
4028
|
-
})) :
|
|
4029
|
-
|
|
4541
|
+
})) : z("", !0),
|
|
4542
|
+
y(c(ue), {
|
|
4030
4543
|
ref_key: "acceptedFilesOverlay",
|
|
4031
|
-
ref:
|
|
4544
|
+
ref: a
|
|
4032
4545
|
}, {
|
|
4033
|
-
default:
|
|
4034
|
-
|
|
4546
|
+
default: f(() => [
|
|
4547
|
+
u("div", za, w(r.acceptedFileTypes.map((m) => m.label ?? m.fileType.split("/").pop()).join(", ")), 1)
|
|
4035
4548
|
]),
|
|
4036
4549
|
_: 1
|
|
4037
4550
|
}, 512)
|
|
4038
4551
|
]);
|
|
4039
4552
|
};
|
|
4040
4553
|
}
|
|
4041
|
-
}),
|
|
4554
|
+
}), Ta = {
|
|
4042
4555
|
key: 0,
|
|
4043
4556
|
class: "py-4 px-3",
|
|
4044
4557
|
id: "placeholder-message"
|
|
4045
|
-
},
|
|
4558
|
+
}, ja = {
|
|
4046
4559
|
key: 1,
|
|
4047
4560
|
class: "d-flex flex-column"
|
|
4048
|
-
},
|
|
4561
|
+
}, Ia = /* @__PURE__ */ S({
|
|
4049
4562
|
__name: "DragDropArea",
|
|
4050
4563
|
props: /* @__PURE__ */ q({
|
|
4051
4564
|
maxFileInput: {},
|
|
@@ -4057,30 +4570,30 @@ const yt = { class: "d-flex justify-content-between" }, ht = ["accept", "disable
|
|
|
4057
4570
|
}),
|
|
4058
4571
|
emits: ["update:modelValue"],
|
|
4059
4572
|
setup(e) {
|
|
4060
|
-
const
|
|
4061
|
-
|
|
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);
|
|
4062
4575
|
};
|
|
4063
|
-
return (o, r) => (
|
|
4576
|
+
return (o, r) => (d(), v("div", {
|
|
4064
4577
|
id: "drag-drop-area",
|
|
4065
|
-
class:
|
|
4066
|
-
onDragleave: r[0] || (r[0] =
|
|
4067
|
-
onDragover: r[1] || (r[1] =
|
|
4068
|
-
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"])
|
|
4069
4582
|
}, [
|
|
4070
|
-
|
|
4071
|
-
|
|
4583
|
+
t.value.length === 0 ? (d(), v("div", Ta, [
|
|
4584
|
+
y(c(j), {
|
|
4072
4585
|
icon: "bi:upload",
|
|
4073
4586
|
class: "me-2",
|
|
4074
4587
|
height: "20px",
|
|
4075
4588
|
width: "20px"
|
|
4076
4589
|
}),
|
|
4077
|
-
r[2] || (r[2] =
|
|
4078
|
-
])) : (
|
|
4590
|
+
r[2] || (r[2] = _(" Drag and drop files here "))
|
|
4591
|
+
])) : (d(), v("div", ja, [
|
|
4079
4592
|
k(o.$slots, "default")
|
|
4080
4593
|
]))
|
|
4081
4594
|
], 34));
|
|
4082
4595
|
}
|
|
4083
|
-
}),
|
|
4596
|
+
}), Pa = { class: "d-flex align-items-center me-2" }, _a = /* @__PURE__ */ S({
|
|
4084
4597
|
__name: "UploadStatus",
|
|
4085
4598
|
props: {
|
|
4086
4599
|
fileSize: {},
|
|
@@ -4089,12 +4602,12 @@ const yt = { class: "d-flex justify-content-between" }, ht = ["accept", "disable
|
|
|
4089
4602
|
uploadStatus: {}
|
|
4090
4603
|
},
|
|
4091
4604
|
setup(e) {
|
|
4092
|
-
const
|
|
4605
|
+
const t = C(() => e.uploadStatus === "Failed" || e.uploadStatus === "InvalidFileType" || e.uploadStatus === "InvalidFileSize" ? "danger" : "warning"), a = C(() => {
|
|
4093
4606
|
switch (e.uploadStatus) {
|
|
4094
4607
|
case "InvalidFileType":
|
|
4095
4608
|
return "Upload Failed: File type is not accepted.";
|
|
4096
4609
|
case "InvalidFileSize":
|
|
4097
|
-
return `Upload Failed: File size exceeds the ${
|
|
4610
|
+
return `Upload Failed: File size exceeds the ${de(e.maxFileSize)} limit.`;
|
|
4098
4611
|
case "Aborted":
|
|
4099
4612
|
return "Upload Failed: User cancelled.";
|
|
4100
4613
|
case "DeleteFileFailed":
|
|
@@ -4105,41 +4618,41 @@ const yt = { class: "d-flex justify-content-between" }, ht = ["accept", "disable
|
|
|
4105
4618
|
return "Upload Failed: Connection error, please try again.";
|
|
4106
4619
|
}
|
|
4107
4620
|
});
|
|
4108
|
-
return (i, l) => (
|
|
4109
|
-
i.uploadStatus === "Uploading" ? (
|
|
4621
|
+
return (i, l) => (d(), v("div", Pa, [
|
|
4622
|
+
i.uploadStatus === "Uploading" ? (d(), g(Xt, {
|
|
4110
4623
|
key: 0,
|
|
4111
4624
|
pixelWidth: 200,
|
|
4112
4625
|
animate: "",
|
|
4113
4626
|
striped: ""
|
|
4114
4627
|
}, {
|
|
4115
|
-
default:
|
|
4116
|
-
|
|
4628
|
+
default: f(() => [
|
|
4629
|
+
_(w((i.bytesUploaded / i.fileSize * 100).toFixed(0)) + "%", 1)
|
|
4117
4630
|
]),
|
|
4118
4631
|
_: 1
|
|
4119
|
-
})) :
|
|
4120
|
-
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, {
|
|
4121
4634
|
key: 1,
|
|
4122
4635
|
id: "upload-status-alert",
|
|
4123
|
-
severity:
|
|
4636
|
+
severity: t.value,
|
|
4124
4637
|
class: "mb-0 w-75 ms-auto"
|
|
4125
4638
|
}, {
|
|
4126
|
-
default:
|
|
4127
|
-
|
|
4639
|
+
default: f(() => [
|
|
4640
|
+
_(w(a.value), 1)
|
|
4128
4641
|
]),
|
|
4129
4642
|
_: 1
|
|
4130
|
-
}, 8, ["severity"])) :
|
|
4643
|
+
}, 8, ["severity"])) : z("", !0)
|
|
4131
4644
|
]));
|
|
4132
4645
|
}
|
|
4133
|
-
}),
|
|
4646
|
+
}), Va = ["data-cy"], Ma = { class: "ms-3 d-flex flex-column" }, Da = {
|
|
4134
4647
|
key: 1,
|
|
4135
4648
|
id: "file-name"
|
|
4136
|
-
},
|
|
4649
|
+
}, Oa = {
|
|
4137
4650
|
class: "text-black-50",
|
|
4138
4651
|
id: "file-type"
|
|
4139
|
-
},
|
|
4652
|
+
}, Na = {
|
|
4140
4653
|
class: "text-black-50",
|
|
4141
4654
|
id: "file-size"
|
|
4142
|
-
},
|
|
4655
|
+
}, Ua = { class: "ms-auto my-auto d-flex" }, Aa = /* @__PURE__ */ S({
|
|
4143
4656
|
__name: "FileInfo",
|
|
4144
4657
|
props: /* @__PURE__ */ q({
|
|
4145
4658
|
editableFileName: { type: Boolean },
|
|
@@ -4157,60 +4670,60 @@ const yt = { class: "d-flex justify-content-between" }, ht = ["accept", "disable
|
|
|
4157
4670
|
uploadStatusModifiers: {}
|
|
4158
4671
|
}),
|
|
4159
4672
|
emits: /* @__PURE__ */ q(["deleted"], ["update:file", "update:blobFileName", "update:uploadStatus"]),
|
|
4160
|
-
setup(e, { emit:
|
|
4161
|
-
const
|
|
4162
|
-
r.value != null && (
|
|
4163
|
-
},
|
|
4164
|
-
if (!
|
|
4165
|
-
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";
|
|
4166
4679
|
return;
|
|
4167
4680
|
}
|
|
4168
|
-
l.value = "Preparing",
|
|
4169
|
-
const [
|
|
4170
|
-
if (!
|
|
4681
|
+
l.value = "Preparing", m.value = new AbortController();
|
|
4682
|
+
const [I, x] = await e.getFileUrlAction(a.value.name);
|
|
4683
|
+
if (!I) {
|
|
4171
4684
|
l.value = "Failed";
|
|
4172
4685
|
return;
|
|
4173
4686
|
}
|
|
4174
4687
|
try {
|
|
4175
4688
|
l.value = "Uploading";
|
|
4176
|
-
const
|
|
4177
|
-
abortSignal:
|
|
4178
|
-
onProgress: (
|
|
4689
|
+
const h = new me(I), L = {
|
|
4690
|
+
abortSignal: m.value.signal,
|
|
4691
|
+
onProgress: (J) => p.value = J.loadedBytes,
|
|
4179
4692
|
blobHTTPHeaders: {
|
|
4180
|
-
blobContentType:
|
|
4181
|
-
blobContentDisposition: `attachment; filename="${
|
|
4693
|
+
blobContentType: $.value,
|
|
4694
|
+
blobContentDisposition: `attachment; filename="${a.value.name}"`
|
|
4182
4695
|
},
|
|
4183
4696
|
tags: { temp: "true" }
|
|
4184
4697
|
};
|
|
4185
|
-
await
|
|
4186
|
-
} catch (
|
|
4187
|
-
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") {
|
|
4188
4701
|
l.value = "Aborted";
|
|
4189
4702
|
return;
|
|
4190
4703
|
}
|
|
4191
4704
|
l.value = "Failed";
|
|
4192
4705
|
}
|
|
4193
|
-
},
|
|
4194
|
-
await
|
|
4706
|
+
}, M = async () => {
|
|
4707
|
+
await wa(l.value, s.value), o("deleted", a.value);
|
|
4195
4708
|
};
|
|
4196
|
-
return
|
|
4197
|
-
e.autoUploadToBlob &&
|
|
4198
|
-
}), (
|
|
4199
|
-
const
|
|
4200
|
-
return
|
|
4709
|
+
return ie(() => {
|
|
4710
|
+
e.autoUploadToBlob && V();
|
|
4711
|
+
}), (I, x) => {
|
|
4712
|
+
const h = N;
|
|
4713
|
+
return d(), v("div", {
|
|
4201
4714
|
class: "py-4 px-3 d-flex",
|
|
4202
|
-
"data-cy": `file-info-${
|
|
4715
|
+
"data-cy": `file-info-${a.value.name}`
|
|
4203
4716
|
}, [
|
|
4204
|
-
|
|
4205
|
-
c(
|
|
4717
|
+
u("div", null, [
|
|
4718
|
+
c(ka)(a.value.type) ? (d(), g(c(Ee), {
|
|
4206
4719
|
key: 0,
|
|
4207
4720
|
id: "thumbnail-image",
|
|
4208
4721
|
"image-class": "image-file-thumbnail border",
|
|
4209
|
-
src: c(
|
|
4210
|
-
alt:
|
|
4722
|
+
src: c($a)(a.value),
|
|
4723
|
+
alt: a.value.name,
|
|
4211
4724
|
width: "75px",
|
|
4212
4725
|
preview: ""
|
|
4213
|
-
}, null, 8, ["src", "alt"])) : (
|
|
4726
|
+
}, null, 8, ["src", "alt"])) : (d(), g(c(j), {
|
|
4214
4727
|
key: 1,
|
|
4215
4728
|
id: "file-earmark",
|
|
4216
4729
|
icon: "bi:file-earmark",
|
|
@@ -4218,76 +4731,76 @@ const yt = { class: "d-flex justify-content-between" }, ht = ["accept", "disable
|
|
|
4218
4731
|
width: "75px"
|
|
4219
4732
|
}))
|
|
4220
4733
|
]),
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
|
|
4734
|
+
u("div", Ma, [
|
|
4735
|
+
u("div", null, [
|
|
4736
|
+
I.editableFileName ? (d(), g(Mt, {
|
|
4224
4737
|
key: 0,
|
|
4225
4738
|
id: "edit-file-name",
|
|
4226
4739
|
modelValue: r.value,
|
|
4227
|
-
"onUpdate:modelValue":
|
|
4228
|
-
rules:
|
|
4229
|
-
name:
|
|
4230
|
-
"complete-action":
|
|
4231
|
-
}, null, 8, ["modelValue", "rules", "name"])) : (
|
|
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))
|
|
4232
4745
|
]),
|
|
4233
|
-
|
|
4234
|
-
|
|
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)
|
|
4235
4748
|
]),
|
|
4236
|
-
|
|
4237
|
-
(
|
|
4749
|
+
u("div", Ua, [
|
|
4750
|
+
(d(), g(_a, {
|
|
4238
4751
|
key: l.value,
|
|
4239
|
-
"file-size":
|
|
4752
|
+
"file-size": a.value.size,
|
|
4240
4753
|
"upload-status": l.value,
|
|
4241
|
-
"bytes-uploaded":
|
|
4242
|
-
"max-file-size":
|
|
4754
|
+
"bytes-uploaded": p.value,
|
|
4755
|
+
"max-file-size": I.maxFileSize
|
|
4243
4756
|
}, null, 8, ["file-size", "upload-status", "bytes-uploaded", "max-file-size"])),
|
|
4244
|
-
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, {
|
|
4245
4758
|
key: 0,
|
|
4246
4759
|
link: "",
|
|
4247
|
-
onClick:
|
|
4760
|
+
onClick: V
|
|
4248
4761
|
}, {
|
|
4249
|
-
default:
|
|
4250
|
-
|
|
4762
|
+
default: f(() => [
|
|
4763
|
+
y(c(j), {
|
|
4251
4764
|
icon: l.value === "Not Uploaded" || l.value === "Duplicate" ? "bi:upload" : "bi:arrow-clockwise"
|
|
4252
4765
|
}, null, 8, ["icon"])
|
|
4253
4766
|
]),
|
|
4254
4767
|
_: 1
|
|
4255
|
-
})) :
|
|
4256
|
-
l.value === "Uploading" ? (
|
|
4768
|
+
})) : z("", !0),
|
|
4769
|
+
l.value === "Uploading" ? (d(), g(h, {
|
|
4257
4770
|
key: 1,
|
|
4258
4771
|
link: "",
|
|
4259
|
-
onClick:
|
|
4772
|
+
onClick: x[1] || (x[1] = (L) => m.value.value.abort())
|
|
4260
4773
|
}, {
|
|
4261
|
-
default:
|
|
4262
|
-
|
|
4774
|
+
default: f(() => [
|
|
4775
|
+
y(c(j), { icon: "bi:x-circle-fill" })
|
|
4263
4776
|
]),
|
|
4264
4777
|
_: 1
|
|
4265
|
-
})) : (
|
|
4778
|
+
})) : (d(), g(h, {
|
|
4266
4779
|
key: 2,
|
|
4267
4780
|
link: "",
|
|
4268
|
-
onClick:
|
|
4781
|
+
onClick: M,
|
|
4269
4782
|
id: "delete-button"
|
|
4270
4783
|
}, {
|
|
4271
|
-
default:
|
|
4272
|
-
|
|
4784
|
+
default: f(() => [
|
|
4785
|
+
y(c(j), { icon: "bi:trash" })
|
|
4273
4786
|
]),
|
|
4274
4787
|
_: 1
|
|
4275
4788
|
}))
|
|
4276
4789
|
])
|
|
4277
|
-
], 8,
|
|
4790
|
+
], 8, Va);
|
|
4278
4791
|
};
|
|
4279
4792
|
}
|
|
4280
|
-
}),
|
|
4793
|
+
}), qa = { class: "d-flex justify-content-end mt-1" }, La = { id: "max-file-size" }, Ea = /* @__PURE__ */ S({
|
|
4281
4794
|
__name: "MaxFileSize",
|
|
4282
4795
|
props: {
|
|
4283
4796
|
maxFileSize: {}
|
|
4284
4797
|
},
|
|
4285
4798
|
setup(e) {
|
|
4286
|
-
return (
|
|
4287
|
-
|
|
4799
|
+
return (t, a) => (d(), v("div", qa, [
|
|
4800
|
+
u("div", La, "Max file size: " + w(c(de)(t.maxFileSize)), 1)
|
|
4288
4801
|
]));
|
|
4289
4802
|
}
|
|
4290
|
-
}),
|
|
4803
|
+
}), Ra = { "data-cy": "file-uploader" }, Ha = { key: 0 }, Hi = /* @__PURE__ */ S({
|
|
4291
4804
|
__name: "ForgeFileUploader",
|
|
4292
4805
|
props: /* @__PURE__ */ q({
|
|
4293
4806
|
acceptedFileTypes: {},
|
|
@@ -4304,46 +4817,46 @@ const yt = { class: "d-flex justify-content-between" }, ht = ["accept", "disable
|
|
|
4304
4817
|
}),
|
|
4305
4818
|
emits: ["update:modelValue"],
|
|
4306
4819
|
setup(e) {
|
|
4307
|
-
const
|
|
4308
|
-
|
|
4820
|
+
const t = D(e, "modelValue"), a = e, i = (l) => {
|
|
4821
|
+
t.value = t.value.filter((o) => o.file != l);
|
|
4309
4822
|
};
|
|
4310
|
-
return (l, o) => (
|
|
4311
|
-
|
|
4312
|
-
modelValue:
|
|
4313
|
-
"onUpdate:modelValue": o[0] || (o[0] = (r) =>
|
|
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)
|
|
4314
4827
|
}), null, 16, ["modelValue"]),
|
|
4315
|
-
l.showDragDropArea ? (
|
|
4316
|
-
|
|
4317
|
-
"max-file-input":
|
|
4318
|
-
"max-file-size":
|
|
4319
|
-
"accepted-file-types":
|
|
4320
|
-
modelValue:
|
|
4321
|
-
"onUpdate:modelValue": o[1] || (o[1] = (r) =>
|
|
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)
|
|
4322
4835
|
}, {
|
|
4323
|
-
default:
|
|
4324
|
-
(
|
|
4325
|
-
(
|
|
4836
|
+
default: f(() => [
|
|
4837
|
+
(d(!0), v(O, null, A(t.value, ({ file: r }, s) => (d(), v("span", null, [
|
|
4838
|
+
(d(), g(Aa, F({
|
|
4326
4839
|
key: r.name,
|
|
4327
|
-
class:
|
|
4328
|
-
file:
|
|
4329
|
-
"onUpdate:file": (
|
|
4330
|
-
"blob-file-name":
|
|
4331
|
-
"onUpdate:blobFileName": (
|
|
4332
|
-
"upload-status":
|
|
4333
|
-
"onUpdate:uploadStatus": (
|
|
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,
|
|
4334
4847
|
ref_for: !0
|
|
4335
|
-
},
|
|
4848
|
+
}, a, { onDeleted: i }), null, 16, ["class", "file", "onUpdate:file", "blob-file-name", "onUpdate:blobFileName", "upload-status", "onUpdate:uploadStatus"]))
|
|
4336
4849
|
]))), 256))
|
|
4337
4850
|
]),
|
|
4338
4851
|
_: 1
|
|
4339
4852
|
}, 8, ["max-file-input", "max-file-size", "accepted-file-types", "modelValue"]),
|
|
4340
|
-
|
|
4341
|
-
"max-file-size":
|
|
4853
|
+
y(Ea, {
|
|
4854
|
+
"max-file-size": a.maxFileSize
|
|
4342
4855
|
}, null, 8, ["max-file-size"])
|
|
4343
|
-
])) :
|
|
4856
|
+
])) : z("", !0)
|
|
4344
4857
|
]));
|
|
4345
4858
|
}
|
|
4346
|
-
}),
|
|
4859
|
+
}), Wa = { class: "d-flex" }, Ya = { class: "me-3" }, Ga = { class: "ms-2" }, Ja = { class: "d-flex flex-column w-100" }, Wi = /* @__PURE__ */ S({
|
|
4347
4860
|
__name: "ForgeColumnCustomiser",
|
|
4348
4861
|
props: {
|
|
4349
4862
|
modelValue: { required: !0 },
|
|
@@ -4351,27 +4864,22 @@ const yt = { class: "d-flex justify-content-between" }, ht = ["accept", "disable
|
|
|
4351
4864
|
},
|
|
4352
4865
|
emits: ["update:modelValue"],
|
|
4353
4866
|
setup(e) {
|
|
4354
|
-
const
|
|
4355
|
-
|
|
4356
|
-
}, p = (d) => {
|
|
4357
|
-
const u = o.value.find((h) => h.field === d);
|
|
4358
|
-
u.selected = !u.selected, a.value = o.value.filter((h) => h.selected);
|
|
4867
|
+
const t = D(e, "modelValue"), a = P(), i = P(!1), l = (o) => {
|
|
4868
|
+
a.value.toggle(o);
|
|
4359
4869
|
};
|
|
4360
|
-
return
|
|
4361
|
-
|
|
4362
|
-
|
|
4363
|
-
x(c(A), {
|
|
4364
|
-
onClick: r,
|
|
4870
|
+
return (o, r) => (d(), v(O, null, [
|
|
4871
|
+
y(c(N), {
|
|
4872
|
+
onClick: l,
|
|
4365
4873
|
class: "ms-2"
|
|
4366
4874
|
}, {
|
|
4367
|
-
default:
|
|
4368
|
-
|
|
4369
|
-
|
|
4370
|
-
|
|
4875
|
+
default: f(() => [
|
|
4876
|
+
u("div", Wa, [
|
|
4877
|
+
u("div", Ya, [
|
|
4878
|
+
y(c(j), { icon: "bi:layout-three-columns" })
|
|
4371
4879
|
]),
|
|
4372
|
-
|
|
4373
|
-
|
|
4374
|
-
|
|
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), {
|
|
4375
4883
|
icon: i.value ? "bi:chevron-up" : "bi:chevron-down"
|
|
4376
4884
|
}, null, 8, ["icon"])
|
|
4377
4885
|
])
|
|
@@ -4379,35 +4887,32 @@ const yt = { class: "d-flex justify-content-between" }, ht = ["accept", "disable
|
|
|
4379
4887
|
]),
|
|
4380
4888
|
_: 1
|
|
4381
4889
|
}),
|
|
4382
|
-
|
|
4890
|
+
y(c(ue), {
|
|
4383
4891
|
ref_key: "columnCustomiserPanel",
|
|
4384
|
-
ref:
|
|
4892
|
+
ref: a,
|
|
4385
4893
|
class: "column-customiser",
|
|
4386
|
-
onHide:
|
|
4387
|
-
onShow:
|
|
4894
|
+
onHide: r[0] || (r[0] = () => i.value = !1),
|
|
4895
|
+
onShow: r[1] || (r[1] = () => i.value = !0)
|
|
4388
4896
|
}, {
|
|
4389
|
-
default:
|
|
4390
|
-
|
|
4391
|
-
(
|
|
4392
|
-
class:
|
|
4393
|
-
"border-top":
|
|
4394
|
-
"py-1":
|
|
4395
|
-
"pt-1":
|
|
4396
|
-
"pb-1":
|
|
4397
|
-
}])
|
|
4398
|
-
onClick: (C) => p(h.field)
|
|
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
|
|
4905
|
+
}])
|
|
4399
4906
|
}, [
|
|
4400
|
-
|
|
4401
|
-
id:
|
|
4402
|
-
|
|
4907
|
+
y(ve, {
|
|
4908
|
+
id: s.field,
|
|
4909
|
+
modelValue: s.selected,
|
|
4910
|
+
"onUpdate:modelValue": (m) => s.selected = m,
|
|
4403
4911
|
binary: "",
|
|
4404
|
-
class: "cursor-pointer"
|
|
4405
|
-
|
|
4406
|
-
|
|
4407
|
-
|
|
4408
|
-
class: "cursor-pointer"
|
|
4409
|
-
}, w(h.header), 9, Ht)
|
|
4410
|
-
], 10, Rt))), 256))
|
|
4912
|
+
class: "cursor-pointer",
|
|
4913
|
+
label: s.header
|
|
4914
|
+
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "label"])
|
|
4915
|
+
], 2))), 256))
|
|
4411
4916
|
])
|
|
4412
4917
|
]),
|
|
4413
4918
|
_: 1
|
|
@@ -4416,32 +4921,33 @@ const yt = { class: "d-flex justify-content-between" }, ht = ["accept", "disable
|
|
|
4416
4921
|
}
|
|
4417
4922
|
});
|
|
4418
4923
|
export {
|
|
4419
|
-
|
|
4420
|
-
|
|
4924
|
+
Fi as Bootstrap_PT,
|
|
4925
|
+
zi as ForgeActionButton,
|
|
4421
4926
|
ne as ForgeAlert,
|
|
4422
|
-
|
|
4423
|
-
|
|
4424
|
-
|
|
4425
|
-
|
|
4426
|
-
|
|
4427
|
-
|
|
4428
|
-
|
|
4429
|
-
|
|
4430
|
-
|
|
4431
|
-
|
|
4432
|
-
|
|
4927
|
+
Ci as ForgeAutoComplete,
|
|
4928
|
+
ve as ForgeCheckbox,
|
|
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,
|
|
4433
4938
|
fe as ForgeLoader,
|
|
4434
|
-
|
|
4435
|
-
|
|
4436
|
-
|
|
4437
|
-
|
|
4438
|
-
|
|
4439
|
-
|
|
4440
|
-
|
|
4441
|
-
|
|
4442
|
-
|
|
4443
|
-
|
|
4444
|
-
|
|
4445
|
-
|
|
4446
|
-
|
|
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
|
|
4447
4953
|
};
|