@iyulab/flex-table 0.37.0 โ†’ 0.38.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.38.0] - 2026-09-23
4
+
5
+ ### Fixed
6
+
7
+ - ๐Ÿ”ด **Cell values follow the app's locale, not the browser's.** The built-in `number`, `date` and
8
+ `datetime` formatting called `toLocaleString()` without a locale, so values followed the runtime
9
+ default while the table's own menus and labels already followed `Locale`. An app set to Korean
10
+ and opened in an English browser showed Korean menus over `9/9/2026, 8:16:01 AM`. Values now go
11
+ through `@iyulab/components`' `formatDate`/`formatNumber`, which use `Locale.get()`, and the
12
+ numeric `format` patterns (`#,##0.00` and friends) use the same locale for their separators.
13
+ - **A date-only value such as `"2026-09-09"` is read as that local date.** It was parsed as UTC
14
+ midnight, so in timezones behind UTC a `date` column showed the previous day.
15
+
16
+ ### Changed
17
+
18
+ - ๐Ÿ”ด **The `@iyulab/components` peer range is now `>=1.27.0`** (was `>=1.24.0`). The formatters come
19
+ from that package's `format` module, which first shipped in 1.27.0; the old range admitted
20
+ versions without it.
21
+
22
+ โš  **Visible change:** if your app's `Locale` differs from the browser's language, dates and numbers in
23
+ the table now appear in the app's format. Nothing changes when the two agree.
24
+
3
25
  ## [0.37.0] - 2026-09-20
4
26
 
5
27
  ### Fixed
