impact-ui 5.0.1-alpha.2 → 5.0.1-alpha.3
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/index3.js +4 -2
- package/dist/_virtual/index4.js +4 -2
- package/dist/_virtual/index5.js +2 -4
- package/dist/_virtual/index6.js +2 -4
- package/dist/components/TableV36/advanceSearchModal.d.ts.map +1 -1
- package/dist/components/TableV36/filterUtils.d.ts +15 -0
- package/dist/components/TableV36/filterUtils.d.ts.map +1 -1
- package/dist/components/TableV36/filterUtils.js +68 -3
- package/dist/components/TableV36/index.d.ts.map +1 -1
- package/dist/components/TableV36/index.js +3 -2
- package/dist/mcp-component-registry.json +1 -1
- 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/dist/node_modules/react-is/index.js +1 -1
- package/package.json +1 -1
package/dist/_virtual/index3.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
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);
|
|
2
4
|
export {
|
|
3
|
-
|
|
5
|
+
require$$1 as default
|
|
4
6
|
};
|
package/dist/_virtual/index4.js
CHANGED
|
@@ -1,4 +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
4
|
export {
|
|
3
|
-
|
|
5
|
+
require$$2 as default
|
|
4
6
|
};
|
package/dist/_virtual/index5.js
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
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
|
-
|
|
3
|
+
reactIs as __module
|
|
6
4
|
};
|
package/dist/_virtual/index6.js
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import * as index from "../node_modules/@mui/system/node_modules/@mui/utils/esm/clamp/index.js";
|
|
3
|
-
const require$$2 = /* @__PURE__ */ getAugmentedNamespace(index);
|
|
1
|
+
var reactIs = { exports: {} };
|
|
4
2
|
export {
|
|
5
|
-
|
|
3
|
+
reactIs as __module
|
|
6
4
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"advanceSearchModal.d.ts","sourceRoot":"","sources":["../../../src/components/TableV36/advanceSearchModal.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"advanceSearchModal.d.ts","sourceRoot":"","sources":["../../../src/components/TableV36/advanceSearchModal.tsx"],"names":[],"mappings":"AA0BA,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,EACzC,eAAe,EACf,mBAAmB,EACnB,OAAO,EACP,SAAS,EACT,eAAe,EACf,wBAAwB,EACxB,iBAAiB,EACjB,cAA+D,EAC/D,gCAAgC,EAChC,mCAAmC,EACnC,WAAW,EACX,cAAc,EACd,GAAG,IAAI,EACR;;;;;;;;;;;;;;;;;;CAAA,2CAqqBA"}
|
|
@@ -141,6 +141,21 @@ export declare const updateOrAddFilter: (existingFilters: any, columnId: any, va
|
|
|
141
141
|
* @param {function} getOptionFromDropdownValue - Function to convert dropdown values
|
|
142
142
|
*/
|
|
143
143
|
export declare const syncFiltersWithModal: (api: any, currentColumnId: any, inputValue: any, columnDef: any, colDefs: any, setValue: any, setInitialFilters: any, getOptionFromDropdownValue: any) => void;
|
|
144
|
+
/**
|
|
145
|
+
* Resolves the AG Grid filterModel key for an advance-search field.
|
|
146
|
+
* Prefers columnFieldsFilterMap, then colId / field / advance field.
|
|
147
|
+
*/
|
|
148
|
+
export declare const resolveFilterModelColumnKey: (columnDef: any, advanceField: any) => any;
|
|
149
|
+
/**
|
|
150
|
+
* Builds hidden AG Grid columns for `columnFieldsFilterMap` values that are not
|
|
151
|
+
* already real columns. Without these, setFilterModel drops the mapped keys.
|
|
152
|
+
* Each virtual column filters against the parent column's row-data field.
|
|
153
|
+
*/
|
|
154
|
+
export declare const createVirtualFilterColumns: (colDefs: any) => any[];
|
|
155
|
+
/**
|
|
156
|
+
* Appends hidden virtual filter columns for columnFieldsFilterMap values.
|
|
157
|
+
*/
|
|
158
|
+
export declare const appendVirtualFilterColumns: (colDefs: any) => any;
|
|
144
159
|
/**
|
|
145
160
|
* Processes advance search filters and builds AG Grid filter model
|
|
146
161
|
* @param {array} formValues - Array of filter objects from form
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filterUtils.d.ts","sourceRoot":"","sources":["../../../src/components/TableV36/filterUtils.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,wBAAwB,GAAI,cAAS,QAoDjD,CAAC;AAGF,eAAO,MAAM,4BAA4B,GAAI,cAAS,EAAE,aAAa,QAyBpE,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,GAAI,UAAK,QAMtC,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,wBAAwB,GAClC,iBAAY,MACZ,WAAM,QAMN,CAAC;AAEJ;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,GAAI,UAAK,EAAE,cAAS;;;CA4EhD,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,GAAI,QAAG,EAAE,aAAQ,YAQ/C,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,qBAAqB,GAAI,gBAAW,EAAE,eAAU,EAAE,cAAS,EAAE,oBAAoB,QAsI7F,CA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AAO,EACP,aAAQ,EACR,sBAAiB,EACjB,+BAA0B,SA2B3B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,2BAA2B,GAAI,cAAS,EAAE,iBAAY,QAGlE,CAAC;AAgBF;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,GAAI,YAAO,UAwCjD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,0BAA0B,GAAI,YAAO,QAMjD,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B,GAAI,eAAU,EAAE,YAAO,OAsChE,CAAC"}
|
|
@@ -470,13 +470,76 @@ const syncFiltersWithModal = (api, currentColumnId, inputValue, columnDef, colDe
|
|
|
470
470
|
console.warn("Error syncing modal filters:", err);
|
|
471
471
|
}
|
|
472
472
|
};
|
|
473
|
+
const resolveFilterModelColumnKey = (columnDef, advanceField) => {
|
|
474
|
+
var _a;
|
|
475
|
+
const mappedKey = (_a = columnDef == null ? void 0 : columnDef.columnFieldsFilterMap) == null ? void 0 : _a[advanceField];
|
|
476
|
+
return mappedKey || (columnDef == null ? void 0 : columnDef.colId) || (columnDef == null ? void 0 : columnDef.field) || advanceField;
|
|
477
|
+
};
|
|
478
|
+
const collectExistingColumnIds = (colDefs, ids = /* @__PURE__ */ new Set()) => {
|
|
479
|
+
(colDefs || []).forEach((col) => {
|
|
480
|
+
if (col.children) {
|
|
481
|
+
collectExistingColumnIds(col.children, ids);
|
|
482
|
+
}
|
|
483
|
+
if (col.colId) ids.add(col.colId);
|
|
484
|
+
if (col.field) ids.add(col.field);
|
|
485
|
+
});
|
|
486
|
+
return ids;
|
|
487
|
+
};
|
|
488
|
+
const createVirtualFilterColumns = (colDefs) => {
|
|
489
|
+
const virtualCols = [];
|
|
490
|
+
const existingIds = collectExistingColumnIds(colDefs);
|
|
491
|
+
const walk = (cols) => {
|
|
492
|
+
(cols || []).forEach((col) => {
|
|
493
|
+
if (col.children) {
|
|
494
|
+
walk(col.children);
|
|
495
|
+
}
|
|
496
|
+
if (!col.columnFieldsFilterMap) {
|
|
497
|
+
return;
|
|
498
|
+
}
|
|
499
|
+
const parentField = col.field;
|
|
500
|
+
Object.entries(col.columnFieldsFilterMap).forEach(([advanceField, mappedKey]) => {
|
|
501
|
+
if (!mappedKey || existingIds.has(mappedKey)) {
|
|
502
|
+
return;
|
|
503
|
+
}
|
|
504
|
+
existingIds.add(mappedKey);
|
|
505
|
+
virtualCols.push({
|
|
506
|
+
colId: mappedKey,
|
|
507
|
+
field: mappedKey,
|
|
508
|
+
headerName: advanceField,
|
|
509
|
+
hide: true,
|
|
510
|
+
lockVisible: true,
|
|
511
|
+
suppressColumnsToolPanel: true,
|
|
512
|
+
// Keep out of advance-search option lists
|
|
513
|
+
advanceSearchEnabled: false,
|
|
514
|
+
isSearchable: false,
|
|
515
|
+
filter: col.filter || "agTextColumnFilter",
|
|
516
|
+
type: col.type,
|
|
517
|
+
filterParams: col.filterParams,
|
|
518
|
+
valueGetter: (params) => {
|
|
519
|
+
var _a;
|
|
520
|
+
return parentField != null ? (_a = params.data) == null ? void 0 : _a[parentField] : void 0;
|
|
521
|
+
}
|
|
522
|
+
});
|
|
523
|
+
});
|
|
524
|
+
});
|
|
525
|
+
};
|
|
526
|
+
walk(colDefs);
|
|
527
|
+
return virtualCols;
|
|
528
|
+
};
|
|
529
|
+
const appendVirtualFilterColumns = (colDefs) => {
|
|
530
|
+
if (!Array.isArray(colDefs) || colDefs.length === 0) {
|
|
531
|
+
return colDefs;
|
|
532
|
+
}
|
|
533
|
+
const virtualCols = createVirtualFilterColumns(colDefs);
|
|
534
|
+
return virtualCols.length > 0 ? [...colDefs, ...virtualCols] : colDefs;
|
|
535
|
+
};
|
|
473
536
|
const buildAdvanceSearchFilterModel = (formValues, colDefs) => {
|
|
474
537
|
const filterModel = {};
|
|
475
538
|
if (!formValues || !Array.isArray(formValues)) {
|
|
476
539
|
return filterModel;
|
|
477
540
|
}
|
|
478
541
|
formValues.forEach((value) => {
|
|
479
|
-
var _a, _b
|
|
542
|
+
var _a, _b;
|
|
480
543
|
if (!((_a = value == null ? void 0 : value.column) == null ? void 0 : _a.value) || !((_b = value == null ? void 0 : value.operation) == null ? void 0 : _b.value)) {
|
|
481
544
|
return;
|
|
482
545
|
}
|
|
@@ -489,8 +552,7 @@ const buildAdvanceSearchFilterModel = (formValues, colDefs) => {
|
|
|
489
552
|
return;
|
|
490
553
|
}
|
|
491
554
|
const advanceField = value.column.value;
|
|
492
|
-
const
|
|
493
|
-
const columnKey = mappedKey || columnDef.colId || advanceField;
|
|
555
|
+
const columnKey = resolveFilterModelColumnKey(columnDef, advanceField);
|
|
494
556
|
const filterEntry = buildFilterModelEntry(
|
|
495
557
|
parsedValue,
|
|
496
558
|
filterType,
|
|
@@ -504,10 +566,12 @@ const buildAdvanceSearchFilterModel = (formValues, colDefs) => {
|
|
|
504
566
|
return filterModel;
|
|
505
567
|
};
|
|
506
568
|
export {
|
|
569
|
+
appendVirtualFilterColumns,
|
|
507
570
|
buildAdvanceSearchFilterModel,
|
|
508
571
|
buildFilterModelEntry,
|
|
509
572
|
cleanNumericValue,
|
|
510
573
|
convertFilterToModalFormat,
|
|
574
|
+
createVirtualFilterColumns,
|
|
511
575
|
findColumnDef,
|
|
512
576
|
getColumnLabel,
|
|
513
577
|
getDefaultOperationForColumn,
|
|
@@ -518,6 +582,7 @@ export {
|
|
|
518
582
|
parseFilterValue,
|
|
519
583
|
parseInlineSearchValue,
|
|
520
584
|
resolveAdvanceSearchFieldFromFilterKey,
|
|
585
|
+
resolveFilterModelColumnKey,
|
|
521
586
|
syncFiltersWithModal,
|
|
522
587
|
updateOrAddFilter
|
|
523
588
|
};
|
|
@@ -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;AAyjE7B,eAAO,MAAM,QAAQ,mFAUnB,CAAC"}
|
|
@@ -12,7 +12,7 @@ import AgGridHeader from "./AgGridHeader.js";
|
|
|
12
12
|
import { AgGridHeaderGroup } from "./AgGridHeaderGroup.js";
|
|
13
13
|
import CellTooltip from "./CellTooltip.js";
|
|
14
14
|
import CommentsPortal from "./CommentsPortal.js";
|
|
15
|
-
import { buildAdvanceSearchFilterModel } from "./filterUtils.js";
|
|
15
|
+
import { appendVirtualFilterColumns, buildAdvanceSearchFilterModel } from "./filterUtils.js";
|
|
16
16
|
import NewAdvanceSearchModal from "./NewAdvanceSearchModal/NewAdvanceSearchModal.js";
|
|
17
17
|
import { getTableMeta, Columns, getMainMenuItems, updateFontSizeOnToolPanel } from "./tableFunctions.js";
|
|
18
18
|
import TableHeader from "./tableHeader.js";
|
|
@@ -806,6 +806,7 @@ const TableContent = forwardRef(
|
|
|
806
806
|
if (args.rowModelType === "infinite") {
|
|
807
807
|
computed = applyInfiniteSkeletonSelectorToColumns(computed);
|
|
808
808
|
}
|
|
809
|
+
computed = appendVirtualFilterColumns(computed);
|
|
809
810
|
return computed;
|
|
810
811
|
}, [columnDefs, tableFontSize, rowHeight, isCommentFeatureEnabled, defColDef, args.rowModelType]);
|
|
811
812
|
useEffect(() => {
|
|
@@ -975,7 +976,7 @@ const TableContent = forwardRef(
|
|
|
975
976
|
return;
|
|
976
977
|
}
|
|
977
978
|
const filterModel = buildAdvanceSearchFilterModel(formValues, colDefs);
|
|
978
|
-
api.setFilterModel(filterModel);
|
|
979
|
+
api.setFilterModel(Object.keys(filterModel).length > 0 ? filterModel : null);
|
|
979
980
|
if (onSearchApplyClick) {
|
|
980
981
|
onSearchApplyClick(formValues);
|
|
981
982
|
} else {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __exports as colorManipulator } from "../../../_virtual/colorManipulator.js";
|
|
2
2
|
import require$$0 from "@babel/runtime/helpers/interopRequireDefault";
|
|
3
|
-
import require$$1 from "../../../_virtual/
|
|
4
|
-
import require$$2 from "../../../_virtual/
|
|
3
|
+
import require$$1 from "../../../_virtual/index3.js";
|
|
4
|
+
import require$$2 from "../../../_virtual/index4.js";
|
|
5
5
|
var _interopRequireDefault = require$$0;
|
|
6
6
|
Object.defineProperty(colorManipulator, "__esModule", {
|
|
7
7
|
value: true
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __module as reactIs } from "../../../../_virtual/
|
|
1
|
+
import { __module as reactIs } from "../../../../_virtual/index6.js";
|
|
2
2
|
import { __require as requireReactIs_production_min } from "./cjs/react-is.production.min.js";
|
|
3
3
|
import { __require as requireReactIs_development } from "./cjs/react-is.development.js";
|
|
4
4
|
var hasRequiredReactIs;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __module as reactIs } from "../../_virtual/
|
|
1
|
+
import { __module as reactIs } from "../../_virtual/index5.js";
|
|
2
2
|
import { __require as requireReactIs_production } from "./cjs/react-is.production.js";
|
|
3
3
|
import { __require as requireReactIs_development } from "./cjs/react-is.development.js";
|
|
4
4
|
if (process.env.NODE_ENV === "production") {
|