import { ab as e, _ as t, cw as r, T as o, e9 as a, ea as s } from "./index-8935f1b4.js";
import { _ as i } from "./lodash-226cb5b1.js";
import "./ant-design-icons-14ab96af.js";
import "./axios-125479b5.js";
import "./redux-devtools-f8b1cd80.js";
import "./alasql-f59e855e.js";
import "./react-router-8d1fc2f1.js";
import "./antd-97b654da.js";
import "react";
import "react-dom";
import "./dayjs-7fc5ce65.js";
import "./fontawesome-89eb6278.js";
import "./dnd-kit-e67c9595.js";
import "./moment-d8baa15a.js";
import "./crypto-js-8020edb5.js";
import "./styled-components-c6abe9a3.js";
import "./numbro-48e81844.js";
import "./papaparse-088c0adc.js";
import "./uuid-82f303b2.js";
import "./supabase-2e4a9112.js";
import "./fetch-6a200310.js";
import "./react-draggable-fda4f1cb.js";
import "./remark-gfm-e9b5dec7.js";
import "./buffer-e20f80c8.js";
import "./rehype-raw-41b6145f.js";
import "./parse5-6476676e.js";
import "./rehype-sanitize-deb53e9a.js";
import "./simplebar-react-cab52c82.js";
import "./react-best-gradient-color-picker-812be7ee.js";
import "./ua-parser-js-1d18a3f8.js";
import "./clsx-469c2c43.js";
import "./loglevel-5e7e37fc.js";
import "./codemirror-edf161cb.js";
import "./really-relaxed-json-e5391d6a.js";
import "./immer-c0428a8d.js";
import "./redux-saga-1b0a458d.js";
import "./hotkeys-js-0dddb21a.js";
import "./cnchar-8c3eaa86.js";
import "./react-documents-ae08f8b5.js";
import "./sql-formatter-69e8df59.js";
import "./rc-trigger-9e54e169.js";
import "./react-json-view-364658b4.js";
import "./qrcode-react-e4f7745b.js";
import "./katex-cda5b990.js";
import "./ecogis-maps-10bb29cf.js";
import "./devextreme-28d23085.js";
import "./exceljs-1678d36b.js";
import "./file-saver-es-c18fae8f.js";
test("test column", () => {
  const r2 = { title: "name" };
  let o2 = new e({ value: r2 });
  o2 = t(o2);
  const a2 = o2.getView();
  expect(a2.title).toEqual(r2.title);
}), test("test column render", () => {
  let r2 = new e({ value: { render: { compType: "text", comp: { text: "{{currentRow.id}}" } } } });
  r2 = t(r2);
  const o2 = r2.getView();
  expect(o2.render({ currentCell: null, currentIndex: null, currentRow: { id: "hello" }, currentOriginalIndex: null }, "0").getView().view({}).props.normalView).toEqual("hello");
}), test("test table", async () => {
  const e2 = { data: JSON.stringify([{ a: 1 }]), columns: [{ dataIndex: "a", hide: true }, { title: "custom", dataIndex: "", isCustom: true }] }, a2 = { query1: r({ data: [{ q: 1 }] }), query2: r({ data: [{ q2: 2 }] }) };
  let s2 = new o({ dispatch: (e3) => {
    s2 = t(s2.reduce(e3), a2);
  }, value: e2 });
  s2 = t(s2);
  let i2 = s2.children.columns.getView();
  expect(i2.length).toEqual(2), s2 = t(s2.reduce(s2.changeChildAction("data", '[{"a":1, "c":2, "d":3}]'))), await new Promise((e3) => setTimeout(e3, 20)), i2 = s2.children.columns.getView(), expect(i2.length).toEqual(4), expect(i2[0].getView().dataIndex).toEqual("a"), expect(i2[0].getView().hide).toBe(true), expect(i2[1].getView().title).toEqual("custom"), expect(i2[2].getView().title).toEqual("c"), expect(i2[3].getView().title).toEqual("d");
}, 1e3), test("test mock table render", () => {
  let e2 = new a({});
  e2 = t(e2);
}), test("test table data transform", () => {
  function e2(e3, t2) {
    const r3 = t2.exposingValues.displayData, { data: o2 } = t2.getProps(), a3 = t2.filterData;
    return expect(o2.length).toEqual(3), expect(r3.length).toEqual(e3), expect(r3.map((e4) => i.omit(e4, "custom"))).toEqual(i.map(a3, (e4) => i.omit(e4, s))), { transformedData: a3, data: o2, displayData: r3 };
  }
  const r2 = { data: JSON.stringify([{ id: 1, name: "gg" }, { id: 5, name: "gg2" }, { id: 3, name: "jjj" }]), columns: [{ dataIndex: "id", isCustom: false, sortable: true, render: { compType: "text", comp: { text: "{{currentCell}}" } } }, { dataIndex: "name", isCustom: false, render: { compType: "text", comp: { text: "{{currentCell}}" } } }, { title: "custom", dataIndex: "ealekfg", isCustom: true, render: { compType: "image", comp: { src: "{{currentRow.id}}" } } }] };
  let a2 = new o({ dispatch: (e3) => {
    a2 = t(a2.reduce(e3));
  }, value: r2 });
  a2 = t(a2), a2 = t(a2.reduce(a2.changeChildAction("sort", [{ column: "id", desc: true }])));
  let { transformedData: m, data: l, displayData: p } = e2(3, a2);
  expect(m.map((e3) => e3.id)).toEqual([5, 3, 1]), a2 = t(a2.reduce(a2.changeChildAction("toolbar", { searchText: "gg" }))), e2(2, a2), a2 = t(a2.reduce(a2.changeChildAction("toolbar", { showFilter: true, filter: { stackType: "and", filters: [{ columnKey: "id", filterValue: "4", operator: "gt" }, { columnKey: "id", filterValue: "5", operator: "lte" }] } }))), e2(1, a2);
});
