sccoreui 6.1.22 → 6.1.24
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DEFAULTS = exports.FILEEXTENSIONTYPE = exports.IMAGETYPES = exports.STATUSLIST = exports.SETUPPRICEOPTIONS = exports.PRICINGTYPE = exports.BUNDLETYPE = exports.BUNDLEQUANTITYTYPE = exports.DEFAULTGUID = exports.CATEGORYTYPE = exports.PRODUCTDISCOUNTTYPE = exports.GRID_CHECKBOX_STATUS = exports.conditionsList = exports.PRODUCTTYPE = exports.ROW_HEIGHT = exports.DEBOUNCE_INTERVAL = exports.MAX_BLOCKS = exports.MAX_RECORDS_TO_LOAD = exports.BLOCK_SIZE = exports.ROWMODELTYPE = exports.COLUMN_SORT_OPTIONS = void 0;
|
|
3
|
+
exports.DEFAULTS = exports.FILEEXTENSIONTYPE = exports.IMAGETYPES = exports.STATUSLIST = exports.SETUPPRICEOPTIONS = exports.PRICINGTYPE = exports.BUNDLETYPE = exports.BUNDLEQUANTITYTYPE = exports.DEFAULTGUID = exports.CATEGORYTYPE = exports.PRODUCTDISCOUNTTYPE = exports.EMPTY_RECORD = exports.GRID_CHECKBOX_STATUS = exports.conditionsList = exports.PRODUCTTYPE = exports.ROW_HEIGHT = exports.DEBOUNCE_INTERVAL = exports.MAX_BLOCKS = exports.MAX_RECORDS_TO_LOAD = exports.BLOCK_SIZE = exports.ROWMODELTYPE = exports.COLUMN_SORT_OPTIONS = void 0;
|
|
4
4
|
const Types_1 = require("./Types");
|
|
5
5
|
exports.COLUMN_SORT_OPTIONS = [
|
|
6
6
|
{ id: 1, label: "Low - High", sortId: 1, dataType: Types_1.ATTRIBUTEDATATYPES.INTEGER },
|
|
@@ -294,4 +294,5 @@ var GRID_CHECKBOX_STATUS;
|
|
|
294
294
|
GRID_CHECKBOX_STATUS[GRID_CHECKBOX_STATUS["CHECKED"] = 2] = "CHECKED";
|
|
295
295
|
GRID_CHECKBOX_STATUS[GRID_CHECKBOX_STATUS["UNCHECKED"] = 3] = "UNCHECKED";
|
|
296
296
|
})(GRID_CHECKBOX_STATUS = exports.GRID_CHECKBOX_STATUS || (exports.GRID_CHECKBOX_STATUS = {}));
|
|
297
|
+
exports.EMPTY_RECORD = "--";
|
|
297
298
|
exports.default = constants;
|
|
@@ -96,6 +96,9 @@ const fillOperation = (params, api, parentRowData, editedRecords, setEditedRecor
|
|
|
96
96
|
const rowData = rowNode === null || rowNode === void 0 ? void 0 : rowNode.data;
|
|
97
97
|
// Check if rowData exists and update the field
|
|
98
98
|
if (rowData && (rowNode.id != parentRowData.id)) {
|
|
99
|
+
// if( rowData?.[columnDetails?.field] == EMPTY_RECORD || rowData?.type !== parentRowData?.type || !rowData?.[columnDetails?.field] ){
|
|
100
|
+
// continue
|
|
101
|
+
// }
|
|
99
102
|
rowData[columnDetails === null || columnDetails === void 0 ? void 0 : columnDetails.field] = parentRowData[columnDetails === null || columnDetails === void 0 ? void 0 : columnDetails.field];
|
|
100
103
|
const schemaForEdit = {
|
|
101
104
|
row: rowData,
|
|
@@ -189,7 +189,7 @@ function ParentForGrid(props) {
|
|
|
189
189
|
else if (props.rowModelType === constants_1.ROWMODELTYPE.SERVER_SIDE) {
|
|
190
190
|
const dataSource = {
|
|
191
191
|
getRows: (params) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
192
|
-
var _j;
|
|
192
|
+
var _j, _k;
|
|
193
193
|
const startRow = params.request.startRow;
|
|
194
194
|
const endRow = params.request.endRow;
|
|
195
195
|
// Scroll should not exit MAX_RECORDS_TO_LOAD
|
|
@@ -203,7 +203,7 @@ function ParentForGrid(props) {
|
|
|
203
203
|
return;
|
|
204
204
|
}
|
|
205
205
|
// get data for request from our fake server
|
|
206
|
-
const response = yield getData(startRow, endRow, currentFeatures, params
|
|
206
|
+
const response = yield getData(startRow, endRow, currentFeatures, params);
|
|
207
207
|
// simulating real server call with a 500ms delay
|
|
208
208
|
if (((_j = response.rowData) === null || _j === void 0 ? void 0 : _j.length) > 0) {
|
|
209
209
|
setGridData(Object.assign(Object.assign({}, gridData), { rowData: response.rowData }));
|
|
@@ -215,7 +215,8 @@ function ParentForGrid(props) {
|
|
|
215
215
|
else {
|
|
216
216
|
// params.fail();
|
|
217
217
|
const gridRows = startRow >= constants_1.BLOCK_SIZE ? gridData.rowData : [];
|
|
218
|
-
|
|
218
|
+
if (!((_k = params === null || params === void 0 ? void 0 : params.parentNode) === null || _k === void 0 ? void 0 : _k.id))
|
|
219
|
+
gridRef.current.api.showNoRowsOverlay();
|
|
219
220
|
params.success({ rowData: gridRows });
|
|
220
221
|
return;
|
|
221
222
|
}
|
|
@@ -235,6 +236,11 @@ function ParentForGrid(props) {
|
|
|
235
236
|
const wrapperToFillOpertation = (params) => {
|
|
236
237
|
(0, helper_1.fillOperation)(params, api, initalDragRowData, props === null || props === void 0 ? void 0 : props.editedRecords, props === null || props === void 0 ? void 0 : props.setEditedRecords);
|
|
237
238
|
};
|
|
239
|
+
const myOpertaion = (fillOperationParams) => {
|
|
240
|
+
return fillOperationParams.rowNode.data[fillOperationParams.column.colId];
|
|
241
|
+
};
|
|
242
|
+
// const returnRenderColumn = useCallback(() => {
|
|
243
|
+
// let columnToReturn: ColumnDef[] = [];
|
|
238
244
|
// const returnRenderColumn = useCallback(() => {
|
|
239
245
|
// let columnToReturn: ColumnDef[] = [];
|
|
240
246
|
// gridData.columnData.filter((column) => {
|
|
@@ -280,6 +286,7 @@ function ParentForGrid(props) {
|
|
|
280
286
|
enableRangeSelection: (_a = props === null || props === void 0 ? void 0 : props.conditionsToDisplay) === null || _a === void 0 ? void 0 : _a.enableFillHandle,
|
|
281
287
|
enableFillHandle: (_b = props === null || props === void 0 ? void 0 : props.conditionsToDisplay) === null || _b === void 0 ? void 0 : _b.enableFillHandle,
|
|
282
288
|
onFillEnd: wrapperToFillOpertation,
|
|
289
|
+
fillOperation: myOpertaion,
|
|
283
290
|
onCellMouseDown: onCellMouseDown,
|
|
284
291
|
getRowId: getRowId,
|
|
285
292
|
fillHandleDirection: 'y'
|
|
@@ -94,5 +94,6 @@ export declare enum GRID_CHECKBOX_STATUS {
|
|
|
94
94
|
CHECKED = 2,
|
|
95
95
|
UNCHECKED = 3
|
|
96
96
|
}
|
|
97
|
+
export declare const EMPTY_RECORD = "--";
|
|
97
98
|
export { PRODUCTDISCOUNTTYPE, CATEGORYTYPE, DEFAULTGUID, BUNDLEQUANTITYTYPE, BUNDLETYPE, PRICINGTYPE, SETUPPRICEOPTIONS, STATUSLIST, IMAGETYPES, FILEEXTENSIONTYPE, DEFAULTS };
|
|
98
99
|
export default constants;
|