sccoreui 6.3.40 → 6.3.41
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/components/ag-grid/AgGrid.js +10 -3
- package/dist/components/ag-grid/advancedFeature/global-search.js +9 -2
- package/dist/components/ag-grid/constants.js +2 -1
- package/dist/components/ag-grid/parent-for-grid.js +4 -4
- package/dist/types/components/ag-grid/AgGrid.d.ts +2 -1
- package/dist/types/components/ag-grid/constants.d.ts +1 -0
- package/package.json +1 -1
|
@@ -33,8 +33,15 @@ core_1.ModuleRegistry.registerModules([
|
|
|
33
33
|
excel_export_1.ExcelExportModule
|
|
34
34
|
]);
|
|
35
35
|
core_2.LicenseManager.setLicenseKey(LicenceKey_1.LICENSEKEY);
|
|
36
|
-
const AgGrid = ({ gridOptions, onGridReady, gridRef }) => {
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
const AgGrid = ({ gridOptions, onGridReady, gridRef, style }) => {
|
|
37
|
+
let newHeight;
|
|
38
|
+
if (typeof style.height === "string" && style.height.includes("px")) {
|
|
39
|
+
const value = Number(style.height.replace("px", ""));
|
|
40
|
+
newHeight = (value - 64) + "px";
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
newHeight = style.height;
|
|
44
|
+
}
|
|
45
|
+
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)("div", Object.assign({ className: "ag-theme-quartz ag-grid-div", style: { height: newHeight, width: style === null || style === void 0 ? void 0 : style.width } }, { children: (0, jsx_runtime_1.jsx)(react_1.AgGridReact, Object.assign({ ref: gridRef }, (onGridReady ? { onGridReady: onGridReady } : {}), { reactiveCustomComponents: true }, gridOptions)) })) }));
|
|
39
46
|
};
|
|
40
47
|
exports.default = AgGrid;
|
|
@@ -36,8 +36,15 @@ function Search({ searchPlaceHolder }) {
|
|
|
36
36
|
setFeatureDetails(Object.assign(Object.assign({}, featureDetails), { searchedText: deboucedValue }));
|
|
37
37
|
}
|
|
38
38
|
}, [deboucedValue]);
|
|
39
|
-
return (0, utilComponents_1.skeletonLoding)() ? ((0, jsx_runtime_1.jsx)(skeleton_1.Skeleton, { height: "40px", width: "336px" })) : ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: `p-input-icon-left ${
|
|
40
|
-
|
|
39
|
+
return (0, utilComponents_1.skeletonLoding)() ? ((0, jsx_runtime_1.jsx)(skeleton_1.Skeleton, { height: "40px", width: "336px" })) : ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: `p-input-icon-left ${inputValue.length > 0 ? "p-input-icon-right" : ""}` }, { children: [(0, jsx_runtime_1.jsx)("span", Object.assign({ className: "p-input-prefix zoom_animate" }, { children: (0, jsx_runtime_1.jsx)(svg_component_1.default, { color: "#667085", icon: "search-lg", size: 18, disabled: isDisabled }) })), inputValue.length > 0 && ((0, jsx_runtime_1.jsx)("span", Object.assign({ className: "p-input-suffix cursor-pointer zoom_animate", onClick: () => {
|
|
40
|
+
var _a, _b;
|
|
41
|
+
if (rowModelType === constants_1.ROWMODELTYPE.CLIENT_SIDE && quickSearch) {
|
|
42
|
+
(_a = gridApi === null || gridApi === void 0 ? void 0 : gridApi.current.api) === null || _a === void 0 ? void 0 : _a.setGridOption("quickFilterText", "");
|
|
43
|
+
(_b = gridApi === null || gridApi === void 0 ? void 0 : gridApi.current.api) === null || _b === void 0 ? void 0 : _b.hideOverlay();
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
setFeatureDetails(Object.assign(Object.assign({}, featureDetails), { searchedText: "" }));
|
|
47
|
+
}
|
|
41
48
|
setInputValue("");
|
|
42
49
|
}, title: "Clear" }, { children: (0, jsx_runtime_1.jsx)(svg_component_1.default, { icon: "x-close", size: 18 }) }))), (0, jsx_runtime_1.jsx)(inputtext_1.InputText, { value: inputValue, onChange: (e) => !isDisabled && setInputValue(e.target.value), className: "w-21rem", placeholder: searchPlaceHolder || "Search by name or code", disabled: isDisabled })] })));
|
|
43
50
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DEFAULTS = exports.EMPTY_RECORD = exports.GRID_CHECKBOX_STATUS = 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.EMPTY_RECORD = exports.GRID_CHECKBOX_STATUS = exports.AUTO_HEIGHT_ROWS = 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.FilterDataType.INTEGER },
|
|
@@ -20,6 +20,7 @@ exports.MAX_RECORDS_TO_LOAD = 2500;
|
|
|
20
20
|
exports.MAX_BLOCKS = exports.MAX_RECORDS_TO_LOAD / exports.BLOCK_SIZE;
|
|
21
21
|
exports.DEBOUNCE_INTERVAL = 200;
|
|
22
22
|
exports.ROW_HEIGHT = 60;
|
|
23
|
+
exports.AUTO_HEIGHT_ROWS = 5;
|
|
23
24
|
// max char limit (INPUT FIELDS)
|
|
24
25
|
let maxCodeLength = 250;
|
|
25
26
|
let maxNameLength = 250;
|
|
@@ -318,7 +318,7 @@ function ParentForGrid(props) {
|
|
|
318
318
|
props.getGridRef.current = gridRef.current;
|
|
319
319
|
}
|
|
320
320
|
}, [props === null || props === void 0 ? void 0 : props.getGridRef]);
|
|
321
|
-
const gridStyle = Object.assign({ width: (_c = props === null || props === void 0 ? void 0 : props.style) === null || _c === void 0 ? void 0 : _c.width }, (totalRecords >
|
|
321
|
+
const gridStyle = Object.assign({ width: (_c = props === null || props === void 0 ? void 0 : props.style) === null || _c === void 0 ? void 0 : _c.width }, (totalRecords > constants_1.AUTO_HEIGHT_ROWS || !((_d = props === null || props === void 0 ? void 0 : props.conditionsToDisplay) === null || _d === void 0 ? void 0 : _d.isGridAutoHeight)
|
|
322
322
|
? { height: (_e = props === null || props === void 0 ? void 0 : props.style) === null || _e === void 0 ? void 0 : _e.height }
|
|
323
323
|
: null));
|
|
324
324
|
// Dont show hide overlay component when any row pinned
|
|
@@ -361,9 +361,9 @@ function ParentForGrid(props) {
|
|
|
361
361
|
}
|
|
362
362
|
}), autoGroupColumnDef: (props === null || props === void 0 ? void 0 : props.autoGroupColumnDef)
|
|
363
363
|
? props === null || props === void 0 ? void 0 : props.autoGroupColumnDef
|
|
364
|
-
: manageColumnGrouping(), treeData: (props === null || props === void 0 ? void 0 : props.enableTree) ? props === null || props === void 0 ? void 0 : props.enableTree : false, getDataPath: (props === null || props === void 0 ? void 0 : props.enableTree) ? getDataPath : null, defaultColDef: defaultColDef, suppressMenuHide: false, suppressRowClickSelection: false, headerHeight: props === null || props === void 0 ? void 0 : props.columnHeaderHeight, rowHeight: constants_1.ROW_HEIGHT, rowModelType: props.rowModelType, pinnedTopRowData: props === null || props === void 0 ? void 0 : props.pinnedTopRowData }, (props.rowModelType === (constants_1.ROWMODELTYPE === null || constants_1.ROWMODELTYPE === void 0 ? void 0 : constants_1.ROWMODELTYPE.SERVER_SIDE) && { cacheBlockSize: constants_1.BLOCK_SIZE })), { maxBlocksInCache: constants_1.MAX_BLOCKS, blockLoadDebounceMillis: constants_1.DEBOUNCE_INTERVAL, noRowsOverlayComponent: props === null || props === void 0 ? void 0 : props.noRowsOverlayComponent, loadingOverlayComponent: loading_component_1.default, suppressCellFocus: true, suppressPropertyNamesCheck: true, suppressServerSideFullWidthLoadingRow: true, enableRangeSelection: (_g = props === null || props === void 0 ? void 0 : props.conditionsToDisplay) === null || _g === void 0 ? void 0 : _g.enableFillHandle, enableFillHandle: (_h = props === null || props === void 0 ? void 0 : props.conditionsToDisplay) === null || _h === void 0 ? void 0 : _h.enableFillHandle, onFillEnd: wrapperToFillOpertation, fillOperation: myOpertaion, serverSideInitialRowCount: (props === null || props === void 0 ? void 0 : props.serverSideInitialRowCount) || 10, getRowId: getRowId, enableAdvancedFilter: (props === null || props === void 0 ? void 0 : props.enableAdvancedFilter) || false, fillHandleDirection: "y" }), ((props === null || props === void 0 ? void 0 : props.rowData) && { rowData: props === null || props === void 0 ? void 0 : props.rowData })), (totalRecords <=
|
|
364
|
+
: manageColumnGrouping(), treeData: (props === null || props === void 0 ? void 0 : props.enableTree) ? props === null || props === void 0 ? void 0 : props.enableTree : false, getDataPath: (props === null || props === void 0 ? void 0 : props.enableTree) ? getDataPath : null, defaultColDef: defaultColDef, suppressMenuHide: false, suppressRowClickSelection: false, headerHeight: props === null || props === void 0 ? void 0 : props.columnHeaderHeight, rowHeight: constants_1.ROW_HEIGHT, rowModelType: props.rowModelType, pinnedTopRowData: props === null || props === void 0 ? void 0 : props.pinnedTopRowData }, (props.rowModelType === (constants_1.ROWMODELTYPE === null || constants_1.ROWMODELTYPE === void 0 ? void 0 : constants_1.ROWMODELTYPE.SERVER_SIDE) && { cacheBlockSize: constants_1.BLOCK_SIZE })), { maxBlocksInCache: constants_1.MAX_BLOCKS, blockLoadDebounceMillis: constants_1.DEBOUNCE_INTERVAL, noRowsOverlayComponent: props === null || props === void 0 ? void 0 : props.noRowsOverlayComponent, loadingOverlayComponent: loading_component_1.default, suppressCellFocus: true, suppressPropertyNamesCheck: true, suppressServerSideFullWidthLoadingRow: true, enableRangeSelection: (_g = props === null || props === void 0 ? void 0 : props.conditionsToDisplay) === null || _g === void 0 ? void 0 : _g.enableFillHandle, enableFillHandle: (_h = props === null || props === void 0 ? void 0 : props.conditionsToDisplay) === null || _h === void 0 ? void 0 : _h.enableFillHandle, onFillEnd: wrapperToFillOpertation, fillOperation: myOpertaion, serverSideInitialRowCount: (props === null || props === void 0 ? void 0 : props.serverSideInitialRowCount) || 10, getRowId: getRowId, enableAdvancedFilter: (props === null || props === void 0 ? void 0 : props.enableAdvancedFilter) || false, fillHandleDirection: "y" }), ((props === null || props === void 0 ? void 0 : props.rowData) && { rowData: props === null || props === void 0 ? void 0 : props.rowData })), (totalRecords <= constants_1.AUTO_HEIGHT_ROWS && ((_j = props === null || props === void 0 ? void 0 : props.conditionsToDisplay) === null || _j === void 0 ? void 0 : _j.isGridAutoHeight)
|
|
365
365
|
? { domLayout: "autoHeight" }
|
|
366
|
-
: { domLayout:
|
|
366
|
+
: { domLayout: "normal" })), ((props === null || props === void 0 ? void 0 : props.dataTypeDefinitions) && {
|
|
367
367
|
dataTypeDefinitions: props === null || props === void 0 ? void 0 : props.dataTypeDefinitions,
|
|
368
368
|
})), { popupParent: popupParent }), ((props === null || props === void 0 ? void 0 : props.treeData) && { treeData: props === null || props === void 0 ? void 0 : props.treeData })), ((props === null || props === void 0 ? void 0 : props.groupDefaultExpanded) && {
|
|
369
369
|
groupDefaultExpanded: props === null || props === void 0 ? void 0 : props.groupDefaultExpanded, // to enable tree data
|
|
@@ -443,6 +443,6 @@ function ParentForGrid(props) {
|
|
|
443
443
|
gridViewFun,
|
|
444
444
|
gridViewData,
|
|
445
445
|
setGridViewData,
|
|
446
|
-
gridView, enableAdvancedFilter: props === null || props === void 0 ? void 0 : props.enableAdvancedFilter }, ((props === null || props === void 0 ? void 0 : props.rowData) && { rowData: props === null || props === void 0 ? void 0 : props.rowData })), { conditionsToDisplay: props === null || props === void 0 ? void 0 : props.conditionsToDisplay }) }, { children: ((_q = props === null || props === void 0 ? void 0 : props.conditionsToDisplay) === null || _q === void 0 ? void 0 : _q.displayFeaturesHeader) && ((0, jsx_runtime_1.jsx)(advanced_feature_1.default, { props: props })) })), gridView ? (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: gridViewTemplate(gridViewData) }) : (0, jsx_runtime_1.jsx)(AgGrid_1.default, { gridOptions: gridOptions, onGridReady: (props === null || props === void 0 ? void 0 : props.rowData) ? undefined : onGridReady, gridRef: gridRef })] }) })) }) }));
|
|
446
|
+
gridView, enableAdvancedFilter: props === null || props === void 0 ? void 0 : props.enableAdvancedFilter }, ((props === null || props === void 0 ? void 0 : props.rowData) && { rowData: props === null || props === void 0 ? void 0 : props.rowData })), { conditionsToDisplay: props === null || props === void 0 ? void 0 : props.conditionsToDisplay }) }, { children: ((_q = props === null || props === void 0 ? void 0 : props.conditionsToDisplay) === null || _q === void 0 ? void 0 : _q.displayFeaturesHeader) && ((0, jsx_runtime_1.jsx)(advanced_feature_1.default, { props: props })) })), gridView ? (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: gridViewTemplate(gridViewData) }) : (0, jsx_runtime_1.jsx)(AgGrid_1.default, { style: props.style, gridOptions: gridOptions, onGridReady: (props === null || props === void 0 ? void 0 : props.rowData) ? undefined : onGridReady, gridRef: gridRef })] }) })) }) }));
|
|
447
447
|
}
|
|
448
448
|
exports.default = ParentForGrid;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import "ag-grid-community/styles/ag-grid.css";
|
|
2
2
|
import "ag-grid-community/styles/ag-theme-quartz.css";
|
|
3
3
|
import "../../App.scss";
|
|
4
|
-
declare const AgGrid: ({ gridOptions, onGridReady, gridRef }: {
|
|
4
|
+
declare const AgGrid: ({ gridOptions, onGridReady, gridRef, style }: {
|
|
5
5
|
gridOptions: any;
|
|
6
6
|
onGridReady: any;
|
|
7
7
|
gridRef: any;
|
|
8
|
+
style: any;
|
|
8
9
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
9
10
|
export default AgGrid;
|
|
@@ -10,6 +10,7 @@ export declare const MAX_RECORDS_TO_LOAD = 2500;
|
|
|
10
10
|
export declare const MAX_BLOCKS: number;
|
|
11
11
|
export declare const DEBOUNCE_INTERVAL = 200;
|
|
12
12
|
export declare const ROW_HEIGHT = 60;
|
|
13
|
+
export declare const AUTO_HEIGHT_ROWS = 5;
|
|
13
14
|
declare enum DEFAULTS {
|
|
14
15
|
CURRENCY = 1,
|
|
15
16
|
DATEFORMAT = 2,
|