impact-ui 5.0.4 → 5.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/index4.js +4 -2
- package/dist/_virtual/index5.js +3 -3
- package/dist/_virtual/index6.js +2 -4
- package/dist/components/DatePicker/DatePicker.types.d.ts +4 -0
- package/dist/components/DatePicker/DatePicker.types.d.ts.map +1 -1
- package/dist/components/DatePicker/datePickerInput.d.ts +2 -0
- package/dist/components/DatePicker/datePickerInput.d.ts.map +1 -1
- package/dist/components/DatePicker/datePickerInput.js +32 -2
- package/dist/components/DatePicker/index.d.ts.map +1 -1
- package/dist/components/DatePicker/index.js +5 -1
- package/dist/components/DatePicker/showMonthYearSelect.d.ts.map +1 -1
- package/dist/components/DatePicker/showMonthYearSelect.js +2 -0
- package/dist/components/DateRangePicker/index.js +1 -1
- package/dist/components/DateRangePicker/showMonthYearSelect.d.ts.map +1 -1
- package/dist/components/DateRangePicker/showMonthYearSelect.js +2 -0
- package/dist/components/Input/index.js +1 -1
- package/dist/components/Select/Select.types.d.ts +7 -0
- package/dist/components/Select/Select.types.d.ts.map +1 -1
- package/dist/components/Select/index.d.ts.map +1 -1
- package/dist/components/Select/index.js +44 -26
- package/dist/components/TableV36/AgGridHeader.d.ts.map +1 -1
- package/dist/components/TableV36/AgGridHeader.js +107 -115
- package/dist/components/TableV36/index.d.ts.map +1 -1
- package/dist/components/TableV36/index.js +26 -4
- package/dist/components/TableV36/tableFunctions.d.ts.map +1 -1
- package/dist/components/TableV36/tableFunctions.js +15 -14
- package/dist/mcp-component-registry.json +1 -1
- package/dist/node_modules/@impactsmartsuite/impact-icons/dist/index.js +256 -44
- package/dist/node_modules/@mui/system/colorManipulator.js +2 -2
- package/dist/node_modules/prop-types/node_modules/react-is/index.js +1 -1
- package/package.json +1 -1
|
@@ -28,7 +28,7 @@ function AgGridHeader({
|
|
|
28
28
|
enableHeaderTextWrap = true,
|
|
29
29
|
...rest
|
|
30
30
|
}) {
|
|
31
|
-
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, _la, _ma, _na, _oa, _pa, _qa, _ra, _sa, _ta, _ua, _va, _wa;
|
|
31
|
+
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, _la, _ma, _na, _oa, _pa, _qa, _ra, _sa, _ta, _ua, _va, _wa, _xa, _ya;
|
|
32
32
|
if (!rest.column || !rest.api) {
|
|
33
33
|
return null;
|
|
34
34
|
}
|
|
@@ -77,10 +77,6 @@ function AgGridHeader({
|
|
|
77
77
|
const [hasActiveSearch, setHasActiveSearch] = useState(false);
|
|
78
78
|
const [selectedDate, setSelectedDate] = useState(null);
|
|
79
79
|
const [showDatePicker, setShowDatePicker] = useState(false);
|
|
80
|
-
const [isInputFocused, setIsInputFocused] = useState(false);
|
|
81
|
-
const originalSuppressHeaderKeyboardEventRef = useRef(
|
|
82
|
-
(_d = (_c = rest.column) == null ? void 0 : _c.colDef) == null ? void 0 : _d.suppressHeaderKeyboardEvent
|
|
83
|
-
);
|
|
84
80
|
const [isOverflowText, setIsOverflowText] = useState(false);
|
|
85
81
|
const headerTextRef = useRef(null);
|
|
86
82
|
const containerRef = useRef(null);
|
|
@@ -159,10 +155,10 @@ function AgGridHeader({
|
|
|
159
155
|
const options = ((_d2 = (_c2 = rest.column) == null ? void 0 : _c2.colDef) == null ? void 0 : _d2.thirdOptionDropdownOptions) || [];
|
|
160
156
|
setCurrentDropdownOptions(options);
|
|
161
157
|
}
|
|
162
|
-
}, [(
|
|
158
|
+
}, [(_d = (_c = rest.column) == null ? void 0 : _c.colDef) == null ? void 0 : _d.thirdOptionAsDropdown, (_f = (_e = rest.column) == null ? void 0 : _e.colDef) == null ? void 0 : _f.thirdOptionDropdownOptions]);
|
|
163
159
|
const [startDate, setStartDate] = useState(null);
|
|
164
160
|
const [endDate, setEndDate] = useState(null);
|
|
165
|
-
const isMultiSelect = (
|
|
161
|
+
const isMultiSelect = (_h = (_g = rest.column) == null ? void 0 : _g.colDef) == null ? void 0 : _h.enableMultiSelect;
|
|
166
162
|
const [isDropdownOpen, setIsDropdownOpen] = useState(false);
|
|
167
163
|
const [selectedDropdownOption, setSelectedDropdownOption] = useState(isMultiSelect ? [] : null);
|
|
168
164
|
const [currentDropdownOptions, setCurrentDropdownOptions] = useState([]);
|
|
@@ -417,20 +413,21 @@ function AgGridHeader({
|
|
|
417
413
|
var _a2;
|
|
418
414
|
const colDef = (_a2 = rest.column) == null ? void 0 : _a2.colDef;
|
|
419
415
|
if (!colDef) return;
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
416
|
+
const original = colDef.suppressHeaderKeyboardEvent;
|
|
417
|
+
const isEditableElement = (el) => !!el && (el.tagName === "INPUT" || el.tagName === "TEXTAREA" || el.tagName === "SELECT" || el.isContentEditable);
|
|
418
|
+
colDef.suppressHeaderKeyboardEvent = (params) => {
|
|
419
|
+
var _a3;
|
|
420
|
+
const eventTarget = (_a3 = params == null ? void 0 : params.event) == null ? void 0 : _a3.target;
|
|
421
|
+
const active = typeof document !== "undefined" ? document.activeElement : null;
|
|
422
|
+
if (isEditableElement(eventTarget) || isEditableElement(active)) {
|
|
423
|
+
return true;
|
|
423
424
|
}
|
|
424
|
-
|
|
425
|
-
}
|
|
426
|
-
colDef.suppressHeaderKeyboardEvent = originalSuppressHeaderKeyboardEventRef.current;
|
|
427
|
-
}
|
|
425
|
+
return typeof original === "function" ? original(params) : !!original;
|
|
426
|
+
};
|
|
428
427
|
return () => {
|
|
429
|
-
|
|
430
|
-
colDef.suppressHeaderKeyboardEvent = originalSuppressHeaderKeyboardEventRef.current;
|
|
431
|
-
}
|
|
428
|
+
colDef.suppressHeaderKeyboardEvent = original;
|
|
432
429
|
};
|
|
433
|
-
}, [
|
|
430
|
+
}, [(_i = rest.column) == null ? void 0 : _i.colDef, (_j = rest.column) == null ? void 0 : _j.colId]);
|
|
434
431
|
useEffect(() => {
|
|
435
432
|
if (containerRef.current) {
|
|
436
433
|
setContainerHeight(containerRef.current.clientHeight);
|
|
@@ -448,15 +445,15 @@ function AgGridHeader({
|
|
|
448
445
|
"div",
|
|
449
446
|
{
|
|
450
447
|
ref: containerRef,
|
|
451
|
-
className: `custom-ag-header-container ${((
|
|
448
|
+
className: `custom-ag-header-container ${((_l = (_k = rest.column) == null ? void 0 : _k.colDef) == null ? void 0 : _l.checkboxSelection) || ((_m = rest.column) == null ? void 0 : _m.colId) === "ag-Grid-SelectionColumn" ? "checkbox-selection" : ""} ${((_o = (_n = rest.column) == null ? void 0 : _n.colDef) == null ? void 0 : _o.customHeaderIcons) || !(((_q = (_p = rest.column) == null ? void 0 : _p.colDef) == null ? void 0 : _q.suppressHeaderMenuButton) ?? ((_s = (_r = rest.column) == null ? void 0 : _r.colDef) == null ? void 0 : _s.suppressMenu)) || ((_u = (_t = rest.column) == null ? void 0 : _t.colDef) == null ? void 0 : _u.isSearchable) ? "with-icons" : ""}`,
|
|
452
449
|
onClick: () => rest.onClick(),
|
|
453
450
|
children: showDatePicker ? /* @__PURE__ */ jsxs("div", { className: `ia-search-input-field ia-search-input-narrow`, children: [
|
|
454
|
-
((
|
|
451
|
+
((_w = (_v = rest.column) == null ? void 0 : _v.colDef) == null ? void 0 : _w.thirdOptionAsDateRangePicker) ? /* @__PURE__ */ jsx(
|
|
455
452
|
DateRangePicker,
|
|
456
453
|
{
|
|
457
454
|
fullWidth: true,
|
|
458
455
|
withPortal: true,
|
|
459
|
-
customIcon: ((
|
|
456
|
+
customIcon: ((_y = (_x = rest.column) == null ? void 0 : _x.colDef) == null ? void 0 : _y.advanceSearchEnabled) && /* @__PURE__ */ jsx(
|
|
460
457
|
default_1,
|
|
461
458
|
{
|
|
462
459
|
className: "ia-search-input-field-custom-icon",
|
|
@@ -473,7 +470,7 @@ function AgGridHeader({
|
|
|
473
470
|
}
|
|
474
471
|
}
|
|
475
472
|
),
|
|
476
|
-
displayFormat: ((
|
|
473
|
+
displayFormat: ((_A = (_z = rest.column) == null ? void 0 : _z.colDef) == null ? void 0 : _A.displayFormat) || "MM-DD-YYYY",
|
|
477
474
|
endDate,
|
|
478
475
|
handleDatesChange: (start, end) => {
|
|
479
476
|
setStartDate(start);
|
|
@@ -504,14 +501,16 @@ function AgGridHeader({
|
|
|
504
501
|
DatePicker,
|
|
505
502
|
{
|
|
506
503
|
fullWidth: true,
|
|
504
|
+
isClearable: true,
|
|
507
505
|
showMonthYearSelect: true,
|
|
508
506
|
withPortal: true,
|
|
509
|
-
customIcon: ((
|
|
507
|
+
customIcon: ((_C = (_B = rest.column) == null ? void 0 : _B.colDef) == null ? void 0 : _C.advanceSearchEnabled) && /* @__PURE__ */ jsx(
|
|
510
508
|
default_1,
|
|
511
509
|
{
|
|
512
510
|
className: "ia-search-input-field-custom-icon",
|
|
513
|
-
onClick: () => {
|
|
511
|
+
onClick: (e) => {
|
|
514
512
|
var _a2, _b2, _c2, _d2, _e2, _f2;
|
|
513
|
+
e.stopPropagation();
|
|
515
514
|
if (rest.onAdvanceSearchClick) {
|
|
516
515
|
rest.onAdvanceSearchClick(rest.column);
|
|
517
516
|
return;
|
|
@@ -522,12 +521,16 @@ function AgGridHeader({
|
|
|
522
521
|
}
|
|
523
522
|
}
|
|
524
523
|
),
|
|
525
|
-
displayFormat: ((
|
|
524
|
+
displayFormat: ((_E = (_D = rest.column) == null ? void 0 : _D.colDef) == null ? void 0 : _E.displayFormat) || "MM-DD-YYYY",
|
|
526
525
|
maxDate: /* @__PURE__ */ new Date("2100-12-31"),
|
|
527
526
|
minDate: /* @__PURE__ */ new Date("2000-01-01"),
|
|
528
527
|
placeholder: "Select Date",
|
|
529
528
|
selectedDate,
|
|
530
529
|
setSelectedDate,
|
|
530
|
+
onClearIconClick: () => {
|
|
531
|
+
setSelectedDate(null);
|
|
532
|
+
handleSearchChange(null);
|
|
533
|
+
},
|
|
531
534
|
onPrimaryButtonClick: () => {
|
|
532
535
|
handleSearchChange(selectedDate);
|
|
533
536
|
setShowDatePicker(false);
|
|
@@ -558,9 +561,9 @@ function AgGridHeader({
|
|
|
558
561
|
"div",
|
|
559
562
|
{
|
|
560
563
|
className: `ia-search-input-field ia-search-input-narrow
|
|
561
|
-
${((
|
|
564
|
+
${((_G = (_F = rest.column) == null ? void 0 : _F.colDef) == null ? void 0 : _G.thirdOptionAsDropdown) ? "with-dropdown" : ""}`,
|
|
562
565
|
children: [
|
|
563
|
-
((
|
|
566
|
+
((_I = (_H = rest.column) == null ? void 0 : _H.colDef) == null ? void 0 : _I.thirdOptionAsDropdown) && !((_K = (_J = rest.column) == null ? void 0 : _J.colDef) == null ? void 0 : _K.toShowDuplicateColumnInAdvanceSearch) ? /* @__PURE__ */ jsx(
|
|
564
567
|
"div",
|
|
565
568
|
{
|
|
566
569
|
id: "ia-select-option-dropdown-container",
|
|
@@ -570,94 +573,83 @@ function AgGridHeader({
|
|
|
570
573
|
width: "100%",
|
|
571
574
|
minWidth: 0
|
|
572
575
|
},
|
|
573
|
-
children:
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
if (
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
handleSearchChange(null);
|
|
600
|
-
}
|
|
576
|
+
children: /* @__PURE__ */ jsx(
|
|
577
|
+
Select,
|
|
578
|
+
{
|
|
579
|
+
currentOptions: currentDropdownOptions,
|
|
580
|
+
dropDownPortalClassName: "ag-select-dropdown-portal",
|
|
581
|
+
initialOptions: (_M = (_L = rest == null ? void 0 : rest.column) == null ? void 0 : _L.colDef) == null ? void 0 : _M.thirdOptionDropdownOptions,
|
|
582
|
+
isClearable: true,
|
|
583
|
+
isMulti: (_O = (_N = rest == null ? void 0 : rest.column) == null ? void 0 : _N.colDef) == null ? void 0 : _O.enableMultiSelect,
|
|
584
|
+
isOpen: isDropdownOpen,
|
|
585
|
+
isSelectAll,
|
|
586
|
+
isWithSearch: (_Q = (_P = rest == null ? void 0 : rest.column) == null ? void 0 : _P.colDef) == null ? void 0 : _Q.enableSearch,
|
|
587
|
+
placeholder: "Select option",
|
|
588
|
+
selectedOptions: selectedDropdownOption,
|
|
589
|
+
setCurrentOptions: setCurrentDropdownOptions,
|
|
590
|
+
setIsOpen: setIsDropdownOpen,
|
|
591
|
+
setIsSelectAll,
|
|
592
|
+
setSelectedOptions: (option) => {
|
|
593
|
+
setSelectedDropdownOption(option);
|
|
594
|
+
if (!isMultiSelect) {
|
|
595
|
+
if (option) {
|
|
596
|
+
const value = typeof option === "object" ? option.value : option;
|
|
597
|
+
setHasActiveSearch(true);
|
|
598
|
+
handleSearchChange(value);
|
|
599
|
+
} else {
|
|
600
|
+
setHasActiveSearch(false);
|
|
601
|
+
handleSearchChange(null);
|
|
601
602
|
}
|
|
602
|
-
}
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
603
|
+
}
|
|
604
|
+
},
|
|
605
|
+
toggleSelectAll: (_S = (_R = rest == null ? void 0 : rest.column) == null ? void 0 : _R.colDef) == null ? void 0 : _S.enableMultiSelect,
|
|
606
|
+
onClearAll: () => {
|
|
607
|
+
setSelectedDropdownOption(isMultiSelect ? [] : null);
|
|
608
|
+
setHasActiveSearch(false);
|
|
609
|
+
handleSearchChange(null);
|
|
610
|
+
setIsSelectAll(false);
|
|
611
|
+
},
|
|
612
|
+
onDropdownClose: () => {
|
|
613
|
+
if (isMultiSelect) {
|
|
614
|
+
if ((selectedDropdownOption == null ? void 0 : selectedDropdownOption.length) > 0) {
|
|
615
|
+
setHasActiveSearch(true);
|
|
616
|
+
handleSearchChange(selectedDropdownOption);
|
|
617
|
+
} else {
|
|
618
|
+
setHasActiveSearch(false);
|
|
619
|
+
handleSearchChange(null);
|
|
619
620
|
}
|
|
620
|
-
}
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
onClick: (e) => {
|
|
641
|
-
var _a2, _b2, _c2, _d2, _e2, _f2;
|
|
642
|
-
e.stopPropagation();
|
|
643
|
-
if (rest.onAdvanceSearchClick) {
|
|
644
|
-
rest.onAdvanceSearchClick(rest.column);
|
|
645
|
-
return;
|
|
621
|
+
}
|
|
622
|
+
},
|
|
623
|
+
withPortal: true,
|
|
624
|
+
minWidth: "100%",
|
|
625
|
+
...(_U = (_T = rest.column) == null ? void 0 : _T.colDef) == null ? void 0 : _U.selectProps,
|
|
626
|
+
customIcon: ((_W = (_V = rest.column) == null ? void 0 : _V.colDef) == null ? void 0 : _W.advanceSearchEnabled) ? /* @__PURE__ */ jsx(
|
|
627
|
+
default_1,
|
|
628
|
+
{
|
|
629
|
+
className: "ia-search-input-field-custom-icon",
|
|
630
|
+
id: "toggle-advance-search-icon",
|
|
631
|
+
onClick: (e) => {
|
|
632
|
+
var _a2, _b2, _c2, _d2, _e2, _f2;
|
|
633
|
+
e.stopPropagation();
|
|
634
|
+
if (rest.onAdvanceSearchClick) {
|
|
635
|
+
rest.onAdvanceSearchClick(rest.column);
|
|
636
|
+
return;
|
|
637
|
+
}
|
|
638
|
+
rest.toggleAdvanceSearch(
|
|
639
|
+
((_b2 = (_a2 = rest.column) == null ? void 0 : _a2.colDef) == null ? void 0 : _b2.toShowDuplicateColumnInAdvanceSearch) ? ((_d2 = (_c2 = rest.column) == null ? void 0 : _c2.colDef) == null ? void 0 : _d2.columnFieldsInAdvanceSearch) ? (_f2 = (_e2 = rest.column) == null ? void 0 : _e2.colDef) == null ? void 0 : _f2.columnFieldsInAdvanceSearch : rest.column.colId : rest.column.colId
|
|
640
|
+
);
|
|
646
641
|
}
|
|
647
|
-
rest.toggleAdvanceSearch(
|
|
648
|
-
((_b2 = (_a2 = rest.column) == null ? void 0 : _a2.colDef) == null ? void 0 : _b2.toShowDuplicateColumnInAdvanceSearch) ? ((_d2 = (_c2 = rest.column) == null ? void 0 : _c2.colDef) == null ? void 0 : _d2.columnFieldsInAdvanceSearch) ? (_f2 = (_e2 = rest.column) == null ? void 0 : _e2.colDef) == null ? void 0 : _f2.columnFieldsInAdvanceSearch : rest.column.colId : rest.column.colId
|
|
649
|
-
);
|
|
650
642
|
}
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
643
|
+
) : (_Z = (_Y = (_X = rest.column) == null ? void 0 : _X.colDef) == null ? void 0 : _Y.selectProps) == null ? void 0 : _Z.customIcon
|
|
644
|
+
}
|
|
645
|
+
)
|
|
654
646
|
}
|
|
655
647
|
) : /* @__PURE__ */ jsx(
|
|
656
648
|
Input,
|
|
657
649
|
{
|
|
658
650
|
ref: inputRef,
|
|
659
|
-
iconClickOnDisabled: (
|
|
660
|
-
isDisabled: (
|
|
651
|
+
iconClickOnDisabled: (_$ = (__ = rest.column) == null ? void 0 : __.colDef) == null ? void 0 : _$.toShowDuplicateColumnInAdvanceSearch,
|
|
652
|
+
isDisabled: (_ba = (_aa = rest.column) == null ? void 0 : _aa.colDef) == null ? void 0 : _ba.toShowDuplicateColumnInAdvanceSearch,
|
|
661
653
|
placeholder: "Search",
|
|
662
654
|
rightIcon: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
663
655
|
searchText.toString().length > 0 && /* @__PURE__ */ jsx(
|
|
@@ -671,7 +663,7 @@ function AgGridHeader({
|
|
|
671
663
|
}
|
|
672
664
|
}
|
|
673
665
|
),
|
|
674
|
-
((
|
|
666
|
+
((_da = (_ca = rest.column) == null ? void 0 : _ca.colDef) == null ? void 0 : _da.advanceSearchEnabled) && /* @__PURE__ */ jsx(
|
|
675
667
|
default_1,
|
|
676
668
|
{
|
|
677
669
|
onClick: () => {
|
|
@@ -716,9 +708,9 @@ function AgGridHeader({
|
|
|
716
708
|
/* @__PURE__ */ jsxs(
|
|
717
709
|
"div",
|
|
718
710
|
{
|
|
719
|
-
className: `ag-header-cell-text ${((
|
|
711
|
+
className: `ag-header-cell-text ${((_fa = (_ea = rest.column) == null ? void 0 : _ea.colDef) == null ? void 0 : _fa.sortable) ? "sortable" : ""} ${enableHeaderTextWrap ? "header-wrap-enabled" : ""}`,
|
|
720
712
|
children: [
|
|
721
|
-
((
|
|
713
|
+
((_ha = (_ga = rest.column) == null ? void 0 : _ga.colDef) == null ? void 0 : _ha.field) === "Selection" || ((_ja = (_ia = rest.column) == null ? void 0 : _ia.colDef) == null ? void 0 : _ja.checkboxSelection) || ((_ka = rest.column) == null ? void 0 : _ka.colId) === "ag-Grid-SelectionColumn" ? children : /* @__PURE__ */ jsx(
|
|
722
714
|
"div",
|
|
723
715
|
{
|
|
724
716
|
ref: headerTextRef,
|
|
@@ -736,13 +728,13 @@ function AgGridHeader({
|
|
|
736
728
|
orientation: "top",
|
|
737
729
|
title: isOverflowText && children !== "Selection" ? children : "",
|
|
738
730
|
variant: "tertiary",
|
|
739
|
-
children: typeof children === "string" && ((
|
|
731
|
+
children: typeof children === "string" && ((_la = rest.context) == null ? void 0 : _la.columnSearchText) ? /* @__PURE__ */ jsx(HighlightedText, { searchText: rest.context.columnSearchText, text: children }) : children
|
|
740
732
|
}
|
|
741
733
|
)
|
|
742
734
|
}
|
|
743
735
|
),
|
|
744
|
-
(
|
|
745
|
-
((
|
|
736
|
+
(_na = (_ma = rest.column) == null ? void 0 : _ma.colDef) == null ? void 0 : _na.headerIcons,
|
|
737
|
+
((_pa = (_oa = rest.column) == null ? void 0 : _oa.colDef) == null ? void 0 : _pa.sortable) && /* @__PURE__ */ jsx(
|
|
746
738
|
"img",
|
|
747
739
|
{
|
|
748
740
|
alt: "TableSortIcon",
|
|
@@ -759,10 +751,10 @@ function AgGridHeader({
|
|
|
759
751
|
{
|
|
760
752
|
className: `ia-icon-div ${hasActiveSearch ? "has-active-search" : ""} ${menuVisible ? "menu-visible" : ""}`,
|
|
761
753
|
children: [
|
|
762
|
-
(
|
|
754
|
+
(_sa = (_ra = (_qa = rest.column) == null ? void 0 : _qa.colDef) == null ? void 0 : _ra.customHeaderIcons) == null ? void 0 : _sa.map((icon) => {
|
|
763
755
|
return icon;
|
|
764
756
|
}),
|
|
765
|
-
((
|
|
757
|
+
((_ua = (_ta = rest.column) == null ? void 0 : _ta.colDef) == null ? void 0 : _ua.isSearchable) && (hasActiveSearch || !showInputField) && /* @__PURE__ */ jsx(Badge, { invisible: !hasActiveSearch, variant: "dot", children: /* @__PURE__ */ jsx(
|
|
766
758
|
default_1$2,
|
|
767
759
|
{
|
|
768
760
|
fontSize: "small",
|
|
@@ -783,7 +775,7 @@ function AgGridHeader({
|
|
|
783
775
|
} : handleSearch
|
|
784
776
|
}
|
|
785
777
|
) }),
|
|
786
|
-
!(((
|
|
778
|
+
!(((_wa = (_va = rest.column) == null ? void 0 : _va.colDef) == null ? void 0 : _wa.suppressHeaderMenuButton) ?? ((_ya = (_xa = rest.column) == null ? void 0 : _xa.colDef) == null ? void 0 : _ya.suppressMenu)) && /* @__PURE__ */ jsx("div", { className: "custom-ag-header-icons", children: /* @__PURE__ */ jsx(
|
|
787
779
|
"button",
|
|
788
780
|
{
|
|
789
781
|
ref: menuRef,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/TableV36/index.tsx"],"names":[],"mappings":"AA0BA,OAAO,sCAAsC,CAAC;AAC9C,OAAO,8CAA8C,CAAC;AACtD,OAAO,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/TableV36/index.tsx"],"names":[],"mappings":"AA0BA,OAAO,sCAAsC,CAAC;AAC9C,OAAO,8CAA8C,CAAC;AACtD,OAAO,qBAAqB,CAAC;AAunE7B,eAAO,MAAM,QAAQ,mFAUnB,CAAC"}
|
|
@@ -14,7 +14,7 @@ import CellTooltip from "./CellTooltip.js";
|
|
|
14
14
|
import CommentsPortal from "./CommentsPortal.js";
|
|
15
15
|
import { appendVirtualFilterColumns, buildAdvanceSearchFilterModel, areFilterModelsEqual } from "./filterUtils.js";
|
|
16
16
|
import NewAdvanceSearchModal from "./NewAdvanceSearchModal/NewAdvanceSearchModal.js";
|
|
17
|
-
import { getTableMeta,
|
|
17
|
+
import { getTableMeta, getMainMenuItems, Columns, updateFontSizeOnToolPanel } from "./tableFunctions.js";
|
|
18
18
|
import TableHeader from "./tableHeader.js";
|
|
19
19
|
import TablePagination from "./tablePagination.js";
|
|
20
20
|
import { convertToOptions } from "../../utils/helper.js";
|
|
@@ -1438,7 +1438,10 @@ const TableContent = forwardRef(
|
|
|
1438
1438
|
configuration: commentProps == null ? void 0 : commentProps.configuration,
|
|
1439
1439
|
colIdentifierKey: commentProps == null ? void 0 : commentProps.colIdentifierKey,
|
|
1440
1440
|
getRowChatMeta,
|
|
1441
|
-
onRowChatIndicatorClick: handleRowChatIndicatorClick
|
|
1441
|
+
onRowChatIndicatorClick: handleRowChatIndicatorClick,
|
|
1442
|
+
// Column menu Format actions (Numeric Values / Font Size) read these from context.
|
|
1443
|
+
onFontSizeChange: setTableFontSize,
|
|
1444
|
+
onNumberFormatChange
|
|
1442
1445
|
}),
|
|
1443
1446
|
[
|
|
1444
1447
|
args.context,
|
|
@@ -1452,9 +1455,28 @@ const TableContent = forwardRef(
|
|
|
1452
1455
|
commentProps == null ? void 0 : commentProps.configuration,
|
|
1453
1456
|
commentProps == null ? void 0 : commentProps.colIdentifierKey,
|
|
1454
1457
|
getRowChatMeta,
|
|
1455
|
-
handleRowChatIndicatorClick
|
|
1458
|
+
handleRowChatIndicatorClick,
|
|
1459
|
+
onNumberFormatChange
|
|
1456
1460
|
]
|
|
1457
1461
|
);
|
|
1462
|
+
const resolvedGetMainMenuItems = useCallback(
|
|
1463
|
+
(params) => {
|
|
1464
|
+
if (customGetMainMenuItems) {
|
|
1465
|
+
return customGetMainMenuItems(params);
|
|
1466
|
+
}
|
|
1467
|
+
return getMainMenuItems({
|
|
1468
|
+
...params,
|
|
1469
|
+
onFontSizeChange: setTableFontSize,
|
|
1470
|
+
onNumberFormatChange,
|
|
1471
|
+
context: {
|
|
1472
|
+
...params == null ? void 0 : params.context,
|
|
1473
|
+
onFontSizeChange: setTableFontSize,
|
|
1474
|
+
onNumberFormatChange
|
|
1475
|
+
}
|
|
1476
|
+
});
|
|
1477
|
+
},
|
|
1478
|
+
[customGetMainMenuItems, onNumberFormatChange]
|
|
1479
|
+
);
|
|
1458
1480
|
const LIST_ROW_SPACING = 12;
|
|
1459
1481
|
const BASE_HEIGHT_WITH_IMAGE = 70;
|
|
1460
1482
|
const BASE_HEIGHT_WITHOUT_IMAGE = 48;
|
|
@@ -1660,7 +1682,7 @@ const TableContent = forwardRef(
|
|
|
1660
1682
|
domLayout: resolvedDomLayout,
|
|
1661
1683
|
enableCellTextSelection: viewPoint === "list" ? true : args == null ? void 0 : args.enableCellTextSelection,
|
|
1662
1684
|
ensureDomOrder: viewPoint === "list" ? false : args == null ? void 0 : args.ensureDomOrder,
|
|
1663
|
-
getMainMenuItems:
|
|
1685
|
+
getMainMenuItems: resolvedGetMainMenuItems,
|
|
1664
1686
|
getRowClass: getRowClassWrapper,
|
|
1665
1687
|
getRowHeight: getRowHeightWrapper,
|
|
1666
1688
|
headerHeight: args.headerHeight ?? 40,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tableFunctions.d.ts","sourceRoot":"","sources":["../../../src/components/TableV36/tableFunctions.tsx"],"names":[],"mappings":"AA8DA,eAAO,MAAM,oBAAoB,GAAI,WAAM,SAQ1C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,YAAY,GAAI,QAAG,QAM/B,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,WAAM,EAAE,aAAQ,SAK5C,CAAC;AAEF,eAAO,MAAM,wBAAwB,GAAI,WAAM,SAM9C,CAAC;AAEF,eAAO,MAAM,QAAQ,GAAI,eAAU,EAAE,WAAM,EAAE,QAAG,SAM/C,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,WAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"tableFunctions.d.ts","sourceRoot":"","sources":["../../../src/components/TableV36/tableFunctions.tsx"],"names":[],"mappings":"AA8DA,eAAO,MAAM,oBAAoB,GAAI,WAAM,SAQ1C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,YAAY,GAAI,QAAG,QAM/B,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,WAAM,EAAE,aAAQ,SAK5C,CAAC;AAEF,eAAO,MAAM,wBAAwB,GAAI,WAAM,SAM9C,CAAC;AAEF,eAAO,MAAM,QAAQ,GAAI,eAAU,EAAE,WAAM,EAAE,QAAG,SAM/C,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,WAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA+ItC,CAAC;AA+kBF,eAAO,MAAM,OAAO,mFAi5ClB,CAAC;AACH,eAAO,MAAM,yBAAyB,GAAI,iBAAY,WAgBrD,CAAC"}
|
|
@@ -73,11 +73,12 @@ const sortFunc = (columnData, sortBy, api) => {
|
|
|
73
73
|
});
|
|
74
74
|
};
|
|
75
75
|
const getMainMenuItems = (params) => {
|
|
76
|
-
var _a, _b, _c;
|
|
76
|
+
var _a, _b, _c, _d, _e;
|
|
77
77
|
if (!(params == null ? void 0 : params.column)) {
|
|
78
78
|
return [];
|
|
79
79
|
}
|
|
80
|
-
const
|
|
80
|
+
const onFontSizeChange = params.onFontSizeChange ?? ((_a = params.context) == null ? void 0 : _a.onFontSizeChange);
|
|
81
|
+
const onNumberFormatChange = params.onNumberFormatChange ?? ((_b = params.context) == null ? void 0 : _b.onNumberFormatChange);
|
|
81
82
|
const { colDef, pinned, sort, actualWidth } = params.column;
|
|
82
83
|
const columnMenuItems = [];
|
|
83
84
|
columnMenuItems.push(
|
|
@@ -128,7 +129,7 @@ const getMainMenuItems = (params) => {
|
|
|
128
129
|
onColMenuAutoAdjustClick(params);
|
|
129
130
|
},
|
|
130
131
|
// if extra.width property is not present- column is auto adjusted
|
|
131
|
-
checked: actualWidth !== ((
|
|
132
|
+
checked: actualWidth !== ((_c = colDef == null ? void 0 : colDef.extra) == null ? void 0 : _c.width)
|
|
132
133
|
},
|
|
133
134
|
{
|
|
134
135
|
name: "Custom width",
|
|
@@ -139,8 +140,8 @@ const getMainMenuItems = (params) => {
|
|
|
139
140
|
]);
|
|
140
141
|
},
|
|
141
142
|
// if extra.width property is present- column has custom width
|
|
142
|
-
checked: ((
|
|
143
|
-
disabled: !((
|
|
143
|
+
checked: ((_d = colDef == null ? void 0 : colDef.extra) == null ? void 0 : _d.width) === actualWidth,
|
|
144
|
+
disabled: !((_e = colDef == null ? void 0 : colDef.extra) == null ? void 0 : _e.width)
|
|
144
145
|
}
|
|
145
146
|
]
|
|
146
147
|
});
|
|
@@ -160,40 +161,40 @@ const getMainMenuItems = (params) => {
|
|
|
160
161
|
subMenu: [
|
|
161
162
|
{
|
|
162
163
|
name: "Full Number",
|
|
163
|
-
action: () => onNumberFormatChange("full")
|
|
164
|
+
action: () => onNumberFormatChange == null ? void 0 : onNumberFormatChange("full")
|
|
164
165
|
},
|
|
165
166
|
{
|
|
166
167
|
name: "In K",
|
|
167
|
-
action: () => onNumberFormatChange("thousand")
|
|
168
|
+
action: () => onNumberFormatChange == null ? void 0 : onNumberFormatChange("thousand")
|
|
168
169
|
},
|
|
169
170
|
{
|
|
170
171
|
name: "In Mn",
|
|
171
|
-
action: () => onNumberFormatChange("million")
|
|
172
|
+
action: () => onNumberFormatChange == null ? void 0 : onNumberFormatChange("million")
|
|
172
173
|
},
|
|
173
174
|
{
|
|
174
175
|
name: "In Bn",
|
|
175
|
-
action: () => onNumberFormatChange("billion")
|
|
176
|
+
action: () => onNumberFormatChange == null ? void 0 : onNumberFormatChange("billion")
|
|
176
177
|
}
|
|
177
178
|
],
|
|
178
|
-
disabled: !
|
|
179
|
+
disabled: !onNumberFormatChange
|
|
179
180
|
});
|
|
180
181
|
columnMenuItems.push({
|
|
181
182
|
name: "Font Size",
|
|
182
183
|
subMenu: [
|
|
183
184
|
{
|
|
184
185
|
name: "Small Font",
|
|
185
|
-
action: () => onFontSizeChange("small")
|
|
186
|
+
action: () => onFontSizeChange == null ? void 0 : onFontSizeChange("small")
|
|
186
187
|
},
|
|
187
188
|
{
|
|
188
189
|
name: "Medium Font",
|
|
189
|
-
action: () => onFontSizeChange("medium")
|
|
190
|
+
action: () => onFontSizeChange == null ? void 0 : onFontSizeChange("medium")
|
|
190
191
|
},
|
|
191
192
|
{
|
|
192
193
|
name: "Large Font",
|
|
193
|
-
action: () => onFontSizeChange("large")
|
|
194
|
+
action: () => onFontSizeChange == null ? void 0 : onFontSizeChange("large")
|
|
194
195
|
}
|
|
195
196
|
],
|
|
196
|
-
disabled: !
|
|
197
|
+
disabled: !onFontSizeChange
|
|
197
198
|
});
|
|
198
199
|
return columnMenuItems;
|
|
199
200
|
};
|