@erpsquad/common 1.10.64 → 1.10.66

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.
Files changed (83) hide show
  1. package/dist/chunks/{ERPUIProvider-DtSGxSro.esm.js → ERPUIProvider-B25RO0oy.esm.js} +4 -4
  2. package/dist/chunks/{ERPUIProvider-DtSGxSro.esm.js.map → ERPUIProvider-B25RO0oy.esm.js.map} +1 -1
  3. package/dist/chunks/{ERPUIProvider-B_cYjAdF.js → ERPUIProvider-qVNxuYUq.js} +4 -4
  4. package/dist/chunks/{ERPUIProvider-B_cYjAdF.js.map → ERPUIProvider-qVNxuYUq.js.map} +1 -1
  5. package/dist/chunks/{android-12-switch-CQqq1bod.js → android-12-switch-CPchopCJ.js} +75 -33
  6. package/dist/chunks/android-12-switch-CPchopCJ.js.map +1 -0
  7. package/dist/chunks/{android-12-switch-DMpKRS49.esm.js → android-12-switch-CRhzpgwy.esm.js} +75 -33
  8. package/dist/chunks/android-12-switch-CRhzpgwy.esm.js.map +1 -0
  9. package/dist/chunks/{appbar-GvhMl2LR.js → appbar-CLVklo7i.js} +8 -8
  10. package/dist/chunks/{appbar-GvhMl2LR.js.map → appbar-CLVklo7i.js.map} +1 -1
  11. package/dist/chunks/{appbar-BPTUcuZH.esm.js → appbar-JugRLTTB.esm.js} +8 -8
  12. package/dist/chunks/{appbar-BPTUcuZH.esm.js.map → appbar-JugRLTTB.esm.js.map} +1 -1
  13. package/dist/chunks/{checkbox-CS7OvJZk.js → checkbox-BtV5gEk1.js} +3 -3
  14. package/dist/chunks/{checkbox-CS7OvJZk.js.map → checkbox-BtV5gEk1.js.map} +1 -1
  15. package/dist/chunks/{checkbox-BG9DbVQ5.esm.js → checkbox-aq3lcSNh.esm.js} +3 -3
  16. package/dist/chunks/{checkbox-BG9DbVQ5.esm.js.map → checkbox-aq3lcSNh.esm.js.map} +1 -1
  17. package/dist/chunks/{default-data-C3gd1olF.js → default-data-BV11jE2f.js} +6 -6
  18. package/dist/chunks/{default-data-C3gd1olF.js.map → default-data-BV11jE2f.js.map} +1 -1
  19. package/dist/chunks/{default-data-c7qJW0S-.esm.js → default-data-CttLHjij.esm.js} +6 -6
  20. package/dist/chunks/{default-data-c7qJW0S-.esm.js.map → default-data-CttLHjij.esm.js.map} +1 -1
  21. package/dist/chunks/{fullScreen-BvWfY0hb.js → fullScreen-DrLlR1HI.js} +2 -2
  22. package/dist/chunks/{fullScreen-BvWfY0hb.js.map → fullScreen-DrLlR1HI.js.map} +1 -1
  23. package/dist/chunks/{fullScreen-CEK_HZnP.esm.js → fullScreen-TJdVNF4N.esm.js} +2 -2
  24. package/dist/chunks/{fullScreen-CEK_HZnP.esm.js.map → fullScreen-TJdVNF4N.esm.js.map} +1 -1
  25. package/dist/chunks/{modules-BEfRrTxc.js → modules--vSuX1U9.js} +2 -2
  26. package/dist/chunks/{modules-BEfRrTxc.js.map → modules--vSuX1U9.js.map} +1 -1
  27. package/dist/chunks/{modules-BjL8mfuw.esm.js → modules-DmtCo0T_.esm.js} +2 -2
  28. package/dist/chunks/{modules-BjL8mfuw.esm.js.map → modules-DmtCo0T_.esm.js.map} +1 -1
  29. package/dist/chunks/{page-context-D32zeXhS.js → page-context-DPP1VkDf.js} +2 -2
  30. package/dist/chunks/{page-context-D32zeXhS.js.map → page-context-DPP1VkDf.js.map} +1 -1
  31. package/dist/chunks/{page-context-BR0JEfCp.esm.js → page-context-Da49_1zP.esm.js} +2 -2
  32. package/dist/chunks/{page-context-BR0JEfCp.esm.js.map → page-context-Da49_1zP.esm.js.map} +1 -1
  33. package/dist/chunks/{route-page-map-gBJ6YfCI.esm.js → route-page-map-BRDtQTgL.esm.js} +7 -4
  34. package/dist/chunks/route-page-map-BRDtQTgL.esm.js.map +1 -0
  35. package/dist/chunks/{route-page-map-CuVKVc8s.js → route-page-map-Czwp-hfI.js} +7 -4
  36. package/dist/chunks/route-page-map-Czwp-hfI.js.map +1 -0
  37. package/dist/chunks/{sidebar-C3G058lH.js → sidebar-BOpyMIRe.js} +2 -2
  38. package/dist/chunks/{sidebar-C3G058lH.js.map → sidebar-BOpyMIRe.js.map} +1 -1
  39. package/dist/chunks/{sidebar-PQ4JubXM.esm.js → sidebar-Cc9-z3ES.esm.js} +2 -2
  40. package/dist/chunks/{sidebar-PQ4JubXM.esm.js.map → sidebar-Cc9-z3ES.esm.js.map} +1 -1
  41. package/dist/chunks/{sidebarScreen-fIj--OhC.js → sidebarScreen-C6RJT1PK.js} +3 -3
  42. package/dist/chunks/{sidebarScreen-fIj--OhC.js.map → sidebarScreen-C6RJT1PK.js.map} +1 -1
  43. package/dist/chunks/{sidebarScreen-DC7R30eg.esm.js → sidebarScreen-kbpZZe_u.esm.js} +3 -3
  44. package/dist/chunks/{sidebarScreen-DC7R30eg.esm.js.map → sidebarScreen-kbpZZe_u.esm.js.map} +1 -1
  45. package/dist/chunks/{uom-field-wrapper-BlJaV_Jd.esm.js → uom-field-wrapper-CvW-ILPC.esm.js} +471 -192
  46. package/dist/chunks/uom-field-wrapper-CvW-ILPC.esm.js.map +1 -0
  47. package/dist/chunks/{uom-field-wrapper-BMejbao3.js → uom-field-wrapper-QpAULeef.js} +419 -140
  48. package/dist/chunks/uom-field-wrapper-QpAULeef.js.map +1 -0
  49. package/dist/chunks/{useAddressContact-Dm7nV19E.esm.js → useAddressContact-BstaYk7Q.esm.js} +3 -3
  50. package/dist/chunks/{useAddressContact-Dm7nV19E.esm.js.map → useAddressContact-BstaYk7Q.esm.js.map} +1 -1
  51. package/dist/chunks/{useAddressContact-omyt5axK.js → useAddressContact-NganFSy-.js} +3 -3
  52. package/dist/chunks/{useAddressContact-omyt5axK.js.map → useAddressContact-NganFSy-.js.map} +1 -1
  53. package/dist/components/document-preview/document-preview.d.ts +6 -0
  54. package/dist/components/index.esm.js +72 -71
  55. package/dist/components/index.js +8 -7
  56. package/dist/components/index.js.map +1 -1
  57. package/dist/components/parties-modal/utils/constant.d.ts +25 -1
  58. package/dist/components/upload-media/upload-media.d.ts +1 -0
  59. package/dist/constants/index.esm.js +2 -2
  60. package/dist/constants/index.js +2 -2
  61. package/dist/contexts/index.esm.js +1 -1
  62. package/dist/contexts/index.js +1 -1
  63. package/dist/hooks/index.esm.js +3 -3
  64. package/dist/hooks/index.js +3 -3
  65. package/dist/index.esm.js +97 -96
  66. package/dist/index.js +14 -13
  67. package/dist/index.js.map +1 -1
  68. package/dist/layout/index.esm.js +2 -2
  69. package/dist/layout/index.js +2 -2
  70. package/dist/src/components/document-preview/document-preview.d.ts +6 -0
  71. package/dist/src/components/index.d.ts +2 -0
  72. package/dist/src/components/parties-modal/utils/constant.d.ts +25 -1
  73. package/dist/src/components/upload-media/upload-media.d.ts +1 -0
  74. package/dist/style.css +15 -2
  75. package/dist/views/index.esm.js +7 -7
  76. package/dist/views/index.js +6 -6
  77. package/package.json +1 -1
  78. package/dist/chunks/android-12-switch-CQqq1bod.js.map +0 -1
  79. package/dist/chunks/android-12-switch-DMpKRS49.esm.js.map +0 -1
  80. package/dist/chunks/route-page-map-CuVKVc8s.js.map +0 -1
  81. package/dist/chunks/route-page-map-gBJ6YfCI.esm.js.map +0 -1
  82. package/dist/chunks/uom-field-wrapper-BMejbao3.js.map +0 -1
  83. package/dist/chunks/uom-field-wrapper-BlJaV_Jd.esm.js.map +0 -1
