@erpsquad/common 1.10.57 → 1.10.58

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 (77) hide show
  1. package/dist/chunks/{ERPUIProvider-DNIk_P9N.js → ERPUIProvider-C9xsCdz8.js} +4 -4
  2. package/dist/chunks/{ERPUIProvider-DNIk_P9N.js.map → ERPUIProvider-C9xsCdz8.js.map} +1 -1
  3. package/dist/chunks/{ERPUIProvider-BJM1qtBf.esm.js → ERPUIProvider-DUpktqXA.esm.js} +4 -4
  4. package/dist/chunks/{ERPUIProvider-BJM1qtBf.esm.js.map → ERPUIProvider-DUpktqXA.esm.js.map} +1 -1
  5. package/dist/chunks/{android-12-switch-SPfvwO74.esm.js → android-12-switch-BFYF5yWP.esm.js} +8 -7
  6. package/dist/chunks/{android-12-switch-SPfvwO74.esm.js.map → android-12-switch-BFYF5yWP.esm.js.map} +1 -1
  7. package/dist/chunks/{android-12-switch-DPYQqw4U.js → android-12-switch-_UhYJwIo.js} +8 -7
  8. package/dist/chunks/{android-12-switch-DPYQqw4U.js.map → android-12-switch-_UhYJwIo.js.map} +1 -1
  9. package/dist/chunks/{appbar-CJ_YiTaE.esm.js → appbar-5TrpZMbY.esm.js} +3 -3
  10. package/dist/chunks/{appbar-CJ_YiTaE.esm.js.map → appbar-5TrpZMbY.esm.js.map} +1 -1
  11. package/dist/chunks/{appbar-B7Don9mm.js → appbar-C9ey8q7A.js} +3 -3
  12. package/dist/chunks/{appbar-B7Don9mm.js.map → appbar-C9ey8q7A.js.map} +1 -1
  13. package/dist/chunks/{checkbox-C1ZTJUlQ.js → checkbox-BGOe79Cy.js} +3 -3
  14. package/dist/chunks/{checkbox-C1ZTJUlQ.js.map → checkbox-BGOe79Cy.js.map} +1 -1
  15. package/dist/chunks/{checkbox-BhH6VEUa.esm.js → checkbox-Nrx4n_Th.esm.js} +3 -3
  16. package/dist/chunks/{checkbox-BhH6VEUa.esm.js.map → checkbox-Nrx4n_Th.esm.js.map} +1 -1
  17. package/dist/chunks/{default-data-Ci8MCe7E.js → default-data-CKE51uFF.js} +6 -6
  18. package/dist/chunks/{default-data-Ci8MCe7E.js.map → default-data-CKE51uFF.js.map} +1 -1
  19. package/dist/chunks/{default-data-DoAHAkBR.esm.js → default-data-D6k6H-p7.esm.js} +6 -6
  20. package/dist/chunks/{default-data-DoAHAkBR.esm.js.map → default-data-D6k6H-p7.esm.js.map} +1 -1
  21. package/dist/chunks/{fullScreen-CVRwgry_.esm.js → fullScreen-BAoq_e7y.esm.js} +2 -2
  22. package/dist/chunks/{fullScreen-CVRwgry_.esm.js.map → fullScreen-BAoq_e7y.esm.js.map} +1 -1
  23. package/dist/chunks/{fullScreen-B2LsVuQY.js → fullScreen-BfwTymyU.js} +2 -2
  24. package/dist/chunks/{fullScreen-B2LsVuQY.js.map → fullScreen-BfwTymyU.js.map} +1 -1
  25. package/dist/chunks/{modules-BstDoVbN.js → modules-BLLiy7lE.js} +2 -2
  26. package/dist/chunks/{modules-BstDoVbN.js.map → modules-BLLiy7lE.js.map} +1 -1
  27. package/dist/chunks/{modules-gZ7sN3SY.esm.js → modules-iMRqZ5uM.esm.js} +2 -2
  28. package/dist/chunks/{modules-gZ7sN3SY.esm.js.map → modules-iMRqZ5uM.esm.js.map} +1 -1
  29. package/dist/chunks/{page-context-OVe_dHlX.esm.js → page-context-BmxkvLgp.esm.js} +2 -2
  30. package/dist/chunks/{page-context-OVe_dHlX.esm.js.map → page-context-BmxkvLgp.esm.js.map} +1 -1
  31. package/dist/chunks/{page-context-ChBO0RIs.js → page-context-oSxL8_xq.js} +2 -2
  32. package/dist/chunks/{page-context-ChBO0RIs.js.map → page-context-oSxL8_xq.js.map} +1 -1
  33. package/dist/chunks/{route-page-map-7BVft1HF.js → route-page-map-DiM8kR2P.js} +25 -1
  34. package/dist/chunks/{route-page-map-7BVft1HF.js.map → route-page-map-DiM8kR2P.js.map} +1 -1
  35. package/dist/chunks/{route-page-map-BHHss936.esm.js → route-page-map-zIIGZHIH.esm.js} +125 -101
  36. package/dist/chunks/{route-page-map-BHHss936.esm.js.map → route-page-map-zIIGZHIH.esm.js.map} +1 -1
  37. package/dist/chunks/{sidebar-Dhnfy7is.esm.js → sidebar-BbOMMvki.esm.js} +2 -2
  38. package/dist/chunks/{sidebar-Dhnfy7is.esm.js.map → sidebar-BbOMMvki.esm.js.map} +1 -1
  39. package/dist/chunks/{sidebar-DDy7Ao3K.js → sidebar-mRDqCVsd.js} +2 -2
  40. package/dist/chunks/{sidebar-DDy7Ao3K.js.map → sidebar-mRDqCVsd.js.map} +1 -1
  41. package/dist/chunks/{sidebarScreen-DuLhKJQB.js → sidebarScreen-CSErMH2c.js} +3 -3
  42. package/dist/chunks/{sidebarScreen-DuLhKJQB.js.map → sidebarScreen-CSErMH2c.js.map} +1 -1
  43. package/dist/chunks/{sidebarScreen-Lox6-RBs.esm.js → sidebarScreen-Cf__OCj5.esm.js} +3 -3
  44. package/dist/chunks/{sidebarScreen-Lox6-RBs.esm.js.map → sidebarScreen-Cf__OCj5.esm.js.map} +1 -1
  45. package/dist/chunks/{uom-field-wrapper-D_c8mueN.js → uom-field-wrapper-BwBGeG5I.js} +29 -10
  46. package/dist/chunks/uom-field-wrapper-BwBGeG5I.js.map +1 -0
  47. package/dist/chunks/{uom-field-wrapper-CsRIQR4E.esm.js → uom-field-wrapper-oWX1Kcwg.esm.js} +29 -10
  48. package/dist/chunks/uom-field-wrapper-oWX1Kcwg.esm.js.map +1 -0
  49. package/dist/chunks/{useAddressContact-BI2XYnuW.esm.js → useAddressContact-CiCCkuNT.esm.js} +3 -3
  50. package/dist/chunks/{useAddressContact-BI2XYnuW.esm.js.map → useAddressContact-CiCCkuNT.esm.js.map} +1 -1
  51. package/dist/chunks/{useAddressContact-DEl4_ZBi.js → useAddressContact-jfZLI0ck.js} +3 -3
  52. package/dist/chunks/{useAddressContact-DEl4_ZBi.js.map → useAddressContact-jfZLI0ck.js.map} +1 -1
  53. package/dist/components/index.esm.js +7 -7
  54. package/dist/components/index.js +7 -7
  55. package/dist/components/material-table/material-table.d.ts +2 -1
  56. package/dist/components/reports-title-bar/reports-title-bar.d.ts +1 -0
  57. package/dist/constants/defaultColumns.d.ts +1 -0
  58. package/dist/constants/index.esm.js +101 -100
  59. package/dist/constants/index.js +3 -2
  60. package/dist/constants/index.js.map +1 -1
  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 +114 -113
  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/material-table/material-table.d.ts +2 -1
  71. package/dist/src/components/reports-title-bar/reports-title-bar.d.ts +1 -0
  72. package/dist/src/constants/defaultColumns.d.ts +1 -0
  73. package/dist/views/index.esm.js +9 -9
  74. package/dist/views/index.js +6 -6
  75. package/package.json +1 -1
  76. package/dist/chunks/uom-field-wrapper-CsRIQR4E.esm.js.map +0 -1
  77. package/dist/chunks/uom-field-wrapper-D_c8mueN.js.map +0 -1
