sccoreui 5.9.98 → 6.0.0

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.
@@ -10,10 +10,23 @@ const core_2 = require("@ag-grid-enterprise/core");
10
10
  const range_selection_1 = require("@ag-grid-enterprise/range-selection");
11
11
  const infinite_row_model_1 = require("@ag-grid-community/infinite-row-model");
12
12
  const server_side_row_model_1 = require("@ag-grid-enterprise/server-side-row-model");
13
+ const row_grouping_1 = require("@ag-grid-enterprise/row-grouping");
13
14
  const LicenceKey_1 = require("./LicenceKey");
14
- core_1.ModuleRegistry.registerModules([client_side_row_model_1.ClientSideRowModelModule, range_selection_1.RangeSelectionModule, infinite_row_model_1.InfiniteRowModelModule, server_side_row_model_1.ServerSideRowModelModule]);
15
+ const react_2 = require("react");
16
+ core_1.ModuleRegistry.registerModules([client_side_row_model_1.ClientSideRowModelModule, range_selection_1.RangeSelectionModule, infinite_row_model_1.InfiniteRowModelModule, server_side_row_model_1.ServerSideRowModelModule, row_grouping_1.RowGroupingModule]);
15
17
  core_2.LicenseManager.setLicenseKey(LicenceKey_1.LICENSEKEY);
16
18
  const AgGrid = ({ style, gridOptions, onGridReady, gridRef }) => {
17
- return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)("div", Object.assign({ className: "ag-theme-quartz ", style: { height: style.height, width: style.width } }, { children: (0, jsx_runtime_1.jsx)(react_1.AgGridReact, Object.assign({ ref: gridRef, onGridReady: onGridReady, reactiveCustomComponents: true }, gridOptions)) })) }));
19
+ // Group info
20
+ const autoGroupColumnDef = (0, react_2.useMemo)(() => {
21
+ return {
22
+ headerName: "Group",
23
+ field: "group",
24
+ cellRenderer: "agGroupCellRenderer",
25
+ cellRendererParams: {
26
+ suppressCount: true,
27
+ },
28
+ };
29
+ }, []);
30
+ return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)("div", Object.assign({ className: "ag-theme-quartz ", style: { height: style.height, width: style.width } }, { children: (0, jsx_runtime_1.jsx)(react_1.AgGridReact, Object.assign({ ref: gridRef, onGridReady: onGridReady, reactiveCustomComponents: true, autoGroupColumnDef: autoGroupColumnDef }, gridOptions)) })) }));
18
31
  };
19
32
  exports.default = AgGrid;
@@ -137,7 +137,7 @@ const TableFilter = () => {
137
137
  setAllFieldsFilled(isAllFieldsFilled && enbleApply);
138
138
  }, [conditionsArray, enbleApply]);
139
139
  console.log(isOverlayOpened, globalFilters.length, 'toggle property');
140
- return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("div", Object.assign({ className: `cursor-pointer filter-btn-grid font-semibold sc_icon_hover flex align-items-center gap-2 border-round-lg ${isOverlayOpened ||
140
+ return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("div", Object.assign({ className: `cursor-pointer filter-btn-grid font-semibold hover:bg-primary-50 sc_icon_hover flex align-items-center gap-2 border-round-lg ${isOverlayOpened ||
141
141
  (globalFilters === null || globalFilters === void 0 ? void 0 : globalFilters.filter((each) => each.isActive).length) >= 1
142
142
  ? "bg-primary-50"
143
143
  : "bg-white"}` }, { children: (0, jsx_runtime_1.jsxs)("span", Object.assign({ onClick: (e) => onClickFilter(e), className: "flex" }, { children: [(0, jsx_runtime_1.jsx)(svg_component_1.default, { icon: "filter-lines", size: 18, color: isOverlayOpened ||
@@ -122,14 +122,14 @@ function ParentForGrid(props) {
122
122
  return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex align-items-center" }, { children: [(0, jsx_runtime_1.jsx)("div", Object.assign({ className: "pr-3 flex align-items-center" }, { children: cellCheckBoxRenderer(cellRendererParams) })), typeof initialRenderer === "function" ? (initialRenderer(cellRendererParams)) : ((0, jsx_runtime_1.jsx)("div", { children: (_a = cellRendererParams === null || cellRendererParams === void 0 ? void 0 : cellRendererParams.data) === null || _a === void 0 ? void 0 : _a[column === null || column === void 0 ? void 0 : column.field] }))] })));
123
123
  };
124
124
  // Callback to products for getting data
125
- const getData = (startRow, endRow, currentFeatures) => tslib_1.__awaiter(this, void 0, void 0, function* () {
125
+ const getData = (startRow, endRow, currentFeatures, params) => tslib_1.__awaiter(this, void 0, void 0, function* () {
126
126
  if (!(props === null || props === void 0 ? void 0 : props.getRowData)) {
127
127
  return emptyResponse; // If callback function to get row data is not provided
128
128
  }
129
129
  if (props.rowModelType !== constants_1.ROWMODELTYPE.SERVER_SIDE) {
130
130
  gridRef.current.api.showLoadingOverlay();
131
131
  }
132
- const response = yield (props === null || props === void 0 ? void 0 : props.getRowData(startRow, endRow, currentFeatures));
132
+ const response = yield (props === null || props === void 0 ? void 0 : props.getRowData(startRow, endRow, currentFeatures, params));
133
133
  setGridData(Object.assign(Object.assign({}, gridData), { rowData: [] }));
134
134
  // Clear selected checkbox
135
135
  // setFeatureDetails((prev: any) => ({ ...prev, checkBoxSelection: initialCheckBoxData }));
@@ -199,9 +199,10 @@ function ParentForGrid(props) {
199
199
  const startRow = params.request.startRow;
200
200
  const endRow = params.request.endRow;
201
201
  // get data for request from our fake server
202
- const response = yield getData(startRow, endRow, currentFeatures);
202
+ const response = yield getData(startRow, endRow, currentFeatures, params === null || params === void 0 ? void 0 : params.request);
203
203
  // simulating real server call with a 500ms delay
204
204
  if (((_g = response.rowData) === null || _g === void 0 ? void 0 : _g.length) > 0) {
205
+ gridRef.current.api.hideOverlay();
205
206
  // supply rows for requested block to grid
206
207
  params.success({ rowData: response.rowData, rowCount: response === null || response === void 0 ? void 0 : response.actualEndRow });
207
208
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sccoreui",
3
- "version": "5.9.98",
3
+ "version": "6.0.00",
4
4
  "description": "ui-sccore",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",