@bwp-web/components 1.11.0 → 2.0.0-alpha.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 +4 -8
- package/dist/BiampBanner/BiampBanner.d.ts +4 -4
- package/dist/BiampBanner/BiampBanner.d.ts.map +1 -1
- package/dist/BiampCheckboxListPopover/BiampCheckboxListPopover.d.ts +1 -1
- package/dist/BiampCheckboxListPopover/BiampCheckboxListPopover.d.ts.map +1 -1
- package/dist/BiampGlobalSearch/BiampGlobalSearch.d.ts +1 -1
- package/dist/BiampGlobalSearch/BiampGlobalSearch.d.ts.map +1 -1
- package/dist/BiampHeader/BiampHeader.d.ts +11 -38
- package/dist/BiampHeader/BiampHeader.d.ts.map +1 -1
- package/dist/BiampHeader/index.d.ts +1 -1
- package/dist/BiampHeader/index.d.ts.map +1 -1
- package/dist/BiampLayout/BiampLayout.d.ts +1 -1
- package/dist/BiampLayout/BiampLayout.d.ts.map +1 -1
- package/dist/BiampListPopover/BiampListPopover.d.ts +3 -3
- package/dist/BiampListPopover/BiampListPopover.d.ts.map +1 -1
- package/dist/BiampNotificationPopover/BiampNotificationPopover.d.ts +3 -3
- package/dist/BiampNotificationPopover/BiampNotificationPopover.d.ts.map +1 -1
- package/dist/BiampSegmentedButton/SegmentedButton.d.ts +1 -1
- package/dist/BiampSegmentedButton/SegmentedButton.d.ts.map +1 -1
- package/dist/BiampSegmentedButton/SegmentedButtonGroup.d.ts +1 -1
- package/dist/BiampSegmentedButton/SegmentedButtonGroup.d.ts.map +1 -1
- package/dist/BiampSidebar/BiampSidebar.d.ts +4 -4
- package/dist/BiampSidebar/BiampSidebar.d.ts.map +1 -1
- package/dist/BiampTable/BiampTable.d.ts +23 -2
- package/dist/BiampTable/BiampTable.d.ts.map +1 -1
- package/dist/BiampTable/BiampTableCellActionButton.d.ts +1 -1
- package/dist/BiampTable/BiampTableCellActionButton.d.ts.map +1 -1
- package/dist/BiampTable/BiampTableColumnVisibility.d.ts +1 -1
- package/dist/BiampTable/BiampTableColumnVisibility.d.ts.map +1 -1
- package/dist/BiampTable/BiampTableContainer.d.ts +1 -1
- package/dist/BiampTable/BiampTableContainer.d.ts.map +1 -1
- package/dist/BiampTable/BiampTableEmptyState.d.ts +1 -1
- package/dist/BiampTable/BiampTableEmptyState.d.ts.map +1 -1
- package/dist/BiampTable/BiampTableErrorState.d.ts +1 -1
- package/dist/BiampTable/BiampTableErrorState.d.ts.map +1 -1
- package/dist/BiampTable/BiampTableExpandGuidelines.d.ts +1 -1
- package/dist/BiampTable/BiampTableExpandGuidelines.d.ts.map +1 -1
- package/dist/BiampTable/BiampTablePagination.d.ts +1 -1
- package/dist/BiampTable/BiampTablePagination.d.ts.map +1 -1
- package/dist/BiampTable/BiampTableRow.d.ts +2 -1
- package/dist/BiampTable/BiampTableRow.d.ts.map +1 -1
- package/dist/BiampTable/BiampTableStatusMessage.d.ts +1 -1
- package/dist/BiampTable/BiampTableStatusMessage.d.ts.map +1 -1
- package/dist/BiampTable/BiampTableToolbar.d.ts +1 -1
- package/dist/BiampTable/BiampTableToolbar.d.ts.map +1 -1
- package/dist/BiampTable/BiampTableToolbarActionButton.d.ts +1 -1
- package/dist/BiampTable/BiampTableToolbarActionButton.d.ts.map +1 -1
- package/dist/BiampTable/BiampTableToolbarActions.d.ts +1 -1
- package/dist/BiampTable/BiampTableToolbarActions.d.ts.map +1 -1
- package/dist/BiampTable/BiampTableToolbarColumnVisibility.d.ts +2 -2
- package/dist/BiampTable/BiampTableToolbarColumnVisibility.d.ts.map +1 -1
- package/dist/BiampTable/BiampTableToolbarExport.d.ts +2 -2
- package/dist/BiampTable/BiampTableToolbarExport.d.ts.map +1 -1
- package/dist/BiampTable/BiampTableToolbarFilters.d.ts +1 -1
- package/dist/BiampTable/BiampTableToolbarFilters.d.ts.map +1 -1
- package/dist/BiampTable/BiampTableToolbarSearch.d.ts +1 -1
- package/dist/BiampTable/BiampTableToolbarSearch.d.ts.map +1 -1
- package/dist/BiampTable/BiampTableTruncatedCell.d.ts +1 -1
- package/dist/BiampTable/BiampTableTruncatedCell.d.ts.map +1 -1
- package/dist/BiampTable/useDebouncedCallback.d.ts.map +1 -1
- package/dist/BiampWrapper/BiampWrapper.d.ts +1 -1
- package/dist/BiampWrapper/BiampWrapper.d.ts.map +1 -1
- package/dist/DynamicSvgIcon/DynamicSvgIcon.d.ts +1 -1
- package/dist/DynamicSvgIcon/DynamicSvgIcon.d.ts.map +1 -1
- package/dist/LandingPage/LandingFormPanel.d.ts +4 -4
- package/dist/LandingPage/LandingFormPanel.d.ts.map +1 -1
- package/dist/LandingPage/OrganizationsPanel.d.ts +4 -4
- package/dist/LandingPage/OrganizationsPanel.d.ts.map +1 -1
- package/dist/OrganizationSelector/OrganizationSelector.d.ts +5 -5
- package/dist/OrganizationSelector/OrganizationSelector.d.ts.map +1 -1
- package/dist/UserInitialsIcon/UserInitialsIcon.d.ts +7 -1
- package/dist/UserInitialsIcon/UserInitialsIcon.d.ts.map +1 -1
- package/dist/hooks/useLoadingDelay.d.ts.map +1 -1
- package/dist/index.cjs +1049 -793
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1027 -766
- package/dist/index.js.map +1 -1
- package/dist/slotProps.d.ts +5 -5
- package/dist/slotProps.d.ts.map +1 -1
- package/package.json +13 -13
package/dist/index.cjs
CHANGED
|
@@ -408,11 +408,7 @@ __export(index_exports, {
|
|
|
408
408
|
BiampBannerActions: () => BiampBannerActions,
|
|
409
409
|
BiampBannerContent: () => BiampBannerContent,
|
|
410
410
|
BiampBannerIcon: () => BiampBannerIcon,
|
|
411
|
-
BiampBuildAppContent: () => BiampBuildAppContent,
|
|
412
|
-
BiampBuildAppContentItem: () => BiampBuildAppContentItem,
|
|
413
411
|
BiampCheckboxListPopover: () => BiampCheckboxListPopover,
|
|
414
|
-
BiampEndUserAppContent: () => BiampEndUserAppContent,
|
|
415
|
-
BiampEndUserAppContentItem: () => BiampEndUserAppContentItem,
|
|
416
412
|
BiampGlobalSearch: () => BiampGlobalSearch,
|
|
417
413
|
BiampHeader: () => BiampHeader,
|
|
418
414
|
BiampHeaderActions: () => BiampHeaderActions,
|
|
@@ -496,33 +492,31 @@ var import_material = require("@mui/material");
|
|
|
496
492
|
var import_react = require("react");
|
|
497
493
|
function useLoadingDelay(loading, { delay = 150, minDuration = 500 } = {}) {
|
|
498
494
|
const [status, setStatus] = (0, import_react.useState)("idle");
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
timeoutRef.current = null;
|
|
504
|
-
}
|
|
495
|
+
if (loading && status === "idle") {
|
|
496
|
+
setStatus("delaying");
|
|
497
|
+
} else if (!loading && (status === "delaying" || status === "ending")) {
|
|
498
|
+
setStatus("idle");
|
|
505
499
|
}
|
|
506
500
|
(0, import_react.useEffect)(() => {
|
|
507
|
-
if (
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
}, delay);
|
|
515
|
-
setStatus("delaying");
|
|
516
|
-
}
|
|
517
|
-
if (!loading && status !== "loading") {
|
|
518
|
-
clearPending();
|
|
519
|
-
setStatus("idle");
|
|
520
|
-
}
|
|
521
|
-
}, [loading, delay, minDuration, status]);
|
|
522
|
-
(0, import_react.useEffect)(() => clearPending, []);
|
|
501
|
+
if (status !== "delaying" && status !== "loading") return;
|
|
502
|
+
const timeout = setTimeout(
|
|
503
|
+
() => setStatus(status === "delaying" ? "loading" : "ending"),
|
|
504
|
+
status === "delaying" ? delay : minDuration
|
|
505
|
+
);
|
|
506
|
+
return () => clearTimeout(timeout);
|
|
507
|
+
}, [status, delay, minDuration]);
|
|
523
508
|
return status === "loading" || status === "ending";
|
|
524
509
|
}
|
|
525
510
|
|
|
511
|
+
// src/slotProps.ts
|
|
512
|
+
function resolveSlot(slot, ctx) {
|
|
513
|
+
if (!slot) return void 0;
|
|
514
|
+
return typeof slot === "function" ? slot(ctx) : slot;
|
|
515
|
+
}
|
|
516
|
+
function mergeSx(...inputs) {
|
|
517
|
+
return inputs.filter((v) => Boolean(v)).flatMap((v) => Array.isArray(v) ? v : [v]);
|
|
518
|
+
}
|
|
519
|
+
|
|
526
520
|
// src/BiampWrapper/BiampWrapper.tsx
|
|
527
521
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
528
522
|
function BiampWrapper({
|
|
@@ -537,19 +531,21 @@ function BiampWrapper({
|
|
|
537
531
|
import_material.Stack,
|
|
538
532
|
{
|
|
539
533
|
direction: "column",
|
|
540
|
-
padding: "16px",
|
|
541
|
-
sx: {
|
|
542
|
-
position: "relative",
|
|
543
|
-
flex: 1,
|
|
544
|
-
height: "100%",
|
|
545
|
-
width: "100%",
|
|
546
|
-
borderRadius: "8px",
|
|
547
|
-
overflow: "auto",
|
|
548
|
-
overscrollBehavior: "none",
|
|
549
|
-
backgroundColor: ({ palette }) => palette.mode === "dark" ? palette.grey[800] : palette.common.white,
|
|
550
|
-
...sx
|
|
551
|
-
},
|
|
552
534
|
...props,
|
|
535
|
+
sx: mergeSx(
|
|
536
|
+
{
|
|
537
|
+
padding: "16px",
|
|
538
|
+
position: "relative",
|
|
539
|
+
flex: 1,
|
|
540
|
+
height: "100%",
|
|
541
|
+
width: "100%",
|
|
542
|
+
borderRadius: "8px",
|
|
543
|
+
overflow: "auto",
|
|
544
|
+
overscrollBehavior: "none",
|
|
545
|
+
backgroundColor: ({ palette }) => palette.mode === "dark" ? palette.grey[800] : palette.common.white
|
|
546
|
+
},
|
|
547
|
+
sx
|
|
548
|
+
),
|
|
553
549
|
children: [
|
|
554
550
|
showLoading && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
555
551
|
import_material.Box,
|
|
@@ -624,24 +620,28 @@ function BiampLayout({
|
|
|
624
620
|
import_material2.Stack,
|
|
625
621
|
{
|
|
626
622
|
direction: "column",
|
|
627
|
-
height: "100vh",
|
|
628
|
-
sx: {
|
|
629
|
-
backgroundColor: ({ palette }) => palette.mode === "dark" ? palette.grey[900] : palette.grey[100],
|
|
630
|
-
...sx
|
|
631
|
-
},
|
|
632
623
|
...props,
|
|
624
|
+
sx: mergeSx(
|
|
625
|
+
{
|
|
626
|
+
height: "100vh",
|
|
627
|
+
backgroundColor: ({ palette }) => palette.mode === "dark" ? palette.grey[900] : palette.grey[100]
|
|
628
|
+
},
|
|
629
|
+
sx
|
|
630
|
+
),
|
|
633
631
|
children: [
|
|
634
632
|
header,
|
|
635
633
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
636
634
|
import_material2.Stack,
|
|
637
635
|
{
|
|
638
636
|
direction: "row",
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
637
|
+
sx: {
|
|
638
|
+
flex: 1,
|
|
639
|
+
minHeight: 0,
|
|
640
|
+
gap: { xs: 1.5, md: 2.5 },
|
|
641
|
+
px: { xs: 1.5, md: 2.5 },
|
|
642
|
+
pb: { xs: 1.5, md: 2.5 },
|
|
643
|
+
pt: { xs: header ? 0 : 1.5, md: header ? 0 : 2.5 }
|
|
644
|
+
},
|
|
645
645
|
children: [
|
|
646
646
|
!isDrawer && !(responsive && mobileSidebarOnly) && sidebar,
|
|
647
647
|
children
|
|
@@ -669,9 +669,13 @@ function BiampLayout({
|
|
|
669
669
|
import_material2.Stack,
|
|
670
670
|
{
|
|
671
671
|
direction: "row",
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
672
|
+
sx: {
|
|
673
|
+
alignItems: "center",
|
|
674
|
+
gap: 1,
|
|
675
|
+
height: 40,
|
|
676
|
+
mb: 1.5,
|
|
677
|
+
flexShrink: 0
|
|
678
|
+
},
|
|
675
679
|
children: [
|
|
676
680
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
677
681
|
import_material2.IconButton,
|
|
@@ -733,16 +737,18 @@ function BiampSidebar({
|
|
|
733
737
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(BiampSidebarContext.Provider, { value: { expanded }, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
734
738
|
import_material3.Stack,
|
|
735
739
|
{
|
|
736
|
-
sx:
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
740
|
+
sx: mergeSx(
|
|
741
|
+
{
|
|
742
|
+
width,
|
|
743
|
+
minWidth: width,
|
|
744
|
+
height: "100%",
|
|
745
|
+
transition: ({ transitions }) => transitions.create(["width", "min-width"], {
|
|
746
|
+
easing: transitions.easing.sharp,
|
|
747
|
+
duration: expanded ? transitions.duration.enteringScreen : transitions.duration.leavingScreen
|
|
748
|
+
})
|
|
749
|
+
},
|
|
750
|
+
sx
|
|
751
|
+
),
|
|
746
752
|
...props,
|
|
747
753
|
children: [
|
|
748
754
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_material3.Stack, { sx: { flex: 1, minHeight: 0 }, children }),
|
|
@@ -768,9 +774,12 @@ function BiampSidebar({
|
|
|
768
774
|
import_material3.Stack,
|
|
769
775
|
{
|
|
770
776
|
direction: "row",
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
777
|
+
sx: {
|
|
778
|
+
alignItems: "center",
|
|
779
|
+
justifyContent: "space-between",
|
|
780
|
+
mt: 2,
|
|
781
|
+
overflow: "hidden"
|
|
782
|
+
},
|
|
774
783
|
children: [
|
|
775
784
|
bottomLogoIcon ?? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
776
785
|
import_assets2.BiampLogoIcon,
|
|
@@ -782,10 +791,10 @@ function BiampSidebar({
|
|
|
782
791
|
import_material3.Typography,
|
|
783
792
|
{
|
|
784
793
|
variant: "caption",
|
|
785
|
-
fontWeight: 500,
|
|
786
|
-
color: "text.secondary",
|
|
787
794
|
noWrap: true,
|
|
788
795
|
sx: {
|
|
796
|
+
fontWeight: 500,
|
|
797
|
+
color: "text.secondary",
|
|
789
798
|
opacity: expanded ? 1 : 0,
|
|
790
799
|
transition: ({ transitions }) => transitions.create("opacity", {
|
|
791
800
|
duration: expanded ? transitions.duration.enteringScreen : transitions.duration.leavingScreen
|
|
@@ -809,14 +818,16 @@ function BiampSidebarIconList({
|
|
|
809
818
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
810
819
|
import_material3.Stack,
|
|
811
820
|
{
|
|
812
|
-
sx:
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
821
|
+
sx: mergeSx(
|
|
822
|
+
{
|
|
823
|
+
flex: 1,
|
|
824
|
+
minHeight: 0,
|
|
825
|
+
gap: "4px",
|
|
826
|
+
overflowY: "auto",
|
|
827
|
+
overscrollBehavior: "none"
|
|
828
|
+
},
|
|
829
|
+
sx
|
|
830
|
+
),
|
|
820
831
|
...props,
|
|
821
832
|
children
|
|
822
833
|
}
|
|
@@ -847,21 +858,23 @@ function BiampSidebarIcon({
|
|
|
847
858
|
layoutDrawer.setOpen(false);
|
|
848
859
|
}
|
|
849
860
|
},
|
|
850
|
-
sx:
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
861
|
+
sx: mergeSx(
|
|
862
|
+
{
|
|
863
|
+
minWidth: "48px",
|
|
864
|
+
minHeight: "48px",
|
|
865
|
+
maxHeight: "48px",
|
|
866
|
+
borderRadius: "8px",
|
|
867
|
+
justifyContent: "flex-start",
|
|
868
|
+
alignItems: "center",
|
|
869
|
+
padding: 0,
|
|
870
|
+
overflow: "hidden",
|
|
871
|
+
color: "text.secondary",
|
|
872
|
+
"&.Mui-selected": {
|
|
873
|
+
color: "primary.main"
|
|
874
|
+
}
|
|
862
875
|
},
|
|
863
|
-
|
|
864
|
-
|
|
876
|
+
sx
|
|
877
|
+
),
|
|
865
878
|
...props,
|
|
866
879
|
children: [
|
|
867
880
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
@@ -891,10 +904,10 @@ function BiampSidebarIcon({
|
|
|
891
904
|
import_material3.Typography,
|
|
892
905
|
{
|
|
893
906
|
variant: "body1",
|
|
894
|
-
fontWeight: 600,
|
|
895
|
-
color: "inherit",
|
|
896
907
|
noWrap: true,
|
|
897
908
|
sx: {
|
|
909
|
+
fontWeight: 600,
|
|
910
|
+
color: "inherit",
|
|
898
911
|
pr: 2,
|
|
899
912
|
opacity: expanded ? 1 : 0,
|
|
900
913
|
transition: ({ transitions }) => transitions.create("opacity", {
|
|
@@ -916,18 +929,20 @@ function BiampSidebarComponent({
|
|
|
916
929
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
917
930
|
import_material3.Box,
|
|
918
931
|
{
|
|
919
|
-
sx:
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
932
|
+
sx: mergeSx(
|
|
933
|
+
{
|
|
934
|
+
minWidth: "48px",
|
|
935
|
+
maxWidth: "48px",
|
|
936
|
+
minHeight: "48px",
|
|
937
|
+
maxHeight: "48px",
|
|
938
|
+
borderRadius: "8px",
|
|
939
|
+
overflow: "hidden",
|
|
940
|
+
justifyContent: "center",
|
|
941
|
+
alignItems: "center",
|
|
942
|
+
border: ({ palette }) => `0.6px solid ${palette.divider}`
|
|
943
|
+
},
|
|
944
|
+
sx
|
|
945
|
+
),
|
|
931
946
|
...props,
|
|
932
947
|
children
|
|
933
948
|
}
|
|
@@ -936,12 +951,12 @@ function BiampSidebarComponent({
|
|
|
936
951
|
|
|
937
952
|
// src/BiampHeader/BiampHeader.tsx
|
|
938
953
|
var import_material5 = require("@mui/material");
|
|
939
|
-
var import_react5 = require("react");
|
|
940
954
|
var import_assets4 = require("@bwp-web/assets");
|
|
941
955
|
|
|
942
956
|
// src/BiampGlobalSearch/BiampGlobalSearch.tsx
|
|
943
957
|
var import_react4 = require("react");
|
|
944
958
|
var import_material4 = require("@mui/material");
|
|
959
|
+
var import_utils = require("@mui/material/utils");
|
|
945
960
|
var import_assets3 = require("@bwp-web/assets");
|
|
946
961
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
947
962
|
var SearchContext = (0, import_react4.createContext)({
|
|
@@ -987,8 +1002,11 @@ var BiampGlobalSearchPaper = (0, import_react4.forwardRef)(
|
|
|
987
1002
|
import_material4.Typography,
|
|
988
1003
|
{
|
|
989
1004
|
variant: "body2",
|
|
990
|
-
|
|
991
|
-
|
|
1005
|
+
sx: {
|
|
1006
|
+
color: "text.secondary",
|
|
1007
|
+
px: 2,
|
|
1008
|
+
py: 1.5
|
|
1009
|
+
},
|
|
992
1010
|
children: noResultsText
|
|
993
1011
|
}
|
|
994
1012
|
),
|
|
@@ -1012,8 +1030,10 @@ var BiampGlobalSearchPaper = (0, import_react4.forwardRef)(
|
|
|
1012
1030
|
import_material4.Typography,
|
|
1013
1031
|
{
|
|
1014
1032
|
variant: "caption",
|
|
1015
|
-
|
|
1016
|
-
|
|
1033
|
+
sx: {
|
|
1034
|
+
fontWeight: (theme) => theme.typography.fontWeightMedium,
|
|
1035
|
+
color: "text.secondary"
|
|
1036
|
+
},
|
|
1017
1037
|
children: "Select"
|
|
1018
1038
|
}
|
|
1019
1039
|
)
|
|
@@ -1024,8 +1044,10 @@ var BiampGlobalSearchPaper = (0, import_react4.forwardRef)(
|
|
|
1024
1044
|
import_material4.Typography,
|
|
1025
1045
|
{
|
|
1026
1046
|
variant: "caption",
|
|
1027
|
-
|
|
1028
|
-
|
|
1047
|
+
sx: {
|
|
1048
|
+
fontWeight: (theme) => theme.typography.fontWeightMedium,
|
|
1049
|
+
color: "text.secondary"
|
|
1050
|
+
},
|
|
1029
1051
|
children: "Open"
|
|
1030
1052
|
}
|
|
1031
1053
|
)
|
|
@@ -1111,9 +1133,13 @@ function BiampGlobalSearchListItem({
|
|
|
1111
1133
|
{
|
|
1112
1134
|
className: "hoverContent",
|
|
1113
1135
|
variant: "body2",
|
|
1114
|
-
color: "text.secondary",
|
|
1115
1136
|
noWrap: true,
|
|
1116
|
-
sx: {
|
|
1137
|
+
sx: {
|
|
1138
|
+
color: "text.secondary",
|
|
1139
|
+
flexShrink: 1,
|
|
1140
|
+
minWidth: 0,
|
|
1141
|
+
display: "none"
|
|
1142
|
+
},
|
|
1117
1143
|
children: option.subtitle
|
|
1118
1144
|
}
|
|
1119
1145
|
),
|
|
@@ -1206,6 +1232,7 @@ function BiampGlobalSearch({
|
|
|
1206
1232
|
onChange,
|
|
1207
1233
|
onInputChange,
|
|
1208
1234
|
sx,
|
|
1235
|
+
slotProps,
|
|
1209
1236
|
...props
|
|
1210
1237
|
}) {
|
|
1211
1238
|
const hasOptions = options.length > 0;
|
|
@@ -1246,25 +1273,36 @@ function BiampGlobalSearch({
|
|
|
1246
1273
|
inputValue,
|
|
1247
1274
|
loading,
|
|
1248
1275
|
fullWidth,
|
|
1249
|
-
sx:
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1276
|
+
sx: mergeSx(
|
|
1277
|
+
{
|
|
1278
|
+
px: 1.5,
|
|
1279
|
+
"& .MuiOutlinedInput-root": {
|
|
1280
|
+
height: "40px !important",
|
|
1281
|
+
minHeight: "40px"
|
|
1282
|
+
},
|
|
1283
|
+
"& .MuiOutlinedInput-input": {
|
|
1284
|
+
height: "40px !important"
|
|
1285
|
+
},
|
|
1286
|
+
"& .MuiOutlinedInput-notchedOutline": {
|
|
1287
|
+
height: "40px !important",
|
|
1288
|
+
border: "none",
|
|
1289
|
+
boxShadow: "none"
|
|
1290
|
+
}
|
|
1262
1291
|
},
|
|
1263
|
-
|
|
1264
|
-
|
|
1292
|
+
sx
|
|
1293
|
+
),
|
|
1265
1294
|
onChange: handleChange,
|
|
1266
1295
|
onInputChange: handleInputChange,
|
|
1267
|
-
loadingText: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
1296
|
+
loadingText: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
1297
|
+
import_material4.Typography,
|
|
1298
|
+
{
|
|
1299
|
+
variant: "body2",
|
|
1300
|
+
sx: {
|
|
1301
|
+
color: "text.secondary"
|
|
1302
|
+
},
|
|
1303
|
+
children: "Loading\u2026"
|
|
1304
|
+
}
|
|
1305
|
+
),
|
|
1268
1306
|
freeSolo: true,
|
|
1269
1307
|
filterOptions: (x) => x,
|
|
1270
1308
|
getOptionLabel: (option) => typeof option === "string" ? option : option.title,
|
|
@@ -1272,7 +1310,14 @@ function BiampGlobalSearch({
|
|
|
1272
1310
|
noOptionsText: noResultsText,
|
|
1273
1311
|
slots: { paper: BiampGlobalSearchPaper },
|
|
1274
1312
|
slotProps: {
|
|
1275
|
-
|
|
1313
|
+
...slotProps,
|
|
1314
|
+
// In freeSolo mode MUI 9 skips the Popper when there are no options
|
|
1315
|
+
// (unless `keepMounted`), so the Paper's `noResultsText` would never
|
|
1316
|
+
// show. A closed, kept-mounted Popper is `display: none`.
|
|
1317
|
+
popper: (0, import_utils.mergeSlotProps)(slotProps?.popper, {
|
|
1318
|
+
keepMounted: !hasOptions
|
|
1319
|
+
}),
|
|
1320
|
+
listbox: (0, import_utils.mergeSlotProps)(slotProps?.listbox, {
|
|
1276
1321
|
sx: {
|
|
1277
1322
|
"& .MuiAutocomplete-option": {
|
|
1278
1323
|
paddingRight: "0px !important"
|
|
@@ -1287,7 +1332,7 @@ function BiampGlobalSearch({
|
|
|
1287
1332
|
visibility: "visible"
|
|
1288
1333
|
}
|
|
1289
1334
|
}
|
|
1290
|
-
}
|
|
1335
|
+
})
|
|
1291
1336
|
},
|
|
1292
1337
|
renderInput: (params) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
1293
1338
|
import_material4.TextField,
|
|
@@ -1300,11 +1345,12 @@ function BiampGlobalSearch({
|
|
|
1300
1345
|
"& .MuiInputBase-input": { paddingLeft: "8px !important" }
|
|
1301
1346
|
},
|
|
1302
1347
|
slotProps: {
|
|
1348
|
+
...params.slotProps,
|
|
1303
1349
|
input: {
|
|
1304
|
-
...params.
|
|
1350
|
+
...params.slotProps.input,
|
|
1305
1351
|
startAdornment: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
1306
1352
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_material4.InputAdornment, { position: "start", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_assets3.SearchIcon, {}) }),
|
|
1307
|
-
params.
|
|
1353
|
+
params.slotProps.input.startAdornment
|
|
1308
1354
|
] })
|
|
1309
1355
|
}
|
|
1310
1356
|
}
|
|
@@ -1332,10 +1378,16 @@ function BiampHeader({ children, sx, ...props }) {
|
|
|
1332
1378
|
import_material5.Stack,
|
|
1333
1379
|
{
|
|
1334
1380
|
direction: "row",
|
|
1335
|
-
alignItems: "center",
|
|
1336
|
-
gap: { xs: 0.5, md: 3 },
|
|
1337
|
-
sx: { px: 2.5, py: 1.5, ...sx },
|
|
1338
1381
|
...props,
|
|
1382
|
+
sx: mergeSx(
|
|
1383
|
+
{
|
|
1384
|
+
alignItems: "center",
|
|
1385
|
+
gap: { xs: 0.5, md: 3 },
|
|
1386
|
+
px: 2.5,
|
|
1387
|
+
py: 1.5
|
|
1388
|
+
},
|
|
1389
|
+
sx
|
|
1390
|
+
),
|
|
1339
1391
|
children
|
|
1340
1392
|
}
|
|
1341
1393
|
);
|
|
@@ -1350,12 +1402,7 @@ function BiampHeaderTitle({
|
|
|
1350
1402
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
1351
1403
|
import_material5.Box,
|
|
1352
1404
|
{
|
|
1353
|
-
sx: {
|
|
1354
|
-
display: "flex",
|
|
1355
|
-
alignItems: "center",
|
|
1356
|
-
gap: "12px",
|
|
1357
|
-
...sx
|
|
1358
|
-
},
|
|
1405
|
+
sx: mergeSx({ display: "flex", alignItems: "center", gap: "12px" }, sx),
|
|
1359
1406
|
...props,
|
|
1360
1407
|
children: [
|
|
1361
1408
|
icon ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
@@ -1379,10 +1426,28 @@ function BiampHeaderTitle({
|
|
|
1379
1426
|
sx: { width: 24, height: 24 }
|
|
1380
1427
|
}
|
|
1381
1428
|
),
|
|
1382
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1429
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
1430
|
+
import_material5.Stack,
|
|
1431
|
+
{
|
|
1432
|
+
direction: "row",
|
|
1433
|
+
sx: {
|
|
1434
|
+
gap: 0.5
|
|
1435
|
+
},
|
|
1436
|
+
children: [
|
|
1437
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_material5.Typography, { variant: "h4", children: title }),
|
|
1438
|
+
subtitle && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1439
|
+
import_material5.Typography,
|
|
1440
|
+
{
|
|
1441
|
+
variant: "h4",
|
|
1442
|
+
sx: {
|
|
1443
|
+
color: "text.secondary"
|
|
1444
|
+
},
|
|
1445
|
+
children: subtitle
|
|
1446
|
+
}
|
|
1447
|
+
)
|
|
1448
|
+
]
|
|
1449
|
+
}
|
|
1450
|
+
)
|
|
1386
1451
|
]
|
|
1387
1452
|
}
|
|
1388
1453
|
);
|
|
@@ -1401,13 +1466,15 @@ function BiampHeaderActions({
|
|
|
1401
1466
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1402
1467
|
import_material5.Box,
|
|
1403
1468
|
{
|
|
1404
|
-
sx:
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1469
|
+
sx: mergeSx(
|
|
1470
|
+
{
|
|
1471
|
+
ml: "auto",
|
|
1472
|
+
gap: { xs: 1, md: 2 },
|
|
1473
|
+
display: "flex",
|
|
1474
|
+
alignItems: "center"
|
|
1475
|
+
},
|
|
1476
|
+
sx
|
|
1477
|
+
),
|
|
1411
1478
|
...props,
|
|
1412
1479
|
children
|
|
1413
1480
|
}
|
|
@@ -1421,12 +1488,10 @@ function BiampHeaderButtonList({
|
|
|
1421
1488
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1422
1489
|
import_material5.Box,
|
|
1423
1490
|
{
|
|
1424
|
-
sx:
|
|
1425
|
-
display: "flex",
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
...sx
|
|
1429
|
-
},
|
|
1491
|
+
sx: mergeSx(
|
|
1492
|
+
{ display: "flex", alignItems: "center", gap: { xs: 0, md: 0.5 } },
|
|
1493
|
+
sx
|
|
1494
|
+
),
|
|
1430
1495
|
...props,
|
|
1431
1496
|
children
|
|
1432
1497
|
}
|
|
@@ -1475,16 +1540,18 @@ function BiampHeaderButton({
|
|
|
1475
1540
|
selected,
|
|
1476
1541
|
disableGutters: true,
|
|
1477
1542
|
disableRipple: true,
|
|
1478
|
-
sx:
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1543
|
+
sx: mergeSx(
|
|
1544
|
+
{
|
|
1545
|
+
minWidth: "40px",
|
|
1546
|
+
maxWidth: "40px",
|
|
1547
|
+
minHeight: "40px",
|
|
1548
|
+
maxHeight: "40px",
|
|
1549
|
+
borderRadius: "4px",
|
|
1550
|
+
justifyContent: "center",
|
|
1551
|
+
alignItems: "center"
|
|
1552
|
+
},
|
|
1553
|
+
sx
|
|
1554
|
+
),
|
|
1488
1555
|
...props,
|
|
1489
1556
|
children: selected ? displayedSelectedIcon : icon
|
|
1490
1557
|
}
|
|
@@ -1503,7 +1570,7 @@ function BiampAppPopover({
|
|
|
1503
1570
|
open,
|
|
1504
1571
|
anchorOrigin: { vertical: "bottom", horizontal: "right" },
|
|
1505
1572
|
transformOrigin: { vertical: -4, horizontal: APP_POPOVER_MAX_WIDTH },
|
|
1506
|
-
sx
|
|
1573
|
+
sx,
|
|
1507
1574
|
slotProps: {
|
|
1508
1575
|
paper: {
|
|
1509
1576
|
sx: {
|
|
@@ -1527,120 +1594,6 @@ function BiampAppPopover({
|
|
|
1527
1594
|
}
|
|
1528
1595
|
);
|
|
1529
1596
|
}
|
|
1530
|
-
function BiampBuildAppContent({
|
|
1531
|
-
children,
|
|
1532
|
-
sx,
|
|
1533
|
-
...props
|
|
1534
|
-
}) {
|
|
1535
|
-
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1536
|
-
import_material5.Box,
|
|
1537
|
-
{
|
|
1538
|
-
sx: {
|
|
1539
|
-
display: "grid",
|
|
1540
|
-
gridTemplateColumns: "1fr 1fr",
|
|
1541
|
-
gap: 1.5,
|
|
1542
|
-
...sx
|
|
1543
|
-
},
|
|
1544
|
-
...props,
|
|
1545
|
-
children
|
|
1546
|
-
}
|
|
1547
|
-
);
|
|
1548
|
-
}
|
|
1549
|
-
function BiampBuildAppContentItem({
|
|
1550
|
-
image,
|
|
1551
|
-
name,
|
|
1552
|
-
description,
|
|
1553
|
-
button,
|
|
1554
|
-
sx,
|
|
1555
|
-
...props
|
|
1556
|
-
}) {
|
|
1557
|
-
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
1558
|
-
import_material5.Stack,
|
|
1559
|
-
{
|
|
1560
|
-
direction: "column",
|
|
1561
|
-
position: "relative",
|
|
1562
|
-
sx: {
|
|
1563
|
-
p: 1.5,
|
|
1564
|
-
borderRadius: 1.5,
|
|
1565
|
-
outlineWidth: "1px",
|
|
1566
|
-
outlineStyle: "solid",
|
|
1567
|
-
outlineColor: ({ palette }) => palette.dividers,
|
|
1568
|
-
...sx
|
|
1569
|
-
},
|
|
1570
|
-
...props,
|
|
1571
|
-
children: [
|
|
1572
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_material5.Box, { sx: { width: 54, height: 54 }, mb: 0.5, children: image }),
|
|
1573
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_material5.Typography, { variant: "caption", fontWeight: 600, mb: 0.5, children: name }),
|
|
1574
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_material5.Typography, { variant: "caption", color: "text.secondary", children: description }),
|
|
1575
|
-
button && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_material5.Box, { position: "absolute", top: "12px", right: "12px", children: button })
|
|
1576
|
-
]
|
|
1577
|
-
}
|
|
1578
|
-
);
|
|
1579
|
-
}
|
|
1580
|
-
function BiampEndUserAppContent({
|
|
1581
|
-
children,
|
|
1582
|
-
sx,
|
|
1583
|
-
...props
|
|
1584
|
-
}) {
|
|
1585
|
-
const isGrid = import_react5.Children.count(children) > 1;
|
|
1586
|
-
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1587
|
-
import_material5.Stack,
|
|
1588
|
-
{
|
|
1589
|
-
direction: "column",
|
|
1590
|
-
sx: {
|
|
1591
|
-
gap: 1.5,
|
|
1592
|
-
...isGrid && {
|
|
1593
|
-
display: "grid",
|
|
1594
|
-
gridTemplateColumns: "1fr 1fr"
|
|
1595
|
-
},
|
|
1596
|
-
...sx
|
|
1597
|
-
},
|
|
1598
|
-
...props,
|
|
1599
|
-
children
|
|
1600
|
-
}
|
|
1601
|
-
);
|
|
1602
|
-
}
|
|
1603
|
-
function BiampEndUserAppContentItem({
|
|
1604
|
-
image,
|
|
1605
|
-
name,
|
|
1606
|
-
description,
|
|
1607
|
-
href,
|
|
1608
|
-
target,
|
|
1609
|
-
sx,
|
|
1610
|
-
...props
|
|
1611
|
-
}) {
|
|
1612
|
-
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
1613
|
-
import_material5.Stack,
|
|
1614
|
-
{
|
|
1615
|
-
component: href ? "a" : "div",
|
|
1616
|
-
href,
|
|
1617
|
-
target,
|
|
1618
|
-
direction: "row",
|
|
1619
|
-
alignItems: "center",
|
|
1620
|
-
sx: {
|
|
1621
|
-
gap: 1.5,
|
|
1622
|
-
p: 1.5,
|
|
1623
|
-
borderRadius: 1.5,
|
|
1624
|
-
outlineWidth: "1px",
|
|
1625
|
-
outlineStyle: "solid",
|
|
1626
|
-
outlineColor: ({ palette }) => palette.divider,
|
|
1627
|
-
textDecoration: "none",
|
|
1628
|
-
color: "inherit",
|
|
1629
|
-
cursor: href ? "pointer" : void 0,
|
|
1630
|
-
...sx
|
|
1631
|
-
},
|
|
1632
|
-
...props,
|
|
1633
|
-
children: [
|
|
1634
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_material5.Box, { sx: { width: 32, height: 32 }, children: image }),
|
|
1635
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_material5.Stack, { direction: "column", children: [
|
|
1636
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_material5.Typography, { variant: "caption", fontWeight: 600, children: name }),
|
|
1637
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_material5.Typography, { variant: "caption", color: "text.secondary", children: description })
|
|
1638
|
-
] }),
|
|
1639
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_assets4.ExternalLinkIcon, { sx: { width: 16, height: 16, ml: "auto" } })
|
|
1640
|
-
]
|
|
1641
|
-
}
|
|
1642
|
-
);
|
|
1643
|
-
}
|
|
1644
1597
|
function BiampAppListContent({
|
|
1645
1598
|
children,
|
|
1646
1599
|
sx,
|
|
@@ -1656,12 +1609,14 @@ function BiampAppListContent({
|
|
|
1656
1609
|
sx: { borderColor: ({ palette }) => palette.dividers.secondary }
|
|
1657
1610
|
}
|
|
1658
1611
|
),
|
|
1659
|
-
sx:
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1612
|
+
sx: mergeSx(
|
|
1613
|
+
{
|
|
1614
|
+
borderRadius: 2,
|
|
1615
|
+
border: ({ palette }) => `1px solid ${palette.dividers.secondary}`,
|
|
1616
|
+
overflow: "hidden"
|
|
1617
|
+
},
|
|
1618
|
+
sx
|
|
1619
|
+
),
|
|
1665
1620
|
...props,
|
|
1666
1621
|
children
|
|
1667
1622
|
}
|
|
@@ -1680,12 +1635,29 @@ function BiampAppListItem({
|
|
|
1680
1635
|
import_material5.Stack,
|
|
1681
1636
|
{
|
|
1682
1637
|
direction: "row",
|
|
1683
|
-
alignItems: "center",
|
|
1684
|
-
sx: { gap: 1.5, py: 1.5, px: 2, ...sx },
|
|
1685
1638
|
...props,
|
|
1639
|
+
sx: mergeSx(
|
|
1640
|
+
{
|
|
1641
|
+
alignItems: "center",
|
|
1642
|
+
gap: 1.5,
|
|
1643
|
+
py: 1.5,
|
|
1644
|
+
px: 2
|
|
1645
|
+
},
|
|
1646
|
+
sx
|
|
1647
|
+
),
|
|
1686
1648
|
children: [
|
|
1687
1649
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_material5.Box, { sx: { width: 40, height: 40, flexShrink: 0 }, children: image }),
|
|
1688
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1650
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1651
|
+
import_material5.Typography,
|
|
1652
|
+
{
|
|
1653
|
+
variant: "body2",
|
|
1654
|
+
sx: {
|
|
1655
|
+
fontWeight: 600,
|
|
1656
|
+
flex: 1
|
|
1657
|
+
},
|
|
1658
|
+
children: name
|
|
1659
|
+
}
|
|
1660
|
+
),
|
|
1689
1661
|
hasActions && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
1690
1662
|
import_material5.Stack,
|
|
1691
1663
|
{
|
|
@@ -1765,16 +1737,18 @@ function BiampHeaderProfile({
|
|
|
1765
1737
|
selected,
|
|
1766
1738
|
disableGutters: true,
|
|
1767
1739
|
disableRipple: true,
|
|
1768
|
-
sx:
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1740
|
+
sx: mergeSx(
|
|
1741
|
+
{
|
|
1742
|
+
minWidth: "36px",
|
|
1743
|
+
maxWidth: "36px",
|
|
1744
|
+
minHeight: "36px",
|
|
1745
|
+
maxHeight: "36px",
|
|
1746
|
+
borderRadius: "6px",
|
|
1747
|
+
justifyContent: "center",
|
|
1748
|
+
alignItems: "center"
|
|
1749
|
+
},
|
|
1750
|
+
sx
|
|
1751
|
+
),
|
|
1778
1752
|
...props,
|
|
1779
1753
|
children: image ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1780
1754
|
import_material5.Box,
|
|
@@ -1813,7 +1787,7 @@ function BiampNotificationPopover({
|
|
|
1813
1787
|
vertical: -4,
|
|
1814
1788
|
horizontal: NOTIFICATION_POPOVER_MAX_WIDTH
|
|
1815
1789
|
},
|
|
1816
|
-
sx
|
|
1790
|
+
sx,
|
|
1817
1791
|
slotProps: {
|
|
1818
1792
|
paper: {
|
|
1819
1793
|
sx: {
|
|
@@ -1845,16 +1819,18 @@ function BiampNotificationPopoverHeader({
|
|
|
1845
1819
|
import_material6.Stack,
|
|
1846
1820
|
{
|
|
1847
1821
|
direction: "row",
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1822
|
+
...props,
|
|
1823
|
+
sx: mergeSx(
|
|
1824
|
+
{
|
|
1825
|
+
alignItems: "center",
|
|
1826
|
+
justifyContent: "space-between",
|
|
1827
|
+
flexShrink: 0,
|
|
1828
|
+
gap: 2,
|
|
1829
|
+
px: 2,
|
|
1830
|
+
pt: 2
|
|
1831
|
+
},
|
|
1832
|
+
sx
|
|
1833
|
+
)
|
|
1858
1834
|
}
|
|
1859
1835
|
);
|
|
1860
1836
|
}
|
|
@@ -1865,15 +1841,17 @@ function BiampNotificationPopoverBody({
|
|
|
1865
1841
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1866
1842
|
import_material6.Box,
|
|
1867
1843
|
{
|
|
1868
|
-
sx:
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1844
|
+
sx: mergeSx(
|
|
1845
|
+
{
|
|
1846
|
+
flex: 1,
|
|
1847
|
+
minHeight: 0,
|
|
1848
|
+
overflowY: "auto",
|
|
1849
|
+
overscrollBehavior: "none",
|
|
1850
|
+
px: 2,
|
|
1851
|
+
pb: 2
|
|
1852
|
+
},
|
|
1853
|
+
sx
|
|
1854
|
+
),
|
|
1877
1855
|
...props
|
|
1878
1856
|
}
|
|
1879
1857
|
);
|
|
@@ -1922,14 +1900,7 @@ function BiampListPopoverItem({
|
|
|
1922
1900
|
sx,
|
|
1923
1901
|
...props
|
|
1924
1902
|
}) {
|
|
1925
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1926
|
-
import_material7.ListItem,
|
|
1927
|
-
{
|
|
1928
|
-
dense: true,
|
|
1929
|
-
sx: [listItemSx, ...Array.isArray(sx) ? sx : [sx]],
|
|
1930
|
-
...props
|
|
1931
|
-
}
|
|
1932
|
-
);
|
|
1903
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_material7.ListItem, { dense: true, sx: mergeSx(listItemSx, sx), ...props });
|
|
1933
1904
|
}
|
|
1934
1905
|
function BiampListPopoverScrollArea({
|
|
1935
1906
|
maxHeight = 340,
|
|
@@ -1939,7 +1910,10 @@ function BiampListPopoverScrollArea({
|
|
|
1939
1910
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1940
1911
|
import_material7.Box,
|
|
1941
1912
|
{
|
|
1942
|
-
sx:
|
|
1913
|
+
sx: mergeSx(
|
|
1914
|
+
{ maxHeight, overflow: "auto", overscrollBehavior: "none" },
|
|
1915
|
+
sx
|
|
1916
|
+
),
|
|
1943
1917
|
...props
|
|
1944
1918
|
}
|
|
1945
1919
|
);
|
|
@@ -1972,7 +1946,16 @@ function BiampCheckboxListPopover({
|
|
|
1972
1946
|
slotProps: { input: { "aria-label": selectAllLabel } }
|
|
1973
1947
|
}
|
|
1974
1948
|
),
|
|
1975
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1949
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1950
|
+
import_material8.Typography,
|
|
1951
|
+
{
|
|
1952
|
+
variant: "caption",
|
|
1953
|
+
sx: {
|
|
1954
|
+
fontWeight: 600
|
|
1955
|
+
},
|
|
1956
|
+
children: selectAllLabel
|
|
1957
|
+
}
|
|
1958
|
+
)
|
|
1976
1959
|
] }),
|
|
1977
1960
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_material8.Divider, {})
|
|
1978
1961
|
] }),
|
|
@@ -2005,14 +1988,14 @@ function BiampCheckboxListPopover({
|
|
|
2005
1988
|
var import_material13 = require("@mui/material");
|
|
2006
1989
|
var import_assets8 = require("@bwp-web/assets");
|
|
2007
1990
|
var import_react_table2 = require("@tanstack/react-table");
|
|
2008
|
-
var
|
|
1991
|
+
var import_react8 = require("react");
|
|
2009
1992
|
|
|
2010
1993
|
// src/BiampTable/BiampTableEmptyState.tsx
|
|
2011
1994
|
var import_assets5 = require("@bwp-web/assets");
|
|
2012
1995
|
|
|
2013
1996
|
// src/BiampTable/BiampTableStatusMessage.tsx
|
|
2014
1997
|
var import_material9 = require("@mui/material");
|
|
2015
|
-
var
|
|
1998
|
+
var import_react5 = require("react");
|
|
2016
1999
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
2017
2000
|
function BiampTableStatusMessage({
|
|
2018
2001
|
icon,
|
|
@@ -2021,15 +2004,28 @@ function BiampTableStatusMessage({
|
|
|
2021
2004
|
children,
|
|
2022
2005
|
...stackProps
|
|
2023
2006
|
}) {
|
|
2024
|
-
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2007
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
2008
|
+
import_material9.Stack,
|
|
2009
|
+
{
|
|
2010
|
+
...stackProps,
|
|
2011
|
+
sx: mergeSx(
|
|
2012
|
+
{
|
|
2013
|
+
alignItems: "center",
|
|
2014
|
+
gap: 1.5
|
|
2015
|
+
},
|
|
2016
|
+
stackProps.sx
|
|
2017
|
+
),
|
|
2018
|
+
children: [
|
|
2019
|
+
(0, import_react5.cloneElement)(icon, {
|
|
2020
|
+
"aria-hidden": true,
|
|
2021
|
+
sx: mergeSx({ width: 56, height: 56 }, icon.props.sx)
|
|
2022
|
+
}),
|
|
2023
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_material9.Typography, { variant: "h2", children: title }),
|
|
2024
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_material9.Typography, { variant: "body1", children: description }),
|
|
2025
|
+
children
|
|
2026
|
+
]
|
|
2027
|
+
}
|
|
2028
|
+
);
|
|
2033
2029
|
}
|
|
2034
2030
|
|
|
2035
2031
|
// src/BiampTable/BiampTableEmptyState.tsx
|
|
@@ -2065,24 +2061,24 @@ function BiampTableErrorState({
|
|
|
2065
2061
|
var import_material12 = require("@mui/material");
|
|
2066
2062
|
var import_assets7 = require("@bwp-web/assets");
|
|
2067
2063
|
var import_react_table = require("@tanstack/react-table");
|
|
2068
|
-
var
|
|
2064
|
+
var import_react7 = __toESM(require("react"), 1);
|
|
2069
2065
|
|
|
2070
2066
|
// src/BiampTable/BiampTableTruncatedCell.tsx
|
|
2071
2067
|
var import_material10 = require("@mui/material");
|
|
2072
|
-
var
|
|
2068
|
+
var import_react6 = require("react");
|
|
2073
2069
|
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
2074
2070
|
function BiampTableTruncatedCell({
|
|
2075
2071
|
children
|
|
2076
2072
|
}) {
|
|
2077
|
-
const textRef = (0,
|
|
2078
|
-
const [open, setOpen] = (0,
|
|
2079
|
-
const handleMouseEnter = (0,
|
|
2073
|
+
const textRef = (0, import_react6.useRef)(null);
|
|
2074
|
+
const [open, setOpen] = (0, import_react6.useState)(false);
|
|
2075
|
+
const handleMouseEnter = (0, import_react6.useCallback)(() => {
|
|
2080
2076
|
const el = textRef.current;
|
|
2081
2077
|
if (el && el.scrollWidth > el.clientWidth) {
|
|
2082
2078
|
setOpen(true);
|
|
2083
2079
|
}
|
|
2084
2080
|
}, []);
|
|
2085
|
-
const handleMouseLeave = (0,
|
|
2081
|
+
const handleMouseLeave = (0, import_react6.useCallback)(() => {
|
|
2086
2082
|
setOpen(false);
|
|
2087
2083
|
}, []);
|
|
2088
2084
|
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
@@ -2113,21 +2109,6 @@ function BiampTableTruncatedCell({
|
|
|
2113
2109
|
);
|
|
2114
2110
|
}
|
|
2115
2111
|
|
|
2116
|
-
// src/slotProps.ts
|
|
2117
|
-
function resolveSlot(slot, ctx) {
|
|
2118
|
-
if (!slot) return void 0;
|
|
2119
|
-
return typeof slot === "function" ? slot(ctx) : slot;
|
|
2120
|
-
}
|
|
2121
|
-
function mergeSx(...inputs) {
|
|
2122
|
-
return inputs.filter((v) => Boolean(v)).flatMap((v) => Array.isArray(v) ? v : [v]);
|
|
2123
|
-
}
|
|
2124
|
-
function mergeSlotProps(ownProps, userProps) {
|
|
2125
|
-
return typeof userProps === "function" ? (ownerState) => ({
|
|
2126
|
-
...ownProps,
|
|
2127
|
-
...userProps(ownerState)
|
|
2128
|
-
}) : { ...ownProps, ...userProps };
|
|
2129
|
-
}
|
|
2130
|
-
|
|
2131
2112
|
// src/BiampTable/cellSx.ts
|
|
2132
2113
|
var stickyHoverBg = {
|
|
2133
2114
|
".MuiTableRow-hover:hover > &, .Mui-selected > &": {
|
|
@@ -2483,7 +2464,7 @@ function BiampTableRowInner({
|
|
|
2483
2464
|
function biampTableRowPropsAreEqual(prev, next) {
|
|
2484
2465
|
return prev.row.id === next.row.id && prev.row.original === next.row.original && prev.isSelected === next.isSelected && prev.isExpanded === next.isExpanded && prev.visibleColumnsKey === next.visibleColumnsKey && prev.enableRowSelection === next.enableRowSelection && prev.enableExpanding === next.enableExpanding && prev.alwaysExpanded === next.alwaysExpanded && prev.hasExpandableRows === next.hasExpandableRows && prev.selectChildrenWithParent === next.selectChildrenWithParent && prev.showExpandGuidelines === next.showExpandGuidelines && prev.onRowClick === next.onRowClick && prev.isRowClickable === next.isRowClickable && prev.getRowLabel === next.getRowLabel && prev.customColor === next.customColor && prev.rowSlotProps === next.rowSlotProps && prev.cellSlotProps === next.cellSlotProps;
|
|
2485
2466
|
}
|
|
2486
|
-
var BiampTableRow =
|
|
2467
|
+
var BiampTableRow = import_react7.default.memo(
|
|
2487
2468
|
BiampTableRowInner,
|
|
2488
2469
|
biampTableRowPropsAreEqual
|
|
2489
2470
|
);
|
|
@@ -2508,6 +2489,33 @@ var headerSelectionCellSx = {
|
|
|
2508
2489
|
bgcolor: ({ palette }) => palette.mode === "dark" ? palette.grey[900] : palette.background.paper
|
|
2509
2490
|
};
|
|
2510
2491
|
var checkboxHiddenHeaderSx = { visibility: "hidden" };
|
|
2492
|
+
var footerBg = ({ palette }) => palette.mode === "dark" ? palette.grey[900] : palette.grey[100];
|
|
2493
|
+
var footerRowSx = { bgcolor: footerBg };
|
|
2494
|
+
var footerCellSx = {
|
|
2495
|
+
height: 44,
|
|
2496
|
+
color: "text.primary",
|
|
2497
|
+
fontSize: 14,
|
|
2498
|
+
fontWeight: 600,
|
|
2499
|
+
lineHeight: 1.5,
|
|
2500
|
+
borderTop: ({ palette }) => `0.6px solid ${palette.divider}`,
|
|
2501
|
+
borderBottom: "none"
|
|
2502
|
+
};
|
|
2503
|
+
var footerPinnedCellSx = { bgcolor: footerBg };
|
|
2504
|
+
var stickyFooterSx = {
|
|
2505
|
+
position: "sticky",
|
|
2506
|
+
bottom: 0,
|
|
2507
|
+
zIndex: 2,
|
|
2508
|
+
filter: "drop-shadow(0px -1px 3.5px rgba(0, 0, 0, 0.05))"
|
|
2509
|
+
};
|
|
2510
|
+
var fillerRowSx = { height: "100%" };
|
|
2511
|
+
var fitHeightBodySx = {
|
|
2512
|
+
"& > tr:nth-last-of-type(2) > td": { borderBottom: "none" }
|
|
2513
|
+
};
|
|
2514
|
+
var fillerCellSx = {
|
|
2515
|
+
height: "auto",
|
|
2516
|
+
p: 0,
|
|
2517
|
+
border: "none"
|
|
2518
|
+
};
|
|
2511
2519
|
function BiampTable({
|
|
2512
2520
|
table,
|
|
2513
2521
|
onRowClick,
|
|
@@ -2524,6 +2532,8 @@ function BiampTable({
|
|
|
2524
2532
|
getRowLabel,
|
|
2525
2533
|
setRowColor,
|
|
2526
2534
|
slotProps,
|
|
2535
|
+
stickyFooter = false,
|
|
2536
|
+
fitHeight = false,
|
|
2527
2537
|
sx,
|
|
2528
2538
|
...boxProps
|
|
2529
2539
|
}) {
|
|
@@ -2539,8 +2549,8 @@ function BiampTable({
|
|
|
2539
2549
|
enableRowSelection ? 48 : 0
|
|
2540
2550
|
);
|
|
2541
2551
|
const visibleColumnsKey = table.getVisibleLeafColumns().map((col) => col.id).join(",");
|
|
2542
|
-
const containerRef = (0,
|
|
2543
|
-
(0,
|
|
2552
|
+
const containerRef = (0, import_react8.useRef)(null);
|
|
2553
|
+
(0, import_react8.useEffect)(() => {
|
|
2544
2554
|
if (enableExpanding && alwaysExpanded) {
|
|
2545
2555
|
table.toggleAllRowsExpanded(true);
|
|
2546
2556
|
}
|
|
@@ -2550,19 +2560,25 @@ function BiampTable({
|
|
|
2550
2560
|
const hasExpandableRows = enableExpanding && rows.some((r) => r.getCanExpand());
|
|
2551
2561
|
const showError = !!error && !loading;
|
|
2552
2562
|
const showEmpty = !showError && !loading && rows.length === 0;
|
|
2563
|
+
const footerGroup = table.getFooterGroups()[0];
|
|
2564
|
+
const hasFooter = table.getVisibleLeafColumns().some((col) => col.columnDef.footer !== void 0);
|
|
2565
|
+
const { sx: userFooterSx, ...restFooterSlotProps } = slotProps?.footer ?? {};
|
|
2566
|
+
const { sx: userFooterRowSx, ...restFooterRowSlotProps } = slotProps?.footerRow ?? {};
|
|
2553
2567
|
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
2554
2568
|
import_material13.TableContainer,
|
|
2555
2569
|
{
|
|
2556
2570
|
component: import_material13.Box,
|
|
2557
2571
|
...boxProps,
|
|
2558
2572
|
ref: containerRef,
|
|
2559
|
-
sx:
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2573
|
+
sx: mergeSx(
|
|
2574
|
+
{
|
|
2575
|
+
display: "flex",
|
|
2576
|
+
flexDirection: "column",
|
|
2577
|
+
height: "100%",
|
|
2578
|
+
position: "relative"
|
|
2579
|
+
},
|
|
2580
|
+
sx
|
|
2581
|
+
),
|
|
2566
2582
|
children: [
|
|
2567
2583
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
2568
2584
|
import_material13.Table,
|
|
@@ -2570,7 +2586,11 @@ function BiampTable({
|
|
|
2570
2586
|
"aria-busy": showLoading || void 0,
|
|
2571
2587
|
...restTableSlotProps,
|
|
2572
2588
|
sx: mergeSx(
|
|
2573
|
-
{
|
|
2589
|
+
{
|
|
2590
|
+
minWidth: tableMinWidth,
|
|
2591
|
+
tableLayout: "auto",
|
|
2592
|
+
...fitHeight && { height: "100%" }
|
|
2593
|
+
},
|
|
2574
2594
|
userTableSx
|
|
2575
2595
|
),
|
|
2576
2596
|
children: [
|
|
@@ -2635,33 +2655,102 @@ function BiampTable({
|
|
|
2635
2655
|
},
|
|
2636
2656
|
headerGroup.id
|
|
2637
2657
|
)) }),
|
|
2638
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.
|
|
2658
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
2639
2659
|
import_material13.TableBody,
|
|
2640
2660
|
{
|
|
2641
2661
|
...restBodySlotProps,
|
|
2642
|
-
sx: mergeSx(
|
|
2643
|
-
|
|
2644
|
-
|
|
2662
|
+
sx: mergeSx(
|
|
2663
|
+
{ opacity: showLoading ? 0.3 : 1 },
|
|
2664
|
+
fitHeight && !showError ? fitHeightBodySx : void 0,
|
|
2665
|
+
userBodySx
|
|
2666
|
+
),
|
|
2667
|
+
children: [
|
|
2668
|
+
!showError && rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
2669
|
+
BiampTableRow,
|
|
2670
|
+
{
|
|
2671
|
+
row,
|
|
2672
|
+
visibleColumnsKey,
|
|
2673
|
+
isExpanded: row.getIsExpanded(),
|
|
2674
|
+
isSelected: row.getIsSelected(),
|
|
2675
|
+
onRowClick,
|
|
2676
|
+
isRowClickable,
|
|
2677
|
+
enableRowSelection,
|
|
2678
|
+
enableExpanding,
|
|
2679
|
+
alwaysExpanded,
|
|
2680
|
+
selectChildrenWithParent,
|
|
2681
|
+
showExpandGuidelines,
|
|
2682
|
+
getRowLabel,
|
|
2683
|
+
hasExpandableRows,
|
|
2684
|
+
customColor: setRowColor?.(row.original),
|
|
2685
|
+
rowSlotProps: slotProps?.row,
|
|
2686
|
+
cellSlotProps: slotProps?.cell
|
|
2687
|
+
},
|
|
2688
|
+
row.id
|
|
2689
|
+
)),
|
|
2690
|
+
fitHeight && !showError && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_material13.TableRow, { "aria-hidden": true, sx: fillerRowSx, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
2691
|
+
import_material13.TableCell,
|
|
2692
|
+
{
|
|
2693
|
+
colSpan: table.getVisibleLeafColumns().length + (enableRowSelection ? 1 : 0),
|
|
2694
|
+
sx: fillerCellSx
|
|
2695
|
+
}
|
|
2696
|
+
) })
|
|
2697
|
+
]
|
|
2698
|
+
}
|
|
2699
|
+
),
|
|
2700
|
+
hasFooter && footerGroup && !showError && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
2701
|
+
import_material13.TableFooter,
|
|
2702
|
+
{
|
|
2703
|
+
...restFooterSlotProps,
|
|
2704
|
+
sx: mergeSx(
|
|
2705
|
+
stickyFooter ? stickyFooterSx : void 0,
|
|
2706
|
+
userFooterSx
|
|
2707
|
+
),
|
|
2708
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
2709
|
+
import_material13.TableRow,
|
|
2645
2710
|
{
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2711
|
+
...restFooterRowSlotProps,
|
|
2712
|
+
sx: mergeSx(footerRowSx, userFooterRowSx),
|
|
2713
|
+
children: [
|
|
2714
|
+
enableRowSelection && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
2715
|
+
import_material13.TableCell,
|
|
2716
|
+
{
|
|
2717
|
+
padding: "checkbox",
|
|
2718
|
+
sx: mergeSx(footerCellSx, footerPinnedCellSx, {
|
|
2719
|
+
position: "sticky",
|
|
2720
|
+
left: 0,
|
|
2721
|
+
zIndex: 1
|
|
2722
|
+
})
|
|
2723
|
+
}
|
|
2724
|
+
),
|
|
2725
|
+
footerGroup.headers.map((header) => {
|
|
2726
|
+
const sticky = header.column.columnDef.meta?.sticky;
|
|
2727
|
+
const resolvedFooterCell = resolveSlot(slotProps?.footerCell, {
|
|
2728
|
+
header
|
|
2729
|
+
});
|
|
2730
|
+
const { sx: userFooterCellSx, ...restFooterCellProps } = resolvedFooterCell ?? {};
|
|
2731
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
2732
|
+
import_material13.TableCell,
|
|
2733
|
+
{
|
|
2734
|
+
...restFooterCellProps,
|
|
2735
|
+
"data-sticky": sticky || void 0,
|
|
2736
|
+
sx: mergeSx(
|
|
2737
|
+
cellSx(sticky, header.column.columnDef.meta?.minWidth, 3),
|
|
2738
|
+
footerCellSx,
|
|
2739
|
+
sticky ? footerPinnedCellSx : void 0,
|
|
2740
|
+
sticky ? { zIndex: 1 } : void 0,
|
|
2741
|
+
userFooterCellSx
|
|
2742
|
+
),
|
|
2743
|
+
children: header.isPlaceholder ? null : (0, import_react_table2.flexRender)(
|
|
2744
|
+
header.column.columnDef.footer,
|
|
2745
|
+
header.getContext()
|
|
2746
|
+
)
|
|
2747
|
+
},
|
|
2748
|
+
header.id
|
|
2749
|
+
);
|
|
2750
|
+
})
|
|
2751
|
+
]
|
|
2752
|
+
}
|
|
2753
|
+
)
|
|
2665
2754
|
}
|
|
2666
2755
|
)
|
|
2667
2756
|
]
|
|
@@ -2694,14 +2783,18 @@ function BiampTableContainer({
|
|
|
2694
2783
|
import_material14.Stack,
|
|
2695
2784
|
{
|
|
2696
2785
|
direction: "column",
|
|
2697
|
-
width: "100%",
|
|
2698
|
-
height: "100%",
|
|
2699
|
-
overflow: "hidden",
|
|
2700
|
-
pt: { xs: 0, md: 1.5 },
|
|
2701
|
-
borderTop: withBorderTop ? ({ palette }) => `0.6px solid ${palette.divider}` : void 0,
|
|
2702
|
-
borderBottom: withBorderBottom ? ({ palette }) => `0.6px solid ${palette.divider}` : void 0,
|
|
2703
|
-
sx: { ...sx },
|
|
2704
2786
|
...props,
|
|
2787
|
+
sx: mergeSx(
|
|
2788
|
+
{
|
|
2789
|
+
width: "100%",
|
|
2790
|
+
height: "100%",
|
|
2791
|
+
overflow: "hidden",
|
|
2792
|
+
pt: { xs: 0, md: 1.5 },
|
|
2793
|
+
borderTop: withBorderTop ? ({ palette }) => `0.6px solid ${palette.divider}` : void 0,
|
|
2794
|
+
borderBottom: withBorderBottom ? ({ palette }) => `0.6px solid ${palette.divider}` : void 0
|
|
2795
|
+
},
|
|
2796
|
+
sx
|
|
2797
|
+
),
|
|
2705
2798
|
children
|
|
2706
2799
|
}
|
|
2707
2800
|
);
|
|
@@ -2795,7 +2888,7 @@ function BiampTableColumnVisibility({
|
|
|
2795
2888
|
|
|
2796
2889
|
// src/BiampTable/BiampTableToolbarColumnVisibility.tsx
|
|
2797
2890
|
var import_assets9 = require("@bwp-web/assets");
|
|
2798
|
-
var
|
|
2891
|
+
var import_react9 = require("react");
|
|
2799
2892
|
|
|
2800
2893
|
// src/BiampTable/BiampTableToolbarActionButton.tsx
|
|
2801
2894
|
var import_material16 = require("@mui/material");
|
|
@@ -2845,7 +2938,7 @@ function BiampTableToolbarColumnVisibility({
|
|
|
2845
2938
|
showAllLabel,
|
|
2846
2939
|
...actionButtonProps
|
|
2847
2940
|
}) {
|
|
2848
|
-
const [anchorEl, setAnchorEl] = (0,
|
|
2941
|
+
const [anchorEl, setAnchorEl] = (0, import_react9.useState)(null);
|
|
2849
2942
|
const defaults = defaultColumnVisibility ?? getDefaultColumnVisibility(table);
|
|
2850
2943
|
const dirtyCount = getColumnVisibilityDirtyCount(table, defaults);
|
|
2851
2944
|
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
|
|
@@ -2872,7 +2965,7 @@ function BiampTableToolbarColumnVisibility({
|
|
|
2872
2965
|
}
|
|
2873
2966
|
|
|
2874
2967
|
// src/BiampTable/BiampTablePagination.tsx
|
|
2875
|
-
var
|
|
2968
|
+
var import_react10 = require("react");
|
|
2876
2969
|
var import_material17 = require("@mui/material");
|
|
2877
2970
|
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
2878
2971
|
var positionMap = {
|
|
@@ -2890,14 +2983,14 @@ function BiampTablePagination({
|
|
|
2890
2983
|
...paginationProps
|
|
2891
2984
|
}) {
|
|
2892
2985
|
const rowCount = table.getRowCount();
|
|
2893
|
-
const
|
|
2894
|
-
if (!loading && rowCount >= 0) {
|
|
2895
|
-
|
|
2986
|
+
const [lastRowCount, setLastRowCount] = (0, import_react10.useState)(rowCount);
|
|
2987
|
+
if (!loading && rowCount >= 0 && rowCount !== lastRowCount) {
|
|
2988
|
+
setLastRowCount(rowCount);
|
|
2896
2989
|
}
|
|
2897
|
-
const stableCount = loading ?
|
|
2990
|
+
const stableCount = loading ? lastRowCount : rowCount;
|
|
2898
2991
|
const { pageSize, pageIndex } = table.getState().pagination;
|
|
2899
2992
|
const maxPage = Math.max(0, Math.ceil(stableCount / pageSize) - 1);
|
|
2900
|
-
(0,
|
|
2993
|
+
(0, import_react10.useEffect)(() => {
|
|
2901
2994
|
if (!loading && pageIndex > maxPage) {
|
|
2902
2995
|
table.setPageIndex(maxPage);
|
|
2903
2996
|
}
|
|
@@ -2918,17 +3011,19 @@ function BiampTablePagination({
|
|
|
2918
3011
|
rowsPerPageOptions: rowsPerPageOptions ?? [],
|
|
2919
3012
|
showFirstButton: true,
|
|
2920
3013
|
showLastButton: true,
|
|
2921
|
-
sx:
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
"& .MuiToolbar-root": {
|
|
3014
|
+
sx: mergeSx(
|
|
3015
|
+
{
|
|
3016
|
+
display: "flex",
|
|
3017
|
+
justifyContent: positionMap[position],
|
|
3018
|
+
height: 40,
|
|
2927
3019
|
minHeight: 40,
|
|
2928
|
-
|
|
3020
|
+
"& .MuiToolbar-root": {
|
|
3021
|
+
minHeight: 40,
|
|
3022
|
+
px: 0
|
|
3023
|
+
}
|
|
2929
3024
|
},
|
|
2930
|
-
|
|
2931
|
-
|
|
3025
|
+
sx
|
|
3026
|
+
),
|
|
2932
3027
|
...paginationProps
|
|
2933
3028
|
}
|
|
2934
3029
|
);
|
|
@@ -2946,14 +3041,18 @@ function BiampTableToolbar({
|
|
|
2946
3041
|
import_material18.Box,
|
|
2947
3042
|
{
|
|
2948
3043
|
role: "toolbar",
|
|
2949
|
-
display: "flex",
|
|
2950
|
-
justifyContent: "space-between",
|
|
2951
|
-
alignItems: "center",
|
|
2952
|
-
gap: { xs: 0, md: 1 },
|
|
2953
|
-
width: "100%",
|
|
2954
|
-
minHeight: 44,
|
|
2955
|
-
sx: { ...sx },
|
|
2956
3044
|
...props,
|
|
3045
|
+
sx: mergeSx(
|
|
3046
|
+
{
|
|
3047
|
+
display: "flex",
|
|
3048
|
+
justifyContent: "space-between",
|
|
3049
|
+
alignItems: "center",
|
|
3050
|
+
gap: { xs: 0, md: 1 },
|
|
3051
|
+
width: "100%",
|
|
3052
|
+
minHeight: 44
|
|
3053
|
+
},
|
|
3054
|
+
sx
|
|
3055
|
+
),
|
|
2957
3056
|
children
|
|
2958
3057
|
}
|
|
2959
3058
|
);
|
|
@@ -2969,12 +3068,17 @@ function BiampTableToolbarActions({
|
|
|
2969
3068
|
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2970
3069
|
import_material19.Box,
|
|
2971
3070
|
{
|
|
2972
|
-
display: "flex",
|
|
2973
|
-
alignItems: "center",
|
|
2974
|
-
ml: "auto",
|
|
2975
|
-
gap: { xs: 0, md: 1 },
|
|
2976
|
-
mr: { xs: 1, md: 0 },
|
|
2977
3071
|
...props,
|
|
3072
|
+
sx: mergeSx(
|
|
3073
|
+
{
|
|
3074
|
+
display: "flex",
|
|
3075
|
+
alignItems: "center",
|
|
3076
|
+
ml: "auto",
|
|
3077
|
+
gap: { xs: 0, md: 1 },
|
|
3078
|
+
mr: { xs: 1, md: 0 }
|
|
3079
|
+
},
|
|
3080
|
+
props.sx
|
|
3081
|
+
),
|
|
2978
3082
|
children
|
|
2979
3083
|
}
|
|
2980
3084
|
);
|
|
@@ -3026,7 +3130,8 @@ function BiampTableToolbarExportTextButton({
|
|
|
3026
3130
|
// src/BiampTable/BiampTableToolbarFilters.tsx
|
|
3027
3131
|
var import_material21 = require("@mui/material");
|
|
3028
3132
|
var import_assets11 = require("@bwp-web/assets");
|
|
3029
|
-
var
|
|
3133
|
+
var import_react11 = require("react");
|
|
3134
|
+
var import_utils2 = require("@mui/material/utils");
|
|
3030
3135
|
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
3031
3136
|
function BiampTableToolbarFilters({
|
|
3032
3137
|
activeFilterCount,
|
|
@@ -3041,8 +3146,8 @@ function BiampTableToolbarFilters({
|
|
|
3041
3146
|
buttonLabel = "Filters",
|
|
3042
3147
|
DrawerProps: drawerProps
|
|
3043
3148
|
}) {
|
|
3044
|
-
const [open, setOpen] = (0,
|
|
3045
|
-
const titleId = (0,
|
|
3149
|
+
const [open, setOpen] = (0, import_react11.useState)(false);
|
|
3150
|
+
const titleId = (0, import_react11.useId)();
|
|
3046
3151
|
const theme = (0, import_material21.useTheme)();
|
|
3047
3152
|
function handleClose() {
|
|
3048
3153
|
onApply?.();
|
|
@@ -3066,27 +3171,33 @@ function BiampTableToolbarFilters({
|
|
|
3066
3171
|
onClose: handleClose,
|
|
3067
3172
|
"aria-labelledby": titleId,
|
|
3068
3173
|
...drawerProps,
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3174
|
+
slotProps: {
|
|
3175
|
+
...drawerProps?.slotProps,
|
|
3176
|
+
paper: (0, import_utils2.mergeSlotProps)(drawerProps?.slotProps?.paper, {
|
|
3177
|
+
sx: { width: { xs: "100%", sm: 480 } }
|
|
3178
|
+
})
|
|
3072
3179
|
},
|
|
3073
3180
|
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
3074
3181
|
import_material21.Box,
|
|
3075
3182
|
{
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3183
|
+
sx: {
|
|
3184
|
+
height: "100%",
|
|
3185
|
+
display: "flex",
|
|
3186
|
+
flexDirection: "column",
|
|
3187
|
+
justifyContent: "space-between"
|
|
3188
|
+
},
|
|
3080
3189
|
children: [
|
|
3081
3190
|
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_material21.Box, { children: [
|
|
3082
3191
|
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
3083
3192
|
import_material21.Box,
|
|
3084
3193
|
{
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3194
|
+
sx: {
|
|
3195
|
+
display: "flex",
|
|
3196
|
+
justifyContent: "space-between",
|
|
3197
|
+
alignItems: "center",
|
|
3198
|
+
px: 3.5,
|
|
3199
|
+
py: 2.5
|
|
3200
|
+
},
|
|
3090
3201
|
children: [
|
|
3091
3202
|
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_material21.Typography, { id: titleId, variant: "h2", children: [
|
|
3092
3203
|
title,
|
|
@@ -3124,38 +3235,48 @@ function BiampTableToolbarFilters({
|
|
|
3124
3235
|
{
|
|
3125
3236
|
role: "group",
|
|
3126
3237
|
"aria-label": "Filter options",
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3238
|
+
sx: {
|
|
3239
|
+
display: "flex",
|
|
3240
|
+
flexDirection: "column",
|
|
3241
|
+
gap: 2,
|
|
3242
|
+
p: 3.5,
|
|
3243
|
+
overflow: "auto"
|
|
3244
|
+
},
|
|
3132
3245
|
children
|
|
3133
3246
|
}
|
|
3134
3247
|
)
|
|
3135
3248
|
] }),
|
|
3136
|
-
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
{
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3249
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
3250
|
+
import_material21.Box,
|
|
3251
|
+
{
|
|
3252
|
+
sx: {
|
|
3253
|
+
display: "flex"
|
|
3254
|
+
},
|
|
3255
|
+
children: [
|
|
3256
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3257
|
+
import_material21.Button,
|
|
3258
|
+
{
|
|
3259
|
+
variant: "overlay",
|
|
3260
|
+
color: "secondary",
|
|
3261
|
+
fullWidth: true,
|
|
3262
|
+
onClick: onReset,
|
|
3263
|
+
disabled: activeFilterCount === 0,
|
|
3264
|
+
children: resetLabel
|
|
3265
|
+
}
|
|
3266
|
+
),
|
|
3267
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3268
|
+
import_material21.Button,
|
|
3269
|
+
{
|
|
3270
|
+
variant: "overlay",
|
|
3271
|
+
color: "primary",
|
|
3272
|
+
fullWidth: true,
|
|
3273
|
+
onClick: handleClose,
|
|
3274
|
+
children: applyLabel
|
|
3275
|
+
}
|
|
3276
|
+
)
|
|
3277
|
+
]
|
|
3278
|
+
}
|
|
3279
|
+
)
|
|
3159
3280
|
]
|
|
3160
3281
|
}
|
|
3161
3282
|
)
|
|
@@ -3167,21 +3288,23 @@ function BiampTableToolbarFilters({
|
|
|
3167
3288
|
// src/BiampTable/BiampTableToolbarSearch.tsx
|
|
3168
3289
|
var import_material22 = require("@mui/material");
|
|
3169
3290
|
var import_assets12 = require("@bwp-web/assets");
|
|
3170
|
-
var
|
|
3291
|
+
var import_react13 = require("react");
|
|
3171
3292
|
|
|
3172
3293
|
// src/BiampTable/useDebouncedCallback.ts
|
|
3173
|
-
var
|
|
3294
|
+
var import_react12 = require("react");
|
|
3174
3295
|
var BIAMP_TABLE_DEBOUNCE_DELAY = 300;
|
|
3175
3296
|
function useDebouncedCallback(callback, delay = BIAMP_TABLE_DEBOUNCE_DELAY) {
|
|
3176
|
-
const timeoutRef = (0,
|
|
3177
|
-
const callbackRef = (0,
|
|
3178
|
-
|
|
3179
|
-
|
|
3297
|
+
const timeoutRef = (0, import_react12.useRef)(null);
|
|
3298
|
+
const callbackRef = (0, import_react12.useRef)(callback);
|
|
3299
|
+
(0, import_react12.useEffect)(() => {
|
|
3300
|
+
callbackRef.current = callback;
|
|
3301
|
+
});
|
|
3302
|
+
(0, import_react12.useEffect)(() => {
|
|
3180
3303
|
return () => {
|
|
3181
3304
|
if (timeoutRef.current !== null) clearTimeout(timeoutRef.current);
|
|
3182
3305
|
};
|
|
3183
3306
|
}, []);
|
|
3184
|
-
return (0,
|
|
3307
|
+
return (0, import_react12.useCallback)(
|
|
3185
3308
|
(...args) => {
|
|
3186
3309
|
if (timeoutRef.current !== null) clearTimeout(timeoutRef.current);
|
|
3187
3310
|
timeoutRef.current = setTimeout(
|
|
@@ -3219,12 +3342,14 @@ function BiampTableToolbarSearch({
|
|
|
3219
3342
|
...textFieldProps
|
|
3220
3343
|
}) {
|
|
3221
3344
|
const isMobile = (0, import_material22.useMediaQuery)((t) => t.breakpoints.down("md"));
|
|
3222
|
-
const [inputValue, setInputValue] = (0,
|
|
3223
|
-
const [isExpanded, setIsExpanded] = (0,
|
|
3345
|
+
const [inputValue, setInputValue] = (0, import_react13.useState)(defaultValue);
|
|
3346
|
+
const [isExpanded, setIsExpanded] = (0, import_react13.useState)(false);
|
|
3224
3347
|
const debouncedOnChange = useDebouncedCallback(onChange, debounceDelay);
|
|
3225
|
-
(0,
|
|
3348
|
+
const [prevDefaultValue, setPrevDefaultValue] = (0, import_react13.useState)(defaultValue);
|
|
3349
|
+
if (defaultValue !== prevDefaultValue) {
|
|
3350
|
+
setPrevDefaultValue(defaultValue);
|
|
3226
3351
|
setInputValue(defaultValue);
|
|
3227
|
-
}
|
|
3352
|
+
}
|
|
3228
3353
|
const handleChange = (e) => {
|
|
3229
3354
|
setInputValue(e.target.value);
|
|
3230
3355
|
debouncedOnChange(e.target.value);
|
|
@@ -3290,11 +3415,11 @@ function BiampTableToolbarSearch({
|
|
|
3290
3415
|
}
|
|
3291
3416
|
},
|
|
3292
3417
|
fullWidth: true,
|
|
3293
|
-
sx:
|
|
3418
|
+
sx: mergeSx(
|
|
3294
3419
|
searchFieldSx,
|
|
3295
3420
|
expandable ? { width: 170 } : { maxWidth },
|
|
3296
|
-
|
|
3297
|
-
|
|
3421
|
+
sx
|
|
3422
|
+
),
|
|
3298
3423
|
variant: "outlined",
|
|
3299
3424
|
value: inputValue,
|
|
3300
3425
|
onChange: handleChange,
|
|
@@ -3304,64 +3429,86 @@ function BiampTableToolbarSearch({
|
|
|
3304
3429
|
}
|
|
3305
3430
|
);
|
|
3306
3431
|
if (isMobile && enableMobileView) {
|
|
3307
|
-
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
|
|
3317
|
-
|
|
3318
|
-
sx: {
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
|
|
3432
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
3433
|
+
import_material22.Box,
|
|
3434
|
+
{
|
|
3435
|
+
sx: {
|
|
3436
|
+
display: "flex",
|
|
3437
|
+
alignItems: "center",
|
|
3438
|
+
width: "100%",
|
|
3439
|
+
pr: 1,
|
|
3440
|
+
gap: 1
|
|
3441
|
+
},
|
|
3442
|
+
children: [
|
|
3443
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_assets12.SearchIcon, { sx: { width: 16, height: 16 } }),
|
|
3444
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3445
|
+
import_material22.InputBase,
|
|
3446
|
+
{
|
|
3447
|
+
name: "search",
|
|
3448
|
+
type: "text",
|
|
3449
|
+
placeholder,
|
|
3450
|
+
slotProps: { input: { maxLength, "aria-label": "Search" } },
|
|
3451
|
+
fullWidth: true,
|
|
3452
|
+
value: inputValue,
|
|
3453
|
+
sx: {
|
|
3454
|
+
paddingLeft: 1,
|
|
3455
|
+
height: "36px !important",
|
|
3456
|
+
minHeight: "36px !important",
|
|
3457
|
+
fontSize: (t) => t.typography.body2.fontSize
|
|
3458
|
+
},
|
|
3459
|
+
onChange: handleChange,
|
|
3460
|
+
endAdornment: clearButton
|
|
3461
|
+
}
|
|
3462
|
+
)
|
|
3463
|
+
]
|
|
3464
|
+
}
|
|
3465
|
+
);
|
|
3329
3466
|
}
|
|
3330
3467
|
if (expandable) {
|
|
3331
|
-
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
{
|
|
3335
|
-
"
|
|
3336
|
-
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
|
|
3468
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
3469
|
+
import_material22.Box,
|
|
3470
|
+
{
|
|
3471
|
+
sx: {
|
|
3472
|
+
display: "flex",
|
|
3473
|
+
alignItems: "center",
|
|
3474
|
+
minWidth: 28
|
|
3475
|
+
},
|
|
3476
|
+
children: [
|
|
3477
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3478
|
+
import_material22.IconButton,
|
|
3340
3479
|
{
|
|
3341
|
-
|
|
3342
|
-
|
|
3343
|
-
sx: {
|
|
3480
|
+
"aria-label": expandLabel ?? placeholder,
|
|
3481
|
+
onClick: () => setIsExpanded(true),
|
|
3482
|
+
sx: { display: isExpanded || inputValue ? "none" : "flex" },
|
|
3483
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3484
|
+
import_assets12.SearchIcon,
|
|
3485
|
+
{
|
|
3486
|
+
variant: "xs",
|
|
3487
|
+
color: "inherit",
|
|
3488
|
+
sx: { width: 16, height: 16 }
|
|
3489
|
+
}
|
|
3490
|
+
)
|
|
3491
|
+
}
|
|
3492
|
+
),
|
|
3493
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3494
|
+
import_material22.Collapse,
|
|
3495
|
+
{
|
|
3496
|
+
in: isExpanded || !!inputValue,
|
|
3497
|
+
orientation: "horizontal",
|
|
3498
|
+
unmountOnExit: true,
|
|
3499
|
+
children: textField
|
|
3344
3500
|
}
|
|
3345
3501
|
)
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
import_material22.Collapse,
|
|
3350
|
-
{
|
|
3351
|
-
in: isExpanded || !!inputValue,
|
|
3352
|
-
orientation: "horizontal",
|
|
3353
|
-
unmountOnExit: true,
|
|
3354
|
-
children: textField
|
|
3355
|
-
}
|
|
3356
|
-
)
|
|
3357
|
-
] });
|
|
3502
|
+
]
|
|
3503
|
+
}
|
|
3504
|
+
);
|
|
3358
3505
|
}
|
|
3359
3506
|
return textField;
|
|
3360
3507
|
}
|
|
3361
3508
|
|
|
3362
3509
|
// src/BiampTable/useBiampServerSideTable.ts
|
|
3363
3510
|
var import_react_table3 = require("@tanstack/react-table");
|
|
3364
|
-
var
|
|
3511
|
+
var import_react14 = require("react");
|
|
3365
3512
|
|
|
3366
3513
|
// src/BiampTable/serverSideTableUtils.ts
|
|
3367
3514
|
function orderToSorting(order, fieldToColumnId) {
|
|
@@ -3453,7 +3600,7 @@ function useBiampServerSideTable({
|
|
|
3453
3600
|
nonHideableColumnIds,
|
|
3454
3601
|
columnIdToField,
|
|
3455
3602
|
fieldToColumnId
|
|
3456
|
-
} = (0,
|
|
3603
|
+
} = (0, import_react14.useMemo)(
|
|
3457
3604
|
() => ({
|
|
3458
3605
|
defaultColumnVisibility: getDefaultColumnVisibilityFromDefs(columns),
|
|
3459
3606
|
nonHideableColumnIds: getNonHideableColumnIds(columns),
|
|
@@ -3461,21 +3608,21 @@ function useBiampServerSideTable({
|
|
|
3461
3608
|
}),
|
|
3462
3609
|
[columns]
|
|
3463
3610
|
);
|
|
3464
|
-
const sorting = (0,
|
|
3611
|
+
const sorting = (0, import_react14.useMemo)(
|
|
3465
3612
|
() => orderToSorting(order, fieldToColumnId),
|
|
3466
3613
|
[order, fieldToColumnId]
|
|
3467
3614
|
);
|
|
3468
3615
|
const hasPagination = page != null && rowsPerPage != null;
|
|
3469
|
-
const pagination = (0,
|
|
3616
|
+
const pagination = (0, import_react14.useMemo)(
|
|
3470
3617
|
() => hasPagination ? { pageIndex: page, pageSize: rowsPerPage } : void 0,
|
|
3471
3618
|
[hasPagination, page, rowsPerPage]
|
|
3472
3619
|
);
|
|
3473
3620
|
const hasSelection = selectedRowIds != null;
|
|
3474
|
-
const rowSelection = (0,
|
|
3621
|
+
const rowSelection = (0, import_react14.useMemo)(
|
|
3475
3622
|
() => hasSelection ? selectedIdsToRowSelection(selectedRowIds) : void 0,
|
|
3476
3623
|
[hasSelection, selectedRowIds]
|
|
3477
3624
|
);
|
|
3478
|
-
const mergedVisibility = (0,
|
|
3625
|
+
const mergedVisibility = (0, import_react14.useMemo)(() => {
|
|
3479
3626
|
const merged = {
|
|
3480
3627
|
...defaultColumnVisibility,
|
|
3481
3628
|
...columnVisibility
|
|
@@ -3593,15 +3740,15 @@ function BiampBanner({ show, children, severity }) {
|
|
|
3593
3740
|
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_material23.Collapse, { in: show, unmountOnExit: true, component: "aside", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
3594
3741
|
import_material23.Box,
|
|
3595
3742
|
{
|
|
3596
|
-
bgcolor: ({ palette }) => palette.background[severity],
|
|
3597
|
-
display: "flex",
|
|
3598
|
-
flexDirection: "row",
|
|
3599
|
-
alignItems: "center",
|
|
3600
|
-
justifyContent: "space-between",
|
|
3601
|
-
gap: 1,
|
|
3602
|
-
px: { xs: 2, sm: 2.5 },
|
|
3603
|
-
minHeight: 48,
|
|
3604
3743
|
sx: {
|
|
3744
|
+
bgcolor: ({ palette }) => palette.background[severity],
|
|
3745
|
+
display: "flex",
|
|
3746
|
+
flexDirection: "row",
|
|
3747
|
+
alignItems: "center",
|
|
3748
|
+
justifyContent: "space-between",
|
|
3749
|
+
gap: 1,
|
|
3750
|
+
px: { xs: 2, sm: 2.5 },
|
|
3751
|
+
minHeight: 48,
|
|
3605
3752
|
borderBottom: ({ palette }) => `0.6px solid ${palette[severity].main}`
|
|
3606
3753
|
},
|
|
3607
3754
|
children
|
|
@@ -3618,10 +3765,37 @@ function BiampBannerIcon({ severity, children }) {
|
|
|
3618
3765
|
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_jsx_runtime27.Fragment, { children: severity ? iconMapping[severity] : children });
|
|
3619
3766
|
}
|
|
3620
3767
|
function BiampBannerContent({ children, ...props }) {
|
|
3621
|
-
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
3768
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
3769
|
+
import_material23.Typography,
|
|
3770
|
+
{
|
|
3771
|
+
variant: "h3",
|
|
3772
|
+
...props,
|
|
3773
|
+
sx: mergeSx(
|
|
3774
|
+
{
|
|
3775
|
+
textAlign: "center"
|
|
3776
|
+
},
|
|
3777
|
+
props.sx
|
|
3778
|
+
),
|
|
3779
|
+
children
|
|
3780
|
+
}
|
|
3781
|
+
);
|
|
3622
3782
|
}
|
|
3623
3783
|
function BiampBannerActions({ children, ...props }) {
|
|
3624
|
-
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
3784
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
3785
|
+
import_material23.Box,
|
|
3786
|
+
{
|
|
3787
|
+
...props,
|
|
3788
|
+
sx: mergeSx(
|
|
3789
|
+
{
|
|
3790
|
+
display: "flex",
|
|
3791
|
+
gap: 1,
|
|
3792
|
+
alignItems: "center"
|
|
3793
|
+
},
|
|
3794
|
+
props.sx
|
|
3795
|
+
),
|
|
3796
|
+
children
|
|
3797
|
+
}
|
|
3798
|
+
);
|
|
3625
3799
|
}
|
|
3626
3800
|
|
|
3627
3801
|
// src/BiampSegmentedButton/SegmentedButton.tsx
|
|
@@ -3643,20 +3817,22 @@ function SegmentedButton({
|
|
|
3643
3817
|
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3644
3818
|
import_material24.Button,
|
|
3645
3819
|
{
|
|
3646
|
-
sx:
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
|
|
3820
|
+
sx: mergeSx(
|
|
3821
|
+
{
|
|
3822
|
+
backgroundColor,
|
|
3823
|
+
color: textColor,
|
|
3824
|
+
borderRadius: "4px",
|
|
3825
|
+
border,
|
|
3826
|
+
borderColor: "divider",
|
|
3827
|
+
lineHeight: 1.5,
|
|
3828
|
+
px: 1.5,
|
|
3829
|
+
py: 0,
|
|
3830
|
+
height: small ? "22px" : "26px",
|
|
3831
|
+
...small && { fontSize: "12px", letterSpacing: "-0.24px" },
|
|
3832
|
+
boxShadow: active ? `0 1px 2px 0 ${(0, import_styles.alpha)(theme.palette.common.black, 0.05)} !important` : "none !important"
|
|
3833
|
+
},
|
|
3834
|
+
sx
|
|
3835
|
+
),
|
|
3660
3836
|
...props,
|
|
3661
3837
|
children
|
|
3662
3838
|
}
|
|
@@ -3673,14 +3849,16 @@ function SegmentedButtonGroup({ children, sx, ...props }) {
|
|
|
3673
3849
|
import_material25.Stack,
|
|
3674
3850
|
{
|
|
3675
3851
|
direction: "row",
|
|
3676
|
-
p: 0.5,
|
|
3677
|
-
borderRadius: "6px",
|
|
3678
|
-
gap: 1,
|
|
3679
|
-
sx: {
|
|
3680
|
-
backgroundColor: isDarkMode ? theme.palette.grey[900] : theme.palette.grey[100],
|
|
3681
|
-
...sx
|
|
3682
|
-
},
|
|
3683
3852
|
...props,
|
|
3853
|
+
sx: mergeSx(
|
|
3854
|
+
{
|
|
3855
|
+
p: 0.5,
|
|
3856
|
+
borderRadius: "6px",
|
|
3857
|
+
gap: 1,
|
|
3858
|
+
backgroundColor: isDarkMode ? theme.palette.grey[900] : theme.palette.grey[100]
|
|
3859
|
+
},
|
|
3860
|
+
sx
|
|
3861
|
+
),
|
|
3684
3862
|
children
|
|
3685
3863
|
}
|
|
3686
3864
|
);
|
|
@@ -3688,7 +3866,7 @@ function SegmentedButtonGroup({ children, sx, ...props }) {
|
|
|
3688
3866
|
|
|
3689
3867
|
// src/OrganizationSelector/OrganizationSelector.tsx
|
|
3690
3868
|
var import_material26 = require("@mui/material");
|
|
3691
|
-
var
|
|
3869
|
+
var import_react15 = require("react");
|
|
3692
3870
|
var import_assets14 = require("@bwp-web/assets");
|
|
3693
3871
|
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
3694
3872
|
function OrganizationSelector({
|
|
@@ -3700,17 +3878,19 @@ function OrganizationSelector({
|
|
|
3700
3878
|
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
3701
3879
|
import_material26.Stack,
|
|
3702
3880
|
{
|
|
3703
|
-
sx:
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
|
|
3881
|
+
sx: mergeSx(
|
|
3882
|
+
{
|
|
3883
|
+
width: "min(370px, calc(100vw - 24px))",
|
|
3884
|
+
minHeight: 64,
|
|
3885
|
+
maxHeight: "min(700px, 90vh)",
|
|
3886
|
+
backgroundColor: ({ palette }) => palette.mode === "dark" ? palette.grey[700] : palette.grey[100],
|
|
3887
|
+
borderRadius: 3,
|
|
3888
|
+
p: 1.5,
|
|
3889
|
+
boxShadow: ({ palette }) => `0 4px 24px 0 ${(0, import_material26.alpha)(palette.common.black, 0.15)}`,
|
|
3890
|
+
overflow: "auto"
|
|
3891
|
+
},
|
|
3892
|
+
sx
|
|
3893
|
+
),
|
|
3714
3894
|
...props,
|
|
3715
3895
|
children: loading ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_material26.CircularProgress, { size: 40, sx: { mx: "auto", my: "auto" } }) : children
|
|
3716
3896
|
}
|
|
@@ -3722,23 +3902,25 @@ function OrganizationItemList({
|
|
|
3722
3902
|
maxHeight,
|
|
3723
3903
|
sx
|
|
3724
3904
|
}) {
|
|
3725
|
-
const items =
|
|
3905
|
+
const items = import_react15.Children.toArray(children).filter(import_react15.isValidElement);
|
|
3726
3906
|
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_jsx_runtime30.Fragment, { children: [
|
|
3727
3907
|
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
3728
3908
|
import_material26.List,
|
|
3729
3909
|
{
|
|
3730
3910
|
disablePadding: true,
|
|
3731
|
-
sx:
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3911
|
+
sx: mergeSx(
|
|
3912
|
+
{
|
|
3913
|
+
border: 0.6,
|
|
3914
|
+
borderColor: ({ palette }) => palette.mode === "dark" ? (0, import_material26.alpha)(palette.common.white, 0.12) : (0, import_material26.alpha)(palette.grey[900], 0.15),
|
|
3915
|
+
borderRadius: 2,
|
|
3916
|
+
...maxHeight !== void 0 && {
|
|
3917
|
+
overflow: "auto",
|
|
3918
|
+
maxHeight
|
|
3919
|
+
}
|
|
3738
3920
|
},
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
children: items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
3921
|
+
sx
|
|
3922
|
+
),
|
|
3923
|
+
children: items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_react15.Fragment, { children: [
|
|
3742
3924
|
item,
|
|
3743
3925
|
i !== items.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_material26.Divider, {})
|
|
3744
3926
|
] }, item.key ?? i))
|
|
@@ -3753,9 +3935,11 @@ function renderText(value, defaults) {
|
|
|
3753
3935
|
import_material26.Typography,
|
|
3754
3936
|
{
|
|
3755
3937
|
variant: defaults.variant,
|
|
3756
|
-
fontWeight: defaults.fontWeight,
|
|
3757
|
-
color: defaults.color,
|
|
3758
3938
|
noWrap: true,
|
|
3939
|
+
sx: {
|
|
3940
|
+
fontWeight: defaults.fontWeight,
|
|
3941
|
+
color: defaults.color
|
|
3942
|
+
},
|
|
3759
3943
|
children: value
|
|
3760
3944
|
}
|
|
3761
3945
|
);
|
|
@@ -3778,13 +3962,10 @@ function OrganizationItem({
|
|
|
3778
3962
|
{
|
|
3779
3963
|
disabled: disabled ?? isCurrent,
|
|
3780
3964
|
disableRipple: true,
|
|
3781
|
-
sx:
|
|
3782
|
-
p: 1,
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
"&.Mui-disabled": { opacity: 1 },
|
|
3786
|
-
...sx
|
|
3787
|
-
},
|
|
3965
|
+
sx: mergeSx(
|
|
3966
|
+
{ p: 1, pr: 1.5, gap: 1.5, "&.Mui-disabled": { opacity: 1 } },
|
|
3967
|
+
sx
|
|
3968
|
+
),
|
|
3788
3969
|
...props,
|
|
3789
3970
|
children: [
|
|
3790
3971
|
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
@@ -3814,20 +3995,40 @@ function OrganizationItem({
|
|
|
3814
3995
|
) : logo
|
|
3815
3996
|
}
|
|
3816
3997
|
),
|
|
3817
|
-
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
|
|
3824
|
-
|
|
3825
|
-
|
|
3826
|
-
|
|
3827
|
-
|
|
3828
|
-
|
|
3829
|
-
|
|
3830
|
-
|
|
3998
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
3999
|
+
import_material26.Stack,
|
|
4000
|
+
{
|
|
4001
|
+
sx: {
|
|
4002
|
+
gap: 0.25,
|
|
4003
|
+
width: "100%",
|
|
4004
|
+
minWidth: 0
|
|
4005
|
+
},
|
|
4006
|
+
children: [
|
|
4007
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
4008
|
+
import_material26.Stack,
|
|
4009
|
+
{
|
|
4010
|
+
direction: "row",
|
|
4011
|
+
sx: {
|
|
4012
|
+
justifyContent: "space-between",
|
|
4013
|
+
gap: 1
|
|
4014
|
+
},
|
|
4015
|
+
children: [
|
|
4016
|
+
renderText(primaryText, {
|
|
4017
|
+
variant: "body2",
|
|
4018
|
+
fontWeight: 600,
|
|
4019
|
+
color: "primary.main"
|
|
4020
|
+
}),
|
|
4021
|
+
meta && renderText(meta, { variant: "body2", color: "text.secondary" })
|
|
4022
|
+
]
|
|
4023
|
+
}
|
|
4024
|
+
),
|
|
4025
|
+
secondaryText && renderText(secondaryText, {
|
|
4026
|
+
variant: "caption",
|
|
4027
|
+
color: "text.secondary"
|
|
4028
|
+
})
|
|
4029
|
+
]
|
|
4030
|
+
}
|
|
4031
|
+
),
|
|
3831
4032
|
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
3832
4033
|
import_assets14.ChevronRightIcon,
|
|
3833
4034
|
{
|
|
@@ -3856,15 +4057,17 @@ function OrganizationSelectorButton({
|
|
|
3856
4057
|
import_material26.ButtonBase,
|
|
3857
4058
|
{
|
|
3858
4059
|
disableRipple: true,
|
|
3859
|
-
sx:
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
|
|
3865
|
-
|
|
3866
|
-
|
|
3867
|
-
|
|
4060
|
+
sx: mergeSx(
|
|
4061
|
+
{
|
|
4062
|
+
display: "flex",
|
|
4063
|
+
alignItems: "center",
|
|
4064
|
+
gap: 1,
|
|
4065
|
+
borderRadius: 1,
|
|
4066
|
+
p: 0.75,
|
|
4067
|
+
border: ({ palette }) => `0.6px solid ${palette.dividers.secondary}`
|
|
4068
|
+
},
|
|
4069
|
+
sx
|
|
4070
|
+
),
|
|
3868
4071
|
...props,
|
|
3869
4072
|
children: [
|
|
3870
4073
|
icon,
|
|
@@ -3872,9 +4075,11 @@ function OrganizationSelectorButton({
|
|
|
3872
4075
|
import_material26.Typography,
|
|
3873
4076
|
{
|
|
3874
4077
|
variant: "caption",
|
|
3875
|
-
fontWeight: 600,
|
|
3876
4078
|
noWrap: true,
|
|
3877
|
-
sx: {
|
|
4079
|
+
sx: {
|
|
4080
|
+
fontWeight: 600,
|
|
4081
|
+
flexShrink: 0
|
|
4082
|
+
},
|
|
3878
4083
|
children: name
|
|
3879
4084
|
}
|
|
3880
4085
|
),
|
|
@@ -3925,7 +4130,8 @@ function OrganizationSelectorPopover({
|
|
|
3925
4130
|
|
|
3926
4131
|
// src/LandingPage/LandingFormPanel.tsx
|
|
3927
4132
|
var import_material27 = require("@mui/material");
|
|
3928
|
-
var
|
|
4133
|
+
var import_react16 = require("react");
|
|
4134
|
+
var import_utils3 = require("@mui/material/utils");
|
|
3929
4135
|
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
3930
4136
|
function LandingFormPanel({
|
|
3931
4137
|
children,
|
|
@@ -3945,20 +4151,20 @@ function LandingFormPanel({
|
|
|
3945
4151
|
component: "form",
|
|
3946
4152
|
onSubmit: handleSubmit,
|
|
3947
4153
|
noValidate,
|
|
3948
|
-
|
|
3949
|
-
p: 1.5,
|
|
3950
|
-
borderRadius: 4,
|
|
3951
|
-
width,
|
|
3952
|
-
maxWidth: "100%",
|
|
4154
|
+
...stackProps,
|
|
3953
4155
|
sx: mergeSx(
|
|
3954
4156
|
{
|
|
4157
|
+
gap: 2,
|
|
4158
|
+
p: 1.5,
|
|
4159
|
+
borderRadius: 4,
|
|
4160
|
+
width,
|
|
4161
|
+
maxWidth: "100%",
|
|
3955
4162
|
// Figma's `background_default` (#F5F5F5) is `grey[100]` here, not
|
|
3956
4163
|
// `palette.background.default` — that token is #FFFFFF in light mode.
|
|
3957
4164
|
backgroundColor: ({ palette }) => palette.mode === "dark" ? palette.grey[700] : palette.grey[100]
|
|
3958
4165
|
},
|
|
3959
4166
|
sx
|
|
3960
4167
|
),
|
|
3961
|
-
...stackProps,
|
|
3962
4168
|
children
|
|
3963
4169
|
}
|
|
3964
4170
|
);
|
|
@@ -3985,46 +4191,65 @@ function LandingFormField({
|
|
|
3985
4191
|
label: labelSlotProps,
|
|
3986
4192
|
...fieldSlotProps
|
|
3987
4193
|
} = slotProps ?? {};
|
|
3988
|
-
const generatedId = (0,
|
|
4194
|
+
const generatedId = (0, import_react16.useId)();
|
|
3989
4195
|
const fieldId = id ?? generatedId;
|
|
3990
4196
|
const labelId = labelSlotProps?.id ?? `${fieldId}-label`;
|
|
3991
|
-
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
3992
|
-
|
|
3993
|
-
|
|
3994
|
-
|
|
3995
|
-
|
|
3996
|
-
|
|
3997
|
-
|
|
3998
|
-
|
|
3999
|
-
|
|
4000
|
-
|
|
4001
|
-
|
|
4002
|
-
|
|
4003
|
-
|
|
4004
|
-
|
|
4005
|
-
|
|
4006
|
-
|
|
4007
|
-
|
|
4008
|
-
|
|
4009
|
-
|
|
4010
|
-
|
|
4011
|
-
|
|
4012
|
-
|
|
4013
|
-
|
|
4014
|
-
|
|
4015
|
-
|
|
4016
|
-
|
|
4017
|
-
|
|
4018
|
-
|
|
4019
|
-
|
|
4020
|
-
|
|
4021
|
-
|
|
4022
|
-
|
|
4023
|
-
|
|
4024
|
-
|
|
4197
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
4198
|
+
import_material27.Stack,
|
|
4199
|
+
{
|
|
4200
|
+
...containerSlotProps,
|
|
4201
|
+
sx: mergeSx({ gap: 0.5, width: "100%" }, containerSlotProps?.sx),
|
|
4202
|
+
children: [
|
|
4203
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
4204
|
+
import_material27.Typography,
|
|
4205
|
+
{
|
|
4206
|
+
component: "label",
|
|
4207
|
+
id: labelId,
|
|
4208
|
+
htmlFor: fieldId,
|
|
4209
|
+
color: "textPrimary",
|
|
4210
|
+
...labelSlotProps,
|
|
4211
|
+
sx: mergeSx({ fontSize: 12, fontWeight: 600 }, labelSlotProps?.sx),
|
|
4212
|
+
children: label
|
|
4213
|
+
}
|
|
4214
|
+
),
|
|
4215
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
4216
|
+
import_material27.TextField,
|
|
4217
|
+
{
|
|
4218
|
+
id: fieldId,
|
|
4219
|
+
fullWidth: true,
|
|
4220
|
+
variant: "outlined",
|
|
4221
|
+
slotProps: {
|
|
4222
|
+
...fieldSlotProps,
|
|
4223
|
+
// `select` renders a `div[role="combobox"]`, which `<label for>`
|
|
4224
|
+
// cannot name — and MUI points its `aria-labelledby` at the div
|
|
4225
|
+
// itself, so the name would come out as the selected value. Naming
|
|
4226
|
+
// the label explicitly is what MUI's own floating label does.
|
|
4227
|
+
// Inert on a text field: `slotProps.select` only reaches a `Select`.
|
|
4228
|
+
select: (0, import_utils3.mergeSlotProps)(fieldSlotProps.select, { labelId })
|
|
4229
|
+
},
|
|
4230
|
+
sx: mergeSx(fieldSx, sx),
|
|
4231
|
+
...textFieldProps
|
|
4232
|
+
}
|
|
4233
|
+
)
|
|
4234
|
+
]
|
|
4235
|
+
}
|
|
4236
|
+
);
|
|
4025
4237
|
}
|
|
4026
4238
|
function LandingFormActions(props) {
|
|
4027
|
-
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
4239
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
4240
|
+
import_material27.Stack,
|
|
4241
|
+
{
|
|
4242
|
+
direction: "row",
|
|
4243
|
+
...props,
|
|
4244
|
+
sx: mergeSx(
|
|
4245
|
+
{
|
|
4246
|
+
gap: 1,
|
|
4247
|
+
width: "100%"
|
|
4248
|
+
},
|
|
4249
|
+
props.sx
|
|
4250
|
+
)
|
|
4251
|
+
}
|
|
4252
|
+
);
|
|
4028
4253
|
}
|
|
4029
4254
|
function LandingFormCheckbox({
|
|
4030
4255
|
label,
|
|
@@ -4046,10 +4271,9 @@ function LandingFormCheckbox({
|
|
|
4046
4271
|
label,
|
|
4047
4272
|
slotProps: {
|
|
4048
4273
|
...labelSlotProps,
|
|
4049
|
-
typography: mergeSlotProps(
|
|
4050
|
-
|
|
4051
|
-
|
|
4052
|
-
)
|
|
4274
|
+
typography: (0, import_utils3.mergeSlotProps)(labelSlotProps.typography, {
|
|
4275
|
+
variant: "body2"
|
|
4276
|
+
})
|
|
4053
4277
|
},
|
|
4054
4278
|
...formControlLabelProps,
|
|
4055
4279
|
sx: mergeSx({ m: 0, gap: 1, alignItems: "center" }, sx)
|
|
@@ -4059,8 +4283,9 @@ function LandingFormCheckbox({
|
|
|
4059
4283
|
|
|
4060
4284
|
// src/LandingPage/OrganizationsPanel.tsx
|
|
4061
4285
|
var import_material28 = require("@mui/material");
|
|
4062
|
-
var
|
|
4286
|
+
var import_react17 = require("react");
|
|
4063
4287
|
var import_assets15 = require("@bwp-web/assets");
|
|
4288
|
+
var import_utils4 = require("@mui/material/utils");
|
|
4064
4289
|
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
4065
4290
|
function OrganizationRow({
|
|
4066
4291
|
primaryText,
|
|
@@ -4123,12 +4348,24 @@ function OrganizationRow({
|
|
|
4123
4348
|
{
|
|
4124
4349
|
noWrap: true,
|
|
4125
4350
|
variant: "body2",
|
|
4126
|
-
|
|
4127
|
-
|
|
4351
|
+
sx: {
|
|
4352
|
+
fontWeight: 600,
|
|
4353
|
+
color: disabled ? "text.secondary" : "text.primary"
|
|
4354
|
+
},
|
|
4128
4355
|
children: primaryText
|
|
4129
4356
|
}
|
|
4130
4357
|
),
|
|
4131
|
-
secondaryText && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
4358
|
+
secondaryText && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
4359
|
+
import_material28.Typography,
|
|
4360
|
+
{
|
|
4361
|
+
noWrap: true,
|
|
4362
|
+
variant: "caption",
|
|
4363
|
+
sx: {
|
|
4364
|
+
color: "text.secondary"
|
|
4365
|
+
},
|
|
4366
|
+
children: secondaryText
|
|
4367
|
+
}
|
|
4368
|
+
)
|
|
4132
4369
|
] }),
|
|
4133
4370
|
!disabled && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
4134
4371
|
import_assets15.ChevronRightIcon,
|
|
@@ -4158,7 +4395,7 @@ function OrganizationRowGroup({
|
|
|
4158
4395
|
sx,
|
|
4159
4396
|
...boxProps
|
|
4160
4397
|
}) {
|
|
4161
|
-
const items =
|
|
4398
|
+
const items = import_react17.Children.toArray(children).filter(import_react17.isValidElement);
|
|
4162
4399
|
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
4163
4400
|
import_material28.Box,
|
|
4164
4401
|
{
|
|
@@ -4173,7 +4410,7 @@ function OrganizationRowGroup({
|
|
|
4173
4410
|
sx
|
|
4174
4411
|
),
|
|
4175
4412
|
...boxProps,
|
|
4176
|
-
children: items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
4413
|
+
children: items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_react17.Fragment, { children: [
|
|
4177
4414
|
item,
|
|
4178
4415
|
i !== items.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_material28.Divider, {})
|
|
4179
4416
|
] }, item.key ?? i))
|
|
@@ -4209,34 +4446,53 @@ function OrganizationsEmptyState({
|
|
|
4209
4446
|
import_material28.Stack,
|
|
4210
4447
|
{
|
|
4211
4448
|
role: "status",
|
|
4212
|
-
alignItems: "center",
|
|
4213
|
-
gap: 0.5,
|
|
4214
|
-
width: "100%",
|
|
4215
|
-
py: 2,
|
|
4216
|
-
px: 2,
|
|
4217
4449
|
...stackProps,
|
|
4450
|
+
sx: mergeSx(
|
|
4451
|
+
{
|
|
4452
|
+
alignItems: "center",
|
|
4453
|
+
gap: 0.5,
|
|
4454
|
+
width: "100%",
|
|
4455
|
+
py: 2,
|
|
4456
|
+
px: 2
|
|
4457
|
+
},
|
|
4458
|
+
stackProps.sx
|
|
4459
|
+
),
|
|
4218
4460
|
children: [
|
|
4219
|
-
(0,
|
|
4461
|
+
(0, import_react17.cloneElement)(icon, {
|
|
4220
4462
|
"aria-hidden": true,
|
|
4221
|
-
sx:
|
|
4222
|
-
|
|
4223
|
-
|
|
4224
|
-
|
|
4225
|
-
|
|
4226
|
-
|
|
4227
|
-
|
|
4463
|
+
sx: mergeSx(
|
|
4464
|
+
{
|
|
4465
|
+
width: 24,
|
|
4466
|
+
height: 24,
|
|
4467
|
+
mb: 0.5,
|
|
4468
|
+
color: "text.secondary"
|
|
4469
|
+
},
|
|
4470
|
+
icon.props.sx
|
|
4471
|
+
)
|
|
4228
4472
|
}),
|
|
4229
4473
|
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
4230
4474
|
import_material28.Typography,
|
|
4231
4475
|
{
|
|
4232
4476
|
variant: "body2",
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
|
|
4477
|
+
sx: {
|
|
4478
|
+
fontWeight: 600,
|
|
4479
|
+
color: "text.primary",
|
|
4480
|
+
textAlign: "center"
|
|
4481
|
+
},
|
|
4236
4482
|
children: title
|
|
4237
4483
|
}
|
|
4238
4484
|
),
|
|
4239
|
-
description && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
4485
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
4486
|
+
import_material28.Typography,
|
|
4487
|
+
{
|
|
4488
|
+
variant: "caption",
|
|
4489
|
+
sx: {
|
|
4490
|
+
color: "text.secondary",
|
|
4491
|
+
textAlign: "center"
|
|
4492
|
+
},
|
|
4493
|
+
children: description
|
|
4494
|
+
}
|
|
4495
|
+
)
|
|
4240
4496
|
]
|
|
4241
4497
|
}
|
|
4242
4498
|
);
|
|
@@ -4265,22 +4521,22 @@ function OrganizationsPanel({
|
|
|
4265
4521
|
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
4266
4522
|
import_material28.Stack,
|
|
4267
4523
|
{
|
|
4268
|
-
|
|
4269
|
-
alignItems: "center",
|
|
4270
|
-
justifyContent: "center",
|
|
4271
|
-
p: 1.5,
|
|
4272
|
-
borderRadius: 4,
|
|
4273
|
-
width,
|
|
4274
|
-
maxWidth: "100%",
|
|
4524
|
+
...stackProps,
|
|
4275
4525
|
sx: mergeSx(
|
|
4276
4526
|
{
|
|
4527
|
+
gap: 2,
|
|
4528
|
+
alignItems: "center",
|
|
4529
|
+
justifyContent: "center",
|
|
4530
|
+
p: 1.5,
|
|
4531
|
+
borderRadius: 4,
|
|
4532
|
+
width,
|
|
4533
|
+
maxWidth: "100%",
|
|
4277
4534
|
// Figma's `background_default` (#F5F5F5) is `grey[100]` here, not
|
|
4278
4535
|
// `palette.background.default` — that token is #FFFFFF in light mode.
|
|
4279
4536
|
backgroundColor: ({ palette }) => palette.mode === "dark" ? palette.grey[700] : palette.grey[100]
|
|
4280
4537
|
},
|
|
4281
4538
|
sx
|
|
4282
4539
|
),
|
|
4283
|
-
...stackProps,
|
|
4284
4540
|
children: [
|
|
4285
4541
|
search && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
4286
4542
|
import_material28.TextField,
|
|
@@ -4303,16 +4559,12 @@ function OrganizationsPanel({
|
|
|
4303
4559
|
),
|
|
4304
4560
|
slotProps: {
|
|
4305
4561
|
...searchFieldSlotProps,
|
|
4306
|
-
input: mergeSlotProps(
|
|
4307
|
-
{
|
|
4308
|
-
|
|
4309
|
-
|
|
4310
|
-
|
|
4311
|
-
)
|
|
4312
|
-
htmlInput: mergeSlotProps(
|
|
4313
|
-
{ "aria-label": search.placeholder },
|
|
4314
|
-
searchFieldSlotProps?.htmlInput
|
|
4315
|
-
)
|
|
4562
|
+
input: (0, import_utils4.mergeSlotProps)(searchFieldSlotProps?.input, {
|
|
4563
|
+
startAdornment: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_material28.InputAdornment, { position: "start", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_assets15.SearchIcon, { sx: { ml: 1 } }) })
|
|
4564
|
+
}),
|
|
4565
|
+
htmlInput: (0, import_utils4.mergeSlotProps)(searchFieldSlotProps?.htmlInput, {
|
|
4566
|
+
"aria-label": search.placeholder
|
|
4567
|
+
})
|
|
4316
4568
|
},
|
|
4317
4569
|
...searchSlotProps
|
|
4318
4570
|
}
|
|
@@ -4330,10 +4582,17 @@ function OrganizationsPanel({
|
|
|
4330
4582
|
)
|
|
4331
4583
|
] }),
|
|
4332
4584
|
empty ? empty === true ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(OrganizationsEmptyState, {}) : empty : orLabel && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(TextDivider, { ...slotProps?.orLabel, children: orLabel }),
|
|
4333
|
-
(joinAction || createAction) && /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
4334
|
-
|
|
4335
|
-
|
|
4336
|
-
|
|
4585
|
+
(joinAction || createAction) && /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
4586
|
+
import_material28.Stack,
|
|
4587
|
+
{
|
|
4588
|
+
...slotProps?.actions,
|
|
4589
|
+
sx: mergeSx({ gap: 1, width: "100%" }, slotProps?.actions?.sx),
|
|
4590
|
+
children: [
|
|
4591
|
+
joinAction && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(OrganizationRowGroup, { ...slotProps?.joinGroup, children: joinAction }),
|
|
4592
|
+
createAction && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(OrganizationRowGroup, { ...slotProps?.createGroup, children: createAction })
|
|
4593
|
+
]
|
|
4594
|
+
}
|
|
4595
|
+
)
|
|
4337
4596
|
]
|
|
4338
4597
|
}
|
|
4339
4598
|
);
|
|
@@ -4364,23 +4623,27 @@ function UserInitialsIcon({
|
|
|
4364
4623
|
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
4365
4624
|
import_material29.Box,
|
|
4366
4625
|
{
|
|
4367
|
-
minWidth: width,
|
|
4368
|
-
width,
|
|
4369
|
-
minHeight: height,
|
|
4370
|
-
height,
|
|
4371
|
-
borderRadius,
|
|
4372
|
-
bgcolor: bgColor,
|
|
4373
|
-
display: "flex",
|
|
4374
|
-
alignItems: "center",
|
|
4375
|
-
justifyContent: "center",
|
|
4376
|
-
sx: { ...sx },
|
|
4377
4626
|
...props,
|
|
4627
|
+
sx: mergeSx(
|
|
4628
|
+
{
|
|
4629
|
+
minWidth: width,
|
|
4630
|
+
width,
|
|
4631
|
+
minHeight: height,
|
|
4632
|
+
height,
|
|
4633
|
+
borderRadius,
|
|
4634
|
+
bgcolor: bgColor,
|
|
4635
|
+
display: "flex",
|
|
4636
|
+
alignItems: "center",
|
|
4637
|
+
justifyContent: "center"
|
|
4638
|
+
},
|
|
4639
|
+
sx
|
|
4640
|
+
),
|
|
4378
4641
|
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
4379
4642
|
import_material29.Typography,
|
|
4380
4643
|
{
|
|
4381
4644
|
variant: "h3",
|
|
4382
|
-
color: textColor,
|
|
4383
4645
|
sx: {
|
|
4646
|
+
color: textColor,
|
|
4384
4647
|
userSelect: "none",
|
|
4385
4648
|
fontSize: size !== DEFAULT_SIZE ? `${fontSize}px` : void 0
|
|
4386
4649
|
},
|
|
@@ -4399,9 +4662,19 @@ var getInitials = (name) => {
|
|
|
4399
4662
|
|
|
4400
4663
|
// src/DynamicSvgIcon/DynamicSvgIcon.tsx
|
|
4401
4664
|
var import_material30 = require("@mui/material");
|
|
4402
|
-
var
|
|
4665
|
+
var import_react18 = require("react");
|
|
4403
4666
|
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
4404
4667
|
var svgCache = /* @__PURE__ */ new Map();
|
|
4668
|
+
function iconStateFor(url, transform) {
|
|
4669
|
+
const cached = url ? svgCache.get(url) : void 0;
|
|
4670
|
+
return {
|
|
4671
|
+
url,
|
|
4672
|
+
svgContent: cached ? transform(cached.innerContent) : null,
|
|
4673
|
+
svgViewBox: cached?.viewBox ?? null,
|
|
4674
|
+
loading: !!url && !cached,
|
|
4675
|
+
error: url ? null : "No URL provided"
|
|
4676
|
+
};
|
|
4677
|
+
}
|
|
4405
4678
|
function clearDynamicSvgIconCache() {
|
|
4406
4679
|
svgCache.clear();
|
|
4407
4680
|
}
|
|
@@ -4411,67 +4684,57 @@ function applyCurrentColor(svg) {
|
|
|
4411
4684
|
function useDynamicSvgIcon(url, options = {}) {
|
|
4412
4685
|
const { replaceColors = false, onLoad, onError } = options;
|
|
4413
4686
|
const transform = replaceColors ? applyCurrentColor : (s) => s;
|
|
4414
|
-
const [
|
|
4415
|
-
|
|
4416
|
-
|
|
4417
|
-
}
|
|
4418
|
-
|
|
4419
|
-
|
|
4420
|
-
|
|
4421
|
-
});
|
|
4422
|
-
const [loading, setLoading] = (0, import_react19.useState)(() => !svgCache.has(url));
|
|
4423
|
-
const [error, setError] = (0, import_react19.useState)(null);
|
|
4424
|
-
(0, import_react19.useEffect)(() => {
|
|
4425
|
-
if (!url) {
|
|
4426
|
-
setLoading(false);
|
|
4427
|
-
setError("No URL provided");
|
|
4428
|
-
setSvgContent(null);
|
|
4429
|
-
setSvgViewBox(null);
|
|
4430
|
-
return;
|
|
4431
|
-
}
|
|
4432
|
-
let cancelled = false;
|
|
4433
|
-
const cached = svgCache.get(url);
|
|
4434
|
-
if (cached) {
|
|
4435
|
-
setSvgContent(transform(cached.innerContent));
|
|
4436
|
-
setSvgViewBox(cached.viewBox);
|
|
4437
|
-
setLoading(false);
|
|
4438
|
-
setError(null);
|
|
4687
|
+
const [state, setState] = (0, import_react18.useState)(() => iconStateFor(url, transform));
|
|
4688
|
+
if (state.url !== url) {
|
|
4689
|
+
setState(iconStateFor(url, transform));
|
|
4690
|
+
}
|
|
4691
|
+
(0, import_react18.useEffect)(() => {
|
|
4692
|
+
if (!url) return;
|
|
4693
|
+
if (!state.loading) {
|
|
4439
4694
|
onLoad?.();
|
|
4440
4695
|
return;
|
|
4441
4696
|
}
|
|
4442
|
-
|
|
4443
|
-
setError(null);
|
|
4444
|
-
setSvgContent(null);
|
|
4445
|
-
setSvgViewBox(null);
|
|
4697
|
+
let cancelled = false;
|
|
4446
4698
|
(async () => {
|
|
4447
4699
|
try {
|
|
4448
|
-
|
|
4449
|
-
if (!
|
|
4450
|
-
|
|
4451
|
-
|
|
4452
|
-
|
|
4453
|
-
|
|
4454
|
-
|
|
4455
|
-
|
|
4456
|
-
|
|
4457
|
-
|
|
4700
|
+
let entry = svgCache.get(url);
|
|
4701
|
+
if (!entry) {
|
|
4702
|
+
const response = await fetch(url);
|
|
4703
|
+
if (!response.ok) {
|
|
4704
|
+
throw new Error(
|
|
4705
|
+
`Failed to fetch SVG: ${response.status} ${response.statusText}`
|
|
4706
|
+
);
|
|
4707
|
+
}
|
|
4708
|
+
const contentType = response.headers.get("content-type") ?? "";
|
|
4709
|
+
const text = await response.text();
|
|
4710
|
+
if (!text.includes("<svg") && !contentType.includes("svg")) {
|
|
4711
|
+
throw new Error("Response is not an SVG");
|
|
4712
|
+
}
|
|
4713
|
+
const viewBoxMatch = text.match(/viewBox="([^"]*)"/);
|
|
4714
|
+
const viewBox = viewBoxMatch ? viewBoxMatch[1] : null;
|
|
4715
|
+
const svgMatch = text.match(/<svg[^>]*>([\s\S]*?)<\/svg>/);
|
|
4716
|
+
const innerContent = svgMatch ? svgMatch[1] : text;
|
|
4717
|
+
entry = { innerContent, viewBox };
|
|
4718
|
+
svgCache.set(url, entry);
|
|
4458
4719
|
}
|
|
4459
|
-
const viewBoxMatch = text.match(/viewBox="([^"]*)"/);
|
|
4460
|
-
const viewBox = viewBoxMatch ? viewBoxMatch[1] : null;
|
|
4461
|
-
const svgMatch = text.match(/<svg[^>]*>([\s\S]*?)<\/svg>/);
|
|
4462
|
-
const innerContent = svgMatch ? svgMatch[1] : text;
|
|
4463
|
-
svgCache.set(url, { innerContent, viewBox });
|
|
4464
4720
|
if (!cancelled) {
|
|
4465
|
-
|
|
4466
|
-
|
|
4467
|
-
|
|
4721
|
+
const { innerContent, viewBox } = entry;
|
|
4722
|
+
setState(
|
|
4723
|
+
(prev) => prev.url === url ? {
|
|
4724
|
+
...prev,
|
|
4725
|
+
svgContent: transform(innerContent),
|
|
4726
|
+
svgViewBox: viewBox,
|
|
4727
|
+
loading: false
|
|
4728
|
+
} : prev
|
|
4729
|
+
);
|
|
4468
4730
|
onLoad?.();
|
|
4469
4731
|
}
|
|
4470
4732
|
} catch (err) {
|
|
4471
4733
|
if (!cancelled) {
|
|
4472
4734
|
const message = err instanceof Error ? err.message : "Failed to load SVG";
|
|
4473
|
-
|
|
4474
|
-
|
|
4735
|
+
setState(
|
|
4736
|
+
(prev) => prev.url === url ? { ...prev, error: message, loading: false } : prev
|
|
4737
|
+
);
|
|
4475
4738
|
onError?.(message);
|
|
4476
4739
|
}
|
|
4477
4740
|
}
|
|
@@ -4480,6 +4743,7 @@ function useDynamicSvgIcon(url, options = {}) {
|
|
|
4480
4743
|
cancelled = true;
|
|
4481
4744
|
};
|
|
4482
4745
|
}, [url]);
|
|
4746
|
+
const { loading, error, svgContent, svgViewBox } = state;
|
|
4483
4747
|
return { loading, error, svgContent, svgViewBox };
|
|
4484
4748
|
}
|
|
4485
4749
|
var DEFAULT_SIZE2 = 24;
|
|
@@ -4537,11 +4801,7 @@ function DynamicSvgIcon({
|
|
|
4537
4801
|
{
|
|
4538
4802
|
...svgIconProps,
|
|
4539
4803
|
...svgViewBox && { viewBox: svgViewBox },
|
|
4540
|
-
sx: {
|
|
4541
|
-
...typeof sx === "object" && sx !== null && !Array.isArray(sx) ? sx : void 0,
|
|
4542
|
-
width,
|
|
4543
|
-
height
|
|
4544
|
-
},
|
|
4804
|
+
sx: mergeSx(sx, { width, height }),
|
|
4545
4805
|
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("g", { dangerouslySetInnerHTML: { __html: svgContent } })
|
|
4546
4806
|
}
|
|
4547
4807
|
);
|
|
@@ -4556,11 +4816,7 @@ function DynamicSvgIcon({
|
|
|
4556
4816
|
BiampBannerActions,
|
|
4557
4817
|
BiampBannerContent,
|
|
4558
4818
|
BiampBannerIcon,
|
|
4559
|
-
BiampBuildAppContent,
|
|
4560
|
-
BiampBuildAppContentItem,
|
|
4561
4819
|
BiampCheckboxListPopover,
|
|
4562
|
-
BiampEndUserAppContent,
|
|
4563
|
-
BiampEndUserAppContentItem,
|
|
4564
4820
|
BiampGlobalSearch,
|
|
4565
4821
|
BiampHeader,
|
|
4566
4822
|
BiampHeaderActions,
|