@@ -2,8 +2,8 @@ import { j as jsxRuntimeExports } from "./jsx-runtime-ClFauRgV.esm.js";
2
2
  import { useFieldArray, Controller, useForm, useWatch, useFormContext } from "react-hook-form";
3
3
  import { P as PropTypes, e as _objectWithoutPropertiesLoose, _ as _extends$1, g as generateUtilityClass, j as capitalize, u as useDefaultProps, k as interopRequireDefaultExports, y as lighten_1, z as darken_1, f as alpha_1 } from "./identifier-0SZUhw_A.esm.js";
4
4
  import { i as default_1$3, T as Typography, e as useForkRef, o as ownerWindow, d as useEnhancedEffect, h as debounce, p as isMuiElement, u as useAuth, q as useControlled, r as requireCreateSvgIcon } from "./useAuth-BCP231dC.esm.js";
5
- import { aq as default_1$4, w as DynamicSelect, h as DateTimePicker, D as DatePicker$1, ar as useThemeProps, A as Accordion$1, a8 as Select, f as ChipOrPlaceholder$1, i as DropdownButton, s as DynamicPhone, u as DynamicSearchSelect, k as DynamicCheckBox, af as TitleDropdownButton, T as HeaderCard, ad as TabBar, as as default_1$5, a7 as SearchableSelect, at as Chip$1, ae as TimePicker, aj as UploadMedia, a3 as PhoneInput, Z as ModalLoader, Y as MaterialTable, m as DynamicDate, z as DynamicTime, C as ChipGenerator, M as Footer, F as Fallback, au as IconButton$1, av as TabContext, aw as TabList, ax as Tab, ay as TabPanel, az as default_1$9, a as ActionBar, aA as SwitchBase } from "./android-12-switch-SPfvwO74.esm.js";
6
- import { D as DynamicInput, E as Typography$1, b as Avatar, G as o, M as Modal, B as Button, c as ConfirmPopUp, f as Box$1, d as Toast, u as useTheme$1, S as SearchBar, I as resolveComponentProps, J as mergeSlotProps, K as appendOwnerState, P as Paper$1, o as chainPropTypes, h as ButtonBase$1, y as default_1$6, T as TextField$1, e as Tooltip$1, F as default_1$7, x as default_1$8, N as Menu$2, O as MenuItem$1, q as useRtl, z as List$1, v as ListItem, Q as ListItemText$1, U as refType } from "./appbar-CJ_YiTaE.esm.js";
5
+ import { aq as default_1$4, w as DynamicSelect, h as DateTimePicker, D as DatePicker$1, ar as useThemeProps, A as Accordion$1, a8 as Select, f as ChipOrPlaceholder$1, i as DropdownButton, s as DynamicPhone, u as DynamicSearchSelect, k as DynamicCheckBox, af as TitleDropdownButton, T as HeaderCard, ad as TabBar, as as default_1$5, a7 as SearchableSelect, at as Chip$1, ae as TimePicker, aj as UploadMedia, a3 as PhoneInput, Z as ModalLoader, Y as MaterialTable, m as DynamicDate, z as DynamicTime, C as ChipGenerator, M as Footer, F as Fallback, au as IconButton$1, av as TabContext, aw as TabList, ax as Tab, ay as TabPanel, az as default_1$9, a as ActionBar, aA as SwitchBase } from "./android-12-switch-BFYF5yWP.esm.js";
6
+ import { D as DynamicInput, E as Typography$1, b as Avatar, G as o, M as Modal, B as Button, c as ConfirmPopUp, f as Box$1, d as Toast, u as useTheme$1, S as SearchBar, I as resolveComponentProps, J as mergeSlotProps, K as appendOwnerState, P as Paper$1, o as chainPropTypes, h as ButtonBase$1, y as default_1$6, T as TextField$1, e as Tooltip$1, F as default_1$7, x as default_1$8, N as Menu$2, O as MenuItem$1, q as useRtl, z as List$1, v as ListItem, Q as ListItemText$1, U as refType } from "./appbar-5TrpZMbY.esm.js";
7
7
  import * as React from "react";
