impact-ui 4.0.0-alpha.16 → 4.0.0-alpha.18

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 (25) hide show
  1. package/dist/_virtual/index3.js +2 -4
  2. package/dist/_virtual/index4.js +3 -3
  3. package/dist/_virtual/index5.js +4 -2
  4. package/dist/components/DatePicker/showMonthYearSelect.d.ts.map +1 -1
  5. package/dist/components/DatePicker/showMonthYearSelect.js +31 -0
  6. package/dist/components/DateRangePicker/index.d.ts.map +1 -1
  7. package/dist/components/DateRangePicker/index.js +14 -0
  8. package/dist/components/Table/AgGridHeader.d.ts.map +1 -1
  9. package/dist/components/Table/AgGridHeader.js +46 -31
  10. package/dist/components/Table/NewAdvanceSearchModal/NewAdvanceSearchModal.d.ts +14 -11
  11. package/dist/components/Table/NewAdvanceSearchModal/NewAdvanceSearchModal.d.ts.map +1 -1
  12. package/dist/components/Table/NewAdvanceSearchModal/NewAdvanceSearchModal.js +8 -19
  13. package/dist/components/Table/NewAdvanceSearchModal/NewAdvanceSearchModalItem.d.ts +11 -10
  14. package/dist/components/Table/NewAdvanceSearchModal/NewAdvanceSearchModalItem.d.ts.map +1 -1
  15. package/dist/components/Table/NewAdvanceSearchModal/NewAdvanceSearchModalItem.js +3 -2
  16. package/dist/components/Table/TableImpl.js +1 -1
  17. package/dist/components/Table/filterUtils.d.ts.map +1 -1
  18. package/dist/components/Table/filterUtils.js +6 -1
  19. package/dist/mcp-component-registry.json +9 -1
  20. package/dist/node_modules/@mui/system/colorManipulator.js +2 -2
  21. package/dist/node_modules/react-is/index.js +1 -1
  22. package/dist/utils/debounce.d.ts +7 -2
  23. package/dist/utils/debounce.d.ts.map +1 -1
  24. package/dist/utils/debounce.js +8 -1
  25. package/package.json +1 -1
@@ -1,6 +1,4 @@
1
- import { getAugmentedNamespace } from "./_commonjsHelpers.js";
2
- import * as index from "../node_modules/@mui/system/node_modules/@mui/utils/esm/formatMuiErrorMessage/index.js";
3
- const require$$1 = /* @__PURE__ */ getAugmentedNamespace(index);
1
+ var reactIs = { exports: {} };
4
2
  export {
5
- require$$1 as default
3
+ reactIs as __module
6
4
  };
@@ -1,6 +1,6 @@
1
1
  import { getAugmentedNamespace } from "./_commonjsHelpers.js";
2
- import * as index from "../node_modules/@mui/system/node_modules/@mui/utils/esm/clamp/index.js";
3
- const require$$2 = /* @__PURE__ */ getAugmentedNamespace(index);
2
+ import * as index from "../node_modules/@mui/system/node_modules/@mui/utils/esm/formatMuiErrorMessage/index.js";
3
+ const require$$1 = /* @__PURE__ */ getAugmentedNamespace(index);
4
4
  export {
5
- require$$2 as default
5
+ require$$1 as default
6
6
  };
@@ -1,4 +1,6 @@
1
- var reactIs = { exports: {} };
1
+ import { getAugmentedNamespace } from "./_commonjsHelpers.js";
2
+ import * as index from "../node_modules/@mui/system/node_modules/@mui/utils/esm/clamp/index.js";
3
+ const require$$2 = /* @__PURE__ */ getAugmentedNamespace(index);
2
4
  export {
3
- reactIs as __module
5
+ require$$2 as default
4
6
  };
@@ -1 +1 @@
1
- {"version":3,"file":"showMonthYearSelect.d.ts","sourceRoot":"","sources":["../../../src/components/DatePicker/showMonthYearSelect.tsx"],"names":[],"mappings":"AAIA,OAAe,EAAE,KAAK,MAAM,EAAE,MAAM,QAAQ,CAAC;AAE7C,MAAM,WAAW,kCAAkC;IACjD,WAAW,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACjD,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACtD,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACrD,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AAID,wBAAgB,mBAAmB,CAAC,EAClC,WAAW,EACX,KAAK,EACL,aAAa,EACb,YAAY,EACZ,OAAO,EACP,OAAO,GACR,EAAE,kCAAkC,2CA4EpC"}
1
+ {"version":3,"file":"showMonthYearSelect.d.ts","sourceRoot":"","sources":["../../../src/components/DatePicker/showMonthYearSelect.tsx"],"names":[],"mappings":"AAIA,OAAe,EAAE,KAAK,MAAM,EAAE,MAAM,QAAQ,CAAC;AAE7C,MAAM,WAAW,kCAAkC;IACjD,WAAW,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACjD,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACtD,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACrD,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AAkCD,wBAAgB,mBAAmB,CAAC,EAClC,WAAW,EACX,KAAK,EACL,aAAa,EACb,YAAY,EACZ,OAAO,EACP,OAAO,GACR,EAAE,kCAAkC,2CA8EpC"}
@@ -5,6 +5,35 @@ import FormControl from "../../node_modules/@mui/material/FormControl/FormContro
5
5
  import Select from "../../node_modules/@mui/material/Select/Select.js";
