@erpsquad/common 1.10.65 → 1.10.67

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-BP2CP-ah.js → android-12-switch-CPchopCJ.js} +67 -61
  6. package/dist/chunks/android-12-switch-CPchopCJ.js.map +1 -0
  7. package/dist/chunks/{android-12-switch-CrpXnQsd.esm.js → android-12-switch-CRhzpgwy.esm.js} +67 -61
  8. package/dist/chunks/android-12-switch-CRhzpgwy.esm.js.map +1 -0
  9. package/dist/chunks/{appbar-Bb4MdbyO.js → appbar-CLVklo7i.js} +3 -3
  10. package/dist/chunks/{appbar-Bb4MdbyO.js.map → appbar-CLVklo7i.js.map} +1 -1
  11. package/dist/chunks/{appbar-CHxm7L_f.esm.js → appbar-JugRLTTB.esm.js} +3 -3
  12. package/dist/chunks/{appbar-CHxm7L_f.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-WODnnwD5.js → default-data-BV11jE2f.js} +6 -6
  18. package/dist/chunks/{default-data-WODnnwD5.js.map → default-data-BV11jE2f.js.map} +1 -1
  19. package/dist/chunks/{default-data-7fDwUquk.esm.js → default-data-CttLHjij.esm.js} +6 -6
  20. package/dist/chunks/{default-data-7fDwUquk.esm.js.map → default-data-CttLHjij.esm.js.map} +1 -1
  21. package/dist/chunks/{fullScreen-BJR97bsP.js → fullScreen-DrLlR1HI.js} +2 -2
  22. package/dist/chunks/{fullScreen-BJR97bsP.js.map → fullScreen-DrLlR1HI.js.map} +1 -1
  23. package/dist/chunks/{fullScreen-uN74Cs7z.esm.js → fullScreen-TJdVNF4N.esm.js} +2 -2
  24. package/dist/chunks/{fullScreen-uN74Cs7z.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-Df3O8Xw6.js → sidebar-BOpyMIRe.js} +2 -2
  38. package/dist/chunks/{sidebar-Df3O8Xw6.js.map → sidebar-BOpyMIRe.js.map} +1 -1
  39. package/dist/chunks/{sidebar-C_fhINvI.esm.js → sidebar-Cc9-z3ES.esm.js} +2 -2
  40. package/dist/chunks/{sidebar-C_fhINvI.esm.js.map → sidebar-Cc9-z3ES.esm.js.map} +1 -1
  41. package/dist/chunks/{sidebarScreen-BbczvGnM.js → sidebarScreen-C6RJT1PK.js} +3 -3
  42. package/dist/chunks/{sidebarScreen-BbczvGnM.js.map → sidebarScreen-C6RJT1PK.js.map} +1 -1
  43. package/dist/chunks/{sidebarScreen-Df0FcbCe.esm.js → sidebarScreen-kbpZZe_u.esm.js} +3 -3
  44. package/dist/chunks/{sidebarScreen-Df0FcbCe.esm.js.map → sidebarScreen-kbpZZe_u.esm.js.map} +1 -1
  45. package/dist/chunks/{uom-field-wrapper-BN-gHLZh.esm.js → uom-field-wrapper-CvW-ILPC.esm.js} +465 -222
  46. package/dist/chunks/uom-field-wrapper-CvW-ILPC.esm.js.map +1 -0
  47. package/dist/chunks/{uom-field-wrapper-DQKUL4a5.js → uom-field-wrapper-QpAULeef.js} +413 -170
  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 +23 -2
  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 +23 -2
  73. package/dist/src/components/upload-media/upload-media.d.ts +1 -0
  74. package/dist/style.css +4 -1
  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-BP2CP-ah.js.map +0 -1
  79. package/dist/chunks/android-12-switch-CrpXnQsd.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-BN-gHLZh.esm.js.map +0 -1
  83. package/dist/chunks/uom-field-wrapper-DQKUL4a5.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-BP2CP-ah.js");
7
- const appbar = require("./appbar-Bb4MdbyO.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-Df3O8Xw6.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");
@@ -4283,29 +4286,9 @@ const AddressModal = ({
4283
4286
  placeholder: t(`accounting.${translationKey}.addressModal.address3_placeholder`)
4284
4287
  }
4285
4288
  ) }),