8
8
  import React__default, { useState, lazy, useMemo, useRef, useEffect, useCallback, useLayoutEffect, useContext, createElement, createContext, cloneElement } from "react";
9
9
  import DatePicker from "react-datepicker";
@@ -23,12 +23,12 @@ import { marked } from "marked";
23
23
  import { bv as streamV1AiFeatureChat, aF as getV1User, bw as getV1ReportsScheduleReport, J as getV1ReportsReportList, bx as deleteV1ReportsScheduleReportId, by as putV1ReportsUpdateScheduleReportId, bz as postV1ReportsScheduleReport, y as getV1FormBuilder } from "./api-s4Kstg3E.esm.js";
24
24
  import { b as getApiConfigSafe, a as auth, g as getApiConfig } from "./api-config-GOys-syK.esm.js";
25
25
  import * as Yup from "yup";
26
- import { C as Checkbox$1, f as usePages, b as useDeepMemo, a as useApi } from "./checkbox-BhH6VEUa.esm.js";
26
+ import { C as Checkbox$1, f as usePages, b as useDeepMemo, a as useApi } from "./checkbox-Nrx4n_Th.esm.js";
27
27
  import { C as Chip, M as Menu, t as transformTableColumns, b as formateValueByType, r as renderEmptyRowsFallback } from "./form-builder-deconversion-BsYFddYI.esm.js";
