@3squared/forge-ui-3 0.1.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.
@@ -0,0 +1,2818 @@
1
+ import ye from "primevue/message";
2
+ import { defineComponent as x, openBlock as n, createBlock as w, normalizeProps as X, guardReactiveProps as Q, withCtx as f, createElementVNode as m, normalizeClass as S, unref as p, createCommentVNode as F, createVNode as v, renderSlot as _, ref as T, createElementBlock as y, Fragment as U, mergeProps as B, computed as k, createTextVNode as P, toDisplayString as h, withDirectives as O, vShow as L, createSlots as ee, renderList as R, mergeModels as K, useModel as j, onMounted as ie, isRef as E, withKeys as Y, useAttrs as re, withModifiers as G, normalizeStyle as be } from "vue";
3
+ import { Icon as C } from "@iconify/vue";
4
+ import A from "primevue/button";
5
+ import ve from "primevue/toast";
6
+ import fe from "primevue/checkbox";
7
+ import { useField as W } from "vee-validate";
8
+ import ge from "primevue/progressspinner";
9
+ import he from "primevue/dialog";
10
+ import oe from "primevue/inputtext";
11
+ import { vOnClickOutside as we } from "@vueuse/components";
12
+ import _e from "primevue/menubar";
13
+ import ke from "vue-multiselect";
14
+ import xe from "primevue/calendar";
15
+ import $e from "primevue/inputmask";
16
+ import Fe from "primevue/textarea";
17
+ import de from "primevue/inputnumber";
18
+ import Be from "primevue/chips";
19
+ import Se from "primevue/progressbar";
20
+ import Ce from "primevue/divider";
21
+ import Ve from "primevue/steps";
22
+ import ze from "primevue/datatable";
23
+ import se from "primevue/dropdown";
24
+ import Ie from "primevue/multiselect";
25
+ import { BlockBlobClient as ue } from "@azure/storage-blob";
26
+ import Te from "primevue/image";
27
+ const Ia = {
28
+ button: {
29
+ root: ({ props: e }) => ({
30
+ class: [
31
+ "btn",
32
+ // Primary
33
+ {
34
+ "btn-primary": (e.severity === null || e.severity === "primary") && !e.outlined && !e.link && !e.text,
35
+ "btn-outline-primary": (e.severity === null || e.severity === "primary") && e.outlined,
36
+ "text-primary fw-bold btn-text-primary": (e.severity === null || e.severity === "primary") && e.text
37
+ },
38
+ // Secondary
39
+ {
40
+ "btn-secondary": e.severity === "secondary" && !e.outlined && !e.link && !e.text,
41
+ "btn-outline-secondary": e.severity === "secondary" && e.outlined,
42
+ "text-secondary fw-bold btn-text-secondary": e.severity === "secondary" && e.text
43
+ },
44
+ // Success
45
+ {
46
+ "btn-success text-white": e.severity === "success" && !e.outlined && !e.link && !e.text,
47
+ "btn-outline-success": e.severity === "success" && e.outlined,
48
+ "text-success fw-bold btn-text-success": e.severity === "success" && e.text
49
+ },
50
+ // Warning
51
+ {
52
+ "btn-warning text-white": e.severity === "warning" && !e.outlined && !e.link && !e.text,
53
+ "btn-outline-warning": e.severity === "warning" && e.outlined,
54
+ "text-warning fw-bold btn-text-warning": e.severity === "warning" && e.text
55
+ },
56
+ // Danger
57
+ {
58
+ "btn-danger text-white": e.severity === "danger" && !e.outlined && !e.link && !e.text,
59
+ "btn-outline-danger": e.severity === "danger" && e.outlined,
60
+ "text-danger fw-bold btn-text-danger": e.severity === "danger" && e.text
61
+ },
62
+ // Info
63
+ {
64
+ "btn-info text-white": e.severity === "info" && !e.outlined && !e.link && !e.text,
65
+ "btn-outline-info": e.severity === "info" && e.outlined,
66
+ "text-info fw-bold btn-text-info": e.severity === "info" && e.text
67
+ },
68
+ // Misc
69
+ {
70
+ "btn-link": e.link,
71
+ shadow: e.raised,
72
+ "rounded-pill": e.rounded,
73
+ "btn-lg": e.size == "large",
74
+ "btn-sm": e.size == "small"
75
+ }
76
+ ]
77
+ }),
78
+ loadingIcon: () => ({
79
+ class: ["spinner-border spinner-border-sm border-0 me-2"]
80
+ }),
81
+ badge: ({ props: e }) => ({
82
+ class: [
83
+ {
84
+ "button-badge-primary": (e.severity === "primary" || e.severity === null) && !e.outlined,
85
+ "button-badge-secondary": e.severity === "secondary" && !e.outlined,
86
+ "button-badge-success": e.severity === "success" && !e.outlined,
87
+ "button-badge-warning": (e.severity === "warning" || e.severity === "warn") && !e.outlined,
88
+ "button-badge-danger": e.severity === "danger" && !e.outlined,
89
+ "button-badge-info": e.severity === "info" && !e.outlined
90
+ },
91
+ {
92
+ "button-badge-primary outlined": (e.severity === "primary" || e.severity === null) && e.outlined,
93
+ "button-badge-secondary outlined": e.severity === "secondary" && e.outlined,
94
+ "button-badge-success outlined": e.severity === "success" && e.outlined,
95
+ "button-badge-warning outlined": (e.severity === "warning" || e.severity === "warn") && e.outlined,
96
+ "button-badge-danger outlined": e.severity === "danger" && e.outlined,
97
+ "button-badge-info outlined": e.severity === "info" && e.outlined
98
+ },
99
+ "rounded-pill ms-2"
100
+ ]
101
+ })
102
+ },
103
+ checkbox: {
104
+ root: () => ({
105
+ class: [
106
+ "form-check"
107
+ ]
108
+ }),
109
+ input: (e) => ({
110
+ class: [
111
+ "form-check-input px-2 py-2 rounded",
112
+ {
113
+ "bg-primary": e.context.checked,
114
+ "form-check-input__focus": e.state.focused,
115
+ disabled: e.context.disabled
116
+ }
117
+ ]
118
+ })
119
+ },
120
+ toast: {
121
+ message: () => ({
122
+ class: ["toast-container w-100 position-relative"]
123
+ }),
124
+ content: () => ({
125
+ class: ["toast-body d-flex align-items-center gap-2"]
126
+ }),
127
+ container: () => ({
128
+ class: ["toast bg-white show"]
129
+ }),
130
+ buttonContainer: () => ({
131
+ class: ["ms-auto"]
132
+ }),
133
+ closeButton: () => ({
134
+ class: ["btn-close toast-close-icon"]
135
+ }),
136
+ closeIcon: () => ({
137
+ class: "d-none"
138
+ }),
139
+ summary: () => ({
140
+ class: ["toast-body ps-1"]
141
+ }),
142
+ icon: ({ props: e }) => {
143
+ var t, l, a, s;
144
+ return {
145
+ class: [
146
+ "toast-icon",
147
+ {
148
+ "text-primary": ((t = e.message) == null ? void 0 : t.severity) === "info",
149
+ "text-success": ((l = e.message) == null ? void 0 : l.severity) === "success",
150
+ "text-danger": ((a = e.message) == null ? void 0 : a.severity) === "error",
151
+ "text-warning": ((s = e.message) == null ? void 0 : s.severity) === "warn"
152
+ }
153
+ ]
154
+ };
155
+ }
156
+ },
157
+ dropdown: {
158
+ root: (e) => ({
159
+ class: [
160
+ {
161
+ "rounded-0 rounded-top": e.state.overlayVisible,
162
+ disabled: e.instance.disabled,
163
+ "form-control": !e.instance.disabled
164
+ },
165
+ "d-flex cursor-pointer w-100"
166
+ ]
167
+ }),
168
+ input: () => ({
169
+ class: ["fs-6 border-0"]
170
+ }),
171
+ trigger: (e) => ({
172
+ class: {
173
+ "ms-2": e.props.showClear,
174
+ "ms-auto": !e.props.showClear || !e.props.modelValue
175
+ }
176
+ }),
177
+ loadingIcon: () => ({
178
+ class: ["spinner-border spinner-border-sm border-0"]
179
+ }),
180
+ clearIcon: () => ({
181
+ class: ["ms-auto my-auto"]
182
+ }),
183
+ list: () => ({
184
+ class: ["border list-unstyled rounded-bottom bg-white"]
185
+ }),
186
+ item: (e) => ({
187
+ class: [
188
+ "px-2 py-1 cursor-pointer item",
189
+ {
190
+ "bg-primary text-white": e.context.selected
191
+ }
192
+ ]
193
+ }),
194
+ itemGroup: () => ({
195
+ class: ["d-flex px-2 py-1 fw-bold"]
196
+ }),
197
+ filterContainer: () => ({
198
+ class: ["d-flex border-start border-end p-2 bg-light"]
199
+ }),
200
+ filterIcon: () => ({
201
+ class: ["my-auto ms-3 me-2"]
202
+ }),
203
+ filterInput: () => ({
204
+ class: ["form-control"]
205
+ })
206
+ },
207
+ column: {
208
+ sortBadge: "ms-2 my-auto cursor-pointer",
209
+ headerCell: (e) => {
210
+ var t, l, a, s;
211
+ return {
212
+ class: [{
213
+ "cursor-move": e.props.reorderableColumns,
214
+ "position-sticky": ((t = e.column) == null ? void 0 : t.context.frozen) !== void 0 || ((l = e.column) == null ? void 0 : l.context.frozen) || ((a = e.column) == null ? void 0 : a.context.frozen) === "",
215
+ "overflow-hidden position-relative bg-clip-padding": (s = e.column) == null ? void 0 : s.context.resizable
216
+ }]
217
+ };
218
+ },
219
+ roweditorinitbutton: "btn",
220
+ rowtoggler: {
221
+ class: "btn"
222
+ },
223
+ columnresizer: {
224
+ class: "position-absolute top-0 end-0 m-0 h-100 p-0 cursor-resize border border-transparent"
225
+ },
226
+ roweditorsavebutton: "btn",
227
+ roweditorcancelbutton: "btn",
228
+ bodyCell: (e) => {
229
+ var t;
230
+ return {
231
+ class: {
232
+ "position-sticky": ((t = e.column.props) == null ? void 0 : t.frozen) !== void 0,
233
+ "overflow-hidden text-nowrap": e.props.resizableColumns
234
+ }
235
+ };
236
+ },
237
+ rowreordericon: "cursor-move",
238
+ filterMenuButton: ({ props: e }) => ({
239
+ class: [
240
+ "btn",
241
+ {
242
+ "d-none": e.type !== "text" && e.type !== "numeric" && e.type !== "date"
243
+ }
244
+ ]
245
+ }),
246
+ headerFilterClearButton: () => ({
247
+ class: [
248
+ "btn"
249
+ ]
250
+ }),
251
+ filterOverlay: {
252
+ class: [
253
+ "show dropdown-menu"
254
+ ]
255
+ },
256
+ filterRowItems: {
257
+ class: [
258
+ "list-unstyled"
259
+ ]
260
+ },
261
+ columnfilter: "d-flex",
262
+ filterRowItem: (e) => {
263
+ var t;
264
+ return {
265
+ class: [
266
+ "dropdown-item cursor-pointer",
267
+ {
268
+ //@ts-ignore
269
+ active: (t = e.column.context) == null ? void 0 : t.highlighted
270
+ }
271
+ ]
272
+ };
273
+ },
274
+ filterSeparator: {
275
+ class: [
276
+ "dropdown-divider"
277
+ ]
278
+ },
279
+ headerContent: "d-flex",
280
+ sort: "d-flex ms-auto my-auto cursor-pointer",
281
+ rowCheckbox: (e) => ({
282
+ class: [
283
+ "form-check-input px-2 py-2 rounded position-relative",
284
+ {
285
+ "bg-primary": e.props.checked,
286
+ "form-check-input__focus": e.state.focused
287
+ }
288
+ ]
289
+ }),
290
+ rowRadioButton: (e) => ({
291
+ class: [
292
+ "form-check-input",
293
+ {
294
+ disabled: e.props.disabled
295
+ }
296
+ ]
297
+ })
298
+ },
299
+ inputtext: {
300
+ root: (e) => {
301
+ var t, l;
302
+ return {
303
+ class: [
304
+ "form-control",
305
+ {
306
+ "form-control-lg": ((t = e.props.size) == null ? void 0 : t.toLowerCase()) == "large",
307
+ "form-control-sm": ((l = e.props.size) == null ? void 0 : l.toLowerCase()) == "small"
308
+ }
309
+ ]
310
+ };
311
+ }
312
+ },
313
+ multiselect: {
314
+ root: {
315
+ class: ["form-control d-flex cursor-pointer"]
316
+ },
317
+ trigger: {
318
+ class: ["ms-auto"]
319
+ },
320
+ panel: {
321
+ class: ["border rounded-bottom bg-white"]
322
+ },
323
+ list: {
324
+ class: ["p-2 mb-0 list-unstyled"]
325
+ },
326
+ item: {
327
+ class: ["dropdown-item d-flex"]
328
+ },
329
+ header: {
330
+ class: "d-flex border-bottom pb-2"
331
+ },
332
+ headercheckboxcontainer: {
333
+ class: ["form-check ms-2 mt-2"]
334
+ },
335
+ headercheckbox: (e) => ({
336
+ class: [
337
+ "form-check-input px-2 py-2 rounded position-relative",
338
+ {
339
+ "bg-primary": e.instance.allSelected
340
+ }
341
+ ]
342
+ }),
343
+ headercheckboxicon: {
344
+ class: "mb-1 fw-medium text-white position-absolute filter-header-multiselect__check-icon"
345
+ },
346
+ filtercontainer: {
347
+ class: ["d-flex position-relative mt-1 ps-2"]
348
+ },
349
+ filterinput: {
350
+ class: ["form-control"]
351
+ },
352
+ filtericon: {
353
+ class: ["position-absolute bottom-0 end-0"],
354
+ style: "top: 35%; left: 87%;"
355
+ },
356
+ closebutton: {
357
+ class: "btn"
358
+ },
359
+ checkbox: (e) => ({
360
+ class: [
361
+ "form-check-input px-2 py-2 rounded position-relative",
362
+ {
363
+ "bg-primary": e.context.selected,
364
+ "form-check-input__focus": e.state.focused
365
+ }
366
+ ]
367
+ }),
368
+ checkboxicon: {
369
+ class: "mb-1 fw-medium text-white position-absolute filter-header-multiselect__check-icon"
370
+ }
371
+ },
372
+ inputmask: {
373
+ root: () => ({
374
+ class: [
375
+ "form-control"
376
+ ]
377
+ })
378
+ },
379
+ textarea: {
380
+ root: () => ({
381
+ class: [
382
+ "form-control"
383
+ ]
384
+ })
385
+ },
386
+ message: {
387
+ root: ({ props: e }) => ({
388
+ class: [
389
+ "alert",
390
+ {
391
+ "alert-primary": e.severity === "primary" || e.severity === void 0,
392
+ "alert-secondary": e.severity === "secondary",
393
+ "alert-success": e.severity === "success",
394
+ "alert-warning": e.severity === "warning" || e.severity === "warn",
395
+ "alert-danger": e.severity === "danger" || e.severity === "error",
396
+ "alert-info": e.severity === "info"
397
+ }
398
+ ]
399
+ }),
400
+ text: () => ({
401
+ class: ["my-auto"]
402
+ }),
403
+ wrapper: () => ({
404
+ class: ["d-flex"]
405
+ }),
406
+ icon: () => ({
407
+ class: ["alert-icon my-auto me-2 pe-1"]
408
+ }),
409
+ closeButton: () => ({
410
+ class: ["px-0 ms-2 btn d-flex"]
411
+ })
412
+ },
413
+ badge: {
414
+ root: ({ props: e }) => ({
415
+ class: [
416
+ "badge",
417
+ {
418
+ "badge-primary": e.severity === "primary" || e.severity === null,
419
+ "badge-secondary": e.severity === "secondary",
420
+ "badge-success": e.severity === "success",
421
+ "badge-warning": e.severity === "warning" || e.severity === "warn",
422
+ "badge-danger": e.severity === "danger",
423
+ "badge-info": e.severity === "info"
424
+ },
425
+ {
426
+ "badge-xl fs-4 lh-sm": e.size === "xlarge",
427
+ "badge-lg fs-5 lh-1": e.size === "large"
428
+ }
429
+ ]
430
+ })
431
+ },
432
+ card: {
433
+ root: () => ({
434
+ class: ["card"]
435
+ }),
436
+ title: () => ({
437
+ class: ["card-title h4"]
438
+ }),
439
+ subtitle: () => ({
440
+ class: ["card-subtitle mb-2"]
441
+ }),
442
+ content: () => ({
443
+ class: ["card-text h-100"]
444
+ }),
445
+ body: () => ({
446
+ class: ["card-body"]
447
+ }),
448
+ footer: () => ({
449
+ class: ["mt-3"]
450
+ }),
451
+ header: () => ({
452
+ class: ["card-header"]
453
+ })
454
+ },
455
+ progressspinner: {
456
+ spinner: () => ({
457
+ class: [
458
+ "spinner-border"
459
+ ]
460
+ })
461
+ },
462
+ selectbutton: {
463
+ root: () => ({
464
+ class: ["btn-group"]
465
+ }),
466
+ button: ({ context: e, props: t }) => ({
467
+ class: [
468
+ "btn",
469
+ {
470
+ "btn-primary": e.active,
471
+ "btn-outline-primary": !e.active
472
+ },
473
+ {
474
+ "disabled w-auto": t.disabled || t.optionDisabled === e.option
475
+ }
476
+ ]
477
+ })
478
+ },
479
+ dialog: {
480
+ root: () => ({
481
+ class: ["modal modal-dialog modal-content vw-100"]
482
+ }),
483
+ header: () => ({
484
+ class: ["modal-header"]
485
+ }),
486
+ headerTitle: () => ({
487
+ class: ["h5 modal-title text-black"]
488
+ }),
489
+ content: () => ({
490
+ class: ["modal-body"]
491
+ }),
492
+ footer: () => ({
493
+ class: ["modal-footer"]
494
+ }),
495
+ headerIcons: () => ({
496
+ class: ["ms-auto"]
497
+ }),
498
+ maximizableButton: ({ props: e }) => ({
499
+ class: [
500
+ {
501
+ "me-2": e.closable
502
+ }
503
+ ]
504
+ }),
505
+ mask: ({ props: e }) => ({
506
+ class: [{
507
+ "modal-open": e.modal && e.visible
508
+ }]
509
+ })
510
+ },
511
+ tabview: {
512
+ navContainer: () => ({
513
+ class: ["nav nav-tabs position-relative"]
514
+ }),
515
+ navContent: () => ({
516
+ class: ["overflow-hidden"]
517
+ }),
518
+ nav: () => ({
519
+ class: ["mb-0 list-unstyled d-flex"]
520
+ }),
521
+ previousButton: () => ({
522
+ class: ["bg-white btn h-100 position-absolute top-0 d-flex align-items-center justify-content-center"]
523
+ }),
524
+ nextButton: () => ({
525
+ class: ["bg-white btn h-100 position-absolute top-0 end-0 d-flex align-items-center justify-content-center"]
526
+ })
527
+ },
528
+ tabpanel: {
529
+ root: () => ({
530
+ class: ["nav-item"]
531
+ }),
532
+ headerAction: (e) => {
533
+ var t;
534
+ return {
535
+ class: [
536
+ "nav-link cursor-pointer",
537
+ {
538
+ active: e.tabpanel.context.active,
539
+ disabled: (t = e.tabpanel.props) == null ? void 0 : t.disabled
540
+ }
541
+ ]
542
+ };
543
+ },
544
+ content: () => ({
545
+ class: ["p-2"]
546
+ })
547
+ },
548
+ directives: {
549
+ tooltip: {
550
+ root: ({ context: e }) => ({
551
+ class: [
552
+ "tooltip show position-absolute",
553
+ {
554
+ "bs-tooltip-end ms-1": (e == null ? void 0 : e.right) || !(e != null && e.right) && !(e != null && e.left) && !(e != null && e.top) && !(e != null && e.bottom),
555
+ "bs-tooltip-start me-1": e == null ? void 0 : e.left,
556
+ "bs-tooltip-top": e == null ? void 0 : e.top,
557
+ "bs-tooltip-bottom": e == null ? void 0 : e.bottom
558
+ }
559
+ ]
560
+ }),
561
+ arrow: () => ({
562
+ class: [
563
+ "tooltip-arrow position-absolute"
564
+ ]
565
+ }),
566
+ text: {
567
+ class: ["tooltip-inner"]
568
+ }
569
+ }
570
+ },
571
+ // More PassThrough options in component file.
572
+ progressbar: {
573
+ root: () => ({
574
+ class: ["progress"]
575
+ }),
576
+ value: () => ({
577
+ class: ["progress-bar"]
578
+ }),
579
+ label: () => ({
580
+ class: ["text-white"]
581
+ })
582
+ },
583
+ // More PassThrough options defined in ForgeDatepicker.
584
+ calendar: {
585
+ root: "d-inline-flex relative",
586
+ input: "form-control",
587
+ panel: ({ props: e }) => ({
588
+ class: [
589
+ "datepicker-panel bg-white",
590
+ {
591
+ "shadow border-0 position-absolute": !e.inline
592
+ }
593
+ ]
594
+ }),
595
+ header: "d-flex align-items-center justify-content-between p-2 border-bottom",
596
+ previousButton: "btn mb-1",
597
+ nextButton: "btn mb-1",
598
+ yearTitle: "btn",
599
+ monthTitle: "btn",
600
+ table: "m-2",
601
+ tableHeaderRow: "p-2",
602
+ weekday: "ms-2 ps-1",
603
+ monthPicker: "my-2",
604
+ month: "btn w-25",
605
+ yearPicker: "my-2",
606
+ year: "btn w-25",
607
+ timePicker: "d-flex justify-content-center align-items-center border-top p-2",
608
+ separatorContainer: "d-flex flex-column align-items-center px-2",
609
+ separator: "fs-4 mb-2",
610
+ hourPicker: "px-2 fs-5",
611
+ hour: "my-2",
612
+ minutePicker: "px-2 fs-5",
613
+ minute: "my-2",
614
+ secondPicker: "px-2 fs-5",
615
+ second: "my-2",
616
+ buttonbar: ({ props: e }) => ({
617
+ class: [
618
+ "p-2",
619
+ {
620
+ "border-top": !e.showTime
621
+ }
622
+ ]
623
+ })
624
+ },
625
+ steps: {
626
+ root: "w-100 mx-2 line",
627
+ menu: "p-0 m-0 list-unstyled d-flex justify-content-between "
628
+ },
629
+ divider: {
630
+ root: "border-bottom m-4 w-100"
631
+ },
632
+ // More PassThrough options in component file.
633
+ chips: {
634
+ root: "d-flex",
635
+ label: "pe-2"
636
+ },
637
+ // More PassThrough options in component file.
638
+ menubar: {
639
+ menu: ({ instance: e }) => ({
640
+ class: [
641
+ "navbar-nav navbar-collapse collapse me-auto",
642
+ {
643
+ "show dropdown shadow-sm": e.mobileActive
644
+ }
645
+ ]
646
+ }),
647
+ menuitem: ({ context: e }) => ({
648
+ class: [
649
+ "nav-item cursor-pointer",
650
+ {
651
+ dropdown: e.item.items.length > 0
652
+ }
653
+ ]
654
+ }),
655
+ action: ({ context: e, instance: t }) => ({
656
+ class: [
657
+ {
658
+ active: e.active,
659
+ "nav-link": e.level === 0,
660
+ "dropdown-item": e.level > 0,
661
+ disabled: e.item.item.disabled,
662
+ "px-3": t.mobileActive
663
+ }
664
+ ]
665
+ }),
666
+ separator: ({ instance: e }) => ({
667
+ class: [
668
+ {
669
+ "border-bottom w-100": e.mobileActive || e.level > 0
670
+ }
671
+ ]
672
+ }),
673
+ submenu: ({ instance: e }) => ({
674
+ class: [
675
+ "dropdown-menu w-fit-content",
676
+ {
677
+ "position-absolute end-100": e.level > 1
678
+ }
679
+ ]
680
+ }),
681
+ button: (e) => ({
682
+ class: [
683
+ "ms-auto me-3",
684
+ {
685
+ "d-none": !e.state.queryMatches
686
+ }
687
+ ]
688
+ }),
689
+ submenuicon: "ms-1"
690
+ },
691
+ overlaypanel: {
692
+ root: (e) => ({
693
+ class: [
694
+ "card w-fit-content m-0",
695
+ {
696
+ "p-4": e.props.showCloseIcon,
697
+ "p-3": !e.props.showCloseIcon
698
+ }
699
+ ]
700
+ }),
701
+ content: "d-flex position-relative",
702
+ closeButton: "position-absolute top-0 end-0 p-1 btn btn-link text-black ms-2"
703
+ },
704
+ menu: {
705
+ menu: (e) => ({
706
+ class: [
707
+ "dropdown dropdown-menu",
708
+ {
709
+ show: e.state.overlayVisible
710
+ }
711
+ ]
712
+ }),
713
+ menuitem: () => ({
714
+ class: [
715
+ "dropdown-item cursor-pointer"
716
+ ]
717
+ })
718
+ },
719
+ dataTable: {
720
+ table: (e) => ({
721
+ class: [
722
+ "table position-relative",
723
+ {
724
+ "table-striped": e.props.stripedRows,
725
+ "table-hover": e.props.rowHover,
726
+ "table-bordered": e.props.showGridlines,
727
+ "table-sm": e.props.size === "small",
728
+ "table-lg": e.props.size === "large",
729
+ "opacity-50": e.props.loading
730
+ }
731
+ ]
732
+ }),
733
+ bodyRow: (e) => ({
734
+ class: {
735
+ "table-active": e.context.selected
736
+ }
737
+ }),
738
+ rowgrouptoggler: "btn",
739
+ thead: () => ({
740
+ class: "sticky-header"
741
+ }),
742
+ //@ts-ignore
743
+ tbody: (e) => ({
744
+ class: {
745
+ "sticky-header": e.props.frozenRow
746
+ }
747
+ }),
748
+ loadingOverlay: () => ({
749
+ class: "table-overlay table-spinner"
750
+ }),
751
+ loadingIcon: () => ({
752
+ class: "spinner-border border-0"
753
+ })
754
+ },
755
+ paginator: {
756
+ root: (e) => {
757
+ var t;
758
+ return {
759
+ class: [
760
+ "m-auto pagination justify-content-center",
761
+ {
762
+ "opacity-50": (t = e.parent) == null ? void 0 : t.props.loading
763
+ }
764
+ ]
765
+ };
766
+ },
767
+ pages: "d-flex",
768
+ firstPageButton: "page-link",
769
+ previousPageButton: "page-link",
770
+ nextPageButton: "page-link",
771
+ lastPageButton: "page-link me-2",
772
+ pageButton: ({ context: e }) => ({
773
+ class: [
774
+ "page-link",
775
+ {
776
+ active: e.active,
777
+ disabled: e.disabled
778
+ }
779
+ ]
780
+ })
781
+ },
782
+ image: {
783
+ root: "position-relative d-inline-block",
784
+ button: "preview-button",
785
+ mask: "position-fixed top-0 start-0 w-100 h-100 d-flex align-items-center justify-content-center mask",
786
+ preview: "preview",
787
+ toolbar: "position-absolute top-0 end-0 d-flex p-3",
788
+ rotaterightbutton: "btn text-white",
789
+ rotateleftbutton: "btn text-white",
790
+ zoomoutbutton: "btn text-white",
791
+ zoominbutton: "btn text-white",
792
+ closebutton: "btn text-white"
793
+ }
794
+ }, te = /* @__PURE__ */ x({
795
+ __name: "ForgeAlert",
796
+ props: {
797
+ severity: { default: "primary" },
798
+ closable: { type: Boolean, default: !1 },
799
+ sticky: { type: Boolean, default: !0 },
800
+ life: { default: void 0 },
801
+ icon: {},
802
+ closeIcon: {},
803
+ closeButtonProps: {},
804
+ pt: {},
805
+ ptOptions: {},
806
+ unstyled: { type: Boolean }
807
+ },
808
+ setup(e) {
809
+ const t = e;
810
+ return (l, a) => {
811
+ const s = ye;
812
+ return n(), w(s, X(Q({ ...l.$attrs, ...t })), {
813
+ messageicon: f(() => [
814
+ m("div", {
815
+ class: S(t.icon ? "me-2 pe-1" : "")
816
+ }, [
817
+ t.icon ? (n(), w(p(C), {
818
+ key: 0,
819
+ "data-cy": "message-icon",
820
+ icon: t.icon,
821
+ class: S(`text-${t.severity}`),
822
+ height: 35
823
+ }, null, 8, ["icon", "class"])) : F("", !0)
824
+ ], 2)
825
+ ]),
826
+ closeicon: f(() => [
827
+ v(p(C), { icon: "bi:x" })
828
+ ]),
829
+ default: f(() => [
830
+ _(l.$slots, "default")
831
+ ]),
832
+ _: 3
833
+ }, 16);
834
+ };
835
+ }
836
+ }), Ta = /* @__PURE__ */ x({
837
+ __name: "ForgeActionButton",
838
+ props: {
839
+ action: {},
840
+ errorAction: {},
841
+ errorParams: {},
842
+ params: { default: Array }
843
+ },
844
+ setup(e) {
845
+ const t = T(!1), l = e, a = async () => {
846
+ t.value = !0;
847
+ try {
848
+ await l.action.apply(this, l.params);
849
+ } catch (s) {
850
+ await l.errorAction.apply(this, l.errorParams ? [...l.errorParams, s] : [s]);
851
+ }
852
+ t.value = !1;
853
+ };
854
+ return (s, o) => {
855
+ const u = A;
856
+ return n(), y(U, null, [
857
+ v(u, B({ ...l, ...s.$attrs }, {
858
+ loading: t.value,
859
+ disabled: t.value || l.disabled,
860
+ onClick: a
861
+ }), null, 16, ["loading", "disabled"]),
862
+ v(p(ve))
863
+ ], 64);
864
+ };
865
+ }
866
+ }), Pe = {
867
+ class: "d-flex",
868
+ "data-cy": "checkbox-container"
869
+ }, Me = /* @__PURE__ */ m("div", null, null, -1), Ue = ["for"], De = /* @__PURE__ */ x({
870
+ __name: "ForgeCheckbox",
871
+ props: {
872
+ label: { default: "" },
873
+ rules: {},
874
+ value: {},
875
+ modelValue: {},
876
+ name: {},
877
+ binary: { type: Boolean, default: !0 },
878
+ invalid: { type: Boolean },
879
+ disabled: { type: Boolean },
880
+ variant: {},
881
+ readonly: { type: Boolean },
882
+ required: { type: Boolean },
883
+ tabindex: {},
884
+ trueValue: {},
885
+ falseValue: {},
886
+ inputId: {},
887
+ inputClass: {},
888
+ inputStyle: {},
889
+ ariaLabelledby: {},
890
+ ariaLabel: {},
891
+ pt: {},
892
+ ptOptions: {},
893
+ unstyled: { type: Boolean }
894
+ },
895
+ emits: ["update:modelValue"],
896
+ setup(e, { emit: t }) {
897
+ const l = t, a = e, { checked: s, handleChange: o, errors: u, errorMessage: d } = W(() => a.name ?? a.label, a.rules, {
898
+ type: "checkbox",
899
+ checkedValue: !0,
900
+ initialValue: a.modelValue
901
+ }), r = (b) => {
902
+ a.disabled || (o(b), l("update:modelValue", !a.modelValue));
903
+ }, i = k(() => u.value.length > 0);
904
+ return (b, c) => {
905
+ const g = fe;
906
+ return n(), y(U, null, [
907
+ m("div", Pe, [
908
+ v(g, B({
909
+ id: a.name
910
+ }, { ...b.$attrs, ...a }, {
911
+ value: p(s),
912
+ "input-class": { "is-invalid": i.value },
913
+ onChange: r
914
+ }), {
915
+ icon: f(() => [
916
+ Me
917
+ ]),
918
+ _: 1
919
+ }, 16, ["id", "value", "input-class"]),
920
+ m("label", {
921
+ for: a.name,
922
+ class: S(`${a.disabled ? "opacity-50" : "cursor-pointer"}`),
923
+ onClick: r
924
+ }, [
925
+ _(b.$slots, "default", {}, () => [
926
+ P(h(a.label), 1)
927
+ ])
928
+ ], 10, Ue)
929
+ ]),
930
+ O(m("small", {
931
+ "data-cy": "error",
932
+ class: "text-invalid"
933
+ }, h(p(d)), 513), [
934
+ [L, i.value]
935
+ ])
936
+ ], 64);
937
+ };
938
+ }
939
+ }), Ae = { class: "forge-loader" }, ce = /* @__PURE__ */ x({
940
+ __name: "ForgeLoader",
941
+ props: {
942
+ severity: { default: "primary" }
943
+ },
944
+ setup(e) {
945
+ const t = e;
946
+ return (l, a) => {
947
+ const s = ge;
948
+ return n(), y("div", Ae, [
949
+ v(s, {
950
+ "animation-duration": ".75",
951
+ class: S(`text-${t.severity === void 0 ? "primary" : t.severity}`)
952
+ }, null, 8, ["class"])
953
+ ]);
954
+ };
955
+ }
956
+ });
957
+ function Ne(e) {
958
+ const t = {
959
+ errorMessage: "",
960
+ errorDetails: []
961
+ };
962
+ if (e.exception && (t.errorMessage = e.exception), e.message && (Array.isArray(e.message) ? t.errorDetails = e.message : t.errorMessage = e.message), e.response) {
963
+ const l = JSON.parse(e.response);
964
+ l.errors && (t.errorDetails = Object.values(l.errors).flat()), l.message && (t.errorDetails = l.message);
965
+ }
966
+ return t.errorMessage === "" && t.errorDetails.length === 0 && (t.errorMessage = e), t;
967
+ }
968
+ const Oe = { key: 0 }, Re = {
969
+ class: "d-flex w-100",
970
+ "data-cy": "footer"
971
+ }, Pa = /* @__PURE__ */ x({
972
+ __name: "ForgeModal",
973
+ props: {
974
+ cancelText: { default: "Cancel" },
975
+ submitText: { default: "Submit" },
976
+ showFooter: { type: Boolean, default: !0 },
977
+ onConfirm: { type: [Function, null], default: null },
978
+ header: { default: "Header" },
979
+ footer: {},
980
+ visible: { type: Boolean },
981
+ modal: { type: Boolean, default: !0 },
982
+ contentStyle: {},
983
+ contentClass: {},
984
+ contentProps: {},
985
+ rtl: { type: Boolean },
986
+ closable: { type: Boolean, default: !1 },
987
+ dismissableMask: { type: Boolean },
988
+ closeOnEscape: { type: Boolean },
989
+ showHeader: { type: Boolean, default: !0 },
990
+ blockScroll: { type: Boolean },
991
+ baseZIndex: {},
992
+ autoZIndex: { type: Boolean },
993
+ position: {},
994
+ maximizable: { type: Boolean },
995
+ breakpoints: {},
996
+ draggable: { type: Boolean },
997
+ keepInViewPort: { type: Boolean },
998
+ minX: {},
999
+ minY: {},
1000
+ appendTo: {},
1001
+ style: {},
1002
+ closeIcon: {},
1003
+ maximizeIcon: {},
1004
+ minimizeIcon: {},
1005
+ pt: {},
1006
+ ptOptions: {},
1007
+ unstyled: { type: Boolean }
1008
+ },
1009
+ emits: ["update:visible"],
1010
+ setup(e, { emit: t }) {
1011
+ const l = t, a = e, s = T(!1), o = T({
1012
+ hasError: !1,
1013
+ header: "",
1014
+ message: []
1015
+ }), u = () => {
1016
+ l("update:visible", !1);
1017
+ }, d = async () => {
1018
+ if (a.onConfirm) {
1019
+ s.value = !0, o.value.hasError = !1;
1020
+ try {
1021
+ const r = await a.onConfirm();
1022
+ (r || r == null) && u();
1023
+ } catch (r) {
1024
+ o.value.hasError = !0;
1025
+ const i = Ne(r);
1026
+ o.value.header = i.errorMessage, o.value.message = i.errorDetails;
1027
+ }
1028
+ s.value = !1;
1029
+ }
1030
+ };
1031
+ return (r, i) => {
1032
+ const b = A, c = he;
1033
+ return n(), w(c, X(Q(a)), ee({
1034
+ closeicon: f(() => [
1035
+ v(p(C), {
1036
+ "data-cy": "close-icon",
1037
+ icon: "bi:x-lg",
1038
+ width: "21",
1039
+ height: "21",
1040
+ onClick: u
1041
+ })
1042
+ ]),
1043
+ maximizeicon: f(() => [
1044
+ v(p(C), {
1045
+ "data-cy": "maximisable-icon",
1046
+ icon: "bi:arrows-fullscreen"
1047
+ })
1048
+ ]),
1049
+ default: f(() => [
1050
+ o.value.hasError ? (n(), w(te, {
1051
+ key: 0,
1052
+ severity: "danger",
1053
+ "data-cy": "error"
1054
+ }, {
1055
+ default: f(() => [
1056
+ m("p", {
1057
+ class: S(o.value.message.length > 0 ? "my-auto" : "mb-0")
1058
+ }, h(o.value.header), 3),
1059
+ o.value.message.length > 0 ? (n(), y("ul", Oe, [
1060
+ (n(!0), y(U, null, R(o.value.message, (g) => (n(), y("li", { key: g }, h(g), 1))), 128))
1061
+ ])) : F("", !0)
1062
+ ]),
1063
+ _: 1
1064
+ })) : F("", !0),
1065
+ _(r.$slots, "default"),
1066
+ s.value ? _(r.$slots, "loader", { key: 1 }, () => [
1067
+ v(ce, { "data-cy": "loader" })
1068
+ ]) : F("", !0)
1069
+ ]),
1070
+ _: 2
1071
+ }, [
1072
+ r.showFooter ? {
1073
+ name: "footer",
1074
+ fn: f(() => [
1075
+ m("div", Re, [
1076
+ v(b, {
1077
+ label: r.cancelText,
1078
+ outlined: "",
1079
+ onClick: u,
1080
+ "data-cy": "cancel-button"
1081
+ }, null, 8, ["label"]),
1082
+ v(b, {
1083
+ label: r.submitText,
1084
+ class: "ms-auto",
1085
+ onClick: d,
1086
+ "data-cy": "submit-button"
1087
+ }, null, 8, ["label"])
1088
+ ])
1089
+ ]),
1090
+ key: "0"
1091
+ } : void 0
1092
+ ]), 1040);
1093
+ };
1094
+ }
1095
+ }), Ee = ["id"], je = { key: 0 }, Le = { key: 0 }, He = { class: "d-flex justify-content-between align-items-center position-relative" }, qe = { key: 1 }, Ge = { "data-cy": "readonly-value" }, Ke = /* @__PURE__ */ x({
1096
+ __name: "ForgeInlineEditor",
1097
+ props: /* @__PURE__ */ K({
1098
+ name: { default: "" },
1099
+ rules: {},
1100
+ completeAction: {},
1101
+ errorAction: {},
1102
+ params: { default: Array },
1103
+ errorParams: {},
1104
+ readonly: { type: Boolean, default: !1 }
1105
+ }, {
1106
+ modelValue: {},
1107
+ modelModifiers: {}
1108
+ }),
1109
+ emits: ["update:modelValue"],
1110
+ setup(e) {
1111
+ const t = e, l = j(e, "modelValue"), a = T(!1), s = T(), o = () => {
1112
+ var $;
1113
+ a.value = !a.value, ($ = s.value) == null || $.focus();
1114
+ }, u = async () => {
1115
+ if (g.value)
1116
+ return !1;
1117
+ if (l.value = c.value, t.completeAction)
1118
+ try {
1119
+ await t.completeAction.apply(this, t.params), a.value = !a.value;
1120
+ } catch {
1121
+ t.errorAction && await t.errorAction.apply(this, t.errorParams);
1122
+ }
1123
+ else
1124
+ a.value = !a.value;
1125
+ }, d = () => {
1126
+ a.value = !a.value;
1127
+ }, r = () => {
1128
+ c.value = null;
1129
+ }, { errorMessage: i, errors: b, value: c } = W(() => t.name, t.rules);
1130
+ ie(() => {
1131
+ c.value = l.value;
1132
+ });
1133
+ const g = k(() => b.value.length > 0);
1134
+ return ($, z) => {
1135
+ const D = oe, H = A;
1136
+ return n(), y("div", {
1137
+ id: t.name
1138
+ }, [
1139
+ $.readonly ? (n(), y("div", qe, [
1140
+ _($.$slots, "default", {}, () => [
1141
+ m("span", Ge, h(p(c)), 1)
1142
+ ])
1143
+ ])) : (n(), y("div", je, [
1144
+ a.value ? (n(), y("div", Le, [
1145
+ O((n(), y("div", He, [
1146
+ _($.$slots, "editor", {
1147
+ class: S({ "is-invalid": g.value }),
1148
+ editFinished: u,
1149
+ cancel: d,
1150
+ val: p(c)
1151
+ }, () => [
1152
+ v(D, {
1153
+ "data-cy": "input",
1154
+ ref_key: "input",
1155
+ ref: s,
1156
+ modelValue: p(c),
1157
+ "onUpdate:modelValue": z[0] || (z[0] = (q) => E(c) ? c.value = q : null),
1158
+ modelModifiers: { trim: !0 },
1159
+ class: S({ "is-invalid": g.value }),
1160
+ onKeydown: [
1161
+ Y(u, ["enter"]),
1162
+ Y(d, ["esc"])
1163
+ ]
1164
+ }, null, 8, ["modelValue", "class"])
1165
+ ]),
1166
+ v(p(C), {
1167
+ icon: "bi:x-circle",
1168
+ class: "mx-2 cursor-pointer",
1169
+ onClick: r,
1170
+ onKeydown: Y(r, ["enter"]),
1171
+ "data-cy": "clear-icon"
1172
+ })
1173
+ ])), [
1174
+ [p(we), u]
1175
+ ])
1176
+ ])) : (n(), y("div", {
1177
+ key: 1,
1178
+ class: "d-flex text-muted",
1179
+ onClick: o,
1180
+ onFocus: o
1181
+ }, [
1182
+ _($.$slots, "default", {}, () => [
1183
+ m("div", {
1184
+ class: S(["pe-2 cursor-pointer", { "text-invalid": g.value }]),
1185
+ "data-cy": "value"
1186
+ }, h(p(c) ? p(c) : "Click to edit"), 3)
1187
+ ]),
1188
+ v(H, {
1189
+ link: "",
1190
+ class: "p-0 m-0"
1191
+ }, {
1192
+ default: f(() => [
1193
+ v(p(C), {
1194
+ icon: "bi:pencil",
1195
+ class: S(g.value ? "text-invalid" : "text-muted"),
1196
+ "data-cy": "edit-icon",
1197
+ onKeydown: Y(o, ["enter"])
1198
+ }, null, 8, ["class"])
1199
+ ]),
1200
+ _: 1
1201
+ })
1202
+ ], 32))
1203
+ ])),
1204
+ O(m("small", {
1205
+ "data-cy": "error",
1206
+ class: "text-invalid"
1207
+ }, h(p(i)), 513), [
1208
+ [L, g.value]
1209
+ ])
1210
+ ], 8, Ee);
1211
+ };
1212
+ }
1213
+ }), We = ["href"], Ma = /* @__PURE__ */ x({
1214
+ __name: "ForgeNavbar",
1215
+ props: {
1216
+ severity: { default: "light" },
1217
+ logoUrl: { default: "#" },
1218
+ position: {},
1219
+ model: {},
1220
+ breakpoint: {},
1221
+ exact: { type: Boolean },
1222
+ buttonProps: {},
1223
+ ariaLabel: {},
1224
+ ariaLabelledby: {},
1225
+ pt: {},
1226
+ ptOptions: {},
1227
+ unstyled: { type: Boolean }
1228
+ },
1229
+ setup(e) {
1230
+ const t = e, l = k(() => ({
1231
+ root: () => ({
1232
+ class: [
1233
+ "navbar container-fluid navbar-expand-lg",
1234
+ {
1235
+ "bg-light": t.severity === "light",
1236
+ "bg-dark": t.severity === "dark",
1237
+ "bg-primary": t.severity === "primary",
1238
+ "bg-secondary": t.severity === "secondary",
1239
+ "bg-success": t.severity === "success",
1240
+ "bg-warning": t.severity === "warning",
1241
+ "bg-danger": t.severity === "danger",
1242
+ "bg-info": t.severity === "info"
1243
+ },
1244
+ {
1245
+ "navbar-light": t.severity === "light",
1246
+ "navbar-dark": t.severity !== "light"
1247
+ },
1248
+ {
1249
+ "fixed-top": t.position === "fixed-top",
1250
+ "fixed-bottom": t.position === "fixed-bottom",
1251
+ "sticky-top": t.position === "sticky-top"
1252
+ }
1253
+ ]
1254
+ })
1255
+ }));
1256
+ return (a, s) => {
1257
+ const o = _e;
1258
+ return n(), w(o, B({ ...t, ...a.$attrs }, {
1259
+ pt: l.value,
1260
+ "data-cy": "navbar"
1261
+ }), ee({
1262
+ start: f(() => [
1263
+ m("a", {
1264
+ href: a.logoUrl,
1265
+ class: "navbar-brand ms-3",
1266
+ "data-cy": "logo"
1267
+ }, [
1268
+ _(a.$slots, "logo", {}, () => [
1269
+ P(" Logo ")
1270
+ ])
1271
+ ], 8, We)
1272
+ ]),
1273
+ menubuttonicon: f(() => [
1274
+ _(a.$slots, "menubuttonicon", {}, () => [
1275
+ v(p(C), {
1276
+ icon: "bi:list",
1277
+ class: S(t.severity === "light" ? "text-black" : "text-white"),
1278
+ height: "24",
1279
+ "data-cy": "burger-icon"
1280
+ }, null, 8, ["class"])
1281
+ ])
1282
+ ]),
1283
+ _: 2
1284
+ }, [
1285
+ R(a.$slots, (u, d) => ({
1286
+ name: d,
1287
+ fn: f((r) => [
1288
+ _(a.$slots, d, X(Q(r)))
1289
+ ])
1290
+ }))
1291
+ ]), 1040, ["pt"]);
1292
+ };
1293
+ }
1294
+ }), Ze = ["onMousedown"], Ye = ["checked"], Je = /* @__PURE__ */ m("strong", null, "Select all", -1), Xe = ["data-cy"], Qe = ["checked"], et = /* @__PURE__ */ x({
1295
+ __name: "ForgeMultiSelect",
1296
+ props: {
1297
+ severity: { default: "primary" },
1298
+ showSelectAll: { type: Boolean, default: !1 },
1299
+ showClearSelection: { type: Boolean, default: !1 },
1300
+ expandLeft: { type: Boolean, default: !1 },
1301
+ selectValue: { default: "" },
1302
+ rules: {},
1303
+ name: { default: "" }
1304
+ },
1305
+ emits: ["update:modelValue"],
1306
+ setup(e, { emit: t }) {
1307
+ const l = e, a = re(), s = t, { errors: o, value: u, errorMessage: d } = W(() => l.name, l.rules), r = T(!1), i = k(() => ({
1308
+ multiple: !0,
1309
+ label: "label",
1310
+ trackBy: "id",
1311
+ showPointer: !r.value,
1312
+ placeholder: "Select...",
1313
+ allowEmpty: !0,
1314
+ selectValue: "",
1315
+ closeOnSelect: !!(a.multiple === null || a.multiple),
1316
+ clearOnSelect: !!(a.multiple === null || a.multiple),
1317
+ searchable: !!((a.searchable === null || a.searchable) && !g.value),
1318
+ async: !1,
1319
+ ...a
1320
+ })), b = k(() => `forge-multiselect-${l.severity}`), c = k(() => `multiselect-option ${r.value ? " multiselect__option--highlight" : ""} ${g.value ? " multiselect__option--selected" : ""}`), g = k(() => i.value && !(i.value.multiple || !l.showSelectAll || i.value.async) ? !1 : a.modelValue.length === a.options.length), $ = k(() => o.value.length > 0), z = k(() => !!((a.allowEmpty == null || a.allowEmpty) && l.showClearSelection && (i.value.multiple ? a.modelValue.length > 0 : a.modelValue))), D = () => r.value = !0, H = () => r.value = !1, q = () => {
1321
+ u.value = i.value.multiple ? [] : null, s("update:modelValue", u.value);
1322
+ }, ae = (V) => {
1323
+ s("update:modelValue", l.selectValue ? V.map((I) => I[l.selectValue]) : V);
1324
+ }, Z = (V) => a.modelValue !== null ? a.modelValue.some((I) => i.value.selectValue ? V[l.selectValue] === I : V.id === I.id && V.label === I.label) : !1, le = () => {
1325
+ g.value ? q() : (u.value = [...a.options], s("update:modelValue", [...a.options]));
1326
+ };
1327
+ return (V, I) => (n(), y(U, null, [
1328
+ v(p(ke), B(i.value, {
1329
+ class: [b.value, $.value ? "is-invalid" : ""],
1330
+ "data-cy": "multiselect",
1331
+ "onUpdate:modelValue": [
1332
+ ae,
1333
+ I[1] || (I[1] = (M) => E(u) ? u.value = M : null)
1334
+ ],
1335
+ modelValue: p(u)
1336
+ }), ee({
1337
+ default: f(() => [
1338
+ (n(!0), y(U, null, R(V.$slots, (M, N) => _(V.$slots, N, { slot: N })), 256))
1339
+ ]),
1340
+ _: 2
1341
+ }, [
1342
+ z.value ? {
1343
+ name: "caret",
1344
+ fn: f(({ toggle: M }) => [
1345
+ v(p(C), {
1346
+ icon: "bi:x",
1347
+ class: "my-auto multiselect__clear-icon",
1348
+ onMousedown: I[0] || (I[0] = G((N) => q(), ["prevent", "stop"])),
1349
+ "data-cy": "clear"
1350
+ }),
1351
+ m("div", {
1352
+ class: "multiselect__select",
1353
+ onMousedown: G(M, ["prevent", "stop"])
1354
+ }, null, 40, Ze)
1355
+ ]),
1356
+ key: "0"
1357
+ } : void 0,
1358
+ i.value.multiple && V.showSelectAll && !i.value.async ? {
1359
+ name: "beforeList",
1360
+ fn: f(() => [
1361
+ m("li", {
1362
+ class: "multiselect__element",
1363
+ onClick: le,
1364
+ onMouseover: D,
1365
+ onMouseleave: H,
1366
+ "data-cy": "toggle-all"
1367
+ }, [
1368
+ m("span", {
1369
+ class: S(`multiselect__option ${c.value}`)
1370
+ }, [
1371
+ m("input", {
1372
+ checked: g.value,
1373
+ name: "selected",
1374
+ type: "checkbox",
1375
+ class: "multiselect__option--checkbox"
1376
+ }, null, 8, Ye),
1377
+ Je
1378
+ ], 2)
1379
+ ], 32)
1380
+ ]),
1381
+ key: "1"
1382
+ } : void 0,
1383
+ i.value.multiple ? {
1384
+ name: "option",
1385
+ fn: f(({ option: M }) => [
1386
+ m("div", {
1387
+ "data-cy": M.label
1388
+ }, [
1389
+ m("input", {
1390
+ checked: Z(M),
1391
+ name: "selected",
1392
+ type: "checkbox",
1393
+ class: "multiselect__option--checkbox"
1394
+ }, null, 8, Qe),
1395
+ P(" " + h(M[i.value.label]), 1)
1396
+ ], 8, Xe)
1397
+ ]),
1398
+ key: "2"
1399
+ } : void 0
1400
+ ]), 1040, ["class", "modelValue"]),
1401
+ O(m("small", {
1402
+ "data-cy": "error",
1403
+ class: "invalid-feedback"
1404
+ }, h(p(d)), 513), [
1405
+ [L, $.value]
1406
+ ])
1407
+ ], 64));
1408
+ }
1409
+ }), tt = {
1410
+ key: 0,
1411
+ class: "pl-1"
1412
+ }, at = { class: "border alternating-item-list" }, lt = {
1413
+ key: 0,
1414
+ class: "p-2 border-top border-bottom",
1415
+ "data-cy": "title"
1416
+ }, ot = { class: "d-inline-block" }, st = {
1417
+ key: 1,
1418
+ class: "p-2 item d-flex justify-content-between align-items-center"
1419
+ }, Ua = /* @__PURE__ */ x({
1420
+ __name: "ForgeMultiSelectPreview",
1421
+ props: {
1422
+ title: { default: "Selected Items" },
1423
+ orientation: { default: "row" },
1424
+ height: { default: "200px" },
1425
+ options: {},
1426
+ canRemoveItemFromPreview: { type: Boolean, default: !1 }
1427
+ },
1428
+ emits: ["update:modelValue"],
1429
+ setup(e, { emit: t }) {
1430
+ const l = e, a = re(), s = t, o = k(() => `${a.modelValue.length} selected`), u = k(() => a.modelValue.length), d = (i) => {
1431
+ s("update:modelValue", i);
1432
+ }, r = (i) => {
1433
+ d(a.modelValue.filter((b) => b.id !== i));
1434
+ };
1435
+ return (i, b) => {
1436
+ const c = A;
1437
+ return n(), y("div", {
1438
+ class: S(i.orientation === "column" ? "row" : ""),
1439
+ "data-cy": "multiselect-preview"
1440
+ }, [
1441
+ m("div", {
1442
+ class: S(i.orientation === "row" ? "col-12 mb-1" : "col"),
1443
+ "data-cy": "multiselect-container"
1444
+ }, [
1445
+ v(et, {
1446
+ "onUpdate:modelValue": [
1447
+ b[0] || (b[0] = (g) => d(g)),
1448
+ b[1] || (b[1] = (g) => i.$attrs.modelValue = g)
1449
+ ],
1450
+ modelValue: i.$attrs.modelValue,
1451
+ "limit-text": o.value,
1452
+ options: l.options
1453
+ }, {
1454
+ tag: f(() => [
1455
+ P(h(""))
1456
+ ]),
1457
+ selection: f(() => [
1458
+ i.$attrs.modelValue.length > 0 ? (n(), y("span", tt, h(u.value) + " items selected", 1)) : F("", !0)
1459
+ ]),
1460
+ default: f(() => [
1461
+ (n(!0), y(U, null, R(i.$slots, (g, $) => _(i.$slots, $, { slot: $ })), 256))
1462
+ ]),
1463
+ _: 3
1464
+ }, 8, ["modelValue", "limit-text", "options"]),
1465
+ _(i.$slots, "after-multi-select")
1466
+ ], 2),
1467
+ m("div", {
1468
+ class: S(i.orientation === "row" ? "col-12" : "col"),
1469
+ "data-cy": "options-preview"
1470
+ }, [
1471
+ m("div", {
1472
+ style: be({ height: i.height }),
1473
+ class: "overflow-auto"
1474
+ }, [
1475
+ m("div", at, [
1476
+ i.title ? (n(), y("div", lt, h(i.title), 1)) : F("", !0),
1477
+ (n(!0), y(U, null, R(i.$attrs.modelValue, (g) => (n(), y("div", {
1478
+ key: g.id,
1479
+ class: "p-2 item d-flex justify-content-between align-items-center"
1480
+ }, [
1481
+ _(i.$slots, "list-item", { item: g }, () => [
1482
+ m("span", ot, h(g.shortLabel ? g.shortLabel : g.label), 1)
1483
+ ]),
1484
+ i.canRemoveItemFromPreview ? (n(), w(c, {
1485
+ key: 0,
1486
+ link: "",
1487
+ class: "m-0 p-0 d-flex align-items-center",
1488
+ onClick: ($) => r(g.id)
1489
+ }, {
1490
+ default: f(() => [
1491
+ v(p(C), {
1492
+ icon: "bi:x",
1493
+ class: "close-icon",
1494
+ "data-cy": `close-icon-${g.id}`
1495
+ }, null, 8, ["data-cy"])
1496
+ ]),
1497
+ _: 2
1498
+ }, 1032, ["onClick"])) : F("", !0)
1499
+ ]))), 128)),
1500
+ i.$attrs.modelValue.length === 0 ? (n(), y("div", st, "No Items Selected.")) : F("", !0)
1501
+ ])
1502
+ ], 4)
1503
+ ], 2)
1504
+ ], 2);
1505
+ };
1506
+ }
1507
+ }), nt = { class: "d-flex justify-content-between pb-2" }, it = {
1508
+ "data-cy": "title",
1509
+ class: "h3"
1510
+ }, rt = {
1511
+ "data-cy": "slot",
1512
+ class: "d-flex align-items-center"
1513
+ }, Da = /* @__PURE__ */ x({
1514
+ __name: "ForgePageHeader",
1515
+ props: {
1516
+ title: {}
1517
+ },
1518
+ setup(e) {
1519
+ const t = e;
1520
+ return (l, a) => (n(), y("div", nt, [
1521
+ m("h1", it, h(t.title), 1),
1522
+ m("div", rt, [
1523
+ _(l.$slots, "default")
1524
+ ])
1525
+ ]));
1526
+ }
1527
+ }), dt = { "data-cy": "before-slot" }, ut = { "data-cy": "after-slot" }, ct = /* @__PURE__ */ x({
1528
+ __name: "ForgeDatepicker",
1529
+ props: {
1530
+ severity: { default: "primary" },
1531
+ modelValue: {},
1532
+ selectionMode: { default: "single" },
1533
+ dateFormat: { default: "dd/mm/yy" },
1534
+ inline: { type: Boolean },
1535
+ showOtherMonths: { type: Boolean, default: !0 },
1536
+ selectOtherMonths: { type: Boolean },
1537
+ showIcon: { type: Boolean, default: !0 },
1538
+ iconDisplay: {},
1539
+ icon: {},
1540
+ previousIcon: {},
1541
+ nextIcon: {},
1542
+ incrementIcon: {},
1543
+ decrementIcon: {},
1544
+ numberOfMonths: { default: 1 },
1545
+ responsiveOptions: {},
1546
+ breakpoint: {},
1547
+ view: { default: "date" },
1548
+ touchUI: { type: Boolean },
1549
+ monthNavigator: { type: Boolean },
1550
+ yearNavigator: { type: Boolean },
1551
+ yearRange: {},
1552
+ minDate: {},
1553
+ maxDate: {},
1554
+ disabledDates: {},
1555
+ disabledDays: {},
1556
+ maxDateCount: {},
1557
+ showOnFocus: { type: Boolean },
1558
+ autoZIndex: { type: Boolean, default: !0 },
1559
+ baseZIndex: { default: 0 },
1560
+ showButtonBar: { type: Boolean, default: !0 },
1561
+ shortYearCutoff: {},
1562
+ showTime: { type: Boolean },
1563
+ timeOnly: { type: Boolean },
1564
+ hourFormat: {},
1565
+ stepHour: {},
1566
+ stepMinute: {},
1567
+ stepSecond: {},
1568
+ showSeconds: { type: Boolean },
1569
+ hideOnDateTimeSelect: { type: Boolean },
1570
+ hideOnRangeSelection: { type: Boolean },
1571
+ timeSeparator: {},
1572
+ showWeek: { type: Boolean },
1573
+ manualInput: { type: Boolean },
1574
+ invalid: { type: Boolean },
1575
+ disabled: { type: Boolean },
1576
+ variant: {},
1577
+ readonly: { type: Boolean },
1578
+ placeholder: {},
1579
+ appendTo: { default: "body" },
1580
+ id: {},
1581
+ inputId: {},
1582
+ inputStyle: {},
1583
+ inputClass: {},
1584
+ inputProps: {},
1585
+ panelStyle: {},
1586
+ panelClass: {},
1587
+ panelProps: {},
1588
+ ariaLabelledby: {},
1589
+ ariaLabel: {},
1590
+ pt: {},
1591
+ ptOptions: {},
1592
+ unstyled: { type: Boolean }
1593
+ },
1594
+ setup(e) {
1595
+ const t = e, l = k(() => ({
1596
+ dayLabel: ({ context: a }) => ({
1597
+ class: [
1598
+ "btn rounded-circle w-100 py-2",
1599
+ {
1600
+ "disabled border-0": a.disabled,
1601
+ "btn-primary": a.selected && !a.disabled && (t.severity === void 0 || t.severity === "primary"),
1602
+ "btn-secondary": a.selected && !a.disabled && t.severity === "secondary",
1603
+ "btn-success": a.selected && !a.disabled && t.severity === "success",
1604
+ "btn-warning": a.selected && !a.disabled && t.severity === "warning",
1605
+ "btn-danger": a.selected && !a.disabled && t.severity === "danger",
1606
+ "btn-info": a.selected && !a.disabled && t.severity === "info"
1607
+ }
1608
+ ]
1609
+ }),
1610
+ clearButton: () => ({
1611
+ class: [
1612
+ "btn",
1613
+ {
1614
+ "btn-link text-primary": t.severity === void 0 || t.severity === "primary",
1615
+ "btn-link text-secondary": t.severity === "secondary",
1616
+ "btn-link text-success": t.severity === "success",
1617
+ "btn-link text-warning": t.severity === "warning",
1618
+ "btn-link text-danger": t.severity === "danger",
1619
+ "btn-link text-info": t.severity === "info"
1620
+ }
1621
+ ]
1622
+ }),
1623
+ todayButton: () => ({
1624
+ class: [
1625
+ "btn",
1626
+ {
1627
+ "btn-link text-primary": t.severity === void 0 || t.severity === "primary",
1628
+ "btn-link text-secondary": t.severity === "secondary",
1629
+ "btn-link text-success": t.severity === "success",
1630
+ "btn-link text-warning": t.severity === "warning",
1631
+ "btn-link text-danger": t.severity === "danger",
1632
+ "btn-link text-info": t.severity === "info"
1633
+ }
1634
+ ]
1635
+ })
1636
+ }));
1637
+ return (a, s) => {
1638
+ const o = xe;
1639
+ return n(), y(U, null, [
1640
+ m("span", dt, [
1641
+ _(a.$slots, "before")
1642
+ ]),
1643
+ v(o, B({ ...t, ...a.$attrs }, { pt: l.value }), null, 16, ["pt"]),
1644
+ O(v(p(C), {
1645
+ "data-cy": "icon",
1646
+ icon: "bi:calendar3",
1647
+ width: "32",
1648
+ height: "32",
1649
+ class: S(["ps-2", t.severity == null ? "text-primary" : `text-${t.severity}`])
1650
+ }, null, 8, ["class"]), [
1651
+ [L, t.showIcon]
1652
+ ]),
1653
+ m("span", ut, [
1654
+ _(a.$slots, "after")
1655
+ ])
1656
+ ], 64);
1657
+ };
1658
+ }
1659
+ }), Aa = /* @__PURE__ */ x({
1660
+ __name: "ForgeRemainingCharacters",
1661
+ props: {
1662
+ maxCount: { default: 300 },
1663
+ currentCount: {}
1664
+ },
1665
+ setup(e) {
1666
+ const t = e, l = k(() => t.maxCount - t.currentCount);
1667
+ return (a, s) => (n(), y("div", {
1668
+ class: S(l.value < 0 ? "text-danger" : "")
1669
+ }, "Remaining characters: " + h(l.value), 3));
1670
+ }
1671
+ }), pt = /* @__PURE__ */ m("hr", null, null, -1), mt = { class: "d-flex justify-content-between" }, Na = /* @__PURE__ */ x({
1672
+ __name: "ForgeForm",
1673
+ props: {
1674
+ onSubmit: {},
1675
+ title: { default: "Forge Form Title" },
1676
+ hideTitle: { type: Boolean, default: !1 },
1677
+ titleClass: { default: "" },
1678
+ submitText: { default: "Submit" },
1679
+ cancelText: { default: "Cancel" },
1680
+ hideCancel: { type: Boolean, default: !1 }
1681
+ },
1682
+ setup(e) {
1683
+ const t = e, l = T(!1), a = T({
1684
+ hasError: !1,
1685
+ message: ""
1686
+ });
1687
+ async function s() {
1688
+ l.value = !0, a.value.hasError = !1;
1689
+ try {
1690
+ await t.onSubmit();
1691
+ } catch (o) {
1692
+ a.value.hasError = !0, o.message && (a.value.message = o.message);
1693
+ }
1694
+ l.value = !1;
1695
+ }
1696
+ return (o, u) => {
1697
+ const d = A;
1698
+ return n(), y("form", B(o.$attrs, {
1699
+ novalidate: "",
1700
+ class: "position-relative shadow-sm border p-4 bg-white",
1701
+ onSubmit: G(s, ["prevent"])
1702
+ }), [
1703
+ o.hideTitle ? F("", !0) : (n(), y(U, { key: 0 }, [
1704
+ _(o.$slots, "title", {}, () => [
1705
+ m("h3", {
1706
+ class: S(o.titleClass),
1707
+ "data-cy": "form-title"
1708
+ }, h(o.title), 3)
1709
+ ]),
1710
+ pt
1711
+ ], 64)),
1712
+ a.value.hasError ? (n(), w(te, {
1713
+ key: 1,
1714
+ severity: "danger",
1715
+ "data-cy": "error"
1716
+ }, {
1717
+ default: f(() => [
1718
+ _(o.$slots, "error", {
1719
+ error: a.value.message
1720
+ }, () => [
1721
+ P(h(a.value.message), 1)
1722
+ ])
1723
+ ]),
1724
+ _: 3
1725
+ })) : F("", !0),
1726
+ _(o.$slots, "default"),
1727
+ m("div", mt, [
1728
+ _(o.$slots, "cancel", {}, () => [
1729
+ o.hideCancel ? F("", !0) : (n(), w(d, {
1730
+ key: 0,
1731
+ "data-cy": "cancel-btn",
1732
+ type: "reset",
1733
+ severity: "secondary",
1734
+ outlined: "",
1735
+ onClick: u[0] || (u[0] = (r) => o.$emit("cancel"))
1736
+ }, {
1737
+ default: f(() => [
1738
+ P(h(o.cancelText), 1)
1739
+ ]),
1740
+ _: 1
1741
+ }))
1742
+ ]),
1743
+ _(o.$slots, "submit", { submit: s }, () => [
1744
+ v(d, {
1745
+ "data-cy": "submit-btn",
1746
+ type: "submit",
1747
+ severity: "primary",
1748
+ class: "ms-auto"
1749
+ }, {
1750
+ default: f(() => [
1751
+ P(h(o.submitText), 1)
1752
+ ]),
1753
+ _: 1
1754
+ })
1755
+ ])
1756
+ ]),
1757
+ l.value ? (n(), w(ce, {
1758
+ key: 2,
1759
+ "data-cy": "loading-spinner"
1760
+ })) : F("", !0)
1761
+ ], 16);
1762
+ };
1763
+ }
1764
+ }), yt = { class: "d-flex flex-column" }, bt = ["for"], Oa = /* @__PURE__ */ x({
1765
+ __name: "ForgeFormField",
1766
+ props: {
1767
+ name: {},
1768
+ label: {},
1769
+ type: { default: "text" },
1770
+ rules: {},
1771
+ mask: { default: "" },
1772
+ placeholder: { default: "" }
1773
+ },
1774
+ setup(e) {
1775
+ const t = e, { errors: l, value: a, errorMessage: s } = W(() => t.name, t.rules), o = k(() => l.value.length > 0);
1776
+ return (u, d) => {
1777
+ const r = Fe, i = $e, b = oe;
1778
+ return n(), y("div", yt, [
1779
+ t.type !== "checkbox" ? (n(), y("label", {
1780
+ key: 0,
1781
+ for: t.name
1782
+ }, h(t.label), 9, bt)) : F("", !0),
1783
+ t.type === "checkbox" ? (n(), w(De, B({
1784
+ key: 1,
1785
+ id: t.name,
1786
+ rules: u.rules,
1787
+ label: t.label
1788
+ }, u.$attrs), null, 16, ["id", "rules", "label"])) : t.type === "number" ? (n(), w(p(de), B({
1789
+ key: 2,
1790
+ id: t.name,
1791
+ placeholder: t.placeholder,
1792
+ modelValue: p(a),
1793
+ "onUpdate:modelValue": d[0] || (d[0] = (c) => E(a) ? a.value = c : null),
1794
+ "input-class": { "is-invalid": o.value },
1795
+ class: { "is-invalid": o.value }
1796
+ }, u.$attrs), null, 16, ["id", "placeholder", "modelValue", "input-class", "class"])) : t.type === "textarea" ? (n(), w(r, B({
1797
+ key: 3,
1798
+ id: t.name,
1799
+ placeholder: t.placeholder,
1800
+ modelValue: p(a),
1801
+ "onUpdate:modelValue": d[1] || (d[1] = (c) => E(a) ? a.value = c : null),
1802
+ class: { "is-invalid": o.value }
1803
+ }, u.$attrs), null, 16, ["id", "placeholder", "modelValue", "class"])) : t.type === "mask" ? (n(), w(i, B({
1804
+ key: 4,
1805
+ id: t.name,
1806
+ placeholder: t.placeholder,
1807
+ modelValue: p(a),
1808
+ "onUpdate:modelValue": d[2] || (d[2] = (c) => E(a) ? a.value = c : null),
1809
+ mask: t.mask,
1810
+ class: { "is-invalid": o.value }
1811
+ }, u.$attrs), null, 16, ["id", "placeholder", "modelValue", "mask", "class"])) : t.type === "text" ? (n(), w(b, B({
1812
+ key: 5,
1813
+ id: t.name,
1814
+ placeholder: t.placeholder,
1815
+ modelValue: p(a),
1816
+ "onUpdate:modelValue": d[3] || (d[3] = (c) => E(a) ? a.value = c : null),
1817
+ class: { "is-invalid": o.value }
1818
+ }, u.$attrs), null, 16, ["id", "placeholder", "modelValue", "class"])) : F("", !0),
1819
+ t.type !== "checkbox" ? O((n(), y("small", {
1820
+ key: 6,
1821
+ "data-cy": "error",
1822
+ class: "invalid-feedback"
1823
+ }, h(p(s)), 513)), [
1824
+ [L, o.value]
1825
+ ]) : F("", !0)
1826
+ ]);
1827
+ };
1828
+ }
1829
+ }), Ra = /* @__PURE__ */ x({
1830
+ __name: "ForgeChips",
1831
+ props: {
1832
+ chipSeverity: { default: "primary" },
1833
+ pill: { type: Boolean, default: !1 },
1834
+ name: { default: "" },
1835
+ rules: {},
1836
+ modelValue: {},
1837
+ max: {},
1838
+ addOnBlur: { type: Boolean },
1839
+ allowDuplicate: { type: Boolean },
1840
+ separator: { default: "," },
1841
+ inputId: {},
1842
+ inputClass: {},
1843
+ inputStyle: {},
1844
+ inputProps: {},
1845
+ removeTokenIcon: {},
1846
+ invalid: { type: Boolean },
1847
+ disabled: { type: Boolean },
1848
+ variant: {},
1849
+ placeholder: {},
1850
+ ariaLabelledby: {},
1851
+ ariaLabel: {},
1852
+ pt: {},
1853
+ ptOptions: {},
1854
+ unstyled: { type: Boolean }
1855
+ },
1856
+ setup(e) {
1857
+ const t = e, { errors: l, value: a, errorMessage: s } = W(() => t.name, t.rules);
1858
+ a.value = t.modelValue;
1859
+ const o = k(() => l.value.length > 0), u = k(() => ({
1860
+ container: ({ props: d }) => ({
1861
+ class: [
1862
+ "form-control mb-0",
1863
+ {
1864
+ disabled: d.disabled,
1865
+ "is-invalid": o.value
1866
+ }
1867
+ ]
1868
+ }),
1869
+ token: {
1870
+ class: [
1871
+ "rounded px-2 py-1 me-2 text-white",
1872
+ {
1873
+ "rounded-pill": t.pill,
1874
+ "opacity-75": t.disabled
1875
+ },
1876
+ {
1877
+ "bg-primary border-primary": t.chipSeverity === void 0 || t.chipSeverity === "primary",
1878
+ "bg-secondary border-secondary": t.chipSeverity === "secondary",
1879
+ "bg-success border-success": t.chipSeverity === "success",
1880
+ "bg-warning border-warning": t.chipSeverity === "warning",
1881
+ "bg-danger border-danger": t.chipSeverity === "danger",
1882
+ "bg-info border-info": t.chipSeverity === "info"
1883
+ }
1884
+ ]
1885
+ }
1886
+ }));
1887
+ return (d, r) => {
1888
+ const i = Be;
1889
+ return n(), y(U, null, [
1890
+ v(i, B({ ...t, ...d.$attrs }, {
1891
+ pt: u.value,
1892
+ "model-value": p(a),
1893
+ "onUpdate:modelValue": r[0] || (r[0] = (b) => E(a) ? a.value = b : null)
1894
+ }), {
1895
+ removetokenicon: f(({ removeCallback: b }) => [
1896
+ O(v(p(C), {
1897
+ icon: "bi:x",
1898
+ class: "cursor-pointer",
1899
+ onClick: b
1900
+ }, null, 8, ["onClick"]), [
1901
+ [L, !t.disabled]
1902
+ ])
1903
+ ]),
1904
+ _: 1
1905
+ }, 16, ["pt", "model-value"]),
1906
+ O(m("small", {
1907
+ "data-cy": "error",
1908
+ class: "text-invalid"
1909
+ }, h(p(s)), 513), [
1910
+ [L, o.value]
1911
+ ])
1912
+ ], 64);
1913
+ };
1914
+ }
1915
+ }), vt = /* @__PURE__ */ x({
1916
+ __name: "ForgeProgressBar",
1917
+ props: {
1918
+ severity: { default: "primary" },
1919
+ striped: { type: Boolean, default: !1 },
1920
+ animate: { type: Boolean, default: !1 },
1921
+ pixelWidth: {},
1922
+ value: {},
1923
+ mode: {},
1924
+ showValue: { type: Boolean },
1925
+ pt: {},
1926
+ ptOptions: {},
1927
+ unstyled: { type: Boolean }
1928
+ },
1929
+ setup(e) {
1930
+ const t = e, l = k(() => t.striped ? "progress-bar-striped" : null), a = k(() => t.animate ? "progress-bar-animated" : null), s = k(() => {
1931
+ switch (t.severity) {
1932
+ case "secondary":
1933
+ return "bg-secondary";
1934
+ case "success":
1935
+ return "bg-success";
1936
+ case "warning":
1937
+ return "bg-warning";
1938
+ case "danger":
1939
+ return "bg-danger";
1940
+ case "info":
1941
+ return "bg-info";
1942
+ case void 0:
1943
+ case "primary":
1944
+ default:
1945
+ return "bg-primary";
1946
+ }
1947
+ }), o = k(() => ({
1948
+ root: {
1949
+ style: t.pixelWidth ? `width: ${t.pixelWidth}px` : ""
1950
+ },
1951
+ value: {
1952
+ class: [s.value, l.value, a.value]
1953
+ }
1954
+ }));
1955
+ return (u, d) => {
1956
+ const r = Se;
1957
+ return n(), w(r, B({ ...u.$attrs, ...t }, { pt: o.value }), {
1958
+ default: f(() => [
1959
+ _(u.$slots, "default")
1960
+ ]),
1961
+ _: 3
1962
+ }, 16, ["pt"]);
1963
+ };
1964
+ }
1965
+ }), ft = { class: "value text-light w-100 text-center" }, Ea = /* @__PURE__ */ x({
1966
+ __name: "ForgeStatWidget",
1967
+ props: {
1968
+ size: { default: "md" },
1969
+ severity: { default: "primary" }
1970
+ },
1971
+ setup(e) {
1972
+ const t = e;
1973
+ return (l, a) => (n(), y("div", B(l.$attrs, {
1974
+ class: `d-flex shadow m-2 align-items-center widget--${t.size} bg-${t.severity}`
1975
+ }), [
1976
+ m("span", ft, [
1977
+ _(l.$slots, "default")
1978
+ ])
1979
+ ], 16));
1980
+ }
1981
+ }), gt = {
1982
+ class: "d-flex flex-column align-items-center",
1983
+ "data-cy": "stepper"
1984
+ }, ht = { class: "d-flex align-items-center justify-content-center w-100" }, ja = /* @__PURE__ */ x({
1985
+ __name: "ForgeStepper",
1986
+ props: {
1987
+ currentStep: { default: 0 },
1988
+ severity: { default: "primary" },
1989
+ id: {},
1990
+ model: {},
1991
+ readonly: { type: Boolean },
1992
+ exact: { type: Boolean },
1993
+ activeStep: {},
1994
+ pt: {},
1995
+ ptOptions: {},
1996
+ unstyled: { type: Boolean }
1997
+ },
1998
+ emits: ["update:currentStep"],
1999
+ setup(e, { emit: t }) {
2000
+ const l = t, a = e, s = T(a.currentStep), o = () => {
2001
+ do
2002
+ s.value--;
2003
+ while (a.model[s.value].disabled);
2004
+ l("update:currentStep", s.value);
2005
+ }, u = () => {
2006
+ if (s.value < a.model.length - 1)
2007
+ do
2008
+ s.value++;
2009
+ while (a.model[s.value].disabled);
2010
+ l("update:currentStep", s.value);
2011
+ }, d = k(() => {
2012
+ const i = a.model.findIndex((b) => !b.disabled);
2013
+ return !(i < s.value && i > -1);
2014
+ }), r = k(() => ({
2015
+ menuitem: (i) => ({
2016
+ class: [{
2017
+ "cursor-pointer": !i.context.disabled
2018
+ }]
2019
+ }),
2020
+ step: (i) => ({
2021
+ class: [
2022
+ "d-flex align-items-center justify-content-center mb-2 step",
2023
+ {
2024
+ inactive: i.context.disabled,
2025
+ "bg-primary text-white": i.context.index === s.value && (a.severity === void 0 || a.severity === "primary"),
2026
+ "bg-secondary text-white": i.context.index === s.value && a.severity === "secondary",
2027
+ "bg-success text-white": i.context.index === s.value && a.severity === "success",
2028
+ "bg-warning text-white": i.context.index === s.value && a.severity === "warning",
2029
+ "bg-danger text-white": i.context.index === s.value && a.severity === "danger",
2030
+ "bg-info text-white": i.context.index === s.value && a.severity === "info"
2031
+ }
2032
+ ]
2033
+ }),
2034
+ label: (i) => ({
2035
+ class: [
2036
+ "h5",
2037
+ {
2038
+ "border-bottom border-2 border-primary": i.context.index === s.value && (a.severity === void 0 || a.severity === "primary"),
2039
+ "border-bottom border-2 border-secondary": i.context.index === s.value && a.severity === "secondary",
2040
+ "border-bottom border-2 border-success": i.context.index === s.value && a.severity === "success",
2041
+ "border-bottom border-2 border-warning": i.context.index === s.value && a.severity === "warning",
2042
+ "border-bottom border-2 border-danger": i.context.index === s.value && a.severity === "danger",
2043
+ "border-bottom border-2 border-info": i.context.index === s.value && a.severity === "info"
2044
+ }
2045
+ ]
2046
+ })
2047
+ }));
2048
+ return (i, b) => {
2049
+ const c = A, g = Ve, $ = Ce;
2050
+ return n(), y("div", gt, [
2051
+ m("div", ht, [
2052
+ v(c, {
2053
+ severity: a.severity,
2054
+ disabled: d.value,
2055
+ onClick: o,
2056
+ class: "rounded-circle py-2 me-4",
2057
+ "data-cy": "back-button"
2058
+ }, {
2059
+ default: f(() => [
2060
+ v(p(C), {
2061
+ icon: "bi:chevron-left",
2062
+ class: "mb-1"
2063
+ })
2064
+ ]),
2065
+ _: 1
2066
+ }, 8, ["severity", "disabled"]),
2067
+ v(g, {
2068
+ "active-step": s.value,
2069
+ "onUpdate:activeStep": b[0] || (b[0] = (z) => s.value = z),
2070
+ model: a.model,
2071
+ pt: r.value,
2072
+ readonly: !1
2073
+ }, null, 8, ["active-step", "model", "pt"])
2074
+ ]),
2075
+ v($),
2076
+ (n(!0), y(U, null, R(a.model, (z, D) => (n(), y("div", {
2077
+ key: D,
2078
+ class: "w-100"
2079
+ }, [
2080
+ D === s.value ? _(i.$slots, z.key ?? z.label, {
2081
+ key: 0,
2082
+ nextStep: u,
2083
+ previousStep: o
2084
+ }, () => [
2085
+ v(te, {
2086
+ severity: "info",
2087
+ "data-cy": "alert"
2088
+ }, {
2089
+ default: f(() => [
2090
+ P(" Please add Slot Content for the key " + h(z.key ?? z.label) + " ", 1),
2091
+ v(c, {
2092
+ severity: "primary",
2093
+ label: "Next",
2094
+ onClick: u,
2095
+ class: "ms-2"
2096
+ })
2097
+ ]),
2098
+ _: 2
2099
+ }, 1024)
2100
+ ]) : F("", !0)
2101
+ ]))), 128))
2102
+ ]);
2103
+ };
2104
+ }
2105
+ }), wt = { class: "p-4 text-wrap w-100" }, _t = { class: "p-4 text-wrap w-100" }, La = /* @__PURE__ */ x({
2106
+ __name: "ForgeTile",
2107
+ props: {
2108
+ severity: { default: "primary" },
2109
+ barPosition: { default: "none" },
2110
+ clickable: { type: Boolean, default: !1 }
2111
+ },
2112
+ setup(e) {
2113
+ const t = e, l = k(() => `${t.severity === void 0 ? "tile-primary" : `tile-${t.severity}`} ${t.barPosition === "none" ? "border-0" : `tile-bar-${t.barPosition}`}`), a = k(() => `${t.severity === void 0 ? "tile-primary border-primary" : `tile-${t.severity} border-${t.severity}`} ${t.barPosition === "none" ? "" : `tile-bar-${t.barPosition}`}`);
2114
+ return (s, o) => {
2115
+ const u = A;
2116
+ return t.clickable ? (n(), w(u, {
2117
+ key: 0,
2118
+ class: S(["d-flex w-100 p-0 text-body", l.value]),
2119
+ severity: t.severity,
2120
+ unstyled: "",
2121
+ "data-cy": "button-tile"
2122
+ }, {
2123
+ default: f(() => [
2124
+ m("div", wt, [
2125
+ _(s.$slots, "default", {}, () => [
2126
+ P("Tile Content")
2127
+ ])
2128
+ ])
2129
+ ]),
2130
+ _: 3
2131
+ }, 8, ["severity", "class"])) : (n(), y("div", {
2132
+ key: 1,
2133
+ class: S(["d-flex w-100", a.value]),
2134
+ "data-cy": "tile"
2135
+ }, [
2136
+ m("div", _t, [
2137
+ _(s.$slots, "default", {}, () => [
2138
+ P("Tile Content")
2139
+ ])
2140
+ ])
2141
+ ], 2));
2142
+ };
2143
+ }
2144
+ });
2145
+ function J(e, t) {
2146
+ return e > 1 ? `${t}s` : t;
2147
+ }
2148
+ const kt = {
2149
+ class: "d-flex justify-content-start align-items-baseline",
2150
+ "data-cy": "pagination-header"
2151
+ }, xt = { class: "ms-2" }, $t = { key: 0 }, Ft = /* @__PURE__ */ m("span", { class: "mx-2" }, "|", -1), Bt = {
2152
+ class: "w-auto",
2153
+ "data-cy": "total"
2154
+ }, St = /* @__PURE__ */ x({
2155
+ __name: "ForgePaginationHeader",
2156
+ props: {
2157
+ total: {},
2158
+ pageSizes: { default: () => [5, 10, 25, 50, 100] },
2159
+ perPage: { default: 10 }
2160
+ },
2161
+ emits: ["update:perPage"],
2162
+ setup(e, { emit: t }) {
2163
+ const l = t, a = e, s = (u) => {
2164
+ l("update:perPage", u.value);
2165
+ }, o = k(() => {
2166
+ const u = Math.ceil(a.total / a.perPage);
2167
+ return `${u} ${J(u, "page")}`;
2168
+ });
2169
+ return (u, d) => (n(), y("div", kt, [
2170
+ P(" Number of results per page "),
2171
+ m("div", xt, [
2172
+ v(p(se), {
2173
+ options: a.pageSizes,
2174
+ "model-value": a.perPage,
2175
+ onChange: d[0] || (d[0] = (r) => s(r))
2176
+ }, null, 8, ["options", "model-value"])
2177
+ ]),
2178
+ a.total ? (n(), y("div", $t, [
2179
+ Ft,
2180
+ m("span", Bt, h(a.total) + " " + h(p(J)(a.total, "result")) + " across " + h(o.value), 1)
2181
+ ])) : F("", !0)
2182
+ ]));
2183
+ }
2184
+ }), Ct = { "data-cy": "above-table-slot" }, Vt = { class: "d-flex" }, zt = { class: "d-flex align-items-end mb-2" }, It = { key: 0 }, Tt = { class: "ms-auto" }, Pt = {
2185
+ class: "d-flex",
2186
+ "data-cy": "legacy-page-size"
2187
+ }, Mt = /* @__PURE__ */ m("span", { class: "me-2 my-auto text-nowrap" }, "Page Size:", -1), Ut = { "data-cy": "legacy-total" }, Ha = /* @__PURE__ */ x({
2188
+ __name: "ForgeTable",
2189
+ props: {
2190
+ value: {},
2191
+ legacyPaginationFooter: { type: Boolean, default: !1 },
2192
+ total: {},
2193
+ showClearButton: { type: Boolean, default: !1 },
2194
+ showExporterButton: { type: Boolean, default: !1 },
2195
+ dataKey: {},
2196
+ rows: {},
2197
+ first: {},
2198
+ totalRecords: {},
2199
+ paginator: { type: Boolean, default: !0 },
2200
+ paginatorPosition: {},
2201
+ alwaysShowPaginator: { type: Boolean, default: !0 },
2202
+ paginatorTemplate: {},
2203
+ pageLinkSize: {},
2204
+ rowsPerPageOptions: {},
2205
+ currentPageReportTemplate: {},
2206
+ lazy: { type: Boolean },
2207
+ loading: { type: Boolean },
2208
+ loadingIcon: {},
2209
+ sortField: {},
2210
+ sortOrder: {},
2211
+ nullSortOrder: {},
2212
+ defaultSortOrder: {},
2213
+ multiSortMeta: {},
2214
+ sortMode: {},
2215
+ removableSort: { type: Boolean },
2216
+ filters: {},
2217
+ filterDisplay: {},
2218
+ globalFilterFields: {},
2219
+ filterLocale: {},
2220
+ selection: {},
2221
+ selectionMode: {},
2222
+ compareSelectionBy: {},
2223
+ metaKeySelection: { type: Boolean },
2224
+ contextMenu: { type: Boolean },
2225
+ contextMenuSelection: {},
2226
+ selectAll: {},
2227
+ rowHover: { type: Boolean },
2228
+ csvSeparator: {},
2229
+ exportFilename: {},
2230
+ exportFunction: {},
2231
+ resizableColumns: { type: Boolean },
2232
+ columnResizeMode: {},
2233
+ reorderableColumns: { type: Boolean },
2234
+ expandedRows: {},
2235
+ expandedRowIcon: {},
2236
+ collapsedRowIcon: {},
2237
+ rowGroupMode: {},
2238
+ groupRowsBy: {},
2239
+ expandableRowGroups: { type: Boolean },
2240
+ expandedRowGroups: {},
2241
+ stateStorage: {},
2242
+ stateKey: {},
2243
+ editMode: {},
2244
+ editingRows: {},
2245
+ rowClass: {},
2246
+ rowStyle: {},
2247
+ scrollable: { type: Boolean },
2248
+ scrollHeight: {},
2249
+ virtualScrollerOptions: {},
2250
+ frozenValue: {},
2251
+ breakpoint: {},
2252
+ showGridlines: { type: Boolean },
2253
+ stripedRows: { type: Boolean },
2254
+ highlightOnSelect: { type: Boolean },
2255
+ size: {},
2256
+ tableStyle: {},
2257
+ tableClass: {},
2258
+ tableProps: {},
2259
+ filterInputProps: {},
2260
+ pt: {},
2261
+ ptOptions: {},
2262
+ unstyled: { type: Boolean }
2263
+ },
2264
+ emits: ["update:filters"],
2265
+ setup(e, { emit: t }) {
2266
+ const l = t, a = e, s = T([10, 20, 50, 100]), o = T(20), u = T(), d = () => {
2267
+ for (const c in a.filters)
2268
+ a.filters[c].value = null;
2269
+ r(a.filters);
2270
+ }, r = (c) => {
2271
+ l("update:filters", c);
2272
+ }, i = k(() => {
2273
+ const c = Math.ceil((a.total ?? a.value.length) / o.value);
2274
+ return `${c} ${J(c, "page")}`;
2275
+ }), b = () => {
2276
+ u.value.exportCSV();
2277
+ };
2278
+ return (c, g) => (n(), y(U, null, [
2279
+ m("span", Ct, [
2280
+ _(c.$slots, "above-table")
2281
+ ]),
2282
+ v(p(ze), B({ class: "w-100" }, { ...a, ...c.$attrs }, {
2283
+ rows: o.value,
2284
+ "total-records": c.total,
2285
+ "filter-display": a.filters ? "row" : void 0,
2286
+ ref_key: "forgeTable",
2287
+ ref: u,
2288
+ "onUpdate:filters": r,
2289
+ "data-cy": "table"
2290
+ }), ee({
2291
+ header: f(() => [
2292
+ m("div", Vt, [
2293
+ m("div", zt, [
2294
+ c.paginator && !c.legacyPaginationFooter ? (n(), y("span", It, [
2295
+ v(St, {
2296
+ total: c.total ?? c.value.length,
2297
+ "page-sizes": s.value,
2298
+ "per-page": o.value,
2299
+ "onUpdate:perPage": g[0] || (g[0] = ($) => o.value = $)
2300
+ }, null, 8, ["total", "page-sizes", "per-page"])
2301
+ ])) : F("", !0)
2302
+ ]),
2303
+ m("div", Tt, [
2304
+ c.showClearButton ? (n(), w(p(A), {
2305
+ key: 0,
2306
+ outlined: "",
2307
+ class: S(c.showExporterButton ? "me-2" : ""),
2308
+ onClick: d,
2309
+ "data-cy": "clear-all"
2310
+ }, {
2311
+ default: f(() => [
2312
+ v(p(C), {
2313
+ icon: "bi:funnel-fill",
2314
+ width: "24",
2315
+ height: "24"
2316
+ }),
2317
+ P(" Clear ")
2318
+ ]),
2319
+ _: 1
2320
+ }, 8, ["class"])) : F("", !0),
2321
+ c.showExporterButton ? (n(), w(p(A), {
2322
+ key: 1,
2323
+ outlined: "",
2324
+ onClick: b,
2325
+ "data-cy": "exporter"
2326
+ }, {
2327
+ default: f(() => [
2328
+ v(p(C), {
2329
+ icon: "typcn:export",
2330
+ width: "24",
2331
+ height: "24"
2332
+ }),
2333
+ P(" Export ")
2334
+ ]),
2335
+ _: 1
2336
+ })) : F("", !0)
2337
+ ])
2338
+ ])
2339
+ ]),
2340
+ default: f(() => [
2341
+ _(c.$slots, "default")
2342
+ ]),
2343
+ _: 2
2344
+ }, [
2345
+ R(c.$slots, ($, z) => ({
2346
+ name: z,
2347
+ fn: f((D) => [
2348
+ _(c.$slots, z, X(Q(D || {})))
2349
+ ])
2350
+ })),
2351
+ c.legacyPaginationFooter ? {
2352
+ name: "paginatorstart",
2353
+ fn: f(() => [
2354
+ m("span", Pt, [
2355
+ Mt,
2356
+ v(p(se), {
2357
+ options: s.value,
2358
+ modelValue: o.value,
2359
+ "onUpdate:modelValue": g[1] || (g[1] = ($) => o.value = $),
2360
+ class: "ms-2"
2361
+ }, null, 8, ["options", "modelValue"])
2362
+ ])
2363
+ ]),
2364
+ key: "0"
2365
+ } : void 0,
2366
+ c.legacyPaginationFooter ? {
2367
+ name: "paginatorend",
2368
+ fn: f(() => [
2369
+ m("span", Ut, h(c.total ?? c.value.length) + " " + h(p(J)(c.total ?? c.value.length, "result")) + " across " + h(i.value), 1)
2370
+ ]),
2371
+ key: "1"
2372
+ } : void 0
2373
+ ]), 1040, ["rows", "total-records", "filter-display"])
2374
+ ], 64));
2375
+ }
2376
+ }), qa = /* @__PURE__ */ x({
2377
+ __name: "ForgeFilterHeader",
2378
+ props: {
2379
+ dataType: {},
2380
+ dropdownOptions: {}
2381
+ },
2382
+ setup(e) {
2383
+ return (t, l) => {
2384
+ const a = de;
2385
+ return t.dataType === "numeric" ? (n(), w(a, B({ key: 0 }, t.$attrs, { class: "w-100" }), null, 16)) : t.dataType === "date" ? (n(), w(ct, B({ key: 1 }, t.$attrs, {
2386
+ "show-icon": !1,
2387
+ "show-on-focus": !0,
2388
+ class: "w-100"
2389
+ }), null, 16)) : t.dataType === "select" ? (n(), w(p(se), B({ key: 2 }, t.$attrs, {
2390
+ options: t.dropdownOptions,
2391
+ class: "dropdown-input w-100"
2392
+ }), null, 16, ["options"])) : t.dataType === "multiselect" ? (n(), w(p(Ie), B({ key: 3 }, t.$attrs, {
2393
+ options: t.dropdownOptions,
2394
+ showToggleAll: !1,
2395
+ placeholder: " ",
2396
+ filter: "",
2397
+ class: "w-100 dropdown-input"
2398
+ }), null, 16, ["options"])) : (n(), w(p(oe), B({ key: 4 }, t.$attrs, { class: "w-100" }), null, 16));
2399
+ };
2400
+ }
2401
+ });
2402
+ function pe(e, t, l, a) {
2403
+ const s = t.flatMap((o) => o.file);
2404
+ return t = t.map((o) => ({ ...o, status: o.status == "Duplicate" ? "Not Uploaded" : o.status })), e.forEach((o) => {
2405
+ const u = s.findIndex((r) => r.name === o.name);
2406
+ let d = "Not Uploaded";
2407
+ u === -1 ? ((!l.includes(o.type) || !(o.size <= a)) && (d = l.includes(o.type) ? "InvalidFileSize" : "InvalidFileType"), t.unshift({
2408
+ file: o,
2409
+ status: d,
2410
+ blobFileName: null
2411
+ })) : t[u].status = "Duplicate";
2412
+ }), t;
2413
+ }
2414
+ async function Dt(e, t) {
2415
+ if (e === "Uploaded" && t !== null)
2416
+ try {
2417
+ await new ue(t).delete();
2418
+ } catch (l) {
2419
+ if (l !== "BlobNotFound") {
2420
+ e = "DeleteFileFailed";
2421
+ return;
2422
+ }
2423
+ }
2424
+ }
2425
+ function ne(e, t = !0, l = 1) {
2426
+ const a = t ? 1e3 : 1024;
2427
+ if (Math.abs(e) < a)
2428
+ return e + " B";
2429
+ const s = t ? ["kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"] : ["KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"];
2430
+ let o = -1;
2431
+ const u = 10 ** l;
2432
+ do
2433
+ e /= a, ++o;
2434
+ while (Math.round(Math.abs(e) * u) / u >= a && o < s.length - 1);
2435
+ return e.toFixed(l) + " " + s[o];
2436
+ }
2437
+ function At(e) {
2438
+ return ["image/gif", "image/png", "image/jpeg", "image/svg"].includes(e);
2439
+ }
2440
+ function Nt(e) {
2441
+ return URL.createObjectURL(e);
2442
+ }
2443
+ const Ot = { class: "d-flex justify-content-between" }, Rt = ["accept", "disabled", "multiple"], Et = /* @__PURE__ */ x({
2444
+ __name: "UploadButton",
2445
+ props: /* @__PURE__ */ K({
2446
+ acceptedFileTypes: {},
2447
+ maxFileInput: {},
2448
+ showDragDropArea: { type: Boolean }
2449
+ }, {
2450
+ modelValue: { required: !0 },
2451
+ modelModifiers: {}
2452
+ }),
2453
+ emits: ["update:modelValue"],
2454
+ setup(e) {
2455
+ const t = j(e, "modelValue"), { acceptedFileTypes: l, maxFileInput: a, showDragDropArea: s } = e, o = k(() => a <= t.value.length), u = (d) => {
2456
+ t.value = pe(d, t.value, l, a);
2457
+ };
2458
+ return (d, r) => (n(), y("div", Ot, [
2459
+ _(d.$slots, "message"),
2460
+ m("div", null, [
2461
+ m("input", {
2462
+ id: "file-input",
2463
+ type: "file",
2464
+ class: "d-none",
2465
+ accept: d.acceptedFileTypes.join(", "),
2466
+ disabled: o.value,
2467
+ multiple: d.maxFileInput > 1,
2468
+ onInput: r[0] || (r[0] = (i) => u([...i.target.files]))
2469
+ }, null, 40, Rt),
2470
+ m("label", {
2471
+ class: S([{ disabled: o.value }, "btn btn-primary"]),
2472
+ id: "file-input-button",
2473
+ for: "file-input"
2474
+ }, [
2475
+ _(d.$slots, "button-content", {}, () => [
2476
+ v(p(C), {
2477
+ icon: "bi:upload",
2478
+ class: "me-2",
2479
+ height: "20px",
2480
+ width: "20px"
2481
+ }),
2482
+ P(" Browse your computer ")
2483
+ ])
2484
+ ], 2)
2485
+ ]),
2486
+ d.showDragDropArea ? (n(), y("div", {
2487
+ class: "ms-auto",
2488
+ key: d.acceptedFileTypes.length,
2489
+ id: "accepted-file-types"
2490
+ }, "Accepted File Types: " + h(d.acceptedFileTypes.map((i) => i.split("/").pop()).join(", ")), 1)) : F("", !0)
2491
+ ]));
2492
+ }
2493
+ }), jt = {
2494
+ key: 0,
2495
+ class: "py-4 px-3",
2496
+ id: "placeholder-message"
2497
+ }, Lt = {
2498
+ key: 1,
2499
+ class: "d-flex flex-column"
2500
+ }, Ht = /* @__PURE__ */ x({
2501
+ __name: "DragDropArea",
2502
+ props: /* @__PURE__ */ K({
2503
+ maxFileInput: {},
2504
+ maxFileSize: {},
2505
+ acceptedFileTypes: {}
2506
+ }, {
2507
+ modelValue: { required: !0 },
2508
+ modelModifiers: {}
2509
+ }),
2510
+ emits: ["update:modelValue"],
2511
+ setup(e) {
2512
+ const { acceptedFileTypes: t, maxFileInput: l, maxFileSize: a } = e, s = j(e, "modelValue"), o = T(!1), u = k(() => l <= s.value.length), d = (r) => {
2513
+ o.value = !1, r.dataTransfer.files.length > l || u.value ? r.preventDefault() : s.value = pe([...r.dataTransfer.files], s.value, t, a);
2514
+ };
2515
+ return (r, i) => (n(), y("div", {
2516
+ id: "drag-drop-area",
2517
+ class: S(`${o.value ? "border-2 border-primary bg-body-tertiary" : ""} mt-3 file-container border-dashed border-2`),
2518
+ onDragleave: i[0] || (i[0] = G((b) => o.value = !1, ["prevent"])),
2519
+ onDragover: i[1] || (i[1] = G((b) => o.value = !0, ["prevent"])),
2520
+ onDrop: G(d, ["prevent"])
2521
+ }, [
2522
+ s.value.length === 0 ? (n(), y("div", jt, [
2523
+ v(p(C), {
2524
+ icon: "bi:upload",
2525
+ class: "me-2",
2526
+ height: "20px",
2527
+ width: "20px"
2528
+ }),
2529
+ P(" Drag and drop files here ")
2530
+ ])) : (n(), y("div", Lt, [
2531
+ _(r.$slots, "default")
2532
+ ]))
2533
+ ], 34));
2534
+ }
2535
+ }), qt = { class: "d-flex align-items-center me-2" }, Gt = /* @__PURE__ */ x({
2536
+ __name: "UploadStatus",
2537
+ props: {
2538
+ fileSize: {},
2539
+ maxFileSize: {},
2540
+ bytesUploaded: {},
2541
+ uploadStatus: {}
2542
+ },
2543
+ setup(e) {
2544
+ const { fileSize: t, uploadStatus: l, bytesUploaded: a, maxFileSize: s } = e, o = k(() => l === "Failed" || l === "InvalidFileType" || l === "InvalidFileSize" ? "danger" : "warning"), u = k(() => {
2545
+ switch (l) {
2546
+ case "InvalidFileType":
2547
+ return "Upload Failed: File type is not accepted.";
2548
+ case "InvalidFileSize":
2549
+ return `Upload Failed: File size exceeds the ${ne(s)} limit.`;
2550
+ case "Aborted":
2551
+ return "Upload Failed: User cancelled.";
2552
+ case "DeleteFileFailed":
2553
+ return "Failed to delete: connection error, please try again";
2554
+ case "Duplicate":
2555
+ return "Upload Failed: A file with the same name has already been uploaded.";
2556
+ default:
2557
+ return "Upload Failed: Connection error, please try again.";
2558
+ }
2559
+ });
2560
+ return (d, r) => (n(), y("div", qt, [
2561
+ d.uploadStatus === "Uploading" ? (n(), w(vt, {
2562
+ key: 0,
2563
+ pixelWidth: 200,
2564
+ animate: "",
2565
+ striped: ""
2566
+ }, {
2567
+ default: f(() => [
2568
+ P(h((d.bytesUploaded / d.fileSize * 100).toFixed(0)) + "%", 1)
2569
+ ]),
2570
+ _: 1
2571
+ })) : F("", !0),
2572
+ d.uploadStatus !== "Uploading" && d.uploadStatus !== "Not Uploaded" && d.uploadStatus !== "Uploaded" && d.uploadStatus !== "Preparing" ? (n(), w(te, {
2573
+ key: 1,
2574
+ id: "upload-status-alert",
2575
+ severity: o.value,
2576
+ class: "mb-0 w-75 ms-auto"
2577
+ }, {
2578
+ default: f(() => [
2579
+ P(h(u.value), 1)
2580
+ ]),
2581
+ _: 1
2582
+ }, 8, ["severity"])) : F("", !0)
2583
+ ]));
2584
+ }
2585
+ }), Kt = ["data-cy"], Wt = { class: "ms-3 d-flex flex-column" }, Zt = {
2586
+ key: 1,
2587
+ id: "file-name"
2588
+ }, Yt = {
2589
+ class: "text-black-50",
2590
+ id: "file-type"
2591
+ }, Jt = {
2592
+ class: "text-black-50",
2593
+ id: "file-size"
2594
+ }, Xt = { class: "ms-auto my-auto d-flex" }, Qt = /* @__PURE__ */ x({
2595
+ __name: "FileInfo",
2596
+ props: /* @__PURE__ */ K({
2597
+ editableFileName: { type: Boolean },
2598
+ acceptedFileTypes: {},
2599
+ maxFileSize: {},
2600
+ getFileUrlAction: { type: Function },
2601
+ customFileNameRules: {},
2602
+ autoUploadToBlob: { type: Boolean }
2603
+ }, {
2604
+ file: { required: !0 },
2605
+ fileModifiers: {},
2606
+ blobFileName: { required: !0 },
2607
+ blobFileNameModifiers: {},
2608
+ uploadStatus: { required: !0 },
2609
+ uploadStatusModifiers: {}
2610
+ }),
2611
+ emits: /* @__PURE__ */ K(["deleted"], ["update:file", "update:blobFileName", "update:uploadStatus"]),
2612
+ setup(e, { emit: t }) {
2613
+ const { autoUploadToBlob: l, maxFileSize: a, getFileUrlAction: s, customFileNameRules: o, editableFileName: u, acceptedFileTypes: d } = e, r = j(e, "file"), i = j(e, "blobFileName"), b = j(e, "uploadStatus"), c = t, g = T(r.value.name), $ = T(""), z = T(0), D = T(), H = k(() => d.includes(r.value.type)), q = k(() => r.value.size <= a), ae = () => {
2614
+ r.value = new File([r.value], g.value, { type: r.value.type, lastModified: (/* @__PURE__ */ new Date()).valueOf() });
2615
+ }, Z = async () => {
2616
+ if (!H.value || !q.value) {
2617
+ b.value = H.value ? "InvalidFileSize" : "InvalidFileType";
2618
+ return;
2619
+ }
2620
+ b.value = "Preparing", D.value = new AbortController();
2621
+ const [V, I] = await s(r.value.name);
2622
+ if (!V) {
2623
+ b.value = "Failed";
2624
+ return;
2625
+ }
2626
+ try {
2627
+ b.value = "Uploading";
2628
+ const M = new ue(V), N = {
2629
+ abortSignal: D.value.signal,
2630
+ onProgress: (me) => z.value = me.loadedBytes,
2631
+ tags: { temp: "true" }
2632
+ };
2633
+ await M.uploadData(r.value, N), $.value = V, b.value = "Uploaded", i.value = I;
2634
+ } catch (M) {
2635
+ if (M.name === "AbortError") {
2636
+ b.value = "Aborted";
2637
+ return;
2638
+ }
2639
+ b.value = "Failed";
2640
+ }
2641
+ }, le = async () => {
2642
+ await Dt(b.value, $.value), c("deleted", r.value);
2643
+ };
2644
+ return ie(() => {
2645
+ l && Z();
2646
+ }), (V, I) => {
2647
+ const M = A;
2648
+ return n(), y("div", {
2649
+ class: "py-4 px-3 d-flex",
2650
+ "data-cy": `file-info-${r.value.name}`
2651
+ }, [
2652
+ m("div", null, [
2653
+ p(At)(r.value.type) ? (n(), w(p(Te), {
2654
+ key: 0,
2655
+ id: "thumbnail-image",
2656
+ "image-class": "image-file-thumbnail border",
2657
+ src: p(Nt)(r.value),
2658
+ alt: r.value.name,
2659
+ width: "75px",
2660
+ preview: ""
2661
+ }, null, 8, ["src", "alt"])) : (n(), w(p(C), {
2662
+ key: 1,
2663
+ id: "file-earmark",
2664
+ icon: "bi:file-earmark",
2665
+ color: "black",
2666
+ width: "75px"
2667
+ }))
2668
+ ]),
2669
+ m("div", Wt, [
2670
+ m("div", null, [
2671
+ V.editableFileName ? (n(), w(Ke, {
2672
+ key: 0,
2673
+ id: "edit-file-name",
2674
+ modelValue: g.value,
2675
+ "onUpdate:modelValue": I[0] || (I[0] = (N) => g.value = N),
2676
+ rules: V.customFileNameRules,
2677
+ name: r.value.name,
2678
+ "complete-action": ae
2679
+ }, null, 8, ["modelValue", "rules", "name"])) : (n(), y("span", Zt, h(r.value.name), 1))
2680
+ ]),
2681
+ m("span", Yt, "File type: " + h(r.value.type.split("/").pop()), 1),
2682
+ m("span", Jt, "File size: " + h(p(ne)(r.value.size)), 1)
2683
+ ]),
2684
+ m("div", Xt, [
2685
+ (n(), w(Gt, {
2686
+ key: b.value,
2687
+ "file-size": r.value.size,
2688
+ "upload-status": b.value,
2689
+ "bytes-uploaded": z.value,
2690
+ "max-file-size": V.maxFileSize
2691
+ }, null, 8, ["file-size", "upload-status", "bytes-uploaded", "max-file-size"])),
2692
+ b.value === "Not Uploaded" || b.value === "Failed" || b.value === "Duplicate" || b.value === "Aborted" ? (n(), w(M, {
2693
+ key: 0,
2694
+ link: "",
2695
+ onClick: Z
2696
+ }, {
2697
+ default: f(() => [
2698
+ v(p(C), {
2699
+ icon: b.value === "Not Uploaded" || b.value === "Duplicate" ? "bi:upload" : "bi:arrow-clockwise"
2700
+ }, null, 8, ["icon"])
2701
+ ]),
2702
+ _: 1
2703
+ })) : F("", !0),
2704
+ b.value === "Uploading" ? (n(), w(M, {
2705
+ key: 1,
2706
+ link: "",
2707
+ onClick: I[1] || (I[1] = (N) => D.value.value.abort())
2708
+ }, {
2709
+ default: f(() => [
2710
+ v(p(C), { icon: "bi:x-circle-fill" })
2711
+ ]),
2712
+ _: 1
2713
+ })) : (n(), w(M, {
2714
+ key: 2,
2715
+ link: "",
2716
+ onClick: le,
2717
+ id: "delete-button"
2718
+ }, {
2719
+ default: f(() => [
2720
+ v(p(C), { icon: "bi:trash" })
2721
+ ]),
2722
+ _: 1
2723
+ }))
2724
+ ])
2725
+ ], 8, Kt);
2726
+ };
2727
+ }
2728
+ }), ea = { class: "d-flex justify-content-end mt-1" }, ta = { id: "max-file-size" }, aa = /* @__PURE__ */ x({
2729
+ __name: "MaxFileSize",
2730
+ props: {
2731
+ maxFileSize: {}
2732
+ },
2733
+ setup(e) {
2734
+ return (t, l) => (n(), y("div", ea, [
2735
+ m("div", ta, "Max file size: " + h(p(ne)(t.maxFileSize)), 1)
2736
+ ]));
2737
+ }
2738
+ }), la = { "data-cy": "file-uploader" }, oa = { key: 0 }, Ga = /* @__PURE__ */ x({
2739
+ __name: "ForgeFileUploader",
2740
+ props: /* @__PURE__ */ K({
2741
+ acceptedFileTypes: {},
2742
+ maxFileSize: {},
2743
+ getFileUrlAction: {},
2744
+ showDragDropArea: { type: Boolean, default: !0 },
2745
+ customFileNameRules: {},
2746
+ maxFileInput: { default: 3 },
2747
+ editableFileName: { type: Boolean, default: !1 },
2748
+ autoUploadToBlob: { type: Boolean, default: !0 }
2749
+ }, {
2750
+ modelValue: { default: [] },
2751
+ modelModifiers: {}
2752
+ }),
2753
+ emits: ["update:modelValue"],
2754
+ setup(e) {
2755
+ const t = j(e, "modelValue"), l = e, a = (s) => {
2756
+ t.value = t.value.filter((o) => o.file != s);
2757
+ };
2758
+ return (s, o) => (n(), y("div", la, [
2759
+ v(Et, B(l, {
2760
+ modelValue: t.value,
2761
+ "onUpdate:modelValue": o[0] || (o[0] = (u) => t.value = u)
2762
+ }), null, 16, ["modelValue"]),
2763
+ s.showDragDropArea ? (n(), y("div", oa, [
2764
+ v(Ht, {
2765
+ "max-file-input": l.maxFileInput,
2766
+ "max-file-size": l.maxFileSize,
2767
+ "accepted-file-types": l.acceptedFileTypes,
2768
+ modelValue: t.value,
2769
+ "onUpdate:modelValue": o[1] || (o[1] = (u) => t.value = u)
2770
+ }, {
2771
+ default: f(() => [
2772
+ (n(!0), y(U, null, R(t.value, ({ file: u }, d) => (n(), y("span", null, [
2773
+ (n(), w(Qt, B({
2774
+ key: u.name,
2775
+ class: d === t.value.length - 1 || t.value.length == 1 ? "" : "border-bottom",
2776
+ file: t.value[d].file,
2777
+ "onUpdate:file": (r) => t.value[d].file = r,
2778
+ "blob-file-name": t.value[d].blobFileName,
2779
+ "onUpdate:blobFileName": (r) => t.value[d].blobFileName = r,
2780
+ "upload-status": t.value[d].status,
2781
+ "onUpdate:uploadStatus": (r) => t.value[d].status = r
2782
+ }, l, { onDeleted: a }), null, 16, ["class", "file", "onUpdate:file", "blob-file-name", "onUpdate:blobFileName", "upload-status", "onUpdate:uploadStatus"]))
2783
+ ]))), 256))
2784
+ ]),
2785
+ _: 1
2786
+ }, 8, ["max-file-input", "max-file-size", "accepted-file-types", "modelValue"]),
2787
+ v(aa, {
2788
+ "max-file-size": l.maxFileSize
2789
+ }, null, 8, ["max-file-size"])
2790
+ ])) : F("", !0)
2791
+ ]));
2792
+ }
2793
+ });
2794
+ export {
2795
+ Ia as Bootstrap_PT,
2796
+ Ta as ForgeActionButton,
2797
+ te as ForgeAlert,
2798
+ De as ForgeCheckbox,
2799
+ Ra as ForgeChips,
2800
+ ct as ForgeDatepicker,
2801
+ Ga as ForgeFileUploader,
2802
+ qa as ForgeFilterHeader,
2803
+ Na as ForgeForm,
2804
+ Oa as ForgeFormField,
2805
+ Ke as ForgeInlineEditor,
2806
+ ce as ForgeLoader,
2807
+ Pa as ForgeModal,
2808
+ et as ForgeMultiSelect,
2809
+ Ua as ForgeMultiSelectPreview,
2810
+ Ma as ForgeNavbar,
2811
+ Da as ForgePageHeader,
2812
+ vt as ForgeProgressBar,
2813
+ Aa as ForgeRemainingCharacters,
2814
+ Ea as ForgeStatWidget,
2815
+ ja as ForgeStepper,
2816
+ Ha as ForgeTable,
2817
+ La as ForgeTile
2818
+ };