@expcat/tigercat-core 1.4.0 → 1.5.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/dist/{datepicker-DXzS_8l8.d.cts → datepicker-gSOJN_pQ.d.cts} +1 -1
- package/dist/{datepicker-DXzS_8l8.d.ts → datepicker-gSOJN_pQ.d.ts} +1 -1
- package/dist/datepicker-locales/ar-SA.d.cts +1 -1
- package/dist/datepicker-locales/ar-SA.d.ts +1 -1
- package/dist/datepicker-locales/de-DE.d.cts +1 -1
- package/dist/datepicker-locales/de-DE.d.ts +1 -1
- package/dist/datepicker-locales/en-US.d.cts +1 -1
- package/dist/datepicker-locales/en-US.d.ts +1 -1
- package/dist/datepicker-locales/es-ES.d.cts +1 -1
- package/dist/datepicker-locales/es-ES.d.ts +1 -1
- package/dist/datepicker-locales/fr-FR.d.cts +1 -1
- package/dist/datepicker-locales/fr-FR.d.ts +1 -1
- package/dist/datepicker-locales/id-ID.d.cts +1 -1
- package/dist/datepicker-locales/id-ID.d.ts +1 -1
- package/dist/datepicker-locales/ja-JP.d.cts +1 -1
- package/dist/datepicker-locales/ja-JP.d.ts +1 -1
- package/dist/datepicker-locales/ko-KR.d.cts +1 -1
- package/dist/datepicker-locales/ko-KR.d.ts +1 -1
- package/dist/datepicker-locales/pt-BR.d.cts +1 -1
- package/dist/datepicker-locales/pt-BR.d.ts +1 -1
- package/dist/datepicker-locales/th-TH.d.cts +1 -1
- package/dist/datepicker-locales/th-TH.d.ts +1 -1
- package/dist/datepicker-locales/vi-VN.d.cts +1 -1
- package/dist/datepicker-locales/vi-VN.d.ts +1 -1
- package/dist/datepicker-locales/zh-CN.d.cts +1 -1
- package/dist/datepicker-locales/zh-CN.d.ts +1 -1
- package/dist/datepicker-locales/zh-TW.d.cts +1 -1
- package/dist/datepicker-locales/zh-TW.d.ts +1 -1
- package/dist/index.cjs +1523 -480
- package/dist/index.d.cts +422 -28
- package/dist/index.d.ts +422 -28
- package/dist/index.js +1471 -479
- package/dist/{locale-DxwhmqfF.d.cts → locale-BTAo7XO1.d.cts} +94 -2
- package/dist/{locale-9tTj1QdZ.d.ts → locale-hhhI2kH6.d.ts} +94 -2
- package/dist/locales/ar-SA.cjs +296 -2
- package/dist/locales/ar-SA.d.cts +2 -2
- package/dist/locales/ar-SA.d.ts +2 -2
- package/dist/locales/ar-SA.js +296 -2
- package/dist/locales/de-DE.cjs +296 -2
- package/dist/locales/de-DE.d.cts +2 -2
- package/dist/locales/de-DE.d.ts +2 -2
- package/dist/locales/de-DE.js +296 -2
- package/dist/locales/en-US.cjs +98 -1
- package/dist/locales/en-US.d.cts +2 -2
- package/dist/locales/en-US.d.ts +2 -2
- package/dist/locales/en-US.js +98 -1
- package/dist/locales/es-ES.cjs +296 -2
- package/dist/locales/es-ES.d.cts +2 -2
- package/dist/locales/es-ES.d.ts +2 -2
- package/dist/locales/es-ES.js +296 -2
- package/dist/locales/fr-FR.cjs +296 -2
- package/dist/locales/fr-FR.d.cts +2 -2
- package/dist/locales/fr-FR.d.ts +2 -2
- package/dist/locales/fr-FR.js +296 -2
- package/dist/locales/id-ID.cjs +443 -2
- package/dist/locales/id-ID.d.cts +2 -2
- package/dist/locales/id-ID.d.ts +2 -2
- package/dist/locales/id-ID.js +441 -2
- package/dist/locales/ja-JP.cjs +443 -2
- package/dist/locales/ja-JP.d.cts +2 -2
- package/dist/locales/ja-JP.d.ts +2 -2
- package/dist/locales/ja-JP.js +441 -2
- package/dist/locales/ko-KR.cjs +443 -2
- package/dist/locales/ko-KR.d.cts +2 -2
- package/dist/locales/ko-KR.d.ts +2 -2
- package/dist/locales/ko-KR.js +441 -2
- package/dist/locales/pt-BR.cjs +296 -2
- package/dist/locales/pt-BR.d.cts +2 -2
- package/dist/locales/pt-BR.d.ts +2 -2
- package/dist/locales/pt-BR.js +296 -2
- package/dist/locales/th-TH.cjs +443 -2
- package/dist/locales/th-TH.d.cts +2 -2
- package/dist/locales/th-TH.d.ts +2 -2
- package/dist/locales/th-TH.js +441 -2
- package/dist/locales/vi-VN.cjs +443 -2
- package/dist/locales/vi-VN.d.cts +2 -2
- package/dist/locales/vi-VN.d.ts +2 -2
- package/dist/locales/vi-VN.js +441 -2
- package/dist/locales/zh-CN.cjs +98 -1
- package/dist/locales/zh-CN.d.cts +2 -2
- package/dist/locales/zh-CN.d.ts +2 -2
- package/dist/locales/zh-CN.js +98 -1
- package/dist/locales/zh-TW.cjs +443 -2
- package/dist/locales/zh-TW.d.cts +2 -2
- package/dist/locales/zh-TW.d.ts +2 -2
- package/dist/locales/zh-TW.js +441 -2
- package/dist/{table-export-GRimhvlM.d.ts → table-export-CfdzU6Y5.d.ts} +2 -2
- package/dist/{table-export-BMBH75rj.d.cts → table-export-vfyBzKui.d.cts} +2 -2
- package/dist/tailwind/modern.cjs +75 -80
- package/dist/tailwind/modern.d.cts +2 -3
- package/dist/tailwind/modern.d.ts +2 -3
- package/dist/tailwind/modern.js +75 -80
- package/dist/{tailwind-entry-D4_sseNi.d.ts → tailwind-entry-CNBAH7iv.d.cts} +7 -41
- package/dist/{tailwind-entry-DUchHtjs.d.cts → tailwind-entry-CNBAH7iv.d.ts} +7 -41
- package/dist/tailwind.cjs +123 -70
- package/dist/tailwind.d.cts +2 -3
- package/dist/tailwind.d.ts +2 -3
- package/dist/tailwind.js +123 -70
- package/dist/utils/table-export.d.cts +3 -3
- package/dist/utils/table-export.d.ts +3 -3
- package/package.json +4 -3
- package/tokens/tailwind-tokens.js +6 -3
- package/tokens/tokens.css +30 -15
- package/dist/types-CJYAW1ql.d-DDBFn6KB.d.cts +0 -126
- package/dist/types-CJYAW1ql.d-DDBFn6KB.d.ts +0 -126
package/dist/index.js
CHANGED
|
@@ -472,37 +472,65 @@ function getPieDrawAnimationStyle(circumference, targetOffset, durationMs = 800)
|
|
|
472
472
|
|
|
473
473
|
// src/utils/helpers/slider-utils.ts
|
|
474
474
|
function sliderNormalizeValue(value, min, max, step = 1) {
|
|
475
|
-
const
|
|
476
|
-
const
|
|
477
|
-
|
|
475
|
+
const safeMin = Number.isFinite(min) ? min : 0;
|
|
476
|
+
const safeMax = Number.isFinite(max) ? max : safeMin;
|
|
477
|
+
const lower = Math.min(safeMin, safeMax);
|
|
478
|
+
const upper = Math.max(safeMin, safeMax);
|
|
479
|
+
const safeStep = Number.isFinite(step) && step > 0 ? step : 1;
|
|
480
|
+
const safeValue = Number.isFinite(value) ? value : lower;
|
|
481
|
+
const clamped = Math.min(Math.max(safeValue, lower), upper);
|
|
482
|
+
const stepped = Math.round((clamped - lower) / safeStep) * safeStep + lower;
|
|
483
|
+
return Math.min(Math.max(stepped, lower), upper);
|
|
484
|
+
}
|
|
485
|
+
function sliderResolveMarks(marks, min, max) {
|
|
486
|
+
if (!marks) return {};
|
|
487
|
+
if (typeof marks === "object") return marks;
|
|
488
|
+
const safeMin = Number.isFinite(min) ? min : 0;
|
|
489
|
+
const safeMax = Number.isFinite(max) ? max : safeMin;
|
|
490
|
+
const lower = Math.min(safeMin, safeMax);
|
|
491
|
+
const upper = Math.max(safeMin, safeMax);
|
|
492
|
+
if (lower === upper) return { [lower]: String(lower) };
|
|
493
|
+
return { [lower]: String(lower), [upper]: String(upper) };
|
|
478
494
|
}
|
|
479
495
|
function sliderGetPercentage(value, min, max) {
|
|
480
|
-
|
|
481
|
-
|
|
496
|
+
const safeMin = Number.isFinite(min) ? min : 0;
|
|
497
|
+
const safeMax = Number.isFinite(max) ? max : safeMin;
|
|
498
|
+
const lower = Math.min(safeMin, safeMax);
|
|
499
|
+
const upper = Math.max(safeMin, safeMax);
|
|
500
|
+
if (upper === lower) return 0;
|
|
501
|
+
const safeValue = Number.isFinite(value) ? value : lower;
|
|
502
|
+
return (Math.min(Math.max(safeValue, lower), upper) - lower) / (upper - lower) * 100;
|
|
482
503
|
}
|
|
483
504
|
function sliderGetValueFromPosition(position, trackWidth, min, max, step = 1) {
|
|
484
|
-
|
|
485
|
-
const
|
|
486
|
-
const
|
|
487
|
-
|
|
505
|
+
const safeMin = Number.isFinite(min) ? min : 0;
|
|
506
|
+
const safeMax = Number.isFinite(max) ? max : safeMin;
|
|
507
|
+
const lower = Math.min(safeMin, safeMax);
|
|
508
|
+
const upper = Math.max(safeMin, safeMax);
|
|
509
|
+
if (!Number.isFinite(trackWidth) || trackWidth <= 0) return lower;
|
|
510
|
+
const safePosition = Number.isFinite(position) ? Math.min(Math.max(position, 0), trackWidth) : 0;
|
|
511
|
+
const ratio = safePosition / trackWidth;
|
|
512
|
+
const rawValue = ratio * (upper - lower) + lower;
|
|
513
|
+
return sliderNormalizeValue(rawValue, lower, upper, step);
|
|
488
514
|
}
|
|
489
515
|
function sliderGetKeyboardValue(key, currentValue, min, max, step = 1, largeStep) {
|
|
490
|
-
const
|
|
516
|
+
const safeStep = Number.isFinite(step) && step > 0 ? step : 1;
|
|
517
|
+
const bigStep = Number.isFinite(largeStep) && largeStep > 0 ? largeStep : safeStep * 10;
|
|
518
|
+
const safeCurrent = sliderNormalizeValue(currentValue, min, max, safeStep);
|
|
491
519
|
switch (key) {
|
|
492
520
|
case "ArrowRight":
|
|
493
521
|
case "ArrowUp":
|
|
494
|
-
return sliderNormalizeValue(
|
|
522
|
+
return sliderNormalizeValue(safeCurrent + safeStep, min, max, safeStep);
|
|
495
523
|
case "ArrowLeft":
|
|
496
524
|
case "ArrowDown":
|
|
497
|
-
return sliderNormalizeValue(
|
|
525
|
+
return sliderNormalizeValue(safeCurrent - safeStep, min, max, safeStep);
|
|
498
526
|
case "PageUp":
|
|
499
|
-
return sliderNormalizeValue(
|
|
527
|
+
return sliderNormalizeValue(safeCurrent + bigStep, min, max, safeStep);
|
|
500
528
|
case "PageDown":
|
|
501
|
-
return sliderNormalizeValue(
|
|
529
|
+
return sliderNormalizeValue(safeCurrent - bigStep, min, max, safeStep);
|
|
502
530
|
case "Home":
|
|
503
|
-
return min;
|
|
531
|
+
return sliderNormalizeValue(min, min, max, safeStep);
|
|
504
532
|
case "End":
|
|
505
|
-
return max;
|
|
533
|
+
return sliderNormalizeValue(max, min, max, safeStep);
|
|
506
534
|
default:
|
|
507
535
|
return null;
|
|
508
536
|
}
|
|
@@ -1151,14 +1179,23 @@ var TIGER_LOCALE_KEYS = [
|
|
|
1151
1179
|
"locale",
|
|
1152
1180
|
"direction",
|
|
1153
1181
|
"common",
|
|
1182
|
+
"empty",
|
|
1154
1183
|
"modal",
|
|
1155
1184
|
"drawer",
|
|
1185
|
+
"qrcode",
|
|
1186
|
+
"timeline",
|
|
1156
1187
|
"upload",
|
|
1157
1188
|
"pagination",
|
|
1158
1189
|
"table",
|
|
1159
1190
|
"datePicker",
|
|
1160
1191
|
"timePicker",
|
|
1161
1192
|
"formWizard",
|
|
1193
|
+
"tour",
|
|
1194
|
+
"calendar",
|
|
1195
|
+
"fileManager",
|
|
1196
|
+
"imageViewer",
|
|
1197
|
+
"imageEditor",
|
|
1198
|
+
"status",
|
|
1162
1199
|
"taskBoard",
|
|
1163
1200
|
"formValidation"
|
|
1164
1201
|
];
|
|
@@ -1200,14 +1237,23 @@ function mergeTigerLocale(base, override) {
|
|
|
1200
1237
|
locale: override?.locale ?? base?.locale,
|
|
1201
1238
|
direction: override?.direction ?? base?.direction,
|
|
1202
1239
|
common: { ...base?.common, ...override?.common },
|
|
1240
|
+
empty: { ...base?.empty, ...override?.empty },
|
|
1203
1241
|
modal: { ...base?.modal, ...override?.modal },
|
|
1204
1242
|
drawer: { ...base?.drawer, ...override?.drawer },
|
|
1243
|
+
qrcode: { ...base?.qrcode, ...override?.qrcode },
|
|
1244
|
+
timeline: { ...base?.timeline, ...override?.timeline },
|
|
1205
1245
|
upload: { ...base?.upload, ...override?.upload },
|
|
1206
1246
|
pagination: { ...base?.pagination, ...override?.pagination },
|
|
1207
1247
|
table: { ...base?.table, ...override?.table },
|
|
1208
1248
|
datePicker: { ...base?.datePicker, ...override?.datePicker },
|
|
1209
1249
|
timePicker: { ...base?.timePicker, ...override?.timePicker },
|
|
1210
1250
|
formWizard: { ...base?.formWizard, ...override?.formWizard },
|
|
1251
|
+
tour: { ...base?.tour, ...override?.tour },
|
|
1252
|
+
calendar: { ...base?.calendar, ...override?.calendar },
|
|
1253
|
+
fileManager: { ...base?.fileManager, ...override?.fileManager },
|
|
1254
|
+
imageViewer: { ...base?.imageViewer, ...override?.imageViewer },
|
|
1255
|
+
imageEditor: { ...base?.imageEditor, ...override?.imageEditor },
|
|
1256
|
+
status: { ...base?.status, ...override?.status },
|
|
1211
1257
|
taskBoard: { ...base?.taskBoard, ...override?.taskBoard },
|
|
1212
1258
|
formValidation: { ...base?.formValidation, ...override?.formValidation }
|
|
1213
1259
|
};
|
|
@@ -1270,6 +1316,59 @@ var ZH_CN_FORM_WIZARD_LABELS = {
|
|
|
1270
1316
|
nextText: "\u4E0B\u4E00\u6B65",
|
|
1271
1317
|
finishText: "\u5B8C\u6210"
|
|
1272
1318
|
};
|
|
1319
|
+
var DEFAULT_TOUR_LABELS = {
|
|
1320
|
+
prevText: "Previous",
|
|
1321
|
+
nextText: "Next",
|
|
1322
|
+
finishText: "Finish",
|
|
1323
|
+
closeAriaLabel: "Close tour"
|
|
1324
|
+
};
|
|
1325
|
+
var ZH_CN_TOUR_LABELS = {
|
|
1326
|
+
prevText: "\u4E0A\u4E00\u6B65",
|
|
1327
|
+
nextText: "\u4E0B\u4E00\u6B65",
|
|
1328
|
+
finishText: "\u5B8C\u6210",
|
|
1329
|
+
closeAriaLabel: "\u5173\u95ED\u5BFC\u89C8"
|
|
1330
|
+
};
|
|
1331
|
+
function getTourLabels(locale, overrides) {
|
|
1332
|
+
const isZh = locale?.locale?.startsWith("zh");
|
|
1333
|
+
const defaultLabels = isZh ? ZH_CN_TOUR_LABELS : DEFAULT_TOUR_LABELS;
|
|
1334
|
+
return {
|
|
1335
|
+
prevText: overrides?.prevText ?? locale?.tour?.prevText ?? locale?.formWizard?.prevText ?? defaultLabels.prevText,
|
|
1336
|
+
nextText: overrides?.nextText ?? locale?.tour?.nextText ?? locale?.formWizard?.nextText ?? defaultLabels.nextText,
|
|
1337
|
+
finishText: overrides?.finishText ?? locale?.tour?.finishText ?? locale?.formWizard?.finishText ?? defaultLabels.finishText,
|
|
1338
|
+
closeAriaLabel: overrides?.closeAriaLabel ?? locale?.tour?.closeAriaLabel ?? locale?.common?.closeText ?? defaultLabels.closeAriaLabel
|
|
1339
|
+
};
|
|
1340
|
+
}
|
|
1341
|
+
var DEFAULT_CALENDAR_LABELS = {
|
|
1342
|
+
previousMonth: "Previous month",
|
|
1343
|
+
nextMonth: "Next month",
|
|
1344
|
+
previousYear: "Previous year",
|
|
1345
|
+
nextYear: "Next year",
|
|
1346
|
+
yearSelectAriaLabel: "Year",
|
|
1347
|
+
monthSelectAriaLabel: "Month",
|
|
1348
|
+
daySelectAriaLabel: "Day"
|
|
1349
|
+
};
|
|
1350
|
+
var ZH_CN_CALENDAR_LABELS = {
|
|
1351
|
+
previousMonth: "\u4E0A\u4E2A\u6708",
|
|
1352
|
+
nextMonth: "\u4E0B\u4E2A\u6708",
|
|
1353
|
+
previousYear: "\u4E0A\u4E00\u5E74",
|
|
1354
|
+
nextYear: "\u4E0B\u4E00\u5E74",
|
|
1355
|
+
yearSelectAriaLabel: "\u5E74\u4EFD",
|
|
1356
|
+
monthSelectAriaLabel: "\u6708\u4EFD",
|
|
1357
|
+
daySelectAriaLabel: "\u65E5\u671F"
|
|
1358
|
+
};
|
|
1359
|
+
function getCalendarLabels(locale) {
|
|
1360
|
+
const isZh = locale?.locale?.startsWith("zh");
|
|
1361
|
+
const defaultLabels = isZh ? ZH_CN_CALENDAR_LABELS : DEFAULT_CALENDAR_LABELS;
|
|
1362
|
+
return {
|
|
1363
|
+
previousMonth: locale?.calendar?.previousMonth ?? defaultLabels.previousMonth,
|
|
1364
|
+
nextMonth: locale?.calendar?.nextMonth ?? defaultLabels.nextMonth,
|
|
1365
|
+
previousYear: locale?.calendar?.previousYear ?? defaultLabels.previousYear,
|
|
1366
|
+
nextYear: locale?.calendar?.nextYear ?? defaultLabels.nextYear,
|
|
1367
|
+
yearSelectAriaLabel: locale?.calendar?.yearSelectAriaLabel ?? defaultLabels.yearSelectAriaLabel,
|
|
1368
|
+
monthSelectAriaLabel: locale?.calendar?.monthSelectAriaLabel ?? defaultLabels.monthSelectAriaLabel,
|
|
1369
|
+
daySelectAriaLabel: locale?.calendar?.daySelectAriaLabel ?? defaultLabels.daySelectAriaLabel
|
|
1370
|
+
};
|
|
1371
|
+
}
|
|
1273
1372
|
function getFormWizardLabels(locale, overrides) {
|
|
1274
1373
|
const isZh = locale?.locale?.startsWith("zh");
|
|
1275
1374
|
const defaultLabels = isZh ? ZH_CN_FORM_WIZARD_LABELS : DEFAULT_FORM_WIZARD_LABELS;
|
|
@@ -1320,7 +1419,15 @@ var DEFAULT_TABLE_LABELS = {
|
|
|
1320
1419
|
columnSettingsText: "Column settings",
|
|
1321
1420
|
columnSettingsAriaLabel: "Column settings",
|
|
1322
1421
|
lockColumnAriaLabel: "Lock column {column}",
|
|
1323
|
-
unlockColumnAriaLabel: "Unlock column {column}"
|
|
1422
|
+
unlockColumnAriaLabel: "Unlock column {column}",
|
|
1423
|
+
allText: "All",
|
|
1424
|
+
filterPlaceholder: "Filter...",
|
|
1425
|
+
exportCsvText: "Export CSV",
|
|
1426
|
+
exportExcelText: "Export Excel",
|
|
1427
|
+
exportCsvAriaLabel: "Export to CSV",
|
|
1428
|
+
exportExcelAriaLabel: "Export to Excel",
|
|
1429
|
+
expandRowAriaLabel: "Expand row",
|
|
1430
|
+
collapseRowAriaLabel: "Collapse row"
|
|
1324
1431
|
};
|
|
1325
1432
|
var ZH_CN_TABLE_LABELS = {
|
|
1326
1433
|
emptyText: "\u6682\u65E0\u6570\u636E",
|
|
@@ -1339,7 +1446,15 @@ var ZH_CN_TABLE_LABELS = {
|
|
|
1339
1446
|
columnSettingsText: "\u5217\u8BBE\u7F6E",
|
|
1340
1447
|
columnSettingsAriaLabel: "\u5217\u8BBE\u7F6E",
|
|
1341
1448
|
lockColumnAriaLabel: "\u9501\u5B9A{column}\u5217",
|
|
1342
|
-
unlockColumnAriaLabel: "\u53D6\u6D88\u9501\u5B9A{column}\u5217"
|
|
1449
|
+
unlockColumnAriaLabel: "\u53D6\u6D88\u9501\u5B9A{column}\u5217",
|
|
1450
|
+
allText: "\u5168\u90E8",
|
|
1451
|
+
filterPlaceholder: "\u7B5B\u9009...",
|
|
1452
|
+
exportCsvText: "\u5BFC\u51FA CSV",
|
|
1453
|
+
exportExcelText: "\u5BFC\u51FA Excel",
|
|
1454
|
+
exportCsvAriaLabel: "\u5BFC\u51FA\u4E3A CSV",
|
|
1455
|
+
exportExcelAriaLabel: "\u5BFC\u51FA\u4E3A Excel",
|
|
1456
|
+
expandRowAriaLabel: "\u5C55\u5F00\u884C",
|
|
1457
|
+
collapseRowAriaLabel: "\u6536\u8D77\u884C"
|
|
1343
1458
|
};
|
|
1344
1459
|
function getTableLabels(locale, overrides) {
|
|
1345
1460
|
const isZh = !!locale?.locale?.startsWith("zh") || locale?.common?.emptyText === "\u6682\u65E0\u6570\u636E" || locale?.table?.searchButtonText === "\u641C\u7D22";
|
|
@@ -1361,7 +1476,15 @@ function getTableLabels(locale, overrides) {
|
|
|
1361
1476
|
columnSettingsText: overrides?.columnSettingsText ?? locale?.table?.columnSettingsText ?? defaultLabels.columnSettingsText,
|
|
1362
1477
|
columnSettingsAriaLabel: overrides?.columnSettingsAriaLabel ?? locale?.table?.columnSettingsAriaLabel ?? defaultLabels.columnSettingsAriaLabel,
|
|
1363
1478
|
lockColumnAriaLabel: overrides?.lockColumnAriaLabel ?? locale?.table?.lockColumnAriaLabel ?? defaultLabels.lockColumnAriaLabel,
|
|
1364
|
-
unlockColumnAriaLabel: overrides?.unlockColumnAriaLabel ?? locale?.table?.unlockColumnAriaLabel ?? defaultLabels.unlockColumnAriaLabel
|
|
1479
|
+
unlockColumnAriaLabel: overrides?.unlockColumnAriaLabel ?? locale?.table?.unlockColumnAriaLabel ?? defaultLabels.unlockColumnAriaLabel,
|
|
1480
|
+
allText: overrides?.allText ?? locale?.table?.allText ?? defaultLabels.allText,
|
|
1481
|
+
filterPlaceholder: overrides?.filterPlaceholder ?? locale?.table?.filterPlaceholder ?? defaultLabels.filterPlaceholder,
|
|
1482
|
+
exportCsvText: overrides?.exportCsvText ?? locale?.table?.exportCsvText ?? defaultLabels.exportCsvText,
|
|
1483
|
+
exportExcelText: overrides?.exportExcelText ?? locale?.table?.exportExcelText ?? defaultLabels.exportExcelText,
|
|
1484
|
+
exportCsvAriaLabel: overrides?.exportCsvAriaLabel ?? locale?.table?.exportCsvAriaLabel ?? defaultLabels.exportCsvAriaLabel,
|
|
1485
|
+
exportExcelAriaLabel: overrides?.exportExcelAriaLabel ?? locale?.table?.exportExcelAriaLabel ?? defaultLabels.exportExcelAriaLabel,
|
|
1486
|
+
expandRowAriaLabel: overrides?.expandRowAriaLabel ?? locale?.table?.expandRowAriaLabel ?? defaultLabels.expandRowAriaLabel,
|
|
1487
|
+
collapseRowAriaLabel: overrides?.collapseRowAriaLabel ?? locale?.table?.collapseRowAriaLabel ?? defaultLabels.collapseRowAriaLabel
|
|
1365
1488
|
};
|
|
1366
1489
|
}
|
|
1367
1490
|
function formatTableSelectRowAriaLabel(template, row, locale) {
|
|
@@ -1373,6 +1496,7 @@ function formatTableSortByText(template, column) {
|
|
|
1373
1496
|
var DEFAULT_TASK_BOARD_LABELS = {
|
|
1374
1497
|
emptyColumnText: "No tasks",
|
|
1375
1498
|
addCardText: "Add task",
|
|
1499
|
+
addColumnText: "Add column",
|
|
1376
1500
|
wipLimitText: "WIP limit: {limit}",
|
|
1377
1501
|
dragHintText: "Drag to move",
|
|
1378
1502
|
boardAriaLabel: "Task Board"
|
|
@@ -1380,6 +1504,7 @@ var DEFAULT_TASK_BOARD_LABELS = {
|
|
|
1380
1504
|
var ZH_CN_TASK_BOARD_LABELS = {
|
|
1381
1505
|
emptyColumnText: "\u6682\u65E0\u4EFB\u52A1",
|
|
1382
1506
|
addCardText: "\u6DFB\u52A0\u4EFB\u52A1",
|
|
1507
|
+
addColumnText: "\u6DFB\u52A0\u5217",
|
|
1383
1508
|
wipLimitText: "WIP \u9650\u5236: {limit}",
|
|
1384
1509
|
dragHintText: "\u62D6\u62FD\u4EE5\u79FB\u52A8",
|
|
1385
1510
|
boardAriaLabel: "\u4EFB\u52A1\u770B\u677F"
|
|
@@ -1390,11 +1515,153 @@ function getTaskBoardLabels(locale, overrides) {
|
|
|
1390
1515
|
return {
|
|
1391
1516
|
emptyColumnText: overrides?.emptyColumnText ?? locale?.taskBoard?.emptyColumnText ?? defaultLabels.emptyColumnText,
|
|
1392
1517
|
addCardText: overrides?.addCardText ?? locale?.taskBoard?.addCardText ?? defaultLabels.addCardText,
|
|
1518
|
+
addColumnText: overrides?.addColumnText ?? locale?.taskBoard?.addColumnText ?? defaultLabels.addColumnText,
|
|
1393
1519
|
wipLimitText: overrides?.wipLimitText ?? locale?.taskBoard?.wipLimitText ?? defaultLabels.wipLimitText,
|
|
1394
1520
|
dragHintText: overrides?.dragHintText ?? locale?.taskBoard?.dragHintText ?? defaultLabels.dragHintText,
|
|
1395
1521
|
boardAriaLabel: overrides?.boardAriaLabel ?? locale?.taskBoard?.boardAriaLabel ?? defaultLabels.boardAriaLabel
|
|
1396
1522
|
};
|
|
1397
1523
|
}
|
|
1524
|
+
var DEFAULT_FILE_MANAGER_LABELS = {
|
|
1525
|
+
rootText: "Root"
|
|
1526
|
+
};
|
|
1527
|
+
var ZH_CN_FILE_MANAGER_LABELS = {
|
|
1528
|
+
rootText: "\u6839\u76EE\u5F55"
|
|
1529
|
+
};
|
|
1530
|
+
function getFileManagerLabels(locale) {
|
|
1531
|
+
const defaultLabels = locale?.locale?.startsWith("zh") ? ZH_CN_FILE_MANAGER_LABELS : DEFAULT_FILE_MANAGER_LABELS;
|
|
1532
|
+
return {
|
|
1533
|
+
rootText: locale?.fileManager?.rootText ?? defaultLabels.rootText
|
|
1534
|
+
};
|
|
1535
|
+
}
|
|
1536
|
+
var DEFAULT_IMAGE_VIEWER_LABELS = {
|
|
1537
|
+
dialogAriaLabel: "Image viewer",
|
|
1538
|
+
previewDialogAriaLabel: "Image preview",
|
|
1539
|
+
closeAriaLabel: "Close",
|
|
1540
|
+
closePreviewAriaLabel: "Close preview",
|
|
1541
|
+
previousImageAriaLabel: "Previous image",
|
|
1542
|
+
nextImageAriaLabel: "Next image",
|
|
1543
|
+
zoomOutAriaLabel: "Zoom out",
|
|
1544
|
+
resetAriaLabel: "Reset",
|
|
1545
|
+
zoomInAriaLabel: "Zoom in",
|
|
1546
|
+
rotateLeftAriaLabel: "Rotate left",
|
|
1547
|
+
rotateRightAriaLabel: "Rotate right"
|
|
1548
|
+
};
|
|
1549
|
+
var ZH_CN_IMAGE_VIEWER_LABELS = {
|
|
1550
|
+
dialogAriaLabel: "\u56FE\u7247\u67E5\u770B\u5668",
|
|
1551
|
+
previewDialogAriaLabel: "\u56FE\u7247\u9884\u89C8",
|
|
1552
|
+
closeAriaLabel: "\u5173\u95ED",
|
|
1553
|
+
closePreviewAriaLabel: "\u5173\u95ED\u9884\u89C8",
|
|
1554
|
+
previousImageAriaLabel: "\u4E0A\u4E00\u5F20\u56FE\u7247",
|
|
1555
|
+
nextImageAriaLabel: "\u4E0B\u4E00\u5F20\u56FE\u7247",
|
|
1556
|
+
zoomOutAriaLabel: "\u7F29\u5C0F",
|
|
1557
|
+
resetAriaLabel: "\u91CD\u7F6E",
|
|
1558
|
+
zoomInAriaLabel: "\u653E\u5927",
|
|
1559
|
+
rotateLeftAriaLabel: "\u5411\u5DE6\u65CB\u8F6C",
|
|
1560
|
+
rotateRightAriaLabel: "\u5411\u53F3\u65CB\u8F6C"
|
|
1561
|
+
};
|
|
1562
|
+
function getImageViewerLabels(locale) {
|
|
1563
|
+
const defaultLabels = locale?.locale?.startsWith("zh") ? ZH_CN_IMAGE_VIEWER_LABELS : DEFAULT_IMAGE_VIEWER_LABELS;
|
|
1564
|
+
return {
|
|
1565
|
+
dialogAriaLabel: locale?.imageViewer?.dialogAriaLabel ?? defaultLabels.dialogAriaLabel,
|
|
1566
|
+
previewDialogAriaLabel: locale?.imageViewer?.previewDialogAriaLabel ?? defaultLabels.previewDialogAriaLabel,
|
|
1567
|
+
closeAriaLabel: locale?.imageViewer?.closeAriaLabel ?? locale?.common?.closeText ?? defaultLabels.closeAriaLabel,
|
|
1568
|
+
closePreviewAriaLabel: locale?.imageViewer?.closePreviewAriaLabel ?? defaultLabels.closePreviewAriaLabel,
|
|
1569
|
+
previousImageAriaLabel: locale?.imageViewer?.previousImageAriaLabel ?? defaultLabels.previousImageAriaLabel,
|
|
1570
|
+
nextImageAriaLabel: locale?.imageViewer?.nextImageAriaLabel ?? defaultLabels.nextImageAriaLabel,
|
|
1571
|
+
zoomOutAriaLabel: locale?.imageViewer?.zoomOutAriaLabel ?? defaultLabels.zoomOutAriaLabel,
|
|
1572
|
+
resetAriaLabel: locale?.imageViewer?.resetAriaLabel ?? defaultLabels.resetAriaLabel,
|
|
1573
|
+
zoomInAriaLabel: locale?.imageViewer?.zoomInAriaLabel ?? defaultLabels.zoomInAriaLabel,
|
|
1574
|
+
rotateLeftAriaLabel: locale?.imageViewer?.rotateLeftAriaLabel ?? defaultLabels.rotateLeftAriaLabel,
|
|
1575
|
+
rotateRightAriaLabel: locale?.imageViewer?.rotateRightAriaLabel ?? defaultLabels.rotateRightAriaLabel
|
|
1576
|
+
};
|
|
1577
|
+
}
|
|
1578
|
+
var DEFAULT_IMAGE_EDITOR_LABELS = {
|
|
1579
|
+
selectImageText: "Select image",
|
|
1580
|
+
selectImageAriaLabel: "Select image to crop and upload",
|
|
1581
|
+
cropModalTitle: "Crop image",
|
|
1582
|
+
cropCancelText: "Cancel",
|
|
1583
|
+
cropConfirmText: "Confirm crop",
|
|
1584
|
+
cropperDialogAriaLabel: "Image cropper",
|
|
1585
|
+
imageToCropAriaLabel: "Image to crop",
|
|
1586
|
+
moveCropAreaAriaLabel: "Move crop area",
|
|
1587
|
+
resizeCropAreaAriaLabel: "Resize crop area {handle}",
|
|
1588
|
+
loadingCropImageAriaLabel: "Loading image for cropping",
|
|
1589
|
+
annotationToolbarAriaLabel: "Annotation tools",
|
|
1590
|
+
annotationEditorAriaLabel: "Image annotation editor",
|
|
1591
|
+
annotationCanvasAriaLabel: "Image annotation canvas",
|
|
1592
|
+
loadingAnnotationImageAriaLabel: "Loading image for annotation",
|
|
1593
|
+
selectToolText: "Select",
|
|
1594
|
+
rectangleToolText: "Rectangle",
|
|
1595
|
+
ellipseToolText: "Ellipse",
|
|
1596
|
+
polygonToolText: "Polygon",
|
|
1597
|
+
freehandToolText: "Freehand",
|
|
1598
|
+
deleteText: "Delete"
|
|
1599
|
+
};
|
|
1600
|
+
var ZH_CN_IMAGE_EDITOR_LABELS = {
|
|
1601
|
+
selectImageText: "\u9009\u62E9\u56FE\u7247",
|
|
1602
|
+
selectImageAriaLabel: "\u9009\u62E9\u56FE\u7247\u8FDB\u884C\u88C1\u526A\u5E76\u4E0A\u4F20",
|
|
1603
|
+
cropModalTitle: "\u88C1\u526A\u56FE\u7247",
|
|
1604
|
+
cropCancelText: "\u53D6\u6D88",
|
|
1605
|
+
cropConfirmText: "\u786E\u8BA4\u88C1\u526A",
|
|
1606
|
+
cropperDialogAriaLabel: "\u56FE\u7247\u88C1\u526A\u5668",
|
|
1607
|
+
imageToCropAriaLabel: "\u5F85\u88C1\u526A\u56FE\u7247",
|
|
1608
|
+
moveCropAreaAriaLabel: "\u79FB\u52A8\u88C1\u526A\u533A\u57DF",
|
|
1609
|
+
resizeCropAreaAriaLabel: "\u8C03\u6574\u88C1\u526A\u533A\u57DF {handle}",
|
|
1610
|
+
loadingCropImageAriaLabel: "\u6B63\u5728\u52A0\u8F7D\u5F85\u88C1\u526A\u56FE\u7247",
|
|
1611
|
+
annotationToolbarAriaLabel: "\u6807\u6CE8\u5DE5\u5177",
|
|
1612
|
+
annotationEditorAriaLabel: "\u56FE\u7247\u6807\u6CE8\u7F16\u8F91\u5668",
|
|
1613
|
+
annotationCanvasAriaLabel: "\u56FE\u7247\u6807\u6CE8\u753B\u5E03",
|
|
1614
|
+
loadingAnnotationImageAriaLabel: "\u6B63\u5728\u52A0\u8F7D\u5F85\u6807\u6CE8\u56FE\u7247",
|
|
1615
|
+
selectToolText: "\u9009\u62E9",
|
|
1616
|
+
rectangleToolText: "\u77E9\u5F62",
|
|
1617
|
+
ellipseToolText: "\u692D\u5706",
|
|
1618
|
+
polygonToolText: "\u591A\u8FB9\u5F62",
|
|
1619
|
+
freehandToolText: "\u81EA\u7531\u7ED8\u5236",
|
|
1620
|
+
deleteText: "\u5220\u9664"
|
|
1621
|
+
};
|
|
1622
|
+
function getImageEditorLabels(locale) {
|
|
1623
|
+
const defaultLabels = locale?.locale?.startsWith("zh") ? ZH_CN_IMAGE_EDITOR_LABELS : DEFAULT_IMAGE_EDITOR_LABELS;
|
|
1624
|
+
return {
|
|
1625
|
+
selectImageText: locale?.imageEditor?.selectImageText ?? defaultLabels.selectImageText,
|
|
1626
|
+
selectImageAriaLabel: locale?.imageEditor?.selectImageAriaLabel ?? defaultLabels.selectImageAriaLabel,
|
|
1627
|
+
cropModalTitle: locale?.imageEditor?.cropModalTitle ?? defaultLabels.cropModalTitle,
|
|
1628
|
+
cropCancelText: locale?.imageEditor?.cropCancelText ?? locale?.common?.cancelText ?? defaultLabels.cropCancelText,
|
|
1629
|
+
cropConfirmText: locale?.imageEditor?.cropConfirmText ?? locale?.common?.okText ?? defaultLabels.cropConfirmText,
|
|
1630
|
+
cropperDialogAriaLabel: locale?.imageEditor?.cropperDialogAriaLabel ?? defaultLabels.cropperDialogAriaLabel,
|
|
1631
|
+
imageToCropAriaLabel: locale?.imageEditor?.imageToCropAriaLabel ?? defaultLabels.imageToCropAriaLabel,
|
|
1632
|
+
moveCropAreaAriaLabel: locale?.imageEditor?.moveCropAreaAriaLabel ?? defaultLabels.moveCropAreaAriaLabel,
|
|
1633
|
+
resizeCropAreaAriaLabel: locale?.imageEditor?.resizeCropAreaAriaLabel ?? defaultLabels.resizeCropAreaAriaLabel,
|
|
1634
|
+
loadingCropImageAriaLabel: locale?.imageEditor?.loadingCropImageAriaLabel ?? defaultLabels.loadingCropImageAriaLabel,
|
|
1635
|
+
annotationToolbarAriaLabel: locale?.imageEditor?.annotationToolbarAriaLabel ?? defaultLabels.annotationToolbarAriaLabel,
|
|
1636
|
+
annotationEditorAriaLabel: locale?.imageEditor?.annotationEditorAriaLabel ?? defaultLabels.annotationEditorAriaLabel,
|
|
1637
|
+
annotationCanvasAriaLabel: locale?.imageEditor?.annotationCanvasAriaLabel ?? defaultLabels.annotationCanvasAriaLabel,
|
|
1638
|
+
loadingAnnotationImageAriaLabel: locale?.imageEditor?.loadingAnnotationImageAriaLabel ?? defaultLabels.loadingAnnotationImageAriaLabel,
|
|
1639
|
+
selectToolText: locale?.imageEditor?.selectToolText ?? defaultLabels.selectToolText,
|
|
1640
|
+
rectangleToolText: locale?.imageEditor?.rectangleToolText ?? defaultLabels.rectangleToolText,
|
|
1641
|
+
ellipseToolText: locale?.imageEditor?.ellipseToolText ?? defaultLabels.ellipseToolText,
|
|
1642
|
+
polygonToolText: locale?.imageEditor?.polygonToolText ?? defaultLabels.polygonToolText,
|
|
1643
|
+
freehandToolText: locale?.imageEditor?.freehandToolText ?? defaultLabels.freehandToolText,
|
|
1644
|
+
deleteText: locale?.imageEditor?.deleteText ?? defaultLabels.deleteText
|
|
1645
|
+
};
|
|
1646
|
+
}
|
|
1647
|
+
var DEFAULT_STATUS_LABELS = {
|
|
1648
|
+
tagCloseAriaLabel: "Close tag",
|
|
1649
|
+
badgeLabel: "notification",
|
|
1650
|
+
badgeCountLabel: "{count} notifications"
|
|
1651
|
+
};
|
|
1652
|
+
var ZH_CN_STATUS_LABELS = {
|
|
1653
|
+
tagCloseAriaLabel: "\u5173\u95ED\u6807\u7B7E",
|
|
1654
|
+
badgeLabel: "\u901A\u77E5",
|
|
1655
|
+
badgeCountLabel: "{count} \u6761\u901A\u77E5"
|
|
1656
|
+
};
|
|
1657
|
+
function getStatusLabels(locale) {
|
|
1658
|
+
const defaultLabels = locale?.locale?.startsWith("zh") ? ZH_CN_STATUS_LABELS : DEFAULT_STATUS_LABELS;
|
|
1659
|
+
return {
|
|
1660
|
+
tagCloseAriaLabel: locale?.status?.tagCloseAriaLabel ?? defaultLabels.tagCloseAriaLabel,
|
|
1661
|
+
badgeLabel: locale?.status?.badgeLabel ?? defaultLabels.badgeLabel,
|
|
1662
|
+
badgeCountLabel: locale?.status?.badgeCountLabel ?? defaultLabels.badgeCountLabel
|
|
1663
|
+
};
|
|
1664
|
+
}
|
|
1398
1665
|
var DEFAULT_FORM_VALIDATION_LABELS = {
|
|
1399
1666
|
required: "This field is required",
|
|
1400
1667
|
typeString: "Value must be a string",
|
|
@@ -1508,7 +1775,35 @@ var ZH_CN_UPLOAD_LABELS = {
|
|
|
1508
1775
|
previewFileAriaLabel: "\u9884\u89C8 {fileName}"
|
|
1509
1776
|
};
|
|
1510
1777
|
|
|
1511
|
-
// src/utils/datepicker-
|
|
1778
|
+
// src/utils/i18n/datepicker-locales/ar-SA.ts
|
|
1779
|
+
var AR_SA_DATEPICKER_LOCALE = {
|
|
1780
|
+
locale: "ar-SA",
|
|
1781
|
+
labels: {
|
|
1782
|
+
today: "\u0627\u0644\u064A\u0648\u0645",
|
|
1783
|
+
ok: "\u0645\u0648\u0627\u0641\u0642",
|
|
1784
|
+
calendar: "\u0627\u0644\u062A\u0642\u0648\u064A\u0645",
|
|
1785
|
+
toggleCalendar: "\u0641\u062A\u062D \u0627\u0644\u062A\u0642\u0648\u064A\u0645",
|
|
1786
|
+
clearDate: "\u0645\u0633\u062D \u0627\u0644\u062A\u0627\u0631\u064A\u062E",
|
|
1787
|
+
previousMonth: "\u0627\u0644\u0634\u0647\u0631 \u0627\u0644\u0633\u0627\u0628\u0642",
|
|
1788
|
+
nextMonth: "\u0627\u0644\u0634\u0647\u0631 \u0627\u0644\u062A\u0627\u0644\u064A"
|
|
1789
|
+
}
|
|
1790
|
+
};
|
|
1791
|
+
|
|
1792
|
+
// src/utils/i18n/datepicker-locales/de-DE.ts
|
|
1793
|
+
var DE_DE_DATEPICKER_LOCALE = {
|
|
1794
|
+
locale: "de-DE",
|
|
1795
|
+
labels: {
|
|
1796
|
+
today: "Heute",
|
|
1797
|
+
ok: "OK",
|
|
1798
|
+
calendar: "Kalender",
|
|
1799
|
+
toggleCalendar: "Kalender \xF6ffnen",
|
|
1800
|
+
clearDate: "Datum l\xF6schen",
|
|
1801
|
+
previousMonth: "Vorheriger Monat",
|
|
1802
|
+
nextMonth: "N\xE4chster Monat"
|
|
1803
|
+
}
|
|
1804
|
+
};
|
|
1805
|
+
|
|
1806
|
+
// src/utils/i18n/datepicker-locales/en-US.ts
|
|
1512
1807
|
var EN_US_DATEPICKER_LOCALE = {
|
|
1513
1808
|
locale: "en-US",
|
|
1514
1809
|
labels: {
|
|
@@ -1521,22 +1816,11 @@ var EN_US_DATEPICKER_LOCALE = {
|
|
|
1521
1816
|
nextMonth: "Next month"
|
|
1522
1817
|
}
|
|
1523
1818
|
};
|
|
1524
|
-
|
|
1525
|
-
|
|
1819
|
+
|
|
1820
|
+
// src/utils/i18n/datepicker-locales/es-ES.ts
|
|
1821
|
+
var ES_ES_DATEPICKER_LOCALE = {
|
|
1822
|
+
locale: "es-ES",
|
|
1526
1823
|
labels: {
|
|
1527
|
-
today: "\u4ECA\u5929",
|
|
1528
|
-
ok: "\u786E\u5B9A",
|
|
1529
|
-
calendar: "\u65E5\u5386",
|
|
1530
|
-
toggleCalendar: "\u6253\u5F00\u65E5\u5386",
|
|
1531
|
-
clearDate: "\u6E05\u9664\u65E5\u671F",
|
|
1532
|
-
previousMonth: "\u4E0A\u4E2A\u6708",
|
|
1533
|
-
nextMonth: "\u4E0B\u4E2A\u6708"
|
|
1534
|
-
}
|
|
1535
|
-
};
|
|
1536
|
-
var DATEPICKER_LABELS_BY_LANGUAGE = {
|
|
1537
|
-
en: EN_US_DATEPICKER_LOCALE.labels,
|
|
1538
|
-
zh: ZH_CN_DATEPICKER_LOCALE.labels,
|
|
1539
|
-
es: {
|
|
1540
1824
|
today: "Hoy",
|
|
1541
1825
|
ok: "Aceptar",
|
|
1542
1826
|
calendar: "Calendario",
|
|
@@ -1544,8 +1828,13 @@ var DATEPICKER_LABELS_BY_LANGUAGE = {
|
|
|
1544
1828
|
clearDate: "Borrar fecha",
|
|
1545
1829
|
previousMonth: "Mes anterior",
|
|
1546
1830
|
nextMonth: "Mes siguiente"
|
|
1547
|
-
}
|
|
1548
|
-
|
|
1831
|
+
}
|
|
1832
|
+
};
|
|
1833
|
+
|
|
1834
|
+
// src/utils/i18n/datepicker-locales/fr-FR.ts
|
|
1835
|
+
var FR_FR_DATEPICKER_LOCALE = {
|
|
1836
|
+
locale: "fr-FR",
|
|
1837
|
+
labels: {
|
|
1549
1838
|
today: "Aujourd'hui",
|
|
1550
1839
|
ok: "OK",
|
|
1551
1840
|
calendar: "Calendrier",
|
|
@@ -1553,17 +1842,55 @@ var DATEPICKER_LABELS_BY_LANGUAGE = {
|
|
|
1553
1842
|
clearDate: "Effacer la date",
|
|
1554
1843
|
previousMonth: "Mois pr\xE9c\xE9dent",
|
|
1555
1844
|
nextMonth: "Mois suivant"
|
|
1556
|
-
}
|
|
1557
|
-
|
|
1558
|
-
|
|
1845
|
+
}
|
|
1846
|
+
};
|
|
1847
|
+
|
|
1848
|
+
// src/utils/i18n/datepicker-locales/id-ID.ts
|
|
1849
|
+
var ID_ID_DATEPICKER_LOCALE = {
|
|
1850
|
+
locale: "id-ID",
|
|
1851
|
+
labels: {
|
|
1852
|
+
today: "Hari ini",
|
|
1559
1853
|
ok: "OK",
|
|
1560
1854
|
calendar: "Kalender",
|
|
1561
|
-
toggleCalendar: "
|
|
1562
|
-
clearDate: "
|
|
1563
|
-
previousMonth: "
|
|
1564
|
-
nextMonth: "
|
|
1565
|
-
}
|
|
1566
|
-
|
|
1855
|
+
toggleCalendar: "Buka kalender",
|
|
1856
|
+
clearDate: "Hapus tanggal",
|
|
1857
|
+
previousMonth: "Bulan sebelumnya",
|
|
1858
|
+
nextMonth: "Bulan berikutnya"
|
|
1859
|
+
}
|
|
1860
|
+
};
|
|
1861
|
+
|
|
1862
|
+
// src/utils/i18n/datepicker-locales/ja-JP.ts
|
|
1863
|
+
var JA_JP_DATEPICKER_LOCALE = {
|
|
1864
|
+
locale: "ja-JP",
|
|
1865
|
+
labels: {
|
|
1866
|
+
today: "\u4ECA\u65E5",
|
|
1867
|
+
ok: "OK",
|
|
1868
|
+
calendar: "\u30AB\u30EC\u30F3\u30C0\u30FC",
|
|
1869
|
+
toggleCalendar: "\u30AB\u30EC\u30F3\u30C0\u30FC\u3092\u958B\u304F",
|
|
1870
|
+
clearDate: "\u65E5\u4ED8\u3092\u30AF\u30EA\u30A2",
|
|
1871
|
+
previousMonth: "\u524D\u306E\u6708",
|
|
1872
|
+
nextMonth: "\u6B21\u306E\u6708"
|
|
1873
|
+
}
|
|
1874
|
+
};
|
|
1875
|
+
|
|
1876
|
+
// src/utils/i18n/datepicker-locales/ko-KR.ts
|
|
1877
|
+
var KO_KR_DATEPICKER_LOCALE = {
|
|
1878
|
+
locale: "ko-KR",
|
|
1879
|
+
labels: {
|
|
1880
|
+
today: "\uC624\uB298",
|
|
1881
|
+
ok: "\uD655\uC778",
|
|
1882
|
+
calendar: "\uB2EC\uB825",
|
|
1883
|
+
toggleCalendar: "\uB2EC\uB825 \uC5F4\uAE30",
|
|
1884
|
+
clearDate: "\uB0A0\uC9DC \uC9C0\uC6B0\uAE30",
|
|
1885
|
+
previousMonth: "\uC774\uC804 \uB2EC",
|
|
1886
|
+
nextMonth: "\uB2E4\uC74C \uB2EC"
|
|
1887
|
+
}
|
|
1888
|
+
};
|
|
1889
|
+
|
|
1890
|
+
// src/utils/i18n/datepicker-locales/pt-BR.ts
|
|
1891
|
+
var PT_BR_DATEPICKER_LOCALE = {
|
|
1892
|
+
locale: "pt-BR",
|
|
1893
|
+
labels: {
|
|
1567
1894
|
today: "Hoje",
|
|
1568
1895
|
ok: "OK",
|
|
1569
1896
|
calendar: "Calend\xE1rio",
|
|
@@ -1571,17 +1898,93 @@ var DATEPICKER_LABELS_BY_LANGUAGE = {
|
|
|
1571
1898
|
clearDate: "Limpar data",
|
|
1572
1899
|
previousMonth: "M\xEAs anterior",
|
|
1573
1900
|
nextMonth: "Pr\xF3ximo m\xEAs"
|
|
1574
|
-
},
|
|
1575
|
-
ar: {
|
|
1576
|
-
today: "\u0627\u0644\u064A\u0648\u0645",
|
|
1577
|
-
ok: "\u0645\u0648\u0627\u0641\u0642",
|
|
1578
|
-
calendar: "\u0627\u0644\u062A\u0642\u0648\u064A\u0645",
|
|
1579
|
-
toggleCalendar: "\u0641\u062A\u062D \u0627\u0644\u062A\u0642\u0648\u064A\u0645",
|
|
1580
|
-
clearDate: "\u0645\u0633\u062D \u0627\u0644\u062A\u0627\u0631\u064A\u062E",
|
|
1581
|
-
previousMonth: "\u0627\u0644\u0634\u0647\u0631 \u0627\u0644\u0633\u0627\u0628\u0642",
|
|
1582
|
-
nextMonth: "\u0627\u0644\u0634\u0647\u0631 \u0627\u0644\u062A\u0627\u0644\u064A"
|
|
1583
1901
|
}
|
|
1584
1902
|
};
|
|
1903
|
+
|
|
1904
|
+
// src/utils/i18n/datepicker-locales/th-TH.ts
|
|
1905
|
+
var TH_TH_DATEPICKER_LOCALE = {
|
|
1906
|
+
locale: "th-TH",
|
|
1907
|
+
labels: {
|
|
1908
|
+
today: "\u0E27\u0E31\u0E19\u0E19\u0E35\u0E49",
|
|
1909
|
+
ok: "\u0E15\u0E01\u0E25\u0E07",
|
|
1910
|
+
calendar: "\u0E1B\u0E0F\u0E34\u0E17\u0E34\u0E19",
|
|
1911
|
+
toggleCalendar: "\u0E40\u0E1B\u0E34\u0E14\u0E1B\u0E0F\u0E34\u0E17\u0E34\u0E19",
|
|
1912
|
+
clearDate: "\u0E25\u0E49\u0E32\u0E07\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48",
|
|
1913
|
+
previousMonth: "\u0E40\u0E14\u0E37\u0E2D\u0E19\u0E01\u0E48\u0E2D\u0E19\u0E2B\u0E19\u0E49\u0E32",
|
|
1914
|
+
nextMonth: "\u0E40\u0E14\u0E37\u0E2D\u0E19\u0E16\u0E31\u0E14\u0E44\u0E1B"
|
|
1915
|
+
}
|
|
1916
|
+
};
|
|
1917
|
+
|
|
1918
|
+
// src/utils/i18n/datepicker-locales/vi-VN.ts
|
|
1919
|
+
var VI_VN_DATEPICKER_LOCALE = {
|
|
1920
|
+
locale: "vi-VN",
|
|
1921
|
+
labels: {
|
|
1922
|
+
today: "H\xF4m nay",
|
|
1923
|
+
ok: "OK",
|
|
1924
|
+
calendar: "L\u1ECBch",
|
|
1925
|
+
toggleCalendar: "M\u1EDF l\u1ECBch",
|
|
1926
|
+
clearDate: "X\xF3a ng\xE0y",
|
|
1927
|
+
previousMonth: "Th\xE1ng tr\u01B0\u1EDBc",
|
|
1928
|
+
nextMonth: "Th\xE1ng sau"
|
|
1929
|
+
}
|
|
1930
|
+
};
|
|
1931
|
+
|
|
1932
|
+
// src/utils/i18n/datepicker-locales/zh-CN.ts
|
|
1933
|
+
var ZH_CN_DATEPICKER_LOCALE = {
|
|
1934
|
+
locale: "zh-CN",
|
|
1935
|
+
labels: {
|
|
1936
|
+
today: "\u4ECA\u5929",
|
|
1937
|
+
ok: "\u786E\u5B9A",
|
|
1938
|
+
calendar: "\u65E5\u5386",
|
|
1939
|
+
toggleCalendar: "\u6253\u5F00\u65E5\u5386",
|
|
1940
|
+
clearDate: "\u6E05\u9664\u65E5\u671F",
|
|
1941
|
+
previousMonth: "\u4E0A\u4E2A\u6708",
|
|
1942
|
+
nextMonth: "\u4E0B\u4E2A\u6708"
|
|
1943
|
+
}
|
|
1944
|
+
};
|
|
1945
|
+
|
|
1946
|
+
// src/utils/i18n/datepicker-locales/zh-TW.ts
|
|
1947
|
+
var ZH_TW_DATEPICKER_LOCALE = {
|
|
1948
|
+
locale: "zh-TW",
|
|
1949
|
+
labels: {
|
|
1950
|
+
today: "\u4ECA\u5929",
|
|
1951
|
+
ok: "\u78BA\u5B9A",
|
|
1952
|
+
calendar: "\u65E5\u66C6",
|
|
1953
|
+
toggleCalendar: "\u958B\u555F\u65E5\u66C6",
|
|
1954
|
+
clearDate: "\u6E05\u9664\u65E5\u671F",
|
|
1955
|
+
previousMonth: "\u4E0A\u500B\u6708",
|
|
1956
|
+
nextMonth: "\u4E0B\u500B\u6708"
|
|
1957
|
+
}
|
|
1958
|
+
};
|
|
1959
|
+
|
|
1960
|
+
// src/utils/datepicker-i18n.ts
|
|
1961
|
+
var EN_US_DATEPICKER_LOCALE2 = EN_US_DATEPICKER_LOCALE;
|
|
1962
|
+
var ZH_CN_DATEPICKER_LOCALE2 = ZH_CN_DATEPICKER_LOCALE;
|
|
1963
|
+
var DATEPICKER_LOCALES = [
|
|
1964
|
+
EN_US_DATEPICKER_LOCALE,
|
|
1965
|
+
ZH_CN_DATEPICKER_LOCALE,
|
|
1966
|
+
ZH_TW_DATEPICKER_LOCALE,
|
|
1967
|
+
JA_JP_DATEPICKER_LOCALE,
|
|
1968
|
+
KO_KR_DATEPICKER_LOCALE,
|
|
1969
|
+
TH_TH_DATEPICKER_LOCALE,
|
|
1970
|
+
VI_VN_DATEPICKER_LOCALE,
|
|
1971
|
+
ID_ID_DATEPICKER_LOCALE,
|
|
1972
|
+
ES_ES_DATEPICKER_LOCALE,
|
|
1973
|
+
FR_FR_DATEPICKER_LOCALE,
|
|
1974
|
+
DE_DE_DATEPICKER_LOCALE,
|
|
1975
|
+
PT_BR_DATEPICKER_LOCALE,
|
|
1976
|
+
AR_SA_DATEPICKER_LOCALE
|
|
1977
|
+
];
|
|
1978
|
+
var DATEPICKER_LOCALE_BY_ID = new Map(
|
|
1979
|
+
DATEPICKER_LOCALES.map((preset) => [preset.locale.toLowerCase(), preset])
|
|
1980
|
+
);
|
|
1981
|
+
var DATEPICKER_LOCALE_BY_LANGUAGE = /* @__PURE__ */ new Map();
|
|
1982
|
+
for (const preset of DATEPICKER_LOCALES) {
|
|
1983
|
+
const language = preset.locale.split("-")[0]?.toLowerCase();
|
|
1984
|
+
if (language && !DATEPICKER_LOCALE_BY_LANGUAGE.has(language)) {
|
|
1985
|
+
DATEPICKER_LOCALE_BY_LANGUAGE.set(language, preset);
|
|
1986
|
+
}
|
|
1987
|
+
}
|
|
1585
1988
|
function isDatePickerLocaleConfig(value) {
|
|
1586
1989
|
return Boolean(value && typeof value === "object" && "datePicker" in value);
|
|
1587
1990
|
}
|
|
@@ -1597,7 +2000,7 @@ function getDatePickerLocaleCode(locale) {
|
|
|
1597
2000
|
function getDefaultDatePickerLabels(locale) {
|
|
1598
2001
|
const lc = (getDatePickerLocaleCode(locale) ?? "").toLowerCase();
|
|
1599
2002
|
const language = lc.split("-")[0];
|
|
1600
|
-
return
|
|
2003
|
+
return DATEPICKER_LOCALE_BY_ID.get(lc)?.labels ?? DATEPICKER_LOCALE_BY_LANGUAGE.get(language)?.labels ?? EN_US_DATEPICKER_LOCALE2.labels;
|
|
1601
2004
|
}
|
|
1602
2005
|
function getDatePickerLabels(locale, overrides) {
|
|
1603
2006
|
return {
|
|
@@ -2049,6 +2452,12 @@ var enUS = {
|
|
|
2049
2452
|
searchPlaceholder: "Search",
|
|
2050
2453
|
clearText: "Clear"
|
|
2051
2454
|
},
|
|
2455
|
+
empty: {
|
|
2456
|
+
noData: "No data",
|
|
2457
|
+
noDataAvailable: "No data available",
|
|
2458
|
+
noResults: "No results found",
|
|
2459
|
+
error: "Something went wrong"
|
|
2460
|
+
},
|
|
2052
2461
|
modal: {
|
|
2053
2462
|
closeAriaLabel: "Close",
|
|
2054
2463
|
okText: "OK",
|
|
@@ -2057,6 +2466,15 @@ var enUS = {
|
|
|
2057
2466
|
drawer: {
|
|
2058
2467
|
closeAriaLabel: "Close"
|
|
2059
2468
|
},
|
|
2469
|
+
qrcode: {
|
|
2470
|
+
ariaLabel: "QR Code",
|
|
2471
|
+
expiredText: "QR code expired",
|
|
2472
|
+
refreshText: "Refresh",
|
|
2473
|
+
loadingText: "Loading..."
|
|
2474
|
+
},
|
|
2475
|
+
timeline: {
|
|
2476
|
+
pendingText: "Loading..."
|
|
2477
|
+
},
|
|
2060
2478
|
upload: DEFAULT_UPLOAD_LABELS,
|
|
2061
2479
|
pagination: {
|
|
2062
2480
|
totalText: "Total {total} items",
|
|
@@ -2085,17 +2503,85 @@ var enUS = {
|
|
|
2085
2503
|
columnSettingsText: "Column settings",
|
|
2086
2504
|
columnSettingsAriaLabel: "Column settings",
|
|
2087
2505
|
lockColumnAriaLabel: "Lock column {column}",
|
|
2088
|
-
unlockColumnAriaLabel: "Unlock column {column}"
|
|
2506
|
+
unlockColumnAriaLabel: "Unlock column {column}",
|
|
2507
|
+
allText: "All",
|
|
2508
|
+
filterPlaceholder: "Filter...",
|
|
2509
|
+
exportCsvText: "Export CSV",
|
|
2510
|
+
exportExcelText: "Export Excel",
|
|
2511
|
+
exportCsvAriaLabel: "Export to CSV",
|
|
2512
|
+
exportExcelAriaLabel: "Export to Excel",
|
|
2513
|
+
expandRowAriaLabel: "Expand row",
|
|
2514
|
+
collapseRowAriaLabel: "Collapse row"
|
|
2089
2515
|
},
|
|
2516
|
+
datePicker: EN_US_DATEPICKER_LOCALE,
|
|
2090
2517
|
timePicker: DEFAULT_TIME_PICKER_LABELS,
|
|
2091
2518
|
formWizard: {
|
|
2092
2519
|
prevText: "Previous",
|
|
2093
2520
|
nextText: "Next",
|
|
2094
2521
|
finishText: "Finish"
|
|
2095
2522
|
},
|
|
2523
|
+
tour: {
|
|
2524
|
+
prevText: "Previous",
|
|
2525
|
+
nextText: "Next",
|
|
2526
|
+
finishText: "Finish",
|
|
2527
|
+
closeAriaLabel: "Close tour"
|
|
2528
|
+
},
|
|
2529
|
+
calendar: {
|
|
2530
|
+
previousMonth: "Previous month",
|
|
2531
|
+
nextMonth: "Next month",
|
|
2532
|
+
previousYear: "Previous year",
|
|
2533
|
+
nextYear: "Next year",
|
|
2534
|
+
yearSelectAriaLabel: "Year",
|
|
2535
|
+
monthSelectAriaLabel: "Month",
|
|
2536
|
+
daySelectAriaLabel: "Day"
|
|
2537
|
+
},
|
|
2538
|
+
fileManager: {
|
|
2539
|
+
rootText: "Root"
|
|
2540
|
+
},
|
|
2541
|
+
imageViewer: {
|
|
2542
|
+
dialogAriaLabel: "Image viewer",
|
|
2543
|
+
previewDialogAriaLabel: "Image preview",
|
|
2544
|
+
closeAriaLabel: "Close",
|
|
2545
|
+
closePreviewAriaLabel: "Close preview",
|
|
2546
|
+
previousImageAriaLabel: "Previous image",
|
|
2547
|
+
nextImageAriaLabel: "Next image",
|
|
2548
|
+
zoomOutAriaLabel: "Zoom out",
|
|
2549
|
+
resetAriaLabel: "Reset",
|
|
2550
|
+
zoomInAriaLabel: "Zoom in",
|
|
2551
|
+
rotateLeftAriaLabel: "Rotate left",
|
|
2552
|
+
rotateRightAriaLabel: "Rotate right"
|
|
2553
|
+
},
|
|
2554
|
+
imageEditor: {
|
|
2555
|
+
selectImageText: "Select image",
|
|
2556
|
+
selectImageAriaLabel: "Select image to crop and upload",
|
|
2557
|
+
cropModalTitle: "Crop image",
|
|
2558
|
+
cropCancelText: "Cancel",
|
|
2559
|
+
cropConfirmText: "Confirm crop",
|
|
2560
|
+
cropperDialogAriaLabel: "Image cropper",
|
|
2561
|
+
imageToCropAriaLabel: "Image to crop",
|
|
2562
|
+
moveCropAreaAriaLabel: "Move crop area",
|
|
2563
|
+
resizeCropAreaAriaLabel: "Resize crop area {handle}",
|
|
2564
|
+
loadingCropImageAriaLabel: "Loading image for cropping",
|
|
2565
|
+
annotationToolbarAriaLabel: "Annotation tools",
|
|
2566
|
+
annotationEditorAriaLabel: "Image annotation editor",
|
|
2567
|
+
annotationCanvasAriaLabel: "Image annotation canvas",
|
|
2568
|
+
loadingAnnotationImageAriaLabel: "Loading image for annotation",
|
|
2569
|
+
selectToolText: "Select",
|
|
2570
|
+
rectangleToolText: "Rectangle",
|
|
2571
|
+
ellipseToolText: "Ellipse",
|
|
2572
|
+
polygonToolText: "Polygon",
|
|
2573
|
+
freehandToolText: "Freehand",
|
|
2574
|
+
deleteText: "Delete"
|
|
2575
|
+
},
|
|
2576
|
+
status: {
|
|
2577
|
+
tagCloseAriaLabel: "Close tag",
|
|
2578
|
+
badgeLabel: "notification",
|
|
2579
|
+
badgeCountLabel: "{count} notifications"
|
|
2580
|
+
},
|
|
2096
2581
|
taskBoard: {
|
|
2097
2582
|
emptyColumnText: "No tasks",
|
|
2098
2583
|
addCardText: "Add task",
|
|
2584
|
+
addColumnText: "Add column",
|
|
2099
2585
|
wipLimitText: "WIP limit: {limit}",
|
|
2100
2586
|
dragHintText: "Drag to move",
|
|
2101
2587
|
boardAriaLabel: "Task Board"
|
|
@@ -2125,6 +2611,24 @@ var enUS = {
|
|
|
2125
2611
|
};
|
|
2126
2612
|
|
|
2127
2613
|
// src/utils/i18n/define-locale.ts
|
|
2614
|
+
var DATEPICKER_LOCALES2 = [
|
|
2615
|
+
EN_US_DATEPICKER_LOCALE,
|
|
2616
|
+
ZH_CN_DATEPICKER_LOCALE,
|
|
2617
|
+
ZH_TW_DATEPICKER_LOCALE,
|
|
2618
|
+
JA_JP_DATEPICKER_LOCALE,
|
|
2619
|
+
KO_KR_DATEPICKER_LOCALE,
|
|
2620
|
+
TH_TH_DATEPICKER_LOCALE,
|
|
2621
|
+
VI_VN_DATEPICKER_LOCALE,
|
|
2622
|
+
ID_ID_DATEPICKER_LOCALE,
|
|
2623
|
+
ES_ES_DATEPICKER_LOCALE,
|
|
2624
|
+
FR_FR_DATEPICKER_LOCALE,
|
|
2625
|
+
DE_DE_DATEPICKER_LOCALE,
|
|
2626
|
+
PT_BR_DATEPICKER_LOCALE,
|
|
2627
|
+
AR_SA_DATEPICKER_LOCALE
|
|
2628
|
+
];
|
|
2629
|
+
var DATEPICKER_LOCALE_BY_ID2 = new Map(
|
|
2630
|
+
DATEPICKER_LOCALES2.map((locale) => [locale.locale, locale])
|
|
2631
|
+
);
|
|
2128
2632
|
function isPlainObject(value) {
|
|
2129
2633
|
if (value === null || typeof value !== "object") return false;
|
|
2130
2634
|
const proto = Object.getPrototypeOf(value);
|
|
@@ -2146,7 +2650,9 @@ function deepMerge(base, override) {
|
|
|
2146
2650
|
return out;
|
|
2147
2651
|
}
|
|
2148
2652
|
function defineLocale(overrides = {}) {
|
|
2149
|
-
|
|
2653
|
+
const locale = overrides.locale ? DATEPICKER_LOCALE_BY_ID2.get(overrides.locale) : void 0;
|
|
2654
|
+
const normalizedOverrides = locale && !overrides.datePicker ? { ...overrides, datePicker: locale } : overrides;
|
|
2655
|
+
return deepMerge(enUS, normalizedOverrides);
|
|
2150
2656
|
}
|
|
2151
2657
|
function defineText(text = {}) {
|
|
2152
2658
|
return defineLocale(text);
|
|
@@ -2518,6 +3024,14 @@ var SELECT_SIZE_CLASSES = {
|
|
|
2518
3024
|
md: "text-base py-2",
|
|
2519
3025
|
lg: "text-lg py-2.5"
|
|
2520
3026
|
};
|
|
3027
|
+
var SELECT_VIRTUAL_ITEM_HEIGHT = {
|
|
3028
|
+
sm: 32,
|
|
3029
|
+
md: 40,
|
|
3030
|
+
lg: 48
|
|
3031
|
+
};
|
|
3032
|
+
function getSelectVirtualItemHeight(size = "md") {
|
|
3033
|
+
return SELECT_VIRTUAL_ITEM_HEIGHT[size] ?? SELECT_VIRTUAL_ITEM_HEIGHT.md;
|
|
3034
|
+
}
|
|
2521
3035
|
function getSelectSizeClasses(size) {
|
|
2522
3036
|
return SELECT_SIZE_CLASSES[size];
|
|
2523
3037
|
}
|
|
@@ -3042,23 +3556,28 @@ function parseDate(value) {
|
|
|
3042
3556
|
const parsed = new Date(value);
|
|
3043
3557
|
return isNaN(parsed.getTime()) ? null : parsed;
|
|
3044
3558
|
}
|
|
3045
|
-
|
|
3559
|
+
var defaultDateFormatOptions = {
|
|
3560
|
+
year: "numeric",
|
|
3561
|
+
month: "2-digit",
|
|
3562
|
+
day: "2-digit"
|
|
3563
|
+
};
|
|
3564
|
+
function getDateFormatParts(format) {
|
|
3046
3565
|
switch (format) {
|
|
3047
|
-
case "yyyy-MM-dd":
|
|
3048
|
-
case "yyyy/MM/dd":
|
|
3049
|
-
return { year: "numeric", month: "2-digit", day: "2-digit" };
|
|
3050
3566
|
case "MM/dd/yyyy":
|
|
3051
|
-
return
|
|
3567
|
+
return ["month", "/", "day", "/", "year"];
|
|
3052
3568
|
case "dd/MM/yyyy":
|
|
3053
|
-
return
|
|
3569
|
+
return ["day", "/", "month", "/", "year"];
|
|
3570
|
+
case "yyyy/MM/dd":
|
|
3571
|
+
return ["year", "/", "month", "/", "day"];
|
|
3572
|
+
case "yyyy-MM-dd":
|
|
3054
3573
|
default:
|
|
3055
|
-
return
|
|
3574
|
+
return ["year", "-", "month", "-", "day"];
|
|
3056
3575
|
}
|
|
3057
3576
|
}
|
|
3058
3577
|
function formatDate(date, format = "yyyy-MM-dd", locale) {
|
|
3059
3578
|
if (!date || isNaN(date.getTime())) return "";
|
|
3060
3579
|
if (locale) {
|
|
3061
|
-
const localized =
|
|
3580
|
+
const localized = safeIntlFormatDateParts(locale, format, date);
|
|
3062
3581
|
if (localized) return localized;
|
|
3063
3582
|
}
|
|
3064
3583
|
const year = date.getFullYear();
|
|
@@ -3077,7 +3596,7 @@ function formatDate(date, format = "yyyy-MM-dd", locale) {
|
|
|
3077
3596
|
return `${year}-${month}-${day}`;
|
|
3078
3597
|
}
|
|
3079
3598
|
}
|
|
3080
|
-
function formatDateWithLocale(date, locale, options =
|
|
3599
|
+
function formatDateWithLocale(date, locale, options = defaultDateFormatOptions) {
|
|
3081
3600
|
if (!date || isNaN(date.getTime())) return "";
|
|
3082
3601
|
if (!locale) return formatDate(date);
|
|
3083
3602
|
const localized = safeIntlFormat(locale, options, date);
|
|
@@ -3190,6 +3709,30 @@ function safeIntlFormat(locale, options, date) {
|
|
|
3190
3709
|
return "";
|
|
3191
3710
|
}
|
|
3192
3711
|
}
|
|
3712
|
+
function safeIntlFormatDateParts(locale, format, date) {
|
|
3713
|
+
try {
|
|
3714
|
+
const key = `${locale}_${JSON.stringify(defaultDateFormatOptions)}_parts`;
|
|
3715
|
+
let fmt = intlCache.get(key);
|
|
3716
|
+
if (!fmt) {
|
|
3717
|
+
fmt = new Intl.DateTimeFormat(locale, defaultDateFormatOptions);
|
|
3718
|
+
intlCache.set(key, fmt);
|
|
3719
|
+
}
|
|
3720
|
+
const parts = fmt.formatToParts(date);
|
|
3721
|
+
const partMap = new Map(parts.map((part) => [part.type, part.value]));
|
|
3722
|
+
const year = partMap.get("year");
|
|
3723
|
+
const month = partMap.get("month");
|
|
3724
|
+
const day = partMap.get("day");
|
|
3725
|
+
if (!year || !month || !day) return "";
|
|
3726
|
+
return getDateFormatParts(format).map((part) => {
|
|
3727
|
+
if (part === "year") return year;
|
|
3728
|
+
if (part === "month") return month;
|
|
3729
|
+
if (part === "day") return day;
|
|
3730
|
+
return part;
|
|
3731
|
+
}).join("");
|
|
3732
|
+
} catch {
|
|
3733
|
+
return "";
|
|
3734
|
+
}
|
|
3735
|
+
}
|
|
3193
3736
|
function formatMonthYear(year, month, locale) {
|
|
3194
3737
|
if (locale) {
|
|
3195
3738
|
const text = safeIntlFormat(
|
|
@@ -3278,6 +3821,32 @@ function isToday(date) {
|
|
|
3278
3821
|
const today = /* @__PURE__ */ new Date();
|
|
3279
3822
|
return isSameDay(date, today);
|
|
3280
3823
|
}
|
|
3824
|
+
function getDatePickerCalendarCellState(input) {
|
|
3825
|
+
const { date, selectedDate = null, selectedRange = [null, null], isRangeMode = false } = input;
|
|
3826
|
+
const [rangeStart, rangeEnd] = selectedRange;
|
|
3827
|
+
const normDate = normalizeDate(date);
|
|
3828
|
+
const normStart = rangeStart ? normalizeDate(rangeStart) : null;
|
|
3829
|
+
const normEnd = rangeEnd ? normalizeDate(rangeEnd) : null;
|
|
3830
|
+
const isSelectingEnd = isRangeMode && Boolean(rangeStart) && !rangeEnd;
|
|
3831
|
+
const isRangeStart = isRangeMode && rangeStart ? isSameDay(date, rangeStart) : false;
|
|
3832
|
+
const isRangeEnd = isRangeMode && rangeEnd ? isSameDay(date, rangeEnd) : false;
|
|
3833
|
+
const isInRange = Boolean(
|
|
3834
|
+
isRangeMode && normStart && normEnd && normDate >= normStart && normDate <= normEnd
|
|
3835
|
+
);
|
|
3836
|
+
const isSelected = !isRangeMode ? selectedDate ? isSameDay(date, selectedDate) : false : isRangeStart || isRangeEnd;
|
|
3837
|
+
const isBeforeRangeStart = Boolean(isSelectingEnd && normStart && normDate < normStart);
|
|
3838
|
+
const isDisabled = Boolean(input.isDateDisabled?.(date)) || isBeforeRangeStart;
|
|
3839
|
+
return {
|
|
3840
|
+
iso: formatDate(date, "yyyy-MM-dd"),
|
|
3841
|
+
isCurrentMonthDay: input.isCurrentMonth?.(date) ?? true,
|
|
3842
|
+
isSelected,
|
|
3843
|
+
isTodayDay: isToday(date),
|
|
3844
|
+
isDisabled,
|
|
3845
|
+
isInRange,
|
|
3846
|
+
isRangeStart,
|
|
3847
|
+
isRangeEnd
|
|
3848
|
+
};
|
|
3849
|
+
}
|
|
3281
3850
|
|
|
3282
3851
|
// src/utils/datepicker-styles.ts
|
|
3283
3852
|
var datePickerBaseClasses = "relative inline-block w-full";
|
|
@@ -3534,20 +4103,20 @@ function formatTimeDisplayWithLocale(hours, minutes, seconds = 0, format = "24",
|
|
|
3534
4103
|
const suffix = period === "AM" ? labels.am : labels.pm;
|
|
3535
4104
|
return `${timeStr} ${suffix}`;
|
|
3536
4105
|
}
|
|
3537
|
-
function isTimeInRange(hours, minutes, minTime, maxTime) {
|
|
3538
|
-
const
|
|
4106
|
+
function isTimeInRange(hours, minutes, minTime, maxTime, seconds = 0) {
|
|
4107
|
+
const currentSeconds = hours * 3600 + minutes * 60 + seconds;
|
|
3539
4108
|
if (minTime) {
|
|
3540
4109
|
const min = parseTime(minTime);
|
|
3541
4110
|
if (min) {
|
|
3542
|
-
const
|
|
3543
|
-
if (
|
|
4111
|
+
const minSeconds = min.hours * 3600 + min.minutes * 60 + min.seconds;
|
|
4112
|
+
if (currentSeconds < minSeconds) return false;
|
|
3544
4113
|
}
|
|
3545
4114
|
}
|
|
3546
4115
|
if (maxTime) {
|
|
3547
4116
|
const max = parseTime(maxTime);
|
|
3548
4117
|
if (max) {
|
|
3549
|
-
const
|
|
3550
|
-
if (
|
|
4118
|
+
const maxSeconds = max.hours * 3600 + max.minutes * 60 + max.seconds;
|
|
4119
|
+
if (currentSeconds > maxSeconds) return false;
|
|
3551
4120
|
}
|
|
3552
4121
|
}
|
|
3553
4122
|
return true;
|
|
@@ -3581,6 +4150,26 @@ function getCurrentTime(showSeconds = false) {
|
|
|
3581
4150
|
return formatTime(now.getHours(), now.getMinutes(), now.getSeconds(), showSeconds);
|
|
3582
4151
|
}
|
|
3583
4152
|
|
|
4153
|
+
// src/utils/file-utils.ts
|
|
4154
|
+
function formatBytes(bytes, options = {}) {
|
|
4155
|
+
if (bytes === void 0 || bytes === null) return options.emptyText ?? "";
|
|
4156
|
+
const safeBytes = Number.isFinite(bytes) ? Math.max(0, bytes) : 0;
|
|
4157
|
+
if (safeBytes === 0) return "0 B";
|
|
4158
|
+
const units = ["B", "KB", "MB", "GB", "TB"];
|
|
4159
|
+
const k = 1024;
|
|
4160
|
+
const index = Math.min(units.length - 1, Math.floor(Math.log(safeBytes) / Math.log(k)));
|
|
4161
|
+
const size = safeBytes / Math.pow(k, index);
|
|
4162
|
+
const precision = Math.max(0, Math.floor(options.precision ?? 2));
|
|
4163
|
+
const text = size.toFixed(precision);
|
|
4164
|
+
return `${options.trimTrailingZeros ? text.replace(/\.0+$/, "").replace(/(\.\d*?)0+$/, "$1") : text} ${units[index]}`;
|
|
4165
|
+
}
|
|
4166
|
+
function getFileExtensionName(name, options) {
|
|
4167
|
+
const dot = name.lastIndexOf(".");
|
|
4168
|
+
if (dot <= 0 || dot === name.length - 1) return "";
|
|
4169
|
+
const extension = name.slice(dot + 1).toLowerCase();
|
|
4170
|
+
return options?.includeDot ? `.${extension}` : extension;
|
|
4171
|
+
}
|
|
4172
|
+
|
|
3584
4173
|
// src/utils/upload-utils.ts
|
|
3585
4174
|
var DEFAULT_UPLOAD_CHUNK_SIZE = 1024 * 1024;
|
|
3586
4175
|
var uploadStatusIconSizeClasses = {
|
|
@@ -3702,8 +4291,7 @@ function generateFileId() {
|
|
|
3702
4291
|
return `upload-${Date.now()}-${Math.random().toString(36).substring(2, 11)}`;
|
|
3703
4292
|
}
|
|
3704
4293
|
function getFileExtension(fileName) {
|
|
3705
|
-
|
|
3706
|
-
return `.${fileName.split(".").pop()?.toLowerCase() || ""}`;
|
|
4294
|
+
return getFileExtensionName(fileName, { includeDot: true });
|
|
3707
4295
|
}
|
|
3708
4296
|
function fileToUploadFile(file) {
|
|
3709
4297
|
return {
|
|
@@ -3788,11 +4376,7 @@ function validateFileSize(file, maxSize) {
|
|
|
3788
4376
|
return file.size <= maxSize;
|
|
3789
4377
|
}
|
|
3790
4378
|
function formatFileSize(bytes) {
|
|
3791
|
-
|
|
3792
|
-
const units = ["B", "KB", "MB", "GB", "TB"];
|
|
3793
|
-
const k = 1024;
|
|
3794
|
-
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
3795
|
-
return `${(bytes / Math.pow(k, i)).toFixed(2)} ${units[i]}`;
|
|
4379
|
+
return formatBytes(bytes, { precision: 2 });
|
|
3796
4380
|
}
|
|
3797
4381
|
function getUploadButtonClasses(disabled) {
|
|
3798
4382
|
const baseClasses2 = [
|
|
@@ -4323,6 +4907,34 @@ function getTableColgroup(options) {
|
|
|
4323
4907
|
}
|
|
4324
4908
|
return entries;
|
|
4325
4909
|
}
|
|
4910
|
+
function hasTableSelectionColumn(rowSelection) {
|
|
4911
|
+
return !!rowSelection && rowSelection.showCheckbox !== false;
|
|
4912
|
+
}
|
|
4913
|
+
function getTableSelectionState(input) {
|
|
4914
|
+
const selectedSet = new Set(input.selectedRowKeys);
|
|
4915
|
+
const selectableRowKeys = input.rowKeys.filter((key, index) => {
|
|
4916
|
+
const record = input.records[index];
|
|
4917
|
+
return !input.getCheckboxProps?.(record)?.disabled;
|
|
4918
|
+
});
|
|
4919
|
+
const allSelected = selectableRowKeys.length > 0 && selectableRowKeys.every((key) => selectedSet.has(key));
|
|
4920
|
+
const someSelected = selectableRowKeys.some((key) => selectedSet.has(key)) && !allSelected;
|
|
4921
|
+
return { selectableRowKeys, allSelected, someSelected };
|
|
4922
|
+
}
|
|
4923
|
+
function getNextTableSelectAllKeys(selectedRowKeys, selectableRowKeys, checked) {
|
|
4924
|
+
const selectableSet = new Set(selectableRowKeys);
|
|
4925
|
+
if (!checked) {
|
|
4926
|
+
return selectedRowKeys.filter((key) => !selectableSet.has(key));
|
|
4927
|
+
}
|
|
4928
|
+
const next = [...selectedRowKeys];
|
|
4929
|
+
const nextSet = new Set(next);
|
|
4930
|
+
for (const key of selectableRowKeys) {
|
|
4931
|
+
if (!nextSet.has(key)) {
|
|
4932
|
+
next.push(key);
|
|
4933
|
+
nextSet.add(key);
|
|
4934
|
+
}
|
|
4935
|
+
}
|
|
4936
|
+
return next;
|
|
4937
|
+
}
|
|
4326
4938
|
function freezeTableColumnWidths(columns, measuredWidths = {}, previousFrozen = {}) {
|
|
4327
4939
|
const next = {};
|
|
4328
4940
|
for (const column of columns) {
|
|
@@ -4586,6 +5198,48 @@ function filterData(data, filters) {
|
|
|
4586
5198
|
});
|
|
4587
5199
|
});
|
|
4588
5200
|
}
|
|
5201
|
+
function filterTableData(data, columns, filters) {
|
|
5202
|
+
if (!filters || Object.keys(filters).length === 0) {
|
|
5203
|
+
return data;
|
|
5204
|
+
}
|
|
5205
|
+
const filterFnByKey = /* @__PURE__ */ new Map();
|
|
5206
|
+
for (const column of columns) {
|
|
5207
|
+
if (column.filter?.filterFn) {
|
|
5208
|
+
filterFnByKey.set(column.key, column.filter.filterFn);
|
|
5209
|
+
}
|
|
5210
|
+
}
|
|
5211
|
+
return data.filter((record) => {
|
|
5212
|
+
return Object.entries(filters).every(([key, filterValue]) => {
|
|
5213
|
+
if (filterValue === "" || filterValue === null || filterValue === void 0) {
|
|
5214
|
+
return true;
|
|
5215
|
+
}
|
|
5216
|
+
const cellValue = record[key];
|
|
5217
|
+
const customFn = filterFnByKey.get(key);
|
|
5218
|
+
if (customFn) {
|
|
5219
|
+
return customFn(cellValue, filterValue);
|
|
5220
|
+
}
|
|
5221
|
+
if (typeof filterValue === "string") {
|
|
5222
|
+
return String(cellValue).toLowerCase().includes(filterValue.toLowerCase());
|
|
5223
|
+
}
|
|
5224
|
+
return cellValue === filterValue;
|
|
5225
|
+
});
|
|
5226
|
+
});
|
|
5227
|
+
}
|
|
5228
|
+
function getTableVirtualWindow(scrollTop, viewportHeight, itemHeight, rowCount, overscan = 5) {
|
|
5229
|
+
if (rowCount <= 0 || itemHeight <= 0) {
|
|
5230
|
+
return { startIndex: 0, endIndex: -1, topPad: 0, bottomPad: 0 };
|
|
5231
|
+
}
|
|
5232
|
+
const safeScrollTop = Math.max(0, Number.isFinite(scrollTop) ? scrollTop : 0);
|
|
5233
|
+
const startIndex = Math.max(0, Math.floor(safeScrollTop / itemHeight) - overscan);
|
|
5234
|
+
const visibleCount = Math.ceil(Math.max(0, viewportHeight) / itemHeight) + overscan * 2;
|
|
5235
|
+
const endIndex = Math.min(rowCount - 1, startIndex + visibleCount);
|
|
5236
|
+
return {
|
|
5237
|
+
startIndex,
|
|
5238
|
+
endIndex,
|
|
5239
|
+
topPad: startIndex * itemHeight,
|
|
5240
|
+
bottomPad: Math.max(0, (rowCount - 1 - endIndex) * itemHeight)
|
|
5241
|
+
};
|
|
5242
|
+
}
|
|
4589
5243
|
function paginateData(data, current, pageSize) {
|
|
4590
5244
|
const startIndex = (current - 1) * pageSize;
|
|
4591
5245
|
const endIndex = startIndex + pageSize;
|
|
@@ -4887,6 +5541,94 @@ var listItemTitleClasses = "font-medium text-[var(--tiger-text,#111827)] truncat
|
|
|
4887
5541
|
var listItemDescriptionClasses = "text-sm text-[var(--tiger-text-muted,#6b7280)] mt-1";
|
|
4888
5542
|
var listItemExtraClasses = "flex-shrink-0 ml-4";
|
|
4889
5543
|
var listGridContainerClasses = "grid gap-4";
|
|
5544
|
+
var GRID_COLUMNS = {
|
|
5545
|
+
1: "grid-cols-1",
|
|
5546
|
+
2: "grid-cols-2",
|
|
5547
|
+
3: "grid-cols-3",
|
|
5548
|
+
4: "grid-cols-4",
|
|
5549
|
+
5: "grid-cols-5",
|
|
5550
|
+
6: "grid-cols-6",
|
|
5551
|
+
7: "grid-cols-7",
|
|
5552
|
+
8: "grid-cols-8",
|
|
5553
|
+
9: "grid-cols-9",
|
|
5554
|
+
10: "grid-cols-10",
|
|
5555
|
+
11: "grid-cols-11",
|
|
5556
|
+
12: "grid-cols-12"
|
|
5557
|
+
};
|
|
5558
|
+
var SM_GRID_COLUMNS = {
|
|
5559
|
+
1: "sm:grid-cols-1",
|
|
5560
|
+
2: "sm:grid-cols-2",
|
|
5561
|
+
3: "sm:grid-cols-3",
|
|
5562
|
+
4: "sm:grid-cols-4",
|
|
5563
|
+
5: "sm:grid-cols-5",
|
|
5564
|
+
6: "sm:grid-cols-6",
|
|
5565
|
+
7: "sm:grid-cols-7",
|
|
5566
|
+
8: "sm:grid-cols-8",
|
|
5567
|
+
9: "sm:grid-cols-9",
|
|
5568
|
+
10: "sm:grid-cols-10",
|
|
5569
|
+
11: "sm:grid-cols-11",
|
|
5570
|
+
12: "sm:grid-cols-12"
|
|
5571
|
+
};
|
|
5572
|
+
var MD_GRID_COLUMNS = {
|
|
5573
|
+
1: "md:grid-cols-1",
|
|
5574
|
+
2: "md:grid-cols-2",
|
|
5575
|
+
3: "md:grid-cols-3",
|
|
5576
|
+
4: "md:grid-cols-4",
|
|
5577
|
+
5: "md:grid-cols-5",
|
|
5578
|
+
6: "md:grid-cols-6",
|
|
5579
|
+
7: "md:grid-cols-7",
|
|
5580
|
+
8: "md:grid-cols-8",
|
|
5581
|
+
9: "md:grid-cols-9",
|
|
5582
|
+
10: "md:grid-cols-10",
|
|
5583
|
+
11: "md:grid-cols-11",
|
|
5584
|
+
12: "md:grid-cols-12"
|
|
5585
|
+
};
|
|
5586
|
+
var LG_GRID_COLUMNS = {
|
|
5587
|
+
1: "lg:grid-cols-1",
|
|
5588
|
+
2: "lg:grid-cols-2",
|
|
5589
|
+
3: "lg:grid-cols-3",
|
|
5590
|
+
4: "lg:grid-cols-4",
|
|
5591
|
+
5: "lg:grid-cols-5",
|
|
5592
|
+
6: "lg:grid-cols-6",
|
|
5593
|
+
7: "lg:grid-cols-7",
|
|
5594
|
+
8: "lg:grid-cols-8",
|
|
5595
|
+
9: "lg:grid-cols-9",
|
|
5596
|
+
10: "lg:grid-cols-10",
|
|
5597
|
+
11: "lg:grid-cols-11",
|
|
5598
|
+
12: "lg:grid-cols-12"
|
|
5599
|
+
};
|
|
5600
|
+
var XL_GRID_COLUMNS = {
|
|
5601
|
+
1: "xl:grid-cols-1",
|
|
5602
|
+
2: "xl:grid-cols-2",
|
|
5603
|
+
3: "xl:grid-cols-3",
|
|
5604
|
+
4: "xl:grid-cols-4",
|
|
5605
|
+
5: "xl:grid-cols-5",
|
|
5606
|
+
6: "xl:grid-cols-6",
|
|
5607
|
+
7: "xl:grid-cols-7",
|
|
5608
|
+
8: "xl:grid-cols-8",
|
|
5609
|
+
9: "xl:grid-cols-9",
|
|
5610
|
+
10: "xl:grid-cols-10",
|
|
5611
|
+
11: "xl:grid-cols-11",
|
|
5612
|
+
12: "xl:grid-cols-12"
|
|
5613
|
+
};
|
|
5614
|
+
var XXL_GRID_COLUMNS = {
|
|
5615
|
+
1: "2xl:grid-cols-1",
|
|
5616
|
+
2: "2xl:grid-cols-2",
|
|
5617
|
+
3: "2xl:grid-cols-3",
|
|
5618
|
+
4: "2xl:grid-cols-4",
|
|
5619
|
+
5: "2xl:grid-cols-5",
|
|
5620
|
+
6: "2xl:grid-cols-6",
|
|
5621
|
+
7: "2xl:grid-cols-7",
|
|
5622
|
+
8: "2xl:grid-cols-8",
|
|
5623
|
+
9: "2xl:grid-cols-9",
|
|
5624
|
+
10: "2xl:grid-cols-10",
|
|
5625
|
+
11: "2xl:grid-cols-11",
|
|
5626
|
+
12: "2xl:grid-cols-12"
|
|
5627
|
+
};
|
|
5628
|
+
function getColumnClass(map, value) {
|
|
5629
|
+
if (!value || !Number.isFinite(value)) return void 0;
|
|
5630
|
+
return map[Math.floor(value)];
|
|
5631
|
+
}
|
|
4890
5632
|
function getListClasses(bordered) {
|
|
4891
5633
|
const classes = [listBaseClasses, listBorderClasses[bordered]];
|
|
4892
5634
|
return classes.filter(Boolean).join(" ");
|
|
@@ -4910,27 +5652,18 @@ function getListHeaderFooterClasses(size, isFooter = false) {
|
|
|
4910
5652
|
}
|
|
4911
5653
|
function getGridColumnClasses(column, xs, sm, md, lg, xl, xxl) {
|
|
4912
5654
|
const classes = [];
|
|
4913
|
-
|
|
4914
|
-
|
|
4915
|
-
|
|
4916
|
-
if (
|
|
4917
|
-
|
|
4918
|
-
|
|
4919
|
-
|
|
4920
|
-
|
|
4921
|
-
|
|
4922
|
-
if (
|
|
4923
|
-
|
|
4924
|
-
|
|
4925
|
-
if (lg) {
|
|
4926
|
-
classes.push(`lg:grid-cols-${lg}`);
|
|
4927
|
-
}
|
|
4928
|
-
if (xl) {
|
|
4929
|
-
classes.push(`xl:grid-cols-${xl}`);
|
|
4930
|
-
}
|
|
4931
|
-
if (xxl) {
|
|
4932
|
-
classes.push(`2xl:grid-cols-${xxl}`);
|
|
4933
|
-
}
|
|
5655
|
+
const baseClass = getColumnClass(GRID_COLUMNS, xs ?? column);
|
|
5656
|
+
if (baseClass) classes.push(baseClass);
|
|
5657
|
+
const smClass = getColumnClass(SM_GRID_COLUMNS, sm);
|
|
5658
|
+
if (smClass) classes.push(smClass);
|
|
5659
|
+
const mdClass = getColumnClass(MD_GRID_COLUMNS, md);
|
|
5660
|
+
if (mdClass) classes.push(mdClass);
|
|
5661
|
+
const lgClass = getColumnClass(LG_GRID_COLUMNS, lg);
|
|
5662
|
+
if (lgClass) classes.push(lgClass);
|
|
5663
|
+
const xlClass = getColumnClass(XL_GRID_COLUMNS, xl);
|
|
5664
|
+
if (xlClass) classes.push(xlClass);
|
|
5665
|
+
const xxlClass = getColumnClass(XXL_GRID_COLUMNS, xxl);
|
|
5666
|
+
if (xxlClass) classes.push(xxlClass);
|
|
4934
5667
|
return classes.join(" ");
|
|
4935
5668
|
}
|
|
4936
5669
|
|
|
@@ -6187,6 +6920,9 @@ function getBreadcrumbCollapsedItems(totalItems, maxItems) {
|
|
|
6187
6920
|
|
|
6188
6921
|
// src/utils/steps-utils.ts
|
|
6189
6922
|
var stepFinishChar = "\u2713";
|
|
6923
|
+
var stepFinishIconViewBox = "0 0 24 24";
|
|
6924
|
+
var stepFinishIconStrokeWidth = "3";
|
|
6925
|
+
var stepFinishIconPathD = "M4.5 12.75l6 6 9-13.5";
|
|
6190
6926
|
function getStepsContainerClasses(direction) {
|
|
6191
6927
|
const baseClasses2 = "tiger-steps w-full list-none m-0 p-0";
|
|
6192
6928
|
if (direction === "vertical") {
|
|
@@ -8446,6 +9182,8 @@ function getScatterHoverSize(baseSize) {
|
|
|
8446
9182
|
}
|
|
8447
9183
|
var SCATTER_ENTRANCE_KEYFRAMES = `@keyframes tiger-scatter-entrance{from{opacity:0;transform:scale(0)}60%{transform:scale(1.15)}to{opacity:1;transform:scale(1)}}@media (prefers-reduced-motion: reduce){.tiger-scatter-entrance{animation-duration:0ms;animation-delay:0ms}}`;
|
|
8448
9184
|
var SCATTER_ENTRANCE_CLASS = "tiger-scatter-entrance";
|
|
9185
|
+
var DONUT_ENTRANCE_KEYFRAMES = `@keyframes tiger-donut-entrance{from{opacity:0;transform:scale(0.9)}to{opacity:1;transform:scale(1)}}.tiger-donut-entrance{transform-origin:center;animation:tiger-donut-entrance var(--tiger-motion-duration-slow,500ms) var(--tiger-motion-ease-spring,cubic-bezier(.34,1.56,.64,1)) both}@media (prefers-reduced-motion: reduce){.tiger-donut-entrance{animation-duration:0ms}}`;
|
|
9186
|
+
var DONUT_ENTRANCE_CLASS = "tiger-donut-entrance";
|
|
8449
9187
|
|
|
8450
9188
|
// src/utils/chart/scale.ts
|
|
8451
9189
|
var clampNumber = (value, min, max) => Math.min(max, Math.max(min, value));
|
|
@@ -9336,6 +10074,57 @@ function resolveChartTooltipContent(hoveredIndex, data, formatter, defaultFormat
|
|
|
9336
10074
|
function getChartTooltipTransform(position) {
|
|
9337
10075
|
return `translate3d(${position.x}px, ${position.y}px, 0)`;
|
|
9338
10076
|
}
|
|
10077
|
+
function resolveChartTooltipPosition(input) {
|
|
10078
|
+
const offsetX = input.offsetX ?? 12;
|
|
10079
|
+
const offsetY = input.offsetY ?? -8;
|
|
10080
|
+
const padding = input.padding ?? 8;
|
|
10081
|
+
const anchorX = Number.isFinite(input.x) ? input.x : 0;
|
|
10082
|
+
const anchorY = Number.isFinite(input.y) ? input.y : 0;
|
|
10083
|
+
const rectWidth = Number.isFinite(input.rect.width) ? Math.max(0, input.rect.width) : 0;
|
|
10084
|
+
const rectHeight = Number.isFinite(input.rect.height) ? Math.max(0, input.rect.height) : 0;
|
|
10085
|
+
const viewportWidth = Number.isFinite(input.viewport.width) ? Math.max(0, input.viewport.width) : 0;
|
|
10086
|
+
const viewportHeight = Number.isFinite(input.viewport.height) ? Math.max(0, input.viewport.height) : 0;
|
|
10087
|
+
let nextX = anchorX + offsetX;
|
|
10088
|
+
let nextY = anchorY + offsetY;
|
|
10089
|
+
if (nextX + rectWidth > viewportWidth - padding) {
|
|
10090
|
+
nextX = anchorX - rectWidth - offsetX;
|
|
10091
|
+
}
|
|
10092
|
+
if (nextY + rectHeight > viewportHeight - padding) {
|
|
10093
|
+
nextY = anchorY - rectHeight - Math.abs(offsetY);
|
|
10094
|
+
}
|
|
10095
|
+
return {
|
|
10096
|
+
x: Math.max(padding, nextX),
|
|
10097
|
+
y: Math.max(padding, nextY)
|
|
10098
|
+
};
|
|
10099
|
+
}
|
|
10100
|
+
function downsampleSeriesData(data, threshold, getValue = (_item, index) => index) {
|
|
10101
|
+
const safeThreshold = Math.max(0, Math.floor(Number.isFinite(threshold) ? threshold : 0));
|
|
10102
|
+
if (safeThreshold === 0 || data.length <= safeThreshold) {
|
|
10103
|
+
return data.map((item, index) => ({ item, index }));
|
|
10104
|
+
}
|
|
10105
|
+
if (safeThreshold === 1) {
|
|
10106
|
+
return [{ item: data[0], index: 0 }];
|
|
10107
|
+
}
|
|
10108
|
+
const result = [{ item: data[0], index: 0 }];
|
|
10109
|
+
const bucketSize = (data.length - 2) / Math.max(1, safeThreshold - 2);
|
|
10110
|
+
for (let bucket = 0; bucket < safeThreshold - 2; bucket++) {
|
|
10111
|
+
const start = Math.floor(1 + bucket * bucketSize);
|
|
10112
|
+
const end = Math.min(data.length - 1, Math.floor(1 + (bucket + 1) * bucketSize));
|
|
10113
|
+
let selectedIndex = start;
|
|
10114
|
+
let selectedValue = Number.NEGATIVE_INFINITY;
|
|
10115
|
+
for (let index = start; index < end; index++) {
|
|
10116
|
+
const rawValue = getValue(data[index], index);
|
|
10117
|
+
const value = Math.abs(Number.isFinite(rawValue) ? rawValue : 0);
|
|
10118
|
+
if (value > selectedValue) {
|
|
10119
|
+
selectedValue = value;
|
|
10120
|
+
selectedIndex = index;
|
|
10121
|
+
}
|
|
10122
|
+
}
|
|
10123
|
+
result.push({ item: data[selectedIndex], index: selectedIndex });
|
|
10124
|
+
}
|
|
10125
|
+
result.push({ item: data[data.length - 1], index: data.length - 1 });
|
|
10126
|
+
return result;
|
|
10127
|
+
}
|
|
9339
10128
|
function resolveMultiSeriesTooltipContent(hoveredPoint, series, formatter, defaultFormatter) {
|
|
9340
10129
|
if (!hoveredPoint) return "";
|
|
9341
10130
|
const { seriesIndex, pointIndex } = hoveredPoint;
|
|
@@ -9371,19 +10160,25 @@ function defaultRadarTooltipFormatter(datum, seriesIndex, _pointIndex, series) {
|
|
|
9371
10160
|
function computeFunnelSegments(data, opts) {
|
|
9372
10161
|
if (data.length === 0) return [];
|
|
9373
10162
|
const { width, height, gap = 2, pinch = false, colors } = opts;
|
|
10163
|
+
const safeWidth = Number.isFinite(width) ? Math.max(0, width) : 0;
|
|
10164
|
+
const safeHeight = Number.isFinite(height) ? Math.max(0, height) : 0;
|
|
10165
|
+
const safeGap = Number.isFinite(gap) ? Math.max(0, gap) : 0;
|
|
10166
|
+
if (safeWidth <= 0 || safeHeight <= 0) return [];
|
|
9374
10167
|
const palette = colors ?? DEFAULT_CHART_COLORS;
|
|
9375
|
-
const
|
|
9376
|
-
|
|
9377
|
-
|
|
9378
|
-
const
|
|
9379
|
-
const
|
|
10168
|
+
const values = data.map((d) => Number.isFinite(d.value) ? Math.max(0, d.value) : 0);
|
|
10169
|
+
const maxValue = Math.max(...values);
|
|
10170
|
+
if (maxValue <= 0) return [];
|
|
10171
|
+
const totalGap = Math.min(safeHeight, safeGap * (data.length - 1));
|
|
10172
|
+
const segH = Math.max(0, (safeHeight - totalGap) / data.length);
|
|
10173
|
+
const halfW = safeWidth / 2;
|
|
9380
10174
|
return data.map((d, i) => {
|
|
9381
|
-
const
|
|
9382
|
-
const
|
|
10175
|
+
const value = values[i];
|
|
10176
|
+
const topRatio = value / maxValue;
|
|
10177
|
+
const nextVal = i < data.length - 1 ? values[i + 1] : pinch ? 0 : value;
|
|
9383
10178
|
const bottomRatio = nextVal / maxValue;
|
|
9384
|
-
const tw =
|
|
9385
|
-
const bw =
|
|
9386
|
-
const y = i * (segH +
|
|
10179
|
+
const tw = safeWidth * topRatio;
|
|
10180
|
+
const bw = safeWidth * bottomRatio;
|
|
10181
|
+
const y = i * (segH + safeGap);
|
|
9387
10182
|
const cx = halfW;
|
|
9388
10183
|
const cy = y + segH / 2;
|
|
9389
10184
|
const x1 = cx - tw / 2;
|
|
@@ -9394,7 +10189,7 @@ function computeFunnelSegments(data, opts) {
|
|
|
9394
10189
|
return {
|
|
9395
10190
|
index: i,
|
|
9396
10191
|
label: d.label ?? `Stage ${i + 1}`,
|
|
9397
|
-
value
|
|
10192
|
+
value,
|
|
9398
10193
|
color: d.color ?? palette[i % palette.length],
|
|
9399
10194
|
path,
|
|
9400
10195
|
cx,
|
|
@@ -9449,9 +10244,13 @@ function createGaugeAnimation(options) {
|
|
|
9449
10244
|
function degToRad(deg) {
|
|
9450
10245
|
return deg * Math.PI / 180;
|
|
9451
10246
|
}
|
|
10247
|
+
function safeNumber(value, fallback = 0) {
|
|
10248
|
+
return Number.isFinite(value) ? value : fallback;
|
|
10249
|
+
}
|
|
9452
10250
|
function createGaugeArcPath(cx, cy, radius, startDeg, endDeg, arcWidth) {
|
|
9453
|
-
const outerR = radius;
|
|
9454
|
-
const
|
|
10251
|
+
const outerR = Math.max(0, safeNumber(radius));
|
|
10252
|
+
const safeArcWidth = Math.max(0, safeNumber(arcWidth));
|
|
10253
|
+
const innerR = Math.max(0, outerR - safeArcWidth);
|
|
9455
10254
|
const startRad = degToRad(startDeg - 90);
|
|
9456
10255
|
const endRad = degToRad(endDeg - 90);
|
|
9457
10256
|
const outerStart = {
|
|
@@ -9481,8 +10280,9 @@ function createGaugeArcPath(cx, cy, radius, startDeg, endDeg, arcWidth) {
|
|
|
9481
10280
|
}
|
|
9482
10281
|
function createGaugeNeedlePath(cx, cy, length, angleDeg, needleWidth = 4) {
|
|
9483
10282
|
const rad = degToRad(angleDeg - 90);
|
|
9484
|
-
const
|
|
9485
|
-
const
|
|
10283
|
+
const safeLength = Math.max(0, safeNumber(length));
|
|
10284
|
+
const tipX = cx + safeLength * Math.cos(rad);
|
|
10285
|
+
const tipY = cy + safeLength * Math.sin(rad);
|
|
9486
10286
|
const perpRad = rad + Math.PI / 2;
|
|
9487
10287
|
const halfW = needleWidth / 2;
|
|
9488
10288
|
const bx1 = cx + halfW * Math.cos(perpRad);
|
|
@@ -9492,20 +10292,32 @@ function createGaugeNeedlePath(cx, cy, length, angleDeg, needleWidth = 4) {
|
|
|
9492
10292
|
return `M${bx1},${by1} L${tipX},${tipY} L${bx2},${by2} Z`;
|
|
9493
10293
|
}
|
|
9494
10294
|
function valueToGaugeAngle(value, min, max, startAngle, endAngle) {
|
|
9495
|
-
const
|
|
9496
|
-
|
|
10295
|
+
const safeStart = safeNumber(startAngle);
|
|
10296
|
+
const safeEnd = safeNumber(endAngle, safeStart);
|
|
10297
|
+
const safeMin = safeNumber(min);
|
|
10298
|
+
const safeMax = safeNumber(max, safeMin);
|
|
10299
|
+
if (safeMax <= safeMin) return safeStart;
|
|
10300
|
+
const ratio = Math.max(0, Math.min(1, (safeNumber(value, safeMin) - safeMin) / (safeMax - safeMin)));
|
|
10301
|
+
return safeStart + ratio * (safeEnd - safeStart);
|
|
9497
10302
|
}
|
|
9498
10303
|
function computeGaugeTicks(cx, cy, radius, min, max, startAngle, endAngle, tickCount) {
|
|
9499
10304
|
const ticks = [];
|
|
9500
|
-
|
|
9501
|
-
|
|
9502
|
-
|
|
9503
|
-
|
|
10305
|
+
const safeTickCount = Math.max(1, Math.floor(safeNumber(tickCount, 1)));
|
|
10306
|
+
const safeRadius = Math.max(0, safeNumber(radius));
|
|
10307
|
+
const safeMin = safeNumber(min);
|
|
10308
|
+
const safeMax = safeNumber(max, safeMin);
|
|
10309
|
+
const safeStart = safeNumber(startAngle);
|
|
10310
|
+
const safeEnd = safeNumber(endAngle, safeStart);
|
|
10311
|
+
for (let i = 0; i <= safeTickCount; i++) {
|
|
10312
|
+
const ratio = i / safeTickCount;
|
|
10313
|
+
const val = safeMax <= safeMin ? safeMin : safeMin + ratio * (safeMax - safeMin);
|
|
10314
|
+
const angle = safeStart + ratio * (safeEnd - safeStart);
|
|
9504
10315
|
const rad = degToRad(angle - 90);
|
|
9505
|
-
const
|
|
9506
|
-
const
|
|
9507
|
-
const
|
|
9508
|
-
const
|
|
10316
|
+
const innerRadius = Math.max(0, safeRadius - 8);
|
|
10317
|
+
const outerX = cx + safeRadius * Math.cos(rad);
|
|
10318
|
+
const outerY = cy + safeRadius * Math.sin(rad);
|
|
10319
|
+
const innerX = cx + innerRadius * Math.cos(rad);
|
|
10320
|
+
const innerY = cy + innerRadius * Math.sin(rad);
|
|
9509
10321
|
ticks.push({
|
|
9510
10322
|
x1: innerX,
|
|
9511
10323
|
y1: innerY,
|
|
@@ -9544,9 +10356,14 @@ function getHeatmapCellIndexAtPoint(cells, x, y) {
|
|
|
9544
10356
|
return index >= 0 ? index : null;
|
|
9545
10357
|
}
|
|
9546
10358
|
function interpolateColor(minColor, maxColor, t) {
|
|
10359
|
+
const clamped = Number.isFinite(t) ? Math.max(0, Math.min(1, t)) : 0;
|
|
9547
10360
|
const [r1, g1, b1] = hexToRgb(minColor);
|
|
9548
10361
|
const [r2, g2, b2] = hexToRgb(maxColor);
|
|
9549
|
-
return rgbToHex(
|
|
10362
|
+
return rgbToHex(
|
|
10363
|
+
r1 + (r2 - r1) * clamped,
|
|
10364
|
+
g1 + (g2 - g1) * clamped,
|
|
10365
|
+
b1 + (b2 - b1) * clamped
|
|
10366
|
+
);
|
|
9550
10367
|
}
|
|
9551
10368
|
function interpolateColorOklch(minColor, maxColor, t) {
|
|
9552
10369
|
const clamped = Math.max(0, Math.min(1, t));
|
|
@@ -9566,30 +10383,36 @@ function computeHeatmapCells(data, opts) {
|
|
|
9566
10383
|
} = opts;
|
|
9567
10384
|
const cols = xLabels.length;
|
|
9568
10385
|
const rows = yLabels.length;
|
|
9569
|
-
|
|
9570
|
-
const
|
|
9571
|
-
const
|
|
10386
|
+
const safeWidth = Number.isFinite(width) ? Math.max(0, width) : 0;
|
|
10387
|
+
const safeHeight = Number.isFinite(height) ? Math.max(0, height) : 0;
|
|
10388
|
+
const safeCellGap = Number.isFinite(cellGap) ? Math.max(0, cellGap) : 0;
|
|
10389
|
+
if (cols === 0 || rows === 0 || safeWidth <= 0 || safeHeight <= 0) return [];
|
|
10390
|
+
const totalGapX = Math.min(safeWidth, safeCellGap * (cols - 1));
|
|
10391
|
+
const totalGapY = Math.min(safeHeight, safeCellGap * (rows - 1));
|
|
10392
|
+
const cellW = Math.max(0, (safeWidth - totalGapX) / cols);
|
|
10393
|
+
const cellH = Math.max(0, (safeHeight - totalGapY) / rows);
|
|
9572
10394
|
const valMap = /* @__PURE__ */ new Map();
|
|
9573
10395
|
for (const d of data) {
|
|
9574
|
-
valMap.set(`${d.x}|${d.y}`, d.value);
|
|
10396
|
+
valMap.set(`${d.x}|${d.y}`, Number.isFinite(d.value) ? d.value : 0);
|
|
9575
10397
|
}
|
|
9576
|
-
|
|
9577
|
-
let
|
|
9578
|
-
|
|
9579
|
-
|
|
9580
|
-
|
|
10398
|
+
const finiteValues = Array.from(valMap.values());
|
|
10399
|
+
let minVal = 0;
|
|
10400
|
+
let maxVal = 0;
|
|
10401
|
+
if (finiteValues.length > 0) {
|
|
10402
|
+
minVal = Math.min(...finiteValues, 0);
|
|
10403
|
+
maxVal = Math.max(...finiteValues, 0);
|
|
9581
10404
|
}
|
|
9582
10405
|
if (minVal === maxVal) maxVal = minVal + 1;
|
|
9583
10406
|
const cells = [];
|
|
9584
10407
|
for (let r = 0; r < rows; r++) {
|
|
9585
10408
|
for (let c = 0; c < cols; c++) {
|
|
9586
10409
|
const val = valMap.get(`${xLabels[c]}|${yLabels[r]}`) ?? 0;
|
|
9587
|
-
const heat = (val - minVal) / (maxVal - minVal);
|
|
10410
|
+
const heat = Math.max(0, Math.min(1, (val - minVal) / (maxVal - minVal)));
|
|
9588
10411
|
cells.push({
|
|
9589
10412
|
row: r,
|
|
9590
10413
|
col: c,
|
|
9591
|
-
x: c * (cellW +
|
|
9592
|
-
y: r * (cellH +
|
|
10414
|
+
x: c * (cellW + safeCellGap),
|
|
10415
|
+
y: r * (cellH + safeCellGap),
|
|
9593
10416
|
w: cellW,
|
|
9594
10417
|
h: cellH,
|
|
9595
10418
|
heat,
|
|
@@ -9604,66 +10427,35 @@ function computeHeatmapCells(data, opts) {
|
|
|
9604
10427
|
}
|
|
9605
10428
|
|
|
9606
10429
|
// src/utils/treemap-chart-utils.ts
|
|
9607
|
-
var flattenCache = /* @__PURE__ */ new WeakMap();
|
|
9608
10430
|
function flattenData(data, depth = 0) {
|
|
9609
|
-
if (depth === 0) {
|
|
9610
|
-
const cached = flattenCache.get(data);
|
|
9611
|
-
if (cached) return cached;
|
|
9612
|
-
}
|
|
9613
10431
|
const result = [];
|
|
9614
10432
|
for (const d of data) {
|
|
9615
10433
|
if (d.children && d.children.length > 0) {
|
|
9616
10434
|
result.push(...flattenData(d.children, depth + 1));
|
|
9617
10435
|
} else {
|
|
9618
|
-
result.push({
|
|
10436
|
+
result.push({
|
|
10437
|
+
label: d.label,
|
|
10438
|
+
value: Number.isFinite(d.value) ? Math.max(0, d.value) : 0,
|
|
10439
|
+
depth,
|
|
10440
|
+
color: d.color
|
|
10441
|
+
});
|
|
9619
10442
|
}
|
|
9620
10443
|
}
|
|
9621
|
-
if (depth === 0) {
|
|
9622
|
-
flattenCache.set(data, result);
|
|
9623
|
-
}
|
|
9624
10444
|
return result;
|
|
9625
10445
|
}
|
|
9626
|
-
var _tmLastData = null;
|
|
9627
|
-
var _tmLastW = 0;
|
|
9628
|
-
var _tmLastH = 0;
|
|
9629
|
-
var _tmLastGap = 0;
|
|
9630
|
-
var _tmLastColors = null;
|
|
9631
|
-
var _tmLastResult = [];
|
|
9632
10446
|
function computeTreeMapNodes(data, opts) {
|
|
9633
10447
|
const { width, height, gap = 2, colors } = opts;
|
|
10448
|
+
const safeWidth = Number.isFinite(width) ? Math.max(0, width) : 0;
|
|
10449
|
+
const safeHeight = Number.isFinite(height) ? Math.max(0, height) : 0;
|
|
10450
|
+
const safeGap = Number.isFinite(gap) ? Math.max(0, gap) : 0;
|
|
9634
10451
|
const palette = colors ?? DEFAULT_CHART_COLORS;
|
|
9635
|
-
if (data === _tmLastData && width === _tmLastW && height === _tmLastH && gap === _tmLastGap && palette === _tmLastColors) {
|
|
9636
|
-
return _tmLastResult;
|
|
9637
|
-
}
|
|
9638
10452
|
const flat = flattenData(data);
|
|
9639
|
-
if (flat.length === 0)
|
|
9640
|
-
_tmLastData = data;
|
|
9641
|
-
_tmLastW = width;
|
|
9642
|
-
_tmLastH = height;
|
|
9643
|
-
_tmLastGap = gap;
|
|
9644
|
-
_tmLastColors = palette;
|
|
9645
|
-
_tmLastResult = [];
|
|
9646
|
-
return _tmLastResult;
|
|
9647
|
-
}
|
|
10453
|
+
if (flat.length === 0 || safeWidth <= 0 || safeHeight <= 0) return [];
|
|
9648
10454
|
const totalValue = flat.reduce((s, d) => s + d.value, 0);
|
|
9649
|
-
if (totalValue
|
|
9650
|
-
_tmLastData = data;
|
|
9651
|
-
_tmLastW = width;
|
|
9652
|
-
_tmLastH = height;
|
|
9653
|
-
_tmLastGap = gap;
|
|
9654
|
-
_tmLastColors = palette;
|
|
9655
|
-
_tmLastResult = [];
|
|
9656
|
-
return _tmLastResult;
|
|
9657
|
-
}
|
|
10455
|
+
if (totalValue <= 0) return [];
|
|
9658
10456
|
const sorted = flat.map((d, i) => ({ ...d, originalIndex: i })).sort((a, b) => b.value - a.value);
|
|
9659
10457
|
const nodes = [];
|
|
9660
|
-
layoutRect(sorted, 0, 0,
|
|
9661
|
-
_tmLastData = data;
|
|
9662
|
-
_tmLastW = width;
|
|
9663
|
-
_tmLastH = height;
|
|
9664
|
-
_tmLastGap = gap;
|
|
9665
|
-
_tmLastColors = palette;
|
|
9666
|
-
_tmLastResult = nodes;
|
|
10458
|
+
layoutRect(sorted, 0, 0, safeWidth, safeHeight, safeGap, palette, nodes);
|
|
9667
10459
|
return nodes;
|
|
9668
10460
|
}
|
|
9669
10461
|
function layoutRect(items, x, y, w, h, gap, palette, out) {
|
|
@@ -9710,41 +10502,22 @@ function layoutRect(items, x, y, w, h, gap, palette, out) {
|
|
|
9710
10502
|
}
|
|
9711
10503
|
|
|
9712
10504
|
// src/utils/sunburst-chart-utils.ts
|
|
9713
|
-
var sumCache = /* @__PURE__ */ new WeakMap();
|
|
9714
10505
|
function sumValue(d) {
|
|
9715
|
-
const cached = sumCache.get(d);
|
|
9716
|
-
if (cached !== void 0) return cached;
|
|
9717
10506
|
let v;
|
|
9718
10507
|
if (d.children && d.children.length > 0) {
|
|
9719
10508
|
v = d.children.reduce((s, c) => s + sumValue(c), 0);
|
|
9720
10509
|
} else {
|
|
9721
10510
|
v = d.value;
|
|
9722
10511
|
}
|
|
9723
|
-
|
|
9724
|
-
return v;
|
|
9725
|
-
}
|
|
9726
|
-
function precomputeSums(items) {
|
|
9727
|
-
for (const item of items) {
|
|
9728
|
-
if (item.children && item.children.length > 0) {
|
|
9729
|
-
precomputeSums(item.children);
|
|
9730
|
-
}
|
|
9731
|
-
sumValue(item);
|
|
9732
|
-
}
|
|
10512
|
+
return Number.isFinite(v) ? Math.max(0, v) : 0;
|
|
9733
10513
|
}
|
|
9734
|
-
var _sbLastData = null;
|
|
9735
|
-
var _sbLastCx = 0;
|
|
9736
|
-
var _sbLastCy = 0;
|
|
9737
|
-
var _sbLastIR = 0;
|
|
9738
|
-
var _sbLastOR = 0;
|
|
9739
|
-
var _sbLastColors = null;
|
|
9740
|
-
var _sbLastResult = [];
|
|
9741
10514
|
function computeSunburstArcs(data, opts) {
|
|
9742
|
-
const {
|
|
10515
|
+
const { innerRadius, outerRadius, colors } = opts;
|
|
10516
|
+
const cx = Number.isFinite(opts.cx) ? opts.cx : 0;
|
|
10517
|
+
const cy = Number.isFinite(opts.cy) ? opts.cy : 0;
|
|
10518
|
+
const safeInnerRadius = Number.isFinite(innerRadius) ? Math.max(0, innerRadius) : 0;
|
|
10519
|
+
const safeOuterRadius = Number.isFinite(outerRadius) ? Math.max(safeInnerRadius, outerRadius) : safeInnerRadius;
|
|
9743
10520
|
const palette = colors ?? DEFAULT_CHART_COLORS;
|
|
9744
|
-
if (data === _sbLastData && cx === _sbLastCx && cy === _sbLastCy && innerRadius === _sbLastIR && outerRadius === _sbLastOR && palette === _sbLastColors) {
|
|
9745
|
-
return _sbLastResult;
|
|
9746
|
-
}
|
|
9747
|
-
precomputeSums(data);
|
|
9748
10521
|
function maxDepth(items, d) {
|
|
9749
10522
|
let m = d;
|
|
9750
10523
|
for (const item of items) {
|
|
@@ -9755,7 +10528,7 @@ function computeSunburstArcs(data, opts) {
|
|
|
9755
10528
|
return m;
|
|
9756
10529
|
}
|
|
9757
10530
|
const depth = maxDepth(data, 0);
|
|
9758
|
-
const ringWidth = depth > 0 ? (
|
|
10531
|
+
const ringWidth = depth > 0 ? (safeOuterRadius - safeInnerRadius) / (depth + 1) : safeOuterRadius - safeInnerRadius;
|
|
9759
10532
|
const arcs = [];
|
|
9760
10533
|
let flatIndex = 0;
|
|
9761
10534
|
function layoutLevel(items, startAngle, endAngle, level, parentColorIdx) {
|
|
@@ -9767,8 +10540,8 @@ function computeSunburstArcs(data, opts) {
|
|
|
9767
10540
|
const sweep = (endAngle - startAngle) * val / total;
|
|
9768
10541
|
const sa = angle;
|
|
9769
10542
|
const ea = angle + sweep;
|
|
9770
|
-
const iR =
|
|
9771
|
-
const oR = iR + ringWidth - 1;
|
|
10543
|
+
const iR = safeInnerRadius + level * ringWidth;
|
|
10544
|
+
const oR = Math.max(iR, iR + ringWidth - 1);
|
|
9772
10545
|
const colorIdx = level === 0 ? i : parentColorIdx;
|
|
9773
10546
|
const color = item.color ?? palette[colorIdx % palette.length];
|
|
9774
10547
|
const path = createPieArcPath({
|
|
@@ -9782,7 +10555,7 @@ function computeSunburstArcs(data, opts) {
|
|
|
9782
10555
|
arcs.push({
|
|
9783
10556
|
index: flatIndex++,
|
|
9784
10557
|
label: item.label,
|
|
9785
|
-
value:
|
|
10558
|
+
value: val,
|
|
9786
10559
|
depth: level,
|
|
9787
10560
|
startAngle: sa,
|
|
9788
10561
|
endAngle: ea,
|
|
@@ -9797,13 +10570,6 @@ function computeSunburstArcs(data, opts) {
|
|
|
9797
10570
|
});
|
|
9798
10571
|
}
|
|
9799
10572
|
layoutLevel(data, -Math.PI / 2, 3 * Math.PI / 2, 0, 0);
|
|
9800
|
-
_sbLastData = data;
|
|
9801
|
-
_sbLastCx = cx;
|
|
9802
|
-
_sbLastCy = cy;
|
|
9803
|
-
_sbLastIR = innerRadius;
|
|
9804
|
-
_sbLastOR = outerRadius;
|
|
9805
|
-
_sbLastColors = palette;
|
|
9806
|
-
_sbLastResult = arcs;
|
|
9807
10573
|
return arcs;
|
|
9808
10574
|
}
|
|
9809
10575
|
|
|
@@ -9866,13 +10632,12 @@ var resultIconPaths = {
|
|
|
9866
10632
|
function getResultIconPath(status) {
|
|
9867
10633
|
return resultIconPaths[status];
|
|
9868
10634
|
}
|
|
9869
|
-
var
|
|
9870
|
-
|
|
9871
|
-
|
|
9872
|
-
|
|
9873
|
-
};
|
|
10635
|
+
var HTTP_RESULT_STATUSES = /* @__PURE__ */ new Set(["404", "403", "500"]);
|
|
10636
|
+
function isHttpResultStatus(status) {
|
|
10637
|
+
return HTTP_RESULT_STATUSES.has(status);
|
|
10638
|
+
}
|
|
9874
10639
|
function getResultHttpLabel(status) {
|
|
9875
|
-
return
|
|
10640
|
+
return isHttpResultStatus(status) ? status : void 0;
|
|
9876
10641
|
}
|
|
9877
10642
|
|
|
9878
10643
|
// src/utils/empty-utils.ts
|
|
@@ -9887,8 +10652,19 @@ var presetDescriptions = {
|
|
|
9887
10652
|
"no-results": "No results found",
|
|
9888
10653
|
error: "Something went wrong"
|
|
9889
10654
|
};
|
|
9890
|
-
function getEmptyDescription(preset) {
|
|
9891
|
-
|
|
10655
|
+
function getEmptyDescription(preset, locale) {
|
|
10656
|
+
switch (preset) {
|
|
10657
|
+
case "no-data":
|
|
10658
|
+
return locale?.empty?.noDataAvailable ?? presetDescriptions[preset];
|
|
10659
|
+
case "no-results":
|
|
10660
|
+
return locale?.empty?.noResults ?? presetDescriptions[preset];
|
|
10661
|
+
case "error":
|
|
10662
|
+
return locale?.empty?.error ?? presetDescriptions[preset];
|
|
10663
|
+
case "default":
|
|
10664
|
+
case "simple":
|
|
10665
|
+
default:
|
|
10666
|
+
return locale?.empty?.noData ?? locale?.common?.emptyText ?? presetDescriptions[preset];
|
|
10667
|
+
}
|
|
9892
10668
|
}
|
|
9893
10669
|
var emptyIllustrationViewBox = "0 0 64 41";
|
|
9894
10670
|
var emptyIllustrationPaths = [
|
|
@@ -10656,6 +11432,18 @@ var defaultChatMessageStatusInfo = {
|
|
|
10656
11432
|
function getChatMessageStatusInfo(status, statusMap = defaultChatMessageStatusInfo) {
|
|
10657
11433
|
return statusMap[status] || defaultChatMessageStatusInfo[status];
|
|
10658
11434
|
}
|
|
11435
|
+
var chatStatusBarBaseClasses = "px-5 py-2 border-t border-[var(--tiger-border,#e5e7eb)] text-xs italic bg-[var(--tiger-surface-muted,#f9fafb)]";
|
|
11436
|
+
var chatStatusBarVariantText = {
|
|
11437
|
+
default: "text-[var(--tiger-text-muted,#6b7280)]",
|
|
11438
|
+
primary: "text-[var(--tiger-primary,#2563eb)]",
|
|
11439
|
+
success: "text-[var(--tiger-success,#22c55e)]",
|
|
11440
|
+
warning: "text-[var(--tiger-warning,#f59e0b)]",
|
|
11441
|
+
danger: "text-[var(--tiger-danger,#ef4444)]",
|
|
11442
|
+
info: "text-[var(--tiger-info,#3b82f6)]"
|
|
11443
|
+
};
|
|
11444
|
+
function getChatStatusBarClasses(variant = "info") {
|
|
11445
|
+
return `${chatStatusBarBaseClasses} ${chatStatusBarVariantText[variant] ?? chatStatusBarVariantText.info}`;
|
|
11446
|
+
}
|
|
10659
11447
|
|
|
10660
11448
|
// src/utils/activity-feed-utils.ts
|
|
10661
11449
|
var activityItemClasses = "tiger-activity-item";
|
|
@@ -11385,13 +12173,14 @@ function isCascaderOptionExpandable(option) {
|
|
|
11385
12173
|
if (option.isLeaf) return false;
|
|
11386
12174
|
return !!(option.children && option.children.length > 0);
|
|
11387
12175
|
}
|
|
11388
|
-
function flattenCascaderOptions(options, parentPath = [], parentValuePath = []) {
|
|
12176
|
+
function flattenCascaderOptions(options, parentPath = [], parentValuePath = [], changeOnSelect = false) {
|
|
11389
12177
|
const result = [];
|
|
11390
12178
|
for (const option of options) {
|
|
11391
12179
|
const currentPath = [...parentPath, option];
|
|
11392
12180
|
const currentValuePath = [...parentValuePath, option.value];
|
|
11393
12181
|
const isDisabled = currentPath.some((o) => o.disabled);
|
|
11394
|
-
|
|
12182
|
+
const isLeaf = !option.children || option.children.length === 0 || !!option.isLeaf;
|
|
12183
|
+
if (isLeaf || changeOnSelect) {
|
|
11395
12184
|
result.push({
|
|
11396
12185
|
path: currentPath,
|
|
11397
12186
|
valuePath: currentValuePath,
|
|
@@ -11400,7 +12189,9 @@ function flattenCascaderOptions(options, parentPath = [], parentValuePath = [])
|
|
|
11400
12189
|
});
|
|
11401
12190
|
}
|
|
11402
12191
|
if (option.children && option.children.length > 0) {
|
|
11403
|
-
result.push(
|
|
12192
|
+
result.push(
|
|
12193
|
+
...flattenCascaderOptions(option.children, currentPath, currentValuePath, changeOnSelect)
|
|
12194
|
+
);
|
|
11404
12195
|
}
|
|
11405
12196
|
}
|
|
11406
12197
|
return result;
|
|
@@ -12072,6 +12863,19 @@ function splitTransferData(dataSource, targetKeys) {
|
|
|
12072
12863
|
}
|
|
12073
12864
|
return { sourceItems, targetItems };
|
|
12074
12865
|
}
|
|
12866
|
+
function moveTransferItems(direction, targetKeys, selectedKeys, dataSource) {
|
|
12867
|
+
const disabledKeys = /* @__PURE__ */ new Set();
|
|
12868
|
+
for (const item of dataSource) {
|
|
12869
|
+
if (item.disabled) disabledKeys.add(item.key);
|
|
12870
|
+
}
|
|
12871
|
+
const dataKeys = new Set(dataSource.map((item) => item.key));
|
|
12872
|
+
const movedKeys = [...selectedKeys].filter((key) => dataKeys.has(key) && !disabledKeys.has(key));
|
|
12873
|
+
if (direction === "right") {
|
|
12874
|
+
return { targetKeys: [...targetKeys, ...movedKeys], movedKeys };
|
|
12875
|
+
}
|
|
12876
|
+
const movedSet = new Set(movedKeys);
|
|
12877
|
+
return { targetKeys: targetKeys.filter((key) => !movedSet.has(key)), movedKeys };
|
|
12878
|
+
}
|
|
12075
12879
|
function filterTransferItems(items, query, filterFn) {
|
|
12076
12880
|
if (!query) return items;
|
|
12077
12881
|
const fn = filterFn ?? defaultTransferFilter;
|
|
@@ -12703,9 +13507,14 @@ var minusPathD = "M5 10a1 1 0 011-1h8a1 1 0 110 2H6a1 1 0 01-1-1z";
|
|
|
12703
13507
|
var plusPathD = "M10 5a1 1 0 011 1v3h3a1 1 0 110 2h-3v3a1 1 0 11-2 0v-3H6a1 1 0 110-2h3V6a1 1 0 011-1z";
|
|
12704
13508
|
var stepperIconViewBox = "0 0 20 20";
|
|
12705
13509
|
function clampStepperValue(value, min, max, precision) {
|
|
12706
|
-
|
|
12707
|
-
|
|
12708
|
-
|
|
13510
|
+
const safeMin = Number.isFinite(min) || min === Number.NEGATIVE_INFINITY ? min : 0;
|
|
13511
|
+
const safeMax = Number.isFinite(max) || max === Number.POSITIVE_INFINITY ? max : safeMin;
|
|
13512
|
+
const lower = Math.min(safeMin, safeMax);
|
|
13513
|
+
const upper = Math.max(safeMin, safeMax);
|
|
13514
|
+
const fallback = Number.isFinite(lower) ? lower : 0;
|
|
13515
|
+
let v = Math.max(lower, Math.min(upper, Number.isFinite(value) ? value : fallback));
|
|
13516
|
+
if (precision !== void 0 && Number.isFinite(precision) && precision >= 0) {
|
|
13517
|
+
v = Number(v.toFixed(Math.floor(precision)));
|
|
12709
13518
|
}
|
|
12710
13519
|
return v;
|
|
12711
13520
|
}
|
|
@@ -13743,6 +14552,26 @@ function calculateResizeDelta(handle, mouseDeltaX, mouseDeltaY, axis) {
|
|
|
13743
14552
|
}
|
|
13744
14553
|
return { deltaWidth, deltaHeight };
|
|
13745
14554
|
}
|
|
14555
|
+
var RESIZE_KEYBOARD_STEP = 10;
|
|
14556
|
+
function getResizeKeyboardDelta(key, step = RESIZE_KEYBOARD_STEP) {
|
|
14557
|
+
switch (key) {
|
|
14558
|
+
case "ArrowRight":
|
|
14559
|
+
return { deltaX: step, deltaY: 0 };
|
|
14560
|
+
case "ArrowLeft":
|
|
14561
|
+
return { deltaX: -step, deltaY: 0 };
|
|
14562
|
+
case "ArrowDown":
|
|
14563
|
+
return { deltaX: 0, deltaY: step };
|
|
14564
|
+
case "ArrowUp":
|
|
14565
|
+
return { deltaX: 0, deltaY: -step };
|
|
14566
|
+
default:
|
|
14567
|
+
return null;
|
|
14568
|
+
}
|
|
14569
|
+
}
|
|
14570
|
+
function getResizeHandleOrientation(handle) {
|
|
14571
|
+
if (handle === "left" || handle === "right") return "vertical";
|
|
14572
|
+
if (handle === "top" || handle === "bottom") return "horizontal";
|
|
14573
|
+
return void 0;
|
|
14574
|
+
}
|
|
13746
14575
|
function clampDimensions(width, height, minWidth, minHeight, maxWidth, maxHeight) {
|
|
13747
14576
|
let w = Math.max(width, minWidth);
|
|
13748
14577
|
let h = Math.max(height, minHeight);
|
|
@@ -13766,6 +14595,19 @@ var codeEditorHighlightClasses = "p-3 font-mono text-sm leading-relaxed whitespa
|
|
|
13766
14595
|
var codeEditorLineNumberClasses = "select-none text-right pr-3 pl-2 border-r min-w-[3rem] flex-shrink-0";
|
|
13767
14596
|
var codeEditorLineNumberLightClasses = "bg-gray-50 border-gray-200 text-gray-400";
|
|
13768
14597
|
var codeEditorLineNumberDarkClasses = "bg-gray-800 border-gray-700 text-gray-500";
|
|
14598
|
+
var codeEditorActiveLineLightClasses = "bg-gray-100";
|
|
14599
|
+
var codeEditorActiveLineDarkClasses = "bg-gray-800/60";
|
|
14600
|
+
function getCodeEditorActiveLineClasses(theme) {
|
|
14601
|
+
return theme === "dark" ? codeEditorActiveLineDarkClasses : codeEditorActiveLineLightClasses;
|
|
14602
|
+
}
|
|
14603
|
+
function getActiveLineIndex(value, caretPosition) {
|
|
14604
|
+
const clamped = Math.max(0, Math.min(caretPosition, value.length));
|
|
14605
|
+
let line = 0;
|
|
14606
|
+
for (let i = 0; i < clamped; i++) {
|
|
14607
|
+
if (value[i] === "\n") line++;
|
|
14608
|
+
}
|
|
14609
|
+
return line;
|
|
14610
|
+
}
|
|
13769
14611
|
var tokenClassesLight = {
|
|
13770
14612
|
keyword: "text-purple-600 font-semibold",
|
|
13771
14613
|
string: "text-green-600",
|
|
@@ -14159,6 +15001,66 @@ function isContentEmpty(html) {
|
|
|
14159
15001
|
const stripped = html.replace(/<br\s*\/?>/gi, "").replace(/<\/?[^>]*>/g, "").replace(/ /gi, "").trim();
|
|
14160
15002
|
return stripped.length === 0;
|
|
14161
15003
|
}
|
|
15004
|
+
function escapeHtml(value) {
|
|
15005
|
+
return value.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
15006
|
+
}
|
|
15007
|
+
function decodeHtmlEntities(value) {
|
|
15008
|
+
return value.replace(/ /gi, " ").replace(/</gi, "<").replace(/>/gi, ">").replace(/"/gi, '"').replace(/'/gi, "'").replace(/&/gi, "&");
|
|
15009
|
+
}
|
|
15010
|
+
function inlineMarkdownToHtml(value) {
|
|
15011
|
+
return escapeHtml(value).replace(/\*\*([^*]+)\*\*/g, "<strong>$1</strong>").replace(/\*([^*]+)\*/g, "<em>$1</em>").replace(/`([^`]+)`/g, "<code>$1</code>");
|
|
15012
|
+
}
|
|
15013
|
+
function richTextModeToHtml(value, mode = "html") {
|
|
15014
|
+
if (mode === "html") return sanitizeHtml(value);
|
|
15015
|
+
if (mode === "plain") {
|
|
15016
|
+
return escapeHtml(value).split(/\r?\n/).map((line) => line ? `<p>${line}</p>` : "<p><br></p>").join("");
|
|
15017
|
+
}
|
|
15018
|
+
const lines = value.split(/\r?\n/);
|
|
15019
|
+
const html = [];
|
|
15020
|
+
let listItems = [];
|
|
15021
|
+
const flushList = () => {
|
|
15022
|
+
if (listItems.length === 0) return;
|
|
15023
|
+
html.push(
|
|
15024
|
+
`<ul>${listItems.map((item) => `<li>${inlineMarkdownToHtml(item)}</li>`).join("")}</ul>`
|
|
15025
|
+
);
|
|
15026
|
+
listItems = [];
|
|
15027
|
+
};
|
|
15028
|
+
for (const line of lines) {
|
|
15029
|
+
const trimmed = line.trim();
|
|
15030
|
+
const bullet = /^[-*]\s+(.+)$/.exec(trimmed);
|
|
15031
|
+
if (bullet) {
|
|
15032
|
+
listItems.push(bullet[1]);
|
|
15033
|
+
continue;
|
|
15034
|
+
}
|
|
15035
|
+
flushList();
|
|
15036
|
+
if (!trimmed) {
|
|
15037
|
+
html.push("<p><br></p>");
|
|
15038
|
+
} else if (trimmed.startsWith("### ")) {
|
|
15039
|
+
html.push(`<h3>${inlineMarkdownToHtml(trimmed.slice(4))}</h3>`);
|
|
15040
|
+
} else if (trimmed.startsWith("## ")) {
|
|
15041
|
+
html.push(`<h2>${inlineMarkdownToHtml(trimmed.slice(3))}</h2>`);
|
|
15042
|
+
} else if (trimmed.startsWith("# ")) {
|
|
15043
|
+
html.push(`<h1>${inlineMarkdownToHtml(trimmed.slice(2))}</h1>`);
|
|
15044
|
+
} else {
|
|
15045
|
+
html.push(`<p>${inlineMarkdownToHtml(trimmed)}</p>`);
|
|
15046
|
+
}
|
|
15047
|
+
}
|
|
15048
|
+
flushList();
|
|
15049
|
+
return sanitizeHtml(html.join(""));
|
|
15050
|
+
}
|
|
15051
|
+
function htmlToText(value) {
|
|
15052
|
+
return decodeHtmlEntities(
|
|
15053
|
+
sanitizeHtml(value).replace(/<\/(h[1-6]|p|div|li)>/gi, "\n").replace(/<br\s*\/?>/gi, "\n").replace(/<\/ul>/gi, "\n").replace(/<[^>]+>/g, "")
|
|
15054
|
+
).replace(/\n{3,}/g, "\n\n").trim();
|
|
15055
|
+
}
|
|
15056
|
+
function richTextHtmlToMode(html, mode = "html") {
|
|
15057
|
+
const sanitized = sanitizeHtml(html);
|
|
15058
|
+
if (mode === "html") return sanitized;
|
|
15059
|
+
if (mode === "plain") return htmlToText(sanitized);
|
|
15060
|
+
return decodeHtmlEntities(
|
|
15061
|
+
sanitized.replace(/<h1[^>]*>([\s\S]*?)<\/h1>/gi, "# $1\n\n").replace(/<h2[^>]*>([\s\S]*?)<\/h2>/gi, "## $1\n\n").replace(/<h3[^>]*>([\s\S]*?)<\/h3>/gi, "### $1\n\n").replace(/<li[^>]*>([\s\S]*?)<\/li>/gi, "- $1\n").replace(/<\/ul>/gi, "\n").replace(/<strong[^>]*>([\s\S]*?)<\/strong>/gi, "**$1**").replace(/<b[^>]*>([\s\S]*?)<\/b>/gi, "**$1**").replace(/<em[^>]*>([\s\S]*?)<\/em>/gi, "*$1*").replace(/<i[^>]*>([\s\S]*?)<\/i>/gi, "*$1*").replace(/<code[^>]*>([\s\S]*?)<\/code>/gi, "`$1`").replace(/<\/(p|div)>/gi, "\n\n").replace(/<br\s*\/?>/gi, "\n").replace(/<[^>]+>/g, "")
|
|
15062
|
+
).replace(/\n{3,}/g, "\n\n").trim();
|
|
15063
|
+
}
|
|
14162
15064
|
function parseHeight(height) {
|
|
14163
15065
|
if (height === void 0) return void 0;
|
|
14164
15066
|
if (typeof height === "number") return `${height}px`;
|
|
@@ -14452,15 +15354,15 @@ function createBuiltinRichTextEngine() {
|
|
|
14452
15354
|
name: "builtin",
|
|
14453
15355
|
create(ctx) {
|
|
14454
15356
|
const { element } = ctx;
|
|
15357
|
+
const mode = ctx.mode ?? "html";
|
|
14455
15358
|
let readOnly = ctx.readOnly;
|
|
14456
15359
|
let disabled = ctx.disabled;
|
|
14457
15360
|
element.contentEditable = String(!(readOnly || disabled));
|
|
14458
|
-
const initial =
|
|
15361
|
+
const initial = richTextModeToHtml(ctx.initialValue, mode);
|
|
14459
15362
|
if (initial) element.innerHTML = initial;
|
|
14460
15363
|
const handleInput = () => {
|
|
14461
15364
|
const html = element.innerHTML;
|
|
14462
|
-
|
|
14463
|
-
ctx.notifyChange(sanitized);
|
|
15365
|
+
ctx.notifyChange(richTextHtmlToMode(html, mode));
|
|
14464
15366
|
};
|
|
14465
15367
|
const refreshActiveFormats = () => {
|
|
14466
15368
|
if (!isBrowser()) return;
|
|
@@ -14524,11 +15426,11 @@ function createBuiltinRichTextEngine() {
|
|
|
14524
15426
|
};
|
|
14525
15427
|
return {
|
|
14526
15428
|
setValue(html) {
|
|
14527
|
-
const sanitized =
|
|
15429
|
+
const sanitized = richTextModeToHtml(html, mode);
|
|
14528
15430
|
if (element.innerHTML !== sanitized) element.innerHTML = sanitized;
|
|
14529
15431
|
},
|
|
14530
15432
|
getValue() {
|
|
14531
|
-
return
|
|
15433
|
+
return richTextHtmlToMode(element.innerHTML, mode);
|
|
14532
15434
|
},
|
|
14533
15435
|
exec,
|
|
14534
15436
|
refreshActiveFormats,
|
|
@@ -14627,17 +15529,54 @@ var virtualTableBorderedClasses = "[&_td]:border-r [&_th]:border-r [&_td:last-ch
|
|
|
14627
15529
|
var virtualTableEmptyClasses = "flex items-center justify-center py-12 text-sm text-[var(--tiger-text-muted,#9ca3af)]";
|
|
14628
15530
|
var virtualTableLoadingClasses = "absolute inset-0 flex items-center justify-center bg-[var(--tiger-table-bg,var(--tiger-component-table-bg,var(--tiger-bg,var(--tiger-surface,#ffffff))))]/60 z-20";
|
|
14629
15531
|
function calculateVirtualRange(scrollTop, viewportHeight, totalRows, rowHeight, overscan = 5) {
|
|
14630
|
-
|
|
15532
|
+
const safeTotalRows = Number.isFinite(totalRows) ? Math.max(0, Math.floor(totalRows)) : 0;
|
|
15533
|
+
const safeRowHeight = Number.isFinite(rowHeight) ? rowHeight : 0;
|
|
15534
|
+
const safeViewportHeight = Number.isFinite(viewportHeight) ? Math.max(0, viewportHeight) : 0;
|
|
15535
|
+
const safeScrollTop = Number.isFinite(scrollTop) ? Math.max(0, scrollTop) : 0;
|
|
15536
|
+
const safeOverscan = Number.isFinite(overscan) ? Math.max(0, Math.floor(overscan)) : 0;
|
|
15537
|
+
if (safeTotalRows === 0 || safeRowHeight <= 0 || safeViewportHeight <= 0) {
|
|
14631
15538
|
return { start: 0, end: 0, offsetTop: 0, totalHeight: 0 };
|
|
14632
15539
|
}
|
|
14633
|
-
const totalHeight =
|
|
14634
|
-
const startRaw = Math.floor(
|
|
14635
|
-
const visibleCount = Math.ceil(
|
|
14636
|
-
const start = Math.max(0, startRaw -
|
|
14637
|
-
const end = Math.min(
|
|
14638
|
-
const offsetTop = start *
|
|
15540
|
+
const totalHeight = safeTotalRows * safeRowHeight;
|
|
15541
|
+
const startRaw = Math.floor(safeScrollTop / safeRowHeight);
|
|
15542
|
+
const visibleCount = Math.ceil(safeViewportHeight / safeRowHeight);
|
|
15543
|
+
const start = Math.max(0, Math.min(safeTotalRows, startRaw - safeOverscan));
|
|
15544
|
+
const end = Math.max(start, Math.min(safeTotalRows, startRaw + visibleCount + safeOverscan));
|
|
15545
|
+
const offsetTop = start * safeRowHeight;
|
|
14639
15546
|
return { start, end, offsetTop, totalHeight };
|
|
14640
15547
|
}
|
|
15548
|
+
function calculateVirtualColumnRange(scrollLeft, viewportWidth, columnWidths, overscan = 2) {
|
|
15549
|
+
const count = columnWidths.length;
|
|
15550
|
+
if (count === 0 || viewportWidth <= 0) {
|
|
15551
|
+
return { start: 0, end: count, leftPad: 0, rightPad: 0 };
|
|
15552
|
+
}
|
|
15553
|
+
const safeScrollLeft = Math.max(0, Number.isFinite(scrollLeft) ? scrollLeft : 0);
|
|
15554
|
+
const safeOverscan = Math.max(0, Math.floor(overscan));
|
|
15555
|
+
let acc = 0;
|
|
15556
|
+
let rawStart = 0;
|
|
15557
|
+
for (let i = 0; i < count; i++) {
|
|
15558
|
+
if (acc + columnWidths[i] > safeScrollLeft) {
|
|
15559
|
+
rawStart = i;
|
|
15560
|
+
break;
|
|
15561
|
+
}
|
|
15562
|
+
acc += columnWidths[i];
|
|
15563
|
+
if (i === count - 1) rawStart = count - 1;
|
|
15564
|
+
}
|
|
15565
|
+
const viewEnd = safeScrollLeft + viewportWidth;
|
|
15566
|
+
let endExclusive = rawStart;
|
|
15567
|
+
let endAcc = acc;
|
|
15568
|
+
while (endExclusive < count && endAcc < viewEnd) {
|
|
15569
|
+
endAcc += columnWidths[endExclusive];
|
|
15570
|
+
endExclusive++;
|
|
15571
|
+
}
|
|
15572
|
+
const start = Math.max(0, rawStart - safeOverscan);
|
|
15573
|
+
const end = Math.min(count, endExclusive + safeOverscan);
|
|
15574
|
+
let leftPad = 0;
|
|
15575
|
+
for (let i = 0; i < start; i++) leftPad += columnWidths[i];
|
|
15576
|
+
let rightPad = 0;
|
|
15577
|
+
for (let i = end; i < count; i++) rightPad += columnWidths[i];
|
|
15578
|
+
return { start, end, leftPad, rightPad };
|
|
15579
|
+
}
|
|
14641
15580
|
function getVirtualRowKey(row, index, rowKey) {
|
|
14642
15581
|
if (!rowKey) return index;
|
|
14643
15582
|
if (typeof rowKey === "function") return rowKey(row, index);
|
|
@@ -14724,8 +15663,14 @@ function shouldLoadMore(el, threshold, direction = "vertical", inverse = false)
|
|
|
14724
15663
|
}
|
|
14725
15664
|
function createInfiniteScrollObserver(sentinel, options) {
|
|
14726
15665
|
if (typeof IntersectionObserver === "undefined") return null;
|
|
14727
|
-
const {
|
|
14728
|
-
|
|
15666
|
+
const {
|
|
15667
|
+
threshold = 100,
|
|
15668
|
+
direction = "vertical",
|
|
15669
|
+
root = null,
|
|
15670
|
+
inverse = false,
|
|
15671
|
+
onLoadMore
|
|
15672
|
+
} = options;
|
|
15673
|
+
const rootMargin = direction === "horizontal" ? inverse ? `0px 0px 0px ${threshold}px` : `0px ${threshold}px 0px 0px` : inverse ? `${threshold}px 0px 0px 0px` : `0px 0px ${threshold}px 0px`;
|
|
14729
15674
|
const observer = new IntersectionObserver(
|
|
14730
15675
|
(entries) => {
|
|
14731
15676
|
const entry = entries[entries.length - 1];
|
|
@@ -14748,7 +15693,7 @@ function getInfiniteScrollContainerClasses(direction, className) {
|
|
|
14748
15693
|
}
|
|
14749
15694
|
|
|
14750
15695
|
// src/utils/file-manager-utils.ts
|
|
14751
|
-
var fileManagerContainerClasses = "tiger-file-manager flex flex-col border border-[var(--tiger-border,#e5e7eb)] rounded-[var(--tiger-radius-md,0.5rem)] bg-[var(--tiger-bg,#ffffff)] overflow-hidden";
|
|
15696
|
+
var fileManagerContainerClasses = "tiger-file-manager relative flex flex-col border border-[var(--tiger-border,#e5e7eb)] rounded-[var(--tiger-radius-md,0.5rem)] bg-[var(--tiger-bg,#ffffff)] overflow-hidden";
|
|
14752
15697
|
var fileManagerToolbarClasses = "flex items-center gap-2 px-3 py-2 border-b border-[var(--tiger-border,#e5e7eb)] bg-[var(--tiger-bg-secondary,#f9fafb)]";
|
|
14753
15698
|
var fileManagerBreadcrumbClasses = "flex items-center gap-1 text-sm text-[var(--tiger-text-secondary,#6b7280)]";
|
|
14754
15699
|
var fileManagerBreadcrumbItemClasses = "cursor-pointer hover:text-[var(--tiger-primary,#2563eb)] transition-colors";
|
|
@@ -14798,18 +15743,10 @@ function filterHiddenFiles(items, showHidden) {
|
|
|
14798
15743
|
return items.filter((item) => !item.name.startsWith("."));
|
|
14799
15744
|
}
|
|
14800
15745
|
function formatFileSizeLabel(bytes) {
|
|
14801
|
-
|
|
14802
|
-
if (bytes === 0) return "0 B";
|
|
14803
|
-
const units = ["B", "KB", "MB", "GB", "TB"];
|
|
14804
|
-
const k = 1024;
|
|
14805
|
-
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
14806
|
-
const size = bytes / Math.pow(k, i);
|
|
14807
|
-
return `${size % 1 === 0 ? size : size.toFixed(1)} ${units[i]}`;
|
|
15746
|
+
return formatBytes(bytes, { precision: 1, trimTrailingZeros: true });
|
|
14808
15747
|
}
|
|
14809
15748
|
function getFileExtension2(name) {
|
|
14810
|
-
|
|
14811
|
-
if (dot <= 0) return "";
|
|
14812
|
-
return name.slice(dot + 1).toLowerCase();
|
|
15749
|
+
return getFileExtensionName(name);
|
|
14813
15750
|
}
|
|
14814
15751
|
function navigateToFolder(files, path) {
|
|
14815
15752
|
let current = files;
|
|
@@ -15161,8 +16098,10 @@ function normalizeGanttDate(value) {
|
|
|
15161
16098
|
return time;
|
|
15162
16099
|
}
|
|
15163
16100
|
function getGanttTaskAriaLabel(task) {
|
|
15164
|
-
const
|
|
15165
|
-
const
|
|
16101
|
+
const startMs = normalizeGanttDate(task.start);
|
|
16102
|
+
const endMs = normalizeGanttDate(task.end);
|
|
16103
|
+
const start = Number.isFinite(startMs) ? formatGanttDate(new Date(startMs), "day") : "unknown";
|
|
16104
|
+
const end = Number.isFinite(endMs) ? formatGanttDate(new Date(endMs), "day") : "unknown";
|
|
15166
16105
|
const progress = typeof task.progress === "number" ? `, ${clampProgress(task.progress)}%` : "";
|
|
15167
16106
|
return `${task.label}, ${start} to ${end}${progress}`;
|
|
15168
16107
|
}
|
|
@@ -15175,19 +16114,28 @@ function getGanttDependencyPath(dependency) {
|
|
|
15175
16114
|
}
|
|
15176
16115
|
function computeGanttLayout(data, options = {}) {
|
|
15177
16116
|
const {
|
|
15178
|
-
width = 720,
|
|
15179
|
-
rowHeight = 40,
|
|
15180
|
-
barHeight = 18,
|
|
15181
|
-
taskLabelWidth = 140,
|
|
15182
|
-
timelineHeight = 36,
|
|
15183
|
-
minBarWidth = 6,
|
|
16117
|
+
width: rawWidth = 720,
|
|
16118
|
+
rowHeight: rawRowHeight = 40,
|
|
16119
|
+
barHeight: rawBarHeight = 18,
|
|
16120
|
+
taskLabelWidth: rawTaskLabelWidth = 140,
|
|
16121
|
+
timelineHeight: rawTimelineHeight = 36,
|
|
16122
|
+
minBarWidth: rawMinBarWidth = 6,
|
|
15184
16123
|
scale = "week",
|
|
15185
16124
|
colors = DEFAULT_CHART_COLORS,
|
|
15186
16125
|
dateFormatter
|
|
15187
16126
|
} = options;
|
|
16127
|
+
const width = Number.isFinite(rawWidth) ? Math.max(0, rawWidth) : 0;
|
|
16128
|
+
const rowHeight = Number.isFinite(rawRowHeight) ? Math.max(0, rawRowHeight) : 0;
|
|
16129
|
+
const barHeight = Number.isFinite(rawBarHeight) ? Math.max(0, rawBarHeight) : 0;
|
|
16130
|
+
const taskLabelWidth = Number.isFinite(rawTaskLabelWidth) ? Math.max(0, rawTaskLabelWidth) : 0;
|
|
16131
|
+
const timelineHeight = Number.isFinite(rawTimelineHeight) ? Math.max(0, rawTimelineHeight) : 0;
|
|
16132
|
+
const minBarWidth = Number.isFinite(rawMinBarWidth) ? Math.max(0, rawMinBarWidth) : 0;
|
|
15188
16133
|
if (data.length === 0) {
|
|
15189
|
-
const
|
|
15190
|
-
const
|
|
16134
|
+
const fallbackMin = Date.now();
|
|
16135
|
+
const rawMinMs2 = normalizeGanttDate(options.minDate ?? fallbackMin);
|
|
16136
|
+
const minMs2 = Number.isFinite(rawMinMs2) ? rawMinMs2 : fallbackMin;
|
|
16137
|
+
const rawMaxMs2 = normalizeGanttDate(options.maxDate ?? minMs2 + DAY_MS);
|
|
16138
|
+
const maxMs2 = Number.isFinite(rawMaxMs2) && rawMaxMs2 > minMs2 ? rawMaxMs2 : minMs2 + DAY_MS;
|
|
15191
16139
|
return {
|
|
15192
16140
|
tasks: [],
|
|
15193
16141
|
dependencies: [],
|
|
@@ -15203,24 +16151,28 @@ function computeGanttLayout(data, options = {}) {
|
|
|
15203
16151
|
const taskRanges = data.map((task) => {
|
|
15204
16152
|
const rawStart = normalizeGanttDate(task.start);
|
|
15205
16153
|
const rawEnd = normalizeGanttDate(task.end);
|
|
15206
|
-
const
|
|
15207
|
-
const
|
|
16154
|
+
const startFallback = Number.isFinite(rawEnd) ? rawEnd : Date.now();
|
|
16155
|
+
const endFallback = Number.isFinite(rawStart) ? rawStart : startFallback + DAY_MS;
|
|
16156
|
+
const safeStart = Number.isFinite(rawStart) ? rawStart : startFallback;
|
|
16157
|
+
const safeEnd = Number.isFinite(rawEnd) ? rawEnd : endFallback;
|
|
16158
|
+
const startMs = Math.min(safeStart, safeEnd);
|
|
16159
|
+
const endMs = Math.max(safeStart, safeEnd);
|
|
15208
16160
|
return { task, startMs, endMs: endMs === startMs ? endMs + DAY_MS : endMs };
|
|
15209
16161
|
});
|
|
15210
|
-
const
|
|
15211
|
-
|
|
15212
|
-
);
|
|
15213
|
-
const
|
|
15214
|
-
|
|
15215
|
-
);
|
|
16162
|
+
const inferredMinMs = Math.min(...taskRanges.map((item) => item.startMs));
|
|
16163
|
+
const inferredMaxMs = Math.max(...taskRanges.map((item) => item.endMs));
|
|
16164
|
+
const rawMinMs = normalizeGanttDate(options.minDate ?? inferredMinMs);
|
|
16165
|
+
const rawMaxMs = normalizeGanttDate(options.maxDate ?? inferredMaxMs);
|
|
16166
|
+
const minMs = Number.isFinite(rawMinMs) ? rawMinMs : inferredMinMs;
|
|
16167
|
+
const maxMs = Number.isFinite(rawMaxMs) ? rawMaxMs : inferredMaxMs;
|
|
15216
16168
|
const safeMaxMs = maxMs > minMs ? maxMs : minMs + DAY_MS;
|
|
15217
16169
|
const timelineWidth = Math.max(0, width - taskLabelWidth);
|
|
15218
16170
|
const rangeMs = safeMaxMs - minMs;
|
|
15219
16171
|
const xForTime = (time) => taskLabelWidth + (time - minMs) / rangeMs * timelineWidth;
|
|
15220
16172
|
const tasks = taskRanges.map(({ task, startMs, endMs }, index) => {
|
|
15221
16173
|
const x = xForTime(startMs);
|
|
15222
|
-
const
|
|
15223
|
-
const barWidth = Math.max(minBarWidth,
|
|
16174
|
+
const rawWidth2 = xForTime(endMs) - x;
|
|
16175
|
+
const barWidth = Math.max(minBarWidth, rawWidth2);
|
|
15224
16176
|
return {
|
|
15225
16177
|
id: task.id,
|
|
15226
16178
|
task,
|
|
@@ -15273,15 +16225,19 @@ function computeGanttLayout(data, options = {}) {
|
|
|
15273
16225
|
};
|
|
15274
16226
|
}
|
|
15275
16227
|
function createGanttTimelineTicks(minMs, maxMs, timelineWidth, taskLabelWidth, scale, formatter = formatGanttDate) {
|
|
16228
|
+
const safeMinMs = Number.isFinite(minMs) ? minMs : Date.now();
|
|
16229
|
+
const safeMaxMs = Number.isFinite(maxMs) && maxMs > safeMinMs ? maxMs : safeMinMs + DAY_MS;
|
|
16230
|
+
const safeTimelineWidth = Number.isFinite(timelineWidth) ? Math.max(0, timelineWidth) : 0;
|
|
16231
|
+
const safeTaskLabelWidth = Number.isFinite(taskLabelWidth) ? Math.max(0, taskLabelWidth) : 0;
|
|
15276
16232
|
const ticks = [];
|
|
15277
|
-
const rangeMs = Math.max(DAY_MS,
|
|
15278
|
-
let current = startOfTick(new Date(
|
|
15279
|
-
while (current.getTime() <=
|
|
16233
|
+
const rangeMs = Math.max(DAY_MS, safeMaxMs - safeMinMs);
|
|
16234
|
+
let current = startOfTick(new Date(safeMinMs), scale);
|
|
16235
|
+
while (current.getTime() <= safeMaxMs) {
|
|
15280
16236
|
const currentMs = current.getTime();
|
|
15281
|
-
if (currentMs >=
|
|
16237
|
+
if (currentMs >= safeMinMs) {
|
|
15282
16238
|
ticks.push({
|
|
15283
16239
|
value: new Date(currentMs),
|
|
15284
|
-
x:
|
|
16240
|
+
x: safeTaskLabelWidth + (currentMs - safeMinMs) / rangeMs * safeTimelineWidth,
|
|
15285
16241
|
label: formatter(new Date(currentMs), scale)
|
|
15286
16242
|
});
|
|
15287
16243
|
}
|
|
@@ -15289,8 +16245,8 @@ function createGanttTimelineTicks(minMs, maxMs, timelineWidth, taskLabelWidth, s
|
|
|
15289
16245
|
if (ticks.length > 64) break;
|
|
15290
16246
|
}
|
|
15291
16247
|
if (ticks.length === 0) {
|
|
15292
|
-
const date = new Date(
|
|
15293
|
-
ticks.push({ value: date, x:
|
|
16248
|
+
const date = new Date(safeMinMs);
|
|
16249
|
+
ticks.push({ value: date, x: safeTaskLabelWidth, label: formatter(date, scale) });
|
|
15294
16250
|
}
|
|
15295
16251
|
return ticks;
|
|
15296
16252
|
}
|
|
@@ -15688,16 +16644,16 @@ var imageViewerNavBtnClasses = "fixed top-1/2 -translate-y-1/2 z-50 p-3 text-whi
|
|
|
15688
16644
|
var imageViewerCloseBtnClasses = "fixed top-4 right-4 z-50 p-2 text-white hover:bg-white/20 rounded-[var(--tiger-radius-md,0.5rem)] transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-white";
|
|
15689
16645
|
var imageViewerCounterClasses = "fixed top-4 left-1/2 -translate-x-1/2 z-50 text-white text-sm bg-[var(--tiger-surface,rgba(0,0,0,0.4))] rounded-full px-3 py-1";
|
|
15690
16646
|
var imageViewerIcons = {
|
|
15691
|
-
zoomIn:
|
|
15692
|
-
zoomOut:
|
|
16647
|
+
zoomIn: zoomInIconPath,
|
|
16648
|
+
zoomOut: zoomOutIconPath,
|
|
15693
16649
|
rotateLeft: "M3 10h7V3M21 14h-7v7M16.7 7.3A8 8 0 004.1 9.9M7.3 16.7A8 8 0 0019.9 14.1",
|
|
15694
16650
|
rotateRight: "M14 10h7V3M10 14H3v7M7.3 7.3A8 8 0 0119.9 9.9M16.7 16.7A8 8 0 014.1 14.1",
|
|
15695
|
-
close:
|
|
15696
|
-
prev:
|
|
15697
|
-
next:
|
|
16651
|
+
close: previewCloseIconPath,
|
|
16652
|
+
prev: prevIconPath,
|
|
16653
|
+
next: nextIconPath
|
|
15698
16654
|
};
|
|
15699
16655
|
function clampZoom(zoom, min, max) {
|
|
15700
|
-
return
|
|
16656
|
+
return clampScale(zoom, min, max);
|
|
15701
16657
|
}
|
|
15702
16658
|
function normalizeRotation(rotation) {
|
|
15703
16659
|
return (rotation % 360 + 360) % 360;
|
|
@@ -15731,24 +16687,19 @@ function movePan(pan, clientX, clientY) {
|
|
|
15731
16687
|
translateY: pan.startTranslateY + (clientY - pan.startY)
|
|
15732
16688
|
};
|
|
15733
16689
|
}
|
|
15734
|
-
function touchDistance(t1, t2) {
|
|
15735
|
-
const dx = t1.clientX - t2.clientX;
|
|
15736
|
-
const dy = t1.clientY - t2.clientY;
|
|
15737
|
-
return Math.sqrt(dx * dx + dy * dy);
|
|
15738
|
-
}
|
|
15739
16690
|
function createPinchState() {
|
|
15740
16691
|
return { isPinching: false, initialDistance: 0, initialScale: 1 };
|
|
15741
16692
|
}
|
|
15742
16693
|
function startPinch(t1, t2, currentScale) {
|
|
15743
16694
|
return {
|
|
15744
16695
|
isPinching: true,
|
|
15745
|
-
initialDistance:
|
|
16696
|
+
initialDistance: getTouchDistance(t1, t2),
|
|
15746
16697
|
initialScale: currentScale
|
|
15747
16698
|
};
|
|
15748
16699
|
}
|
|
15749
16700
|
function movePinch(pinch, t1, t2, minZoom, maxZoom) {
|
|
15750
16701
|
if (pinch.initialDistance === 0) return pinch.initialScale;
|
|
15751
|
-
const currentDistance =
|
|
16702
|
+
const currentDistance = getTouchDistance(t1, t2);
|
|
15752
16703
|
const ratio = currentDistance / pinch.initialDistance;
|
|
15753
16704
|
return clampZoom(pinch.initialScale * ratio, minZoom, maxZoom);
|
|
15754
16705
|
}
|
|
@@ -16131,78 +17082,108 @@ var MODERN_REDUCED_MOTION_TOKENS = {
|
|
|
16131
17082
|
"--tiger-transition-emphasized": "transform 0ms linear"
|
|
16132
17083
|
};
|
|
16133
17084
|
|
|
16134
|
-
// src/
|
|
16135
|
-
var
|
|
16136
|
-
|
|
16137
|
-
|
|
16138
|
-
|
|
16139
|
-
|
|
16140
|
-
|
|
16141
|
-
|
|
16142
|
-
|
|
16143
|
-
|
|
16144
|
-
|
|
16145
|
-
|
|
16146
|
-
|
|
16147
|
-
|
|
16148
|
-
|
|
16149
|
-
|
|
16150
|
-
|
|
16151
|
-
|
|
16152
|
-
|
|
16153
|
-
|
|
16154
|
-
|
|
16155
|
-
|
|
16156
|
-
|
|
16157
|
-
|
|
16158
|
-
|
|
16159
|
-
|
|
16160
|
-
|
|
16161
|
-
|
|
16162
|
-
|
|
16163
|
-
|
|
16164
|
-
|
|
16165
|
-
"--tiger-error": "#dc2626",
|
|
16166
|
-
"--tiger-info": "#3b82f6",
|
|
16167
|
-
// Chart palette
|
|
16168
|
-
"--tiger-chart-1": "#2563eb",
|
|
16169
|
-
"--tiger-chart-2": "#16a34a",
|
|
16170
|
-
"--tiger-chart-3": "#d97706",
|
|
16171
|
-
"--tiger-chart-4": "#a855f7",
|
|
16172
|
-
"--tiger-chart-5": "#0ea5e9",
|
|
16173
|
-
"--tiger-chart-6": "#ef4444"
|
|
17085
|
+
// src/themes/default/theme.ts
|
|
17086
|
+
var defaultThemeLightColors = {
|
|
17087
|
+
primary: "#2563eb",
|
|
17088
|
+
primaryHover: "#1d4ed8",
|
|
17089
|
+
primaryActive: "#1e40af",
|
|
17090
|
+
primaryDisabled: "#93c5fd",
|
|
17091
|
+
secondary: "#4b5563",
|
|
17092
|
+
secondaryHover: "#374151",
|
|
17093
|
+
secondaryActive: "#1f2937",
|
|
17094
|
+
secondaryDisabled: "#9ca3af",
|
|
17095
|
+
outlineBgHover: "#eff6ff",
|
|
17096
|
+
ghostBgHover: "#eff6ff",
|
|
17097
|
+
focusRing: "#2563eb",
|
|
17098
|
+
surface: "#ffffff",
|
|
17099
|
+
surfaceMuted: "#f9fafb",
|
|
17100
|
+
surfaceRaised: "#ffffff",
|
|
17101
|
+
text: "#111827",
|
|
17102
|
+
textSecondary: "#6b7280",
|
|
17103
|
+
textDisabled: "#d1d5db",
|
|
17104
|
+
border: "#e5e7eb",
|
|
17105
|
+
borderStrong: "#9ca3af",
|
|
17106
|
+
success: "#16a34a",
|
|
17107
|
+
warning: "#d97706",
|
|
17108
|
+
error: "#dc2626",
|
|
17109
|
+
info: "#3b82f6",
|
|
17110
|
+
chart1: "#2563eb",
|
|
17111
|
+
chart2: "#16a34a",
|
|
17112
|
+
chart3: "#d97706",
|
|
17113
|
+
chart4: "#a855f7",
|
|
17114
|
+
chart5: "#0ea5e9",
|
|
17115
|
+
chart6: "#ef4444"
|
|
16174
17116
|
};
|
|
16175
|
-
var
|
|
16176
|
-
|
|
16177
|
-
|
|
16178
|
-
|
|
16179
|
-
|
|
16180
|
-
|
|
16181
|
-
|
|
16182
|
-
|
|
16183
|
-
|
|
16184
|
-
|
|
16185
|
-
|
|
16186
|
-
|
|
16187
|
-
|
|
16188
|
-
|
|
16189
|
-
|
|
16190
|
-
|
|
16191
|
-
|
|
16192
|
-
|
|
16193
|
-
|
|
16194
|
-
|
|
16195
|
-
|
|
16196
|
-
|
|
16197
|
-
|
|
16198
|
-
|
|
16199
|
-
|
|
16200
|
-
|
|
16201
|
-
|
|
16202
|
-
|
|
16203
|
-
|
|
16204
|
-
|
|
17117
|
+
var defaultThemeDarkColors = {
|
|
17118
|
+
primary: "#60a5fa",
|
|
17119
|
+
primaryHover: "#93c5fd",
|
|
17120
|
+
primaryActive: "#bfdbfe",
|
|
17121
|
+
primaryDisabled: "#1e40af",
|
|
17122
|
+
secondary: "#9ca3af",
|
|
17123
|
+
secondaryHover: "#d1d5db",
|
|
17124
|
+
secondaryActive: "#e5e7eb",
|
|
17125
|
+
secondaryDisabled: "#4b5563",
|
|
17126
|
+
outlineBgHover: "#1e3a5f",
|
|
17127
|
+
ghostBgHover: "#1e3a5f",
|
|
17128
|
+
focusRing: "#60a5fa",
|
|
17129
|
+
surface: "#111827",
|
|
17130
|
+
surfaceMuted: "#1f2937",
|
|
17131
|
+
surfaceRaised: "#1f2937",
|
|
17132
|
+
text: "#f9fafb",
|
|
17133
|
+
textSecondary: "#d1d5db",
|
|
17134
|
+
textDisabled: "#4b5563",
|
|
17135
|
+
border: "#374151",
|
|
17136
|
+
borderStrong: "#6b7280",
|
|
17137
|
+
success: "#4ade80",
|
|
17138
|
+
warning: "#fbbf24",
|
|
17139
|
+
error: "#f87171",
|
|
17140
|
+
info: "#60a5fa",
|
|
17141
|
+
chart1: "#60a5fa",
|
|
17142
|
+
chart2: "#4ade80",
|
|
17143
|
+
chart3: "#fbbf24",
|
|
17144
|
+
chart4: "#c084fc",
|
|
17145
|
+
chart5: "#38bdf8",
|
|
17146
|
+
chart6: "#f87171"
|
|
17147
|
+
};
|
|
17148
|
+
var defaultTheme = {
|
|
17149
|
+
name: "default",
|
|
17150
|
+
label: "Default",
|
|
17151
|
+
light: {
|
|
17152
|
+
colors: defaultThemeLightColors,
|
|
17153
|
+
radius: { sm: "4px", md: "6px", lg: "10px", xl: "14px", none: "0", full: "9999px" },
|
|
17154
|
+
shadows: {
|
|
17155
|
+
xs: "0 1px 2px 0 rgba(0,0,0,0.05)",
|
|
17156
|
+
sm: "0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px -1px rgba(0,0,0,0.1)",
|
|
17157
|
+
md: "0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1)",
|
|
17158
|
+
lg: "0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1)",
|
|
17159
|
+
xl: "0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1)"
|
|
17160
|
+
}
|
|
17161
|
+
},
|
|
17162
|
+
dark: {
|
|
17163
|
+
colors: defaultThemeDarkColors,
|
|
17164
|
+
shadows: {
|
|
17165
|
+
xs: "0 1px 2px 0 rgba(0,0,0,0.2)",
|
|
17166
|
+
sm: "0 1px 3px 0 rgba(0,0,0,0.3), 0 1px 2px -1px rgba(0,0,0,0.25)",
|
|
17167
|
+
md: "0 4px 6px -1px rgba(0,0,0,0.3), 0 2px 4px -2px rgba(0,0,0,0.25)",
|
|
17168
|
+
lg: "0 10px 15px -3px rgba(0,0,0,0.3), 0 4px 6px -4px rgba(0,0,0,0.25)",
|
|
17169
|
+
xl: "0 20px 25px -5px rgba(0,0,0,0.3), 0 8px 10px -6px rgba(0,0,0,0.25)"
|
|
17170
|
+
}
|
|
17171
|
+
}
|
|
16205
17172
|
};
|
|
17173
|
+
|
|
17174
|
+
// src/tailwind-plugin.ts
|
|
17175
|
+
function presetToVars(colors) {
|
|
17176
|
+
const vars = {};
|
|
17177
|
+
for (const [key, value] of Object.entries(colors)) {
|
|
17178
|
+
const varName = THEME_CSS_VARS[key];
|
|
17179
|
+
if (varName && value) {
|
|
17180
|
+
vars[varName] = value;
|
|
17181
|
+
}
|
|
17182
|
+
}
|
|
17183
|
+
return vars;
|
|
17184
|
+
}
|
|
17185
|
+
var tigercatTheme = presetToVars(defaultThemeLightColors);
|
|
17186
|
+
var tigercatDarkTheme = presetToVars(defaultThemeDarkColors);
|
|
16206
17187
|
var tigercatDirectionBase = {
|
|
16207
17188
|
'[dir="rtl"] .tiger-rtl-mirror, [data-tiger-dir="rtl"] .tiger-rtl-mirror': {
|
|
16208
17189
|
transform: "scaleX(-1)"
|
|
@@ -16241,16 +17222,6 @@ var tigercatPlugin = plugin(function({ addBase }) {
|
|
|
16241
17222
|
...tigercatReducedMotionBase
|
|
16242
17223
|
});
|
|
16243
17224
|
});
|
|
16244
|
-
function presetToVars(colors) {
|
|
16245
|
-
const vars = {};
|
|
16246
|
-
for (const [key, value] of Object.entries(colors)) {
|
|
16247
|
-
const varName = THEME_CSS_VARS[key];
|
|
16248
|
-
if (varName && value) {
|
|
16249
|
-
vars[varName] = value;
|
|
16250
|
-
}
|
|
16251
|
-
}
|
|
16252
|
-
return vars;
|
|
16253
|
-
}
|
|
16254
17225
|
function createTigercatPlugin(options = {}) {
|
|
16255
17226
|
return plugin(function({ addBase }) {
|
|
16256
17227
|
const preset = options.preset;
|
|
@@ -16275,18 +17246,77 @@ function createTigercatPlugin(options = {}) {
|
|
|
16275
17246
|
}
|
|
16276
17247
|
|
|
16277
17248
|
// src/themes/manager.ts
|
|
16278
|
-
|
|
17249
|
+
var THEME_CONFIG_CSS_VARS = {
|
|
17250
|
+
typography: {
|
|
17251
|
+
fontFamily: "--tiger-font-family",
|
|
17252
|
+
fontFamilyMono: "--tiger-font-family-mono",
|
|
17253
|
+
fontSizeBase: "--tiger-font-size-base",
|
|
17254
|
+
fontSizeSm: "--tiger-font-size-sm",
|
|
17255
|
+
fontSizeLg: "--tiger-font-size-lg",
|
|
17256
|
+
fontWeightNormal: "--tiger-font-weight-normal",
|
|
17257
|
+
fontWeightMedium: "--tiger-font-weight-medium",
|
|
17258
|
+
fontWeightSemibold: "--tiger-font-weight-semibold",
|
|
17259
|
+
fontWeightBold: "--tiger-font-weight-bold",
|
|
17260
|
+
lineHeightNormal: "--tiger-line-height-normal",
|
|
17261
|
+
lineHeightTight: "--tiger-line-height-tight"
|
|
17262
|
+
},
|
|
17263
|
+
radius: {
|
|
17264
|
+
none: "--tiger-radius-none",
|
|
17265
|
+
sm: "--tiger-radius-sm",
|
|
17266
|
+
md: "--tiger-radius-md",
|
|
17267
|
+
lg: "--tiger-radius-lg",
|
|
17268
|
+
xl: "--tiger-radius-xl",
|
|
17269
|
+
full: "--tiger-radius-full"
|
|
17270
|
+
},
|
|
17271
|
+
shadows: {
|
|
17272
|
+
xs: "--tiger-shadow-xs",
|
|
17273
|
+
sm: "--tiger-shadow-sm",
|
|
17274
|
+
md: "--tiger-shadow-md",
|
|
17275
|
+
lg: "--tiger-shadow-lg",
|
|
17276
|
+
xl: "--tiger-shadow-xl"
|
|
17277
|
+
},
|
|
17278
|
+
spacing: {
|
|
17279
|
+
xs: "--tiger-spacing-xs",
|
|
17280
|
+
sm: "--tiger-spacing-sm",
|
|
17281
|
+
md: "--tiger-spacing-md",
|
|
17282
|
+
lg: "--tiger-spacing-lg",
|
|
17283
|
+
xl: "--tiger-spacing-xl"
|
|
17284
|
+
},
|
|
17285
|
+
motion: {
|
|
17286
|
+
durationFast: "--tiger-duration-fast",
|
|
17287
|
+
durationBase: "--tiger-duration-base",
|
|
17288
|
+
durationSlow: "--tiger-duration-slow",
|
|
17289
|
+
easing: "--tiger-easing"
|
|
17290
|
+
}
|
|
17291
|
+
};
|
|
17292
|
+
function themeConfigToCssVars(config) {
|
|
16279
17293
|
const vars = {};
|
|
16280
|
-
|
|
16281
|
-
const
|
|
16282
|
-
|
|
16283
|
-
vars[varName] = value;
|
|
17294
|
+
if (config.colors) {
|
|
17295
|
+
for (const [key, value] of Object.entries(config.colors)) {
|
|
17296
|
+
const varName = THEME_CSS_VARS[key];
|
|
17297
|
+
if (varName && value) vars[varName] = value;
|
|
16284
17298
|
}
|
|
16285
17299
|
}
|
|
16286
|
-
|
|
17300
|
+
for (const section of ["typography", "radius", "shadows", "spacing", "motion"]) {
|
|
17301
|
+
const values = config[section];
|
|
17302
|
+
if (!values) continue;
|
|
17303
|
+
const varNames = THEME_CONFIG_CSS_VARS[section];
|
|
17304
|
+
for (const [key, value] of Object.entries(values)) {
|
|
17305
|
+
const varName = varNames[key];
|
|
17306
|
+
if (varName && value) vars[varName] = value;
|
|
17307
|
+
}
|
|
17308
|
+
}
|
|
17309
|
+
return vars;
|
|
16287
17310
|
}
|
|
16288
|
-
function
|
|
16289
|
-
removeCssVarsCached(target,
|
|
17311
|
+
function clearThemeConfig(target) {
|
|
17312
|
+
removeCssVarsCached(target, [
|
|
17313
|
+
...Object.values(THEME_CSS_VARS),
|
|
17314
|
+
...Object.values(THEME_CONFIG_CSS_VARS.typography),
|
|
17315
|
+
...Object.values(THEME_CONFIG_CSS_VARS.radius),
|
|
17316
|
+
...Object.values(THEME_CONFIG_CSS_VARS.shadows),
|
|
17317
|
+
...Object.values(THEME_CONFIG_CSS_VARS.spacing),
|
|
17318
|
+
...Object.values(THEME_CONFIG_CSS_VARS.motion)
|
|
17319
|
+
]);
|
|
16290
17320
|
}
|
|
16291
17321
|
function resolveSystemDark() {
|
|
16292
17322
|
if (!isBrowser()) return false;
|
|
@@ -16383,12 +17413,10 @@ var ThemeManagerImpl = class {
|
|
|
16383
17413
|
if (!isBrowser()) return;
|
|
16384
17414
|
const root = document.documentElement;
|
|
16385
17415
|
const preset = this.presets.get(this.currentThemeName);
|
|
16386
|
-
|
|
17416
|
+
clearThemeConfig(root);
|
|
16387
17417
|
if (preset) {
|
|
16388
17418
|
const config = this.resolvedDark ? preset.dark : preset.light;
|
|
16389
|
-
|
|
16390
|
-
applyColors(config.colors, root);
|
|
16391
|
-
}
|
|
17419
|
+
setCssVarsCached(root, themeConfigToCssVars(config));
|
|
16392
17420
|
}
|
|
16393
17421
|
if (this.resolvedDark) {
|
|
16394
17422
|
root.classList.add("dark");
|
|
@@ -16427,93 +17455,6 @@ var ThemeManagerImpl = class {
|
|
|
16427
17455
|
};
|
|
16428
17456
|
var ThemeManager = new ThemeManagerImpl();
|
|
16429
17457
|
|
|
16430
|
-
// src/themes/default/theme.ts
|
|
16431
|
-
var defaultTheme = {
|
|
16432
|
-
name: "default",
|
|
16433
|
-
label: "Default",
|
|
16434
|
-
light: {
|
|
16435
|
-
colors: {
|
|
16436
|
-
primary: "#2563eb",
|
|
16437
|
-
primaryHover: "#1d4ed8",
|
|
16438
|
-
primaryActive: "#1e40af",
|
|
16439
|
-
primaryDisabled: "#93c5fd",
|
|
16440
|
-
secondary: "#4b5563",
|
|
16441
|
-
secondaryHover: "#374151",
|
|
16442
|
-
secondaryActive: "#1f2937",
|
|
16443
|
-
secondaryDisabled: "#9ca3af",
|
|
16444
|
-
outlineBgHover: "#eff6ff",
|
|
16445
|
-
ghostBgHover: "#eff6ff",
|
|
16446
|
-
focusRing: "#2563eb",
|
|
16447
|
-
surface: "#ffffff",
|
|
16448
|
-
surfaceMuted: "#f9fafb",
|
|
16449
|
-
surfaceRaised: "#ffffff",
|
|
16450
|
-
text: "#111827",
|
|
16451
|
-
textSecondary: "#6b7280",
|
|
16452
|
-
textDisabled: "#d1d5db",
|
|
16453
|
-
border: "#e5e7eb",
|
|
16454
|
-
borderStrong: "#9ca3af",
|
|
16455
|
-
success: "#16a34a",
|
|
16456
|
-
warning: "#d97706",
|
|
16457
|
-
error: "#dc2626",
|
|
16458
|
-
info: "#3b82f6",
|
|
16459
|
-
chart1: "#2563eb",
|
|
16460
|
-
chart2: "#16a34a",
|
|
16461
|
-
chart3: "#d97706",
|
|
16462
|
-
chart4: "#a855f7",
|
|
16463
|
-
chart5: "#0ea5e9",
|
|
16464
|
-
chart6: "#ef4444"
|
|
16465
|
-
},
|
|
16466
|
-
radius: { sm: "4px", md: "6px", lg: "10px", xl: "14px", none: "0", full: "9999px" },
|
|
16467
|
-
shadows: {
|
|
16468
|
-
xs: "0 1px 2px 0 rgba(0,0,0,0.05)",
|
|
16469
|
-
sm: "0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px -1px rgba(0,0,0,0.1)",
|
|
16470
|
-
md: "0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1)",
|
|
16471
|
-
lg: "0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1)",
|
|
16472
|
-
xl: "0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1)"
|
|
16473
|
-
}
|
|
16474
|
-
},
|
|
16475
|
-
dark: {
|
|
16476
|
-
colors: {
|
|
16477
|
-
primary: "#60a5fa",
|
|
16478
|
-
primaryHover: "#93c5fd",
|
|
16479
|
-
primaryActive: "#bfdbfe",
|
|
16480
|
-
primaryDisabled: "#1e40af",
|
|
16481
|
-
secondary: "#9ca3af",
|
|
16482
|
-
secondaryHover: "#d1d5db",
|
|
16483
|
-
secondaryActive: "#e5e7eb",
|
|
16484
|
-
secondaryDisabled: "#4b5563",
|
|
16485
|
-
outlineBgHover: "#1e3a5f",
|
|
16486
|
-
ghostBgHover: "#1e3a5f",
|
|
16487
|
-
focusRing: "#60a5fa",
|
|
16488
|
-
surface: "#111827",
|
|
16489
|
-
surfaceMuted: "#1f2937",
|
|
16490
|
-
surfaceRaised: "#1f2937",
|
|
16491
|
-
text: "#f9fafb",
|
|
16492
|
-
textSecondary: "#d1d5db",
|
|
16493
|
-
textDisabled: "#4b5563",
|
|
16494
|
-
border: "#374151",
|
|
16495
|
-
borderStrong: "#6b7280",
|
|
16496
|
-
success: "#4ade80",
|
|
16497
|
-
warning: "#fbbf24",
|
|
16498
|
-
error: "#f87171",
|
|
16499
|
-
info: "#60a5fa",
|
|
16500
|
-
chart1: "#60a5fa",
|
|
16501
|
-
chart2: "#4ade80",
|
|
16502
|
-
chart3: "#fbbf24",
|
|
16503
|
-
chart4: "#c084fc",
|
|
16504
|
-
chart5: "#38bdf8",
|
|
16505
|
-
chart6: "#f87171"
|
|
16506
|
-
},
|
|
16507
|
-
shadows: {
|
|
16508
|
-
xs: "0 1px 2px 0 rgba(0,0,0,0.2)",
|
|
16509
|
-
sm: "0 1px 3px 0 rgba(0,0,0,0.3), 0 1px 2px -1px rgba(0,0,0,0.25)",
|
|
16510
|
-
md: "0 4px 6px -1px rgba(0,0,0,0.3), 0 2px 4px -2px rgba(0,0,0,0.25)",
|
|
16511
|
-
lg: "0 10px 15px -3px rgba(0,0,0,0.3), 0 4px 6px -4px rgba(0,0,0,0.25)",
|
|
16512
|
-
xl: "0 20px 25px -5px rgba(0,0,0,0.3), 0 8px 10px -6px rgba(0,0,0,0.25)"
|
|
16513
|
-
}
|
|
16514
|
-
}
|
|
16515
|
-
};
|
|
16516
|
-
|
|
16517
17458
|
// src/themes/vibrant/theme.ts
|
|
16518
17459
|
var vibrantTheme = {
|
|
16519
17460
|
name: "vibrant",
|
|
@@ -17456,7 +18397,7 @@ var designTokens = {
|
|
|
17456
18397
|
};
|
|
17457
18398
|
|
|
17458
18399
|
// src/index.ts
|
|
17459
|
-
var version = "1.
|
|
18400
|
+
var version = "1.5.0";
|
|
17460
18401
|
export {
|
|
17461
18402
|
ANIMATION_DURATION_FAST_MS,
|
|
17462
18403
|
ANIMATION_DURATION_MS,
|
|
@@ -17470,18 +18411,26 @@ export {
|
|
|
17470
18411
|
ChevronRightIconPath,
|
|
17471
18412
|
ClockIconPath,
|
|
17472
18413
|
CloseIconPath,
|
|
18414
|
+
DEFAULT_CALENDAR_LABELS,
|
|
17473
18415
|
DEFAULT_CHART_COLORS,
|
|
18416
|
+
DEFAULT_FILE_MANAGER_LABELS,
|
|
17474
18417
|
DEFAULT_FORM_VALIDATION_LABELS,
|
|
17475
18418
|
DEFAULT_FORM_WIZARD_LABELS,
|
|
17476
18419
|
DEFAULT_HEATMAP_CANVAS_THRESHOLD,
|
|
18420
|
+
DEFAULT_IMAGE_EDITOR_LABELS,
|
|
18421
|
+
DEFAULT_IMAGE_VIEWER_LABELS,
|
|
17477
18422
|
DEFAULT_PAGINATION_LABELS,
|
|
18423
|
+
DEFAULT_STATUS_LABELS,
|
|
17478
18424
|
DEFAULT_TABLE_LABELS,
|
|
17479
18425
|
DEFAULT_TASK_BOARD_LABELS,
|
|
17480
18426
|
DEFAULT_TIME_PICKER_LABELS,
|
|
18427
|
+
DEFAULT_TOUR_LABELS,
|
|
17481
18428
|
DEFAULT_UPLOAD_CHUNK_SIZE,
|
|
17482
18429
|
DEFAULT_UPLOAD_LABELS,
|
|
17483
18430
|
DONUT_BASE_SHADOW,
|
|
17484
18431
|
DONUT_EMPHASIS_SHADOW,
|
|
18432
|
+
DONUT_ENTRANCE_CLASS,
|
|
18433
|
+
DONUT_ENTRANCE_KEYFRAMES,
|
|
17485
18434
|
DROPDOWN_CHEVRON_PATH,
|
|
17486
18435
|
DROPDOWN_ENTER_CLASS,
|
|
17487
18436
|
DURATION_CLASS,
|
|
@@ -17492,7 +18441,7 @@ export {
|
|
|
17492
18441
|
EASING_LEAVE,
|
|
17493
18442
|
EASING_SMOOTH,
|
|
17494
18443
|
EASING_SPRING,
|
|
17495
|
-
EN_US_DATEPICKER_LOCALE,
|
|
18444
|
+
EN_US_DATEPICKER_LOCALE2 as EN_US_DATEPICKER_LOCALE,
|
|
17496
18445
|
FLOATING_OVERLAY_Z_INDEX,
|
|
17497
18446
|
FORM_VALIDATION_PRESETS,
|
|
17498
18447
|
GAUGE_ANIMATION_DURATION_MS,
|
|
@@ -17511,6 +18460,7 @@ export {
|
|
|
17511
18460
|
POPOVER_TEXT_CLASSES,
|
|
17512
18461
|
POPOVER_TITLE_CLASSES,
|
|
17513
18462
|
RADAR_SPLIT_AREA_COLORS,
|
|
18463
|
+
RESIZE_KEYBOARD_STEP,
|
|
17514
18464
|
SCATTER_ENTRANCE_CLASS,
|
|
17515
18465
|
SCATTER_ENTRANCE_KEYFRAMES,
|
|
17516
18466
|
SHAKE_CLASS,
|
|
@@ -17525,6 +18475,7 @@ export {
|
|
|
17525
18475
|
SVG_PATH_ANIMATION_CSS,
|
|
17526
18476
|
TABLE_AUTO_VIRTUAL_THRESHOLD,
|
|
17527
18477
|
TABLE_VIRTUAL_RECOMMENDATION_THRESHOLD,
|
|
18478
|
+
THEME_CONFIG_CSS_VARS,
|
|
17528
18479
|
THEME_CSS_VARS,
|
|
17529
18480
|
TIGER_BREAKPOINT_CSS_VALUES,
|
|
17530
18481
|
TIGER_VIEWPORT_BREAKPOINTS,
|
|
@@ -17536,13 +18487,19 @@ export {
|
|
|
17536
18487
|
TimePickerCloseIconPath,
|
|
17537
18488
|
VIEW_TRANSITION_CSS,
|
|
17538
18489
|
WEEKDAYS,
|
|
17539
|
-
|
|
18490
|
+
ZH_CN_CALENDAR_LABELS,
|
|
18491
|
+
ZH_CN_DATEPICKER_LOCALE2 as ZH_CN_DATEPICKER_LOCALE,
|
|
18492
|
+
ZH_CN_FILE_MANAGER_LABELS,
|
|
17540
18493
|
ZH_CN_FORM_VALIDATION_LABELS,
|
|
17541
18494
|
ZH_CN_FORM_WIZARD_LABELS,
|
|
18495
|
+
ZH_CN_IMAGE_EDITOR_LABELS,
|
|
18496
|
+
ZH_CN_IMAGE_VIEWER_LABELS,
|
|
17542
18497
|
ZH_CN_PAGINATION_LABELS,
|
|
18498
|
+
ZH_CN_STATUS_LABELS,
|
|
17543
18499
|
ZH_CN_TABLE_LABELS,
|
|
17544
18500
|
ZH_CN_TASK_BOARD_LABELS,
|
|
17545
18501
|
ZH_CN_TIME_PICKER_LABELS,
|
|
18502
|
+
ZH_CN_TOUR_LABELS,
|
|
17546
18503
|
ZH_CN_UPLOAD_LABELS,
|
|
17547
18504
|
activeOpacityClasses,
|
|
17548
18505
|
activePressClasses,
|
|
@@ -17652,6 +18609,7 @@ export {
|
|
|
17652
18609
|
calculateResizeDelta,
|
|
17653
18610
|
calculateStepStatus,
|
|
17654
18611
|
calculateTransform,
|
|
18612
|
+
calculateVirtualColumnRange,
|
|
17655
18613
|
calculateVirtualRange,
|
|
17656
18614
|
calendarHeaderClasses,
|
|
17657
18615
|
calendarNavButtonClasses,
|
|
@@ -17703,6 +18661,7 @@ export {
|
|
|
17703
18661
|
chartCanvasBaseClasses,
|
|
17704
18662
|
chartGridLineClasses,
|
|
17705
18663
|
chartInteractiveClasses,
|
|
18664
|
+
chatStatusBarBaseClasses,
|
|
17706
18665
|
checkSolidIcon20PathD,
|
|
17707
18666
|
checkboxLabelSizeClasses,
|
|
17708
18667
|
checkboxSizeClasses2 as checkboxSizeClasses,
|
|
@@ -17741,6 +18700,8 @@ export {
|
|
|
17741
18700
|
codeBlockCopyButtonBaseClasses,
|
|
17742
18701
|
codeBlockCopyButtonCopiedClasses,
|
|
17743
18702
|
codeBlockPreClasses,
|
|
18703
|
+
codeEditorActiveLineDarkClasses,
|
|
18704
|
+
codeEditorActiveLineLightClasses,
|
|
17744
18705
|
codeEditorBaseClasses,
|
|
17745
18706
|
codeEditorDarkClasses,
|
|
17746
18707
|
codeEditorDisabledClasses,
|
|
@@ -17946,6 +18907,7 @@ export {
|
|
|
17946
18907
|
downloadCsv,
|
|
17947
18908
|
downloadExcel,
|
|
17948
18909
|
downloadTableExport,
|
|
18910
|
+
downsampleSeriesData,
|
|
17949
18911
|
drawSignatureStrokes,
|
|
17950
18912
|
dynamicSizeStrategy,
|
|
17951
18913
|
easeOutCubic2 as easeOutCubic,
|
|
@@ -17996,6 +18958,7 @@ export {
|
|
|
17996
18958
|
filterHiddenFiles,
|
|
17997
18959
|
filterMenuItems,
|
|
17998
18960
|
filterOptions,
|
|
18961
|
+
filterTableData,
|
|
17999
18962
|
filterTransferItems,
|
|
18000
18963
|
filterTreeNodes,
|
|
18001
18964
|
filterTreeSelectNodes,
|
|
@@ -18034,6 +18997,7 @@ export {
|
|
|
18034
18997
|
focusTimePickerOption,
|
|
18035
18998
|
formatActivityTime,
|
|
18036
18999
|
formatBadgeContent,
|
|
19000
|
+
formatBytes,
|
|
18037
19001
|
formatChatTime,
|
|
18038
19002
|
formatColorString,
|
|
18039
19003
|
formatCommentTime,
|
|
@@ -18075,6 +19039,7 @@ export {
|
|
|
18075
19039
|
getAccessibleTransitionClasses,
|
|
18076
19040
|
getActiveElement,
|
|
18077
19041
|
getActiveIndex,
|
|
19042
|
+
getActiveLineIndex,
|
|
18078
19043
|
getActiveTourStepPosition,
|
|
18079
19044
|
getActiveTourSteps,
|
|
18080
19045
|
getAlertIconPath,
|
|
@@ -18112,6 +19077,7 @@ export {
|
|
|
18112
19077
|
getCalendarContainerClasses,
|
|
18113
19078
|
getCalendarDayClasses,
|
|
18114
19079
|
getCalendarDays,
|
|
19080
|
+
getCalendarLabels,
|
|
18115
19081
|
getCalendarMonthClasses,
|
|
18116
19082
|
getCalendarMonthDaysCacheSize,
|
|
18117
19083
|
getCardClasses,
|
|
@@ -18138,6 +19104,7 @@ export {
|
|
|
18138
19104
|
getChartSvgDataUrl,
|
|
18139
19105
|
getChartTooltipTransform,
|
|
18140
19106
|
getChatMessageStatusInfo,
|
|
19107
|
+
getChatStatusBarClasses,
|
|
18141
19108
|
getCheckboxCellClasses,
|
|
18142
19109
|
getCheckboxClasses,
|
|
18143
19110
|
getCheckboxLabelClasses,
|
|
@@ -18145,6 +19112,7 @@ export {
|
|
|
18145
19112
|
getCircleSize,
|
|
18146
19113
|
getCodeBlockContainerClasses,
|
|
18147
19114
|
getCodeBlockCopyButtonClasses,
|
|
19115
|
+
getCodeEditorActiveLineClasses,
|
|
18148
19116
|
getCodeEditorContainerClasses,
|
|
18149
19117
|
getColGutterClasses,
|
|
18150
19118
|
getColMergedStyleVars,
|
|
@@ -18180,6 +19148,7 @@ export {
|
|
|
18180
19148
|
getCurrentActiveTourStep,
|
|
18181
19149
|
getCurrentTime,
|
|
18182
19150
|
getCyclicIndex,
|
|
19151
|
+
getDatePickerCalendarCellState,
|
|
18183
19152
|
getDatePickerDayCellClasses,
|
|
18184
19153
|
getDatePickerIconButtonClasses,
|
|
18185
19154
|
getDatePickerInputClasses,
|
|
@@ -18227,9 +19196,11 @@ export {
|
|
|
18227
19196
|
getFieldDependencies,
|
|
18228
19197
|
getFieldError,
|
|
18229
19198
|
getFileExtension2 as getFileExtension,
|
|
19199
|
+
getFileExtensionName,
|
|
18230
19200
|
getFileItemClasses,
|
|
18231
19201
|
getFileListItemClasses,
|
|
18232
19202
|
getFileManagerContainerClasses,
|
|
19203
|
+
getFileManagerLabels,
|
|
18233
19204
|
getFirstDayOfMonth,
|
|
18234
19205
|
getFirstVisibleChildKey,
|
|
18235
19206
|
getFixedColumnOffsets,
|
|
@@ -18268,9 +19239,11 @@ export {
|
|
|
18268
19239
|
getImageAnnotationStrokeColor,
|
|
18269
19240
|
getImageAnnotationToolButtonClasses,
|
|
18270
19241
|
getImageAnnotationToolLabel,
|
|
19242
|
+
getImageEditorLabels,
|
|
18271
19243
|
getImageGroupClasses,
|
|
18272
19244
|
getImageImgClasses,
|
|
18273
19245
|
getImageTransformStyle,
|
|
19246
|
+
getImageViewerLabels,
|
|
18274
19247
|
getImmediateTigerLocale,
|
|
18275
19248
|
getInfiniteScrollContainerClasses,
|
|
18276
19249
|
getInitialCollapseContentStyle,
|
|
@@ -18338,6 +19311,7 @@ export {
|
|
|
18338
19311
|
getNextColorSwatchIndex,
|
|
18339
19312
|
getNextImageAnnotationTool,
|
|
18340
19313
|
getNextSlideIndex,
|
|
19314
|
+
getNextTableSelectAllKeys,
|
|
18341
19315
|
getNotificationIconPath,
|
|
18342
19316
|
getNotificationTypeClasses,
|
|
18343
19317
|
getNumberExtent,
|
|
@@ -18410,6 +19384,8 @@ export {
|
|
|
18410
19384
|
getRadioVisualClasses,
|
|
18411
19385
|
getRateStarClasses,
|
|
18412
19386
|
getResizableHandleClasses,
|
|
19387
|
+
getResizeHandleOrientation,
|
|
19388
|
+
getResizeKeyboardDelta,
|
|
18413
19389
|
getResultColorScheme,
|
|
18414
19390
|
getResultHttpLabel,
|
|
18415
19391
|
getResultIconPath,
|
|
@@ -18439,6 +19415,7 @@ export {
|
|
|
18439
19415
|
getSelectOptionClasses,
|
|
18440
19416
|
getSelectSizeClasses,
|
|
18441
19417
|
getSelectTriggerClasses,
|
|
19418
|
+
getSelectVirtualItemHeight,
|
|
18442
19419
|
getSeparatorContent,
|
|
18443
19420
|
getShortDayNames,
|
|
18444
19421
|
getShortMonthNames,
|
|
@@ -18477,6 +19454,7 @@ export {
|
|
|
18477
19454
|
getStaggeredMotionStyle,
|
|
18478
19455
|
getStatisticTitleClasses,
|
|
18479
19456
|
getStatisticValueClasses,
|
|
19457
|
+
getStatusLabels,
|
|
18480
19458
|
getStatusVariant,
|
|
18481
19459
|
getStepContentClasses,
|
|
18482
19460
|
getStepDescriptionClasses,
|
|
@@ -18512,7 +19490,9 @@ export {
|
|
|
18512
19490
|
getTableResponsiveCardListClasses,
|
|
18513
19491
|
getTableResponsiveTableClasses,
|
|
18514
19492
|
getTableRowClasses,
|
|
19493
|
+
getTableSelectionState,
|
|
18515
19494
|
getTableVirtualRecommendation,
|
|
19495
|
+
getTableVirtualWindow,
|
|
18516
19496
|
getTableWrapperClasses,
|
|
18517
19497
|
getTabsContainerClasses,
|
|
18518
19498
|
getTagVariantClasses,
|
|
@@ -18542,6 +19522,7 @@ export {
|
|
|
18542
19522
|
getTotalPages,
|
|
18543
19523
|
getTotalTextClasses,
|
|
18544
19524
|
getTouchDistance,
|
|
19525
|
+
getTourLabels,
|
|
18545
19526
|
getTourPopoverPosition,
|
|
18546
19527
|
getTourSpotlightStyle,
|
|
18547
19528
|
getTourTargetRect,
|
|
@@ -18600,6 +19581,7 @@ export {
|
|
|
18600
19581
|
handleUploadDrop,
|
|
18601
19582
|
hasErrors,
|
|
18602
19583
|
hasGutter,
|
|
19584
|
+
hasTableSelectionColumn,
|
|
18603
19585
|
hexToRgb2 as hexToRgb,
|
|
18604
19586
|
highContrastTheme,
|
|
18605
19587
|
hsvToRgb,
|
|
@@ -18695,6 +19677,7 @@ export {
|
|
|
18695
19677
|
isEscapeKey,
|
|
18696
19678
|
isEventOutside,
|
|
18697
19679
|
isHTMLElement,
|
|
19680
|
+
isHttpResultStatus,
|
|
18698
19681
|
isImageAnnotationPathClosed,
|
|
18699
19682
|
isImageAnnotationShapeTool,
|
|
18700
19683
|
isInlineFormat,
|
|
@@ -18846,6 +19829,7 @@ export {
|
|
|
18846
19829
|
moveItemBetweenContainers,
|
|
18847
19830
|
movePan,
|
|
18848
19831
|
movePinch,
|
|
19832
|
+
moveTransferItems,
|
|
18849
19833
|
naturalTheme,
|
|
18850
19834
|
navigateToFolder,
|
|
18851
19835
|
nextIconPath,
|
|
@@ -19001,6 +19985,7 @@ export {
|
|
|
19001
19985
|
resolveCarouselSwipeDirection,
|
|
19002
19986
|
resolveChartPalette,
|
|
19003
19987
|
resolveChartTooltipContent,
|
|
19988
|
+
resolveChartTooltipPosition,
|
|
19004
19989
|
resolveConditionalFormRules,
|
|
19005
19990
|
resolveCreatableSelectOption,
|
|
19006
19991
|
resolveDragConfig,
|
|
@@ -19035,6 +20020,8 @@ export {
|
|
|
19035
20020
|
richTextContainerDisabled,
|
|
19036
20021
|
richTextEditorAreaBase,
|
|
19037
20022
|
richTextEditorAreaReadOnly,
|
|
20023
|
+
richTextHtmlToMode,
|
|
20024
|
+
richTextModeToHtml,
|
|
19038
20025
|
richTextPlaceholderClasses,
|
|
19039
20026
|
richTextToolbarButtonActive,
|
|
19040
20027
|
richTextToolbarButtonBase,
|
|
@@ -19096,6 +20083,7 @@ export {
|
|
|
19096
20083
|
sliderGetValueFromPosition,
|
|
19097
20084
|
sliderNormalizeValue,
|
|
19098
20085
|
sliderRangeClasses,
|
|
20086
|
+
sliderResolveMarks,
|
|
19099
20087
|
sliderSizeClasses,
|
|
19100
20088
|
sliderThumbClasses,
|
|
19101
20089
|
sliderTooltipClasses,
|
|
@@ -19145,6 +20133,9 @@ export {
|
|
|
19145
20133
|
statusSuccessIconPath,
|
|
19146
20134
|
statusWarningIconPath,
|
|
19147
20135
|
stepFinishChar,
|
|
20136
|
+
stepFinishIconPathD,
|
|
20137
|
+
stepFinishIconStrokeWidth,
|
|
20138
|
+
stepFinishIconViewBox,
|
|
19148
20139
|
stepValue,
|
|
19149
20140
|
stepperBaseClasses,
|
|
19150
20141
|
stepperIconViewBox,
|
|
@@ -19231,6 +20222,7 @@ export {
|
|
|
19231
20222
|
textDecorationClasses,
|
|
19232
20223
|
textSizeClasses,
|
|
19233
20224
|
textWeightClasses,
|
|
20225
|
+
themeConfigToCssVars,
|
|
19234
20226
|
tigercatDarkTheme,
|
|
19235
20227
|
tigercatPlugin,
|
|
19236
20228
|
tigercatTheme,
|