4286
- /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(material.Grid, { item: true, sm: 6, children: /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
4287
- appbar.DynamicInput,
4288
- {
4289
- type: "text",
4290
- formControl: control,
4291
- label: t(`accounting.${translationKey}.addressModal.streetName_label`),
4292
- name: "street_name",
4293
- fieldArrayName: "addresses",
4294
- placeholder: t(`accounting.${translationKey}.addressModal.streetName_placeholder`)
4295
- }
4296
- ) }),
4297
4289
  isKSA,
4298
- /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(material.Grid, { item: true, sm: 6, children: /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
4299
- appbar.DynamicInput,
4300
- {
4301
- type: "text",
4302
- formControl: control,
4303
- label: t(`accounting.${translationKey}.addressModal.nationalAddress_label`),
4304
- name: "national_address",
4305
- fieldArrayName: "addresses",
4306
- placeholder: t(`accounting.${translationKey}.addressModal.nationalAddress_placeholder`)
4307
- }
4308
- ) }),
4290
+ isKSA,
4291
+ isKSA,
4309
4292
  /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(material.Grid, { item: true, sm: 6, children: /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
4310
4293
  appbar.DynamicInput,
4311
4294
  {
@@ -4355,17 +4338,7 @@ const AddressModal = ({
4355
4338
  formControl: control
4356
4339
  }
4357
4340
  ) }),
4358
- /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(material.Grid, { item: true, sm: 6, children: /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
4359
- appbar.DynamicInput,
4360
- {
4361
- type: "text",
4362
- formControl: control,
4363
- label: t(`accounting.${translationKey}.addressModal.districtName_label`),
4364
- name: "district_name",
4365
- fieldArrayName: "addresses",
4366
- placeholder: t(`accounting.${translationKey}.addressModal.districtName_placeholder`)
4367
- }
4368
- ) }),
4341
+ isKSA,
4369
4342
  /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(material.Grid, { item: true, sm: 6, children: /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
4370
4343
  appbar.DynamicInput,
4371
4344
  {
@@ -4676,6 +4649,135 @@ const DashBoardHeader = ({ title, customElement, showEdit = true, showDropDowan
4676
4649
  ] })
4677
4650
  ] }) });
4678
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
+ };
4679
4781
  const ExpandableSummaryWrapper = ({
4680
4782
  children,
4681
4783
  defaultExpanded = true,
@@ -10350,9 +10452,8 @@ const ReportsTitleBar = (props) => {
10350
10452
  ];
10351
10453
  const [selectedItems, setSelectedItems] = React.useState(defaultSelected);
10352
10454
  const [level, setLevel] = React.useState(1);
10353
- const [actionAnchorEl, setActionAnchorEl] = React.useState(
10354
- null
10355
- );
10455
+ const [actionAnchorEl, setActionAnchorEl] = React.useState(null);
10456
+ const [appliedFiltersAnchorEl, setAppliedFiltersAnchorEl] = React.useState(null);
10356
10457
  const [allFields, setAllFields] = React.useState([]);
10357
10458
  const [dateRange, setDateRange] = React.useState();
10358
10459
  const [open, setOpen] = React.useState(false);
@@ -10449,6 +10550,19 @@ const ReportsTitleBar = (props) => {
10449
10550
  multiple: filter.multiple || false,
10450
10551
  options: filter.options || void 0
10451
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]);
10452
10566
  React.useEffect(() => {
10453
10567
  if (!autoShowFiltersWithValue) return;
10454
10568
  setSelectedItems((prev) => {
@@ -10619,9 +10733,10 @@ const ReportsTitleBar = (props) => {
10619
10733
  multiple = false,
10620
10734
  options: options2,
10621
10735
  show = true,
10622
- showCancelButton = true
10736
+ showCancelButton = true,
10737
+ forceShow = false
10623
10738
  }) => {
10624
- if (!showFilter(key) || !show) return null;
10739
+ if (!showFilter(key) && !forceShow || !show) return null;
10625
10740
  const companyKey = (filterKeys == null ? void 0 : filterKeys.company) || "company";
10626
10741
  const companyId = filters == null ? void 0 : filters[companyKey];
10627
10742
  const hasCompany = Array.isArray(companyId) ? companyId.length > 0 : !!companyId;
@@ -10651,13 +10766,12 @@ const ReportsTitleBar = (props) => {
10651
10766
  }
10652
10767
  );
10653
10768
  };
10654
- const FilterContainer = () => /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs(jsxRuntime.jsxRuntimeExports.Fragment, { children: [
10655
- filtersConfig.map(renderFilter),
10656
- customFilterComponents.map(({ key, component }) => /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(React.Fragment, { children: component }, key))
10657
- ] });
10658
10769
  const handleFilterClose = () => {
10659
10770
  setActionAnchorEl(null);
10660
10771
  };
10772
+ const handleAppliedFilterClose = () => {
10773
+ setAppliedFiltersAnchorEl(null);
10774
+ };
10661
10775
  const ExportContainer = React.memo(() => {
10662
10776
  var _a2;
10663
10777
  const handleClose2 = () => setExportAnchorEl(null);
@@ -10704,27 +10818,7 @@ const ReportsTitleBar = (props) => {
10704
10818
  }
10705
10819
  ) }) : /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(useAuth.Typography, { type: "h3", weight: "medium", color: "theme.secondary.1000", children: title }) }),
