@bwp-web/components 1.4.2 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +42 -30
- package/dist/BiampSidebar/BiampSidebar.d.ts +3 -0
- package/dist/BiampSidebar/BiampSidebar.d.ts.map +1 -1
- package/dist/BiampTable/BiampTableToolbar.d.ts.map +1 -1
- package/dist/BiampWrapper/BiampWrapper.d.ts +5 -1
- package/dist/BiampWrapper/BiampWrapper.d.ts.map +1 -1
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/useLoadingDelay.d.ts.map +1 -0
- package/dist/index.cjs +77 -53
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +172 -148
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/BiampTable/useLoadingDelay.d.ts.map +0 -1
- /package/dist/{BiampTable → hooks}/useLoadingDelay.d.ts +0 -0
package/dist/index.js
CHANGED
|
@@ -392,16 +392,56 @@ var require_randomColor = __commonJS({
|
|
|
392
392
|
});
|
|
393
393
|
|
|
394
394
|
// src/BiampWrapper/BiampWrapper.tsx
|
|
395
|
-
import { Stack } from "@mui/material";
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
395
|
+
import { Box, LinearProgress, Stack } from "@mui/material";
|
|
396
|
+
|
|
397
|
+
// src/hooks/useLoadingDelay.ts
|
|
398
|
+
import { useEffect, useRef, useState } from "react";
|
|
399
|
+
function useLoadingDelay(loading, { delay = 150, minDuration = 500 } = {}) {
|
|
400
|
+
const [status, setStatus] = useState("idle");
|
|
401
|
+
const timeoutRef = useRef(null);
|
|
402
|
+
function clearPending() {
|
|
403
|
+
if (timeoutRef.current !== null) {
|
|
404
|
+
clearTimeout(timeoutRef.current);
|
|
405
|
+
timeoutRef.current = null;
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
useEffect(() => {
|
|
409
|
+
if (loading && status === "idle") {
|
|
410
|
+
clearPending();
|
|
411
|
+
timeoutRef.current = setTimeout(() => {
|
|
412
|
+
timeoutRef.current = setTimeout(() => {
|
|
413
|
+
setStatus("ending");
|
|
414
|
+
}, minDuration);
|
|
415
|
+
setStatus("loading");
|
|
416
|
+
}, delay);
|
|
417
|
+
setStatus("delaying");
|
|
418
|
+
}
|
|
419
|
+
if (!loading && status !== "loading") {
|
|
420
|
+
clearPending();
|
|
421
|
+
setStatus("idle");
|
|
422
|
+
}
|
|
423
|
+
}, [loading, delay, minDuration, status]);
|
|
424
|
+
useEffect(() => clearPending, []);
|
|
425
|
+
return status === "loading" || status === "ending";
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
// src/BiampWrapper/BiampWrapper.tsx
|
|
429
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
430
|
+
function BiampWrapper({
|
|
431
|
+
loading = false,
|
|
432
|
+
children,
|
|
433
|
+
sx,
|
|
434
|
+
...props
|
|
435
|
+
}) {
|
|
436
|
+
const showLoading = useLoadingDelay(loading);
|
|
437
|
+
return /* @__PURE__ */ jsxs(
|
|
399
438
|
Stack,
|
|
400
439
|
{
|
|
401
440
|
direction: "column",
|
|
402
441
|
padding: "16px",
|
|
403
442
|
alignItems: "flex-start",
|
|
404
443
|
sx: {
|
|
444
|
+
position: "relative",
|
|
405
445
|
flex: 1,
|
|
406
446
|
height: "100%",
|
|
407
447
|
width: "100%",
|
|
@@ -412,21 +452,36 @@ function BiampWrapper({ children, sx, ...props }) {
|
|
|
412
452
|
...sx
|
|
413
453
|
},
|
|
414
454
|
...props,
|
|
415
|
-
children
|
|
455
|
+
children: [
|
|
456
|
+
showLoading && /* @__PURE__ */ jsx(
|
|
457
|
+
Box,
|
|
458
|
+
{
|
|
459
|
+
sx: ({ zIndex }) => ({
|
|
460
|
+
position: "absolute",
|
|
461
|
+
top: 0,
|
|
462
|
+
left: 0,
|
|
463
|
+
width: "100%",
|
|
464
|
+
zIndex: zIndex.appBar + 1
|
|
465
|
+
}),
|
|
466
|
+
children: /* @__PURE__ */ jsx(LinearProgress, {})
|
|
467
|
+
}
|
|
468
|
+
),
|
|
469
|
+
children
|
|
470
|
+
]
|
|
416
471
|
}
|
|
417
472
|
);
|
|
418
473
|
}
|
|
419
474
|
|
|
420
475
|
// src/BiampSidebar/BiampSidebar.tsx
|
|
421
476
|
import {
|
|
422
|
-
Box,
|
|
477
|
+
Box as Box2,
|
|
423
478
|
ListItemButton,
|
|
424
479
|
Stack as Stack2,
|
|
425
480
|
Typography
|
|
426
481
|
} from "@mui/material";
|
|
427
482
|
import { BiampLogoIcon, SquareRoundedArrowRightIcon } from "@bwp-web/assets";
|
|
428
|
-
import { createContext, useContext, useState } from "react";
|
|
429
|
-
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
483
|
+
import { createContext, useContext, useState as useState2 } from "react";
|
|
484
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
430
485
|
var BiampSidebarContext = createContext({
|
|
431
486
|
expanded: false
|
|
432
487
|
});
|
|
@@ -441,7 +496,7 @@ function BiampSidebar({
|
|
|
441
496
|
sx,
|
|
442
497
|
...props
|
|
443
498
|
}) {
|
|
444
|
-
const [internalExpanded, setInternalExpanded] =
|
|
499
|
+
const [internalExpanded, setInternalExpanded] = useState2(defaultExpanded);
|
|
445
500
|
const isControlled = expandedProp !== void 0;
|
|
446
501
|
const expanded = isControlled ? expandedProp : internalExpanded;
|
|
447
502
|
const toggleExpanded = () => {
|
|
@@ -450,7 +505,7 @@ function BiampSidebar({
|
|
|
450
505
|
onExpandedChange?.(next);
|
|
451
506
|
};
|
|
452
507
|
const width = expanded ? "240px" : "48px";
|
|
453
|
-
return /* @__PURE__ */ jsx2(BiampSidebarContext.Provider, { value: { expanded }, children: /* @__PURE__ */
|
|
508
|
+
return /* @__PURE__ */ jsx2(BiampSidebarContext.Provider, { value: { expanded }, children: /* @__PURE__ */ jsxs2(
|
|
454
509
|
Stack2,
|
|
455
510
|
{
|
|
456
511
|
sx: {
|
|
@@ -484,7 +539,7 @@ function BiampSidebar({
|
|
|
484
539
|
onClick: toggleExpanded
|
|
485
540
|
}
|
|
486
541
|
),
|
|
487
|
-
/* @__PURE__ */
|
|
542
|
+
/* @__PURE__ */ jsxs2(
|
|
488
543
|
Stack2,
|
|
489
544
|
{
|
|
490
545
|
direction: "row",
|
|
@@ -503,7 +558,7 @@ function BiampSidebar({
|
|
|
503
558
|
{
|
|
504
559
|
variant: "caption",
|
|
505
560
|
fontWeight: 500,
|
|
506
|
-
color: "
|
|
561
|
+
color: "text.secondary",
|
|
507
562
|
noWrap: true,
|
|
508
563
|
sx: {
|
|
509
564
|
opacity: expanded ? 1 : 0,
|
|
@@ -534,6 +589,7 @@ function BiampSidebarIconList({
|
|
|
534
589
|
minHeight: 0,
|
|
535
590
|
gap: "4px",
|
|
536
591
|
overflowY: "auto",
|
|
592
|
+
overscrollBehavior: "none",
|
|
537
593
|
...sx
|
|
538
594
|
},
|
|
539
595
|
...props,
|
|
@@ -551,7 +607,7 @@ function BiampSidebarIcon({
|
|
|
551
607
|
}) {
|
|
552
608
|
const { expanded } = useContext(BiampSidebarContext);
|
|
553
609
|
const displayedSelectedIcon = selectedIcon ?? icon;
|
|
554
|
-
return /* @__PURE__ */
|
|
610
|
+
return /* @__PURE__ */ jsxs2(
|
|
555
611
|
ListItemButton,
|
|
556
612
|
{
|
|
557
613
|
selected,
|
|
@@ -572,7 +628,7 @@ function BiampSidebarIcon({
|
|
|
572
628
|
...props,
|
|
573
629
|
children: [
|
|
574
630
|
/* @__PURE__ */ jsx2(
|
|
575
|
-
|
|
631
|
+
Box2,
|
|
576
632
|
{
|
|
577
633
|
sx: {
|
|
578
634
|
width: "48px",
|
|
@@ -612,7 +668,7 @@ function BiampSidebarComponent({
|
|
|
612
668
|
...props
|
|
613
669
|
}) {
|
|
614
670
|
return /* @__PURE__ */ jsx2(
|
|
615
|
-
|
|
671
|
+
Box2,
|
|
616
672
|
{
|
|
617
673
|
sx: {
|
|
618
674
|
minWidth: "48px",
|
|
@@ -635,7 +691,7 @@ function BiampSidebarComponent({
|
|
|
635
691
|
// src/BiampHeader/BiampHeader.tsx
|
|
636
692
|
import {
|
|
637
693
|
alpha,
|
|
638
|
-
Box as
|
|
694
|
+
Box as Box3,
|
|
639
695
|
InputAdornment,
|
|
640
696
|
ListItemButton as ListItemButton2,
|
|
641
697
|
Popover,
|
|
@@ -645,7 +701,7 @@ import {
|
|
|
645
701
|
} from "@mui/material";
|
|
646
702
|
import { Children } from "react";
|
|
647
703
|
import { BiampRedLogo, ExternalLinkIcon, SearchIcon } from "@bwp-web/assets";
|
|
648
|
-
import { jsx as jsx3, jsxs as
|
|
704
|
+
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
649
705
|
function BiampHeader({ children, sx, ...props }) {
|
|
650
706
|
return /* @__PURE__ */ jsx3(
|
|
651
707
|
Stack3,
|
|
@@ -665,14 +721,14 @@ function BiampHeaderTitle({
|
|
|
665
721
|
sx,
|
|
666
722
|
...props
|
|
667
723
|
}) {
|
|
668
|
-
return /* @__PURE__ */
|
|
669
|
-
|
|
724
|
+
return /* @__PURE__ */ jsxs3(
|
|
725
|
+
Box3,
|
|
670
726
|
{
|
|
671
727
|
sx: { pr: 3, display: "flex", alignItems: "center", gap: "12px", ...sx },
|
|
672
728
|
...props,
|
|
673
729
|
children: [
|
|
674
730
|
icon ? /* @__PURE__ */ jsx3(
|
|
675
|
-
|
|
731
|
+
Box3,
|
|
676
732
|
{
|
|
677
733
|
sx: {
|
|
678
734
|
width: 24,
|
|
@@ -684,7 +740,7 @@ function BiampHeaderTitle({
|
|
|
684
740
|
children: icon
|
|
685
741
|
}
|
|
686
742
|
) : /* @__PURE__ */ jsx3(
|
|
687
|
-
|
|
743
|
+
Box3,
|
|
688
744
|
{
|
|
689
745
|
component: "img",
|
|
690
746
|
src: BiampRedLogo,
|
|
@@ -692,7 +748,7 @@ function BiampHeaderTitle({
|
|
|
692
748
|
sx: { width: 24, height: 24 }
|
|
693
749
|
}
|
|
694
750
|
),
|
|
695
|
-
/* @__PURE__ */
|
|
751
|
+
/* @__PURE__ */ jsxs3(Stack3, { direction: "row", gap: 0.5, children: [
|
|
696
752
|
title && /* @__PURE__ */ jsx3(Typography2, { variant: "h4", children: title }),
|
|
697
753
|
subtitle && /* @__PURE__ */ jsx3(Typography2, { variant: "h4", color: "text.secondary", children: subtitle })
|
|
698
754
|
] })
|
|
@@ -737,7 +793,7 @@ function BiampHeaderActions({
|
|
|
737
793
|
...props
|
|
738
794
|
}) {
|
|
739
795
|
return /* @__PURE__ */ jsx3(
|
|
740
|
-
|
|
796
|
+
Box3,
|
|
741
797
|
{
|
|
742
798
|
sx: {
|
|
743
799
|
pl: 3,
|
|
@@ -757,7 +813,7 @@ function BiampHeaderButtonList({
|
|
|
757
813
|
...props
|
|
758
814
|
}) {
|
|
759
815
|
return /* @__PURE__ */ jsx3(
|
|
760
|
-
|
|
816
|
+
Box3,
|
|
761
817
|
{
|
|
762
818
|
sx: { display: "flex", alignItems: "center", gap: 0.5, ...sx },
|
|
763
819
|
...props,
|
|
@@ -837,7 +893,7 @@ function BiampBuildAppContent({
|
|
|
837
893
|
...props
|
|
838
894
|
}) {
|
|
839
895
|
return /* @__PURE__ */ jsx3(
|
|
840
|
-
|
|
896
|
+
Box3,
|
|
841
897
|
{
|
|
842
898
|
sx: {
|
|
843
899
|
display: "grid",
|
|
@@ -858,7 +914,7 @@ function BiampBuildAppContentItem({
|
|
|
858
914
|
sx,
|
|
859
915
|
...props
|
|
860
916
|
}) {
|
|
861
|
-
return /* @__PURE__ */
|
|
917
|
+
return /* @__PURE__ */ jsxs3(
|
|
862
918
|
Stack3,
|
|
863
919
|
{
|
|
864
920
|
direction: "column",
|
|
@@ -873,10 +929,10 @@ function BiampBuildAppContentItem({
|
|
|
873
929
|
},
|
|
874
930
|
...props,
|
|
875
931
|
children: [
|
|
876
|
-
/* @__PURE__ */ jsx3(
|
|
932
|
+
/* @__PURE__ */ jsx3(Box3, { sx: { width: 54, height: 54 }, mb: 0.5, children: image }),
|
|
877
933
|
/* @__PURE__ */ jsx3(Typography2, { variant: "caption", fontWeight: 600, mb: 0.5, children: name }),
|
|
878
934
|
/* @__PURE__ */ jsx3(Typography2, { variant: "caption", color: "text.secondary", children: description }),
|
|
879
|
-
button && /* @__PURE__ */ jsx3(
|
|
935
|
+
button && /* @__PURE__ */ jsx3(Box3, { position: "absolute", top: "12px", right: "12px", children: button })
|
|
880
936
|
]
|
|
881
937
|
}
|
|
882
938
|
);
|
|
@@ -913,7 +969,7 @@ function BiampEndUserAppContentItem({
|
|
|
913
969
|
sx,
|
|
914
970
|
...props
|
|
915
971
|
}) {
|
|
916
|
-
return /* @__PURE__ */
|
|
972
|
+
return /* @__PURE__ */ jsxs3(
|
|
917
973
|
Stack3,
|
|
918
974
|
{
|
|
919
975
|
component: href ? "a" : "div",
|
|
@@ -935,8 +991,8 @@ function BiampEndUserAppContentItem({
|
|
|
935
991
|
},
|
|
936
992
|
...props,
|
|
937
993
|
children: [
|
|
938
|
-
/* @__PURE__ */ jsx3(
|
|
939
|
-
/* @__PURE__ */
|
|
994
|
+
/* @__PURE__ */ jsx3(Box3, { sx: { width: 32, height: 32 }, children: image }),
|
|
995
|
+
/* @__PURE__ */ jsxs3(Stack3, { direction: "column", children: [
|
|
940
996
|
/* @__PURE__ */ jsx3(Typography2, { variant: "caption", fontWeight: 600, children: name }),
|
|
941
997
|
/* @__PURE__ */ jsx3(Typography2, { variant: "caption", color: "text.secondary", children: description })
|
|
942
998
|
] }),
|
|
@@ -970,7 +1026,7 @@ function BiampHeaderProfile({
|
|
|
970
1026
|
},
|
|
971
1027
|
...props,
|
|
972
1028
|
children: image ? /* @__PURE__ */ jsx3(
|
|
973
|
-
|
|
1029
|
+
Box3,
|
|
974
1030
|
{
|
|
975
1031
|
component: "img",
|
|
976
1032
|
src: image,
|
|
@@ -989,7 +1045,7 @@ function BiampHeaderProfile({
|
|
|
989
1045
|
|
|
990
1046
|
// src/BiampLayout/BiampLayout.tsx
|
|
991
1047
|
import { Stack as Stack4 } from "@mui/material";
|
|
992
|
-
import { jsxs as
|
|
1048
|
+
import { jsxs as jsxs4 } from "react/jsx-runtime";
|
|
993
1049
|
function BiampLayout({
|
|
994
1050
|
header,
|
|
995
1051
|
sidebar,
|
|
@@ -997,7 +1053,7 @@ function BiampLayout({
|
|
|
997
1053
|
sx,
|
|
998
1054
|
...props
|
|
999
1055
|
}) {
|
|
1000
|
-
return /* @__PURE__ */
|
|
1056
|
+
return /* @__PURE__ */ jsxs4(
|
|
1001
1057
|
Stack4,
|
|
1002
1058
|
{
|
|
1003
1059
|
direction: "column",
|
|
@@ -1009,7 +1065,7 @@ function BiampLayout({
|
|
|
1009
1065
|
...props,
|
|
1010
1066
|
children: [
|
|
1011
1067
|
header,
|
|
1012
|
-
/* @__PURE__ */
|
|
1068
|
+
/* @__PURE__ */ jsxs4(
|
|
1013
1069
|
Stack4,
|
|
1014
1070
|
{
|
|
1015
1071
|
direction: "row",
|
|
@@ -1032,7 +1088,7 @@ function BiampLayout({
|
|
|
1032
1088
|
|
|
1033
1089
|
// src/BiampTable/BiampTable.tsx
|
|
1034
1090
|
import {
|
|
1035
|
-
Box as
|
|
1091
|
+
Box as Box7,
|
|
1036
1092
|
Checkbox as Checkbox2,
|
|
1037
1093
|
Table as MuiTable,
|
|
1038
1094
|
TableBody,
|
|
@@ -1057,7 +1113,7 @@ import { NoResultsIcon } from "@bwp-web/assets";
|
|
|
1057
1113
|
// src/BiampTable/BiampTableStatusMessage.tsx
|
|
1058
1114
|
import { Stack as Stack5, Typography as Typography3 } from "@mui/material";
|
|
1059
1115
|
import { cloneElement } from "react";
|
|
1060
|
-
import { jsx as jsx4, jsxs as
|
|
1116
|
+
import { jsx as jsx4, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1061
1117
|
function BiampTableStatusMessage({
|
|
1062
1118
|
icon,
|
|
1063
1119
|
title,
|
|
@@ -1065,7 +1121,7 @@ function BiampTableStatusMessage({
|
|
|
1065
1121
|
children,
|
|
1066
1122
|
...stackProps
|
|
1067
1123
|
}) {
|
|
1068
|
-
return /* @__PURE__ */
|
|
1124
|
+
return /* @__PURE__ */ jsxs5(Stack5, { alignItems: "center", gap: 1.5, ...stackProps, children: [
|
|
1069
1125
|
cloneElement(icon, {
|
|
1070
1126
|
"aria-hidden": true,
|
|
1071
1127
|
sx: { width: 56, height: 56, ...icon.props.sx }
|
|
@@ -1107,7 +1163,7 @@ function BiampTableErrorState({
|
|
|
1107
1163
|
|
|
1108
1164
|
// src/BiampTable/BiampTableRow.tsx
|
|
1109
1165
|
import {
|
|
1110
|
-
Box as
|
|
1166
|
+
Box as Box6,
|
|
1111
1167
|
Checkbox,
|
|
1112
1168
|
IconButton,
|
|
1113
1169
|
TableCell,
|
|
@@ -1118,14 +1174,14 @@ import { flexRender } from "@tanstack/react-table";
|
|
|
1118
1174
|
import React2 from "react";
|
|
1119
1175
|
|
|
1120
1176
|
// src/BiampTable/BiampTableTruncatedCell.tsx
|
|
1121
|
-
import { Box as
|
|
1122
|
-
import { useCallback, useRef, useState as
|
|
1177
|
+
import { Box as Box4, Tooltip } from "@mui/material";
|
|
1178
|
+
import { useCallback, useRef as useRef2, useState as useState3 } from "react";
|
|
1123
1179
|
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
1124
1180
|
function BiampTableTruncatedCell({
|
|
1125
1181
|
children
|
|
1126
1182
|
}) {
|
|
1127
|
-
const textRef =
|
|
1128
|
-
const [open, setOpen] =
|
|
1183
|
+
const textRef = useRef2(null);
|
|
1184
|
+
const [open, setOpen] = useState3(false);
|
|
1129
1185
|
const handleMouseEnter = useCallback(() => {
|
|
1130
1186
|
const el = textRef.current;
|
|
1131
1187
|
if (el && el.scrollWidth > el.clientWidth) {
|
|
@@ -1144,7 +1200,7 @@ function BiampTableTruncatedCell({
|
|
|
1144
1200
|
placement: "top",
|
|
1145
1201
|
disableInteractive: true,
|
|
1146
1202
|
children: /* @__PURE__ */ jsx7(
|
|
1147
|
-
|
|
1203
|
+
Box4,
|
|
1148
1204
|
{
|
|
1149
1205
|
"data-truncate": true,
|
|
1150
1206
|
ref: textRef,
|
|
@@ -1200,7 +1256,7 @@ function cellSx(sticky, minWidth, zIndex) {
|
|
|
1200
1256
|
}
|
|
1201
1257
|
|
|
1202
1258
|
// src/BiampTable/BiampTableExpandGuidelines.tsx
|
|
1203
|
-
import { Box as
|
|
1259
|
+
import { Box as Box5 } from "@mui/material";
|
|
1204
1260
|
import { Fragment, jsx as jsx8 } from "react/jsx-runtime";
|
|
1205
1261
|
var guidelineIndent = 28;
|
|
1206
1262
|
var guidelineCellPaddingLeft = 12;
|
|
@@ -1236,7 +1292,7 @@ function ExpandGuidelines({ row }) {
|
|
|
1236
1292
|
if (!ancestor || isLastChildOfParent(ancestor)) continue;
|
|
1237
1293
|
lines.push(
|
|
1238
1294
|
/* @__PURE__ */ jsx8(
|
|
1239
|
-
|
|
1295
|
+
Box5,
|
|
1240
1296
|
{
|
|
1241
1297
|
"aria-hidden": true,
|
|
1242
1298
|
sx: {
|
|
@@ -1259,7 +1315,7 @@ function ExpandGuidelines({ row }) {
|
|
|
1259
1315
|
const elbowTopOffset = rowIsFirst ? -guidelineFirstChildTopExtension : 0;
|
|
1260
1316
|
lines.push(
|
|
1261
1317
|
/* @__PURE__ */ jsx8(
|
|
1262
|
-
|
|
1318
|
+
Box5,
|
|
1263
1319
|
{
|
|
1264
1320
|
"aria-hidden": true,
|
|
1265
1321
|
sx: {
|
|
@@ -1278,7 +1334,7 @@ function ExpandGuidelines({ row }) {
|
|
|
1278
1334
|
if (!rowIsLast) {
|
|
1279
1335
|
lines.push(
|
|
1280
1336
|
/* @__PURE__ */ jsx8(
|
|
1281
|
-
|
|
1337
|
+
Box5,
|
|
1282
1338
|
{
|
|
1283
1339
|
"aria-hidden": true,
|
|
1284
1340
|
sx: {
|
|
@@ -1297,7 +1353,7 @@ function ExpandGuidelines({ row }) {
|
|
|
1297
1353
|
}
|
|
1298
1354
|
lines.push(
|
|
1299
1355
|
/* @__PURE__ */ jsx8(
|
|
1300
|
-
|
|
1356
|
+
Box5,
|
|
1301
1357
|
{
|
|
1302
1358
|
"aria-hidden": true,
|
|
1303
1359
|
sx: {
|
|
@@ -1317,7 +1373,7 @@ function ExpandGuidelines({ row }) {
|
|
|
1317
1373
|
}
|
|
1318
1374
|
|
|
1319
1375
|
// src/BiampTable/BiampTableRow.tsx
|
|
1320
|
-
import { jsx as jsx9, jsxs as
|
|
1376
|
+
import { jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1321
1377
|
var rowCursorPointerSx = { cursor: "pointer" };
|
|
1322
1378
|
var selectionCellSx = {
|
|
1323
1379
|
position: "sticky",
|
|
@@ -1366,7 +1422,7 @@ function ExpandToggle({
|
|
|
1366
1422
|
}
|
|
1367
1423
|
);
|
|
1368
1424
|
}
|
|
1369
|
-
if (hasExpandableRows) return /* @__PURE__ */ jsx9(
|
|
1425
|
+
if (hasExpandableRows) return /* @__PURE__ */ jsx9(Box6, { sx: expandPlaceholderSx });
|
|
1370
1426
|
return null;
|
|
1371
1427
|
}
|
|
1372
1428
|
function renderCellContent({
|
|
@@ -1385,11 +1441,11 @@ function renderCellContent({
|
|
|
1385
1441
|
const truncated = truncate ? /* @__PURE__ */ jsx9(BiampTableTruncatedCell, { children: content }) : content;
|
|
1386
1442
|
if (!isExpandCell) return truncated;
|
|
1387
1443
|
if (alwaysExpanded) {
|
|
1388
|
-
return row.depth > 0 ? /* @__PURE__ */ jsx9(
|
|
1444
|
+
return row.depth > 0 ? /* @__PURE__ */ jsx9(Box6, { sx: { pl: `${row.depth * 28}px` }, children: truncated }) : truncated;
|
|
1389
1445
|
}
|
|
1390
1446
|
const rowLabel = getRowLabel ? getRowLabel(row.original) : `row ${row.index + 1}`;
|
|
1391
|
-
return /* @__PURE__ */
|
|
1392
|
-
|
|
1447
|
+
return /* @__PURE__ */ jsxs6(
|
|
1448
|
+
Box6,
|
|
1393
1449
|
{
|
|
1394
1450
|
sx: row.depth > 0 ? { ...expandCellBaseSx, pl: `${row.depth * 12}px` } : expandCellBaseSx,
|
|
1395
1451
|
children: [
|
|
@@ -1432,7 +1488,7 @@ function BiampTableRowInner({
|
|
|
1432
1488
|
onKeyDown: userRowOnKeyDown,
|
|
1433
1489
|
...restRowProps
|
|
1434
1490
|
} = resolvedRow ?? {};
|
|
1435
|
-
return /* @__PURE__ */
|
|
1491
|
+
return /* @__PURE__ */ jsxs6(
|
|
1436
1492
|
TableRow,
|
|
1437
1493
|
{
|
|
1438
1494
|
...restRowProps,
|
|
@@ -1490,7 +1546,7 @@ function BiampTableRowInner({
|
|
|
1490
1546
|
const showGuidelinesOnCell = isExpandCell && showExpandGuidelines && alwaysExpanded && row.depth > 0;
|
|
1491
1547
|
const resolvedCell = resolveSlot(cellSlotProps, { cell });
|
|
1492
1548
|
const { sx: userCellSx, ...restCellProps } = resolvedCell ?? {};
|
|
1493
|
-
return /* @__PURE__ */
|
|
1549
|
+
return /* @__PURE__ */ jsxs6(
|
|
1494
1550
|
TableCell,
|
|
1495
1551
|
{
|
|
1496
1552
|
...restCellProps,
|
|
@@ -1531,39 +1587,8 @@ var BiampTableRow = React2.memo(
|
|
|
1531
1587
|
biampTableRowPropsAreEqual
|
|
1532
1588
|
);
|
|
1533
1589
|
|
|
1534
|
-
// src/BiampTable/useLoadingDelay.ts
|
|
1535
|
-
import { useEffect, useRef as useRef2, useState as useState3 } from "react";
|
|
1536
|
-
function useLoadingDelay(loading, { delay = 150, minDuration = 500 } = {}) {
|
|
1537
|
-
const [status, setStatus] = useState3("idle");
|
|
1538
|
-
const timeoutRef = useRef2(null);
|
|
1539
|
-
function clearPending() {
|
|
1540
|
-
if (timeoutRef.current !== null) {
|
|
1541
|
-
clearTimeout(timeoutRef.current);
|
|
1542
|
-
timeoutRef.current = null;
|
|
1543
|
-
}
|
|
1544
|
-
}
|
|
1545
|
-
useEffect(() => {
|
|
1546
|
-
if (loading && status === "idle") {
|
|
1547
|
-
clearPending();
|
|
1548
|
-
timeoutRef.current = setTimeout(() => {
|
|
1549
|
-
timeoutRef.current = setTimeout(() => {
|
|
1550
|
-
setStatus("ending");
|
|
1551
|
-
}, minDuration);
|
|
1552
|
-
setStatus("loading");
|
|
1553
|
-
}, delay);
|
|
1554
|
-
setStatus("delaying");
|
|
1555
|
-
}
|
|
1556
|
-
if (!loading && status !== "loading") {
|
|
1557
|
-
clearPending();
|
|
1558
|
-
setStatus("idle");
|
|
1559
|
-
}
|
|
1560
|
-
}, [loading, delay, minDuration, status]);
|
|
1561
|
-
useEffect(() => clearPending, []);
|
|
1562
|
-
return status === "loading" || status === "ending";
|
|
1563
|
-
}
|
|
1564
|
-
|
|
1565
1590
|
// src/BiampTable/BiampTable.tsx
|
|
1566
|
-
import { jsx as jsx10, jsxs as
|
|
1591
|
+
import { jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1567
1592
|
var overlaySx = {
|
|
1568
1593
|
position: "absolute",
|
|
1569
1594
|
top: 0,
|
|
@@ -1623,10 +1648,10 @@ function BiampTable({
|
|
|
1623
1648
|
const hasExpandableRows = enableExpanding && rows.some((r) => r.getCanExpand());
|
|
1624
1649
|
const showError = !!error && !loading;
|
|
1625
1650
|
const showEmpty = !showError && !loading && rows.length === 0;
|
|
1626
|
-
return /* @__PURE__ */
|
|
1651
|
+
return /* @__PURE__ */ jsxs7(
|
|
1627
1652
|
TableContainer,
|
|
1628
1653
|
{
|
|
1629
|
-
component:
|
|
1654
|
+
component: Box7,
|
|
1630
1655
|
...boxProps,
|
|
1631
1656
|
ref: containerRef,
|
|
1632
1657
|
sx: {
|
|
@@ -1637,7 +1662,7 @@ function BiampTable({
|
|
|
1637
1662
|
...sx
|
|
1638
1663
|
},
|
|
1639
1664
|
children: [
|
|
1640
|
-
/* @__PURE__ */
|
|
1665
|
+
/* @__PURE__ */ jsxs7(
|
|
1641
1666
|
MuiTable,
|
|
1642
1667
|
{
|
|
1643
1668
|
"aria-busy": showLoading || void 0,
|
|
@@ -1647,7 +1672,7 @@ function BiampTable({
|
|
|
1647
1672
|
userTableSx
|
|
1648
1673
|
),
|
|
1649
1674
|
children: [
|
|
1650
|
-
/* @__PURE__ */ jsx10(TableHead, { ...restHeadSlotProps, sx: mergeSx(userHeadSx), children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */
|
|
1675
|
+
/* @__PURE__ */ jsx10(TableHead, { ...restHeadSlotProps, sx: mergeSx(userHeadSx), children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsxs7(
|
|
1651
1676
|
TableRow2,
|
|
1652
1677
|
{
|
|
1653
1678
|
...restHeaderRowSlotProps,
|
|
@@ -1739,14 +1764,14 @@ function BiampTable({
|
|
|
1739
1764
|
]
|
|
1740
1765
|
}
|
|
1741
1766
|
),
|
|
1742
|
-
showError && /* @__PURE__ */ jsx10(
|
|
1767
|
+
showError && /* @__PURE__ */ jsx10(Box7, { sx: overlaySx, children: error === true ? /* @__PURE__ */ jsx10(BiampTableErrorState, { sx: { pointerEvents: "auto" } }) : error instanceof Error ? /* @__PURE__ */ jsx10(
|
|
1743
1768
|
BiampTableErrorState,
|
|
1744
1769
|
{
|
|
1745
1770
|
description: error.message,
|
|
1746
1771
|
sx: { pointerEvents: "auto" }
|
|
1747
1772
|
}
|
|
1748
1773
|
) : error }),
|
|
1749
|
-
showEmpty && /* @__PURE__ */ jsx10(
|
|
1774
|
+
showEmpty && /* @__PURE__ */ jsx10(Box7, { sx: overlaySx, children: empty && empty !== true ? empty : /* @__PURE__ */ jsx10(BiampTableEmptyState, { sx: { pointerEvents: "auto" } }) })
|
|
1750
1775
|
]
|
|
1751
1776
|
}
|
|
1752
1777
|
);
|
|
@@ -1766,9 +1791,9 @@ function BiampTableContainer({
|
|
|
1766
1791
|
Stack6,
|
|
1767
1792
|
{
|
|
1768
1793
|
direction: "column",
|
|
1794
|
+
width: "100%",
|
|
1769
1795
|
height: "100%",
|
|
1770
1796
|
overflow: "hidden",
|
|
1771
|
-
px: { xs: 2, sm: 3, xl: 12.5 },
|
|
1772
1797
|
py: { xs: 0, md: 1.5 },
|
|
1773
1798
|
gap: { xs: 0, md: 1 },
|
|
1774
1799
|
borderTop: withBorderTop ? ({ palette }) => `0.6px solid ${palette.divider}` : void 0,
|
|
@@ -1800,7 +1825,7 @@ function BiampTableCellActionButton({ label, icon, ...props }) {
|
|
|
1800
1825
|
// src/BiampTable/BiampTableColumnVisibility.tsx
|
|
1801
1826
|
import {
|
|
1802
1827
|
alpha as alpha2,
|
|
1803
|
-
Box as
|
|
1828
|
+
Box as Box8,
|
|
1804
1829
|
Checkbox as Checkbox3,
|
|
1805
1830
|
Divider,
|
|
1806
1831
|
List,
|
|
@@ -1808,7 +1833,7 @@ import {
|
|
|
1808
1833
|
Popover as Popover2,
|
|
1809
1834
|
Typography as Typography4
|
|
1810
1835
|
} from "@mui/material";
|
|
1811
|
-
import { jsx as jsx13, jsxs as
|
|
1836
|
+
import { jsx as jsx13, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1812
1837
|
function toVisibilityState(visibility) {
|
|
1813
1838
|
return visibility;
|
|
1814
1839
|
}
|
|
@@ -1872,8 +1897,8 @@ function BiampTableColumnVisibility({
|
|
|
1872
1897
|
}
|
|
1873
1898
|
},
|
|
1874
1899
|
...popoverProps,
|
|
1875
|
-
children: /* @__PURE__ */
|
|
1876
|
-
/* @__PURE__ */
|
|
1900
|
+
children: /* @__PURE__ */ jsxs8(List, { dense: true, disablePadding: true, children: [
|
|
1901
|
+
/* @__PURE__ */ jsxs8(
|
|
1877
1902
|
ListItem,
|
|
1878
1903
|
{
|
|
1879
1904
|
dense: true,
|
|
@@ -1893,12 +1918,12 @@ function BiampTableColumnVisibility({
|
|
|
1893
1918
|
),
|
|
1894
1919
|
/* @__PURE__ */ jsx13(Divider, {}),
|
|
1895
1920
|
/* @__PURE__ */ jsx13(
|
|
1896
|
-
|
|
1921
|
+
Box8,
|
|
1897
1922
|
{
|
|
1898
1923
|
sx: { maxHeight: 340, overflow: "auto", overscrollBehavior: "none" },
|
|
1899
1924
|
children: table.getAllLeafColumns().map((column) => {
|
|
1900
1925
|
const columnName = column.columnDef.meta?.columnLabel ?? (typeof column.columnDef.header === "string" ? column.columnDef.header : column.id);
|
|
1901
|
-
return /* @__PURE__ */
|
|
1926
|
+
return /* @__PURE__ */ jsxs8(
|
|
1902
1927
|
ListItem,
|
|
1903
1928
|
{
|
|
1904
1929
|
dense: true,
|
|
@@ -1974,7 +1999,7 @@ function BiampTableToolbarActionButton({
|
|
|
1974
1999
|
}
|
|
1975
2000
|
|
|
1976
2001
|
// src/BiampTable/BiampTableToolbarColumnVisibility.tsx
|
|
1977
|
-
import { Fragment as Fragment2, jsx as jsx15, jsxs as
|
|
2002
|
+
import { Fragment as Fragment2, jsx as jsx15, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1978
2003
|
function BiampTableToolbarColumnVisibility({
|
|
1979
2004
|
table,
|
|
1980
2005
|
icon = /* @__PURE__ */ jsx15(ColumnsIcon, { variant: "xs" }),
|
|
@@ -1986,7 +2011,7 @@ function BiampTableToolbarColumnVisibility({
|
|
|
1986
2011
|
const [anchorEl, setAnchorEl] = useState4(null);
|
|
1987
2012
|
const defaults = defaultColumnVisibility ?? getDefaultColumnVisibility(table);
|
|
1988
2013
|
const dirtyCount = getColumnVisibilityDirtyCount(table, defaults);
|
|
1989
|
-
return /* @__PURE__ */
|
|
2014
|
+
return /* @__PURE__ */ jsxs9(Fragment2, { children: [
|
|
1990
2015
|
/* @__PURE__ */ jsx15(
|
|
1991
2016
|
BiampTableToolbarActionButton,
|
|
1992
2017
|
{
|
|
@@ -2073,7 +2098,7 @@ function BiampTablePagination({
|
|
|
2073
2098
|
}
|
|
2074
2099
|
|
|
2075
2100
|
// src/BiampTable/BiampTableToolbar.tsx
|
|
2076
|
-
import { Box as
|
|
2101
|
+
import { Box as Box9 } from "@mui/material";
|
|
2077
2102
|
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
2078
2103
|
function BiampTableToolbar({
|
|
2079
2104
|
children,
|
|
@@ -2081,16 +2106,15 @@ function BiampTableToolbar({
|
|
|
2081
2106
|
...props
|
|
2082
2107
|
}) {
|
|
2083
2108
|
return /* @__PURE__ */ jsx17(
|
|
2084
|
-
|
|
2109
|
+
Box9,
|
|
2085
2110
|
{
|
|
2086
2111
|
role: "toolbar",
|
|
2087
2112
|
display: "flex",
|
|
2088
2113
|
justifyContent: "space-between",
|
|
2089
2114
|
alignItems: "center",
|
|
2090
2115
|
gap: { xs: 0, md: 1 },
|
|
2116
|
+
width: "100%",
|
|
2091
2117
|
minHeight: 44,
|
|
2092
|
-
pl: { xs: 2, sm: 3, xl: 12.5 },
|
|
2093
|
-
pr: { xs: 0, md: 3, xl: 12.5 },
|
|
2094
2118
|
sx: { ...sx },
|
|
2095
2119
|
...props,
|
|
2096
2120
|
children
|
|
@@ -2099,14 +2123,14 @@ function BiampTableToolbar({
|
|
|
2099
2123
|
}
|
|
2100
2124
|
|
|
2101
2125
|
// src/BiampTable/BiampTableToolbarActions.tsx
|
|
2102
|
-
import { Box as
|
|
2126
|
+
import { Box as Box10 } from "@mui/material";
|
|
2103
2127
|
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
2104
2128
|
function BiampTableToolbarActions({
|
|
2105
2129
|
children,
|
|
2106
2130
|
...props
|
|
2107
2131
|
}) {
|
|
2108
2132
|
return /* @__PURE__ */ jsx18(
|
|
2109
|
-
|
|
2133
|
+
Box10,
|
|
2110
2134
|
{
|
|
2111
2135
|
display: "flex",
|
|
2112
2136
|
alignItems: "center",
|
|
@@ -2145,7 +2169,7 @@ function BiampTableToolbarExport({
|
|
|
2145
2169
|
// src/BiampTable/BiampTableToolbarFilters.tsx
|
|
2146
2170
|
import {
|
|
2147
2171
|
Badge as Badge2,
|
|
2148
|
-
Box as
|
|
2172
|
+
Box as Box11,
|
|
2149
2173
|
Button,
|
|
2150
2174
|
Divider as Divider2,
|
|
2151
2175
|
Drawer,
|
|
@@ -2154,7 +2178,7 @@ import {
|
|
|
2154
2178
|
} from "@mui/material";
|
|
2155
2179
|
import { CloseIcon, FilterIcon } from "@bwp-web/assets";
|
|
2156
2180
|
import { useId, useState as useState5 } from "react";
|
|
2157
|
-
import { Fragment as Fragment3, jsx as jsx20, jsxs as
|
|
2181
|
+
import { Fragment as Fragment3, jsx as jsx20, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
2158
2182
|
function BiampTableToolbarFilters({
|
|
2159
2183
|
activeFilterCount,
|
|
2160
2184
|
children,
|
|
@@ -2174,7 +2198,7 @@ function BiampTableToolbarFilters({
|
|
|
2174
2198
|
onApply?.();
|
|
2175
2199
|
setOpen(false);
|
|
2176
2200
|
}
|
|
2177
|
-
return /* @__PURE__ */
|
|
2201
|
+
return /* @__PURE__ */ jsxs10(Fragment3, { children: [
|
|
2178
2202
|
/* @__PURE__ */ jsx20(
|
|
2179
2203
|
BiampTableToolbarActionButton,
|
|
2180
2204
|
{
|
|
@@ -2196,17 +2220,17 @@ function BiampTableToolbarFilters({
|
|
|
2196
2220
|
sx: { width: { xs: "100%", sm: 480 } },
|
|
2197
2221
|
...drawerProps?.PaperProps
|
|
2198
2222
|
},
|
|
2199
|
-
children: /* @__PURE__ */
|
|
2200
|
-
|
|
2223
|
+
children: /* @__PURE__ */ jsxs10(
|
|
2224
|
+
Box11,
|
|
2201
2225
|
{
|
|
2202
2226
|
height: "100%",
|
|
2203
2227
|
display: "flex",
|
|
2204
2228
|
flexDirection: "column",
|
|
2205
2229
|
justifyContent: "space-between",
|
|
2206
2230
|
children: [
|
|
2207
|
-
/* @__PURE__ */
|
|
2208
|
-
/* @__PURE__ */
|
|
2209
|
-
|
|
2231
|
+
/* @__PURE__ */ jsxs10(Box11, { children: [
|
|
2232
|
+
/* @__PURE__ */ jsxs10(
|
|
2233
|
+
Box11,
|
|
2210
2234
|
{
|
|
2211
2235
|
display: "flex",
|
|
2212
2236
|
justifyContent: "space-between",
|
|
@@ -2214,7 +2238,7 @@ function BiampTableToolbarFilters({
|
|
|
2214
2238
|
px: 3.5,
|
|
2215
2239
|
py: 2.5,
|
|
2216
2240
|
children: [
|
|
2217
|
-
/* @__PURE__ */
|
|
2241
|
+
/* @__PURE__ */ jsxs10(Typography5, { id: titleId, variant: "h2", children: [
|
|
2218
2242
|
title,
|
|
2219
2243
|
/* @__PURE__ */ jsx20(
|
|
2220
2244
|
Badge2,
|
|
@@ -2239,7 +2263,7 @@ function BiampTableToolbarFilters({
|
|
|
2239
2263
|
),
|
|
2240
2264
|
/* @__PURE__ */ jsx20(Divider2, {}),
|
|
2241
2265
|
/* @__PURE__ */ jsx20(
|
|
2242
|
-
|
|
2266
|
+
Box11,
|
|
2243
2267
|
{
|
|
2244
2268
|
role: "group",
|
|
2245
2269
|
"aria-label": "Filter options",
|
|
@@ -2252,7 +2276,7 @@ function BiampTableToolbarFilters({
|
|
|
2252
2276
|
}
|
|
2253
2277
|
)
|
|
2254
2278
|
] }),
|
|
2255
|
-
/* @__PURE__ */
|
|
2279
|
+
/* @__PURE__ */ jsxs10(Box11, { display: "flex", children: [
|
|
2256
2280
|
/* @__PURE__ */ jsx20(
|
|
2257
2281
|
Button,
|
|
2258
2282
|
{
|
|
@@ -2285,7 +2309,7 @@ function BiampTableToolbarFilters({
|
|
|
2285
2309
|
|
|
2286
2310
|
// src/BiampTable/BiampTableToolbarSearch.tsx
|
|
2287
2311
|
import {
|
|
2288
|
-
Box as
|
|
2312
|
+
Box as Box12,
|
|
2289
2313
|
Collapse,
|
|
2290
2314
|
IconButton as IconButton5,
|
|
2291
2315
|
InputAdornment as InputAdornment2,
|
|
@@ -2321,7 +2345,7 @@ function useDebouncedCallback(callback, delay = BIAMP_TABLE_DEBOUNCE_DELAY) {
|
|
|
2321
2345
|
}
|
|
2322
2346
|
|
|
2323
2347
|
// src/BiampTable/BiampTableToolbarSearch.tsx
|
|
2324
|
-
import { jsx as jsx21, jsxs as
|
|
2348
|
+
import { jsx as jsx21, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
2325
2349
|
var searchFieldSx = {
|
|
2326
2350
|
"& .MuiInputBase-root": {
|
|
2327
2351
|
height: "36px !important",
|
|
@@ -2410,7 +2434,7 @@ function BiampTableToolbarSearch({
|
|
|
2410
2434
|
}
|
|
2411
2435
|
);
|
|
2412
2436
|
if (isMobile && enableMobileView) {
|
|
2413
|
-
return /* @__PURE__ */
|
|
2437
|
+
return /* @__PURE__ */ jsxs11(Box12, { display: "flex", alignItems: "center", width: "100%", pr: 1, gap: 1, children: [
|
|
2414
2438
|
/* @__PURE__ */ jsx21(SearchIcon2, { sx: { width: 16, height: 16 } }),
|
|
2415
2439
|
/* @__PURE__ */ jsx21(
|
|
2416
2440
|
InputBase,
|
|
@@ -2434,7 +2458,7 @@ function BiampTableToolbarSearch({
|
|
|
2434
2458
|
] });
|
|
2435
2459
|
}
|
|
2436
2460
|
if (expandable) {
|
|
2437
|
-
return /* @__PURE__ */
|
|
2461
|
+
return /* @__PURE__ */ jsxs11(Box12, { display: "flex", alignItems: "center", minWidth: 28, children: [
|
|
2438
2462
|
/* @__PURE__ */ jsx21(
|
|
2439
2463
|
IconButton5,
|
|
2440
2464
|
{
|
|
@@ -2677,7 +2701,7 @@ function downloadCsv(csvContent, filename) {
|
|
|
2677
2701
|
|
|
2678
2702
|
// src/BiampBanner/BiampBanner.tsx
|
|
2679
2703
|
import {
|
|
2680
|
-
Box as
|
|
2704
|
+
Box as Box13,
|
|
2681
2705
|
Collapse as Collapse2,
|
|
2682
2706
|
Typography as Typography6
|
|
2683
2707
|
} from "@mui/material";
|
|
@@ -2690,7 +2714,7 @@ import {
|
|
|
2690
2714
|
import { Fragment as Fragment4, jsx as jsx22 } from "react/jsx-runtime";
|
|
2691
2715
|
function BiampBanner({ show, children, severity }) {
|
|
2692
2716
|
return /* @__PURE__ */ jsx22(Collapse2, { in: show, unmountOnExit: true, component: "aside", children: /* @__PURE__ */ jsx22(
|
|
2693
|
-
|
|
2717
|
+
Box13,
|
|
2694
2718
|
{
|
|
2695
2719
|
bgcolor: ({ palette }) => palette.background[severity],
|
|
2696
2720
|
display: "flex",
|
|
@@ -2720,7 +2744,7 @@ function BiampBannerContent({ children, ...props }) {
|
|
|
2720
2744
|
return /* @__PURE__ */ jsx22(Typography6, { textAlign: "center", variant: "h3", ...props, children });
|
|
2721
2745
|
}
|
|
2722
2746
|
function BiampBannerActions({ children, ...props }) {
|
|
2723
|
-
return /* @__PURE__ */ jsx22(
|
|
2747
|
+
return /* @__PURE__ */ jsx22(Box13, { display: "flex", gap: 1, alignItems: "center", ...props, children });
|
|
2724
2748
|
}
|
|
2725
2749
|
|
|
2726
2750
|
// src/BiampSegmentedButton/SegmentedButton.tsx
|
|
@@ -2789,7 +2813,7 @@ function SegmentedButtonGroup({ children, sx, ...props }) {
|
|
|
2789
2813
|
import { createContext as createContext2, forwardRef, useContext as useContext2 } from "react";
|
|
2790
2814
|
import {
|
|
2791
2815
|
Autocomplete,
|
|
2792
|
-
Box as
|
|
2816
|
+
Box as Box14,
|
|
2793
2817
|
Chip,
|
|
2794
2818
|
InputAdornment as InputAdornment3,
|
|
2795
2819
|
Paper,
|
|
@@ -2797,7 +2821,7 @@ import {
|
|
|
2797
2821
|
Typography as Typography7
|
|
2798
2822
|
} from "@mui/material";
|
|
2799
2823
|
import { KeyArrowDownIcon, KeyArrowUpIcon, SearchIcon as SearchIcon3 } from "@bwp-web/assets";
|
|
2800
|
-
import { Fragment as Fragment5, jsx as jsx25, jsxs as
|
|
2824
|
+
import { Fragment as Fragment5, jsx as jsx25, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
2801
2825
|
var SearchContext = createContext2({
|
|
2802
2826
|
hasOptions: true,
|
|
2803
2827
|
loading: false,
|
|
@@ -2809,7 +2833,7 @@ function KeyCap({
|
|
|
2809
2833
|
variant = "icon"
|
|
2810
2834
|
}) {
|
|
2811
2835
|
return /* @__PURE__ */ jsx25(
|
|
2812
|
-
|
|
2836
|
+
Box14,
|
|
2813
2837
|
{
|
|
2814
2838
|
component: "kbd",
|
|
2815
2839
|
sx: {
|
|
@@ -2836,7 +2860,7 @@ function KeyCap({
|
|
|
2836
2860
|
var BiampGlobalSearchPaper = forwardRef(
|
|
2837
2861
|
function BiampGlobalSearchPaper2({ children, ...props }, ref) {
|
|
2838
2862
|
const { hasOptions, loading, noResultsText } = useContext2(SearchContext);
|
|
2839
|
-
return /* @__PURE__ */
|
|
2863
|
+
return /* @__PURE__ */ jsxs12(Paper, { ref, ...props, children: [
|
|
2840
2864
|
hasOptions || loading ? children : /* @__PURE__ */ jsx25(
|
|
2841
2865
|
Typography7,
|
|
2842
2866
|
{
|
|
@@ -2846,8 +2870,8 @@ var BiampGlobalSearchPaper = forwardRef(
|
|
|
2846
2870
|
children: noResultsText
|
|
2847
2871
|
}
|
|
2848
2872
|
),
|
|
2849
|
-
hasOptions && /* @__PURE__ */
|
|
2850
|
-
|
|
2873
|
+
hasOptions && /* @__PURE__ */ jsxs12(
|
|
2874
|
+
Box14,
|
|
2851
2875
|
{
|
|
2852
2876
|
sx: {
|
|
2853
2877
|
borderTop: ({ palette }) => `0.6px solid ${palette.dividers.secondary}`,
|
|
@@ -2857,8 +2881,8 @@ var BiampGlobalSearchPaper = forwardRef(
|
|
|
2857
2881
|
p: 1.5
|
|
2858
2882
|
},
|
|
2859
2883
|
children: [
|
|
2860
|
-
/* @__PURE__ */
|
|
2861
|
-
/* @__PURE__ */
|
|
2884
|
+
/* @__PURE__ */ jsxs12(Box14, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
2885
|
+
/* @__PURE__ */ jsxs12(Box14, { sx: { display: "flex", alignItems: "center", gap: 0.5 }, children: [
|
|
2862
2886
|
/* @__PURE__ */ jsx25(KeyCap, { children: /* @__PURE__ */ jsx25(KeyArrowDownIcon, {}) }),
|
|
2863
2887
|
/* @__PURE__ */ jsx25(KeyCap, { children: /* @__PURE__ */ jsx25(KeyArrowUpIcon, {}) })
|
|
2864
2888
|
] }),
|
|
@@ -2872,7 +2896,7 @@ var BiampGlobalSearchPaper = forwardRef(
|
|
|
2872
2896
|
}
|
|
2873
2897
|
)
|
|
2874
2898
|
] }),
|
|
2875
|
-
/* @__PURE__ */
|
|
2899
|
+
/* @__PURE__ */ jsxs12(Box14, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
2876
2900
|
/* @__PURE__ */ jsx25(KeyCap, { variant: "text", children: "Enter" }),
|
|
2877
2901
|
/* @__PURE__ */ jsx25(
|
|
2878
2902
|
Typography7,
|
|
@@ -2897,10 +2921,10 @@ function HighlightText({ text, query }) {
|
|
|
2897
2921
|
const before = text.slice(0, index);
|
|
2898
2922
|
const match = text.slice(index, index + query.length);
|
|
2899
2923
|
const after = text.slice(index + query.length);
|
|
2900
|
-
return /* @__PURE__ */
|
|
2924
|
+
return /* @__PURE__ */ jsxs12(Fragment5, { children: [
|
|
2901
2925
|
before,
|
|
2902
2926
|
/* @__PURE__ */ jsx25(
|
|
2903
|
-
|
|
2927
|
+
Box14,
|
|
2904
2928
|
{
|
|
2905
2929
|
component: "span",
|
|
2906
2930
|
sx: {
|
|
@@ -2925,7 +2949,7 @@ function BiampGlobalSearchListItem({
|
|
|
2925
2949
|
const maxChips = 3;
|
|
2926
2950
|
const chips = option.associatedItems?.slice(0, maxChips) ?? [];
|
|
2927
2951
|
const overflow = (option.associatedItems?.length ?? 0) - maxChips;
|
|
2928
|
-
return /* @__PURE__ */
|
|
2952
|
+
return /* @__PURE__ */ jsxs12(
|
|
2929
2953
|
"li",
|
|
2930
2954
|
{
|
|
2931
2955
|
...rest,
|
|
@@ -2938,7 +2962,7 @@ function BiampGlobalSearchListItem({
|
|
|
2938
2962
|
},
|
|
2939
2963
|
children: [
|
|
2940
2964
|
option.icon && /* @__PURE__ */ jsx25(
|
|
2941
|
-
|
|
2965
|
+
Box14,
|
|
2942
2966
|
{
|
|
2943
2967
|
sx: {
|
|
2944
2968
|
width: 24,
|
|
@@ -2963,8 +2987,8 @@ function BiampGlobalSearchListItem({
|
|
|
2963
2987
|
children: option.subtitle
|
|
2964
2988
|
}
|
|
2965
2989
|
),
|
|
2966
|
-
chips.length > 0 && /* @__PURE__ */
|
|
2967
|
-
|
|
2990
|
+
chips.length > 0 && /* @__PURE__ */ jsxs12(
|
|
2991
|
+
Box14,
|
|
2968
2992
|
{
|
|
2969
2993
|
className: "hoverContent",
|
|
2970
2994
|
sx: {
|
|
@@ -3015,7 +3039,7 @@ function BiampGlobalSearchListItem({
|
|
|
3015
3039
|
}
|
|
3016
3040
|
),
|
|
3017
3041
|
option.endIcon && /* @__PURE__ */ jsx25(
|
|
3018
|
-
|
|
3042
|
+
Box14,
|
|
3019
3043
|
{
|
|
3020
3044
|
className: "endIcon",
|
|
3021
3045
|
sx: {
|
|
@@ -3119,7 +3143,7 @@ function BiampGlobalSearch({
|
|
|
3119
3143
|
slotProps: {
|
|
3120
3144
|
input: {
|
|
3121
3145
|
...params.InputProps,
|
|
3122
|
-
startAdornment: /* @__PURE__ */
|
|
3146
|
+
startAdornment: /* @__PURE__ */ jsxs12(Fragment5, { children: [
|
|
3123
3147
|
/* @__PURE__ */ jsx25(InputAdornment3, { position: "start", children: /* @__PURE__ */ jsx25(SearchIcon3, {}) }),
|
|
3124
3148
|
params.InputProps.startAdornment
|
|
3125
3149
|
] })
|
|
@@ -3144,7 +3168,7 @@ function BiampGlobalSearch({
|
|
|
3144
3168
|
|
|
3145
3169
|
// src/UserInitialsIcon/UserInitialsIcon.tsx
|
|
3146
3170
|
var import_randomcolor = __toESM(require_randomColor(), 1);
|
|
3147
|
-
import { Box as
|
|
3171
|
+
import { Box as Box15, Typography as Typography8 } from "@mui/material";
|
|
3148
3172
|
import { darken } from "@mui/material/styles";
|
|
3149
3173
|
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
3150
3174
|
var DEFAULT_SIZE = 40;
|
|
@@ -3165,7 +3189,7 @@ function UserInitialsIcon({
|
|
|
3165
3189
|
const size = typeof width === "number" ? width : DEFAULT_SIZE;
|
|
3166
3190
|
const fontSize = size * TEXT_RATIO;
|
|
3167
3191
|
return /* @__PURE__ */ jsx26(
|
|
3168
|
-
|
|
3192
|
+
Box15,
|
|
3169
3193
|
{
|
|
3170
3194
|
minWidth: width,
|
|
3171
3195
|
width,
|
|
@@ -3201,7 +3225,7 @@ var getInitials = (name) => {
|
|
|
3201
3225
|
};
|
|
3202
3226
|
|
|
3203
3227
|
// src/DynamicSvgIcon/DynamicSvgIcon.tsx
|
|
3204
|
-
import { SvgIcon, Skeleton, Box as
|
|
3228
|
+
import { SvgIcon, Skeleton, Box as Box16 } from "@mui/material";
|
|
3205
3229
|
import { useEffect as useEffect6, useState as useState7 } from "react";
|
|
3206
3230
|
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
3207
3231
|
var svgCache = /* @__PURE__ */ new Map();
|
|
@@ -3316,7 +3340,7 @@ function DynamicSvgIcon({
|
|
|
3316
3340
|
}
|
|
3317
3341
|
if (error || !svgContent) {
|
|
3318
3342
|
return /* @__PURE__ */ jsx27(
|
|
3319
|
-
|
|
3343
|
+
Box16,
|
|
3320
3344
|
{
|
|
3321
3345
|
sx: {
|
|
3322
3346
|
width,
|