@grafosoft/excel-validator 1.0.0 → 1.0.2

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.
@@ -40,7 +40,6 @@ const react_1 = require("react");
40
40
  const XLSX = __importStar(require("xlsx"));
41
41
  const ExcelFile_1 = require("./ExcelFile");
42
42
  const ExcelPreview_1 = require("./ExcelPreview");
43
- const ThemeSwitcher_1 = require("./ThemeSwitcher");
44
43
  const balances_1 = require("../utils/balances");
45
44
  const updateJsonValidatorFetchUrls = (validator, initData) => {
46
45
  const environment = initData.environment.endsWith("/")
@@ -505,5 +504,5 @@ function ExcelLayout({ initData, jsonValidator, isBalances = false, }) {
505
504
  setCurrentPage(1);
506
505
  setFocusTarget(null);
507
506
  };
508
- return ((0, jsx_runtime_1.jsxs)("main", { className: "grid min-h-screen grid-cols-1 md:grid-cols-4", children: [(0, jsx_runtime_1.jsxs)("div", { className: "space-y-4 md:col-span-1", children: [(0, jsx_runtime_1.jsx)(ThemeSwitcher_1.ThemeSwitcher, {}), (0, jsx_runtime_1.jsx)(ExcelFile_1.ExcelFile, { initData: initData, fileContent: fileContent, matrix: matrix, error: error, onFileSelected: handleFileSelected, onReset: handleReset, validationErrors: validationErrors, onSelectError: handleSelectError, hasBalanceDifference: hasBalanceDifference })] }), (0, jsx_runtime_1.jsx)("div", { className: "md:col-span-3", children: (0, jsx_runtime_1.jsx)(ExcelPreview_1.ExcelPreview, { initData: initData, fileContent: fileContent, matrix: matrix, error: error, validationErrors: validationErrors, focusTarget: focusTarget, currentPage: currentPage, onPageChange: setCurrentPage, isBalances: isBalances }) })] }));
507
+ return ((0, jsx_runtime_1.jsxs)("main", { className: "grid min-h-screen grid-cols-1 md:grid-cols-4", children: [(0, jsx_runtime_1.jsx)("div", { className: "space-y-4 md:col-span-1", children: (0, jsx_runtime_1.jsx)(ExcelFile_1.ExcelFile, { initData: initData, fileContent: fileContent, matrix: matrix, error: error, onFileSelected: handleFileSelected, onReset: handleReset, validationErrors: validationErrors, onSelectError: handleSelectError, hasBalanceDifference: hasBalanceDifference }) }), (0, jsx_runtime_1.jsx)("div", { className: "md:col-span-3", children: (0, jsx_runtime_1.jsx)(ExcelPreview_1.ExcelPreview, { initData: initData, fileContent: fileContent, matrix: matrix, error: error, validationErrors: validationErrors, focusTarget: focusTarget, currentPage: currentPage, onPageChange: setCurrentPage, isBalances: isBalances }) })] }));
509
508
  }
@@ -26,7 +26,7 @@ const ExcelValidator = ({ initData, fileContent, matrix, validationErrors, onSel
26
26
  const content = lines.join("\n");
27
27
  const base64 = btoa(String.fromCharCode(...new TextEncoder().encode(content)));
28
28
  try {
29
- const response = await fetch(`http://lab.globho.com/api/v1/plains/upload?companyId=&apikey=`, {
29
+ const response = await fetch(`${initData.environment}api/v1/plains/upload?companyId=${initData.companyId}&apikey=${initData.apikey}`, {
30
30
  method: "POST",
31
31
  headers: {
32
32
  "Content-Type": "application/json",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grafosoft/excel-validator",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "React component to validate Excel files against configurable JSON rules.",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",