ods-component-lib 1.18.112 → 1.18.113
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 +44 -29
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +45 -30
- 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
|
@@ -23,8 +23,8 @@ var fileSaverEs = require('file-saver-es');
|
|
|
23
23
|
var moment = _interopDefault(require('moment'));
|
|
24
24
|
var outline = require('ods-icon/react/24/outline');
|
|
25
25
|
var devextremeReact = require('devextreme-react');
|
|
26
|
-
var antdStyle = require('antd-style');
|
|
27
26
|
require('devextreme/dist/css/dx.light.css');
|
|
27
|
+
var antdStyle = require('antd-style');
|
|
28
28
|
var saveAs = _interopDefault(require('file-saver'));
|
|
29
29
|
|
|
30
30
|
function _extends() {
|
|
@@ -33655,14 +33655,6 @@ function OdsDataGrdiRowButton(_ref) {
|
|
|
33655
33655
|
}, React__default.createElement(StyledButton, Object.assign({}, props), children)));
|
|
33656
33656
|
}
|
|
33657
33657
|
|
|
33658
|
-
var _templateObject$p;
|
|
33659
|
-
var useStyles = antdStyle.createStyles(function (_ref) {
|
|
33660
|
-
var css = _ref.css;
|
|
33661
|
-
return {
|
|
33662
|
-
grid: css(_templateObject$p || (_templateObject$p = _taggedTemplateLiteralLoose(["\n & .grid-cell-selected {\n background-color: lightgreen;\n }\n & .grid-cell-disable-text-selection {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -khtml-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n }\n & .grid-cell-disable-colored {\n background-color: lightgray;\n }\n & .grid-summary-row-label {\n font-weight: 900;\n /* border-bottom: 1px solid lightgray; */\n }\n & .grid-summary-row-data {\n /* border-bottom: 1px solid lightgray; */\n }\n & .grid-toolbar-button-item {\n padding: 0 !important;\n }\n "])))
|
|
33663
|
-
};
|
|
33664
|
-
});
|
|
33665
|
-
|
|
33666
33658
|
var checkCellSelectionConstraints = function checkCellSelectionConstraints(e) {
|
|
33667
33659
|
return e.rowType == "data" && e.columnIndex > -1 && e.rowIndex > -1;
|
|
33668
33660
|
};
|
|
@@ -33781,8 +33773,6 @@ var OdsBasicDataGrid = function OdsBasicDataGrid(props) {
|
|
|
33781
33773
|
fastUpdateForm = _AntForm$useForm[0];
|
|
33782
33774
|
var gridRef = React.useRef(null);
|
|
33783
33775
|
var filterApplied = React.useRef(false);
|
|
33784
|
-
var _useStyles = useStyles(),
|
|
33785
|
-
gridStyle = _useStyles.styles;
|
|
33786
33776
|
var pkName = keyExpr && keyExpr.toString();
|
|
33787
33777
|
var fileName = props.exportFileName ? props.exportFileName + moment().format("YYYYMMDD") : "DatagridExportFile" + moment().format("YYYYMMDD");
|
|
33788
33778
|
var _useState = React.useState(false),
|
|
@@ -33821,6 +33811,9 @@ var OdsBasicDataGrid = function OdsBasicDataGrid(props) {
|
|
|
33821
33811
|
var _useState12 = React.useState(0),
|
|
33822
33812
|
scrollPosition = _useState12[0],
|
|
33823
33813
|
setScrollPosition = _useState12[1];
|
|
33814
|
+
var _useState13 = React.useState(0),
|
|
33815
|
+
rowCount = _useState13[0],
|
|
33816
|
+
setRowCount = _useState13[1];
|
|
33824
33817
|
React.useEffect(function () {
|
|
33825
33818
|
constants.totalPageCount = 1;
|
|
33826
33819
|
constants.loadedPageCount = 1;
|
|
@@ -33880,7 +33873,7 @@ var OdsBasicDataGrid = function OdsBasicDataGrid(props) {
|
|
|
33880
33873
|
if (contentReady) checkSortingPropertyForInitilaize();
|
|
33881
33874
|
}, [contentReady]);
|
|
33882
33875
|
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
|
|
33876
|
+
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
33877
|
var styleSheet = document.createElement("style");
|
|
33885
33878
|
styleSheet.type = "text/css";
|
|
33886
33879
|
styleSheet.innerText = cssRules;
|
|
@@ -33905,6 +33898,12 @@ var OdsBasicDataGrid = function OdsBasicDataGrid(props) {
|
|
|
33905
33898
|
dataGridInstance.off("dataChanged", checkData);
|
|
33906
33899
|
};
|
|
33907
33900
|
}, [data]);
|
|
33901
|
+
var onCustomSelectionChanged = React.useCallback(function (e) {
|
|
33902
|
+
console.log('onCustomSelectionChanged: ', e);
|
|
33903
|
+
gridRef.current.instance.getSelectedRowsData().then(function (selectedRowsData) {
|
|
33904
|
+
setRowCount(selectedRowsData.length);
|
|
33905
|
+
});
|
|
33906
|
+
}, []);
|
|
33908
33907
|
var checkSortingPropertyForInitilaize = function checkSortingPropertyForInitilaize() {
|
|
33909
33908
|
var onOptionChanged = props.onOptionChanged;
|
|
33910
33909
|
if (onOptionChanged) {
|
|
@@ -34174,6 +34173,7 @@ var OdsBasicDataGrid = function OdsBasicDataGrid(props) {
|
|
|
34174
34173
|
var onExporting = React.useCallback(function (e) {
|
|
34175
34174
|
if (e.format === "xlsx") {
|
|
34176
34175
|
var workbook = new exceljs.Workbook();
|
|
34176
|
+
var worksheet = workbook.addWorksheet("Main sheet");
|
|
34177
34177
|
if (props.filterData != null) {
|
|
34178
34178
|
var newColumnFromFilterData = props.filterData.map(function (filterItem) {
|
|
34179
34179
|
return {
|
|
@@ -34188,7 +34188,7 @@ var OdsBasicDataGrid = function OdsBasicDataGrid(props) {
|
|
|
34188
34188
|
}
|
|
34189
34189
|
excel_exporter.exportDataGrid({
|
|
34190
34190
|
component: e.component,
|
|
34191
|
-
worksheet:
|
|
34191
|
+
worksheet: worksheet,
|
|
34192
34192
|
autoFilterEnabled: true,
|
|
34193
34193
|
customizeCell: function customizeCell(options) {
|
|
34194
34194
|
var gridCell = options.gridCell,
|
|
@@ -34216,6 +34216,19 @@ var OdsBasicDataGrid = function OdsBasicDataGrid(props) {
|
|
|
34216
34216
|
}
|
|
34217
34217
|
}
|
|
34218
34218
|
}).then(function () {
|
|
34219
|
+
var _props$customSummary;
|
|
34220
|
+
var rowCounst = worksheet.actualRowCount;
|
|
34221
|
+
if (rowCounst > 0) {
|
|
34222
|
+
var lastRow = worksheet.getRow(rowCounst);
|
|
34223
|
+
lastRow.getCell(1).value = "";
|
|
34224
|
+
}
|
|
34225
|
+
var summaryRow = worksheet.getRow(rowCounst + 1);
|
|
34226
|
+
summaryRow.getCell(1).value = ((_props$customSummary = props.customSummary) === null || _props$customSummary === void 0 ? void 0 : _props$customSummary.summaryTotalDataLabel) + " : " + rowCount;
|
|
34227
|
+
summaryRow.getCell(1).font = {
|
|
34228
|
+
name: 'Arial',
|
|
34229
|
+
size: 10,
|
|
34230
|
+
bold: true
|
|
34231
|
+
};
|
|
34219
34232
|
workbook.xlsx.writeBuffer().then(function (buffer) {
|
|
34220
34233
|
fileSaverEs.saveAs(new Blob([buffer], {
|
|
34221
34234
|
type: "application/octet-stream"
|
|
@@ -34232,7 +34245,7 @@ var OdsBasicDataGrid = function OdsBasicDataGrid(props) {
|
|
|
34232
34245
|
doc.save(fileName + ".pdf");
|
|
34233
34246
|
});
|
|
34234
34247
|
}
|
|
34235
|
-
}, [fileName, props.filterData]);
|
|
34248
|
+
}, [fileName, props.filterData, rowCount]);
|
|
34236
34249
|
var customLoad = React.useCallback(function () {
|
|
34237
34250
|
var state = JSON.parse(localStorage.getItem(props.exportFileName + "Storage"));
|
|
34238
34251
|
if (localStorage.getItem(props.exportFileName + "Storage")) {
|
|
@@ -34275,7 +34288,7 @@ var OdsBasicDataGrid = function OdsBasicDataGrid(props) {
|
|
|
34275
34288
|
}
|
|
34276
34289
|
}, []);
|
|
34277
34290
|
var renderTotal = React.useCallback(function () {
|
|
34278
|
-
var _props$
|
|
34291
|
+
var _props$customSummary4;
|
|
34279
34292
|
var result = "";
|
|
34280
34293
|
var totalloaded = 0;
|
|
34281
34294
|
if (data.length < 50 || !props.isServerSide || constants.loadedPageCount == constants.totalPageCount) {
|
|
@@ -34284,17 +34297,17 @@ var OdsBasicDataGrid = function OdsBasicDataGrid(props) {
|
|
|
34284
34297
|
totalloaded = constants.loadedPageCount * props.pageSize;
|
|
34285
34298
|
}
|
|
34286
34299
|
if (props.isServerSide) {
|
|
34287
|
-
var _props$
|
|
34288
|
-
result = constants.totalRecordCount > 0 ? totalloaded + " " + ((_props$
|
|
34300
|
+
var _props$customSummary2, _props$customSummary3;
|
|
34301
|
+
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
34302
|
result = concatFilteredLabel(result, totalloaded, filteredRowCount, filterApplied.current, props);
|
|
34290
34303
|
}
|
|
34291
|
-
if (((_props$
|
|
34304
|
+
if (((_props$customSummary4 = props.customSummary) === null || _props$customSummary4 === void 0 ? void 0 : _props$customSummary4.summaryTotalCount) !== undefined && !props.isServerSide) {
|
|
34292
34305
|
result = props.customSummary.summaryTotalDataLabel + " : " + props.customSummary.summaryTotalCount;
|
|
34293
34306
|
result = concatFilteredLabel(result, totalloaded, filteredRowCount, filterApplied.current, props);
|
|
34294
34307
|
}
|
|
34295
34308
|
if (constants.totalPageCount > 1) {
|
|
34296
|
-
var _props$
|
|
34297
|
-
result = result + " - " + ((_props$
|
|
34309
|
+
var _props$customSummary5;
|
|
34310
|
+
result = result + " - " + ((_props$customSummary5 = props.customSummary) === null || _props$customSummary5 === void 0 ? void 0 : _props$customSummary5.summaryTotalPageCountLabel) + " " + constants.loadedPageCount + " / " + constants.totalPageCount;
|
|
34298
34311
|
}
|
|
34299
34312
|
return result;
|
|
34300
34313
|
}, [data, filteredRowCount, constants.loadedPageCount, props.pageSize, constants.totalRecordCount, filterApplied.current]);
|
|
@@ -34412,6 +34425,11 @@ var OdsBasicDataGrid = function OdsBasicDataGrid(props) {
|
|
|
34412
34425
|
var handleContentReady = function handleContentReady(e) {
|
|
34413
34426
|
var dataGridInstance = e.component;
|
|
34414
34427
|
var filteredDataCount = dataGridInstance.totalCount();
|
|
34428
|
+
if (gridRef.current && gridRef.current.instance) {
|
|
34429
|
+
gridRef.current.instance.getSelectedRowsData().then(function (selectedRowsData) {
|
|
34430
|
+
setRowCount(selectedRowsData.length);
|
|
34431
|
+
});
|
|
34432
|
+
}
|
|
34415
34433
|
if (filterApplied.current && filteredDataCount > 0) {
|
|
34416
34434
|
setFilteredRowCount(filteredDataCount);
|
|
34417
34435
|
} else {
|
|
@@ -34635,12 +34653,11 @@ var OdsBasicDataGrid = function OdsBasicDataGrid(props) {
|
|
|
34635
34653
|
enabled: true
|
|
34636
34654
|
},
|
|
34637
34655
|
noDataText: props.noDataText,
|
|
34638
|
-
className: gridStyle.grid,
|
|
34639
34656
|
onEditorPreparing: onEditorPreparing,
|
|
34640
34657
|
onExporting: onExporting,
|
|
34641
34658
|
onRowClick: props.onRowClick,
|
|
34642
34659
|
onEditorPrepared: onEditorPrepared,
|
|
34643
|
-
onSelectionChanged:
|
|
34660
|
+
onSelectionChanged: onCustomSelectionChanged,
|
|
34644
34661
|
onSaved: props.onSaved,
|
|
34645
34662
|
onSaving: props.onSaving,
|
|
34646
34663
|
onEditCanceling: props.onEditCanceling,
|
|
@@ -34775,9 +34792,7 @@ var OdsBasicDataGrid = function OdsBasicDataGrid(props) {
|
|
|
34775
34792
|
}), hasFastUpdate && React__default.createElement(DataGrid.Item, null, React__default.createElement(OdsButton, {
|
|
34776
34793
|
key: "odsbutton-fastupdate",
|
|
34777
34794
|
onClick: onCustomFastUpdateButtonClick
|
|
34778
|
-
}, fastUpdateButtonText != null ? fastUpdateButtonText : "Fast Update"))), React__default.createElement(DataGrid.Summary, {
|
|
34779
|
-
calculateCustomSummary: renderTotal
|
|
34780
|
-
}, React__default.createElement(DataGrid.TotalItem, {
|
|
34795
|
+
}, fastUpdateButtonText != null ? fastUpdateButtonText : "Fast Update"))), React__default.createElement(DataGrid.Summary, null, React__default.createElement(DataGrid.TotalItem, {
|
|
34781
34796
|
column: gridColumns[0].dataField,
|
|
34782
34797
|
summaryType: "custom",
|
|
34783
34798
|
displayFormat: renderTotal()
|
|
@@ -35089,11 +35104,11 @@ var OdsTransfer = function OdsTransfer(props) {
|
|
|
35089
35104
|
}));
|
|
35090
35105
|
};
|
|
35091
35106
|
|
|
35092
|
-
var _templateObject$
|
|
35093
|
-
var useStyles
|
|
35107
|
+
var _templateObject$p, _templateObject2$1;
|
|
35108
|
+
var useStyles = antdStyle.createStyles(function (_ref) {
|
|
35094
35109
|
var css = _ref.css;
|
|
35095
35110
|
return {
|
|
35096
|
-
grid: css(_templateObject$
|
|
35111
|
+
grid: css(_templateObject$p || (_templateObject$p = _taggedTemplateLiteralLoose(["\n & .grid-cell-selected {\n background-color: lightgreen;\n }\n & .grid-cell-disable-text-selection {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -khtml-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n }\n & .grid-cell-disable-colored {\n background-color: lightgray;\n }\n & .grid-summary-row-label {\n font-weight: 900;\n }\n\n & .grid-toolbar-button-item {\n padding: 0 !important;\n }\n\n & .dx-datagrid.dx-gridbase-container.dx-datagrid-borders {\n border: none !important;\n border-radius: 16px 16px 0 0;\n }\n & .dx-datagrid-borders > .dx-datagrid-filter-panel,\n & .dx-datagrid-borders > .dx-datagrid-headers {\n border: 0 !important;\n }\n & .dx-datagrid-search-panel {\n margin-left: 0;\n }\n & .dx-toolbar-after .dx-toolbar-item,\n & .dx-toolbar-after .dx-toolbar-item:last-child {\n padding: 0;\n }\n & .dx-toolbar .dx-toolbar-after {\n display: inline-flex;\n flex-flow: row-reverse;\n gap: 5px;\n }\n "]))),
|
|
35097
35112
|
gridCustomSummary: css(_templateObject2$1 || (_templateObject2$1 = _taggedTemplateLiteralLoose(["\n background-color: rgb(255, 255, 255);\n border-radius: 0px 0px 16px 16px;\n font-size: 13px;\n text-align: unset;\n padding: 17px 16px 3px 15px;\n font-weight: 600;\n border-top: 1px solid #ededed;\n "])))
|
|
35098
35113
|
};
|
|
35099
35114
|
});
|
|
@@ -35202,7 +35217,7 @@ var OdsServerSideDatagrid = function OdsServerSideDatagrid(props) {
|
|
|
35202
35217
|
var filteredRowCount = React.useRef(0);
|
|
35203
35218
|
var filterOptions = React.useRef({});
|
|
35204
35219
|
var lastPageIndexRef = React.useRef(null);
|
|
35205
|
-
var _useStyles = useStyles
|
|
35220
|
+
var _useStyles = useStyles(),
|
|
35206
35221
|
gridStyle = _useStyles.styles;
|
|
35207
35222
|
var renderTotal = React.useCallback(function () {
|
|
35208
35223
|
var _props$customSummary, _props$customSummary2, _props$customSummary3, _props$customSummary4;
|