elab_components 0.7.11 → 0.7.13
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare const props: () => {
|
|
2
|
-
activeRangeEnd: "
|
|
2
|
+
activeRangeEnd: "start" | "end";
|
|
3
3
|
allowReverse: import("@storybook/addon-knobs/dist/type-defs").Mutable<boolean>;
|
|
4
4
|
bottomView: "month" | "year" | "decade" | "century";
|
|
5
5
|
defaultActiveView: "month" | "year" | "decade" | "century";
|
package/dist/index.esm.js
CHANGED
|
@@ -30784,9 +30784,9 @@ var OkGrid = function (_a) {
|
|
|
30784
30784
|
var prepareDataWithSelection = function (data, selectedState, dataItemKey) {
|
|
30785
30785
|
return data.map(function (item) { return (__assign(__assign({}, item), { selected: !!selectedState[item[dataItemKey]] })); });
|
|
30786
30786
|
};
|
|
30787
|
-
var _p = useState(processWithGroups(
|
|
30787
|
+
var _p = useState(processWithGroups(data, dataState)), resultState = _p[0], setResultState = _p[1];
|
|
30788
30788
|
useEffect(function () {
|
|
30789
|
-
var newDataState = processWithGroups(
|
|
30789
|
+
var newDataState = processWithGroups(data, dataState);
|
|
30790
30790
|
var allGroupIds = newDataState.data
|
|
30791
30791
|
.filter(function (item) { return item.groupId; })
|
|
30792
30792
|
.map(function (item) { return item.groupId; });
|
|
@@ -30803,6 +30803,9 @@ var OkGrid = function (_a) {
|
|
|
30803
30803
|
var updatedDataState = processWithGroups(data, dataState);
|
|
30804
30804
|
return __assign(__assign({}, updatedDataState), { data: updatedDataState.data });
|
|
30805
30805
|
};
|
|
30806
|
+
useEffect(function () {
|
|
30807
|
+
setResultState(processWithGroups(data, dataState));
|
|
30808
|
+
}, [data, dataState]);
|
|
30806
30809
|
useEffect(function () {
|
|
30807
30810
|
setResultState(function (prevState) {
|
|
30808
30811
|
var preparedData = prepareDataWithSelection(prevState.data, selectedState, dataItemKey);
|
|
@@ -31186,9 +31189,6 @@ var OkGrid = function (_a) {
|
|
|
31186
31189
|
? true
|
|
31187
31190
|
: false, editable: col === null || col === void 0 ? void 0 : col.editable, field: col.field, title: col.title, format: col.format, cells: { data: function (props) { return getCellComponent(props, col); } }, width: col.width, headerSelectionValue: col.headerSelectionValue, editor: col.editor })); });
|
|
31188
31191
|
}, [columns, getCellComponent]);
|
|
31189
|
-
console.log('data', data);
|
|
31190
|
-
console.log('resultState', resultState);
|
|
31191
|
-
console.log('expandedData', expandedData);
|
|
31192
31192
|
return (React__default.createElement("div", null,
|
|
31193
31193
|
React__default.createElement(Filters, { isQueryShow: isQueryShow, setIsQueryShow: setIsQueryShow, searchKeyword: searchKeyword, setSearchKeyword: setSearchKeyword, onFilterChange: onFilterChange, editColumnOption: editColumnOption, setColumnOption: setColumnOption, showFilter: showFilter, externalFilterShow: externalFilterShow, showSearchInput: showSearchInput, setFilterShow: setFilterShow, filterShow: filterShow, excelExport: excelExportFunc, isExcelExportLoading: allData === null || allData === void 0 ? void 0 : allData.isLoading, selectedData: selectedData, queryShow: queryShow, filterAndGrouping: filterAndGrouping, externalActionsButtons: externalActionsButtons, handleExternalButtons: handleExternalButtons, filtersInput: filtersInput, combBoxFilterData: combBoxFilterData, handleOnChange: handleOnChange, handleComboxChange: handleComboxChange, setFilterSubmittedData: setFilterSubmittedData, handleInputOnChange: handleInputOnChange, allColumnsField: allColumnsField, setRunQueries: setRunQueries, selectedState: selectedState }),
|
|
31194
31194
|
isLoading ? (React__default.createElement("div", { style: { textAlign: 'center', margin: 'auto', marginTop: '70px' } },
|
package/dist/index.js
CHANGED
|
@@ -30812,9 +30812,9 @@ var OkGrid = function (_a) {
|
|
|
30812
30812
|
var prepareDataWithSelection = function (data, selectedState, dataItemKey) {
|
|
30813
30813
|
return data.map(function (item) { return (__assign(__assign({}, item), { selected: !!selectedState[item[dataItemKey]] })); });
|
|
30814
30814
|
};
|
|
30815
|
-
var _p = React.useState(processWithGroups(
|
|
30815
|
+
var _p = React.useState(processWithGroups(data, dataState)), resultState = _p[0], setResultState = _p[1];
|
|
30816
30816
|
React.useEffect(function () {
|
|
30817
|
-
var newDataState = processWithGroups(
|
|
30817
|
+
var newDataState = processWithGroups(data, dataState);
|
|
30818
30818
|
var allGroupIds = newDataState.data
|
|
30819
30819
|
.filter(function (item) { return item.groupId; })
|
|
30820
30820
|
.map(function (item) { return item.groupId; });
|
|
@@ -30831,6 +30831,9 @@ var OkGrid = function (_a) {
|
|
|
30831
30831
|
var updatedDataState = processWithGroups(data, dataState);
|
|
30832
30832
|
return __assign(__assign({}, updatedDataState), { data: updatedDataState.data });
|
|
30833
30833
|
};
|
|
30834
|
+
React.useEffect(function () {
|
|
30835
|
+
setResultState(processWithGroups(data, dataState));
|
|
30836
|
+
}, [data, dataState]);
|
|
30834
30837
|
React.useEffect(function () {
|
|
30835
30838
|
setResultState(function (prevState) {
|
|
30836
30839
|
var preparedData = prepareDataWithSelection(prevState.data, selectedState, dataItemKey);
|
|
@@ -31214,9 +31217,6 @@ var OkGrid = function (_a) {
|
|
|
31214
31217
|
? true
|
|
31215
31218
|
: false, editable: col === null || col === void 0 ? void 0 : col.editable, field: col.field, title: col.title, format: col.format, cells: { data: function (props) { return getCellComponent(props, col); } }, width: col.width, headerSelectionValue: col.headerSelectionValue, editor: col.editor })); });
|
|
31216
31219
|
}, [columns, getCellComponent]);
|
|
31217
|
-
console.log('data', data);
|
|
31218
|
-
console.log('resultState', resultState);
|
|
31219
|
-
console.log('expandedData', expandedData);
|
|
31220
31220
|
return (React__default["default"].createElement("div", null,
|
|
31221
31221
|
React__default["default"].createElement(Filters, { isQueryShow: isQueryShow, setIsQueryShow: setIsQueryShow, searchKeyword: searchKeyword, setSearchKeyword: setSearchKeyword, onFilterChange: onFilterChange, editColumnOption: editColumnOption, setColumnOption: setColumnOption, showFilter: showFilter, externalFilterShow: externalFilterShow, showSearchInput: showSearchInput, setFilterShow: setFilterShow, filterShow: filterShow, excelExport: excelExportFunc, isExcelExportLoading: allData === null || allData === void 0 ? void 0 : allData.isLoading, selectedData: selectedData, queryShow: queryShow, filterAndGrouping: filterAndGrouping, externalActionsButtons: externalActionsButtons, handleExternalButtons: handleExternalButtons, filtersInput: filtersInput, combBoxFilterData: combBoxFilterData, handleOnChange: handleOnChange, handleComboxChange: handleComboxChange, setFilterSubmittedData: setFilterSubmittedData, handleInputOnChange: handleInputOnChange, allColumnsField: allColumnsField, setRunQueries: setRunQueries, selectedState: selectedState }),
|
|
31222
31222
|
isLoading ? (React__default["default"].createElement("div", { style: { textAlign: 'center', margin: 'auto', marginTop: '70px' } },
|