@@ -3,8 +3,8 @@ const jsxRuntime = require("./jsx-runtime-B6vEU3CM.js");
3
3
  const reactHookForm = require("react-hook-form");
4
4
  const identifier = require("./identifier-CaTy7Osd.js");
5
5
  const useAuth = require("./useAuth-Boeqeg4o.js");
6
- const android12Switch = require("./android-12-switch-CQqq1bod.js");
7
- const appbar = require("./appbar-GvhMl2LR.js");
6
+ const android12Switch = require("./android-12-switch-CPchopCJ.js");
7
+ const appbar = require("./appbar-CLVklo7i.js");
8
8
  const React = require("react");
9
9
  const DatePicker = require("react-datepicker");
10
10
  ;/* empty css */
@@ -23,12 +23,12 @@ const marked = require("marked");
23
23
  const api = require("./api-DHYivGc8.js");
24
24
  const apiConfig = require("./api-config-DXwDMFn-.js");
25
25
  const Yup = require("yup");
26
- const checkbox = require("./checkbox-CS7OvJZk.js");
26
+ const checkbox = require("./checkbox-BtV5gEk1.js");
27
27
  const formBuilderDeconversion = require("./form-builder-deconversion-CtfddwVS.js");
28
28
  const radioButton = require("./radio-button-Z203yCd7.js");
29
29
  const notistack = require("notistack");
30
30
  const reactRedux = require("react-redux");
31
- const ERPUIProvider = require("./ERPUIProvider-B_cYjAdF.js");
31
+ const ERPUIProvider = require("./ERPUIProvider-qVNxuYUq.js");
32
32
  const Board = require("@asseinfo/react-kanban");
33
33
  const translations = require("./translations-DoAAs3Sh.js");
34
34
  const FullCalendar = require("@fullcalendar/react");
@@ -42,22 +42,25 @@ const resourceTimelinePlugin = require("@fullcalendar/resource-timeline");
42
42
  const tick = require("./tick-EnM_XLSR.js");
43
43
  const arrowUp = require("./arrow-up-Dg35LjrD.js");
