sccoreui 5.6.17 → 5.7.0
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.
|
@@ -10,17 +10,23 @@ const client_side_row_model_1 = require("@ag-grid-community/client-side-row-mode
|
|
|
10
10
|
const core_2 = require("@ag-grid-enterprise/core");
|
|
11
11
|
const range_selection_1 = require("@ag-grid-enterprise/range-selection");
|
|
12
12
|
const react_2 = require("react");
|
|
13
|
-
|
|
14
|
-
// import { IOlympicData } from "./Types";
|
|
13
|
+
const axios_1 = tslib_1.__importDefault(require("axios"));
|
|
15
14
|
core_1.ModuleRegistry.registerModules([client_side_row_model_1.ClientSideRowModelModule, range_selection_1.RangeSelectionModule]);
|
|
16
15
|
core_2.LicenseManager.setLicenseKey("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");
|
|
17
|
-
const AgGrid = (
|
|
18
|
-
|
|
19
|
-
const [columnDefs] = (0, react_2.useState)(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
16
|
+
const AgGrid = () => {
|
|
17
|
+
const [rowData, setRowData] = (0, react_2.useState)([]);
|
|
18
|
+
const [columnDefs] = (0, react_2.useState)([
|
|
19
|
+
{ field: "athlete", minWidth: 150 },
|
|
20
|
+
{ field: "age", maxWidth: 90 },
|
|
21
|
+
{ field: "country", minWidth: 150 },
|
|
22
|
+
{ field: "year", maxWidth: 90 },
|
|
23
|
+
{ field: "date", minWidth: 150 },
|
|
24
|
+
{ field: "sport", minWidth: 150 },
|
|
25
|
+
{ field: "gold" },
|
|
26
|
+
{ field: "silver" },
|
|
27
|
+
{ field: "bronze" },
|
|
28
|
+
{ field: "total" },
|
|
29
|
+
]);
|
|
24
30
|
const defaultColDef = (0, react_2.useMemo)(() => {
|
|
25
31
|
return {
|
|
26
32
|
flex: 1,
|
|
@@ -29,10 +35,11 @@ const AgGrid = ({ gridData, myRowData, propsFromChild }) => {
|
|
|
29
35
|
}, []);
|
|
30
36
|
// Get api call for rows
|
|
31
37
|
const onGridReady = (0, react_2.useCallback)((params) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
32
|
-
console.log(
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
38
|
+
console.log(params, 'params');
|
|
39
|
+
const result = (yield axios_1.default.get("https://www.ag-grid.com/example-assets/olympic-winners.json")).data;
|
|
40
|
+
console.log(result.length, result, "length of data");
|
|
41
|
+
setRowData(result);
|
|
42
|
+
}), []);
|
|
43
|
+
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)("div", Object.assign({ className: "ag-theme-alpine ", style: { height: 800, width: 1200 } }, { children: (0, jsx_runtime_1.jsx)(react_1.AgGridReact, { rowData: rowData, columnDefs: columnDefs, defaultColDef: defaultColDef, onGridReady: onGridReady, enableRangeSelection: true }) })) }) }));
|
|
37
44
|
};
|
|
38
45
|
exports.default = AgGrid;
|
|
@@ -2,18 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const react_1 = require("react");
|
|
6
5
|
const AgGrid_1 = tslib_1.__importDefault(require("./AgGrid"));
|
|
7
6
|
function ParentForGrid(props) {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
columnData: props === null || props === void 0 ? void 0 : props.columnData,
|
|
11
|
-
});
|
|
12
|
-
const [myRowData] = (0, react_1.useState)(props.rowData);
|
|
13
|
-
console.log(props, "props from product");
|
|
14
|
-
console.log(props.rowData, 'row data from props in paretn');
|
|
15
|
-
console.log(gridData.rowData, 'row data in parent');
|
|
16
|
-
console.log(myRowData, 'my row data in parent ');
|
|
17
|
-
return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(AgGrid_1.default, { gridData: gridData, myRowData: myRowData, propsFromChild: props }), (0, jsx_runtime_1.jsx)("div", { children: props === null || props === void 0 ? void 0 : props.message })] }));
|
|
7
|
+
console.log(props, 'props');
|
|
8
|
+
return ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(AgGrid_1.default, {}) }));
|
|
18
9
|
}
|
|
19
10
|
exports.default = ParentForGrid;
|
|
@@ -27,6 +27,9 @@ const FormulaCoponent = (props) => {
|
|
|
27
27
|
"openBracket": "(",
|
|
28
28
|
"closeBracket": ")",
|
|
29
29
|
};
|
|
30
|
+
(0, react_1.useEffect)(() => {
|
|
31
|
+
setConditionValue(props.conditionValue);
|
|
32
|
+
}, [props.conditionValue]);
|
|
30
33
|
(0, react_1.useEffect)(() => {
|
|
31
34
|
if (props === null || props === void 0 ? void 0 : props.fieldOptions)
|
|
32
35
|
setFieldOptions(props === null || props === void 0 ? void 0 : props.fieldOptions);
|
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
import "ag-grid-community/styles/ag-grid.css";
|
|
2
2
|
import "ag-grid-community/styles/ag-theme-quartz.css";
|
|
3
|
-
declare const AgGrid: (
|
|
4
|
-
gridData: any;
|
|
5
|
-
myRowData: any;
|
|
6
|
-
propsFromChild: any;
|
|
7
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare const AgGrid: () => import("react/jsx-runtime").JSX.Element;
|
|
8
4
|
export default AgGrid;
|