10706
10820
  searchBar && /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx("div", { className: "reportsTitleBar--SearchBar", children: searchBar }),
10707
- /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
10708
- ReportButtons,
10709
- {
10710
- zIndex: 999,
10711
- className: "reportsTitleBar--RightContent",
10712
- buttons
10713
- }
10714
- )
10715
- ] }),
10716
- (tabs == null ? void 0 : tabs.length) ? /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
10717
- android12Switch.TabBar,
10718
- {
10719
- tabs: tabs || [],
10720
- activeValue,
10721
- setActiveValue,
10722
- isTabViewOnly: true
10723
- }
10724
- ) }) : null,
10725
- /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs(material.Box, { sx: { display: "flex", justifyContent: "space-between", my: 2.5, alignItems: "center", flexWrap: "wrap", gap: 1 }, children: [
10726
- /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs("div", { className: "reportsTitleBar--FilterWrapper", children: [
10727
- FilterContainer(),
10821
+ /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs("div", { className: "reportsTitleBar--RightContent", children: [
10728
10822
  showDateFilter && isDateRange && (filters == null ? void 0 : filters[endDateKey]) && /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx("div", { style: { display: "flex", gap: "8px" }, children: /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs(
10729
10823
  "div",
10730
10824
  {
@@ -10865,110 +10959,165 @@ const ReportsTitleBar = (props) => {
10865
10959
  /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(android12Switch.default_1$2, {})
10866
10960
  ]
10867
10961
  }
10868
- ) })
10869
- ] }),
10870
- /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs("div", { className: "report-display", children: [
10871
- ((_a = dropdownMenuButtonData == null ? void 0 : dropdownMenuButtonData.options) == null ? void 0 : _a.length) > 0 && /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs(material.Box, { children: [
10872
- /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
10873
- appbar.Button,
10874
- {
10875
- sx: ({ palette }) => ({
10876
- border: "1px solid",
10877
- borderColor: "grey.200",
10878
- borderRadius: "50px",
10879
- color: `${palette.grey[800]} !important`,
10880
- "&:hover": {
10881
- bgcolor: `${palette.grey[200]} !important`
10882
- }
10883
- }),
10884
- variant: "text",
10885
- startIcon: /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(radioButton.Export, { fontSize: "small" }),
10886
- onClick: (event) => setExportAnchorEl(event.currentTarget),
10887
- children: t("common.export")
10888
- }
10889
- ),
10890
- exportAnchorEl && /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(ExportContainer, {})
10891
- ] }),
10892
- (filterDropDown == null ? void 0 : filterDropDown.length) && /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs(jsxRuntime.jsxRuntimeExports.Fragment, { children: [
10893
- /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(material.Box, { children: /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
10894
- appbar.Button,
10895
- {
10896
- sx: ({ palette }) => ({
10897
- border: "1px solid",
10898
- borderColor: "grey.200",
10899
- borderRadius: "50px",
10900
- color: `${palette.grey[800]} !important`,
10901
- "&:hover": {
10902
- 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
10903
11068
  }
10904
- }),
10905
- variant: "text",
10906
- startIcon: /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(radioButton.Filter, { fontSize: "small" }),
10907
- onClick: (event) => setActionAnchorEl(event.currentTarget),
10908
- children: t("common.filter")
10909
- }
10910
- ) }),
10911
- showLevelBtn && /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(material.Divider, { flexItem: true, orientation: "vertical", sx: { height: "50%", alignSelf: "auto" } })
10912
- ] }),
10913
- filterDropDownFunc(),
10914
- showLevelBtn && /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs(jsxRuntime.jsxRuntimeExports.Fragment, { children: [
10915
- /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs(material.Box, { className: "reportsTitleBar--FilterAction--lvWrapper", children: [
10916
- /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs(useAuth.Typography, { type: "s3", weight: "medium", color: "grey.800", children: [
10917
- " Level ",
10918
- level,
10919
- " of ",
10920
- 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
+ ] })
10921
11079
  ] }),
10922
- /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs(material.ButtonGroup, { variant: "outlined", disableElevation: true, sx: ({ palette }) => ({
10923
- "& .MuiButton-root": {
10924
- borderColor: `${palette.grey[200]} !important`,
10925
- "&:hover": {
10926
- bgcolor: `${palette.grey[200]} !important`
10927
- }
10928
- },
10929
- "& .MuiButtonGroup-firstButton": {
10930
- borderTopLeftRadius: 20,
10931
- borderBottomLeftRadius: 20
10932
- },
10933
- "& .MuiButtonGroup-lastButton": {
10934
- borderTopRightRadius: 20,
10935
- borderBottomRightRadius: 20
10936
- }
10937
- }), children: [
10938
- /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(material.Button, { onClick: () => {
10939
- setLevel(level == dataLength ? level : level + 1);
10940
- handleRowsCollapse == null ? void 0 : handleRowsCollapse(level);
10941
- }, children: /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx("img", { src: images.images.common.expand }) }),
10942
- /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(material.Button, { onClick: () => {
10943
- setLevel(level != 1 ? level - 1 : 1);
10944
- handleRowsExpand == null ? void 0 : handleRowsExpand(level);
10945
- }, children: /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx("img", { src: images.images.common.collapse }) })
10946
- ] })
11080
+ isDateFilterEnabled && /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(material.Divider, { flexItem: true, orientation: "vertical", sx: { height: "50%", alignSelf: "auto" } })
10947
11081
  ] }),
10948
- 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
+ ] })
10949
11102
  ] }),
10950
- isDateFilterEnabled && showDateFilter && /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs(material.Box, { sx: { display: "flex", alignItems: "center", gap: 0.5 }, children: [
10951
- /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(useAuth.Typography, { type: "s3", weight: "medium", color: "grey.800", children: "As of: " }),
10952
- /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
10953
- ReportButtons,
10954
- {
10955
- zIndex: 997,
10956
- className: "reportsTitleBar--RightContent",
10957
- dropdownMenuButtonData: {
10958
- icon: /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(radioButton.Calendar, { fontSize: "small" }),
10959
- children: /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs(jsxRuntime.jsxRuntimeExports.Fragment, { children: [
10960
- navigationUtils.RANGE[dateRange],
10961
- /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(android12Switch.default_1$2, {})
10962
- ] }),
10963
- options
10964
- },
10965
- toggleCallback
10966
- }
10967
- ),
10968
- /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx("div", { ref: dateSelectRef })
10969
- ] })
11103
+ /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
11104
+ ReportButtons,
11105
+ {
11106
+ zIndex: 999,
11107
+ buttons
11108
+ }
11109
+ )
10970
11110
  ] })