44
44
  const ReactFlagsSelect = require("react-flags-select");
45
+ const DocViewer = require("react-doc-viewer");
46
+ const Papa = require("papaparse");
47
+ const document$1 = require("./document-zJ0CptA2.js");
45
48
  const reactRouterDom = require("react-router-dom");
46
49
  const navigationUtils = require("./navigation-utils-CjGqJQmS.js");
47
- const pageContext = require("./page-context-D32zeXhS.js");
50
+ const pageContext = require("./page-context-DPP1VkDf.js");
48
51
  const ganttTaskReact = require("gantt-task-react");
49
52
  const reactDateRange = require("react-date-range");
50
53
  const actionBar = require("./action-bar-DMv6sqDP.js");
51
54
  const DataEditor = require("@glideapps/glide-data-grid");
52
55
  const glideDataGridCells = require("@glideapps/glide-data-grid-cells");
53
56
  const ReactDOM = require("react-dom");
54
- const sidebar = require("./sidebar-C3G058lH.js");
57
+ const sidebar = require("./sidebar-BOpyMIRe.js");
55
58
  const materialReactTable = require("material-react-table");
56
59
  const trash = require("./trash-C63VDmtW.js");
57
60
  const _$1 = require("lodash");
58
- const modules = require("./modules-BEfRrTxc.js");
61
+ const modules = require("./modules--vSuX1U9.js");
59
62
  const pathname_rental = require("./pathname.rental-C0Yjyyx7.js");
60
- const routePageMap = require("./route-page-map-CuVKVc8s.js");
63
+ const routePageMap = require("./route-page-map-Czwp-hfI.js");
61
64
  const hooks = require("./hooks-DsdahmnZ.js");
62
65
  const store = require("./store-BlcYtLUe.js");
63
66
  const reactDropzone = require("react-dropzone");