28
28
  import { M as MoreIcon, q as Filter, e as Close$1, c as ArrowUpDown, g as Export, p as Calendar$1, a as ArrowDown } from "./radio-button-DSUBR45C.esm.js";
29
29
  import { enqueueSnackbar, useSnackbar, SnackbarProvider } from "notistack";
30
30
  import { useDispatch } from "react-redux";
31
- import { a as apiHelper, c as useGenericDataFetcher, b as useAppTranslations } from "./ERPUIProvider-BJM1qtBf.esm.js";
31
+ import { a as apiHelper, c as useGenericDataFetcher, b as useAppTranslations } from "./ERPUIProvider-DUpktqXA.esm.js";
32
32
  import Board from "@asseinfo/react-kanban";
33
33
  import { a as calculateEntries } from "./translations-DbVyynJO.esm.js";
34
34
  import FullCalendar from "@fullcalendar/react";
@@ -44,20 +44,20 @@ import { j as Copy$1, e as ArrowUp } from "./arrow-up-BDkqlEB_.esm.js";
44
44
  import ReactFlagsSelect from "react-flags-select";
45
45
  import { useParams, useLocation, useNavigate } from "react-router-dom";
46
46
  import { g as getEntityId, R as RANGE, a as handleCompareDateRangeSync, h as handleCompareDateRange } from "./navigation-utils-ChG-fDRf.esm.js";
47
- import { E as ErpLoader } from "./page-context-OVe_dHlX.esm.js";
47
+ import { E as ErpLoader } from "./page-context-BmxkvLgp.esm.js";
48
48
  import { Gantt, ViewMode } from "gantt-task-react";
49
49
  import { DateRange, Calendar } from "react-date-range";
