sccoreui 5.9.94 → 5.9.96
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.
|
@@ -9,8 +9,9 @@ const client_side_row_model_1 = require("@ag-grid-community/client-side-row-mode
|
|
|
9
9
|
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
|
+
const server_side_row_model_1 = require("@ag-grid-enterprise/server-side-row-model");
|
|
12
13
|
const LicenceKey_1 = require("./LicenceKey");
|
|
13
|
-
core_1.ModuleRegistry.registerModules([client_side_row_model_1.ClientSideRowModelModule, range_selection_1.RangeSelectionModule, infinite_row_model_1.InfiniteRowModelModule]);
|
|
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]);
|
|
14
15
|
core_2.LicenseManager.setLicenseKey(LicenceKey_1.LICENSEKEY);
|
|
15
16
|
const AgGrid = ({ style, gridOptions, onGridReady, gridRef }) => {
|
|
16
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)) })) }));
|
|
@@ -126,8 +126,10 @@ function ParentForGrid(props) {
|
|
|
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
|
-
|
|
130
|
-
|
|
129
|
+
if (props.rowModelType !== constants_1.ROWMODELTYPE.SERVER_SIDE) {
|
|
130
|
+
gridRef.current.api.showLoadingOverlay();
|
|
131
|
+
}
|
|
132
|
+
const response = yield (props === null || props === void 0 ? void 0 : props.getRowData(startRow, endRow, currentFeatures));
|
|
131
133
|
setGridData(Object.assign(Object.assign({}, gridData), { rowData: [] }));
|
|
132
134
|
// Clear selected checkbox
|
|
133
135
|
// setFeatureDetails((prev: any) => ({ ...prev, checkBoxSelection: initialCheckBoxData }));
|
|
@@ -190,6 +192,29 @@ function ParentForGrid(props) {
|
|
|
190
192
|
};
|
|
191
193
|
params.api.setGridOption("datasource", dataSource);
|
|
192
194
|
}
|
|
195
|
+
else if (props.rowModelType === constants_1.ROWMODELTYPE.SERVER_SIDE) {
|
|
196
|
+
const dataSource = {
|
|
197
|
+
getRows: (params) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
198
|
+
const startRow = params.request.startRow;
|
|
199
|
+
const endRow = params.request.endRow;
|
|
200
|
+
console.log("[Datasource] - rows requested by grid: ", params.request);
|
|
201
|
+
// get data for request from our fake server
|
|
202
|
+
const response = yield getData(startRow, endRow, currentFeatures);
|
|
203
|
+
// simulating real server call with a 500ms delay
|
|
204
|
+
setTimeout(() => {
|
|
205
|
+
var _a;
|
|
206
|
+
if (((_a = response.rowData) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
207
|
+
// supply rows for requested block to grid
|
|
208
|
+
params.success({ rowData: response.rowData });
|
|
209
|
+
}
|
|
210
|
+
else {
|
|
211
|
+
params.fail();
|
|
212
|
+
}
|
|
213
|
+
}, 500);
|
|
214
|
+
}),
|
|
215
|
+
};
|
|
216
|
+
params.api.setGridOption("serverSideDatasource", dataSource);
|
|
217
|
+
}
|
|
193
218
|
});
|
|
194
219
|
// Options that grid should have
|
|
195
220
|
const gridOptions = {
|
|
@@ -219,7 +244,8 @@ function ParentForGrid(props) {
|
|
|
219
244
|
noRowsOverlayComponent: props === null || props === void 0 ? void 0 : props.noRowsOverlayComponent,
|
|
220
245
|
loadingOverlayComponent: loading_component_1.default,
|
|
221
246
|
suppressCellFocus: true,
|
|
222
|
-
suppressPropertyNamesCheck: true
|
|
247
|
+
suppressPropertyNamesCheck: true,
|
|
248
|
+
suppressServerSideFullWidthLoadingRow: true
|
|
223
249
|
};
|
|
224
250
|
// Fucntion to call the grid
|
|
225
251
|
const callGrid = (featureDetails) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sccoreui",
|
|
3
|
-
"version": "5.9.
|
|
3
|
+
"version": "5.9.96",
|
|
4
4
|
"description": "ui-sccore",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -29,11 +29,6 @@
|
|
|
29
29
|
"sass": "^1.62.1"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@ag-grid-community/client-side-row-model": "^31.2.1",
|
|
33
|
-
"@ag-grid-community/infinite-row-model": "^31.2.1",
|
|
34
|
-
"@ag-grid-community/react": "^31.2.1",
|
|
35
|
-
"@ag-grid-enterprise/core": "^31.2.1",
|
|
36
|
-
"@ag-grid-enterprise/range-selection": "^31.2.1",
|
|
37
32
|
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
|
|
38
33
|
"ag-grid-react": "^31.2.1",
|
|
39
34
|
"axios": "^1.6.8",
|
|
@@ -45,15 +40,42 @@
|
|
|
45
40
|
"primeicons": "^6.0.1",
|
|
46
41
|
"primereact": "^9.5.0",
|
|
47
42
|
"quill": "^1.3.7",
|
|
48
|
-
"react": "^18.2.0",
|
|
49
43
|
"react-color": "^2.19.3",
|
|
50
|
-
"react-dom": "^18.2.0",
|
|
51
44
|
"react-froala-wysiwyg": "^4.1.2",
|
|
52
45
|
"react-phone-number-input": "^3.3.6",
|
|
53
46
|
"react-router-dom": "^6.12.0",
|
|
54
47
|
"react-scripts": "^5.0.1",
|
|
55
48
|
"typescript": "^4.9.5",
|
|
56
|
-
"yup": "^1.3.2"
|
|
49
|
+
"yup": "^1.3.2",
|
|
50
|
+
"react": "18",
|
|
51
|
+
"react-dom": "18",
|
|
52
|
+
"@types/react": "18",
|
|
53
|
+
"@types/react-dom": "18",
|
|
54
|
+
"@ag-grid-community/react": "^31.3.2",
|
|
55
|
+
"@ag-grid-community/core": "^31.3.2",
|
|
56
|
+
"@ag-grid-community/styles": "^31.3.2",
|
|
57
|
+
"@ag-grid-community/client-side-row-model": "^31.3.2",
|
|
58
|
+
"@ag-grid-community/infinite-row-model": "^31.3.2",
|
|
59
|
+
"@ag-grid-community/csv-export": "^31.3.2",
|
|
60
|
+
"@ag-grid-enterprise/core": "^31.3.2",
|
|
61
|
+
"@ag-grid-enterprise/charts-enterprise": "^31.3.2",
|
|
62
|
+
"@ag-grid-enterprise/sparklines": "^31.3.2",
|
|
63
|
+
"@ag-grid-enterprise/clipboard": "^31.3.2",
|
|
64
|
+
"@ag-grid-enterprise/column-tool-panel": "^31.3.2",
|
|
65
|
+
"@ag-grid-enterprise/excel-export": "^31.3.2",
|
|
66
|
+
"@ag-grid-enterprise/filter-tool-panel": "^31.3.2",
|
|
67
|
+
"@ag-grid-enterprise/master-detail": "^31.3.2",
|
|
68
|
+
"@ag-grid-enterprise/menu": "^31.3.2",
|
|
69
|
+
"@ag-grid-enterprise/range-selection": "^31.3.2",
|
|
70
|
+
"@ag-grid-enterprise/rich-select": "^31.3.2",
|
|
71
|
+
"@ag-grid-enterprise/row-grouping": "^31.3.2",
|
|
72
|
+
"@ag-grid-enterprise/server-side-row-model": "^31.3.2",
|
|
73
|
+
"@ag-grid-enterprise/set-filter": "^31.3.2",
|
|
74
|
+
"@ag-grid-enterprise/multi-filter": "^31.3.2",
|
|
75
|
+
"@ag-grid-enterprise/advanced-filter": "^31.3.2",
|
|
76
|
+
"@ag-grid-enterprise/side-bar": "^31.3.2",
|
|
77
|
+
"@ag-grid-enterprise/status-bar": "^31.3.2",
|
|
78
|
+
"@ag-grid-enterprise/viewport-row-model": "^31.3.2"
|
|
57
79
|
},
|
|
58
80
|
"browserslist": {
|
|
59
81
|
"production": [
|