@@ -4032,10 +4035,13 @@ const AddressModal = ({
4032
4035
  "addresses.street_1",
4033
4036
  "addresses.street_2",
4034
4037
  "addresses.street_3",
4038
+ "addresses.street_name",
4035
4039
  "addresses.building_no",
4036
4040
  "addresses.additional_no",
4041
+ "addresses.national_address",
4037
4042
  "addresses.zip_code",
4038
4043
  "addresses.city",
4044
+ "addresses.district_name",
4039
4045
  "addresses.state",
4040
4046
  "addresses.country"
4041
4047
  ]
@@ -4147,15 +4153,15 @@ const AddressModal = ({
4147
4153
  const summaryVal = watchedValues.reduce((ele, ele2, index) => {
4148
4154
  if (!ele2) return ele;
4149
4155
  if (!ele) return ele2;
4150
- if (index === 8) {
4156
+ if (index === 11) {
4151
4157
  ele2 = state_data;
4152
4158
  }
4153
- if (index === 9) {
4159
+ if (index === 12) {
4154
4160
  ele2 = country_data;
4155
4161
  }
4156
4162
  ele = (ele == null ? void 0 : ele.name) || ele;
4157
4163
  ele2 = (ele2 == null ? void 0 : ele2.name) || ele2;
4158
- if ([2, 3, 4, 5].includes(index)) {
4164
+ if ([2, 3, 4, 5, 6, 7].includes(index)) {
4159
4165
  return ele + " " + ele2;
4160
4166
  }
4161
4167
  return ele + ", \n" + ele2;
@@ -4281,6 +4287,8 @@ const AddressModal = ({
4281
4287
  }
4282
4288
  ) }),
4283
4289
  isKSA,
4290
+ isKSA,
4291
+ isKSA,
4284
4292
  /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(material.Grid, { item: true, sm: 6, children: /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
4285
4293
  appbar.DynamicInput,
4286
4294
  {
@@ -4330,6 +4338,7 @@ const AddressModal = ({
4330
4338
  formControl: control
4331
4339
  }
4332
4340
  ) }),
4341
+ isKSA,
4333
4342
  /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(material.Grid, { item: true, sm: 6, children: /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
4334
4343
  appbar.DynamicInput,
4335
4344
  {
@@ -4640,6 +4649,135 @@ const DashBoardHeader = ({ title, customElement, showEdit = true, showDropDowan
4640
4649
  ] })
4641
4650
  ] }) });
4642
4651
  };
4652
+ const imageExts = [
4653
+ "png",
4654
+ "jpg",
4655
+ "jpeg",
4656
+ "gif",
4657
+ "svg",
4658
+ "webp",
4659
+ "bmp",
4660
+ "tiff",
4661
+ "tif",
4662
+ "ico",
4663
+ "heic",
4664
+ "heif"
4665
+ ];
4666
+ const iframeExts = ["txt", "csv", "rtf"];
4667
+ const pdfExts = ["pdf"];
4668
+ const CsvPreview = ({ url }) => {
4669
+ const [data, setData] = React.useState([]);
4670
+ const [loading, setLoading] = React.useState(true);
4671
+ React.useEffect(() => {
4672
+ fetch(url).then((r) => r.text()).then((text) => {
4673
+ const result = Papa.parse(text);
4674
+ setData(result.data);
4675
+ setLoading(false);
4676
+ });
4677
+ }, [url]);
4678
+ if (loading) return /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(useAuth.Typography, { type: "s3", children: "Loading..." });
4679
+ if (!data.length) return /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(useAuth.Typography, { type: "s3", children: "Empty file" });
4680
+ return /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs(material.Box, { component: "table", sx: { width: "100%", borderCollapse: "collapse" }, children: [
4681
+ /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx("thead", { children: /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx("tr", { children: (data[0] || []).map((h, i) => /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx("th", { style: { border: "1px solid #ccc", padding: 8, background: "#f5f5f5", textAlign: "left" }, children: h }, i)) }) }),
4682
+ /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx("tbody", { children: data.slice(1).map((row, r) => /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx("tr", { children: row.map((c, i) => /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx("td", { style: { border: "1px solid #ccc", padding: 8 }, children: c }, i)) }, r)) })
4683
+ ] });
4684
+ };
4685
+ const TextPreview = ({ url }) => {
4686
+ const [text, setText] = React.useState("");
4687
+ React.useEffect(() => {
4688
+ fetch(url).then((r) => r.text()).then(setText);
4689
+ }, [url]);
4690
+ return /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx("pre", { style: { whiteSpace: "pre-wrap", wordBreak: "break-word", margin: 0, fontSize: 14 }, children: text });
4691
+ };
4692
+ const DocumentPreview = ({ fileUrl, fileName }) => {
4693
+ var _a;
4694
+ const [open, setOpen] = React.useState(false);
4695
+ const name = fileName || (fileUrl == null ? void 0 : fileUrl.substring((fileUrl == null ? void 0 : fileUrl.lastIndexOf("/")) + 1)) || "";
4696
+ const ext = React.useMemo(() => {
4697
+ var _a2;
4698
+ return ((_a2 = name.split(".").pop()) == null ? void 0 : _a2.toLowerCase()) || "";
4699
+ }, [name]);
4700
+ const s3BucketUrl = ((_a = apiConfig.getApiConfig()) == null ? void 0 : _a.s3BucketUrl) || "https://erpforce-dev.s3.eu-west-1.amazonaws.com/";
4701
+ const fullUrl = React.useMemo(
4702
+ () => (fileUrl == null ? void 0 : fileUrl.startsWith("http")) || (fileUrl == null ? void 0 : fileUrl.startsWith("blob:")) ? fileUrl : s3BucketUrl + fileUrl,
4703
+ [fileUrl, s3BucketUrl]
4704
+ );
4705
+ const isLocalFile = fileUrl == null ? void 0 : fileUrl.startsWith("blob:");
4706
+ const renderContent = () => {
4707
+ if (imageExts.includes(ext)) {
4708
+ return /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
4709
+ "img",
4710
+ {
4711
+ src: fullUrl,
4712
+ alt: name,
4713
+ style: { width: "100%", height: "100%", objectFit: "contain" }
4714
+ }
4715
+ );
4716
+ }
4717
+ if (pdfExts.includes(ext)) {
4718
+ return isLocalFile ? /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx("embed", { src: fullUrl, title: name, style: { width: "100%", height: "100%" } }) : /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx("iframe", { src: fullUrl, title: name, style: { width: "100%", height: "100%", border: "none" } });
4719
+ }
4720
+ if (iframeExts.includes(ext)) {
4721
+ if (ext === "csv") {
4722
+ return /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(CsvPreview, { url: fullUrl });
4723
+ }
4724
+ if (isLocalFile) {
4725
+ return /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(TextPreview, { url: fullUrl });
4726
+ }
4727
+ return /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx("iframe", { src: fullUrl, title: name, style: { width: "100%", height: "100%", border: "none" } });
4728
+ }
4729
+ if (isLocalFile) {
4730
+ return /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs(
4731
+ material.Box,
4732
+ {
4733
+ display: "flex",
4734
+ alignItems: "center",
4735
+ justifyContent: "center",
4736
+ flexDirection: "column",
4737
+ gap: 2,
4738
+ height: "100%",
4739
+ children: [
4740
+ /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(document$1.Document, { fontSize: "large" }),
4741
+ /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(useAuth.Typography, { type: "s3", weight: "medium", children: name }),
4742
+ /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(appbar.Button, { variant: "outlined", onClick: () => window.open(fullUrl, "_blank"), children: "Download" })
4743
+ ]
4744
+ }
4745
+ );
4746
+ }
4747
+ return /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
4748
+ DocViewer,
4749
+ {
4750
+ documents: [{ uri: fullUrl, fileName: name, fileType: ext }],
4751
+ pluginRenderers: DocViewer.DocViewerRenderers,
4752
+ config: { header: { disableHeader: true } },
4753
+ style: { width: "100%", height: "100%" }
4754
+ }
4755
+ );
4756
+ };
4757
+ return /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs(jsxRuntime.jsxRuntimeExports.Fragment, { children: [
4758
+ /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(material.IconButton, { size: "small", onClick: () => setOpen(true), children: /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(tick.Eye, { fontSize: "small" }) }),
4759
+ /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(material.Modal, { open, onClose: () => setOpen(false), children: /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs(material.Box, { sx: {
4760
+ position: "absolute",
4761
+ top: "50%",
4762
+ left: "50%",
4763
+ transform: "translate(-50%, -50%)",
4764
+ bgcolor: "background.paper",
4765
+ boxShadow: 24,
4766
+ borderRadius: 1,
4767
+ width: "90vw",
4768
+ height: "90vh",
4769
+ display: "flex",
4770
+ flexDirection: "column",
4771
+ overflow: "hidden"
4772
+ }, children: [
4773
+ /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs(material.Box, { display: "flex", justifyContent: "space-between", alignItems: "center", p: 2, children: [
4774
+ /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(useAuth.Typography, { type: "s3", weight: "medium", children: name }),
4775
+ /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(material.IconButton, { onClick: () => setOpen(false), children: /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(radioButton.Close, {}) })
4776
+ ] }),
4777
+ /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(material.Box, { flex: 1, p: 2, sx: { overflow: "auto", minHeight: 0 }, children: renderContent() })
4778
+ ] }) })
4779
+ ] });
4780
+ };
4643
4781
  const ExpandableSummaryWrapper = ({
4644
4782
  children,
4645
4783
  defaultExpanded = true,
@@ -10314,9 +10452,8 @@ const ReportsTitleBar = (props) => {
10314
10452
  ];
10315
10453
  const [selectedItems, setSelectedItems] = React.useState(defaultSelected);
10316
10454
  const [level, setLevel] = React.useState(1);
10317
- const [actionAnchorEl, setActionAnchorEl] = React.useState(
10318
- null
10319
- );
10455
+ const [actionAnchorEl, setActionAnchorEl] = React.useState(null);
10456
+ const [appliedFiltersAnchorEl, setAppliedFiltersAnchorEl] = React.useState(null);
10320
10457
  const [allFields, setAllFields] = React.useState([]);
10321
10458
  const [dateRange, setDateRange] = React.useState();
10322
10459
  const [open, setOpen] = React.useState(false);
@@ -10413,6 +10550,19 @@ const ReportsTitleBar = (props) => {
10413
10550
  multiple: filter.multiple || false,
10414
10551
  options: filter.options || void 0
10415
10552
  }))) || [];
