ods-component-lib 1.18.112 → 1.18.114
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/index.js +41 -15
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +42 -16
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
- package/dist/components/antd/form/OdsBasicForm.d.ts +0 -18
- package/dist/components/antd/icon/OdsIcon.d.ts +0 -10
- package/dist/components/antd/modal/OdsAdvanceModal.d.ts +0 -7
- package/dist/components/antd/select/OdsCustomMultiSelect.d.ts +0 -7
- package/dist/components/antd/select/OdsMultiSelect.d.ts +0 -9
- package/dist/components/custom/OdsLogin.d.ts +0 -8
- package/dist/components/devextreme/DxDataPopupForm.d.ts +0 -3
- package/dist/components/devextreme/DynamicIcon.d.ts +0 -5
- package/dist/components/devextreme/OdsDataGridNew.d.ts +0 -56
- package/dist/components/devextreme/OdsProfDataGrid.d.ts +0 -3
- package/dist/components/devextreme/treeview/DxTreeView.d.ts +0 -3
- package/dist/stories/OdsAdvanceModal/OdsAdvanceModal.stories.d.ts +0 -42
- package/dist/stories/OdsAdvanceModal/Samples/BasicOdsAdvanceModal.sample.d.ts +0 -8
- package/dist/stories/OdsCustomMultiSelect/OdsCustomMultiSelect.stories.d.ts +0 -9
- package/dist/stories/OdsCustomMultiSelect/Samples/Basic.Sample.d.ts +0 -1
- package/dist/stories/OdsCustomMultiSelect/Samples/ModeMultiple.Sample.d.ts +0 -1
- package/dist/stories/OdsLink/OdsLink.stories.d.ts +0 -59
- package/dist/stories/OdsTimePicker/Samples/TimeRangePicker.d.ts +0 -2
- /package/dist/components/antd/datepicker/{OdsDateRangePicker.d.ts → OdsDateRangepicker.d.ts} +0 -0
package/dist/index.js
CHANGED
|
@@ -33781,8 +33781,6 @@ var OdsBasicDataGrid = function OdsBasicDataGrid(props) {
|
|
|
33781
33781
|
fastUpdateForm = _AntForm$useForm[0];
|
|
33782
33782
|
var gridRef = React.useRef(null);
|
|
33783
33783
|
var filterApplied = React.useRef(false);
|
|
33784
|
-
var _useStyles = useStyles(),
|
|
33785
|
-
gridStyle = _useStyles.styles;
|
|
33786
33784
|
var pkName = keyExpr && keyExpr.toString();
|
|
33787
33785
|
var fileName = props.exportFileName ? props.exportFileName + moment().format("YYYYMMDD") : "DatagridExportFile" + moment().format("YYYYMMDD");
|
|
33788
33786
|
var _useState = React.useState(false),
|
|
@@ -33821,6 +33819,11 @@ var OdsBasicDataGrid = function OdsBasicDataGrid(props) {
|
|
|
33821
33819
|
var _useState12 = React.useState(0),
|
|
33822
33820
|
scrollPosition = _useState12[0],
|
|
33823
33821
|
setScrollPosition = _useState12[1];
|
|
33822
|
+
var _useState13 = React.useState(0),
|
|
33823
|
+
rowCount = _useState13[0],
|
|
33824
|
+
setRowCount = _useState13[1];
|
|
33825
|
+
var _useStyles = useStyles(),
|
|
33826
|
+
gridStyle = _useStyles.styles;
|
|
33824
33827
|
React.useEffect(function () {
|
|
33825
33828
|
constants.totalPageCount = 1;
|
|
33826
33829
|
constants.loadedPageCount = 1;
|
|
@@ -33880,7 +33883,7 @@ var OdsBasicDataGrid = function OdsBasicDataGrid(props) {
|
|
|
33880
33883
|
if (contentReady) checkSortingPropertyForInitilaize();
|
|
33881
33884
|
}, [contentReady]);
|
|
33882
33885
|
React.useEffect(function () {
|
|
33883
|
-
var cssRules = "\n .data-exists .dx-datagrid-borders > .dx-datagrid-filter-panel,\n .data-exists .dx-datagrid-borders > .dx-datagrid-headers {\n border-top: 1px solid rgba(0, 0, 0, 0.06);\n padding-right: 0px !important;\n }\n
|
|
33886
|
+
var cssRules = "\n .data-exists .dx-datagrid-borders > .dx-datagrid-filter-panel,\n .data-exists .dx-datagrid-borders > .dx-datagrid-headers {\n border-top: 1px solid rgba(0, 0, 0, 0.06);\n padding-right: 0px !important;\n }\n\n .data-exists .dx-datagrid-headers .dx-datagrid-content {\n margin-bottom: -1px;\n padding-right: 17px !important;\n }\n ";
|
|
33884
33887
|
var styleSheet = document.createElement("style");
|
|
33885
33888
|
styleSheet.type = "text/css";
|
|
33886
33889
|
styleSheet.innerText = cssRules;
|
|
@@ -33905,6 +33908,12 @@ var OdsBasicDataGrid = function OdsBasicDataGrid(props) {
|
|
|
33905
33908
|
dataGridInstance.off("dataChanged", checkData);
|
|
33906
33909
|
};
|
|
33907
33910
|
}, [data]);
|
|
33911
|
+
var onCustomSelectionChanged = React.useCallback(function (e) {
|
|
33912
|
+
console.log('onCustomSelectionChanged: ', e);
|
|
33913
|
+
gridRef.current.instance.getSelectedRowsData().then(function (selectedRowsData) {
|
|
33914
|
+
setRowCount(selectedRowsData.length);
|
|
33915
|
+
});
|
|
33916
|
+
}, []);
|
|
33908
33917
|
var checkSortingPropertyForInitilaize = function checkSortingPropertyForInitilaize() {
|
|
33909
33918
|
var onOptionChanged = props.onOptionChanged;
|
|
33910
33919
|
if (onOptionChanged) {
|
|
@@ -34174,6 +34183,7 @@ var OdsBasicDataGrid = function OdsBasicDataGrid(props) {
|
|
|
34174
34183
|
var onExporting = React.useCallback(function (e) {
|
|
34175
34184
|
if (e.format === "xlsx") {
|
|
34176
34185
|
var workbook = new exceljs.Workbook();
|
|
34186
|
+
var worksheet = workbook.addWorksheet("Main sheet");
|
|
34177
34187
|
if (props.filterData != null) {
|
|
34178
34188
|
var newColumnFromFilterData = props.filterData.map(function (filterItem) {
|
|
34179
34189
|
return {
|
|
@@ -34188,7 +34198,7 @@ var OdsBasicDataGrid = function OdsBasicDataGrid(props) {
|
|
|
34188
34198
|
}
|
|
34189
34199
|
excel_exporter.exportDataGrid({
|
|
34190
34200
|
component: e.component,
|
|
34191
|
-
worksheet:
|
|
34201
|
+
worksheet: worksheet,
|
|
34192
34202
|
autoFilterEnabled: true,
|
|
34193
34203
|
customizeCell: function customizeCell(options) {
|
|
34194
34204
|
var gridCell = options.gridCell,
|
|
@@ -34216,6 +34226,19 @@ var OdsBasicDataGrid = function OdsBasicDataGrid(props) {
|
|
|
34216
34226
|
}
|
|
34217
34227
|
}
|
|
34218
34228
|
}).then(function () {
|
|
34229
|
+
var _props$customSummary;
|
|
34230
|
+
var rowCounst = worksheet.actualRowCount;
|
|
34231
|
+
if (rowCounst > 0) {
|
|
34232
|
+
var lastRow = worksheet.getRow(rowCounst);
|
|
34233
|
+
lastRow.getCell(1).value = "";
|
|
34234
|
+
}
|
|
34235
|
+
var summaryRow = worksheet.getRow(rowCounst + 1);
|
|
34236
|
+
summaryRow.getCell(1).value = ((_props$customSummary = props.customSummary) === null || _props$customSummary === void 0 ? void 0 : _props$customSummary.summaryTotalDataLabel) + " : " + rowCount;
|
|
34237
|
+
summaryRow.getCell(1).font = {
|
|
34238
|
+
name: 'Arial',
|
|
34239
|
+
size: 10,
|
|
34240
|
+
bold: true
|
|
34241
|
+
};
|
|
34219
34242
|
workbook.xlsx.writeBuffer().then(function (buffer) {
|
|
34220
34243
|
fileSaverEs.saveAs(new Blob([buffer], {
|
|
34221
34244
|
type: "application/octet-stream"
|
|
@@ -34232,7 +34255,7 @@ var OdsBasicDataGrid = function OdsBasicDataGrid(props) {
|
|
|
34232
34255
|
doc.save(fileName + ".pdf");
|
|
34233
34256
|
});
|
|
34234
34257
|
}
|
|
34235
|
-
}, [fileName, props.filterData]);
|
|
34258
|
+
}, [fileName, props.filterData, rowCount]);
|
|
34236
34259
|
var customLoad = React.useCallback(function () {
|
|
34237
34260
|
var state = JSON.parse(localStorage.getItem(props.exportFileName + "Storage"));
|
|
34238
34261
|
if (localStorage.getItem(props.exportFileName + "Storage")) {
|
|
@@ -34275,7 +34298,7 @@ var OdsBasicDataGrid = function OdsBasicDataGrid(props) {
|
|
|
34275
34298
|
}
|
|
34276
34299
|
}, []);
|
|
34277
34300
|
var renderTotal = React.useCallback(function () {
|
|
34278
|
-
var _props$
|
|
34301
|
+
var _props$customSummary4;
|
|
34279
34302
|
var result = "";
|
|
34280
34303
|
var totalloaded = 0;
|
|
34281
34304
|
if (data.length < 50 || !props.isServerSide || constants.loadedPageCount == constants.totalPageCount) {
|
|
@@ -34284,17 +34307,17 @@ var OdsBasicDataGrid = function OdsBasicDataGrid(props) {
|
|
|
34284
34307
|
totalloaded = constants.loadedPageCount * props.pageSize;
|
|
34285
34308
|
}
|
|
34286
34309
|
if (props.isServerSide) {
|
|
34287
|
-
var _props$
|
|
34288
|
-
result = constants.totalRecordCount > 0 ? totalloaded + " " + ((_props$
|
|
34310
|
+
var _props$customSummary2, _props$customSummary3;
|
|
34311
|
+
result = constants.totalRecordCount > 0 ? totalloaded + " " + ((_props$customSummary2 = props.customSummary) === null || _props$customSummary2 === void 0 ? void 0 : _props$customSummary2.summaryLoadedDataLabel) + ("- " + constants.totalRecordCount) + ((_props$customSummary3 = props.customSummary) === null || _props$customSummary3 === void 0 ? void 0 : _props$customSummary3.summaryTotalDataLabel) : "";
|
|
34289
34312
|
result = concatFilteredLabel(result, totalloaded, filteredRowCount, filterApplied.current, props);
|
|
34290
34313
|
}
|
|
34291
|
-
if (((_props$
|
|
34314
|
+
if (((_props$customSummary4 = props.customSummary) === null || _props$customSummary4 === void 0 ? void 0 : _props$customSummary4.summaryTotalCount) !== undefined && !props.isServerSide) {
|
|
34292
34315
|
result = props.customSummary.summaryTotalDataLabel + " : " + props.customSummary.summaryTotalCount;
|
|
34293
34316
|
result = concatFilteredLabel(result, totalloaded, filteredRowCount, filterApplied.current, props);
|
|
34294
34317
|
}
|
|
34295
34318
|
if (constants.totalPageCount > 1) {
|
|
34296
|
-
var _props$
|
|
34297
|
-
result = result + " - " + ((_props$
|
|
34319
|
+
var _props$customSummary5;
|
|
34320
|
+
result = result + " - " + ((_props$customSummary5 = props.customSummary) === null || _props$customSummary5 === void 0 ? void 0 : _props$customSummary5.summaryTotalPageCountLabel) + " " + constants.loadedPageCount + " / " + constants.totalPageCount;
|
|
34298
34321
|
}
|
|
34299
34322
|
return result;
|
|
34300
34323
|
}, [data, filteredRowCount, constants.loadedPageCount, props.pageSize, constants.totalRecordCount, filterApplied.current]);
|
|
@@ -34412,6 +34435,11 @@ var OdsBasicDataGrid = function OdsBasicDataGrid(props) {
|
|
|
34412
34435
|
var handleContentReady = function handleContentReady(e) {
|
|
34413
34436
|
var dataGridInstance = e.component;
|
|
34414
34437
|
var filteredDataCount = dataGridInstance.totalCount();
|
|
34438
|
+
if (gridRef.current && gridRef.current.instance) {
|
|
34439
|
+
gridRef.current.instance.getSelectedRowsData().then(function (selectedRowsData) {
|
|
34440
|
+
setRowCount(selectedRowsData.length);
|
|
34441
|
+
});
|
|
34442
|
+
}
|
|
34415
34443
|
if (filterApplied.current && filteredDataCount > 0) {
|
|
34416
34444
|
setFilteredRowCount(filteredDataCount);
|
|
34417
34445
|
} else {
|
|
@@ -34640,7 +34668,7 @@ var OdsBasicDataGrid = function OdsBasicDataGrid(props) {
|
|
|
34640
34668
|
onExporting: onExporting,
|
|
34641
34669
|
onRowClick: props.onRowClick,
|
|
34642
34670
|
onEditorPrepared: onEditorPrepared,
|
|
34643
|
-
onSelectionChanged:
|
|
34671
|
+
onSelectionChanged: onCustomSelectionChanged,
|
|
34644
34672
|
onSaved: props.onSaved,
|
|
34645
34673
|
onSaving: props.onSaving,
|
|
34646
34674
|
onEditCanceling: props.onEditCanceling,
|
|
@@ -34775,9 +34803,7 @@ var OdsBasicDataGrid = function OdsBasicDataGrid(props) {
|
|
|
34775
34803
|
}), hasFastUpdate && React__default.createElement(DataGrid.Item, null, React__default.createElement(OdsButton, {
|
|
34776
34804
|
key: "odsbutton-fastupdate",
|
|
34777
34805
|
onClick: onCustomFastUpdateButtonClick
|
|
34778
|
-
}, fastUpdateButtonText != null ? fastUpdateButtonText : "Fast Update"))), React__default.createElement(DataGrid.Summary, {
|
|
34779
|
-
calculateCustomSummary: renderTotal
|
|
34780
|
-
}, React__default.createElement(DataGrid.TotalItem, {
|
|
34806
|
+
}, fastUpdateButtonText != null ? fastUpdateButtonText : "Fast Update"))), React__default.createElement(DataGrid.Summary, null, React__default.createElement(DataGrid.TotalItem, {
|
|
34781
34807
|
column: gridColumns[0].dataField,
|
|
34782
34808
|
summaryType: "custom",
|
|
34783
34809
|
displayFormat: renderTotal()
|