ods-component-lib 1.18.201 → 1.18.204
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 +3 -0
- package/dist/components/antd/fileUpload/OdsFileUpload.d.ts +2 -0
- package/dist/components/antd/modal/OdsAdvanceModal.d.ts +1 -1
- package/dist/components/devextreme/OdsInlineEditDataGrid/handlers/ContentHandlers.d.ts +14 -0
- package/dist/components/devextreme/OdsInlineEditDataGrid/handlers/EditorPreparedHandlers.d.ts +7 -0
- package/dist/components/devextreme/OdsInlineEditDataGrid/handlers/OnExportingHandlers.d.ts +19 -0
- package/dist/components/devextreme/OdsInlineEditDataGrid/handlers/OptionHandlers.d.ts +7 -0
- package/dist/components/devextreme/OdsInlineEditDataGrid/handlers/SummaryHandlers.d.ts +21 -0
- package/dist/components/devextreme/OdsInlineEditDataGrid/partials/ActionCellRender.d.ts +15 -0
- package/dist/components/devextreme/OdsInlineEditDataGrid/partials/EditingPartial.d.ts +9 -0
- package/dist/components/devextreme/OdsInlineEditDataGrid/partials/PageTitle.d.ts +8 -0
- package/dist/components/devextreme/OdsInlineEditDataGrid/utils.d.ts +19 -0
- package/dist/index.js +17 -17
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +17 -17
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +2 -0
- package/dist/index.umd.js.map +1 -0
- package/dist/stories/OdsAdvanceModal/OdsAdvanceModal.stories.d.ts +42 -0
- package/dist/stories/OdsAdvanceModal/Samples/BasicOdsAdvanceModal.sample.d.ts +8 -0
- package/dist/stories/OdsModal/Samples/OdsModal.Sample.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -1907,7 +1907,11 @@ function OdsFileUpload(props) {
|
|
|
1907
1907
|
customValidationMessages = props.customValidationMessages,
|
|
1908
1908
|
RemoveTitle = props.RemoveTitle,
|
|
1909
1909
|
RemoveOkText = props.RemoveOkText,
|
|
1910
|
-
RemoveCancelText = props.RemoveCancelText
|
|
1910
|
+
RemoveCancelText = props.RemoveCancelText,
|
|
1911
|
+
_props$skipSizeValida = props.skipSizeValidation,
|
|
1912
|
+
skipSizeValidation = _props$skipSizeValida === void 0 ? false : _props$skipSizeValida,
|
|
1913
|
+
_props$maxFileSizeMB = props.maxFileSizeMB,
|
|
1914
|
+
maxFileSizeMB = _props$maxFileSizeMB === void 0 ? 10 : _props$maxFileSizeMB;
|
|
1911
1915
|
var confirm = Modal.confirm;
|
|
1912
1916
|
var _useState = useState(false),
|
|
1913
1917
|
previewOpen = _useState[0],
|
|
@@ -1967,7 +1971,7 @@ function OdsFileUpload(props) {
|
|
|
1967
1971
|
beforeUpload: function (file) {
|
|
1968
1972
|
try {
|
|
1969
1973
|
var fileType = allowDocumentUpload ? ["image/png", "image/jpg", "image/jpeg", "image/svg+xml", "application/pdf", "application/vnd.ms-excel", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "application/msword", "application/vnd.openxmlformats-officedocument.wordprocessingml.document"] : ["image/png", "image/jpg", "image/jpeg", "image/svg+xml"];
|
|
1970
|
-
var isFileSizeOk = file.size / (1024 * 1024) <=
|
|
1974
|
+
var isFileSizeOk = skipSizeValidation ? true : file.size / (1024 * 1024) <= maxFileSizeMB;
|
|
1971
1975
|
var checkType = fileType.includes(file.type);
|
|
1972
1976
|
if (!checkType) {
|
|
1973
1977
|
OdsNotification({
|
|
@@ -2090,7 +2094,8 @@ function OdsFileUpload(props) {
|
|
|
2090
2094
|
src: previewSrc
|
|
2091
2095
|
});
|
|
2092
2096
|
} else {
|
|
2093
|
-
var
|
|
2097
|
+
var _fileName$split$pop, _previewSrc$split$pop;
|
|
2098
|
+
var fileExtension = fileName !== "" ? (_fileName$split$pop = fileName.split(".").pop()) === null || _fileName$split$pop === void 0 ? void 0 : _fileName$split$pop.toLowerCase() : (_previewSrc$split$pop = previewSrc.split(".").pop()) === null || _previewSrc$split$pop === void 0 ? void 0 : _previewSrc$split$pop.toLowerCase();
|
|
2094
2099
|
if (fileExtension === "png" || fileExtension === "jpg" || fileExtension === "jpeg" || fileExtension === "svg") {
|
|
2095
2100
|
return React.createElement("img", {
|
|
2096
2101
|
alt: fileName == "" ? "file" : fileName,
|
|
@@ -33137,25 +33142,20 @@ var ExportDataGridToExcel = function ExportDataGridToExcel(_ref) {
|
|
|
33137
33142
|
lastProcessedRowData = gridCell.data;
|
|
33138
33143
|
}
|
|
33139
33144
|
if ((gridCell.column.dataType === "datetime" || gridCell.column.dataField === "CreateDate" || gridCell.column.dataField === "ModifyDate") && gridCell.value) {
|
|
33140
|
-
|
|
33141
|
-
var formattedDate = date.format("DD.MM.YYYY HH:mm");
|
|
33142
|
-
excelCell.value = formattedDate;
|
|
33145
|
+
excelCell.value = moment(gridCell.value).format("DD.MM.YYYY HH:mm");
|
|
33143
33146
|
} else if (gridCell.column.dataType === "date" && gridCell.value) {
|
|
33144
|
-
|
|
33145
|
-
var _formattedDate = _date.format("DD.MM.YYYY");
|
|
33146
|
-
excelCell.value = _formattedDate;
|
|
33147
|
-
} else {
|
|
33148
|
-
excelCell.font = {
|
|
33149
|
-
name: 'Arial',
|
|
33150
|
-
size: 12
|
|
33151
|
-
};
|
|
33152
|
-
excelCell.alignment = {
|
|
33153
|
-
horizontal: 'left'
|
|
33154
|
-
};
|
|
33147
|
+
excelCell.value = moment(gridCell.value).format("DD.MM.YYYY");
|
|
33155
33148
|
}
|
|
33156
33149
|
if (gridCell.rowType === 'data' && gridCell.column.dataField.toLowerCase() === "isactive") {
|
|
33157
33150
|
excelCell.value = gridCell.value === true ? "" + activeText : "" + passiveText;
|
|
33158
33151
|
}
|
|
33152
|
+
excelCell.font = {
|
|
33153
|
+
name: 'Arial',
|
|
33154
|
+
size: 12
|
|
33155
|
+
};
|
|
33156
|
+
excelCell.alignment = {
|
|
33157
|
+
horizontal: 'left'
|
|
33158
|
+
};
|
|
33159
33159
|
}
|
|
33160
33160
|
}
|
|
33161
33161
|
}).then(function () {
|