@grafosoft/excel-validator 1.1.6 → 1.1.7
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.
|
@@ -6,7 +6,6 @@ const react_1 = require("@heroui/react");
|
|
|
6
6
|
const react_2 = require("react");
|
|
7
7
|
const tb_1 = require("react-icons/tb");
|
|
8
8
|
const ExcelValidator_1 = require("./ExcelValidator");
|
|
9
|
-
const ThemeSwitcher_1 = require("./ThemeSwitcher");
|
|
10
9
|
const ExcelFile = ({ initData, fileContent, matrix, error, onFileSelected, onReset, validationErrors, onSelectError, onClearSelectedError, hasBalanceDifference = false, onApplyStringEmptyFilter, onDownloadFilteredExcel, isStringEmptyFilterApplied, hasStringEmptyDuplicateErrors, }) => {
|
|
11
10
|
var _a;
|
|
12
11
|
const [isVisible, setIsVisible] = (0, react_2.useState)(false);
|
|
@@ -29,7 +28,7 @@ const ExcelFile = ({ initData, fileContent, matrix, error, onFileSelected, onRes
|
|
|
29
28
|
}
|
|
30
29
|
return (bytes / KB).toFixed(2) + " KB";
|
|
31
30
|
};
|
|
32
|
-
return ((0, jsx_runtime_1.jsxs)("section", { className: "h-full bg-content1 p-4 border-none md:border-l border-default-200", children: [(0, jsx_runtime_1.
|
|
31
|
+
return ((0, jsx_runtime_1.jsxs)("section", { className: "h-full bg-content1 p-4 border-none md:border-l border-default-200", children: [(0, jsx_runtime_1.jsxs)("h2", { className: "text-xl font-semibold text-default-700", children: ["Importa ", initData.title] }), error ? ((0, jsx_runtime_1.jsx)(react_1.Alert, { color: "danger", title: error, className: "mt-3", radius: "sm", hideIconWrapper: true })) : isVisible ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(react_1.Alert, { radius: "sm", hideIconWrapper: true, hideIcon: true, isVisible: isVisible, className: "mt-4 max-w-full overflow-hidden", classNames: {
|
|
33
32
|
mainWrapper: "min-w-0 flex-1 overflow-hidden",
|
|
34
33
|
closeButton: "shrink-0",
|
|
35
34
|
}, variant: "bordered", onClose: handleReset, children: (0, jsx_runtime_1.jsxs)("div", { className: "flex min-w-0 max-w-full items-center gap-2 overflow-hidden text-default-700", children: [(0, jsx_runtime_1.jsx)(tb_1.TbFile, { className: "shrink-0", size: 28 }), " ", (0, jsx_runtime_1.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col overflow-hidden", children: [(0, jsx_runtime_1.jsx)("p", { className: "max-w-full truncate text-sm", title: fileContent === null || fileContent === void 0 ? void 0 : fileContent.name, children: fileContent === null || fileContent === void 0 ? void 0 : fileContent.name }), (0, jsx_runtime_1.jsx)("small", { className: "text-default-500", children: bytesFormat((_a = fileContent === null || fileContent === void 0 ? void 0 : fileContent.size) !== null && _a !== void 0 ? _a : 0) })] })] }) }), initData.type === "accounts" && ((0, jsx_runtime_1.jsxs)("div", { className: "mt-4 space-y-2 flex md:flex-col gap-5 md:gap-0", children: [(0, jsx_runtime_1.jsx)(react_1.Button, { className: "w-full border-1", color: "warning", variant: "bordered", radius: "sm", startContent: (0, jsx_runtime_1.jsx)(tb_1.TbFilter, { size: 18 }), onPress: onApplyStringEmptyFilter, isDisabled: !hasStringEmptyDuplicateErrors || isStringEmptyFilterApplied, children: isStringEmptyFilterApplied
|