@nokecy/qc-ui 0.0.3 → 0.0.4

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.
@@ -172,8 +172,8 @@ function AgGridPlus(props) {
172
172
  };
173
173
 
174
174
  var actionDom = (0, _react.useMemo)(function () {
175
- return toolBarRender && toolBarRender();
176
- }, []);
175
+ return toolBarRender && toolBarRender(apiRef.current, (0, _utils.convertFilterModel)(queryFilter), queryFilter);
176
+ }, [apiRef, columnsRef, queryFilter]);
177
177
 
178
178
  var sortChanged = function sortChanged(columnApi) {
179
179
  var sortedColumn = columnApi.getColumnState().find(function (col) {
@@ -1,3 +1,4 @@
1
1
  import AgGridPlus from "./ag-gridPlus";
2
2
  import { AgGridColumn } from "./interface";
3
+ export * from "./utils";
3
4
  export { AgGridPlus, AgGridColumn };
@@ -3,6 +3,10 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
+ var _exportNames = {
7
+ AgGridPlus: true,
8
+ AgGridColumn: true
9
+ };
6
10
  Object.defineProperty(exports, "AgGridColumn", {
7
11
  enumerable: true,
8
12
  get: function get() {
@@ -20,4 +24,18 @@ var _agGridPlus = _interopRequireDefault(require("./ag-gridPlus"));
20
24
 
21
25
  var _interface = require("./interface");
22
26
 
27
+ var _utils = require("./utils");
28
+
29
+ Object.keys(_utils).forEach(function (key) {
30
+ if (key === "default" || key === "__esModule") return;
31
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
32
+ if (key in exports && exports[key] === _utils[key]) return;
33
+ Object.defineProperty(exports, key, {
34
+ enumerable: true,
35
+ get: function get() {
36
+ return _utils[key];
37
+ }
38
+ });
39
+ });
40
+
23
41
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -10,7 +10,7 @@ interface GridProps extends AgGridReactProps {
10
10
  dataSource?: any[];
11
11
  search?: boolean;
12
12
  headerTitle?: React.ReactNode;
13
- toolBarRender?: (gridApi?: GridApi) => React.ReactNode[];
13
+ toolBarRender?: (gridApi?: GridApi, filter?: string, queryFilter?: any) => React.ReactNode[];
14
14
  columnDefs?: any;
15
15
  }
16
16
  interface AgGridColumnPropsClone extends AgGridColumnProps {
@@ -146,8 +146,8 @@ function AgGridPlus(props) {
146
146
  };
147
147
 
148
148
  var actionDom = useMemo(function () {
149
- return toolBarRender && toolBarRender();
150
- }, []);
149
+ return toolBarRender && toolBarRender(apiRef.current, convertFilterModel(queryFilter), queryFilter);
150
+ }, [apiRef, columnsRef, queryFilter]);
151
151
 
152
152
  var sortChanged = function sortChanged(columnApi) {
153
153
  var sortedColumn = columnApi.getColumnState().find(function (col) {
@@ -1,3 +1,4 @@
1
1
  import AgGridPlus from "./ag-gridPlus";
2
2
  import { AgGridColumn } from "./interface";
3
+ export * from "./utils";
3
4
  export { AgGridPlus, AgGridColumn };
@@ -1,3 +1,4 @@
1
1
  import AgGridPlus from "./ag-gridPlus";
2
2
  import { AgGridColumn } from "./interface";
3
+ export * from "./utils";
3
4
  export { AgGridPlus, AgGridColumn };
@@ -10,7 +10,7 @@ interface GridProps extends AgGridReactProps {
10
10
  dataSource?: any[];
11
11
  search?: boolean;
12
12
  headerTitle?: React.ReactNode;
13
- toolBarRender?: (gridApi?: GridApi) => React.ReactNode[];
13
+ toolBarRender?: (gridApi?: GridApi, filter?: string, queryFilter?: any) => React.ReactNode[];
14
14
  columnDefs?: any;
15
15
  }
16
16
  interface AgGridColumnPropsClone extends AgGridColumnProps {