sccoreui 5.8.23 → 5.9.2
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/LicenceKey.js +1 -1
- package/dist/components/ag-grid/Types.js +0 -1
- package/dist/components/ag-grid/advancedFeature/advanced-feature.js +4 -9
- package/dist/components/ag-grid/advancedFeature/custom-sort.js +5 -7
- package/dist/components/ag-grid/advancedFeature/filter/filter.js +2 -2
- package/dist/components/ag-grid/advancedFeature/global-search.js +3 -7
- package/dist/components/ag-grid/advancedFeature/new-filter/{TableFilter.js → table-filter.js} +7 -14
- package/dist/components/ag-grid/advancedFeature/record-detail.js +2 -2
- package/dist/components/ag-grid/advancedFeature/refresh-grid.js +2 -2
- package/dist/components/ag-grid/advancedFeature/remove-items.js +2 -2
- package/dist/components/ag-grid/{ParentForGrid.js → parent-for-grid.js} +9 -20
- package/dist/index.js +2 -2
- package/dist/types/components/ag-grid/LicenceKey.d.ts +1 -1
- package/dist/types/components/ag-grid/Types.d.ts +4 -16
- package/dist/types/components/ag-grid/advancedFeature/new-filter/{TableFilter.d.ts → table-filter.d.ts} +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +1 -1
- /package/dist/components/ag-grid/{MyProvider.js → context-provider.js} +0 -0
- /package/dist/components/ag-grid/{CustomDropDown.js → custom-dropdown.js} +0 -0
- /package/dist/types/components/ag-grid/{MyProvider.d.ts → context-provider.d.ts} +0 -0
- /package/dist/types/components/ag-grid/{CustomDropDown.d.ts → custom-dropdown.d.ts} +0 -0
- /package/dist/types/components/ag-grid/{ParentForGrid.d.ts → parent-for-grid.d.ts} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.LICENSEKEY = void 0;
|
|
4
|
-
exports.LICENSEKEY =
|
|
4
|
+
exports.LICENSEKEY = "Using_this_{AG_Grid}_Enterprise_key_{AG-056800}_in_excess_of_the_licence_granted_is_not_permitted___Please_report_misuse_to_legal@ag-grid.com___For_help_with_changing_this_key_please_contact_info@ag-grid.com___{Sellers_Commerce_LLC}_is_granted_a_{Single_Application}_Developer_License_for_the_application_{SellersCommerce}_only_for_{2}_Front-End_JavaScript_developers___All_Front-End_JavaScript_developers_working_on_{SellersCommerce}_need_to_be_licensed___{SellersCommerce}_has_been_granted_a_Deployment_License_Add-on_for_{1}_Production_Environment___This_key_works_with_{AG_Grid}_Enterprise_versions_released_before_{14_April_2025}____[v3]_[01]_MTc0NDU4NTIwMDAwMA==895f2234e1659afcfba586110daf0549";
|
|
@@ -15,4 +15,3 @@ var ATTRIBUTEDATATYPES;
|
|
|
15
15
|
ATTRIBUTEDATATYPES["SELECT"] = "select";
|
|
16
16
|
ATTRIBUTEDATATYPES["MULTI_SELECT"] = "multiselect";
|
|
17
17
|
})(ATTRIBUTEDATATYPES = exports.ATTRIBUTEDATATYPES || (exports.ATTRIBUTEDATATYPES = {}));
|
|
18
|
-
// export type { ColDef as gridColType} from "@ag-grid-community/core"
|
|
@@ -5,21 +5,16 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const global_search_1 = tslib_1.__importDefault(require("./global-search"));
|
|
6
6
|
const custom_sort_1 = tslib_1.__importDefault(require("./custom-sort"));
|
|
7
7
|
const record_detail_1 = tslib_1.__importDefault(require("./record-detail"));
|
|
8
|
-
// import Filter from "./filter/filter"
|
|
9
8
|
const refresh_grid_1 = tslib_1.__importDefault(require("./refresh-grid"));
|
|
10
9
|
const remove_items_1 = tslib_1.__importDefault(require("./remove-items"));
|
|
11
10
|
const react_1 = require("react");
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
// import HideColumn from "./hide-column"
|
|
15
|
-
// import Grouping from "./grouping"
|
|
16
|
-
// import { ConditionsToDisplay } from "../Types"
|
|
11
|
+
const context_provider_1 = require("../context-provider");
|
|
12
|
+
const table_filter_1 = tslib_1.__importDefault(require("./new-filter/table-filter"));
|
|
17
13
|
function AdvancedFeatures({ props }) {
|
|
18
|
-
const { featureDetails } = (0, react_1.useContext)(
|
|
14
|
+
const { featureDetails } = (0, react_1.useContext)(context_provider_1.FeatureContext);
|
|
19
15
|
const conditionsToDisplay = props === null || props === void 0 ? void 0 : props.conditionsToDisplay;
|
|
20
16
|
const { bulkActionComponent: BulkAction } = props;
|
|
21
|
-
|
|
22
|
-
return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex align-items-center justify-content-between py-3 px-4" }, { children: [(0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex align-items-center" }, { children: [(conditionsToDisplay === null || conditionsToDisplay === void 0 ? void 0 : conditionsToDisplay.displaySearch) && ((0, jsx_runtime_1.jsx)(global_search_1.default, { searchPlaceHolder: props === null || props === void 0 ? void 0 : props.placeholder })), (conditionsToDisplay === null || conditionsToDisplay === void 0 ? void 0 : conditionsToDisplay.displayFilter) && ((0, jsx_runtime_1.jsx)(TableFilter_1.default, {}))] })), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex align-items-center" }, { children: [(conditionsToDisplay === null || conditionsToDisplay === void 0 ? void 0 : conditionsToDisplay.displayRemoveItems) && (0, jsx_runtime_1.jsx)(remove_items_1.default, {}), (conditionsToDisplay === null || conditionsToDisplay === void 0 ? void 0 : conditionsToDisplay.displayBulkAction) &&
|
|
17
|
+
return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex align-items-center justify-content-between py-3 px-4" }, { children: [(0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex align-items-center" }, { children: [(conditionsToDisplay === null || conditionsToDisplay === void 0 ? void 0 : conditionsToDisplay.displaySearch) && ((0, jsx_runtime_1.jsx)(global_search_1.default, { searchPlaceHolder: props === null || props === void 0 ? void 0 : props.placeholder })), (conditionsToDisplay === null || conditionsToDisplay === void 0 ? void 0 : conditionsToDisplay.displayFilter) && ((0, jsx_runtime_1.jsx)(table_filter_1.default, {}))] })), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex align-items-center" }, { children: [(conditionsToDisplay === null || conditionsToDisplay === void 0 ? void 0 : conditionsToDisplay.displayRemoveItems) && (0, jsx_runtime_1.jsx)(remove_items_1.default, {}), (conditionsToDisplay === null || conditionsToDisplay === void 0 ? void 0 : conditionsToDisplay.displayBulkAction) &&
|
|
23
18
|
(props === null || props === void 0 ? void 0 : props.bulkActionComponent) && ((0, jsx_runtime_1.jsx)(BulkAction, { checkBoxSelection: featureDetails.checkBoxSelection })), (conditionsToDisplay === null || conditionsToDisplay === void 0 ? void 0 : conditionsToDisplay.displayRefresh) && (0, jsx_runtime_1.jsx)(refresh_grid_1.default, {}), (conditionsToDisplay === null || conditionsToDisplay === void 0 ? void 0 : conditionsToDisplay.displaySort) && (0, jsx_runtime_1.jsx)(custom_sort_1.default, {}), (0, jsx_runtime_1.jsx)(record_detail_1.default, {})] }))] })));
|
|
24
19
|
}
|
|
25
20
|
exports.default = AdvancedFeatures;
|
|
@@ -9,13 +9,13 @@ const radiobutton_1 = require("primereact/radiobutton");
|
|
|
9
9
|
const button_1 = require("primereact/button");
|
|
10
10
|
const svg_component_1 = tslib_1.__importDefault(require("../../../directives/svg-component"));
|
|
11
11
|
const constants_1 = require("../constants");
|
|
12
|
-
const
|
|
12
|
+
const context_provider_1 = require("../context-provider");
|
|
13
13
|
function Sort() {
|
|
14
14
|
var _a;
|
|
15
|
-
const { sortValue, setSortValue, sortBy, setSortBy, isOverlayOpened, setIsOverlayOpened, featureDetails, callGrid, columnData } = (0, react_1.useContext)(
|
|
15
|
+
const { sortValue, setSortValue, sortBy, setSortBy, isOverlayOpened, setIsOverlayOpened, featureDetails, callGrid, columnData, } = (0, react_1.useContext)(context_provider_1.FeatureContext);
|
|
16
16
|
const showShort = (0, react_1.useRef)(null);
|
|
17
17
|
const [sortInfo, setSortInfo] = (0, react_1.useState)();
|
|
18
|
-
const
|
|
18
|
+
const sortType = sortValue === null || sortValue === void 0 ? void 0 : sortValue.dataType;
|
|
19
19
|
const [isApplyDisable, setIsApplyDisable] = (0, react_1.useState)(true);
|
|
20
20
|
const onClickSort = (event) => {
|
|
21
21
|
showShort.current.toggle(event);
|
|
@@ -49,9 +49,7 @@ function Sort() {
|
|
|
49
49
|
};
|
|
50
50
|
// Add sort details to parent component state
|
|
51
51
|
const addSortDetails = () => {
|
|
52
|
-
if (!((sortInfo === null || sortInfo === void 0 ? void 0 : sortInfo.isSortable) &&
|
|
53
|
-
(sortInfo === null || sortInfo === void 0 ? void 0 : sortInfo.columnToSort) &&
|
|
54
|
-
(sortInfo === null || sortInfo === void 0 ? void 0 : sortInfo.orderToSort))) {
|
|
52
|
+
if (!((sortInfo === null || sortInfo === void 0 ? void 0 : sortInfo.isSortable) && (sortInfo === null || sortInfo === void 0 ? void 0 : sortInfo.columnToSort) && (sortInfo === null || sortInfo === void 0 ? void 0 : sortInfo.orderToSort))) {
|
|
55
53
|
return;
|
|
56
54
|
}
|
|
57
55
|
const currentFeature = Object.assign({}, featureDetails);
|
|
@@ -98,7 +96,7 @@ function Sort() {
|
|
|
98
96
|
else {
|
|
99
97
|
return null;
|
|
100
98
|
}
|
|
101
|
-
}) })), (0, jsx_runtime_1.jsx)(divider_1.Divider, { className: "m-0" }), (0, jsx_runtime_1.jsx)("ul", Object.assign({ className: "pl-0 m-1" }, { children: (_a = constants_1.COLUMN_SORT_OPTIONS.filter((each) => each.dataType ===
|
|
99
|
+
}) })), (0, jsx_runtime_1.jsx)(divider_1.Divider, { className: "m-0" }), (0, jsx_runtime_1.jsx)("ul", Object.assign({ className: "pl-0 m-1" }, { children: (_a = constants_1.COLUMN_SORT_OPTIONS.filter((each) => each.dataType === sortType)) === null || _a === void 0 ? void 0 : _a.map((eachOption, index) => {
|
|
102
100
|
const seletedSort = eachOption.label === (sortBy === null || sortBy === void 0 ? void 0 : sortBy.label);
|
|
103
101
|
return ((0, jsx_runtime_1.jsxs)("li", Object.assign({ className: `${seletedSort && "bg-primary-25"} cursor-pointer border-round-md pl-0 px-3 py-2 flex align-items-center gap-2`, onClick: () => {
|
|
104
102
|
onSelectSortType(eachOption);
|
|
@@ -7,7 +7,7 @@ const svg_component_1 = tslib_1.__importDefault(require("../../../../directives/
|
|
|
7
7
|
const react_1 = require("react");
|
|
8
8
|
const overlaypanel_1 = require("primereact/overlaypanel");
|
|
9
9
|
const querty_1 = tslib_1.__importDefault(require("./querty"));
|
|
10
|
-
const
|
|
10
|
+
const context_provider_1 = require("../../context-provider");
|
|
11
11
|
const columns = [{ hederName: "title" }, { hederName: "gender" }];
|
|
12
12
|
const data2 = columns.map((col, idx) => {
|
|
13
13
|
let object = {
|
|
@@ -19,7 +19,7 @@ const data2 = columns.map((col, idx) => {
|
|
|
19
19
|
function FilterParent({ callBackForSelect }) {
|
|
20
20
|
var _a, _b;
|
|
21
21
|
const filterRef = (0, react_1.useRef)(null);
|
|
22
|
-
const { columnData, featureDetails, callGrid, queries, setQueries, } = (0, react_1.useContext)(
|
|
22
|
+
const { columnData, featureDetails, callGrid, queries, setQueries, } = (0, react_1.useContext)(context_provider_1.FeatureContext);
|
|
23
23
|
console.log(data2, "data in reee");
|
|
24
24
|
console.log('rendering count');
|
|
25
25
|
const [currentFeature, setCurrentFeature] = (0, react_1.useState)(featureDetails);
|
|
@@ -5,21 +5,17 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const inputtext_1 = require("primereact/inputtext");
|
|
6
6
|
const svg_component_1 = tslib_1.__importDefault(require("../../../directives/svg-component"));
|
|
7
7
|
const react_1 = require("react");
|
|
8
|
-
const
|
|
8
|
+
const context_provider_1 = require("../context-provider");
|
|
9
9
|
const hooks_1 = require("primereact/hooks");
|
|
10
|
-
// import { useState } from "react";
|
|
11
10
|
function Search({ searchPlaceHolder }) {
|
|
12
|
-
const { featureDetails, setFeatureDetails } = (0, react_1.useContext)(
|
|
11
|
+
const { featureDetails, setFeatureDetails } = (0, react_1.useContext)(context_provider_1.FeatureContext);
|
|
13
12
|
const [inputValue, deboucedValue, setInputValue] = (0, hooks_1.useDebounce)("", 500);
|
|
14
13
|
(0, react_1.useEffect)(() => {
|
|
15
14
|
setFeatureDetails(Object.assign(Object.assign({}, featureDetails), { searchedText: deboucedValue }));
|
|
16
15
|
}, [deboucedValue]);
|
|
17
|
-
console.log(featureDetails.searchedText, 'featuer details search');
|
|
18
16
|
return ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsxs)("span", Object.assign({ className: `p-input-icon-left ${featureDetails.searchedText.length > 0 && "p-input-icon-right"}` }, { children: [(0, jsx_runtime_1.jsx)("span", Object.assign({ className: "p-input-prefix" }, { children: (0, jsx_runtime_1.jsx)(svg_component_1.default, { color: "#667085", icon: "search-lg", size: 18 }) })), featureDetails.searchedText.length > 0 && ((0, jsx_runtime_1.jsx)("span", Object.assign({ className: "p-input-suffix cursor-pointer", onClick: () => {
|
|
19
17
|
setFeatureDetails(Object.assign(Object.assign({}, featureDetails), { searchedText: "" })),
|
|
20
18
|
setInputValue("");
|
|
21
|
-
}, 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) => setInputValue(e.target.value),
|
|
22
|
-
// onChange={(e) => updateSearchText(e.target.value)}
|
|
23
|
-
className: "w-21rem", placeholder: searchPlaceHolder || "search by name or code" })] })) }));
|
|
19
|
+
}, 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) => setInputValue(e.target.value), className: "w-21rem", placeholder: searchPlaceHolder || "search by name or code" })] })) }));
|
|
24
20
|
}
|
|
25
21
|
exports.default = Search;
|
package/dist/components/ag-grid/advancedFeature/new-filter/{TableFilter.js → table-filter.js}
RENAMED
|
@@ -10,10 +10,9 @@ const svg_component_1 = tslib_1.__importDefault(require("../../../../directives/
|
|
|
10
10
|
const constants_1 = tslib_1.__importDefault(require("../../constants"));
|
|
11
11
|
const Conditions_1 = tslib_1.__importDefault(require("./conditions/Conditions"));
|
|
12
12
|
require("./TableFilter.module.scss");
|
|
13
|
-
const
|
|
13
|
+
const context_provider_1 = require("../../context-provider");
|
|
14
14
|
const TableFilter = () => {
|
|
15
|
-
|
|
16
|
-
const { featureDetails, columnData, conditionType, conditionTypes, globalFilters, setConditionType, setGlobalFilters, setFeatureDetails, callGrid } = (0, react_1.useContext)(MyProvider_1.FeatureContext);
|
|
15
|
+
const { featureDetails, columnData, conditionType, conditionTypes, globalFilters, setConditionType, setGlobalFilters, setFeatureDetails, callGrid, } = (0, react_1.useContext)(context_provider_1.FeatureContext);
|
|
17
16
|
const columnId = "field";
|
|
18
17
|
const columnName = "headerName";
|
|
19
18
|
const showFilter = (0, react_1.useRef)(null);
|
|
@@ -39,21 +38,19 @@ const TableFilter = () => {
|
|
|
39
38
|
const applyAdvancedFilter = (array) => {
|
|
40
39
|
setGlobalFilters(array);
|
|
41
40
|
const allQueries = array.map((query) => {
|
|
42
|
-
console.log(query, 'query in apply filter');
|
|
43
41
|
const column = { field: query.columnName.code };
|
|
44
42
|
const operation = { code: query.condition.code };
|
|
45
43
|
let queryToAdd = {
|
|
46
44
|
selectedColumn: column,
|
|
47
45
|
selectedOperation: operation,
|
|
48
46
|
value: query.value,
|
|
49
|
-
logicalOperator: conditionType.id
|
|
47
|
+
logicalOperator: conditionType.id,
|
|
50
48
|
};
|
|
51
49
|
return queryToAdd;
|
|
52
50
|
});
|
|
53
51
|
const currentFeature = Object.assign({}, featureDetails);
|
|
54
52
|
currentFeature.filterQueries = allQueries;
|
|
55
53
|
setFeatureDetails(Object.assign(Object.assign({}, featureDetails), { filterQueries: allQueries }));
|
|
56
|
-
console.log(allQueries, 'all queries added');
|
|
57
54
|
callGrid(currentFeature);
|
|
58
55
|
return [];
|
|
59
56
|
};
|
|
@@ -87,7 +84,6 @@ const TableFilter = () => {
|
|
|
87
84
|
let arr = conditionsArray.map((condition) => {
|
|
88
85
|
return Object.assign(Object.assign({}, condition), { isActive: true });
|
|
89
86
|
});
|
|
90
|
-
console.log(arr, 'array from condition');
|
|
91
87
|
applyAdvancedFilter(arr);
|
|
92
88
|
setConditionsArray(arr);
|
|
93
89
|
showFilter.current.toggle(false);
|
|
@@ -120,17 +116,14 @@ const TableFilter = () => {
|
|
|
120
116
|
});
|
|
121
117
|
setAllFieldsFilled(isAllFieldsFilled && enbleApply);
|
|
122
118
|
}, [conditionsArray, enbleApply]);
|
|
123
|
-
console.log(featureDetails, globalFilters, 'feature details in new filter');
|
|
124
119
|
return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("div", Object.assign({ className: `cursor-pointer p-1 sc_icon_hover flex align-items-center gap-2 border-round-lg ${isOverlayOpened ||
|
|
125
|
-
(
|
|
126
|
-
1
|
|
120
|
+
(globalFilters === null || globalFilters === void 0 ? void 0 : globalFilters.filter((each) => each.isActive).length) >= 1
|
|
127
121
|
? "bg-primary-50"
|
|
128
122
|
: ""}` }, { children: [(0, jsx_runtime_1.jsx)("span", Object.assign({ onClick: (e) => onClickFilter(e) }, { children: (0, jsx_runtime_1.jsx)(svg_component_1.default, { icon: "filter-lines", size: 20, color: isOverlayOpened ||
|
|
129
|
-
(
|
|
123
|
+
(globalFilters === null || globalFilters === void 0 ? void 0 : globalFilters.filter((each) => each.isActive).length) >= 1
|
|
130
124
|
? "#243DC6"
|
|
131
|
-
: "#667085" }) })), (globalFilters === null || globalFilters === void 0 ? void 0 : globalFilters.filter((each) => each.isActive).length) >=
|
|
132
|
-
1 && ((0, jsx_runtime_1.jsxs)("span", Object.assign({ className: "flex gap-1 align-items-center text-primary-400" }, { children: [`${globalFilters === null || globalFilters === void 0 ? void 0 : globalFilters.filter((each) => each.isActive).length} Selected`, (0, jsx_runtime_1.jsx)("span", Object.assign({ onClick: onresetFilter }, { children: (0, jsx_runtime_1.jsx)(svg_component_1.default, { icon: "x-close", size: 20, color: "#243DC6" }) }))] })))] })), (0, jsx_runtime_1.jsx)(overlaypanel_1.OverlayPanel, Object.assign({ ref: showFilter, onShow: () => setIsOverlayOpened(true), onHide: () => setIsOverlayOpened(false), className: ` tableFilterPanel` }, { children: (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "p-4" }, { children: [(0, jsx_runtime_1.jsx)("div", Object.assign({ className: "text-lg font-semibold line-height-3 text-gray-900" }, { children: "Filters" })), (0, jsx_runtime_1.jsx)("div", Object.assign({ className: "text-sm text-gray-600" }, { children: "Streamline Your Search With Filters" }))] })), (0, jsx_runtime_1.jsx)(divider_1.Divider, { className: "w-full p-0 m-0" }), (0, jsx_runtime_1.jsx)("div", Object.assign({ className: "p-4" }, { children: (0, jsx_runtime_1.jsx)("div", Object.assign({ className: "max-h-14rem\toverflow-auto" }, { children: conditionsArray.map((eachCondition, index) => {
|
|
125
|
+
: "#667085" }) })), (globalFilters === null || globalFilters === void 0 ? void 0 : globalFilters.filter((each) => each.isActive).length) >= 1 && ((0, jsx_runtime_1.jsxs)("span", Object.assign({ className: "flex gap-1 align-items-center text-primary-400" }, { children: [`${globalFilters === null || globalFilters === void 0 ? void 0 : globalFilters.filter((each) => each.isActive).length} Selected`, (0, jsx_runtime_1.jsx)("span", Object.assign({ onClick: onresetFilter }, { children: (0, jsx_runtime_1.jsx)(svg_component_1.default, { icon: "x-close", size: 20, color: "#243DC6" }) }))] })))] })), (0, jsx_runtime_1.jsx)(overlaypanel_1.OverlayPanel, Object.assign({ ref: showFilter, onShow: () => setIsOverlayOpened(true), onHide: () => setIsOverlayOpened(false), className: ` tableFilterPanel` }, { children: (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "p-4" }, { children: [(0, jsx_runtime_1.jsx)("div", Object.assign({ className: "text-lg font-semibold line-height-3 text-gray-900" }, { children: "Filters" })), (0, jsx_runtime_1.jsx)("div", Object.assign({ className: "text-sm text-gray-600" }, { children: "Streamline Your Search With Filters" }))] })), (0, jsx_runtime_1.jsx)(divider_1.Divider, { className: "w-full p-0 m-0" }), (0, jsx_runtime_1.jsx)("div", Object.assign({ className: "p-4" }, { children: (0, jsx_runtime_1.jsx)("div", Object.assign({ className: "max-h-14rem\toverflow-auto" }, { children: conditionsArray.map((eachCondition, index) => {
|
|
133
126
|
return ((0, jsx_runtime_1.jsx)("div", { children: renderCondtion(eachCondition, index) }, index));
|
|
134
|
-
}) })) })), (0, jsx_runtime_1.jsx)(divider_1.Divider, { className: "w-full p-0 m-0" }), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "p-4 flex justify-content-between" }, { children: [(0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(button_1.Button, { className: "text-base font-semibold text-gray-600 bg-white border-white p-1 pt-2 focus:shadow-none", label: "Reset Filter", onClick: onresetFilter }) }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(button_1.Button, { className: "text-base font-semibold text-primary-400 p-1 focus:shadow-none mr-3", label: "Create View", onClick: () =>
|
|
127
|
+
}) })) })), (0, jsx_runtime_1.jsx)(divider_1.Divider, { className: "w-full p-0 m-0" }), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "p-4 flex justify-content-between" }, { children: [(0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(button_1.Button, { className: "text-base font-semibold text-gray-600 bg-white border-white p-1 pt-2 focus:shadow-none", label: "Reset Filter", onClick: onresetFilter }) }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(button_1.Button, { className: "text-base font-semibold text-primary-400 p-1 focus:shadow-none mr-3", label: "Create View", onClick: () => "", text: true, iconPos: "left", icon: (0, jsx_runtime_1.jsx)(svg_component_1.default, { icon: "plus", color: "text-primary-400 mr-2" }) }), (0, jsx_runtime_1.jsx)(button_1.Button, { className: "text-base font-semibold text-gray-600 p-1 focus:shadow-none text-white w-4rem", label: "Apply", onClick: onApplyFilter, disabled: !allFieldsFilled })] })] }))] }) }))] }));
|
|
135
128
|
};
|
|
136
129
|
exports.default = TableFilter;
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
4
|
const react_1 = require("react");
|
|
5
|
-
const
|
|
5
|
+
const context_provider_1 = require("../context-provider");
|
|
6
6
|
function RecordDetail() {
|
|
7
|
-
const { totalRecords } = (0, react_1.useContext)(
|
|
7
|
+
const { totalRecords } = (0, react_1.useContext)(context_provider_1.FeatureContext);
|
|
8
8
|
return ((0, jsx_runtime_1.jsx)("div", { children: `Total ${totalRecords} records` }));
|
|
9
9
|
}
|
|
10
10
|
exports.default = RecordDetail;
|
|
@@ -3,11 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
|
-
const
|
|
6
|
+
const context_provider_1 = require("../context-provider");
|
|
7
7
|
const svg_component_1 = tslib_1.__importDefault(require("../../../directives/svg-component"));
|
|
8
8
|
const button_1 = require("primereact/button");
|
|
9
9
|
function RefreshGrid() {
|
|
10
|
-
const { removeFeaturesAndRefresh } = (0, react_1.useContext)(
|
|
10
|
+
const { removeFeaturesAndRefresh } = (0, react_1.useContext)(context_provider_1.FeatureContext);
|
|
11
11
|
return ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(button_1.Button, { text: true, onClick: removeFeaturesAndRefresh, icon: (0, jsx_runtime_1.jsx)(svg_component_1.default, { icon: "refresh-ccw-01" }) }) }));
|
|
12
12
|
}
|
|
13
13
|
exports.default = RefreshGrid;
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
4
|
const react_1 = require("react");
|
|
5
|
-
const
|
|
5
|
+
const context_provider_1 = require("../context-provider");
|
|
6
6
|
function RemoveItems() {
|
|
7
|
-
const { featureDetails, callGrid } = (0, react_1.useContext)(
|
|
7
|
+
const { featureDetails, callGrid } = (0, react_1.useContext)(context_provider_1.FeatureContext);
|
|
8
8
|
const removeItemsCallBack = () => {
|
|
9
9
|
const currentFeature = Object.assign({}, featureDetails);
|
|
10
10
|
currentFeature.isRemoveClicked = true;
|
|
@@ -6,7 +6,7 @@ const react_1 = require("react");
|
|
|
6
6
|
const AgGrid_1 = tslib_1.__importDefault(require("./AgGrid"));
|
|
7
7
|
const advanced_feature_1 = tslib_1.__importDefault(require("./advancedFeature/advanced-feature"));
|
|
8
8
|
const grid_checkbox_1 = tslib_1.__importDefault(require("./grid-checkbox"));
|
|
9
|
-
const
|
|
9
|
+
const context_provider_1 = tslib_1.__importDefault(require("./context-provider"));
|
|
10
10
|
const error_ui_1 = tslib_1.__importDefault(require("./error-ui"));
|
|
11
11
|
const constants_1 = require("./constants");
|
|
12
12
|
require("./ag-grid.scss");
|
|
@@ -24,7 +24,6 @@ function ParentForGrid(props) {
|
|
|
24
24
|
totalRecords: 0,
|
|
25
25
|
rowData: [],
|
|
26
26
|
});
|
|
27
|
-
const [isLoading, setIsLoading] = (0, react_1.useState)(false);
|
|
28
27
|
const [initialCheckBoxData] = (0, react_1.useState)({
|
|
29
28
|
allBoxChecked: false,
|
|
30
29
|
isIndeterminate: false,
|
|
@@ -40,7 +39,7 @@ function ParentForGrid(props) {
|
|
|
40
39
|
orderToSort: {},
|
|
41
40
|
},
|
|
42
41
|
checkBoxSelection: initialCheckBoxData,
|
|
43
|
-
isRemoveClicked: false
|
|
42
|
+
isRemoveClicked: false,
|
|
44
43
|
};
|
|
45
44
|
const [featureDetails, setFeatureDetails] = (0, react_1.useState)({
|
|
46
45
|
searchedText: "",
|
|
@@ -51,7 +50,7 @@ function ParentForGrid(props) {
|
|
|
51
50
|
orderToSort: {},
|
|
52
51
|
},
|
|
53
52
|
checkBoxSelection: initialCheckBoxData,
|
|
54
|
-
isRemoveClicked: false
|
|
53
|
+
isRemoveClicked: false,
|
|
55
54
|
});
|
|
56
55
|
const gridRef = (0, react_1.useRef)(null);
|
|
57
56
|
// Default column specification
|
|
@@ -116,18 +115,18 @@ function ParentForGrid(props) {
|
|
|
116
115
|
if (!(props === null || props === void 0 ? void 0 : props.getRowData)) {
|
|
117
116
|
return emptyResponse; // If callback function to get row data is not provided
|
|
118
117
|
}
|
|
118
|
+
gridRef.current.api.showLoadingOverlay();
|
|
119
119
|
const response = yield props.getRowData(startRow, endRow, currentFeatures);
|
|
120
120
|
setGridData(Object.assign(Object.assign({}, gridData), { rowData: [] }));
|
|
121
121
|
// Clear selected checkbox
|
|
122
122
|
// setFeatureDetails((prev: any) => ({ ...prev, checkBoxSelection: initialCheckBoxData }));
|
|
123
123
|
// To identify when to stop the callBack
|
|
124
|
-
// const actualEndRow = startRow + (response?.rowData?.length ?? 0);
|
|
125
124
|
const actualEndRow = response === null || response === void 0 ? void 0 : response.totalRecords;
|
|
126
125
|
if (response === null || response === void 0 ? void 0 : response.rowData) {
|
|
127
126
|
const result = {
|
|
128
127
|
rowData: response.rowData,
|
|
129
128
|
actualEndRow: actualEndRow,
|
|
130
|
-
totalRecords: response.totalRecords
|
|
129
|
+
totalRecords: response.totalRecords,
|
|
131
130
|
};
|
|
132
131
|
setTotalRecords(response === null || response === void 0 ? void 0 : response.totalRecords);
|
|
133
132
|
// response.actualEndRow = actualEndRow;
|
|
@@ -137,7 +136,6 @@ function ParentForGrid(props) {
|
|
|
137
136
|
});
|
|
138
137
|
// Gets call onLoad,scroll and whenever any featureDetails changed
|
|
139
138
|
const onGridReady = (params, updatedFeatures) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
140
|
-
setIsLoading(true);
|
|
141
139
|
setApi(params.api);
|
|
142
140
|
setGridReadyEvent(params);
|
|
143
141
|
let currentFeatures = updatedFeatures;
|
|
@@ -150,6 +148,7 @@ function ParentForGrid(props) {
|
|
|
150
148
|
const result = yield getData(0, 0, currentFeatures);
|
|
151
149
|
if (result.rowData) {
|
|
152
150
|
setGridData(Object.assign(Object.assign({}, gridData), { rowData: result.rowData }));
|
|
151
|
+
gridRef.current.api.hideOverlay();
|
|
153
152
|
params.api.applyTransaction({ add: result.rowData });
|
|
154
153
|
}
|
|
155
154
|
else {
|
|
@@ -164,6 +163,7 @@ function ParentForGrid(props) {
|
|
|
164
163
|
const endRow = params.endRow;
|
|
165
164
|
const result = yield getData(startRow, endRow, currentFeatures);
|
|
166
165
|
if (((_a = result === null || result === void 0 ? void 0 : result.rowData) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
166
|
+
gridRef.current.api.hideOverlay();
|
|
167
167
|
params.successCallback(result === null || result === void 0 ? void 0 : result.rowData, result === null || result === void 0 ? void 0 : result.actualEndRow);
|
|
168
168
|
}
|
|
169
169
|
else {
|
|
@@ -175,15 +175,7 @@ function ParentForGrid(props) {
|
|
|
175
175
|
};
|
|
176
176
|
params.api.setGridOption("datasource", dataSource);
|
|
177
177
|
}
|
|
178
|
-
setIsLoading(false);
|
|
179
178
|
});
|
|
180
|
-
// Get values when cell edited
|
|
181
|
-
const getEditedColumn = (params) => {
|
|
182
|
-
var _a;
|
|
183
|
-
const editedColumn = (_a = params === null || params === void 0 ? void 0 : params.colDef) === null || _a === void 0 ? void 0 : _a.field;
|
|
184
|
-
const editedRow = params === null || params === void 0 ? void 0 : params.data;
|
|
185
|
-
console.log(editedRow, editedColumn, "edited row ");
|
|
186
|
-
};
|
|
187
179
|
// Options that grid should have
|
|
188
180
|
const gridOptions = {
|
|
189
181
|
columnDefs: gridData.columnData.map((column) => {
|
|
@@ -197,11 +189,9 @@ function ParentForGrid(props) {
|
|
|
197
189
|
return column;
|
|
198
190
|
}
|
|
199
191
|
}),
|
|
200
|
-
// rowData: gridData.rowData, // Passing row data
|
|
201
192
|
defaultColDef: defaultColDef,
|
|
202
193
|
// enableRangeSelection: true, // Enabling range selection
|
|
203
194
|
suppressMenuHide: false,
|
|
204
|
-
onCellValueChanged: getEditedColumn,
|
|
205
195
|
rowSelection: "multiple",
|
|
206
196
|
suppressRowClickSelection: true,
|
|
207
197
|
rowHeight: constants_1.ROW_HEIGHT,
|
|
@@ -237,20 +227,19 @@ function ParentForGrid(props) {
|
|
|
237
227
|
// excludedRecords: [],
|
|
238
228
|
// });
|
|
239
229
|
// }, [featureDetails]);
|
|
240
|
-
console.log(isLoading, gridOptions, props === null || props === void 0 ? void 0 : props.pinnedTopRowData, "is loading state");
|
|
241
230
|
(0, react_1.useEffect)(() => {
|
|
242
231
|
if (props === null || props === void 0 ? void 0 : props.getCheckedRows) {
|
|
243
232
|
const callBackForCheckedRows = props === null || props === void 0 ? void 0 : props.getCheckedRows;
|
|
244
233
|
callBackForCheckedRows(featureDetails === null || featureDetails === void 0 ? void 0 : featureDetails.checkBoxSelection);
|
|
245
234
|
}
|
|
246
235
|
}, [featureDetails.checkBoxSelection]);
|
|
247
|
-
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(error_ui_1.default, { children: (0, jsx_runtime_1.jsx)("div", Object.assign({ style: { height: "100%", width: style.width }, className: "ag-grid-container border-1 border-gray-200 border-round" }, { children: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(
|
|
236
|
+
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(error_ui_1.default, { children: (0, jsx_runtime_1.jsx)("div", Object.assign({ style: { height: "100%", width: style.width }, className: "ag-grid-container border-1 border-gray-200 border-round" }, { children: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(context_provider_1.default, Object.assign({ value: {
|
|
248
237
|
featureDetails,
|
|
249
238
|
setFeatureDetails,
|
|
250
239
|
gridData,
|
|
251
240
|
callGrid,
|
|
252
241
|
totalRecords,
|
|
253
|
-
initialFeature
|
|
242
|
+
initialFeature,
|
|
254
243
|
} }, { children: (0, jsx_runtime_1.jsx)(advanced_feature_1.default, { props: props }) })), (0, jsx_runtime_1.jsx)(AgGrid_1.default, { style: style, gridOptions: gridOptions, onGridReady: onGridReady, gridRef: gridRef })] }) })) }) }));
|
|
255
244
|
}
|
|
256
245
|
exports.default = ParentForGrid;
|
package/dist/index.js
CHANGED
|
@@ -228,8 +228,8 @@ var hooks_1 = require("primereact/hooks");
|
|
|
228
228
|
Object.defineProperty(exports, "useClickOutside", { enumerable: true, get: function () { return hooks_1.useClickOutside; } });
|
|
229
229
|
Object.defineProperty(exports, "useOverlayListener", { enumerable: true, get: function () { return hooks_1.useOverlayListener; } });
|
|
230
230
|
Object.defineProperty(exports, "useOverlayScrollListener", { enumerable: true, get: function () { return hooks_1.useOverlayScrollListener; } });
|
|
231
|
-
var
|
|
232
|
-
Object.defineProperty(exports, "AGGridComponent", { enumerable: true, get: function () { return tslib_1.__importDefault(
|
|
231
|
+
var parent_for_grid_1 = require("./components/ag-grid/parent-for-grid");
|
|
232
|
+
Object.defineProperty(exports, "AGGridComponent", { enumerable: true, get: function () { return tslib_1.__importDefault(parent_for_grid_1).default; } });
|
|
233
233
|
var Loader_1 = require("./components/loader/Loader");
|
|
234
234
|
Object.defineProperty(exports, "SCLoader", { enumerable: true, get: function () { return tslib_1.__importDefault(Loader_1).default; } });
|
|
235
235
|
client_1.default.createRoot(document.getElementById("root")).render((0, jsx_runtime_1.jsx)(App_1.default, {}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const LICENSEKEY = "
|
|
1
|
+
export declare const LICENSEKEY = "Using_this_{AG_Grid}_Enterprise_key_{AG-056800}_in_excess_of_the_licence_granted_is_not_permitted___Please_report_misuse_to_legal@ag-grid.com___For_help_with_changing_this_key_please_contact_info@ag-grid.com___{Sellers_Commerce_LLC}_is_granted_a_{Single_Application}_Developer_License_for_the_application_{SellersCommerce}_only_for_{2}_Front-End_JavaScript_developers___All_Front-End_JavaScript_developers_working_on_{SellersCommerce}_need_to_be_licensed___{SellersCommerce}_has_been_granted_a_Deployment_License_Add-on_for_{1}_Production_Environment___This_key_works_with_{AG_Grid}_Enterprise_versions_released_before_{14_April_2025}____[v3]_[01]_MTc0NDU4NTIwMDAwMA==895f2234e1659afcfba586110daf0549";
|
|
@@ -1,17 +1,4 @@
|
|
|
1
1
|
import { ColDef } from "@ag-grid-community/core";
|
|
2
|
-
export interface IOlympicData {
|
|
3
|
-
athlete: string;
|
|
4
|
-
age: number;
|
|
5
|
-
country: string;
|
|
6
|
-
year: number;
|
|
7
|
-
date: string;
|
|
8
|
-
sport: string;
|
|
9
|
-
gold: number;
|
|
10
|
-
silver: number;
|
|
11
|
-
bronze: number;
|
|
12
|
-
total: number;
|
|
13
|
-
color: string;
|
|
14
|
-
}
|
|
15
2
|
export interface ColumnDef extends ColDef {
|
|
16
3
|
id: string;
|
|
17
4
|
dataType: any;
|
|
@@ -21,6 +8,7 @@ export interface ColumnDef extends ColDef {
|
|
|
21
8
|
code?: number;
|
|
22
9
|
enableHeaderCheckbox?: boolean;
|
|
23
10
|
enableChildCheckbox?: boolean;
|
|
11
|
+
options?: any[];
|
|
24
12
|
}
|
|
25
13
|
export interface Style {
|
|
26
14
|
height: number | string;
|
|
@@ -60,8 +48,6 @@ export interface Features {
|
|
|
60
48
|
checkBoxSelection: CheckBoxSelection;
|
|
61
49
|
isRemoveClicked: boolean;
|
|
62
50
|
}
|
|
63
|
-
export interface ParentProp {
|
|
64
|
-
}
|
|
65
51
|
export interface CheckBoxSelection {
|
|
66
52
|
allBoxChecked: boolean;
|
|
67
53
|
isIndeterminate: boolean;
|
|
@@ -99,11 +85,13 @@ export interface PropsFromProduct {
|
|
|
99
85
|
columnData: ColumnDef[];
|
|
100
86
|
getRowData: () => void;
|
|
101
87
|
style: Style;
|
|
102
|
-
dataForDropDown?: () => void;
|
|
103
88
|
conditionsToDisplay?: ConditionsToDisplay;
|
|
104
89
|
bulkActionComponent?: React.FC;
|
|
105
90
|
pinnedRowData?: any;
|
|
106
91
|
rowModelType?: string;
|
|
92
|
+
getCheckedRows?: () => void;
|
|
93
|
+
shouldRefetch?: boolean;
|
|
94
|
+
noRowsOverlayComponent?: React.FC;
|
|
107
95
|
}
|
|
108
96
|
export interface ResoponseFromCallback {
|
|
109
97
|
totalRecords: number;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -103,7 +103,7 @@ export { default as FroalaTextEditor } from "./components/froala-editor/FroalaEd
|
|
|
103
103
|
export { default as ListBoxDropdown } from './components/list-box-dropdown/list-box-dropdown';
|
|
104
104
|
export { default as CustomColorPicker } from "./components/custom-color-picker/color-picker";
|
|
105
105
|
export { useClickOutside, useOverlayListener, useOverlayScrollListener } from 'primereact/hooks';
|
|
106
|
-
export { default as AGGridComponent } from './components/ag-grid/
|
|
106
|
+
export { default as AGGridComponent } from './components/ag-grid/parent-for-grid';
|
|
107
107
|
export { default as SCLoader } from "./components/loader/Loader";
|
|
108
108
|
import { DropdownChangeEvent } from "primereact/dropdown";
|
|
109
109
|
import { ColorPickerChangeEvent } from "primereact/colorpicker";
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|