6
6
  import MenuItem from "../../node_modules/@mui/material/MenuItem/MenuItem.js";
7
7
  const DEFAULT_YEARS_COUNT = 10;
8
+ const selectMenuProps = {
9
+ anchorOrigin: {
10
+ vertical: "bottom",
11
+ horizontal: "left"
12
+ },
13
+ transformOrigin: {
14
+ vertical: "top",
15
+ horizontal: "left"
16
+ },
17
+ slotProps: {
18
+ paper: {
19
+ sx: {
20
+ zIndex: 999999,
21
+ maxHeight: 300,
22
+ marginTop: "4px"
23
+ }
24
+ },
25
+ root: {
26
+ sx: {
27
+ zIndex: 999999
28
+ }
29
+ }
30
+ },
31
+ MenuListProps: {
32
+ sx: {
33
+ maxHeight: 280
34
+ }
35
+ }
36
+ };
8
37
  function ShowMonthYearSelect({
9
38
  customYears,
10
39
  month,
@@ -46,6 +75,7 @@ function ShowMonthYearSelect({
46
75
  {
47
76
  displayEmpty: true,
48
77
  id: "date-picker-month-select",
78
+ MenuProps: selectMenuProps,
49
79
  size: "small",
50
80
  sx: { height: 32, fontSize: 14 },
51
81
  value: monthValue,
@@ -60,6 +90,7 @@ function ShowMonthYearSelect({
60
90
  {
61
91
  displayEmpty: true,
62
92
  id: "date-picker-year-select",
93
+ MenuProps: selectMenuProps,
63
94
  size: "small",
64
95
  sx: { height: 32, fontSize: 14 },
65
96
  value: yearValue,
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/DateRangePicker/index.tsx"],"names":[],"mappings":"AAEA,OAAO,wBAAwB,CAAC;AAKhC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,qCAAqC,CAAC;AAC7C,OAAO,+BAA+B,CAAC;AAEvC,YAAY,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAEpE;;;GAGG;AACH,eAAO,MAAM,eAAe,wHA2U3B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/DateRangePicker/index.tsx"],"names":[],"mappings":"AAEA,OAAO,wBAAwB,CAAC;AAKhC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,qCAAqC,CAAC;AAC7C,OAAO,+BAA+B,CAAC;AAEvC,YAAY,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAEpE;;;GAGG;AACH,eAAO,MAAM,eAAe,wHA2V3B,CAAC"}
@@ -144,6 +144,20 @@ const DateRangePicker = forwardRef(
144
144
  document.removeEventListener("mousedown", handleClickOutside);
145
145
  };
146
146
  }, [handleClickOutside]);
147
+ useEffect(() => {
148
+ if (!isAgGridCellRenderer) {
149
+ return void 0;
150
+ }
151
+ setIsOpen(true);
152
+ setFocusedInput("startDate");
153
+ const timer = window.setTimeout(() => {
154
+ var _a;
155
+ (_a = startDateInputRef.current) == null ? void 0 : _a.focus();
156
+ }, 0);
157
+ return () => {
158
+ window.clearTimeout(timer);
159
+ };
160
+ }, [isAgGridCellRenderer]);
147
161
  const handleResetDates = useCallback(() => {
148
162
  resetClicked.current = true;
149
163
  setHasInputErrors(false);
@@ -1 +1 @@
1
- {"version":3,"file":"AgGridHeader.d.ts","sourceRoot":"","sources":["../../../src/components/Table/AgGridHeader.tsx"],"names":[],"mappings":"AAwBA,iBAAS,YAAY,CAAC,EACpB,QAAQ,EACR,SAAS,EACT,kBAAkB,EAClB,uBAAuB,EACvB,qBAAqB,EACrB,YAAY,EACZ,cAAc,EACd,oBAA2B,EAC3B,GAAG,IAAI,EACR;;;;;;;;;;CAAA,kDA+3BA;AAED,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"AgGridHeader.d.ts","sourceRoot":"","sources":["../../../src/components/Table/AgGridHeader.tsx"],"names":[],"mappings":"AAwBA,iBAAS,YAAY,CAAC,EACpB,QAAQ,EACR,SAAS,EACT,kBAAkB,EAClB,uBAAuB,EACvB,qBAAqB,EACrB,YAAY,EACZ,cAAc,EACd,oBAA2B,EAC3B,GAAG,IAAI,EACR;;;;;;;;;;CAAA,kDAy5BA;AAED,eAAe,YAAY,CAAC"}
@@ -27,7 +27,7 @@ function AgGridHeader({
27
27
  enableHeaderTextWrap = true,
28
28
  ...rest
29
29
  }) {
30
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z, __, _$, _aa, _ba, _ca, _da, _ea;
30
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z, __, _$, _aa, _ba, _ca, _da, _ea, _fa, _ga, _ha, _ia, _ja, _ka;
31
31
  if (!rest.column || !rest.api) {
32
32
  return null;
33
33
  }
@@ -268,7 +268,7 @@ function AgGridHeader({
268
268
  };
269
269
  const applyFilterToGrid = (inputValue, filterType) => {
270
270
  var _a2;
271
- const currentFilterModel = rest.sortModel || rest.api.getFilterModel();
271
+ const currentFilterModel = rest.api.getFilterModel();
272
272
  const filterEntry = buildFilterModelEntry(inputValue, filterType, (_a2 = rest.column) == null ? void 0 : _a2.colDef);
273
273
  if (filterEntry === void 0) {
274
274
  delete currentFilterModel[rest.column.colId];
@@ -287,12 +287,26 @@ function AgGridHeader({
287
287
  }
288
288
  }, 100);
289
289
  };
290
- const debouncedHandleSearchChange = useCallback(
290
+ const handleSearchChangeRef = useRef(handleSearchChange);
291
+ handleSearchChangeRef.current = handleSearchChange;
292
+ const debouncedFnRef = useRef(
291
293
  debounce((value) => {
292
- handleSearchChange(value);
293
- }, debounceTime),
294
- []
294
+ handleSearchChangeRef.current(value);
295
+ }, debounceTime || 300)
295
296
  );
297
+ useEffect(() => {
298
+ debouncedFnRef.current = debounce((value) => {
299
+ handleSearchChangeRef.current(value);
300
+ }, debounceTime || 300);
301
+ }, [debounceTime]);
302
+ const handleSearchInputChange = useCallback((value) => {
303
+ if (value === "" || value === null || value === void 0) {
304
+ debouncedFnRef.current.cancel();
305
+ handleSearchChangeRef.current(value);
306
+ } else {
307
+ debouncedFnRef.current(value);
308
+ }
309
+ }, []);
296
310
  const handleSearch = (e) => {
297
311
  var _a2, _b2, _c2, _d2;
298
312
  e.stopPropagation();
@@ -318,6 +332,7 @@ function AgGridHeader({
318
332
  };
319
333
  const onCloseIconClick = (colId) => {
320
334
  var _a2, _b2, _c2, _d2;
335
+ debouncedFnRef.current.cancel();
321
336
  setSearchText("");
322
337
  setSelectedDropdownOption(null);
323
338
  setSelectedDate(null);
@@ -428,20 +443,20 @@ function AgGridHeader({
428
443
  "div",
429
444
  {
430
445
  ref: containerRef,
431
- className: `custom-ag-header-container ${((_p = (_o = rest.column) == null ? void 0 : _o.colDef) == null ? void 0 : _p.checkboxSelection) ? "checkbox-selection" : ""}`,
446
+ className: `custom-ag-header-container ${((_p = (_o = rest.column) == null ? void 0 : _o.colDef) == null ? void 0 : _p.checkboxSelection) ? "checkbox-selection" : ""} ${((_r = (_q = rest.column) == null ? void 0 : _q.colDef) == null ? void 0 : _r.customHeaderIcons) || !((_t = (_s = rest.column) == null ? void 0 : _s.colDef) == null ? void 0 : _t.suppressMenu) || ((_v = (_u = rest.column) == null ? void 0 : _u.colDef) == null ? void 0 : _v.isSearchable) ? "with-icons" : ""}`,
432
447
  onClick: () => rest.onClick(),
433
448
  children: showDatePicker ? /* @__PURE__ */ jsxs(
434
449
  "div",
435
450
  {
436
- className: `ia-search-input-field ${(columnWidth[(_q = rest.column) == null ? void 0 : _q.colId] ?? ((_r = rest.column) == null ? void 0 : _r.actualWidth)) < 200 ? "ia-search-input-narrow" : ""}`,
451
+ className: `ia-search-input-field ${(columnWidth[(_w = rest.column) == null ? void 0 : _w.colId] ?? ((_x = rest.column) == null ? void 0 : _x.actualWidth)) < 200 ? "ia-search-input-narrow" : ""}`,
437
452
  children: [
438
- ((_t = (_s = rest.column) == null ? void 0 : _s.colDef) == null ? void 0 : _t.thirdOptionAsDateRangePicker) ? /* @__PURE__ */ jsx(
453
+ ((_z = (_y = rest.column) == null ? void 0 : _y.colDef) == null ? void 0 : _z.thirdOptionAsDateRangePicker) ? /* @__PURE__ */ jsx(
439
454
  DateRangePicker,
440
455
  {
441
456
  fullWidth: true,
442
457
  isAgGridCellRenderer: true,
443
458
  withPortal: true,
444
- customIcon: ((_v = (_u = rest.column) == null ? void 0 : _u.colDef) == null ? void 0 : _v.advanceSearchEnabled) && /* @__PURE__ */ jsx(
459
+ customIcon: ((_B = (_A = rest.column) == null ? void 0 : _A.colDef) == null ? void 0 : _B.advanceSearchEnabled) && /* @__PURE__ */ jsx(
445
460
  default_1,
446
461
  {
447
462
  className: "ia-search-input-field-custom-icon",
@@ -458,14 +473,14 @@ function AgGridHeader({
458
473
  }
459
474
  }
460
475
  ),
461
- displayFormat: ((_x = (_w = rest.column) == null ? void 0 : _w.colDef) == null ? void 0 : _x.displayFormat) || "MM-DD-YYYY",
476
+ displayFormat: ((_D = (_C = rest.column) == null ? void 0 : _C.colDef) == null ? void 0 : _D.displayFormat) || "MM-DD-YYYY",
462
477
  endDate,
463
478
  handleDatesChange: (start, end) => {
464
479
  setStartDate(start);
465
480
  setEndDate(end);
466
481
  },
467
- maxDate: /* @__PURE__ */ new Date("2100-12-31"),
468
- minDate: /* @__PURE__ */ new Date("2000-01-01"),
482
+ maxDate: moment("2100-12-31"),
483
+ minDate: moment("2000-01-01"),
469
484
  setEndDate,
470
485
  setStartDate,
471
486
  startDate,
@@ -492,7 +507,7 @@ function AgGridHeader({
492
507
  isAgGridCellRenderer: true,
493
508
  showMonthYearSelect: true,
494
509
  withPortal: true,
495
- customIcon: ((_z = (_y = rest.column) == null ? void 0 : _y.colDef) == null ? void 0 : _z.advanceSearchEnabled) && /* @__PURE__ */ jsx(
510
+ customIcon: ((_F = (_E = rest.column) == null ? void 0 : _E.colDef) == null ? void 0 : _F.advanceSearchEnabled) && /* @__PURE__ */ jsx(
496
511
  default_1,
497
512
  {
498
513
  className: "ia-search-input-field-custom-icon",
@@ -508,9 +523,9 @@ function AgGridHeader({
508
523
  }
509
524
  }
510
525
  ),
511
- displayFormat: ((_B = (_A = rest.column) == null ? void 0 : _A.colDef) == null ? void 0 : _B.displayFormat) || "MM-DD-YYYY",
512
- maxDate: /* @__PURE__ */ new Date("2100-12-31"),
513
- minDate: /* @__PURE__ */ new Date("2000-01-01"),
526
+ displayFormat: ((_H = (_G = rest.column) == null ? void 0 : _G.colDef) == null ? void 0 : _H.displayFormat) || "MM-DD-YYYY",
527
+ maxDate: moment("2100-12-31"),
528
+ minDate: moment("2000-01-01"),
514
529
  placeholder: "Select Date",
515
530
  selectedDate,
516
531
  setSelectedDate,
@@ -544,9 +559,9 @@ function AgGridHeader({
544
559
  ) : showInputField ? /* @__PURE__ */ jsxs(
545
560
  "div",
546
561
  {
547
- className: `ia-search-input-field ${(columnWidth[(_C = rest.column) == null ? void 0 : _C.colId] ?? ((_D = rest.column) == null ? void 0 : _D.actualWidth)) < 200 ? "ia-search-input-narrow" : ""}`,
562
+ className: `ia-search-input-field ${(columnWidth[(_I = rest.column) == null ? void 0 : _I.colId] ?? ((_J = rest.column) == null ? void 0 : _J.actualWidth)) < 200 ? "ia-search-input-narrow" : ""}`,
548
563
  children: [
549
- ((_F = (_E = rest.column) == null ? void 0 : _E.colDef) == null ? void 0 : _F.thirdOptionAsDropdown) && !((_H = (_G = rest.column) == null ? void 0 : _G.colDef) == null ? void 0 : _H.toShowDuplicateColumnInAdvanceSearch) ? /* @__PURE__ */ jsxs(
564
+ ((_L = (_K = rest.column) == null ? void 0 : _K.colDef) == null ? void 0 : _L.thirdOptionAsDropdown) && !((_N = (_M = rest.column) == null ? void 0 : _M.colDef) == null ? void 0 : _N.toShowDuplicateColumnInAdvanceSearch) ? /* @__PURE__ */ jsxs(
550
565
  "div",
551
566
  {
552
567
  id: "ia-select-option-dropdown-container",
@@ -586,7 +601,7 @@ function AgGridHeader({
586
601
  minWidth: "100%"
587
602
  }
588
603
  ),
589
- ((_J = (_I = rest.column) == null ? void 0 : _I.colDef) == null ? void 0 : _J.advanceSearchEnabled) && /* @__PURE__ */ jsx(
604
+ ((_P = (_O = rest.column) == null ? void 0 : _O.colDef) == null ? void 0 : _P.advanceSearchEnabled) && /* @__PURE__ */ jsx(
590
605
  default_1,
591
606
  {
592
607
  className: "ia-search-input-field-custom-icon",
@@ -619,11 +634,11 @@ function AgGridHeader({
619
634
  Input,
620
635
  {
621
636
  ref: inputRef,
622
- iconClickOnDisabled: (_L = (_K = rest.column) == null ? void 0 : _K.colDef) == null ? void 0 : _L.toShowDuplicateColumnInAdvanceSearch,
623
- isDisabled: (_N = (_M = rest.column) == null ? void 0 : _M.colDef) == null ? void 0 : _N.toShowDuplicateColumnInAdvanceSearch,
637
+ iconClickOnDisabled: (_R = (_Q = rest.column) == null ? void 0 : _Q.colDef) == null ? void 0 : _R.toShowDuplicateColumnInAdvanceSearch,
638
+ isDisabled: (_T = (_S = rest.column) == null ? void 0 : _S.colDef) == null ? void 0 : _T.toShowDuplicateColumnInAdvanceSearch,
624
639
  placeholder: "Search",
625
640
  rightIcon: /* @__PURE__ */ jsxs(Fragment, { children: [
626
- searchText.toString().length > 0 && (columnWidth[(_O = rest.column) == null ? void 0 : _O.colId] ?? ((_P = rest.column) == null ? void 0 : _P.actualWidth)) >= 200 && /* @__PURE__ */ jsx(
641
+ searchText.toString().length > 0 && (columnWidth[(_U = rest.column) == null ? void 0 : _U.colId] ?? ((_V = rest.column) == null ? void 0 : _V.actualWidth)) >= 200 && /* @__PURE__ */ jsx(
627
642
  default_1$1,
628
643
  {
629
644
  onClick: () => {
@@ -634,7 +649,7 @@ function AgGridHeader({
634
649
  }
635
650
  }
636
651
  ),
637
- ((_R = (_Q = rest.column) == null ? void 0 : _Q.colDef) == null ? void 0 : _R.advanceSearchEnabled) && /* @__PURE__ */ jsx(
652
+ ((_X = (_W = rest.column) == null ? void 0 : _W.colDef) == null ? void 0 : _X.advanceSearchEnabled) && /* @__PURE__ */ jsx(
638
653
  default_1,
639
654
  {
640
655
  onClick: () => {
@@ -655,7 +670,7 @@ function AgGridHeader({
655
670
  onChange: (e) => {
656
671
  setSearchText(e.target.value);
657
672
  setHasActiveSearch(!!e.target.value);
658
- debouncedHandleSearchChange(e.target.value);
673
+ handleSearchInputChange(e.target.value);
659
674
  }
660
675
  }
661
676
  ),
@@ -679,9 +694,9 @@ function AgGridHeader({
679
694
  /* @__PURE__ */ jsxs(
680
695
  "div",
681
696
  {
682
- className: `ag-header-cell-text ${((_T = (_S = rest.column) == null ? void 0 : _S.colDef) == null ? void 0 : _T.sortable) ? "sortable" : ""} ${enableHeaderTextWrap ? "header-wrap-enabled" : ""}`,
697
+ className: `ag-header-cell-text ${((_Z = (_Y = rest.column) == null ? void 0 : _Y.colDef) == null ? void 0 : _Z.sortable) ? "sortable" : ""} ${enableHeaderTextWrap ? "header-wrap-enabled" : ""}`,
683
698
  children: [
684
- ((_V = (_U = rest.column) == null ? void 0 : _U.colDef) == null ? void 0 : _V.field) === "Selection" || ((_X = (_W = rest.column) == null ? void 0 : _W.colDef) == null ? void 0 : _X.checkboxSelection) ? children : /* @__PURE__ */ jsx(
699
+ ((_$ = (__ = rest.column) == null ? void 0 : __.colDef) == null ? void 0 : _$.field) === "Selection" || ((_ba = (_aa = rest.column) == null ? void 0 : _aa.colDef) == null ? void 0 : _ba.checkboxSelection) ? children : /* @__PURE__ */ jsx(
685
700
  "div",
686
701
  {
687
702
  ref: headerTextRef,
@@ -704,7 +719,7 @@ function AgGridHeader({
704
719
  )
705
720
  }
706
721
  ),
707
- ((_Z = (_Y = rest.column) == null ? void 0 : _Y.colDef) == null ? void 0 : _Z.sortable) && /* @__PURE__ */ jsx(
722
+ ((_da = (_ca = rest.column) == null ? void 0 : _ca.colDef) == null ? void 0 : _da.sortable) && /* @__PURE__ */ jsx(
708
723
  "img",
709
724
  {
710
725
  alt: "TableSortIcon",
@@ -721,10 +736,10 @@ function AgGridHeader({
721
736
  {
722
737
  className: `ia-icon-div ${hasActiveSearch ? "has-active-search" : ""} ${menuVisible ? "menu-visible" : ""}`,
723
738
  children: [
724
- (_aa = (_$ = (__ = rest.column) == null ? void 0 : __.colDef) == null ? void 0 : _$.customHeaderIcons) == null ? void 0 : _aa.map((icon) => {
739
+ (_ga = (_fa = (_ea = rest.column) == null ? void 0 : _ea.colDef) == null ? void 0 : _fa.customHeaderIcons) == null ? void 0 : _ga.map((icon) => {
725
740
  return icon;
726
741
  }),
727
- ((_ca = (_ba = rest.column) == null ? void 0 : _ba.colDef) == null ? void 0 : _ca.isSearchable) && (hasActiveSearch || !showInputField) && /* @__PURE__ */ jsx(Badge, { invisible: !hasActiveSearch, variant: "dot", children: /* @__PURE__ */ jsx(
742
+ ((_ia = (_ha = rest.column) == null ? void 0 : _ha.colDef) == null ? void 0 : _ia.isSearchable) && (hasActiveSearch || !showInputField) && /* @__PURE__ */ jsx(Badge, { invisible: !hasActiveSearch, variant: "dot", children: /* @__PURE__ */ jsx(
728
743
  default_1$2,
729
744
  {
730
745
  fontSize: "small",
@@ -748,7 +763,7 @@ function AgGridHeader({
748
763
  } : handleSearch
749
764
  }
750
765
  ) }),
751
- !((_ea = (_da = rest.column) == null ? void 0 : _da.colDef) == null ? void 0 : _ea.suppressMenu) && /* @__PURE__ */ jsx("div", { className: "custom-ag-header-icons", children: /* @__PURE__ */ jsx(
766
+ !((_ka = (_ja = rest.column) == null ? void 0 : _ja.colDef) == null ? void 0 : _ka.suppressMenu) && /* @__PURE__ */ jsx("div", { className: "custom-ag-header-icons", children: /* @__PURE__ */ jsx(
752
767
  "button",
753
768
  {
754
769
  ref: menuRef,
@@ -1,13 +1,16 @@
1
- declare const NewAdvanceSearchModal: ({ isAdvanceSearch, actualRef, onSearchApplyClick, toggleAdvanceSearch, initialFilters, setInitialFilters, colDefs, currentColumnId, ...args }: {
2
- [x: string]: any;
3
- isAdvanceSearch: any;
4
- actualRef: any;
5
- onSearchApplyClick: any;
6
- toggleAdvanceSearch: any;
7
- initialFilters: any;
8
- setInitialFilters: any;
9
- colDefs?: never[] | undefined;
10
- currentColumnId: any;
11
- }) => import("react/jsx-runtime").JSX.Element;
1
+ import { default as React } from 'react';
2
+
3
+ interface NewAdvanceSearchModalProps {
4
+ isAdvanceSearch: boolean;
5
+ actualRef: React.RefObject<any>;
6
+ onSearchApplyClick: (filters: any[]) => void;
7
+ toggleAdvanceSearch: () => void;
8
+ initialFilters: any[];
9
+ setInitialFilters: (filters: any[]) => void;
10
+ colDefs: any[];
11
+ currentColumnId: string;
12
+ args: any;
13
+ }
14
+ declare const NewAdvanceSearchModal: ({ isAdvanceSearch, actualRef, onSearchApplyClick, toggleAdvanceSearch, initialFilters, setInitialFilters, colDefs, currentColumnId, ...args }: NewAdvanceSearchModalProps) => import("react/jsx-runtime").JSX.Element;
12
15
  export default NewAdvanceSearchModal;
13
16
  //# sourceMappingURL=NewAdvanceSearchModal.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"NewAdvanceSearchModal.d.ts","sourceRoot":"","sources":["../../../../src/components/Table/NewAdvanceSearchModal/NewAdvanceSearchModal.tsx"],"names":[],"mappings":"AAgBA,QAAA,MAAM,qBAAqB,GAAI;;;;;;;;;;CAU9B,4CAyRA,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
1
+ {"version":3,"file":"NewAdvanceSearchModal.d.ts","sourceRoot":"","sources":["../../../../src/components/Table/NewAdvanceSearchModal/NewAdvanceSearchModal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAe5D,UAAU,0BAA0B;IAClC,eAAe,EAAE,OAAO,CAAC;IACzB,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;IAChC,kBAAkB,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;IAC7C,mBAAmB,EAAE,MAAM,IAAI,CAAC;IAChC,cAAc,EAAE,GAAG,EAAE,CAAC;IACtB,iBAAiB,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;IAC5C,OAAO,EAAE,GAAG,EAAE,CAAC;IACf,eAAe,EAAE,MAAM,CAAC;IACxB,IAAI,EAAE,GAAG,CAAC;CACX;AAED,QAAA,MAAM,qBAAqB,GAAI,+IAU5B,0BAA0B,4CAgR5B,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
@@ -24,12 +24,13 @@ const NewAdvanceSearchModal = ({
24
24
  ...args
25
25
  }) => {
26
26
  const [activeSearchType, setActiveSearchType] = useState("advanceSearch");
27
+ const onChangeSearchType = (e, val) => {
28
+ e.preventDefault();
29
+ setActiveSearchType(val);
30
+ };
27
31
  const formMethods = useForm({
28
32
  defaultValues: {
29
33
  filters: initialFilters
30
- },
31
- rules: {
32
- required: true
33
34
  }
34
35
  });
35
36
  const {
@@ -184,21 +185,11 @@ const NewAdvanceSearchModal = ({
184
185
  }
185
186
  ],
186
187
  selectedOption: activeSearchType,
187
- onChange: (_e, val) => {
188
+ onChange: (e, val) => {
188
189
  var _a, _b;
189
- if (!val) return;
190
- setActiveSearchType(val);
191
- (_b = (_a = actualRef == null ? void 0 : actualRef.current) == null ? void 0 : _a.api) == null ? void 0 : _b.destroyFilter(null);
192
- if (val === "advanceSearch") {
193
- const updatedFilters = getValues().filters.map((filter) => {
194
- const shouldResetOp = filter.value === null || filter.value === "" || !filter.value;
195
- return {
196
- ...filter,
197
- operation: shouldResetOp ? null : filter.operation
198
- };
199
- });
200
- reset({ filters: updatedFilters });
201
- }
190
+ e.preventDefault();
191
+ onChangeSearchType(e, val);
192
+ (_b = (_a = actualRef.current) == null ? void 0 : _a.api) == null ? void 0 : _b.destroyFilter(null);
202
193
  }
203
194
  }
204
195
  ),
@@ -250,7 +241,6 @@ const NewAdvanceSearchModal = ({
250
241
  size: "large",
251
242
  variant: "secondary",
252
243
  onClick: onClearAttributeValue,
253
- type: "button",
254
244
  children: "Clear values"
255
245
  }
256
246
  ),
@@ -259,7 +249,6 @@ const NewAdvanceSearchModal = ({
259
249
  {
260
250
  icon: /* @__PURE__ */ jsx(AddOutlined, {}),
261
251
  size: "large",
262
- type: "button",
263
252
  onClick: () => {
264
253
  append({
265
254
  column: null,
@@ -1,16 +1,17 @@
1
- declare const NewAdvanceSearchModalItem: ({ colDefs, control, index, field, remove, filteredColumnsInitialOptions, activeSearchType, isLastVisible, currentColumnId, getValues, fields, ...args }: {
2
- [x: string]: any;
3
- colDefs: any;
1
+ interface NewAdvanceSearchModalItemProps {
2
+ colDefs: any[];
4
3
  control: any;
5
- index: any;
4
+ index: number;
6
5
  field: any;
7
6
  remove: any;
8
- filteredColumnsInitialOptions: any;
9
- activeSearchType: any;
10
- isLastVisible: any;
11
- currentColumnId: any;
7
+ filteredColumnsInitialOptions: any[];
8
+ activeSearchType: 'search' | 'advanceSearch';
9
+ isLastVisible: boolean;
10
+ currentColumnId: string;
12
11
  getValues: any;
13
- fields: any;
14
- }) => import("react/jsx-runtime").JSX.Element;
12
+ fields: any[];
13
+ args: any;
14
+ }
15
+ declare const NewAdvanceSearchModalItem: ({ colDefs, control, index, field, remove, filteredColumnsInitialOptions, activeSearchType, isLastVisible, currentColumnId, getValues, fields, ...args }: NewAdvanceSearchModalItemProps) => import("react/jsx-runtime").JSX.Element;
15
16
  export default NewAdvanceSearchModalItem;
16
17
  //# sourceMappingURL=NewAdvanceSearchModalItem.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"NewAdvanceSearchModalItem.d.ts","sourceRoot":"","sources":["../../../../src/components/Table/NewAdvanceSearchModal/NewAdvanceSearchModalItem.tsx"],"names":[],"mappings":"AAsBA,QAAA,MAAM,yBAAyB,GAAI;;;;;;;;;;;;;CAalC,4CAuYA,CAAC;AAEF,eAAe,yBAAyB,CAAC"}
1
+ {"version":3,"file":"NewAdvanceSearchModalItem.d.ts","sourceRoot":"","sources":["../../../../src/components/Table/NewAdvanceSearchModal/NewAdvanceSearchModalItem.tsx"],"names":[],"mappings":"AAkBA,UAAU,8BAA8B;IACtC,OAAO,EAAE,GAAG,EAAE,CAAC;IACf,OAAO,EAAE,GAAG,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,GAAG,CAAC;IACX,MAAM,EAAE,GAAG,CAAC;IACZ,6BAA6B,EAAE,GAAG,EAAE,CAAC;IACrC,gBAAgB,EAAE,QAAQ,GAAG,eAAe,CAAC;IAC7C,aAAa,EAAE,OAAO,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,GAAG,CAAC;IACf,MAAM,EAAE,GAAG,EAAE,CAAC;IACd,IAAI,EAAE,GAAG,CAAC;CACX;AACD,QAAA,MAAM,yBAAyB,GAAI,yJAahC,8BAA8B,4CAyYhC,CAAC;AAEF,eAAe,yBAAyB,CAAC"}
@@ -99,7 +99,7 @@ const NewAdvanceSearchModalItem = ({
99
99
  var _a2;
100
100
  if (currentColumnId && index === 0 && // Only auto-select for the first filter
101
101
  !columnField.value && ((_a2 = columnField.value) == null ? void 0 : _a2.value) !== currentColumnId) {
102
- const columnOption = filteredColumnsInitialOptions == null ? void 0 : filteredColumnsInitialOptions.find(
102
+ const columnOption = filteredColumnsInitialOptions.find(
103
103
  (opt) => opt.value === currentColumnId
104
104
  );
105
105
  const allOptions = convertToOptions(colDefs || []);
@@ -207,10 +207,11 @@ const NewAdvanceSearchModalItem = ({
207
207
  e.stopPropagation();
208
208
  }
209
209
  }
210
- ) : (currentColumnDef == null ? void 0 : currentColumnDef.thirdOptionAsDatePicker) ? /* @__PURE__ */ jsx(
210
+ ) : (currentColumnDef == null ? void 0 : currentColumnDef.thirdOptionAsDatePicker) || (currentColumnDef == null ? void 0 : currentColumnDef.thirdOptionAsDatePickerProps) ? /* @__PURE__ */ jsx(
211
211
  DatePicker,
212
212
  {
213
213
  fullWidth: true,
214
+ showMonthYearSelect: true,
214
215
  isDisabled: !operationField.value,
215
216
  name: `filters.${index}.value`,
216
217
  placeholder: "Select date",