@expcat/tigercat-core 1.4.0 → 2.0.0-preview.1
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-ZdzYUqm5.d.ts} +77 -11
- package/dist/datepicker-locales/ar-SA.d.ts +1 -1
- package/dist/datepicker-locales/de-DE.d.ts +1 -1
- package/dist/datepicker-locales/en-US.d.ts +1 -1
- package/dist/datepicker-locales/es-ES.d.ts +1 -1
- package/dist/datepicker-locales/fr-FR.d.ts +1 -1
- package/dist/datepicker-locales/id-ID.d.ts +1 -1
- package/dist/datepicker-locales/ja-JP.d.ts +1 -1
- package/dist/datepicker-locales/ko-KR.d.ts +1 -1
- package/dist/datepicker-locales/pt-BR.d.ts +1 -1
- package/dist/datepicker-locales/registry.d.ts +7 -0
- package/dist/datepicker-locales/registry.js +224 -0
- package/dist/datepicker-locales/th-TH.d.ts +1 -1
- package/dist/datepicker-locales/vi-VN.d.ts +1 -1
- package/dist/datepicker-locales/zh-CN.d.ts +1 -1
- package/dist/datepicker-locales/zh-TW.d.ts +1 -1
- package/dist/icons/picker.d.ts +1 -13
- package/dist/icons/picker.js +0 -12
- package/dist/index.d.ts +12341 -12244
- package/dist/index.js +1482 -659
- package/dist/{locale-9tTj1QdZ.d.ts → locale-44p_QYnH.d.ts} +96 -7
- package/dist/locales/ar-SA.d.ts +2 -2
- package/dist/locales/ar-SA.js +122 -1
- package/dist/locales/de-DE.d.ts +2 -2
- package/dist/locales/de-DE.js +122 -1
- package/dist/locales/en-US.d.ts +2 -2
- package/dist/locales/en-US.js +98 -1
- package/dist/locales/es-ES.d.ts +2 -2
- package/dist/locales/es-ES.js +122 -1
- package/dist/locales/fr-FR.d.ts +2 -2
- package/dist/locales/fr-FR.js +122 -1
- package/dist/locales/id-ID.d.ts +2 -2
- package/dist/locales/id-ID.js +268 -2
- package/dist/locales/ja-JP.d.ts +2 -2
- package/dist/locales/ja-JP.js +268 -2
- package/dist/locales/ko-KR.d.ts +2 -2
- package/dist/locales/ko-KR.js +268 -2
- package/dist/locales/pt-BR.d.ts +2 -2
- package/dist/locales/pt-BR.js +122 -1
- package/dist/locales/th-TH.d.ts +2 -2
- package/dist/locales/th-TH.js +268 -2
- package/dist/locales/vi-VN.d.ts +2 -2
- package/dist/locales/vi-VN.js +268 -2
- package/dist/locales/zh-CN.d.ts +2 -2
- package/dist/locales/zh-CN.js +98 -1
- package/dist/locales/zh-TW.d.ts +2 -2
- package/dist/locales/zh-TW.js +268 -2
- package/dist/{table-export-GRimhvlM.d.ts → table-export-CzPmX1b6.d.ts} +3 -9
- 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.ts} +7 -41
- package/dist/tailwind.d.ts +2 -3
- package/dist/tailwind.js +123 -70
- package/dist/utils/table-export.d.ts +3 -3
- package/package.json +43 -73
- package/tokens/tailwind-tokens.js +6 -3
- package/tokens/tokens.css +8 -322
- package/dist/datepicker-DXzS_8l8.d.ts +0 -130
- package/dist/datepicker-locales/ar-SA.cjs +0 -46
- package/dist/datepicker-locales/ar-SA.d.cts +0 -6
- package/dist/datepicker-locales/de-DE.cjs +0 -46
- package/dist/datepicker-locales/de-DE.d.cts +0 -6
- package/dist/datepicker-locales/en-US.cjs +0 -46
- package/dist/datepicker-locales/en-US.d.cts +0 -6
- package/dist/datepicker-locales/es-ES.cjs +0 -46
- package/dist/datepicker-locales/es-ES.d.cts +0 -6
- package/dist/datepicker-locales/fr-FR.cjs +0 -46
- package/dist/datepicker-locales/fr-FR.d.cts +0 -6
- package/dist/datepicker-locales/id-ID.cjs +0 -46
- package/dist/datepicker-locales/id-ID.d.cts +0 -6
- package/dist/datepicker-locales/ja-JP.cjs +0 -46
- package/dist/datepicker-locales/ja-JP.d.cts +0 -6
- package/dist/datepicker-locales/ko-KR.cjs +0 -46
- package/dist/datepicker-locales/ko-KR.d.cts +0 -6
- package/dist/datepicker-locales/pt-BR.cjs +0 -46
- package/dist/datepicker-locales/pt-BR.d.cts +0 -6
- package/dist/datepicker-locales/th-TH.cjs +0 -46
- package/dist/datepicker-locales/th-TH.d.cts +0 -6
- package/dist/datepicker-locales/vi-VN.cjs +0 -46
- package/dist/datepicker-locales/vi-VN.d.cts +0 -6
- package/dist/datepicker-locales/zh-CN.cjs +0 -46
- package/dist/datepicker-locales/zh-CN.d.cts +0 -6
- package/dist/datepicker-locales/zh-TW.cjs +0 -46
- package/dist/datepicker-locales/zh-TW.d.cts +0 -6
- package/dist/icons/common.cjs +0 -54
- package/dist/icons/common.d.cts +0 -20
- package/dist/icons/picker.cjs +0 -75
- package/dist/icons/picker.d.cts +0 -53
- package/dist/icons/registry.cjs +0 -172
- package/dist/icons/registry.d.cts +0 -102
- package/dist/icons/status.cjs +0 -47
- package/dist/icons/status.d.cts +0 -13
- package/dist/icons/table.cjs +0 -48
- package/dist/icons/table.d.cts +0 -25
- package/dist/index.cjs +0 -21268
- package/dist/index.d.cts +0 -20129
- package/dist/locale-DxwhmqfF.d.cts +0 -300
- package/dist/locales/ar-SA.cjs +0 -254
- package/dist/locales/ar-SA.d.cts +0 -10
- package/dist/locales/de-DE.cjs +0 -254
- package/dist/locales/de-DE.d.cts +0 -10
- package/dist/locales/en-US.cjs +0 -149
- package/dist/locales/en-US.d.cts +0 -10
- package/dist/locales/es-ES.cjs +0 -254
- package/dist/locales/es-ES.d.cts +0 -10
- package/dist/locales/fr-FR.cjs +0 -254
- package/dist/locales/fr-FR.d.cts +0 -10
- package/dist/locales/id-ID.cjs +0 -90
- package/dist/locales/id-ID.d.cts +0 -10
- package/dist/locales/ja-JP.cjs +0 -90
- package/dist/locales/ja-JP.d.cts +0 -10
- package/dist/locales/ko-KR.cjs +0 -90
- package/dist/locales/ko-KR.d.cts +0 -10
- package/dist/locales/pt-BR.cjs +0 -254
- package/dist/locales/pt-BR.d.cts +0 -10
- package/dist/locales/th-TH.cjs +0 -90
- package/dist/locales/th-TH.d.cts +0 -10
- package/dist/locales/vi-VN.cjs +0 -90
- package/dist/locales/vi-VN.d.cts +0 -10
- package/dist/locales/zh-CN.cjs +0 -149
- package/dist/locales/zh-CN.d.cts +0 -10
- package/dist/locales/zh-TW.cjs +0 -90
- package/dist/locales/zh-TW.d.cts +0 -10
- package/dist/table-export-BMBH75rj.d.cts +0 -882
- package/dist/tailwind/modern.cjs +0 -368
- package/dist/tailwind/modern.d.cts +0 -6
- package/dist/tailwind-entry-DUchHtjs.d.cts +0 -218
- package/dist/tailwind.cjs +0 -221
- package/dist/tailwind.d.cts +0 -3
- package/dist/types-CJYAW1ql.d-DDBFn6KB.d.cts +0 -126
- package/dist/types-CJYAW1ql.d-DDBFn6KB.d.ts +0 -126
- package/dist/utils/table-export.cjs +0 -119
- package/dist/utils/table-export.d.cts +0 -3
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
|
}
|
|
@@ -571,9 +599,9 @@ function createBackTopVisibilityController(options) {
|
|
|
571
599
|
cancel
|
|
572
600
|
};
|
|
573
601
|
}
|
|
574
|
-
var
|
|
575
|
-
var backTopButtonClasses = `fixed bottom-8 right-8 ${
|
|
576
|
-
var backTopContainerClasses = `sticky bottom-4 ml-auto mr-4 ${
|
|
602
|
+
var backTopBaseClasses = "z-50 flex h-10 w-10 cursor-pointer items-center justify-center rounded-full bg-[var(--tiger-primary,#2563eb)] text-white shadow-lg transition-all duration-300 hover:bg-[var(--tiger-primary-hover,#1d4ed8)] focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--tiger-primary,#2563eb)] focus-visible:ring-offset-2";
|
|
603
|
+
var backTopButtonClasses = `fixed bottom-8 right-8 ${backTopBaseClasses}`;
|
|
604
|
+
var backTopContainerClasses = `sticky bottom-4 ml-auto mr-4 ${backTopBaseClasses}`;
|
|
577
605
|
var backTopHiddenClasses = "opacity-0 pointer-events-none translate-y-4";
|
|
578
606
|
var backTopVisibleClasses = "opacity-100 translate-y-0";
|
|
579
607
|
var backTopIconPath = "M12 19V5M12 5l-7 7M12 5l7 7";
|
|
@@ -612,12 +640,6 @@ var chevronDownSolidIcon20PathD = "M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-
|
|
|
612
640
|
var checkSolidIcon20PathD = "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z";
|
|
613
641
|
var successCircleSolidIcon20PathD = "M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z";
|
|
614
642
|
var errorCircleSolidIcon20PathD = "M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z";
|
|
615
|
-
var CalendarIconPath = calendarSolidIcon20PathD;
|
|
616
|
-
var CloseIconPath = closeSolidIcon20PathD;
|
|
617
|
-
var ChevronLeftIconPath = chevronLeftSolidIcon20PathD;
|
|
618
|
-
var ChevronRightIconPath = chevronRightSolidIcon20PathD;
|
|
619
|
-
var ClockIconPath = clockSolidIcon20PathD;
|
|
620
|
-
var TimePickerCloseIconPath = closeSolidIcon20PathD;
|
|
621
643
|
|
|
622
644
|
// src/utils/icons/status.ts
|
|
623
645
|
var statusSuccessIconPath = "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z";
|
|
@@ -1151,14 +1173,23 @@ var TIGER_LOCALE_KEYS = [
|
|
|
1151
1173
|
"locale",
|
|
1152
1174
|
"direction",
|
|
1153
1175
|
"common",
|
|
1176
|
+
"empty",
|
|
1154
1177
|
"modal",
|
|
1155
1178
|
"drawer",
|
|
1179
|
+
"qrcode",
|
|
1180
|
+
"timeline",
|
|
1156
1181
|
"upload",
|
|
1157
1182
|
"pagination",
|
|
1158
1183
|
"table",
|
|
1159
1184
|
"datePicker",
|
|
1160
1185
|
"timePicker",
|
|
1161
1186
|
"formWizard",
|
|
1187
|
+
"tour",
|
|
1188
|
+
"calendar",
|
|
1189
|
+
"fileManager",
|
|
1190
|
+
"imageViewer",
|
|
1191
|
+
"imageEditor",
|
|
1192
|
+
"status",
|
|
1162
1193
|
"taskBoard",
|
|
1163
1194
|
"formValidation"
|
|
1164
1195
|
];
|
|
@@ -1200,14 +1231,23 @@ function mergeTigerLocale(base, override) {
|
|
|
1200
1231
|
locale: override?.locale ?? base?.locale,
|
|
1201
1232
|
direction: override?.direction ?? base?.direction,
|
|
1202
1233
|
common: { ...base?.common, ...override?.common },
|
|
1234
|
+
empty: { ...base?.empty, ...override?.empty },
|
|
1203
1235
|
modal: { ...base?.modal, ...override?.modal },
|
|
1204
1236
|
drawer: { ...base?.drawer, ...override?.drawer },
|
|
1237
|
+
qrcode: { ...base?.qrcode, ...override?.qrcode },
|
|
1238
|
+
timeline: { ...base?.timeline, ...override?.timeline },
|
|
1205
1239
|
upload: { ...base?.upload, ...override?.upload },
|
|
1206
1240
|
pagination: { ...base?.pagination, ...override?.pagination },
|
|
1207
1241
|
table: { ...base?.table, ...override?.table },
|
|
1208
1242
|
datePicker: { ...base?.datePicker, ...override?.datePicker },
|
|
1209
1243
|
timePicker: { ...base?.timePicker, ...override?.timePicker },
|
|
1210
1244
|
formWizard: { ...base?.formWizard, ...override?.formWizard },
|
|
1245
|
+
tour: { ...base?.tour, ...override?.tour },
|
|
1246
|
+
calendar: { ...base?.calendar, ...override?.calendar },
|
|
1247
|
+
fileManager: { ...base?.fileManager, ...override?.fileManager },
|
|
1248
|
+
imageViewer: { ...base?.imageViewer, ...override?.imageViewer },
|
|
1249
|
+
imageEditor: { ...base?.imageEditor, ...override?.imageEditor },
|
|
1250
|
+
status: { ...base?.status, ...override?.status },
|
|
1211
1251
|
taskBoard: { ...base?.taskBoard, ...override?.taskBoard },
|
|
1212
1252
|
formValidation: { ...base?.formValidation, ...override?.formValidation }
|
|
1213
1253
|
};
|
|
@@ -1270,6 +1310,59 @@ var ZH_CN_FORM_WIZARD_LABELS = {
|
|
|
1270
1310
|
nextText: "\u4E0B\u4E00\u6B65",
|
|
1271
1311
|
finishText: "\u5B8C\u6210"
|
|
1272
1312
|
};
|
|
1313
|
+
var DEFAULT_TOUR_LABELS = {
|
|
1314
|
+
prevText: "Previous",
|
|
1315
|
+
nextText: "Next",
|
|
1316
|
+
finishText: "Finish",
|
|
1317
|
+
closeAriaLabel: "Close tour"
|
|
1318
|
+
};
|
|
1319
|
+
var ZH_CN_TOUR_LABELS = {
|
|
1320
|
+
prevText: "\u4E0A\u4E00\u6B65",
|
|
1321
|
+
nextText: "\u4E0B\u4E00\u6B65",
|
|
1322
|
+
finishText: "\u5B8C\u6210",
|
|
1323
|
+
closeAriaLabel: "\u5173\u95ED\u5BFC\u89C8"
|
|
1324
|
+
};
|
|
1325
|
+
function getTourLabels(locale, overrides) {
|
|
1326
|
+
const isZh = locale?.locale?.startsWith("zh");
|
|
1327
|
+
const defaultLabels = isZh ? ZH_CN_TOUR_LABELS : DEFAULT_TOUR_LABELS;
|
|
1328
|
+
return {
|
|
1329
|
+
prevText: overrides?.prevText ?? locale?.tour?.prevText ?? locale?.formWizard?.prevText ?? defaultLabels.prevText,
|
|
1330
|
+
nextText: overrides?.nextText ?? locale?.tour?.nextText ?? locale?.formWizard?.nextText ?? defaultLabels.nextText,
|
|
1331
|
+
finishText: overrides?.finishText ?? locale?.tour?.finishText ?? locale?.formWizard?.finishText ?? defaultLabels.finishText,
|
|
1332
|
+
closeAriaLabel: overrides?.closeAriaLabel ?? locale?.tour?.closeAriaLabel ?? locale?.common?.closeText ?? defaultLabels.closeAriaLabel
|
|
1333
|
+
};
|
|
1334
|
+
}
|
|
1335
|
+
var DEFAULT_CALENDAR_LABELS = {
|
|
1336
|
+
previousMonth: "Previous month",
|
|
1337
|
+
nextMonth: "Next month",
|
|
1338
|
+
previousYear: "Previous year",
|
|
1339
|
+
nextYear: "Next year",
|
|
1340
|
+
yearSelectAriaLabel: "Year",
|
|
1341
|
+
monthSelectAriaLabel: "Month",
|
|
1342
|
+
daySelectAriaLabel: "Day"
|
|
1343
|
+
};
|
|
1344
|
+
var ZH_CN_CALENDAR_LABELS = {
|
|
1345
|
+
previousMonth: "\u4E0A\u4E2A\u6708",
|
|
1346
|
+
nextMonth: "\u4E0B\u4E2A\u6708",
|
|
1347
|
+
previousYear: "\u4E0A\u4E00\u5E74",
|
|
1348
|
+
nextYear: "\u4E0B\u4E00\u5E74",
|
|
1349
|
+
yearSelectAriaLabel: "\u5E74\u4EFD",
|
|
1350
|
+
monthSelectAriaLabel: "\u6708\u4EFD",
|
|
1351
|
+
daySelectAriaLabel: "\u65E5\u671F"
|
|
1352
|
+
};
|
|
1353
|
+
function getCalendarLabels(locale) {
|
|
1354
|
+
const isZh = locale?.locale?.startsWith("zh");
|
|
1355
|
+
const defaultLabels = isZh ? ZH_CN_CALENDAR_LABELS : DEFAULT_CALENDAR_LABELS;
|
|
1356
|
+
return {
|
|
1357
|
+
previousMonth: locale?.calendar?.previousMonth ?? defaultLabels.previousMonth,
|
|
1358
|
+
nextMonth: locale?.calendar?.nextMonth ?? defaultLabels.nextMonth,
|
|
1359
|
+
previousYear: locale?.calendar?.previousYear ?? defaultLabels.previousYear,
|
|
1360
|
+
nextYear: locale?.calendar?.nextYear ?? defaultLabels.nextYear,
|
|
1361
|
+
yearSelectAriaLabel: locale?.calendar?.yearSelectAriaLabel ?? defaultLabels.yearSelectAriaLabel,
|
|
1362
|
+
monthSelectAriaLabel: locale?.calendar?.monthSelectAriaLabel ?? defaultLabels.monthSelectAriaLabel,
|
|
1363
|
+
daySelectAriaLabel: locale?.calendar?.daySelectAriaLabel ?? defaultLabels.daySelectAriaLabel
|
|
1364
|
+
};
|
|
1365
|
+
}
|
|
1273
1366
|
function getFormWizardLabels(locale, overrides) {
|
|
1274
1367
|
const isZh = locale?.locale?.startsWith("zh");
|
|
1275
1368
|
const defaultLabels = isZh ? ZH_CN_FORM_WIZARD_LABELS : DEFAULT_FORM_WIZARD_LABELS;
|
|
@@ -1320,7 +1413,15 @@ var DEFAULT_TABLE_LABELS = {
|
|
|
1320
1413
|
columnSettingsText: "Column settings",
|
|
1321
1414
|
columnSettingsAriaLabel: "Column settings",
|
|
1322
1415
|
lockColumnAriaLabel: "Lock column {column}",
|
|
1323
|
-
unlockColumnAriaLabel: "Unlock column {column}"
|
|
1416
|
+
unlockColumnAriaLabel: "Unlock column {column}",
|
|
1417
|
+
allText: "All",
|
|
1418
|
+
filterPlaceholder: "Filter...",
|
|
1419
|
+
exportCsvText: "Export CSV",
|
|
1420
|
+
exportExcelText: "Export Excel",
|
|
1421
|
+
exportCsvAriaLabel: "Export to CSV",
|
|
1422
|
+
exportExcelAriaLabel: "Export to Excel",
|
|
1423
|
+
expandRowAriaLabel: "Expand row",
|
|
1424
|
+
collapseRowAriaLabel: "Collapse row"
|
|
1324
1425
|
};
|
|
1325
1426
|
var ZH_CN_TABLE_LABELS = {
|
|
1326
1427
|
emptyText: "\u6682\u65E0\u6570\u636E",
|
|
@@ -1339,7 +1440,15 @@ var ZH_CN_TABLE_LABELS = {
|
|
|
1339
1440
|
columnSettingsText: "\u5217\u8BBE\u7F6E",
|
|
1340
1441
|
columnSettingsAriaLabel: "\u5217\u8BBE\u7F6E",
|
|
1341
1442
|
lockColumnAriaLabel: "\u9501\u5B9A{column}\u5217",
|
|
1342
|
-
unlockColumnAriaLabel: "\u53D6\u6D88\u9501\u5B9A{column}\u5217"
|
|
1443
|
+
unlockColumnAriaLabel: "\u53D6\u6D88\u9501\u5B9A{column}\u5217",
|
|
1444
|
+
allText: "\u5168\u90E8",
|
|
1445
|
+
filterPlaceholder: "\u7B5B\u9009...",
|
|
1446
|
+
exportCsvText: "\u5BFC\u51FA CSV",
|
|
1447
|
+
exportExcelText: "\u5BFC\u51FA Excel",
|
|
1448
|
+
exportCsvAriaLabel: "\u5BFC\u51FA\u4E3A CSV",
|
|
1449
|
+
exportExcelAriaLabel: "\u5BFC\u51FA\u4E3A Excel",
|
|
1450
|
+
expandRowAriaLabel: "\u5C55\u5F00\u884C",
|
|
1451
|
+
collapseRowAriaLabel: "\u6536\u8D77\u884C"
|
|
1343
1452
|
};
|
|
1344
1453
|
function getTableLabels(locale, overrides) {
|
|
1345
1454
|
const isZh = !!locale?.locale?.startsWith("zh") || locale?.common?.emptyText === "\u6682\u65E0\u6570\u636E" || locale?.table?.searchButtonText === "\u641C\u7D22";
|
|
@@ -1361,7 +1470,15 @@ function getTableLabels(locale, overrides) {
|
|
|
1361
1470
|
columnSettingsText: overrides?.columnSettingsText ?? locale?.table?.columnSettingsText ?? defaultLabels.columnSettingsText,
|
|
1362
1471
|
columnSettingsAriaLabel: overrides?.columnSettingsAriaLabel ?? locale?.table?.columnSettingsAriaLabel ?? defaultLabels.columnSettingsAriaLabel,
|
|
1363
1472
|
lockColumnAriaLabel: overrides?.lockColumnAriaLabel ?? locale?.table?.lockColumnAriaLabel ?? defaultLabels.lockColumnAriaLabel,
|
|
1364
|
-
unlockColumnAriaLabel: overrides?.unlockColumnAriaLabel ?? locale?.table?.unlockColumnAriaLabel ?? defaultLabels.unlockColumnAriaLabel
|
|
1473
|
+
unlockColumnAriaLabel: overrides?.unlockColumnAriaLabel ?? locale?.table?.unlockColumnAriaLabel ?? defaultLabels.unlockColumnAriaLabel,
|
|
1474
|
+
allText: overrides?.allText ?? locale?.table?.allText ?? defaultLabels.allText,
|
|
1475
|
+
filterPlaceholder: overrides?.filterPlaceholder ?? locale?.table?.filterPlaceholder ?? defaultLabels.filterPlaceholder,
|
|
1476
|
+
exportCsvText: overrides?.exportCsvText ?? locale?.table?.exportCsvText ?? defaultLabels.exportCsvText,
|
|
1477
|
+
exportExcelText: overrides?.exportExcelText ?? locale?.table?.exportExcelText ?? defaultLabels.exportExcelText,
|
|
1478
|
+
exportCsvAriaLabel: overrides?.exportCsvAriaLabel ?? locale?.table?.exportCsvAriaLabel ?? defaultLabels.exportCsvAriaLabel,
|
|
1479
|
+
exportExcelAriaLabel: overrides?.exportExcelAriaLabel ?? locale?.table?.exportExcelAriaLabel ?? defaultLabels.exportExcelAriaLabel,
|
|
1480
|
+
expandRowAriaLabel: overrides?.expandRowAriaLabel ?? locale?.table?.expandRowAriaLabel ?? defaultLabels.expandRowAriaLabel,
|
|
1481
|
+
collapseRowAriaLabel: overrides?.collapseRowAriaLabel ?? locale?.table?.collapseRowAriaLabel ?? defaultLabels.collapseRowAriaLabel
|
|
1365
1482
|
};
|
|
1366
1483
|
}
|
|
1367
1484
|
function formatTableSelectRowAriaLabel(template, row, locale) {
|
|
@@ -1373,6 +1490,7 @@ function formatTableSortByText(template, column) {
|
|
|
1373
1490
|
var DEFAULT_TASK_BOARD_LABELS = {
|
|
1374
1491
|
emptyColumnText: "No tasks",
|
|
1375
1492
|
addCardText: "Add task",
|
|
1493
|
+
addColumnText: "Add column",
|
|
1376
1494
|
wipLimitText: "WIP limit: {limit}",
|
|
1377
1495
|
dragHintText: "Drag to move",
|
|
1378
1496
|
boardAriaLabel: "Task Board"
|
|
@@ -1380,6 +1498,7 @@ var DEFAULT_TASK_BOARD_LABELS = {
|
|
|
1380
1498
|
var ZH_CN_TASK_BOARD_LABELS = {
|
|
1381
1499
|
emptyColumnText: "\u6682\u65E0\u4EFB\u52A1",
|
|
1382
1500
|
addCardText: "\u6DFB\u52A0\u4EFB\u52A1",
|
|
1501
|
+
addColumnText: "\u6DFB\u52A0\u5217",
|
|
1383
1502
|
wipLimitText: "WIP \u9650\u5236: {limit}",
|
|
1384
1503
|
dragHintText: "\u62D6\u62FD\u4EE5\u79FB\u52A8",
|
|
1385
1504
|
boardAriaLabel: "\u4EFB\u52A1\u770B\u677F"
|
|
@@ -1390,11 +1509,153 @@ function getTaskBoardLabels(locale, overrides) {
|
|
|
1390
1509
|
return {
|
|
1391
1510
|
emptyColumnText: overrides?.emptyColumnText ?? locale?.taskBoard?.emptyColumnText ?? defaultLabels.emptyColumnText,
|
|
1392
1511
|
addCardText: overrides?.addCardText ?? locale?.taskBoard?.addCardText ?? defaultLabels.addCardText,
|
|
1512
|
+
addColumnText: overrides?.addColumnText ?? locale?.taskBoard?.addColumnText ?? defaultLabels.addColumnText,
|
|
1393
1513
|
wipLimitText: overrides?.wipLimitText ?? locale?.taskBoard?.wipLimitText ?? defaultLabels.wipLimitText,
|
|
1394
1514
|
dragHintText: overrides?.dragHintText ?? locale?.taskBoard?.dragHintText ?? defaultLabels.dragHintText,
|
|
1395
1515
|
boardAriaLabel: overrides?.boardAriaLabel ?? locale?.taskBoard?.boardAriaLabel ?? defaultLabels.boardAriaLabel
|
|
1396
1516
|
};
|
|
1397
1517
|
}
|
|
1518
|
+
var DEFAULT_FILE_MANAGER_LABELS = {
|
|
1519
|
+
rootText: "Root"
|
|
1520
|
+
};
|
|
1521
|
+
var ZH_CN_FILE_MANAGER_LABELS = {
|
|
1522
|
+
rootText: "\u6839\u76EE\u5F55"
|
|
1523
|
+
};
|
|
1524
|
+
function getFileManagerLabels(locale) {
|
|
1525
|
+
const defaultLabels = locale?.locale?.startsWith("zh") ? ZH_CN_FILE_MANAGER_LABELS : DEFAULT_FILE_MANAGER_LABELS;
|
|
1526
|
+
return {
|
|
1527
|
+
rootText: locale?.fileManager?.rootText ?? defaultLabels.rootText
|
|
1528
|
+
};
|
|
1529
|
+
}
|
|
1530
|
+
var DEFAULT_IMAGE_VIEWER_LABELS = {
|
|
1531
|
+
dialogAriaLabel: "Image viewer",
|
|
1532
|
+
previewDialogAriaLabel: "Image preview",
|
|
1533
|
+
closeAriaLabel: "Close",
|
|
1534
|
+
closePreviewAriaLabel: "Close preview",
|
|
1535
|
+
previousImageAriaLabel: "Previous image",
|
|
1536
|
+
nextImageAriaLabel: "Next image",
|
|
1537
|
+
zoomOutAriaLabel: "Zoom out",
|
|
1538
|
+
resetAriaLabel: "Reset",
|
|
1539
|
+
zoomInAriaLabel: "Zoom in",
|
|
1540
|
+
rotateLeftAriaLabel: "Rotate left",
|
|
1541
|
+
rotateRightAriaLabel: "Rotate right"
|
|
1542
|
+
};
|
|
1543
|
+
var ZH_CN_IMAGE_VIEWER_LABELS = {
|
|
1544
|
+
dialogAriaLabel: "\u56FE\u7247\u67E5\u770B\u5668",
|
|
1545
|
+
previewDialogAriaLabel: "\u56FE\u7247\u9884\u89C8",
|
|
1546
|
+
closeAriaLabel: "\u5173\u95ED",
|
|
1547
|
+
closePreviewAriaLabel: "\u5173\u95ED\u9884\u89C8",
|
|
1548
|
+
previousImageAriaLabel: "\u4E0A\u4E00\u5F20\u56FE\u7247",
|
|
1549
|
+
nextImageAriaLabel: "\u4E0B\u4E00\u5F20\u56FE\u7247",
|
|
1550
|
+
zoomOutAriaLabel: "\u7F29\u5C0F",
|
|
1551
|
+
resetAriaLabel: "\u91CD\u7F6E",
|
|
1552
|
+
zoomInAriaLabel: "\u653E\u5927",
|
|
1553
|
+
rotateLeftAriaLabel: "\u5411\u5DE6\u65CB\u8F6C",
|
|
1554
|
+
rotateRightAriaLabel: "\u5411\u53F3\u65CB\u8F6C"
|
|
1555
|
+
};
|
|
1556
|
+
function getImageViewerLabels(locale) {
|
|
1557
|
+
const defaultLabels = locale?.locale?.startsWith("zh") ? ZH_CN_IMAGE_VIEWER_LABELS : DEFAULT_IMAGE_VIEWER_LABELS;
|
|
1558
|
+
return {
|
|
1559
|
+
dialogAriaLabel: locale?.imageViewer?.dialogAriaLabel ?? defaultLabels.dialogAriaLabel,
|
|
1560
|
+
previewDialogAriaLabel: locale?.imageViewer?.previewDialogAriaLabel ?? defaultLabels.previewDialogAriaLabel,
|
|
1561
|
+
closeAriaLabel: locale?.imageViewer?.closeAriaLabel ?? locale?.common?.closeText ?? defaultLabels.closeAriaLabel,
|
|
1562
|
+
closePreviewAriaLabel: locale?.imageViewer?.closePreviewAriaLabel ?? defaultLabels.closePreviewAriaLabel,
|
|
1563
|
+
previousImageAriaLabel: locale?.imageViewer?.previousImageAriaLabel ?? defaultLabels.previousImageAriaLabel,
|
|
1564
|
+
nextImageAriaLabel: locale?.imageViewer?.nextImageAriaLabel ?? defaultLabels.nextImageAriaLabel,
|
|
1565
|
+
zoomOutAriaLabel: locale?.imageViewer?.zoomOutAriaLabel ?? defaultLabels.zoomOutAriaLabel,
|
|
1566
|
+
resetAriaLabel: locale?.imageViewer?.resetAriaLabel ?? defaultLabels.resetAriaLabel,
|
|
1567
|
+
zoomInAriaLabel: locale?.imageViewer?.zoomInAriaLabel ?? defaultLabels.zoomInAriaLabel,
|
|
1568
|
+
rotateLeftAriaLabel: locale?.imageViewer?.rotateLeftAriaLabel ?? defaultLabels.rotateLeftAriaLabel,
|
|
1569
|
+
rotateRightAriaLabel: locale?.imageViewer?.rotateRightAriaLabel ?? defaultLabels.rotateRightAriaLabel
|
|
1570
|
+
};
|
|
1571
|
+
}
|
|
1572
|
+
var DEFAULT_IMAGE_EDITOR_LABELS = {
|
|
1573
|
+
selectImageText: "Select image",
|
|
1574
|
+
selectImageAriaLabel: "Select image to crop and upload",
|
|
1575
|
+
cropModalTitle: "Crop image",
|
|
1576
|
+
cropCancelText: "Cancel",
|
|
1577
|
+
cropConfirmText: "Confirm crop",
|
|
1578
|
+
cropperDialogAriaLabel: "Image cropper",
|
|
1579
|
+
imageToCropAriaLabel: "Image to crop",
|
|
1580
|
+
moveCropAreaAriaLabel: "Move crop area",
|
|
1581
|
+
resizeCropAreaAriaLabel: "Resize crop area {handle}",
|
|
1582
|
+
loadingCropImageAriaLabel: "Loading image for cropping",
|
|
1583
|
+
annotationToolbarAriaLabel: "Annotation tools",
|
|
1584
|
+
annotationEditorAriaLabel: "Image annotation editor",
|
|
1585
|
+
annotationCanvasAriaLabel: "Image annotation canvas",
|
|
1586
|
+
loadingAnnotationImageAriaLabel: "Loading image for annotation",
|
|
1587
|
+
selectToolText: "Select",
|
|
1588
|
+
rectangleToolText: "Rectangle",
|
|
1589
|
+
ellipseToolText: "Ellipse",
|
|
1590
|
+
polygonToolText: "Polygon",
|
|
1591
|
+
freehandToolText: "Freehand",
|
|
1592
|
+
deleteText: "Delete"
|
|
1593
|
+
};
|
|
1594
|
+
var ZH_CN_IMAGE_EDITOR_LABELS = {
|
|
1595
|
+
selectImageText: "\u9009\u62E9\u56FE\u7247",
|
|
1596
|
+
selectImageAriaLabel: "\u9009\u62E9\u56FE\u7247\u8FDB\u884C\u88C1\u526A\u5E76\u4E0A\u4F20",
|
|
1597
|
+
cropModalTitle: "\u88C1\u526A\u56FE\u7247",
|
|
1598
|
+
cropCancelText: "\u53D6\u6D88",
|
|
1599
|
+
cropConfirmText: "\u786E\u8BA4\u88C1\u526A",
|
|
1600
|
+
cropperDialogAriaLabel: "\u56FE\u7247\u88C1\u526A\u5668",
|
|
1601
|
+
imageToCropAriaLabel: "\u5F85\u88C1\u526A\u56FE\u7247",
|
|
1602
|
+
moveCropAreaAriaLabel: "\u79FB\u52A8\u88C1\u526A\u533A\u57DF",
|
|
1603
|
+
resizeCropAreaAriaLabel: "\u8C03\u6574\u88C1\u526A\u533A\u57DF {handle}",
|
|
1604
|
+
loadingCropImageAriaLabel: "\u6B63\u5728\u52A0\u8F7D\u5F85\u88C1\u526A\u56FE\u7247",
|
|
1605
|
+
annotationToolbarAriaLabel: "\u6807\u6CE8\u5DE5\u5177",
|
|
1606
|
+
annotationEditorAriaLabel: "\u56FE\u7247\u6807\u6CE8\u7F16\u8F91\u5668",
|
|
1607
|
+
annotationCanvasAriaLabel: "\u56FE\u7247\u6807\u6CE8\u753B\u5E03",
|
|
1608
|
+
loadingAnnotationImageAriaLabel: "\u6B63\u5728\u52A0\u8F7D\u5F85\u6807\u6CE8\u56FE\u7247",
|
|
1609
|
+
selectToolText: "\u9009\u62E9",
|
|
1610
|
+
rectangleToolText: "\u77E9\u5F62",
|
|
1611
|
+
ellipseToolText: "\u692D\u5706",
|
|
1612
|
+
polygonToolText: "\u591A\u8FB9\u5F62",
|
|
1613
|
+
freehandToolText: "\u81EA\u7531\u7ED8\u5236",
|
|
1614
|
+
deleteText: "\u5220\u9664"
|
|
1615
|
+
};
|
|
1616
|
+
function getImageEditorLabels(locale) {
|
|
1617
|
+
const defaultLabels = locale?.locale?.startsWith("zh") ? ZH_CN_IMAGE_EDITOR_LABELS : DEFAULT_IMAGE_EDITOR_LABELS;
|
|
1618
|
+
return {
|
|
1619
|
+
selectImageText: locale?.imageEditor?.selectImageText ?? defaultLabels.selectImageText,
|
|
1620
|
+
selectImageAriaLabel: locale?.imageEditor?.selectImageAriaLabel ?? defaultLabels.selectImageAriaLabel,
|
|
1621
|
+
cropModalTitle: locale?.imageEditor?.cropModalTitle ?? defaultLabels.cropModalTitle,
|
|
1622
|
+
cropCancelText: locale?.imageEditor?.cropCancelText ?? locale?.common?.cancelText ?? defaultLabels.cropCancelText,
|
|
1623
|
+
cropConfirmText: locale?.imageEditor?.cropConfirmText ?? locale?.common?.okText ?? defaultLabels.cropConfirmText,
|
|
1624
|
+
cropperDialogAriaLabel: locale?.imageEditor?.cropperDialogAriaLabel ?? defaultLabels.cropperDialogAriaLabel,
|
|
1625
|
+
imageToCropAriaLabel: locale?.imageEditor?.imageToCropAriaLabel ?? defaultLabels.imageToCropAriaLabel,
|
|
1626
|
+
moveCropAreaAriaLabel: locale?.imageEditor?.moveCropAreaAriaLabel ?? defaultLabels.moveCropAreaAriaLabel,
|
|
1627
|
+
resizeCropAreaAriaLabel: locale?.imageEditor?.resizeCropAreaAriaLabel ?? defaultLabels.resizeCropAreaAriaLabel,
|
|
1628
|
+
loadingCropImageAriaLabel: locale?.imageEditor?.loadingCropImageAriaLabel ?? defaultLabels.loadingCropImageAriaLabel,
|
|
1629
|
+
annotationToolbarAriaLabel: locale?.imageEditor?.annotationToolbarAriaLabel ?? defaultLabels.annotationToolbarAriaLabel,
|
|
1630
|
+
annotationEditorAriaLabel: locale?.imageEditor?.annotationEditorAriaLabel ?? defaultLabels.annotationEditorAriaLabel,
|
|
1631
|
+
annotationCanvasAriaLabel: locale?.imageEditor?.annotationCanvasAriaLabel ?? defaultLabels.annotationCanvasAriaLabel,
|
|
1632
|
+
loadingAnnotationImageAriaLabel: locale?.imageEditor?.loadingAnnotationImageAriaLabel ?? defaultLabels.loadingAnnotationImageAriaLabel,
|
|
1633
|
+
selectToolText: locale?.imageEditor?.selectToolText ?? defaultLabels.selectToolText,
|
|
1634
|
+
rectangleToolText: locale?.imageEditor?.rectangleToolText ?? defaultLabels.rectangleToolText,
|
|
1635
|
+
ellipseToolText: locale?.imageEditor?.ellipseToolText ?? defaultLabels.ellipseToolText,
|
|
1636
|
+
polygonToolText: locale?.imageEditor?.polygonToolText ?? defaultLabels.polygonToolText,
|
|
1637
|
+
freehandToolText: locale?.imageEditor?.freehandToolText ?? defaultLabels.freehandToolText,
|
|
1638
|
+
deleteText: locale?.imageEditor?.deleteText ?? defaultLabels.deleteText
|
|
1639
|
+
};
|
|
1640
|
+
}
|
|
1641
|
+
var DEFAULT_STATUS_LABELS = {
|
|
1642
|
+
tagCloseAriaLabel: "Close tag",
|
|
1643
|
+
badgeLabel: "notification",
|
|
1644
|
+
badgeCountLabel: "{count} notifications"
|
|
1645
|
+
};
|
|
1646
|
+
var ZH_CN_STATUS_LABELS = {
|
|
1647
|
+
tagCloseAriaLabel: "\u5173\u95ED\u6807\u7B7E",
|
|
1648
|
+
badgeLabel: "\u901A\u77E5",
|
|
1649
|
+
badgeCountLabel: "{count} \u6761\u901A\u77E5"
|
|
1650
|
+
};
|
|
1651
|
+
function getStatusLabels(locale) {
|
|
1652
|
+
const defaultLabels = locale?.locale?.startsWith("zh") ? ZH_CN_STATUS_LABELS : DEFAULT_STATUS_LABELS;
|
|
1653
|
+
return {
|
|
1654
|
+
tagCloseAriaLabel: locale?.status?.tagCloseAriaLabel ?? defaultLabels.tagCloseAriaLabel,
|
|
1655
|
+
badgeLabel: locale?.status?.badgeLabel ?? defaultLabels.badgeLabel,
|
|
1656
|
+
badgeCountLabel: locale?.status?.badgeCountLabel ?? defaultLabels.badgeCountLabel
|
|
1657
|
+
};
|
|
1658
|
+
}
|
|
1398
1659
|
var DEFAULT_FORM_VALIDATION_LABELS = {
|
|
1399
1660
|
required: "This field is required",
|
|
1400
1661
|
typeString: "Value must be a string",
|
|
@@ -1508,7 +1769,7 @@ var ZH_CN_UPLOAD_LABELS = {
|
|
|
1508
1769
|
previewFileAriaLabel: "\u9884\u89C8 {fileName}"
|
|
1509
1770
|
};
|
|
1510
1771
|
|
|
1511
|
-
// src/utils/datepicker-
|
|
1772
|
+
// src/utils/i18n/datepicker-locales/en-US.ts
|
|
1512
1773
|
var EN_US_DATEPICKER_LOCALE = {
|
|
1513
1774
|
locale: "en-US",
|
|
1514
1775
|
labels: {
|
|
@@ -1521,67 +1782,9 @@ var EN_US_DATEPICKER_LOCALE = {
|
|
|
1521
1782
|
nextMonth: "Next month"
|
|
1522
1783
|
}
|
|
1523
1784
|
};
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
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
|
-
today: "Hoy",
|
|
1541
|
-
ok: "Aceptar",
|
|
1542
|
-
calendar: "Calendario",
|
|
1543
|
-
toggleCalendar: "Abrir calendario",
|
|
1544
|
-
clearDate: "Borrar fecha",
|
|
1545
|
-
previousMonth: "Mes anterior",
|
|
1546
|
-
nextMonth: "Mes siguiente"
|
|
1547
|
-
},
|
|
1548
|
-
fr: {
|
|
1549
|
-
today: "Aujourd'hui",
|
|
1550
|
-
ok: "OK",
|
|
1551
|
-
calendar: "Calendrier",
|
|
1552
|
-
toggleCalendar: "Ouvrir le calendrier",
|
|
1553
|
-
clearDate: "Effacer la date",
|
|
1554
|
-
previousMonth: "Mois pr\xE9c\xE9dent",
|
|
1555
|
-
nextMonth: "Mois suivant"
|
|
1556
|
-
},
|
|
1557
|
-
de: {
|
|
1558
|
-
today: "Heute",
|
|
1559
|
-
ok: "OK",
|
|
1560
|
-
calendar: "Kalender",
|
|
1561
|
-
toggleCalendar: "Kalender \xF6ffnen",
|
|
1562
|
-
clearDate: "Datum l\xF6schen",
|
|
1563
|
-
previousMonth: "Vorheriger Monat",
|
|
1564
|
-
nextMonth: "N\xE4chster Monat"
|
|
1565
|
-
},
|
|
1566
|
-
pt: {
|
|
1567
|
-
today: "Hoje",
|
|
1568
|
-
ok: "OK",
|
|
1569
|
-
calendar: "Calend\xE1rio",
|
|
1570
|
-
toggleCalendar: "Abrir calend\xE1rio",
|
|
1571
|
-
clearDate: "Limpar data",
|
|
1572
|
-
previousMonth: "M\xEAs anterior",
|
|
1573
|
-
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
|
-
}
|
|
1584
|
-
};
|
|
1785
|
+
|
|
1786
|
+
// src/utils/datepicker-i18n.ts
|
|
1787
|
+
var EN_US_DATEPICKER_LOCALE2 = EN_US_DATEPICKER_LOCALE;
|
|
1585
1788
|
function isDatePickerLocaleConfig(value) {
|
|
1586
1789
|
return Boolean(value && typeof value === "object" && "datePicker" in value);
|
|
1587
1790
|
}
|
|
@@ -1595,9 +1798,7 @@ function getDatePickerLocaleCode(locale) {
|
|
|
1595
1798
|
return getLocalePreset(locale)?.locale;
|
|
1596
1799
|
}
|
|
1597
1800
|
function getDefaultDatePickerLabels(locale) {
|
|
1598
|
-
|
|
1599
|
-
const language = lc.split("-")[0];
|
|
1600
|
-
return DATEPICKER_LABELS_BY_LANGUAGE[language] ?? EN_US_DATEPICKER_LOCALE.labels;
|
|
1801
|
+
return getLocalePreset(locale)?.labels ?? EN_US_DATEPICKER_LOCALE2.labels;
|
|
1601
1802
|
}
|
|
1602
1803
|
function getDatePickerLabels(locale, overrides) {
|
|
1603
1804
|
return {
|
|
@@ -1836,7 +2037,7 @@ function focusTimePickerOption(panel, unit, action) {
|
|
|
1836
2037
|
var timePickerBaseClasses = "relative inline-block w-full max-w-xs";
|
|
1837
2038
|
var timePickerInputWrapperClasses = "relative flex items-center";
|
|
1838
2039
|
function getTimePickerInputClasses(size, disabled) {
|
|
1839
|
-
const
|
|
2040
|
+
const baseClasses = [
|
|
1840
2041
|
"w-full rounded-[var(--tiger-radius-md,0.5rem)] border border-gray-300",
|
|
1841
2042
|
"focus:outline-none focus:ring-2 focus:ring-[var(--tiger-primary,#2563eb)] focus:border-transparent",
|
|
1842
2043
|
"transition-colors duration-200",
|
|
@@ -1849,10 +2050,10 @@ function getTimePickerInputClasses(size, disabled) {
|
|
|
1849
2050
|
lg: "px-4 py-3 text-lg"
|
|
1850
2051
|
};
|
|
1851
2052
|
const stateClasses = disabled ? "bg-gray-100 text-gray-400 cursor-not-allowed" : "bg-white text-gray-900 cursor-pointer hover:border-gray-400";
|
|
1852
|
-
return [...
|
|
2053
|
+
return [...baseClasses, sizeClasses3[size], stateClasses].join(" ");
|
|
1853
2054
|
}
|
|
1854
2055
|
function getTimePickerIconButtonClasses(size) {
|
|
1855
|
-
const
|
|
2056
|
+
const baseClasses = [
|
|
1856
2057
|
"absolute right-1 flex items-center justify-center",
|
|
1857
2058
|
"text-gray-400 hover:text-gray-600",
|
|
1858
2059
|
"focus:outline-none focus:ring-2 focus:ring-[var(--tiger-primary,#2563eb)] focus:ring-offset-1",
|
|
@@ -1864,7 +2065,7 @@ function getTimePickerIconButtonClasses(size) {
|
|
|
1864
2065
|
md: "w-8 h-8",
|
|
1865
2066
|
lg: "w-10 h-10"
|
|
1866
2067
|
};
|
|
1867
|
-
return [...
|
|
2068
|
+
return [...baseClasses, sizeClasses3[size]].join(" ");
|
|
1868
2069
|
}
|
|
1869
2070
|
var timePickerClearButtonClasses = [
|
|
1870
2071
|
"absolute right-10 flex items-center justify-center",
|
|
@@ -1888,18 +2089,18 @@ var timePickerRangeHeaderClasses = [
|
|
|
1888
2089
|
"flex items-center gap-2"
|
|
1889
2090
|
].join(" ");
|
|
1890
2091
|
function getTimePickerRangeTabButtonClasses(isActive) {
|
|
1891
|
-
const
|
|
2092
|
+
const baseClasses = [
|
|
1892
2093
|
"px-3 py-1 text-xs font-medium rounded",
|
|
1893
2094
|
"border border-gray-300",
|
|
1894
2095
|
"focus:outline-none focus:ring-2 focus:ring-[var(--tiger-primary,#2563eb)] focus:ring-offset-1",
|
|
1895
2096
|
"transition-colors duration-150"
|
|
1896
2097
|
];
|
|
1897
2098
|
if (isActive) {
|
|
1898
|
-
return [...
|
|
2099
|
+
return [...baseClasses, "bg-[var(--tiger-primary,#2563eb)] text-white border-transparent"].join(
|
|
1899
2100
|
" "
|
|
1900
2101
|
);
|
|
1901
2102
|
}
|
|
1902
|
-
return [...
|
|
2103
|
+
return [...baseClasses, "bg-white hover:bg-gray-50 text-gray-700"].join(" ");
|
|
1903
2104
|
}
|
|
1904
2105
|
var timePickerColumnClasses = "flex flex-col overflow-hidden shrink-0 w-16";
|
|
1905
2106
|
var timePickerColumnHeaderClasses = [
|
|
@@ -1910,27 +2111,27 @@ var timePickerColumnListClasses = [
|
|
|
1910
2111
|
"overflow-y-auto max-h-48 scrollbar-thin scrollbar-thumb-gray-300 scrollbar-track-gray-100"
|
|
1911
2112
|
].join(" ");
|
|
1912
2113
|
function getTimePickerItemClasses(isSelected, isDisabled) {
|
|
1913
|
-
const
|
|
2114
|
+
const baseClasses = [
|
|
1914
2115
|
"w-full px-3 py-1.5 text-sm text-center",
|
|
1915
2116
|
"hover:bg-gray-100 focus:outline-none focus:bg-gray-100",
|
|
1916
2117
|
"transition-colors duration-150",
|
|
1917
2118
|
"cursor-pointer"
|
|
1918
2119
|
];
|
|
1919
2120
|
if (isDisabled) {
|
|
1920
|
-
return [...
|
|
2121
|
+
return [...baseClasses, "text-gray-300 cursor-not-allowed hover:bg-transparent"].join(" ");
|
|
1921
2122
|
}
|
|
1922
2123
|
if (isSelected) {
|
|
1923
2124
|
return [
|
|
1924
|
-
...
|
|
2125
|
+
...baseClasses,
|
|
1925
2126
|
"bg-[var(--tiger-primary,#2563eb)] text-white",
|
|
1926
2127
|
"hover:bg-[var(--tiger-primary-hover,#1d4ed8)]",
|
|
1927
2128
|
"font-medium"
|
|
1928
2129
|
].join(" ");
|
|
1929
2130
|
}
|
|
1930
|
-
return [...
|
|
2131
|
+
return [...baseClasses, "text-gray-700"].join(" ");
|
|
1931
2132
|
}
|
|
1932
2133
|
function getTimePickerPeriodButtonClasses(isSelected) {
|
|
1933
|
-
const
|
|
2134
|
+
const baseClasses = [
|
|
1934
2135
|
"w-full px-3 py-2 text-sm font-medium text-center",
|
|
1935
2136
|
"hover:bg-gray-100 focus:outline-none focus:bg-gray-100",
|
|
1936
2137
|
"transition-colors duration-150",
|
|
@@ -1938,12 +2139,12 @@ function getTimePickerPeriodButtonClasses(isSelected) {
|
|
|
1938
2139
|
];
|
|
1939
2140
|
if (isSelected) {
|
|
1940
2141
|
return [
|
|
1941
|
-
...
|
|
2142
|
+
...baseClasses,
|
|
1942
2143
|
"bg-[var(--tiger-primary,#2563eb)] text-white",
|
|
1943
2144
|
"hover:bg-[var(--tiger-primary-hover,#1d4ed8)]"
|
|
1944
2145
|
].join(" ");
|
|
1945
2146
|
}
|
|
1946
|
-
return [...
|
|
2147
|
+
return [...baseClasses, "text-gray-700"].join(" ");
|
|
1947
2148
|
}
|
|
1948
2149
|
var timePickerFooterClasses = [
|
|
1949
2150
|
"px-3 py-2 border-t border-gray-200",
|
|
@@ -2049,6 +2250,12 @@ var enUS = {
|
|
|
2049
2250
|
searchPlaceholder: "Search",
|
|
2050
2251
|
clearText: "Clear"
|
|
2051
2252
|
},
|
|
2253
|
+
empty: {
|
|
2254
|
+
noData: "No data",
|
|
2255
|
+
noDataAvailable: "No data available",
|
|
2256
|
+
noResults: "No results found",
|
|
2257
|
+
error: "Something went wrong"
|
|
2258
|
+
},
|
|
2052
2259
|
modal: {
|
|
2053
2260
|
closeAriaLabel: "Close",
|
|
2054
2261
|
okText: "OK",
|
|
@@ -2057,6 +2264,15 @@ var enUS = {
|
|
|
2057
2264
|
drawer: {
|
|
2058
2265
|
closeAriaLabel: "Close"
|
|
2059
2266
|
},
|
|
2267
|
+
qrcode: {
|
|
2268
|
+
ariaLabel: "QR Code",
|
|
2269
|
+
expiredText: "QR code expired",
|
|
2270
|
+
refreshText: "Refresh",
|
|
2271
|
+
loadingText: "Loading..."
|
|
2272
|
+
},
|
|
2273
|
+
timeline: {
|
|
2274
|
+
pendingText: "Loading..."
|
|
2275
|
+
},
|
|
2060
2276
|
upload: DEFAULT_UPLOAD_LABELS,
|
|
2061
2277
|
pagination: {
|
|
2062
2278
|
totalText: "Total {total} items",
|
|
@@ -2085,17 +2301,85 @@ var enUS = {
|
|
|
2085
2301
|
columnSettingsText: "Column settings",
|
|
2086
2302
|
columnSettingsAriaLabel: "Column settings",
|
|
2087
2303
|
lockColumnAriaLabel: "Lock column {column}",
|
|
2088
|
-
unlockColumnAriaLabel: "Unlock column {column}"
|
|
2304
|
+
unlockColumnAriaLabel: "Unlock column {column}",
|
|
2305
|
+
allText: "All",
|
|
2306
|
+
filterPlaceholder: "Filter...",
|
|
2307
|
+
exportCsvText: "Export CSV",
|
|
2308
|
+
exportExcelText: "Export Excel",
|
|
2309
|
+
exportCsvAriaLabel: "Export to CSV",
|
|
2310
|
+
exportExcelAriaLabel: "Export to Excel",
|
|
2311
|
+
expandRowAriaLabel: "Expand row",
|
|
2312
|
+
collapseRowAriaLabel: "Collapse row"
|
|
2089
2313
|
},
|
|
2314
|
+
datePicker: EN_US_DATEPICKER_LOCALE,
|
|
2090
2315
|
timePicker: DEFAULT_TIME_PICKER_LABELS,
|
|
2091
2316
|
formWizard: {
|
|
2092
2317
|
prevText: "Previous",
|
|
2093
2318
|
nextText: "Next",
|
|
2094
2319
|
finishText: "Finish"
|
|
2095
2320
|
},
|
|
2321
|
+
tour: {
|
|
2322
|
+
prevText: "Previous",
|
|
2323
|
+
nextText: "Next",
|
|
2324
|
+
finishText: "Finish",
|
|
2325
|
+
closeAriaLabel: "Close tour"
|
|
2326
|
+
},
|
|
2327
|
+
calendar: {
|
|
2328
|
+
previousMonth: "Previous month",
|
|
2329
|
+
nextMonth: "Next month",
|
|
2330
|
+
previousYear: "Previous year",
|
|
2331
|
+
nextYear: "Next year",
|
|
2332
|
+
yearSelectAriaLabel: "Year",
|
|
2333
|
+
monthSelectAriaLabel: "Month",
|
|
2334
|
+
daySelectAriaLabel: "Day"
|
|
2335
|
+
},
|
|
2336
|
+
fileManager: {
|
|
2337
|
+
rootText: "Root"
|
|
2338
|
+
},
|
|
2339
|
+
imageViewer: {
|
|
2340
|
+
dialogAriaLabel: "Image viewer",
|
|
2341
|
+
previewDialogAriaLabel: "Image preview",
|
|
2342
|
+
closeAriaLabel: "Close",
|
|
2343
|
+
closePreviewAriaLabel: "Close preview",
|
|
2344
|
+
previousImageAriaLabel: "Previous image",
|
|
2345
|
+
nextImageAriaLabel: "Next image",
|
|
2346
|
+
zoomOutAriaLabel: "Zoom out",
|
|
2347
|
+
resetAriaLabel: "Reset",
|
|
2348
|
+
zoomInAriaLabel: "Zoom in",
|
|
2349
|
+
rotateLeftAriaLabel: "Rotate left",
|
|
2350
|
+
rotateRightAriaLabel: "Rotate right"
|
|
2351
|
+
},
|
|
2352
|
+
imageEditor: {
|
|
2353
|
+
selectImageText: "Select image",
|
|
2354
|
+
selectImageAriaLabel: "Select image to crop and upload",
|
|
2355
|
+
cropModalTitle: "Crop image",
|
|
2356
|
+
cropCancelText: "Cancel",
|
|
2357
|
+
cropConfirmText: "Confirm crop",
|
|
2358
|
+
cropperDialogAriaLabel: "Image cropper",
|
|
2359
|
+
imageToCropAriaLabel: "Image to crop",
|
|
2360
|
+
moveCropAreaAriaLabel: "Move crop area",
|
|
2361
|
+
resizeCropAreaAriaLabel: "Resize crop area {handle}",
|
|
2362
|
+
loadingCropImageAriaLabel: "Loading image for cropping",
|
|
2363
|
+
annotationToolbarAriaLabel: "Annotation tools",
|
|
2364
|
+
annotationEditorAriaLabel: "Image annotation editor",
|
|
2365
|
+
annotationCanvasAriaLabel: "Image annotation canvas",
|
|
2366
|
+
loadingAnnotationImageAriaLabel: "Loading image for annotation",
|
|
2367
|
+
selectToolText: "Select",
|
|
2368
|
+
rectangleToolText: "Rectangle",
|
|
2369
|
+
ellipseToolText: "Ellipse",
|
|
2370
|
+
polygonToolText: "Polygon",
|
|
2371
|
+
freehandToolText: "Freehand",
|
|
2372
|
+
deleteText: "Delete"
|
|
2373
|
+
},
|
|
2374
|
+
status: {
|
|
2375
|
+
tagCloseAriaLabel: "Close tag",
|
|
2376
|
+
badgeLabel: "notification",
|
|
2377
|
+
badgeCountLabel: "{count} notifications"
|
|
2378
|
+
},
|
|
2096
2379
|
taskBoard: {
|
|
2097
2380
|
emptyColumnText: "No tasks",
|
|
2098
2381
|
addCardText: "Add task",
|
|
2382
|
+
addColumnText: "Add column",
|
|
2099
2383
|
wipLimitText: "WIP limit: {limit}",
|
|
2100
2384
|
dragHintText: "Drag to move",
|
|
2101
2385
|
boardAriaLabel: "Task Board"
|
|
@@ -2148,8 +2432,23 @@ function deepMerge(base, override) {
|
|
|
2148
2432
|
function defineLocale(overrides = {}) {
|
|
2149
2433
|
return deepMerge(enUS, overrides);
|
|
2150
2434
|
}
|
|
2435
|
+
|
|
2436
|
+
// src/utils/i18n/define-text.ts
|
|
2437
|
+
function isPlainObject2(value) {
|
|
2438
|
+
if (value === null || typeof value !== "object") return false;
|
|
2439
|
+
const proto = Object.getPrototypeOf(value);
|
|
2440
|
+
return proto === Object.prototype || proto === null;
|
|
2441
|
+
}
|
|
2442
|
+
function clonePlainObject(value) {
|
|
2443
|
+
const out = {};
|
|
2444
|
+
for (const key of Object.keys(value)) {
|
|
2445
|
+
const next = value[key];
|
|
2446
|
+
out[key] = isPlainObject2(next) ? clonePlainObject(next) : next;
|
|
2447
|
+
}
|
|
2448
|
+
return out;
|
|
2449
|
+
}
|
|
2151
2450
|
function defineText(text = {}) {
|
|
2152
|
-
return
|
|
2451
|
+
return clonePlainObject(text);
|
|
2153
2452
|
}
|
|
2154
2453
|
|
|
2155
2454
|
// src/utils/interaction-styles.ts
|
|
@@ -2513,11 +2812,21 @@ var selectOptionDisabledClasses = "opacity-50 cursor-not-allowed hover:bg-[var(-
|
|
|
2513
2812
|
var selectGroupLabelClasses = "px-3 py-2 text-xs font-semibold text-[var(--tiger-select-group-label-text,var(--tiger-text-muted,#6b7280))] uppercase bg-[var(--tiger-select-group-label-bg,var(--tiger-surface-muted,#f9fafb))]";
|
|
2514
2813
|
var selectSearchInputClasses = "w-full px-3 py-2 bg-[var(--tiger-select-dropdown-bg,var(--tiger-surface,#ffffff))] text-[var(--tiger-select-search-text,var(--tiger-text,#111827))] placeholder:text-[var(--tiger-select-search-placeholder,var(--tiger-text-muted,#9ca3af))] border-b border-[var(--tiger-select-dropdown-border,var(--tiger-border,#e5e7eb))] focus:outline-none focus:ring-0";
|
|
2515
2814
|
var selectEmptyStateClasses = "px-3 py-8 text-center text-[var(--tiger-select-empty-text,var(--tiger-text-muted,#6b7280))] text-sm";
|
|
2815
|
+
var selectDoneActionClasses = "sticky bottom-0 z-10 md:hidden border-t border-[var(--tiger-select-dropdown-border,var(--tiger-border,#e5e7eb))] bg-[var(--tiger-select-dropdown-bg,var(--tiger-surface,#ffffff))] p-2";
|
|
2816
|
+
var selectDoneButtonClasses = "w-full rounded-[var(--tiger-radius-md,0.5rem)] bg-[var(--tiger-primary,#2563eb)] px-3 py-2 text-sm font-medium text-white transition-colors hover:bg-[var(--tiger-primary-hover,#1d4ed8)] focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--tiger-select-ring,var(--tiger-primary,#2563eb))]/40";
|
|
2516
2817
|
var SELECT_SIZE_CLASSES = {
|
|
2517
2818
|
sm: "text-sm py-1.5",
|
|
2518
2819
|
md: "text-base py-2",
|
|
2519
2820
|
lg: "text-lg py-2.5"
|
|
2520
2821
|
};
|
|
2822
|
+
var SELECT_VIRTUAL_ITEM_HEIGHT = {
|
|
2823
|
+
sm: 32,
|
|
2824
|
+
md: 40,
|
|
2825
|
+
lg: 48
|
|
2826
|
+
};
|
|
2827
|
+
function getSelectVirtualItemHeight(size = "md") {
|
|
2828
|
+
return SELECT_VIRTUAL_ITEM_HEIGHT[size] ?? SELECT_VIRTUAL_ITEM_HEIGHT.md;
|
|
2829
|
+
}
|
|
2521
2830
|
function getSelectSizeClasses(size) {
|
|
2522
2831
|
return SELECT_SIZE_CLASSES[size];
|
|
2523
2832
|
}
|
|
@@ -2622,20 +2931,20 @@ function createSelectSearchDebouncer(options) {
|
|
|
2622
2931
|
const flush = () => {
|
|
2623
2932
|
if (timerHandle !== void 0) {
|
|
2624
2933
|
cancel();
|
|
2625
|
-
options.
|
|
2934
|
+
options.onSearchChange(pendingQuery);
|
|
2626
2935
|
}
|
|
2627
2936
|
};
|
|
2628
2937
|
const schedule = (query) => {
|
|
2629
2938
|
pendingQuery = query;
|
|
2630
2939
|
if (delay <= 0) {
|
|
2631
2940
|
cancel();
|
|
2632
|
-
options.
|
|
2941
|
+
options.onSearchChange(query);
|
|
2633
2942
|
return;
|
|
2634
2943
|
}
|
|
2635
2944
|
cancel();
|
|
2636
2945
|
timerHandle = setTimer(() => {
|
|
2637
2946
|
timerHandle = void 0;
|
|
2638
|
-
options.
|
|
2947
|
+
options.onSearchChange(pendingQuery);
|
|
2639
2948
|
}, delay);
|
|
2640
2949
|
};
|
|
2641
2950
|
return {
|
|
@@ -3042,23 +3351,28 @@ function parseDate(value) {
|
|
|
3042
3351
|
const parsed = new Date(value);
|
|
3043
3352
|
return isNaN(parsed.getTime()) ? null : parsed;
|
|
3044
3353
|
}
|
|
3045
|
-
|
|
3354
|
+
var defaultDateFormatOptions = {
|
|
3355
|
+
year: "numeric",
|
|
3356
|
+
month: "2-digit",
|
|
3357
|
+
day: "2-digit"
|
|
3358
|
+
};
|
|
3359
|
+
function getDateFormatParts(format) {
|
|
3046
3360
|
switch (format) {
|
|
3047
|
-
case "yyyy-MM-dd":
|
|
3048
|
-
case "yyyy/MM/dd":
|
|
3049
|
-
return { year: "numeric", month: "2-digit", day: "2-digit" };
|
|
3050
3361
|
case "MM/dd/yyyy":
|
|
3051
|
-
return
|
|
3362
|
+
return ["month", "/", "day", "/", "year"];
|
|
3052
3363
|
case "dd/MM/yyyy":
|
|
3053
|
-
return
|
|
3364
|
+
return ["day", "/", "month", "/", "year"];
|
|
3365
|
+
case "yyyy/MM/dd":
|
|
3366
|
+
return ["year", "/", "month", "/", "day"];
|
|
3367
|
+
case "yyyy-MM-dd":
|
|
3054
3368
|
default:
|
|
3055
|
-
return
|
|
3369
|
+
return ["year", "-", "month", "-", "day"];
|
|
3056
3370
|
}
|
|
3057
3371
|
}
|
|
3058
3372
|
function formatDate(date, format = "yyyy-MM-dd", locale) {
|
|
3059
3373
|
if (!date || isNaN(date.getTime())) return "";
|
|
3060
3374
|
if (locale) {
|
|
3061
|
-
const localized =
|
|
3375
|
+
const localized = safeIntlFormatDateParts(locale, format, date);
|
|
3062
3376
|
if (localized) return localized;
|
|
3063
3377
|
}
|
|
3064
3378
|
const year = date.getFullYear();
|
|
@@ -3077,7 +3391,7 @@ function formatDate(date, format = "yyyy-MM-dd", locale) {
|
|
|
3077
3391
|
return `${year}-${month}-${day}`;
|
|
3078
3392
|
}
|
|
3079
3393
|
}
|
|
3080
|
-
function formatDateWithLocale(date, locale, options =
|
|
3394
|
+
function formatDateWithLocale(date, locale, options = defaultDateFormatOptions) {
|
|
3081
3395
|
if (!date || isNaN(date.getTime())) return "";
|
|
3082
3396
|
if (!locale) return formatDate(date);
|
|
3083
3397
|
const localized = safeIntlFormat(locale, options, date);
|
|
@@ -3190,6 +3504,30 @@ function safeIntlFormat(locale, options, date) {
|
|
|
3190
3504
|
return "";
|
|
3191
3505
|
}
|
|
3192
3506
|
}
|
|
3507
|
+
function safeIntlFormatDateParts(locale, format, date) {
|
|
3508
|
+
try {
|
|
3509
|
+
const key = `${locale}_${JSON.stringify(defaultDateFormatOptions)}_parts`;
|
|
3510
|
+
let fmt = intlCache.get(key);
|
|
3511
|
+
if (!fmt) {
|
|
3512
|
+
fmt = new Intl.DateTimeFormat(locale, defaultDateFormatOptions);
|
|
3513
|
+
intlCache.set(key, fmt);
|
|
3514
|
+
}
|
|
3515
|
+
const parts = fmt.formatToParts(date);
|
|
3516
|
+
const partMap = new Map(parts.map((part) => [part.type, part.value]));
|
|
3517
|
+
const year = partMap.get("year");
|
|
3518
|
+
const month = partMap.get("month");
|
|
3519
|
+
const day = partMap.get("day");
|
|
3520
|
+
if (!year || !month || !day) return "";
|
|
3521
|
+
return getDateFormatParts(format).map((part) => {
|
|
3522
|
+
if (part === "year") return year;
|
|
3523
|
+
if (part === "month") return month;
|
|
3524
|
+
if (part === "day") return day;
|
|
3525
|
+
return part;
|
|
3526
|
+
}).join("");
|
|
3527
|
+
} catch {
|
|
3528
|
+
return "";
|
|
3529
|
+
}
|
|
3530
|
+
}
|
|
3193
3531
|
function formatMonthYear(year, month, locale) {
|
|
3194
3532
|
if (locale) {
|
|
3195
3533
|
const text = safeIntlFormat(
|
|
@@ -3278,12 +3616,38 @@ function isToday(date) {
|
|
|
3278
3616
|
const today = /* @__PURE__ */ new Date();
|
|
3279
3617
|
return isSameDay(date, today);
|
|
3280
3618
|
}
|
|
3619
|
+
function getDatePickerCalendarCellState(input) {
|
|
3620
|
+
const { date, selectedDate = null, selectedRange = [null, null], isRangeMode = false } = input;
|
|
3621
|
+
const [rangeStart, rangeEnd] = selectedRange;
|
|
3622
|
+
const normDate = normalizeDate(date);
|
|
3623
|
+
const normStart = rangeStart ? normalizeDate(rangeStart) : null;
|
|
3624
|
+
const normEnd = rangeEnd ? normalizeDate(rangeEnd) : null;
|
|
3625
|
+
const isSelectingEnd = isRangeMode && Boolean(rangeStart) && !rangeEnd;
|
|
3626
|
+
const isRangeStart = isRangeMode && rangeStart ? isSameDay(date, rangeStart) : false;
|
|
3627
|
+
const isRangeEnd = isRangeMode && rangeEnd ? isSameDay(date, rangeEnd) : false;
|
|
3628
|
+
const isInRange = Boolean(
|
|
3629
|
+
isRangeMode && normStart && normEnd && normDate >= normStart && normDate <= normEnd
|
|
3630
|
+
);
|
|
3631
|
+
const isSelected = !isRangeMode ? selectedDate ? isSameDay(date, selectedDate) : false : isRangeStart || isRangeEnd;
|
|
3632
|
+
const isBeforeRangeStart = Boolean(isSelectingEnd && normStart && normDate < normStart);
|
|
3633
|
+
const isDisabled = Boolean(input.isDateDisabled?.(date)) || isBeforeRangeStart;
|
|
3634
|
+
return {
|
|
3635
|
+
iso: formatDate(date, "yyyy-MM-dd"),
|
|
3636
|
+
isCurrentMonthDay: input.isCurrentMonth?.(date) ?? true,
|
|
3637
|
+
isSelected,
|
|
3638
|
+
isTodayDay: isToday(date),
|
|
3639
|
+
isDisabled,
|
|
3640
|
+
isInRange,
|
|
3641
|
+
isRangeStart,
|
|
3642
|
+
isRangeEnd
|
|
3643
|
+
};
|
|
3644
|
+
}
|
|
3281
3645
|
|
|
3282
3646
|
// src/utils/datepicker-styles.ts
|
|
3283
3647
|
var datePickerBaseClasses = "relative inline-block w-full";
|
|
3284
3648
|
var datePickerInputWrapperClasses = "relative w-full";
|
|
3285
3649
|
function getDatePickerInputClasses(size = "md", disabled = false) {
|
|
3286
|
-
const
|
|
3650
|
+
const baseClasses = [
|
|
3287
3651
|
"w-full",
|
|
3288
3652
|
"rounded-[var(--tiger-radius-md,0.5rem)]",
|
|
3289
3653
|
"border",
|
|
@@ -3305,10 +3669,10 @@ function getDatePickerInputClasses(size = "md", disabled = false) {
|
|
|
3305
3669
|
lg: "px-4 py-3 text-lg"
|
|
3306
3670
|
};
|
|
3307
3671
|
const disabledClasses = disabled ? ["bg-gray-100", "cursor-not-allowed", "text-gray-500"] : ["cursor-pointer"];
|
|
3308
|
-
return classNames(...
|
|
3672
|
+
return classNames(...baseClasses, sizeClasses3[size], ...disabledClasses);
|
|
3309
3673
|
}
|
|
3310
3674
|
function getDatePickerIconButtonClasses(size = "md") {
|
|
3311
|
-
const
|
|
3675
|
+
const baseClasses = [
|
|
3312
3676
|
"absolute",
|
|
3313
3677
|
"right-0",
|
|
3314
3678
|
"top-0",
|
|
@@ -3325,7 +3689,7 @@ function getDatePickerIconButtonClasses(size = "md") {
|
|
|
3325
3689
|
md: "px-3",
|
|
3326
3690
|
lg: "px-4"
|
|
3327
3691
|
};
|
|
3328
|
-
return classNames(...
|
|
3692
|
+
return classNames(...baseClasses, sizeClasses3[size]);
|
|
3329
3693
|
}
|
|
3330
3694
|
var datePickerCalendarClasses = classNames(
|
|
3331
3695
|
"absolute",
|
|
@@ -3534,20 +3898,20 @@ function formatTimeDisplayWithLocale(hours, minutes, seconds = 0, format = "24",
|
|
|
3534
3898
|
const suffix = period === "AM" ? labels.am : labels.pm;
|
|
3535
3899
|
return `${timeStr} ${suffix}`;
|
|
3536
3900
|
}
|
|
3537
|
-
function isTimeInRange(hours, minutes, minTime, maxTime) {
|
|
3538
|
-
const
|
|
3901
|
+
function isTimeInRange(hours, minutes, minTime, maxTime, seconds = 0) {
|
|
3902
|
+
const currentSeconds = hours * 3600 + minutes * 60 + seconds;
|
|
3539
3903
|
if (minTime) {
|
|
3540
3904
|
const min = parseTime(minTime);
|
|
3541
3905
|
if (min) {
|
|
3542
|
-
const
|
|
3543
|
-
if (
|
|
3906
|
+
const minSeconds = min.hours * 3600 + min.minutes * 60 + min.seconds;
|
|
3907
|
+
if (currentSeconds < minSeconds) return false;
|
|
3544
3908
|
}
|
|
3545
3909
|
}
|
|
3546
3910
|
if (maxTime) {
|
|
3547
3911
|
const max = parseTime(maxTime);
|
|
3548
3912
|
if (max) {
|
|
3549
|
-
const
|
|
3550
|
-
if (
|
|
3913
|
+
const maxSeconds = max.hours * 3600 + max.minutes * 60 + max.seconds;
|
|
3914
|
+
if (currentSeconds > maxSeconds) return false;
|
|
3551
3915
|
}
|
|
3552
3916
|
}
|
|
3553
3917
|
return true;
|
|
@@ -3581,8 +3945,27 @@ function getCurrentTime(showSeconds = false) {
|
|
|
3581
3945
|
return formatTime(now.getHours(), now.getMinutes(), now.getSeconds(), showSeconds);
|
|
3582
3946
|
}
|
|
3583
3947
|
|
|
3948
|
+
// src/utils/file-utils.ts
|
|
3949
|
+
function formatBytes(bytes, options = {}) {
|
|
3950
|
+
if (bytes === void 0 || bytes === null) return options.emptyText ?? "";
|
|
3951
|
+
const safeBytes = Number.isFinite(bytes) ? Math.max(0, bytes) : 0;
|
|
3952
|
+
if (safeBytes === 0) return "0 B";
|
|
3953
|
+
const units = ["B", "KB", "MB", "GB", "TB"];
|
|
3954
|
+
const k = 1024;
|
|
3955
|
+
const index = Math.min(units.length - 1, Math.floor(Math.log(safeBytes) / Math.log(k)));
|
|
3956
|
+
const size = safeBytes / Math.pow(k, index);
|
|
3957
|
+
const precision = Math.max(0, Math.floor(options.precision ?? 2));
|
|
3958
|
+
const text = size.toFixed(precision);
|
|
3959
|
+
return `${options.trimTrailingZeros ? text.replace(/\.0+$/, "").replace(/(\.\d*?)0+$/, "$1") : text} ${units[index]}`;
|
|
3960
|
+
}
|
|
3961
|
+
function getFileExtensionName(name, options) {
|
|
3962
|
+
const dot = name.lastIndexOf(".");
|
|
3963
|
+
if (dot <= 0 || dot === name.length - 1) return "";
|
|
3964
|
+
const extension = name.slice(dot + 1).toLowerCase();
|
|
3965
|
+
return options?.includeDot ? `.${extension}` : extension;
|
|
3966
|
+
}
|
|
3967
|
+
|
|
3584
3968
|
// src/utils/upload-utils.ts
|
|
3585
|
-
var DEFAULT_UPLOAD_CHUNK_SIZE = 1024 * 1024;
|
|
3586
3969
|
var uploadStatusIconSizeClasses = {
|
|
3587
3970
|
sm: "w-5 h-5",
|
|
3588
3971
|
lg: "w-8 h-8"
|
|
@@ -3702,8 +4085,7 @@ function generateFileId() {
|
|
|
3702
4085
|
return `upload-${Date.now()}-${Math.random().toString(36).substring(2, 11)}`;
|
|
3703
4086
|
}
|
|
3704
4087
|
function getFileExtension(fileName) {
|
|
3705
|
-
|
|
3706
|
-
return `.${fileName.split(".").pop()?.toLowerCase() || ""}`;
|
|
4088
|
+
return getFileExtensionName(fileName, { includeDot: true });
|
|
3707
4089
|
}
|
|
3708
4090
|
function fileToUploadFile(file) {
|
|
3709
4091
|
return {
|
|
@@ -3715,57 +4097,6 @@ function fileToUploadFile(file) {
|
|
|
3715
4097
|
file
|
|
3716
4098
|
};
|
|
3717
4099
|
}
|
|
3718
|
-
function createUploadChunks(file, chunkSize = DEFAULT_UPLOAD_CHUNK_SIZE) {
|
|
3719
|
-
const safeChunkSize = Math.max(1, Math.floor(chunkSize));
|
|
3720
|
-
const total = Math.max(1, Math.ceil(file.size / safeChunkSize));
|
|
3721
|
-
return Array.from({ length: total }, (_, index) => {
|
|
3722
|
-
const start = index * safeChunkSize;
|
|
3723
|
-
const end = Math.min(file.size, start + safeChunkSize);
|
|
3724
|
-
return {
|
|
3725
|
-
index,
|
|
3726
|
-
start,
|
|
3727
|
-
end,
|
|
3728
|
-
size: end - start,
|
|
3729
|
-
blob: file.slice(start, end)
|
|
3730
|
-
};
|
|
3731
|
-
});
|
|
3732
|
-
}
|
|
3733
|
-
function getUploadResumeKey(file) {
|
|
3734
|
-
return `${file.name}:${file.size}:${file.lastModified}`;
|
|
3735
|
-
}
|
|
3736
|
-
function createUploadQueueItem(file, id = generateFileId(), chunkSize) {
|
|
3737
|
-
return {
|
|
3738
|
-
id,
|
|
3739
|
-
file,
|
|
3740
|
-
status: "queued",
|
|
3741
|
-
progress: 0,
|
|
3742
|
-
chunks: chunkSize ? createUploadChunks(file, chunkSize) : []
|
|
3743
|
-
};
|
|
3744
|
-
}
|
|
3745
|
-
async function runUploadQueue(items, upload, options = {}) {
|
|
3746
|
-
const concurrency = Math.max(1, Math.floor(options.concurrency ?? 2));
|
|
3747
|
-
let cursor = 0;
|
|
3748
|
-
const notify = () => options.onChange?.([...items]);
|
|
3749
|
-
async function worker() {
|
|
3750
|
-
while (cursor < items.length) {
|
|
3751
|
-
const item = items[cursor];
|
|
3752
|
-
cursor += 1;
|
|
3753
|
-
item.status = "uploading";
|
|
3754
|
-
notify();
|
|
3755
|
-
try {
|
|
3756
|
-
await upload(item);
|
|
3757
|
-
item.status = "success";
|
|
3758
|
-
item.progress = 100;
|
|
3759
|
-
} catch (error) {
|
|
3760
|
-
item.status = "error";
|
|
3761
|
-
item.error = error instanceof Error ? error.message : String(error);
|
|
3762
|
-
}
|
|
3763
|
-
notify();
|
|
3764
|
-
}
|
|
3765
|
-
}
|
|
3766
|
-
await Promise.all(Array.from({ length: Math.min(concurrency, items.length) }, () => worker()));
|
|
3767
|
-
return items;
|
|
3768
|
-
}
|
|
3769
4100
|
function validateFileType(file, accept) {
|
|
3770
4101
|
if (!accept) return true;
|
|
3771
4102
|
const acceptList = accept.split(",").map((item) => item.trim());
|
|
@@ -3788,14 +4119,10 @@ function validateFileSize(file, maxSize) {
|
|
|
3788
4119
|
return file.size <= maxSize;
|
|
3789
4120
|
}
|
|
3790
4121
|
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]}`;
|
|
4122
|
+
return formatBytes(bytes, { precision: 2 });
|
|
3796
4123
|
}
|
|
3797
4124
|
function getUploadButtonClasses(disabled) {
|
|
3798
|
-
const
|
|
4125
|
+
const baseClasses = [
|
|
3799
4126
|
"inline-flex",
|
|
3800
4127
|
"items-center",
|
|
3801
4128
|
"justify-center",
|
|
@@ -3819,10 +4146,10 @@ function getUploadButtonClasses(disabled) {
|
|
|
3819
4146
|
"focus:ring-[var(--tiger-primary,#2563eb)]",
|
|
3820
4147
|
"cursor-pointer"
|
|
3821
4148
|
];
|
|
3822
|
-
return classNames(...
|
|
4149
|
+
return classNames(...baseClasses, ...stateClasses);
|
|
3823
4150
|
}
|
|
3824
4151
|
function getDragAreaClasses(isDragging, disabled) {
|
|
3825
|
-
const
|
|
4152
|
+
const baseClasses = [
|
|
3826
4153
|
"flex",
|
|
3827
4154
|
"flex-col",
|
|
3828
4155
|
"items-center",
|
|
@@ -3861,7 +4188,7 @@ function getDragAreaClasses(isDragging, disabled) {
|
|
|
3861
4188
|
...focusClasses
|
|
3862
4189
|
];
|
|
3863
4190
|
}
|
|
3864
|
-
return classNames(...
|
|
4191
|
+
return classNames(...baseClasses, ...stateClasses);
|
|
3865
4192
|
}
|
|
3866
4193
|
var FILE_LIST_STATUS_CLASSES = {
|
|
3867
4194
|
ready: ["bg-gray-50", "hover:bg-gray-100"],
|
|
@@ -3876,7 +4203,7 @@ var PICTURE_CARD_STATUS_CLASSES = {
|
|
|
3876
4203
|
error: ["border-red-400", "bg-red-50"]
|
|
3877
4204
|
};
|
|
3878
4205
|
function getFileListItemClasses(status) {
|
|
3879
|
-
const
|
|
4206
|
+
const baseClasses = [
|
|
3880
4207
|
"flex",
|
|
3881
4208
|
"items-center",
|
|
3882
4209
|
"justify-between",
|
|
@@ -3887,10 +4214,10 @@ function getFileListItemClasses(status) {
|
|
|
3887
4214
|
"duration-200"
|
|
3888
4215
|
];
|
|
3889
4216
|
const stateClasses = status ? FILE_LIST_STATUS_CLASSES[status] : FILE_LIST_STATUS_CLASSES.ready;
|
|
3890
|
-
return classNames(...
|
|
4217
|
+
return classNames(...baseClasses, ...stateClasses);
|
|
3891
4218
|
}
|
|
3892
4219
|
function getPictureCardClasses(status) {
|
|
3893
|
-
const
|
|
4220
|
+
const baseClasses = [
|
|
3894
4221
|
"relative",
|
|
3895
4222
|
"inline-flex",
|
|
3896
4223
|
"items-center",
|
|
@@ -3904,7 +4231,7 @@ function getPictureCardClasses(status) {
|
|
|
3904
4231
|
"duration-200"
|
|
3905
4232
|
];
|
|
3906
4233
|
const stateClasses = status ? PICTURE_CARD_STATUS_CLASSES[status] : PICTURE_CARD_STATUS_CLASSES.ready;
|
|
3907
|
-
return classNames(...
|
|
4234
|
+
return classNames(...baseClasses, ...stateClasses);
|
|
3908
4235
|
}
|
|
3909
4236
|
|
|
3910
4237
|
// src/utils/grid.ts
|
|
@@ -4323,6 +4650,34 @@ function getTableColgroup(options) {
|
|
|
4323
4650
|
}
|
|
4324
4651
|
return entries;
|
|
4325
4652
|
}
|
|
4653
|
+
function hasTableSelectionColumn(rowSelection) {
|
|
4654
|
+
return !!rowSelection && rowSelection.showCheckbox !== false;
|
|
4655
|
+
}
|
|
4656
|
+
function getTableSelectionState(input) {
|
|
4657
|
+
const selectedSet = new Set(input.selectedRowKeys);
|
|
4658
|
+
const selectableRowKeys = input.rowKeys.filter((key, index) => {
|
|
4659
|
+
const record = input.records[index];
|
|
4660
|
+
return !input.getCheckboxProps?.(record)?.disabled;
|
|
4661
|
+
});
|
|
4662
|
+
const allSelected = selectableRowKeys.length > 0 && selectableRowKeys.every((key) => selectedSet.has(key));
|
|
4663
|
+
const someSelected = selectableRowKeys.some((key) => selectedSet.has(key)) && !allSelected;
|
|
4664
|
+
return { selectableRowKeys, allSelected, someSelected };
|
|
4665
|
+
}
|
|
4666
|
+
function getNextTableSelectAllKeys(selectedRowKeys, selectableRowKeys, checked) {
|
|
4667
|
+
const selectableSet = new Set(selectableRowKeys);
|
|
4668
|
+
if (!checked) {
|
|
4669
|
+
return selectedRowKeys.filter((key) => !selectableSet.has(key));
|
|
4670
|
+
}
|
|
4671
|
+
const next = [...selectedRowKeys];
|
|
4672
|
+
const nextSet = new Set(next);
|
|
4673
|
+
for (const key of selectableRowKeys) {
|
|
4674
|
+
if (!nextSet.has(key)) {
|
|
4675
|
+
next.push(key);
|
|
4676
|
+
nextSet.add(key);
|
|
4677
|
+
}
|
|
4678
|
+
}
|
|
4679
|
+
return next;
|
|
4680
|
+
}
|
|
4326
4681
|
function freezeTableColumnWidths(columns, measuredWidths = {}, previousFrozen = {}) {
|
|
4327
4682
|
const next = {};
|
|
4328
4683
|
for (const column of columns) {
|
|
@@ -4450,18 +4805,15 @@ function getTableFixedHeaderCellClasses(options) {
|
|
|
4450
4805
|
);
|
|
4451
4806
|
}
|
|
4452
4807
|
var TABLE_VIRTUAL_RECOMMENDATION_THRESHOLD = 1e3;
|
|
4453
|
-
var TABLE_AUTO_VIRTUAL_THRESHOLD = 1e4;
|
|
4454
4808
|
function getTableVirtualRecommendation(options) {
|
|
4455
4809
|
const threshold = options.threshold ?? TABLE_VIRTUAL_RECOMMENDATION_THRESHOLD;
|
|
4456
|
-
const
|
|
4457
|
-
const autoEnabled = options.virtual !== true && options.autoVirtual !== false && options.dataLength >= autoThreshold;
|
|
4810
|
+
const autoEnabled = options.virtual !== true && options.autoVirtual !== false && options.dataLength >= threshold;
|
|
4458
4811
|
const enabled = options.virtual === true || autoEnabled;
|
|
4459
4812
|
return {
|
|
4460
4813
|
enabled,
|
|
4461
4814
|
autoEnabled,
|
|
4462
4815
|
recommended: !enabled && options.dataLength >= threshold,
|
|
4463
4816
|
threshold,
|
|
4464
|
-
autoThreshold,
|
|
4465
4817
|
dataLength: options.dataLength
|
|
4466
4818
|
};
|
|
4467
4819
|
}
|
|
@@ -4586,6 +4938,48 @@ function filterData(data, filters) {
|
|
|
4586
4938
|
});
|
|
4587
4939
|
});
|
|
4588
4940
|
}
|
|
4941
|
+
function filterTableData(data, columns, filters) {
|
|
4942
|
+
if (!filters || Object.keys(filters).length === 0) {
|
|
4943
|
+
return data;
|
|
4944
|
+
}
|
|
4945
|
+
const filterFnByKey = /* @__PURE__ */ new Map();
|
|
4946
|
+
for (const column of columns) {
|
|
4947
|
+
if (column.filter?.filterFn) {
|
|
4948
|
+
filterFnByKey.set(column.key, column.filter.filterFn);
|
|
4949
|
+
}
|
|
4950
|
+
}
|
|
4951
|
+
return data.filter((record) => {
|
|
4952
|
+
return Object.entries(filters).every(([key, filterValue]) => {
|
|
4953
|
+
if (filterValue === "" || filterValue === null || filterValue === void 0) {
|
|
4954
|
+
return true;
|
|
4955
|
+
}
|
|
4956
|
+
const cellValue = record[key];
|
|
4957
|
+
const customFn = filterFnByKey.get(key);
|
|
4958
|
+
if (customFn) {
|
|
4959
|
+
return customFn(cellValue, filterValue);
|
|
4960
|
+
}
|
|
4961
|
+
if (typeof filterValue === "string") {
|
|
4962
|
+
return String(cellValue).toLowerCase().includes(filterValue.toLowerCase());
|
|
4963
|
+
}
|
|
4964
|
+
return cellValue === filterValue;
|
|
4965
|
+
});
|
|
4966
|
+
});
|
|
4967
|
+
}
|
|
4968
|
+
function getTableVirtualWindow(scrollTop, viewportHeight, itemHeight, rowCount, overscan = 5) {
|
|
4969
|
+
if (rowCount <= 0 || itemHeight <= 0) {
|
|
4970
|
+
return { startIndex: 0, endIndex: -1, topPad: 0, bottomPad: 0 };
|
|
4971
|
+
}
|
|
4972
|
+
const safeScrollTop = Math.max(0, Number.isFinite(scrollTop) ? scrollTop : 0);
|
|
4973
|
+
const startIndex = Math.max(0, Math.floor(safeScrollTop / itemHeight) - overscan);
|
|
4974
|
+
const visibleCount = Math.ceil(Math.max(0, viewportHeight) / itemHeight) + overscan * 2;
|
|
4975
|
+
const endIndex = Math.min(rowCount - 1, startIndex + visibleCount);
|
|
4976
|
+
return {
|
|
4977
|
+
startIndex,
|
|
4978
|
+
endIndex,
|
|
4979
|
+
topPad: startIndex * itemHeight,
|
|
4980
|
+
bottomPad: Math.max(0, (rowCount - 1 - endIndex) * itemHeight)
|
|
4981
|
+
};
|
|
4982
|
+
}
|
|
4589
4983
|
function paginateData(data, current, pageSize) {
|
|
4590
4984
|
const startIndex = (current - 1) * pageSize;
|
|
4591
4985
|
const endIndex = startIndex + pageSize;
|
|
@@ -4887,6 +5281,94 @@ var listItemTitleClasses = "font-medium text-[var(--tiger-text,#111827)] truncat
|
|
|
4887
5281
|
var listItemDescriptionClasses = "text-sm text-[var(--tiger-text-muted,#6b7280)] mt-1";
|
|
4888
5282
|
var listItemExtraClasses = "flex-shrink-0 ml-4";
|
|
4889
5283
|
var listGridContainerClasses = "grid gap-4";
|
|
5284
|
+
var GRID_COLUMNS = {
|
|
5285
|
+
1: "grid-cols-1",
|
|
5286
|
+
2: "grid-cols-2",
|
|
5287
|
+
3: "grid-cols-3",
|
|
5288
|
+
4: "grid-cols-4",
|
|
5289
|
+
5: "grid-cols-5",
|
|
5290
|
+
6: "grid-cols-6",
|
|
5291
|
+
7: "grid-cols-7",
|
|
5292
|
+
8: "grid-cols-8",
|
|
5293
|
+
9: "grid-cols-9",
|
|
5294
|
+
10: "grid-cols-10",
|
|
5295
|
+
11: "grid-cols-11",
|
|
5296
|
+
12: "grid-cols-12"
|
|
5297
|
+
};
|
|
5298
|
+
var SM_GRID_COLUMNS = {
|
|
5299
|
+
1: "sm:grid-cols-1",
|
|
5300
|
+
2: "sm:grid-cols-2",
|
|
5301
|
+
3: "sm:grid-cols-3",
|
|
5302
|
+
4: "sm:grid-cols-4",
|
|
5303
|
+
5: "sm:grid-cols-5",
|
|
5304
|
+
6: "sm:grid-cols-6",
|
|
5305
|
+
7: "sm:grid-cols-7",
|
|
5306
|
+
8: "sm:grid-cols-8",
|
|
5307
|
+
9: "sm:grid-cols-9",
|
|
5308
|
+
10: "sm:grid-cols-10",
|
|
5309
|
+
11: "sm:grid-cols-11",
|
|
5310
|
+
12: "sm:grid-cols-12"
|
|
5311
|
+
};
|
|
5312
|
+
var MD_GRID_COLUMNS = {
|
|
5313
|
+
1: "md:grid-cols-1",
|
|
5314
|
+
2: "md:grid-cols-2",
|
|
5315
|
+
3: "md:grid-cols-3",
|
|
5316
|
+
4: "md:grid-cols-4",
|
|
5317
|
+
5: "md:grid-cols-5",
|
|
5318
|
+
6: "md:grid-cols-6",
|
|
5319
|
+
7: "md:grid-cols-7",
|
|
5320
|
+
8: "md:grid-cols-8",
|
|
5321
|
+
9: "md:grid-cols-9",
|
|
5322
|
+
10: "md:grid-cols-10",
|
|
5323
|
+
11: "md:grid-cols-11",
|
|
5324
|
+
12: "md:grid-cols-12"
|
|
5325
|
+
};
|
|
5326
|
+
var LG_GRID_COLUMNS = {
|
|
5327
|
+
1: "lg:grid-cols-1",
|
|
5328
|
+
2: "lg:grid-cols-2",
|
|
5329
|
+
3: "lg:grid-cols-3",
|
|
5330
|
+
4: "lg:grid-cols-4",
|
|
5331
|
+
5: "lg:grid-cols-5",
|
|
5332
|
+
6: "lg:grid-cols-6",
|
|
5333
|
+
7: "lg:grid-cols-7",
|
|
5334
|
+
8: "lg:grid-cols-8",
|
|
5335
|
+
9: "lg:grid-cols-9",
|
|
5336
|
+
10: "lg:grid-cols-10",
|
|
5337
|
+
11: "lg:grid-cols-11",
|
|
5338
|
+
12: "lg:grid-cols-12"
|
|
5339
|
+
};
|
|
5340
|
+
var XL_GRID_COLUMNS = {
|
|
5341
|
+
1: "xl:grid-cols-1",
|
|
5342
|
+
2: "xl:grid-cols-2",
|
|
5343
|
+
3: "xl:grid-cols-3",
|
|
5344
|
+
4: "xl:grid-cols-4",
|
|
5345
|
+
5: "xl:grid-cols-5",
|
|
5346
|
+
6: "xl:grid-cols-6",
|
|
5347
|
+
7: "xl:grid-cols-7",
|
|
5348
|
+
8: "xl:grid-cols-8",
|
|
5349
|
+
9: "xl:grid-cols-9",
|
|
5350
|
+
10: "xl:grid-cols-10",
|
|
5351
|
+
11: "xl:grid-cols-11",
|
|
5352
|
+
12: "xl:grid-cols-12"
|
|
5353
|
+
};
|
|
5354
|
+
var XXL_GRID_COLUMNS = {
|
|
5355
|
+
1: "2xl:grid-cols-1",
|
|
5356
|
+
2: "2xl:grid-cols-2",
|
|
5357
|
+
3: "2xl:grid-cols-3",
|
|
5358
|
+
4: "2xl:grid-cols-4",
|
|
5359
|
+
5: "2xl:grid-cols-5",
|
|
5360
|
+
6: "2xl:grid-cols-6",
|
|
5361
|
+
7: "2xl:grid-cols-7",
|
|
5362
|
+
8: "2xl:grid-cols-8",
|
|
5363
|
+
9: "2xl:grid-cols-9",
|
|
5364
|
+
10: "2xl:grid-cols-10",
|
|
5365
|
+
11: "2xl:grid-cols-11",
|
|
5366
|
+
12: "2xl:grid-cols-12"
|
|
5367
|
+
};
|
|
5368
|
+
function getColumnClass(map, value) {
|
|
5369
|
+
if (!value || !Number.isFinite(value)) return void 0;
|
|
5370
|
+
return map[Math.floor(value)];
|
|
5371
|
+
}
|
|
4890
5372
|
function getListClasses(bordered) {
|
|
4891
5373
|
const classes = [listBaseClasses, listBorderClasses[bordered]];
|
|
4892
5374
|
return classes.filter(Boolean).join(" ");
|
|
@@ -4910,27 +5392,18 @@ function getListHeaderFooterClasses(size, isFooter = false) {
|
|
|
4910
5392
|
}
|
|
4911
5393
|
function getGridColumnClasses(column, xs, sm, md, lg, xl, xxl) {
|
|
4912
5394
|
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
|
-
}
|
|
5395
|
+
const baseClass = getColumnClass(GRID_COLUMNS, xs ?? column);
|
|
5396
|
+
if (baseClass) classes.push(baseClass);
|
|
5397
|
+
const smClass = getColumnClass(SM_GRID_COLUMNS, sm);
|
|
5398
|
+
if (smClass) classes.push(smClass);
|
|
5399
|
+
const mdClass = getColumnClass(MD_GRID_COLUMNS, md);
|
|
5400
|
+
if (mdClass) classes.push(mdClass);
|
|
5401
|
+
const lgClass = getColumnClass(LG_GRID_COLUMNS, lg);
|
|
5402
|
+
if (lgClass) classes.push(lgClass);
|
|
5403
|
+
const xlClass = getColumnClass(XL_GRID_COLUMNS, xl);
|
|
5404
|
+
if (xlClass) classes.push(xlClass);
|
|
5405
|
+
const xxlClass = getColumnClass(XXL_GRID_COLUMNS, xxl);
|
|
5406
|
+
if (xxlClass) classes.push(xxlClass);
|
|
4934
5407
|
return classes.join(" ");
|
|
4935
5408
|
}
|
|
4936
5409
|
|
|
@@ -6187,22 +6660,25 @@ function getBreadcrumbCollapsedItems(totalItems, maxItems) {
|
|
|
6187
6660
|
|
|
6188
6661
|
// src/utils/steps-utils.ts
|
|
6189
6662
|
var stepFinishChar = "\u2713";
|
|
6663
|
+
var stepFinishIconViewBox = "0 0 24 24";
|
|
6664
|
+
var stepFinishIconStrokeWidth = "3";
|
|
6665
|
+
var stepFinishIconPathD = "M4.5 12.75l6 6 9-13.5";
|
|
6190
6666
|
function getStepsContainerClasses(direction) {
|
|
6191
|
-
const
|
|
6667
|
+
const baseClasses = "tiger-steps w-full list-none m-0 p-0";
|
|
6192
6668
|
if (direction === "vertical") {
|
|
6193
|
-
return `${
|
|
6669
|
+
return `${baseClasses} flex flex-col`;
|
|
6194
6670
|
}
|
|
6195
|
-
return `${
|
|
6671
|
+
return `${baseClasses} flex flex-row items-start`;
|
|
6196
6672
|
}
|
|
6197
6673
|
function getStepItemClasses(direction, isLast) {
|
|
6198
|
-
const
|
|
6674
|
+
const baseClasses = "tiger-step-item relative group";
|
|
6199
6675
|
if (direction === "vertical") {
|
|
6200
|
-
return `${
|
|
6676
|
+
return `${baseClasses} flex flex-row ${!isLast ? "pb-6" : ""}`;
|
|
6201
6677
|
}
|
|
6202
|
-
return `${
|
|
6678
|
+
return `${baseClasses} flex flex-col flex-1 items-center`;
|
|
6203
6679
|
}
|
|
6204
6680
|
function getStepIconClasses(status, size, simple, isCustomIcon) {
|
|
6205
|
-
const
|
|
6681
|
+
const baseClasses = "tiger-step-icon relative z-10 flex items-center justify-center rounded-full border-2";
|
|
6206
6682
|
const sizeClasses3 = simple ? "w-6 h-6 text-xs" : size === "small" ? "w-8 h-8 text-sm" : "w-10 h-10 text-base";
|
|
6207
6683
|
const iconClasses = isCustomIcon ? "" : "font-medium";
|
|
6208
6684
|
const activeClasses = "bg-[var(--tiger-primary,#2563eb)] border-[var(--tiger-primary,#2563eb)] text-white ring-4 ring-[var(--tiger-primary,#2563eb)]/15 scale-105 shadow-sm transition-all duration-300";
|
|
@@ -6212,7 +6688,7 @@ function getStepIconClasses(status, size, simple, isCustomIcon) {
|
|
|
6212
6688
|
finish: "bg-[var(--tiger-primary,#2563eb)] border-[var(--tiger-primary,#2563eb)] text-white shadow-sm transition-all duration-300 group-hover:scale-105 group-hover:bg-[var(--tiger-primary-hover,#0369a1)]",
|
|
6213
6689
|
error: "bg-[var(--tiger-error-bg,#fef2f2)] border-[var(--tiger-error,#ef4444)] text-[var(--tiger-error,#ef4444)] transition-all duration-300"
|
|
6214
6690
|
};
|
|
6215
|
-
return `${
|
|
6691
|
+
return `${baseClasses} ${sizeClasses3} ${iconClasses} ${statusClasses[status]}`;
|
|
6216
6692
|
}
|
|
6217
6693
|
function getStepTailClasses(direction, status, isLast, size, simple) {
|
|
6218
6694
|
if (isLast) return "hidden";
|
|
@@ -6225,14 +6701,14 @@ function getStepTailClasses(direction, status, isLast, size, simple) {
|
|
|
6225
6701
|
return `tiger-step-tail ${horizontalClasses} ${colorClasses}`;
|
|
6226
6702
|
}
|
|
6227
6703
|
function getStepContentClasses(direction) {
|
|
6228
|
-
const
|
|
6704
|
+
const baseClasses = "tiger-step-content";
|
|
6229
6705
|
if (direction === "vertical") {
|
|
6230
|
-
return `${
|
|
6706
|
+
return `${baseClasses} ml-4 flex-1`;
|
|
6231
6707
|
}
|
|
6232
|
-
return `${
|
|
6708
|
+
return `${baseClasses} mt-2 text-center`;
|
|
6233
6709
|
}
|
|
6234
6710
|
function getStepTitleClasses(status, size, clickable) {
|
|
6235
|
-
const
|
|
6711
|
+
const baseClasses = "tiger-step-title font-medium";
|
|
6236
6712
|
const sizeClasses3 = size === "small" ? "text-sm" : "text-base";
|
|
6237
6713
|
const statusClasses = {
|
|
6238
6714
|
wait: "text-[var(--tiger-text-muted,#6b7280)] transition-colors duration-300 group-hover:text-[var(--tiger-text,#111827)]",
|
|
@@ -6241,13 +6717,13 @@ function getStepTitleClasses(status, size, clickable) {
|
|
|
6241
6717
|
error: "text-[var(--tiger-error,#ef4444)]"
|
|
6242
6718
|
};
|
|
6243
6719
|
const cursorClasses = clickable ? "bg-transparent border-0 p-0 cursor-pointer hover:text-[var(--tiger-primary,#2563eb)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--tiger-primary,#2563eb)] focus-visible:ring-offset-2 focus-visible:ring-offset-[var(--tiger-surface,#ffffff)]" : "";
|
|
6244
|
-
return `${
|
|
6720
|
+
return `${baseClasses} ${sizeClasses3} ${statusClasses[status]} ${cursorClasses}`;
|
|
6245
6721
|
}
|
|
6246
6722
|
function getStepDescriptionClasses(status, size) {
|
|
6247
|
-
const
|
|
6723
|
+
const baseClasses = "tiger-step-description mt-1";
|
|
6248
6724
|
const sizeClasses3 = size === "small" ? "text-xs" : "text-sm";
|
|
6249
6725
|
const statusClass = status === "error" ? "text-[var(--tiger-error,#ef4444)]" : "text-[var(--tiger-text-muted,#6b7280)]";
|
|
6250
|
-
return `${
|
|
6726
|
+
return `${baseClasses} ${sizeClasses3} ${statusClass}`;
|
|
6251
6727
|
}
|
|
6252
6728
|
function calculateStepStatus(index, currentIndex, currentStatus, customStatus) {
|
|
6253
6729
|
if (customStatus) {
|
|
@@ -6601,7 +7077,7 @@ function getDrawerContainerClasses() {
|
|
|
6601
7077
|
return "fixed inset-0 overflow-hidden";
|
|
6602
7078
|
}
|
|
6603
7079
|
function getDrawerPanelClasses(placement, visible, size, fullscreenOnMobile = true) {
|
|
6604
|
-
const
|
|
7080
|
+
const baseClasses = "absolute bg-[var(--tiger-surface,#ffffff)] shadow-xl transition-transform duration-300 ease-in-out pointer-events-auto";
|
|
6605
7081
|
const mobileFullscreenClasses = "max-md:inset-0 max-md:!w-screen max-md:!h-[100dvh]";
|
|
6606
7082
|
const sizeMap2 = {
|
|
6607
7083
|
sm: { width: "w-64", height: "h-48" },
|
|
@@ -6633,7 +7109,7 @@ function getDrawerPanelClasses(placement, visible, size, fullscreenOnMobile = tr
|
|
|
6633
7109
|
)
|
|
6634
7110
|
};
|
|
6635
7111
|
return classNames(
|
|
6636
|
-
|
|
7112
|
+
baseClasses,
|
|
6637
7113
|
placementClasses[placement],
|
|
6638
7114
|
fullscreenOnMobile && mobileFullscreenClasses
|
|
6639
7115
|
);
|
|
@@ -6873,6 +7349,12 @@ var notificationIconClasses = "w-6 h-6 flex-shrink-0 mt-0.5";
|
|
|
6873
7349
|
var notificationTitleClasses = "text-sm font-semibold";
|
|
6874
7350
|
var notificationDescriptionClasses = "text-sm mt-1";
|
|
6875
7351
|
var notificationContentClasses = "flex-1 min-w-0";
|
|
7352
|
+
var notificationActionsClasses = "mt-3 flex flex-wrap items-center gap-2";
|
|
7353
|
+
var notificationActionButtonClasses = "rounded-[var(--tiger-radius-md,0.5rem)] px-2.5 py-1 text-xs font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-[var(--tiger-primary,#2563eb)]/40 disabled:cursor-not-allowed disabled:opacity-50";
|
|
7354
|
+
var notificationActionButtonTypeClasses = {
|
|
7355
|
+
primary: "bg-[var(--tiger-primary,#2563eb)] text-white hover:bg-[var(--tiger-primary-hover,#1d4ed8)] disabled:hover:bg-[var(--tiger-primary,#2563eb)]",
|
|
7356
|
+
default: "border border-[var(--tiger-border,#e5e7eb)] bg-[var(--tiger-surface,#ffffff)] text-[var(--tiger-text,#111827)] hover:bg-[var(--tiger-surface-muted,#f3f4f6)]"
|
|
7357
|
+
};
|
|
6876
7358
|
function requestDefaultNotificationFrame(callback) {
|
|
6877
7359
|
if (globalThis.requestAnimationFrame) {
|
|
6878
7360
|
return globalThis.requestAnimationFrame(callback);
|
|
@@ -6959,17 +7441,17 @@ function getLoadingOverlaySpinnerClasses(customClassName) {
|
|
|
6959
7441
|
function getLoadingClasses(variant, size, color, customColor) {
|
|
6960
7442
|
const sizeClass = loadingSizeClasses[size];
|
|
6961
7443
|
const colorClass = customColor ? "" : loadingColorClasses[color];
|
|
6962
|
-
const
|
|
7444
|
+
const baseClasses = classNames(sizeClass, colorClass);
|
|
6963
7445
|
switch (variant) {
|
|
6964
7446
|
case "dots":
|
|
6965
7447
|
case "bars":
|
|
6966
|
-
return
|
|
7448
|
+
return baseClasses;
|
|
6967
7449
|
case "pulse":
|
|
6968
|
-
return classNames(
|
|
7450
|
+
return classNames(baseClasses, "animate-pulse");
|
|
6969
7451
|
case "spinner":
|
|
6970
7452
|
case "ring":
|
|
6971
7453
|
default:
|
|
6972
|
-
return classNames(
|
|
7454
|
+
return classNames(baseClasses, loadingSpinnerBaseClasses);
|
|
6973
7455
|
}
|
|
6974
7456
|
}
|
|
6975
7457
|
function getSpinnerSVG(variant) {
|
|
@@ -8446,6 +8928,8 @@ function getScatterHoverSize(baseSize) {
|
|
|
8446
8928
|
}
|
|
8447
8929
|
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
8930
|
var SCATTER_ENTRANCE_CLASS = "tiger-scatter-entrance";
|
|
8931
|
+
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}}`;
|
|
8932
|
+
var DONUT_ENTRANCE_CLASS = "tiger-donut-entrance";
|
|
8449
8933
|
|
|
8450
8934
|
// src/utils/chart/scale.ts
|
|
8451
8935
|
var clampNumber = (value, min, max) => Math.min(max, Math.max(min, value));
|
|
@@ -9336,6 +9820,57 @@ function resolveChartTooltipContent(hoveredIndex, data, formatter, defaultFormat
|
|
|
9336
9820
|
function getChartTooltipTransform(position) {
|
|
9337
9821
|
return `translate3d(${position.x}px, ${position.y}px, 0)`;
|
|
9338
9822
|
}
|
|
9823
|
+
function resolveChartTooltipPosition(input) {
|
|
9824
|
+
const offsetX = input.offsetX ?? 12;
|
|
9825
|
+
const offsetY = input.offsetY ?? -8;
|
|
9826
|
+
const padding = input.padding ?? 8;
|
|
9827
|
+
const anchorX = Number.isFinite(input.x) ? input.x : 0;
|
|
9828
|
+
const anchorY = Number.isFinite(input.y) ? input.y : 0;
|
|
9829
|
+
const rectWidth = Number.isFinite(input.rect.width) ? Math.max(0, input.rect.width) : 0;
|
|
9830
|
+
const rectHeight = Number.isFinite(input.rect.height) ? Math.max(0, input.rect.height) : 0;
|
|
9831
|
+
const viewportWidth = Number.isFinite(input.viewport.width) ? Math.max(0, input.viewport.width) : 0;
|
|
9832
|
+
const viewportHeight = Number.isFinite(input.viewport.height) ? Math.max(0, input.viewport.height) : 0;
|
|
9833
|
+
let nextX = anchorX + offsetX;
|
|
9834
|
+
let nextY = anchorY + offsetY;
|
|
9835
|
+
if (nextX + rectWidth > viewportWidth - padding) {
|
|
9836
|
+
nextX = anchorX - rectWidth - offsetX;
|
|
9837
|
+
}
|
|
9838
|
+
if (nextY + rectHeight > viewportHeight - padding) {
|
|
9839
|
+
nextY = anchorY - rectHeight - Math.abs(offsetY);
|
|
9840
|
+
}
|
|
9841
|
+
return {
|
|
9842
|
+
x: Math.max(padding, nextX),
|
|
9843
|
+
y: Math.max(padding, nextY)
|
|
9844
|
+
};
|
|
9845
|
+
}
|
|
9846
|
+
function downsampleSeriesData(data, threshold, getValue = (_item, index) => index) {
|
|
9847
|
+
const safeThreshold = Math.max(0, Math.floor(Number.isFinite(threshold) ? threshold : 0));
|
|
9848
|
+
if (safeThreshold === 0 || data.length <= safeThreshold) {
|
|
9849
|
+
return data.map((item, index) => ({ item, index }));
|
|
9850
|
+
}
|
|
9851
|
+
if (safeThreshold === 1) {
|
|
9852
|
+
return [{ item: data[0], index: 0 }];
|
|
9853
|
+
}
|
|
9854
|
+
const result = [{ item: data[0], index: 0 }];
|
|
9855
|
+
const bucketSize = (data.length - 2) / Math.max(1, safeThreshold - 2);
|
|
9856
|
+
for (let bucket = 0; bucket < safeThreshold - 2; bucket++) {
|
|
9857
|
+
const start = Math.floor(1 + bucket * bucketSize);
|
|
9858
|
+
const end = Math.min(data.length - 1, Math.floor(1 + (bucket + 1) * bucketSize));
|
|
9859
|
+
let selectedIndex = start;
|
|
9860
|
+
let selectedValue = Number.NEGATIVE_INFINITY;
|
|
9861
|
+
for (let index = start; index < end; index++) {
|
|
9862
|
+
const rawValue = getValue(data[index], index);
|
|
9863
|
+
const value = Math.abs(Number.isFinite(rawValue) ? rawValue : 0);
|
|
9864
|
+
if (value > selectedValue) {
|
|
9865
|
+
selectedValue = value;
|
|
9866
|
+
selectedIndex = index;
|
|
9867
|
+
}
|
|
9868
|
+
}
|
|
9869
|
+
result.push({ item: data[selectedIndex], index: selectedIndex });
|
|
9870
|
+
}
|
|
9871
|
+
result.push({ item: data[data.length - 1], index: data.length - 1 });
|
|
9872
|
+
return result;
|
|
9873
|
+
}
|
|
9339
9874
|
function resolveMultiSeriesTooltipContent(hoveredPoint, series, formatter, defaultFormatter) {
|
|
9340
9875
|
if (!hoveredPoint) return "";
|
|
9341
9876
|
const { seriesIndex, pointIndex } = hoveredPoint;
|
|
@@ -9371,19 +9906,25 @@ function defaultRadarTooltipFormatter(datum, seriesIndex, _pointIndex, series) {
|
|
|
9371
9906
|
function computeFunnelSegments(data, opts) {
|
|
9372
9907
|
if (data.length === 0) return [];
|
|
9373
9908
|
const { width, height, gap = 2, pinch = false, colors } = opts;
|
|
9909
|
+
const safeWidth = Number.isFinite(width) ? Math.max(0, width) : 0;
|
|
9910
|
+
const safeHeight = Number.isFinite(height) ? Math.max(0, height) : 0;
|
|
9911
|
+
const safeGap = Number.isFinite(gap) ? Math.max(0, gap) : 0;
|
|
9912
|
+
if (safeWidth <= 0 || safeHeight <= 0) return [];
|
|
9374
9913
|
const palette = colors ?? DEFAULT_CHART_COLORS;
|
|
9375
|
-
const
|
|
9376
|
-
|
|
9377
|
-
|
|
9378
|
-
const
|
|
9379
|
-
const
|
|
9914
|
+
const values = data.map((d) => Number.isFinite(d.value) ? Math.max(0, d.value) : 0);
|
|
9915
|
+
const maxValue = Math.max(...values);
|
|
9916
|
+
if (maxValue <= 0) return [];
|
|
9917
|
+
const totalGap = Math.min(safeHeight, safeGap * (data.length - 1));
|
|
9918
|
+
const segH = Math.max(0, (safeHeight - totalGap) / data.length);
|
|
9919
|
+
const halfW = safeWidth / 2;
|
|
9380
9920
|
return data.map((d, i) => {
|
|
9381
|
-
const
|
|
9382
|
-
const
|
|
9921
|
+
const value = values[i];
|
|
9922
|
+
const topRatio = value / maxValue;
|
|
9923
|
+
const nextVal = i < data.length - 1 ? values[i + 1] : pinch ? 0 : value;
|
|
9383
9924
|
const bottomRatio = nextVal / maxValue;
|
|
9384
|
-
const tw =
|
|
9385
|
-
const bw =
|
|
9386
|
-
const y = i * (segH +
|
|
9925
|
+
const tw = safeWidth * topRatio;
|
|
9926
|
+
const bw = safeWidth * bottomRatio;
|
|
9927
|
+
const y = i * (segH + safeGap);
|
|
9387
9928
|
const cx = halfW;
|
|
9388
9929
|
const cy = y + segH / 2;
|
|
9389
9930
|
const x1 = cx - tw / 2;
|
|
@@ -9394,7 +9935,7 @@ function computeFunnelSegments(data, opts) {
|
|
|
9394
9935
|
return {
|
|
9395
9936
|
index: i,
|
|
9396
9937
|
label: d.label ?? `Stage ${i + 1}`,
|
|
9397
|
-
value
|
|
9938
|
+
value,
|
|
9398
9939
|
color: d.color ?? palette[i % palette.length],
|
|
9399
9940
|
path,
|
|
9400
9941
|
cx,
|
|
@@ -9449,9 +9990,13 @@ function createGaugeAnimation(options) {
|
|
|
9449
9990
|
function degToRad(deg) {
|
|
9450
9991
|
return deg * Math.PI / 180;
|
|
9451
9992
|
}
|
|
9993
|
+
function safeNumber(value, fallback = 0) {
|
|
9994
|
+
return Number.isFinite(value) ? value : fallback;
|
|
9995
|
+
}
|
|
9452
9996
|
function createGaugeArcPath(cx, cy, radius, startDeg, endDeg, arcWidth) {
|
|
9453
|
-
const outerR = radius;
|
|
9454
|
-
const
|
|
9997
|
+
const outerR = Math.max(0, safeNumber(radius));
|
|
9998
|
+
const safeArcWidth = Math.max(0, safeNumber(arcWidth));
|
|
9999
|
+
const innerR = Math.max(0, outerR - safeArcWidth);
|
|
9455
10000
|
const startRad = degToRad(startDeg - 90);
|
|
9456
10001
|
const endRad = degToRad(endDeg - 90);
|
|
9457
10002
|
const outerStart = {
|
|
@@ -9481,8 +10026,9 @@ function createGaugeArcPath(cx, cy, radius, startDeg, endDeg, arcWidth) {
|
|
|
9481
10026
|
}
|
|
9482
10027
|
function createGaugeNeedlePath(cx, cy, length, angleDeg, needleWidth = 4) {
|
|
9483
10028
|
const rad = degToRad(angleDeg - 90);
|
|
9484
|
-
const
|
|
9485
|
-
const
|
|
10029
|
+
const safeLength = Math.max(0, safeNumber(length));
|
|
10030
|
+
const tipX = cx + safeLength * Math.cos(rad);
|
|
10031
|
+
const tipY = cy + safeLength * Math.sin(rad);
|
|
9486
10032
|
const perpRad = rad + Math.PI / 2;
|
|
9487
10033
|
const halfW = needleWidth / 2;
|
|
9488
10034
|
const bx1 = cx + halfW * Math.cos(perpRad);
|
|
@@ -9492,20 +10038,32 @@ function createGaugeNeedlePath(cx, cy, length, angleDeg, needleWidth = 4) {
|
|
|
9492
10038
|
return `M${bx1},${by1} L${tipX},${tipY} L${bx2},${by2} Z`;
|
|
9493
10039
|
}
|
|
9494
10040
|
function valueToGaugeAngle(value, min, max, startAngle, endAngle) {
|
|
9495
|
-
const
|
|
9496
|
-
|
|
10041
|
+
const safeStart = safeNumber(startAngle);
|
|
10042
|
+
const safeEnd = safeNumber(endAngle, safeStart);
|
|
10043
|
+
const safeMin = safeNumber(min);
|
|
10044
|
+
const safeMax = safeNumber(max, safeMin);
|
|
10045
|
+
if (safeMax <= safeMin) return safeStart;
|
|
10046
|
+
const ratio = Math.max(0, Math.min(1, (safeNumber(value, safeMin) - safeMin) / (safeMax - safeMin)));
|
|
10047
|
+
return safeStart + ratio * (safeEnd - safeStart);
|
|
9497
10048
|
}
|
|
9498
10049
|
function computeGaugeTicks(cx, cy, radius, min, max, startAngle, endAngle, tickCount) {
|
|
9499
10050
|
const ticks = [];
|
|
9500
|
-
|
|
9501
|
-
|
|
9502
|
-
|
|
9503
|
-
|
|
10051
|
+
const safeTickCount = Math.max(1, Math.floor(safeNumber(tickCount, 1)));
|
|
10052
|
+
const safeRadius = Math.max(0, safeNumber(radius));
|
|
10053
|
+
const safeMin = safeNumber(min);
|
|
10054
|
+
const safeMax = safeNumber(max, safeMin);
|
|
10055
|
+
const safeStart = safeNumber(startAngle);
|
|
10056
|
+
const safeEnd = safeNumber(endAngle, safeStart);
|
|
10057
|
+
for (let i = 0; i <= safeTickCount; i++) {
|
|
10058
|
+
const ratio = i / safeTickCount;
|
|
10059
|
+
const val = safeMax <= safeMin ? safeMin : safeMin + ratio * (safeMax - safeMin);
|
|
10060
|
+
const angle = safeStart + ratio * (safeEnd - safeStart);
|
|
9504
10061
|
const rad = degToRad(angle - 90);
|
|
9505
|
-
const
|
|
9506
|
-
const
|
|
9507
|
-
const
|
|
9508
|
-
const
|
|
10062
|
+
const innerRadius = Math.max(0, safeRadius - 8);
|
|
10063
|
+
const outerX = cx + safeRadius * Math.cos(rad);
|
|
10064
|
+
const outerY = cy + safeRadius * Math.sin(rad);
|
|
10065
|
+
const innerX = cx + innerRadius * Math.cos(rad);
|
|
10066
|
+
const innerY = cy + innerRadius * Math.sin(rad);
|
|
9509
10067
|
ticks.push({
|
|
9510
10068
|
x1: innerX,
|
|
9511
10069
|
y1: innerY,
|
|
@@ -9544,9 +10102,14 @@ function getHeatmapCellIndexAtPoint(cells, x, y) {
|
|
|
9544
10102
|
return index >= 0 ? index : null;
|
|
9545
10103
|
}
|
|
9546
10104
|
function interpolateColor(minColor, maxColor, t) {
|
|
10105
|
+
const clamped = Number.isFinite(t) ? Math.max(0, Math.min(1, t)) : 0;
|
|
9547
10106
|
const [r1, g1, b1] = hexToRgb(minColor);
|
|
9548
10107
|
const [r2, g2, b2] = hexToRgb(maxColor);
|
|
9549
|
-
return rgbToHex(
|
|
10108
|
+
return rgbToHex(
|
|
10109
|
+
r1 + (r2 - r1) * clamped,
|
|
10110
|
+
g1 + (g2 - g1) * clamped,
|
|
10111
|
+
b1 + (b2 - b1) * clamped
|
|
10112
|
+
);
|
|
9550
10113
|
}
|
|
9551
10114
|
function interpolateColorOklch(minColor, maxColor, t) {
|
|
9552
10115
|
const clamped = Math.max(0, Math.min(1, t));
|
|
@@ -9566,30 +10129,36 @@ function computeHeatmapCells(data, opts) {
|
|
|
9566
10129
|
} = opts;
|
|
9567
10130
|
const cols = xLabels.length;
|
|
9568
10131
|
const rows = yLabels.length;
|
|
9569
|
-
|
|
9570
|
-
const
|
|
9571
|
-
const
|
|
10132
|
+
const safeWidth = Number.isFinite(width) ? Math.max(0, width) : 0;
|
|
10133
|
+
const safeHeight = Number.isFinite(height) ? Math.max(0, height) : 0;
|
|
10134
|
+
const safeCellGap = Number.isFinite(cellGap) ? Math.max(0, cellGap) : 0;
|
|
10135
|
+
if (cols === 0 || rows === 0 || safeWidth <= 0 || safeHeight <= 0) return [];
|
|
10136
|
+
const totalGapX = Math.min(safeWidth, safeCellGap * (cols - 1));
|
|
10137
|
+
const totalGapY = Math.min(safeHeight, safeCellGap * (rows - 1));
|
|
10138
|
+
const cellW = Math.max(0, (safeWidth - totalGapX) / cols);
|
|
10139
|
+
const cellH = Math.max(0, (safeHeight - totalGapY) / rows);
|
|
9572
10140
|
const valMap = /* @__PURE__ */ new Map();
|
|
9573
10141
|
for (const d of data) {
|
|
9574
|
-
valMap.set(`${d.x}|${d.y}`, d.value);
|
|
10142
|
+
valMap.set(`${d.x}|${d.y}`, Number.isFinite(d.value) ? d.value : 0);
|
|
9575
10143
|
}
|
|
9576
|
-
|
|
9577
|
-
let
|
|
9578
|
-
|
|
9579
|
-
|
|
9580
|
-
|
|
10144
|
+
const finiteValues = Array.from(valMap.values());
|
|
10145
|
+
let minVal = 0;
|
|
10146
|
+
let maxVal = 0;
|
|
10147
|
+
if (finiteValues.length > 0) {
|
|
10148
|
+
minVal = Math.min(...finiteValues, 0);
|
|
10149
|
+
maxVal = Math.max(...finiteValues, 0);
|
|
9581
10150
|
}
|
|
9582
10151
|
if (minVal === maxVal) maxVal = minVal + 1;
|
|
9583
10152
|
const cells = [];
|
|
9584
10153
|
for (let r = 0; r < rows; r++) {
|
|
9585
10154
|
for (let c = 0; c < cols; c++) {
|
|
9586
10155
|
const val = valMap.get(`${xLabels[c]}|${yLabels[r]}`) ?? 0;
|
|
9587
|
-
const heat = (val - minVal) / (maxVal - minVal);
|
|
10156
|
+
const heat = Math.max(0, Math.min(1, (val - minVal) / (maxVal - minVal)));
|
|
9588
10157
|
cells.push({
|
|
9589
10158
|
row: r,
|
|
9590
10159
|
col: c,
|
|
9591
|
-
x: c * (cellW +
|
|
9592
|
-
y: r * (cellH +
|
|
10160
|
+
x: c * (cellW + safeCellGap),
|
|
10161
|
+
y: r * (cellH + safeCellGap),
|
|
9593
10162
|
w: cellW,
|
|
9594
10163
|
h: cellH,
|
|
9595
10164
|
heat,
|
|
@@ -9604,66 +10173,35 @@ function computeHeatmapCells(data, opts) {
|
|
|
9604
10173
|
}
|
|
9605
10174
|
|
|
9606
10175
|
// src/utils/treemap-chart-utils.ts
|
|
9607
|
-
var flattenCache = /* @__PURE__ */ new WeakMap();
|
|
9608
10176
|
function flattenData(data, depth = 0) {
|
|
9609
|
-
if (depth === 0) {
|
|
9610
|
-
const cached = flattenCache.get(data);
|
|
9611
|
-
if (cached) return cached;
|
|
9612
|
-
}
|
|
9613
10177
|
const result = [];
|
|
9614
10178
|
for (const d of data) {
|
|
9615
10179
|
if (d.children && d.children.length > 0) {
|
|
9616
10180
|
result.push(...flattenData(d.children, depth + 1));
|
|
9617
10181
|
} else {
|
|
9618
|
-
result.push({
|
|
10182
|
+
result.push({
|
|
10183
|
+
label: d.label,
|
|
10184
|
+
value: Number.isFinite(d.value) ? Math.max(0, d.value) : 0,
|
|
10185
|
+
depth,
|
|
10186
|
+
color: d.color
|
|
10187
|
+
});
|
|
9619
10188
|
}
|
|
9620
10189
|
}
|
|
9621
|
-
if (depth === 0) {
|
|
9622
|
-
flattenCache.set(data, result);
|
|
9623
|
-
}
|
|
9624
10190
|
return result;
|
|
9625
10191
|
}
|
|
9626
|
-
var _tmLastData = null;
|
|
9627
|
-
var _tmLastW = 0;
|
|
9628
|
-
var _tmLastH = 0;
|
|
9629
|
-
var _tmLastGap = 0;
|
|
9630
|
-
var _tmLastColors = null;
|
|
9631
|
-
var _tmLastResult = [];
|
|
9632
10192
|
function computeTreeMapNodes(data, opts) {
|
|
9633
10193
|
const { width, height, gap = 2, colors } = opts;
|
|
10194
|
+
const safeWidth = Number.isFinite(width) ? Math.max(0, width) : 0;
|
|
10195
|
+
const safeHeight = Number.isFinite(height) ? Math.max(0, height) : 0;
|
|
10196
|
+
const safeGap = Number.isFinite(gap) ? Math.max(0, gap) : 0;
|
|
9634
10197
|
const palette = colors ?? DEFAULT_CHART_COLORS;
|
|
9635
|
-
if (data === _tmLastData && width === _tmLastW && height === _tmLastH && gap === _tmLastGap && palette === _tmLastColors) {
|
|
9636
|
-
return _tmLastResult;
|
|
9637
|
-
}
|
|
9638
10198
|
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
|
-
}
|
|
10199
|
+
if (flat.length === 0 || safeWidth <= 0 || safeHeight <= 0) return [];
|
|
9648
10200
|
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
|
-
}
|
|
10201
|
+
if (totalValue <= 0) return [];
|
|
9658
10202
|
const sorted = flat.map((d, i) => ({ ...d, originalIndex: i })).sort((a, b) => b.value - a.value);
|
|
9659
10203
|
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;
|
|
10204
|
+
layoutRect(sorted, 0, 0, safeWidth, safeHeight, safeGap, palette, nodes);
|
|
9667
10205
|
return nodes;
|
|
9668
10206
|
}
|
|
9669
10207
|
function layoutRect(items, x, y, w, h, gap, palette, out) {
|
|
@@ -9710,41 +10248,22 @@ function layoutRect(items, x, y, w, h, gap, palette, out) {
|
|
|
9710
10248
|
}
|
|
9711
10249
|
|
|
9712
10250
|
// src/utils/sunburst-chart-utils.ts
|
|
9713
|
-
var sumCache = /* @__PURE__ */ new WeakMap();
|
|
9714
10251
|
function sumValue(d) {
|
|
9715
|
-
const cached = sumCache.get(d);
|
|
9716
|
-
if (cached !== void 0) return cached;
|
|
9717
10252
|
let v;
|
|
9718
10253
|
if (d.children && d.children.length > 0) {
|
|
9719
10254
|
v = d.children.reduce((s, c) => s + sumValue(c), 0);
|
|
9720
10255
|
} else {
|
|
9721
10256
|
v = d.value;
|
|
9722
10257
|
}
|
|
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
|
-
}
|
|
10258
|
+
return Number.isFinite(v) ? Math.max(0, v) : 0;
|
|
9733
10259
|
}
|
|
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
10260
|
function computeSunburstArcs(data, opts) {
|
|
9742
|
-
const {
|
|
10261
|
+
const { innerRadius, outerRadius, colors } = opts;
|
|
10262
|
+
const cx = Number.isFinite(opts.cx) ? opts.cx : 0;
|
|
10263
|
+
const cy = Number.isFinite(opts.cy) ? opts.cy : 0;
|
|
10264
|
+
const safeInnerRadius = Number.isFinite(innerRadius) ? Math.max(0, innerRadius) : 0;
|
|
10265
|
+
const safeOuterRadius = Number.isFinite(outerRadius) ? Math.max(safeInnerRadius, outerRadius) : safeInnerRadius;
|
|
9743
10266
|
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
10267
|
function maxDepth(items, d) {
|
|
9749
10268
|
let m = d;
|
|
9750
10269
|
for (const item of items) {
|
|
@@ -9755,7 +10274,7 @@ function computeSunburstArcs(data, opts) {
|
|
|
9755
10274
|
return m;
|
|
9756
10275
|
}
|
|
9757
10276
|
const depth = maxDepth(data, 0);
|
|
9758
|
-
const ringWidth = depth > 0 ? (
|
|
10277
|
+
const ringWidth = depth > 0 ? (safeOuterRadius - safeInnerRadius) / (depth + 1) : safeOuterRadius - safeInnerRadius;
|
|
9759
10278
|
const arcs = [];
|
|
9760
10279
|
let flatIndex = 0;
|
|
9761
10280
|
function layoutLevel(items, startAngle, endAngle, level, parentColorIdx) {
|
|
@@ -9767,8 +10286,8 @@ function computeSunburstArcs(data, opts) {
|
|
|
9767
10286
|
const sweep = (endAngle - startAngle) * val / total;
|
|
9768
10287
|
const sa = angle;
|
|
9769
10288
|
const ea = angle + sweep;
|
|
9770
|
-
const iR =
|
|
9771
|
-
const oR = iR + ringWidth - 1;
|
|
10289
|
+
const iR = safeInnerRadius + level * ringWidth;
|
|
10290
|
+
const oR = Math.max(iR, iR + ringWidth - 1);
|
|
9772
10291
|
const colorIdx = level === 0 ? i : parentColorIdx;
|
|
9773
10292
|
const color = item.color ?? palette[colorIdx % palette.length];
|
|
9774
10293
|
const path = createPieArcPath({
|
|
@@ -9782,7 +10301,7 @@ function computeSunburstArcs(data, opts) {
|
|
|
9782
10301
|
arcs.push({
|
|
9783
10302
|
index: flatIndex++,
|
|
9784
10303
|
label: item.label,
|
|
9785
|
-
value:
|
|
10304
|
+
value: val,
|
|
9786
10305
|
depth: level,
|
|
9787
10306
|
startAngle: sa,
|
|
9788
10307
|
endAngle: ea,
|
|
@@ -9797,13 +10316,6 @@ function computeSunburstArcs(data, opts) {
|
|
|
9797
10316
|
});
|
|
9798
10317
|
}
|
|
9799
10318
|
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
10319
|
return arcs;
|
|
9808
10320
|
}
|
|
9809
10321
|
|
|
@@ -9866,13 +10378,9 @@ var resultIconPaths = {
|
|
|
9866
10378
|
function getResultIconPath(status) {
|
|
9867
10379
|
return resultIconPaths[status];
|
|
9868
10380
|
}
|
|
9869
|
-
var
|
|
9870
|
-
|
|
9871
|
-
|
|
9872
|
-
"500": "500"
|
|
9873
|
-
};
|
|
9874
|
-
function getResultHttpLabel(status) {
|
|
9875
|
-
return httpStatusLabels[status];
|
|
10381
|
+
var HTTP_RESULT_STATUSES = /* @__PURE__ */ new Set(["404", "403", "500"]);
|
|
10382
|
+
function isHttpResultStatus(status) {
|
|
10383
|
+
return HTTP_RESULT_STATUSES.has(status);
|
|
9876
10384
|
}
|
|
9877
10385
|
|
|
9878
10386
|
// src/utils/empty-utils.ts
|
|
@@ -9887,8 +10395,19 @@ var presetDescriptions = {
|
|
|
9887
10395
|
"no-results": "No results found",
|
|
9888
10396
|
error: "Something went wrong"
|
|
9889
10397
|
};
|
|
9890
|
-
function getEmptyDescription(preset) {
|
|
9891
|
-
|
|
10398
|
+
function getEmptyDescription(preset, locale) {
|
|
10399
|
+
switch (preset) {
|
|
10400
|
+
case "no-data":
|
|
10401
|
+
return locale?.empty?.noDataAvailable ?? presetDescriptions[preset];
|
|
10402
|
+
case "no-results":
|
|
10403
|
+
return locale?.empty?.noResults ?? presetDescriptions[preset];
|
|
10404
|
+
case "error":
|
|
10405
|
+
return locale?.empty?.error ?? presetDescriptions[preset];
|
|
10406
|
+
case "default":
|
|
10407
|
+
case "simple":
|
|
10408
|
+
default:
|
|
10409
|
+
return locale?.empty?.noData ?? locale?.common?.emptyText ?? presetDescriptions[preset];
|
|
10410
|
+
}
|
|
9892
10411
|
}
|
|
9893
10412
|
var emptyIllustrationViewBox = "0 0 64 41";
|
|
9894
10413
|
var emptyIllustrationPaths = [
|
|
@@ -10656,6 +11175,18 @@ var defaultChatMessageStatusInfo = {
|
|
|
10656
11175
|
function getChatMessageStatusInfo(status, statusMap = defaultChatMessageStatusInfo) {
|
|
10657
11176
|
return statusMap[status] || defaultChatMessageStatusInfo[status];
|
|
10658
11177
|
}
|
|
11178
|
+
var chatStatusBarBaseClasses = "px-5 py-2 border-t border-[var(--tiger-border,#e5e7eb)] text-xs italic bg-[var(--tiger-surface-muted,#f9fafb)]";
|
|
11179
|
+
var chatStatusBarVariantText = {
|
|
11180
|
+
default: "text-[var(--tiger-text-muted,#6b7280)]",
|
|
11181
|
+
primary: "text-[var(--tiger-primary,#2563eb)]",
|
|
11182
|
+
success: "text-[var(--tiger-success,#22c55e)]",
|
|
11183
|
+
warning: "text-[var(--tiger-warning,#f59e0b)]",
|
|
11184
|
+
danger: "text-[var(--tiger-danger,#ef4444)]",
|
|
11185
|
+
info: "text-[var(--tiger-info,#3b82f6)]"
|
|
11186
|
+
};
|
|
11187
|
+
function getChatStatusBarClasses(variant = "info") {
|
|
11188
|
+
return `${chatStatusBarBaseClasses} ${chatStatusBarVariantText[variant] ?? chatStatusBarVariantText.info}`;
|
|
11189
|
+
}
|
|
10659
11190
|
|
|
10660
11191
|
// src/utils/activity-feed-utils.ts
|
|
10661
11192
|
var activityItemClasses = "tiger-activity-item";
|
|
@@ -11385,13 +11916,14 @@ function isCascaderOptionExpandable(option) {
|
|
|
11385
11916
|
if (option.isLeaf) return false;
|
|
11386
11917
|
return !!(option.children && option.children.length > 0);
|
|
11387
11918
|
}
|
|
11388
|
-
function flattenCascaderOptions(options, parentPath = [], parentValuePath = []) {
|
|
11919
|
+
function flattenCascaderOptions(options, parentPath = [], parentValuePath = [], changeOnSelect = false) {
|
|
11389
11920
|
const result = [];
|
|
11390
11921
|
for (const option of options) {
|
|
11391
11922
|
const currentPath = [...parentPath, option];
|
|
11392
11923
|
const currentValuePath = [...parentValuePath, option.value];
|
|
11393
11924
|
const isDisabled = currentPath.some((o) => o.disabled);
|
|
11394
|
-
|
|
11925
|
+
const isLeaf = !option.children || option.children.length === 0 || !!option.isLeaf;
|
|
11926
|
+
if (isLeaf || changeOnSelect) {
|
|
11395
11927
|
result.push({
|
|
11396
11928
|
path: currentPath,
|
|
11397
11929
|
valuePath: currentValuePath,
|
|
@@ -11400,7 +11932,9 @@ function flattenCascaderOptions(options, parentPath = [], parentValuePath = [])
|
|
|
11400
11932
|
});
|
|
11401
11933
|
}
|
|
11402
11934
|
if (option.children && option.children.length > 0) {
|
|
11403
|
-
result.push(
|
|
11935
|
+
result.push(
|
|
11936
|
+
...flattenCascaderOptions(option.children, currentPath, currentValuePath, changeOnSelect)
|
|
11937
|
+
);
|
|
11404
11938
|
}
|
|
11405
11939
|
}
|
|
11406
11940
|
return result;
|
|
@@ -11409,10 +11943,10 @@ function defaultCascaderFilter(inputValue, path) {
|
|
|
11409
11943
|
const searchLower = inputValue.toLowerCase();
|
|
11410
11944
|
return path.some((option) => option.label.toLowerCase().includes(searchLower));
|
|
11411
11945
|
}
|
|
11412
|
-
function filterCascaderOptions(flattenedOptions, inputValue,
|
|
11946
|
+
function filterCascaderOptions(flattenedOptions, inputValue, searchable) {
|
|
11413
11947
|
if (!inputValue) return flattenedOptions;
|
|
11414
|
-
const filterFn = typeof
|
|
11415
|
-
const limit = typeof
|
|
11948
|
+
const filterFn = typeof searchable === "object" && searchable.filter ? searchable.filter : defaultCascaderFilter;
|
|
11949
|
+
const limit = typeof searchable === "object" && searchable.limit ? searchable.limit : 50;
|
|
11416
11950
|
const filtered = flattenedOptions.filter((item) => filterFn(inputValue, item.path));
|
|
11417
11951
|
return filtered.slice(0, limit);
|
|
11418
11952
|
}
|
|
@@ -12072,6 +12606,19 @@ function splitTransferData(dataSource, targetKeys) {
|
|
|
12072
12606
|
}
|
|
12073
12607
|
return { sourceItems, targetItems };
|
|
12074
12608
|
}
|
|
12609
|
+
function moveTransferItems(direction, targetKeys, selectedKeys, dataSource) {
|
|
12610
|
+
const disabledKeys = /* @__PURE__ */ new Set();
|
|
12611
|
+
for (const item of dataSource) {
|
|
12612
|
+
if (item.disabled) disabledKeys.add(item.key);
|
|
12613
|
+
}
|
|
12614
|
+
const dataKeys = new Set(dataSource.map((item) => item.key));
|
|
12615
|
+
const movedKeys = [...selectedKeys].filter((key) => dataKeys.has(key) && !disabledKeys.has(key));
|
|
12616
|
+
if (direction === "right") {
|
|
12617
|
+
return { targetKeys: [...targetKeys, ...movedKeys], movedKeys };
|
|
12618
|
+
}
|
|
12619
|
+
const movedSet = new Set(movedKeys);
|
|
12620
|
+
return { targetKeys: targetKeys.filter((key) => !movedSet.has(key)), movedKeys };
|
|
12621
|
+
}
|
|
12075
12622
|
function filterTransferItems(items, query, filterFn) {
|
|
12076
12623
|
if (!query) return items;
|
|
12077
12624
|
const fn = filterFn ?? defaultTransferFilter;
|
|
@@ -12703,9 +13250,14 @@ var minusPathD = "M5 10a1 1 0 011-1h8a1 1 0 110 2H6a1 1 0 01-1-1z";
|
|
|
12703
13250
|
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
13251
|
var stepperIconViewBox = "0 0 20 20";
|
|
12705
13252
|
function clampStepperValue(value, min, max, precision) {
|
|
12706
|
-
|
|
12707
|
-
|
|
12708
|
-
|
|
13253
|
+
const safeMin = Number.isFinite(min) || min === Number.NEGATIVE_INFINITY ? min : 0;
|
|
13254
|
+
const safeMax = Number.isFinite(max) || max === Number.POSITIVE_INFINITY ? max : safeMin;
|
|
13255
|
+
const lower = Math.min(safeMin, safeMax);
|
|
13256
|
+
const upper = Math.max(safeMin, safeMax);
|
|
13257
|
+
const fallback = Number.isFinite(lower) ? lower : 0;
|
|
13258
|
+
let v = Math.max(lower, Math.min(upper, Number.isFinite(value) ? value : fallback));
|
|
13259
|
+
if (precision !== void 0 && Number.isFinite(precision) && precision >= 0) {
|
|
13260
|
+
v = Number(v.toFixed(Math.floor(precision)));
|
|
12709
13261
|
}
|
|
12710
13262
|
return v;
|
|
12711
13263
|
}
|
|
@@ -13340,6 +13892,60 @@ function canRedo(history) {
|
|
|
13340
13892
|
return history.future.length > 0;
|
|
13341
13893
|
}
|
|
13342
13894
|
|
|
13895
|
+
// src/utils/upload-queue-utils.ts
|
|
13896
|
+
var DEFAULT_UPLOAD_CHUNK_SIZE = 1024 * 1024;
|
|
13897
|
+
function createUploadChunks(file, chunkSize = DEFAULT_UPLOAD_CHUNK_SIZE) {
|
|
13898
|
+
const safeChunkSize = Math.max(1, Math.floor(chunkSize));
|
|
13899
|
+
const total = Math.max(1, Math.ceil(file.size / safeChunkSize));
|
|
13900
|
+
return Array.from({ length: total }, (_, index) => {
|
|
13901
|
+
const start = index * safeChunkSize;
|
|
13902
|
+
const end = Math.min(file.size, start + safeChunkSize);
|
|
13903
|
+
return {
|
|
13904
|
+
index,
|
|
13905
|
+
start,
|
|
13906
|
+
end,
|
|
13907
|
+
size: end - start,
|
|
13908
|
+
blob: file.slice(start, end)
|
|
13909
|
+
};
|
|
13910
|
+
});
|
|
13911
|
+
}
|
|
13912
|
+
function getUploadResumeKey(file) {
|
|
13913
|
+
return `${file.name}:${file.size}:${file.lastModified}`;
|
|
13914
|
+
}
|
|
13915
|
+
function createUploadQueueItem(file, id = generateFileId(), chunkSize) {
|
|
13916
|
+
return {
|
|
13917
|
+
id,
|
|
13918
|
+
file,
|
|
13919
|
+
status: "queued",
|
|
13920
|
+
progress: 0,
|
|
13921
|
+
chunks: chunkSize ? createUploadChunks(file, chunkSize) : []
|
|
13922
|
+
};
|
|
13923
|
+
}
|
|
13924
|
+
async function runUploadQueue(items, upload, options = {}) {
|
|
13925
|
+
const concurrency = Math.max(1, Math.floor(options.concurrency ?? 2));
|
|
13926
|
+
let cursor = 0;
|
|
13927
|
+
const notify = () => options.onChange?.([...items]);
|
|
13928
|
+
async function worker() {
|
|
13929
|
+
while (cursor < items.length) {
|
|
13930
|
+
const item = items[cursor];
|
|
13931
|
+
cursor += 1;
|
|
13932
|
+
item.status = "uploading";
|
|
13933
|
+
notify();
|
|
13934
|
+
try {
|
|
13935
|
+
await upload(item);
|
|
13936
|
+
item.status = "success";
|
|
13937
|
+
item.progress = 100;
|
|
13938
|
+
} catch (error) {
|
|
13939
|
+
item.status = "error";
|
|
13940
|
+
item.error = error instanceof Error ? error.message : String(error);
|
|
13941
|
+
}
|
|
13942
|
+
notify();
|
|
13943
|
+
}
|
|
13944
|
+
}
|
|
13945
|
+
await Promise.all(Array.from({ length: Math.min(concurrency, items.length) }, () => worker()));
|
|
13946
|
+
return items;
|
|
13947
|
+
}
|
|
13948
|
+
|
|
13343
13949
|
// src/utils/responsive.ts
|
|
13344
13950
|
var BREAKPOINT_MIN_WIDTHS = [
|
|
13345
13951
|
["xxxl", 1920],
|
|
@@ -13389,6 +13995,45 @@ function isTablet(options = {}) {
|
|
|
13389
13995
|
return width !== void 0 && width >= TIGER_VIEWPORT_BREAKPOINTS.md && width < TIGER_VIEWPORT_BREAKPOINTS.lg;
|
|
13390
13996
|
}
|
|
13391
13997
|
|
|
13998
|
+
// src/utils/viewport-floating-utils.ts
|
|
13999
|
+
var viewportFloatingBaseClasses = "fixed z-50";
|
|
14000
|
+
var viewportPlacementClasses = {
|
|
14001
|
+
"top-left": "top-0 left-0",
|
|
14002
|
+
"top-right": "top-0 right-0",
|
|
14003
|
+
"bottom-left": "bottom-0 left-0",
|
|
14004
|
+
"bottom-right": "bottom-0 right-0"
|
|
14005
|
+
};
|
|
14006
|
+
function toCssLength(value) {
|
|
14007
|
+
return typeof value === "number" ? `${value}px` : value;
|
|
14008
|
+
}
|
|
14009
|
+
function resolveAxisOffset(offset2) {
|
|
14010
|
+
if (offset2 === void 0) {
|
|
14011
|
+
return { x: 24, y: 24 };
|
|
14012
|
+
}
|
|
14013
|
+
if (typeof offset2 === "number" || typeof offset2 === "string") {
|
|
14014
|
+
return { x: offset2, y: offset2 };
|
|
14015
|
+
}
|
|
14016
|
+
return {
|
|
14017
|
+
x: offset2.x ?? 24,
|
|
14018
|
+
y: offset2.y ?? 24
|
|
14019
|
+
};
|
|
14020
|
+
}
|
|
14021
|
+
function getViewportOffsetStyle(placement, offset2) {
|
|
14022
|
+
const { x, y } = resolveAxisOffset(offset2);
|
|
14023
|
+
const style = {};
|
|
14024
|
+
if (placement.startsWith("top")) {
|
|
14025
|
+
style.top = toCssLength(y);
|
|
14026
|
+
} else {
|
|
14027
|
+
style.bottom = toCssLength(y);
|
|
14028
|
+
}
|
|
14029
|
+
if (placement.endsWith("left")) {
|
|
14030
|
+
style.left = toCssLength(x);
|
|
14031
|
+
} else {
|
|
14032
|
+
style.right = toCssLength(x);
|
|
14033
|
+
}
|
|
14034
|
+
return style;
|
|
14035
|
+
}
|
|
14036
|
+
|
|
13392
14037
|
// src/utils/drag.ts
|
|
13393
14038
|
function createDragState() {
|
|
13394
14039
|
return {
|
|
@@ -13743,6 +14388,26 @@ function calculateResizeDelta(handle, mouseDeltaX, mouseDeltaY, axis) {
|
|
|
13743
14388
|
}
|
|
13744
14389
|
return { deltaWidth, deltaHeight };
|
|
13745
14390
|
}
|
|
14391
|
+
var RESIZE_KEYBOARD_STEP = 10;
|
|
14392
|
+
function getResizeKeyboardDelta(key, step = RESIZE_KEYBOARD_STEP) {
|
|
14393
|
+
switch (key) {
|
|
14394
|
+
case "ArrowRight":
|
|
14395
|
+
return { deltaX: step, deltaY: 0 };
|
|
14396
|
+
case "ArrowLeft":
|
|
14397
|
+
return { deltaX: -step, deltaY: 0 };
|
|
14398
|
+
case "ArrowDown":
|
|
14399
|
+
return { deltaX: 0, deltaY: step };
|
|
14400
|
+
case "ArrowUp":
|
|
14401
|
+
return { deltaX: 0, deltaY: -step };
|
|
14402
|
+
default:
|
|
14403
|
+
return null;
|
|
14404
|
+
}
|
|
14405
|
+
}
|
|
14406
|
+
function getResizeHandleOrientation(handle) {
|
|
14407
|
+
if (handle === "left" || handle === "right") return "vertical";
|
|
14408
|
+
if (handle === "top" || handle === "bottom") return "horizontal";
|
|
14409
|
+
return void 0;
|
|
14410
|
+
}
|
|
13746
14411
|
function clampDimensions(width, height, minWidth, minHeight, maxWidth, maxHeight) {
|
|
13747
14412
|
let w = Math.max(width, minWidth);
|
|
13748
14413
|
let h = Math.max(height, minHeight);
|
|
@@ -13766,6 +14431,19 @@ var codeEditorHighlightClasses = "p-3 font-mono text-sm leading-relaxed whitespa
|
|
|
13766
14431
|
var codeEditorLineNumberClasses = "select-none text-right pr-3 pl-2 border-r min-w-[3rem] flex-shrink-0";
|
|
13767
14432
|
var codeEditorLineNumberLightClasses = "bg-gray-50 border-gray-200 text-gray-400";
|
|
13768
14433
|
var codeEditorLineNumberDarkClasses = "bg-gray-800 border-gray-700 text-gray-500";
|
|
14434
|
+
var codeEditorActiveLineLightClasses = "bg-gray-100";
|
|
14435
|
+
var codeEditorActiveLineDarkClasses = "bg-gray-800/60";
|
|
14436
|
+
function getCodeEditorActiveLineClasses(theme) {
|
|
14437
|
+
return theme === "dark" ? codeEditorActiveLineDarkClasses : codeEditorActiveLineLightClasses;
|
|
14438
|
+
}
|
|
14439
|
+
function getActiveLineIndex(value, caretPosition) {
|
|
14440
|
+
const clamped = Math.max(0, Math.min(caretPosition, value.length));
|
|
14441
|
+
let line = 0;
|
|
14442
|
+
for (let i = 0; i < clamped; i++) {
|
|
14443
|
+
if (value[i] === "\n") line++;
|
|
14444
|
+
}
|
|
14445
|
+
return line;
|
|
14446
|
+
}
|
|
13769
14447
|
var tokenClassesLight = {
|
|
13770
14448
|
keyword: "text-purple-600 font-semibold",
|
|
13771
14449
|
string: "text-green-600",
|
|
@@ -14159,6 +14837,66 @@ function isContentEmpty(html) {
|
|
|
14159
14837
|
const stripped = html.replace(/<br\s*\/?>/gi, "").replace(/<\/?[^>]*>/g, "").replace(/ /gi, "").trim();
|
|
14160
14838
|
return stripped.length === 0;
|
|
14161
14839
|
}
|
|
14840
|
+
function escapeHtml(value) {
|
|
14841
|
+
return value.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
14842
|
+
}
|
|
14843
|
+
function decodeHtmlEntities(value) {
|
|
14844
|
+
return value.replace(/ /gi, " ").replace(/</gi, "<").replace(/>/gi, ">").replace(/"/gi, '"').replace(/'/gi, "'").replace(/&/gi, "&");
|
|
14845
|
+
}
|
|
14846
|
+
function inlineMarkdownToHtml(value) {
|
|
14847
|
+
return escapeHtml(value).replace(/\*\*([^*]+)\*\*/g, "<strong>$1</strong>").replace(/\*([^*]+)\*/g, "<em>$1</em>").replace(/`([^`]+)`/g, "<code>$1</code>");
|
|
14848
|
+
}
|
|
14849
|
+
function richTextModeToHtml(value, mode = "html") {
|
|
14850
|
+
if (mode === "html") return sanitizeHtml(value);
|
|
14851
|
+
if (mode === "plain") {
|
|
14852
|
+
return escapeHtml(value).split(/\r?\n/).map((line) => line ? `<p>${line}</p>` : "<p><br></p>").join("");
|
|
14853
|
+
}
|
|
14854
|
+
const lines = value.split(/\r?\n/);
|
|
14855
|
+
const html = [];
|
|
14856
|
+
let listItems = [];
|
|
14857
|
+
const flushList = () => {
|
|
14858
|
+
if (listItems.length === 0) return;
|
|
14859
|
+
html.push(
|
|
14860
|
+
`<ul>${listItems.map((item) => `<li>${inlineMarkdownToHtml(item)}</li>`).join("")}</ul>`
|
|
14861
|
+
);
|
|
14862
|
+
listItems = [];
|
|
14863
|
+
};
|
|
14864
|
+
for (const line of lines) {
|
|
14865
|
+
const trimmed = line.trim();
|
|
14866
|
+
const bullet = /^[-*]\s+(.+)$/.exec(trimmed);
|
|
14867
|
+
if (bullet) {
|
|
14868
|
+
listItems.push(bullet[1]);
|
|
14869
|
+
continue;
|
|
14870
|
+
}
|
|
14871
|
+
flushList();
|
|
14872
|
+
if (!trimmed) {
|
|
14873
|
+
html.push("<p><br></p>");
|
|
14874
|
+
} else if (trimmed.startsWith("### ")) {
|
|
14875
|
+
html.push(`<h3>${inlineMarkdownToHtml(trimmed.slice(4))}</h3>`);
|
|
14876
|
+
} else if (trimmed.startsWith("## ")) {
|
|
14877
|
+
html.push(`<h2>${inlineMarkdownToHtml(trimmed.slice(3))}</h2>`);
|
|
14878
|
+
} else if (trimmed.startsWith("# ")) {
|
|
14879
|
+
html.push(`<h1>${inlineMarkdownToHtml(trimmed.slice(2))}</h1>`);
|
|
14880
|
+
} else {
|
|
14881
|
+
html.push(`<p>${inlineMarkdownToHtml(trimmed)}</p>`);
|
|
14882
|
+
}
|
|
14883
|
+
}
|
|
14884
|
+
flushList();
|
|
14885
|
+
return sanitizeHtml(html.join(""));
|
|
14886
|
+
}
|
|
14887
|
+
function htmlToText(value) {
|
|
14888
|
+
return decodeHtmlEntities(
|
|
14889
|
+
sanitizeHtml(value).replace(/<\/(h[1-6]|p|div|li)>/gi, "\n").replace(/<br\s*\/?>/gi, "\n").replace(/<\/ul>/gi, "\n").replace(/<[^>]+>/g, "")
|
|
14890
|
+
).replace(/\n{3,}/g, "\n\n").trim();
|
|
14891
|
+
}
|
|
14892
|
+
function richTextHtmlToMode(html, mode = "html") {
|
|
14893
|
+
const sanitized = sanitizeHtml(html);
|
|
14894
|
+
if (mode === "html") return sanitized;
|
|
14895
|
+
if (mode === "plain") return htmlToText(sanitized);
|
|
14896
|
+
return decodeHtmlEntities(
|
|
14897
|
+
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, "")
|
|
14898
|
+
).replace(/\n{3,}/g, "\n\n").trim();
|
|
14899
|
+
}
|
|
14162
14900
|
function parseHeight(height) {
|
|
14163
14901
|
if (height === void 0) return void 0;
|
|
14164
14902
|
if (typeof height === "number") return `${height}px`;
|
|
@@ -14447,20 +15185,27 @@ function findMarkdownHotkeyMatch(toolbar, event) {
|
|
|
14447
15185
|
}
|
|
14448
15186
|
|
|
14449
15187
|
// src/utils/rich-text-engine.ts
|
|
15188
|
+
function canUseExecCommand() {
|
|
15189
|
+
return isBrowser() && typeof document.execCommand === "function";
|
|
15190
|
+
}
|
|
15191
|
+
function promptForRichTextUrl(message) {
|
|
15192
|
+
if (!isBrowser() || typeof window.prompt !== "function") return null;
|
|
15193
|
+
return window.prompt(message);
|
|
15194
|
+
}
|
|
14450
15195
|
function createBuiltinRichTextEngine() {
|
|
14451
15196
|
return {
|
|
14452
15197
|
name: "builtin",
|
|
14453
15198
|
create(ctx) {
|
|
14454
15199
|
const { element } = ctx;
|
|
15200
|
+
const mode = ctx.mode ?? "html";
|
|
14455
15201
|
let readOnly = ctx.readOnly;
|
|
14456
15202
|
let disabled = ctx.disabled;
|
|
14457
15203
|
element.contentEditable = String(!(readOnly || disabled));
|
|
14458
|
-
const initial =
|
|
15204
|
+
const initial = richTextModeToHtml(ctx.initialValue, mode);
|
|
14459
15205
|
if (initial) element.innerHTML = initial;
|
|
14460
15206
|
const handleInput = () => {
|
|
14461
15207
|
const html = element.innerHTML;
|
|
14462
|
-
|
|
14463
|
-
ctx.notifyChange(sanitized);
|
|
15208
|
+
ctx.notifyChange(richTextHtmlToMode(html, mode));
|
|
14464
15209
|
};
|
|
14465
15210
|
const refreshActiveFormats = () => {
|
|
14466
15211
|
if (!isBrowser()) return;
|
|
@@ -14485,7 +15230,7 @@ function createBuiltinRichTextEngine() {
|
|
|
14485
15230
|
}
|
|
14486
15231
|
const exec = (actionName) => {
|
|
14487
15232
|
if (readOnly || disabled) return;
|
|
14488
|
-
element.focus();
|
|
15233
|
+
if (typeof element.focus === "function") element.focus();
|
|
14489
15234
|
const buttons = getToolbarButtons(ctx.toolbar);
|
|
14490
15235
|
const btn = buttons.find((b) => b.name === actionName);
|
|
14491
15236
|
if (btn?.action) {
|
|
@@ -14496,18 +15241,21 @@ function createBuiltinRichTextEngine() {
|
|
|
14496
15241
|
}
|
|
14497
15242
|
const mapping = mapToolbarAction(actionName);
|
|
14498
15243
|
if (mapping) {
|
|
15244
|
+
if (!canUseExecCommand()) return;
|
|
14499
15245
|
document.execCommand(mapping.command, false, mapping.argument);
|
|
14500
15246
|
handleInput();
|
|
14501
15247
|
refreshActiveFormats();
|
|
14502
15248
|
return;
|
|
14503
15249
|
}
|
|
14504
15250
|
if (actionName === "codeBlock") {
|
|
15251
|
+
if (!canUseExecCommand()) return;
|
|
14505
15252
|
document.execCommand("formatBlock", false, "PRE");
|
|
14506
15253
|
handleInput();
|
|
14507
15254
|
return;
|
|
14508
15255
|
}
|
|
14509
15256
|
if (actionName === "link") {
|
|
14510
|
-
|
|
15257
|
+
if (!canUseExecCommand()) return;
|
|
15258
|
+
const url = promptForRichTextUrl("Enter URL:");
|
|
14511
15259
|
if (url && isValidUrl(url)) {
|
|
14512
15260
|
document.execCommand("createLink", false, url);
|
|
14513
15261
|
handleInput();
|
|
@@ -14515,7 +15263,8 @@ function createBuiltinRichTextEngine() {
|
|
|
14515
15263
|
return;
|
|
14516
15264
|
}
|
|
14517
15265
|
if (actionName === "image") {
|
|
14518
|
-
|
|
15266
|
+
if (!canUseExecCommand()) return;
|
|
15267
|
+
const url = promptForRichTextUrl("Enter image URL:");
|
|
14519
15268
|
if (url && isValidUrl(url)) {
|
|
14520
15269
|
document.execCommand("insertImage", false, url);
|
|
14521
15270
|
handleInput();
|
|
@@ -14524,11 +15273,11 @@ function createBuiltinRichTextEngine() {
|
|
|
14524
15273
|
};
|
|
14525
15274
|
return {
|
|
14526
15275
|
setValue(html) {
|
|
14527
|
-
const sanitized =
|
|
15276
|
+
const sanitized = richTextModeToHtml(html, mode);
|
|
14528
15277
|
if (element.innerHTML !== sanitized) element.innerHTML = sanitized;
|
|
14529
15278
|
},
|
|
14530
15279
|
getValue() {
|
|
14531
|
-
return
|
|
15280
|
+
return richTextHtmlToMode(element.innerHTML, mode);
|
|
14532
15281
|
},
|
|
14533
15282
|
exec,
|
|
14534
15283
|
refreshActiveFormats,
|
|
@@ -14627,17 +15376,54 @@ var virtualTableBorderedClasses = "[&_td]:border-r [&_th]:border-r [&_td:last-ch
|
|
|
14627
15376
|
var virtualTableEmptyClasses = "flex items-center justify-center py-12 text-sm text-[var(--tiger-text-muted,#9ca3af)]";
|
|
14628
15377
|
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
15378
|
function calculateVirtualRange(scrollTop, viewportHeight, totalRows, rowHeight, overscan = 5) {
|
|
14630
|
-
|
|
15379
|
+
const safeTotalRows = Number.isFinite(totalRows) ? Math.max(0, Math.floor(totalRows)) : 0;
|
|
15380
|
+
const safeRowHeight = Number.isFinite(rowHeight) ? rowHeight : 0;
|
|
15381
|
+
const safeViewportHeight = Number.isFinite(viewportHeight) ? Math.max(0, viewportHeight) : 0;
|
|
15382
|
+
const safeScrollTop = Number.isFinite(scrollTop) ? Math.max(0, scrollTop) : 0;
|
|
15383
|
+
const safeOverscan = Number.isFinite(overscan) ? Math.max(0, Math.floor(overscan)) : 0;
|
|
15384
|
+
if (safeTotalRows === 0 || safeRowHeight <= 0 || safeViewportHeight <= 0) {
|
|
14631
15385
|
return { start: 0, end: 0, offsetTop: 0, totalHeight: 0 };
|
|
14632
15386
|
}
|
|
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 *
|
|
15387
|
+
const totalHeight = safeTotalRows * safeRowHeight;
|
|
15388
|
+
const startRaw = Math.floor(safeScrollTop / safeRowHeight);
|
|
15389
|
+
const visibleCount = Math.ceil(safeViewportHeight / safeRowHeight);
|
|
15390
|
+
const start = Math.max(0, Math.min(safeTotalRows, startRaw - safeOverscan));
|
|
15391
|
+
const end = Math.max(start, Math.min(safeTotalRows, startRaw + visibleCount + safeOverscan));
|
|
15392
|
+
const offsetTop = start * safeRowHeight;
|
|
14639
15393
|
return { start, end, offsetTop, totalHeight };
|
|
14640
15394
|
}
|
|
15395
|
+
function calculateVirtualColumnRange(scrollLeft, viewportWidth, columnWidths, overscan = 2) {
|
|
15396
|
+
const count = columnWidths.length;
|
|
15397
|
+
if (count === 0 || viewportWidth <= 0) {
|
|
15398
|
+
return { start: 0, end: count, leftPad: 0, rightPad: 0 };
|
|
15399
|
+
}
|
|
15400
|
+
const safeScrollLeft = Math.max(0, Number.isFinite(scrollLeft) ? scrollLeft : 0);
|
|
15401
|
+
const safeOverscan = Math.max(0, Math.floor(overscan));
|
|
15402
|
+
let acc = 0;
|
|
15403
|
+
let rawStart = 0;
|
|
15404
|
+
for (let i = 0; i < count; i++) {
|
|
15405
|
+
if (acc + columnWidths[i] > safeScrollLeft) {
|
|
15406
|
+
rawStart = i;
|
|
15407
|
+
break;
|
|
15408
|
+
}
|
|
15409
|
+
acc += columnWidths[i];
|
|
15410
|
+
if (i === count - 1) rawStart = count - 1;
|
|
15411
|
+
}
|
|
15412
|
+
const viewEnd = safeScrollLeft + viewportWidth;
|
|
15413
|
+
let endExclusive = rawStart;
|
|
15414
|
+
let endAcc = acc;
|
|
15415
|
+
while (endExclusive < count && endAcc < viewEnd) {
|
|
15416
|
+
endAcc += columnWidths[endExclusive];
|
|
15417
|
+
endExclusive++;
|
|
15418
|
+
}
|
|
15419
|
+
const start = Math.max(0, rawStart - safeOverscan);
|
|
15420
|
+
const end = Math.min(count, endExclusive + safeOverscan);
|
|
15421
|
+
let leftPad = 0;
|
|
15422
|
+
for (let i = 0; i < start; i++) leftPad += columnWidths[i];
|
|
15423
|
+
let rightPad = 0;
|
|
15424
|
+
for (let i = end; i < count; i++) rightPad += columnWidths[i];
|
|
15425
|
+
return { start, end, leftPad, rightPad };
|
|
15426
|
+
}
|
|
14641
15427
|
function getVirtualRowKey(row, index, rowKey) {
|
|
14642
15428
|
if (!rowKey) return index;
|
|
14643
15429
|
if (typeof rowKey === "function") return rowKey(row, index);
|
|
@@ -14724,8 +15510,14 @@ function shouldLoadMore(el, threshold, direction = "vertical", inverse = false)
|
|
|
14724
15510
|
}
|
|
14725
15511
|
function createInfiniteScrollObserver(sentinel, options) {
|
|
14726
15512
|
if (typeof IntersectionObserver === "undefined") return null;
|
|
14727
|
-
const {
|
|
14728
|
-
|
|
15513
|
+
const {
|
|
15514
|
+
threshold = 100,
|
|
15515
|
+
direction = "vertical",
|
|
15516
|
+
root = null,
|
|
15517
|
+
inverse = false,
|
|
15518
|
+
onLoadMore
|
|
15519
|
+
} = options;
|
|
15520
|
+
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
15521
|
const observer = new IntersectionObserver(
|
|
14730
15522
|
(entries) => {
|
|
14731
15523
|
const entry = entries[entries.length - 1];
|
|
@@ -14748,7 +15540,7 @@ function getInfiniteScrollContainerClasses(direction, className) {
|
|
|
14748
15540
|
}
|
|
14749
15541
|
|
|
14750
15542
|
// 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";
|
|
15543
|
+
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
15544
|
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
15545
|
var fileManagerBreadcrumbClasses = "flex items-center gap-1 text-sm text-[var(--tiger-text-secondary,#6b7280)]";
|
|
14754
15546
|
var fileManagerBreadcrumbItemClasses = "cursor-pointer hover:text-[var(--tiger-primary,#2563eb)] transition-colors";
|
|
@@ -14798,18 +15590,10 @@ function filterHiddenFiles(items, showHidden) {
|
|
|
14798
15590
|
return items.filter((item) => !item.name.startsWith("."));
|
|
14799
15591
|
}
|
|
14800
15592
|
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]}`;
|
|
15593
|
+
return formatBytes(bytes, { precision: 1, trimTrailingZeros: true });
|
|
14808
15594
|
}
|
|
14809
15595
|
function getFileExtension2(name) {
|
|
14810
|
-
|
|
14811
|
-
if (dot <= 0) return "";
|
|
14812
|
-
return name.slice(dot + 1).toLowerCase();
|
|
15596
|
+
return getFileExtensionName(name);
|
|
14813
15597
|
}
|
|
14814
15598
|
function navigateToFolder(files, path) {
|
|
14815
15599
|
let current = files;
|
|
@@ -15161,8 +15945,10 @@ function normalizeGanttDate(value) {
|
|
|
15161
15945
|
return time;
|
|
15162
15946
|
}
|
|
15163
15947
|
function getGanttTaskAriaLabel(task) {
|
|
15164
|
-
const
|
|
15165
|
-
const
|
|
15948
|
+
const startMs = normalizeGanttDate(task.start);
|
|
15949
|
+
const endMs = normalizeGanttDate(task.end);
|
|
15950
|
+
const start = Number.isFinite(startMs) ? formatGanttDate(new Date(startMs), "day") : "unknown";
|
|
15951
|
+
const end = Number.isFinite(endMs) ? formatGanttDate(new Date(endMs), "day") : "unknown";
|
|
15166
15952
|
const progress = typeof task.progress === "number" ? `, ${clampProgress(task.progress)}%` : "";
|
|
15167
15953
|
return `${task.label}, ${start} to ${end}${progress}`;
|
|
15168
15954
|
}
|
|
@@ -15175,19 +15961,28 @@ function getGanttDependencyPath(dependency) {
|
|
|
15175
15961
|
}
|
|
15176
15962
|
function computeGanttLayout(data, options = {}) {
|
|
15177
15963
|
const {
|
|
15178
|
-
width = 720,
|
|
15179
|
-
rowHeight = 40,
|
|
15180
|
-
barHeight = 18,
|
|
15181
|
-
taskLabelWidth = 140,
|
|
15182
|
-
timelineHeight = 36,
|
|
15183
|
-
minBarWidth = 6,
|
|
15964
|
+
width: rawWidth = 720,
|
|
15965
|
+
rowHeight: rawRowHeight = 40,
|
|
15966
|
+
barHeight: rawBarHeight = 18,
|
|
15967
|
+
taskLabelWidth: rawTaskLabelWidth = 140,
|
|
15968
|
+
timelineHeight: rawTimelineHeight = 36,
|
|
15969
|
+
minBarWidth: rawMinBarWidth = 6,
|
|
15184
15970
|
scale = "week",
|
|
15185
15971
|
colors = DEFAULT_CHART_COLORS,
|
|
15186
15972
|
dateFormatter
|
|
15187
15973
|
} = options;
|
|
15974
|
+
const width = Number.isFinite(rawWidth) ? Math.max(0, rawWidth) : 0;
|
|
15975
|
+
const rowHeight = Number.isFinite(rawRowHeight) ? Math.max(0, rawRowHeight) : 0;
|
|
15976
|
+
const barHeight = Number.isFinite(rawBarHeight) ? Math.max(0, rawBarHeight) : 0;
|
|
15977
|
+
const taskLabelWidth = Number.isFinite(rawTaskLabelWidth) ? Math.max(0, rawTaskLabelWidth) : 0;
|
|
15978
|
+
const timelineHeight = Number.isFinite(rawTimelineHeight) ? Math.max(0, rawTimelineHeight) : 0;
|
|
15979
|
+
const minBarWidth = Number.isFinite(rawMinBarWidth) ? Math.max(0, rawMinBarWidth) : 0;
|
|
15188
15980
|
if (data.length === 0) {
|
|
15189
|
-
const
|
|
15190
|
-
const
|
|
15981
|
+
const fallbackMin = Date.now();
|
|
15982
|
+
const rawMinMs2 = normalizeGanttDate(options.minDate ?? fallbackMin);
|
|
15983
|
+
const minMs2 = Number.isFinite(rawMinMs2) ? rawMinMs2 : fallbackMin;
|
|
15984
|
+
const rawMaxMs2 = normalizeGanttDate(options.maxDate ?? minMs2 + DAY_MS);
|
|
15985
|
+
const maxMs2 = Number.isFinite(rawMaxMs2) && rawMaxMs2 > minMs2 ? rawMaxMs2 : minMs2 + DAY_MS;
|
|
15191
15986
|
return {
|
|
15192
15987
|
tasks: [],
|
|
15193
15988
|
dependencies: [],
|
|
@@ -15203,24 +15998,28 @@ function computeGanttLayout(data, options = {}) {
|
|
|
15203
15998
|
const taskRanges = data.map((task) => {
|
|
15204
15999
|
const rawStart = normalizeGanttDate(task.start);
|
|
15205
16000
|
const rawEnd = normalizeGanttDate(task.end);
|
|
15206
|
-
const
|
|
15207
|
-
const
|
|
16001
|
+
const startFallback = Number.isFinite(rawEnd) ? rawEnd : Date.now();
|
|
16002
|
+
const endFallback = Number.isFinite(rawStart) ? rawStart : startFallback + DAY_MS;
|
|
16003
|
+
const safeStart = Number.isFinite(rawStart) ? rawStart : startFallback;
|
|
16004
|
+
const safeEnd = Number.isFinite(rawEnd) ? rawEnd : endFallback;
|
|
16005
|
+
const startMs = Math.min(safeStart, safeEnd);
|
|
16006
|
+
const endMs = Math.max(safeStart, safeEnd);
|
|
15208
16007
|
return { task, startMs, endMs: endMs === startMs ? endMs + DAY_MS : endMs };
|
|
15209
16008
|
});
|
|
15210
|
-
const
|
|
15211
|
-
|
|
15212
|
-
);
|
|
15213
|
-
const
|
|
15214
|
-
|
|
15215
|
-
);
|
|
16009
|
+
const inferredMinMs = Math.min(...taskRanges.map((item) => item.startMs));
|
|
16010
|
+
const inferredMaxMs = Math.max(...taskRanges.map((item) => item.endMs));
|
|
16011
|
+
const rawMinMs = normalizeGanttDate(options.minDate ?? inferredMinMs);
|
|
16012
|
+
const rawMaxMs = normalizeGanttDate(options.maxDate ?? inferredMaxMs);
|
|
16013
|
+
const minMs = Number.isFinite(rawMinMs) ? rawMinMs : inferredMinMs;
|
|
16014
|
+
const maxMs = Number.isFinite(rawMaxMs) ? rawMaxMs : inferredMaxMs;
|
|
15216
16015
|
const safeMaxMs = maxMs > minMs ? maxMs : minMs + DAY_MS;
|
|
15217
16016
|
const timelineWidth = Math.max(0, width - taskLabelWidth);
|
|
15218
16017
|
const rangeMs = safeMaxMs - minMs;
|
|
15219
16018
|
const xForTime = (time) => taskLabelWidth + (time - minMs) / rangeMs * timelineWidth;
|
|
15220
16019
|
const tasks = taskRanges.map(({ task, startMs, endMs }, index) => {
|
|
15221
16020
|
const x = xForTime(startMs);
|
|
15222
|
-
const
|
|
15223
|
-
const barWidth = Math.max(minBarWidth,
|
|
16021
|
+
const rawWidth2 = xForTime(endMs) - x;
|
|
16022
|
+
const barWidth = Math.max(minBarWidth, rawWidth2);
|
|
15224
16023
|
return {
|
|
15225
16024
|
id: task.id,
|
|
15226
16025
|
task,
|
|
@@ -15273,15 +16072,19 @@ function computeGanttLayout(data, options = {}) {
|
|
|
15273
16072
|
};
|
|
15274
16073
|
}
|
|
15275
16074
|
function createGanttTimelineTicks(minMs, maxMs, timelineWidth, taskLabelWidth, scale, formatter = formatGanttDate) {
|
|
16075
|
+
const safeMinMs = Number.isFinite(minMs) ? minMs : Date.now();
|
|
16076
|
+
const safeMaxMs = Number.isFinite(maxMs) && maxMs > safeMinMs ? maxMs : safeMinMs + DAY_MS;
|
|
16077
|
+
const safeTimelineWidth = Number.isFinite(timelineWidth) ? Math.max(0, timelineWidth) : 0;
|
|
16078
|
+
const safeTaskLabelWidth = Number.isFinite(taskLabelWidth) ? Math.max(0, taskLabelWidth) : 0;
|
|
15276
16079
|
const ticks = [];
|
|
15277
|
-
const rangeMs = Math.max(DAY_MS,
|
|
15278
|
-
let current = startOfTick(new Date(
|
|
15279
|
-
while (current.getTime() <=
|
|
16080
|
+
const rangeMs = Math.max(DAY_MS, safeMaxMs - safeMinMs);
|
|
16081
|
+
let current = startOfTick(new Date(safeMinMs), scale);
|
|
16082
|
+
while (current.getTime() <= safeMaxMs) {
|
|
15280
16083
|
const currentMs = current.getTime();
|
|
15281
|
-
if (currentMs >=
|
|
16084
|
+
if (currentMs >= safeMinMs) {
|
|
15282
16085
|
ticks.push({
|
|
15283
16086
|
value: new Date(currentMs),
|
|
15284
|
-
x:
|
|
16087
|
+
x: safeTaskLabelWidth + (currentMs - safeMinMs) / rangeMs * safeTimelineWidth,
|
|
15285
16088
|
label: formatter(new Date(currentMs), scale)
|
|
15286
16089
|
});
|
|
15287
16090
|
}
|
|
@@ -15289,8 +16092,8 @@ function createGanttTimelineTicks(minMs, maxMs, timelineWidth, taskLabelWidth, s
|
|
|
15289
16092
|
if (ticks.length > 64) break;
|
|
15290
16093
|
}
|
|
15291
16094
|
if (ticks.length === 0) {
|
|
15292
|
-
const date = new Date(
|
|
15293
|
-
ticks.push({ value: date, x:
|
|
16095
|
+
const date = new Date(safeMinMs);
|
|
16096
|
+
ticks.push({ value: date, x: safeTaskLabelWidth, label: formatter(date, scale) });
|
|
15294
16097
|
}
|
|
15295
16098
|
return ticks;
|
|
15296
16099
|
}
|
|
@@ -15688,16 +16491,16 @@ var imageViewerNavBtnClasses = "fixed top-1/2 -translate-y-1/2 z-50 p-3 text-whi
|
|
|
15688
16491
|
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
16492
|
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
16493
|
var imageViewerIcons = {
|
|
15691
|
-
zoomIn:
|
|
15692
|
-
zoomOut:
|
|
16494
|
+
zoomIn: zoomInIconPath,
|
|
16495
|
+
zoomOut: zoomOutIconPath,
|
|
15693
16496
|
rotateLeft: "M3 10h7V3M21 14h-7v7M16.7 7.3A8 8 0 004.1 9.9M7.3 16.7A8 8 0 0019.9 14.1",
|
|
15694
16497
|
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:
|
|
16498
|
+
close: previewCloseIconPath,
|
|
16499
|
+
prev: prevIconPath,
|
|
16500
|
+
next: nextIconPath
|
|
15698
16501
|
};
|
|
15699
16502
|
function clampZoom(zoom, min, max) {
|
|
15700
|
-
return
|
|
16503
|
+
return clampScale(zoom, min, max);
|
|
15701
16504
|
}
|
|
15702
16505
|
function normalizeRotation(rotation) {
|
|
15703
16506
|
return (rotation % 360 + 360) % 360;
|
|
@@ -15731,24 +16534,19 @@ function movePan(pan, clientX, clientY) {
|
|
|
15731
16534
|
translateY: pan.startTranslateY + (clientY - pan.startY)
|
|
15732
16535
|
};
|
|
15733
16536
|
}
|
|
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
16537
|
function createPinchState() {
|
|
15740
16538
|
return { isPinching: false, initialDistance: 0, initialScale: 1 };
|
|
15741
16539
|
}
|
|
15742
16540
|
function startPinch(t1, t2, currentScale) {
|
|
15743
16541
|
return {
|
|
15744
16542
|
isPinching: true,
|
|
15745
|
-
initialDistance:
|
|
16543
|
+
initialDistance: getTouchDistance(t1, t2),
|
|
15746
16544
|
initialScale: currentScale
|
|
15747
16545
|
};
|
|
15748
16546
|
}
|
|
15749
16547
|
function movePinch(pinch, t1, t2, minZoom, maxZoom) {
|
|
15750
16548
|
if (pinch.initialDistance === 0) return pinch.initialScale;
|
|
15751
|
-
const currentDistance =
|
|
16549
|
+
const currentDistance = getTouchDistance(t1, t2);
|
|
15752
16550
|
const ratio = currentDistance / pinch.initialDistance;
|
|
15753
16551
|
return clampZoom(pinch.initialScale * ratio, minZoom, maxZoom);
|
|
15754
16552
|
}
|
|
@@ -15806,17 +16604,17 @@ var checkboxLabelSizeClasses = {
|
|
|
15806
16604
|
lg: "text-lg"
|
|
15807
16605
|
};
|
|
15808
16606
|
function getCheckboxClasses(size = "md", disabled = false) {
|
|
15809
|
-
const
|
|
16607
|
+
const baseClasses = "rounded border-2 transition-all duration-150 cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-[var(--tiger-focus-ring,var(--tiger-primary,#2563eb))] active:scale-95";
|
|
15810
16608
|
const sizeClass = checkboxSizeClasses2[size];
|
|
15811
16609
|
const colorClasses = "border-[var(--tiger-primary,#2563eb)] accent-[var(--tiger-primary,#2563eb)] text-white checked:bg-[var(--tiger-primary,#2563eb)] checked:border-[var(--tiger-primary,#2563eb)] indeterminate:bg-[var(--tiger-primary,#2563eb)] indeterminate:border-[var(--tiger-primary,#2563eb)]";
|
|
15812
16610
|
const disabledClasses = disabled ? "cursor-not-allowed opacity-50 disabled:bg-[var(--tiger-surface-muted,#f3f4f6)] disabled:border-[var(--tiger-border,#e5e7eb)]" : "";
|
|
15813
|
-
return [
|
|
16611
|
+
return [baseClasses, sizeClass, colorClasses, disabledClasses].filter(Boolean).join(" ");
|
|
15814
16612
|
}
|
|
15815
16613
|
function getCheckboxLabelClasses(size = "md", disabled = false) {
|
|
15816
|
-
const
|
|
16614
|
+
const baseClasses = "inline-flex items-center cursor-pointer select-none";
|
|
15817
16615
|
const sizeClass = checkboxLabelSizeClasses[size];
|
|
15818
16616
|
const disabledClasses = disabled ? "cursor-not-allowed" : "";
|
|
15819
|
-
return [
|
|
16617
|
+
return [baseClasses, sizeClass, disabledClasses].filter(Boolean).join(" ");
|
|
15820
16618
|
}
|
|
15821
16619
|
|
|
15822
16620
|
// src/theme-runtime/switch.ts
|
|
@@ -15848,10 +16646,10 @@ function getSwitchClasses(size = "md", checked = false, disabled = false, ...cla
|
|
|
15848
16646
|
);
|
|
15849
16647
|
}
|
|
15850
16648
|
function getSwitchThumbClasses(size = "md", checked = false) {
|
|
15851
|
-
const
|
|
16649
|
+
const baseClasses = "inline-block rounded-full bg-[var(--tiger-surface,#ffffff)] shadow-lg transition-transform";
|
|
15852
16650
|
const sizeClass = switchThumbSizeClasses[size];
|
|
15853
16651
|
const translateClass = checked ? switchThumbTranslateClasses[size] : "translate-x-0.5";
|
|
15854
|
-
return classNames(
|
|
16652
|
+
return classNames(baseClasses, sizeClass, translateClass);
|
|
15855
16653
|
}
|
|
15856
16654
|
|
|
15857
16655
|
// src/theme-runtime/slider.ts
|
|
@@ -16131,78 +16929,108 @@ var MODERN_REDUCED_MOTION_TOKENS = {
|
|
|
16131
16929
|
"--tiger-transition-emphasized": "transform 0ms linear"
|
|
16132
16930
|
};
|
|
16133
16931
|
|
|
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"
|
|
16932
|
+
// src/themes/default/theme.ts
|
|
16933
|
+
var defaultThemeLightColors = {
|
|
16934
|
+
primary: "#2563eb",
|
|
16935
|
+
primaryHover: "#1d4ed8",
|
|
16936
|
+
primaryActive: "#1e40af",
|
|
16937
|
+
primaryDisabled: "#93c5fd",
|
|
16938
|
+
secondary: "#4b5563",
|
|
16939
|
+
secondaryHover: "#374151",
|
|
16940
|
+
secondaryActive: "#1f2937",
|
|
16941
|
+
secondaryDisabled: "#9ca3af",
|
|
16942
|
+
outlineBgHover: "#eff6ff",
|
|
16943
|
+
ghostBgHover: "#eff6ff",
|
|
16944
|
+
focusRing: "#2563eb",
|
|
16945
|
+
surface: "#ffffff",
|
|
16946
|
+
surfaceMuted: "#f9fafb",
|
|
16947
|
+
surfaceRaised: "#ffffff",
|
|
16948
|
+
text: "#111827",
|
|
16949
|
+
textSecondary: "#6b7280",
|
|
16950
|
+
textDisabled: "#d1d5db",
|
|
16951
|
+
border: "#e5e7eb",
|
|
16952
|
+
borderStrong: "#9ca3af",
|
|
16953
|
+
success: "#16a34a",
|
|
16954
|
+
warning: "#d97706",
|
|
16955
|
+
error: "#dc2626",
|
|
16956
|
+
info: "#3b82f6",
|
|
16957
|
+
chart1: "#2563eb",
|
|
16958
|
+
chart2: "#16a34a",
|
|
16959
|
+
chart3: "#d97706",
|
|
16960
|
+
chart4: "#a855f7",
|
|
16961
|
+
chart5: "#0ea5e9",
|
|
16962
|
+
chart6: "#ef4444"
|
|
16174
16963
|
};
|
|
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
|
-
|
|
16964
|
+
var defaultThemeDarkColors = {
|
|
16965
|
+
primary: "#60a5fa",
|
|
16966
|
+
primaryHover: "#93c5fd",
|
|
16967
|
+
primaryActive: "#bfdbfe",
|
|
16968
|
+
primaryDisabled: "#1e40af",
|
|
16969
|
+
secondary: "#9ca3af",
|
|
16970
|
+
secondaryHover: "#d1d5db",
|
|
16971
|
+
secondaryActive: "#e5e7eb",
|
|
16972
|
+
secondaryDisabled: "#4b5563",
|
|
16973
|
+
outlineBgHover: "#1e3a5f",
|
|
16974
|
+
ghostBgHover: "#1e3a5f",
|
|
16975
|
+
focusRing: "#60a5fa",
|
|
16976
|
+
surface: "#111827",
|
|
16977
|
+
surfaceMuted: "#1f2937",
|
|
16978
|
+
surfaceRaised: "#1f2937",
|
|
16979
|
+
text: "#f9fafb",
|
|
16980
|
+
textSecondary: "#d1d5db",
|
|
16981
|
+
textDisabled: "#4b5563",
|
|
16982
|
+
border: "#374151",
|
|
16983
|
+
borderStrong: "#6b7280",
|
|
16984
|
+
success: "#4ade80",
|
|
16985
|
+
warning: "#fbbf24",
|
|
16986
|
+
error: "#f87171",
|
|
16987
|
+
info: "#60a5fa",
|
|
16988
|
+
chart1: "#60a5fa",
|
|
16989
|
+
chart2: "#4ade80",
|
|
16990
|
+
chart3: "#fbbf24",
|
|
16991
|
+
chart4: "#c084fc",
|
|
16992
|
+
chart5: "#38bdf8",
|
|
16993
|
+
chart6: "#f87171"
|
|
16205
16994
|
};
|
|
16995
|
+
var defaultTheme = {
|
|
16996
|
+
name: "default",
|
|
16997
|
+
label: "Default",
|
|
16998
|
+
light: {
|
|
16999
|
+
colors: defaultThemeLightColors,
|
|
17000
|
+
radius: { sm: "4px", md: "6px", lg: "10px", xl: "14px", none: "0", full: "9999px" },
|
|
17001
|
+
shadows: {
|
|
17002
|
+
xs: "0 1px 2px 0 rgba(0,0,0,0.05)",
|
|
17003
|
+
sm: "0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px -1px rgba(0,0,0,0.1)",
|
|
17004
|
+
md: "0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1)",
|
|
17005
|
+
lg: "0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1)",
|
|
17006
|
+
xl: "0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1)"
|
|
17007
|
+
}
|
|
17008
|
+
},
|
|
17009
|
+
dark: {
|
|
17010
|
+
colors: defaultThemeDarkColors,
|
|
17011
|
+
shadows: {
|
|
17012
|
+
xs: "0 1px 2px 0 rgba(0,0,0,0.2)",
|
|
17013
|
+
sm: "0 1px 3px 0 rgba(0,0,0,0.3), 0 1px 2px -1px rgba(0,0,0,0.25)",
|
|
17014
|
+
md: "0 4px 6px -1px rgba(0,0,0,0.3), 0 2px 4px -2px rgba(0,0,0,0.25)",
|
|
17015
|
+
lg: "0 10px 15px -3px rgba(0,0,0,0.3), 0 4px 6px -4px rgba(0,0,0,0.25)",
|
|
17016
|
+
xl: "0 20px 25px -5px rgba(0,0,0,0.3), 0 8px 10px -6px rgba(0,0,0,0.25)"
|
|
17017
|
+
}
|
|
17018
|
+
}
|
|
17019
|
+
};
|
|
17020
|
+
|
|
17021
|
+
// src/tailwind-plugin.ts
|
|
17022
|
+
function presetToVars(colors) {
|
|
17023
|
+
const vars = {};
|
|
17024
|
+
for (const [key, value] of Object.entries(colors)) {
|
|
17025
|
+
const varName = THEME_CSS_VARS[key];
|
|
17026
|
+
if (varName && value) {
|
|
17027
|
+
vars[varName] = value;
|
|
17028
|
+
}
|
|
17029
|
+
}
|
|
17030
|
+
return vars;
|
|
17031
|
+
}
|
|
17032
|
+
var tigercatTheme = presetToVars(defaultThemeLightColors);
|
|
17033
|
+
var tigercatDarkTheme = presetToVars(defaultThemeDarkColors);
|
|
16206
17034
|
var tigercatDirectionBase = {
|
|
16207
17035
|
'[dir="rtl"] .tiger-rtl-mirror, [data-tiger-dir="rtl"] .tiger-rtl-mirror': {
|
|
16208
17036
|
transform: "scaleX(-1)"
|
|
@@ -16241,16 +17069,6 @@ var tigercatPlugin = plugin(function({ addBase }) {
|
|
|
16241
17069
|
...tigercatReducedMotionBase
|
|
16242
17070
|
});
|
|
16243
17071
|
});
|
|
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
17072
|
function createTigercatPlugin(options = {}) {
|
|
16255
17073
|
return plugin(function({ addBase }) {
|
|
16256
17074
|
const preset = options.preset;
|
|
@@ -16275,18 +17093,77 @@ function createTigercatPlugin(options = {}) {
|
|
|
16275
17093
|
}
|
|
16276
17094
|
|
|
16277
17095
|
// src/themes/manager.ts
|
|
16278
|
-
|
|
17096
|
+
var THEME_CONFIG_CSS_VARS = {
|
|
17097
|
+
typography: {
|
|
17098
|
+
fontFamily: "--tiger-font-family",
|
|
17099
|
+
fontFamilyMono: "--tiger-font-family-mono",
|
|
17100
|
+
fontSizeBase: "--tiger-font-size-base",
|
|
17101
|
+
fontSizeSm: "--tiger-font-size-sm",
|
|
17102
|
+
fontSizeLg: "--tiger-font-size-lg",
|
|
17103
|
+
fontWeightNormal: "--tiger-font-weight-normal",
|
|
17104
|
+
fontWeightMedium: "--tiger-font-weight-medium",
|
|
17105
|
+
fontWeightSemibold: "--tiger-font-weight-semibold",
|
|
17106
|
+
fontWeightBold: "--tiger-font-weight-bold",
|
|
17107
|
+
lineHeightNormal: "--tiger-line-height-normal",
|
|
17108
|
+
lineHeightTight: "--tiger-line-height-tight"
|
|
17109
|
+
},
|
|
17110
|
+
radius: {
|
|
17111
|
+
none: "--tiger-radius-none",
|
|
17112
|
+
sm: "--tiger-radius-sm",
|
|
17113
|
+
md: "--tiger-radius-md",
|
|
17114
|
+
lg: "--tiger-radius-lg",
|
|
17115
|
+
xl: "--tiger-radius-xl",
|
|
17116
|
+
full: "--tiger-radius-full"
|
|
17117
|
+
},
|
|
17118
|
+
shadows: {
|
|
17119
|
+
xs: "--tiger-shadow-xs",
|
|
17120
|
+
sm: "--tiger-shadow-sm",
|
|
17121
|
+
md: "--tiger-shadow-md",
|
|
17122
|
+
lg: "--tiger-shadow-lg",
|
|
17123
|
+
xl: "--tiger-shadow-xl"
|
|
17124
|
+
},
|
|
17125
|
+
spacing: {
|
|
17126
|
+
xs: "--tiger-spacing-xs",
|
|
17127
|
+
sm: "--tiger-spacing-sm",
|
|
17128
|
+
md: "--tiger-spacing-md",
|
|
17129
|
+
lg: "--tiger-spacing-lg",
|
|
17130
|
+
xl: "--tiger-spacing-xl"
|
|
17131
|
+
},
|
|
17132
|
+
motion: {
|
|
17133
|
+
durationFast: "--tiger-duration-fast",
|
|
17134
|
+
durationBase: "--tiger-duration-base",
|
|
17135
|
+
durationSlow: "--tiger-duration-slow",
|
|
17136
|
+
easing: "--tiger-easing"
|
|
17137
|
+
}
|
|
17138
|
+
};
|
|
17139
|
+
function themeConfigToCssVars(config) {
|
|
16279
17140
|
const vars = {};
|
|
16280
|
-
|
|
16281
|
-
const
|
|
16282
|
-
|
|
16283
|
-
vars[varName] = value;
|
|
17141
|
+
if (config.colors) {
|
|
17142
|
+
for (const [key, value] of Object.entries(config.colors)) {
|
|
17143
|
+
const varName = THEME_CSS_VARS[key];
|
|
17144
|
+
if (varName && value) vars[varName] = value;
|
|
16284
17145
|
}
|
|
16285
17146
|
}
|
|
16286
|
-
|
|
17147
|
+
for (const section of ["typography", "radius", "shadows", "spacing", "motion"]) {
|
|
17148
|
+
const values = config[section];
|
|
17149
|
+
if (!values) continue;
|
|
17150
|
+
const varNames = THEME_CONFIG_CSS_VARS[section];
|
|
17151
|
+
for (const [key, value] of Object.entries(values)) {
|
|
17152
|
+
const varName = varNames[key];
|
|
17153
|
+
if (varName && value) vars[varName] = value;
|
|
17154
|
+
}
|
|
17155
|
+
}
|
|
17156
|
+
return vars;
|
|
16287
17157
|
}
|
|
16288
|
-
function
|
|
16289
|
-
removeCssVarsCached(target,
|
|
17158
|
+
function clearThemeConfig(target) {
|
|
17159
|
+
removeCssVarsCached(target, [
|
|
17160
|
+
...Object.values(THEME_CSS_VARS),
|
|
17161
|
+
...Object.values(THEME_CONFIG_CSS_VARS.typography),
|
|
17162
|
+
...Object.values(THEME_CONFIG_CSS_VARS.radius),
|
|
17163
|
+
...Object.values(THEME_CONFIG_CSS_VARS.shadows),
|
|
17164
|
+
...Object.values(THEME_CONFIG_CSS_VARS.spacing),
|
|
17165
|
+
...Object.values(THEME_CONFIG_CSS_VARS.motion)
|
|
17166
|
+
]);
|
|
16290
17167
|
}
|
|
16291
17168
|
function resolveSystemDark() {
|
|
16292
17169
|
if (!isBrowser()) return false;
|
|
@@ -16383,12 +17260,10 @@ var ThemeManagerImpl = class {
|
|
|
16383
17260
|
if (!isBrowser()) return;
|
|
16384
17261
|
const root = document.documentElement;
|
|
16385
17262
|
const preset = this.presets.get(this.currentThemeName);
|
|
16386
|
-
|
|
17263
|
+
clearThemeConfig(root);
|
|
16387
17264
|
if (preset) {
|
|
16388
17265
|
const config = this.resolvedDark ? preset.dark : preset.light;
|
|
16389
|
-
|
|
16390
|
-
applyColors(config.colors, root);
|
|
16391
|
-
}
|
|
17266
|
+
setCssVarsCached(root, themeConfigToCssVars(config));
|
|
16392
17267
|
}
|
|
16393
17268
|
if (this.resolvedDark) {
|
|
16394
17269
|
root.classList.add("dark");
|
|
@@ -16427,93 +17302,6 @@ var ThemeManagerImpl = class {
|
|
|
16427
17302
|
};
|
|
16428
17303
|
var ThemeManager = new ThemeManagerImpl();
|
|
16429
17304
|
|
|
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
17305
|
// src/themes/vibrant/theme.ts
|
|
16518
17306
|
var vibrantTheme = {
|
|
16519
17307
|
name: "vibrant",
|
|
@@ -17127,7 +17915,6 @@ var primitiveColors = {
|
|
|
17127
17915
|
"950": "#0a0a0a"
|
|
17128
17916
|
}
|
|
17129
17917
|
};
|
|
17130
|
-
var globalColors = primitiveColors;
|
|
17131
17918
|
var primitiveSpace = {
|
|
17132
17919
|
xs: "2px",
|
|
17133
17920
|
sm: "4px",
|
|
@@ -17138,7 +17925,6 @@ var primitiveSpace = {
|
|
|
17138
17925
|
"3xl": "48px",
|
|
17139
17926
|
"4xl": "64px"
|
|
17140
17927
|
};
|
|
17141
|
-
var globalSpace = primitiveSpace;
|
|
17142
17928
|
var primitiveRadius = {
|
|
17143
17929
|
none: "0",
|
|
17144
17930
|
sm: "2px",
|
|
@@ -17147,7 +17933,6 @@ var primitiveRadius = {
|
|
|
17147
17933
|
xl: "12px",
|
|
17148
17934
|
full: "9999px"
|
|
17149
17935
|
};
|
|
17150
|
-
var globalRadius = primitiveRadius;
|
|
17151
17936
|
var primitiveShadow = {
|
|
17152
17937
|
xs: "0 1px 2px 0 rgba(0,0,0,0.05)",
|
|
17153
17938
|
sm: "0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px -1px rgba(0,0,0,0.1)",
|
|
@@ -17155,7 +17940,6 @@ var primitiveShadow = {
|
|
|
17155
17940
|
lg: "0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1)",
|
|
17156
17941
|
xl: "0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1)"
|
|
17157
17942
|
};
|
|
17158
|
-
var globalShadow = primitiveShadow;
|
|
17159
17943
|
var primitiveFont = {
|
|
17160
17944
|
family: {
|
|
17161
17945
|
base: "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif",
|
|
@@ -17184,14 +17968,12 @@ var primitiveFont = {
|
|
|
17184
17968
|
loose: "2"
|
|
17185
17969
|
}
|
|
17186
17970
|
};
|
|
17187
|
-
var globalFont = primitiveFont;
|
|
17188
17971
|
var primitiveDuration = {
|
|
17189
17972
|
fast: "100ms",
|
|
17190
17973
|
base: "200ms",
|
|
17191
17974
|
slow: "300ms",
|
|
17192
17975
|
slower: "500ms"
|
|
17193
17976
|
};
|
|
17194
|
-
var globalDuration = primitiveDuration;
|
|
17195
17977
|
var primitiveEasing = {
|
|
17196
17978
|
in: "cubic-bezier(0.4, 0, 1, 1)",
|
|
17197
17979
|
out: "cubic-bezier(0, 0, 0.2, 1)",
|
|
@@ -17199,7 +17981,6 @@ var primitiveEasing = {
|
|
|
17199
17981
|
spring: "cubic-bezier(0.34, 1.56, 0.64, 1)",
|
|
17200
17982
|
smooth: "cubic-bezier(0.25, 0.1, 0.25, 1)"
|
|
17201
17983
|
};
|
|
17202
|
-
var globalEasing = primitiveEasing;
|
|
17203
17984
|
var semanticTokens = {
|
|
17204
17985
|
color: {
|
|
17205
17986
|
"bg-primary": "#f0f9ff",
|
|
@@ -17249,7 +18030,6 @@ var semanticTokens = {
|
|
|
17249
18030
|
pill: "9999px"
|
|
17250
18031
|
}
|
|
17251
18032
|
};
|
|
17252
|
-
var aliasTokens = semanticTokens;
|
|
17253
18033
|
var componentTokens = {
|
|
17254
18034
|
button: {
|
|
17255
18035
|
"height-sm": "32px",
|
|
@@ -17456,7 +18236,7 @@ var designTokens = {
|
|
|
17456
18236
|
};
|
|
17457
18237
|
|
|
17458
18238
|
// src/index.ts
|
|
17459
|
-
var version = "
|
|
18239
|
+
var version = "2.0.0-preview.1";
|
|
17460
18240
|
export {
|
|
17461
18241
|
ANIMATION_DURATION_FAST_MS,
|
|
17462
18242
|
ANIMATION_DURATION_MS,
|
|
@@ -17465,23 +18245,26 @@ export {
|
|
|
17465
18245
|
COUNTDOWN_DEFAULT_FORMAT,
|
|
17466
18246
|
COUNTDOWN_DEFAULT_INTERVAL_MS,
|
|
17467
18247
|
CROP_HANDLES,
|
|
17468
|
-
|
|
17469
|
-
ChevronLeftIconPath,
|
|
17470
|
-
ChevronRightIconPath,
|
|
17471
|
-
ClockIconPath,
|
|
17472
|
-
CloseIconPath,
|
|
18248
|
+
DEFAULT_CALENDAR_LABELS,
|
|
17473
18249
|
DEFAULT_CHART_COLORS,
|
|
18250
|
+
DEFAULT_FILE_MANAGER_LABELS,
|
|
17474
18251
|
DEFAULT_FORM_VALIDATION_LABELS,
|
|
17475
18252
|
DEFAULT_FORM_WIZARD_LABELS,
|
|
17476
18253
|
DEFAULT_HEATMAP_CANVAS_THRESHOLD,
|
|
18254
|
+
DEFAULT_IMAGE_EDITOR_LABELS,
|
|
18255
|
+
DEFAULT_IMAGE_VIEWER_LABELS,
|
|
17477
18256
|
DEFAULT_PAGINATION_LABELS,
|
|
18257
|
+
DEFAULT_STATUS_LABELS,
|
|
17478
18258
|
DEFAULT_TABLE_LABELS,
|
|
17479
18259
|
DEFAULT_TASK_BOARD_LABELS,
|
|
17480
18260
|
DEFAULT_TIME_PICKER_LABELS,
|
|
18261
|
+
DEFAULT_TOUR_LABELS,
|
|
17481
18262
|
DEFAULT_UPLOAD_CHUNK_SIZE,
|
|
17482
18263
|
DEFAULT_UPLOAD_LABELS,
|
|
17483
18264
|
DONUT_BASE_SHADOW,
|
|
17484
18265
|
DONUT_EMPHASIS_SHADOW,
|
|
18266
|
+
DONUT_ENTRANCE_CLASS,
|
|
18267
|
+
DONUT_ENTRANCE_KEYFRAMES,
|
|
17485
18268
|
DROPDOWN_CHEVRON_PATH,
|
|
17486
18269
|
DROPDOWN_ENTER_CLASS,
|
|
17487
18270
|
DURATION_CLASS,
|
|
@@ -17492,7 +18275,7 @@ export {
|
|
|
17492
18275
|
EASING_LEAVE,
|
|
17493
18276
|
EASING_SMOOTH,
|
|
17494
18277
|
EASING_SPRING,
|
|
17495
|
-
EN_US_DATEPICKER_LOCALE,
|
|
18278
|
+
EN_US_DATEPICKER_LOCALE2 as EN_US_DATEPICKER_LOCALE,
|
|
17496
18279
|
FLOATING_OVERLAY_Z_INDEX,
|
|
17497
18280
|
FORM_VALIDATION_PRESETS,
|
|
17498
18281
|
GAUGE_ANIMATION_DURATION_MS,
|
|
@@ -17511,6 +18294,7 @@ export {
|
|
|
17511
18294
|
POPOVER_TEXT_CLASSES,
|
|
17512
18295
|
POPOVER_TITLE_CLASSES,
|
|
17513
18296
|
RADAR_SPLIT_AREA_COLORS,
|
|
18297
|
+
RESIZE_KEYBOARD_STEP,
|
|
17514
18298
|
SCATTER_ENTRANCE_CLASS,
|
|
17515
18299
|
SCATTER_ENTRANCE_KEYFRAMES,
|
|
17516
18300
|
SHAKE_CLASS,
|
|
@@ -17523,8 +18307,8 @@ export {
|
|
|
17523
18307
|
SVG_DEFAULT_VIEWBOX_24,
|
|
17524
18308
|
SVG_DEFAULT_XMLNS,
|
|
17525
18309
|
SVG_PATH_ANIMATION_CSS,
|
|
17526
|
-
TABLE_AUTO_VIRTUAL_THRESHOLD,
|
|
17527
18310
|
TABLE_VIRTUAL_RECOMMENDATION_THRESHOLD,
|
|
18311
|
+
THEME_CONFIG_CSS_VARS,
|
|
17528
18312
|
THEME_CSS_VARS,
|
|
17529
18313
|
TIGER_BREAKPOINT_CSS_VALUES,
|
|
17530
18314
|
TIGER_VIEWPORT_BREAKPOINTS,
|
|
@@ -17533,16 +18317,20 @@ export {
|
|
|
17533
18317
|
TRANSITION_OPACITY,
|
|
17534
18318
|
TRANSITION_TRANSFORM,
|
|
17535
18319
|
ThemeManager,
|
|
17536
|
-
TimePickerCloseIconPath,
|
|
17537
18320
|
VIEW_TRANSITION_CSS,
|
|
17538
18321
|
WEEKDAYS,
|
|
17539
|
-
|
|
18322
|
+
ZH_CN_CALENDAR_LABELS,
|
|
18323
|
+
ZH_CN_FILE_MANAGER_LABELS,
|
|
17540
18324
|
ZH_CN_FORM_VALIDATION_LABELS,
|
|
17541
18325
|
ZH_CN_FORM_WIZARD_LABELS,
|
|
18326
|
+
ZH_CN_IMAGE_EDITOR_LABELS,
|
|
18327
|
+
ZH_CN_IMAGE_VIEWER_LABELS,
|
|
17542
18328
|
ZH_CN_PAGINATION_LABELS,
|
|
18329
|
+
ZH_CN_STATUS_LABELS,
|
|
17543
18330
|
ZH_CN_TABLE_LABELS,
|
|
17544
18331
|
ZH_CN_TASK_BOARD_LABELS,
|
|
17545
18332
|
ZH_CN_TIME_PICKER_LABELS,
|
|
18333
|
+
ZH_CN_TOUR_LABELS,
|
|
17546
18334
|
ZH_CN_UPLOAD_LABELS,
|
|
17547
18335
|
activeOpacityClasses,
|
|
17548
18336
|
activePressClasses,
|
|
@@ -17570,7 +18358,6 @@ export {
|
|
|
17570
18358
|
alertIconSizeClasses,
|
|
17571
18359
|
alertSizeClasses,
|
|
17572
18360
|
alertTitleSizeClasses,
|
|
17573
|
-
aliasTokens,
|
|
17574
18361
|
anchorAffixClasses,
|
|
17575
18362
|
anchorBaseClasses,
|
|
17576
18363
|
anchorInkActiveHorizontalClasses,
|
|
@@ -17606,6 +18393,7 @@ export {
|
|
|
17606
18393
|
avatarImageClasses,
|
|
17607
18394
|
avatarShapeClasses,
|
|
17608
18395
|
avatarSizeClasses,
|
|
18396
|
+
backTopBaseClasses,
|
|
17609
18397
|
backTopButtonClasses,
|
|
17610
18398
|
backTopContainerClasses,
|
|
17611
18399
|
backTopHiddenClasses,
|
|
@@ -17652,6 +18440,7 @@ export {
|
|
|
17652
18440
|
calculateResizeDelta,
|
|
17653
18441
|
calculateStepStatus,
|
|
17654
18442
|
calculateTransform,
|
|
18443
|
+
calculateVirtualColumnRange,
|
|
17655
18444
|
calculateVirtualRange,
|
|
17656
18445
|
calendarHeaderClasses,
|
|
17657
18446
|
calendarNavButtonClasses,
|
|
@@ -17703,6 +18492,7 @@ export {
|
|
|
17703
18492
|
chartCanvasBaseClasses,
|
|
17704
18493
|
chartGridLineClasses,
|
|
17705
18494
|
chartInteractiveClasses,
|
|
18495
|
+
chatStatusBarBaseClasses,
|
|
17706
18496
|
checkSolidIcon20PathD,
|
|
17707
18497
|
checkboxLabelSizeClasses,
|
|
17708
18498
|
checkboxSizeClasses2 as checkboxSizeClasses,
|
|
@@ -17741,6 +18531,8 @@ export {
|
|
|
17741
18531
|
codeBlockCopyButtonBaseClasses,
|
|
17742
18532
|
codeBlockCopyButtonCopiedClasses,
|
|
17743
18533
|
codeBlockPreClasses,
|
|
18534
|
+
codeEditorActiveLineDarkClasses,
|
|
18535
|
+
codeEditorActiveLineLightClasses,
|
|
17744
18536
|
codeEditorBaseClasses,
|
|
17745
18537
|
codeEditorDarkClasses,
|
|
17746
18538
|
codeEditorDisabledClasses,
|
|
@@ -17946,6 +18738,7 @@ export {
|
|
|
17946
18738
|
downloadCsv,
|
|
17947
18739
|
downloadExcel,
|
|
17948
18740
|
downloadTableExport,
|
|
18741
|
+
downsampleSeriesData,
|
|
17949
18742
|
drawSignatureStrokes,
|
|
17950
18743
|
dynamicSizeStrategy,
|
|
17951
18744
|
easeOutCubic2 as easeOutCubic,
|
|
@@ -17996,6 +18789,7 @@ export {
|
|
|
17996
18789
|
filterHiddenFiles,
|
|
17997
18790
|
filterMenuItems,
|
|
17998
18791
|
filterOptions,
|
|
18792
|
+
filterTableData,
|
|
17999
18793
|
filterTransferItems,
|
|
18000
18794
|
filterTreeNodes,
|
|
18001
18795
|
filterTreeSelectNodes,
|
|
@@ -18034,6 +18828,7 @@ export {
|
|
|
18034
18828
|
focusTimePickerOption,
|
|
18035
18829
|
formatActivityTime,
|
|
18036
18830
|
formatBadgeContent,
|
|
18831
|
+
formatBytes,
|
|
18037
18832
|
formatChatTime,
|
|
18038
18833
|
formatColorString,
|
|
18039
18834
|
formatCommentTime,
|
|
@@ -18075,6 +18870,7 @@ export {
|
|
|
18075
18870
|
getAccessibleTransitionClasses,
|
|
18076
18871
|
getActiveElement,
|
|
18077
18872
|
getActiveIndex,
|
|
18873
|
+
getActiveLineIndex,
|
|
18078
18874
|
getActiveTourStepPosition,
|
|
18079
18875
|
getActiveTourSteps,
|
|
18080
18876
|
getAlertIconPath,
|
|
@@ -18112,6 +18908,7 @@ export {
|
|
|
18112
18908
|
getCalendarContainerClasses,
|
|
18113
18909
|
getCalendarDayClasses,
|
|
18114
18910
|
getCalendarDays,
|
|
18911
|
+
getCalendarLabels,
|
|
18115
18912
|
getCalendarMonthClasses,
|
|
18116
18913
|
getCalendarMonthDaysCacheSize,
|
|
18117
18914
|
getCardClasses,
|
|
@@ -18138,6 +18935,7 @@ export {
|
|
|
18138
18935
|
getChartSvgDataUrl,
|
|
18139
18936
|
getChartTooltipTransform,
|
|
18140
18937
|
getChatMessageStatusInfo,
|
|
18938
|
+
getChatStatusBarClasses,
|
|
18141
18939
|
getCheckboxCellClasses,
|
|
18142
18940
|
getCheckboxClasses,
|
|
18143
18941
|
getCheckboxLabelClasses,
|
|
@@ -18145,6 +18943,7 @@ export {
|
|
|
18145
18943
|
getCircleSize,
|
|
18146
18944
|
getCodeBlockContainerClasses,
|
|
18147
18945
|
getCodeBlockCopyButtonClasses,
|
|
18946
|
+
getCodeEditorActiveLineClasses,
|
|
18148
18947
|
getCodeEditorContainerClasses,
|
|
18149
18948
|
getColGutterClasses,
|
|
18150
18949
|
getColMergedStyleVars,
|
|
@@ -18180,6 +18979,7 @@ export {
|
|
|
18180
18979
|
getCurrentActiveTourStep,
|
|
18181
18980
|
getCurrentTime,
|
|
18182
18981
|
getCyclicIndex,
|
|
18982
|
+
getDatePickerCalendarCellState,
|
|
18183
18983
|
getDatePickerDayCellClasses,
|
|
18184
18984
|
getDatePickerIconButtonClasses,
|
|
18185
18985
|
getDatePickerInputClasses,
|
|
@@ -18227,9 +19027,11 @@ export {
|
|
|
18227
19027
|
getFieldDependencies,
|
|
18228
19028
|
getFieldError,
|
|
18229
19029
|
getFileExtension2 as getFileExtension,
|
|
19030
|
+
getFileExtensionName,
|
|
18230
19031
|
getFileItemClasses,
|
|
18231
19032
|
getFileListItemClasses,
|
|
18232
19033
|
getFileManagerContainerClasses,
|
|
19034
|
+
getFileManagerLabels,
|
|
18233
19035
|
getFirstDayOfMonth,
|
|
18234
19036
|
getFirstVisibleChildKey,
|
|
18235
19037
|
getFixedColumnOffsets,
|
|
@@ -18268,9 +19070,11 @@ export {
|
|
|
18268
19070
|
getImageAnnotationStrokeColor,
|
|
18269
19071
|
getImageAnnotationToolButtonClasses,
|
|
18270
19072
|
getImageAnnotationToolLabel,
|
|
19073
|
+
getImageEditorLabels,
|
|
18271
19074
|
getImageGroupClasses,
|
|
18272
19075
|
getImageImgClasses,
|
|
18273
19076
|
getImageTransformStyle,
|
|
19077
|
+
getImageViewerLabels,
|
|
18274
19078
|
getImmediateTigerLocale,
|
|
18275
19079
|
getInfiniteScrollContainerClasses,
|
|
18276
19080
|
getInitialCollapseContentStyle,
|
|
@@ -18338,6 +19142,7 @@ export {
|
|
|
18338
19142
|
getNextColorSwatchIndex,
|
|
18339
19143
|
getNextImageAnnotationTool,
|
|
18340
19144
|
getNextSlideIndex,
|
|
19145
|
+
getNextTableSelectAllKeys,
|
|
18341
19146
|
getNotificationIconPath,
|
|
18342
19147
|
getNotificationTypeClasses,
|
|
18343
19148
|
getNumberExtent,
|
|
@@ -18410,8 +19215,9 @@ export {
|
|
|
18410
19215
|
getRadioVisualClasses,
|
|
18411
19216
|
getRateStarClasses,
|
|
18412
19217
|
getResizableHandleClasses,
|
|
19218
|
+
getResizeHandleOrientation,
|
|
19219
|
+
getResizeKeyboardDelta,
|
|
18413
19220
|
getResultColorScheme,
|
|
18414
|
-
getResultHttpLabel,
|
|
18415
19221
|
getResultIconPath,
|
|
18416
19222
|
getRichTextContainerClasses,
|
|
18417
19223
|
getRowGutterClasses,
|
|
@@ -18439,6 +19245,7 @@ export {
|
|
|
18439
19245
|
getSelectOptionClasses,
|
|
18440
19246
|
getSelectSizeClasses,
|
|
18441
19247
|
getSelectTriggerClasses,
|
|
19248
|
+
getSelectVirtualItemHeight,
|
|
18442
19249
|
getSeparatorContent,
|
|
18443
19250
|
getShortDayNames,
|
|
18444
19251
|
getShortMonthNames,
|
|
@@ -18477,6 +19284,7 @@ export {
|
|
|
18477
19284
|
getStaggeredMotionStyle,
|
|
18478
19285
|
getStatisticTitleClasses,
|
|
18479
19286
|
getStatisticValueClasses,
|
|
19287
|
+
getStatusLabels,
|
|
18480
19288
|
getStatusVariant,
|
|
18481
19289
|
getStepContentClasses,
|
|
18482
19290
|
getStepDescriptionClasses,
|
|
@@ -18512,7 +19320,9 @@ export {
|
|
|
18512
19320
|
getTableResponsiveCardListClasses,
|
|
18513
19321
|
getTableResponsiveTableClasses,
|
|
18514
19322
|
getTableRowClasses,
|
|
19323
|
+
getTableSelectionState,
|
|
18515
19324
|
getTableVirtualRecommendation,
|
|
19325
|
+
getTableVirtualWindow,
|
|
18516
19326
|
getTableWrapperClasses,
|
|
18517
19327
|
getTabsContainerClasses,
|
|
18518
19328
|
getTagVariantClasses,
|
|
@@ -18542,6 +19352,7 @@ export {
|
|
|
18542
19352
|
getTotalPages,
|
|
18543
19353
|
getTotalTextClasses,
|
|
18544
19354
|
getTouchDistance,
|
|
19355
|
+
getTourLabels,
|
|
18545
19356
|
getTourPopoverPosition,
|
|
18546
19357
|
getTourSpotlightStyle,
|
|
18547
19358
|
getTourTargetRect,
|
|
@@ -18566,6 +19377,7 @@ export {
|
|
|
18566
19377
|
getValidationOrder,
|
|
18567
19378
|
getValueByPath,
|
|
18568
19379
|
getViewTransitionNameStyle,
|
|
19380
|
+
getViewportOffsetStyle,
|
|
18569
19381
|
getViewportWidth,
|
|
18570
19382
|
getVirtualRowKey,
|
|
18571
19383
|
getVirtualTableContainerClasses,
|
|
@@ -18578,13 +19390,6 @@ export {
|
|
|
18578
19390
|
getVisibleGroupItems,
|
|
18579
19391
|
getVisibleTreeItems,
|
|
18580
19392
|
getWatermarkOverlayStyle,
|
|
18581
|
-
globalColors,
|
|
18582
|
-
globalDuration,
|
|
18583
|
-
globalEasing,
|
|
18584
|
-
globalFont,
|
|
18585
|
-
globalRadius,
|
|
18586
|
-
globalShadow,
|
|
18587
|
-
globalSpace,
|
|
18588
19393
|
groupBySwimlane,
|
|
18589
19394
|
groupDataByColumn,
|
|
18590
19395
|
groupItemsIntoRows,
|
|
@@ -18600,6 +19405,7 @@ export {
|
|
|
18600
19405
|
handleUploadDrop,
|
|
18601
19406
|
hasErrors,
|
|
18602
19407
|
hasGutter,
|
|
19408
|
+
hasTableSelectionColumn,
|
|
18603
19409
|
hexToRgb2 as hexToRgb,
|
|
18604
19410
|
highContrastTheme,
|
|
18605
19411
|
hsvToRgb,
|
|
@@ -18695,6 +19501,7 @@ export {
|
|
|
18695
19501
|
isEscapeKey,
|
|
18696
19502
|
isEventOutside,
|
|
18697
19503
|
isHTMLElement,
|
|
19504
|
+
isHttpResultStatus,
|
|
18698
19505
|
isImageAnnotationPathClosed,
|
|
18699
19506
|
isImageAnnotationShapeTool,
|
|
18700
19507
|
isInlineFormat,
|
|
@@ -18846,6 +19653,7 @@ export {
|
|
|
18846
19653
|
moveItemBetweenContainers,
|
|
18847
19654
|
movePan,
|
|
18848
19655
|
movePinch,
|
|
19656
|
+
moveTransferItems,
|
|
18849
19657
|
naturalTheme,
|
|
18850
19658
|
navigateToFolder,
|
|
18851
19659
|
nextIconPath,
|
|
@@ -18865,6 +19673,9 @@ export {
|
|
|
18865
19673
|
normalizeSpotlightText,
|
|
18866
19674
|
normalizeStringOption,
|
|
18867
19675
|
normalizeSvgAttrs,
|
|
19676
|
+
notificationActionButtonClasses,
|
|
19677
|
+
notificationActionButtonTypeClasses,
|
|
19678
|
+
notificationActionsClasses,
|
|
18868
19679
|
notificationBaseClasses,
|
|
18869
19680
|
notificationCloseButtonClasses,
|
|
18870
19681
|
notificationCloseIconClasses,
|
|
@@ -19001,6 +19812,7 @@ export {
|
|
|
19001
19812
|
resolveCarouselSwipeDirection,
|
|
19002
19813
|
resolveChartPalette,
|
|
19003
19814
|
resolveChartTooltipContent,
|
|
19815
|
+
resolveChartTooltipPosition,
|
|
19004
19816
|
resolveConditionalFormRules,
|
|
19005
19817
|
resolveCreatableSelectOption,
|
|
19006
19818
|
resolveDragConfig,
|
|
@@ -19035,6 +19847,8 @@ export {
|
|
|
19035
19847
|
richTextContainerDisabled,
|
|
19036
19848
|
richTextEditorAreaBase,
|
|
19037
19849
|
richTextEditorAreaReadOnly,
|
|
19850
|
+
richTextHtmlToMode,
|
|
19851
|
+
richTextModeToHtml,
|
|
19038
19852
|
richTextPlaceholderClasses,
|
|
19039
19853
|
richTextToolbarButtonActive,
|
|
19040
19854
|
richTextToolbarButtonBase,
|
|
@@ -19057,6 +19871,8 @@ export {
|
|
|
19057
19871
|
scrollToScrollSpyItem,
|
|
19058
19872
|
scrollToTop,
|
|
19059
19873
|
selectBaseClasses,
|
|
19874
|
+
selectDoneActionClasses,
|
|
19875
|
+
selectDoneButtonClasses,
|
|
19060
19876
|
selectDropdownBaseClasses,
|
|
19061
19877
|
selectEmptyStateClasses,
|
|
19062
19878
|
selectGroupLabelClasses,
|
|
@@ -19096,6 +19912,7 @@ export {
|
|
|
19096
19912
|
sliderGetValueFromPosition,
|
|
19097
19913
|
sliderNormalizeValue,
|
|
19098
19914
|
sliderRangeClasses,
|
|
19915
|
+
sliderResolveMarks,
|
|
19099
19916
|
sliderSizeClasses,
|
|
19100
19917
|
sliderThumbClasses,
|
|
19101
19918
|
sliderTooltipClasses,
|
|
@@ -19145,6 +19962,9 @@ export {
|
|
|
19145
19962
|
statusSuccessIconPath,
|
|
19146
19963
|
statusWarningIconPath,
|
|
19147
19964
|
stepFinishChar,
|
|
19965
|
+
stepFinishIconPathD,
|
|
19966
|
+
stepFinishIconStrokeWidth,
|
|
19967
|
+
stepFinishIconViewBox,
|
|
19148
19968
|
stepValue,
|
|
19149
19969
|
stepperBaseClasses,
|
|
19150
19970
|
stepperIconViewBox,
|
|
@@ -19231,6 +20051,7 @@ export {
|
|
|
19231
20051
|
textDecorationClasses,
|
|
19232
20052
|
textSizeClasses,
|
|
19233
20053
|
textWeightClasses,
|
|
20054
|
+
themeConfigToCssVars,
|
|
19234
20055
|
tigercatDarkTheme,
|
|
19235
20056
|
tigercatPlugin,
|
|
19236
20057
|
tigercatTheme,
|
|
@@ -19327,6 +20148,8 @@ export {
|
|
|
19327
20148
|
variableSizeStrategy,
|
|
19328
20149
|
version,
|
|
19329
20150
|
vibrantTheme,
|
|
20151
|
+
viewportFloatingBaseClasses,
|
|
20152
|
+
viewportPlacementClasses,
|
|
19330
20153
|
virtualListContainerClasses,
|
|
19331
20154
|
virtualListInnerClasses,
|
|
19332
20155
|
virtualTableBorderedClasses,
|