10553
+ const isFilterApplied = (val) => Array.isArray(val) ? val.length > 0 : val !== void 0 && val !== null && val !== "";
10554
+ const selectedFilters = filtersConfig.filter(
10555
+ (config) => showFilter(config.key)
10556
+ );
10557
+ const selectedFilterCount = selectedFilters.length;
10558
+ const appliedFilterCount = filtersConfig.filter(
10559
+ (config) => isFilterApplied(filters == null ? void 0 : filters[config.valueKey])
10560
+ ).length;
10561
+ React.useEffect(() => {
10562
+ if (selectedFilterCount === 0 && appliedFiltersAnchorEl) {
10563
+ setAppliedFiltersAnchorEl(null);
10564
+ }
10565
+ }, [selectedFilterCount, appliedFiltersAnchorEl]);
10416
10566
  React.useEffect(() => {
10417
10567
  if (!autoShowFiltersWithValue) return;
10418
10568
  setSelectedItems((prev) => {
@@ -10583,9 +10733,10 @@ const ReportsTitleBar = (props) => {
10583
10733
  multiple = false,
10584
10734
  options: options2,
10585
10735
  show = true,
10586
- showCancelButton = true
10736
+ showCancelButton = true,
10737
+ forceShow = false
10587
10738
  }) => {
10588
- if (!showFilter(key) || !show) return null;
10739
+ if (!showFilter(key) && !forceShow || !show) return null;
10589
10740
  const companyKey = (filterKeys == null ? void 0 : filterKeys.company) || "company";
10590
10741
  const companyId = filters == null ? void 0 : filters[companyKey];
10591
10742
  const hasCompany = Array.isArray(companyId) ? companyId.length > 0 : !!companyId;
@@ -10615,13 +10766,12 @@ const ReportsTitleBar = (props) => {
10615
10766
  }
10616
10767
  );
10617
10768
  };
10618
- const FilterContainer = () => /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs(jsxRuntime.jsxRuntimeExports.Fragment, { children: [
10619
- filtersConfig.map(renderFilter),
10620
- customFilterComponents.map(({ key, component }) => /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(React.Fragment, { children: component }, key))
10621
- ] });
10622
10769
  const handleFilterClose = () => {
10623
10770
  setActionAnchorEl(null);
10624
10771
  };
10772
+ const handleAppliedFilterClose = () => {
10773
+ setAppliedFiltersAnchorEl(null);
10774
+ };
10625
10775
  const ExportContainer = React.memo(() => {
10626
10776
  var _a2;
10627
10777
  const handleClose2 = () => setExportAnchorEl(null);
@@ -10668,27 +10818,7 @@ const ReportsTitleBar = (props) => {
10668
10818
  }
10669
10819
  ) }) : /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(useAuth.Typography, { type: "h3", weight: "medium", color: "theme.secondary.1000", children: title }) }),
10670
10820
  searchBar && /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx("div", { className: "reportsTitleBar--SearchBar", children: searchBar }),
