@natoora-libs/core 0.1.18-dev-doug-1 → 0.1.18-dev-doug-3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/index.cjs +150 -115
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.cts +14 -3
- package/dist/components/index.d.ts +14 -3
- package/dist/components/index.js +189 -157
- package/dist/components/index.js.map +1 -1
- package/package.json +1 -1
package/dist/components/index.js
CHANGED
|
@@ -458,7 +458,17 @@ var AppLabel = ({ appName }) => {
|
|
|
458
458
|
var AppLabel_default = AppLabel;
|
|
459
459
|
|
|
460
460
|
// src/components/AutocompleteFilterMenuContent/AutocompleteFilterMenuContent.tsx
|
|
461
|
-
import
|
|
461
|
+
import CheckIcon2 from "@mui/icons-material/Check";
|
|
462
|
+
import { Box as Box7, Button as Button4, Chip as Chip2, Divider, Skeleton, Tooltip as Tooltip4, Typography as Typography4 } from "@mui/material";
|
|
463
|
+
|
|
464
|
+
// src/utils/resolveObjectType.ts
|
|
465
|
+
var resolveObjectType = (object, fieldName) => {
|
|
466
|
+
if (!object || typeof object !== "object") {
|
|
467
|
+
return object;
|
|
468
|
+
}
|
|
469
|
+
;
|
|
470
|
+
return object[fieldName] ?? "";
|
|
471
|
+
};
|
|
462
472
|
|
|
463
473
|
// src/components/Buttons/ExtendedButton/ExtendedButton.tsx
|
|
464
474
|
import { memo as memo2 } from "react";
|
|
@@ -642,15 +652,6 @@ var ExtendedButton_default = memo2(ExtendedButton);
|
|
|
642
652
|
import CheckIcon from "@mui/icons-material/Check";
|
|
643
653
|
import { Box as Box5, Checkbox, Tooltip as Tooltip3 } from "@mui/material";
|
|
644
654
|
|
|
645
|
-
// src/utils/resolveObjectType.ts
|
|
646
|
-
var resolveObjectType = (object, fieldName) => {
|
|
647
|
-
if (!object || typeof object !== "object") {
|
|
648
|
-
return object;
|
|
649
|
-
}
|
|
650
|
-
;
|
|
651
|
-
return object[fieldName] ?? "";
|
|
652
|
-
};
|
|
653
|
-
|
|
654
655
|
// src/components/DynamicOverflowTooltip/DynamicOverflowTooltip.tsx
|
|
655
656
|
import { useRef } from "react";
|
|
656
657
|
import { Box as Box4, Tooltip as Tooltip2 } from "@mui/material";
|
|
@@ -675,6 +676,7 @@ var useCheckOverflow = ({
|
|
|
675
676
|
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
676
677
|
var DynamicOverflowTooltip = ({
|
|
677
678
|
arrow = false,
|
|
679
|
+
maxWidth = "auto",
|
|
678
680
|
children,
|
|
679
681
|
tooltipDescription
|
|
680
682
|
}) => {
|
|
@@ -690,6 +692,7 @@ var DynamicOverflowTooltip = ({
|
|
|
690
692
|
{
|
|
691
693
|
ref,
|
|
692
694
|
sx: {
|
|
695
|
+
maxWidth,
|
|
693
696
|
overflowX: "hidden",
|
|
694
697
|
whiteSpace: "nowrap",
|
|
695
698
|
textOverflow: "ellipsis"
|
|
@@ -739,11 +742,12 @@ var FilterOptionsCheckboxes = ({
|
|
|
739
742
|
Box5,
|
|
740
743
|
{
|
|
741
744
|
sx: {
|
|
745
|
+
maxWidth,
|
|
746
|
+
gap: 2,
|
|
747
|
+
flexGrow: 1,
|
|
742
748
|
display: "flex",
|
|
743
749
|
alignItems: "center",
|
|
744
|
-
justifyContent: "space-between"
|
|
745
|
-
maxWidth,
|
|
746
|
-
flexGrow: 1
|
|
750
|
+
justifyContent: "space-between"
|
|
747
751
|
},
|
|
748
752
|
children: [
|
|
749
753
|
/* @__PURE__ */ jsx8(DynamicOverflowTooltip, { tooltipDescription: String(filterLabel), arrow: true, children: filterLabel }),
|
|
@@ -784,10 +788,11 @@ var SearchFieldDebounced = ({
|
|
|
784
788
|
}
|
|
785
789
|
;
|
|
786
790
|
debounceRef.current = window.setTimeout(() => {
|
|
787
|
-
|
|
791
|
+
const trimmedInput = input.trim();
|
|
792
|
+
if (trimmedInput.length < minCharacters) {
|
|
788
793
|
return;
|
|
789
794
|
}
|
|
790
|
-
onSearch(
|
|
795
|
+
onSearch(trimmedInput);
|
|
791
796
|
}, debounceDelay);
|
|
792
797
|
};
|
|
793
798
|
useEffect2(() => {
|
|
@@ -824,19 +829,40 @@ var SearchFieldDebounced = ({
|
|
|
824
829
|
|
|
825
830
|
// src/components/AutocompleteFilterMenuContent/AutocompleteFilterMenuContent.tsx
|
|
826
831
|
import { Fragment, jsx as jsx10, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
827
|
-
var MAX_HEIGHT = 500;
|
|
828
832
|
var AutocompleteFilterMenuContent = ({
|
|
833
|
+
columnId,
|
|
834
|
+
labelFieldName,
|
|
829
835
|
selectedFilterOptions,
|
|
836
|
+
isLoading = false,
|
|
837
|
+
maxWidth = 208,
|
|
838
|
+
maxHeight = 500,
|
|
830
839
|
onFilterOptionChange,
|
|
831
840
|
onApplyFiltersClick,
|
|
832
841
|
shouldShowCheckOnFilter,
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
filterOptions,
|
|
836
|
-
fieldName: labelFieldName = "",
|
|
837
|
-
id: columnId
|
|
838
|
-
}
|
|
842
|
+
onAutocompleteFilterChange,
|
|
843
|
+
filterOptions
|
|
839
844
|
}) => {
|
|
845
|
+
const renderLoading = () => /* @__PURE__ */ jsx10(Skeleton, { variant: "rounded", height: 26, sx: { m: 1 } });
|
|
846
|
+
const renderOptions = () => filterOptions?.length ? /* @__PURE__ */ jsx10(
|
|
847
|
+
FilterOptionsCheckboxes,
|
|
848
|
+
{
|
|
849
|
+
columnId,
|
|
850
|
+
maxWidth,
|
|
851
|
+
labelFieldName,
|
|
852
|
+
filterOptions,
|
|
853
|
+
selectedFilterOptions,
|
|
854
|
+
onFilterOptionChange,
|
|
855
|
+
shouldShowCheckOnFilter
|
|
856
|
+
}
|
|
857
|
+
) : /* @__PURE__ */ jsx10(
|
|
858
|
+
Typography4,
|
|
859
|
+
{
|
|
860
|
+
variant: "body2",
|
|
861
|
+
color: "textSecondary",
|
|
862
|
+
sx: { p: 1, maxWidth: 260 },
|
|
863
|
+
children: "Start searching (minimum 3 characters) to view the results."
|
|
864
|
+
}
|
|
865
|
+
);
|
|
840
866
|
return /* @__PURE__ */ jsxs6(Box7, { sx: { display: "flex", flexDirection: "column" }, children: [
|
|
841
867
|
/* @__PURE__ */ jsx10(
|
|
842
868
|
SearchFieldDebounced,
|
|
@@ -854,9 +880,9 @@ var AutocompleteFilterMenuContent = ({
|
|
|
854
880
|
Box7,
|
|
855
881
|
{
|
|
856
882
|
sx: {
|
|
883
|
+
maxHeight,
|
|
857
884
|
display: "flex",
|
|
858
885
|
flexDirection: "column",
|
|
859
|
-
maxHeight: MAX_HEIGHT,
|
|
860
886
|
overflowX: "hidden",
|
|
861
887
|
"&::-webkit-scrollbar": {
|
|
862
888
|
width: "8px",
|
|
@@ -875,38 +901,51 @@ var AutocompleteFilterMenuContent = ({
|
|
|
875
901
|
},
|
|
876
902
|
children: [
|
|
877
903
|
selectedFilterOptions.length ? /* @__PURE__ */ jsxs6(Fragment, { children: [
|
|
878
|
-
/* @__PURE__ */ jsx10(
|
|
879
|
-
|
|
904
|
+
/* @__PURE__ */ jsx10(
|
|
905
|
+
Box7,
|
|
880
906
|
{
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
907
|
+
sx: {
|
|
908
|
+
px: 1,
|
|
909
|
+
pt: 1,
|
|
910
|
+
pb: 0.5,
|
|
911
|
+
gap: 1,
|
|
912
|
+
display: "flex",
|
|
913
|
+
flexDirection: "column"
|
|
914
|
+
},
|
|
915
|
+
children: selectedFilterOptions?.map((option) => {
|
|
916
|
+
const filterId = resolveObjectType(option, "id");
|
|
917
|
+
const filterLabel = resolveObjectType(option, labelFieldName);
|
|
918
|
+
return /* @__PURE__ */ jsxs6(
|
|
919
|
+
Box7,
|
|
920
|
+
{
|
|
921
|
+
sx: {
|
|
922
|
+
pl: 1,
|
|
923
|
+
pr: 1.25,
|
|
924
|
+
flexGrow: 1,
|
|
925
|
+
display: "flex",
|
|
926
|
+
alignItems: "center",
|
|
927
|
+
justifyContent: "space-between"
|
|
928
|
+
},
|
|
929
|
+
children: [
|
|
930
|
+
/* @__PURE__ */ jsx10(Box7, { sx: { maxWidth }, children: /* @__PURE__ */ jsx10(
|
|
931
|
+
Chip2,
|
|
932
|
+
{
|
|
933
|
+
size: "small",
|
|
934
|
+
label: filterLabel,
|
|
935
|
+
onDelete: () => onFilterOptionChange(option)
|
|
936
|
+
}
|
|
937
|
+
) }),
|
|
938
|
+
shouldShowCheckOnFilter?.(columnId, option) ? /* @__PURE__ */ jsx10(Tooltip4, { title: "This filter is saved as default", children: /* @__PURE__ */ jsx10(CheckIcon2, { fontSize: "small", color: "action" }) }) : null
|
|
939
|
+
]
|
|
940
|
+
},
|
|
941
|
+
filterId
|
|
942
|
+
);
|
|
943
|
+
})
|
|
887
944
|
}
|
|
888
|
-
)
|
|
945
|
+
),
|
|
889
946
|
/* @__PURE__ */ jsx10(Divider, { sx: { my: 0.5 } })
|
|
890
947
|
] }) : null,
|
|
891
|
-
/* @__PURE__ */ jsx10(Box7, { sx: { p: 1 }, children:
|
|
892
|
-
Typography4,
|
|
893
|
-
{
|
|
894
|
-
variant: "body2",
|
|
895
|
-
color: "textSecondary",
|
|
896
|
-
sx: { p: 1, maxWidth: 260 },
|
|
897
|
-
children: "Start searching (minimum 3 characters) to view the results."
|
|
898
|
-
}
|
|
899
|
-
) : /* @__PURE__ */ jsx10(
|
|
900
|
-
FilterOptionsCheckboxes,
|
|
901
|
-
{
|
|
902
|
-
columnId,
|
|
903
|
-
labelFieldName,
|
|
904
|
-
filterOptions,
|
|
905
|
-
selectedFilterOptions,
|
|
906
|
-
onFilterOptionChange,
|
|
907
|
-
shouldShowCheckOnFilter
|
|
908
|
-
}
|
|
909
|
-
) })
|
|
948
|
+
/* @__PURE__ */ jsx10(Box7, { sx: { p: 1 }, children: isLoading ? renderLoading() : renderOptions() })
|
|
910
949
|
]
|
|
911
950
|
}
|
|
912
951
|
),
|
|
@@ -3174,22 +3213,32 @@ function ActionButton(props) {
|
|
|
3174
3213
|
}
|
|
3175
3214
|
|
|
3176
3215
|
// src/components/CheckboxFilterMenuContent/CheckboxFilterMenuContent.tsx
|
|
3177
|
-
import { Box as Box12, Button as Button12, Checkbox as Checkbox2, Divider as Divider2, FormControlLabel, Tooltip as Tooltip6, Typography as Typography8 } from "@mui/material";
|
|
3216
|
+
import { Box as Box12, Button as Button12, Checkbox as Checkbox2, Divider as Divider2, FormControlLabel, Skeleton as Skeleton2, Tooltip as Tooltip6, Typography as Typography8 } from "@mui/material";
|
|
3178
3217
|
import { jsx as jsx71, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
3179
|
-
var MAX_HEIGHT2 = 500;
|
|
3180
3218
|
var CheckboxFilterMenuContent = ({
|
|
3219
|
+
columnId,
|
|
3220
|
+
labelFieldName,
|
|
3221
|
+
isLoading = false,
|
|
3181
3222
|
selectedFilterOptions,
|
|
3182
3223
|
filterOptions,
|
|
3224
|
+
maxHeight = 500,
|
|
3225
|
+
width = 276,
|
|
3183
3226
|
shouldShowCheckOnFilter,
|
|
3184
3227
|
onSelectAllChange,
|
|
3185
3228
|
onFilterOptionChange,
|
|
3186
|
-
onApplyFiltersClick
|
|
3187
|
-
headCell: {
|
|
3188
|
-
id: columnId,
|
|
3189
|
-
fieldName: labelFieldName = ""
|
|
3190
|
-
}
|
|
3229
|
+
onApplyFiltersClick
|
|
3191
3230
|
}) => {
|
|
3192
|
-
|
|
3231
|
+
const renderLoading = () => /* @__PURE__ */ jsxs40(Box12, { "data-testid": "loading-skeletons", sx: { width }, children: [
|
|
3232
|
+
/* @__PURE__ */ jsx71(Skeleton2, { variant: "rounded", height: 24, sx: { m: 1 } }),
|
|
3233
|
+
/* @__PURE__ */ jsx71(Divider2, {}),
|
|
3234
|
+
/* @__PURE__ */ jsx71(Skeleton2, { variant: "rounded", height: 24, sx: { m: 1 } }),
|
|
3235
|
+
/* @__PURE__ */ jsx71(Skeleton2, { variant: "rounded", height: 24, sx: { m: 1 } }),
|
|
3236
|
+
/* @__PURE__ */ jsx71(Skeleton2, { variant: "rounded", height: 24, sx: { m: 1 } }),
|
|
3237
|
+
/* @__PURE__ */ jsx71(Skeleton2, { variant: "rounded", height: 24, sx: { m: 1 } }),
|
|
3238
|
+
/* @__PURE__ */ jsx71(Divider2, {}),
|
|
3239
|
+
/* @__PURE__ */ jsx71(Skeleton2, { variant: "rounded", height: 24, sx: { m: 1 } })
|
|
3240
|
+
] });
|
|
3241
|
+
const renderContent = () => /* @__PURE__ */ jsxs40(Box12, { sx: { display: "flex", flexDirection: "column" }, children: [
|
|
3193
3242
|
/* @__PURE__ */ jsx71(Box12, { sx: { px: 2, pt: 1 }, children: /* @__PURE__ */ jsx71(
|
|
3194
3243
|
FormControlLabel,
|
|
3195
3244
|
{
|
|
@@ -3234,17 +3283,9 @@ var CheckboxFilterMenuContent = ({
|
|
|
3234
3283
|
sx: {
|
|
3235
3284
|
pl: 0.5,
|
|
3236
3285
|
pr: 2,
|
|
3237
|
-
maxHeight
|
|
3286
|
+
maxHeight
|
|
3238
3287
|
},
|
|
3239
|
-
children:
|
|
3240
|
-
Typography8,
|
|
3241
|
-
{
|
|
3242
|
-
variant: "body2",
|
|
3243
|
-
color: "textSecondary",
|
|
3244
|
-
sx: { py: 1, px: 2 },
|
|
3245
|
-
children: "No options available."
|
|
3246
|
-
}
|
|
3247
|
-
) : /* @__PURE__ */ jsx71(
|
|
3288
|
+
children: filterOptions?.length ? /* @__PURE__ */ jsx71(
|
|
3248
3289
|
FilterOptionsCheckboxes,
|
|
3249
3290
|
{
|
|
3250
3291
|
columnId,
|
|
@@ -3254,6 +3295,14 @@ var CheckboxFilterMenuContent = ({
|
|
|
3254
3295
|
onFilterOptionChange,
|
|
3255
3296
|
shouldShowCheckOnFilter
|
|
3256
3297
|
}
|
|
3298
|
+
) : /* @__PURE__ */ jsx71(
|
|
3299
|
+
Typography8,
|
|
3300
|
+
{
|
|
3301
|
+
variant: "body2",
|
|
3302
|
+
color: "textSecondary",
|
|
3303
|
+
sx: { py: 1, px: 2 },
|
|
3304
|
+
children: "No options available."
|
|
3305
|
+
}
|
|
3257
3306
|
)
|
|
3258
3307
|
}
|
|
3259
3308
|
)
|
|
@@ -3294,6 +3343,10 @@ var CheckboxFilterMenuContent = ({
|
|
|
3294
3343
|
}
|
|
3295
3344
|
)
|
|
3296
3345
|
] });
|
|
3346
|
+
if (isLoading) {
|
|
3347
|
+
return renderLoading();
|
|
3348
|
+
}
|
|
3349
|
+
return renderContent();
|
|
3297
3350
|
};
|
|
3298
3351
|
|
|
3299
3352
|
// src/components/CompanyLogo/CompanyLogo.tsx
|
|
@@ -4005,7 +4058,7 @@ var ControlledValidTextInput_default = ControlledValidTextInput;
|
|
|
4005
4058
|
|
|
4006
4059
|
// src/components/DataGrid/DataGrid.tsx
|
|
4007
4060
|
import { useState as useState4 } from "react";
|
|
4008
|
-
import { Paper as Paper2, Skeleton } from "@mui/material";
|
|
4061
|
+
import { Paper as Paper2, Skeleton as Skeleton3 } from "@mui/material";
|
|
4009
4062
|
import { DataGrid as MUIDataGrid } from "@mui/x-data-grid";
|
|
4010
4063
|
import { makeStyles as makeStyles21 } from "tss-react/mui";
|
|
4011
4064
|
import { Fragment as Fragment2, jsx as jsx80, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
@@ -4063,7 +4116,7 @@ var DataGrid = ({
|
|
|
4063
4116
|
height: height || rows.length * rowHeight + headerAndFooterHeight
|
|
4064
4117
|
},
|
|
4065
4118
|
children: /* @__PURE__ */ jsx80(Paper2, { className: classes.paper, children: isLoading ? /* @__PURE__ */ jsx80("div", { children: [...Array(Math.floor(10))].map((i) => /* @__PURE__ */ jsx80(
|
|
4066
|
-
|
|
4119
|
+
Skeleton3,
|
|
4067
4120
|
{
|
|
4068
4121
|
animation: "pulse",
|
|
4069
4122
|
style: { margin: "8px", opacity: 0.4 },
|
|
@@ -4737,7 +4790,7 @@ function VirtualizedList(props) {
|
|
|
4737
4790
|
|
|
4738
4791
|
// src/components/LocationsSectionInfo/LocationsSectionInfo.tsx
|
|
4739
4792
|
import { Fragment as Fragment8 } from "react";
|
|
4740
|
-
import { Box as Box22, Chip as
|
|
4793
|
+
import { Box as Box22, Chip as Chip3, Typography as Typography16 } from "@mui/material";
|
|
4741
4794
|
import { purple } from "@mui/material/colors";
|
|
4742
4795
|
import classNames2 from "classnames";
|
|
4743
4796
|
import { makeStyles as makeStyles29 } from "tss-react/mui";
|
|
@@ -4789,7 +4842,7 @@ var LocationsSectionInfo = ({
|
|
|
4789
4842
|
};
|
|
4790
4843
|
return /* @__PURE__ */ jsxs55(Box22, { className: classes.container, children: [
|
|
4791
4844
|
/* @__PURE__ */ jsx91(
|
|
4792
|
-
|
|
4845
|
+
Chip3,
|
|
4793
4846
|
{
|
|
4794
4847
|
className: classNames2(classes.defaultChip, {
|
|
4795
4848
|
[classes.stockChip]: isStock,
|
|
@@ -6991,14 +7044,11 @@ var Switch_default = memo19(LabelledSwitch);
|
|
|
6991
7044
|
// src/components/SmartTableHeaderFilterMenu/SmartTableHeaderFilterMenu.tsx
|
|
6992
7045
|
import { useMemo as useMemo2, useState as useState16, useEffect as useEffect11, memo as memo20 } from "react";
|
|
6993
7046
|
import {
|
|
6994
|
-
|
|
6995
|
-
Divider as Divider11,
|
|
6996
|
-
Menu as Menu4,
|
|
6997
|
-
Skeleton as Skeleton2
|
|
7047
|
+
Menu as Menu4
|
|
6998
7048
|
} from "@mui/material";
|
|
6999
7049
|
import classNames3 from "classnames";
|
|
7000
7050
|
import { Fragment as Fragment12, jsx as jsx113, jsxs as jsxs76 } from "react/jsx-runtime";
|
|
7001
|
-
var MAX_WIDTH =
|
|
7051
|
+
var MAX_WIDTH = 276;
|
|
7002
7052
|
var findFilterIndex = (filters, filterOption) => filters.findIndex((item) => {
|
|
7003
7053
|
if (typeof item === "string" && typeof filterOption === "string") {
|
|
7004
7054
|
return item === filterOption;
|
|
@@ -7070,50 +7120,6 @@ var SmartTableHeaderFilterMenu = memo20(({
|
|
|
7070
7120
|
useEffect11(() => {
|
|
7071
7121
|
setSelectedFilterOptions(headerFilters[headCell.id] ?? []);
|
|
7072
7122
|
}, [headerFilters, headCell.id]);
|
|
7073
|
-
const renderLoadingSkeletons = /* @__PURE__ */ jsxs76(Box32, { "data-testid": "loading-skeletons", sx: { width: MAX_WIDTH }, children: [
|
|
7074
|
-
/* @__PURE__ */ jsx113(Skeleton2, { variant: "rounded", height: 24, sx: { m: 1 } }),
|
|
7075
|
-
/* @__PURE__ */ jsx113(Divider11, {}),
|
|
7076
|
-
/* @__PURE__ */ jsx113(Skeleton2, { variant: "rounded", height: 24, sx: { m: 1 } }),
|
|
7077
|
-
/* @__PURE__ */ jsx113(Skeleton2, { variant: "rounded", height: 24, sx: { m: 1 } }),
|
|
7078
|
-
/* @__PURE__ */ jsx113(Skeleton2, { variant: "rounded", height: 24, sx: { m: 1 } }),
|
|
7079
|
-
/* @__PURE__ */ jsx113(Skeleton2, { variant: "rounded", height: 24, sx: { m: 1 } }),
|
|
7080
|
-
/* @__PURE__ */ jsx113(Divider11, {}),
|
|
7081
|
-
/* @__PURE__ */ jsx113(Skeleton2, { variant: "rounded", height: 24, sx: { m: 1 } })
|
|
7082
|
-
] });
|
|
7083
|
-
const renderMenuContent = useMemo2(() => {
|
|
7084
|
-
if (headCell.isAutocompleteFilterMenu) {
|
|
7085
|
-
return /* @__PURE__ */ jsx113(
|
|
7086
|
-
AutocompleteFilterMenuContent,
|
|
7087
|
-
{
|
|
7088
|
-
headCell,
|
|
7089
|
-
selectedFilterOptions,
|
|
7090
|
-
onFilterOptionChange: handleFilterOptionChange,
|
|
7091
|
-
onApplyFiltersClick: handleApplyFiltersClick,
|
|
7092
|
-
shouldShowCheckOnFilter
|
|
7093
|
-
}
|
|
7094
|
-
);
|
|
7095
|
-
}
|
|
7096
|
-
return /* @__PURE__ */ jsx113(
|
|
7097
|
-
CheckboxFilterMenuContent,
|
|
7098
|
-
{
|
|
7099
|
-
headCell,
|
|
7100
|
-
selectedFilterOptions,
|
|
7101
|
-
filterOptions: filterOptionsData ?? [],
|
|
7102
|
-
onSelectAllChange: handleSelectAllChange,
|
|
7103
|
-
onFilterOptionChange: handleFilterOptionChange,
|
|
7104
|
-
onApplyFiltersClick: handleApplyFiltersClick,
|
|
7105
|
-
shouldShowCheckOnFilter
|
|
7106
|
-
}
|
|
7107
|
-
);
|
|
7108
|
-
}, [
|
|
7109
|
-
headCell,
|
|
7110
|
-
selectedFilterOptions,
|
|
7111
|
-
handleFilterOptionChange,
|
|
7112
|
-
handleApplyFiltersClick,
|
|
7113
|
-
shouldShowCheckOnFilter,
|
|
7114
|
-
filterOptionsData,
|
|
7115
|
-
handleSelectAllChange
|
|
7116
|
-
]);
|
|
7117
7123
|
return /* @__PURE__ */ jsxs76(Fragment12, { children: [
|
|
7118
7124
|
/* @__PURE__ */ jsx113(
|
|
7119
7125
|
ActiveFiltersIconButton,
|
|
@@ -7139,7 +7145,33 @@ var SmartTableHeaderFilterMenu = memo20(({
|
|
|
7139
7145
|
},
|
|
7140
7146
|
anchorOrigin: { vertical: "bottom", horizontal: "right" },
|
|
7141
7147
|
transformOrigin: { vertical: "top", horizontal: "right" },
|
|
7142
|
-
children: headCell.
|
|
7148
|
+
children: headCell.isAutocompleteFilterMenu ? /* @__PURE__ */ jsx113(
|
|
7149
|
+
AutocompleteFilterMenuContent,
|
|
7150
|
+
{
|
|
7151
|
+
columnId: headCell.id,
|
|
7152
|
+
labelFieldName: headCell.fieldName ?? "",
|
|
7153
|
+
isLoading: headCell.isFetchingFilterOptions,
|
|
7154
|
+
filterOptions: headCell.filterOptions,
|
|
7155
|
+
onAutocompleteFilterChange: headCell.onAutocompleteFilterChange,
|
|
7156
|
+
selectedFilterOptions,
|
|
7157
|
+
onFilterOptionChange: handleFilterOptionChange,
|
|
7158
|
+
onApplyFiltersClick: handleApplyFiltersClick,
|
|
7159
|
+
shouldShowCheckOnFilter
|
|
7160
|
+
}
|
|
7161
|
+
) : /* @__PURE__ */ jsx113(
|
|
7162
|
+
CheckboxFilterMenuContent,
|
|
7163
|
+
{
|
|
7164
|
+
columnId: headCell.id,
|
|
7165
|
+
labelFieldName: headCell.fieldName ?? "",
|
|
7166
|
+
isLoading: headCell.isFetchingFilterOptions,
|
|
7167
|
+
selectedFilterOptions,
|
|
7168
|
+
filterOptions: filterOptionsData ?? [],
|
|
7169
|
+
onSelectAllChange: handleSelectAllChange,
|
|
7170
|
+
onFilterOptionChange: handleFilterOptionChange,
|
|
7171
|
+
onApplyFiltersClick: handleApplyFiltersClick,
|
|
7172
|
+
shouldShowCheckOnFilter
|
|
7173
|
+
}
|
|
7174
|
+
)
|
|
7143
7175
|
}
|
|
7144
7176
|
)
|
|
7145
7177
|
] });
|
|
@@ -7148,7 +7180,7 @@ var SmartTableHeaderFilterMenu = memo20(({
|
|
|
7148
7180
|
// src/components/SmartTableHeader/SmartTableHeader.tsx
|
|
7149
7181
|
import { memo as memo21 } from "react";
|
|
7150
7182
|
import {
|
|
7151
|
-
Box as
|
|
7183
|
+
Box as Box32,
|
|
7152
7184
|
Checkbox as Checkbox6,
|
|
7153
7185
|
TableCell,
|
|
7154
7186
|
TableHead,
|
|
@@ -7218,7 +7250,7 @@ var SmartTableHeader = memo21(({
|
|
|
7218
7250
|
}
|
|
7219
7251
|
},
|
|
7220
7252
|
children: /* @__PURE__ */ jsxs77(
|
|
7221
|
-
|
|
7253
|
+
Box32,
|
|
7222
7254
|
{
|
|
7223
7255
|
display: "flex",
|
|
7224
7256
|
flexDirection: "row",
|
|
@@ -7278,7 +7310,7 @@ var SmartTableHeader = memo21(({
|
|
|
7278
7310
|
var import_debounce = __toESM(require_debounce(), 1);
|
|
7279
7311
|
import { useLayoutEffect, useState as useState17 } from "react";
|
|
7280
7312
|
import {
|
|
7281
|
-
Box as
|
|
7313
|
+
Box as Box34,
|
|
7282
7314
|
Paper as Paper10,
|
|
7283
7315
|
Table as MUITable,
|
|
7284
7316
|
TableBody,
|
|
@@ -7292,13 +7324,13 @@ import { makeStyles as makeStyles45 } from "tss-react/mui";
|
|
|
7292
7324
|
import { v4 as uuidv4 } from "uuid";
|
|
7293
7325
|
|
|
7294
7326
|
// src/components/TableLoading/TableLoading.tsx
|
|
7295
|
-
import { Box as
|
|
7327
|
+
import { Box as Box33, Skeleton as Skeleton4 } from "@mui/material";
|
|
7296
7328
|
import { jsx as jsx115 } from "react/jsx-runtime";
|
|
7297
7329
|
var TableLoading = ({
|
|
7298
7330
|
rowsPerPage,
|
|
7299
7331
|
rowHeight
|
|
7300
|
-
}) => /* @__PURE__ */ jsx115(
|
|
7301
|
-
|
|
7332
|
+
}) => /* @__PURE__ */ jsx115(Box33, { children: Array.from({ length: rowsPerPage ?? 0 }).map((_, index) => /* @__PURE__ */ jsx115(
|
|
7333
|
+
Skeleton4,
|
|
7302
7334
|
{
|
|
7303
7335
|
animation: "pulse",
|
|
7304
7336
|
"data-testid": "table-loading-skeleton",
|
|
@@ -7435,7 +7467,7 @@ var Table = ({
|
|
|
7435
7467
|
}
|
|
7436
7468
|
return rowsComponents;
|
|
7437
7469
|
};
|
|
7438
|
-
return /* @__PURE__ */ jsx116(Paper10, { className: classes.root, children: /* @__PURE__ */ jsx116(
|
|
7470
|
+
return /* @__PURE__ */ jsx116(Paper10, { className: classes.root, children: /* @__PURE__ */ jsx116(Box34, { className: classes.paper, children: isLoading ? /* @__PURE__ */ jsx116(TableLoading_default, { rowHeight, rowsPerPage }) : /* @__PURE__ */ jsx116(TableContainer, { className: classes.container, children: /* @__PURE__ */ jsxs78(MUITable, { size: "medium", stickyHeader: true, children: [
|
|
7439
7471
|
/* @__PURE__ */ jsx116(TableHead2, { className: classes.header, children: /* @__PURE__ */ jsx116(TableRow2, { children: headCells?.map((headCell) => /* @__PURE__ */ jsx116(
|
|
7440
7472
|
TableCell2,
|
|
7441
7473
|
{
|
|
@@ -7472,12 +7504,12 @@ import {
|
|
|
7472
7504
|
Table as Table2,
|
|
7473
7505
|
TableBody as TableBody3,
|
|
7474
7506
|
TableContainer as TableContainer2,
|
|
7475
|
-
Box as
|
|
7507
|
+
Box as Box37
|
|
7476
7508
|
} from "@mui/material";
|
|
7477
7509
|
|
|
7478
7510
|
// src/components/TableDesktopFooter/TableDesktopFooter.tsx
|
|
7479
7511
|
import Refresh3 from "@mui/icons-material/Refresh";
|
|
7480
|
-
import { Box as
|
|
7512
|
+
import { Box as Box35, Button as Button15, MenuItem as MenuItem4, Pagination as Pagination2, Select as Select4, Stack, Typography as Typography28 } from "@mui/material";
|
|
7481
7513
|
import { jsx as jsx117, jsxs as jsxs79 } from "react/jsx-runtime";
|
|
7482
7514
|
var TableDesktopFooter = ({
|
|
7483
7515
|
numPages,
|
|
@@ -7490,7 +7522,7 @@ var TableDesktopFooter = ({
|
|
|
7490
7522
|
isFetching
|
|
7491
7523
|
}) => {
|
|
7492
7524
|
return /* @__PURE__ */ jsxs79(
|
|
7493
|
-
|
|
7525
|
+
Box35,
|
|
7494
7526
|
{
|
|
7495
7527
|
py: 1,
|
|
7496
7528
|
gap: 2,
|
|
@@ -7526,7 +7558,7 @@ var TableDesktopFooter = ({
|
|
|
7526
7558
|
]
|
|
7527
7559
|
}
|
|
7528
7560
|
),
|
|
7529
|
-
/* @__PURE__ */ jsxs79(
|
|
7561
|
+
/* @__PURE__ */ jsxs79(Box35, { display: "flex", children: [
|
|
7530
7562
|
/* @__PURE__ */ jsxs79(Stack, { direction: "row", spacing: 2, alignItems: "center", children: [
|
|
7531
7563
|
/* @__PURE__ */ jsx117(Typography28, { children: "Rows per page:" }),
|
|
7532
7564
|
/* @__PURE__ */ jsx117(
|
|
@@ -7556,7 +7588,7 @@ var TableDesktopFooter = ({
|
|
|
7556
7588
|
};
|
|
7557
7589
|
|
|
7558
7590
|
// src/components/TableDesktopLoadingState/TableDesktopLoadingState.tsx
|
|
7559
|
-
import { Skeleton as
|
|
7591
|
+
import { Skeleton as Skeleton5, TableCell as TableCell3, TableRow as TableRow3 } from "@mui/material";
|
|
7560
7592
|
import { jsx as jsx118 } from "react/jsx-runtime";
|
|
7561
7593
|
var getRange = (n) => Array.from({ length: n }, (_, i) => i + 1);
|
|
7562
7594
|
var TableDesktopLoadingState = ({
|
|
@@ -7566,7 +7598,7 @@ var TableDesktopLoadingState = ({
|
|
|
7566
7598
|
rowHeight
|
|
7567
7599
|
}) => {
|
|
7568
7600
|
return getRange(Math.min(numRows, rowsPerPage)).map((rowNum) => /* @__PURE__ */ jsx118(TableRow3, { children: getRange(numColumns).map((colNum) => /* @__PURE__ */ jsx118(TableCell3, { children: /* @__PURE__ */ jsx118(
|
|
7569
|
-
|
|
7601
|
+
Skeleton5,
|
|
7570
7602
|
{
|
|
7571
7603
|
animation: "pulse",
|
|
7572
7604
|
variant: "rounded",
|
|
@@ -7727,7 +7759,7 @@ var TableDesktopRows = ({
|
|
|
7727
7759
|
};
|
|
7728
7760
|
|
|
7729
7761
|
// src/components/TableDesktopRowSelectionBar/TableDesktopRowSelectionBar.tsx
|
|
7730
|
-
import { Box as
|
|
7762
|
+
import { Box as Box36, Button as Button17, Typography as Typography30 } from "@mui/material";
|
|
7731
7763
|
import { jsx as jsx121, jsxs as jsxs82 } from "react/jsx-runtime";
|
|
7732
7764
|
var TableDesktopRowSelectionBar = ({
|
|
7733
7765
|
isEveryRowInPageSelected,
|
|
@@ -7748,7 +7780,7 @@ var TableDesktopRowSelectionBar = ({
|
|
|
7748
7780
|
return `${numSelectedRows} row${numSelectedRows > 1 ? "s" : ""} selected.`;
|
|
7749
7781
|
};
|
|
7750
7782
|
return isAnyRowSelected ? /* @__PURE__ */ jsxs82(
|
|
7751
|
-
|
|
7783
|
+
Box36,
|
|
7752
7784
|
{
|
|
7753
7785
|
sx: {
|
|
7754
7786
|
p: 1,
|
|
@@ -7990,7 +8022,7 @@ var TableDesktop = ({
|
|
|
7990
8022
|
]
|
|
7991
8023
|
);
|
|
7992
8024
|
return /* @__PURE__ */ jsx123(
|
|
7993
|
-
|
|
8025
|
+
Box37,
|
|
7994
8026
|
{
|
|
7995
8027
|
sx: {
|
|
7996
8028
|
height,
|
|
@@ -8371,14 +8403,14 @@ var TableDesktopEditableField = memo23(TableDesktopEditableFieldComponent);
|
|
|
8371
8403
|
|
|
8372
8404
|
// src/components/TableDesktopCell/TableDesktopCell.tsx
|
|
8373
8405
|
import { useEffect as useEffect14, useState as useState22 } from "react";
|
|
8374
|
-
import
|
|
8406
|
+
import CheckIcon3 from "@mui/icons-material/Check";
|
|
8375
8407
|
import CloseIcon from "@mui/icons-material/Close";
|
|
8376
8408
|
import EditIcon from "@mui/icons-material/Edit";
|
|
8377
8409
|
import { IconButton as IconButton4, TableCell as TableCell6, Tooltip as Tooltip11 } from "@mui/material";
|
|
8378
8410
|
import { Fragment as Fragment14, jsx as jsx128, jsxs as jsxs85 } from "react/jsx-runtime";
|
|
8379
8411
|
var getReadOnlyBooleanIcon = (value) => {
|
|
8380
8412
|
if (value) {
|
|
8381
|
-
return /* @__PURE__ */ jsx128(
|
|
8413
|
+
return /* @__PURE__ */ jsx128(CheckIcon3, { sx: { fontSize: 16 } });
|
|
8382
8414
|
}
|
|
8383
8415
|
return "-";
|
|
8384
8416
|
};
|
|
@@ -8550,7 +8582,7 @@ var TableHeader = ({ cells, onSort = null }) => {
|
|
|
8550
8582
|
var TableHeader_default = memo24(TableHeader);
|
|
8551
8583
|
|
|
8552
8584
|
// src/components/TextDivider/TextDivider.tsx
|
|
8553
|
-
import { Box as
|
|
8585
|
+
import { Box as Box38, Typography as Typography32, Divider as Divider11, Button as Button18 } from "@mui/material";
|
|
8554
8586
|
import { makeStyles as makeStyles48 } from "tss-react/mui";
|
|
8555
8587
|
import { jsx as jsx130, jsxs as jsxs86 } from "react/jsx-runtime";
|
|
8556
8588
|
var useStyles48 = makeStyles48()(() => ({
|
|
@@ -8590,15 +8622,15 @@ var TextDivider = ({
|
|
|
8590
8622
|
const { classes } = useStyles48();
|
|
8591
8623
|
const iconColor = color ?? colors.neutral900;
|
|
8592
8624
|
return /* @__PURE__ */ jsxs86(
|
|
8593
|
-
|
|
8625
|
+
Box38,
|
|
8594
8626
|
{
|
|
8595
8627
|
display: "flex",
|
|
8596
8628
|
alignItems: "center",
|
|
8597
8629
|
justifyContent: "space-between",
|
|
8598
8630
|
className: classes.container,
|
|
8599
8631
|
children: [
|
|
8600
|
-
/* @__PURE__ */ jsx130(
|
|
8601
|
-
/* @__PURE__ */ jsx130(Button18, { onClick, disabled: !onClick, className: classes.button, children: /* @__PURE__ */ jsxs86(
|
|
8632
|
+
/* @__PURE__ */ jsx130(Divider11, { className: classes.leftDivider }),
|
|
8633
|
+
/* @__PURE__ */ jsx130(Button18, { onClick, disabled: !onClick, className: classes.button, children: /* @__PURE__ */ jsxs86(Box38, { className: classes.center, children: [
|
|
8602
8634
|
Icon2 && iconPosition === "left" && /* @__PURE__ */ jsx130(Icon2, { className: classes.icon, style: { color: iconColor } }),
|
|
8603
8635
|
/* @__PURE__ */ jsx130(
|
|
8604
8636
|
Typography32,
|
|
@@ -8611,7 +8643,7 @@ var TextDivider = ({
|
|
|
8611
8643
|
),
|
|
8612
8644
|
Icon2 && iconPosition === "right" && /* @__PURE__ */ jsx130(Icon2, { className: classes.icon, style: { color: iconColor } })
|
|
8613
8645
|
] }) }),
|
|
8614
|
-
/* @__PURE__ */ jsx130(
|
|
8646
|
+
/* @__PURE__ */ jsx130(Divider11, { className: classes.rightDivider })
|
|
8615
8647
|
]
|
|
8616
8648
|
}
|
|
8617
8649
|
);
|
|
@@ -8725,7 +8757,7 @@ var ThemedDateRangePicker_default = ThemedDateRangePicker;
|
|
|
8725
8757
|
|
|
8726
8758
|
// src/components/TheToolbar/TheToolbar.tsx
|
|
8727
8759
|
import { memo as memo25 } from "react";
|
|
8728
|
-
import { AppBar, Box as
|
|
8760
|
+
import { AppBar, Box as Box39, Toolbar } from "@mui/material";
|
|
8729
8761
|
import { makeStyles as makeStyles50 } from "tss-react/mui";
|
|
8730
8762
|
import { jsx as jsx132, jsxs as jsxs87 } from "react/jsx-runtime";
|
|
8731
8763
|
var useStyles50 = makeStyles50()((theme) => ({
|
|
@@ -8747,7 +8779,7 @@ var TheToolbar = ({
|
|
|
8747
8779
|
rightSection
|
|
8748
8780
|
}) => {
|
|
8749
8781
|
const { classes } = useStyles50();
|
|
8750
|
-
return /* @__PURE__ */ jsxs87(
|
|
8782
|
+
return /* @__PURE__ */ jsxs87(Box39, { children: [
|
|
8751
8783
|
/* @__PURE__ */ jsx132(AppBar, { children: /* @__PURE__ */ jsxs87(Toolbar, { className: classes.topBar, children: [
|
|
8752
8784
|
/* @__PURE__ */ jsx132(
|
|
8753
8785
|
RoundButton_default,
|
|
@@ -8767,8 +8799,8 @@ var TheToolbar = ({
|
|
|
8767
8799
|
imageLogoLightSmall
|
|
8768
8800
|
}
|
|
8769
8801
|
),
|
|
8770
|
-
/* @__PURE__ */ jsx132(
|
|
8771
|
-
/* @__PURE__ */ jsx132(
|
|
8802
|
+
/* @__PURE__ */ jsx132(Box39, { ml: 2, children: leftSection }),
|
|
8803
|
+
/* @__PURE__ */ jsx132(Box39, { ml: "auto", children: rightSection })
|
|
8772
8804
|
] }) }),
|
|
8773
8805
|
LeftDrawer
|
|
8774
8806
|
] });
|
|
@@ -8821,8 +8853,8 @@ import {
|
|
|
8821
8853
|
Typography as Typography33,
|
|
8822
8854
|
Dialog as Dialog5,
|
|
8823
8855
|
Backdrop,
|
|
8824
|
-
Box as
|
|
8825
|
-
Divider as
|
|
8856
|
+
Box as Box40,
|
|
8857
|
+
Divider as Divider12,
|
|
8826
8858
|
Paper as Paper12,
|
|
8827
8859
|
Fade as Fade2
|
|
8828
8860
|
} from "@mui/material";
|
|
@@ -8868,9 +8900,9 @@ var TwoButtonDialog = ({
|
|
|
8868
8900
|
BackdropComponent: Backdrop,
|
|
8869
8901
|
BackdropProps: { timeout: 500 },
|
|
8870
8902
|
children: /* @__PURE__ */ jsx134(Fade2, { in: open, children: /* @__PURE__ */ jsxs88(Paper12, { className: classes.paper, children: [
|
|
8871
|
-
/* @__PURE__ */ jsxs88(
|
|
8903
|
+
/* @__PURE__ */ jsxs88(Box40, { className: classes.mb, children: [
|
|
8872
8904
|
/* @__PURE__ */ jsx134(Typography33, { variant: "h5", component: "div", children: /* @__PURE__ */ jsx134(
|
|
8873
|
-
|
|
8905
|
+
Box40,
|
|
8874
8906
|
{
|
|
8875
8907
|
sx: {
|
|
8876
8908
|
fontWeight: 600
|
|
@@ -8879,7 +8911,7 @@ var TwoButtonDialog = ({
|
|
|
8879
8911
|
}
|
|
8880
8912
|
) }),
|
|
8881
8913
|
/* @__PURE__ */ jsxs88(
|
|
8882
|
-
|
|
8914
|
+
Box40,
|
|
8883
8915
|
{
|
|
8884
8916
|
className: classes.mt,
|
|
8885
8917
|
sx: {
|
|
@@ -8892,8 +8924,8 @@ var TwoButtonDialog = ({
|
|
|
8892
8924
|
}
|
|
8893
8925
|
)
|
|
8894
8926
|
] }),
|
|
8895
|
-
/* @__PURE__ */ jsx134(
|
|
8896
|
-
/* @__PURE__ */ jsxs88(
|
|
8927
|
+
/* @__PURE__ */ jsx134(Divider12, {}),
|
|
8928
|
+
/* @__PURE__ */ jsxs88(Box40, { className: classes.buttonContainer, children: [
|
|
8897
8929
|
/* @__PURE__ */ jsx134(
|
|
8898
8930
|
FilledButton_default,
|
|
8899
8931
|
{
|