@iyulab/flex-table 0.48.0 → 0.48.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.
- package/CHANGELOG.md +29 -0
- package/README.md +2 -2
- package/dist/{flex-table-B8ehfxqn.js → flex-table-CDMcn3Nj.js} +266 -273
- package/dist/flex-table.d.ts +2 -6
- package/dist/flex-table.js +1 -1
- package/dist/react.js +1 -1
- package/package.json +2 -2
- package/skills/iyulab-flex-table/references/api.md +1 -1
|
@@ -6,8 +6,9 @@ import { formatDate as u, formatNumber as d, parseDate as f, parseDateTime as p,
|
|
|
6
6
|
import { decodeTsv as h, encodeTsv as g } from "@iyulab/components/dist/utilities/tsv.js";
|
|
7
7
|
import "@iyulab/components/dist/components/date-picker/UDatePicker.js";
|
|
8
8
|
import { isImeComposing as _ } from "@iyulab/components/dist/utilities/keyboard.js";
|
|
9
|
+
import { copyFromKey as v, isTextEntry as y, pasteFromKey as b } from "@iyulab/components/dist/utilities/clipboard.js";
|
|
9
10
|
//#region src/styles/flex-table.styles.ts
|
|
10
|
-
var
|
|
11
|
+
var x = r`
|
|
11
12
|
/* --- Theme Variables (Light defaults) --- */
|
|
12
13
|
:host {
|
|
13
14
|
--ft-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
@@ -1017,13 +1018,13 @@ var v = r`
|
|
|
1017
1018
|
`;
|
|
1018
1019
|
//#endregion
|
|
1019
1020
|
//#region src/renderers/format.ts
|
|
1020
|
-
function
|
|
1021
|
-
return e == null ? "" : typeof t == "function" ? t(e) :
|
|
1021
|
+
function S(e, t) {
|
|
1022
|
+
return e == null ? "" : typeof t == "function" ? t(e) : C(t) ? w(e, t) : ee(e, t);
|
|
1022
1023
|
}
|
|
1023
|
-
function
|
|
1024
|
+
function C(e) {
|
|
1024
1025
|
return /[yMdHhms]/.test(e);
|
|
1025
1026
|
}
|
|
1026
|
-
function
|
|
1027
|
+
function ee(e, t) {
|
|
1027
1028
|
let n = typeof e == "number" ? e : Number(e);
|
|
1028
1029
|
if (isNaN(n)) return String(e);
|
|
1029
1030
|
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, u = {
|
|
@@ -1036,7 +1037,7 @@ function x(e, t) {
|
|
|
1036
1037
|
style: "percent"
|
|
1037
1038
|
}).format(n) : (d = new Intl.NumberFormat(l.get(), u).format(n), a && (d = a + d)), d + "";
|
|
1038
1039
|
}
|
|
1039
|
-
function
|
|
1040
|
+
function w(e, t) {
|
|
1040
1041
|
let n;
|
|
1041
1042
|
if (e instanceof Date) n = e;
|
|
1042
1043
|
else if (typeof e == "string" || typeof e == "number") n = new Date(e);
|
|
@@ -1047,26 +1048,26 @@ function S(e, t) {
|
|
|
1047
1048
|
}
|
|
1048
1049
|
//#endregion
|
|
1049
1050
|
//#region src/renderers/cell-renderer.ts
|
|
1050
|
-
function
|
|
1051
|
-
return n.render ? n.render(e, t, n) : n.format ? typeof n.format == "function" ? n.format(e, t, n) :
|
|
1051
|
+
function T(e, t, n) {
|
|
1052
|
+
return n.render ? n.render(e, t, n) : n.format ? typeof n.format == "function" ? n.format(e, t, n) : S(e, n.format) : E(e, n);
|
|
1052
1053
|
}
|
|
1053
|
-
function
|
|
1054
|
+
function E(e, t) {
|
|
1054
1055
|
if (e == null) return "";
|
|
1055
1056
|
switch (t.type) {
|
|
1056
|
-
case "number": return
|
|
1057
|
+
case "number": return ne(e);
|
|
1057
1058
|
case "boolean": return i`<span class="ft-bool">${e ? "✔" : ""}</span>`;
|
|
1058
|
-
case "date": return
|
|
1059
|
-
case "datetime": return
|
|
1060
|
-
case "select": return
|
|
1059
|
+
case "date": return re(e);
|
|
1060
|
+
case "datetime": return ie(e);
|
|
1061
|
+
case "select": return D(e, t);
|
|
1061
1062
|
default: return String(e);
|
|
1062
1063
|
}
|
|
1063
1064
|
}
|
|
1064
|
-
function
|
|
1065
|
+
function D(e, t) {
|
|
1065
1066
|
if (!t.options || t.options.length === 0 || typeof t.options[0] == "string") return e == null ? "" : String(e);
|
|
1066
1067
|
let n = t.options.find((t) => t.value === e);
|
|
1067
1068
|
return n ? n.label : e == null ? "" : String(e);
|
|
1068
1069
|
}
|
|
1069
|
-
var
|
|
1070
|
+
var te = {
|
|
1070
1071
|
year: "numeric",
|
|
1071
1072
|
month: "numeric",
|
|
1072
1073
|
day: "numeric",
|
|
@@ -1074,19 +1075,19 @@ var E = {
|
|
|
1074
1075
|
minute: "numeric",
|
|
1075
1076
|
second: "numeric"
|
|
1076
1077
|
};
|
|
1077
|
-
function
|
|
1078
|
+
function ne(e) {
|
|
1078
1079
|
return typeof e == "number" ? Number.isInteger(e) ? d(e) : d(e, { minimumFractionDigits: 1 }) : String(e);
|
|
1079
1080
|
}
|
|
1080
|
-
function
|
|
1081
|
+
function re(e) {
|
|
1081
1082
|
return e instanceof Date || typeof e == "string" ? u(e) : String(e);
|
|
1082
1083
|
}
|
|
1083
|
-
function
|
|
1084
|
-
return e instanceof Date || typeof e == "string" ? u(e,
|
|
1084
|
+
function ie(e) {
|
|
1085
|
+
return e instanceof Date || typeof e == "string" ? u(e, te) : String(e);
|
|
1085
1086
|
}
|
|
1086
1087
|
//#endregion
|
|
1087
1088
|
//#region src/locale.ts
|
|
1088
|
-
var
|
|
1089
|
-
|
|
1089
|
+
var O = l.namespace("flex-table");
|
|
1090
|
+
O.register("en", {
|
|
1090
1091
|
showHiddenColumns: "Show hidden column(s)",
|
|
1091
1092
|
columnMenu: "Column menu",
|
|
1092
1093
|
cellActions: "Cell actions",
|
|
@@ -1143,7 +1144,7 @@ k.register("en", {
|
|
|
1143
1144
|
notADate: "Enter a date as YYYY-MM-DD",
|
|
1144
1145
|
notADateTime: "Enter a date and time as YYYY-MM-DD HH:mm",
|
|
1145
1146
|
notInList: "Value must be from the existing list"
|
|
1146
|
-
}),
|
|
1147
|
+
}), O.register("ko", {
|
|
1147
1148
|
showHiddenColumns: "숨긴 열 보기",
|
|
1148
1149
|
columnMenu: "열 메뉴",
|
|
1149
1150
|
cellActions: "셀 작업",
|
|
@@ -1201,10 +1202,10 @@ k.register("en", {
|
|
|
1201
1202
|
notADateTime: "날짜와 시간을 YYYY-MM-DD HH:mm 으로 입력하세요",
|
|
1202
1203
|
notInList: "목록에 있는 값이어야 합니다"
|
|
1203
1204
|
});
|
|
1204
|
-
var
|
|
1205
|
+
var k = (e, t) => O.text(e, t);
|
|
1205
1206
|
//#endregion
|
|
1206
1207
|
//#region src/core/selection.ts
|
|
1207
|
-
function
|
|
1208
|
+
function ae(e) {
|
|
1208
1209
|
return {
|
|
1209
1210
|
startRow: Math.min(e.startRow, e.endRow),
|
|
1210
1211
|
startCol: Math.min(e.startCol, e.endCol),
|
|
@@ -1212,7 +1213,7 @@ function te(e) {
|
|
|
1212
1213
|
endCol: Math.max(e.startCol, e.endCol)
|
|
1213
1214
|
};
|
|
1214
1215
|
}
|
|
1215
|
-
var
|
|
1216
|
+
var oe = class {
|
|
1216
1217
|
constructor() {
|
|
1217
1218
|
this.activeCell = null, this.rangeAnchor = null, this.range = null, this.extraRanges = [], this._rowCount = 0, this._colCount = 0;
|
|
1218
1219
|
}
|
|
@@ -1239,7 +1240,7 @@ var ne = class {
|
|
|
1239
1240
|
return e < 0 || e >= this._rowCount || t < 0 || t >= this._colCount ? this.activeCell : (!this.rangeAnchor && this.activeCell && (this.rangeAnchor = { ...this.activeCell }), this.activeCell = {
|
|
1240
1241
|
row: e,
|
|
1241
1242
|
col: t
|
|
1242
|
-
}, this.rangeAnchor && (this.range =
|
|
1243
|
+
}, this.rangeAnchor && (this.range = ae({
|
|
1243
1244
|
startRow: this.rangeAnchor.row,
|
|
1244
1245
|
startCol: this.rangeAnchor.col,
|
|
1245
1246
|
endRow: e,
|
|
@@ -1310,7 +1311,7 @@ var ne = class {
|
|
|
1310
1311
|
shiftMoveRight() {
|
|
1311
1312
|
return this.activeCell ? this.setActiveWithRange(this.activeCell.row, this.activeCell.col + 1) : null;
|
|
1312
1313
|
}
|
|
1313
|
-
},
|
|
1314
|
+
}, se = class {
|
|
1314
1315
|
constructor() {
|
|
1315
1316
|
this.current = null;
|
|
1316
1317
|
}
|
|
@@ -1331,7 +1332,7 @@ var ne = class {
|
|
|
1331
1332
|
let e = this.current;
|
|
1332
1333
|
return this.current = null, e;
|
|
1333
1334
|
}
|
|
1334
|
-
},
|
|
1335
|
+
}, A = class {
|
|
1335
1336
|
constructor() {
|
|
1336
1337
|
this._selected = /* @__PURE__ */ new Set(), this._mode = "multi", this._rowCount = 0;
|
|
1337
1338
|
}
|
|
@@ -1392,7 +1393,7 @@ var ne = class {
|
|
|
1392
1393
|
};
|
|
1393
1394
|
//#endregion
|
|
1394
1395
|
//#region src/core/filtering.ts
|
|
1395
|
-
function
|
|
1396
|
+
function ce(e, t, n) {
|
|
1396
1397
|
if (t.length === 0) return Array.from({ length: e.length }, (e, t) => t);
|
|
1397
1398
|
let r = [];
|
|
1398
1399
|
for (let i = 0; i < e.length; i++) {
|
|
@@ -1411,9 +1412,9 @@ function ie(e, t, n) {
|
|
|
1411
1412
|
}
|
|
1412
1413
|
//#endregion
|
|
1413
1414
|
//#region src/core/undo.ts
|
|
1414
|
-
var
|
|
1415
|
+
var le = 100, j = class {
|
|
1415
1416
|
constructor() {
|
|
1416
|
-
this._undoStack = [], this._redoStack = [], this._maxSize =
|
|
1417
|
+
this._undoStack = [], this._redoStack = [], this._maxSize = le;
|
|
1417
1418
|
}
|
|
1418
1419
|
get maxSize() {
|
|
1419
1420
|
return this._maxSize;
|
|
@@ -1450,7 +1451,7 @@ var ae = 100, M = class {
|
|
|
1450
1451
|
};
|
|
1451
1452
|
//#endregion
|
|
1452
1453
|
//#region src/clipboard/clipboard.ts
|
|
1453
|
-
function
|
|
1454
|
+
function ue(e, t, n) {
|
|
1454
1455
|
let r = [];
|
|
1455
1456
|
for (let i = n.startRow; i <= n.endRow; i++) {
|
|
1456
1457
|
let a = e[i], o = [];
|
|
@@ -1462,7 +1463,7 @@ function oe(e, t, n) {
|
|
|
1462
1463
|
}
|
|
1463
1464
|
return g(r);
|
|
1464
1465
|
}
|
|
1465
|
-
function
|
|
1466
|
+
function M(e, t) {
|
|
1466
1467
|
if (e === "") return null;
|
|
1467
1468
|
switch (t.type) {
|
|
1468
1469
|
case "number": {
|
|
@@ -1477,19 +1478,19 @@ function N(e, t) {
|
|
|
1477
1478
|
default: return e;
|
|
1478
1479
|
}
|
|
1479
1480
|
}
|
|
1480
|
-
function
|
|
1481
|
+
function N(e) {
|
|
1481
1482
|
let t = String(e);
|
|
1482
1483
|
if (!Number.isFinite(e) || t.includes("e")) return t;
|
|
1483
1484
|
let n = new Intl.NumberFormat(l.get()).formatToParts(1.5).find((e) => e.type === "decimal")?.value;
|
|
1484
1485
|
return n && n !== "." ? t.replace(".", n) : t;
|
|
1485
1486
|
}
|
|
1486
|
-
function
|
|
1487
|
+
function de(e) {
|
|
1487
1488
|
if (e == null || e === "") return "";
|
|
1488
1489
|
if (e instanceof Date) return Number.isNaN(e.getTime()) ? "" : `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`;
|
|
1489
1490
|
let t = String(e), n = /^(\d{4}-\d{2}-\d{2})(?:$|T)/.exec(t);
|
|
1490
1491
|
return n ? n[1] : t;
|
|
1491
1492
|
}
|
|
1492
|
-
function
|
|
1493
|
+
function fe(e) {
|
|
1493
1494
|
if (e == null || e === "") return "";
|
|
1494
1495
|
let t = e instanceof Date ? "" : String(e), n = /^(\d{4}-\d{2}-\d{2})T(\d{2}:\d{2})(?::\d{2}(?:\.\d+)?)?$/.exec(t);
|
|
1495
1496
|
if (n) return `${n[1]} ${n[2]}`;
|
|
@@ -1500,7 +1501,7 @@ function ce(e) {
|
|
|
1500
1501
|
}
|
|
1501
1502
|
//#endregion
|
|
1502
1503
|
//#region src/export/xlsx-writer.ts
|
|
1503
|
-
var
|
|
1504
|
+
var pe = (() => {
|
|
1504
1505
|
let e = /* @__PURE__ */ new Uint32Array(256);
|
|
1505
1506
|
for (let t = 0; t < 256; t++) {
|
|
1506
1507
|
let n = t;
|
|
@@ -1509,23 +1510,23 @@ var le = (() => {
|
|
|
1509
1510
|
}
|
|
1510
1511
|
return e;
|
|
1511
1512
|
})();
|
|
1512
|
-
function
|
|
1513
|
+
function me(e) {
|
|
1513
1514
|
let t = 4294967295;
|
|
1514
|
-
for (let n = 0; n < e.length; n++) t =
|
|
1515
|
+
for (let n = 0; n < e.length; n++) t = pe[(t ^ e[n]) & 255] ^ t >>> 8;
|
|
1515
1516
|
return (t ^ 4294967295) >>> 0;
|
|
1516
1517
|
}
|
|
1517
|
-
var
|
|
1518
|
-
function
|
|
1519
|
-
return
|
|
1518
|
+
var P = new TextEncoder();
|
|
1519
|
+
function he(e) {
|
|
1520
|
+
return F(e.map((e) => ({
|
|
1520
1521
|
...e,
|
|
1521
1522
|
body: e.data,
|
|
1522
1523
|
method: 0
|
|
1523
1524
|
})));
|
|
1524
1525
|
}
|
|
1525
|
-
async function
|
|
1526
|
+
async function ge(e) {
|
|
1526
1527
|
let t = [];
|
|
1527
1528
|
for (let n of e) {
|
|
1528
|
-
let e = await
|
|
1529
|
+
let e = await _e(n.data);
|
|
1529
1530
|
t.push(e.length < n.data.length ? {
|
|
1530
1531
|
...n,
|
|
1531
1532
|
body: e,
|
|
@@ -1536,9 +1537,9 @@ async function fe(e) {
|
|
|
1536
1537
|
method: 0
|
|
1537
1538
|
});
|
|
1538
1539
|
}
|
|
1539
|
-
return
|
|
1540
|
+
return F(t);
|
|
1540
1541
|
}
|
|
1541
|
-
async function
|
|
1542
|
+
async function _e(e) {
|
|
1542
1543
|
let t = new CompressionStream("deflate-raw"), n = t.writable.getWriter(), r = t.readable.getReader();
|
|
1543
1544
|
n.write(e), n.close();
|
|
1544
1545
|
let i = [];
|
|
@@ -1547,52 +1548,52 @@ async function pe(e) {
|
|
|
1547
1548
|
if (e) break;
|
|
1548
1549
|
i.push(t);
|
|
1549
1550
|
}
|
|
1550
|
-
return
|
|
1551
|
+
return I(i);
|
|
1551
1552
|
}
|
|
1552
|
-
function
|
|
1553
|
+
function F(e) {
|
|
1553
1554
|
let t = [], n = [], r = 0;
|
|
1554
1555
|
for (let i of e) {
|
|
1555
|
-
let e =
|
|
1556
|
+
let e = P.encode(i.name), a = me(i.data), o = i.data.length, s = i.body.length, c = i.method === 8 ? 20 : 10, l = new ArrayBuffer(30 + e.length), u = new DataView(l);
|
|
1556
1557
|
u.setUint32(0, 67324752, !0), u.setUint16(4, c, !0), u.setUint16(6, 0, !0), u.setUint16(8, i.method, !0), u.setUint16(10, 0, !0), u.setUint16(12, 33, !0), u.setUint32(14, a, !0), u.setUint32(18, s, !0), u.setUint32(22, o, !0), u.setUint16(26, e.length, !0), u.setUint16(28, 0, !0), new Uint8Array(l, 30).set(e), t.push(new Uint8Array(l)), t.push(i.body);
|
|
1557
1558
|
let d = new ArrayBuffer(46 + e.length), f = new DataView(d);
|
|
1558
1559
|
f.setUint32(0, 33639248, !0), f.setUint16(4, 20, !0), f.setUint16(6, c, !0), f.setUint16(8, 0, !0), f.setUint16(10, i.method, !0), f.setUint16(12, 0, !0), f.setUint16(14, 33, !0), f.setUint32(16, a, !0), f.setUint32(20, s, !0), f.setUint32(24, o, !0), f.setUint16(28, e.length, !0), f.setUint16(30, 0, !0), f.setUint16(32, 0, !0), f.setUint16(34, 0, !0), f.setUint16(36, 0, !0), f.setUint32(38, 0, !0), f.setUint32(42, r, !0), new Uint8Array(d, 46).set(e), n.push(new Uint8Array(d)), r += 30 + e.length + s;
|
|
1559
1560
|
}
|
|
1560
|
-
let i =
|
|
1561
|
-
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),
|
|
1561
|
+
let i = I(n), a = /* @__PURE__ */ new ArrayBuffer(22), o = new DataView(a);
|
|
1562
|
+
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([
|
|
1562
1563
|
...t,
|
|
1563
1564
|
i,
|
|
1564
1565
|
new Uint8Array(a)
|
|
1565
1566
|
]);
|
|
1566
1567
|
}
|
|
1567
|
-
function
|
|
1568
|
+
function I(e) {
|
|
1568
1569
|
let t = e.reduce((e, t) => e + t.length, 0), n = new Uint8Array(t), r = 0;
|
|
1569
1570
|
for (let t of e) n.set(t, r), r += t.length;
|
|
1570
1571
|
return n;
|
|
1571
1572
|
}
|
|
1572
|
-
function
|
|
1573
|
+
function L(e) {
|
|
1573
1574
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
1574
1575
|
}
|
|
1575
|
-
function
|
|
1576
|
+
function ve(e) {
|
|
1576
1577
|
let t = "";
|
|
1577
1578
|
for (e++; e > 0;) t = String.fromCharCode(64 + (e % 26 || 26)) + t, e = Math.floor((e - 1) / 26);
|
|
1578
1579
|
return t;
|
|
1579
1580
|
}
|
|
1580
|
-
function
|
|
1581
|
-
return
|
|
1581
|
+
function R(e, t) {
|
|
1582
|
+
return ve(t) + (e + 1);
|
|
1582
1583
|
}
|
|
1583
|
-
function
|
|
1584
|
+
function ye(e) {
|
|
1584
1585
|
let t = Date.UTC(1899, 11, 30);
|
|
1585
1586
|
return (e.getTime() - t) / 864e5;
|
|
1586
1587
|
}
|
|
1587
|
-
var
|
|
1588
|
-
function
|
|
1589
|
-
let n = [], r = t.map((e, t) => `<c r="${
|
|
1588
|
+
var be = "<?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>", xe = "<?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>", Se = "<?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>", Ce = "<?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>", we = "<?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>";
|
|
1589
|
+
function Te(e, t) {
|
|
1590
|
+
let n = [], r = t.map((e, t) => `<c r="${R(0, t)}" t="str" s="2"><v>${L(e.label)}</v></c>`);
|
|
1590
1591
|
return n.push(`<row r="1">${r.join("")}</row>`), e.forEach((e, r) => {
|
|
1591
1592
|
let i = t.map((t, n) => {
|
|
1592
|
-
let i =
|
|
1593
|
+
let i = R(r + 1, n), a = e[t.key];
|
|
1593
1594
|
if (a == null) return `<c r="${i}" t="str"><v></v></c>`;
|
|
1594
1595
|
let o = t.type ?? "text";
|
|
1595
|
-
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>${
|
|
1596
|
+
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>${ye(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>`;
|
|
1596
1597
|
});
|
|
1597
1598
|
n.push(`<row r="${r + 2}">${i.join("")}</row>`);
|
|
1598
1599
|
}), `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
@@ -1600,65 +1601,65 @@ function xe(e, t) {
|
|
|
1600
1601
|
<sheetData>${n.join("")}</sheetData>
|
|
1601
1602
|
</worksheet>`;
|
|
1602
1603
|
}
|
|
1603
|
-
function
|
|
1604
|
-
return
|
|
1604
|
+
function Ee(e, t) {
|
|
1605
|
+
return he(z(e, t));
|
|
1605
1606
|
}
|
|
1606
|
-
function
|
|
1607
|
-
return
|
|
1607
|
+
function De(e, t) {
|
|
1608
|
+
return ge(z(e, t));
|
|
1608
1609
|
}
|
|
1609
|
-
function
|
|
1610
|
-
let n =
|
|
1610
|
+
function z(e, t) {
|
|
1611
|
+
let n = Te(e, t);
|
|
1611
1612
|
return [
|
|
1612
1613
|
{
|
|
1613
1614
|
name: "[Content_Types].xml",
|
|
1614
|
-
data:
|
|
1615
|
+
data: P.encode(be)
|
|
1615
1616
|
},
|
|
1616
1617
|
{
|
|
1617
1618
|
name: "_rels/.rels",
|
|
1618
|
-
data:
|
|
1619
|
+
data: P.encode(xe)
|
|
1619
1620
|
},
|
|
1620
1621
|
{
|
|
1621
1622
|
name: "xl/workbook.xml",
|
|
1622
|
-
data:
|
|
1623
|
+
data: P.encode(Se)
|
|
1623
1624
|
},
|
|
1624
1625
|
{
|
|
1625
1626
|
name: "xl/_rels/workbook.xml.rels",
|
|
1626
|
-
data:
|
|
1627
|
+
data: P.encode(Ce)
|
|
1627
1628
|
},
|
|
1628
1629
|
{
|
|
1629
1630
|
name: "xl/worksheets/sheet1.xml",
|
|
1630
|
-
data:
|
|
1631
|
+
data: P.encode(n)
|
|
1631
1632
|
},
|
|
1632
1633
|
{
|
|
1633
1634
|
name: "xl/styles.xml",
|
|
1634
|
-
data:
|
|
1635
|
+
data: P.encode(we)
|
|
1635
1636
|
}
|
|
1636
1637
|
];
|
|
1637
1638
|
}
|
|
1638
1639
|
//#endregion
|
|
1639
1640
|
//#region src/export/export.ts
|
|
1640
|
-
function
|
|
1641
|
+
function B(e, t, n) {
|
|
1641
1642
|
switch (n) {
|
|
1642
|
-
case "csv": return
|
|
1643
|
-
case "tsv": return
|
|
1644
|
-
case "json": return
|
|
1645
|
-
case "xlsx": return
|
|
1643
|
+
case "csv": return V(e, t, ",");
|
|
1644
|
+
case "tsv": return V(e, t, " ");
|
|
1645
|
+
case "json": return Ae(e, t);
|
|
1646
|
+
case "xlsx": return Ee(e, t);
|
|
1646
1647
|
}
|
|
1647
1648
|
}
|
|
1648
|
-
async function
|
|
1649
|
-
let r = n === "xlsx" ? await
|
|
1650
|
-
return new Blob([r], { type:
|
|
1649
|
+
async function Oe(e, t, n) {
|
|
1650
|
+
let r = n === "xlsx" ? await De(e, t) : B(e, t, n);
|
|
1651
|
+
return new Blob([r], { type: Pe(n) });
|
|
1651
1652
|
}
|
|
1652
|
-
function
|
|
1653
|
+
function ke(e, t) {
|
|
1653
1654
|
return e == null ? "" : (t.type === "date" || t.type === "datetime") && e instanceof Date ? e.toISOString() : String(e);
|
|
1654
1655
|
}
|
|
1655
|
-
function
|
|
1656
|
-
return [t.map((e) =>
|
|
1656
|
+
function V(e, t, n) {
|
|
1657
|
+
return [t.map((e) => H(e.label, n)).join(n), ...e.map((e) => t.map((t) => H(ke(e[t.key], t), n)).join(n))].join("\n");
|
|
1657
1658
|
}
|
|
1658
|
-
function
|
|
1659
|
+
function H(e, t) {
|
|
1659
1660
|
return e.includes(t) || e.includes("\"") || e.includes("\n") || e.includes("\r") ? "\"" + e.replace(/"/g, "\"\"") + "\"" : e;
|
|
1660
1661
|
}
|
|
1661
|
-
function
|
|
1662
|
+
function Ae(e, t) {
|
|
1662
1663
|
let n = e.map((e) => {
|
|
1663
1664
|
let n = {};
|
|
1664
1665
|
for (let r of t) {
|
|
@@ -1669,35 +1670,35 @@ function Ee(e, t) {
|
|
|
1669
1670
|
});
|
|
1670
1671
|
return JSON.stringify(n, null, 2);
|
|
1671
1672
|
}
|
|
1672
|
-
function
|
|
1673
|
+
function je(e, t) {
|
|
1673
1674
|
let n = URL.createObjectURL(e), r = document.createElement("a");
|
|
1674
1675
|
r.href = n, r.download = t, r.style.display = "none", document.body.appendChild(r), r.click(), document.body.removeChild(r), setTimeout(() => URL.revokeObjectURL(n), 100);
|
|
1675
1676
|
}
|
|
1676
|
-
var
|
|
1677
|
+
var Me = {
|
|
1677
1678
|
csv: "text/csv;charset=utf-8",
|
|
1678
1679
|
tsv: "text/tab-separated-values;charset=utf-8",
|
|
1679
1680
|
json: "application/json;charset=utf-8",
|
|
1680
1681
|
xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
|
1681
|
-
},
|
|
1682
|
+
}, Ne = {
|
|
1682
1683
|
csv: ".csv",
|
|
1683
1684
|
tsv: ".tsv",
|
|
1684
1685
|
json: ".json",
|
|
1685
1686
|
xlsx: ".xlsx"
|
|
1686
1687
|
};
|
|
1687
|
-
function
|
|
1688
|
-
return
|
|
1688
|
+
function Pe(e) {
|
|
1689
|
+
return Me[e];
|
|
1689
1690
|
}
|
|
1690
|
-
function
|
|
1691
|
-
return
|
|
1691
|
+
function Fe(e) {
|
|
1692
|
+
return Ne[e];
|
|
1692
1693
|
}
|
|
1693
1694
|
//#endregion
|
|
1694
1695
|
//#region src/export/xlsx-reader.ts
|
|
1695
|
-
function
|
|
1696
|
+
function Ie(e) {
|
|
1696
1697
|
for (let t = e.byteLength - 22; t >= 0; t--) if (e.getUint32(t, !0) === 101010256) return t;
|
|
1697
1698
|
throw Error("XLSX: End of central directory not found — not a valid ZIP file");
|
|
1698
1699
|
}
|
|
1699
|
-
function
|
|
1700
|
-
let t =
|
|
1700
|
+
function Le(e) {
|
|
1701
|
+
let t = Ie(e), n = e.getUint32(t + 16, !0), r = e.getUint32(t + 12, !0), i = new TextDecoder("utf-8"), a = [], o = n, s = n + r;
|
|
1701
1702
|
for (; o < s && e.getUint32(o, !0) === 33639248;) {
|
|
1702
1703
|
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));
|
|
1703
1704
|
a.push({
|
|
@@ -1710,7 +1711,7 @@ function Ne(e) {
|
|
|
1710
1711
|
}
|
|
1711
1712
|
return a;
|
|
1712
1713
|
}
|
|
1713
|
-
async function
|
|
1714
|
+
async function Re(e) {
|
|
1714
1715
|
let t = new DecompressionStream("deflate-raw"), n = t.writable.getWriter(), r = t.readable.getReader();
|
|
1715
1716
|
n.write(e), n.close();
|
|
1716
1717
|
let i = [];
|
|
@@ -1723,28 +1724,28 @@ async function Pe(e) {
|
|
|
1723
1724
|
for (let e of i) o.set(e, s), s += e.length;
|
|
1724
1725
|
return o;
|
|
1725
1726
|
}
|
|
1726
|
-
async function
|
|
1727
|
+
async function ze(e, t) {
|
|
1727
1728
|
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);
|
|
1728
1729
|
if (t.compressionMethod === 0) return o.slice();
|
|
1729
|
-
if (t.compressionMethod === 8) return
|
|
1730
|
+
if (t.compressionMethod === 8) return Re(o);
|
|
1730
1731
|
throw Error(`XLSX: Unsupported compression method ${t.compressionMethod}`);
|
|
1731
1732
|
}
|
|
1732
|
-
async function
|
|
1733
|
-
let t = new DataView(e), n =
|
|
1734
|
-
for (let e of n) e.compressedSize === 0 && e.name.endsWith("/") || r.set(e.name, await
|
|
1733
|
+
async function Be(e) {
|
|
1734
|
+
let t = new DataView(e), n = Le(t), r = /* @__PURE__ */ new Map();
|
|
1735
|
+
for (let e of n) e.compressedSize === 0 && e.name.endsWith("/") || r.set(e.name, await ze(t, e));
|
|
1735
1736
|
return r;
|
|
1736
1737
|
}
|
|
1737
|
-
var
|
|
1738
|
-
function
|
|
1739
|
-
let t =
|
|
1738
|
+
var Ve = new TextDecoder("utf-8");
|
|
1739
|
+
function U(e) {
|
|
1740
|
+
let t = Ve.decode(e);
|
|
1740
1741
|
return new DOMParser().parseFromString(t, "application/xml");
|
|
1741
1742
|
}
|
|
1742
|
-
function
|
|
1743
|
+
function He(e) {
|
|
1743
1744
|
if (!e) return [];
|
|
1744
|
-
let t =
|
|
1745
|
+
let t = U(e);
|
|
1745
1746
|
return Array.from(t.querySelectorAll("si")).map((e) => Array.from(e.querySelectorAll("t")).map((e) => e.textContent ?? "").join(""));
|
|
1746
1747
|
}
|
|
1747
|
-
var
|
|
1748
|
+
var Ue = /* @__PURE__ */ new Set([
|
|
1748
1749
|
14,
|
|
1749
1750
|
15,
|
|
1750
1751
|
16,
|
|
@@ -1764,37 +1765,37 @@ var ze = /* @__PURE__ */ new Set([
|
|
|
1764
1765
|
57,
|
|
1765
1766
|
58
|
|
1766
1767
|
]);
|
|
1767
|
-
function
|
|
1768
|
+
function We(e) {
|
|
1768
1769
|
let t = e.replace(/"[^"]*"/g, "").replace(/\\./g, "").replace(/\[[^\]]*\]/g, "").split(";")[0];
|
|
1769
1770
|
return /[dy]/i.test(t);
|
|
1770
1771
|
}
|
|
1771
|
-
function
|
|
1772
|
+
function Ge(e) {
|
|
1772
1773
|
let t = /* @__PURE__ */ new Set();
|
|
1773
1774
|
if (!e) return t;
|
|
1774
|
-
let n =
|
|
1775
|
+
let n = U(e), r = /* @__PURE__ */ new Map();
|
|
1775
1776
|
for (let e of Array.from(n.querySelectorAll("numFmts > numFmt"))) r.set(parseInt(e.getAttribute("numFmtId") ?? "", 10), e.getAttribute("formatCode") ?? "");
|
|
1776
1777
|
return Array.from(n.querySelectorAll("cellXfs > xf")).forEach((e, n) => {
|
|
1777
1778
|
let i = parseInt(e.getAttribute("numFmtId") ?? "0", 10), a = r.get(i);
|
|
1778
|
-
(a === void 0 ?
|
|
1779
|
+
(a === void 0 ? Ue.has(i) : We(a)) && t.add(n);
|
|
1779
1780
|
}), t;
|
|
1780
1781
|
}
|
|
1781
|
-
function
|
|
1782
|
+
function Ke(e) {
|
|
1782
1783
|
if (!e) return !1;
|
|
1783
|
-
let t =
|
|
1784
|
+
let t = U(e).querySelector("workbookPr")?.getAttribute("date1904");
|
|
1784
1785
|
return t === "1" || t === "true";
|
|
1785
1786
|
}
|
|
1786
|
-
function
|
|
1787
|
+
function qe(e, t) {
|
|
1787
1788
|
return new Date((t ? Date.UTC(1904, 0, 1) : Date.UTC(1899, 11, 30)) + Math.floor(e) * 864e5).toISOString().slice(0, 10);
|
|
1788
1789
|
}
|
|
1789
|
-
function
|
|
1790
|
-
let i =
|
|
1790
|
+
function Je(e, t, n, r) {
|
|
1791
|
+
let i = U(e).querySelectorAll("row");
|
|
1791
1792
|
if (i.length === 0) return [];
|
|
1792
1793
|
let a = 0, o = /* @__PURE__ */ new Map();
|
|
1793
1794
|
for (let e of i) {
|
|
1794
1795
|
let i = parseInt(e.getAttribute("r") ?? "1", 10) - 1, s = /* @__PURE__ */ new Map();
|
|
1795
1796
|
o.set(i, s);
|
|
1796
1797
|
for (let i of e.querySelectorAll("c")) {
|
|
1797
|
-
let e =
|
|
1798
|
+
let e = Ye(i.getAttribute("r") ?? "");
|
|
1798
1799
|
e > a && (a = e);
|
|
1799
1800
|
let o = i.getAttribute("t") ?? "", c = i.getAttribute("s") ?? "", l = i.querySelector("v")?.textContent ?? "", u = i.querySelector("is > t")?.textContent ?? null, d;
|
|
1800
1801
|
if (o === "s") d = t[parseInt(l, 10)] ?? "";
|
|
@@ -1803,7 +1804,7 @@ function We(e, t, n, r) {
|
|
|
1803
1804
|
else if (l === "") d = "";
|
|
1804
1805
|
else {
|
|
1805
1806
|
let e = parseFloat(l);
|
|
1806
|
-
d = c !== "" && n.has(parseInt(c, 10)) && !isNaN(e) && e >= 0 ?
|
|
1807
|
+
d = c !== "" && n.has(parseInt(c, 10)) && !isNaN(e) && e >= 0 ? qe(e, r) : l;
|
|
1807
1808
|
}
|
|
1808
1809
|
s.set(e, d);
|
|
1809
1810
|
}
|
|
@@ -1817,13 +1818,13 @@ function We(e, t, n, r) {
|
|
|
1817
1818
|
}
|
|
1818
1819
|
return c;
|
|
1819
1820
|
}
|
|
1820
|
-
function
|
|
1821
|
+
function Ye(e) {
|
|
1821
1822
|
let t = 0, n = 0;
|
|
1822
1823
|
for (; n < e.length && e[n] >= "A" && e[n] <= "Z";) t = t * 26 + (e.charCodeAt(n) - 64), n++;
|
|
1823
1824
|
return t - 1;
|
|
1824
1825
|
}
|
|
1825
|
-
async function
|
|
1826
|
-
let t = await
|
|
1826
|
+
async function Xe(e) {
|
|
1827
|
+
let t = await Be(e), n = He(t.get("xl/sharedStrings.xml")), r = t.get("xl/worksheets/sheet1.xml");
|
|
1827
1828
|
if (!r) {
|
|
1828
1829
|
for (let [e, n] of t) if (e.toLowerCase().includes("worksheets/sheet")) {
|
|
1829
1830
|
r = n;
|
|
@@ -1831,7 +1832,7 @@ async function Ke(e) {
|
|
|
1831
1832
|
}
|
|
1832
1833
|
}
|
|
1833
1834
|
if (!r) throw Error("XLSX: No worksheet found");
|
|
1834
|
-
let i =
|
|
1835
|
+
let i = Ge(t.get("xl/styles.xml")), a = Ke(t.get("xl/workbook.xml")), o = Je(r, n, i, a);
|
|
1835
1836
|
return o.length === 0 ? {
|
|
1836
1837
|
headers: [],
|
|
1837
1838
|
rows: []
|
|
@@ -1842,12 +1843,12 @@ async function Ke(e) {
|
|
|
1842
1843
|
}
|
|
1843
1844
|
//#endregion
|
|
1844
1845
|
//#region src/models/types.ts
|
|
1845
|
-
function
|
|
1846
|
+
function W(e) {
|
|
1846
1847
|
return e.align ? e.align : e.type === "number" ? "end" : e.type === "boolean" ? "center" : "start";
|
|
1847
1848
|
}
|
|
1848
1849
|
//#endregion
|
|
1849
1850
|
//#region \0@oxc-project+runtime@0.152.0/helpers/esm/decorate.js
|
|
1850
|
-
function
|
|
1851
|
+
function G(e, t, n, r) {
|
|
1851
1852
|
var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
|
|
1852
1853
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
|
|
1853
1854
|
else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
|
|
@@ -1855,25 +1856,21 @@ function K(e, t, n, r) {
|
|
|
1855
1856
|
}
|
|
1856
1857
|
//#endregion
|
|
1857
1858
|
//#region src/flex-table.ts
|
|
1858
|
-
var
|
|
1859
|
-
"copy",
|
|
1860
|
-
"cut",
|
|
1861
|
-
"paste"
|
|
1862
|
-
], J = {
|
|
1859
|
+
var K = {
|
|
1863
1860
|
eq: "=",
|
|
1864
1861
|
neq: "≠",
|
|
1865
1862
|
gt: ">",
|
|
1866
1863
|
lt: "<",
|
|
1867
1864
|
gte: "≥",
|
|
1868
1865
|
lte: "≤"
|
|
1869
|
-
},
|
|
1866
|
+
}, q = 120, J = 40, Y = 20, X = 32, Z = 5, Ze = 200, Q = class extends n {
|
|
1870
1867
|
constructor(...e) {
|
|
1871
|
-
super(...e), this.columns = [], this._data = [], this._inUndoRedo = !1, this.clearUndoOnDataChange = !1, this.clearSelectionOnDataChange = !1, this._rowHeightFromCss =
|
|
1868
|
+
super(...e), this.columns = [], this._data = [], this._inUndoRedo = !1, this.clearUndoOnDataChange = !1, this.clearSelectionOnDataChange = !1, this._rowHeightFromCss = X, this._targetFloor = 0, 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 A(), this._undo = new j(), 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 = () => {
|
|
1872
1869
|
this._commitCommentPopup();
|
|
1873
1870
|
}, 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();
|
|
1874
1871
|
}
|
|
1875
1872
|
static {
|
|
1876
|
-
this.styles =
|
|
1873
|
+
this.styles = x;
|
|
1877
1874
|
}
|
|
1878
1875
|
get data() {
|
|
1879
1876
|
return this._data;
|
|
@@ -1883,7 +1880,7 @@ var q = [
|
|
|
1883
1880
|
this._data = e, n && !this._inUndoRedo && (this.clearUndoOnDataChange && this._undo.clear(), this.clearSelectionOnDataChange && this._rowSelection.selectedCount > 0 && (this._rowSelection.deselectAll(), this._rowSelectionVersion++, this._dispatchRowSelectionEvent())), this.requestUpdate("data", t);
|
|
1884
1881
|
}
|
|
1885
1882
|
get rowHeight() {
|
|
1886
|
-
let e = this._rowHeightExplicit ?? this._rowHeightFromCss ??
|
|
1883
|
+
let e = this._rowHeightExplicit ?? this._rowHeightFromCss ?? X;
|
|
1887
1884
|
return Math.max(e, this._targetFloor);
|
|
1888
1885
|
}
|
|
1889
1886
|
set rowHeight(e) {
|
|
@@ -2233,17 +2230,17 @@ var q = [
|
|
|
2233
2230
|
}
|
|
2234
2231
|
exportToString(e, t) {
|
|
2235
2232
|
let n = this._exportSlice(t);
|
|
2236
|
-
return n ?
|
|
2233
|
+
return n ? B(n.rows, n.cols, e) : "";
|
|
2237
2234
|
}
|
|
2238
2235
|
async exportToBlob(e, t) {
|
|
2239
2236
|
let n = this._exportSlice(t) ?? {
|
|
2240
2237
|
rows: [],
|
|
2241
2238
|
cols: []
|
|
2242
2239
|
};
|
|
2243
|
-
return
|
|
2240
|
+
return Oe(n.rows, n.cols, e);
|
|
2244
2241
|
}
|
|
2245
2242
|
async exportToFile(e, t) {
|
|
2246
|
-
|
|
2243
|
+
je(await this.exportToBlob(e), t ?? `export${Fe(e)}`);
|
|
2247
2244
|
}
|
|
2248
2245
|
_exportSlice(e) {
|
|
2249
2246
|
if (e?.selectionOnly) {
|
|
@@ -2316,7 +2313,7 @@ var q = [
|
|
|
2316
2313
|
async importFromFile(e) {
|
|
2317
2314
|
let t = e.name.toLowerCase();
|
|
2318
2315
|
if (t.endsWith(".xlsx")) {
|
|
2319
|
-
let t = await
|
|
2316
|
+
let t = await Xe(await e.arrayBuffer());
|
|
2320
2317
|
this._applyImportedSheet(t);
|
|
2321
2318
|
} else if (t.endsWith(".csv") || t.endsWith(".tsv")) {
|
|
2322
2319
|
let t = await e.text(), n = h(t);
|
|
@@ -2330,7 +2327,7 @@ var q = [
|
|
|
2330
2327
|
let a = t.get(e);
|
|
2331
2328
|
if (!a) return;
|
|
2332
2329
|
let o = this.columns.find((e) => e.key === a);
|
|
2333
|
-
r[a] = o ?
|
|
2330
|
+
r[a] = o ? M(n[i] ?? "", o) : n[i] ?? null;
|
|
2334
2331
|
}), r;
|
|
2335
2332
|
}), r = [...this.data];
|
|
2336
2333
|
this.data = n, this._undo.push({
|
|
@@ -2355,7 +2352,7 @@ var q = [
|
|
|
2355
2352
|
let a = n.get(t);
|
|
2356
2353
|
if (!a) return;
|
|
2357
2354
|
let o = this.columns.find((e) => e.key === a);
|
|
2358
|
-
r[a] = o ?
|
|
2355
|
+
r[a] = o ? M(e[i] ?? "", o) : e[i] ?? null;
|
|
2359
2356
|
}), r;
|
|
2360
2357
|
}), i = [...this.data];
|
|
2361
2358
|
this.data = r, this._undo.push({
|
|
@@ -2408,8 +2405,8 @@ var q = [
|
|
|
2408
2405
|
return this._columnWidths.get(e);
|
|
2409
2406
|
}
|
|
2410
2407
|
_getColWidth(e) {
|
|
2411
|
-
let t = this._columnWidths.get(e.key) ?? e.width ??
|
|
2412
|
-
return Math.max(t, e.minWidth ??
|
|
2408
|
+
let t = this._columnWidths.get(e.key) ?? e.width ?? q;
|
|
2409
|
+
return Math.max(t, e.minWidth ?? J);
|
|
2413
2410
|
}
|
|
2414
2411
|
get headerHeight() {
|
|
2415
2412
|
return this.rowHeight + 8;
|
|
@@ -2442,14 +2439,10 @@ var q = [
|
|
|
2442
2439
|
};
|
|
2443
2440
|
}
|
|
2444
2441
|
connectedCallback() {
|
|
2445
|
-
super.connectedCallback(), this._onScroll = this._onScroll.bind(this), this._onKeyDown = this._onKeyDown.bind(this), this._onDocumentClick = this._onDocumentClick.bind(this), this._onContextMenu = this._onContextMenu.bind(this), this._onDragover = this._onDragover.bind(this), this._onDragleave = this._onDragleave.bind(this), this._onDrop = this._onDrop.bind(this), this.
|
|
2446
|
-
for (let e of q) this.addEventListener(e, this._onClipboard);
|
|
2447
|
-
this.addEventListener("contextmenu", this._onContextMenu), this.addEventListener("dragover", this._onDragover), this.addEventListener("dragleave", this._onDragleave), this.addEventListener("drop", this._onDrop), this.hasAttribute("tabindex") || this.setAttribute("tabindex", "0"), this.setAttribute("role", "grid"), typeof ResizeObserver < "u" && (this._hostResizeObserver = new ResizeObserver(() => this._measureViewport()), this._hostResizeObserver.observe(this));
|
|
2442
|
+
super.connectedCallback(), this._onScroll = this._onScroll.bind(this), this._onKeyDown = this._onKeyDown.bind(this), this._onDocumentClick = this._onDocumentClick.bind(this), this._onContextMenu = this._onContextMenu.bind(this), this._onDragover = this._onDragover.bind(this), this._onDragleave = this._onDragleave.bind(this), this._onDrop = this._onDrop.bind(this), this.addEventListener("scroll", this._onScroll, { passive: !0 }), this.addEventListener("keydown", this._onKeyDown), this.addEventListener("contextmenu", this._onContextMenu), this.addEventListener("dragover", this._onDragover), this.addEventListener("dragleave", this._onDragleave), this.addEventListener("drop", this._onDrop), this.hasAttribute("tabindex") || this.setAttribute("tabindex", "0"), this.setAttribute("role", "grid"), typeof ResizeObserver < "u" && (this._hostResizeObserver = new ResizeObserver(() => this._measureViewport()), this._hostResizeObserver.observe(this));
|
|
2448
2443
|
}
|
|
2449
2444
|
disconnectedCallback() {
|
|
2450
|
-
super.disconnectedCallback(), this.removeEventListener("scroll", this._onScroll), this.removeEventListener("keydown", this._onKeyDown);
|
|
2451
|
-
for (let e of q) this.removeEventListener(e, this._onClipboard);
|
|
2452
|
-
this.removeEventListener("contextmenu", this._onContextMenu), this.removeEventListener("dragover", this._onDragover), this.removeEventListener("dragleave", this._onDragleave), this.removeEventListener("drop", this._onDrop), document.removeEventListener("click", this._onDocumentClick), document.removeEventListener("mousedown", this._onCommentPopupOutsideClick), this._isDragging = !1, this._wasDrag = !1, this._resizeCleanup &&= (this._resizeCleanup(), null), this._hostResizeObserver &&= (this._hostResizeObserver.disconnect(), null);
|
|
2445
|
+
super.disconnectedCallback(), this.removeEventListener("scroll", this._onScroll), this.removeEventListener("keydown", this._onKeyDown), this.removeEventListener("contextmenu", this._onContextMenu), this.removeEventListener("dragover", this._onDragover), this.removeEventListener("dragleave", this._onDragleave), this.removeEventListener("drop", this._onDrop), document.removeEventListener("click", this._onDocumentClick), document.removeEventListener("mousedown", this._onCommentPopupOutsideClick), this._isDragging = !1, this._wasDrag = !1, this._resizeCleanup &&= (this._resizeCleanup(), null), this._hostResizeObserver &&= (this._hostResizeObserver.disconnect(), null);
|
|
2453
2446
|
}
|
|
2454
2447
|
firstUpdated() {
|
|
2455
2448
|
this._readDensityTokens(), this._measureViewport(), this.shadowRoot && Array.isArray(this.shadowRoot.adoptedStyleSheets) && (this._baseStyleSheets = [...this.shadowRoot.adoptedStyleSheets]), this._syncStylesheets();
|
|
@@ -2512,7 +2505,7 @@ var q = [
|
|
|
2512
2505
|
this._filteredIndices = Array.from({ length: this.data.length }, (e, t) => t), this._sortedIndices = this._filteredIndices;
|
|
2513
2506
|
return;
|
|
2514
2507
|
}
|
|
2515
|
-
if (this._filteredIndices =
|
|
2508
|
+
if (this._filteredIndices = ce(this.data, this._filters, (e, t, n) => {
|
|
2516
2509
|
this.dispatchEvent(new CustomEvent("filter-error", {
|
|
2517
2510
|
detail: {
|
|
2518
2511
|
error: e,
|
|
@@ -2551,7 +2544,7 @@ var q = [
|
|
|
2551
2544
|
e !== this._viewportHeight && (this._viewportHeight = e), t !== this._viewportWidth && (this._viewportWidth = t), this._warnIfUnconstrained();
|
|
2552
2545
|
}
|
|
2553
2546
|
_warnIfUnconstrained() {
|
|
2554
|
-
this._warnedUnconstrained || process.env.NODE_ENV === "production" || this._visibleRowCount <
|
|
2547
|
+
this._warnedUnconstrained || process.env.NODE_ENV === "production" || this._visibleRowCount < Ze || 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.`));
|
|
2555
2548
|
}
|
|
2556
2549
|
_onScroll() {
|
|
2557
2550
|
this._scrollTop = this.scrollTop, this._scrollLeft = this.scrollLeft;
|
|
@@ -2696,7 +2689,7 @@ var q = [
|
|
|
2696
2689
|
}
|
|
2697
2690
|
let t = this.shadowRoot?.querySelector(".ft-editor");
|
|
2698
2691
|
if (t) {
|
|
2699
|
-
let n =
|
|
2692
|
+
let n = M(t.value, e);
|
|
2700
2693
|
this._applyEdit(n);
|
|
2701
2694
|
} else this._cancelEdit();
|
|
2702
2695
|
}
|
|
@@ -2706,7 +2699,7 @@ var q = [
|
|
|
2706
2699
|
if (this._editingCell = null, !t) return;
|
|
2707
2700
|
let { row: n, col: r } = t.position, i = this._toDataIndex(n), a = this.visibleColumns[r], o = t.originalValue;
|
|
2708
2701
|
if (a.autocomplete === "strict" && e != null && e !== "" && !this._getAutocompleteCandidates(a, "").includes(String(e))) {
|
|
2709
|
-
let t =
|
|
2702
|
+
let t = k("notInList");
|
|
2710
2703
|
this._markCellInvalid(n, r, t), this.dispatchEvent(new CustomEvent("validation-error", {
|
|
2711
2704
|
detail: {
|
|
2712
2705
|
row: i,
|
|
@@ -2721,7 +2714,7 @@ var q = [
|
|
|
2721
2714
|
return;
|
|
2722
2715
|
}
|
|
2723
2716
|
if (a.type === "number" && typeof e == "string" || a.type === "date" && typeof e == "string" && f(e) === null || a.type === "datetime" && typeof e == "string" && p(e) === null) {
|
|
2724
|
-
let t =
|
|
2717
|
+
let t = k(a.type === "number" ? "notANumber" : a.type === "date" ? "notADate" : "notADateTime");
|
|
2725
2718
|
this._markCellInvalid(n, r, t), this.dispatchEvent(new CustomEvent("validation-error", {
|
|
2726
2719
|
detail: {
|
|
2727
2720
|
row: i,
|
|
@@ -2896,8 +2889,16 @@ var q = [
|
|
|
2896
2889
|
case "z": return e.preventDefault(), e.shiftKey ? this.redo() : this.undo(), !0;
|
|
2897
2890
|
case "y": return e.preventDefault(), this.redo(), !0;
|
|
2898
2891
|
case "c":
|
|
2899
|
-
case "x":
|
|
2900
|
-
|
|
2892
|
+
case "x": {
|
|
2893
|
+
if (y(e.composedPath()[0])) return !0;
|
|
2894
|
+
let t = this._selectionTsv();
|
|
2895
|
+
if (!t) return !0;
|
|
2896
|
+
let n = e.key.toLowerCase() === "x" && this.editable;
|
|
2897
|
+
return v(t.text).then((e) => {
|
|
2898
|
+
e ? this._afterCopy(t.range, t.text, n) : this._clipboardError("copy", /* @__PURE__ */ Error("The clipboard did not take the copied text"));
|
|
2899
|
+
}), !0;
|
|
2900
|
+
}
|
|
2901
|
+
case "v": return y(e.composedPath()[0]) || !this.editable || !this._activeCell || b().then((e) => this._pasteText(e), (e) => this._clipboardError("paste", e)), !0;
|
|
2901
2902
|
case "d": return e.preventDefault(), this.editable && this._handleFillDown(), !0;
|
|
2902
2903
|
case "r": return e.preventDefault(), this.editable && this._handleFillRight(), !0;
|
|
2903
2904
|
case "f": return e.preventDefault(), this._toggleFindPanel("find"), !0;
|
|
@@ -2909,12 +2910,12 @@ var q = [
|
|
|
2909
2910
|
if (!e.altKey || !this._activeCell || e.key !== "ArrowLeft" && e.key !== "ArrowRight") return !1;
|
|
2910
2911
|
e.preventDefault();
|
|
2911
2912
|
let n = t[this._activeCell.col];
|
|
2912
|
-
return n && this._resizeColumnBy(n.key, e.key === "ArrowRight" ?
|
|
2913
|
+
return n && this._resizeColumnBy(n.key, e.key === "ArrowRight" ? Y : -20), !0;
|
|
2913
2914
|
}
|
|
2914
2915
|
_resizeColumnBy(e, t) {
|
|
2915
2916
|
let n = this.visibleColumns.findIndex((t) => t.key === e), r = this.visibleColumns[n];
|
|
2916
2917
|
if (!r) return;
|
|
2917
|
-
let i = this._columnWidths.get(r.key) ?? r.width ??
|
|
2918
|
+
let i = this._columnWidths.get(r.key) ?? r.width ?? q, a = r.minWidth ?? J, o = Math.max(a, i + t);
|
|
2918
2919
|
this._columnWidths.set(r.key, o), this.requestUpdate(), this.dispatchEvent(new CustomEvent("column-resize", {
|
|
2919
2920
|
detail: {
|
|
2920
2921
|
key: r.key,
|
|
@@ -2944,39 +2945,31 @@ var q = [
|
|
|
2944
2945
|
let e = this._selection.getEffectiveRange();
|
|
2945
2946
|
return e ? {
|
|
2946
2947
|
range: e,
|
|
2947
|
-
text:
|
|
2948
|
+
text: ue(this._sortedIndices.map((e) => this.data[e]), this.visibleColumns, e)
|
|
2948
2949
|
} : null;
|
|
2949
2950
|
}
|
|
2950
|
-
_onClipboard(e) {
|
|
2951
|
-
let t = e.composedPath()[0];
|
|
2952
|
-
if (t instanceof HTMLInputElement || t instanceof HTMLTextAreaElement || t instanceof HTMLElement && t.isContentEditable || !e.clipboardData) return;
|
|
2953
|
-
if (e.type === "paste") {
|
|
2954
|
-
if (!this.editable || !this._activeCell) return;
|
|
2955
|
-
e.preventDefault(), this._pasteText(e.clipboardData.getData("text/plain"));
|
|
2956
|
-
return;
|
|
2957
|
-
}
|
|
2958
|
-
let n = this._selectionTsv();
|
|
2959
|
-
n && (e.preventDefault(), e.clipboardData.setData("text/plain", n.text), this._afterCopy(n.range, n.text, e.type === "cut" && this.editable));
|
|
2960
|
-
}
|
|
2961
2951
|
async _copyFromMenu() {
|
|
2962
2952
|
let e = this._selectionTsv();
|
|
2963
2953
|
if (e) {
|
|
2964
2954
|
try {
|
|
2965
2955
|
await navigator.clipboard.writeText(e.text);
|
|
2966
2956
|
} catch (e) {
|
|
2967
|
-
this.
|
|
2968
|
-
detail: {
|
|
2969
|
-
action: "copy",
|
|
2970
|
-
error: e
|
|
2971
|
-
},
|
|
2972
|
-
bubbles: !0,
|
|
2973
|
-
composed: !0
|
|
2974
|
-
}));
|
|
2957
|
+
this._clipboardError("copy", e);
|
|
2975
2958
|
return;
|
|
2976
2959
|
}
|
|
2977
2960
|
this._afterCopy(e.range, e.text, !1);
|
|
2978
2961
|
}
|
|
2979
2962
|
}
|
|
2963
|
+
_clipboardError(e, t) {
|
|
2964
|
+
this.dispatchEvent(new CustomEvent("clipboard-error", {
|
|
2965
|
+
detail: {
|
|
2966
|
+
action: e,
|
|
2967
|
+
error: t
|
|
2968
|
+
},
|
|
2969
|
+
bubbles: !0,
|
|
2970
|
+
composed: !0
|
|
2971
|
+
}));
|
|
2972
|
+
}
|
|
2980
2973
|
_afterCopy(e, t, n) {
|
|
2981
2974
|
n && this._clearRange(e), this.dispatchEvent(new CustomEvent(n ? "clipboard-cut" : "clipboard-copy", {
|
|
2982
2975
|
detail: {
|
|
@@ -3040,7 +3033,7 @@ var q = [
|
|
|
3040
3033
|
for (let a = 0; a < t[i].length; a++) {
|
|
3041
3034
|
let s = e.col + a;
|
|
3042
3035
|
if (s >= n.length) break;
|
|
3043
|
-
let c = n[s], l = this.data[o][c.key], u =
|
|
3036
|
+
let c = n[s], l = this.data[o][c.key], u = M(t[i][a], c);
|
|
3044
3037
|
this.data[o][c.key] = u, r.push({
|
|
3045
3038
|
row: o,
|
|
3046
3039
|
col: s,
|
|
@@ -3105,7 +3098,7 @@ var q = [
|
|
|
3105
3098
|
for (let r = e.startCol + 1; r <= e.endCol; r++) {
|
|
3106
3099
|
let e = t[r];
|
|
3107
3100
|
if (!e || !this._isCellEditable(e)) continue;
|
|
3108
|
-
let a =
|
|
3101
|
+
let a = M(o == null ? "" : String(o), e);
|
|
3109
3102
|
n.push({
|
|
3110
3103
|
row: i,
|
|
3111
3104
|
key: e.key,
|
|
@@ -3242,7 +3235,7 @@ var q = [
|
|
|
3242
3235
|
return Math.min(n, i);
|
|
3243
3236
|
}
|
|
3244
3237
|
_renderHeaderCell(e, t) {
|
|
3245
|
-
let n = e.sortable !== !1, r = this._sortCriteria.find((t) => t.key === e.key), o = this._sortCriteria.length > 1 ? this._sortCriteria.findIndex((t) => t.key === e.key) : -1, s = this._filters.some((t) => t.key === e.key), c = e.pinned === "left", l = e.pinned === "right", u = c || l, d = e.headerAlign ??
|
|
3238
|
+
let n = e.sortable !== !1, r = this._sortCriteria.find((t) => t.key === e.key), o = this._sortCriteria.length > 1 ? this._sortCriteria.findIndex((t) => t.key === e.key) : -1, s = this._filters.some((t) => t.key === e.key), c = e.pinned === "left", l = e.pinned === "right", u = c || l, d = e.headerAlign ?? W(e), f = [
|
|
3246
3239
|
"ft-header-cell",
|
|
3247
3240
|
n ? "ft-sortable" : "",
|
|
3248
3241
|
u ? "ft-pinned" : "",
|
|
@@ -3265,7 +3258,7 @@ var q = [
|
|
|
3265
3258
|
@click=${n ? (t) => this._onHeaderClick(t, e) : void 0}>
|
|
3266
3259
|
${C ? i`
|
|
3267
3260
|
<button class="ft-hidden-col-indicator"
|
|
3268
|
-
title=${
|
|
3261
|
+
title=${k("showHiddenColumns")}
|
|
3269
3262
|
@click=${(t) => {
|
|
3270
3263
|
t.stopPropagation(), this._showHiddenBefore(e);
|
|
3271
3264
|
}}>❯</button>
|
|
@@ -3275,8 +3268,8 @@ var q = [
|
|
|
3275
3268
|
${o >= 0 ? i`<span class="ft-sort-order">${o + 1}</span>` : ""}
|
|
3276
3269
|
<button class="ft-column-menu-btn ${s ? "ft-filter-active" : ""}"
|
|
3277
3270
|
type="button"
|
|
3278
|
-
title=${
|
|
3279
|
-
aria-label=${
|
|
3271
|
+
title=${k("columnMenu")}
|
|
3272
|
+
aria-label=${k("columnMenuFor", { header: e.label })}
|
|
3280
3273
|
aria-haspopup="menu"
|
|
3281
3274
|
aria-expanded=${this._headerMenu?.key === e.key ? "true" : "false"}
|
|
3282
3275
|
@mousedown=${(e) => e.stopPropagation()}
|
|
@@ -3396,26 +3389,26 @@ var q = [
|
|
|
3396
3389
|
}}>${t}</button>
|
|
3397
3390
|
`;
|
|
3398
3391
|
return i`
|
|
3399
|
-
<div class="ft-header-menu" role="menu" aria-label=${
|
|
3392
|
+
<div class="ft-header-menu" role="menu" aria-label=${k("columnMenuRegion", { header: o.label })}
|
|
3400
3393
|
style="position: fixed; left: ${t}px; top: ${n}px; z-index: var(--u-layer-floating, 1000);"
|
|
3401
3394
|
@mousedown=${(e) => e.stopPropagation()}
|
|
3402
3395
|
@keydown=${(e) => this._onHeaderMenuKeydown(e)}>
|
|
3403
3396
|
${o.sortable === !1 ? a : i`
|
|
3404
|
-
${c("sort-asc",
|
|
3405
|
-
${c("sort-desc",
|
|
3397
|
+
${c("sort-asc", k("sortAscending"), () => this._applySortFromMenu(e, "asc"))}
|
|
3398
|
+
${c("sort-desc", k("sortDescending"), () => this._applySortFromMenu(e, "desc"))}
|
|
3406
3399
|
<div class="ft-header-menu-separator" role="separator"></div>
|
|
3407
3400
|
`}
|
|
3408
3401
|
${this.showFilters ? i`
|
|
3409
|
-
${c("filter",
|
|
3410
|
-
${s ? c("clear-filter",
|
|
3402
|
+
${c("filter", k("filter"), () => this._openFilterFromMenu(e))}
|
|
3403
|
+
${s ? c("clear-filter", k("clearFilter"), () => this._clearColumnFilter(e)) : a}
|
|
3411
3404
|
<div class="ft-header-menu-separator" role="separator"></div>
|
|
3412
3405
|
` : a}
|
|
3413
|
-
${c("hide",
|
|
3414
|
-
${r.map((e) => c("show",
|
|
3406
|
+
${c("hide", k("hideColumn"), () => this._setColumnHidden(e, !0))}
|
|
3407
|
+
${r.map((e) => c("show", k("showColumn", { header: e.label }), () => this._setColumnHidden(e.key, !1)))}
|
|
3415
3408
|
<div class="ft-header-menu-separator" role="separator"></div>
|
|
3416
|
-
${c("autofit",
|
|
3417
|
-
${c("wider",
|
|
3418
|
-
${c("narrower",
|
|
3409
|
+
${c("autofit", k("autoFitWidth"), () => this._autoFitColumn(e))}
|
|
3410
|
+
${c("wider", k("wider"), () => this._resizeColumnBy(e, Y), !0)}
|
|
3411
|
+
${c("narrower", k("narrower"), () => this._resizeColumnBy(e, -20), !0)}
|
|
3419
3412
|
</div>
|
|
3420
3413
|
`;
|
|
3421
3414
|
}
|
|
@@ -3433,26 +3426,26 @@ var q = [
|
|
|
3433
3426
|
}}>${e}</button>
|
|
3434
3427
|
`, f = i`<div class="ft-context-menu-separator" role="separator"></div>`;
|
|
3435
3428
|
return i`
|
|
3436
|
-
<div class="ft-body-context-menu" role="menu" aria-label=${
|
|
3429
|
+
<div class="ft-body-context-menu" role="menu" aria-label=${k("cellActions")}
|
|
3437
3430
|
style="position: fixed; left: ${n}px; top: ${r}px; z-index: var(--u-layer-floating, 1000);"
|
|
3438
3431
|
@mousedown=${(e) => e.stopPropagation()}
|
|
3439
3432
|
@keydown=${(e) => this._onMenuKeydown(e, ".ft-body-context-menu", l)}>
|
|
3440
|
-
${d(
|
|
3433
|
+
${d(k("copy"), () => this._copyFromMenu())}
|
|
3441
3434
|
${f}
|
|
3442
|
-
${d(
|
|
3443
|
-
${d(
|
|
3444
|
-
${d(
|
|
3435
|
+
${d(k("insertRowAbove"), () => this.addRow(void 0, t))}
|
|
3436
|
+
${d(k("insertRowBelow"), () => this.addRow(void 0, t + 1))}
|
|
3437
|
+
${d(k("deleteRow"), () => this.deleteRows([t]), !0)}
|
|
3445
3438
|
${f}
|
|
3446
|
-
${d(
|
|
3439
|
+
${d(k("hideColumn"), () => this._setColumnHidden(o.key, !0))}
|
|
3447
3440
|
${f}
|
|
3448
|
-
${d(`${
|
|
3449
|
-
${d(`${
|
|
3441
|
+
${d(`${k("sortAscending")} ↑`, () => this._applySortFromMenu(o.key, "asc"))}
|
|
3442
|
+
${d(`${k("sortDescending")} ↓`, () => this._applySortFromMenu(o.key, "desc"))}
|
|
3450
3443
|
${f}
|
|
3451
|
-
${d(
|
|
3452
|
-
${c ? d(
|
|
3444
|
+
${d(k("filterByThisValue"), () => this.setFilter(o.key, (e) => e === s))}
|
|
3445
|
+
${c ? d(k("clearFilter"), () => this.removeFilter(o.key)) : a}
|
|
3453
3446
|
${f}
|
|
3454
|
-
${d(
|
|
3455
|
-
${u ? d(
|
|
3447
|
+
${d(k(u ? "editComment" : "addComment"), () => this._openCommentPopup(t, o.key, n, r))}
|
|
3448
|
+
${u ? d(k("deleteComment"), () => this.setComment(t, o.key, null), !0) : a}
|
|
3456
3449
|
</div>
|
|
3457
3450
|
`;
|
|
3458
3451
|
}
|
|
@@ -3484,13 +3477,13 @@ var q = [
|
|
|
3484
3477
|
@mousedown=${(e) => e.stopPropagation()}>
|
|
3485
3478
|
<textarea class="ft-comment-popup-textarea"
|
|
3486
3479
|
rows="4"
|
|
3487
|
-
placeholder=${
|
|
3480
|
+
placeholder=${k("addCommentPlaceholder")}
|
|
3488
3481
|
@keydown=${(e) => {
|
|
3489
3482
|
e.key === "Escape" && (e.preventDefault(), this._cancelCommentPopup()), e.key === "Enter" && (e.ctrlKey || e.metaKey) && (e.preventDefault(), this._commitCommentPopup());
|
|
3490
3483
|
}}></textarea>
|
|
3491
3484
|
<div class="ft-comment-popup-buttons">
|
|
3492
|
-
<button class="ft-comment-popup-cancel" @click=${() => this._cancelCommentPopup()}>${
|
|
3493
|
-
<button class="ft-comment-popup-save" @click=${() => this._commitCommentPopup()}>${
|
|
3485
|
+
<button class="ft-comment-popup-cancel" @click=${() => this._cancelCommentPopup()}>${k("cancel")}</button>
|
|
3486
|
+
<button class="ft-comment-popup-save" @click=${() => this._commitCommentPopup()}>${k("save")}</button>
|
|
3494
3487
|
</div>
|
|
3495
3488
|
</div>
|
|
3496
3489
|
`;
|
|
@@ -3527,7 +3520,7 @@ var q = [
|
|
|
3527
3520
|
<div class="ft-filter-dropdown" @click=${(e) => e.stopPropagation()}>
|
|
3528
3521
|
${t === "boolean" ? this._renderBooleanFilter(e) : t === "number" ? this._renderNumberFilter(e) : t === "date" || t === "datetime" ? this._renderDateFilter(e) : this._renderTextFilter(e)}
|
|
3529
3522
|
<div class="ft-filter-actions">
|
|
3530
|
-
<button class="ft-filter-clear" @click=${() => this._clearColumnFilter(e.key)}>${
|
|
3523
|
+
<button class="ft-filter-clear" @click=${() => this._clearColumnFilter(e.key)}>${k("clear")}</button>
|
|
3531
3524
|
</div>
|
|
3532
3525
|
</div>
|
|
3533
3526
|
`;
|
|
@@ -3560,7 +3553,7 @@ var q = [
|
|
|
3560
3553
|
let n = this._emptyFilterState.get(e) ?? "";
|
|
3561
3554
|
return i`
|
|
3562
3555
|
<div class="ft-filter-empty-row">
|
|
3563
|
-
<label>${
|
|
3556
|
+
<label>${k("blankCells")}</label>
|
|
3564
3557
|
<select class="ft-filter-mode-select"
|
|
3565
3558
|
.value=${n}
|
|
3566
3559
|
@change=${(n) => {
|
|
@@ -3570,9 +3563,9 @@ var q = [
|
|
|
3570
3563
|
@keydown=${(e) => {
|
|
3571
3564
|
e.key === "Escape" && (this._openFilterKey = null), e.stopPropagation();
|
|
3572
3565
|
}}>
|
|
3573
|
-
<option value="">${
|
|
3574
|
-
<option value="empty">${
|
|
3575
|
-
<option value="non-empty">${
|
|
3566
|
+
<option value="">${k("blankAll")}</option>
|
|
3567
|
+
<option value="empty">${k("emptyOnly")}</option>
|
|
3568
|
+
<option value="non-empty">${k("nonEmptyOnly")}</option>
|
|
3576
3569
|
</select>
|
|
3577
3570
|
</div>
|
|
3578
3571
|
`;
|
|
@@ -3648,13 +3641,13 @@ var q = [
|
|
|
3648
3641
|
@keydown=${(e) => {
|
|
3649
3642
|
e.key === "Escape" && (this._openFilterKey = null), e.stopPropagation();
|
|
3650
3643
|
}}>
|
|
3651
|
-
<option value="contains">${
|
|
3652
|
-
<option value="starts">${
|
|
3653
|
-
<option value="ends">${
|
|
3654
|
-
<option value="wildcard">${
|
|
3644
|
+
<option value="contains">${k("contains")}</option>
|
|
3645
|
+
<option value="starts">${k("startsWith")}</option>
|
|
3646
|
+
<option value="ends">${k("endsWith")}</option>
|
|
3647
|
+
<option value="wildcard">${k("wildcard")}</option>
|
|
3655
3648
|
</select>
|
|
3656
3649
|
</div>
|
|
3657
|
-
<input class="ft-filter-input" type="text" placeholder=${
|
|
3650
|
+
<input class="ft-filter-input" type="text" placeholder=${k("searchPlaceholder")}
|
|
3658
3651
|
.value=${t.value}
|
|
3659
3652
|
@input=${(t) => {
|
|
3660
3653
|
let n = t.target.value, r = this._textFilterState.get(e.key) ?? {
|
|
@@ -3703,10 +3696,10 @@ var q = [
|
|
|
3703
3696
|
@keydown=${(e) => {
|
|
3704
3697
|
e.key === "Escape" && (this._openFilterKey = null), e.stopPropagation();
|
|
3705
3698
|
}}>
|
|
3706
|
-
${Object.keys(
|
|
3699
|
+
${Object.keys(K).map((e) => i`<option value=${e}>${K[e]}</option>`)}
|
|
3707
3700
|
</select>
|
|
3708
|
-
<input class="ft-filter-input ft-num-cond-input" type="text" inputmode="decimal" placeholder=${
|
|
3709
|
-
.value=${n.text ?? (n.value == null ? "" :
|
|
3701
|
+
<input class="ft-filter-input ft-num-cond-input" type="text" inputmode="decimal" placeholder=${k("valuePlaceholder")}
|
|
3702
|
+
.value=${n.text ?? (n.value == null ? "" : N(n.value))}
|
|
3710
3703
|
aria-invalid=${n.text && n.value == null ? "true" : "false"}
|
|
3711
3704
|
@input=${(n) => {
|
|
3712
3705
|
let r = n.target.value, i = this._numberFilterState.get(e) ?? this._defaultNumState();
|
|
@@ -3771,12 +3764,12 @@ var q = [
|
|
|
3771
3764
|
return i`
|
|
3772
3765
|
<div class="ft-filter-range ft-filter-range-dates">
|
|
3773
3766
|
<u-date-picker class="ft-filter-date" size="sm" clearable
|
|
3774
|
-
mode=${t ? "datetime" : "date"} label=${
|
|
3767
|
+
mode=${t ? "datetime" : "date"} label=${k("fromPlaceholder")}
|
|
3775
3768
|
.value=${n.from ?? ""} max=${r(n.to) ?? a}
|
|
3776
3769
|
@change=${(t) => this._applyDateFilter(e.key, t, "from")}
|
|
3777
3770
|
@keydown=${o}></u-date-picker>
|
|
3778
3771
|
<u-date-picker class="ft-filter-date" size="sm" clearable
|
|
3779
|
-
mode=${t ? "datetime" : "date"} label=${
|
|
3772
|
+
mode=${t ? "datetime" : "date"} label=${k("toPlaceholder")}
|
|
3780
3773
|
.value=${n.to ?? ""} min=${r(n.from) ?? a}
|
|
3781
3774
|
@change=${(t) => this._applyDateFilter(e.key, t, "to")}
|
|
3782
3775
|
@keydown=${o}></u-date-picker>
|
|
@@ -3800,9 +3793,9 @@ var q = [
|
|
|
3800
3793
|
@keydown=${(e) => {
|
|
3801
3794
|
e.key === "Escape" && (this._openFilterKey = null), e.stopPropagation();
|
|
3802
3795
|
}}>
|
|
3803
|
-
<option value="all">${
|
|
3804
|
-
<option value="true">\u2714 ${
|
|
3805
|
-
<option value="false">\u2718 ${
|
|
3796
|
+
<option value="all">${k("all")}</option>
|
|
3797
|
+
<option value="true">\u2714 ${k("booleanTrue")}</option>
|
|
3798
|
+
<option value="false">\u2718 ${k("booleanFalse")}</option>
|
|
3806
3799
|
</select>
|
|
3807
3800
|
${this._renderEmptyFilterRow(e.key)}
|
|
3808
3801
|
`;
|
|
@@ -3815,7 +3808,7 @@ var q = [
|
|
|
3815
3808
|
if (!n) return;
|
|
3816
3809
|
let r = this.shadowRoot?.querySelectorAll(`.ft-cell[data-col-index="${t}"]`), i = 0, a = this.shadowRoot?.querySelector(`.ft-header-cell[data-col-index="${t}"]`);
|
|
3817
3810
|
if (a && (i = Math.max(i, a.scrollWidth)), r) for (let e of r) i = Math.max(i, e.scrollWidth);
|
|
3818
|
-
let o = n.minWidth ??
|
|
3811
|
+
let o = n.minWidth ?? J, s = Math.max(o, i + 8);
|
|
3819
3812
|
this._columnWidths.set(n.key, s), this.requestUpdate(), this.dispatchEvent(new CustomEvent("column-resize", {
|
|
3820
3813
|
detail: {
|
|
3821
3814
|
key: n.key,
|
|
@@ -3828,7 +3821,7 @@ var q = [
|
|
|
3828
3821
|
}
|
|
3829
3822
|
_onResizeStart(e, t) {
|
|
3830
3823
|
e.preventDefault(), e.stopPropagation();
|
|
3831
|
-
let n = this.visibleColumns[t], r = this._columnWidths.get(n.key) ?? n.width ??
|
|
3824
|
+
let n = this.visibleColumns[t], r = this._columnWidths.get(n.key) ?? n.width ?? q;
|
|
3832
3825
|
this._resizing = {
|
|
3833
3826
|
colIndex: t,
|
|
3834
3827
|
startX: e.clientX,
|
|
@@ -3836,13 +3829,13 @@ var q = [
|
|
|
3836
3829
|
};
|
|
3837
3830
|
let i = (e) => {
|
|
3838
3831
|
if (!this._resizing) return;
|
|
3839
|
-
let t = e.clientX - this._resizing.startX, r = n.minWidth ??
|
|
3832
|
+
let t = e.clientX - this._resizing.startX, r = n.minWidth ?? J, i = Math.max(r, this._resizing.startWidth + t);
|
|
3840
3833
|
this._columnWidths.set(n.key, i), this.requestUpdate();
|
|
3841
3834
|
}, a = () => {
|
|
3842
3835
|
document.removeEventListener("mousemove", i), document.removeEventListener("mouseup", o), this._resizeCleanup = null;
|
|
3843
3836
|
}, o = () => {
|
|
3844
3837
|
if (a(), this._resizing) {
|
|
3845
|
-
let e = this._columnWidths.get(n.key) ??
|
|
3838
|
+
let e = this._columnWidths.get(n.key) ?? q;
|
|
3846
3839
|
this.dispatchEvent(new CustomEvent("column-resize", {
|
|
3847
3840
|
detail: {
|
|
3848
3841
|
key: n.key,
|
|
@@ -4222,39 +4215,39 @@ var q = [
|
|
|
4222
4215
|
e.key === "Enter" && !_(e) && e.target instanceof HTMLInputElement && e.target.classList.contains("ft-find-input") && (e.shiftKey ? this._findPrev() : this._findNext());
|
|
4223
4216
|
}}>
|
|
4224
4217
|
<div class="ft-find-row">
|
|
4225
|
-
<input class="ft-find-input" type="text" placeholder=${
|
|
4218
|
+
<input class="ft-find-input" type="text" placeholder=${k("findPlaceholder")}
|
|
4226
4219
|
.value=${t}
|
|
4227
4220
|
@input=${(e) => {
|
|
4228
4221
|
this._findState.query = e.target.value, this._findSearch();
|
|
4229
4222
|
}}>
|
|
4230
4223
|
<span class="ft-find-count">${c > 0 ? `${l}/${c}` : t ? "0 results" : ""}</span>
|
|
4231
|
-
<button @click=${() => this._findPrev()} title=${
|
|
4232
|
-
<button @click=${() => this._findNext()} title=${
|
|
4233
|
-
<label title=${
|
|
4224
|
+
<button @click=${() => this._findPrev()} title=${k("findPrevious")}>◀</button>
|
|
4225
|
+
<button @click=${() => this._findNext()} title=${k("findNext")}>▶</button>
|
|
4226
|
+
<label title=${k("matchCase")}><input type="checkbox" ?checked=${r} @change=${(e) => {
|
|
4234
4227
|
this._findState.matchCase = e.target.checked, this._findSearch();
|
|
4235
4228
|
}}> Aa</label>
|
|
4236
|
-
<label title=${
|
|
4229
|
+
<label title=${k("wholeCell")}><input type="checkbox" ?checked=${a} @change=${(e) => {
|
|
4237
4230
|
this._findState.wholeCell = e.target.checked, this._findSearch();
|
|
4238
4231
|
}}> [ ]</label>
|
|
4239
|
-
<button @click=${() => this._closeFindPanel()} title=${
|
|
4232
|
+
<button @click=${() => this._closeFindPanel()} title=${k("closeFind")}>✕</button>
|
|
4240
4233
|
</div>
|
|
4241
4234
|
${e === "replace" ? i`
|
|
4242
4235
|
<div class="ft-find-row">
|
|
4243
|
-
<input class="ft-find-replace-input" type="text" placeholder=${
|
|
4236
|
+
<input class="ft-find-replace-input" type="text" placeholder=${k("replaceWithPlaceholder")}
|
|
4244
4237
|
.value=${n}
|
|
4245
4238
|
@input=${(e) => {
|
|
4246
4239
|
this._findState.replaceWith = e.target.value;
|
|
4247
4240
|
}}>
|
|
4248
|
-
<button @click=${() => this._replaceOne()} ?disabled=${c === 0}>${
|
|
4249
|
-
<button @click=${() => this._replaceAll()} ?disabled=${c === 0}>${
|
|
4241
|
+
<button @click=${() => this._replaceOne()} ?disabled=${c === 0}>${k("replace")}</button>
|
|
4242
|
+
<button @click=${() => this._replaceAll()} ?disabled=${c === 0}>${k("replaceAll")}</button>
|
|
4250
4243
|
</div>
|
|
4251
4244
|
` : ""}
|
|
4252
4245
|
</div>
|
|
4253
4246
|
`;
|
|
4254
4247
|
}
|
|
4255
4248
|
render() {
|
|
4256
|
-
let e = this.visibleColumns, t = this.importEnabled && this._isDragOver ? i`<div class="ft-import-overlay">${
|
|
4257
|
-
if (e.length === 0) return i`${t}${n}<div class="ft-empty">${
|
|
4249
|
+
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;
|
|
4250
|
+
if (e.length === 0) return i`${t}${n}<div class="ft-empty">${k("noColumnsDefined")}</div>`;
|
|
4258
4251
|
let r = this.headerHeight, o = this._totalRowWidth, { start: s, end: c } = this.visibleColRange, l = [];
|
|
4259
4252
|
for (let t = 0; t < e.length; t++) (e[t].pinned === "left" || e[t].pinned === "right") && (t < s || t >= c) && l.push(t);
|
|
4260
4253
|
let u = 0, d = this._scrollLeft, f = this.selectable ? i`<div class="ft-checkbox-header"
|
|
@@ -4431,10 +4424,10 @@ var q = [
|
|
|
4431
4424
|
${this._renderEditor(e, t)}
|
|
4432
4425
|
</div>
|
|
4433
4426
|
`;
|
|
4434
|
-
let v = s || l, 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,
|
|
4427
|
+
let v = s || l, 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 = [
|
|
4435
4428
|
"ft-cell",
|
|
4436
4429
|
`ft-type-${t.type ?? "text"}`,
|
|
4437
|
-
`ft-align-${
|
|
4430
|
+
`ft-align-${W(t)}`,
|
|
4438
4431
|
s ? "ft-active" : "",
|
|
4439
4432
|
l ? "ft-selected" : "",
|
|
4440
4433
|
f ? "ft-pinned" : "",
|
|
@@ -4444,9 +4437,9 @@ var q = [
|
|
|
4444
4437
|
o?.continues ? "ft-merge-continued" : "",
|
|
4445
4438
|
o?.opensDown ? "ft-merge-open" : "",
|
|
4446
4439
|
t.reveal === "hover" ? "ft-reveal-hover" : ""
|
|
4447
|
-
].filter(Boolean).join(" "),
|
|
4440
|
+
].filter(Boolean).join(" "), ee = this._toDataIndex(n), w = this._comments.get(ee)?.get(t.key) ?? null, E = w !== null, D = E ? i`<div class="ft-comment-indicator" title=${w}></div>` : a;
|
|
4448
4441
|
return i`
|
|
4449
|
-
<div class=${
|
|
4442
|
+
<div class=${E ? C + " ft-has-comment" : C}
|
|
4450
4443
|
role="gridcell"
|
|
4451
4444
|
aria-colindex=${r + 1}
|
|
4452
4445
|
data-col-index=${r}
|
|
@@ -4459,8 +4452,8 @@ var q = [
|
|
|
4459
4452
|
@mouseenter=${() => this._onCellMouseEnter(n, r)}
|
|
4460
4453
|
@click=${(e) => this._onCellClickEvent(e, n, r)}
|
|
4461
4454
|
@dblclick=${() => this._onCellDblClick(n, r)}>
|
|
4462
|
-
${
|
|
4463
|
-
${
|
|
4455
|
+
${D}
|
|
4456
|
+
${T(e[t.key], e, t)}
|
|
4464
4457
|
</div>
|
|
4465
4458
|
`;
|
|
4466
4459
|
}
|
|
@@ -4469,7 +4462,7 @@ var q = [
|
|
|
4469
4462
|
let n = e[t.key], r = n == null ? "" : String(n);
|
|
4470
4463
|
if (t.type === "number") return i`
|
|
4471
4464
|
<input class="ft-editor ft-editor-number" type="text" inputmode="decimal"
|
|
4472
|
-
.value=${typeof n == "number" ?
|
|
4465
|
+
.value=${typeof n == "number" ? N(n) : r}
|
|
4473
4466
|
@keydown=${this._onEditorKeyDown}
|
|
4474
4467
|
@blur=${() => this._commitEdit()}>
|
|
4475
4468
|
`;
|
|
@@ -4478,7 +4471,7 @@ var q = [
|
|
|
4478
4471
|
return i`
|
|
4479
4472
|
<u-date-picker class="ft-editor ft-editor-${t.type}" size="sm"
|
|
4480
4473
|
mode=${e ? "datetime" : "date"} ?confirm=${e}
|
|
4481
|
-
.value=${
|
|
4474
|
+
.value=${Qe(n, e)}
|
|
4482
4475
|
@keydown=${this._onEditorKeyDown}
|
|
4483
4476
|
@change=${() => this._commitEdit()}
|
|
4484
4477
|
@blur=${() => this._commitEdit()}></u-date-picker>
|
|
@@ -4525,67 +4518,67 @@ var q = [
|
|
|
4525
4518
|
`;
|
|
4526
4519
|
}
|
|
4527
4520
|
};
|
|
4528
|
-
|
|
4521
|
+
G([s({ type: Array })], Q.prototype, "columns", void 0), G([s({
|
|
4529
4522
|
type: Array,
|
|
4530
4523
|
hasChanged: () => !0
|
|
4531
|
-
})], Q.prototype, "data", null),
|
|
4524
|
+
})], Q.prototype, "data", null), G([s({
|
|
4532
4525
|
type: Boolean,
|
|
4533
4526
|
attribute: "clear-undo-on-data-change"
|
|
4534
|
-
})], Q.prototype, "clearUndoOnDataChange", void 0),
|
|
4527
|
+
})], Q.prototype, "clearUndoOnDataChange", void 0), G([s({
|
|
4535
4528
|
type: Boolean,
|
|
4536
4529
|
attribute: "clear-selection-on-data-change"
|
|
4537
|
-
})], Q.prototype, "clearSelectionOnDataChange", void 0),
|
|
4530
|
+
})], Q.prototype, "clearSelectionOnDataChange", void 0), G([s({
|
|
4538
4531
|
type: Number,
|
|
4539
4532
|
attribute: "row-height"
|
|
4540
|
-
})], Q.prototype, "rowHeight", null),
|
|
4533
|
+
})], Q.prototype, "rowHeight", null), G([s({
|
|
4541
4534
|
type: Boolean,
|
|
4542
4535
|
attribute: "show-row-numbers"
|
|
4543
|
-
})], Q.prototype, "showRowNumbers", void 0),
|
|
4536
|
+
})], Q.prototype, "showRowNumbers", void 0), G([s({
|
|
4544
4537
|
type: String,
|
|
4545
4538
|
reflect: !0
|
|
4546
|
-
})], Q.prototype, "theme", void 0),
|
|
4539
|
+
})], Q.prototype, "theme", void 0), G([s({
|
|
4547
4540
|
type: Number,
|
|
4548
4541
|
attribute: "max-rows"
|
|
4549
|
-
})], Q.prototype, "maxRows", void 0),
|
|
4542
|
+
})], Q.prototype, "maxRows", void 0), G([s({ type: Boolean })], Q.prototype, "editable", void 0), G([s({
|
|
4550
4543
|
type: Boolean,
|
|
4551
4544
|
attribute: "show-filters"
|
|
4552
|
-
})], Q.prototype, "showFilters", void 0),
|
|
4545
|
+
})], Q.prototype, "showFilters", void 0), G([s({
|
|
4553
4546
|
type: Boolean,
|
|
4554
4547
|
attribute: "show-context-menu"
|
|
4555
|
-
})], Q.prototype, "showContextMenu", void 0),
|
|
4548
|
+
})], Q.prototype, "showContextMenu", void 0), G([s({
|
|
4556
4549
|
type: Number,
|
|
4557
4550
|
attribute: "frozen-rows"
|
|
4558
|
-
})], Q.prototype, "frozenRows", void 0),
|
|
4551
|
+
})], Q.prototype, "frozenRows", void 0), G([s({
|
|
4559
4552
|
type: String,
|
|
4560
4553
|
attribute: "empty-message"
|
|
4561
|
-
})], Q.prototype, "emptyMessage", void 0),
|
|
4554
|
+
})], Q.prototype, "emptyMessage", void 0), G([s({
|
|
4562
4555
|
type: String,
|
|
4563
4556
|
attribute: "no-matching-message"
|
|
4564
|
-
})], Q.prototype, "noMatchingMessage", void 0),
|
|
4557
|
+
})], Q.prototype, "noMatchingMessage", void 0), G([s({
|
|
4565
4558
|
type: Boolean,
|
|
4566
4559
|
reflect: !0
|
|
4567
|
-
})], Q.prototype, "loading", void 0),
|
|
4560
|
+
})], Q.prototype, "loading", void 0), G([s({
|
|
4568
4561
|
type: Boolean,
|
|
4569
4562
|
attribute: "import-enabled"
|
|
4570
|
-
})], Q.prototype, "importEnabled", void 0),
|
|
4563
|
+
})], Q.prototype, "importEnabled", void 0), G([s({ type: Boolean })], Q.prototype, "selectable", void 0), G([s({
|
|
4571
4564
|
type: String,
|
|
4572
4565
|
attribute: "selection-mode"
|
|
4573
|
-
})], Q.prototype, "selectionMode", null),
|
|
4566
|
+
})], Q.prototype, "selectionMode", null), G([s({
|
|
4574
4567
|
type: String,
|
|
4575
4568
|
attribute: "data-mode"
|
|
4576
|
-
})], Q.prototype, "dataMode", void 0),
|
|
4569
|
+
})], Q.prototype, "dataMode", void 0), G([s({
|
|
4577
4570
|
type: Object,
|
|
4578
4571
|
attribute: "footer-data"
|
|
4579
|
-
})], Q.prototype, "footerData", void 0),
|
|
4572
|
+
})], Q.prototype, "footerData", void 0), G([s({ attribute: !1 })], Q.prototype, "stylesheets", void 0), G([s({
|
|
4580
4573
|
type: Number,
|
|
4581
4574
|
attribute: "max-undo-size"
|
|
4582
|
-
})], Q.prototype, "maxUndoSize", null),
|
|
4583
|
-
function
|
|
4575
|
+
})], Q.prototype, "maxUndoSize", null), G([c()], Q.prototype, "_scrollTop", void 0), G([c()], Q.prototype, "_scrollLeft", void 0), G([c()], Q.prototype, "_viewportHeight", void 0), G([c()], Q.prototype, "_viewportWidth", void 0), G([c()], Q.prototype, "_activeCell", void 0), G([c()], Q.prototype, "_editingCell", void 0), G([c()], Q.prototype, "_sortCriteria", void 0), G([c()], Q.prototype, "_openFilterKey", void 0), G([c()], Q.prototype, "_rowSelectionVersion", void 0), G([c()], Q.prototype, "_autocompleteState", void 0), G([c()], Q.prototype, "_headerMenu", void 0), G([c()], Q.prototype, "_bodyContextMenu", void 0), G([c()], Q.prototype, "_commentPopup", void 0), G([c()], Q.prototype, "_isDragOver", void 0), Q = G([o("flex-table")], Q);
|
|
4576
|
+
function Qe(e, t) {
|
|
4584
4577
|
if (t) {
|
|
4585
|
-
let t =
|
|
4578
|
+
let t = fe(e);
|
|
4586
4579
|
return /^\d{4}-\d{2}-\d{2} \d{2}:\d{2}$/.test(t) ? t.replace(" ", "T") : void 0;
|
|
4587
4580
|
}
|
|
4588
|
-
let n =
|
|
4581
|
+
let n = de(e);
|
|
4589
4582
|
return /^\d{4}-\d{2}-\d{2}$/.test(n) ? n : void 0;
|
|
4590
4583
|
}
|
|
4591
4584
|
function $(e) {
|
|
@@ -4596,4 +4589,4 @@ function $(e) {
|
|
|
4596
4589
|
}
|
|
4597
4590
|
}
|
|
4598
4591
|
//#endregion
|
|
4599
|
-
export {
|
|
4592
|
+
export { A as a, j as i, W as n, O as o, B as r, T as s, Q as t };
|