10671
- /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
10672
- ReportButtons,
10673
- {
10674
- zIndex: 999,
10675
- className: "reportsTitleBar--RightContent",
10676
- buttons
10677
- }
10678
- )
10679
- ] }),
10680
- (tabs == null ? void 0 : tabs.length) ? /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
10681
- android12Switch.TabBar,
10682
- {
10683
- tabs: tabs || [],
10684
- activeValue,
10685
- setActiveValue,
10686
- isTabViewOnly: true
10687
- }
10688
- ) }) : null,
10689
- /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs(material.Box, { sx: { display: "flex", justifyContent: "space-between", my: 2.5, alignItems: "center", flexWrap: "wrap", gap: 1 }, children: [
10690
- /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs("div", { className: "reportsTitleBar--FilterWrapper", children: [
10691
- FilterContainer(),
10821
+ /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs("div", { className: "reportsTitleBar--RightContent", children: [
10692
10822
  showDateFilter && isDateRange && (filters == null ? void 0 : filters[endDateKey]) && /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx("div", { style: { display: "flex", gap: "8px" }, children: /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs(
10693
10823
  "div",
10694
10824
  {
@@ -10829,110 +10959,165 @@ const ReportsTitleBar = (props) => {
10829
10959
  /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(android12Switch.default_1$2, {})
10830
10960
  ]
10831
10961
  }
10832
- ) })
10833
- ] }),
10834
- /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs("div", { className: "report-display", children: [
10835
- ((_a = dropdownMenuButtonData == null ? void 0 : dropdownMenuButtonData.options) == null ? void 0 : _a.length) > 0 && /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs(material.Box, { children: [
10836
- /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
10837
- appbar.Button,
10838
- {
10839
- sx: ({ palette }) => ({
10840
- border: "1px solid",
10841
- borderColor: "grey.200",
10842
- borderRadius: "50px",
10843
- color: `${palette.grey[800]} !important`,
10844
- "&:hover": {
10845
- bgcolor: `${palette.grey[200]} !important`
10846
- }
10847
- }),
10848
- variant: "text",
10849
- startIcon: /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(radioButton.Export, { fontSize: "small" }),
10850
- onClick: (event) => setExportAnchorEl(event.currentTarget),
10851
- children: t("common.export")
10852
- }
10853
- ),
10854
- exportAnchorEl && /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(ExportContainer, {})
10855
- ] }),
10856
- (filterDropDown == null ? void 0 : filterDropDown.length) && /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs(jsxRuntime.jsxRuntimeExports.Fragment, { children: [
10857
- /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(material.Box, { children: /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
10858
- appbar.Button,
10859
- {
10860
- sx: ({ palette }) => ({
10861
- border: "1px solid",
10862
- borderColor: "grey.200",
10863
- borderRadius: "50px",
10864
- color: `${palette.grey[800]} !important`,
10865
- "&:hover": {
10866
- bgcolor: `${palette.grey[200]} !important`
10962
+ ) }),
10963
+ /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs("div", { className: "report-display", children: [
10964
+ ((_a = dropdownMenuButtonData == null ? void 0 : dropdownMenuButtonData.options) == null ? void 0 : _a.length) > 0 && /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs(material.Box, { children: [
10965
+ /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
10966
+ appbar.Button,
10967
+ {
10968
+ sx: ({ palette }) => ({
10969
+ border: "1px solid",
10970
+ borderColor: "grey.200",
10971
+ borderRadius: "50px",
10972
+ color: `${palette.grey[800]} !important`,
10973
+ "&:hover": {
10974
+ bgcolor: `${palette.grey[200]} !important`
10975
+ }
10976
+ }),
10977
+ variant: "text",
10978
+ startIcon: /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(radioButton.Export, { fontSize: "small" }),
10979
+ onClick: (event) => setExportAnchorEl(event.currentTarget),
10980
+ children: t("common.export")
10981
+ }
10982
+ ),
10983
+ exportAnchorEl && /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(ExportContainer, {})
10984
+ ] }),
10985
+ (filterDropDown == null ? void 0 : filterDropDown.length) && /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs(jsxRuntime.jsxRuntimeExports.Fragment, { children: [
10986
+ /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(material.Box, { children: /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
10987
+ appbar.Button,
10988
+ {
10989
+ sx: ({ palette }) => ({
10990
+ border: "1px solid",
10991
+ borderColor: "grey.200",
10992
+ borderRadius: "50px",
10993
+ color: `${palette.grey[800]} !important`,
10994
+ "&:hover": {
10995
+ bgcolor: `${palette.grey[200]} !important`
10996
+ }
10997
+ }),
10998
+ variant: "text",
10999
+ startIcon: /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(radioButton.Filter, { fontSize: "small" }),
11000
+ onClick: (event) => setActionAnchorEl(event.currentTarget),
11001
+ children: t("common.filter")
11002
+ }
11003
+ ) }),
11004
+ showLevelBtn && /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(material.Divider, { flexItem: true, orientation: "vertical", sx: { height: "50%", alignSelf: "auto" } }),
11005
+ selectedFilterCount > 0 && /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
11006
+ appbar.Button,
11007
+ {
11008
+ sx: ({ palette }) => ({
11009
+ border: "1px solid",
11010
+ borderColor: "grey.200",
11011
+ borderRadius: "50px",
11012
+ color: `${palette.grey[800]} !important`,
11013
+ "&:hover": {
11014
+ bgcolor: `${palette.grey[200]} !important`
11015
+ }
11016
+ }),
11017
+ variant: "text",
11018
+ startIcon: /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(radioButton.Filter, { fontSize: "small" }),
11019
+ endIcon: appliedFilterCount > 0 ? /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
11020
+ material.Box,
11021
+ {
11022
+ component: "span",
11023
+ sx: ({ palette }) => ({
11024
+ display: "inline-flex",
11025
+ alignItems: "center",
11026
+ justifyContent: "center",
11027
+ minWidth: 20,
11028
+ height: 20,
11029
+ px: 0.75,
11030
+ borderRadius: "10px",
11031
+ fontSize: `12px !important`,
11032
+ fontWeight: 600,
11033
+ lineHeight: 1,
11034
+ color: palette.common.white,
11035
+ bgcolor: palette.primary.main
11036
+ }),
11037
+ children: appliedFilterCount
11038
+ }
11039
+ ) : null,
11040
+ onClick: (event) => setAppliedFiltersAnchorEl(event.currentTarget),
11041
+ children: t("common.appliedFilters", "Applied Filters")
11042
+ }
11043
+ )
11044
+ ] }),
11045
+ filterDropDownFunc(),
11046
+ showLevelBtn && /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs(jsxRuntime.jsxRuntimeExports.Fragment, { children: [
11047
+ /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs(material.Box, { className: "reportsTitleBar--FilterAction--lvWrapper", children: [
11048
+ /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs(useAuth.Typography, { type: "s3", weight: "medium", color: "grey.800", children: [
11049
+ " Level ",
11050
+ level,
11051
+ " of ",
11052
+ dataLength
11053
+ ] }),
11054
+ /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs(material.ButtonGroup, { variant: "outlined", disableElevation: true, sx: ({ palette }) => ({
11055
+ "& .MuiButton-root": {
11056
+ borderColor: `${palette.grey[200]} !important`,
11057
+ "&:hover": {
11058
+ bgcolor: `${palette.grey[200]} !important`
11059
+ }
11060
+ },
11061
+ "& .MuiButtonGroup-firstButton": {
11062
+ borderTopLeftRadius: 20,
11063
+ borderBottomLeftRadius: 20
11064
+ },
11065
+ "& .MuiButtonGroup-lastButton": {
11066
+ borderTopRightRadius: 20,
11067
+ borderBottomRightRadius: 20
10867
11068
  }
10868
- }),
10869
- variant: "text",
10870
- startIcon: /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(radioButton.Filter, { fontSize: "small" }),
10871
- onClick: (event) => setActionAnchorEl(event.currentTarget),
10872
- children: t("common.filter")
10873
- }
10874
- ) }),
10875
- showLevelBtn && /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(material.Divider, { flexItem: true, orientation: "vertical", sx: { height: "50%", alignSelf: "auto" } })
10876
- ] }),
10877
- filterDropDownFunc(),
10878
- showLevelBtn && /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs(jsxRuntime.jsxRuntimeExports.Fragment, { children: [
10879
- /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs(material.Box, { className: "reportsTitleBar--FilterAction--lvWrapper", children: [
10880
- /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs(useAuth.Typography, { type: "s3", weight: "medium", color: "grey.800", children: [
10881
- " Level ",
10882
- level,
10883
- " of ",
10884
- dataLength
11069
+ }), children: [
11070
+ /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(material.Button, { onClick: () => {
11071
+ setLevel(level == dataLength ? level : level + 1);
11072
+ handleRowsCollapse == null ? void 0 : handleRowsCollapse(level);
11073
+ }, children: /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx("img", { src: images.images.common.expand }) }),
11074
+ /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(material.Button, { onClick: () => {
11075
+ setLevel(level != 1 ? level - 1 : 1);
11076
+ handleRowsExpand == null ? void 0 : handleRowsExpand(level);
11077
+ }, children: /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx("img", { src: images.images.common.collapse }) })
11078
+ ] })
10885
11079
  ] }),
10886
- /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs(material.ButtonGroup, { variant: "outlined", disableElevation: true, sx: ({ palette }) => ({
10887
- "& .MuiButton-root": {
10888
- borderColor: `${palette.grey[200]} !important`,
10889
- "&:hover": {
10890
- bgcolor: `${palette.grey[200]} !important`
10891
- }
10892
- },
10893
- "& .MuiButtonGroup-firstButton": {
10894
- borderTopLeftRadius: 20,
10895
- borderBottomLeftRadius: 20
10896
- },
10897
- "& .MuiButtonGroup-lastButton": {
10898
- borderTopRightRadius: 20,
10899
- borderBottomRightRadius: 20
10900
- }
10901
- }), children: [
10902
- /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(material.Button, { onClick: () => {
10903
- setLevel(level == dataLength ? level : level + 1);
10904
- handleRowsCollapse == null ? void 0 : handleRowsCollapse(level);
10905
- }, children: /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx("img", { src: images.images.common.expand }) }),
10906
- /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(material.Button, { onClick: () => {
10907
- setLevel(level != 1 ? level - 1 : 1);
10908
- handleRowsExpand == null ? void 0 : handleRowsExpand(level);
10909
- }, children: /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx("img", { src: images.images.common.collapse }) })
10910
- ] })
11080
+ isDateFilterEnabled && /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(material.Divider, { flexItem: true, orientation: "vertical", sx: { height: "50%", alignSelf: "auto" } })
10911
11081
  ] }),
10912
- isDateFilterEnabled && /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(material.Divider, { flexItem: true, orientation: "vertical", sx: { height: "50%", alignSelf: "auto" } })
11082
+ isDateFilterEnabled && showDateFilter && /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs(material.Box, { sx: { display: "flex", alignItems: "center", gap: 0.5 }, children: [
11083
+ /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(useAuth.Typography, { type: "s3", weight: "medium", color: "grey.800", children: "As of: " }),
11084
+ /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
11085
+ ReportButtons,
11086
+ {
11087
+ zIndex: 997,
11088
+ className: "reportsTitleBar--RightContent",
11089
+ dropdownMenuButtonData: {
11090
+ icon: /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(radioButton.Calendar, { fontSize: "small" }),
11091
+ children: /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs(jsxRuntime.jsxRuntimeExports.Fragment, { children: [
11092
+ navigationUtils.RANGE[dateRange],
11093
+ /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(android12Switch.default_1$2, {})
11094
+ ] }),
11095
+ options
11096
+ },
11097
+ toggleCallback
11098
+ }
11099
+ ),
11100
+ /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx("div", { ref: dateSelectRef })
11101
+ ] })
10913
11102
  ] }),
10914
- isDateFilterEnabled && showDateFilter && /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs(material.Box, { sx: { display: "flex", alignItems: "center", gap: 0.5 }, children: [
10915
- /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(useAuth.Typography, { type: "s3", weight: "medium", color: "grey.800", children: "As of: " }),
10916
- /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
10917
- ReportButtons,
10918
- {
10919
- zIndex: 997,
10920
- className: "reportsTitleBar--RightContent",
10921
- dropdownMenuButtonData: {
10922
- icon: /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(radioButton.Calendar, { fontSize: "small" }),
10923
- children: /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs(jsxRuntime.jsxRuntimeExports.Fragment, { children: [
10924
- navigationUtils.RANGE[dateRange],
10925
- /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(android12Switch.default_1$2, {})
10926
- ] }),
10927
- options
10928
- },
10929
- toggleCallback
10930
- }
10931
- ),
10932
- /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx("div", { ref: dateSelectRef })
10933
- ] })
11103
+ /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
11104
+ ReportButtons,
11105
+ {
11106
+ zIndex: 999,
11107
+ buttons
11108
+ }
11109
+ )
10934
11110
  ] })
10935
11111
  ] }),
11112
+ (tabs == null ? void 0 : tabs.length) ? /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
11113
+ android12Switch.TabBar,
11114
+ {
11115
+ tabs: tabs || [],
11116
+ activeValue,
11117
+ setActiveValue,
11118
+ isTabViewOnly: true
11119
+ }
11120
+ ) }) : null,
10936
11121
  /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
