elab_components 0.0.1 → 0.0.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/App.d.ts +0 -1
- package/dist/components/Grid/index.d.ts +3 -1
- package/dist/index.esm.js +159 -47
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +157 -45
- package/dist/index.js.map +1 -1
- package/dist/utils/gridCell.d.ts +5 -0
- package/package.json +2 -1
package/dist/App.d.ts
CHANGED
|
@@ -19,7 +19,6 @@ interface IGrid extends GridProps {
|
|
|
19
19
|
onSelectionChange: (event: GridSelectionChangeEvent) => void;
|
|
20
20
|
onHeaderSelectionChange: (event: GridHeaderSelectionChangeEvent) => void;
|
|
21
21
|
columnConfigs: any;
|
|
22
|
-
detailComponent: Function;
|
|
23
22
|
expandChange: Function;
|
|
24
23
|
page: State;
|
|
25
24
|
pageSizeValue: number | string | undefined;
|
|
@@ -39,6 +38,9 @@ interface IGrid extends GridProps {
|
|
|
39
38
|
apiColumnConfig: any;
|
|
40
39
|
searchKeyword: string;
|
|
41
40
|
setSearchKeyword: Function;
|
|
41
|
+
advanceFilterData: any;
|
|
42
|
+
advanceFilterDataActive: boolean;
|
|
43
|
+
filterSubmit: any;
|
|
42
44
|
allColumnsField: Array<{
|
|
43
45
|
field: string;
|
|
44
46
|
title: string;
|
package/dist/index.esm.js
CHANGED
|
@@ -2,16 +2,16 @@ import React, { useState, useMemo, useCallback, useEffect } from 'react';
|
|
|
2
2
|
import { Button, DropDownButton, SplitButton, Toolbar, ButtonGroup } from '@progress/kendo-react-buttons';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
4
|
import { Window, Dialog, DialogActionsBar } from '@progress/kendo-react-dialogs';
|
|
5
|
-
import { MultiSelect, DropDownList } from '@progress/kendo-react-dropdowns';
|
|
5
|
+
import { MultiSelect, DropDownList, ComboBox } from '@progress/kendo-react-dropdowns';
|
|
6
6
|
import { Editor } from '@progress/kendo-react-editor';
|
|
7
7
|
import { ArcGauge } from '@progress/kendo-react-gauges';
|
|
8
|
-
import { Grid, getSelectedState, GridColumn } from '@progress/kendo-react-grid';
|
|
8
|
+
import { Grid, getSelectedState, GridToolbar, GridColumn } from '@progress/kendo-react-grid';
|
|
9
9
|
import { getter, process as process$1 } from '@progress/kendo-data-query';
|
|
10
10
|
import { ExcelExport } from '@progress/kendo-react-excel-export';
|
|
11
11
|
import { Input, Checkbox, Switch, NumericTextBox, MaskedTextBox } from '@progress/kendo-react-inputs';
|
|
12
|
+
import { DatePicker, TimePicker, MultiViewCalendar, Calendar, DateInput, DateRangePicker, DateTimePicker } from '@progress/kendo-react-dateinputs';
|
|
12
13
|
import { TreeView } from '@progress/kendo-react-treeview';
|
|
13
14
|
import { Chart } from '@progress/kendo-react-charts';
|
|
14
|
-
import { TimePicker, MultiViewCalendar, Calendar, DateInput, DateRangePicker, DateTimePicker } from '@progress/kendo-react-dateinputs';
|
|
15
15
|
import { Drawer } from '@progress/kendo-react-layout';
|
|
16
16
|
export { DrawerContent as OkDrawerContent } from '@progress/kendo-react-layout';
|
|
17
17
|
|
|
@@ -42,7 +42,7 @@ function styleInject(css, ref) {
|
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
var css_248z = "/** @format */\r\n@import '@progress/kendo-theme-material/dist/all';\r\n\r\nbody {\r\n margin: 0;\r\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto',\r\n 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans',\r\n 'Helvetica Neue', sans-serif;\r\n -webkit-font-smoothing: antialiased;\r\n -moz-osx-font-smoothing: grayscale;\r\n}\r\n\r\ncode {\r\n font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',\r\n monospace;\r\n}\r\n";
|
|
45
|
+
var css_248z = "/** @format */\r\n@import '@progress/kendo-theme-material/dist/all';\r\n\r\nbody {\r\n margin: 0;\r\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto',\r\n 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans',\r\n 'Helvetica Neue', sans-serif;\r\n -webkit-font-smoothing: antialiased;\r\n -moz-osx-font-smoothing: grayscale;\r\n}\r\n\r\ncode {\r\n font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',\r\n monospace;\r\n}\r\n\r\n.k-grid-toolbar {\r\n border-width: none;\r\n}\r\n.k-toolbar {\r\n padding-inline: 0px;\r\n padding: 10px 0px;\r\n}\r\n.k-button {\r\n text-transform: none;\r\n}\r\n\r\n.button-container {\r\n margin-left: auto;\r\n display: flex;\r\n gap: 15px;\r\n}\r\n\r\n.button-container .custom-button {\r\n background-color: transparent;\r\n border: none;\r\n box-shadow: none;\r\n cursor: pointer;\r\n}\r\n\r\n.button-container .button-content {\r\n display: flex;\r\n align-items: center;\r\n gap: 5px;\r\n}\r\n\r\n.button-container .icon {\r\n font-size: 20px;\r\n font-weight: bold;\r\n}\r\n\r\n.button-container .text {\r\n font-size: 16px;\r\n}\r\n";
|
|
46
46
|
styleInject(css_248z);
|
|
47
47
|
|
|
48
48
|
/******************************************************************************
|
|
@@ -165,15 +165,93 @@ var OkInput = function (_a) {
|
|
|
165
165
|
};
|
|
166
166
|
var templateObject_1$g;
|
|
167
167
|
|
|
168
|
+
var DefaultContext = {
|
|
169
|
+
color: undefined,
|
|
170
|
+
size: undefined,
|
|
171
|
+
className: undefined,
|
|
172
|
+
style: undefined,
|
|
173
|
+
attr: undefined
|
|
174
|
+
};
|
|
175
|
+
var IconContext = React.createContext && /*#__PURE__*/React.createContext(DefaultContext);
|
|
176
|
+
|
|
177
|
+
var _excluded = ["attr", "size", "title"];
|
|
178
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
179
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
|
|
180
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
181
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
182
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
183
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
184
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
185
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
186
|
+
function Tree2Element(tree) {
|
|
187
|
+
return tree && tree.map((node, i) => /*#__PURE__*/React.createElement(node.tag, _objectSpread({
|
|
188
|
+
key: i
|
|
189
|
+
}, node.attr), Tree2Element(node.child)));
|
|
190
|
+
}
|
|
191
|
+
function GenIcon(data) {
|
|
192
|
+
return props => /*#__PURE__*/React.createElement(IconBase, _extends({
|
|
193
|
+
attr: _objectSpread({}, data.attr)
|
|
194
|
+
}, props), Tree2Element(data.child));
|
|
195
|
+
}
|
|
196
|
+
function IconBase(props) {
|
|
197
|
+
var elem = conf => {
|
|
198
|
+
var {
|
|
199
|
+
attr,
|
|
200
|
+
size,
|
|
201
|
+
title
|
|
202
|
+
} = props,
|
|
203
|
+
svgProps = _objectWithoutProperties(props, _excluded);
|
|
204
|
+
var computedSize = size || conf.size || "1em";
|
|
205
|
+
var className;
|
|
206
|
+
if (conf.className) className = conf.className;
|
|
207
|
+
if (props.className) className = (className ? className + " " : "") + props.className;
|
|
208
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
209
|
+
stroke: "currentColor",
|
|
210
|
+
fill: "currentColor",
|
|
211
|
+
strokeWidth: "0"
|
|
212
|
+
}, conf.attr, attr, svgProps, {
|
|
213
|
+
className: className,
|
|
214
|
+
style: _objectSpread(_objectSpread({
|
|
215
|
+
color: props.color || conf.color
|
|
216
|
+
}, conf.style), props.style),
|
|
217
|
+
height: computedSize,
|
|
218
|
+
width: computedSize,
|
|
219
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
220
|
+
}), title && /*#__PURE__*/React.createElement("title", null, title), props.children);
|
|
221
|
+
};
|
|
222
|
+
return IconContext !== undefined ? /*#__PURE__*/React.createElement(IconContext.Consumer, null, conf => elem(conf)) : elem(DefaultContext);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
// THIS FILE IS AUTO GENERATED
|
|
226
|
+
function HiViewColumns (props) {
|
|
227
|
+
return GenIcon({"tag":"svg","attr":{"viewBox":"0 0 24 24","fill":"currentColor","aria-hidden":"true"},"child":[{"tag":"path","attr":{"d":"M15 3.75H9v16.5h6V3.75ZM16.5 20.25h3.375c1.035 0 1.875-.84 1.875-1.875V5.625c0-1.036-.84-1.875-1.875-1.875H16.5v16.5ZM4.125 3.75H7.5v16.5H4.125a1.875 1.875 0 0 1-1.875-1.875V5.625c0-1.036.84-1.875 1.875-1.875Z"},"child":[]}]})(props);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
// THIS FILE IS AUTO GENERATED
|
|
231
|
+
function PiExportBold (props) {
|
|
232
|
+
return GenIcon({"tag":"svg","attr":{"viewBox":"0 0 256 256","fill":"currentColor"},"child":[{"tag":"path","attr":{"d":"M220,112v96a20,20,0,0,1-20,20H56a20,20,0,0,1-20-20V112A20,20,0,0,1,56,92H76a12,12,0,0,1,0,24H60v88H196V116H180a12,12,0,0,1,0-24h20A20,20,0,0,1,220,112ZM96.49,72.49,116,53v83a12,12,0,0,0,24,0V53l19.51,19.52a12,12,0,1,0,17-17l-40-40a12,12,0,0,0-17,0l-40,40a12,12,0,1,0,17,17Z"},"child":[]}]})(props);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
// THIS FILE IS AUTO GENERATED
|
|
236
|
+
function MdFilterList (props) {
|
|
237
|
+
return GenIcon({"tag":"svg","attr":{"viewBox":"0 0 24 24"},"child":[{"tag":"path","attr":{"fill":"none","d":"M0 0h24v24H0z"},"child":[]},{"tag":"path","attr":{"d":"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"},"child":[]}]})(props);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
// THIS FILE IS AUTO GENERATED
|
|
241
|
+
function IoClose (props) {
|
|
242
|
+
return GenIcon({"tag":"svg","attr":{"viewBox":"0 0 512 512"},"child":[{"tag":"path","attr":{"d":"m289.94 256 95-95A24 24 0 0 0 351 127l-95 95-95-95a24 24 0 0 0-34 34l95 95-95 95a24 24 0 1 0 34 34l95-95 95 95a24 24 0 0 0 34-34z"},"child":[]}]})(props);
|
|
243
|
+
}
|
|
244
|
+
|
|
168
245
|
/** @format */
|
|
169
246
|
var StyledGrid = styled(Grid)(templateObject_1$f || (templateObject_1$f = __makeTemplateObject([""], [""])));
|
|
170
247
|
var OkGrid = function (_a) {
|
|
171
248
|
var props = __rest(_a, []);
|
|
172
|
-
var resizable = props.resizable, reorderable = props.reorderable, data = props.data, pageSizeValue = props.pageSizeValue, filterable = props.filterable, style = props.style, sortable = props.sortable, groupable = props.groupable, editField = props.editField, skip = props.skip, take = props.take,
|
|
249
|
+
var resizable = props.resizable, reorderable = props.reorderable, data = props.data, pageSizeValue = props.pageSizeValue, filterable = props.filterable, style = props.style, sortable = props.sortable, groupable = props.groupable, editField = props.editField, skip = props.skip, take = props.take, dataItemKey = props.dataItemKey, columnConfigs = props.columnConfigs, setSelectedState = props.setSelectedState, selectedState = props.selectedState; props.setPageSizeValue; props.setPage; var columnOption = props.columnOption, setColumnOption = props.setColumnOption, expandChange = props.expandChange, setSearchKeyword = props.setSearchKeyword, searchKeyword = props.searchKeyword, allColumnsField = props.allColumnsField, expandedRows = props.expandedRows, advanceFilterData = props.advanceFilterData, advanceFilterDataActive = props.advanceFilterDataActive; props.filterSubmit;
|
|
173
250
|
var excelExport = React.useRef(null);
|
|
174
|
-
var _b = useState([]), newData = _b[0]
|
|
251
|
+
var _b = useState([]), newData = _b[0]; _b[1];
|
|
175
252
|
var _c = useState(), runQueriesFilter = _c[0]; _c[1];
|
|
176
253
|
var _d = React.useState(null), editID = _d[0]; _d[1];
|
|
254
|
+
var _e = useState(false), filterShow = _e[0], setFilterShow = _e[1];
|
|
177
255
|
var isRowExpanded = function (productID) {
|
|
178
256
|
return expandedRows.includes(productID);
|
|
179
257
|
};
|
|
@@ -197,7 +275,7 @@ var OkGrid = function (_a) {
|
|
|
197
275
|
});
|
|
198
276
|
}, [data, searchKeyword, expandedRows, selectedState, editID]);
|
|
199
277
|
console.log('filteredProducts', filteredProducts);
|
|
200
|
-
var
|
|
278
|
+
var _f = React.useState({
|
|
201
279
|
take: 10,
|
|
202
280
|
skip: 0,
|
|
203
281
|
group: [],
|
|
@@ -206,9 +284,32 @@ var OkGrid = function (_a) {
|
|
|
206
284
|
logic: 'and',
|
|
207
285
|
filters: [],
|
|
208
286
|
},
|
|
209
|
-
}), dataState =
|
|
210
|
-
var
|
|
211
|
-
|
|
287
|
+
}), dataState = _f[0], setDataState = _f[1];
|
|
288
|
+
var detailComponent = function (props) {
|
|
289
|
+
var dataItem = props.dataItem;
|
|
290
|
+
return (React.createElement("section", null,
|
|
291
|
+
React.createElement("p", null,
|
|
292
|
+
React.createElement("strong", null, "In Stock:"),
|
|
293
|
+
" ",
|
|
294
|
+
dataItem.UnitsInStock,
|
|
295
|
+
" units"),
|
|
296
|
+
React.createElement("p", null,
|
|
297
|
+
React.createElement("strong", null, "On Order:"),
|
|
298
|
+
" ",
|
|
299
|
+
dataItem.UnitsOnOrder,
|
|
300
|
+
" units"),
|
|
301
|
+
React.createElement("p", null,
|
|
302
|
+
React.createElement("strong", null, "Reorder Level:"),
|
|
303
|
+
" ",
|
|
304
|
+
dataItem.ReorderLevel,
|
|
305
|
+
" units"),
|
|
306
|
+
React.createElement("p", null,
|
|
307
|
+
React.createElement("strong", null, "Discontinued:"),
|
|
308
|
+
" ",
|
|
309
|
+
dataItem.Discontinued)));
|
|
310
|
+
};
|
|
311
|
+
var _g = React.useState(columnConfigs), columns = _g[0], setColumns = _g[1];
|
|
312
|
+
var _h = React.useState(function () {
|
|
212
313
|
var savedOptions = localStorage.getItem('gridOptions');
|
|
213
314
|
return savedOptions
|
|
214
315
|
? JSON.parse(savedOptions)
|
|
@@ -217,8 +318,8 @@ var OkGrid = function (_a) {
|
|
|
217
318
|
groupable: false,
|
|
218
319
|
filterByQueries: false,
|
|
219
320
|
};
|
|
220
|
-
}), gridOptions =
|
|
221
|
-
var
|
|
321
|
+
}), gridOptions = _h[0], setGridOptions = _h[1];
|
|
322
|
+
var _j = React.useState(process$1(data, dataState)), dataResult = _j[0], setDataResult = _j[1];
|
|
222
323
|
var onDataStateChange = function (e) {
|
|
223
324
|
setDataState(e.dataState);
|
|
224
325
|
setDataResult(process$1(data, e.dataState));
|
|
@@ -258,8 +359,6 @@ var OkGrid = function (_a) {
|
|
|
258
359
|
useEffect(function () {
|
|
259
360
|
setDataResult(process$1(data, dataState));
|
|
260
361
|
}, [data, dataState]);
|
|
261
|
-
console.log(gridOptions);
|
|
262
|
-
console.log('dataResult', dataResult);
|
|
263
362
|
var onFilterChange = function (e) {
|
|
264
363
|
setSearchKeyword(e.target.value);
|
|
265
364
|
};
|
|
@@ -268,47 +367,60 @@ var OkGrid = function (_a) {
|
|
|
268
367
|
excelExport.current.save(newData);
|
|
269
368
|
}
|
|
270
369
|
};
|
|
271
|
-
var addNew = function () {
|
|
272
|
-
var newDataItem = {
|
|
273
|
-
id: '',
|
|
274
|
-
title: 'string',
|
|
275
|
-
price: 0,
|
|
276
|
-
description: 'string',
|
|
277
|
-
categoryId: 0,
|
|
278
|
-
images: 'string',
|
|
279
|
-
};
|
|
280
|
-
setNewData(__spreadArray([newDataItem], newData, true));
|
|
281
|
-
};
|
|
282
370
|
return (React.createElement("div", { style: {
|
|
283
371
|
display: 'flex',
|
|
284
372
|
flexDirection: 'column',
|
|
285
|
-
gap: 25,
|
|
286
373
|
marginTop: '25px',
|
|
287
|
-
marginLeft: '10px',
|
|
288
|
-
marginRight: '10px',
|
|
289
374
|
} },
|
|
290
|
-
|
|
291
|
-
|
|
375
|
+
React.createElement("div", { style: {
|
|
376
|
+
display: 'flex',
|
|
377
|
+
justifyContent: 'space-between',
|
|
378
|
+
alignItems: 'center',
|
|
379
|
+
marginBottom: '5px',
|
|
380
|
+
} },
|
|
381
|
+
React.createElement(OkInput, { style: {
|
|
382
|
+
width: '300px',
|
|
383
|
+
}, value: searchKeyword, onChange: function (e) { return onFilterChange(e); }, placeholder: "Search..." }),
|
|
384
|
+
React.createElement("div", { className: "button-container" },
|
|
385
|
+
React.createElement(OkButton, { onClick: function () {
|
|
386
|
+
return setColumnOption(function (prevState) { return (__assign(__assign({}, prevState), { columnOptionModel: true })); });
|
|
387
|
+
}, type: "button", className: "custom-button" },
|
|
388
|
+
React.createElement("span", { className: "button-content" },
|
|
389
|
+
React.createElement(HiViewColumns, { className: "icon" }),
|
|
390
|
+
React.createElement("span", { className: "text" }, "Column Option"))),
|
|
391
|
+
React.createElement(OkButton, { type: "button", className: "custom-button", onClick: function () { return setFilterShow(!filterShow); } },
|
|
392
|
+
React.createElement("span", { className: "button-content" },
|
|
393
|
+
React.createElement(MdFilterList, { className: "icon" }),
|
|
394
|
+
React.createElement("span", { className: "text" }, "Filter"))),
|
|
395
|
+
React.createElement(OkButton, { type: "button", className: "custom-button", title: "Export Excel", onClick: exportExport },
|
|
396
|
+
React.createElement("span", { className: "button-content" },
|
|
397
|
+
React.createElement(PiExportBold, { className: "icon" }),
|
|
398
|
+
React.createElement("span", { className: "text" }, "Export"))))),
|
|
399
|
+
filterShow && advanceFilterDataActive && (React.createElement(GridToolbar, null,
|
|
292
400
|
React.createElement("div", { style: {
|
|
293
401
|
display: 'flex',
|
|
294
|
-
justifyContent: 'space-between',
|
|
295
402
|
alignItems: 'center',
|
|
403
|
+
justifyContent: 'space-between',
|
|
404
|
+
width: '100%',
|
|
296
405
|
} },
|
|
297
|
-
React.createElement(
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
406
|
+
React.createElement("div", { style: {
|
|
407
|
+
display: 'flex',
|
|
408
|
+
gap: '20px',
|
|
409
|
+
} },
|
|
410
|
+
advanceFilterData.map(function (item, index) { return (React.createElement("div", null,
|
|
411
|
+
item.type === 'combBox' && (React.createElement(ComboBox, { data: item.data, textField: item.textField, value: item.value, onChange: item.onchange, label: item.label, filterable: item.filterable, onFilterChange: item.filterChange })),
|
|
412
|
+
item.type === 'datePicker' && (React.createElement("div", { style: { paddingTop: '1.2rem' } },
|
|
413
|
+
React.createElement(DatePicker, { value: item.value, onChange: item.onchange, placeholder: item.placeholder }))))); }),
|
|
414
|
+
React.createElement(OkButton, { type: "button", onClick: function () { return setFilterShow(false); }, themeColor: "primary", style: { marginTop: '1.2rem', padding: '0px 30px' } }, "Apply")),
|
|
415
|
+
React.createElement(OkButton, { style: {
|
|
416
|
+
backgroundColor: 'transparent',
|
|
417
|
+
border: 'none',
|
|
418
|
+
boxShadow: 'none',
|
|
419
|
+
fontSize: '24px',
|
|
420
|
+
fontWeight: 700,
|
|
421
|
+
marginTop: '1.2rem',
|
|
422
|
+
}, type: "button", onClick: function () { return setFilterShow(false); } },
|
|
423
|
+
React.createElement(IoClose, null))))),
|
|
312
424
|
React.createElement(ExcelExport, { data: dataResult, ref: excelExport },
|
|
313
425
|
React.createElement(StyledGrid, __assign({ onHeaderSelectionChange: function (e) {
|
|
314
426
|
return onHeaderSelectionChange(e);
|
|
@@ -322,7 +434,7 @@ var OkGrid = function (_a) {
|
|
|
322
434
|
buttonCount: 4,
|
|
323
435
|
pageSizes: [2, 10, 15, 'All'],
|
|
324
436
|
pageSizeValue: pageSizeValue,
|
|
325
|
-
}, filterable: filterable, editField: editField, reorderable: reorderable, groupable: groupable, resizable: resizable, style: style, data: filteredProducts, dataItemKey: dataItemKey, take: take, sortable: sortable, detail:
|
|
437
|
+
}, filterable: filterable, editField: editField, reorderable: reorderable, groupable: groupable, resizable: resizable, style: style, data: filteredProducts, dataItemKey: dataItemKey, take: take, sortable: sortable, detail: detailComponent, expandField: "expanded" }, dataState), columns.map(function (col, index) { return (React.createElement(GridColumn, { filterable: true, key: index, editable: true, field: col.field, title: col.title, format: col.format, cell: col.cell, width: col.width, headerSelectionValue: col.headerSelectionValue, editor: col.editor })); }))),
|
|
326
438
|
columnOption.columnOptionModel && (React.createElement(ColumnAdd, { setColumnOption: setColumnOption, setColumns: setColumns, columns: columns, allColumnsField: allColumnsField, dataResult: dataResult, setDataResult: setDataResult })),
|
|
327
439
|
columnOption.columnConfigsModel && (React.createElement(GridFeatureEnableHandler, { gridOptions: gridOptions, setGridOptions: setGridOptions, setColumnOption: setColumnOption }))));
|
|
328
440
|
};
|