sccoreui 5.7.7 → 5.7.9
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/ParentForGrid.js +11 -3
- package/dist/components/ag-grid/advancedFeature/advanced-feature.js +2 -3
- package/dist/types/components/ag-grid/advancedFeature/advanced-feature.d.ts +1 -2
- package/package.json +1 -1
- package/dist/components/ag-grid/RowDetailsRenderer.js +0 -9
- package/dist/components/ag-grid/StatusDropdown.js +0 -24
- package/dist/components/ag-grid/advancedFeature/bulk-actions.js +0 -33
- package/dist/components/ag-grid/advancedFeature/filter.js +0 -7
- package/dist/pages/aggrid/AgGrid.js +0 -174
- package/dist/pages/avatar/avatar.js +0 -338
- package/dist/pages/badges/badge.js +0 -73
- package/dist/pages/breadcrumb/breadcrumb.js +0 -14
- package/dist/pages/button/button.js +0 -10
- package/dist/pages/button-group/button-group.js +0 -10
- package/dist/pages/chart/chart.js +0 -257
- package/dist/pages/checkbox/checkbox.js +0 -26
- package/dist/pages/checkbox-group/checkbox-group-component.js +0 -21
- package/dist/pages/color-picker/color-picker.js +0 -13
- package/dist/pages/content-dividers/content-dividers.js +0 -11
- package/dist/pages/custom-color-picker/custom-color-picker.js +0 -12
- package/dist/pages/date-picker/date-picker.js +0 -20
- package/dist/pages/dropdown/dropdown-component.js +0 -39
- package/dist/pages/file-upload/file-upload.js +0 -34
- package/dist/pages/flex.js +0 -15
- package/dist/pages/formulaTemplate/formulaTemplate.js +0 -154
- package/dist/pages/frolaTextEditor/froala-text-editor.js +0 -12
- package/dist/pages/home.js +0 -47
- package/dist/pages/input/input-text.js +0 -112
- package/dist/pages/list-box-dropdown/listboxdropdown.js +0 -52
- package/dist/pages/loader-indicator/loader-indicator.js +0 -10
- package/dist/pages/mega-mennu/mega-menu.js +0 -84
- package/dist/pages/multi-select-dropdown/multi-select-dropdown.js +0 -51
- package/dist/pages/not-found/not-found.js +0 -10
- package/dist/pages/paginator/pagination.js +0 -122
- package/dist/pages/progress-bar/progress-bar.js +0 -27
- package/dist/pages/progress-steps/progress-steps.js +0 -24
- package/dist/pages/radio-button/radio-button-component.js +0 -11
- package/dist/pages/shadows/shadows.js +0 -7
- package/dist/pages/slideout-menus/slideout-menus.js +0 -104
- package/dist/pages/sliders/slider.js +0 -39
- package/dist/pages/tabels/table-data.js +0 -2193
- package/dist/pages/tabels/table.js +0 -98
- package/dist/pages/tabs/tabs.js +0 -9
- package/dist/pages/tags/tags.js +0 -70
- package/dist/pages/toast/toast.js +0 -47
- package/dist/pages/toggle/toggle.js +0 -10
- package/dist/pages/tooltip/tooltip.js +0 -13
- package/dist/pages/treeDropdownSelect/treedropdowselect.js +0 -34
- package/dist/pages/types/type.js +0 -2
- package/dist/types/components/ag-grid/RowDetailsRenderer.d.ts +0 -4
- package/dist/types/components/ag-grid/StatusDropdown.d.ts +0 -5
- package/dist/types/components/ag-grid/advancedFeature/bulk-actions.d.ts +0 -4
- package/dist/types/components/ag-grid/advancedFeature/filter.d.ts +0 -2
- package/dist/types/pages/aggrid/AgGrid.d.ts +0 -2
- package/dist/types/pages/avatar/avatar.d.ts +0 -2
- package/dist/types/pages/badges/badge.d.ts +0 -3
- package/dist/types/pages/breadcrumb/breadcrumb.d.ts +0 -2
- package/dist/types/pages/button/button.d.ts +0 -2
- package/dist/types/pages/button-group/button-group.d.ts +0 -2
- package/dist/types/pages/chart/chart.d.ts +0 -2
- package/dist/types/pages/checkbox/checkbox.d.ts +0 -2
- package/dist/types/pages/checkbox-group/checkbox-group-component.d.ts +0 -3
- package/dist/types/pages/color-picker/color-picker.d.ts +0 -2
- package/dist/types/pages/content-dividers/content-dividers.d.ts +0 -2
- package/dist/types/pages/custom-color-picker/custom-color-picker.d.ts +0 -2
- package/dist/types/pages/date-picker/date-picker.d.ts +0 -2
- package/dist/types/pages/dropdown/dropdown-component.d.ts +0 -2
- package/dist/types/pages/file-upload/file-upload.d.ts +0 -3
- package/dist/types/pages/flex.d.ts +0 -2
- package/dist/types/pages/formulaTemplate/formulaTemplate.d.ts +0 -2
- package/dist/types/pages/frolaTextEditor/froala-text-editor.d.ts +0 -2
- package/dist/types/pages/home.d.ts +0 -2
- package/dist/types/pages/input/input-text.d.ts +0 -3
- package/dist/types/pages/list-box-dropdown/listboxdropdown.d.ts +0 -2
- package/dist/types/pages/loader-indicator/loader-indicator.d.ts +0 -3
- package/dist/types/pages/mega-mennu/mega-menu.d.ts +0 -2
- package/dist/types/pages/multi-select-dropdown/multi-select-dropdown.d.ts +0 -2
- package/dist/types/pages/not-found/not-found.d.ts +0 -2
- package/dist/types/pages/paginator/pagination.d.ts +0 -2
- package/dist/types/pages/progress-bar/progress-bar.d.ts +0 -3
- package/dist/types/pages/progress-steps/progress-steps.d.ts +0 -2
- package/dist/types/pages/radio-button/radio-button-component.d.ts +0 -2
- package/dist/types/pages/shadows/shadows.d.ts +0 -2
- package/dist/types/pages/slideout-menus/slideout-menus.d.ts +0 -2
- package/dist/types/pages/sliders/slider.d.ts +0 -1
- package/dist/types/pages/tabels/table-data.d.ts +0 -3
- package/dist/types/pages/tabels/table.d.ts +0 -2
- package/dist/types/pages/tabs/tabs.d.ts +0 -3
- package/dist/types/pages/tags/tags.d.ts +0 -3
- package/dist/types/pages/toast/toast.d.ts +0 -2
- package/dist/types/pages/toggle/toggle.d.ts +0 -2
- package/dist/types/pages/tooltip/tooltip.d.ts +0 -2
- package/dist/types/pages/treeDropdownSelect/treedropdowselect.d.ts +0 -2
- package/dist/types/pages/types/type.d.ts +0 -64
|
@@ -10,6 +10,7 @@ function ParentForGrid(props) {
|
|
|
10
10
|
rowData: props === null || props === void 0 ? void 0 : props.rowData,
|
|
11
11
|
columnData: props === null || props === void 0 ? void 0 : props.columnData,
|
|
12
12
|
});
|
|
13
|
+
console.log(props, 'pros in parent');
|
|
13
14
|
const [style] = (0, react_1.useState)(props.style);
|
|
14
15
|
const [api, setApi] = (0, react_1.useState)(null);
|
|
15
16
|
const [gridReadyEvent, setGridReadyEvent] = (0, react_1.useState)();
|
|
@@ -34,11 +35,14 @@ function ParentForGrid(props) {
|
|
|
34
35
|
}, []);
|
|
35
36
|
// Callback to products for getting data
|
|
36
37
|
const getData = (startRow, endRow) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
console.log(startRow, endRow, featureDetails, 'params sending to product');
|
|
37
39
|
const response = (yield props.getRowData(startRow, endRow, featureDetails)) || [];
|
|
40
|
+
console.log(response, 'response from call back');
|
|
38
41
|
return response.rowData;
|
|
39
42
|
});
|
|
40
43
|
// Gets call onLoad,scroll and whenever any featureDetails changed
|
|
41
44
|
const onGridReady = (params) => {
|
|
45
|
+
console.log('calling on grid ready');
|
|
42
46
|
setApi(params.api);
|
|
43
47
|
setGridReadyEvent(params);
|
|
44
48
|
console.log(params, "the Params");
|
|
@@ -47,7 +51,8 @@ function ParentForGrid(props) {
|
|
|
47
51
|
const startRow = params.startRow;
|
|
48
52
|
const endRow = params.endRow;
|
|
49
53
|
const result = yield getData(startRow, endRow);
|
|
50
|
-
|
|
54
|
+
console.log(result, 'result from callback');
|
|
55
|
+
if ((result === null || result === void 0 ? void 0 : result.length) > 0) {
|
|
51
56
|
params.successCallback(result, -1);
|
|
52
57
|
}
|
|
53
58
|
else {
|
|
@@ -63,13 +68,14 @@ function ParentForGrid(props) {
|
|
|
63
68
|
const selectedNodes = api === null || api === void 0 ? void 0 : api.getSelectedNodes();
|
|
64
69
|
const selectedData = selectedNodes.map((node) => node.data);
|
|
65
70
|
setCheckedRow(selectedData);
|
|
71
|
+
console.log(checkedRow, 'checked row');
|
|
66
72
|
console.log(selectedData, "selected from checkbox"); // Send a callback to products
|
|
67
73
|
}
|
|
68
74
|
};
|
|
69
75
|
// Options that grid should have
|
|
70
76
|
const gridOptions = {
|
|
71
77
|
columnDefs: gridData.columnData,
|
|
72
|
-
rowData: gridData.rowData,
|
|
78
|
+
// rowData: gridData.rowData, // Passing row data
|
|
73
79
|
defaultColDef: defaultColDef,
|
|
74
80
|
enableRangeSelection: true,
|
|
75
81
|
suppressMenuHide: false,
|
|
@@ -88,6 +94,8 @@ function ParentForGrid(props) {
|
|
|
88
94
|
callGrid();
|
|
89
95
|
}
|
|
90
96
|
}, [featureDetails.searchedText]);
|
|
91
|
-
|
|
97
|
+
console.log(gridData, 'grid data');
|
|
98
|
+
console.log(featureDetails, 'feature details');
|
|
99
|
+
return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ style: { height: style.height, width: style.width } }, { children: [(0, jsx_runtime_1.jsx)(advanced_feature_1.default, { featureDetails: featureDetails, setFeatureDetails: setFeatureDetails, columnData: gridData.columnData, props: props, callGrid: callGrid }), (0, jsx_runtime_1.jsx)(AgGrid_1.default, { style: style, gridOptions: gridOptions, onGridReady: onGridReady })] })));
|
|
92
100
|
}
|
|
93
101
|
exports.default = ParentForGrid;
|
|
@@ -5,9 +5,8 @@ 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
|
-
const bulk_actions_1 = tslib_1.__importDefault(require("./bulkActions/bulk-actions"));
|
|
9
8
|
const filter_1 = tslib_1.__importDefault(require("./filter/filter"));
|
|
10
|
-
function AdvancedFeatures({ featureDetails, setFeatureDetails, columnData,
|
|
11
|
-
return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex justify-content-between" }, { children: [(0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex" }, { children: [(0, jsx_runtime_1.jsx)(global_search_1.default, { featureDetails: featureDetails, setFeatureDetails: setFeatureDetails, searchPlaceHolder: props === null || props === void 0 ? void 0 : props.placeholder }), (0, jsx_runtime_1.jsx)(filter_1.default, { columnData: columnData, featureDetails: featureDetails, setFeatureDetails: setFeatureDetails, callBackForSelect: props === null || props === void 0 ? void 0 : props.myInputData, callGrid: callGrid })] })), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex " }, { children: [
|
|
9
|
+
function AdvancedFeatures({ featureDetails, setFeatureDetails, columnData, props, callGrid }) {
|
|
10
|
+
return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex justify-content-between" }, { children: [(0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex" }, { children: [(0, jsx_runtime_1.jsx)(global_search_1.default, { featureDetails: featureDetails, setFeatureDetails: setFeatureDetails, searchPlaceHolder: props === null || props === void 0 ? void 0 : props.placeholder }), (0, jsx_runtime_1.jsx)(filter_1.default, { columnData: columnData, featureDetails: featureDetails, setFeatureDetails: setFeatureDetails, callBackForSelect: props === null || props === void 0 ? void 0 : props.myInputData, callGrid: callGrid })] })), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex " }, { children: [(0, jsx_runtime_1.jsx)(custom_sort_1.default, { columnData: columnData, featureDetails: featureDetails, setFeatureDetails: setFeatureDetails, callGrid: callGrid }), (0, jsx_runtime_1.jsx)(record_detail_1.default, { totalLength: (props === null || props === void 0 ? void 0 : props.totalRowLength) || 100 })] }))] })));
|
|
12
11
|
}
|
|
13
12
|
exports.default = AdvancedFeatures;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
declare function AdvancedFeatures({ featureDetails, setFeatureDetails, columnData,
|
|
1
|
+
declare function AdvancedFeatures({ featureDetails, setFeatureDetails, columnData, props, callGrid }: {
|
|
2
2
|
featureDetails: any;
|
|
3
3
|
setFeatureDetails: any;
|
|
4
4
|
columnData: any;
|
|
5
|
-
checkedRow: any;
|
|
6
5
|
props: any;
|
|
7
6
|
callGrid: any;
|
|
8
7
|
}): import("react/jsx-runtime").JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
|
-
const RowDetailsRenderer = ({ node }) => {
|
|
5
|
-
const data = node === null || node === void 0 ? void 0 : node.data;
|
|
6
|
-
console.log(data, node, 'details from node');
|
|
7
|
-
return ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsxs)("div", { children: [data.gold, " "] }) }));
|
|
8
|
-
};
|
|
9
|
-
exports.default = RowDetailsRenderer;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
|
-
const primereact_1 = require("primereact");
|
|
5
|
-
const react_1 = require("react");
|
|
6
|
-
function StatusDropdown({ value, statusChanged }) {
|
|
7
|
-
let options;
|
|
8
|
-
if (value === 1) {
|
|
9
|
-
options = [
|
|
10
|
-
{ id: 1, name: "Draft", value: 1 },
|
|
11
|
-
{ id: 2, name: "Active", value: 2 },
|
|
12
|
-
{ id: 3, name: "Inactive", value: 3 },
|
|
13
|
-
];
|
|
14
|
-
}
|
|
15
|
-
else {
|
|
16
|
-
options = [
|
|
17
|
-
{ id: 2, name: "Active", value: 2 },
|
|
18
|
-
{ id: 3, name: "Inactive", value: 3 },
|
|
19
|
-
];
|
|
20
|
-
}
|
|
21
|
-
const selectedOption = (0, react_1.useMemo)(() => options.find((option) => option.value === value), [value]);
|
|
22
|
-
return ((0, jsx_runtime_1.jsxs)("div", { children: [" ", (0, jsx_runtime_1.jsx)(primereact_1.Dropdown, { value: selectedOption.value, options: options, onChange: (e) => { statusChanged(e.target.value), console.log(e, 'value selected'); }, optionLabel: "name", placeholder: "Select a Status" })] }));
|
|
23
|
-
}
|
|
24
|
-
exports.default = StatusDropdown;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const svg_component_1 = tslib_1.__importDefault(require("../../../directives/svg-component"));
|
|
6
|
-
const overlaypanel_1 = require("primereact/overlaypanel");
|
|
7
|
-
const react_1 = require("react");
|
|
8
|
-
function BulkActions({ columnData }) {
|
|
9
|
-
var _a;
|
|
10
|
-
const [activeOption, setActiveOption] = (0, react_1.useState)({});
|
|
11
|
-
const [bulkOptions, setBulkOptions] = (0, react_1.useState)([]);
|
|
12
|
-
const actionRef = (0, react_1.useRef)(null);
|
|
13
|
-
(0, react_1.useEffect)(() => {
|
|
14
|
-
getColumnsToEdit();
|
|
15
|
-
}, []);
|
|
16
|
-
const getColumnsToEdit = () => {
|
|
17
|
-
const columns = [];
|
|
18
|
-
columnData.filter((col) => {
|
|
19
|
-
if (col.editable) {
|
|
20
|
-
columns.push(col);
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
setBulkOptions(columns);
|
|
24
|
-
};
|
|
25
|
-
console.log(columnData, 'column data in bulk action');
|
|
26
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", Object.assign({ className: 'cursor-pointer p-1 sc_icon_hover', onClick: (e) => actionRef.current.toggle(e) }, { children: (0, jsx_runtime_1.jsx)(svg_component_1.default, { icon: "settings-01", size: 20 }) })), (0, jsx_runtime_1.jsx)(overlaypanel_1.OverlayPanel, Object.assign({ ref: actionRef, className: "w-30rem pb-5" }, { children: (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "relative pb-5 mb-5" }, { children: [(0, jsx_runtime_1.jsx)("div", Object.assign({ className: "flex align-items-center justify-content-between p-4 border-bottom-1 border-gray-200" }, { children: (0, jsx_runtime_1.jsx)("div", Object.assign({ className: "text-lg font-semibold line-height-4 text-gray-900" }, { children: "Bulk Actions " })) })), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex border-bottom-1 border-gray-200" }, { children: [(0, jsx_runtime_1.jsx)("div", Object.assign({ className: " border-right-1 px-1 py-4 border-gray-200" }, { children: bulkOptions.map((option, index) => {
|
|
27
|
-
{
|
|
28
|
-
console.log(option, 'option data in map');
|
|
29
|
-
}
|
|
30
|
-
return ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: `text-lg px-3 border-round-lg cursor-pointer font-medium line-height-4 text-gray-600 ${(activeOption === null || activeOption === void 0 ? void 0 : activeOption.field) === (option === null || option === void 0 ? void 0 : option.field) ? "bg-primary-50" : ""}`, onClick: () => setActiveOption(option) }, { children: option.headerName }), index));
|
|
31
|
-
}) })), (0, jsx_runtime_1.jsx)("div", Object.assign({ className: "p-4 w-full" }, { children: (_a = bulkOptions.find((optons) => optons.id === activeOption.id)) === null || _a === void 0 ? void 0 : _a.content }))] }))] })) }))] }));
|
|
32
|
-
}
|
|
33
|
-
exports.default = BulkActions;
|
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const react_1 = require("react");
|
|
6
|
-
const ParentForGrid_1 = tslib_1.__importDefault(require("../../components/ag-grid/ParentForGrid"));
|
|
7
|
-
const axios_1 = tslib_1.__importDefault(require("axios"));
|
|
8
|
-
const AgGridPage = () => {
|
|
9
|
-
// type IOlympicData = {
|
|
10
|
-
// id: String;
|
|
11
|
-
// athlete: string;
|
|
12
|
-
// age: number;
|
|
13
|
-
// country: string;
|
|
14
|
-
// year: number;
|
|
15
|
-
// date: string;
|
|
16
|
-
// sport: string;
|
|
17
|
-
// gold: number;
|
|
18
|
-
// silver: number;
|
|
19
|
-
// bronze: number;
|
|
20
|
-
// total: number;
|
|
21
|
-
// color: string;
|
|
22
|
-
// status: number
|
|
23
|
-
// };
|
|
24
|
-
// const rowDataStore = [
|
|
25
|
-
// {
|
|
26
|
-
// id: "101",
|
|
27
|
-
// athlete: "Michael Phelps",
|
|
28
|
-
// age: 19,
|
|
29
|
-
// country: "United States",
|
|
30
|
-
// year: 2004,
|
|
31
|
-
// date: "29/08/2004",
|
|
32
|
-
// sport: "Swimming",
|
|
33
|
-
// gold: 6,
|
|
34
|
-
// silver: 0,
|
|
35
|
-
// bronze: 2,
|
|
36
|
-
// total: 8,
|
|
37
|
-
// status: 1,
|
|
38
|
-
// color: "blue"
|
|
39
|
-
// },
|
|
40
|
-
// {
|
|
41
|
-
// id: "102",
|
|
42
|
-
// athlete: "Gulnara Samitova-Galkina",
|
|
43
|
-
// age: 30,
|
|
44
|
-
// country: "Russia",
|
|
45
|
-
// year: 2008,
|
|
46
|
-
// date: "24/08/2008",
|
|
47
|
-
// sport: "Athletics",
|
|
48
|
-
// gold: 1,
|
|
49
|
-
// silver: 0,
|
|
50
|
-
// bronze: 0,
|
|
51
|
-
// total: 1,
|
|
52
|
-
// status: 3,
|
|
53
|
-
// color: "black"
|
|
54
|
-
// },
|
|
55
|
-
// {
|
|
56
|
-
// id: "103",
|
|
57
|
-
// athlete: "Nitesh",
|
|
58
|
-
// age: 25,
|
|
59
|
-
// country: "India",
|
|
60
|
-
// year: 1999,
|
|
61
|
-
// date: "14/03/2008",
|
|
62
|
-
// sport: "Volleyball",
|
|
63
|
-
// gold: 1,
|
|
64
|
-
// silver: 0,
|
|
65
|
-
// bronze: 2,
|
|
66
|
-
// total: 2,
|
|
67
|
-
// status: 2,
|
|
68
|
-
// color: "orange"
|
|
69
|
-
// }
|
|
70
|
-
// ];
|
|
71
|
-
// const onStatusChanged =(status,rowId)=>{
|
|
72
|
-
// console.log("updated status in callback in page",status,rowId)
|
|
73
|
-
// }
|
|
74
|
-
// interface columnDropDown {
|
|
75
|
-
// name:string,
|
|
76
|
-
// value:string | number
|
|
77
|
-
// }
|
|
78
|
-
// interface colDef {
|
|
79
|
-
// headerCheckboxSelection?: boolean,
|
|
80
|
-
// checkboxSelection?: boolean,
|
|
81
|
-
// field: string,
|
|
82
|
-
// headerName:string,
|
|
83
|
-
// minWidth?: number,
|
|
84
|
-
// maxWidth?: number,
|
|
85
|
-
// code?: string | number,
|
|
86
|
-
// filter?:boolean,
|
|
87
|
-
// isSortable:boolean,
|
|
88
|
-
// editable:boolean,
|
|
89
|
-
// dataType:string,
|
|
90
|
-
// columnDorpDownOptions?: columnDropDown[]
|
|
91
|
-
// }
|
|
92
|
-
// const [rowData,setRowData] = useState<IOlympicData[]>([]);
|
|
93
|
-
// const [columnDefs] = useState<colDef[]>([
|
|
94
|
-
// {
|
|
95
|
-
// headerCheckboxSelection: true,
|
|
96
|
-
// checkboxSelection: true,
|
|
97
|
-
// field: "athlete",
|
|
98
|
-
// headerName:"Sports Person",
|
|
99
|
-
// minWidth: 200,
|
|
100
|
-
// filter:false,
|
|
101
|
-
// isSortable:false,
|
|
102
|
-
// editable:true,
|
|
103
|
-
// dataType:"string"
|
|
104
|
-
// },
|
|
105
|
-
// { field: "age", maxWidth: 90,isSortable:true,headerName:"age" ,code:1,dataType:"integer",editable:true,},
|
|
106
|
-
// { field: "country", minWidth: 150 ,isSortable:true, headerName:"country",code:2, dataType:"string",editable:false,},
|
|
107
|
-
// { field: "year", maxWidth: 90 ,isSortable:true, headerName:"year",code:3, dataType:"integer",editable:true,},
|
|
108
|
-
// { field: "date", minWidth: 150 ,isSortable:true, headerName:"date",code:4, dataType:"date",editable:true,},
|
|
109
|
-
// { field: "sport", minWidth: 150 ,isSortable:true, headerName:"sport",code:3, dataType:"string",editable:true,},
|
|
110
|
-
// { field: "gold" ,isSortable:true, headerName:"gold",code:2, dataType:"integer",editable:false},
|
|
111
|
-
// { field: "silver" ,isSortable:true, headerName:"silver",code:4 , dataType:"integer",editable:false},
|
|
112
|
-
// { field: "bronze" ,isSortable:true, headerName:"bronze",code:3 , dataType:"integer",editable:false},
|
|
113
|
-
// { field: "total",isSortable:false, headerName:"total",code:1 , dataType:"integer",editable:false},
|
|
114
|
-
// { field: "color" ,isSortable:false, headerName:"color",code:1, dataType:"string",editable:false},
|
|
115
|
-
// const [rowData, setRowData] = useState<IOlympicData[]>([]);
|
|
116
|
-
const [columnDefs] = (0, react_1.useState)([
|
|
117
|
-
{ headerName: "ID", field: "id" },
|
|
118
|
-
{ headerName: "Title", field: "name" },
|
|
119
|
-
{ headerName: "Body", field: "body" }
|
|
120
|
-
// {
|
|
121
|
-
// field: "status",
|
|
122
|
-
// minWidth:200,
|
|
123
|
-
// cellRenderer: "statusCellRenderer",
|
|
124
|
-
// cellRendererParams:{onStatusChanged:onStatusChanged},
|
|
125
|
-
// cellRendererSelector:(params)=>{getSelectedDropDown(params)},
|
|
126
|
-
// editable:false
|
|
127
|
-
// },
|
|
128
|
-
]);
|
|
129
|
-
// const [columnDefs] = useState([
|
|
130
|
-
// {
|
|
131
|
-
// headerCheckboxSelection: true,
|
|
132
|
-
// checkboxSelection: true,
|
|
133
|
-
// field: "athlete",
|
|
134
|
-
// headerName:"Sports Person",
|
|
135
|
-
// minWidth: 200,
|
|
136
|
-
// filter:false,
|
|
137
|
-
// isSortable:false,
|
|
138
|
-
// editable:true,
|
|
139
|
-
// dataType:"string"
|
|
140
|
-
// },
|
|
141
|
-
// { field: "age", maxWidth: 90,isSortable:true,headerName:"age" ,code:1,dataType:"integer",editable:true,},
|
|
142
|
-
// { field: "country", minWidth: 150 ,isSortable:true, headerName:"country",code:2, dataType:"string",editable:false,},
|
|
143
|
-
// { field: "year", maxWidth: 90 ,isSortable:true, headerName:"year",code:3, dataType:"integer",editable:true,},
|
|
144
|
-
// { field: "date", minWidth: 150 ,isSortable:true, headerName:"date",code:4, dataType:"date",editable:true,},
|
|
145
|
-
// { field: "sport", minWidth: 150 ,isSortable:true, headerName:"sport",code:3, dataType:"string",editable:true,},
|
|
146
|
-
// { field: "gold" ,isSortable:true, headerName:"gold",code:2, dataType:"integer",editable:false},
|
|
147
|
-
// { field: "silver" ,isSortable:true, headerName:"silver",code:4 , dataType:"integer",editable:false},
|
|
148
|
-
// { field: "bronze" ,isSortable:true, headerName:"bronze",code:3 , dataType:"integer",editable:false},
|
|
149
|
-
// { field: "total",isSortable:false, headerName:"total",code:1 , dataType:"integer",editable:false},
|
|
150
|
-
// { field: "color" ,isSortable:false, headerName:"color",code:1, dataType:"string",editable:false},
|
|
151
|
-
// ]);
|
|
152
|
-
const getRowData = (startRow, endRow) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
153
|
-
console.log(startRow, endRow, 'row config');
|
|
154
|
-
// const result = (
|
|
155
|
-
// await axios.get(
|
|
156
|
-
// "https://www.ag-grid.com/example-assets/olympic-winners.json"
|
|
157
|
-
// )
|
|
158
|
-
// ).data;
|
|
159
|
-
// setRowData(rowDataStore);
|
|
160
|
-
const result = yield axios_1.default.get(`https://jsonplaceholder.typicode.com/comments?_start=${startRow}&_end=${endRow}`);
|
|
161
|
-
console.log(result.data, 'result from api');
|
|
162
|
-
// console.log(result,startRow, endRow, 'calling funct in product')
|
|
163
|
-
return [];
|
|
164
|
-
});
|
|
165
|
-
// useEffect(() => {
|
|
166
|
-
// getRowData();
|
|
167
|
-
// }, []);
|
|
168
|
-
const style = {
|
|
169
|
-
height: 700,
|
|
170
|
-
width: 1020
|
|
171
|
-
};
|
|
172
|
-
return ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(ParentForGrid_1.default, { columnData: columnDefs, style: style, getRowData: getRowData }) }));
|
|
173
|
-
};
|
|
174
|
-
exports.default = AgGridPage;
|