50
50
  import { v as viewTypes } from "./action-bar-BsXTcYpL.esm.js";
51
51
  import DataEditor, { GridCellKind } from "@glideapps/glide-data-grid";
52
52
  import { useExtraCells } from "@glideapps/glide-data-grid-cells";
53
53
  import { createPortal } from "react-dom";
54
- import { C as Collapse$1 } from "./sidebar-Dhnfy7is.esm.js";
54
+ import { C as Collapse$1 } from "./sidebar-BbOMMvki.esm.js";
55
55
  import { useMaterialReactTable, MaterialReactTable } from "material-react-table";
56
56
  import { R as RecgtangleIcon, C as CheckBoxIcon$1, T as Trash, E as Edit } from "./trash-Dgfsw2UY.esm.js";
57
57
  import _$1 from "lodash";
58
- import { P as PathnameDocument } from "./modules-gZ7sN3SY.esm.js";
58
+ import { P as PathnameDocument } from "./modules-iMRqZ5uM.esm.js";
59
59
  import { f as PathnameRental, b as PathnameCrm, e as PathnamePurchase, d as PathnameManufacturing, c as PathnameInventory, a as PathnameAccounting } from "./pathname.rental-Dvo5a732.esm.js";
60
- import { a as PathnameUsers } from "./route-page-map-BHHss936.esm.js";
60
+ import { a as PathnameUsers } from "./route-page-map-zIIGZHIH.esm.js";
61
61
  import { u as useAppDispatch, a as useAppSelector } from "./hooks-Cj9Yhy-E.esm.js";
62
62
  import { f as fetchCompanies } from "./store-gvy7qTZ0.esm.js";
63
63
  import { useDropzone } from "react-dropzone";
@@ -10218,7 +10218,8 @@ const ReportsTitleBar = (props) => {
10218
10218
  filterKeys = {},
10219
10219
  searchBar,
10220
10220
  /** Custom ReactNode components rendered after the standard filters. */
10221
- customFilterComponents = []
10221
+ customFilterComponents = [],
10222
+ autoShowFiltersWithValue = false
10222
10223
  } = props;
10223
10224
  const startDateKey = (filterKeys == null ? void 0 : filterKeys.start_date) || "start_date";
10224
10225
  const endDateKey = (filterKeys == null ? void 0 : filterKeys.end_date) || "end_date";
@@ -10379,6 +10380,24 @@ const ReportsTitleBar = (props) => {
10379
10380
  multiple: filter.multiple || false,
10380
10381
  options: filter.options || void 0
10381
10382
  }))) || [];
10383
+ useEffect(() => {
10384
+ if (!autoShowFiltersWithValue) return;
10385
+ setSelectedItems((prev) => {
10386
+ const visibleKeys = new Set(prev.map((item) => item == null ? void 0 : item.value));
10387
+ let changed = false;
10388
+ const next = [...prev];
10389
+ filtersConfig.forEach((config) => {
10390
+ if (visibleKeys.has(config.key)) return;
10391
+ const val = filters == null ? void 0 : filters[config.valueKey];
10392
+ const hasValue = Array.isArray(val) ? val.length > 0 : val !== void 0 && val !== null && val !== "";
10393
+ if (hasValue) {
10394
+ next.push({ value: config.key });
10395
+ changed = true;
10396
+ }
10397
+ });
10398
+ return changed ? next : prev;
10399
+ });
10400
+ }, [filters, filtersConfig, autoShowFiltersWithValue]);
10382
10401
  const options = [
10383
10402
  {
10384
10403
  label: RANGE.TODAY,
@@ -16782,4 +16801,4 @@ export {
16782
16801
  DyanmicTextEditor as y,
16783
16802
  DynamicDateRange as z
16784
16803
  };
16785
- //# sourceMappingURL=uom-field-wrapper-CsRIQR4E.esm.js.map
16804
+ //# sourceMappingURL=uom-field-wrapper-oWX1Kcwg.esm.js.map