sccoreui 5.9.65 → 5.9.67
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/App.js +2 -3
- package/dist/components/list-box-dropdown/list-box-dropdown.js +12 -15
- package/dist/types/components/list-box-dropdown/list-box-dropdown.d.ts +1 -1
- package/package.json +1 -1
- package/dist/pages/aggrid/AgGrid.js +0 -257
- package/dist/pages/aggrid/BulkAction.js +0 -7
- package/dist/pages/aggrid/id-cell.js +0 -9
- 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/custom-multiselect/CustomMultiSelect.js +0 -33
- 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 -48
- package/dist/pages/input/input-text.js +0 -112
- package/dist/pages/list-box-dropdown/listboxdropdown.js +0 -55
- 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/pages/aggrid/AgGrid.d.ts +0 -2
- package/dist/types/pages/aggrid/BulkAction.d.ts +0 -2
- package/dist/types/pages/aggrid/id-cell.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/custom-multiselect/CustomMultiSelect.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
package/dist/App.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
3
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
4
|
// import Home from './pages/home';
|
|
6
5
|
require("./App.scss");
|
|
7
|
-
|
|
6
|
+
// import Home from "./pages/home";
|
|
8
7
|
const App = () => {
|
|
9
|
-
return ((0, jsx_runtime_1.jsx)("div", {
|
|
8
|
+
return ((0, jsx_runtime_1.jsx)("div", {}));
|
|
10
9
|
};
|
|
11
10
|
exports.default = App;
|
|
@@ -8,14 +8,16 @@ const react_1 = require("react");
|
|
|
8
8
|
const button_1 = require("primereact/button");
|
|
9
9
|
const svg_component_1 = tslib_1.__importDefault(require("../../directives/svg-component"));
|
|
10
10
|
// import { InputText } from "primereact/inputtext";
|
|
11
|
-
|
|
12
|
-
const ListBoxDropdown = ({ selectAll,
|
|
11
|
+
// import { Checkbox } from "primereact/checkbox";
|
|
12
|
+
const ListBoxDropdown = ({ selectAll,
|
|
13
|
+
// onSelectAll,
|
|
14
|
+
onChange, footeTemplate, headerTemplate, labelIcon, labelIconPos, label, labelIconSize, listItems, filter, multiple, filterPlaceholder, optionLabel, listClassName, menuClassName, listBoxParentClassName, listBoxclassName, optionTemplate, values, link, className, scrollElementId, buttonClassName, showChips, chipTemplate, chipClassName, chipsParentClassName, showRemoveIcon, removeIconSize, removeIconClassName, onRemoveItem, isDraggable, onDranghandle, onShow, onHide, onFocus, }) => {
|
|
13
15
|
const [selectedItems, setSelectedItems] = (0, react_1.useState)([]);
|
|
14
16
|
// const [inpValue, setInpValue] = useState<any>();
|
|
15
17
|
const optionsMenuRef = (0, react_1.useRef)();
|
|
16
|
-
const [checked, setChecked] =
|
|
18
|
+
// const [checked, setChecked] = useState<boolean>(false);
|
|
17
19
|
const onSelectOption = (e) => {
|
|
18
|
-
setChecked(e.value.length
|
|
20
|
+
// setChecked(e.value.length===listItems.length)
|
|
19
21
|
console.log(e.value.length);
|
|
20
22
|
console.log(listItems.length);
|
|
21
23
|
setSelectedItems(e.value);
|
|
@@ -61,12 +63,11 @@ const ListBoxDropdown = ({ selectAll, onSelectAll, onChange, footeTemplate, head
|
|
|
61
63
|
// setInpValue("");
|
|
62
64
|
// e.preventDefault()
|
|
63
65
|
// }
|
|
64
|
-
const onSelectAllItem = (e) => {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
};
|
|
66
|
+
// const onSelectAllItem = (e:any) => {
|
|
67
|
+
// e.stopPropagation();
|
|
68
|
+
// setChecked(!checked);
|
|
69
|
+
// if (onSelectAll) onSelectAll(!checked);
|
|
70
|
+
// }
|
|
70
71
|
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: className }, { children: [(0, jsx_runtime_1.jsx)(menu_1.Menu, { onShow: (e) => onShow && onShow(e), onHide: (e) => onHide && onHide(e), onFocus: (e) => onFocus && onFocus(e), popup: true, ref: optionsMenuRef, id: "popup_menu_bottom", className: menuClassName ? menuClassName : "",
|
|
71
72
|
// ref={optionsMenuRef}
|
|
72
73
|
model: [
|
|
@@ -74,11 +75,7 @@ const ListBoxDropdown = ({ selectAll, onSelectAll, onChange, footeTemplate, head
|
|
|
74
75
|
template: () => ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: listBoxParentClassName
|
|
75
76
|
? listBoxParentClassName +
|
|
76
77
|
" list_box_dropdown border-round-lg border-1 overflow-hidden border-gray-200"
|
|
77
|
-
: "list_box_dropdown" }, { children: [headerTemplate && (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: headerTemplate() }), (0, jsx_runtime_1.
|
|
78
|
-
// onClick={() => {
|
|
79
|
-
// if (onSelectAll) onSelectAll();
|
|
80
|
-
// }}
|
|
81
|
-
className: "text-primary-400 bg-white pt-0 px-2 flex gap-2 align-items-center w-full font-semibold absolute z-4 text-left focus:shadow-none", style: { top: "10em" }, link: true }, { children: [(0, jsx_runtime_1.jsx)(checkbox_1.Checkbox, { checked: checked }), " ", (0, jsx_runtime_1.jsx)("span", { children: checked ? "Select All" : "Unselect All" })] })), (0, jsx_runtime_1.jsx)(listbox_1.ListBox, { itemTemplate: (option) => ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: optionTemplate ? (optionTemplate(option)) : ((0, jsx_runtime_1.jsx)("span", { children: option[`${optionLabel}`] })) })), listClassName: `${listClassName ? listClassName : " h-18rem overflow-auto "} ${selectAll && " mt-8 pt-2"}`, filter: filter ? true : false, multiple: multiple ? true : false, value: selectedItems, onChange: (e) => onSelectOption(e), options: listItems, optionLabel: optionLabel, className: `${listBoxclassName
|
|
78
|
+
: "list_box_dropdown" }, { children: [headerTemplate && (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: headerTemplate() }), (0, jsx_runtime_1.jsx)(listbox_1.ListBox, { itemTemplate: (option) => ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: optionTemplate ? (optionTemplate(option)) : ((0, jsx_runtime_1.jsx)("span", { children: option[`${optionLabel}`] })) })), listClassName: `${listClassName ? listClassName : " h-18rem overflow-auto "} ${selectAll && ""}`, filter: filter ? true : false, multiple: multiple ? true : false, value: selectedItems, onChange: (e) => onSelectOption(e), options: listItems, optionLabel: optionLabel, className: `${listBoxclassName
|
|
82
79
|
? listBoxclassName
|
|
83
80
|
: "w-16rem border-none "} `, filterPlaceholder: filterPlaceholder ? filterPlaceholder : "" }), footeTemplate && (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: footeTemplate() })] }))),
|
|
84
81
|
},
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ListBoxDropdownTypes } from "../types/type";
|
|
2
|
-
declare const ListBoxDropdown: ({ selectAll,
|
|
2
|
+
declare const ListBoxDropdown: ({ selectAll, onChange, footeTemplate, headerTemplate, labelIcon, labelIconPos, label, labelIconSize, listItems, filter, multiple, filterPlaceholder, optionLabel, listClassName, menuClassName, listBoxParentClassName, listBoxclassName, optionTemplate, values, link, className, scrollElementId, buttonClassName, showChips, chipTemplate, chipClassName, chipsParentClassName, showRemoveIcon, removeIconSize, removeIconClassName, onRemoveItem, isDraggable, onDranghandle, onShow, onHide, onFocus, }: ListBoxDropdownTypes) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default ListBoxDropdown;
|
package/package.json
CHANGED
|
@@ -1,257 +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 parent_for_grid_1 = tslib_1.__importDefault(require("../../components/ag-grid/parent-for-grid"));
|
|
7
|
-
const axios_1 = tslib_1.__importDefault(require("axios"));
|
|
8
|
-
const Types_1 = require("../../components/ag-grid/Types");
|
|
9
|
-
// import IdCell from "./id-cell";
|
|
10
|
-
const constants_1 = require("../../components/ag-grid/constants");
|
|
11
|
-
// import { Dropdown } from "primereact/dropdown";
|
|
12
|
-
const custom_dropdown_1 = tslib_1.__importDefault(require("../../components/ag-grid/custom-dropdown"));
|
|
13
|
-
const BulkAction_1 = tslib_1.__importDefault(require("./BulkAction"));
|
|
14
|
-
// import { ATTRIBUTEDATATYPES } from "../../components/ag-grid/constants";
|
|
15
|
-
const AgGridPage = () => {
|
|
16
|
-
const [rowData, setRowData] = (0, react_1.useState)([]);
|
|
17
|
-
const [shouldRefetch, setShouldRefetch] = (0, react_1.useState)(false);
|
|
18
|
-
const [defaultFilters, setDefaultFilters] = (0, react_1.useState)([]);
|
|
19
|
-
const deleteComponent = () => {
|
|
20
|
-
return (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)("button", Object.assign({ className: "bg-white", onClick: () => setShouldRefetch(true) }, { children: "Delete" })) });
|
|
21
|
-
};
|
|
22
|
-
const noRowsOverlayComponent = () => {
|
|
23
|
-
return (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)("p", { children: "No Rows, message from products" }) });
|
|
24
|
-
};
|
|
25
|
-
const [columnDefs] = (0, react_1.useState)([
|
|
26
|
-
{
|
|
27
|
-
pinned: "left",
|
|
28
|
-
lockPosition: "left",
|
|
29
|
-
cellClass: "lock-pinned",
|
|
30
|
-
suppressMovable: true,
|
|
31
|
-
enableHeaderCheckbox: true,
|
|
32
|
-
enableChildCheckbox: true,
|
|
33
|
-
id: "101",
|
|
34
|
-
headerName: "ID",
|
|
35
|
-
field: "id",
|
|
36
|
-
isSortable: false,
|
|
37
|
-
code: 1,
|
|
38
|
-
dataType: Types_1.ATTRIBUTEDATATYPES.STRING,
|
|
39
|
-
editable: true,
|
|
40
|
-
isFilterable: false,
|
|
41
|
-
cellStyle: { borderRight: "1px solid #ccc" },
|
|
42
|
-
cellRendererSelector: (params) => {
|
|
43
|
-
if (params.node.rowPinned) {
|
|
44
|
-
return {
|
|
45
|
-
component: custom_dropdown_1.default,
|
|
46
|
-
params: {
|
|
47
|
-
style: { color: "#5577CC" },
|
|
48
|
-
},
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
else {
|
|
52
|
-
return undefined;
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
lockPinned: true,
|
|
58
|
-
id: "102",
|
|
59
|
-
headerName: "Title",
|
|
60
|
-
cellRendererSelector: (params) => {
|
|
61
|
-
if (params.node.rowPinned) {
|
|
62
|
-
return {
|
|
63
|
-
component: custom_dropdown_1.default,
|
|
64
|
-
params: {
|
|
65
|
-
style: { color: "#5577CC" },
|
|
66
|
-
},
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
else {
|
|
70
|
-
return undefined;
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
field: "name",
|
|
74
|
-
isSortable: true,
|
|
75
|
-
code: 1,
|
|
76
|
-
dataType: Types_1.ATTRIBUTEDATATYPES.STRING,
|
|
77
|
-
editable: false,
|
|
78
|
-
isFilterable: false,
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
lockPinned: true,
|
|
82
|
-
id: "103",
|
|
83
|
-
headerName: "Body",
|
|
84
|
-
field: "body",
|
|
85
|
-
isSortable: true,
|
|
86
|
-
code: 1,
|
|
87
|
-
dataType: Types_1.ATTRIBUTEDATATYPES.STRING,
|
|
88
|
-
editable: false,
|
|
89
|
-
isFilterable: true,
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
lockPinned: true,
|
|
93
|
-
id: "103",
|
|
94
|
-
headerName: "Status",
|
|
95
|
-
field: "status",
|
|
96
|
-
isSortable: true,
|
|
97
|
-
columnType: "single",
|
|
98
|
-
options: [
|
|
99
|
-
{ id: constants_1.STATUSLIST.DRAFT, label: "Draft", value: constants_1.STATUSLIST.DRAFT },
|
|
100
|
-
{ id: constants_1.STATUSLIST.ACTIVE, label: "Active", value: constants_1.STATUSLIST.ACTIVE },
|
|
101
|
-
{
|
|
102
|
-
id: constants_1.STATUSLIST.INACTIVE,
|
|
103
|
-
label: "Inactive",
|
|
104
|
-
value: constants_1.STATUSLIST.INACTIVE,
|
|
105
|
-
},
|
|
106
|
-
],
|
|
107
|
-
code: 1,
|
|
108
|
-
dataType: Types_1.ATTRIBUTEDATATYPES.BOOLEAN,
|
|
109
|
-
editable: false,
|
|
110
|
-
isFilterable: true,
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
pinned: "right",
|
|
114
|
-
lockPosition: "rigth",
|
|
115
|
-
cellClass: "lock-pinned",
|
|
116
|
-
cellRendererSelector: (params) => {
|
|
117
|
-
if (params.node.rowPinned) {
|
|
118
|
-
return () => null;
|
|
119
|
-
}
|
|
120
|
-
else {
|
|
121
|
-
return { component: deleteComponent };
|
|
122
|
-
}
|
|
123
|
-
},
|
|
124
|
-
},
|
|
125
|
-
]);
|
|
126
|
-
// const [selectedCity, setSelectedCity] = useState(null);
|
|
127
|
-
const pinnedTopRowData = (0, react_1.useMemo)(() => {
|
|
128
|
-
return [
|
|
129
|
-
{ id: "1",
|
|
130
|
-
name: "nitesh",
|
|
131
|
-
body: "working out"
|
|
132
|
-
}
|
|
133
|
-
];
|
|
134
|
-
}, []);
|
|
135
|
-
// Remove items from - button
|
|
136
|
-
const removeItem = (checkboxSelectionDetails) => {
|
|
137
|
-
const unSelectedData = checkboxSelectionDetails === null || checkboxSelectionDetails === void 0 ? void 0 : checkboxSelectionDetails.excludedRecords;
|
|
138
|
-
const selectedData = checkboxSelectionDetails === null || checkboxSelectionDetails === void 0 ? void 0 : checkboxSelectionDetails.includedRecords;
|
|
139
|
-
const isIternminite = checkboxSelectionDetails === null || checkboxSelectionDetails === void 0 ? void 0 : checkboxSelectionDetails.isIndeterminate;
|
|
140
|
-
console.log(checkboxSelectionDetails, 'coming in remove item products');
|
|
141
|
-
let updatedRowData = [];
|
|
142
|
-
if (isIternminite) {
|
|
143
|
-
updatedRowData = unSelectedData;
|
|
144
|
-
}
|
|
145
|
-
else if ((selectedData === null || selectedData === void 0 ? void 0 : selectedData.length) && !(isIternminite)) {
|
|
146
|
-
const childIds = new Set(selectedData === null || selectedData === void 0 ? void 0 : selectedData.map(child => child.id));
|
|
147
|
-
updatedRowData = rowData.filter(parent => !childIds.has(parent.id));
|
|
148
|
-
}
|
|
149
|
-
console.log(updatedRowData, 'result data from remove items in products');
|
|
150
|
-
return updatedRowData;
|
|
151
|
-
};
|
|
152
|
-
const getCheckedRows = (checkedRows) => {
|
|
153
|
-
console.log(checkedRows, 'checked rows in products');
|
|
154
|
-
};
|
|
155
|
-
const getRowData = (startRow, endRow, featureDetails) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
156
|
-
console.log(featureDetails, 'feature details in page for filter queries');
|
|
157
|
-
const features = featureDetails;
|
|
158
|
-
// const conditionToRemoveItem = features.checkBoxSelection.allBoxChecked || features.checkBoxSelection.isIndeterminate || features.checkBoxSelection.includedRecords.length || features.checkBoxSelection.excludedRecords.length
|
|
159
|
-
if (featureDetails.isRemoveClicked) {
|
|
160
|
-
const result = removeItem(features.checkBoxSelection);
|
|
161
|
-
const output = {
|
|
162
|
-
totalRecords: result.length,
|
|
163
|
-
rowData: result
|
|
164
|
-
};
|
|
165
|
-
return yield output;
|
|
166
|
-
}
|
|
167
|
-
let totalRecords = 500;
|
|
168
|
-
const serverSideUrl = `https://jsonplaceholder.typicode.com/comments?_start=${startRow}&_end=${endRow}`;
|
|
169
|
-
const clientSideUrl = "https://jsonplaceholder.typicode.com/comments?_limit=20";
|
|
170
|
-
console.log(serverSideUrl, clientSideUrl);
|
|
171
|
-
const result = yield axios_1.default.get(serverSideUrl);
|
|
172
|
-
result.data[2].isSelected = true;
|
|
173
|
-
const outputData = result === null || result === void 0 ? void 0 : result.data.map((item) => {
|
|
174
|
-
item.status = "Active";
|
|
175
|
-
return item;
|
|
176
|
-
});
|
|
177
|
-
let output = {
|
|
178
|
-
totalRecords: totalRecords,
|
|
179
|
-
rowData: outputData
|
|
180
|
-
};
|
|
181
|
-
if (featureDetails.searchedText === "data") {
|
|
182
|
-
output = {
|
|
183
|
-
totalRecords: 0,
|
|
184
|
-
rowData: []
|
|
185
|
-
};
|
|
186
|
-
}
|
|
187
|
-
setRowData(result.data);
|
|
188
|
-
setShouldRefetch(false);
|
|
189
|
-
return output;
|
|
190
|
-
});
|
|
191
|
-
const style = {
|
|
192
|
-
height: "100vh",
|
|
193
|
-
width: "100%"
|
|
194
|
-
};
|
|
195
|
-
const conditionsToDisplay = {
|
|
196
|
-
displayFilter: true,
|
|
197
|
-
displaySort: true,
|
|
198
|
-
displaySearch: true,
|
|
199
|
-
displayRefresh: true,
|
|
200
|
-
displayRemoveItems: true,
|
|
201
|
-
displayBulkAction: true,
|
|
202
|
-
enableViewCreate: true
|
|
203
|
-
};
|
|
204
|
-
console.log(pinnedTopRowData, defaultFilters);
|
|
205
|
-
const createView = (viewDetails) => {
|
|
206
|
-
console.log(viewDetails, 'parsed value for create view');
|
|
207
|
-
};
|
|
208
|
-
const selectFilter = () => {
|
|
209
|
-
const defaultFilters = [
|
|
210
|
-
{
|
|
211
|
-
columnName: {
|
|
212
|
-
name: "Body",
|
|
213
|
-
code: "body",
|
|
214
|
-
dataType: "string",
|
|
215
|
-
},
|
|
216
|
-
condition: 5,
|
|
217
|
-
value: "data",
|
|
218
|
-
id: "0.028544677566825438",
|
|
219
|
-
isActive: true,
|
|
220
|
-
logicalOperator: 1, // number
|
|
221
|
-
},
|
|
222
|
-
];
|
|
223
|
-
setShouldRefetch(true);
|
|
224
|
-
setDefaultFilters(defaultFilters);
|
|
225
|
-
};
|
|
226
|
-
const dynamicText = {
|
|
227
|
-
filterModelText: {
|
|
228
|
-
header: "Filter",
|
|
229
|
-
subHeader: "Streamline Your Search With Filters",
|
|
230
|
-
resetFilterAction: "Reset Filter",
|
|
231
|
-
createViewInputPlaceHolder: "Enter",
|
|
232
|
-
createViewAction: "Create View",
|
|
233
|
-
applyAction: "Apply",
|
|
234
|
-
elementOnePlaceHolder: "Select",
|
|
235
|
-
elementTwoPlaceHolder: "Select",
|
|
236
|
-
elementThreePlaceHolder_Input: "Enter Text",
|
|
237
|
-
elementThreePlaceHolder_Input_Number: "Enter Number",
|
|
238
|
-
elementThreePlaceHolder_DropDown: "Select",
|
|
239
|
-
elementThreePlaceHolder_MultiSelect: "Select",
|
|
240
|
-
elementThreePlaceHolder_Calender: "Select Date",
|
|
241
|
-
onSelectedFilter: "Selected"
|
|
242
|
-
},
|
|
243
|
-
sortModelText: {
|
|
244
|
-
header: "Column Sorting",
|
|
245
|
-
clearAction: "Clear",
|
|
246
|
-
applyAction: "Apply",
|
|
247
|
-
onSelectedSort: "Selected"
|
|
248
|
-
},
|
|
249
|
-
recordDetailModelText: {
|
|
250
|
-
totalRecordHeader: "Total Records"
|
|
251
|
-
}
|
|
252
|
-
};
|
|
253
|
-
return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("button", Object.assign({ onClick: selectFilter }, { children: "Select Filter" })), (0, jsx_runtime_1.jsx)(parent_for_grid_1.default, { columnData: columnDefs, style: style, getRowData: getRowData, conditionsToDisplay: conditionsToDisplay, rowModelType: constants_1.ROWMODELTYPE.INFINITE,
|
|
254
|
-
// pinnedTopRowData={pinnedTopRowData}
|
|
255
|
-
bulkActionComponent: BulkAction_1.default, getCheckedRows: getCheckedRows, shouldRefetch: shouldRefetch, noRowsOverlayComponent: noRowsOverlayComponent, defaultFilters: defaultFilters, createView: createView, dynamicText: dynamicText, sortOptions: constants_1.COLUMN_SORT_OPTIONS, filterConditions: [{ id: 1, label: "AND" }, { id: 2, label: "OR" }] })] }));
|
|
256
|
-
};
|
|
257
|
-
exports.default = AgGridPage;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
|
-
function IdCell(data) {
|
|
5
|
-
var _a;
|
|
6
|
-
console.log(data.row, 'data from grid');
|
|
7
|
-
return ((0, jsx_runtime_1.jsx)("div", { children: (_a = data.row) === null || _a === void 0 ? void 0 : _a.id }));
|
|
8
|
-
}
|
|
9
|
-
exports.default = IdCell;
|