10971
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,
10972
11121
  /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
10973
11122
  material.Popper,
10974
11123
  {
@@ -11029,6 +11178,99 @@ const ReportsTitleBar = (props) => {
11029
11178
  }
11030
11179
  )
11031
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
+ }
11032
11274
  )
11033
11275
  ] });
11034
11276
  };
@@ -16817,6 +17059,7 @@ exports.CustomToggleSwitch = CustomToggleSwitch;
16817
17059
  exports.DashBoardCard = DashBoardCard;
16818
17060
  exports.DashBoardHeader = DashBoardHeader;
16819
17061
  exports.DateRangePicker = DateRangePicker;
17062
+ exports.DocumentPreview = DocumentPreview;
16820
17063
  exports.DonutChart = DonutChart;
16821
17064
  exports.DonutChart$1 = DonutChart$1;
16822
17065
  exports.DyanmicTextEditor = DyanmicTextEditor;
@@ -16868,4 +17111,4 @@ exports.dynamicFields = dynamicFields;
16868
17111
  exports.fields = fields;
16869
17112
  exports.useDynamicLayout = useDynamicLayout;
16870
17113
  exports.validator = validator;
16871
- //# sourceMappingURL=uom-field-wrapper-DQKUL4a5.js.map
17114
+ //# sourceMappingURL=uom-field-wrapper-QpAULeef.js.map