@iyulab/flex-table 0.51.0 → 0.53.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 +31 -0
- package/README.md +45 -2
- package/dist/{flex-table-CEmUq0Rp.js → flex-table-DUAMhXCS.js} +481 -625
- package/dist/flex-table.d.ts +4 -0
- package/dist/flex-table.js +3 -2
- package/dist/locale-B1SiVDS1.js +147 -0
- package/dist/odata/controller.d.ts +29 -0
- package/dist/odata/index.d.ts +3 -0
- package/dist/odata/index.js +18 -2
- package/dist/odata/source.d.ts +79 -0
- package/dist/odata/types.d.ts +7 -57
- package/dist/odata/use-odata-source.d.ts +5 -1
- package/dist/react.js +34 -145
- package/dist/source-CwbD-6ea.js +247 -0
- package/package.json +2 -2
- package/skills/iyulab-flex-table/SKILL.md +1 -2
- package/skills/iyulab-flex-table/references/react.md +25 -5
- package/dist/query-Dw4iO0ir.js +0 -37
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { n as e
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { n as e } from "./locale-B1SiVDS1.js";
|
|
2
|
+
import { n as t, t as n } from "./sorting-CjfjRxwL.js";
|
|
3
|
+
import { LitElement as r, css as i, html as a, nothing as o } from "lit";
|
|
4
|
+
import { customElement as s, property as c, state as l } from "lit/decorators.js";
|
|
5
|
+
import { Locale as u } from "@iyulab/components/dist/utilities/Locale.js";
|
|
6
|
+
import { formatDate as d, formatNumber as f, parseDate as p, parseDateTime as m, parseNumber as h } from "@iyulab/components/dist/utilities/format.js";
|
|
7
|
+
import { decodeTsv as g, encodeTsv as _ } from "@iyulab/components/dist/utilities/tsv.js";
|
|
7
8
|
import "@iyulab/components/dist/components/date-picker/UDatePicker.js";
|
|
8
|
-
import { isImeComposing as
|
|
9
|
-
import { copyFromKey as
|
|
9
|
+
import { isImeComposing as v } from "@iyulab/components/dist/utilities/keyboard.js";
|
|
10
|
+
import { copyFromKey as y, isTextEntry as b, pasteFromKey as x } from "@iyulab/components/dist/utilities/clipboard.js";
|
|
10
11
|
//#region src/styles/flex-table.styles.ts
|
|
11
|
-
var
|
|
12
|
+
var S = i`
|
|
12
13
|
/* --- Theme Variables (Light defaults) --- */
|
|
13
14
|
:host {
|
|
14
15
|
--ft-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
@@ -1023,26 +1024,26 @@ var x = r`
|
|
|
1023
1024
|
`;
|
|
1024
1025
|
//#endregion
|
|
1025
1026
|
//#region src/renderers/format.ts
|
|
1026
|
-
function
|
|
1027
|
-
return e == null ? "" : typeof t == "function" ? t(e) :
|
|
1027
|
+
function C(e, t) {
|
|
1028
|
+
return e == null ? "" : typeof t == "function" ? t(e) : w(t) ? E(e, t) : T(e, t);
|
|
1028
1029
|
}
|
|
1029
|
-
function
|
|
1030
|
+
function w(e) {
|
|
1030
1031
|
return /[yMdHhms]/.test(e);
|
|
1031
1032
|
}
|
|
1032
|
-
function
|
|
1033
|
+
function T(e, t) {
|
|
1033
1034
|
let n = typeof e == "number" ? e : Number(e);
|
|
1034
1035
|
if (isNaN(n)) return String(e);
|
|
1035
|
-
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,
|
|
1036
|
+
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 = {
|
|
1036
1037
|
minimumFractionDigits: c,
|
|
1037
1038
|
maximumFractionDigits: c,
|
|
1038
1039
|
useGrouping: o.includes(",")
|
|
1039
1040
|
}, d;
|
|
1040
|
-
return r ? d = new Intl.NumberFormat(
|
|
1041
|
-
...
|
|
1041
|
+
return r ? d = new Intl.NumberFormat(u.get(), {
|
|
1042
|
+
...l,
|
|
1042
1043
|
style: "percent"
|
|
1043
|
-
}).format(n) : (d = new Intl.NumberFormat(
|
|
1044
|
+
}).format(n) : (d = new Intl.NumberFormat(u.get(), l).format(n), a && (d = a + d)), d + "";
|
|
1044
1045
|
}
|
|
1045
|
-
function
|
|
1046
|
+
function E(e, t) {
|
|
1046
1047
|
let n;
|
|
1047
1048
|
if (e instanceof Date) n = e;
|
|
1048
1049
|
else if (typeof e == "string" || typeof e == "number") n = new Date(e);
|
|
@@ -1053,21 +1054,21 @@ function w(e, t) {
|
|
|
1053
1054
|
}
|
|
1054
1055
|
//#endregion
|
|
1055
1056
|
//#region src/renderers/cell-renderer.ts
|
|
1056
|
-
function
|
|
1057
|
-
return n.render ? n.render(e, t, n) : n.format ? typeof n.format == "function" ? n.format(e, t, n) :
|
|
1057
|
+
function D(e, t, n) {
|
|
1058
|
+
return n.render ? n.render(e, t, n) : n.format ? typeof n.format == "function" ? n.format(e, t, n) : C(e, n.format) : O(e, n);
|
|
1058
1059
|
}
|
|
1059
|
-
function
|
|
1060
|
+
function O(e, t) {
|
|
1060
1061
|
if (e == null) return "";
|
|
1061
1062
|
switch (t.type) {
|
|
1062
1063
|
case "number": return ne(e);
|
|
1063
|
-
case "boolean": return
|
|
1064
|
+
case "boolean": return a`<span class="ft-bool">${e ? "✔" : ""}</span>`;
|
|
1064
1065
|
case "date": return re(e);
|
|
1065
1066
|
case "datetime": return ie(e);
|
|
1066
|
-
case "select": return
|
|
1067
|
+
case "select": return ee(e, t);
|
|
1067
1068
|
default: return String(e);
|
|
1068
1069
|
}
|
|
1069
1070
|
}
|
|
1070
|
-
function
|
|
1071
|
+
function ee(e, t) {
|
|
1071
1072
|
if (!t.options || t.options.length === 0 || typeof t.options[0] == "string") return e == null ? "" : String(e);
|
|
1072
1073
|
let n = t.options.find((t) => t.value === e);
|
|
1073
1074
|
return n ? n.label : e == null ? "" : String(e);
|
|
@@ -1081,160 +1082,15 @@ var te = {
|
|
|
1081
1082
|
second: "numeric"
|
|
1082
1083
|
};
|
|
1083
1084
|
function ne(e) {
|
|
1084
|
-
return typeof e == "number" ? Number.isInteger(e) ?
|
|
1085
|
+
return typeof e == "number" ? Number.isInteger(e) ? f(e) : f(e, { minimumFractionDigits: 1 }) : String(e);
|
|
1085
1086
|
}
|
|
1086
1087
|
function re(e) {
|
|
1087
|
-
return e instanceof Date || typeof e == "string" ?
|
|
1088
|
+
return e instanceof Date || typeof e == "string" ? d(e) : String(e);
|
|
1088
1089
|
}
|
|
1089
1090
|
function ie(e) {
|
|
1090
|
-
return e instanceof Date || typeof e == "string" ?
|
|
1091
|
+
return e instanceof Date || typeof e == "string" ? d(e, te) : String(e);
|
|
1091
1092
|
}
|
|
1092
1093
|
//#endregion
|
|
1093
|
-
//#region src/locale.ts
|
|
1094
|
-
var O = l.namespace("flex-table");
|
|
1095
|
-
O.register("en", {
|
|
1096
|
-
showHiddenColumns: "Show hidden column(s)",
|
|
1097
|
-
columnMenu: "Column menu",
|
|
1098
|
-
cellActions: "Cell actions",
|
|
1099
|
-
noColumnsDefined: "No columns defined",
|
|
1100
|
-
addCommentPlaceholder: "Add a comment… (Ctrl+Enter to save)",
|
|
1101
|
-
cancel: "Cancel",
|
|
1102
|
-
save: "Save",
|
|
1103
|
-
clear: "Clear",
|
|
1104
|
-
blankCells: "Blank cells",
|
|
1105
|
-
emptyOnly: "Empty only",
|
|
1106
|
-
nonEmptyOnly: "Non-empty only",
|
|
1107
|
-
blankAll: "— All —",
|
|
1108
|
-
all: "All",
|
|
1109
|
-
contains: "Contains",
|
|
1110
|
-
startsWith: "Starts with",
|
|
1111
|
-
endsWith: "Ends with",
|
|
1112
|
-
wildcard: "Wildcard",
|
|
1113
|
-
searchPlaceholder: "Search...",
|
|
1114
|
-
valuePlaceholder: "Value",
|
|
1115
|
-
fromPlaceholder: "From",
|
|
1116
|
-
toPlaceholder: "To",
|
|
1117
|
-
findPlaceholder: "Find...",
|
|
1118
|
-
findPrevious: "Previous match",
|
|
1119
|
-
findNext: "Next match",
|
|
1120
|
-
matchCase: "Match case",
|
|
1121
|
-
wholeCell: "Whole cell",
|
|
1122
|
-
closeFind: "Close find",
|
|
1123
|
-
findNoResults: "No results",
|
|
1124
|
-
replaceWithPlaceholder: "Replace with...",
|
|
1125
|
-
replace: "Replace",
|
|
1126
|
-
replaceAll: "Replace all",
|
|
1127
|
-
findInput: "Find",
|
|
1128
|
-
replaceInput: "Replace with",
|
|
1129
|
-
filterFor: "Filter {header}",
|
|
1130
|
-
filterMatchMode: "Match",
|
|
1131
|
-
filterText: "Filter text",
|
|
1132
|
-
conditionOperator: "Condition {n}",
|
|
1133
|
-
conditionValue: "Condition {n} value",
|
|
1134
|
-
conditionJoin: "Combine conditions",
|
|
1135
|
-
sortAscending: "Sort ascending",
|
|
1136
|
-
sortDescending: "Sort descending",
|
|
1137
|
-
filter: "Filter…",
|
|
1138
|
-
clearFilter: "Clear filter",
|
|
1139
|
-
hideColumn: "Hide column",
|
|
1140
|
-
showColumn: "Show: {header}",
|
|
1141
|
-
autoFitWidth: "Auto-fit width",
|
|
1142
|
-
wider: "Wider",
|
|
1143
|
-
narrower: "Narrower",
|
|
1144
|
-
columnMenuFor: "Column menu: {header}",
|
|
1145
|
-
columnMenuRegion: "{header} column",
|
|
1146
|
-
copy: "Copy",
|
|
1147
|
-
insertRowAbove: "Insert row above",
|
|
1148
|
-
insertRowBelow: "Insert row below",
|
|
1149
|
-
deleteRow: "Delete row",
|
|
1150
|
-
selectRow: "Select row",
|
|
1151
|
-
selectAllRows: "Select all rows",
|
|
1152
|
-
filterByThisValue: "Filter by this value",
|
|
1153
|
-
addComment: "Add Comment",
|
|
1154
|
-
editComment: "Edit Comment",
|
|
1155
|
-
deleteComment: "Delete Comment",
|
|
1156
|
-
booleanTrue: "True",
|
|
1157
|
-
booleanFalse: "False",
|
|
1158
|
-
dropFileToImport: "Drop file to import (.xlsx / .csv)",
|
|
1159
|
-
notANumber: "Enter a number",
|
|
1160
|
-
notADate: "Enter a date as YYYY-MM-DD",
|
|
1161
|
-
notADateTime: "Enter a date and time as YYYY-MM-DD HH:mm",
|
|
1162
|
-
notInList: "Value must be from the existing list",
|
|
1163
|
-
requestFailed: "Request failed ({status})",
|
|
1164
|
-
networkFailed: "Could not reach the server."
|
|
1165
|
-
}), O.register("ko", {
|
|
1166
|
-
showHiddenColumns: "숨긴 열 보기",
|
|
1167
|
-
columnMenu: "열 메뉴",
|
|
1168
|
-
cellActions: "셀 작업",
|
|
1169
|
-
noColumnsDefined: "정의된 열이 없습니다",
|
|
1170
|
-
addCommentPlaceholder: "메모 입력… (Ctrl+Enter 로 저장)",
|
|
1171
|
-
cancel: "취소",
|
|
1172
|
-
save: "저장",
|
|
1173
|
-
clear: "지우기",
|
|
1174
|
-
blankCells: "빈 셀",
|
|
1175
|
-
emptyOnly: "빈 값만",
|
|
1176
|
-
nonEmptyOnly: "빈 값 제외",
|
|
1177
|
-
blankAll: "— 전체 —",
|
|
1178
|
-
all: "전체",
|
|
1179
|
-
contains: "포함",
|
|
1180
|
-
startsWith: "시작 문자",
|
|
1181
|
-
endsWith: "끝 문자",
|
|
1182
|
-
wildcard: "와일드카드",
|
|
1183
|
-
searchPlaceholder: "검색...",
|
|
1184
|
-
valuePlaceholder: "값",
|
|
1185
|
-
fromPlaceholder: "시작",
|
|
1186
|
-
toPlaceholder: "끝",
|
|
1187
|
-
findPlaceholder: "찾기...",
|
|
1188
|
-
findPrevious: "이전 일치",
|
|
1189
|
-
findNext: "다음 일치",
|
|
1190
|
-
matchCase: "대/소문자 구분",
|
|
1191
|
-
wholeCell: "셀 전체 일치",
|
|
1192
|
-
closeFind: "찾기 닫기",
|
|
1193
|
-
findNoResults: "결과 없음",
|
|
1194
|
-
replaceWithPlaceholder: "바꿀 내용...",
|
|
1195
|
-
replace: "바꾸기",
|
|
1196
|
-
replaceAll: "모두 바꾸기",
|
|
1197
|
-
findInput: "찾을 내용",
|
|
1198
|
-
replaceInput: "바꿀 내용",
|
|
1199
|
-
filterFor: "{header} 필터",
|
|
1200
|
-
filterMatchMode: "일치 방식",
|
|
1201
|
-
filterText: "필터 텍스트",
|
|
1202
|
-
conditionOperator: "조건 {n}",
|
|
1203
|
-
conditionValue: "조건 {n} 값",
|
|
1204
|
-
conditionJoin: "조건 결합",
|
|
1205
|
-
sortAscending: "오름차순 정렬",
|
|
1206
|
-
sortDescending: "내림차순 정렬",
|
|
1207
|
-
filter: "필터…",
|
|
1208
|
-
clearFilter: "필터 지우기",
|
|
1209
|
-
hideColumn: "열 숨기기",
|
|
1210
|
-
showColumn: "{header} 보기",
|
|
1211
|
-
autoFitWidth: "너비 자동 맞춤",
|
|
1212
|
-
wider: "넓게",
|
|
1213
|
-
narrower: "좁게",
|
|
1214
|
-
columnMenuFor: "{header} 열 메뉴",
|
|
1215
|
-
columnMenuRegion: "{header} 열",
|
|
1216
|
-
copy: "복사",
|
|
1217
|
-
insertRowAbove: "위에 행 삽입",
|
|
1218
|
-
insertRowBelow: "아래에 행 삽입",
|
|
1219
|
-
deleteRow: "행 삭제",
|
|
1220
|
-
selectRow: "행 선택",
|
|
1221
|
-
selectAllRows: "모든 행 선택",
|
|
1222
|
-
filterByThisValue: "이 값으로 필터",
|
|
1223
|
-
addComment: "메모 추가",
|
|
1224
|
-
editComment: "메모 편집",
|
|
1225
|
-
deleteComment: "메모 삭제",
|
|
1226
|
-
booleanTrue: "참",
|
|
1227
|
-
booleanFalse: "거짓",
|
|
1228
|
-
dropFileToImport: "가져올 파일을 놓으세요 (.xlsx / .csv)",
|
|
1229
|
-
notANumber: "숫자를 입력하세요",
|
|
1230
|
-
notADate: "날짜를 YYYY-MM-DD 로 입력하세요",
|
|
1231
|
-
notADateTime: "날짜와 시간을 YYYY-MM-DD HH:mm 으로 입력하세요",
|
|
1232
|
-
notInList: "목록에 있는 값이어야 합니다",
|
|
1233
|
-
requestFailed: "요청이 실패했습니다 ({status})",
|
|
1234
|
-
networkFailed: "서버에 연결하지 못했습니다."
|
|
1235
|
-
});
|
|
1236
|
-
var k = (e, t) => O.text(e, t);
|
|
1237
|
-
//#endregion
|
|
1238
1094
|
//#region src/core/selection.ts
|
|
1239
1095
|
function ae(e) {
|
|
1240
1096
|
return {
|
|
@@ -1363,7 +1219,7 @@ var oe = class {
|
|
|
1363
1219
|
let e = this.current;
|
|
1364
1220
|
return this.current = null, e;
|
|
1365
1221
|
}
|
|
1366
|
-
},
|
|
1222
|
+
}, k = class {
|
|
1367
1223
|
constructor() {
|
|
1368
1224
|
this._selected = /* @__PURE__ */ new Set(), this._mode = "multi", this._rowCount = 0;
|
|
1369
1225
|
}
|
|
@@ -1443,7 +1299,7 @@ function ce(e, t, n) {
|
|
|
1443
1299
|
}
|
|
1444
1300
|
//#endregion
|
|
1445
1301
|
//#region src/core/undo.ts
|
|
1446
|
-
var le = 100,
|
|
1302
|
+
var le = 100, A = class {
|
|
1447
1303
|
constructor() {
|
|
1448
1304
|
this._undoStack = [], this._redoStack = [], this._maxSize = le;
|
|
1449
1305
|
}
|
|
@@ -1492,27 +1348,27 @@ function ue(e, t, n) {
|
|
|
1492
1348
|
}
|
|
1493
1349
|
r.push(o);
|
|
1494
1350
|
}
|
|
1495
|
-
return
|
|
1351
|
+
return _(r);
|
|
1496
1352
|
}
|
|
1497
|
-
function
|
|
1353
|
+
function j(e, t) {
|
|
1498
1354
|
if (e === "") return null;
|
|
1499
1355
|
switch (t.type) {
|
|
1500
1356
|
case "number": {
|
|
1501
|
-
let t =
|
|
1357
|
+
let t = h(e);
|
|
1502
1358
|
if (t !== null) return t;
|
|
1503
1359
|
let n = Number(e.trim());
|
|
1504
1360
|
return e.trim() !== "" && Number.isFinite(n) ? n : e;
|
|
1505
1361
|
}
|
|
1506
1362
|
case "boolean": return e.toLowerCase() === "true" || e === "1";
|
|
1507
|
-
case "date": return
|
|
1508
|
-
case "datetime": return
|
|
1363
|
+
case "date": return p(e) ?? e;
|
|
1364
|
+
case "datetime": return m(e) ?? e;
|
|
1509
1365
|
default: return e;
|
|
1510
1366
|
}
|
|
1511
1367
|
}
|
|
1512
|
-
function
|
|
1368
|
+
function M(e) {
|
|
1513
1369
|
let t = String(e);
|
|
1514
1370
|
if (!Number.isFinite(e) || t.includes("e")) return t;
|
|
1515
|
-
let n = new Intl.NumberFormat(
|
|
1371
|
+
let n = new Intl.NumberFormat(u.get()).formatToParts(1.5).find((e) => e.type === "decimal")?.value;
|
|
1516
1372
|
return n && n !== "." ? t.replace(".", n) : t;
|
|
1517
1373
|
}
|
|
1518
1374
|
function de(e) {
|
|
@@ -1546,9 +1402,9 @@ function me(e) {
|
|
|
1546
1402
|
for (let n = 0; n < e.length; n++) t = pe[(t ^ e[n]) & 255] ^ t >>> 8;
|
|
1547
1403
|
return (t ^ 4294967295) >>> 0;
|
|
1548
1404
|
}
|
|
1549
|
-
var
|
|
1405
|
+
var N = new TextEncoder();
|
|
1550
1406
|
function he(e) {
|
|
1551
|
-
return
|
|
1407
|
+
return P(e.map((e) => ({
|
|
1552
1408
|
...e,
|
|
1553
1409
|
body: e.data,
|
|
1554
1410
|
method: 0
|
|
@@ -1568,7 +1424,7 @@ async function ge(e) {
|
|
|
1568
1424
|
method: 0
|
|
1569
1425
|
});
|
|
1570
1426
|
}
|
|
1571
|
-
return
|
|
1427
|
+
return P(t);
|
|
1572
1428
|
}
|
|
1573
1429
|
async function _e(e) {
|
|
1574
1430
|
let t = new CompressionStream("deflate-raw"), n = t.writable.getWriter(), r = t.readable.getReader();
|
|
@@ -1579,29 +1435,29 @@ async function _e(e) {
|
|
|
1579
1435
|
if (e) break;
|
|
1580
1436
|
i.push(t);
|
|
1581
1437
|
}
|
|
1582
|
-
return
|
|
1438
|
+
return F(i);
|
|
1583
1439
|
}
|
|
1584
|
-
function
|
|
1440
|
+
function P(e) {
|
|
1585
1441
|
let t = [], n = [], r = 0;
|
|
1586
1442
|
for (let i of e) {
|
|
1587
|
-
let e =
|
|
1443
|
+
let e = N.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);
|
|
1588
1444
|
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);
|
|
1589
1445
|
let d = new ArrayBuffer(46 + e.length), f = new DataView(d);
|
|
1590
1446
|
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;
|
|
1591
1447
|
}
|
|
1592
|
-
let i =
|
|
1593
|
-
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),
|
|
1448
|
+
let i = F(n), a = /* @__PURE__ */ new ArrayBuffer(22), o = new DataView(a);
|
|
1449
|
+
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), F([
|
|
1594
1450
|
...t,
|
|
1595
1451
|
i,
|
|
1596
1452
|
new Uint8Array(a)
|
|
1597
1453
|
]);
|
|
1598
1454
|
}
|
|
1599
|
-
function
|
|
1455
|
+
function F(e) {
|
|
1600
1456
|
let t = e.reduce((e, t) => e + t.length, 0), n = new Uint8Array(t), r = 0;
|
|
1601
1457
|
for (let t of e) n.set(t, r), r += t.length;
|
|
1602
1458
|
return n;
|
|
1603
1459
|
}
|
|
1604
|
-
function
|
|
1460
|
+
function I(e) {
|
|
1605
1461
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
1606
1462
|
}
|
|
1607
1463
|
function ve(e) {
|
|
@@ -1609,7 +1465,7 @@ function ve(e) {
|
|
|
1609
1465
|
for (e++; e > 0;) t = String.fromCharCode(64 + (e % 26 || 26)) + t, e = Math.floor((e - 1) / 26);
|
|
1610
1466
|
return t;
|
|
1611
1467
|
}
|
|
1612
|
-
function
|
|
1468
|
+
function L(e, t) {
|
|
1613
1469
|
return ve(t) + (e + 1);
|
|
1614
1470
|
}
|
|
1615
1471
|
function ye(e) {
|
|
@@ -1618,13 +1474,13 @@ function ye(e) {
|
|
|
1618
1474
|
}
|
|
1619
1475
|
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>";
|
|
1620
1476
|
function Te(e, t) {
|
|
1621
|
-
let n = [], r = t.map((e, t) => `<c r="${
|
|
1477
|
+
let n = [], r = t.map((e, t) => `<c r="${L(0, t)}" t="str" s="2"><v>${I(e.label)}</v></c>`);
|
|
1622
1478
|
return n.push(`<row r="1">${r.join("")}</row>`), e.forEach((e, r) => {
|
|
1623
1479
|
let i = t.map((t, n) => {
|
|
1624
|
-
let i =
|
|
1480
|
+
let i = L(r + 1, n), a = e[t.key];
|
|
1625
1481
|
if (a == null) return `<c r="${i}" t="str"><v></v></c>`;
|
|
1626
1482
|
let o = t.type ?? "text";
|
|
1627
|
-
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>${
|
|
1483
|
+
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>${I(String(a))}</v></c>`;
|
|
1628
1484
|
});
|
|
1629
1485
|
n.push(`<row r="${r + 2}">${i.join("")}</row>`);
|
|
1630
1486
|
}), `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
@@ -1633,64 +1489,64 @@ function Te(e, t) {
|
|
|
1633
1489
|
</worksheet>`;
|
|
1634
1490
|
}
|
|
1635
1491
|
function Ee(e, t) {
|
|
1636
|
-
return he(
|
|
1492
|
+
return he(R(e, t));
|
|
1637
1493
|
}
|
|
1638
1494
|
function De(e, t) {
|
|
1639
|
-
return ge(
|
|
1495
|
+
return ge(R(e, t));
|
|
1640
1496
|
}
|
|
1641
|
-
function
|
|
1497
|
+
function R(e, t) {
|
|
1642
1498
|
let n = Te(e, t);
|
|
1643
1499
|
return [
|
|
1644
1500
|
{
|
|
1645
1501
|
name: "[Content_Types].xml",
|
|
1646
|
-
data:
|
|
1502
|
+
data: N.encode(be)
|
|
1647
1503
|
},
|
|
1648
1504
|
{
|
|
1649
1505
|
name: "_rels/.rels",
|
|
1650
|
-
data:
|
|
1506
|
+
data: N.encode(xe)
|
|
1651
1507
|
},
|
|
1652
1508
|
{
|
|
1653
1509
|
name: "xl/workbook.xml",
|
|
1654
|
-
data:
|
|
1510
|
+
data: N.encode(Se)
|
|
1655
1511
|
},
|
|
1656
1512
|
{
|
|
1657
1513
|
name: "xl/_rels/workbook.xml.rels",
|
|
1658
|
-
data:
|
|
1514
|
+
data: N.encode(Ce)
|
|
1659
1515
|
},
|
|
1660
1516
|
{
|
|
1661
1517
|
name: "xl/worksheets/sheet1.xml",
|
|
1662
|
-
data:
|
|
1518
|
+
data: N.encode(n)
|
|
1663
1519
|
},
|
|
1664
1520
|
{
|
|
1665
1521
|
name: "xl/styles.xml",
|
|
1666
|
-
data:
|
|
1522
|
+
data: N.encode(we)
|
|
1667
1523
|
}
|
|
1668
1524
|
];
|
|
1669
1525
|
}
|
|
1670
1526
|
//#endregion
|
|
1671
1527
|
//#region src/export/export.ts
|
|
1672
|
-
function
|
|
1528
|
+
function z(e, t, n) {
|
|
1673
1529
|
switch (n) {
|
|
1674
1530
|
case "csv": return V(e, t, ",");
|
|
1675
1531
|
case "tsv": return V(e, t, " ");
|
|
1676
|
-
case "json": return
|
|
1532
|
+
case "json": return ke(e, t);
|
|
1677
1533
|
case "xlsx": return Ee(e, t);
|
|
1678
1534
|
}
|
|
1679
1535
|
}
|
|
1680
1536
|
async function Oe(e, t, n) {
|
|
1681
|
-
let r = n === "xlsx" ? await De(e, t) :
|
|
1682
|
-
return new Blob([r], { type:
|
|
1537
|
+
let r = n === "xlsx" ? await De(e, t) : z(e, t, n);
|
|
1538
|
+
return new Blob([r], { type: Ne(n) });
|
|
1683
1539
|
}
|
|
1684
|
-
function
|
|
1540
|
+
function B(e, t) {
|
|
1685
1541
|
return e == null ? "" : (t.type === "date" || t.type === "datetime") && e instanceof Date ? e.toISOString() : String(e);
|
|
1686
1542
|
}
|
|
1687
1543
|
function V(e, t, n) {
|
|
1688
|
-
return [t.map((e) => H(e.label, n)).join(n), ...e.map((e) => t.map((t) => H(
|
|
1544
|
+
return [t.map((e) => H(e.label, n)).join(n), ...e.map((e) => t.map((t) => H(B(e[t.key], t), n)).join(n))].join("\n");
|
|
1689
1545
|
}
|
|
1690
1546
|
function H(e, t) {
|
|
1691
1547
|
return e.includes(t) || e.includes("\"") || e.includes("\n") || e.includes("\r") ? "\"" + e.replace(/"/g, "\"\"") + "\"" : e;
|
|
1692
1548
|
}
|
|
1693
|
-
function
|
|
1549
|
+
function ke(e, t) {
|
|
1694
1550
|
let n = e.map((e) => {
|
|
1695
1551
|
let n = {};
|
|
1696
1552
|
for (let r of t) {
|
|
@@ -1701,35 +1557,35 @@ function Ae(e, t) {
|
|
|
1701
1557
|
});
|
|
1702
1558
|
return JSON.stringify(n, null, 2);
|
|
1703
1559
|
}
|
|
1704
|
-
function
|
|
1560
|
+
function Ae(e, t) {
|
|
1705
1561
|
let n = URL.createObjectURL(e), r = document.createElement("a");
|
|
1706
1562
|
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);
|
|
1707
1563
|
}
|
|
1708
|
-
var
|
|
1564
|
+
var je = {
|
|
1709
1565
|
csv: "text/csv;charset=utf-8",
|
|
1710
1566
|
tsv: "text/tab-separated-values;charset=utf-8",
|
|
1711
1567
|
json: "application/json;charset=utf-8",
|
|
1712
1568
|
xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
|
1713
|
-
},
|
|
1569
|
+
}, Me = {
|
|
1714
1570
|
csv: ".csv",
|
|
1715
1571
|
tsv: ".tsv",
|
|
1716
1572
|
json: ".json",
|
|
1717
1573
|
xlsx: ".xlsx"
|
|
1718
1574
|
};
|
|
1575
|
+
function Ne(e) {
|
|
1576
|
+
return je[e];
|
|
1577
|
+
}
|
|
1719
1578
|
function Pe(e) {
|
|
1720
1579
|
return Me[e];
|
|
1721
1580
|
}
|
|
1722
|
-
function Fe(e) {
|
|
1723
|
-
return Ne[e];
|
|
1724
|
-
}
|
|
1725
1581
|
//#endregion
|
|
1726
1582
|
//#region src/export/xlsx-reader.ts
|
|
1727
|
-
function
|
|
1583
|
+
function Fe(e) {
|
|
1728
1584
|
for (let t = e.byteLength - 22; t >= 0; t--) if (e.getUint32(t, !0) === 101010256) return t;
|
|
1729
1585
|
throw Error("XLSX: End of central directory not found — not a valid ZIP file");
|
|
1730
1586
|
}
|
|
1731
|
-
function
|
|
1732
|
-
let t =
|
|
1587
|
+
function Ie(e) {
|
|
1588
|
+
let t = Fe(e), n = e.getUint32(t + 16, !0), r = e.getUint32(t + 12, !0), i = new TextDecoder("utf-8"), a = [], o = n, s = n + r;
|
|
1733
1589
|
for (; o < s && e.getUint32(o, !0) === 33639248;) {
|
|
1734
1590
|
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));
|
|
1735
1591
|
a.push({
|
|
@@ -1742,7 +1598,7 @@ function Le(e) {
|
|
|
1742
1598
|
}
|
|
1743
1599
|
return a;
|
|
1744
1600
|
}
|
|
1745
|
-
async function
|
|
1601
|
+
async function Le(e) {
|
|
1746
1602
|
let t = new DecompressionStream("deflate-raw"), n = t.writable.getWriter(), r = t.readable.getReader();
|
|
1747
1603
|
n.write(e), n.close();
|
|
1748
1604
|
let i = [];
|
|
@@ -1755,28 +1611,28 @@ async function Re(e) {
|
|
|
1755
1611
|
for (let e of i) o.set(e, s), s += e.length;
|
|
1756
1612
|
return o;
|
|
1757
1613
|
}
|
|
1758
|
-
async function
|
|
1614
|
+
async function Re(e, t) {
|
|
1759
1615
|
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);
|
|
1760
1616
|
if (t.compressionMethod === 0) return o.slice();
|
|
1761
|
-
if (t.compressionMethod === 8) return
|
|
1617
|
+
if (t.compressionMethod === 8) return Le(o);
|
|
1762
1618
|
throw Error(`XLSX: Unsupported compression method ${t.compressionMethod}`);
|
|
1763
1619
|
}
|
|
1764
|
-
async function
|
|
1765
|
-
let t = new DataView(e), n =
|
|
1766
|
-
for (let e of n) e.compressedSize === 0 && e.name.endsWith("/") || r.set(e.name, await
|
|
1620
|
+
async function ze(e) {
|
|
1621
|
+
let t = new DataView(e), n = Ie(t), r = /* @__PURE__ */ new Map();
|
|
1622
|
+
for (let e of n) e.compressedSize === 0 && e.name.endsWith("/") || r.set(e.name, await Re(t, e));
|
|
1767
1623
|
return r;
|
|
1768
1624
|
}
|
|
1769
|
-
var
|
|
1625
|
+
var Be = new TextDecoder("utf-8");
|
|
1770
1626
|
function U(e) {
|
|
1771
|
-
let t =
|
|
1627
|
+
let t = Be.decode(e);
|
|
1772
1628
|
return new DOMParser().parseFromString(t, "application/xml");
|
|
1773
1629
|
}
|
|
1774
|
-
function
|
|
1630
|
+
function Ve(e) {
|
|
1775
1631
|
if (!e) return [];
|
|
1776
1632
|
let t = U(e);
|
|
1777
1633
|
return Array.from(t.querySelectorAll("si")).map((e) => Array.from(e.querySelectorAll("t")).map((e) => e.textContent ?? "").join(""));
|
|
1778
1634
|
}
|
|
1779
|
-
var
|
|
1635
|
+
var He = /* @__PURE__ */ new Set([
|
|
1780
1636
|
14,
|
|
1781
1637
|
15,
|
|
1782
1638
|
16,
|
|
@@ -1796,29 +1652,29 @@ var Ue = /* @__PURE__ */ new Set([
|
|
|
1796
1652
|
57,
|
|
1797
1653
|
58
|
|
1798
1654
|
]);
|
|
1799
|
-
function
|
|
1655
|
+
function Ue(e) {
|
|
1800
1656
|
let t = e.replace(/"[^"]*"/g, "").replace(/\\./g, "").replace(/\[[^\]]*\]/g, "").split(";")[0];
|
|
1801
1657
|
return /[dy]/i.test(t);
|
|
1802
1658
|
}
|
|
1803
|
-
function
|
|
1659
|
+
function We(e) {
|
|
1804
1660
|
let t = /* @__PURE__ */ new Set();
|
|
1805
1661
|
if (!e) return t;
|
|
1806
1662
|
let n = U(e), r = /* @__PURE__ */ new Map();
|
|
1807
1663
|
for (let e of Array.from(n.querySelectorAll("numFmts > numFmt"))) r.set(parseInt(e.getAttribute("numFmtId") ?? "", 10), e.getAttribute("formatCode") ?? "");
|
|
1808
1664
|
return Array.from(n.querySelectorAll("cellXfs > xf")).forEach((e, n) => {
|
|
1809
1665
|
let i = parseInt(e.getAttribute("numFmtId") ?? "0", 10), a = r.get(i);
|
|
1810
|
-
(a === void 0 ?
|
|
1666
|
+
(a === void 0 ? He.has(i) : Ue(a)) && t.add(n);
|
|
1811
1667
|
}), t;
|
|
1812
1668
|
}
|
|
1813
|
-
function
|
|
1669
|
+
function Ge(e) {
|
|
1814
1670
|
if (!e) return !1;
|
|
1815
1671
|
let t = U(e).querySelector("workbookPr")?.getAttribute("date1904");
|
|
1816
1672
|
return t === "1" || t === "true";
|
|
1817
1673
|
}
|
|
1818
|
-
function
|
|
1674
|
+
function Ke(e, t) {
|
|
1819
1675
|
return new Date((t ? Date.UTC(1904, 0, 1) : Date.UTC(1899, 11, 30)) + Math.floor(e) * 864e5).toISOString().slice(0, 10);
|
|
1820
1676
|
}
|
|
1821
|
-
function
|
|
1677
|
+
function qe(e, t, n, r) {
|
|
1822
1678
|
let i = U(e).querySelectorAll("row");
|
|
1823
1679
|
if (i.length === 0) return [];
|
|
1824
1680
|
let a = 0, o = /* @__PURE__ */ new Map();
|
|
@@ -1826,7 +1682,7 @@ function Je(e, t, n, r) {
|
|
|
1826
1682
|
let i = parseInt(e.getAttribute("r") ?? "1", 10) - 1, s = /* @__PURE__ */ new Map();
|
|
1827
1683
|
o.set(i, s);
|
|
1828
1684
|
for (let i of e.querySelectorAll("c")) {
|
|
1829
|
-
let e =
|
|
1685
|
+
let e = Je(i.getAttribute("r") ?? "");
|
|
1830
1686
|
e > a && (a = e);
|
|
1831
1687
|
let o = i.getAttribute("t") ?? "", c = i.getAttribute("s") ?? "", l = i.querySelector("v")?.textContent ?? "", u = i.querySelector("is > t")?.textContent ?? null, d;
|
|
1832
1688
|
if (o === "s") d = t[parseInt(l, 10)] ?? "";
|
|
@@ -1835,7 +1691,7 @@ function Je(e, t, n, r) {
|
|
|
1835
1691
|
else if (l === "") d = "";
|
|
1836
1692
|
else {
|
|
1837
1693
|
let e = parseFloat(l);
|
|
1838
|
-
d = c !== "" && n.has(parseInt(c, 10)) && !isNaN(e) && e >= 0 ?
|
|
1694
|
+
d = c !== "" && n.has(parseInt(c, 10)) && !isNaN(e) && e >= 0 ? Ke(e, r) : l;
|
|
1839
1695
|
}
|
|
1840
1696
|
s.set(e, d);
|
|
1841
1697
|
}
|
|
@@ -1849,13 +1705,13 @@ function Je(e, t, n, r) {
|
|
|
1849
1705
|
}
|
|
1850
1706
|
return c;
|
|
1851
1707
|
}
|
|
1852
|
-
function
|
|
1708
|
+
function Je(e) {
|
|
1853
1709
|
let t = 0, n = 0;
|
|
1854
1710
|
for (; n < e.length && e[n] >= "A" && e[n] <= "Z";) t = t * 26 + (e.charCodeAt(n) - 64), n++;
|
|
1855
1711
|
return t - 1;
|
|
1856
1712
|
}
|
|
1857
|
-
async function
|
|
1858
|
-
let t = await
|
|
1713
|
+
async function Ye(e) {
|
|
1714
|
+
let t = await ze(e), n = Ve(t.get("xl/sharedStrings.xml")), r = t.get("xl/worksheets/sheet1.xml");
|
|
1859
1715
|
if (!r) {
|
|
1860
1716
|
for (let [e, n] of t) if (e.toLowerCase().includes("worksheets/sheet")) {
|
|
1861
1717
|
r = n;
|
|
@@ -1863,7 +1719,7 @@ async function Xe(e) {
|
|
|
1863
1719
|
}
|
|
1864
1720
|
}
|
|
1865
1721
|
if (!r) throw Error("XLSX: No worksheet found");
|
|
1866
|
-
let i =
|
|
1722
|
+
let i = We(t.get("xl/styles.xml")), a = Ge(t.get("xl/workbook.xml")), o = qe(r, n, i, a);
|
|
1867
1723
|
return o.length === 0 ? {
|
|
1868
1724
|
headers: [],
|
|
1869
1725
|
rows: []
|
|
@@ -1894,9 +1750,9 @@ var K = {
|
|
|
1894
1750
|
lt: "<",
|
|
1895
1751
|
gte: "≥",
|
|
1896
1752
|
lte: "≤"
|
|
1897
|
-
}, q = 120, J = 40, Y = 20, X = 32, Z = 5,
|
|
1753
|
+
}, q = 120, J = 40, Y = 20, X = 32, Z = 5, Xe = 200, Q = class extends r {
|
|
1898
1754
|
constructor(...e) {
|
|
1899
|
-
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._headerCol = null, this._focusedCellEl = null, this._editingCell = null, this._sortCriteria = [], this._selection = new oe(), this._editing = new se(), this._rowSelection = new
|
|
1755
|
+
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._headerCol = null, this._focusedCellEl = null, this._editingCell = null, this._sortCriteria = [], this._selection = new oe(), this._editing = new se(), this._rowSelection = new k(), this._undo = new A(), 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._onHostFocus = (e) => {
|
|
1900
1756
|
e.composedPath()[0] !== this || this._activeCell || this._headerCol !== null || this.visibleColumns.length !== 0 && this.matches(":focus-visible") && (this._visibleRowCount > 0 ? (this._selection.setActive(0, 0), this._syncActiveCell()) : this._headerCol = 0);
|
|
1901
1757
|
}, this._onFocusIn = (e) => {
|
|
1902
1758
|
let t = e.composedPath()[0];
|
|
@@ -1917,7 +1773,7 @@ var K = {
|
|
|
1917
1773
|
}, 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();
|
|
1918
1774
|
}
|
|
1919
1775
|
static {
|
|
1920
|
-
this.styles =
|
|
1776
|
+
this.styles = S;
|
|
1921
1777
|
}
|
|
1922
1778
|
get data() {
|
|
1923
1779
|
return this._data;
|
|
@@ -2246,7 +2102,7 @@ var K = {
|
|
|
2246
2102
|
}
|
|
2247
2103
|
exportToString(e, t) {
|
|
2248
2104
|
let n = this._exportSlice(t);
|
|
2249
|
-
return n ?
|
|
2105
|
+
return n ? z(n.rows, n.cols, e) : "";
|
|
2250
2106
|
}
|
|
2251
2107
|
async exportToBlob(e, t) {
|
|
2252
2108
|
let n = this._exportSlice(t) ?? {
|
|
@@ -2256,7 +2112,7 @@ var K = {
|
|
|
2256
2112
|
return Oe(n.rows, n.cols, e);
|
|
2257
2113
|
}
|
|
2258
2114
|
async exportToFile(e, t) {
|
|
2259
|
-
|
|
2115
|
+
Ae(await this.exportToBlob(e), t ?? `export${Pe(e)}`);
|
|
2260
2116
|
}
|
|
2261
2117
|
_exportSlice(e) {
|
|
2262
2118
|
if (e?.selectionOnly) {
|
|
@@ -2325,10 +2181,10 @@ var K = {
|
|
|
2325
2181
|
async importFromFile(e) {
|
|
2326
2182
|
let t = e.name.toLowerCase();
|
|
2327
2183
|
if (t.endsWith(".xlsx")) {
|
|
2328
|
-
let t = await
|
|
2184
|
+
let t = await Ye(await e.arrayBuffer());
|
|
2329
2185
|
this._applyImportedSheet(t);
|
|
2330
2186
|
} else if (t.endsWith(".csv") || t.endsWith(".tsv")) {
|
|
2331
|
-
let t = await e.text(), n =
|
|
2187
|
+
let t = await e.text(), n = g(t);
|
|
2332
2188
|
this._applyImportedRows(n);
|
|
2333
2189
|
} else console.warn(`flex-table importFromFile: unsupported file type "${e.name}"`);
|
|
2334
2190
|
}
|
|
@@ -2339,7 +2195,7 @@ var K = {
|
|
|
2339
2195
|
let a = t.get(e);
|
|
2340
2196
|
if (!a) return;
|
|
2341
2197
|
let o = this.columns.find((e) => e.key === a);
|
|
2342
|
-
r[a] = o ?
|
|
2198
|
+
r[a] = o ? j(n[i] ?? "", o) : n[i] ?? null;
|
|
2343
2199
|
}), r;
|
|
2344
2200
|
}), r = [...this.data];
|
|
2345
2201
|
this.data = n, this._undo.push({
|
|
@@ -2360,7 +2216,7 @@ var K = {
|
|
|
2360
2216
|
let a = n.get(t);
|
|
2361
2217
|
if (!a) return;
|
|
2362
2218
|
let o = this.columns.find((e) => e.key === a);
|
|
2363
|
-
r[a] = o ?
|
|
2219
|
+
r[a] = o ? j(e[i] ?? "", o) : e[i] ?? null;
|
|
2364
2220
|
}), r;
|
|
2365
2221
|
}), i = [...this.data];
|
|
2366
2222
|
this.data = r, this._undo.push({
|
|
@@ -2443,10 +2299,10 @@ var K = {
|
|
|
2443
2299
|
};
|
|
2444
2300
|
}
|
|
2445
2301
|
connectedCallback() {
|
|
2446
|
-
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("focus", this._onHostFocus), this.renderRoot.addEventListener("focusin", this._onFocusIn), this.renderRoot.addEventListener("focusout", this._onFocusOut), 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));
|
|
2302
|
+
super.connectedCallback(), this._unsubscribeLocale = u.subscribe(() => this.requestUpdate()), this._detachedLocaleRevision !== void 0 && this._detachedLocaleRevision !== u.revision && this.requestUpdate(), this._detachedLocaleRevision = void 0, 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("focus", this._onHostFocus), this.renderRoot.addEventListener("focusin", this._onFocusIn), this.renderRoot.addEventListener("focusout", this._onFocusOut), 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));
|
|
2447
2303
|
}
|
|
2448
2304
|
disconnectedCallback() {
|
|
2449
|
-
super.disconnectedCallback(), this.removeEventListener("scroll", this._onScroll), this.removeEventListener("keydown", this._onKeyDown), this.removeEventListener("focus", this._onHostFocus), this.renderRoot.removeEventListener("focusin", this._onFocusIn), this.renderRoot.removeEventListener("focusout", this._onFocusOut), 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);
|
|
2305
|
+
super.disconnectedCallback(), this._unsubscribeLocale?.(), this._unsubscribeLocale = void 0, this._detachedLocaleRevision = u.revision, this.removeEventListener("scroll", this._onScroll), this.removeEventListener("keydown", this._onKeyDown), this.removeEventListener("focus", this._onHostFocus), this.renderRoot.removeEventListener("focusin", this._onFocusIn), this.renderRoot.removeEventListener("focusout", this._onFocusOut), 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);
|
|
2450
2306
|
}
|
|
2451
2307
|
firstUpdated() {
|
|
2452
2308
|
this._readDensityTokens(), this._measureViewport(), this.shadowRoot && Array.isArray(this.shadowRoot.adoptedStyleSheets) && (this._baseStyleSheets = [...this.shadowRoot.adoptedStyleSheets]), this._syncStylesheets();
|
|
@@ -2518,8 +2374,8 @@ var K = {
|
|
|
2518
2374
|
}), this._filters.length === 0 && this._sortCriteria.length === 0) this._sortedIndices = Array.from({ length: this.data.length }, (e, t) => t);
|
|
2519
2375
|
else if (this._sortCriteria.length === 0) this._sortedIndices = [...this._filteredIndices];
|
|
2520
2376
|
else {
|
|
2521
|
-
let e = this._filteredIndices.map((e) => this.data[e]),
|
|
2522
|
-
this._sortedIndices =
|
|
2377
|
+
let e = this._filteredIndices.map((e) => this.data[e]), t = n(e, this._sortCriteria, this.visibleColumns);
|
|
2378
|
+
this._sortedIndices = t.map((e) => this._filteredIndices[e]);
|
|
2523
2379
|
}
|
|
2524
2380
|
}
|
|
2525
2381
|
_toDataIndex(e) {
|
|
@@ -2544,7 +2400,7 @@ var K = {
|
|
|
2544
2400
|
e !== this._viewportHeight && (this._viewportHeight = e), t !== this._viewportWidth && (this._viewportWidth = t), this._warnIfUnconstrained();
|
|
2545
2401
|
}
|
|
2546
2402
|
_warnIfUnconstrained() {
|
|
2547
|
-
this._warnedUnconstrained || process.env.NODE_ENV === "production" || this._visibleRowCount <
|
|
2403
|
+
this._warnedUnconstrained || process.env.NODE_ENV === "production" || this._visibleRowCount < Xe || 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.`));
|
|
2548
2404
|
}
|
|
2549
2405
|
_onScroll() {
|
|
2550
2406
|
this._scrollTop = this.scrollTop, this._scrollLeft = this.scrollLeft;
|
|
@@ -2682,64 +2538,64 @@ var K = {
|
|
|
2682
2538
|
}
|
|
2683
2539
|
let t = this.shadowRoot?.querySelector(".ft-editor");
|
|
2684
2540
|
if (t) {
|
|
2685
|
-
let n =
|
|
2541
|
+
let n = j(t.value, e);
|
|
2686
2542
|
this._applyEdit(n);
|
|
2687
2543
|
} else this._cancelEdit();
|
|
2688
2544
|
}
|
|
2689
|
-
_applyEdit(
|
|
2545
|
+
_applyEdit(t) {
|
|
2690
2546
|
this._autocompleteState = null;
|
|
2691
|
-
let
|
|
2692
|
-
if (this._editingCell = null, !
|
|
2693
|
-
let { row:
|
|
2694
|
-
if (
|
|
2695
|
-
let
|
|
2696
|
-
this._markCellInvalid(
|
|
2697
|
-
row:
|
|
2698
|
-
col:
|
|
2699
|
-
key:
|
|
2700
|
-
value:
|
|
2701
|
-
error:
|
|
2547
|
+
let n = this._editing.commit();
|
|
2548
|
+
if (this._editingCell = null, !n) return;
|
|
2549
|
+
let { row: r, col: i } = n.position, a = this._toDataIndex(r), o = this.visibleColumns[i], s = n.originalValue;
|
|
2550
|
+
if (o.autocomplete === "strict" && t != null && t !== "" && !this._getAutocompleteCandidates(o, "").includes(String(t))) {
|
|
2551
|
+
let n = e("notInList");
|
|
2552
|
+
this._markCellInvalid(r, i, () => e("notInList")), this._emit("validation-error", {
|
|
2553
|
+
row: a,
|
|
2554
|
+
col: i,
|
|
2555
|
+
key: o.key,
|
|
2556
|
+
value: t,
|
|
2557
|
+
error: n
|
|
2702
2558
|
});
|
|
2703
2559
|
return;
|
|
2704
2560
|
}
|
|
2705
|
-
if (
|
|
2706
|
-
let
|
|
2707
|
-
this._markCellInvalid(
|
|
2708
|
-
row:
|
|
2709
|
-
col:
|
|
2710
|
-
key:
|
|
2711
|
-
value:
|
|
2712
|
-
error:
|
|
2561
|
+
if (o.type === "number" && typeof t == "string" || o.type === "date" && typeof t == "string" && p(t) === null || o.type === "datetime" && typeof t == "string" && m(t) === null) {
|
|
2562
|
+
let n = o.type === "number" ? "notANumber" : o.type === "date" ? "notADate" : "notADateTime", s = e(n);
|
|
2563
|
+
this._markCellInvalid(r, i, () => e(n)), this._emit("validation-error", {
|
|
2564
|
+
row: a,
|
|
2565
|
+
col: i,
|
|
2566
|
+
key: o.key,
|
|
2567
|
+
value: t,
|
|
2568
|
+
error: s
|
|
2713
2569
|
});
|
|
2714
2570
|
return;
|
|
2715
2571
|
}
|
|
2716
|
-
if (
|
|
2717
|
-
let
|
|
2718
|
-
if (
|
|
2719
|
-
this._markCellInvalid(
|
|
2720
|
-
row:
|
|
2721
|
-
col:
|
|
2722
|
-
key:
|
|
2723
|
-
value:
|
|
2724
|
-
error:
|
|
2572
|
+
if (o.validator) {
|
|
2573
|
+
let e = o.validator(t, this.data[a], o);
|
|
2574
|
+
if (e) {
|
|
2575
|
+
this._markCellInvalid(r, i, e), this._emit("validation-error", {
|
|
2576
|
+
row: a,
|
|
2577
|
+
col: i,
|
|
2578
|
+
key: o.key,
|
|
2579
|
+
value: t,
|
|
2580
|
+
error: e
|
|
2725
2581
|
});
|
|
2726
2582
|
return;
|
|
2727
2583
|
}
|
|
2728
2584
|
}
|
|
2729
|
-
this.data[
|
|
2585
|
+
this.data[a][o.key] = t, this._undo.push({
|
|
2730
2586
|
label: "cell-edit",
|
|
2731
2587
|
undo: () => {
|
|
2732
|
-
this.data[
|
|
2588
|
+
this.data[a][o.key] = s, this.requestUpdate();
|
|
2733
2589
|
},
|
|
2734
2590
|
redo: () => {
|
|
2735
|
-
this.data[
|
|
2591
|
+
this.data[a][o.key] = t, this.requestUpdate();
|
|
2736
2592
|
}
|
|
2737
2593
|
}), this.requestUpdate(), this._emit("cell-edit-commit", {
|
|
2738
|
-
row:
|
|
2739
|
-
col:
|
|
2740
|
-
key:
|
|
2741
|
-
oldValue:
|
|
2742
|
-
newValue:
|
|
2594
|
+
row: a,
|
|
2595
|
+
col: i,
|
|
2596
|
+
key: o.key,
|
|
2597
|
+
oldValue: s,
|
|
2598
|
+
newValue: t
|
|
2743
2599
|
}), this._dispatchUndoStateEvent();
|
|
2744
2600
|
}
|
|
2745
2601
|
_cancelEdit() {
|
|
@@ -2751,7 +2607,7 @@ var K = {
|
|
|
2751
2607
|
});
|
|
2752
2608
|
}
|
|
2753
2609
|
_onEditorKeyDown(e) {
|
|
2754
|
-
if (
|
|
2610
|
+
if (v(e)) return;
|
|
2755
2611
|
let t = e.currentTarget;
|
|
2756
2612
|
if (!(t?.localName === "u-date-picker" && (e.composedPath().some((e) => e instanceof Element && e.part?.contains("popover")) || e.key === "Escape" && $(t)))) {
|
|
2757
2613
|
if (this._autocompleteState && this._autocompleteState.candidates.length > 0) {
|
|
@@ -2836,7 +2692,7 @@ var K = {
|
|
|
2836
2692
|
].includes(e.key) && (e.preventDefault(), this._headerCol = 0);
|
|
2837
2693
|
return;
|
|
2838
2694
|
}
|
|
2839
|
-
if ((e.key === "Enter" || e.key === "F2") && this._activeCell && !
|
|
2695
|
+
if ((e.key === "Enter" || e.key === "F2") && this._activeCell && !v(e)) {
|
|
2840
2696
|
e.preventDefault();
|
|
2841
2697
|
let n = t[this._activeCell.col];
|
|
2842
2698
|
n && this._isCellEditable(n) ? this._startEdit() : e.key === "Enter" && this._fireRowActivate(n);
|
|
@@ -2901,7 +2757,7 @@ var K = {
|
|
|
2901
2757
|
return;
|
|
2902
2758
|
case "Enter":
|
|
2903
2759
|
case " ":
|
|
2904
|
-
if (
|
|
2760
|
+
if (v(e)) return;
|
|
2905
2761
|
e.preventDefault(), r.sortable !== !1 && this._toggleSort(r, e.shiftKey);
|
|
2906
2762
|
return;
|
|
2907
2763
|
default: return;
|
|
@@ -2940,15 +2796,15 @@ var K = {
|
|
|
2940
2796
|
case "y": return e.preventDefault(), this.redo(), !0;
|
|
2941
2797
|
case "c":
|
|
2942
2798
|
case "x": {
|
|
2943
|
-
if (
|
|
2799
|
+
if (b(e.composedPath()[0])) return !0;
|
|
2944
2800
|
let t = this._selectionTsv();
|
|
2945
2801
|
if (!t) return !0;
|
|
2946
2802
|
let n = e.key.toLowerCase() === "x" && this.editable;
|
|
2947
|
-
return
|
|
2803
|
+
return y(t.text).then((e) => {
|
|
2948
2804
|
e ? this._afterCopy(t.range, t.text, n) : this._clipboardError("copy", /* @__PURE__ */ Error("The clipboard did not take the copied text"));
|
|
2949
2805
|
}), !0;
|
|
2950
2806
|
}
|
|
2951
|
-
case "v": return
|
|
2807
|
+
case "v": return b(e.composedPath()[0]) || !this.editable || !this._activeCell || x().then((e) => this._pasteText(e), (e) => this._clipboardError("paste", e)), !0;
|
|
2952
2808
|
case "d": return e.preventDefault(), this.editable && this._handleFillDown(), !0;
|
|
2953
2809
|
case "r": return e.preventDefault(), this.editable && this._handleFillRight(), !0;
|
|
2954
2810
|
case "f": return e.preventDefault(), this._toggleFindPanel("find"), !0;
|
|
@@ -3023,7 +2879,7 @@ var K = {
|
|
|
3023
2879
|
}
|
|
3024
2880
|
_pasteText(e) {
|
|
3025
2881
|
if (!this._activeCell) return;
|
|
3026
|
-
let t =
|
|
2882
|
+
let t = g(e);
|
|
3027
2883
|
if (t.length === 0) return;
|
|
3028
2884
|
let n = this._expandRowsForPaste(this._activeCell.row, t.length), r = this._applyPasteData(this._activeCell, t);
|
|
3029
2885
|
if (this._selectPastedRange(this._activeCell, t), r.length > 0 || n.length > 0) {
|
|
@@ -3070,7 +2926,7 @@ var K = {
|
|
|
3070
2926
|
for (let a = 0; a < t[i].length; a++) {
|
|
3071
2927
|
let s = e.col + a;
|
|
3072
2928
|
if (s >= n.length) break;
|
|
3073
|
-
let c = n[s], l = this.data[o][c.key], u =
|
|
2929
|
+
let c = n[s], l = this.data[o][c.key], u = j(t[i][a], c);
|
|
3074
2930
|
this.data[o][c.key] = u, r.push({
|
|
3075
2931
|
row: o,
|
|
3076
2932
|
col: s,
|
|
@@ -3135,7 +2991,7 @@ var K = {
|
|
|
3135
2991
|
for (let r = e.startCol + 1; r <= e.endCol; r++) {
|
|
3136
2992
|
let e = t[r];
|
|
3137
2993
|
if (!e || !this._isCellEditable(e)) continue;
|
|
3138
|
-
let a =
|
|
2994
|
+
let a = j(o == null ? "" : String(o), e);
|
|
3139
2995
|
n.push({
|
|
3140
2996
|
row: i,
|
|
3141
2997
|
key: e.key,
|
|
@@ -3230,8 +3086,8 @@ var K = {
|
|
|
3230
3086
|
}
|
|
3231
3087
|
t.sortable !== !1 && this._toggleSort(t, e.shiftKey);
|
|
3232
3088
|
}
|
|
3233
|
-
_toggleSort(
|
|
3234
|
-
this._sortCriteria =
|
|
3089
|
+
_toggleSort(e, n) {
|
|
3090
|
+
this._sortCriteria = t(this._sortCriteria, e.key, n), this.dataMode !== "server" && this._recomputeView(), this.requestUpdate(), this._emit("sort-change", { criteria: [...this._sortCriteria] });
|
|
3235
3091
|
}
|
|
3236
3092
|
_selectColumn(e) {
|
|
3237
3093
|
let t = this._visibleRowCount;
|
|
@@ -3264,61 +3120,61 @@ var K = {
|
|
|
3264
3120
|
let r = this._getColWidth(t[e]), i = this._scrollLeft + this._viewportWidth - this._getPinnedRight(e) - r;
|
|
3265
3121
|
return Math.min(n, i);
|
|
3266
3122
|
}
|
|
3267
|
-
_renderHeaderCell(
|
|
3268
|
-
let
|
|
3123
|
+
_renderHeaderCell(t, n) {
|
|
3124
|
+
let r = t.sortable !== !1, i = this._sortCriteria.find((e) => e.key === t.key), s = this._sortCriteria.length > 1 ? this._sortCriteria.findIndex((e) => e.key === t.key) : -1, c = this._filters.some((e) => e.key === t.key), l = t.pinned === "left", u = t.pinned === "right", d = l || u, f = t.headerAlign ?? W(t), p = [
|
|
3269
3125
|
"ft-header-cell",
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
this._headerCol ===
|
|
3275
|
-
].filter(Boolean).join(" "),
|
|
3276
|
-
|
|
3277
|
-
let
|
|
3278
|
-
if (
|
|
3279
|
-
let
|
|
3280
|
-
return
|
|
3281
|
-
<div class=${
|
|
3126
|
+
r ? "ft-sortable" : "",
|
|
3127
|
+
d ? "ft-pinned" : "",
|
|
3128
|
+
f === "center" ? "ft-header-align-center" : "",
|
|
3129
|
+
f === "end" ? "ft-header-align-end" : "",
|
|
3130
|
+
this._headerCol === n ? "ft-header-active" : ""
|
|
3131
|
+
].filter(Boolean).join(" "), m = r ? i ? i.direction === "asc" ? "ascending" : "descending" : "none" : void 0, h = this._getColWidth(t), g = this.headerHeight, _ = this._colLeftOffsets[n] ?? 0, v;
|
|
3132
|
+
v = l ? `position: absolute; top: 0; left: ${this._scrollLeft + this._getPinnedLeft(n)}px; width: ${h}px; height: ${g}px; z-index: 4;` : u ? `position: absolute; top: 0; left: ${this._getPinnedRightLeft(n)}px; width: ${h}px; height: ${g}px; z-index: 4;` : `left: ${_}px; width: ${h}px; height: ${g}px;`;
|
|
3133
|
+
let y = this._colDrag?.active && this._colDrag.colIndex === n, b = [...p.split(" "), y ? "ft-col-dragging" : ""].filter(Boolean).join(" "), x = this.columns, S = x.findIndex((e) => e.key === t.key), C = [];
|
|
3134
|
+
if (S > 0) for (let e = S - 1; e >= 0 && x[e].hidden; e--) C.push(x[e]);
|
|
3135
|
+
let w = C.length > 0;
|
|
3136
|
+
return a`
|
|
3137
|
+
<div class=${b}
|
|
3282
3138
|
role="columnheader"
|
|
3283
3139
|
tabindex="-1"
|
|
3284
|
-
aria-colindex=${
|
|
3285
|
-
data-col-index=${
|
|
3286
|
-
style=${
|
|
3287
|
-
aria-sort=${
|
|
3288
|
-
@contextmenu=${(
|
|
3289
|
-
@mousedown=${(
|
|
3290
|
-
@click=${
|
|
3291
|
-
${
|
|
3140
|
+
aria-colindex=${n + 1}
|
|
3141
|
+
data-col-index=${n}
|
|
3142
|
+
style=${v}
|
|
3143
|
+
aria-sort=${m ?? o}
|
|
3144
|
+
@contextmenu=${(e) => this._onHeaderContextMenu(e, t)}
|
|
3145
|
+
@mousedown=${(e) => this._onHeaderMouseDown(e, t, n)}
|
|
3146
|
+
@click=${r ? (e) => this._onHeaderClick(e, t) : void 0}>
|
|
3147
|
+
${w ? a`
|
|
3292
3148
|
<button class="ft-hidden-col-indicator" tabindex="-1"
|
|
3293
|
-
title=${
|
|
3294
|
-
@click=${(
|
|
3295
|
-
|
|
3149
|
+
title=${e("showHiddenColumns")}
|
|
3150
|
+
@click=${(e) => {
|
|
3151
|
+
e.stopPropagation(), this._showHiddenBefore(t);
|
|
3296
3152
|
}}>❯</button>
|
|
3297
3153
|
` : ""}
|
|
3298
|
-
<span>${
|
|
3299
|
-
${
|
|
3300
|
-
${
|
|
3301
|
-
<button class="ft-column-menu-btn ${
|
|
3154
|
+
<span>${t.label}</span>
|
|
3155
|
+
${i ? a`<span class="ft-sort-indicator">${i.direction === "asc" ? "▲" : "▼"}</span>` : ""}
|
|
3156
|
+
${s >= 0 ? a`<span class="ft-sort-order">${s + 1}</span>` : ""}
|
|
3157
|
+
<button class="ft-column-menu-btn ${c ? "ft-filter-active" : ""}"
|
|
3302
3158
|
type="button"
|
|
3303
3159
|
tabindex="-1"
|
|
3304
|
-
data-key=${
|
|
3305
|
-
title=${
|
|
3306
|
-
aria-label=${
|
|
3160
|
+
data-key=${t.key}
|
|
3161
|
+
title=${e("columnMenu")}
|
|
3162
|
+
aria-label=${e("columnMenuFor", { header: t.label })}
|
|
3307
3163
|
aria-haspopup="menu"
|
|
3308
|
-
aria-expanded=${this._headerMenu?.key ===
|
|
3164
|
+
aria-expanded=${this._headerMenu?.key === t.key ? "true" : "false"}
|
|
3309
3165
|
@mousedown=${(e) => e.stopPropagation()}
|
|
3310
|
-
@click=${(
|
|
3166
|
+
@click=${(e) => this._onColumnMenuBtnClick(e, t)}>
|
|
3311
3167
|
\u22EE
|
|
3312
3168
|
</button>
|
|
3313
3169
|
<div class="ft-resize-handle"
|
|
3314
3170
|
@mousedown=${(e) => {
|
|
3315
|
-
e.stopPropagation(), this._wasHeaderDrag = !0, this._onResizeStart(e,
|
|
3171
|
+
e.stopPropagation(), this._wasHeaderDrag = !0, this._onResizeStart(e, n);
|
|
3316
3172
|
}}
|
|
3317
|
-
@dblclick=${(
|
|
3318
|
-
|
|
3173
|
+
@dblclick=${(e) => {
|
|
3174
|
+
e.preventDefault(), e.stopPropagation(), this._autoFitColumn(t.key);
|
|
3319
3175
|
}}></div>
|
|
3320
3176
|
</div>
|
|
3321
|
-
${this._openFilterKey ===
|
|
3177
|
+
${this._openFilterKey === t.key ? this._renderFilterDropdown(t) : ""}
|
|
3322
3178
|
`;
|
|
3323
3179
|
}
|
|
3324
3180
|
_hiddenNeighbors(e) {
|
|
@@ -3412,73 +3268,73 @@ var K = {
|
|
|
3412
3268
|
for (let e = n - 1; e >= 0 && t[e].hidden; e--) this._setColumnHidden(t[e].key, !1);
|
|
3413
3269
|
}
|
|
3414
3270
|
_renderHeaderContextMenu() {
|
|
3415
|
-
if (!this._headerMenu) return
|
|
3416
|
-
let { key:
|
|
3417
|
-
if (!
|
|
3418
|
-
let
|
|
3271
|
+
if (!this._headerMenu) return o;
|
|
3272
|
+
let { key: t, x: n, y: r, hiddenNeighbors: i } = this._headerMenu, s = this.columns.find((e) => e.key === t);
|
|
3273
|
+
if (!s) return o;
|
|
3274
|
+
let c = this._filters.some((e) => e.key === t), l = (e, t, n, r = !1) => a`
|
|
3419
3275
|
<button type="button" role="menuitem" class="ft-header-menu-item" data-action=${e}
|
|
3420
3276
|
@click=${(e) => {
|
|
3421
3277
|
e.stopPropagation(), r || (this._headerMenu = null), n();
|
|
3422
3278
|
}}>${t}</button>
|
|
3423
3279
|
`;
|
|
3424
|
-
return
|
|
3425
|
-
<div class="ft-header-menu" role="menu" aria-label=${
|
|
3426
|
-
style="position: fixed; left: ${
|
|
3280
|
+
return a`
|
|
3281
|
+
<div class="ft-header-menu" role="menu" aria-label=${e("columnMenuRegion", { header: s.label })}
|
|
3282
|
+
style="position: fixed; left: ${n}px; top: ${r}px; z-index: var(--u-layer-floating, 1000);"
|
|
3427
3283
|
@mousedown=${(e) => e.stopPropagation()}
|
|
3428
3284
|
@keydown=${(e) => this._onHeaderMenuKeydown(e)}>
|
|
3429
|
-
${
|
|
3430
|
-
${
|
|
3431
|
-
${
|
|
3285
|
+
${s.sortable === !1 ? o : a`
|
|
3286
|
+
${l("sort-asc", e("sortAscending"), () => this._applySortFromMenu(t, "asc"))}
|
|
3287
|
+
${l("sort-desc", e("sortDescending"), () => this._applySortFromMenu(t, "desc"))}
|
|
3432
3288
|
<div class="ft-header-menu-separator" role="separator"></div>
|
|
3433
3289
|
`}
|
|
3434
|
-
${this.showFilters ?
|
|
3435
|
-
${
|
|
3436
|
-
${
|
|
3290
|
+
${this.showFilters ? a`
|
|
3291
|
+
${l("filter", e("filter"), () => this._openFilterFromMenu(t))}
|
|
3292
|
+
${c ? l("clear-filter", e("clearFilter"), () => this._clearColumnFilter(t)) : o}
|
|
3437
3293
|
<div class="ft-header-menu-separator" role="separator"></div>
|
|
3438
|
-
` :
|
|
3439
|
-
${
|
|
3440
|
-
${
|
|
3294
|
+
` : o}
|
|
3295
|
+
${l("hide", e("hideColumn"), () => this._setColumnHidden(t, !0))}
|
|
3296
|
+
${i.map((t) => l("show", e("showColumn", { header: t.label }), () => this._setColumnHidden(t.key, !1)))}
|
|
3441
3297
|
<div class="ft-header-menu-separator" role="separator"></div>
|
|
3442
|
-
${
|
|
3443
|
-
${
|
|
3444
|
-
${
|
|
3298
|
+
${l("autofit", e("autoFitWidth"), () => this._autoFitColumn(t))}
|
|
3299
|
+
${l("wider", e("wider"), () => this._resizeColumnBy(t, Y), !0)}
|
|
3300
|
+
${l("narrower", e("narrower"), () => this._resizeColumnBy(t, -20), !0)}
|
|
3445
3301
|
</div>
|
|
3446
3302
|
`;
|
|
3447
3303
|
}
|
|
3448
3304
|
_renderBodyContextMenu() {
|
|
3449
|
-
if (!this._bodyContextMenu) return
|
|
3450
|
-
let { colIndex:
|
|
3451
|
-
if (!
|
|
3452
|
-
let
|
|
3305
|
+
if (!this._bodyContextMenu) return o;
|
|
3306
|
+
let { colIndex: t, dataIndex: n, x: r, y: i } = this._bodyContextMenu, s = this.visibleColumns[t];
|
|
3307
|
+
if (!s) return o;
|
|
3308
|
+
let c = this.data[n]?.[s.key], l = this._filters.some((e) => e.key === s.key), u = (e = !1) => {
|
|
3453
3309
|
this._bodyContextMenu = null, e && this.focus();
|
|
3454
|
-
},
|
|
3310
|
+
}, d = !!this.getComment(n, s.key), f = (e, t, n = !1) => a`
|
|
3455
3311
|
<button type="button" role="menuitem"
|
|
3456
3312
|
class="ft-context-menu-item ${n ? "ft-context-menu-danger" : ""}"
|
|
3457
3313
|
@click=${() => {
|
|
3458
|
-
t(),
|
|
3314
|
+
t(), u();
|
|
3459
3315
|
}}>${e}</button>
|
|
3460
|
-
`,
|
|
3461
|
-
return
|
|
3462
|
-
<div class="ft-body-context-menu" role="menu" aria-label=${
|
|
3463
|
-
style="position: fixed; left: ${
|
|
3316
|
+
`, p = a`<div class="ft-context-menu-separator" role="separator"></div>`;
|
|
3317
|
+
return a`
|
|
3318
|
+
<div class="ft-body-context-menu" role="menu" aria-label=${e("cellActions")}
|
|
3319
|
+
style="position: fixed; left: ${r}px; top: ${i}px; z-index: var(--u-layer-floating, 1000);"
|
|
3464
3320
|
@mousedown=${(e) => e.stopPropagation()}
|
|
3465
|
-
@keydown=${(e) => this._onMenuKeydown(e, ".ft-body-context-menu",
|
|
3466
|
-
${
|
|
3467
|
-
${
|
|
3468
|
-
${
|
|
3469
|
-
${
|
|
3470
|
-
${
|
|
3471
|
-
${
|
|
3472
|
-
${
|
|
3473
|
-
${
|
|
3474
|
-
${
|
|
3475
|
-
${
|
|
3476
|
-
${
|
|
3477
|
-
${
|
|
3478
|
-
${
|
|
3479
|
-
${
|
|
3480
|
-
${
|
|
3481
|
-
${
|
|
3321
|
+
@keydown=${(e) => this._onMenuKeydown(e, ".ft-body-context-menu", u)}>
|
|
3322
|
+
${f(e("copy"), () => this._copyFromMenu())}
|
|
3323
|
+
${p}
|
|
3324
|
+
${f(e("insertRowAbove"), () => this.addRow(void 0, n))}
|
|
3325
|
+
${f(e("insertRowBelow"), () => this.addRow(void 0, n + 1))}
|
|
3326
|
+
${f(e("deleteRow"), () => this.deleteRows([n]), !0)}
|
|
3327
|
+
${p}
|
|
3328
|
+
${f(e("hideColumn"), () => this._setColumnHidden(s.key, !0))}
|
|
3329
|
+
${p}
|
|
3330
|
+
${f(`${e("sortAscending")} ↑`, () => this._applySortFromMenu(s.key, "asc"))}
|
|
3331
|
+
${f(`${e("sortDescending")} ↓`, () => this._applySortFromMenu(s.key, "desc"))}
|
|
3332
|
+
${p}
|
|
3333
|
+
${f(e("filterByThisValue"), () => this.setFilter(s.key, (e) => e === c))}
|
|
3334
|
+
${l ? f(e("clearFilter"), () => this.removeFilter(s.key)) : o}
|
|
3335
|
+
${p}
|
|
3336
|
+
${f(e(d ? "editComment" : "addComment"), () => this._openCommentPopup(n, s.key, r, i))}
|
|
3337
|
+
${d ? f(e("deleteComment"), () => this.setComment(n, s.key, null), !0) : o}
|
|
3482
3338
|
</div>
|
|
3483
3339
|
`;
|
|
3484
3340
|
}
|
|
@@ -3502,21 +3358,21 @@ var K = {
|
|
|
3502
3358
|
this._commentPopup &&= (document.removeEventListener("mousedown", this._onCommentPopupOutsideClick), null);
|
|
3503
3359
|
}
|
|
3504
3360
|
_renderCommentPopup() {
|
|
3505
|
-
if (!this._commentPopup) return
|
|
3506
|
-
let { x:
|
|
3507
|
-
return
|
|
3361
|
+
if (!this._commentPopup) return o;
|
|
3362
|
+
let { x: t, y: n } = this._commentPopup, r = t + 240 > window.innerWidth ? t - 240 : t, i = n + 150 > window.innerHeight ? n - 150 : n;
|
|
3363
|
+
return a`
|
|
3508
3364
|
<div class="ft-comment-popup"
|
|
3509
|
-
style="position: fixed; left: ${
|
|
3365
|
+
style="position: fixed; left: ${r}px; top: ${i}px; z-index: calc(var(--u-layer-floating, 1000) + 1);"
|
|
3510
3366
|
@mousedown=${(e) => e.stopPropagation()}>
|
|
3511
|
-
<textarea class="ft-comment-popup-textarea" aria-label=${
|
|
3367
|
+
<textarea class="ft-comment-popup-textarea" aria-label=${e("addComment")}
|
|
3512
3368
|
rows="4"
|
|
3513
|
-
placeholder=${
|
|
3369
|
+
placeholder=${e("addCommentPlaceholder")}
|
|
3514
3370
|
@keydown=${(e) => {
|
|
3515
3371
|
e.key === "Escape" && (e.preventDefault(), this._cancelCommentPopup()), e.key === "Enter" && (e.ctrlKey || e.metaKey) && (e.preventDefault(), this._commitCommentPopup());
|
|
3516
3372
|
}}></textarea>
|
|
3517
3373
|
<div class="ft-comment-popup-buttons">
|
|
3518
|
-
<button class="ft-comment-popup-cancel" @click=${() => this._cancelCommentPopup()}>${
|
|
3519
|
-
<button class="ft-comment-popup-save" @click=${() => this._commitCommentPopup()}>${
|
|
3374
|
+
<button class="ft-comment-popup-cancel" @click=${() => this._cancelCommentPopup()}>${e("cancel")}</button>
|
|
3375
|
+
<button class="ft-comment-popup-save" @click=${() => this._commitCommentPopup()}>${e("save")}</button>
|
|
3520
3376
|
</div>
|
|
3521
3377
|
</div>
|
|
3522
3378
|
`;
|
|
@@ -3562,18 +3418,18 @@ var K = {
|
|
|
3562
3418
|
let n = e.composedPath(), r = t.findIndex((e) => n.includes(e)), i = t.length - 1;
|
|
3563
3419
|
e.shiftKey && r <= 0 ? (e.preventDefault(), t[i].focus()) : !e.shiftKey && (r === i || r === -1) && (e.preventDefault(), t[0].focus());
|
|
3564
3420
|
}
|
|
3565
|
-
_renderFilterDropdown(
|
|
3566
|
-
let
|
|
3567
|
-
return
|
|
3568
|
-
<div class="ft-filter-dropdown" role="dialog" aria-label=${
|
|
3421
|
+
_renderFilterDropdown(t) {
|
|
3422
|
+
let n = t.type ?? "text";
|
|
3423
|
+
return a`
|
|
3424
|
+
<div class="ft-filter-dropdown" role="dialog" aria-label=${e("filterFor", { header: t.label })}
|
|
3569
3425
|
@click=${(e) => e.stopPropagation()}
|
|
3570
3426
|
@keydown=${{
|
|
3571
3427
|
handleEvent: (e) => this._onFilterDialogKeydown(e),
|
|
3572
3428
|
capture: !0
|
|
3573
3429
|
}}>
|
|
3574
|
-
${
|
|
3430
|
+
${n === "boolean" ? this._renderBooleanFilter(t) : n === "number" ? this._renderNumberFilter(t) : n === "date" || n === "datetime" ? this._renderDateFilter(t) : this._renderTextFilter(t)}
|
|
3575
3431
|
<div class="ft-filter-actions">
|
|
3576
|
-
<button class="ft-filter-clear" @click=${() => this._clearColumnFilter(
|
|
3432
|
+
<button class="ft-filter-clear" @click=${() => this._clearColumnFilter(t.key)}>${e("clear")}</button>
|
|
3577
3433
|
</div>
|
|
3578
3434
|
</div>
|
|
3579
3435
|
`;
|
|
@@ -3602,23 +3458,23 @@ var K = {
|
|
|
3602
3458
|
_buildEmptyPredicate(e) {
|
|
3603
3459
|
return e === "empty" ? (e) => e == null || e === "" : (e) => e != null && e !== "";
|
|
3604
3460
|
}
|
|
3605
|
-
_renderEmptyFilterRow(
|
|
3606
|
-
let
|
|
3607
|
-
return
|
|
3461
|
+
_renderEmptyFilterRow(t, n) {
|
|
3462
|
+
let r = this._emptyFilterState.get(t) ?? "";
|
|
3463
|
+
return a`
|
|
3608
3464
|
<div class="ft-filter-empty-row">
|
|
3609
|
-
<label>${
|
|
3610
|
-
<select class="ft-filter-mode-select" aria-label=${
|
|
3611
|
-
.value=${
|
|
3612
|
-
@change=${(
|
|
3613
|
-
let r =
|
|
3614
|
-
(r === "" || r === "empty" || r === "non-empty") && (r ? this._emptyFilterState.set(
|
|
3465
|
+
<label>${e("blankCells")}</label>
|
|
3466
|
+
<select class="ft-filter-mode-select" aria-label=${e("blankCells")}
|
|
3467
|
+
.value=${r}
|
|
3468
|
+
@change=${(e) => {
|
|
3469
|
+
let r = e.target.value;
|
|
3470
|
+
(r === "" || r === "empty" || r === "non-empty") && (r ? this._emptyFilterState.set(t, r) : this._emptyFilterState.delete(t), n?.(), this._applyFilterForKey(t));
|
|
3615
3471
|
}}
|
|
3616
3472
|
@keydown=${(e) => {
|
|
3617
3473
|
e.key === "Escape" && this._closeFilterDropdown(), e.stopPropagation();
|
|
3618
3474
|
}}>
|
|
3619
|
-
<option value="">${
|
|
3620
|
-
<option value="empty">${
|
|
3621
|
-
<option value="non-empty">${
|
|
3475
|
+
<option value="">${e("blankAll")}</option>
|
|
3476
|
+
<option value="empty">${e("emptyOnly")}</option>
|
|
3477
|
+
<option value="non-empty">${e("nonEmptyOnly")}</option>
|
|
3622
3478
|
</select>
|
|
3623
3479
|
</div>
|
|
3624
3480
|
`;
|
|
@@ -3672,51 +3528,51 @@ var K = {
|
|
|
3672
3528
|
t ? this.setFilter(e, t) : this.removeFilter(e);
|
|
3673
3529
|
} else this.removeFilter(e);
|
|
3674
3530
|
}
|
|
3675
|
-
_renderTextFilter(
|
|
3676
|
-
let
|
|
3531
|
+
_renderTextFilter(t) {
|
|
3532
|
+
let n = this._textFilterState.get(t.key) ?? {
|
|
3677
3533
|
value: "",
|
|
3678
3534
|
mode: "contains"
|
|
3679
3535
|
};
|
|
3680
|
-
return
|
|
3536
|
+
return a`
|
|
3681
3537
|
<div class="ft-filter-mode-row">
|
|
3682
|
-
<select class="ft-filter-mode-select" aria-label=${
|
|
3683
|
-
.value=${
|
|
3684
|
-
@change=${(
|
|
3685
|
-
let n =
|
|
3538
|
+
<select class="ft-filter-mode-select" aria-label=${e("filterMatchMode")}
|
|
3539
|
+
.value=${n.mode}
|
|
3540
|
+
@change=${(e) => {
|
|
3541
|
+
let n = e.target.value, r = this._textFilterState.get(t.key) ?? {
|
|
3686
3542
|
value: "",
|
|
3687
3543
|
mode: "contains"
|
|
3688
3544
|
};
|
|
3689
|
-
this._textFilterState.set(
|
|
3545
|
+
this._textFilterState.set(t.key, {
|
|
3690
3546
|
...r,
|
|
3691
3547
|
mode: n
|
|
3692
|
-
}), this._applyTextFilter(
|
|
3548
|
+
}), this._applyTextFilter(t.key);
|
|
3693
3549
|
}}
|
|
3694
3550
|
@keydown=${(e) => {
|
|
3695
3551
|
e.key === "Escape" && this._closeFilterDropdown(), e.stopPropagation();
|
|
3696
3552
|
}}>
|
|
3697
|
-
<option value="contains">${
|
|
3698
|
-
<option value="starts">${
|
|
3699
|
-
<option value="ends">${
|
|
3700
|
-
<option value="wildcard">${
|
|
3553
|
+
<option value="contains">${e("contains")}</option>
|
|
3554
|
+
<option value="starts">${e("startsWith")}</option>
|
|
3555
|
+
<option value="ends">${e("endsWith")}</option>
|
|
3556
|
+
<option value="wildcard">${e("wildcard")}</option>
|
|
3701
3557
|
</select>
|
|
3702
3558
|
</div>
|
|
3703
|
-
<input class="ft-filter-input" type="text" placeholder=${
|
|
3704
|
-
.value=${
|
|
3705
|
-
@input=${(
|
|
3706
|
-
let n =
|
|
3559
|
+
<input class="ft-filter-input" type="text" placeholder=${e("searchPlaceholder")} aria-label=${e("filterText")}
|
|
3560
|
+
.value=${n.value}
|
|
3561
|
+
@input=${(e) => {
|
|
3562
|
+
let n = e.target.value, r = this._textFilterState.get(t.key) ?? {
|
|
3707
3563
|
value: "",
|
|
3708
3564
|
mode: "contains"
|
|
3709
3565
|
};
|
|
3710
|
-
this._textFilterState.set(
|
|
3566
|
+
this._textFilterState.set(t.key, {
|
|
3711
3567
|
...r,
|
|
3712
3568
|
value: n
|
|
3713
|
-
}), this._emptyFilterState.delete(
|
|
3569
|
+
}), this._emptyFilterState.delete(t.key), this._applyTextFilter(t.key);
|
|
3714
3570
|
}}
|
|
3715
3571
|
@keydown=${(e) => {
|
|
3716
3572
|
e.key === "Escape" && this._closeFilterDropdown(), e.stopPropagation();
|
|
3717
3573
|
}}>
|
|
3718
|
-
${this._renderEmptyFilterRow(
|
|
3719
|
-
this._textFilterState.delete(
|
|
3574
|
+
${this._renderEmptyFilterRow(t.key, () => {
|
|
3575
|
+
this._textFilterState.delete(t.key);
|
|
3720
3576
|
})}
|
|
3721
3577
|
`;
|
|
3722
3578
|
}
|
|
@@ -3733,35 +3589,35 @@ var K = {
|
|
|
3733
3589
|
}
|
|
3734
3590
|
};
|
|
3735
3591
|
}
|
|
3736
|
-
_renderNumCondRow(
|
|
3737
|
-
let
|
|
3738
|
-
return
|
|
3592
|
+
_renderNumCondRow(t, n) {
|
|
3593
|
+
let r = (this._numberFilterState.get(t) ?? this._defaultNumState())[n];
|
|
3594
|
+
return a`
|
|
3739
3595
|
<div class="ft-num-cond-row">
|
|
3740
|
-
<select class="ft-filter-mode-select ft-num-op-select" aria-label=${
|
|
3741
|
-
.value=${
|
|
3742
|
-
@change=${(
|
|
3743
|
-
let r =
|
|
3744
|
-
i[
|
|
3745
|
-
...i[
|
|
3596
|
+
<select class="ft-filter-mode-select ft-num-op-select" aria-label=${e("conditionOperator", { n: n === "cond1" ? 1 : 2 })}
|
|
3597
|
+
.value=${r.op}
|
|
3598
|
+
@change=${(e) => {
|
|
3599
|
+
let r = e.target.value, i = this._numberFilterState.get(t) ?? this._defaultNumState();
|
|
3600
|
+
i[n] = {
|
|
3601
|
+
...i[n],
|
|
3746
3602
|
op: r
|
|
3747
|
-
}, this._numberFilterState.set(
|
|
3603
|
+
}, this._numberFilterState.set(t, i), this._emptyFilterState.delete(t), this._applyFilterForKey(t);
|
|
3748
3604
|
}}
|
|
3749
3605
|
@keydown=${(e) => {
|
|
3750
3606
|
e.key === "Escape" && this._closeFilterDropdown(), e.stopPropagation();
|
|
3751
3607
|
}}>
|
|
3752
|
-
${Object.keys(K).map((e) =>
|
|
3608
|
+
${Object.keys(K).map((e) => a`<option value=${e}>${K[e]}</option>`)}
|
|
3753
3609
|
</select>
|
|
3754
|
-
<input class="ft-filter-input ft-num-cond-input" type="text" inputmode="decimal" placeholder=${
|
|
3755
|
-
aria-label=${
|
|
3756
|
-
.value=${
|
|
3757
|
-
aria-invalid=${
|
|
3758
|
-
@input=${(
|
|
3759
|
-
let r =
|
|
3760
|
-
i[
|
|
3761
|
-
...i[
|
|
3610
|
+
<input class="ft-filter-input ft-num-cond-input" type="text" inputmode="decimal" placeholder=${e("valuePlaceholder")}
|
|
3611
|
+
aria-label=${e("conditionValue", { n: n === "cond1" ? 1 : 2 })}
|
|
3612
|
+
.value=${r.text ?? (r.value == null ? "" : M(r.value))}
|
|
3613
|
+
aria-invalid=${r.text && r.value == null ? "true" : "false"}
|
|
3614
|
+
@input=${(e) => {
|
|
3615
|
+
let r = e.target.value, i = this._numberFilterState.get(t) ?? this._defaultNumState();
|
|
3616
|
+
i[n] = {
|
|
3617
|
+
...i[n],
|
|
3762
3618
|
text: r,
|
|
3763
|
-
value: r.trim() === "" ? null :
|
|
3764
|
-
}, this._numberFilterState.set(
|
|
3619
|
+
value: r.trim() === "" ? null : h(r)
|
|
3620
|
+
}, this._numberFilterState.set(t, i), this._emptyFilterState.delete(t), this._applyFilterForKey(t);
|
|
3765
3621
|
}}
|
|
3766
3622
|
@keydown=${(e) => {
|
|
3767
3623
|
e.key === "Escape" && this._closeFilterDropdown(), e.stopPropagation();
|
|
@@ -3769,16 +3625,16 @@ var K = {
|
|
|
3769
3625
|
</div>
|
|
3770
3626
|
`;
|
|
3771
3627
|
}
|
|
3772
|
-
_renderNumberFilter(
|
|
3773
|
-
let
|
|
3774
|
-
return
|
|
3775
|
-
${this._renderNumCondRow(
|
|
3628
|
+
_renderNumberFilter(t) {
|
|
3629
|
+
let n = this._numberFilterState.get(t.key) ?? this._defaultNumState();
|
|
3630
|
+
return a`
|
|
3631
|
+
${this._renderNumCondRow(t.key, "cond1")}
|
|
3776
3632
|
<div class="ft-filter-mode-row">
|
|
3777
|
-
<select class="ft-filter-mode-select" aria-label=${
|
|
3778
|
-
.value=${
|
|
3779
|
-
@change=${(
|
|
3780
|
-
let n =
|
|
3781
|
-
r.join = n, this._numberFilterState.set(
|
|
3633
|
+
<select class="ft-filter-mode-select" aria-label=${e("conditionJoin")}
|
|
3634
|
+
.value=${n.join}
|
|
3635
|
+
@change=${(e) => {
|
|
3636
|
+
let n = e.target.value, r = this._numberFilterState.get(t.key) ?? this._defaultNumState();
|
|
3637
|
+
r.join = n, this._numberFilterState.set(t.key, r), this._emptyFilterState.delete(t.key), this._applyFilterForKey(t.key);
|
|
3782
3638
|
}}
|
|
3783
3639
|
@keydown=${(e) => {
|
|
3784
3640
|
e.key === "Escape" && this._closeFilterDropdown(), e.stopPropagation();
|
|
@@ -3787,9 +3643,9 @@ var K = {
|
|
|
3787
3643
|
<option value="or">OR</option>
|
|
3788
3644
|
</select>
|
|
3789
3645
|
</div>
|
|
3790
|
-
${this._renderNumCondRow(
|
|
3791
|
-
${this._renderEmptyFilterRow(
|
|
3792
|
-
this._numberFilterState.delete(
|
|
3646
|
+
${this._renderNumCondRow(t.key, "cond2")}
|
|
3647
|
+
${this._renderEmptyFilterRow(t.key, () => {
|
|
3648
|
+
this._numberFilterState.delete(t.key);
|
|
3793
3649
|
})}
|
|
3794
3650
|
`;
|
|
3795
3651
|
}
|
|
@@ -3809,27 +3665,27 @@ var K = {
|
|
|
3809
3665
|
}
|
|
3810
3666
|
_isCellInvalid(e, t) {
|
|
3811
3667
|
let n = this._invalidCells.get(this._cellKey(e, t));
|
|
3812
|
-
return n ? n.error : null;
|
|
3668
|
+
return n ? typeof n.error == "function" ? n.error() : n.error : null;
|
|
3813
3669
|
}
|
|
3814
|
-
_renderDateFilter(
|
|
3815
|
-
let
|
|
3670
|
+
_renderDateFilter(t) {
|
|
3671
|
+
let n = t.type === "datetime", r = this._dateFilterState.get(t.key) ?? {}, i = (e) => e?.slice(0, 10), s = (e) => {
|
|
3816
3672
|
e.key === "Escape" && $(e.currentTarget) || (e.stopPropagation(), e.key === "Escape" && this._closeFilterDropdown());
|
|
3817
3673
|
};
|
|
3818
|
-
return
|
|
3674
|
+
return a`
|
|
3819
3675
|
<div class="ft-filter-range ft-filter-range-dates">
|
|
3820
3676
|
<u-date-picker class="ft-filter-date" size="sm" clearable
|
|
3821
|
-
mode=${
|
|
3822
|
-
.value=${
|
|
3823
|
-
@change=${(
|
|
3824
|
-
@keydown=${
|
|
3677
|
+
mode=${n ? "datetime" : "date"} label=${e("fromPlaceholder")}
|
|
3678
|
+
.value=${r.from ?? ""} max=${i(r.to) ?? o}
|
|
3679
|
+
@change=${(e) => this._applyDateFilter(t.key, e, "from")}
|
|
3680
|
+
@keydown=${s}></u-date-picker>
|
|
3825
3681
|
<u-date-picker class="ft-filter-date" size="sm" clearable
|
|
3826
|
-
mode=${
|
|
3827
|
-
.value=${
|
|
3828
|
-
@change=${(
|
|
3829
|
-
@keydown=${
|
|
3682
|
+
mode=${n ? "datetime" : "date"} label=${e("toPlaceholder")}
|
|
3683
|
+
.value=${r.to ?? ""} min=${i(r.from) ?? o}
|
|
3684
|
+
@change=${(e) => this._applyDateFilter(t.key, e, "to")}
|
|
3685
|
+
@keydown=${s}></u-date-picker>
|
|
3830
3686
|
</div>
|
|
3831
|
-
${this._renderEmptyFilterRow(
|
|
3832
|
-
this._dateFilterState.delete(
|
|
3687
|
+
${this._renderEmptyFilterRow(t.key, () => {
|
|
3688
|
+
this._dateFilterState.delete(t.key);
|
|
3833
3689
|
})}
|
|
3834
3690
|
`;
|
|
3835
3691
|
}
|
|
@@ -3837,21 +3693,21 @@ var K = {
|
|
|
3837
3693
|
let r = t.target.value ?? "", i = this._dateFilterState.get(e) ?? {};
|
|
3838
3694
|
r === "" ? delete i[n] : i[n] = r, this._dateFilterState.set(e, i), this._emptyFilterState.delete(e), this._applyFilterForKey(e);
|
|
3839
3695
|
}
|
|
3840
|
-
_renderBooleanFilter(
|
|
3841
|
-
return
|
|
3842
|
-
<select class="ft-filter-input" aria-label=${
|
|
3843
|
-
@change=${(
|
|
3844
|
-
let n =
|
|
3845
|
-
n === "all" ? this.removeFilter(
|
|
3696
|
+
_renderBooleanFilter(t) {
|
|
3697
|
+
return a`
|
|
3698
|
+
<select class="ft-filter-input" aria-label=${e("filterFor", { header: t.label })}
|
|
3699
|
+
@change=${(e) => {
|
|
3700
|
+
let n = e.target.value;
|
|
3701
|
+
n === "all" ? this.removeFilter(t.key) : this.setFilter(t.key, (e) => !!e == (n === "true"));
|
|
3846
3702
|
}}
|
|
3847
3703
|
@keydown=${(e) => {
|
|
3848
3704
|
e.key === "Escape" && this._closeFilterDropdown(), e.stopPropagation();
|
|
3849
3705
|
}}>
|
|
3850
|
-
<option value="all">${
|
|
3851
|
-
<option value="true">\u2714 ${
|
|
3852
|
-
<option value="false">\u2718 ${
|
|
3706
|
+
<option value="all">${e("all")}</option>
|
|
3707
|
+
<option value="true">\u2714 ${e("booleanTrue")}</option>
|
|
3708
|
+
<option value="false">\u2718 ${e("booleanFalse")}</option>
|
|
3853
3709
|
</select>
|
|
3854
|
-
${this._renderEmptyFilterRow(
|
|
3710
|
+
${this._renderEmptyFilterRow(t.key)}
|
|
3855
3711
|
`;
|
|
3856
3712
|
}
|
|
3857
3713
|
_clearColumnFilter(e) {
|
|
@@ -4044,9 +3900,9 @@ var K = {
|
|
|
4044
3900
|
if (e.endCol >= t.length || e.endRow >= this._visibleRowCount) return "";
|
|
4045
3901
|
let n = (this._colLeftOffsets[e.endCol] ?? 0) + this._getColWidth(t[e.endCol]) - this._scrollLeft - 4, r = this.headerHeight + (e.endRow + 1) * this.rowHeight - this._scrollTop - 4;
|
|
4046
3902
|
if (n < 0 || r < this.headerHeight) return "";
|
|
4047
|
-
let
|
|
4048
|
-
return
|
|
4049
|
-
${
|
|
3903
|
+
let i = this._fillDrag?.active && this._fillDrag.targetRange ? this._renderFillPreview(this._fillDrag.targetRange) : "";
|
|
3904
|
+
return a`
|
|
3905
|
+
${i}
|
|
4050
3906
|
<div class="ft-fill-handle"
|
|
4051
3907
|
style="left:${n}px;top:${r}px;"
|
|
4052
3908
|
@mousedown=${(e) => this._onFillHandleMouseDown(e)}>
|
|
@@ -4056,8 +3912,8 @@ var K = {
|
|
|
4056
3912
|
_renderFillPreview(e) {
|
|
4057
3913
|
let t = this.visibleColumns;
|
|
4058
3914
|
if (e.endCol >= t.length || e.endRow >= this._visibleRowCount) return "";
|
|
4059
|
-
let n = (this._colLeftOffsets[e.startCol] ?? 0) - this._scrollLeft, r = this.headerHeight + e.startRow * this.rowHeight - this._scrollTop,
|
|
4060
|
-
return
|
|
3915
|
+
let n = (this._colLeftOffsets[e.startCol] ?? 0) - this._scrollLeft, r = this.headerHeight + e.startRow * this.rowHeight - this._scrollTop, i = (this._colLeftOffsets[e.endCol] ?? 0) + this._getColWidth(t[e.endCol]) - (this._colLeftOffsets[e.startCol] ?? 0), o = (e.endRow - e.startRow + 1) * this.rowHeight;
|
|
3916
|
+
return a`<div class="ft-fill-preview" style="left:${n}px;top:${r}px;width:${i}px;height:${o}px;"></div>`;
|
|
4061
3917
|
}
|
|
4062
3918
|
_onRowNumMouseDown(e, t) {
|
|
4063
3919
|
if (e.button !== 0) return;
|
|
@@ -4234,100 +4090,100 @@ var K = {
|
|
|
4234
4090
|
}
|
|
4235
4091
|
_renderFindPanel() {
|
|
4236
4092
|
if (!this._findState) return "";
|
|
4237
|
-
let { mode:
|
|
4238
|
-
return
|
|
4093
|
+
let { mode: t, query: n, replaceWith: r, matchCase: i, wholeCell: o, results: s, currentIndex: c } = this._findState, l = s.length, u = l > 0 ? c + 1 : 0;
|
|
4094
|
+
return a`
|
|
4239
4095
|
<div class="ft-find-panel"
|
|
4240
4096
|
@keydown=${(e) => {
|
|
4241
4097
|
if (e.stopPropagation(), e.key === "Escape") {
|
|
4242
4098
|
this._closeFindPanel();
|
|
4243
4099
|
return;
|
|
4244
4100
|
}
|
|
4245
|
-
e.key === "Enter" && !
|
|
4101
|
+
e.key === "Enter" && !v(e) && e.target instanceof HTMLInputElement && e.target.classList.contains("ft-find-input") && (e.shiftKey ? this._findPrev() : this._findNext());
|
|
4246
4102
|
}}>
|
|
4247
4103
|
<div class="ft-find-row">
|
|
4248
|
-
<input class="ft-find-input" type="text" placeholder=${
|
|
4249
|
-
.value=${
|
|
4104
|
+
<input class="ft-find-input" type="text" placeholder=${e("findPlaceholder")} aria-label=${e("findInput")}
|
|
4105
|
+
.value=${n}
|
|
4250
4106
|
@input=${(e) => {
|
|
4251
4107
|
this._findState.query = e.target.value, this._findSearch();
|
|
4252
4108
|
}}>
|
|
4253
|
-
<span class="ft-find-count">${
|
|
4109
|
+
<span class="ft-find-count">${l > 0 ? `${u}/${l}` : n ? e("findNoResults") : ""}</span>
|
|
4254
4110
|
<!-- 글리프는 이름이 아니다(«◀» 는 «black left-pointing triangle» 로 읽힌다) — 이름은 aria-label, 키는 aria-keyshortcuts -->
|
|
4255
|
-
<button @click=${() => this._findPrev()} aria-label=${
|
|
4256
|
-
<button @click=${() => this._findNext()} aria-label=${
|
|
4257
|
-
<label title=${
|
|
4111
|
+
<button @click=${() => this._findPrev()} aria-label=${e("findPrevious")} aria-keyshortcuts="Shift+Enter" title=${`${e("findPrevious")} (Shift+Enter)`}>◀</button>
|
|
4112
|
+
<button @click=${() => this._findNext()} aria-label=${e("findNext")} aria-keyshortcuts="Enter" title=${`${e("findNext")} (Enter)`}>▶</button>
|
|
4113
|
+
<label title=${e("matchCase")}><input type="checkbox" aria-label=${e("matchCase")} ?checked=${i} @change=${(e) => {
|
|
4258
4114
|
this._findState.matchCase = e.target.checked, this._findSearch();
|
|
4259
4115
|
}}> Aa</label>
|
|
4260
|
-
<label title=${
|
|
4116
|
+
<label title=${e("wholeCell")}><input type="checkbox" aria-label=${e("wholeCell")} ?checked=${o} @change=${(e) => {
|
|
4261
4117
|
this._findState.wholeCell = e.target.checked, this._findSearch();
|
|
4262
4118
|
}}> [ ]</label>
|
|
4263
|
-
<button @click=${() => this._closeFindPanel()} aria-label=${
|
|
4119
|
+
<button @click=${() => this._closeFindPanel()} aria-label=${e("closeFind")} aria-keyshortcuts="Escape" title=${`${e("closeFind")} (Escape)`}>✕</button>
|
|
4264
4120
|
</div>
|
|
4265
|
-
${
|
|
4121
|
+
${t === "replace" ? a`
|
|
4266
4122
|
<div class="ft-find-row">
|
|
4267
|
-
<input class="ft-find-replace-input" type="text" placeholder=${
|
|
4268
|
-
.value=${
|
|
4123
|
+
<input class="ft-find-replace-input" type="text" placeholder=${e("replaceWithPlaceholder")} aria-label=${e("replaceInput")}
|
|
4124
|
+
.value=${r}
|
|
4269
4125
|
@input=${(e) => {
|
|
4270
4126
|
this._findState.replaceWith = e.target.value;
|
|
4271
4127
|
}}>
|
|
4272
|
-
<button @click=${() => this._replaceOne()} ?disabled=${
|
|
4273
|
-
<button @click=${() => this._replaceAll()} ?disabled=${
|
|
4128
|
+
<button @click=${() => this._replaceOne()} ?disabled=${l === 0}>${e("replace")}</button>
|
|
4129
|
+
<button @click=${() => this._replaceAll()} ?disabled=${l === 0}>${e("replaceAll")}</button>
|
|
4274
4130
|
</div>
|
|
4275
4131
|
` : ""}
|
|
4276
4132
|
</div>
|
|
4277
4133
|
`;
|
|
4278
4134
|
}
|
|
4279
4135
|
render() {
|
|
4280
|
-
let
|
|
4281
|
-
if (
|
|
4282
|
-
let
|
|
4283
|
-
for (let
|
|
4284
|
-
let
|
|
4285
|
-
style="position: absolute; top: 0; left: ${
|
|
4286
|
-
${this._rowSelection.mode === "multi" ?
|
|
4136
|
+
let t = this.visibleColumns, n = this.importEnabled && this._isDragOver ? a`<div class="ft-import-overlay">${e("dropFileToImport")}</div>` : o, r = this.loading ? a`<div class="ft-loading-overlay"></div>` : o;
|
|
4137
|
+
if (t.length === 0) return a`${n}${r}<div class="ft-empty">${e("noColumnsDefined")}</div>`;
|
|
4138
|
+
let i = this.headerHeight, s = this._totalRowWidth, { start: c, end: l } = this.visibleColRange, u = [];
|
|
4139
|
+
for (let e = 0; e < t.length; e++) (t[e].pinned === "left" || t[e].pinned === "right") && (e < c || e >= l) && u.push(e);
|
|
4140
|
+
let d = 0, f = this._scrollLeft, p = this.selectable ? a`<div class="ft-checkbox-header"
|
|
4141
|
+
style="position: absolute; top: 0; left: ${f + d}px; width: ${this._checkboxColWidth}px; height: ${i}px; z-index: 4;">
|
|
4142
|
+
${this._rowSelection.mode === "multi" ? a`
|
|
4287
4143
|
<!-- 칸 전체가 누르는 자리다(라벨) — 체크 상자는 16px 그대로. -->
|
|
4288
|
-
<label class="ft-checkbox-hit"><input type="checkbox" tabindex="-1" aria-label=${
|
|
4144
|
+
<label class="ft-checkbox-hit"><input type="checkbox" tabindex="-1" aria-label=${e("selectAllRows")}
|
|
4289
4145
|
.checked=${this._rowSelection.isAllSelected}
|
|
4290
4146
|
.indeterminate=${this._rowSelection.isSomeSelected}
|
|
4291
4147
|
@change=${this._onSelectAllChange}></label>
|
|
4292
4148
|
` : ""}
|
|
4293
4149
|
</div>` : "";
|
|
4294
|
-
this.selectable && (
|
|
4295
|
-
let
|
|
4296
|
-
style="position: absolute; top: 0; left: ${
|
|
4297
|
-
for (let
|
|
4298
|
-
for (let
|
|
4299
|
-
let
|
|
4150
|
+
this.selectable && (d += this._checkboxColWidth);
|
|
4151
|
+
let m = this.showRowNumbers ? a`<div class="ft-row-num-header"
|
|
4152
|
+
style="position: absolute; top: 0; left: ${f + d}px; width: 48px; height: ${i}px; z-index: 4;">#</div>` : "", h = [];
|
|
4153
|
+
for (let e of u) h.push(this._renderHeaderCell(t[e], e));
|
|
4154
|
+
for (let e = c; e < l; e++) h.push(this._renderHeaderCell(t[e], e));
|
|
4155
|
+
let g = this._colDragIndicatorLeft == null ? "" : a`<div class="ft-drop-indicator" style="left:${this._colDragIndicatorLeft}px"></div>`;
|
|
4300
4156
|
if (this.data.length === 0 || this._visibleRowCount === 0) {
|
|
4301
4157
|
let e = this.data.length === 0 ? this.emptyMessage : this.noMatchingMessage;
|
|
4302
|
-
return
|
|
4303
|
-
${
|
|
4304
|
-
<div class="ft-header" role="row" aria-rowindex="1" style="width: ${
|
|
4305
|
-
${
|
|
4306
|
-
${m}
|
|
4158
|
+
return a`
|
|
4159
|
+
${r}
|
|
4160
|
+
<div class="ft-header" role="row" aria-rowindex="1" style="width: ${s}px; height: ${i}px;">
|
|
4161
|
+
${p}${m}
|
|
4307
4162
|
${h}
|
|
4163
|
+
${g}
|
|
4308
4164
|
</div>
|
|
4309
4165
|
<div class="ft-empty">${e}</div>
|
|
4310
4166
|
`;
|
|
4311
4167
|
}
|
|
4312
|
-
let { start:
|
|
4313
|
-
for (let e =
|
|
4314
|
-
let
|
|
4315
|
-
return
|
|
4316
|
-
${t}
|
|
4168
|
+
let { start: _, end: v } = this.visibleRange, y = this._frozenRowCount, b = [];
|
|
4169
|
+
for (let e = _; e < v; e++) b.push(this._renderRow(e, c, l, u, (e - y) * this.rowHeight));
|
|
4170
|
+
let x = this._renderFillHandle(), S = this._rowDragIndicatorY == null ? "" : a`<div class="ft-row-drop-indicator" style="top:${this._rowDragIndicatorY}px;width:${s}px;"></div>`;
|
|
4171
|
+
return a`
|
|
4317
4172
|
${n}
|
|
4173
|
+
${r}
|
|
4318
4174
|
${this._renderFindPanel()}
|
|
4319
|
-
<div class="ft-header" role="row" aria-rowindex="1" style="width: ${
|
|
4320
|
-
${
|
|
4321
|
-
${m}
|
|
4175
|
+
<div class="ft-header" role="row" aria-rowindex="1" style="width: ${s}px; height: ${i}px;">
|
|
4176
|
+
${p}${m}
|
|
4322
4177
|
${h}
|
|
4178
|
+
${g}
|
|
4323
4179
|
</div>
|
|
4324
|
-
${this._renderFrozenRows(
|
|
4325
|
-
<div class="ft-body" style="height: ${this.totalBodyHeight}px; width: ${
|
|
4326
|
-
${
|
|
4180
|
+
${this._renderFrozenRows(c, l, u)}
|
|
4181
|
+
<div class="ft-body" style="height: ${this.totalBodyHeight}px; width: ${s}px;">
|
|
4182
|
+
${b}
|
|
4327
4183
|
</div>
|
|
4328
|
-
${this.footerData ? this._renderFooter(
|
|
4184
|
+
${this.footerData ? this._renderFooter(c, l, u) : ""}
|
|
4185
|
+
${S}
|
|
4329
4186
|
${x}
|
|
4330
|
-
${b}
|
|
4331
4187
|
${this._renderHeaderContextMenu()}
|
|
4332
4188
|
${this._renderBodyContextMenu()}
|
|
4333
4189
|
${this._renderCommentPopup()}
|
|
@@ -4344,69 +4200,69 @@ var K = {
|
|
|
4344
4200
|
}
|
|
4345
4201
|
_renderFrozenRows(e, t, n) {
|
|
4346
4202
|
let r = this._frozenRowCount;
|
|
4347
|
-
if (r === 0) return
|
|
4348
|
-
let
|
|
4203
|
+
if (r === 0) return o;
|
|
4204
|
+
let i = this._totalRowWidth, s = [];
|
|
4349
4205
|
for (let i = 0; i < r; i++) s.push(this._renderRow(i, e, t, n, i * this.rowHeight));
|
|
4350
|
-
return
|
|
4351
|
-
<div class="ft-frozen-rows" style="top: ${this.headerHeight}px; height: ${this.frozenRowsHeight}px; width: ${
|
|
4206
|
+
return a`
|
|
4207
|
+
<div class="ft-frozen-rows" style="top: ${this.headerHeight}px; height: ${this.frozenRowsHeight}px; width: ${i}px;">
|
|
4352
4208
|
${s}
|
|
4353
4209
|
</div>
|
|
4354
4210
|
`;
|
|
4355
4211
|
}
|
|
4356
4212
|
_renderFooter(e, t, n) {
|
|
4357
4213
|
if (!this.footerData) return "";
|
|
4358
|
-
let r = this.visibleColumns,
|
|
4359
|
-
style="position: absolute; top: 0; left: ${s + c}px; width: ${this._checkboxColWidth}px; height: ${
|
|
4214
|
+
let r = this.visibleColumns, i = this.rowHeight, o = this._totalRowWidth, s = this._scrollLeft, c = 0, l = this.selectable ? a`<div class="ft-footer-cell ft-checkbox-cell"
|
|
4215
|
+
style="position: absolute; top: 0; left: ${s + c}px; width: ${this._checkboxColWidth}px; height: ${i}px; z-index: 2;"></div>` : "";
|
|
4360
4216
|
this.selectable && (c += this._checkboxColWidth);
|
|
4361
|
-
let u = this.showRowNumbers ?
|
|
4362
|
-
style="position: absolute; top: 0; left: ${s + c}px; width: 48px; height: ${
|
|
4217
|
+
let u = this.showRowNumbers ? a`<div class="ft-footer-cell ft-row-num"
|
|
4218
|
+
style="position: absolute; top: 0; left: ${s + c}px; width: 48px; height: ${i}px; z-index: 2;"></div>` : "", d = [];
|
|
4363
4219
|
for (let e of n) {
|
|
4364
|
-
let t = r[e], n = this._getColWidth(t), o = t.pinned === "right" ? `position: absolute; top: 0; left: ${this._getPinnedRightLeft(e)}px; width: ${n}px; height: ${
|
|
4365
|
-
d.push(
|
|
4220
|
+
let t = r[e], n = this._getColWidth(t), o = t.pinned === "right" ? `position: absolute; top: 0; left: ${this._getPinnedRightLeft(e)}px; width: ${n}px; height: ${i}px; z-index: 2;` : `position: absolute; top: 0; left: ${s + this._getPinnedLeft(e)}px; width: ${n}px; height: ${i}px; z-index: 2;`;
|
|
4221
|
+
d.push(a`
|
|
4366
4222
|
<div class="ft-footer-cell ft-pinned" role="gridcell" aria-colindex=${e + 1} style=${o}>
|
|
4367
4223
|
${this.footerData[t.key] ?? ""}</div>
|
|
4368
4224
|
`);
|
|
4369
4225
|
}
|
|
4370
4226
|
for (let n = e; n < t; n++) {
|
|
4371
4227
|
let e = r[n], t = this._getColWidth(e), o = this._colLeftOffsets[n] ?? 0, c = e.pinned === "left", l = e.pinned === "right", u = c || l, f;
|
|
4372
|
-
f = c ? `position: absolute; top: 0; left: ${s + this._getPinnedLeft(n)}px; width: ${t}px; height: ${
|
|
4228
|
+
f = c ? `position: absolute; top: 0; left: ${s + this._getPinnedLeft(n)}px; width: ${t}px; height: ${i}px; z-index: 2;` : l ? `position: absolute; top: 0; right: ${-s + this._getPinnedRight(n)}px; width: ${t}px; height: ${i}px; z-index: 2;` : `left: ${o}px; width: ${t}px; height: ${i}px;`, d.push(a`
|
|
4373
4229
|
<div class="ft-footer-cell ${u ? "ft-pinned" : ""}" role="gridcell" aria-colindex=${n + 1} style=${f}>
|
|
4374
4230
|
${this.footerData[e.key] ?? ""}</div>
|
|
4375
4231
|
`);
|
|
4376
4232
|
}
|
|
4377
|
-
return
|
|
4378
|
-
<div class="ft-footer" role="row" aria-rowindex=${this._visibleRowCount + 2} style="width: ${o}px; height: ${
|
|
4233
|
+
return a`
|
|
4234
|
+
<div class="ft-footer" role="row" aria-rowindex=${this._visibleRowCount + 2} style="width: ${o}px; height: ${i}px;">
|
|
4379
4235
|
${l}${u}
|
|
4380
4236
|
${d}
|
|
4381
4237
|
</div>
|
|
4382
4238
|
`;
|
|
4383
4239
|
}
|
|
4384
|
-
_renderRow(
|
|
4385
|
-
let
|
|
4240
|
+
_renderRow(t, n, r, i, o) {
|
|
4241
|
+
let s = this.visibleColumns, c = this._toDataIndex(t), l = this.data[c], u = o ?? t * this.rowHeight, d = this.rowHeight, f = this._totalRowWidth, p = t % 2 == 0 ? "ft-row-even" : "ft-row-odd", m = this.selectable && this._rowSelection.isSelected(t), h = this._scrollLeft, g = 0, _ = this.selectable ? a`
|
|
4386
4242
|
<div class="ft-checkbox-cell"
|
|
4387
|
-
style="position: absolute; top: 0; left: ${
|
|
4243
|
+
style="position: absolute; top: 0; left: ${h + g}px; width: ${this._checkboxColWidth}px; height: ${d}px; z-index: 2;">
|
|
4388
4244
|
<!-- 행 체크박스는 Tab 정지점이 아니다 — 그리드(호스트)가 하나의 정지점이고 행 선택은 Shift+Space 다.
|
|
4389
4245
|
렌더된 행마다 정지점이면 표 하나를 지나는 데 Tab 이 행 수만큼 든다. -->
|
|
4390
|
-
<label class="ft-checkbox-hit"><input type="checkbox" tabindex="-1" aria-label=${
|
|
4391
|
-
.checked=${
|
|
4246
|
+
<label class="ft-checkbox-hit"><input type="checkbox" tabindex="-1" aria-label=${e("selectRow")}
|
|
4247
|
+
.checked=${m}
|
|
4392
4248
|
@click=${(e) => this._onRowCheckboxClick(e)}
|
|
4393
|
-
@change=${(
|
|
4249
|
+
@change=${(e) => this._onRowCheckboxChange(e, t)}></label>
|
|
4394
4250
|
</div>
|
|
4395
4251
|
` : "";
|
|
4396
|
-
this.selectable && (
|
|
4397
|
-
let
|
|
4398
|
-
<div class="ft-row-num ${
|
|
4399
|
-
style="position: absolute; top: 0; left: ${
|
|
4400
|
-
@mousedown=${(
|
|
4401
|
-
@click=${() => this._onRowNumberClick(
|
|
4402
|
-
` : "",
|
|
4403
|
-
for (let
|
|
4404
|
-
for (let
|
|
4405
|
-
return
|
|
4406
|
-
<div class="ft-row ${
|
|
4407
|
-
style="top: ${
|
|
4408
|
-
${
|
|
4409
|
-
${
|
|
4252
|
+
this.selectable && (g += this._checkboxColWidth);
|
|
4253
|
+
let v = this._rowDrag?.active && this._rowDrag.rowIndex === t, y = this.showRowNumbers ? a`
|
|
4254
|
+
<div class="ft-row-num ${v ? "ft-col-dragging" : ""}"
|
|
4255
|
+
style="position: absolute; top: 0; left: ${h + g}px; width: 48px; height: ${d}px; z-index: 2; cursor: grab;"
|
|
4256
|
+
@mousedown=${(e) => this._onRowNumMouseDown(e, t)}
|
|
4257
|
+
@click=${() => this._onRowNumberClick(t)}>${c + 1}</div>
|
|
4258
|
+
` : "", b = [];
|
|
4259
|
+
for (let e of i) b.push(this._renderCell(l, s[e], t, e, this._mergeState(s[e], t)));
|
|
4260
|
+
for (let e = n; e < r; e++) b.push(this._renderCell(l, s[e], t, e, this._mergeState(s[e], t)));
|
|
4261
|
+
return a`
|
|
4262
|
+
<div class="ft-row ${p} ${m ? "ft-row-selected" : ""}" role="row" aria-rowindex=${t + 2}
|
|
4263
|
+
style="top: ${u}px; height: ${d}px; width: ${f}px;">
|
|
4264
|
+
${_}${y}
|
|
4265
|
+
${b}
|
|
4410
4266
|
</div>
|
|
4411
4267
|
`;
|
|
4412
4268
|
}
|
|
@@ -4437,7 +4293,7 @@ var K = {
|
|
|
4437
4293
|
headParity: i % 2 == 0 ? "even" : "odd"
|
|
4438
4294
|
};
|
|
4439
4295
|
}
|
|
4440
|
-
_renderCell(e, t, n, r,
|
|
4296
|
+
_renderCell(e, t, n, r, i = null) {
|
|
4441
4297
|
let s = this._activeCell?.row === n && this._activeCell?.col === r, c = this._editingCell?.row === n && this._editingCell?.col === r, l = this._selection.isInRange(n, r), u = t.pinned === "left", d = t.pinned === "right", f = u || d, p = this._getColWidth(t), m = this.rowHeight, h = this._colLeftOffsets[r] ?? 0, g;
|
|
4442
4298
|
g = u ? `position: absolute; top: 0; left: ${this._scrollLeft + this._getPinnedLeft(r)}px; width: ${p}px; height: ${m}px; z-index: 2;` : d ? `position: absolute; top: 0; left: ${this._getPinnedRightLeft(r)}px; width: ${p}px; height: ${m}px; z-index: 2;` : `left: ${h}px; width: ${p}px; height: ${m}px;`;
|
|
4443
4299
|
let _ = !this._isCellEditable(t);
|
|
@@ -4447,12 +4303,12 @@ var K = {
|
|
|
4447
4303
|
let i = Object.entries(r).map(([e, t]) => `${e}: ${t}`).join("; ");
|
|
4448
4304
|
i && (g += " " + i + ";");
|
|
4449
4305
|
}
|
|
4450
|
-
if (c) return
|
|
4306
|
+
if (c) return a`
|
|
4451
4307
|
<div class="ft-cell ft-editing ft-active ${f ? "ft-pinned" : ""}" role="gridcell"
|
|
4452
4308
|
aria-colindex=${r + 1}
|
|
4453
4309
|
data-col-index=${r}
|
|
4454
4310
|
aria-selected="true"
|
|
4455
|
-
aria-readonly=${_ ? "true" :
|
|
4311
|
+
aria-readonly=${_ ? "true" : o}
|
|
4456
4312
|
style=${g}>
|
|
4457
4313
|
${this._renderEditor(e, t)}
|
|
4458
4314
|
</div>
|
|
@@ -4466,46 +4322,46 @@ var K = {
|
|
|
4466
4322
|
f ? "ft-pinned" : "",
|
|
4467
4323
|
y ? "ft-invalid" : "",
|
|
4468
4324
|
S ? "ft-find-current" : x ? "ft-find-match" : "",
|
|
4469
|
-
|
|
4470
|
-
|
|
4471
|
-
|
|
4325
|
+
i ? `ft-merge-${i.headParity}` : "",
|
|
4326
|
+
i?.continues ? "ft-merge-continued" : "",
|
|
4327
|
+
i?.opensDown ? "ft-merge-open" : "",
|
|
4472
4328
|
t.reveal === "hover" ? "ft-reveal-hover" : ""
|
|
4473
|
-
].filter(Boolean).join(" "),
|
|
4474
|
-
return
|
|
4329
|
+
].filter(Boolean).join(" "), w = this._toDataIndex(n), T = this._comments.get(w)?.get(t.key) ?? null, E = T !== null, O = E ? a`<div class="ft-comment-indicator" title=${T}></div>` : o;
|
|
4330
|
+
return a`
|
|
4475
4331
|
<div class=${E ? C + " ft-has-comment" : C}
|
|
4476
4332
|
role="gridcell"
|
|
4477
4333
|
tabindex="-1"
|
|
4478
4334
|
aria-colindex=${r + 1}
|
|
4479
4335
|
data-col-index=${r}
|
|
4480
4336
|
aria-selected=${v ? "true" : "false"}
|
|
4481
|
-
aria-readonly=${_ ? "true" :
|
|
4482
|
-
aria-invalid=${y ? "true" :
|
|
4483
|
-
title=${y ??
|
|
4337
|
+
aria-readonly=${_ ? "true" : o}
|
|
4338
|
+
aria-invalid=${y ? "true" : o}
|
|
4339
|
+
title=${y ?? o}
|
|
4484
4340
|
style=${g}
|
|
4485
4341
|
@mousedown=${(e) => this._onCellMouseDown(e, n, r)}
|
|
4486
4342
|
@mouseenter=${() => this._onCellMouseEnter(n, r)}
|
|
4487
4343
|
@click=${(e) => this._onCellClickEvent(e, n, r)}
|
|
4488
4344
|
@dblclick=${() => this._onCellDblClick(n, r)}>
|
|
4489
|
-
${
|
|
4490
|
-
${
|
|
4345
|
+
${O}
|
|
4346
|
+
${D(e[t.key], e, t)}
|
|
4491
4347
|
</div>
|
|
4492
4348
|
`;
|
|
4493
4349
|
}
|
|
4494
4350
|
_renderEditor(e, t) {
|
|
4495
4351
|
if (t.editor) return t.editor(e[t.key], e, t);
|
|
4496
4352
|
let n = e[t.key], r = n == null ? "" : String(n);
|
|
4497
|
-
if (t.type === "number") return
|
|
4353
|
+
if (t.type === "number") return a`
|
|
4498
4354
|
<input class="ft-editor ft-editor-number" type="text" inputmode="decimal" aria-label=${t.label}
|
|
4499
|
-
.value=${typeof n == "number" ?
|
|
4355
|
+
.value=${typeof n == "number" ? M(n) : r}
|
|
4500
4356
|
@keydown=${this._onEditorKeyDown}
|
|
4501
4357
|
@blur=${() => this._commitEdit()}>
|
|
4502
4358
|
`;
|
|
4503
4359
|
if (t.type === "date" || t.type === "datetime") {
|
|
4504
4360
|
let e = t.type === "datetime";
|
|
4505
|
-
return
|
|
4361
|
+
return a`
|
|
4506
4362
|
<u-date-picker class="ft-editor ft-editor-${t.type}" size="sm" aria-label=${t.label}
|
|
4507
4363
|
mode=${e ? "datetime" : "date"} ?confirm=${e}
|
|
4508
|
-
.value=${
|
|
4364
|
+
.value=${Ze(n, e)}
|
|
4509
4365
|
@keydown=${this._onEditorKeyDown}
|
|
4510
4366
|
@change=${() => this._commitEdit()}
|
|
4511
4367
|
@blur=${() => this._commitEdit()}></u-date-picker>
|
|
@@ -4513,30 +4369,30 @@ var K = {
|
|
|
4513
4369
|
}
|
|
4514
4370
|
if (t.type === "select" && t.options && t.options.length > 0) {
|
|
4515
4371
|
let e = t.options, r = typeof e[0] == "string";
|
|
4516
|
-
return
|
|
4372
|
+
return a`
|
|
4517
4373
|
<select class="ft-editor" aria-label=${t.label}
|
|
4518
4374
|
@keydown=${this._onEditorKeyDown}
|
|
4519
4375
|
@blur=${() => this._commitEdit()}
|
|
4520
4376
|
@change=${() => this._commitEdit()}>
|
|
4521
|
-
${r ? e.map((e) =>
|
|
4377
|
+
${r ? e.map((e) => a`<option value=${e} ?selected=${e === n}>${e}</option>`) : e.map((e) => a`<option value=${String(e.value)} ?selected=${e.value === n}>${e.label}</option>`)}
|
|
4522
4378
|
</select>
|
|
4523
4379
|
`;
|
|
4524
4380
|
}
|
|
4525
4381
|
if (t.autocomplete) {
|
|
4526
4382
|
let e = this._autocompleteState?.candidates ?? [], n = this._autocompleteState?.activeIndex ?? -1;
|
|
4527
|
-
return
|
|
4383
|
+
return a`
|
|
4528
4384
|
<input class="ft-editor" type="text" aria-label=${t.label}
|
|
4529
4385
|
role="combobox" aria-autocomplete="list"
|
|
4530
4386
|
aria-expanded=${e.length > 0 ? "true" : "false"}
|
|
4531
4387
|
aria-controls="ft-autocomplete-list"
|
|
4532
|
-
aria-activedescendant=${n >= 0 && e.length > 0 ? `ft-autocomplete-${n}` :
|
|
4388
|
+
aria-activedescendant=${n >= 0 && e.length > 0 ? `ft-autocomplete-${n}` : o}
|
|
4533
4389
|
.value=${r}
|
|
4534
4390
|
@input=${(e) => this._onAutocompleteInput(e, t)}
|
|
4535
4391
|
@keydown=${this._onEditorKeyDown}
|
|
4536
4392
|
@blur=${() => this._commitEdit()}>
|
|
4537
|
-
${e.length > 0 ?
|
|
4393
|
+
${e.length > 0 ? a`
|
|
4538
4394
|
<div class="ft-autocomplete-dropdown" id="ft-autocomplete-list" role="listbox" aria-label=${t.label}>
|
|
4539
|
-
${e.map((e, t) =>
|
|
4395
|
+
${e.map((e, t) => a`
|
|
4540
4396
|
<div class="ft-autocomplete-item ${t === n ? "ft-autocomplete-active" : ""}"
|
|
4541
4397
|
id=${`ft-autocomplete-${t}`} role="option" aria-selected=${t === n ? "true" : "false"}
|
|
4542
4398
|
@mousedown=${(t) => {
|
|
@@ -4546,10 +4402,10 @@ var K = {
|
|
|
4546
4402
|
</div>
|
|
4547
4403
|
`)}
|
|
4548
4404
|
</div>
|
|
4549
|
-
` :
|
|
4405
|
+
` : o}
|
|
4550
4406
|
`;
|
|
4551
4407
|
}
|
|
4552
|
-
return
|
|
4408
|
+
return a`
|
|
4553
4409
|
<input class="ft-editor" type="text" aria-label=${t.label}
|
|
4554
4410
|
.value=${r}
|
|
4555
4411
|
@keydown=${this._onEditorKeyDown}
|
|
@@ -4557,62 +4413,62 @@ var K = {
|
|
|
4557
4413
|
`;
|
|
4558
4414
|
}
|
|
4559
4415
|
};
|
|
4560
|
-
G([
|
|
4416
|
+
G([c({ type: Array })], Q.prototype, "columns", void 0), G([c({
|
|
4561
4417
|
type: Array,
|
|
4562
4418
|
hasChanged: () => !0
|
|
4563
|
-
})], Q.prototype, "data", null), G([
|
|
4419
|
+
})], Q.prototype, "data", null), G([c({
|
|
4564
4420
|
type: Boolean,
|
|
4565
4421
|
attribute: "clear-undo-on-data-change"
|
|
4566
|
-
})], Q.prototype, "clearUndoOnDataChange", void 0), G([
|
|
4422
|
+
})], Q.prototype, "clearUndoOnDataChange", void 0), G([c({
|
|
4567
4423
|
type: Boolean,
|
|
4568
4424
|
attribute: "clear-selection-on-data-change"
|
|
4569
|
-
})], Q.prototype, "clearSelectionOnDataChange", void 0), G([
|
|
4425
|
+
})], Q.prototype, "clearSelectionOnDataChange", void 0), G([c({
|
|
4570
4426
|
type: Number,
|
|
4571
4427
|
attribute: "row-height"
|
|
4572
|
-
})], Q.prototype, "rowHeight", null), G([
|
|
4428
|
+
})], Q.prototype, "rowHeight", null), G([c({
|
|
4573
4429
|
type: Boolean,
|
|
4574
4430
|
attribute: "show-row-numbers"
|
|
4575
|
-
})], Q.prototype, "showRowNumbers", void 0), G([
|
|
4431
|
+
})], Q.prototype, "showRowNumbers", void 0), G([c({
|
|
4576
4432
|
type: String,
|
|
4577
4433
|
reflect: !0
|
|
4578
|
-
})], Q.prototype, "theme", void 0), G([
|
|
4434
|
+
})], Q.prototype, "theme", void 0), G([c({
|
|
4579
4435
|
type: Number,
|
|
4580
4436
|
attribute: "max-rows"
|
|
4581
|
-
})], Q.prototype, "maxRows", void 0), G([
|
|
4437
|
+
})], Q.prototype, "maxRows", void 0), G([c({ type: Boolean })], Q.prototype, "editable", void 0), G([c({
|
|
4582
4438
|
type: Boolean,
|
|
4583
4439
|
attribute: "show-filters"
|
|
4584
|
-
})], Q.prototype, "showFilters", void 0), G([
|
|
4440
|
+
})], Q.prototype, "showFilters", void 0), G([c({
|
|
4585
4441
|
type: Boolean,
|
|
4586
4442
|
attribute: "show-context-menu"
|
|
4587
|
-
})], Q.prototype, "showContextMenu", void 0), G([
|
|
4443
|
+
})], Q.prototype, "showContextMenu", void 0), G([c({
|
|
4588
4444
|
type: Number,
|
|
4589
4445
|
attribute: "frozen-rows"
|
|
4590
|
-
})], Q.prototype, "frozenRows", void 0), G([
|
|
4446
|
+
})], Q.prototype, "frozenRows", void 0), G([c({
|
|
4591
4447
|
type: String,
|
|
4592
4448
|
attribute: "empty-message"
|
|
4593
|
-
})], Q.prototype, "emptyMessage", void 0), G([
|
|
4449
|
+
})], Q.prototype, "emptyMessage", void 0), G([c({
|
|
4594
4450
|
type: String,
|
|
4595
4451
|
attribute: "no-matching-message"
|
|
4596
|
-
})], Q.prototype, "noMatchingMessage", void 0), G([
|
|
4452
|
+
})], Q.prototype, "noMatchingMessage", void 0), G([c({
|
|
4597
4453
|
type: Boolean,
|
|
4598
4454
|
reflect: !0
|
|
4599
|
-
})], Q.prototype, "loading", void 0), G([
|
|
4455
|
+
})], Q.prototype, "loading", void 0), G([c({
|
|
4600
4456
|
type: Boolean,
|
|
4601
4457
|
attribute: "import-enabled"
|
|
4602
|
-
})], Q.prototype, "importEnabled", void 0), G([
|
|
4458
|
+
})], Q.prototype, "importEnabled", void 0), G([c({ type: Boolean })], Q.prototype, "selectable", void 0), G([c({
|
|
4603
4459
|
type: String,
|
|
4604
4460
|
attribute: "selection-mode"
|
|
4605
|
-
})], Q.prototype, "selectionMode", null), G([
|
|
4461
|
+
})], Q.prototype, "selectionMode", null), G([c({
|
|
4606
4462
|
type: String,
|
|
4607
4463
|
attribute: "data-mode"
|
|
4608
|
-
})], Q.prototype, "dataMode", void 0), G([
|
|
4464
|
+
})], Q.prototype, "dataMode", void 0), G([c({
|
|
4609
4465
|
type: Object,
|
|
4610
4466
|
attribute: "footer-data"
|
|
4611
|
-
})], Q.prototype, "footerData", void 0), G([
|
|
4467
|
+
})], Q.prototype, "footerData", void 0), G([c({ attribute: !1 })], Q.prototype, "stylesheets", void 0), G([c({
|
|
4612
4468
|
type: Number,
|
|
4613
4469
|
attribute: "max-undo-size"
|
|
4614
|
-
})], Q.prototype, "maxUndoSize", null), G([
|
|
4615
|
-
function
|
|
4470
|
+
})], Q.prototype, "maxUndoSize", null), G([l()], Q.prototype, "_scrollTop", void 0), G([l()], Q.prototype, "_scrollLeft", void 0), G([l()], Q.prototype, "_viewportHeight", void 0), G([l()], Q.prototype, "_viewportWidth", void 0), G([l()], Q.prototype, "_activeCell", void 0), G([l()], Q.prototype, "_headerCol", void 0), G([l()], Q.prototype, "_editingCell", void 0), G([l()], Q.prototype, "_sortCriteria", void 0), G([l()], Q.prototype, "_openFilterKey", void 0), G([l()], Q.prototype, "_rowSelectionVersion", void 0), G([l()], Q.prototype, "_autocompleteState", void 0), G([l()], Q.prototype, "_headerMenu", void 0), G([l()], Q.prototype, "_bodyContextMenu", void 0), G([l()], Q.prototype, "_commentPopup", void 0), G([l()], Q.prototype, "_isDragOver", void 0), Q = G([s("flex-table")], Q);
|
|
4471
|
+
function Ze(e, t) {
|
|
4616
4472
|
if (t) {
|
|
4617
4473
|
let t = fe(e);
|
|
4618
4474
|
return /^\d{4}-\d{2}-\d{2} \d{2}:\d{2}$/.test(t) ? t.replace(" ", "T") : void 0;
|
|
@@ -4628,4 +4484,4 @@ function $(e) {
|
|
|
4628
4484
|
}
|
|
4629
4485
|
}
|
|
4630
4486
|
//#endregion
|
|
4631
|
-
export {
|
|
4487
|
+
export { k as a, A as i, W as n, D as o, z as r, Q as t };
|