@@ -906,80 +906,7 @@ var l = r`
906
906
  outline: 2px solid var(--ft-find-color);
907
907
  outline-offset: -2px;
908
908
  }
909
- `;
910
- //#endregion
911
- //#region src/renderers/format.ts
912
- function u(e, t) {
913
- return e == null ? "" : typeof t == "function" ? t(e) : d(t) ? p(e, t) : f(e, t);
914
- }
915
- function d(e) {
916
- return /[yMdHhms]/.test(e);
917
- }
918
- function f(e, t) {
919
- let n = typeof e == "number" ? e : Number(e);
920
- if (isNaN(n)) return String(e);
921
- let r = t.endsWith("%"), i = t.match(/^([^#0.,%]+)/), a = i ? i[1] : "", o = t.replace(/^[^#0.,%]+/, "").replace(/%$/, ""), s = o.match(/\.([0#]+)$/), c = s ? s[1].length : 0, l = {
922
- minimumFractionDigits: c,
923
- maximumFractionDigits: c,
924
- useGrouping: o.includes(",")
925
- }, u;
926
- return r ? u = new Intl.NumberFormat(void 0, {
927
- ...l,
928
- style: "percent"
929
- }).format(n) : (u = new Intl.NumberFormat(void 0, l).format(n), a && (u = a + u)), u + "";
930
- }
931
- function p(e, t) {
932
- let n;
933
- if (e instanceof Date) n = e;
934
- else if (typeof e == "string" || typeof e == "number") n = new Date(e);
935
- else return String(e);
936
- if (isNaN(n.getTime())) return String(e);
937
- let r = String(n.getFullYear()), i = r.slice(-2), a = String(n.getMonth() + 1).padStart(2, "0"), o = String(n.getDate()).padStart(2, "0"), s = String(n.getHours()).padStart(2, "0"), c = String(n.getHours() % 12 || 12).padStart(2, "0"), l = String(n.getMinutes()).padStart(2, "0"), u = String(n.getSeconds()).padStart(2, "0");
938
- return t.replace("yyyy", r).replace("yy", i).replace("MM", a).replace("dd", o).replace("HH", s).replace("hh", c).replace("mm", l).replace("ss", u);
939
- }
940
- //#endregion
941
- //#region src/renderers/cell-renderer.ts
942
- function m(e, t, n) {
943
- return n.renderer ? n.renderer(e, t, n) : n.format ? typeof n.format == "function" ? n.format(e, t, n) : u(e, n.format) : h(e, n);
944
- }
945
- function h(e, t) {
946
- if (e == null) return "";
947
- switch (t.type) {
948
- case "number": return _(e);
949
- case "boolean": return i`<span class="ft-bool">${e ? "โœ”" : ""}</span>`;
950
- case "date": return v(e);
951
- case "datetime": return y(e);
952
- case "select": return g(e, t);
953
- default: return String(e);
954
- }
955
- }
956
- function g(e, t) {
957
- if (!t.options || t.options.length === 0 || typeof t.options[0] == "string") return e == null ? "" : String(e);
958
- let n = t.options.find((t) => t.value === e);
959
- return n ? n.label : e == null ? "" : String(e);
960
- }
961
- function _(e) {
962
- return typeof e == "number" ? Number.isInteger(e) ? e.toLocaleString() : e.toLocaleString(void 0, { minimumFractionDigits: 1 }) : String(e);
963
- }
964
- function v(e) {
965
- if (e instanceof Date) return e.toLocaleDateString();
966
- if (typeof e == "string") {
967
- let t = new Date(e);
968
- return isNaN(t.getTime()) ? e : t.toLocaleDateString();
969
- }
970
- return String(e);
971
- }
972
- function y(e) {
973
- if (e instanceof Date) return e.toLocaleString();
974
- if (typeof e == "string") {
975
- let t = new Date(e);
976
- return isNaN(t.getTime()) ? e : t.toLocaleString();
977
- }
978
- return String(e);
979
- }
980
- //#endregion
981
- //#region node_modules/@iyulab/components/dist/utilities/Locale.js
982
- var b = new Map(Object.entries(/* #__PURE__ */ Object.assign({
909
+ `, u = new Map(Object.entries(/* #__PURE__ */ Object.assign({
983
910
  "../assets/locales/ar.json": {
984
911
  valueMissing: "ู‡ุฐุง ุงู„ุญู‚ู„ ู…ุทู„ูˆุจ",
985
912
  badInput: "ูŠุฑุฌู‰ ุฅุฏุฎุงู„ ู‚ูŠู…ุฉ ุตุงู„ุญุฉ",
@@ -1554,12 +1481,12 @@ var b = new Map(Object.entries(/* #__PURE__ */ Object.assign({
1554
1481
  closeTab: "้—œ้–‰ๅˆ†้ ",
1555
1482
  breadcrumb: "้บตๅŒ…ๅฑ‘ๅฐŽ่ฆฝ"
1556
1483
  }
1557
- })).map(([e, t]) => [(e.split("/").pop()?.replace(".json", "") || "").toLowerCase(), t])), x = /* @__PURE__ */ new Map();
1558
- function S() {
1484
+ })).map(([e, t]) => [(e.split("/").pop()?.replace(".json", "") || "").toLowerCase(), t])), d = /* @__PURE__ */ new Map();
1485
+ function f() {
1559
1486
  return typeof document < "u" && document.documentElement?.lang ? document.documentElement.lang : typeof window < "u" && typeof navigator < "u" && navigator.language ? navigator.language : "en";
1560
1487
  }
1561
- var C = S();
1562
- function w(e) {
1488
+ var p = f();
1489
+ function m(e) {
1563
1490
  let t = e.toLowerCase(), n = t.split("-")[0];
1564
1491
  return n === t ? [t, "en"] : [
1565
1492
  t,
@@ -1567,56 +1494,143 @@ function w(e) {
1567
1494
  "en"
1568
1495
  ];
1569
1496
  }
1570
- function T(e, t) {
1497
+ function h(e, t) {
1571
1498
  return t ? e.replace(/\{(\w+)\}/g, (e, n) => t[n] == null ? `{${n}}` : String(t[n])) : e;
1572
1499
  }
1573
- function E(e, t) {
1574
- for (let n of w(e)) {
1575
- let e = x.get(n)?.[t] ?? b.get(n)?.[t];
1500
+ function g(e, t) {
1501
+ for (let n of m(e)) {
1502
+ let e = d.get(n)?.[t] ?? u.get(n)?.[t];
1576
1503
  if (e) return e;
1577
1504
  }
1578
- return b.get("en")[t];
1505
+ return u.get("en")[t];
1579
1506
  }
1580
- var D = /* @__PURE__ */ new Map(), O = class {
1507
+ var _ = /* @__PURE__ */ new Map(), v = class {
1581
1508
  constructor() {}
1582
1509
  static set(e) {
1583
- C = e;
1510
+ p = e;
1584
1511
  }
1585
1512
  static get() {
1586
- return C;
1513
+ return p;
1587
1514
  }
1588
1515
  static register(e, t) {
1589
- let n = e.toLowerCase(), r = x.get(n) ?? b.get(n) ?? b.get("en");
1590
- x.set(n, {
1516
+ let n = e.toLowerCase(), r = d.get(n) ?? u.get(n) ?? u.get("en");
1517
+ d.set(n, {
1591
1518
  ...r,
1592
1519
  ...t
1593
1520
  });
1594
1521
  }
1595
1522
  static getValue(e, t) {
1596
- return T(E(C, e), t);
1523
+ return h(g(p, e), t);
1597
1524
  }
1598
1525
  static namespace(e) {
1599
1526
  return {
1600
1527
  name: e,
1601
1528
  register(t, n) {
1602
- let r = D.get(e) ?? /* @__PURE__ */ new Map(), i = t.toLowerCase();
1529
+ let r = _.get(e) ?? /* @__PURE__ */ new Map(), i = t.toLowerCase();
1603
1530
  r.set(i, {
1604
1531
  ...r.get(i),
1605
1532
  ...n
1606
- }), D.set(e, r);
1533
+ }), _.set(e, r);
1607
1534
  },
1608
1535
  text(t, n) {
1609
- let r = D.get(e);
1610
- for (let e of w(C)) {
1536
+ let r = _.get(e);
1537
+ for (let e of m(p)) {
1611
1538
  let i = r?.get(e)?.[t];
1612
- if (i) return T(i, n);
1539
+ if (i) return h(i, n);
1613
1540
  }
1614
1541
  return t;
1615
1542
  }
1616
1543
  };
1617
1544
  }
1618
- }.namespace("flex-table");
1619
- O.register("en", {
1545
+ };
1546
+ //#endregion
1547
+ //#region src/renderers/format.ts
1548
+ function y(e, t) {
1549
+ return e == null ? "" : typeof t == "function" ? t(e) : b(t) ? S(e, t) : x(e, t);
1550
+ }
1551
+ function b(e) {
1552
+ return /[yMdHhms]/.test(e);
1553
+ }
1554
+ function x(e, t) {
1555
+ let n = typeof e == "number" ? e : Number(e);
1556
+ if (isNaN(n)) return String(e);
1557
+ let r = t.endsWith("%"), i = t.match(/^([^#0.,%]+)/), a = i ? i[1] : "", o = t.replace(/^[^#0.,%]+/, "").replace(/%$/, ""), s = o.match(/\.([0#]+)$/), c = s ? s[1].length : 0, l = {
1558
+ minimumFractionDigits: c,
1559
+ maximumFractionDigits: c,
1560
+ useGrouping: o.includes(",")
1561
+ }, u;
1562
+ return r ? u = new Intl.NumberFormat(v.get(), {
1563
+ ...l,
1564
+ style: "percent"
1565
+ }).format(n) : (u = new Intl.NumberFormat(v.get(), l).format(n), a && (u = a + u)), u + "";
1566
+ }
1567
+ function S(e, t) {
1568
+ let n;
1569
+ if (e instanceof Date) n = e;
1570
+ else if (typeof e == "string" || typeof e == "number") n = new Date(e);
1571
+ else return String(e);
1572
+ if (isNaN(n.getTime())) return String(e);
1573
+ let r = String(n.getFullYear()), i = r.slice(-2), a = String(n.getMonth() + 1).padStart(2, "0"), o = String(n.getDate()).padStart(2, "0"), s = String(n.getHours()).padStart(2, "0"), c = String(n.getHours() % 12 || 12).padStart(2, "0"), l = String(n.getMinutes()).padStart(2, "0"), u = String(n.getSeconds()).padStart(2, "0");
1574
+ return t.replace("yyyy", r).replace("yy", i).replace("MM", a).replace("dd", o).replace("HH", s).replace("hh", c).replace("mm", l).replace("ss", u);
1575
+ }
1576
+ //#endregion
1577
+ //#region node_modules/@iyulab/components/dist/utilities/format.js
1578
+ function C(e) {
1579
+ let [t, n, r] = e.split("-").map(Number);
1580
+ return Number.isNaN(t) || Number.isNaN(n) || Number.isNaN(r) ? new Date(e) : new Date(t, n - 1, r);
1581
+ }
1582
+ function w(e) {
1583
+ return typeof e == "string" ? C(e) : e;
1584
+ }
1585
+ function T(e, t, n) {
1586
+ return new Intl.NumberFormat(n ?? v.get(), t).format(e);
1587
+ }
1588
+ function E(e, t, n) {
1589
+ let r = w(e);
1590
+ return Number.isNaN(r.getTime()) ? String(e) : new Intl.DateTimeFormat(n ?? v.get(), t).format(r);
1591
+ }
1592
+ //#endregion
1593
+ //#region src/renderers/cell-renderer.ts
1594
+ function D(e, t, n) {
1595
+ return n.renderer ? n.renderer(e, t, n) : n.format ? typeof n.format == "function" ? n.format(e, t, n) : y(e, n.format) : ee(e, n);
1596
+ }
1597
+ function ee(e, t) {
1598
+ if (e == null) return "";
1599
+ switch (t.type) {
1600
+ case "number": return re(e);
1601
+ case "boolean": return i`<span class="ft-bool">${e ? "โœ”" : ""}</span>`;
1602
+ case "date": return ie(e);
1603
+ case "datetime": return O(e);
1604
+ case "select": return te(e, t);
1605
+ default: return String(e);
1606
+ }
1607
+ }
1608
+ function te(e, t) {
1609
+ if (!t.options || t.options.length === 0 || typeof t.options[0] == "string") return e == null ? "" : String(e);
1610
+ let n = t.options.find((t) => t.value === e);
1611
+ return n ? n.label : e == null ? "" : String(e);
1612
+ }
1613
+ var ne = {
1614
+ year: "numeric",
1615
+ month: "numeric",
1616
+ day: "numeric",
1617
+ hour: "numeric",
1618
+ minute: "numeric",
1619
+ second: "numeric"
1620
+ };
1621
+ function re(e) {
1622
+ return typeof e == "number" ? Number.isInteger(e) ? T(e) : T(e, { minimumFractionDigits: 1 }) : String(e);
1623
+ }
1624
+ function ie(e) {
1625
+ return e instanceof Date || typeof e == "string" ? E(e) : String(e);
1626
+ }
1627
+ function O(e) {
1628
+ return e instanceof Date || typeof e == "string" ? E(e, ne) : String(e);
1629
+ }
1630
+ //#endregion
1631
+ //#region src/locale.ts
1632
+ var k = v.namespace("flex-table");
1633
+ k.register("en", {
1620
1634
  showHiddenColumns: "Show hidden column(s)",
1621
1635
  columnMenu: "Column menu",
1622
1636
  cellActions: "Cell actions",
@@ -1669,7 +1683,7 @@ O.register("en", {
1669
1683
  booleanTrue: "True",
1670
1684
  booleanFalse: "False",
1671
1685
  dropFileToImport: "Drop file to import (.xlsx / .csv)"
1672
- }), O.register("ko", {
1686
+ }), k.register("ko", {
1673
1687
  showHiddenColumns: "์ˆจ๊ธด ์—ด ๋ณด๊ธฐ",
1674
1688
  columnMenu: "์—ด ๋ฉ”๋‰ด",
1675
1689
  cellActions: "์…€ ์ž‘์—…",
@@ -1723,10 +1737,10 @@ O.register("en", {
1723
1737
  booleanFalse: "๊ฑฐ์ง“",
1724
1738
  dropFileToImport: "๊ฐ€์ ธ์˜ฌ ํŒŒ์ผ์„ ๋†“์œผ์„ธ์š” (.xlsx / .csv)"
1725
1739
  });
1726
- var k = (e, t) => O.text(e, t);
1740
+ var A = (e, t) => k.text(e, t);
1727
1741
  //#endregion
1728
1742
  //#region src/core/selection.ts
1729
- function ee(e) {
1743
+ function ae(e) {
1730
1744
  return {
1731
1745
  startRow: Math.min(e.startRow, e.endRow),
1732
1746
  startCol: Math.min(e.startCol, e.endCol),
@@ -1734,7 +1748,7 @@ function ee(e) {
1734
1748
  endCol: Math.max(e.startCol, e.endCol)
1735
1749
  };
1736
1750
  }
1737
- var te = class {
1751
+ var oe = class {
1738
1752
  constructor() {
1739
1753
  this.activeCell = null, this.rangeAnchor = null, this.range = null, this.extraRanges = [], this._rowCount = 0, this._colCount = 0;
1740
1754
  }
@@ -1761,7 +1775,7 @@ var te = class {
1761
1775
  return e < 0 || e >= this._rowCount || t < 0 || t >= this._colCount ? this.activeCell : (!this.rangeAnchor && this.activeCell && (this.rangeAnchor = { ...this.activeCell }), this.activeCell = {
1762
1776
  row: e,
1763
1777
  col: t
1764
- }, this.rangeAnchor && (this.range = ee({
1778
+ }, this.rangeAnchor && (this.range = ae({
1765
1779
  startRow: this.rangeAnchor.row,
1766
1780
  startCol: this.rangeAnchor.col,
1767
1781
  endRow: e,
@@ -1832,7 +1846,7 @@ var te = class {
1832
1846
  shiftMoveRight() {
1833
1847
  return this.activeCell ? this.setActiveWithRange(this.activeCell.row, this.activeCell.col + 1) : null;
1834
1848
  }
1835
- }, ne = class {
1849
+ }, se = class {
1836
1850
  constructor() {
1837
1851
  this.current = null;
1838
1852
  }
@@ -1853,7 +1867,7 @@ var te = class {
1853
1867
  let e = this.current;
1854
1868
  return this.current = null, e;
1855
1869
  }
1856
- }, A = class {
1870
+ }, j = class {
1857
1871
  constructor() {
1858
1872
  this._selected = /* @__PURE__ */ new Set(), this._mode = "multi", this._rowCount = 0;
1859
1873
  }
@@ -1914,7 +1928,7 @@ var te = class {
1914
1928
  };
1915
1929
  //#endregion
1916
1930
  //#region src/core/filtering.ts
1917
- function j(e, t, n) {
1931
+ function ce(e, t, n) {
1918
1932
  if (t.length === 0) return Array.from({ length: e.length }, (e, t) => t);
1919
1933
  let r = [];
1920
1934
  for (let i = 0; i < e.length; i++) {
@@ -1933,9 +1947,9 @@ function j(e, t, n) {
1933
1947
  }
1934
1948
  //#endregion
1935
1949
  //#region src/core/undo.ts
1936
- var re = 100, M = class {
1950
+ var le = 100, M = class {
1937
1951
  constructor() {
1938
- this._undoStack = [], this._redoStack = [], this._maxSize = re;
1952
+ this._undoStack = [], this._redoStack = [], this._maxSize = le;
1939
1953
  }
1940
1954
  get maxSize() {
1941
1955
  return this._maxSize;
@@ -1972,7 +1986,7 @@ var re = 100, M = class {
1972
1986
  };
1973
1987
  //#endregion
1974
1988
  //#region src/clipboard/clipboard.ts
1975
- function ie(e, t, n) {
1989
+ function N(e, t, n) {
1976
1990
  let r = [];
1977
1991
  for (let i = n.startRow; i <= n.endRow; i++) {
1978
1992
  let a = e[i], o = [];
@@ -1984,7 +1998,7 @@ function ie(e, t, n) {
1984
1998
  }
1985
1999
  return r.join("\n");
1986
2000
  }
1987
- function N(e) {
2001
+ function P(e) {
1988
2002
  let t = e.replace(/\r\n/g, "\n").replace(/\r/g, "\n"), n = [], r = [], i = 0, a = t.length;
1989
2003
  for (; i <= a;) {
1990
2004
  if (i === a) {
@@ -2014,7 +2028,7 @@ function N(e) {
2014
2028
  }
2015
2029
  return n;
2016
2030
  }
2017
- function P(e, t) {
2031
+ function F(e, t) {
2018
2032
  if (e === "") return null;
2019
2033
  switch (t.type) {
2020
2034
  case "number": {
@@ -2027,7 +2041,7 @@ function P(e, t) {
2027
2041
  }
2028
2042
  //#endregion
2029
2043
  //#region src/export/xlsx-writer.ts
2030
- var ae = (() => {
2044
+ var ue = (() => {
2031
2045
  let e = /* @__PURE__ */ new Uint32Array(256);
2032
2046
  for (let t = 0; t < 256; t++) {
2033
2047
  let n = t;
@@ -2036,56 +2050,56 @@ var ae = (() => {
2036
2050
  }
2037
2051
  return e;
2038
2052
  })();
2039
- function oe(e) {
2053
+ function de(e) {
2040
2054
  let t = 4294967295;
2041
- for (let n = 0; n < e.length; n++) t = ae[(t ^ e[n]) & 255] ^ t >>> 8;
2055
+ for (let n = 0; n < e.length; n++) t = ue[(t ^ e[n]) & 255] ^ t >>> 8;
2042
2056
  return (t ^ 4294967295) >>> 0;
2043
2057
  }
2044
- var F = new TextEncoder();
2045
- function se(e) {
2058
+ var I = new TextEncoder();
2059
+ function fe(e) {
2046
2060
  let t = [], n = [], r = 0;
2047
2061
  for (let i of e) {
2048
- let e = F.encode(i.name), a = oe(i.data), o = i.data.length, s = new ArrayBuffer(30 + e.length), c = new DataView(s);
2062
+ let e = I.encode(i.name), a = de(i.data), o = i.data.length, s = new ArrayBuffer(30 + e.length), c = new DataView(s);
2049
2063
  c.setUint32(0, 67324752, !0), c.setUint16(4, 20, !0), c.setUint16(6, 0, !0), c.setUint16(8, 0, !0), c.setUint16(10, 0, !0), c.setUint16(12, 33, !0), c.setUint32(14, a, !0), c.setUint32(18, o, !0), c.setUint32(22, o, !0), c.setUint16(26, e.length, !0), c.setUint16(28, 0, !0), new Uint8Array(s, 30).set(e), t.push(new Uint8Array(s)), t.push(i.data);
2050
2064
  let l = new ArrayBuffer(46 + e.length), u = new DataView(l);
2051
2065
  u.setUint32(0, 33639248, !0), u.setUint16(4, 20, !0), u.setUint16(6, 20, !0), u.setUint16(8, 0, !0), u.setUint16(10, 0, !0), u.setUint16(12, 0, !0), u.setUint16(14, 33, !0), u.setUint32(16, a, !0), u.setUint32(20, o, !0), u.setUint32(24, o, !0), u.setUint16(28, e.length, !0), u.setUint16(30, 0, !0), u.setUint16(32, 0, !0), u.setUint16(34, 0, !0), u.setUint16(36, 0, !0), u.setUint32(38, 0, !0), u.setUint32(42, r, !0), new Uint8Array(l, 46).set(e), n.push(new Uint8Array(l)), r += 30 + e.length + o;
2052
2066
  }
2053
- let i = I(n), a = /* @__PURE__ */ new ArrayBuffer(22), o = new DataView(a);
2054
- return o.setUint32(0, 101010256, !0), o.setUint16(4, 0, !0), o.setUint16(6, 0, !0), o.setUint16(8, e.length, !0), o.setUint16(10, e.length, !0), o.setUint32(12, i.length, !0), o.setUint32(16, r, !0), o.setUint16(20, 0, !0), I([
2067
+ let i = L(n), a = /* @__PURE__ */ new ArrayBuffer(22), o = new DataView(a);
2068
+ return o.setUint32(0, 101010256, !0), o.setUint16(4, 0, !0), o.setUint16(6, 0, !0), o.setUint16(8, e.length, !0), o.setUint16(10, e.length, !0), o.setUint32(12, i.length, !0), o.setUint32(16, r, !0), o.setUint16(20, 0, !0), L([
2055
2069
  ...t,
2056
2070
  i,
2057
2071
  new Uint8Array(a)
2058
2072
  ]);
2059
2073
  }
2060
- function I(e) {
2074
+ function L(e) {
2061
2075
  let t = e.reduce((e, t) => e + t.length, 0), n = new Uint8Array(t), r = 0;
2062
2076
  for (let t of e) n.set(t, r), r += t.length;
2063
2077
  return n;
2064
2078
  }
2065
- function L(e) {
2079
+ function R(e) {
2066
2080
  return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
2067
2081
  }
2068
- function ce(e) {
2082
+ function z(e) {
2069
2083
  let t = "";
2070
2084
  for (e++; e > 0;) t = String.fromCharCode(64 + (e % 26 || 26)) + t, e = Math.floor((e - 1) / 26);
2071
2085
  return t;
2072
2086
  }
2073
- function R(e, t) {
2074
- return ce(t) + (e + 1);
2087
+ function B(e, t) {
2088
+ return z(t) + (e + 1);
2075
2089
  }
2076
- function le(e) {
2090
+ function V(e) {
2077
2091
  let t = Date.UTC(1899, 11, 30);
2078
2092
  return (e.getTime() - t) / 864e5;
2079
2093
  }
2080
- var ue = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<Types xmlns=\"http://schemas.openxmlformats.org/package/2006/content-types\">\n <Default Extension=\"rels\" ContentType=\"application/vnd.openxmlformats-package.relationships+xml\"/>\n <Default Extension=\"xml\" ContentType=\"application/xml\"/>\n <Override PartName=\"/xl/workbook.xml\" ContentType=\"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml\"/>\n <Override PartName=\"/xl/worksheets/sheet1.xml\" ContentType=\"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml\"/>\n <Override PartName=\"/xl/styles.xml\" ContentType=\"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml\"/>\n</Types>", de = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<Relationships xmlns=\"http://schemas.openxmlformats.org/package/2006/relationships\">\n <Relationship Id=\"rId1\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument\" Target=\"xl/workbook.xml\"/>\n</Relationships>", fe = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<workbook xmlns=\"http://schemas.openxmlformats.org/spreadsheetml/2006/main\" xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\">\n <sheets><sheet name=\"Sheet1\" sheetId=\"1\" r:id=\"rId1\"/></sheets>\n</workbook>", z = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<Relationships xmlns=\"http://schemas.openxmlformats.org/package/2006/relationships\">\n <Relationship Id=\"rId1\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet\" Target=\"worksheets/sheet1.xml\"/>\n <Relationship Id=\"rId2\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles\" Target=\"styles.xml\"/>\n</Relationships>", B = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<styleSheet xmlns=\"http://schemas.openxmlformats.org/spreadsheetml/2006/main\">\n <numFmts count=\"1\"><numFmt numFmtId=\"164\" formatCode=\"yyyy-mm-dd\"/></numFmts>\n <fonts count=\"2\">\n <font><sz val=\"11\"/><name val=\"Calibri\"/></font>\n <font><sz val=\"11\"/><b/><name val=\"Calibri\"/></font>\n </fonts>\n <fills count=\"2\">\n <fill><patternFill patternType=\"none\"/></fill>\n <fill><patternFill patternType=\"gray125\"/></fill>\n </fills>\n <borders count=\"1\"><border><left/><right/><top/><bottom/><diagonal/></border></borders>\n <cellStyleXfs count=\"1\"><xf numFmtId=\"0\" fontId=\"0\" fillId=\"0\" borderId=\"0\"/></cellStyleXfs>\n <cellXfs count=\"3\">\n <xf numFmtId=\"0\" fontId=\"0\" fillId=\"0\" borderId=\"0\" xfId=\"0\"/>\n <xf numFmtId=\"164\" fontId=\"0\" fillId=\"0\" borderId=\"0\" xfId=\"0\" applyNumberFormat=\"1\"/>\n <xf numFmtId=\"0\" fontId=\"1\" fillId=\"0\" borderId=\"0\" xfId=\"0\" applyFont=\"1\"/>\n </cellXfs>\n</styleSheet>";
2081
- function V(e, t) {
2082
- let n = [], r = t.map((e, t) => `<c r="${R(0, t)}" t="str" s="2"><v>${L(e.header)}</v></c>`);
2094
+ var pe = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<Types xmlns=\"http://schemas.openxmlformats.org/package/2006/content-types\">\n <Default Extension=\"rels\" ContentType=\"application/vnd.openxmlformats-package.relationships+xml\"/>\n <Default Extension=\"xml\" ContentType=\"application/xml\"/>\n <Override PartName=\"/xl/workbook.xml\" ContentType=\"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml\"/>\n <Override PartName=\"/xl/worksheets/sheet1.xml\" ContentType=\"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml\"/>\n <Override PartName=\"/xl/styles.xml\" ContentType=\"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml\"/>\n</Types>", me = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<Relationships xmlns=\"http://schemas.openxmlformats.org/package/2006/relationships\">\n <Relationship Id=\"rId1\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument\" Target=\"xl/workbook.xml\"/>\n</Relationships>", he = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<workbook xmlns=\"http://schemas.openxmlformats.org/spreadsheetml/2006/main\" xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\">\n <sheets><sheet name=\"Sheet1\" sheetId=\"1\" r:id=\"rId1\"/></sheets>\n</workbook>", ge = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<Relationships xmlns=\"http://schemas.openxmlformats.org/package/2006/relationships\">\n <Relationship Id=\"rId1\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet\" Target=\"worksheets/sheet1.xml\"/>\n <Relationship Id=\"rId2\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles\" Target=\"styles.xml\"/>\n</Relationships>", _e = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<styleSheet xmlns=\"http://schemas.openxmlformats.org/spreadsheetml/2006/main\">\n <numFmts count=\"1\"><numFmt numFmtId=\"164\" formatCode=\"yyyy-mm-dd\"/></numFmts>\n <fonts count=\"2\">\n <font><sz val=\"11\"/><name val=\"Calibri\"/></font>\n <font><sz val=\"11\"/><b/><name val=\"Calibri\"/></font>\n </fonts>\n <fills count=\"2\">\n <fill><patternFill patternType=\"none\"/></fill>\n <fill><patternFill patternType=\"gray125\"/></fill>\n </fills>\n <borders count=\"1\"><border><left/><right/><top/><bottom/><diagonal/></border></borders>\n <cellStyleXfs count=\"1\"><xf numFmtId=\"0\" fontId=\"0\" fillId=\"0\" borderId=\"0\"/></cellStyleXfs>\n <cellXfs count=\"3\">\n <xf numFmtId=\"0\" fontId=\"0\" fillId=\"0\" borderId=\"0\" xfId=\"0\"/>\n <xf numFmtId=\"164\" fontId=\"0\" fillId=\"0\" borderId=\"0\" xfId=\"0\" applyNumberFormat=\"1\"/>\n <xf numFmtId=\"0\" fontId=\"1\" fillId=\"0\" borderId=\"0\" xfId=\"0\" applyFont=\"1\"/>\n </cellXfs>\n</styleSheet>";
2095
+ function ve(e, t) {
2096
+ let n = [], r = t.map((e, t) => `<c r="${B(0, t)}" t="str" s="2"><v>${R(e.header)}</v></c>`);
2083
2097
  return n.push(`<row r="1">${r.join("")}</row>`), e.forEach((e, r) => {
2084
2098
  let i = t.map((t, n) => {
2085
- let i = R(r + 1, n), a = e[t.key];
2099
+ let i = B(r + 1, n), a = e[t.key];
2086
2100
  if (a == null) return `<c r="${i}" t="str"><v></v></c>`;
2087
2101
  let o = t.type ?? "text";
2088
- return o === "number" && typeof a == "number" ? `<c r="${i}"><v>${a}</v></c>` : (o === "date" || o === "datetime") && a instanceof Date ? `<c r="${i}" s="1"><v>${le(a).toFixed(6)}</v></c>` : o === "boolean" ? `<c r="${i}" t="b"><v>${+!!a}</v></c>` : `<c r="${i}" t="str"><v>${L(String(a))}</v></c>`;
2102
+ return o === "number" && typeof a == "number" ? `<c r="${i}"><v>${a}</v></c>` : (o === "date" || o === "datetime") && a instanceof Date ? `<c r="${i}" s="1"><v>${V(a).toFixed(6)}</v></c>` : o === "boolean" ? `<c r="${i}" t="b"><v>${+!!a}</v></c>` : `<c r="${i}" t="str"><v>${R(String(a))}</v></c>`;
2089
2103
  });
2090
2104
  n.push(`<row r="${r + 2}">${i.join("")}</row>`);
2091
2105
  }), `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
@@ -2093,32 +2107,32 @@ function V(e, t) {
2093
2107
  <sheetData>${n.join("")}</sheetData>
2094
2108
  </worksheet>`;
2095
2109
  }
2096
- function pe(e, t) {
2097
- let n = V(e, t);
2098
- return se([
2110
+ function ye(e, t) {
2111
+ let n = ve(e, t);
2112
+ return fe([
2099
2113
  {
2100
2114
  name: "[Content_Types].xml",
2101
- data: F.encode(ue)
2115
+ data: I.encode(pe)
2102
2116
  },
2103
2117
  {
2104
2118
  name: "_rels/.rels",
2105
- data: F.encode(de)
2119
+ data: I.encode(me)
2106
2120
  },
2107
2121
  {
2108
2122
  name: "xl/workbook.xml",
2109
- data: F.encode(fe)
2123
+ data: I.encode(he)
2110
2124
  },
2111
2125
  {
2112
2126
  name: "xl/_rels/workbook.xml.rels",
2113
- data: F.encode(z)
2127
+ data: I.encode(ge)
2114
2128
  },
2115
2129
  {
2116
2130
  name: "xl/worksheets/sheet1.xml",
2117
- data: F.encode(n)
2131
+ data: I.encode(n)
2118
2132
  },
2119
2133
  {
2120
2134
  name: "xl/styles.xml",
2121
- data: F.encode(B)
2135
+ data: I.encode(_e)
2122
2136
  }
2123
2137
  ]);
2124
2138
  }
@@ -2128,20 +2142,20 @@ function H(e, t, n) {
2128
2142
  switch (n) {
2129
2143
  case "csv": return U(e, t, ",");
2130
2144
  case "tsv": return U(e, t, " ");
2131
- case "json": return he(e, t);
2132
- case "xlsx": return pe(e, t);
2145
+ case "json": return xe(e, t);
2146
+ case "xlsx": return ye(e, t);
2133
2147
  }
2134
2148
  }
2135
- function me(e, t) {
2149
+ function be(e, t) {
2136
2150
  return e == null ? "" : (t.type === "date" || t.type === "datetime") && e instanceof Date ? e.toISOString() : String(e);
2137
2151
  }
2138
2152
  function U(e, t, n) {
2139
- return [t.map((e) => W(e.header, n)).join(n), ...e.map((e) => t.map((t) => W(me(e[t.key], t), n)).join(n))].join("\n");
2153
+ return [t.map((e) => W(e.header, n)).join(n), ...e.map((e) => t.map((t) => W(be(e[t.key], t), n)).join(n))].join("\n");
2140
2154
  }
2141
2155
  function W(e, t) {
2142
2156
  return e.includes(t) || e.includes("\"") || e.includes("\n") || e.includes("\r") ? "\"" + e.replace(/"/g, "\"\"") + "\"" : e;
2143
2157
  }
2144
- function he(e, t) {
2158
+ function xe(e, t) {
2145
2159
  let n = e.map((e) => {
2146
2160
  let n = {};
2147
2161
  for (let r of t) {
@@ -2152,35 +2166,35 @@ function he(e, t) {
2152
2166
  });
2153
2167
  return JSON.stringify(n, null, 2);
2154
2168
  }
2155
- function ge(e, t, n) {
2169
+ function Se(e, t, n) {
2156
2170
  let r = new Blob([e], { type: n }), i = URL.createObjectURL(r), a = document.createElement("a");
2157
2171
  a.href = i, a.download = t, a.style.display = "none", document.body.appendChild(a), a.click(), document.body.removeChild(a), setTimeout(() => URL.revokeObjectURL(i), 100);
2158
2172
  }
2159
- var _e = {
2173
+ var Ce = {
2160
2174
  csv: "text/csv;charset=utf-8",
2161
2175
  tsv: "text/tab-separated-values;charset=utf-8",
2162
2176
  json: "application/json;charset=utf-8",
2163
2177
  xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
2164
- }, ve = {
2178
+ }, we = {
2165
2179
  csv: ".csv",
2166
2180
  tsv: ".tsv",
2167
2181
  json: ".json",
2168
2182
  xlsx: ".xlsx"
2169
2183
  };
2170
- function ye(e) {
2171
- return _e[e];
2184
+ function Te(e) {
2185
+ return Ce[e];
2172
2186
  }
2173
- function be(e) {
2174
- return ve[e];
2187
+ function Ee(e) {
2188
+ return we[e];
2175
2189
  }
2176
2190
  //#endregion
2177
2191
  //#region src/export/xlsx-reader.ts
2178
- function xe(e) {
2192
+ function De(e) {
2179
2193
  for (let t = e.byteLength - 22; t >= 0; t--) if (e.getUint32(t, !0) === 101010256) return t;
2180
2194
  throw Error("XLSX: End of central directory not found โ€” not a valid ZIP file");
2181
2195
  }
2182
- function Se(e) {
2183
- let t = xe(e), n = e.getUint32(t + 16, !0), r = e.getUint32(t + 12, !0), i = new TextDecoder("utf-8"), a = [], o = n, s = n + r;
2196
+ function Oe(e) {
2197
+ let t = De(e), n = e.getUint32(t + 16, !0), r = e.getUint32(t + 12, !0), i = new TextDecoder("utf-8"), a = [], o = n, s = n + r;
2184
2198
  for (; o < s && e.getUint32(o, !0) === 33639248;) {
2185
2199
  let t = e.getUint16(o + 10, !0), n = e.getUint32(o + 20, !0), r = e.getUint32(o + 24, !0), s = e.getUint16(o + 28, !0), c = e.getUint16(o + 30, !0), l = e.getUint16(o + 32, !0), u = e.getUint32(o + 42, !0), d = i.decode(new Uint8Array(e.buffer, o + 46, s));
2186
2200
  a.push({
@@ -2193,7 +2207,7 @@ function Se(e) {
2193
2207
  }
2194
2208
  return a;
2195
2209
  }
2196
- async function Ce(e) {
2210
+ async function ke(e) {
2197
2211
  let t = new DecompressionStream("deflate-raw"), n = t.writable.getWriter(), r = t.readable.getReader();
2198
2212
  n.write(e), n.close();
2199
2213
  let i = [];
@@ -2206,32 +2220,32 @@ async function Ce(e) {
2206
2220
  for (let e of i) o.set(e, s), s += e.length;
2207
2221
  return o;
2208
2222
  }
2209
- async function we(e, t) {
2223
+ async function Ae(e, t) {
2210
2224
  let n = t.localHeaderOffset, r = e.getUint16(n + 26, !0), i = e.getUint16(n + 28, !0), a = n + 30 + r + i, o = new Uint8Array(e.buffer, a, t.compressedSize);
2211
2225
  if (t.compressionMethod === 0) return o.slice();
2212
- if (t.compressionMethod === 8) return Ce(o);
2226
+ if (t.compressionMethod === 8) return ke(o);
2213
2227
  throw Error(`XLSX: Unsupported compression method ${t.compressionMethod}`);
2214
2228
  }
2215
- async function Te(e) {
2216
- let t = new DataView(e), n = Se(t), r = /* @__PURE__ */ new Map();
2217
- for (let e of n) e.compressedSize === 0 && e.name.endsWith("/") || r.set(e.name, await we(t, e));
2229
+ async function je(e) {
2230
+ let t = new DataView(e), n = Oe(t), r = /* @__PURE__ */ new Map();
2231
+ for (let e of n) e.compressedSize === 0 && e.name.endsWith("/") || r.set(e.name, await Ae(t, e));
2218
2232
  return r;
2219
2233
  }
2220
- var Ee = new TextDecoder("utf-8");
2234
+ var Me = new TextDecoder("utf-8");
2221
2235
  function G(e) {
2222
- let t = Ee.decode(e);
2236
+ let t = Me.decode(e);
2223
2237
  return new DOMParser().parseFromString(t, "application/xml");
2224
2238
  }
2225
- function De(e) {
2239
+ function Ne(e) {
2226
2240
  if (!e) return [];
2227
2241
  let t = G(e);
2228
2242
  return Array.from(t.querySelectorAll("si")).map((e) => Array.from(e.querySelectorAll("t")).map((e) => e.textContent ?? "").join(""));
2229
2243
  }
2230
- function Oe(e) {
2244
+ function Pe(e) {
2231
2245
  let t = (e - 1) * 864e5 + Date.UTC(1899, 11, 30);
2232
2246
  return new Date(t).toISOString().slice(0, 10);
2233
2247
  }
2234
- function ke(e, t) {
2248
+ function Fe(e, t) {
2235
2249
  let n = G(e).querySelectorAll("row");
2236
2250
  if (n.length === 0) return [];
2237
2251
  let r = 0, i = /* @__PURE__ */ new Map();
@@ -2239,7 +2253,7 @@ function ke(e, t) {
2239
2253
  let n = parseInt(e.getAttribute("r") ?? "1", 10) - 1, a = /* @__PURE__ */ new Map();
2240
2254
  i.set(n, a);
2241
2255
  for (let n of e.querySelectorAll("c")) {
2242
- let e = Ae(n.getAttribute("r") ?? "");
2256
+ let e = Ie(n.getAttribute("r") ?? "");
2243
2257
  e > r && (r = e);
2244
2258
  let i = n.getAttribute("t") ?? "", o = n.getAttribute("s") ?? "", s = n.querySelector("v")?.textContent ?? "", c = n.querySelector("is > t")?.textContent ?? null, l;
2245
2259
  if (i === "s") l = t[parseInt(s, 10)] ?? "";
@@ -2248,7 +2262,7 @@ function ke(e, t) {
2248
2262
  else if (s === "") l = "";
2249
2263
  else {
2250
2264
  let e = parseFloat(s);
2251
- l = !isNaN(e) && o !== "" && parseInt(o, 10) > 0 && e >= 1 && e <= 73050 ? Oe(e) : s;
2265
+ l = !isNaN(e) && o !== "" && parseInt(o, 10) > 0 && e >= 1 && e <= 73050 ? Pe(e) : s;
2252
2266
  }
2253
2267
  a.set(e, l);
2254
2268
  }
@@ -2262,13 +2276,13 @@ function ke(e, t) {
2262
2276
  }
2263
2277
  return o;
2264
2278
  }
2265
- function Ae(e) {
2279
+ function Ie(e) {
2266
2280
  let t = 0, n = 0;
2267
2281
  for (; n < e.length && e[n] >= "A" && e[n] <= "Z";) t = t * 26 + (e.charCodeAt(n) - 64), n++;
2268
2282
  return t - 1;
2269
2283
  }
2270
- async function je(e) {
2271
- let t = await Te(e), n = De(t.get("xl/sharedStrings.xml")), r = t.get("xl/worksheets/sheet1.xml");
2284
+ async function Le(e) {
2285
+ let t = await je(e), n = Ne(t.get("xl/sharedStrings.xml")), r = t.get("xl/worksheets/sheet1.xml");
2272
2286
  if (!r) {
2273
2287
  for (let [e, n] of t) if (e.toLowerCase().includes("worksheets/sheet")) {
2274
2288
  r = n;
@@ -2276,7 +2290,7 @@ async function je(e) {
2276
2290
  }
2277
2291
  }
2278
2292
  if (!r) throw Error("XLSX: No worksheet found");
2279
- let i = ke(r, n);
2293
+ let i = Fe(r, n);
2280
2294
  return i.length === 0 ? {
2281
2295
  headers: [],
2282
2296
  rows: []
@@ -2302,9 +2316,9 @@ var q = {
2302
2316
  lt: "<",
2303
2317
  gte: "โ‰ฅ",
2304
2318
  lte: "โ‰ค"
2305
- }, J = 120, Y = 40, X = 20, Z = 32, Q = 5, Me = 200, $ = class extends n {
2319
+ }, J = 120, Y = 40, X = 20, Z = 32, Q = 5, Re = 200, $ = class extends n {
2306
2320
  constructor(...e) {
2307
- super(...e), this.columns = [], this._data = [], this._inUndoRedo = !1, this.clearUndoOnDataChange = !1, this.clearSelectionOnDataChange = !1, this._rowHeightFromCss = Z, this.showRowNumbers = !1, this.theme = void 0, this.maxRows = 0, this.editable = !0, this.showFilters = !1, this.showContextMenu = !1, this.frozenRows = 0, this.emptyMessage = "No data", this.noMatchingMessage = "No matching data", this.loading = !1, this.importEnabled = !1, this.selectable = !1, this.dataMode = "client", this.footerData = null, this.stylesheets = [], this._scrollTop = 0, this._scrollLeft = 0, this._viewportHeight = 0, this._viewportWidth = 0, this._colLeftOffsets = [], this._totalRowWidth = 0, this._baseStyleSheets = [], this._activeCell = null, this._editingCell = null, this._sortCriteria = [], this._selection = new te(), this._editing = new ne(), this._rowSelection = new A(), this._undo = new M(), this._filters = [], this._filteredIndices = [], this._sortedIndices = [], this._openFilterKey = null, this._rowSelectionVersion = 0, this._lastCheckboxRowIndex = null, this._checkboxShiftPending = !1, this._autocompleteState = null, this._headerMenu = null, this._bodyContextMenu = null, this._commentPopup = null, this._viewDirty = !0, this._isDragging = !1, this._wasDrag = !1, this._resizing = null, this._resizeCleanup = null, this._wasHeaderDrag = !1, this._wasRowDrag = !1, this._colDrag = null, this._colDragIndicatorLeft = null, this._fillDrag = null, this._rowDrag = null, this._rowDragIndicatorY = null, this._findState = null, this._columnWidths = /* @__PURE__ */ new Map(), this._hostResizeObserver = null, this._comments = /* @__PURE__ */ new Map(), this._isDragOver = !1, this._warnedUnconstrained = !1, this._onCommentPopupOutsideClick = () => {
2321
+ super(...e), this.columns = [], this._data = [], this._inUndoRedo = !1, this.clearUndoOnDataChange = !1, this.clearSelectionOnDataChange = !1, this._rowHeightFromCss = Z, this.showRowNumbers = !1, this.theme = void 0, this.maxRows = 0, this.editable = !0, this.showFilters = !1, this.showContextMenu = !1, this.frozenRows = 0, this.emptyMessage = "No data", this.noMatchingMessage = "No matching data", this.loading = !1, this.importEnabled = !1, this.selectable = !1, this.dataMode = "client", this.footerData = null, this.stylesheets = [], this._scrollTop = 0, this._scrollLeft = 0, this._viewportHeight = 0, this._viewportWidth = 0, this._colLeftOffsets = [], this._totalRowWidth = 0, this._baseStyleSheets = [], this._activeCell = null, this._editingCell = null, this._sortCriteria = [], this._selection = new oe(), this._editing = new se(), this._rowSelection = new j(), this._undo = new M(), this._filters = [], this._filteredIndices = [], this._sortedIndices = [], this._openFilterKey = null, this._rowSelectionVersion = 0, this._lastCheckboxRowIndex = null, this._checkboxShiftPending = !1, this._autocompleteState = null, this._headerMenu = null, this._bodyContextMenu = null, this._commentPopup = null, this._viewDirty = !0, this._isDragging = !1, this._wasDrag = !1, this._resizing = null, this._resizeCleanup = null, this._wasHeaderDrag = !1, this._wasRowDrag = !1, this._colDrag = null, this._colDragIndicatorLeft = null, this._fillDrag = null, this._rowDrag = null, this._rowDragIndicatorY = null, this._findState = null, this._columnWidths = /* @__PURE__ */ new Map(), this._hostResizeObserver = null, this._comments = /* @__PURE__ */ new Map(), this._isDragOver = !1, this._warnedUnconstrained = !1, this._onCommentPopupOutsideClick = () => {
2308
2322
  this._commitCommentPopup();
2309
2323
  }, this._invalidCells = /* @__PURE__ */ new Map(), this._textFilterState = /* @__PURE__ */ new Map(), this._numberFilterState = /* @__PURE__ */ new Map(), this._dateFilterState = /* @__PURE__ */ new Map(), this._emptyFilterState = /* @__PURE__ */ new Map();
2310
2324
  }
@@ -2674,7 +2688,7 @@ var q = {
2674
2688
  return H(this._sortedIndices.map((e) => this.data[e]), this.visibleColumns, e);
2675
2689
  }
2676
2690
  exportToFile(e, t) {
2677
- ge(this.exportToString(e), t ?? `export${be(e)}`, ye(e));
2691
+ Se(this.exportToString(e), t ?? `export${Ee(e)}`, Te(e));
2678
2692
  }
2679
2693
  setComment(e, t, n) {
2680
2694
  let r = this.getComment(e, t);
@@ -2731,10 +2745,10 @@ var q = {
2731
2745
  async importFromFile(e) {
2732
2746
  let t = e.name.toLowerCase();
2733
2747
  if (t.endsWith(".xlsx")) {
2734
- let t = await je(await e.arrayBuffer());
2748
+ let t = await Le(await e.arrayBuffer());
2735
2749
  this._applyImportedSheet(t);
2736
2750
  } else if (t.endsWith(".csv") || t.endsWith(".tsv")) {
2737
- let t = N(await e.text());
2751
+ let t = P(await e.text());
2738
2752
  this._applyImportedRows(t);
2739
2753
  } else console.warn(`flex-table importFromFile: unsupported file type "${e.name}"`);
2740
2754
  }
@@ -2745,7 +2759,7 @@ var q = {
2745
2759
  let a = t.get(e);
2746
2760
  if (!a) return;
2747
2761
  let o = this.columns.find((e) => e.key === a);
2748
- r[a] = o ? P(n[i] ?? "", o) : n[i] ?? null;
2762
+ r[a] = o ? F(n[i] ?? "", o) : n[i] ?? null;
2749
2763
  }), r;
2750
2764
  }), r = [...this.data];
2751
2765
  this.data = n, this._undo.push({
@@ -2770,7 +2784,7 @@ var q = {
2770
2784
  let a = n.get(t);
2771
2785
  if (!a) return;
2772
2786
  let o = this.columns.find((e) => e.key === a);
2773
- r[a] = o ? P(e[i] ?? "", o) : e[i] ?? null;
2787
+ r[a] = o ? F(e[i] ?? "", o) : e[i] ?? null;
2774
2788
  }), r;
2775
2789
  }), i = [...this.data];
2776
2790
  this.data = r, this._undo.push({
@@ -2916,7 +2930,7 @@ var q = {
2916
2930
  this._filteredIndices = Array.from({ length: this.data.length }, (e, t) => t), this._sortedIndices = this._filteredIndices;
2917
2931
  return;
2918
2932
  }
2919
- if (this._filteredIndices = j(this.data, this._filters, (e, t, n) => {
2933
+ if (this._filteredIndices = ce(this.data, this._filters, (e, t, n) => {
2920
2934
  this.dispatchEvent(new CustomEvent("filter-error", {
2921
2935
  detail: {
2922
2936
  error: e,
@@ -2946,7 +2960,7 @@ var q = {
2946
2960
  e !== this._viewportHeight && (this._viewportHeight = e), t !== this._viewportWidth && (this._viewportWidth = t), this._warnIfUnconstrained();
2947
2961
  }
2948
2962
  _warnIfUnconstrained() {
2949
- this._warnedUnconstrained || process.env.NODE_ENV === "production" || this._visibleRowCount < Me || this.scrollHeight > this.clientHeight + 1 || (this._warnedUnconstrained = !0, console.warn(`[@iyulab/flex-table] ${this._visibleRowCount} rows but the host has no height constraint โ€” it grew to fit every row, so virtual scrolling is off and all rows are rendered. Give the host a height (e.g. height: 400px, or flex: 1 1 auto with min-height: 0 inside a sized parent) so it becomes the scroll container.`));
2963
+ this._warnedUnconstrained || process.env.NODE_ENV === "production" || this._visibleRowCount < Re || this.scrollHeight > this.clientHeight + 1 || (this._warnedUnconstrained = !0, console.warn(`[@iyulab/flex-table] ${this._visibleRowCount} rows but the host has no height constraint โ€” it grew to fit every row, so virtual scrolling is off and all rows are rendered. Give the host a height (e.g. height: 400px, or flex: 1 1 auto with min-height: 0 inside a sized parent) so it becomes the scroll container.`));
2950
2964
  }
2951
2965
  _onScroll() {
2952
2966
  this._scrollTop = this.scrollTop, this._scrollLeft = this.scrollLeft;
@@ -3076,7 +3090,7 @@ var q = {
3076
3090
  }
3077
3091
  let t = this.shadowRoot?.querySelector(".ft-editor");
3078
3092
  if (t) {
3079
- let n = P(t.value, e);
3093
+ let n = F(t.value, e);
3080
3094
  this._applyEdit(n);
3081
3095
  } else this._cancelEdit();
3082
3096
  }
@@ -3304,7 +3318,7 @@ var q = {
3304
3318
  async _handleCopy(e) {
3305
3319
  let t = this._selection.getEffectiveRange();
3306
3320
  if (!t) return;
3307
- let n = this.visibleColumns, r = ie(this._sortedIndices.map((e) => this.data[e]), n, t);
3321
+ let n = this.visibleColumns, r = N(this._sortedIndices.map((e) => this.data[e]), n, t);
3308
3322
  try {
3309
3323
  await navigator.clipboard.writeText(r);
3310
3324
  } catch (e) {
@@ -3330,7 +3344,7 @@ var q = {
3330
3344
  if (!this._activeCell) return;
3331
3345
  let e = await this._readClipboardText();
3332
3346
  if (e == null) return;
3333
- let t = N(e);
3347
+ let t = P(e);
3334
3348
  if (t.length === 0) return;
3335
3349
  let n = this._expandRowsForPaste(this._activeCell.row, t.length), r = this._applyPasteData(this._activeCell, t);
3336
3350
  if (r.length > 0 || n.length > 0) {
@@ -3388,7 +3402,7 @@ var q = {
3388
3402
  for (let a = 0; a < t[i].length; a++) {
3389
3403
  let s = e.col + a;
3390
3404
  if (s >= n.length) break;
3391
- let c = n[s], l = this.data[o][c.key], u = P(t[i][a], c);
3405
+ let c = n[s], l = this.data[o][c.key], u = F(t[i][a], c);
3392
3406
  this.data[o][c.key] = u, r.push({
3393
3407
  row: o,
3394
3408
  col: s,
@@ -3453,7 +3467,7 @@ var q = {
3453
3467
  for (let r = e.startCol + 1; r <= e.endCol; r++) {
3454
3468
  let e = t[r];
3455
3469
  if (!e || !this._isCellEditable(e)) continue;
3456
- let a = P(o == null ? "" : String(o), e);
3470
+ let a = F(o == null ? "" : String(o), e);
3457
3471
  n.push({
3458
3472
  row: i,
3459
3473
  key: e.key,
@@ -3612,7 +3626,7 @@ var q = {
3612
3626
  @click=${n ? (t) => this._onHeaderClick(t, e) : void 0}>
3613
3627
  ${x ? i`
3614
3628
  <button class="ft-hidden-col-indicator"
3615
- title=${k("showHiddenColumns")}
3629
+ title=${A("showHiddenColumns")}
3616
3630
  @click=${(t) => {
3617
3631
  t.stopPropagation(), this._showHiddenBefore(e);
3618
3632
  }}>&#x276F;</button>
@@ -3622,8 +3636,8 @@ var q = {
3622
3636
  ${o >= 0 ? i`<span class="ft-sort-order">${o + 1}</span>` : ""}
3623
3637
  <button class="ft-column-menu-btn ${s ? "ft-filter-active" : ""}"
3624
3638
  type="button"
3625
- title=${k("columnMenu")}
3626
- aria-label=${k("columnMenuFor", { header: e.header })}
3639
+ title=${A("columnMenu")}
3640
+ aria-label=${A("columnMenuFor", { header: e.header })}
3627
3641
  aria-haspopup="menu"
3628
3642
  aria-expanded=${this._headerMenu?.key === e.key ? "true" : "false"}
3629
3643
  @mousedown=${(e) => e.stopPropagation()}
@@ -3742,26 +3756,26 @@ var q = {
3742
3756
  }}>${t}</button>
3743
3757
  `;
3744
3758
  return i`
3745
- <div class="ft-header-menu" role="menu" aria-label=${k("columnMenuRegion", { header: o.header })}
3759
+ <div class="ft-header-menu" role="menu" aria-label=${A("columnMenuRegion", { header: o.header })}
3746
3760
  style="position: fixed; left: ${t}px; top: ${n}px; z-index: 200;"
3747
3761
  @mousedown=${(e) => e.stopPropagation()}
3748
3762
  @keydown=${(e) => this._onHeaderMenuKeydown(e)}>
3749
3763
  ${o.sortable === !1 ? a : i`
3750
- ${c("sort-asc", k("sortAscending"), () => this._applySortFromMenu(e, "asc"))}
3751
- ${c("sort-desc", k("sortDescending"), () => this._applySortFromMenu(e, "desc"))}
3764
+ ${c("sort-asc", A("sortAscending"), () => this._applySortFromMenu(e, "asc"))}
3765
+ ${c("sort-desc", A("sortDescending"), () => this._applySortFromMenu(e, "desc"))}
3752
3766
  <div class="ft-header-menu-separator" role="separator"></div>
3753
3767
  `}
3754
3768
  ${this.showFilters ? i`
3755
- ${c("filter", k("filter"), () => this._openFilterFromMenu(e))}
3756
- ${s ? c("clear-filter", k("clearFilter"), () => this._clearColumnFilter(e)) : a}
3769
+ ${c("filter", A("filter"), () => this._openFilterFromMenu(e))}
3770
+ ${s ? c("clear-filter", A("clearFilter"), () => this._clearColumnFilter(e)) : a}
3757
3771
  <div class="ft-header-menu-separator" role="separator"></div>
3758
3772
  ` : a}
3759
- ${c("hide", k("hideColumn"), () => this._setColumnHidden(e, !0))}
3760
- ${r.map((e) => c("show", k("showColumn", { header: e.header }), () => this._setColumnHidden(e.key, !1)))}
3773
+ ${c("hide", A("hideColumn"), () => this._setColumnHidden(e, !0))}
3774
+ ${r.map((e) => c("show", A("showColumn", { header: e.header }), () => this._setColumnHidden(e.key, !1)))}
3761
3775
  <div class="ft-header-menu-separator" role="separator"></div>
3762
- ${c("autofit", k("autoFitWidth"), () => this._autoFitColumn(e))}
3763
- ${c("wider", k("wider"), () => this._resizeColumnBy(e, X), !0)}
3764
- ${c("narrower", k("narrower"), () => this._resizeColumnBy(e, -20), !0)}
3776
+ ${c("autofit", A("autoFitWidth"), () => this._autoFitColumn(e))}
3777
+ ${c("wider", A("wider"), () => this._resizeColumnBy(e, X), !0)}
3778
+ ${c("narrower", A("narrower"), () => this._resizeColumnBy(e, -20), !0)}
3765
3779
  </div>
3766
3780
  `;
3767
3781
  }
@@ -3779,26 +3793,26 @@ var q = {
3779
3793
  }}>${e}</button>
3780
3794
  `, f = i`<div class="ft-context-menu-separator" role="separator"></div>`;
3781
3795
  return i`
3782
- <div class="ft-body-context-menu" role="menu" aria-label=${k("cellActions")}
3796
+ <div class="ft-body-context-menu" role="menu" aria-label=${A("cellActions")}
3783
3797
  style="position: fixed; left: ${n}px; top: ${r}px; z-index: 200;"
3784
3798
  @mousedown=${(e) => e.stopPropagation()}
3785
3799
  @keydown=${(e) => this._onMenuKeydown(e, ".ft-body-context-menu", l)}>
3786
- ${d(k("copy"), () => this._handleCopy(!1))}
3800
+ ${d(A("copy"), () => this._handleCopy(!1))}
3787
3801
  ${f}
3788
- ${d(k("insertRowAbove"), () => this.addRow(void 0, t))}
3789
- ${d(k("insertRowBelow"), () => this.addRow(void 0, t + 1))}
3790
- ${d(k("deleteRow"), () => this.deleteRows([t]), !0)}
3802
+ ${d(A("insertRowAbove"), () => this.addRow(void 0, t))}
3803
+ ${d(A("insertRowBelow"), () => this.addRow(void 0, t + 1))}
3804
+ ${d(A("deleteRow"), () => this.deleteRows([t]), !0)}
3791
3805
  ${f}
3792
- ${d(k("hideColumn"), () => this._setColumnHidden(o.key, !0))}
3806
+ ${d(A("hideColumn"), () => this._setColumnHidden(o.key, !0))}
3793
3807
  ${f}
3794
- ${d(`${k("sortAscending")} โ†‘`, () => this._applySortFromMenu(o.key, "asc"))}
3795
- ${d(`${k("sortDescending")} โ†“`, () => this._applySortFromMenu(o.key, "desc"))}
3808
+ ${d(`${A("sortAscending")} โ†‘`, () => this._applySortFromMenu(o.key, "asc"))}
3809
+ ${d(`${A("sortDescending")} โ†“`, () => this._applySortFromMenu(o.key, "desc"))}
3796
3810
  ${f}
3797
- ${d(k("filterByThisValue"), () => this.setFilter(o.key, (e) => e === s))}
3798
- ${c ? d(k("clearFilter"), () => this.removeFilter(o.key)) : a}
3811
+ ${d(A("filterByThisValue"), () => this.setFilter(o.key, (e) => e === s))}
3812
+ ${c ? d(A("clearFilter"), () => this.removeFilter(o.key)) : a}
3799
3813
  ${f}
3800
- ${d(k(u ? "editComment" : "addComment"), () => this._openCommentPopup(t, o.key, n, r))}
3801
- ${u ? d(k("deleteComment"), () => this.setComment(t, o.key, null), !0) : a}
3814
+ ${d(A(u ? "editComment" : "addComment"), () => this._openCommentPopup(t, o.key, n, r))}
3815
+ ${u ? d(A("deleteComment"), () => this.setComment(t, o.key, null), !0) : a}
3802
3816
  </div>
3803
3817
  `;
3804
3818
  }
@@ -3830,13 +3844,13 @@ var q = {
3830
3844
  @mousedown=${(e) => e.stopPropagation()}>
3831
3845
  <textarea class="ft-comment-popup-textarea"
3832
3846
  rows="4"
3833
- placeholder=${k("addCommentPlaceholder")}
3847
+ placeholder=${A("addCommentPlaceholder")}
3834
3848
  @keydown=${(e) => {
3835
3849
  e.key === "Escape" && (e.preventDefault(), this._cancelCommentPopup()), e.key === "Enter" && (e.ctrlKey || e.metaKey) && (e.preventDefault(), this._commitCommentPopup());
3836
3850
  }}></textarea>
3837
3851
  <div class="ft-comment-popup-buttons">
3838
- <button class="ft-comment-popup-cancel" @click=${() => this._cancelCommentPopup()}>${k("cancel")}</button>
3839
- <button class="ft-comment-popup-save" @click=${() => this._commitCommentPopup()}>${k("save")}</button>
3852
+ <button class="ft-comment-popup-cancel" @click=${() => this._cancelCommentPopup()}>${A("cancel")}</button>
3853
+ <button class="ft-comment-popup-save" @click=${() => this._commitCommentPopup()}>${A("save")}</button>
3840
3854
  </div>
3841
3855
  </div>
3842
3856
  `;
@@ -3872,7 +3886,7 @@ var q = {
3872
3886
  <div class="ft-filter-dropdown" @click=${(e) => e.stopPropagation()}>
3873
3887
  ${t === "boolean" ? this._renderBooleanFilter(e) : t === "number" ? this._renderNumberFilter(e) : t === "date" || t === "datetime" ? this._renderDateFilter(e) : this._renderTextFilter(e)}
3874
3888
  <div class="ft-filter-actions">
3875
- <button class="ft-filter-clear" @click=${() => this._clearColumnFilter(e.key)}>${k("clear")}</button>
3889
+ <button class="ft-filter-clear" @click=${() => this._clearColumnFilter(e.key)}>${A("clear")}</button>
3876
3890
  </div>
3877
3891
  </div>
3878
3892
  `;
@@ -3905,7 +3919,7 @@ var q = {
3905
3919
  let n = this._emptyFilterState.get(e) ?? "";
3906
3920
  return i`
3907
3921
  <div class="ft-filter-empty-row">
3908
- <label>${k("blankCells")}</label>
3922
+ <label>${A("blankCells")}</label>
3909
3923
  <select class="ft-filter-mode-select"
3910
3924
  .value=${n}
3911
3925
  @change=${(n) => {
@@ -3915,9 +3929,9 @@ var q = {
3915
3929
  @keydown=${(e) => {
3916
3930
  e.key === "Escape" && (this._openFilterKey = null), e.stopPropagation();
3917
3931
  }}>
3918
- <option value="">${k("blankAll")}</option>
3919
- <option value="empty">${k("emptyOnly")}</option>
3920
- <option value="non-empty">${k("nonEmptyOnly")}</option>
3932
+ <option value="">${A("blankAll")}</option>
3933
+ <option value="empty">${A("emptyOnly")}</option>
3934
+ <option value="non-empty">${A("nonEmptyOnly")}</option>
3921
3935
  </select>
3922
3936
  </div>
3923
3937
  `;
@@ -3993,13 +4007,13 @@ var q = {
3993
4007
  @keydown=${(e) => {
3994
4008
  e.key === "Escape" && (this._openFilterKey = null), e.stopPropagation();
3995
4009
  }}>
3996
- <option value="contains">${k("contains")}</option>
3997
- <option value="starts">${k("startsWith")}</option>
3998
- <option value="ends">${k("endsWith")}</option>
3999
- <option value="wildcard">${k("wildcard")}</option>
4010
+ <option value="contains">${A("contains")}</option>
4011
+ <option value="starts">${A("startsWith")}</option>
4012
+ <option value="ends">${A("endsWith")}</option>
4013
+ <option value="wildcard">${A("wildcard")}</option>
4000
4014
  </select>
4001
4015
  </div>
4002
- <input class="ft-filter-input" type="text" placeholder=${k("searchPlaceholder")}
4016
+ <input class="ft-filter-input" type="text" placeholder=${A("searchPlaceholder")}
4003
4017
  .value=${t.value}
4004
4018
  @input=${(t) => {
4005
4019
  let n = t.target.value, r = this._textFilterState.get(e.key) ?? {
@@ -4050,7 +4064,7 @@ var q = {
4050
4064
  }}>
4051
4065
  ${Object.keys(q).map((e) => i`<option value=${e}>${q[e]}</option>`)}
4052
4066
  </select>
4053
- <input class="ft-filter-input ft-num-cond-input" type="number" placeholder=${k("valuePlaceholder")}
4067
+ <input class="ft-filter-input ft-num-cond-input" type="number" placeholder=${A("valuePlaceholder")}
4054
4068
  .value=${n.value == null ? "" : String(n.value)}
4055
4069
  @input=${(n) => {
4056
4070
  let r = n.target.value, i = this._numberFilterState.get(e) ?? this._defaultNumState();
@@ -4111,13 +4125,13 @@ var q = {
4111
4125
  let t = e.type === "datetime" ? "datetime-local" : "date", n = this._dateFilterState.get(e.key) ?? {};
4112
4126
  return i`
4113
4127
  <div class="ft-filter-range">
4114
- <input class="ft-filter-input" type=${t} placeholder=${k("fromPlaceholder")}
4128
+ <input class="ft-filter-input" type=${t} placeholder=${A("fromPlaceholder")}
4115
4129
  .value=${n.from ?? ""}
4116
4130
  @input=${(t) => this._applyDateFilter(e.key, t, "from")}
4117
4131
  @keydown=${(e) => {
4118
4132
  e.key === "Escape" && (this._openFilterKey = null), e.stopPropagation();
4119
4133
  }}>
4120
- <input class="ft-filter-input" type=${t} placeholder=${k("toPlaceholder")}
4134
+ <input class="ft-filter-input" type=${t} placeholder=${A("toPlaceholder")}
4121
4135
  .value=${n.to ?? ""}
4122
4136
  @input=${(t) => this._applyDateFilter(e.key, t, "to")}
4123
4137
  @keydown=${(e) => {
@@ -4143,9 +4157,9 @@ var q = {
4143
4157
  @keydown=${(e) => {
4144
4158
  e.key === "Escape" && (this._openFilterKey = null), e.stopPropagation();
4145
4159
  }}>
4146
- <option value="all">${k("all")}</option>
4147
- <option value="true">\u2714 ${k("booleanTrue")}</option>
4148
- <option value="false">\u2718 ${k("booleanFalse")}</option>
4160
+ <option value="all">${A("all")}</option>
4161
+ <option value="true">\u2714 ${A("booleanTrue")}</option>
4162
+ <option value="false">\u2718 ${A("booleanFalse")}</option>
4149
4163
  </select>
4150
4164
  ${this._renderEmptyFilterRow(e.key)}
4151
4165
  `;
@@ -4565,39 +4579,39 @@ var q = {
4565
4579
  e.key === "Enter" && e.target instanceof HTMLInputElement && e.target.classList.contains("ft-find-input") && (e.shiftKey ? this._findPrev() : this._findNext());
4566
4580
  }}>
4567
4581
  <div class="ft-find-row">
4568
- <input class="ft-find-input" type="text" placeholder=${k("findPlaceholder")}
4582
+ <input class="ft-find-input" type="text" placeholder=${A("findPlaceholder")}
4569
4583
  .value=${t}
4570
4584
  @input=${(e) => {
4571
4585
  this._findState.query = e.target.value, this._findSearch();
4572
4586
  }}>
4573
4587
  <span class="ft-find-count">${c > 0 ? `${l}/${c}` : t ? "0 results" : ""}</span>
4574
- <button @click=${() => this._findPrev()} title=${k("findPrevious")}>โ—€</button>
4575
- <button @click=${() => this._findNext()} title=${k("findNext")}>โ–ถ</button>
4576
- <label title=${k("matchCase")}><input type="checkbox" ?checked=${r} @change=${(e) => {
4588
+ <button @click=${() => this._findPrev()} title=${A("findPrevious")}>โ—€</button>
4589
+ <button @click=${() => this._findNext()} title=${A("findNext")}>โ–ถ</button>
4590
+ <label title=${A("matchCase")}><input type="checkbox" ?checked=${r} @change=${(e) => {
4577
4591
  this._findState.matchCase = e.target.checked, this._findSearch();
4578
4592
  }}> Aa</label>
4579
- <label title=${k("wholeCell")}><input type="checkbox" ?checked=${a} @change=${(e) => {
4593
+ <label title=${A("wholeCell")}><input type="checkbox" ?checked=${a} @change=${(e) => {
4580
4594
  this._findState.wholeCell = e.target.checked, this._findSearch();
4581
4595
  }}> [ ]</label>
4582
- <button @click=${() => this._closeFindPanel()} title=${k("closeFind")}>โœ•</button>
4596
+ <button @click=${() => this._closeFindPanel()} title=${A("closeFind")}>โœ•</button>
4583
4597
  </div>
4584
4598
  ${e === "replace" ? i`
4585
4599
  <div class="ft-find-row">
4586
- <input class="ft-find-replace-input" type="text" placeholder=${k("replaceWithPlaceholder")}
4600
+ <input class="ft-find-replace-input" type="text" placeholder=${A("replaceWithPlaceholder")}
4587
4601
  .value=${n}
4588
4602
  @input=${(e) => {
4589
4603
  this._findState.replaceWith = e.target.value;
4590
4604
  }}>
4591
- <button @click=${() => this._replaceOne()} ?disabled=${c === 0}>${k("replace")}</button>
4592
- <button @click=${() => this._replaceAll()} ?disabled=${c === 0}>${k("replaceAll")}</button>
4605
+ <button @click=${() => this._replaceOne()} ?disabled=${c === 0}>${A("replace")}</button>
4606
+ <button @click=${() => this._replaceAll()} ?disabled=${c === 0}>${A("replaceAll")}</button>
4593
4607
  </div>
4594
4608
  ` : ""}
4595
4609
  </div>
4596
4610
  `;
4597
4611
  }
4598
4612
  render() {
4599
- let e = this.visibleColumns, t = this.importEnabled && this._isDragOver ? i`<div class="ft-import-overlay">${k("dropFileToImport")}</div>` : a, n = this.loading ? i`<div class="ft-loading-overlay"></div>` : a;
4600
- if (e.length === 0) return i`${t}${n}<div class="ft-empty">${k("noColumnsDefined")}</div>`;
4613
+ let e = this.visibleColumns, t = this.importEnabled && this._isDragOver ? i`<div class="ft-import-overlay">${A("dropFileToImport")}</div>` : a, n = this.loading ? i`<div class="ft-loading-overlay"></div>` : a;
4614
+ if (e.length === 0) return i`${t}${n}<div class="ft-empty">${A("noColumnsDefined")}</div>`;
4601
4615
  let r = this.headerHeight, o = this._totalRowWidth, { start: s, end: c } = this.visibleColRange, l = [];
4602
4616
  for (let t = 0; t < e.length; t++) (e[t].pinned === "left" || e[t].pinned === "right") && (t < s || t >= c) && l.push(t);
4603
4617
  let u = 0, d = this._scrollLeft, f = this.selectable ? i`<div class="ft-checkbox-header"
@@ -4727,48 +4741,48 @@ var q = {
4727
4741
  `;
4728
4742
  }
4729
4743
  _renderCell(e, t, n, r) {
4730
- let o = this._activeCell?.row === n && this._activeCell?.col === r, s = this._editingCell?.row === n && this._editingCell?.col === r, c = this._selection.isInRange(n, r), l = t.pinned === "left", u = t.pinned === "right", d = l || u, f = this._getColWidth(t), p = this.rowHeight, h = this._colLeftOffsets[r] ?? 0, g;
4731
- g = l ? `position: absolute; top: 0; left: ${this._scrollLeft + this._getPinnedLeft(r)}px; width: ${f}px; height: ${p}px; z-index: 2;` : u ? `position: absolute; top: 0; left: ${this._getPinnedRightLeft(r)}px; width: ${f}px; height: ${p}px; z-index: 2;` : `left: ${h}px; width: ${f}px; height: ${p}px;`;
4732
- let _ = !this._isCellEditable(t);
4744
+ let o = this._activeCell?.row === n && this._activeCell?.col === r, s = this._editingCell?.row === n && this._editingCell?.col === r, c = this._selection.isInRange(n, r), l = t.pinned === "left", u = t.pinned === "right", d = l || u, f = this._getColWidth(t), p = this.rowHeight, m = this._colLeftOffsets[r] ?? 0, h;
4745
+ h = l ? `position: absolute; top: 0; left: ${this._scrollLeft + this._getPinnedLeft(r)}px; width: ${f}px; height: ${p}px; z-index: 2;` : u ? `position: absolute; top: 0; left: ${this._getPinnedRightLeft(r)}px; width: ${f}px; height: ${p}px; z-index: 2;` : `left: ${m}px; width: ${f}px; height: ${p}px;`;
4746
+ let g = !this._isCellEditable(t);
4733
4747
  if (t.conditionalRules && t.conditionalRules.length > 0) {
4734
4748
  let n = e[t.key], r = {};
4735
4749
  for (let i of t.conditionalRules) i.when(n, e, t) && (i.style.background && (r.background = i.style.background), i.style.color && (r.color = i.style.color), i.style.fontWeight && (r["font-weight"] = i.style.fontWeight), i.style.fontStyle && (r["font-style"] = i.style.fontStyle));
4736
4750
  let i = Object.entries(r).map(([e, t]) => `${e}: ${t}`).join("; ");
4737
- i && (g += " " + i + ";");
4751
+ i && (h += " " + i + ";");
4738
4752
  }
4739
4753
  if (s) return i`
4740
4754
  <div class="ft-cell ft-editing ft-active ${d ? "ft-pinned" : ""}" role="gridcell"
4741
4755
  data-col-index=${r}
4742
4756
  aria-selected="true"
4743
- aria-readonly=${_ ? "true" : a}
4744
- style=${g}>
4757
+ aria-readonly=${g ? "true" : a}
4758
+ style=${h}>
4745
4759
  ${this._renderEditor(e, t)}
4746
4760
  </div>
4747
4761
  `;
4748
- let v = o || c, y = this._isCellInvalid(n, r), b = (this._findState?.results ?? []).findIndex((e) => e.row === n && e.col === r), x = b >= 0, S = x && b === this._findState.currentIndex, C = [
4762
+ let _ = o || c, v = this._isCellInvalid(n, r), y = (this._findState?.results ?? []).findIndex((e) => e.row === n && e.col === r), b = y >= 0, x = b && y === this._findState.currentIndex, S = [
4749
4763
  "ft-cell",
4750
4764
  `ft-type-${t.type ?? "text"}`,
4751
4765
  o ? "ft-active" : "",
4752
4766
  c ? "ft-selected" : "",
4753
4767
  d ? "ft-pinned" : "",
4754
- y ? "ft-invalid" : "",
4755
- S ? "ft-find-current" : x ? "ft-find-match" : ""
4756
- ].filter(Boolean).join(" "), w = this._toDataIndex(n), T = this._comments.get(w)?.get(t.key) ?? null, E = T !== null, D = E ? i`<div class="ft-comment-indicator" title=${T}></div>` : a;
4768
+ v ? "ft-invalid" : "",
4769
+ x ? "ft-find-current" : b ? "ft-find-match" : ""
4770
+ ].filter(Boolean).join(" "), C = this._toDataIndex(n), w = this._comments.get(C)?.get(t.key) ?? null, T = w !== null, E = T ? i`<div class="ft-comment-indicator" title=${w}></div>` : a;
4757
4771
  return i`
4758
- <div class=${E ? C + " ft-has-comment" : C}
4772
+ <div class=${T ? S + " ft-has-comment" : S}
4759
4773
  role="gridcell"
4760
4774
  data-col-index=${r}
4761
- aria-selected=${v ? "true" : "false"}
4762
- aria-readonly=${_ ? "true" : a}
4763
- aria-invalid=${y ? "true" : a}
4764
- title=${y ?? a}
4765
- style=${g}
4775
+ aria-selected=${_ ? "true" : "false"}
4776
+ aria-readonly=${g ? "true" : a}
4777
+ aria-invalid=${v ? "true" : a}
4778
+ title=${v ?? a}
4779
+ style=${h}
4766
4780
  @mousedown=${(e) => this._onCellMouseDown(e, n, r)}
4767
4781
  @mouseenter=${() => this._onCellMouseEnter(n, r)}
4768
4782
  @click=${(e) => this._onCellClickEvent(e, n, r)}
4769
4783
  @dblclick=${() => this._onCellDblClick(n, r)}>
4770
- ${D}
4771
- ${m(e[t.key], e, t)}
4784
+ ${E}
4785
+ ${D(e[t.key], e, t)}
4772
4786
  </div>
4773
4787
  `;
4774
4788
  }
@@ -4906,4 +4920,4 @@ K([s({ type: Array })], $.prototype, "columns", void 0), K([s({
4906
4920
  attribute: "max-undo-size"
4907
4921
  })], $.prototype, "maxUndoSize", null), K([c()], $.prototype, "_scrollTop", void 0), K([c()], $.prototype, "_scrollLeft", void 0), K([c()], $.prototype, "_viewportHeight", void 0), K([c()], $.prototype, "_viewportWidth", void 0), K([c()], $.prototype, "_activeCell", void 0), K([c()], $.prototype, "_editingCell", void 0), K([c()], $.prototype, "_sortCriteria", void 0), K([c()], $.prototype, "_openFilterKey", void 0), K([c()], $.prototype, "_rowSelectionVersion", void 0), K([c()], $.prototype, "_autocompleteState", void 0), K([c()], $.prototype, "_headerMenu", void 0), K([c()], $.prototype, "_bodyContextMenu", void 0), K([c()], $.prototype, "_commentPopup", void 0), K([c()], $.prototype, "_isDragOver", void 0), $ = K([o("flex-table")], $);
4908
4922
  //#endregion
4909
- export { O as a, A as i, H as n, m as o, M as r, $ as t };
4923
+ export { k as a, j as i, H as n, D as o, M as r, $ as t };
@@ -1,2 +1,2 @@
1
- import { a as e, i as t, n, o as r, r as i, t as a } from "./flex-table-BAQbidin.js";
1
+ import { a as e, i as t, n, o as r, r as i, t as a } from "./flex-table-DcIjmfEK.js";
2
2
  export { a as FlexTable, t as RowSelectionState, i as UndoStack, n as exportData, e as flexTableLocale, r as renderCell };
package/dist/react.js CHANGED
@@ -1,4 +1,4 @@
1
- import { t as e } from "./flex-table-BAQbidin.js";
1
+ import { t as e } from "./flex-table-DcIjmfEK.js";
2
2
  import t from "react";
3
3
  import { createComponent as n } from "@lit/react";
4
4
  var r = n({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iyulab/flex-table",
3
- "version": "0.37.0",
3
+ "version": "0.38.0",
4
4
  "description": "A minimalist, input-centric data grid web component",
5
5
  "type": "module",
6
6
  "main": "./dist/flex-table.js",
@@ -71,7 +71,7 @@
71
71
  "odata-query": "^8.1.0"
72
72
  },
73
73
  "peerDependencies": {
74
- "@iyulab/components": ">=1.24.0",
74
+ "@iyulab/components": ">=1.27.0",
75
75
  "@lit/react": "^1.0.0",
76
76
  "react": "^18.0.0 || ^19.0.0"
77
77
  },