10937
11122
  material.Popper,
10938
11123
  {
@@ -10993,6 +11178,99 @@ const ReportsTitleBar = (props) => {
10993
11178
  }
10994
11179
  )
10995
11180
  }
11181
+ ),
11182
+ /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
11183
+ material.Popover,
11184
+ {
11185
+ anchorEl: appliedFiltersAnchorEl,
11186
+ open: Boolean(appliedFiltersAnchorEl),
11187
+ onClose: handleAppliedFilterClose,
11188
+ anchorOrigin: { vertical: "bottom", horizontal: "right" },
11189
+ transformOrigin: { vertical: "top", horizontal: "right" },
11190
+ slotProps: {
11191
+ paper: {
11192
+ sx: {
11193
+ mt: 1,
11194
+ minWidth: 280,
11195
+ maxWidth: 340,
11196
+ borderRadius: 2,
11197
+ overflow: "hidden",
11198
+ boxShadow: "0 8px 24px rgba(0, 0, 0, 0.12)"
11199
+ }
11200
+ }
11201
+ },
11202
+ children: (() => {
11203
+ const hasContent = selectedFilters.length > 0 || customFilterComponents.length > 0;
11204
+ return /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs(jsxRuntime.jsxRuntimeExports.Fragment, { children: [
11205
+ /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs(
11206
+ material.Box,
11207
+ {
11208
+ sx: {
11209
+ px: 2,
11210
+ py: 1.5,
11211
+ borderBottom: "1px solid",
11212
+ borderColor: "grey.200",
11213
+ bgcolor: "grey.50",
11214
+ display: "flex",
11215
+ alignItems: "center",
11216
+ gap: 1
11217
+ },
11218
+ children: [
11219
+ /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(useAuth.Typography, { type: "s3", weight: "medium", color: "grey.800", children: t("common.appliedFilters", "Applied Filters") }),
11220
+ appliedFilterCount > 0 && /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
11221
+ material.Box,
11222
+ {
11223
+ component: "span",
11224
+ sx: ({ palette }) => ({
11225
+ display: "inline-flex",
11226
+ alignItems: "center",
11227
+ justifyContent: "center",
11228
+ minWidth: 20,
11229
+ height: 20,
11230
+ px: 0.75,
11231
+ borderRadius: "10px",
11232
+ fontSize: "12px !important",
11233
+ fontWeight: 600,
11234
+ lineHeight: 1,
11235
+ color: palette.common.white,
11236
+ bgcolor: palette.primary.main
11237
+ }),
11238
+ children: appliedFilterCount
11239
+ }
11240
+ )
11241
+ ]
11242
+ }
11243
+ ),
11244
+ /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
11245
+ material.Box,
11246
+ {
11247
+ sx: {
11248
+ display: "flex",
11249
+ flexDirection: "column",
11250
+ gap: 2,
11251
+ p: 2,
11252
+ maxHeight: 380,
11253
+ overflowY: "auto"
11254
+ },
11255
+ children: hasContent ? /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs(jsxRuntime.jsxRuntimeExports.Fragment, { children: [
11256
+ selectedFilters.map((config) => /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs(
11257
+ material.Box,
11258
+ {
11259
+ sx: { display: "flex", flexDirection: "column", gap: 0.75 },
11260
+ children: [
11261
+ /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(useAuth.Typography, { type: "s4", weight: "medium", color: "grey.700", children: t(config.label) }),
11262
+ renderFilter(config)
11263
+ ]
11264
+ },
11265
+ config.key
11266
+ )),
11267
+ customFilterComponents.map(({ key, component }) => /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(material.Box, { children: component }, key))
11268
+ ] }) : /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(useAuth.Typography, { type: "s4", color: "grey.500", children: t("common.noFiltersApplied", "No filters applied") })
11269
+ }
11270
+ )
11271
+ ] });
11272
+ })()
11273
+ }
10996
11274
  )
10997
11275
  ] });
10998
11276
  };
@@ -16781,6 +17059,7 @@ exports.CustomToggleSwitch = CustomToggleSwitch;
16781
17059
  exports.DashBoardCard = DashBoardCard;
16782
17060
  exports.DashBoardHeader = DashBoardHeader;
16783
17061
  exports.DateRangePicker = DateRangePicker;
17062
+ exports.DocumentPreview = DocumentPreview;
16784
17063
  exports.DonutChart = DonutChart;
16785
17064
  exports.DonutChart$1 = DonutChart$1;
16786
17065
  exports.DyanmicTextEditor = DyanmicTextEditor;
@@ -16832,4 +17111,4 @@ exports.dynamicFields = dynamicFields;
16832
17111
  exports.fields = fields;
16833
17112
  exports.useDynamicLayout = useDynamicLayout;
16834
17113
  exports.validator = validator;
16835
- //# sourceMappingURL=uom-field-wrapper-BMejbao3.js.map
17114
+ //# sourceMappingURL=uom-field-wrapper-QpAULeef.js.map