sccoreui 5.8.11 → 5.8.12
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.
|
@@ -191,7 +191,7 @@ function ParentForGrid(props) {
|
|
|
191
191
|
}),
|
|
192
192
|
// rowData: gridData.rowData, // Passing row data
|
|
193
193
|
defaultColDef: defaultColDef,
|
|
194
|
-
enableRangeSelection: true,
|
|
194
|
+
// enableRangeSelection: true, // Enabling range selection
|
|
195
195
|
suppressMenuHide: false,
|
|
196
196
|
onCellValueChanged: getEditedColumn,
|
|
197
197
|
rowSelection: "multiple",
|
|
@@ -54,7 +54,7 @@ function Sort() {
|
|
|
54
54
|
(sortInfo === null || sortInfo === void 0 ? void 0 : sortInfo.orderToSort))) {
|
|
55
55
|
return;
|
|
56
56
|
}
|
|
57
|
-
const currentFeature = featureDetails;
|
|
57
|
+
const currentFeature = Object.assign({}, featureDetails);
|
|
58
58
|
currentFeature.sort = sortInfo;
|
|
59
59
|
return currentFeature;
|
|
60
60
|
};
|
|
@@ -80,7 +80,7 @@ function Sort() {
|
|
|
80
80
|
};
|
|
81
81
|
return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "" }, { children: [(0, jsx_runtime_1.jsxs)("div", Object.assign({ className: `cursor-pointer p-1 sc_icon_hover flex align-items-center border-round-lg ${isOverlayOpened || featureDetails.sort.isSortable
|
|
82
82
|
? "bg-primary-50"
|
|
83
|
-
: ""}` }, { children: [featureDetails.sort.isSortable && ((0, jsx_runtime_1.jsx)("span", Object.assign({ className: "flex align-items-center text-primary-400 px-1" }, { children: `
|
|
83
|
+
: ""}` }, { children: [featureDetails.sort.isSortable && ((0, jsx_runtime_1.jsx)("span", Object.assign({ className: "flex align-items-center text-primary-400 px-1" }, { children: `Selected` }))), (0, jsx_runtime_1.jsx)(button_1.Button, { text: true, onClick: (event) => onClickSort(event), icon: (0, jsx_runtime_1.jsx)(svg_component_1.default, { icon: "switch-vertical-02", size: 20, color: isOverlayOpened || featureDetails.sort.isSortable
|
|
84
84
|
? "#243DC6"
|
|
85
85
|
: "#667085" }) })] })), (0, jsx_runtime_1.jsxs)(overlaypanel_1.OverlayPanel, Object.assign({ ref: showShort, onShow: () => setIsOverlayOpened(true), onHide: () => setIsOverlayOpened(false), className: "w-18rem mt-2" }, { children: [(0, jsx_runtime_1.jsx)("div", Object.assign({ className: "p-4 text-lg font-semibold line-height-3 text-gray-900" }, { children: "Column Sorting" })), (0, jsx_runtime_1.jsx)(divider_1.Divider, { className: "m-0" }), (0, jsx_runtime_1.jsx)("ul", Object.assign({ className: "pl-0 m-1 h-10rem overflow-auto" }, { children: columnData === null || columnData === void 0 ? void 0 : columnData.map((eachColumn, index) => {
|
|
86
86
|
if (eachColumn === null || eachColumn === void 0 ? void 0 : eachColumn.isSortable) {
|
|
@@ -24,6 +24,7 @@ function FilterParent({ callBackForSelect }) {
|
|
|
24
24
|
console.log(data2, "data in reee");
|
|
25
25
|
console.log('rendering count');
|
|
26
26
|
const [currentFeature, setCurrentFeature] = (0, react_1.useState)(featureDetails);
|
|
27
|
+
const [backupQuery, setBackupQuery] = (0, react_1.useState)(queries);
|
|
27
28
|
// Filter header
|
|
28
29
|
const BulkActionHeader = (props) => {
|
|
29
30
|
const { header: { label, description }, } = props;
|
|
@@ -39,6 +40,7 @@ function FilterParent({ callBackForSelect }) {
|
|
|
39
40
|
filterRef.current.toggle(false);
|
|
40
41
|
// setQueryCount(1)
|
|
41
42
|
setQueries([0]);
|
|
43
|
+
setBackupQuery([0]);
|
|
42
44
|
const currentFeatureDetails = Object.assign({}, featureDetails);
|
|
43
45
|
currentFeatureDetails.filterQueries = [];
|
|
44
46
|
callGrid(currentFeatureDetails);
|
|
@@ -46,6 +48,9 @@ function FilterParent({ callBackForSelect }) {
|
|
|
46
48
|
// Toggle the pop display
|
|
47
49
|
const togglePopup = (e) => {
|
|
48
50
|
var _a;
|
|
51
|
+
if (featureDetails.filterQueries.length > queries.length) {
|
|
52
|
+
setQueries(backupQuery);
|
|
53
|
+
}
|
|
49
54
|
(_a = filterRef.current) === null || _a === void 0 ? void 0 : _a.toggle(e);
|
|
50
55
|
};
|
|
51
56
|
// OnClick to +
|
|
@@ -54,6 +59,7 @@ function FilterParent({ callBackForSelect }) {
|
|
|
54
59
|
const updatedQureis = [...queries];
|
|
55
60
|
updatedQureis.push(addLength);
|
|
56
61
|
setQueries(updatedQureis);
|
|
62
|
+
setBackupQuery(updatedQureis);
|
|
57
63
|
};
|
|
58
64
|
// OnClick to -
|
|
59
65
|
const actionOnMinus = (index) => {
|
|
@@ -63,7 +69,6 @@ function FilterParent({ callBackForSelect }) {
|
|
|
63
69
|
const removeQuery = queries.filter((query) => query !== index);
|
|
64
70
|
setQueries(removeQuery);
|
|
65
71
|
};
|
|
66
|
-
console.log(currentFeature, 'current feature before render');
|
|
67
72
|
// Display query by count
|
|
68
73
|
const RenderQuery = () => {
|
|
69
74
|
return queries.map((queryIndex, idx) => {
|
|
@@ -86,12 +91,11 @@ function FilterParent({ callBackForSelect }) {
|
|
|
86
91
|
callGrid(currentFeature);
|
|
87
92
|
filterRef.current.toggle(false);
|
|
88
93
|
};
|
|
89
|
-
console.log(featureDetails, currentFeature, 'feature details in filter');
|
|
90
94
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [((_a = featureDetails === null || featureDetails === void 0 ? void 0 : featureDetails.filterQueries) === null || _a === void 0 ? void 0 : _a.length) > 0 ? ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "bg-primary-50 border-round flex align-items-center mx-2" }, { children: [(0, jsx_runtime_1.jsx)(button_1.Button, Object.assign({ text: true, className: `${true && "font-semibold"} bg-transparent pr-0`, icon: (0, jsx_runtime_1.jsx)(svg_component_1.default, { icon: "filter-lines" }), onClick: (e) => {
|
|
91
95
|
togglePopup(e);
|
|
92
96
|
} }, { children: ((_b = featureDetails === null || featureDetails === void 0 ? void 0 : featureDetails.filterQueries) === null || _b === void 0 ? void 0 : _b.length) + " Selected" })), (0, jsx_runtime_1.jsx)(button_1.Button, { text: true, onClick: resettingFilters, className: "h-40 text-primary-400 bg-transparent", icon: (0, jsx_runtime_1.jsx)(svg_component_1.default, { icon: "x-close" }) })] }))) : ((0, jsx_runtime_1.jsx)(button_1.Button, { text: true, className: "hover:bg-primary-25 ml-2", onClick: (e) => {
|
|
93
97
|
togglePopup(e);
|
|
94
|
-
}, icon: (0, jsx_runtime_1.jsx)(svg_component_1.default, { icon: "filter-lines" }) })), (0, jsx_runtime_1.jsxs)(overlaypanel_1.OverlayPanel, Object.assign({ ref: filterRef, className: "w-45rem bulk-action-feature" }, { children: [(0, jsx_runtime_1.jsx)(BulkActionHeader, { header: {
|
|
98
|
+
}, icon: (0, jsx_runtime_1.jsx)(svg_component_1.default, { icon: "filter-lines" }) })), (0, jsx_runtime_1.jsxs)(overlaypanel_1.OverlayPanel, Object.assign({ ref: filterRef, className: "w-45rem bulk-action-feature", dismissable: false }, { children: [(0, jsx_runtime_1.jsx)(BulkActionHeader, { header: {
|
|
95
99
|
label: "Filters",
|
|
96
100
|
description: "Streamline your search with filter",
|
|
97
101
|
} }), RenderQuery(), (0, jsx_runtime_1.jsx)(BulkActionFooter, { footer: {
|
|
@@ -10,6 +10,6 @@ function RemoveItems() {
|
|
|
10
10
|
currentFeature.isRemoveClicked = true;
|
|
11
11
|
callGrid(currentFeature);
|
|
12
12
|
};
|
|
13
|
-
return ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)("button", Object.assign({ onClick: removeItemsCallBack }, { children: "-" })) }));
|
|
13
|
+
return ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)("button", Object.assign({ onClick: removeItemsCallBack, className: "bg-white" }, { children: "-" })) }));
|
|
14
14
|
}
|
|
15
15
|
exports.default = RemoveItems;
|