@expcat/tigercat-core 1.3.4 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{datepicker-DXzS_8l8.d.cts → datepicker-gSOJN_pQ.d.cts} +1 -1
- package/dist/{datepicker-DXzS_8l8.d.ts → datepicker-gSOJN_pQ.d.ts} +1 -1
- package/dist/datepicker-locales/ar-SA.d.cts +1 -1
- package/dist/datepicker-locales/ar-SA.d.ts +1 -1
- package/dist/datepicker-locales/de-DE.d.cts +1 -1
- package/dist/datepicker-locales/de-DE.d.ts +1 -1
- package/dist/datepicker-locales/en-US.d.cts +1 -1
- package/dist/datepicker-locales/en-US.d.ts +1 -1
- package/dist/datepicker-locales/es-ES.d.cts +1 -1
- package/dist/datepicker-locales/es-ES.d.ts +1 -1
- package/dist/datepicker-locales/fr-FR.d.cts +1 -1
- package/dist/datepicker-locales/fr-FR.d.ts +1 -1
- package/dist/datepicker-locales/id-ID.d.cts +1 -1
- package/dist/datepicker-locales/id-ID.d.ts +1 -1
- package/dist/datepicker-locales/ja-JP.d.cts +1 -1
- package/dist/datepicker-locales/ja-JP.d.ts +1 -1
- package/dist/datepicker-locales/ko-KR.d.cts +1 -1
- package/dist/datepicker-locales/ko-KR.d.ts +1 -1
- package/dist/datepicker-locales/pt-BR.d.cts +1 -1
- package/dist/datepicker-locales/pt-BR.d.ts +1 -1
- package/dist/datepicker-locales/th-TH.d.cts +1 -1
- package/dist/datepicker-locales/th-TH.d.ts +1 -1
- package/dist/datepicker-locales/vi-VN.d.cts +1 -1
- package/dist/datepicker-locales/vi-VN.d.ts +1 -1
- package/dist/datepicker-locales/zh-CN.d.cts +1 -1
- package/dist/datepicker-locales/zh-CN.d.ts +1 -1
- package/dist/datepicker-locales/zh-TW.d.cts +1 -1
- package/dist/datepicker-locales/zh-TW.d.ts +1 -1
- package/dist/icons/registry.cjs +1 -3
- package/dist/icons/registry.js +1 -3
- package/dist/index.cjs +2094 -715
- package/dist/index.d.cts +811 -319
- package/dist/index.d.ts +811 -319
- package/dist/index.js +2023 -712
- package/dist/locale-BTAo7XO1.d.cts +392 -0
- package/dist/locale-hhhI2kH6.d.ts +392 -0
- package/dist/locales/ar-SA.cjs +357 -4
- package/dist/locales/ar-SA.d.cts +2 -2
- package/dist/locales/ar-SA.d.ts +2 -2
- package/dist/locales/ar-SA.js +357 -4
- package/dist/locales/de-DE.cjs +357 -4
- package/dist/locales/de-DE.d.cts +2 -2
- package/dist/locales/de-DE.d.ts +2 -2
- package/dist/locales/de-DE.js +357 -4
- package/dist/locales/en-US.cjs +159 -2
- package/dist/locales/en-US.d.cts +2 -2
- package/dist/locales/en-US.d.ts +2 -2
- package/dist/locales/en-US.js +157 -2
- package/dist/locales/es-ES.cjs +357 -4
- package/dist/locales/es-ES.d.cts +2 -2
- package/dist/locales/es-ES.d.ts +2 -2
- package/dist/locales/es-ES.js +357 -4
- package/dist/locales/fr-FR.cjs +357 -4
- package/dist/locales/fr-FR.d.cts +2 -2
- package/dist/locales/fr-FR.d.ts +2 -2
- package/dist/locales/fr-FR.js +357 -4
- package/dist/locales/id-ID.cjs +445 -3
- package/dist/locales/id-ID.d.cts +2 -2
- package/dist/locales/id-ID.d.ts +2 -2
- package/dist/locales/id-ID.js +443 -3
- package/dist/locales/ja-JP.cjs +445 -3
- package/dist/locales/ja-JP.d.cts +2 -2
- package/dist/locales/ja-JP.d.ts +2 -2
- package/dist/locales/ja-JP.js +443 -3
- package/dist/locales/ko-KR.cjs +445 -3
- package/dist/locales/ko-KR.d.cts +2 -2
- package/dist/locales/ko-KR.d.ts +2 -2
- package/dist/locales/ko-KR.js +443 -3
- package/dist/locales/pt-BR.cjs +357 -4
- package/dist/locales/pt-BR.d.cts +2 -2
- package/dist/locales/pt-BR.d.ts +2 -2
- package/dist/locales/pt-BR.js +357 -4
- package/dist/locales/th-TH.cjs +445 -3
- package/dist/locales/th-TH.d.cts +2 -2
- package/dist/locales/th-TH.d.ts +2 -2
- package/dist/locales/th-TH.js +443 -3
- package/dist/locales/vi-VN.cjs +445 -3
- package/dist/locales/vi-VN.d.cts +2 -2
- package/dist/locales/vi-VN.d.ts +2 -2
- package/dist/locales/vi-VN.js +443 -3
- package/dist/locales/zh-CN.cjs +159 -2
- package/dist/locales/zh-CN.d.cts +2 -2
- package/dist/locales/zh-CN.d.ts +2 -2
- package/dist/locales/zh-CN.js +157 -2
- package/dist/locales/zh-TW.cjs +445 -3
- package/dist/locales/zh-TW.d.cts +2 -2
- package/dist/locales/zh-TW.d.ts +2 -2
- package/dist/locales/zh-TW.js +443 -3
- package/dist/{table-export-CZ7wtGf4.d.ts → table-export-CfdzU6Y5.d.ts} +2 -2
- package/dist/{table-export-DOqFkseW.d.cts → table-export-vfyBzKui.d.cts} +2 -2
- package/dist/tailwind/modern.cjs +76 -81
- package/dist/tailwind/modern.d.cts +2 -3
- package/dist/tailwind/modern.d.ts +2 -3
- package/dist/tailwind/modern.js +76 -81
- package/dist/{tailwind-entry-D4_sseNi.d.ts → tailwind-entry-CNBAH7iv.d.cts} +7 -41
- package/dist/{tailwind-entry-DUchHtjs.d.cts → tailwind-entry-CNBAH7iv.d.ts} +7 -41
- package/dist/tailwind.cjs +123 -70
- package/dist/tailwind.d.cts +2 -3
- package/dist/tailwind.d.ts +2 -3
- package/dist/tailwind.js +123 -70
- package/dist/utils/table-export.cjs +7 -0
- package/dist/utils/table-export.d.cts +3 -3
- package/dist/utils/table-export.d.ts +3 -3
- package/dist/utils/table-export.js +7 -0
- package/package.json +5 -12
- package/dist/locale-BuZwW3Ok.d.ts +0 -135
- package/dist/locale-DDFn0b6z.d.cts +0 -135
- package/dist/types-CJYAW1ql.d-DDBFn6KB.d.cts +0 -126
- package/dist/types-CJYAW1ql.d-DDBFn6KB.d.ts +0 -126
package/dist/index.cjs
CHANGED
|
@@ -42,15 +42,26 @@ __export(src_exports, {
|
|
|
42
42
|
ChevronRightIconPath: () => ChevronRightIconPath,
|
|
43
43
|
ClockIconPath: () => ClockIconPath,
|
|
44
44
|
CloseIconPath: () => CloseIconPath,
|
|
45
|
+
DEFAULT_CALENDAR_LABELS: () => DEFAULT_CALENDAR_LABELS,
|
|
45
46
|
DEFAULT_CHART_COLORS: () => DEFAULT_CHART_COLORS,
|
|
47
|
+
DEFAULT_FILE_MANAGER_LABELS: () => DEFAULT_FILE_MANAGER_LABELS,
|
|
48
|
+
DEFAULT_FORM_VALIDATION_LABELS: () => DEFAULT_FORM_VALIDATION_LABELS,
|
|
46
49
|
DEFAULT_FORM_WIZARD_LABELS: () => DEFAULT_FORM_WIZARD_LABELS,
|
|
47
50
|
DEFAULT_HEATMAP_CANVAS_THRESHOLD: () => DEFAULT_HEATMAP_CANVAS_THRESHOLD,
|
|
51
|
+
DEFAULT_IMAGE_EDITOR_LABELS: () => DEFAULT_IMAGE_EDITOR_LABELS,
|
|
52
|
+
DEFAULT_IMAGE_VIEWER_LABELS: () => DEFAULT_IMAGE_VIEWER_LABELS,
|
|
48
53
|
DEFAULT_PAGINATION_LABELS: () => DEFAULT_PAGINATION_LABELS,
|
|
54
|
+
DEFAULT_STATUS_LABELS: () => DEFAULT_STATUS_LABELS,
|
|
49
55
|
DEFAULT_TABLE_LABELS: () => DEFAULT_TABLE_LABELS,
|
|
50
56
|
DEFAULT_TASK_BOARD_LABELS: () => DEFAULT_TASK_BOARD_LABELS,
|
|
57
|
+
DEFAULT_TIME_PICKER_LABELS: () => DEFAULT_TIME_PICKER_LABELS,
|
|
58
|
+
DEFAULT_TOUR_LABELS: () => DEFAULT_TOUR_LABELS,
|
|
51
59
|
DEFAULT_UPLOAD_CHUNK_SIZE: () => DEFAULT_UPLOAD_CHUNK_SIZE,
|
|
60
|
+
DEFAULT_UPLOAD_LABELS: () => DEFAULT_UPLOAD_LABELS,
|
|
52
61
|
DONUT_BASE_SHADOW: () => DONUT_BASE_SHADOW,
|
|
53
62
|
DONUT_EMPHASIS_SHADOW: () => DONUT_EMPHASIS_SHADOW,
|
|
63
|
+
DONUT_ENTRANCE_CLASS: () => DONUT_ENTRANCE_CLASS,
|
|
64
|
+
DONUT_ENTRANCE_KEYFRAMES: () => DONUT_ENTRANCE_KEYFRAMES,
|
|
54
65
|
DROPDOWN_CHEVRON_PATH: () => DROPDOWN_CHEVRON_PATH,
|
|
55
66
|
DROPDOWN_ENTER_CLASS: () => DROPDOWN_ENTER_CLASS,
|
|
56
67
|
DURATION_CLASS: () => DURATION_CLASS,
|
|
@@ -61,7 +72,7 @@ __export(src_exports, {
|
|
|
61
72
|
EASING_LEAVE: () => EASING_LEAVE,
|
|
62
73
|
EASING_SMOOTH: () => EASING_SMOOTH,
|
|
63
74
|
EASING_SPRING: () => EASING_SPRING,
|
|
64
|
-
EN_US_DATEPICKER_LOCALE: () =>
|
|
75
|
+
EN_US_DATEPICKER_LOCALE: () => EN_US_DATEPICKER_LOCALE2,
|
|
65
76
|
FLOATING_OVERLAY_Z_INDEX: () => FLOATING_OVERLAY_Z_INDEX,
|
|
66
77
|
FORM_VALIDATION_PRESETS: () => FORM_VALIDATION_PRESETS,
|
|
67
78
|
GAUGE_ANIMATION_DURATION_MS: () => GAUGE_ANIMATION_DURATION_MS,
|
|
@@ -80,6 +91,7 @@ __export(src_exports, {
|
|
|
80
91
|
POPOVER_TEXT_CLASSES: () => POPOVER_TEXT_CLASSES,
|
|
81
92
|
POPOVER_TITLE_CLASSES: () => POPOVER_TITLE_CLASSES,
|
|
82
93
|
RADAR_SPLIT_AREA_COLORS: () => RADAR_SPLIT_AREA_COLORS,
|
|
94
|
+
RESIZE_KEYBOARD_STEP: () => RESIZE_KEYBOARD_STEP,
|
|
83
95
|
SCATTER_ENTRANCE_CLASS: () => SCATTER_ENTRANCE_CLASS,
|
|
84
96
|
SCATTER_ENTRANCE_KEYFRAMES: () => SCATTER_ENTRANCE_KEYFRAMES,
|
|
85
97
|
SHAKE_CLASS: () => SHAKE_CLASS,
|
|
@@ -94,6 +106,7 @@ __export(src_exports, {
|
|
|
94
106
|
SVG_PATH_ANIMATION_CSS: () => SVG_PATH_ANIMATION_CSS,
|
|
95
107
|
TABLE_AUTO_VIRTUAL_THRESHOLD: () => TABLE_AUTO_VIRTUAL_THRESHOLD,
|
|
96
108
|
TABLE_VIRTUAL_RECOMMENDATION_THRESHOLD: () => TABLE_VIRTUAL_RECOMMENDATION_THRESHOLD,
|
|
109
|
+
THEME_CONFIG_CSS_VARS: () => THEME_CONFIG_CSS_VARS,
|
|
97
110
|
THEME_CSS_VARS: () => THEME_CSS_VARS,
|
|
98
111
|
TIGER_BREAKPOINT_CSS_VALUES: () => TIGER_BREAKPOINT_CSS_VALUES,
|
|
99
112
|
TIGER_VIEWPORT_BREAKPOINTS: () => TIGER_VIEWPORT_BREAKPOINTS,
|
|
@@ -105,11 +118,20 @@ __export(src_exports, {
|
|
|
105
118
|
TimePickerCloseIconPath: () => TimePickerCloseIconPath,
|
|
106
119
|
VIEW_TRANSITION_CSS: () => VIEW_TRANSITION_CSS,
|
|
107
120
|
WEEKDAYS: () => WEEKDAYS,
|
|
108
|
-
|
|
121
|
+
ZH_CN_CALENDAR_LABELS: () => ZH_CN_CALENDAR_LABELS,
|
|
122
|
+
ZH_CN_DATEPICKER_LOCALE: () => ZH_CN_DATEPICKER_LOCALE2,
|
|
123
|
+
ZH_CN_FILE_MANAGER_LABELS: () => ZH_CN_FILE_MANAGER_LABELS,
|
|
124
|
+
ZH_CN_FORM_VALIDATION_LABELS: () => ZH_CN_FORM_VALIDATION_LABELS,
|
|
109
125
|
ZH_CN_FORM_WIZARD_LABELS: () => ZH_CN_FORM_WIZARD_LABELS,
|
|
126
|
+
ZH_CN_IMAGE_EDITOR_LABELS: () => ZH_CN_IMAGE_EDITOR_LABELS,
|
|
127
|
+
ZH_CN_IMAGE_VIEWER_LABELS: () => ZH_CN_IMAGE_VIEWER_LABELS,
|
|
110
128
|
ZH_CN_PAGINATION_LABELS: () => ZH_CN_PAGINATION_LABELS,
|
|
129
|
+
ZH_CN_STATUS_LABELS: () => ZH_CN_STATUS_LABELS,
|
|
111
130
|
ZH_CN_TABLE_LABELS: () => ZH_CN_TABLE_LABELS,
|
|
112
131
|
ZH_CN_TASK_BOARD_LABELS: () => ZH_CN_TASK_BOARD_LABELS,
|
|
132
|
+
ZH_CN_TIME_PICKER_LABELS: () => ZH_CN_TIME_PICKER_LABELS,
|
|
133
|
+
ZH_CN_TOUR_LABELS: () => ZH_CN_TOUR_LABELS,
|
|
134
|
+
ZH_CN_UPLOAD_LABELS: () => ZH_CN_UPLOAD_LABELS,
|
|
113
135
|
activeOpacityClasses: () => activeOpacityClasses,
|
|
114
136
|
activePressClasses: () => activePressClasses,
|
|
115
137
|
activityItemActionsClasses: () => activityItemActionsClasses,
|
|
@@ -119,6 +141,9 @@ __export(src_exports, {
|
|
|
119
141
|
activityItemHeaderClasses: () => activityItemHeaderClasses,
|
|
120
142
|
activityItemLayoutClasses: () => activityItemLayoutClasses,
|
|
121
143
|
activityItemTitleGroupClasses: () => activityItemTitleGroupClasses,
|
|
144
|
+
addDays: () => addDays,
|
|
145
|
+
addMonths: () => addMonths,
|
|
146
|
+
addYears: () => addYears,
|
|
122
147
|
affixWrapperClasses: () => affixWrapperClasses,
|
|
123
148
|
alertBannerClasses: () => alertBannerClasses,
|
|
124
149
|
alertBaseClasses: () => alertBaseClasses,
|
|
@@ -215,6 +240,7 @@ __export(src_exports, {
|
|
|
215
240
|
calculateResizeDelta: () => calculateResizeDelta,
|
|
216
241
|
calculateStepStatus: () => calculateStepStatus,
|
|
217
242
|
calculateTransform: () => calculateTransform,
|
|
243
|
+
calculateVirtualColumnRange: () => calculateVirtualColumnRange,
|
|
218
244
|
calculateVirtualRange: () => calculateVirtualRange,
|
|
219
245
|
calendarHeaderClasses: () => calendarHeaderClasses,
|
|
220
246
|
calendarNavButtonClasses: () => calendarNavButtonClasses,
|
|
@@ -266,6 +292,7 @@ __export(src_exports, {
|
|
|
266
292
|
chartCanvasBaseClasses: () => chartCanvasBaseClasses,
|
|
267
293
|
chartGridLineClasses: () => chartGridLineClasses,
|
|
268
294
|
chartInteractiveClasses: () => chartInteractiveClasses,
|
|
295
|
+
chatStatusBarBaseClasses: () => chatStatusBarBaseClasses,
|
|
269
296
|
checkSolidIcon20PathD: () => checkSolidIcon20PathD,
|
|
270
297
|
checkboxLabelSizeClasses: () => checkboxLabelSizeClasses,
|
|
271
298
|
checkboxSizeClasses: () => checkboxSizeClasses2,
|
|
@@ -304,6 +331,8 @@ __export(src_exports, {
|
|
|
304
331
|
codeBlockCopyButtonBaseClasses: () => codeBlockCopyButtonBaseClasses,
|
|
305
332
|
codeBlockCopyButtonCopiedClasses: () => codeBlockCopyButtonCopiedClasses,
|
|
306
333
|
codeBlockPreClasses: () => codeBlockPreClasses,
|
|
334
|
+
codeEditorActiveLineDarkClasses: () => codeEditorActiveLineDarkClasses,
|
|
335
|
+
codeEditorActiveLineLightClasses: () => codeEditorActiveLineLightClasses,
|
|
307
336
|
codeEditorBaseClasses: () => codeEditorBaseClasses,
|
|
308
337
|
codeEditorDarkClasses: () => codeEditorDarkClasses,
|
|
309
338
|
codeEditorDisabledClasses: () => codeEditorDisabledClasses,
|
|
@@ -398,6 +427,7 @@ __export(src_exports, {
|
|
|
398
427
|
createImageAnnotationBox: () => createImageAnnotationBox,
|
|
399
428
|
createImageAnnotationPath: () => createImageAnnotationPath,
|
|
400
429
|
createInfiniteScrollObserver: () => createInfiniteScrollObserver,
|
|
430
|
+
createInstanceCounter: () => createInstanceCounter,
|
|
401
431
|
createLinePath: () => createLinePath,
|
|
402
432
|
createLinearScale: () => createLinearScale,
|
|
403
433
|
createLongPressController: () => createLongPressController,
|
|
@@ -508,6 +538,7 @@ __export(src_exports, {
|
|
|
508
538
|
downloadCsv: () => downloadCsv,
|
|
509
539
|
downloadExcel: () => downloadExcel,
|
|
510
540
|
downloadTableExport: () => downloadTableExport,
|
|
541
|
+
downsampleSeriesData: () => downsampleSeriesData,
|
|
511
542
|
drawSignatureStrokes: () => drawSignatureStrokes,
|
|
512
543
|
dynamicSizeStrategy: () => dynamicSizeStrategy,
|
|
513
544
|
easeOutCubic: () => easeOutCubic2,
|
|
@@ -558,6 +589,7 @@ __export(src_exports, {
|
|
|
558
589
|
filterHiddenFiles: () => filterHiddenFiles,
|
|
559
590
|
filterMenuItems: () => filterMenuItems,
|
|
560
591
|
filterOptions: () => filterOptions,
|
|
592
|
+
filterTableData: () => filterTableData,
|
|
561
593
|
filterTransferItems: () => filterTransferItems,
|
|
562
594
|
filterTreeNodes: () => filterTreeNodes,
|
|
563
595
|
filterTreeSelectNodes: () => filterTreeSelectNodes,
|
|
@@ -593,8 +625,10 @@ __export(src_exports, {
|
|
|
593
625
|
focusMenuEdge: () => focusMenuEdge,
|
|
594
626
|
focusRingClasses: () => focusRingClasses,
|
|
595
627
|
focusRingInsetClasses: () => focusRingInsetClasses,
|
|
628
|
+
focusTimePickerOption: () => focusTimePickerOption,
|
|
596
629
|
formatActivityTime: () => formatActivityTime,
|
|
597
630
|
formatBadgeContent: () => formatBadgeContent,
|
|
631
|
+
formatBytes: () => formatBytes,
|
|
598
632
|
formatChatTime: () => formatChatTime,
|
|
599
633
|
formatColorString: () => formatColorString,
|
|
600
634
|
formatCommentTime: () => formatCommentTime,
|
|
@@ -604,6 +638,7 @@ __export(src_exports, {
|
|
|
604
638
|
formatFileSize: () => formatFileSize,
|
|
605
639
|
formatFileSizeLabel: () => formatFileSizeLabel,
|
|
606
640
|
formatGanttDate: () => formatGanttDate,
|
|
641
|
+
formatInputNumberDisplay: () => formatInputNumberDisplay,
|
|
607
642
|
formatIntlNumber: () => formatIntlNumber,
|
|
608
643
|
formatMonthYear: () => formatMonthYear,
|
|
609
644
|
formatPageAriaLabel: () => formatPageAriaLabel,
|
|
@@ -635,6 +670,7 @@ __export(src_exports, {
|
|
|
635
670
|
getAccessibleTransitionClasses: () => getAccessibleTransitionClasses,
|
|
636
671
|
getActiveElement: () => getActiveElement,
|
|
637
672
|
getActiveIndex: () => getActiveIndex,
|
|
673
|
+
getActiveLineIndex: () => getActiveLineIndex,
|
|
638
674
|
getActiveTourStepPosition: () => getActiveTourStepPosition,
|
|
639
675
|
getActiveTourSteps: () => getActiveTourSteps,
|
|
640
676
|
getAlertIconPath: () => getAlertIconPath,
|
|
@@ -672,6 +708,7 @@ __export(src_exports, {
|
|
|
672
708
|
getCalendarContainerClasses: () => getCalendarContainerClasses,
|
|
673
709
|
getCalendarDayClasses: () => getCalendarDayClasses,
|
|
674
710
|
getCalendarDays: () => getCalendarDays,
|
|
711
|
+
getCalendarLabels: () => getCalendarLabels,
|
|
675
712
|
getCalendarMonthClasses: () => getCalendarMonthClasses,
|
|
676
713
|
getCalendarMonthDaysCacheSize: () => getCalendarMonthDaysCacheSize,
|
|
677
714
|
getCardClasses: () => getCardClasses,
|
|
@@ -698,6 +735,7 @@ __export(src_exports, {
|
|
|
698
735
|
getChartSvgDataUrl: () => getChartSvgDataUrl,
|
|
699
736
|
getChartTooltipTransform: () => getChartTooltipTransform,
|
|
700
737
|
getChatMessageStatusInfo: () => getChatMessageStatusInfo,
|
|
738
|
+
getChatStatusBarClasses: () => getChatStatusBarClasses,
|
|
701
739
|
getCheckboxCellClasses: () => getCheckboxCellClasses,
|
|
702
740
|
getCheckboxClasses: () => getCheckboxClasses,
|
|
703
741
|
getCheckboxLabelClasses: () => getCheckboxLabelClasses,
|
|
@@ -705,6 +743,7 @@ __export(src_exports, {
|
|
|
705
743
|
getCircleSize: () => getCircleSize,
|
|
706
744
|
getCodeBlockContainerClasses: () => getCodeBlockContainerClasses,
|
|
707
745
|
getCodeBlockCopyButtonClasses: () => getCodeBlockCopyButtonClasses,
|
|
746
|
+
getCodeEditorActiveLineClasses: () => getCodeEditorActiveLineClasses,
|
|
708
747
|
getCodeEditorContainerClasses: () => getCodeEditorContainerClasses,
|
|
709
748
|
getColGutterClasses: () => getColGutterClasses,
|
|
710
749
|
getColMergedStyleVars: () => getColMergedStyleVars,
|
|
@@ -739,6 +778,8 @@ __export(src_exports, {
|
|
|
739
778
|
getCropperResult: () => getCropperResult,
|
|
740
779
|
getCurrentActiveTourStep: () => getCurrentActiveTourStep,
|
|
741
780
|
getCurrentTime: () => getCurrentTime,
|
|
781
|
+
getCyclicIndex: () => getCyclicIndex,
|
|
782
|
+
getDatePickerCalendarCellState: () => getDatePickerCalendarCellState,
|
|
742
783
|
getDatePickerDayCellClasses: () => getDatePickerDayCellClasses,
|
|
743
784
|
getDatePickerIconButtonClasses: () => getDatePickerIconButtonClasses,
|
|
744
785
|
getDatePickerInputClasses: () => getDatePickerInputClasses,
|
|
@@ -786,10 +827,13 @@ __export(src_exports, {
|
|
|
786
827
|
getFieldDependencies: () => getFieldDependencies,
|
|
787
828
|
getFieldError: () => getFieldError,
|
|
788
829
|
getFileExtension: () => getFileExtension2,
|
|
830
|
+
getFileExtensionName: () => getFileExtensionName,
|
|
789
831
|
getFileItemClasses: () => getFileItemClasses,
|
|
790
832
|
getFileListItemClasses: () => getFileListItemClasses,
|
|
791
833
|
getFileManagerContainerClasses: () => getFileManagerContainerClasses,
|
|
834
|
+
getFileManagerLabels: () => getFileManagerLabels,
|
|
792
835
|
getFirstDayOfMonth: () => getFirstDayOfMonth,
|
|
836
|
+
getFirstVisibleChildKey: () => getFirstVisibleChildKey,
|
|
793
837
|
getFixedColumnOffsets: () => getFixedColumnOffsets,
|
|
794
838
|
getFixedColumnPosition: () => getFixedColumnPosition,
|
|
795
839
|
getFixedColumnStyle: () => getFixedColumnStyle,
|
|
@@ -805,6 +849,7 @@ __export(src_exports, {
|
|
|
805
849
|
getFormItemErrorClasses: () => getFormItemErrorClasses,
|
|
806
850
|
getFormItemFieldClasses: () => getFormItemFieldClasses,
|
|
807
851
|
getFormItemLabelClasses: () => getFormItemLabelClasses,
|
|
852
|
+
getFormValidationLabels: () => getFormValidationLabels,
|
|
808
853
|
getFormWizardLabels: () => getFormWizardLabels,
|
|
809
854
|
getFunnelGradientPrefix: () => getFunnelGradientPrefix,
|
|
810
855
|
getGanttDependencyPath: () => getGanttDependencyPath,
|
|
@@ -825,9 +870,11 @@ __export(src_exports, {
|
|
|
825
870
|
getImageAnnotationStrokeColor: () => getImageAnnotationStrokeColor,
|
|
826
871
|
getImageAnnotationToolButtonClasses: () => getImageAnnotationToolButtonClasses,
|
|
827
872
|
getImageAnnotationToolLabel: () => getImageAnnotationToolLabel,
|
|
873
|
+
getImageEditorLabels: () => getImageEditorLabels,
|
|
828
874
|
getImageGroupClasses: () => getImageGroupClasses,
|
|
829
875
|
getImageImgClasses: () => getImageImgClasses,
|
|
830
876
|
getImageTransformStyle: () => getImageTransformStyle,
|
|
877
|
+
getImageViewerLabels: () => getImageViewerLabels,
|
|
831
878
|
getImmediateTigerLocale: () => getImmediateTigerLocale,
|
|
832
879
|
getInfiniteScrollContainerClasses: () => getInfiniteScrollContainerClasses,
|
|
833
880
|
getInitialCollapseContentStyle: () => getInitialCollapseContentStyle,
|
|
@@ -884,6 +931,7 @@ __export(src_exports, {
|
|
|
884
931
|
getMenuItemClasses: () => getMenuItemClasses,
|
|
885
932
|
getMenuItemIndent: () => getMenuItemIndent,
|
|
886
933
|
getMenuItems: () => getMenuItems,
|
|
934
|
+
getMenuNavigationKeys: () => getMenuNavigationKeys,
|
|
887
935
|
getMessageIconPath: () => getMessageIconPath,
|
|
888
936
|
getMessageTypeClasses: () => getMessageTypeClasses,
|
|
889
937
|
getModalContainerClasses: () => getModalContainerClasses,
|
|
@@ -894,6 +942,7 @@ __export(src_exports, {
|
|
|
894
942
|
getNextColorSwatchIndex: () => getNextColorSwatchIndex,
|
|
895
943
|
getNextImageAnnotationTool: () => getNextImageAnnotationTool,
|
|
896
944
|
getNextSlideIndex: () => getNextSlideIndex,
|
|
945
|
+
getNextTableSelectAllKeys: () => getNextTableSelectAllKeys,
|
|
897
946
|
getNotificationIconPath: () => getNotificationIconPath,
|
|
898
947
|
getNotificationTypeClasses: () => getNotificationTypeClasses,
|
|
899
948
|
getNumberExtent: () => getNumberExtent,
|
|
@@ -966,6 +1015,8 @@ __export(src_exports, {
|
|
|
966
1015
|
getRadioVisualClasses: () => getRadioVisualClasses,
|
|
967
1016
|
getRateStarClasses: () => getRateStarClasses,
|
|
968
1017
|
getResizableHandleClasses: () => getResizableHandleClasses,
|
|
1018
|
+
getResizeHandleOrientation: () => getResizeHandleOrientation,
|
|
1019
|
+
getResizeKeyboardDelta: () => getResizeKeyboardDelta,
|
|
969
1020
|
getResultColorScheme: () => getResultColorScheme,
|
|
970
1021
|
getResultHttpLabel: () => getResultHttpLabel,
|
|
971
1022
|
getResultIconPath: () => getResultIconPath,
|
|
@@ -995,6 +1046,7 @@ __export(src_exports, {
|
|
|
995
1046
|
getSelectOptionClasses: () => getSelectOptionClasses,
|
|
996
1047
|
getSelectSizeClasses: () => getSelectSizeClasses,
|
|
997
1048
|
getSelectTriggerClasses: () => getSelectTriggerClasses,
|
|
1049
|
+
getSelectVirtualItemHeight: () => getSelectVirtualItemHeight,
|
|
998
1050
|
getSeparatorContent: () => getSeparatorContent,
|
|
999
1051
|
getShortDayNames: () => getShortDayNames,
|
|
1000
1052
|
getShortMonthNames: () => getShortMonthNames,
|
|
@@ -1033,6 +1085,7 @@ __export(src_exports, {
|
|
|
1033
1085
|
getStaggeredMotionStyle: () => getStaggeredMotionStyle,
|
|
1034
1086
|
getStatisticTitleClasses: () => getStatisticTitleClasses,
|
|
1035
1087
|
getStatisticValueClasses: () => getStatisticValueClasses,
|
|
1088
|
+
getStatusLabels: () => getStatusLabels,
|
|
1036
1089
|
getStatusVariant: () => getStatusVariant,
|
|
1037
1090
|
getStepContentClasses: () => getStepContentClasses,
|
|
1038
1091
|
getStepDescriptionClasses: () => getStepDescriptionClasses,
|
|
@@ -1068,7 +1121,9 @@ __export(src_exports, {
|
|
|
1068
1121
|
getTableResponsiveCardListClasses: () => getTableResponsiveCardListClasses,
|
|
1069
1122
|
getTableResponsiveTableClasses: () => getTableResponsiveTableClasses,
|
|
1070
1123
|
getTableRowClasses: () => getTableRowClasses,
|
|
1124
|
+
getTableSelectionState: () => getTableSelectionState,
|
|
1071
1125
|
getTableVirtualRecommendation: () => getTableVirtualRecommendation,
|
|
1126
|
+
getTableVirtualWindow: () => getTableVirtualWindow,
|
|
1072
1127
|
getTableWrapperClasses: () => getTableWrapperClasses,
|
|
1073
1128
|
getTabsContainerClasses: () => getTabsContainerClasses,
|
|
1074
1129
|
getTagVariantClasses: () => getTagVariantClasses,
|
|
@@ -1098,6 +1153,7 @@ __export(src_exports, {
|
|
|
1098
1153
|
getTotalPages: () => getTotalPages,
|
|
1099
1154
|
getTotalTextClasses: () => getTotalTextClasses,
|
|
1100
1155
|
getTouchDistance: () => getTouchDistance,
|
|
1156
|
+
getTourLabels: () => getTourLabels,
|
|
1101
1157
|
getTourPopoverPosition: () => getTourPopoverPosition,
|
|
1102
1158
|
getTourSpotlightStyle: () => getTourSpotlightStyle,
|
|
1103
1159
|
getTourTargetRect: () => getTourTargetRect,
|
|
@@ -1106,6 +1162,7 @@ __export(src_exports, {
|
|
|
1106
1162
|
getTransferItemClasses: () => getTransferItemClasses,
|
|
1107
1163
|
getTransformOrigin: () => getTransformOrigin,
|
|
1108
1164
|
getTransitionClasses: () => getTransitionClasses,
|
|
1165
|
+
getTreeKeyboardAction: () => getTreeKeyboardAction,
|
|
1109
1166
|
getTreeMapGradientPrefix: () => getTreeMapGradientPrefix,
|
|
1110
1167
|
getTreeNodeClasses: () => getTreeNodeClasses,
|
|
1111
1168
|
getTreeNodeExpandIconClasses: () => getTreeNodeExpandIconClasses,
|
|
@@ -1155,6 +1212,7 @@ __export(src_exports, {
|
|
|
1155
1212
|
handleUploadDrop: () => handleUploadDrop,
|
|
1156
1213
|
hasErrors: () => hasErrors,
|
|
1157
1214
|
hasGutter: () => hasGutter,
|
|
1215
|
+
hasTableSelectionColumn: () => hasTableSelectionColumn,
|
|
1158
1216
|
hexToRgb: () => hexToRgb2,
|
|
1159
1217
|
highContrastTheme: () => highContrastTheme,
|
|
1160
1218
|
hsvToRgb: () => hsvToRgb,
|
|
@@ -1250,6 +1308,7 @@ __export(src_exports, {
|
|
|
1250
1308
|
isEscapeKey: () => isEscapeKey,
|
|
1251
1309
|
isEventOutside: () => isEventOutside,
|
|
1252
1310
|
isHTMLElement: () => isHTMLElement,
|
|
1311
|
+
isHttpResultStatus: () => isHttpResultStatus,
|
|
1253
1312
|
isImageAnnotationPathClosed: () => isImageAnnotationPathClosed,
|
|
1254
1313
|
isImageAnnotationShapeTool: () => isImageAnnotationShapeTool,
|
|
1255
1314
|
isInlineFormat: () => isInlineFormat,
|
|
@@ -1280,7 +1339,6 @@ __export(src_exports, {
|
|
|
1280
1339
|
isValidHex: () => isValidHex,
|
|
1281
1340
|
isValidUrl: () => isValidUrl,
|
|
1282
1341
|
isWipExceeded: () => isWipExceeded,
|
|
1283
|
-
kanbanAddCardClasses: () => kanbanAddCardClasses,
|
|
1284
1342
|
kanbanAddColumnClasses: () => kanbanAddColumnClasses,
|
|
1285
1343
|
kanbanCardCountClasses: () => kanbanCardCountClasses,
|
|
1286
1344
|
kanbanFilterHighlightClasses: () => kanbanFilterHighlightClasses,
|
|
@@ -1402,6 +1460,7 @@ __export(src_exports, {
|
|
|
1402
1460
|
moveItemBetweenContainers: () => moveItemBetweenContainers,
|
|
1403
1461
|
movePan: () => movePan,
|
|
1404
1462
|
movePinch: () => movePinch,
|
|
1463
|
+
moveTransferItems: () => moveTransferItems,
|
|
1405
1464
|
naturalTheme: () => naturalTheme,
|
|
1406
1465
|
navigateToFolder: () => navigateToFolder,
|
|
1407
1466
|
nextIconPath: () => nextIconPath,
|
|
@@ -1453,6 +1512,7 @@ __export(src_exports, {
|
|
|
1453
1512
|
parseDragData: () => parseDragData,
|
|
1454
1513
|
parseHeight: () => parseHeight,
|
|
1455
1514
|
parseHotkey: () => parseHotkey,
|
|
1515
|
+
parseInputNumberValue: () => parseInputNumberValue,
|
|
1456
1516
|
parseInputValue: () => parseInputValue,
|
|
1457
1517
|
parseMarkdownHeight: () => parseHeight,
|
|
1458
1518
|
parsePaneSize: () => parsePaneSize,
|
|
@@ -1556,6 +1616,7 @@ __export(src_exports, {
|
|
|
1556
1616
|
resolveCarouselSwipeDirection: () => resolveCarouselSwipeDirection,
|
|
1557
1617
|
resolveChartPalette: () => resolveChartPalette,
|
|
1558
1618
|
resolveChartTooltipContent: () => resolveChartTooltipContent,
|
|
1619
|
+
resolveChartTooltipPosition: () => resolveChartTooltipPosition,
|
|
1559
1620
|
resolveConditionalFormRules: () => resolveConditionalFormRules,
|
|
1560
1621
|
resolveCreatableSelectOption: () => resolveCreatableSelectOption,
|
|
1561
1622
|
resolveDragConfig: () => resolveDragConfig,
|
|
@@ -1590,6 +1651,8 @@ __export(src_exports, {
|
|
|
1590
1651
|
richTextContainerDisabled: () => richTextContainerDisabled,
|
|
1591
1652
|
richTextEditorAreaBase: () => richTextEditorAreaBase,
|
|
1592
1653
|
richTextEditorAreaReadOnly: () => richTextEditorAreaReadOnly,
|
|
1654
|
+
richTextHtmlToMode: () => richTextHtmlToMode,
|
|
1655
|
+
richTextModeToHtml: () => richTextModeToHtml,
|
|
1593
1656
|
richTextPlaceholderClasses: () => richTextPlaceholderClasses,
|
|
1594
1657
|
richTextToolbarButtonActive: () => richTextToolbarButtonActive,
|
|
1595
1658
|
richTextToolbarButtonBase: () => richTextToolbarButtonBase,
|
|
@@ -1651,6 +1714,7 @@ __export(src_exports, {
|
|
|
1651
1714
|
sliderGetValueFromPosition: () => sliderGetValueFromPosition,
|
|
1652
1715
|
sliderNormalizeValue: () => sliderNormalizeValue,
|
|
1653
1716
|
sliderRangeClasses: () => sliderRangeClasses,
|
|
1717
|
+
sliderResolveMarks: () => sliderResolveMarks,
|
|
1654
1718
|
sliderSizeClasses: () => sliderSizeClasses,
|
|
1655
1719
|
sliderThumbClasses: () => sliderThumbClasses,
|
|
1656
1720
|
sliderTooltipClasses: () => sliderTooltipClasses,
|
|
@@ -1700,6 +1764,9 @@ __export(src_exports, {
|
|
|
1700
1764
|
statusSuccessIconPath: () => statusSuccessIconPath,
|
|
1701
1765
|
statusWarningIconPath: () => statusWarningIconPath,
|
|
1702
1766
|
stepFinishChar: () => stepFinishChar,
|
|
1767
|
+
stepFinishIconPathD: () => stepFinishIconPathD,
|
|
1768
|
+
stepFinishIconStrokeWidth: () => stepFinishIconStrokeWidth,
|
|
1769
|
+
stepFinishIconViewBox: () => stepFinishIconViewBox,
|
|
1703
1770
|
stepValue: () => stepValue,
|
|
1704
1771
|
stepperBaseClasses: () => stepperBaseClasses,
|
|
1705
1772
|
stepperIconViewBox: () => stepperIconViewBox,
|
|
@@ -1786,6 +1853,7 @@ __export(src_exports, {
|
|
|
1786
1853
|
textDecorationClasses: () => textDecorationClasses,
|
|
1787
1854
|
textSizeClasses: () => textSizeClasses,
|
|
1788
1855
|
textWeightClasses: () => textWeightClasses,
|
|
1856
|
+
themeConfigToCssVars: () => themeConfigToCssVars,
|
|
1789
1857
|
tigercatDarkTheme: () => tigercatDarkTheme,
|
|
1790
1858
|
tigercatPlugin: () => tigercatPlugin,
|
|
1791
1859
|
tigercatTheme: () => tigercatTheme,
|
|
@@ -2379,37 +2447,65 @@ function getPieDrawAnimationStyle(circumference, targetOffset, durationMs = 800)
|
|
|
2379
2447
|
|
|
2380
2448
|
// src/utils/helpers/slider-utils.ts
|
|
2381
2449
|
function sliderNormalizeValue(value, min, max, step = 1) {
|
|
2382
|
-
const
|
|
2383
|
-
const
|
|
2384
|
-
|
|
2450
|
+
const safeMin = Number.isFinite(min) ? min : 0;
|
|
2451
|
+
const safeMax = Number.isFinite(max) ? max : safeMin;
|
|
2452
|
+
const lower = Math.min(safeMin, safeMax);
|
|
2453
|
+
const upper = Math.max(safeMin, safeMax);
|
|
2454
|
+
const safeStep = Number.isFinite(step) && step > 0 ? step : 1;
|
|
2455
|
+
const safeValue = Number.isFinite(value) ? value : lower;
|
|
2456
|
+
const clamped = Math.min(Math.max(safeValue, lower), upper);
|
|
2457
|
+
const stepped = Math.round((clamped - lower) / safeStep) * safeStep + lower;
|
|
2458
|
+
return Math.min(Math.max(stepped, lower), upper);
|
|
2459
|
+
}
|
|
2460
|
+
function sliderResolveMarks(marks, min, max) {
|
|
2461
|
+
if (!marks) return {};
|
|
2462
|
+
if (typeof marks === "object") return marks;
|
|
2463
|
+
const safeMin = Number.isFinite(min) ? min : 0;
|
|
2464
|
+
const safeMax = Number.isFinite(max) ? max : safeMin;
|
|
2465
|
+
const lower = Math.min(safeMin, safeMax);
|
|
2466
|
+
const upper = Math.max(safeMin, safeMax);
|
|
2467
|
+
if (lower === upper) return { [lower]: String(lower) };
|
|
2468
|
+
return { [lower]: String(lower), [upper]: String(upper) };
|
|
2385
2469
|
}
|
|
2386
2470
|
function sliderGetPercentage(value, min, max) {
|
|
2387
|
-
|
|
2388
|
-
|
|
2471
|
+
const safeMin = Number.isFinite(min) ? min : 0;
|
|
2472
|
+
const safeMax = Number.isFinite(max) ? max : safeMin;
|
|
2473
|
+
const lower = Math.min(safeMin, safeMax);
|
|
2474
|
+
const upper = Math.max(safeMin, safeMax);
|
|
2475
|
+
if (upper === lower) return 0;
|
|
2476
|
+
const safeValue = Number.isFinite(value) ? value : lower;
|
|
2477
|
+
return (Math.min(Math.max(safeValue, lower), upper) - lower) / (upper - lower) * 100;
|
|
2389
2478
|
}
|
|
2390
2479
|
function sliderGetValueFromPosition(position, trackWidth, min, max, step = 1) {
|
|
2391
|
-
|
|
2392
|
-
const
|
|
2393
|
-
const
|
|
2394
|
-
|
|
2480
|
+
const safeMin = Number.isFinite(min) ? min : 0;
|
|
2481
|
+
const safeMax = Number.isFinite(max) ? max : safeMin;
|
|
2482
|
+
const lower = Math.min(safeMin, safeMax);
|
|
2483
|
+
const upper = Math.max(safeMin, safeMax);
|
|
2484
|
+
if (!Number.isFinite(trackWidth) || trackWidth <= 0) return lower;
|
|
2485
|
+
const safePosition = Number.isFinite(position) ? Math.min(Math.max(position, 0), trackWidth) : 0;
|
|
2486
|
+
const ratio = safePosition / trackWidth;
|
|
2487
|
+
const rawValue = ratio * (upper - lower) + lower;
|
|
2488
|
+
return sliderNormalizeValue(rawValue, lower, upper, step);
|
|
2395
2489
|
}
|
|
2396
2490
|
function sliderGetKeyboardValue(key, currentValue, min, max, step = 1, largeStep) {
|
|
2397
|
-
const
|
|
2491
|
+
const safeStep = Number.isFinite(step) && step > 0 ? step : 1;
|
|
2492
|
+
const bigStep = Number.isFinite(largeStep) && largeStep > 0 ? largeStep : safeStep * 10;
|
|
2493
|
+
const safeCurrent = sliderNormalizeValue(currentValue, min, max, safeStep);
|
|
2398
2494
|
switch (key) {
|
|
2399
2495
|
case "ArrowRight":
|
|
2400
2496
|
case "ArrowUp":
|
|
2401
|
-
return sliderNormalizeValue(
|
|
2497
|
+
return sliderNormalizeValue(safeCurrent + safeStep, min, max, safeStep);
|
|
2402
2498
|
case "ArrowLeft":
|
|
2403
2499
|
case "ArrowDown":
|
|
2404
|
-
return sliderNormalizeValue(
|
|
2500
|
+
return sliderNormalizeValue(safeCurrent - safeStep, min, max, safeStep);
|
|
2405
2501
|
case "PageUp":
|
|
2406
|
-
return sliderNormalizeValue(
|
|
2502
|
+
return sliderNormalizeValue(safeCurrent + bigStep, min, max, safeStep);
|
|
2407
2503
|
case "PageDown":
|
|
2408
|
-
return sliderNormalizeValue(
|
|
2504
|
+
return sliderNormalizeValue(safeCurrent - bigStep, min, max, safeStep);
|
|
2409
2505
|
case "Home":
|
|
2410
|
-
return min;
|
|
2506
|
+
return sliderNormalizeValue(min, min, max, safeStep);
|
|
2411
2507
|
case "End":
|
|
2412
|
-
return max;
|
|
2508
|
+
return sliderNormalizeValue(max, min, max, safeStep);
|
|
2413
2509
|
default:
|
|
2414
2510
|
return null;
|
|
2415
2511
|
}
|
|
@@ -2492,6 +2588,10 @@ function normalizeStringOption(options, key) {
|
|
|
2492
2588
|
}
|
|
2493
2589
|
return options;
|
|
2494
2590
|
}
|
|
2591
|
+
function createInstanceCounter() {
|
|
2592
|
+
let counter = 0;
|
|
2593
|
+
return () => ++counter;
|
|
2594
|
+
}
|
|
2495
2595
|
|
|
2496
2596
|
// src/utils/icons/common.ts
|
|
2497
2597
|
var closeIconViewBox = "0 0 24 24";
|
|
@@ -2566,9 +2666,7 @@ var iconRegistry = {
|
|
|
2566
2666
|
"arrow-right": stroke24("M13.5 4.5 21 12m0 0-7.5 7.5M21 12H3"),
|
|
2567
2667
|
"arrow-up": stroke24("M4.5 10.5 12 3m0 0 7.5 7.5M12 3v18"),
|
|
2568
2668
|
"arrow-down": stroke24("M19.5 13.5 12 21m0 0-7.5-7.5M12 21V3"),
|
|
2569
|
-
search: stroke24(
|
|
2570
|
-
"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"
|
|
2571
|
-
),
|
|
2669
|
+
search: stroke24("m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"),
|
|
2572
2670
|
plus: stroke24("M12 4.5v15m7.5-7.5h-15"),
|
|
2573
2671
|
minus: stroke24("M5 12h14"),
|
|
2574
2672
|
edit: stroke24(
|
|
@@ -2745,6 +2843,14 @@ function getFocusableElements(container) {
|
|
|
2745
2843
|
);
|
|
2746
2844
|
}
|
|
2747
2845
|
function createFocusTrap(container, options = {}) {
|
|
2846
|
+
if (!isBrowser()) {
|
|
2847
|
+
return {
|
|
2848
|
+
activate() {
|
|
2849
|
+
},
|
|
2850
|
+
deactivate() {
|
|
2851
|
+
}
|
|
2852
|
+
};
|
|
2853
|
+
}
|
|
2748
2854
|
const {
|
|
2749
2855
|
initialFocus = null,
|
|
2750
2856
|
returnFocusOnDeactivate = true,
|
|
@@ -2827,6 +2933,7 @@ function getOrCreateLiveRegion(level) {
|
|
|
2827
2933
|
return el;
|
|
2828
2934
|
}
|
|
2829
2935
|
function announceToScreenReader(message, level = "polite") {
|
|
2936
|
+
if (!isBrowser()) return;
|
|
2830
2937
|
const region = getOrCreateLiveRegion(level);
|
|
2831
2938
|
region.textContent = "";
|
|
2832
2939
|
requestAnimationFrame(() => {
|
|
@@ -2834,6 +2941,16 @@ function announceToScreenReader(message, level = "polite") {
|
|
|
2834
2941
|
});
|
|
2835
2942
|
}
|
|
2836
2943
|
function manageLiveRegion(level = "polite") {
|
|
2944
|
+
if (!isBrowser()) {
|
|
2945
|
+
return {
|
|
2946
|
+
announce() {
|
|
2947
|
+
},
|
|
2948
|
+
clear() {
|
|
2949
|
+
},
|
|
2950
|
+
destroy() {
|
|
2951
|
+
}
|
|
2952
|
+
};
|
|
2953
|
+
}
|
|
2837
2954
|
const region = getOrCreateLiveRegion(level);
|
|
2838
2955
|
return {
|
|
2839
2956
|
announce(message) {
|
|
@@ -2860,8 +2977,8 @@ function getActiveElement(doc) {
|
|
|
2860
2977
|
const active = doc?.activeElement;
|
|
2861
2978
|
return isHTMLElement(active) ? active : null;
|
|
2862
2979
|
}
|
|
2863
|
-
function captureActiveElement(doc
|
|
2864
|
-
return getActiveElement(doc);
|
|
2980
|
+
function captureActiveElement(doc) {
|
|
2981
|
+
return getActiveElement(doc ?? (isBrowser() ? document : void 0));
|
|
2865
2982
|
}
|
|
2866
2983
|
function focusElement(element, options) {
|
|
2867
2984
|
if (!element) return false;
|
|
@@ -2892,7 +3009,8 @@ function getMenuItems(container) {
|
|
|
2892
3009
|
function handleMenuNavigation(container, event) {
|
|
2893
3010
|
const items = getMenuItems(container);
|
|
2894
3011
|
if (items.length === 0) return false;
|
|
2895
|
-
const
|
|
3012
|
+
const activeElement = container.ownerDocument?.activeElement ?? (isBrowser() ? document.activeElement : null);
|
|
3013
|
+
const currentIndex = items.indexOf(activeElement);
|
|
2896
3014
|
let nextIndex = -1;
|
|
2897
3015
|
switch (event.key) {
|
|
2898
3016
|
case "ArrowDown":
|
|
@@ -3036,14 +3154,25 @@ var TIGER_LOCALE_KEYS = [
|
|
|
3036
3154
|
"locale",
|
|
3037
3155
|
"direction",
|
|
3038
3156
|
"common",
|
|
3157
|
+
"empty",
|
|
3039
3158
|
"modal",
|
|
3040
3159
|
"drawer",
|
|
3160
|
+
"qrcode",
|
|
3161
|
+
"timeline",
|
|
3041
3162
|
"upload",
|
|
3042
3163
|
"pagination",
|
|
3043
3164
|
"table",
|
|
3044
3165
|
"datePicker",
|
|
3166
|
+
"timePicker",
|
|
3045
3167
|
"formWizard",
|
|
3046
|
-
"
|
|
3168
|
+
"tour",
|
|
3169
|
+
"calendar",
|
|
3170
|
+
"fileManager",
|
|
3171
|
+
"imageViewer",
|
|
3172
|
+
"imageEditor",
|
|
3173
|
+
"status",
|
|
3174
|
+
"taskBoard",
|
|
3175
|
+
"formValidation"
|
|
3047
3176
|
];
|
|
3048
3177
|
function isRecord3(value) {
|
|
3049
3178
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
@@ -3083,14 +3212,25 @@ function mergeTigerLocale(base, override) {
|
|
|
3083
3212
|
locale: override?.locale ?? base?.locale,
|
|
3084
3213
|
direction: override?.direction ?? base?.direction,
|
|
3085
3214
|
common: { ...base?.common, ...override?.common },
|
|
3215
|
+
empty: { ...base?.empty, ...override?.empty },
|
|
3086
3216
|
modal: { ...base?.modal, ...override?.modal },
|
|
3087
3217
|
drawer: { ...base?.drawer, ...override?.drawer },
|
|
3218
|
+
qrcode: { ...base?.qrcode, ...override?.qrcode },
|
|
3219
|
+
timeline: { ...base?.timeline, ...override?.timeline },
|
|
3088
3220
|
upload: { ...base?.upload, ...override?.upload },
|
|
3089
3221
|
pagination: { ...base?.pagination, ...override?.pagination },
|
|
3090
3222
|
table: { ...base?.table, ...override?.table },
|
|
3091
3223
|
datePicker: { ...base?.datePicker, ...override?.datePicker },
|
|
3224
|
+
timePicker: { ...base?.timePicker, ...override?.timePicker },
|
|
3092
3225
|
formWizard: { ...base?.formWizard, ...override?.formWizard },
|
|
3093
|
-
|
|
3226
|
+
tour: { ...base?.tour, ...override?.tour },
|
|
3227
|
+
calendar: { ...base?.calendar, ...override?.calendar },
|
|
3228
|
+
fileManager: { ...base?.fileManager, ...override?.fileManager },
|
|
3229
|
+
imageViewer: { ...base?.imageViewer, ...override?.imageViewer },
|
|
3230
|
+
imageEditor: { ...base?.imageEditor, ...override?.imageEditor },
|
|
3231
|
+
status: { ...base?.status, ...override?.status },
|
|
3232
|
+
taskBoard: { ...base?.taskBoard, ...override?.taskBoard },
|
|
3233
|
+
formValidation: { ...base?.formValidation, ...override?.formValidation }
|
|
3094
3234
|
};
|
|
3095
3235
|
}
|
|
3096
3236
|
var RTL_LANGUAGE_CODES = /* @__PURE__ */ new Set(["ar", "fa", "he", "iw", "ps", "ur"]);
|
|
@@ -3151,6 +3291,59 @@ var ZH_CN_FORM_WIZARD_LABELS = {
|
|
|
3151
3291
|
nextText: "\u4E0B\u4E00\u6B65",
|
|
3152
3292
|
finishText: "\u5B8C\u6210"
|
|
3153
3293
|
};
|
|
3294
|
+
var DEFAULT_TOUR_LABELS = {
|
|
3295
|
+
prevText: "Previous",
|
|
3296
|
+
nextText: "Next",
|
|
3297
|
+
finishText: "Finish",
|
|
3298
|
+
closeAriaLabel: "Close tour"
|
|
3299
|
+
};
|
|
3300
|
+
var ZH_CN_TOUR_LABELS = {
|
|
3301
|
+
prevText: "\u4E0A\u4E00\u6B65",
|
|
3302
|
+
nextText: "\u4E0B\u4E00\u6B65",
|
|
3303
|
+
finishText: "\u5B8C\u6210",
|
|
3304
|
+
closeAriaLabel: "\u5173\u95ED\u5BFC\u89C8"
|
|
3305
|
+
};
|
|
3306
|
+
function getTourLabels(locale, overrides) {
|
|
3307
|
+
const isZh = locale?.locale?.startsWith("zh");
|
|
3308
|
+
const defaultLabels = isZh ? ZH_CN_TOUR_LABELS : DEFAULT_TOUR_LABELS;
|
|
3309
|
+
return {
|
|
3310
|
+
prevText: overrides?.prevText ?? locale?.tour?.prevText ?? locale?.formWizard?.prevText ?? defaultLabels.prevText,
|
|
3311
|
+
nextText: overrides?.nextText ?? locale?.tour?.nextText ?? locale?.formWizard?.nextText ?? defaultLabels.nextText,
|
|
3312
|
+
finishText: overrides?.finishText ?? locale?.tour?.finishText ?? locale?.formWizard?.finishText ?? defaultLabels.finishText,
|
|
3313
|
+
closeAriaLabel: overrides?.closeAriaLabel ?? locale?.tour?.closeAriaLabel ?? locale?.common?.closeText ?? defaultLabels.closeAriaLabel
|
|
3314
|
+
};
|
|
3315
|
+
}
|
|
3316
|
+
var DEFAULT_CALENDAR_LABELS = {
|
|
3317
|
+
previousMonth: "Previous month",
|
|
3318
|
+
nextMonth: "Next month",
|
|
3319
|
+
previousYear: "Previous year",
|
|
3320
|
+
nextYear: "Next year",
|
|
3321
|
+
yearSelectAriaLabel: "Year",
|
|
3322
|
+
monthSelectAriaLabel: "Month",
|
|
3323
|
+
daySelectAriaLabel: "Day"
|
|
3324
|
+
};
|
|
3325
|
+
var ZH_CN_CALENDAR_LABELS = {
|
|
3326
|
+
previousMonth: "\u4E0A\u4E2A\u6708",
|
|
3327
|
+
nextMonth: "\u4E0B\u4E2A\u6708",
|
|
3328
|
+
previousYear: "\u4E0A\u4E00\u5E74",
|
|
3329
|
+
nextYear: "\u4E0B\u4E00\u5E74",
|
|
3330
|
+
yearSelectAriaLabel: "\u5E74\u4EFD",
|
|
3331
|
+
monthSelectAriaLabel: "\u6708\u4EFD",
|
|
3332
|
+
daySelectAriaLabel: "\u65E5\u671F"
|
|
3333
|
+
};
|
|
3334
|
+
function getCalendarLabels(locale) {
|
|
3335
|
+
const isZh = locale?.locale?.startsWith("zh");
|
|
3336
|
+
const defaultLabels = isZh ? ZH_CN_CALENDAR_LABELS : DEFAULT_CALENDAR_LABELS;
|
|
3337
|
+
return {
|
|
3338
|
+
previousMonth: locale?.calendar?.previousMonth ?? defaultLabels.previousMonth,
|
|
3339
|
+
nextMonth: locale?.calendar?.nextMonth ?? defaultLabels.nextMonth,
|
|
3340
|
+
previousYear: locale?.calendar?.previousYear ?? defaultLabels.previousYear,
|
|
3341
|
+
nextYear: locale?.calendar?.nextYear ?? defaultLabels.nextYear,
|
|
3342
|
+
yearSelectAriaLabel: locale?.calendar?.yearSelectAriaLabel ?? defaultLabels.yearSelectAriaLabel,
|
|
3343
|
+
monthSelectAriaLabel: locale?.calendar?.monthSelectAriaLabel ?? defaultLabels.monthSelectAriaLabel,
|
|
3344
|
+
daySelectAriaLabel: locale?.calendar?.daySelectAriaLabel ?? defaultLabels.daySelectAriaLabel
|
|
3345
|
+
};
|
|
3346
|
+
}
|
|
3154
3347
|
function getFormWizardLabels(locale, overrides) {
|
|
3155
3348
|
const isZh = locale?.locale?.startsWith("zh");
|
|
3156
3349
|
const defaultLabels = isZh ? ZH_CN_FORM_WIZARD_LABELS : DEFAULT_FORM_WIZARD_LABELS;
|
|
@@ -3201,7 +3394,15 @@ var DEFAULT_TABLE_LABELS = {
|
|
|
3201
3394
|
columnSettingsText: "Column settings",
|
|
3202
3395
|
columnSettingsAriaLabel: "Column settings",
|
|
3203
3396
|
lockColumnAriaLabel: "Lock column {column}",
|
|
3204
|
-
unlockColumnAriaLabel: "Unlock column {column}"
|
|
3397
|
+
unlockColumnAriaLabel: "Unlock column {column}",
|
|
3398
|
+
allText: "All",
|
|
3399
|
+
filterPlaceholder: "Filter...",
|
|
3400
|
+
exportCsvText: "Export CSV",
|
|
3401
|
+
exportExcelText: "Export Excel",
|
|
3402
|
+
exportCsvAriaLabel: "Export to CSV",
|
|
3403
|
+
exportExcelAriaLabel: "Export to Excel",
|
|
3404
|
+
expandRowAriaLabel: "Expand row",
|
|
3405
|
+
collapseRowAriaLabel: "Collapse row"
|
|
3205
3406
|
};
|
|
3206
3407
|
var ZH_CN_TABLE_LABELS = {
|
|
3207
3408
|
emptyText: "\u6682\u65E0\u6570\u636E",
|
|
@@ -3220,7 +3421,15 @@ var ZH_CN_TABLE_LABELS = {
|
|
|
3220
3421
|
columnSettingsText: "\u5217\u8BBE\u7F6E",
|
|
3221
3422
|
columnSettingsAriaLabel: "\u5217\u8BBE\u7F6E",
|
|
3222
3423
|
lockColumnAriaLabel: "\u9501\u5B9A{column}\u5217",
|
|
3223
|
-
unlockColumnAriaLabel: "\u53D6\u6D88\u9501\u5B9A{column}\u5217"
|
|
3424
|
+
unlockColumnAriaLabel: "\u53D6\u6D88\u9501\u5B9A{column}\u5217",
|
|
3425
|
+
allText: "\u5168\u90E8",
|
|
3426
|
+
filterPlaceholder: "\u7B5B\u9009...",
|
|
3427
|
+
exportCsvText: "\u5BFC\u51FA CSV",
|
|
3428
|
+
exportExcelText: "\u5BFC\u51FA Excel",
|
|
3429
|
+
exportCsvAriaLabel: "\u5BFC\u51FA\u4E3A CSV",
|
|
3430
|
+
exportExcelAriaLabel: "\u5BFC\u51FA\u4E3A Excel",
|
|
3431
|
+
expandRowAriaLabel: "\u5C55\u5F00\u884C",
|
|
3432
|
+
collapseRowAriaLabel: "\u6536\u8D77\u884C"
|
|
3224
3433
|
};
|
|
3225
3434
|
function getTableLabels(locale, overrides) {
|
|
3226
3435
|
const isZh = !!locale?.locale?.startsWith("zh") || locale?.common?.emptyText === "\u6682\u65E0\u6570\u636E" || locale?.table?.searchButtonText === "\u641C\u7D22";
|
|
@@ -3242,7 +3451,15 @@ function getTableLabels(locale, overrides) {
|
|
|
3242
3451
|
columnSettingsText: overrides?.columnSettingsText ?? locale?.table?.columnSettingsText ?? defaultLabels.columnSettingsText,
|
|
3243
3452
|
columnSettingsAriaLabel: overrides?.columnSettingsAriaLabel ?? locale?.table?.columnSettingsAriaLabel ?? defaultLabels.columnSettingsAriaLabel,
|
|
3244
3453
|
lockColumnAriaLabel: overrides?.lockColumnAriaLabel ?? locale?.table?.lockColumnAriaLabel ?? defaultLabels.lockColumnAriaLabel,
|
|
3245
|
-
unlockColumnAriaLabel: overrides?.unlockColumnAriaLabel ?? locale?.table?.unlockColumnAriaLabel ?? defaultLabels.unlockColumnAriaLabel
|
|
3454
|
+
unlockColumnAriaLabel: overrides?.unlockColumnAriaLabel ?? locale?.table?.unlockColumnAriaLabel ?? defaultLabels.unlockColumnAriaLabel,
|
|
3455
|
+
allText: overrides?.allText ?? locale?.table?.allText ?? defaultLabels.allText,
|
|
3456
|
+
filterPlaceholder: overrides?.filterPlaceholder ?? locale?.table?.filterPlaceholder ?? defaultLabels.filterPlaceholder,
|
|
3457
|
+
exportCsvText: overrides?.exportCsvText ?? locale?.table?.exportCsvText ?? defaultLabels.exportCsvText,
|
|
3458
|
+
exportExcelText: overrides?.exportExcelText ?? locale?.table?.exportExcelText ?? defaultLabels.exportExcelText,
|
|
3459
|
+
exportCsvAriaLabel: overrides?.exportCsvAriaLabel ?? locale?.table?.exportCsvAriaLabel ?? defaultLabels.exportCsvAriaLabel,
|
|
3460
|
+
exportExcelAriaLabel: overrides?.exportExcelAriaLabel ?? locale?.table?.exportExcelAriaLabel ?? defaultLabels.exportExcelAriaLabel,
|
|
3461
|
+
expandRowAriaLabel: overrides?.expandRowAriaLabel ?? locale?.table?.expandRowAriaLabel ?? defaultLabels.expandRowAriaLabel,
|
|
3462
|
+
collapseRowAriaLabel: overrides?.collapseRowAriaLabel ?? locale?.table?.collapseRowAriaLabel ?? defaultLabels.collapseRowAriaLabel
|
|
3246
3463
|
};
|
|
3247
3464
|
}
|
|
3248
3465
|
function formatTableSelectRowAriaLabel(template, row, locale) {
|
|
@@ -3254,6 +3471,7 @@ function formatTableSortByText(template, column) {
|
|
|
3254
3471
|
var DEFAULT_TASK_BOARD_LABELS = {
|
|
3255
3472
|
emptyColumnText: "No tasks",
|
|
3256
3473
|
addCardText: "Add task",
|
|
3474
|
+
addColumnText: "Add column",
|
|
3257
3475
|
wipLimitText: "WIP limit: {limit}",
|
|
3258
3476
|
dragHintText: "Drag to move",
|
|
3259
3477
|
boardAriaLabel: "Task Board"
|
|
@@ -3261,6 +3479,7 @@ var DEFAULT_TASK_BOARD_LABELS = {
|
|
|
3261
3479
|
var ZH_CN_TASK_BOARD_LABELS = {
|
|
3262
3480
|
emptyColumnText: "\u6682\u65E0\u4EFB\u52A1",
|
|
3263
3481
|
addCardText: "\u6DFB\u52A0\u4EFB\u52A1",
|
|
3482
|
+
addColumnText: "\u6DFB\u52A0\u5217",
|
|
3264
3483
|
wipLimitText: "WIP \u9650\u5236: {limit}",
|
|
3265
3484
|
dragHintText: "\u62D6\u62FD\u4EE5\u79FB\u52A8",
|
|
3266
3485
|
boardAriaLabel: "\u4EFB\u52A1\u770B\u677F"
|
|
@@ -3271,13 +3490,295 @@ function getTaskBoardLabels(locale, overrides) {
|
|
|
3271
3490
|
return {
|
|
3272
3491
|
emptyColumnText: overrides?.emptyColumnText ?? locale?.taskBoard?.emptyColumnText ?? defaultLabels.emptyColumnText,
|
|
3273
3492
|
addCardText: overrides?.addCardText ?? locale?.taskBoard?.addCardText ?? defaultLabels.addCardText,
|
|
3493
|
+
addColumnText: overrides?.addColumnText ?? locale?.taskBoard?.addColumnText ?? defaultLabels.addColumnText,
|
|
3274
3494
|
wipLimitText: overrides?.wipLimitText ?? locale?.taskBoard?.wipLimitText ?? defaultLabels.wipLimitText,
|
|
3275
3495
|
dragHintText: overrides?.dragHintText ?? locale?.taskBoard?.dragHintText ?? defaultLabels.dragHintText,
|
|
3276
3496
|
boardAriaLabel: overrides?.boardAriaLabel ?? locale?.taskBoard?.boardAriaLabel ?? defaultLabels.boardAriaLabel
|
|
3277
3497
|
};
|
|
3278
3498
|
}
|
|
3499
|
+
var DEFAULT_FILE_MANAGER_LABELS = {
|
|
3500
|
+
rootText: "Root"
|
|
3501
|
+
};
|
|
3502
|
+
var ZH_CN_FILE_MANAGER_LABELS = {
|
|
3503
|
+
rootText: "\u6839\u76EE\u5F55"
|
|
3504
|
+
};
|
|
3505
|
+
function getFileManagerLabels(locale) {
|
|
3506
|
+
const defaultLabels = locale?.locale?.startsWith("zh") ? ZH_CN_FILE_MANAGER_LABELS : DEFAULT_FILE_MANAGER_LABELS;
|
|
3507
|
+
return {
|
|
3508
|
+
rootText: locale?.fileManager?.rootText ?? defaultLabels.rootText
|
|
3509
|
+
};
|
|
3510
|
+
}
|
|
3511
|
+
var DEFAULT_IMAGE_VIEWER_LABELS = {
|
|
3512
|
+
dialogAriaLabel: "Image viewer",
|
|
3513
|
+
previewDialogAriaLabel: "Image preview",
|
|
3514
|
+
closeAriaLabel: "Close",
|
|
3515
|
+
closePreviewAriaLabel: "Close preview",
|
|
3516
|
+
previousImageAriaLabel: "Previous image",
|
|
3517
|
+
nextImageAriaLabel: "Next image",
|
|
3518
|
+
zoomOutAriaLabel: "Zoom out",
|
|
3519
|
+
resetAriaLabel: "Reset",
|
|
3520
|
+
zoomInAriaLabel: "Zoom in",
|
|
3521
|
+
rotateLeftAriaLabel: "Rotate left",
|
|
3522
|
+
rotateRightAriaLabel: "Rotate right"
|
|
3523
|
+
};
|
|
3524
|
+
var ZH_CN_IMAGE_VIEWER_LABELS = {
|
|
3525
|
+
dialogAriaLabel: "\u56FE\u7247\u67E5\u770B\u5668",
|
|
3526
|
+
previewDialogAriaLabel: "\u56FE\u7247\u9884\u89C8",
|
|
3527
|
+
closeAriaLabel: "\u5173\u95ED",
|
|
3528
|
+
closePreviewAriaLabel: "\u5173\u95ED\u9884\u89C8",
|
|
3529
|
+
previousImageAriaLabel: "\u4E0A\u4E00\u5F20\u56FE\u7247",
|
|
3530
|
+
nextImageAriaLabel: "\u4E0B\u4E00\u5F20\u56FE\u7247",
|
|
3531
|
+
zoomOutAriaLabel: "\u7F29\u5C0F",
|
|
3532
|
+
resetAriaLabel: "\u91CD\u7F6E",
|
|
3533
|
+
zoomInAriaLabel: "\u653E\u5927",
|
|
3534
|
+
rotateLeftAriaLabel: "\u5411\u5DE6\u65CB\u8F6C",
|
|
3535
|
+
rotateRightAriaLabel: "\u5411\u53F3\u65CB\u8F6C"
|
|
3536
|
+
};
|
|
3537
|
+
function getImageViewerLabels(locale) {
|
|
3538
|
+
const defaultLabels = locale?.locale?.startsWith("zh") ? ZH_CN_IMAGE_VIEWER_LABELS : DEFAULT_IMAGE_VIEWER_LABELS;
|
|
3539
|
+
return {
|
|
3540
|
+
dialogAriaLabel: locale?.imageViewer?.dialogAriaLabel ?? defaultLabels.dialogAriaLabel,
|
|
3541
|
+
previewDialogAriaLabel: locale?.imageViewer?.previewDialogAriaLabel ?? defaultLabels.previewDialogAriaLabel,
|
|
3542
|
+
closeAriaLabel: locale?.imageViewer?.closeAriaLabel ?? locale?.common?.closeText ?? defaultLabels.closeAriaLabel,
|
|
3543
|
+
closePreviewAriaLabel: locale?.imageViewer?.closePreviewAriaLabel ?? defaultLabels.closePreviewAriaLabel,
|
|
3544
|
+
previousImageAriaLabel: locale?.imageViewer?.previousImageAriaLabel ?? defaultLabels.previousImageAriaLabel,
|
|
3545
|
+
nextImageAriaLabel: locale?.imageViewer?.nextImageAriaLabel ?? defaultLabels.nextImageAriaLabel,
|
|
3546
|
+
zoomOutAriaLabel: locale?.imageViewer?.zoomOutAriaLabel ?? defaultLabels.zoomOutAriaLabel,
|
|
3547
|
+
resetAriaLabel: locale?.imageViewer?.resetAriaLabel ?? defaultLabels.resetAriaLabel,
|
|
3548
|
+
zoomInAriaLabel: locale?.imageViewer?.zoomInAriaLabel ?? defaultLabels.zoomInAriaLabel,
|
|
3549
|
+
rotateLeftAriaLabel: locale?.imageViewer?.rotateLeftAriaLabel ?? defaultLabels.rotateLeftAriaLabel,
|
|
3550
|
+
rotateRightAriaLabel: locale?.imageViewer?.rotateRightAriaLabel ?? defaultLabels.rotateRightAriaLabel
|
|
3551
|
+
};
|
|
3552
|
+
}
|
|
3553
|
+
var DEFAULT_IMAGE_EDITOR_LABELS = {
|
|
3554
|
+
selectImageText: "Select image",
|
|
3555
|
+
selectImageAriaLabel: "Select image to crop and upload",
|
|
3556
|
+
cropModalTitle: "Crop image",
|
|
3557
|
+
cropCancelText: "Cancel",
|
|
3558
|
+
cropConfirmText: "Confirm crop",
|
|
3559
|
+
cropperDialogAriaLabel: "Image cropper",
|
|
3560
|
+
imageToCropAriaLabel: "Image to crop",
|
|
3561
|
+
moveCropAreaAriaLabel: "Move crop area",
|
|
3562
|
+
resizeCropAreaAriaLabel: "Resize crop area {handle}",
|
|
3563
|
+
loadingCropImageAriaLabel: "Loading image for cropping",
|
|
3564
|
+
annotationToolbarAriaLabel: "Annotation tools",
|
|
3565
|
+
annotationEditorAriaLabel: "Image annotation editor",
|
|
3566
|
+
annotationCanvasAriaLabel: "Image annotation canvas",
|
|
3567
|
+
loadingAnnotationImageAriaLabel: "Loading image for annotation",
|
|
3568
|
+
selectToolText: "Select",
|
|
3569
|
+
rectangleToolText: "Rectangle",
|
|
3570
|
+
ellipseToolText: "Ellipse",
|
|
3571
|
+
polygonToolText: "Polygon",
|
|
3572
|
+
freehandToolText: "Freehand",
|
|
3573
|
+
deleteText: "Delete"
|
|
3574
|
+
};
|
|
3575
|
+
var ZH_CN_IMAGE_EDITOR_LABELS = {
|
|
3576
|
+
selectImageText: "\u9009\u62E9\u56FE\u7247",
|
|
3577
|
+
selectImageAriaLabel: "\u9009\u62E9\u56FE\u7247\u8FDB\u884C\u88C1\u526A\u5E76\u4E0A\u4F20",
|
|
3578
|
+
cropModalTitle: "\u88C1\u526A\u56FE\u7247",
|
|
3579
|
+
cropCancelText: "\u53D6\u6D88",
|
|
3580
|
+
cropConfirmText: "\u786E\u8BA4\u88C1\u526A",
|
|
3581
|
+
cropperDialogAriaLabel: "\u56FE\u7247\u88C1\u526A\u5668",
|
|
3582
|
+
imageToCropAriaLabel: "\u5F85\u88C1\u526A\u56FE\u7247",
|
|
3583
|
+
moveCropAreaAriaLabel: "\u79FB\u52A8\u88C1\u526A\u533A\u57DF",
|
|
3584
|
+
resizeCropAreaAriaLabel: "\u8C03\u6574\u88C1\u526A\u533A\u57DF {handle}",
|
|
3585
|
+
loadingCropImageAriaLabel: "\u6B63\u5728\u52A0\u8F7D\u5F85\u88C1\u526A\u56FE\u7247",
|
|
3586
|
+
annotationToolbarAriaLabel: "\u6807\u6CE8\u5DE5\u5177",
|
|
3587
|
+
annotationEditorAriaLabel: "\u56FE\u7247\u6807\u6CE8\u7F16\u8F91\u5668",
|
|
3588
|
+
annotationCanvasAriaLabel: "\u56FE\u7247\u6807\u6CE8\u753B\u5E03",
|
|
3589
|
+
loadingAnnotationImageAriaLabel: "\u6B63\u5728\u52A0\u8F7D\u5F85\u6807\u6CE8\u56FE\u7247",
|
|
3590
|
+
selectToolText: "\u9009\u62E9",
|
|
3591
|
+
rectangleToolText: "\u77E9\u5F62",
|
|
3592
|
+
ellipseToolText: "\u692D\u5706",
|
|
3593
|
+
polygonToolText: "\u591A\u8FB9\u5F62",
|
|
3594
|
+
freehandToolText: "\u81EA\u7531\u7ED8\u5236",
|
|
3595
|
+
deleteText: "\u5220\u9664"
|
|
3596
|
+
};
|
|
3597
|
+
function getImageEditorLabels(locale) {
|
|
3598
|
+
const defaultLabels = locale?.locale?.startsWith("zh") ? ZH_CN_IMAGE_EDITOR_LABELS : DEFAULT_IMAGE_EDITOR_LABELS;
|
|
3599
|
+
return {
|
|
3600
|
+
selectImageText: locale?.imageEditor?.selectImageText ?? defaultLabels.selectImageText,
|
|
3601
|
+
selectImageAriaLabel: locale?.imageEditor?.selectImageAriaLabel ?? defaultLabels.selectImageAriaLabel,
|
|
3602
|
+
cropModalTitle: locale?.imageEditor?.cropModalTitle ?? defaultLabels.cropModalTitle,
|
|
3603
|
+
cropCancelText: locale?.imageEditor?.cropCancelText ?? locale?.common?.cancelText ?? defaultLabels.cropCancelText,
|
|
3604
|
+
cropConfirmText: locale?.imageEditor?.cropConfirmText ?? locale?.common?.okText ?? defaultLabels.cropConfirmText,
|
|
3605
|
+
cropperDialogAriaLabel: locale?.imageEditor?.cropperDialogAriaLabel ?? defaultLabels.cropperDialogAriaLabel,
|
|
3606
|
+
imageToCropAriaLabel: locale?.imageEditor?.imageToCropAriaLabel ?? defaultLabels.imageToCropAriaLabel,
|
|
3607
|
+
moveCropAreaAriaLabel: locale?.imageEditor?.moveCropAreaAriaLabel ?? defaultLabels.moveCropAreaAriaLabel,
|
|
3608
|
+
resizeCropAreaAriaLabel: locale?.imageEditor?.resizeCropAreaAriaLabel ?? defaultLabels.resizeCropAreaAriaLabel,
|
|
3609
|
+
loadingCropImageAriaLabel: locale?.imageEditor?.loadingCropImageAriaLabel ?? defaultLabels.loadingCropImageAriaLabel,
|
|
3610
|
+
annotationToolbarAriaLabel: locale?.imageEditor?.annotationToolbarAriaLabel ?? defaultLabels.annotationToolbarAriaLabel,
|
|
3611
|
+
annotationEditorAriaLabel: locale?.imageEditor?.annotationEditorAriaLabel ?? defaultLabels.annotationEditorAriaLabel,
|
|
3612
|
+
annotationCanvasAriaLabel: locale?.imageEditor?.annotationCanvasAriaLabel ?? defaultLabels.annotationCanvasAriaLabel,
|
|
3613
|
+
loadingAnnotationImageAriaLabel: locale?.imageEditor?.loadingAnnotationImageAriaLabel ?? defaultLabels.loadingAnnotationImageAriaLabel,
|
|
3614
|
+
selectToolText: locale?.imageEditor?.selectToolText ?? defaultLabels.selectToolText,
|
|
3615
|
+
rectangleToolText: locale?.imageEditor?.rectangleToolText ?? defaultLabels.rectangleToolText,
|
|
3616
|
+
ellipseToolText: locale?.imageEditor?.ellipseToolText ?? defaultLabels.ellipseToolText,
|
|
3617
|
+
polygonToolText: locale?.imageEditor?.polygonToolText ?? defaultLabels.polygonToolText,
|
|
3618
|
+
freehandToolText: locale?.imageEditor?.freehandToolText ?? defaultLabels.freehandToolText,
|
|
3619
|
+
deleteText: locale?.imageEditor?.deleteText ?? defaultLabels.deleteText
|
|
3620
|
+
};
|
|
3621
|
+
}
|
|
3622
|
+
var DEFAULT_STATUS_LABELS = {
|
|
3623
|
+
tagCloseAriaLabel: "Close tag",
|
|
3624
|
+
badgeLabel: "notification",
|
|
3625
|
+
badgeCountLabel: "{count} notifications"
|
|
3626
|
+
};
|
|
3627
|
+
var ZH_CN_STATUS_LABELS = {
|
|
3628
|
+
tagCloseAriaLabel: "\u5173\u95ED\u6807\u7B7E",
|
|
3629
|
+
badgeLabel: "\u901A\u77E5",
|
|
3630
|
+
badgeCountLabel: "{count} \u6761\u901A\u77E5"
|
|
3631
|
+
};
|
|
3632
|
+
function getStatusLabels(locale) {
|
|
3633
|
+
const defaultLabels = locale?.locale?.startsWith("zh") ? ZH_CN_STATUS_LABELS : DEFAULT_STATUS_LABELS;
|
|
3634
|
+
return {
|
|
3635
|
+
tagCloseAriaLabel: locale?.status?.tagCloseAriaLabel ?? defaultLabels.tagCloseAriaLabel,
|
|
3636
|
+
badgeLabel: locale?.status?.badgeLabel ?? defaultLabels.badgeLabel,
|
|
3637
|
+
badgeCountLabel: locale?.status?.badgeCountLabel ?? defaultLabels.badgeCountLabel
|
|
3638
|
+
};
|
|
3639
|
+
}
|
|
3640
|
+
var DEFAULT_FORM_VALIDATION_LABELS = {
|
|
3641
|
+
required: "This field is required",
|
|
3642
|
+
typeString: "Value must be a string",
|
|
3643
|
+
typeNumber: "Value must be a number",
|
|
3644
|
+
typeBoolean: "Value must be a boolean",
|
|
3645
|
+
typeArray: "Value must be an array",
|
|
3646
|
+
typeObject: "Value must be an object",
|
|
3647
|
+
email: "Please enter a valid email address",
|
|
3648
|
+
phone: "Please enter a valid phone number",
|
|
3649
|
+
url: "Please enter a valid URL",
|
|
3650
|
+
date: "Please enter a valid date",
|
|
3651
|
+
idCard: "Please enter a valid ID card number",
|
|
3652
|
+
minLength: "Minimum length is {min} characters",
|
|
3653
|
+
maxLength: "Maximum length is {max} characters",
|
|
3654
|
+
minValue: "Minimum value is {min}",
|
|
3655
|
+
maxValue: "Maximum value is {max}",
|
|
3656
|
+
minItems: "Minimum {min} items required",
|
|
3657
|
+
maxItems: "Maximum {max} items allowed",
|
|
3658
|
+
patternMismatch: "Value does not match the required pattern",
|
|
3659
|
+
validatorFailed: "Validation failed",
|
|
3660
|
+
validatorError: "Validation error occurred"
|
|
3661
|
+
};
|
|
3662
|
+
var ZH_CN_FORM_VALIDATION_LABELS = {
|
|
3663
|
+
required: "\u6B64\u5B57\u6BB5\u4E3A\u5FC5\u586B\u9879",
|
|
3664
|
+
typeString: "\u503C\u5FC5\u987B\u662F\u5B57\u7B26\u4E32",
|
|
3665
|
+
typeNumber: "\u503C\u5FC5\u987B\u662F\u6570\u5B57",
|
|
3666
|
+
typeBoolean: "\u503C\u5FC5\u987B\u662F\u5E03\u5C14\u503C",
|
|
3667
|
+
typeArray: "\u503C\u5FC5\u987B\u662F\u6570\u7EC4",
|
|
3668
|
+
typeObject: "\u503C\u5FC5\u987B\u662F\u5BF9\u8C61",
|
|
3669
|
+
email: "\u8BF7\u8F93\u5165\u6709\u6548\u7684\u90AE\u7BB1\u5730\u5740",
|
|
3670
|
+
phone: "\u8BF7\u8F93\u5165\u6709\u6548\u7684\u7535\u8BDD\u53F7\u7801",
|
|
3671
|
+
url: "\u8BF7\u8F93\u5165\u6709\u6548\u7684\u7F51\u5740",
|
|
3672
|
+
date: "\u8BF7\u8F93\u5165\u6709\u6548\u7684\u65E5\u671F",
|
|
3673
|
+
idCard: "\u8BF7\u8F93\u5165\u6709\u6548\u7684\u8EAB\u4EFD\u8BC1\u53F7\u7801",
|
|
3674
|
+
minLength: "\u957F\u5EA6\u4E0D\u80FD\u5C11\u4E8E {min} \u4E2A\u5B57\u7B26",
|
|
3675
|
+
maxLength: "\u957F\u5EA6\u4E0D\u80FD\u8D85\u8FC7 {max} \u4E2A\u5B57\u7B26",
|
|
3676
|
+
minValue: "\u6570\u503C\u4E0D\u80FD\u5C0F\u4E8E {min}",
|
|
3677
|
+
maxValue: "\u6570\u503C\u4E0D\u80FD\u5927\u4E8E {max}",
|
|
3678
|
+
minItems: "\u81F3\u5C11\u9700\u8981 {min} \u9879",
|
|
3679
|
+
maxItems: "\u6700\u591A\u5141\u8BB8 {max} \u9879",
|
|
3680
|
+
patternMismatch: "\u683C\u5F0F\u4E0D\u6B63\u786E",
|
|
3681
|
+
validatorFailed: "\u6821\u9A8C\u672A\u901A\u8FC7",
|
|
3682
|
+
validatorError: "\u6821\u9A8C\u65F6\u53D1\u751F\u9519\u8BEF"
|
|
3683
|
+
};
|
|
3684
|
+
function getFormValidationLabels(locale, overrides) {
|
|
3685
|
+
const isZh = !!locale?.locale?.startsWith("zh");
|
|
3686
|
+
const defaultLabels = isZh ? ZH_CN_FORM_VALIDATION_LABELS : DEFAULT_FORM_VALIDATION_LABELS;
|
|
3687
|
+
const fv = locale?.formValidation;
|
|
3688
|
+
const resolved = {};
|
|
3689
|
+
for (const key of Object.keys(defaultLabels)) {
|
|
3690
|
+
resolved[key] = overrides?.[key] ?? fv?.[key] ?? defaultLabels[key];
|
|
3691
|
+
}
|
|
3692
|
+
return resolved;
|
|
3693
|
+
}
|
|
3694
|
+
var DEFAULT_TIME_PICKER_LABELS = {
|
|
3695
|
+
hour: "Hour",
|
|
3696
|
+
minute: "Min",
|
|
3697
|
+
second: "Sec",
|
|
3698
|
+
now: "Now",
|
|
3699
|
+
ok: "OK",
|
|
3700
|
+
start: "Start",
|
|
3701
|
+
end: "End",
|
|
3702
|
+
clear: "Clear time",
|
|
3703
|
+
toggle: "Toggle time picker",
|
|
3704
|
+
dialog: "Time picker",
|
|
3705
|
+
selectTime: "Select time",
|
|
3706
|
+
selectTimeRange: "Select time range"
|
|
3707
|
+
};
|
|
3708
|
+
var ZH_CN_TIME_PICKER_LABELS = {
|
|
3709
|
+
hour: "\u65F6",
|
|
3710
|
+
minute: "\u5206",
|
|
3711
|
+
second: "\u79D2",
|
|
3712
|
+
now: "\u73B0\u5728",
|
|
3713
|
+
ok: "\u786E\u5B9A",
|
|
3714
|
+
start: "\u5F00\u59CB",
|
|
3715
|
+
end: "\u7ED3\u675F",
|
|
3716
|
+
clear: "\u6E05\u9664\u65F6\u95F4",
|
|
3717
|
+
toggle: "\u6253\u5F00\u65F6\u95F4\u9009\u62E9\u5668",
|
|
3718
|
+
dialog: "\u65F6\u95F4\u9009\u62E9\u5668",
|
|
3719
|
+
selectTime: "\u8BF7\u9009\u62E9\u65F6\u95F4",
|
|
3720
|
+
selectTimeRange: "\u8BF7\u9009\u62E9\u65F6\u95F4\u8303\u56F4"
|
|
3721
|
+
};
|
|
3722
|
+
var DEFAULT_UPLOAD_LABELS = {
|
|
3723
|
+
dragAreaAriaLabel: "Upload file by clicking or dragging",
|
|
3724
|
+
buttonAriaLabel: "Upload file",
|
|
3725
|
+
clickToUploadText: "Click to upload",
|
|
3726
|
+
dragAndDropText: "or drag and drop",
|
|
3727
|
+
acceptInfoText: "Accepted: {accept}",
|
|
3728
|
+
maxSizeInfoText: "Max size: {maxSize}",
|
|
3729
|
+
selectFileText: "Select File",
|
|
3730
|
+
uploadedFilesAriaLabel: "Uploaded files",
|
|
3731
|
+
successAriaLabel: "Success",
|
|
3732
|
+
errorAriaLabel: "Error",
|
|
3733
|
+
uploadingAriaLabel: "Uploading",
|
|
3734
|
+
removeFileAriaLabel: "Remove {fileName}",
|
|
3735
|
+
previewFileAriaLabel: "Preview {fileName}"
|
|
3736
|
+
};
|
|
3737
|
+
var ZH_CN_UPLOAD_LABELS = {
|
|
3738
|
+
dragAreaAriaLabel: "\u70B9\u51FB\u6216\u62D6\u62FD\u4E0A\u4F20\u6587\u4EF6",
|
|
3739
|
+
buttonAriaLabel: "\u4E0A\u4F20\u6587\u4EF6",
|
|
3740
|
+
clickToUploadText: "\u70B9\u51FB\u4E0A\u4F20",
|
|
3741
|
+
dragAndDropText: "\u6216\u62D6\u62FD\u5230\u6B64\u5904",
|
|
3742
|
+
acceptInfoText: "\u652F\u6301\uFF1A{accept}",
|
|
3743
|
+
maxSizeInfoText: "\u6700\u5927\u5927\u5C0F\uFF1A{maxSize}",
|
|
3744
|
+
selectFileText: "\u9009\u62E9\u6587\u4EF6",
|
|
3745
|
+
uploadedFilesAriaLabel: "\u5DF2\u4E0A\u4F20\u6587\u4EF6",
|
|
3746
|
+
successAriaLabel: "\u6210\u529F",
|
|
3747
|
+
errorAriaLabel: "\u9519\u8BEF",
|
|
3748
|
+
uploadingAriaLabel: "\u4E0A\u4F20\u4E2D",
|
|
3749
|
+
removeFileAriaLabel: "\u79FB\u9664 {fileName}",
|
|
3750
|
+
previewFileAriaLabel: "\u9884\u89C8 {fileName}"
|
|
3751
|
+
};
|
|
3279
3752
|
|
|
3280
|
-
// src/utils/datepicker-
|
|
3753
|
+
// src/utils/i18n/datepicker-locales/ar-SA.ts
|
|
3754
|
+
var AR_SA_DATEPICKER_LOCALE = {
|
|
3755
|
+
locale: "ar-SA",
|
|
3756
|
+
labels: {
|
|
3757
|
+
today: "\u0627\u0644\u064A\u0648\u0645",
|
|
3758
|
+
ok: "\u0645\u0648\u0627\u0641\u0642",
|
|
3759
|
+
calendar: "\u0627\u0644\u062A\u0642\u0648\u064A\u0645",
|
|
3760
|
+
toggleCalendar: "\u0641\u062A\u062D \u0627\u0644\u062A\u0642\u0648\u064A\u0645",
|
|
3761
|
+
clearDate: "\u0645\u0633\u062D \u0627\u0644\u062A\u0627\u0631\u064A\u062E",
|
|
3762
|
+
previousMonth: "\u0627\u0644\u0634\u0647\u0631 \u0627\u0644\u0633\u0627\u0628\u0642",
|
|
3763
|
+
nextMonth: "\u0627\u0644\u0634\u0647\u0631 \u0627\u0644\u062A\u0627\u0644\u064A"
|
|
3764
|
+
}
|
|
3765
|
+
};
|
|
3766
|
+
|
|
3767
|
+
// src/utils/i18n/datepicker-locales/de-DE.ts
|
|
3768
|
+
var DE_DE_DATEPICKER_LOCALE = {
|
|
3769
|
+
locale: "de-DE",
|
|
3770
|
+
labels: {
|
|
3771
|
+
today: "Heute",
|
|
3772
|
+
ok: "OK",
|
|
3773
|
+
calendar: "Kalender",
|
|
3774
|
+
toggleCalendar: "Kalender \xF6ffnen",
|
|
3775
|
+
clearDate: "Datum l\xF6schen",
|
|
3776
|
+
previousMonth: "Vorheriger Monat",
|
|
3777
|
+
nextMonth: "N\xE4chster Monat"
|
|
3778
|
+
}
|
|
3779
|
+
};
|
|
3780
|
+
|
|
3781
|
+
// src/utils/i18n/datepicker-locales/en-US.ts
|
|
3281
3782
|
var EN_US_DATEPICKER_LOCALE = {
|
|
3282
3783
|
locale: "en-US",
|
|
3283
3784
|
labels: {
|
|
@@ -3290,22 +3791,11 @@ var EN_US_DATEPICKER_LOCALE = {
|
|
|
3290
3791
|
nextMonth: "Next month"
|
|
3291
3792
|
}
|
|
3292
3793
|
};
|
|
3293
|
-
|
|
3294
|
-
|
|
3794
|
+
|
|
3795
|
+
// src/utils/i18n/datepicker-locales/es-ES.ts
|
|
3796
|
+
var ES_ES_DATEPICKER_LOCALE = {
|
|
3797
|
+
locale: "es-ES",
|
|
3295
3798
|
labels: {
|
|
3296
|
-
today: "\u4ECA\u5929",
|
|
3297
|
-
ok: "\u786E\u5B9A",
|
|
3298
|
-
calendar: "\u65E5\u5386",
|
|
3299
|
-
toggleCalendar: "\u6253\u5F00\u65E5\u5386",
|
|
3300
|
-
clearDate: "\u6E05\u9664\u65E5\u671F",
|
|
3301
|
-
previousMonth: "\u4E0A\u4E2A\u6708",
|
|
3302
|
-
nextMonth: "\u4E0B\u4E2A\u6708"
|
|
3303
|
-
}
|
|
3304
|
-
};
|
|
3305
|
-
var DATEPICKER_LABELS_BY_LANGUAGE = {
|
|
3306
|
-
en: EN_US_DATEPICKER_LOCALE.labels,
|
|
3307
|
-
zh: ZH_CN_DATEPICKER_LOCALE.labels,
|
|
3308
|
-
es: {
|
|
3309
3799
|
today: "Hoy",
|
|
3310
3800
|
ok: "Aceptar",
|
|
3311
3801
|
calendar: "Calendario",
|
|
@@ -3313,8 +3803,13 @@ var DATEPICKER_LABELS_BY_LANGUAGE = {
|
|
|
3313
3803
|
clearDate: "Borrar fecha",
|
|
3314
3804
|
previousMonth: "Mes anterior",
|
|
3315
3805
|
nextMonth: "Mes siguiente"
|
|
3316
|
-
}
|
|
3317
|
-
|
|
3806
|
+
}
|
|
3807
|
+
};
|
|
3808
|
+
|
|
3809
|
+
// src/utils/i18n/datepicker-locales/fr-FR.ts
|
|
3810
|
+
var FR_FR_DATEPICKER_LOCALE = {
|
|
3811
|
+
locale: "fr-FR",
|
|
3812
|
+
labels: {
|
|
3318
3813
|
today: "Aujourd'hui",
|
|
3319
3814
|
ok: "OK",
|
|
3320
3815
|
calendar: "Calendrier",
|
|
@@ -3322,17 +3817,55 @@ var DATEPICKER_LABELS_BY_LANGUAGE = {
|
|
|
3322
3817
|
clearDate: "Effacer la date",
|
|
3323
3818
|
previousMonth: "Mois pr\xE9c\xE9dent",
|
|
3324
3819
|
nextMonth: "Mois suivant"
|
|
3325
|
-
}
|
|
3326
|
-
|
|
3327
|
-
|
|
3820
|
+
}
|
|
3821
|
+
};
|
|
3822
|
+
|
|
3823
|
+
// src/utils/i18n/datepicker-locales/id-ID.ts
|
|
3824
|
+
var ID_ID_DATEPICKER_LOCALE = {
|
|
3825
|
+
locale: "id-ID",
|
|
3826
|
+
labels: {
|
|
3827
|
+
today: "Hari ini",
|
|
3328
3828
|
ok: "OK",
|
|
3329
3829
|
calendar: "Kalender",
|
|
3330
|
-
toggleCalendar: "
|
|
3331
|
-
clearDate: "
|
|
3332
|
-
previousMonth: "
|
|
3333
|
-
nextMonth: "
|
|
3334
|
-
}
|
|
3335
|
-
|
|
3830
|
+
toggleCalendar: "Buka kalender",
|
|
3831
|
+
clearDate: "Hapus tanggal",
|
|
3832
|
+
previousMonth: "Bulan sebelumnya",
|
|
3833
|
+
nextMonth: "Bulan berikutnya"
|
|
3834
|
+
}
|
|
3835
|
+
};
|
|
3836
|
+
|
|
3837
|
+
// src/utils/i18n/datepicker-locales/ja-JP.ts
|
|
3838
|
+
var JA_JP_DATEPICKER_LOCALE = {
|
|
3839
|
+
locale: "ja-JP",
|
|
3840
|
+
labels: {
|
|
3841
|
+
today: "\u4ECA\u65E5",
|
|
3842
|
+
ok: "OK",
|
|
3843
|
+
calendar: "\u30AB\u30EC\u30F3\u30C0\u30FC",
|
|
3844
|
+
toggleCalendar: "\u30AB\u30EC\u30F3\u30C0\u30FC\u3092\u958B\u304F",
|
|
3845
|
+
clearDate: "\u65E5\u4ED8\u3092\u30AF\u30EA\u30A2",
|
|
3846
|
+
previousMonth: "\u524D\u306E\u6708",
|
|
3847
|
+
nextMonth: "\u6B21\u306E\u6708"
|
|
3848
|
+
}
|
|
3849
|
+
};
|
|
3850
|
+
|
|
3851
|
+
// src/utils/i18n/datepicker-locales/ko-KR.ts
|
|
3852
|
+
var KO_KR_DATEPICKER_LOCALE = {
|
|
3853
|
+
locale: "ko-KR",
|
|
3854
|
+
labels: {
|
|
3855
|
+
today: "\uC624\uB298",
|
|
3856
|
+
ok: "\uD655\uC778",
|
|
3857
|
+
calendar: "\uB2EC\uB825",
|
|
3858
|
+
toggleCalendar: "\uB2EC\uB825 \uC5F4\uAE30",
|
|
3859
|
+
clearDate: "\uB0A0\uC9DC \uC9C0\uC6B0\uAE30",
|
|
3860
|
+
previousMonth: "\uC774\uC804 \uB2EC",
|
|
3861
|
+
nextMonth: "\uB2E4\uC74C \uB2EC"
|
|
3862
|
+
}
|
|
3863
|
+
};
|
|
3864
|
+
|
|
3865
|
+
// src/utils/i18n/datepicker-locales/pt-BR.ts
|
|
3866
|
+
var PT_BR_DATEPICKER_LOCALE = {
|
|
3867
|
+
locale: "pt-BR",
|
|
3868
|
+
labels: {
|
|
3336
3869
|
today: "Hoje",
|
|
3337
3870
|
ok: "OK",
|
|
3338
3871
|
calendar: "Calend\xE1rio",
|
|
@@ -3340,17 +3873,93 @@ var DATEPICKER_LABELS_BY_LANGUAGE = {
|
|
|
3340
3873
|
clearDate: "Limpar data",
|
|
3341
3874
|
previousMonth: "M\xEAs anterior",
|
|
3342
3875
|
nextMonth: "Pr\xF3ximo m\xEAs"
|
|
3343
|
-
},
|
|
3344
|
-
ar: {
|
|
3345
|
-
today: "\u0627\u0644\u064A\u0648\u0645",
|
|
3346
|
-
ok: "\u0645\u0648\u0627\u0641\u0642",
|
|
3347
|
-
calendar: "\u0627\u0644\u062A\u0642\u0648\u064A\u0645",
|
|
3348
|
-
toggleCalendar: "\u0641\u062A\u062D \u0627\u0644\u062A\u0642\u0648\u064A\u0645",
|
|
3349
|
-
clearDate: "\u0645\u0633\u062D \u0627\u0644\u062A\u0627\u0631\u064A\u062E",
|
|
3350
|
-
previousMonth: "\u0627\u0644\u0634\u0647\u0631 \u0627\u0644\u0633\u0627\u0628\u0642",
|
|
3351
|
-
nextMonth: "\u0627\u0644\u0634\u0647\u0631 \u0627\u0644\u062A\u0627\u0644\u064A"
|
|
3352
3876
|
}
|
|
3353
3877
|
};
|
|
3878
|
+
|
|
3879
|
+
// src/utils/i18n/datepicker-locales/th-TH.ts
|
|
3880
|
+
var TH_TH_DATEPICKER_LOCALE = {
|
|
3881
|
+
locale: "th-TH",
|
|
3882
|
+
labels: {
|
|
3883
|
+
today: "\u0E27\u0E31\u0E19\u0E19\u0E35\u0E49",
|
|
3884
|
+
ok: "\u0E15\u0E01\u0E25\u0E07",
|
|
3885
|
+
calendar: "\u0E1B\u0E0F\u0E34\u0E17\u0E34\u0E19",
|
|
3886
|
+
toggleCalendar: "\u0E40\u0E1B\u0E34\u0E14\u0E1B\u0E0F\u0E34\u0E17\u0E34\u0E19",
|
|
3887
|
+
clearDate: "\u0E25\u0E49\u0E32\u0E07\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48",
|
|
3888
|
+
previousMonth: "\u0E40\u0E14\u0E37\u0E2D\u0E19\u0E01\u0E48\u0E2D\u0E19\u0E2B\u0E19\u0E49\u0E32",
|
|
3889
|
+
nextMonth: "\u0E40\u0E14\u0E37\u0E2D\u0E19\u0E16\u0E31\u0E14\u0E44\u0E1B"
|
|
3890
|
+
}
|
|
3891
|
+
};
|
|
3892
|
+
|
|
3893
|
+
// src/utils/i18n/datepicker-locales/vi-VN.ts
|
|
3894
|
+
var VI_VN_DATEPICKER_LOCALE = {
|
|
3895
|
+
locale: "vi-VN",
|
|
3896
|
+
labels: {
|
|
3897
|
+
today: "H\xF4m nay",
|
|
3898
|
+
ok: "OK",
|
|
3899
|
+
calendar: "L\u1ECBch",
|
|
3900
|
+
toggleCalendar: "M\u1EDF l\u1ECBch",
|
|
3901
|
+
clearDate: "X\xF3a ng\xE0y",
|
|
3902
|
+
previousMonth: "Th\xE1ng tr\u01B0\u1EDBc",
|
|
3903
|
+
nextMonth: "Th\xE1ng sau"
|
|
3904
|
+
}
|
|
3905
|
+
};
|
|
3906
|
+
|
|
3907
|
+
// src/utils/i18n/datepicker-locales/zh-CN.ts
|
|
3908
|
+
var ZH_CN_DATEPICKER_LOCALE = {
|
|
3909
|
+
locale: "zh-CN",
|
|
3910
|
+
labels: {
|
|
3911
|
+
today: "\u4ECA\u5929",
|
|
3912
|
+
ok: "\u786E\u5B9A",
|
|
3913
|
+
calendar: "\u65E5\u5386",
|
|
3914
|
+
toggleCalendar: "\u6253\u5F00\u65E5\u5386",
|
|
3915
|
+
clearDate: "\u6E05\u9664\u65E5\u671F",
|
|
3916
|
+
previousMonth: "\u4E0A\u4E2A\u6708",
|
|
3917
|
+
nextMonth: "\u4E0B\u4E2A\u6708"
|
|
3918
|
+
}
|
|
3919
|
+
};
|
|
3920
|
+
|
|
3921
|
+
// src/utils/i18n/datepicker-locales/zh-TW.ts
|
|
3922
|
+
var ZH_TW_DATEPICKER_LOCALE = {
|
|
3923
|
+
locale: "zh-TW",
|
|
3924
|
+
labels: {
|
|
3925
|
+
today: "\u4ECA\u5929",
|
|
3926
|
+
ok: "\u78BA\u5B9A",
|
|
3927
|
+
calendar: "\u65E5\u66C6",
|
|
3928
|
+
toggleCalendar: "\u958B\u555F\u65E5\u66C6",
|
|
3929
|
+
clearDate: "\u6E05\u9664\u65E5\u671F",
|
|
3930
|
+
previousMonth: "\u4E0A\u500B\u6708",
|
|
3931
|
+
nextMonth: "\u4E0B\u500B\u6708"
|
|
3932
|
+
}
|
|
3933
|
+
};
|
|
3934
|
+
|
|
3935
|
+
// src/utils/datepicker-i18n.ts
|
|
3936
|
+
var EN_US_DATEPICKER_LOCALE2 = EN_US_DATEPICKER_LOCALE;
|
|
3937
|
+
var ZH_CN_DATEPICKER_LOCALE2 = ZH_CN_DATEPICKER_LOCALE;
|
|
3938
|
+
var DATEPICKER_LOCALES = [
|
|
3939
|
+
EN_US_DATEPICKER_LOCALE,
|
|
3940
|
+
ZH_CN_DATEPICKER_LOCALE,
|
|
3941
|
+
ZH_TW_DATEPICKER_LOCALE,
|
|
3942
|
+
JA_JP_DATEPICKER_LOCALE,
|
|
3943
|
+
KO_KR_DATEPICKER_LOCALE,
|
|
3944
|
+
TH_TH_DATEPICKER_LOCALE,
|
|
3945
|
+
VI_VN_DATEPICKER_LOCALE,
|
|
3946
|
+
ID_ID_DATEPICKER_LOCALE,
|
|
3947
|
+
ES_ES_DATEPICKER_LOCALE,
|
|
3948
|
+
FR_FR_DATEPICKER_LOCALE,
|
|
3949
|
+
DE_DE_DATEPICKER_LOCALE,
|
|
3950
|
+
PT_BR_DATEPICKER_LOCALE,
|
|
3951
|
+
AR_SA_DATEPICKER_LOCALE
|
|
3952
|
+
];
|
|
3953
|
+
var DATEPICKER_LOCALE_BY_ID = new Map(
|
|
3954
|
+
DATEPICKER_LOCALES.map((preset) => [preset.locale.toLowerCase(), preset])
|
|
3955
|
+
);
|
|
3956
|
+
var DATEPICKER_LOCALE_BY_LANGUAGE = /* @__PURE__ */ new Map();
|
|
3957
|
+
for (const preset of DATEPICKER_LOCALES) {
|
|
3958
|
+
const language = preset.locale.split("-")[0]?.toLowerCase();
|
|
3959
|
+
if (language && !DATEPICKER_LOCALE_BY_LANGUAGE.has(language)) {
|
|
3960
|
+
DATEPICKER_LOCALE_BY_LANGUAGE.set(language, preset);
|
|
3961
|
+
}
|
|
3962
|
+
}
|
|
3354
3963
|
function isDatePickerLocaleConfig(value) {
|
|
3355
3964
|
return Boolean(value && typeof value === "object" && "datePicker" in value);
|
|
3356
3965
|
}
|
|
@@ -3366,7 +3975,7 @@ function getDatePickerLocaleCode(locale) {
|
|
|
3366
3975
|
function getDefaultDatePickerLabels(locale) {
|
|
3367
3976
|
const lc = (getDatePickerLocaleCode(locale) ?? "").toLowerCase();
|
|
3368
3977
|
const language = lc.split("-")[0];
|
|
3369
|
-
return
|
|
3978
|
+
return DATEPICKER_LOCALE_BY_ID.get(lc)?.labels ?? DATEPICKER_LOCALE_BY_LANGUAGE.get(language)?.labels ?? EN_US_DATEPICKER_LOCALE2.labels;
|
|
3370
3979
|
}
|
|
3371
3980
|
function getDatePickerLabels(locale, overrides) {
|
|
3372
3981
|
return {
|
|
@@ -3376,35 +3985,104 @@ function getDatePickerLabels(locale, overrides) {
|
|
|
3376
3985
|
};
|
|
3377
3986
|
}
|
|
3378
3987
|
|
|
3988
|
+
// src/utils/picker-utils.ts
|
|
3989
|
+
var defaultIsDisabled = (item) => !!item?.disabled;
|
|
3990
|
+
function findFirstEnabledIndex(items, isDisabled = defaultIsDisabled) {
|
|
3991
|
+
for (let i = 0; i < items.length; i++) {
|
|
3992
|
+
if (!isDisabled(items[i])) return i;
|
|
3993
|
+
}
|
|
3994
|
+
return -1;
|
|
3995
|
+
}
|
|
3996
|
+
function findLastEnabledIndex(items, isDisabled = defaultIsDisabled) {
|
|
3997
|
+
for (let i = items.length - 1; i >= 0; i--) {
|
|
3998
|
+
if (!isDisabled(items[i])) return i;
|
|
3999
|
+
}
|
|
4000
|
+
return -1;
|
|
4001
|
+
}
|
|
4002
|
+
function findNextEnabledIndex(items, current, direction, isDisabled = defaultIsDisabled) {
|
|
4003
|
+
if (items.length === 0) return -1;
|
|
4004
|
+
const start = current < 0 ? direction === 1 ? 0 : items.length - 1 : current + direction;
|
|
4005
|
+
for (let i = start; i >= 0 && i < items.length; i += direction) {
|
|
4006
|
+
if (!isDisabled(items[i])) return i;
|
|
4007
|
+
}
|
|
4008
|
+
return current;
|
|
4009
|
+
}
|
|
4010
|
+
function getCyclicIndex(length, current, direction) {
|
|
4011
|
+
if (length <= 0) return -1;
|
|
4012
|
+
return (current + direction + length) % length;
|
|
4013
|
+
}
|
|
4014
|
+
function getInitialPickerActiveIndex(items, activeFirst, isDisabled = defaultIsDisabled) {
|
|
4015
|
+
return activeFirst ? findFirstEnabledIndex(items, isDisabled) : -1;
|
|
4016
|
+
}
|
|
4017
|
+
function getPickerNavigationIndex(items, current, key, isDisabled = defaultIsDisabled) {
|
|
4018
|
+
switch (key) {
|
|
4019
|
+
case "ArrowDown":
|
|
4020
|
+
return findNextEnabledIndex(items, current, 1, isDisabled);
|
|
4021
|
+
case "ArrowUp":
|
|
4022
|
+
return findNextEnabledIndex(items, current, -1, isDisabled);
|
|
4023
|
+
case "Home":
|
|
4024
|
+
return findFirstEnabledIndex(items, isDisabled);
|
|
4025
|
+
case "End":
|
|
4026
|
+
return findLastEnabledIndex(items, isDisabled);
|
|
4027
|
+
default:
|
|
4028
|
+
return current;
|
|
4029
|
+
}
|
|
4030
|
+
}
|
|
4031
|
+
function getPickerOptionId(listboxId, index) {
|
|
4032
|
+
return `${listboxId}-option-${index}`;
|
|
4033
|
+
}
|
|
4034
|
+
function getDisclosureStateAttr(open) {
|
|
4035
|
+
return { "data-state": open ? "open" : "closed" };
|
|
4036
|
+
}
|
|
4037
|
+
function getPickerComboboxAria({
|
|
4038
|
+
expanded,
|
|
4039
|
+
listboxId,
|
|
4040
|
+
activeIndex = -1,
|
|
4041
|
+
activeOptionId
|
|
4042
|
+
}) {
|
|
4043
|
+
return {
|
|
4044
|
+
role: "combobox",
|
|
4045
|
+
"aria-expanded": expanded,
|
|
4046
|
+
"aria-haspopup": "listbox",
|
|
4047
|
+
"aria-controls": expanded ? listboxId : void 0,
|
|
4048
|
+
"aria-activedescendant": expanded ? activeOptionId ?? (activeIndex >= 0 ? getPickerOptionId(listboxId, activeIndex) : void 0) : void 0,
|
|
4049
|
+
"data-state": expanded ? "open" : "closed"
|
|
4050
|
+
};
|
|
4051
|
+
}
|
|
4052
|
+
function getPickerListboxAria({ id, label } = {}) {
|
|
4053
|
+
return {
|
|
4054
|
+
id,
|
|
4055
|
+
role: "listbox",
|
|
4056
|
+
"aria-label": label
|
|
4057
|
+
};
|
|
4058
|
+
}
|
|
4059
|
+
function getPickerOptionAria({
|
|
4060
|
+
selected = false,
|
|
4061
|
+
disabled = false
|
|
4062
|
+
}) {
|
|
4063
|
+
return {
|
|
4064
|
+
role: "option",
|
|
4065
|
+
"aria-selected": selected,
|
|
4066
|
+
"aria-disabled": disabled || void 0
|
|
4067
|
+
};
|
|
4068
|
+
}
|
|
4069
|
+
function getPickerTriggerKeyAction(key, expanded) {
|
|
4070
|
+
switch (key) {
|
|
4071
|
+
case "Enter":
|
|
4072
|
+
case " ":
|
|
4073
|
+
return "toggle";
|
|
4074
|
+
case "ArrowDown":
|
|
4075
|
+
return expanded ? "none" : "open";
|
|
4076
|
+
case "Escape":
|
|
4077
|
+
return expanded ? "close" : "none";
|
|
4078
|
+
default:
|
|
4079
|
+
return "none";
|
|
4080
|
+
}
|
|
4081
|
+
}
|
|
4082
|
+
|
|
3379
4083
|
// src/utils/timepicker-utils.ts
|
|
3380
|
-
var
|
|
3381
|
-
|
|
3382
|
-
minute: "\u5206",
|
|
3383
|
-
second: "\u79D2",
|
|
3384
|
-
now: "\u73B0\u5728",
|
|
3385
|
-
ok: "\u786E\u5B9A",
|
|
3386
|
-
start: "\u5F00\u59CB",
|
|
3387
|
-
end: "\u7ED3\u675F",
|
|
3388
|
-
clear: "\u6E05\u9664\u65F6\u95F4",
|
|
3389
|
-
toggle: "\u6253\u5F00\u65F6\u95F4\u9009\u62E9\u5668",
|
|
3390
|
-
dialog: "\u65F6\u95F4\u9009\u62E9\u5668",
|
|
3391
|
-
selectTime: "\u8BF7\u9009\u62E9\u65F6\u95F4",
|
|
3392
|
-
selectTimeRange: "\u8BF7\u9009\u62E9\u65F6\u95F4\u8303\u56F4"
|
|
3393
|
-
};
|
|
3394
|
-
var EN_LABELS = {
|
|
3395
|
-
hour: "Hour",
|
|
3396
|
-
minute: "Min",
|
|
3397
|
-
second: "Sec",
|
|
3398
|
-
now: "Now",
|
|
3399
|
-
ok: "OK",
|
|
3400
|
-
start: "Start",
|
|
3401
|
-
end: "End",
|
|
3402
|
-
clear: "Clear time",
|
|
3403
|
-
toggle: "Toggle time picker",
|
|
3404
|
-
dialog: "Time picker",
|
|
3405
|
-
selectTime: "Select time",
|
|
3406
|
-
selectTimeRange: "Select time range"
|
|
3407
|
-
};
|
|
4084
|
+
var EN_LABELS = DEFAULT_TIME_PICKER_LABELS;
|
|
4085
|
+
var ZH_LABELS = ZH_CN_TIME_PICKER_LABELS;
|
|
3408
4086
|
var TIME_PICKER_LABELS_BY_LANGUAGE = {
|
|
3409
4087
|
en: EN_LABELS,
|
|
3410
4088
|
zh: ZH_LABELS,
|
|
@@ -3479,26 +4157,59 @@ var TIME_PICKER_LABELS_BY_LANGUAGE = {
|
|
|
3479
4157
|
selectTimeRange: "\u0627\u062E\u062A\u0631 \u0646\u0637\u0627\u0642 \u0627\u0644\u0648\u0642\u062A"
|
|
3480
4158
|
}
|
|
3481
4159
|
};
|
|
4160
|
+
function getTimePickerLocaleCode(locale) {
|
|
4161
|
+
return typeof locale === "string" ? locale : locale?.locale;
|
|
4162
|
+
}
|
|
3482
4163
|
function isZhLocale(locale) {
|
|
3483
|
-
return (locale ?? "").toLowerCase().startsWith("zh");
|
|
4164
|
+
return (getTimePickerLocaleCode(locale) ?? "").toLowerCase().startsWith("zh");
|
|
3484
4165
|
}
|
|
3485
4166
|
function getTimePickerLabels(locale, overrides) {
|
|
3486
|
-
const
|
|
4167
|
+
const localeCode = getTimePickerLocaleCode(locale);
|
|
4168
|
+
const language = (localeCode ?? "").split("-")[0]?.toLowerCase();
|
|
3487
4169
|
const base = language ? TIME_PICKER_LABELS_BY_LANGUAGE[language] ?? EN_LABELS : EN_LABELS;
|
|
3488
|
-
|
|
4170
|
+
const localeLabels = typeof locale === "string" ? void 0 : locale?.timePicker;
|
|
4171
|
+
return { ...base, ...localeLabels ?? {}, ...overrides ?? {} };
|
|
3489
4172
|
}
|
|
3490
4173
|
function pluralizeEn(value, singular) {
|
|
3491
4174
|
return getIntlPluralCategory(value, "en") === "one" ? singular : `${singular}s`;
|
|
3492
4175
|
}
|
|
3493
4176
|
function getTimePickerOptionAriaLabel(value, unit, locale, labelOverrides) {
|
|
3494
4177
|
const labels = getTimePickerLabels(locale, labelOverrides);
|
|
4178
|
+
const localeCode = getTimePickerLocaleCode(locale);
|
|
3495
4179
|
const unitLabel = unit === "hour" ? labels.hour : unit === "minute" ? labels.minute : labels.second;
|
|
3496
|
-
if (isZhLocale(locale)) return `${formatIntlNumber(value,
|
|
3497
|
-
const lc = (
|
|
4180
|
+
if (isZhLocale(locale)) return `${formatIntlNumber(value, localeCode)}${unitLabel}`;
|
|
4181
|
+
const lc = (localeCode ?? "").toLowerCase();
|
|
3498
4182
|
if (lc.startsWith("en") || !lc && !labelOverrides) {
|
|
3499
|
-
return `${formatIntlNumber(value,
|
|
4183
|
+
return `${formatIntlNumber(value, localeCode)} ${pluralizeEn(value, unit)}`;
|
|
4184
|
+
}
|
|
4185
|
+
return `${formatIntlNumber(value, localeCode)} ${unitLabel}`;
|
|
4186
|
+
}
|
|
4187
|
+
function focusTimePickerOption(panel, unit, action) {
|
|
4188
|
+
if (!panel) return;
|
|
4189
|
+
const nodes = Array.from(
|
|
4190
|
+
panel.querySelectorAll(`button[data-tiger-timepicker-unit="${unit}"]`)
|
|
4191
|
+
).filter((button) => !button.disabled);
|
|
4192
|
+
if (nodes.length === 0) return;
|
|
4193
|
+
const active = panel.ownerDocument.activeElement;
|
|
4194
|
+
const activeIndex = active ? nodes.indexOf(active) : -1;
|
|
4195
|
+
const selectedIndex = nodes.findIndex((button) => button.getAttribute("aria-selected") === "true");
|
|
4196
|
+
const baseIndex = activeIndex >= 0 ? activeIndex : Math.max(0, selectedIndex);
|
|
4197
|
+
let nextIndex = baseIndex;
|
|
4198
|
+
switch (action) {
|
|
4199
|
+
case "prev":
|
|
4200
|
+
nextIndex = findNextEnabledIndex(nodes, baseIndex, -1);
|
|
4201
|
+
break;
|
|
4202
|
+
case "next":
|
|
4203
|
+
nextIndex = findNextEnabledIndex(nodes, baseIndex, 1);
|
|
4204
|
+
break;
|
|
4205
|
+
case "first":
|
|
4206
|
+
nextIndex = findFirstEnabledIndex(nodes);
|
|
4207
|
+
break;
|
|
4208
|
+
case "last":
|
|
4209
|
+
nextIndex = findLastEnabledIndex(nodes);
|
|
4210
|
+
break;
|
|
3500
4211
|
}
|
|
3501
|
-
|
|
4212
|
+
nodes[nextIndex]?.focus();
|
|
3502
4213
|
}
|
|
3503
4214
|
var timePickerBaseClasses = "relative inline-block w-full max-w-xs";
|
|
3504
4215
|
var timePickerInputWrapperClasses = "relative flex items-center";
|
|
@@ -3635,67 +4346,67 @@ function interpolateUploadLabel(template, params) {
|
|
|
3635
4346
|
function getUploadLabels(locale, overrides) {
|
|
3636
4347
|
return {
|
|
3637
4348
|
dragAreaAriaLabel: resolveLocaleText(
|
|
3638
|
-
|
|
4349
|
+
DEFAULT_UPLOAD_LABELS.dragAreaAriaLabel,
|
|
3639
4350
|
overrides?.dragAreaAriaLabel,
|
|
3640
4351
|
locale?.upload?.dragAreaAriaLabel
|
|
3641
4352
|
),
|
|
3642
4353
|
buttonAriaLabel: resolveLocaleText(
|
|
3643
|
-
|
|
4354
|
+
DEFAULT_UPLOAD_LABELS.buttonAriaLabel,
|
|
3644
4355
|
overrides?.buttonAriaLabel,
|
|
3645
4356
|
locale?.upload?.buttonAriaLabel
|
|
3646
4357
|
),
|
|
3647
4358
|
clickToUploadText: resolveLocaleText(
|
|
3648
|
-
|
|
4359
|
+
DEFAULT_UPLOAD_LABELS.clickToUploadText,
|
|
3649
4360
|
overrides?.clickToUploadText,
|
|
3650
4361
|
locale?.upload?.clickToUploadText
|
|
3651
4362
|
),
|
|
3652
4363
|
dragAndDropText: resolveLocaleText(
|
|
3653
|
-
|
|
4364
|
+
DEFAULT_UPLOAD_LABELS.dragAndDropText,
|
|
3654
4365
|
overrides?.dragAndDropText,
|
|
3655
4366
|
locale?.upload?.dragAndDropText
|
|
3656
4367
|
),
|
|
3657
4368
|
acceptInfoText: resolveLocaleText(
|
|
3658
|
-
|
|
4369
|
+
DEFAULT_UPLOAD_LABELS.acceptInfoText,
|
|
3659
4370
|
overrides?.acceptInfoText,
|
|
3660
4371
|
locale?.upload?.acceptInfoText
|
|
3661
4372
|
),
|
|
3662
4373
|
maxSizeInfoText: resolveLocaleText(
|
|
3663
|
-
|
|
4374
|
+
DEFAULT_UPLOAD_LABELS.maxSizeInfoText,
|
|
3664
4375
|
overrides?.maxSizeInfoText,
|
|
3665
4376
|
locale?.upload?.maxSizeInfoText
|
|
3666
4377
|
),
|
|
3667
4378
|
selectFileText: resolveLocaleText(
|
|
3668
|
-
|
|
4379
|
+
DEFAULT_UPLOAD_LABELS.selectFileText,
|
|
3669
4380
|
overrides?.selectFileText,
|
|
3670
4381
|
locale?.upload?.selectFileText
|
|
3671
4382
|
),
|
|
3672
4383
|
uploadedFilesAriaLabel: resolveLocaleText(
|
|
3673
|
-
|
|
4384
|
+
DEFAULT_UPLOAD_LABELS.uploadedFilesAriaLabel,
|
|
3674
4385
|
overrides?.uploadedFilesAriaLabel,
|
|
3675
4386
|
locale?.upload?.uploadedFilesAriaLabel
|
|
3676
4387
|
),
|
|
3677
4388
|
successAriaLabel: resolveLocaleText(
|
|
3678
|
-
|
|
4389
|
+
DEFAULT_UPLOAD_LABELS.successAriaLabel,
|
|
3679
4390
|
overrides?.successAriaLabel,
|
|
3680
4391
|
locale?.upload?.successAriaLabel
|
|
3681
4392
|
),
|
|
3682
4393
|
errorAriaLabel: resolveLocaleText(
|
|
3683
|
-
|
|
4394
|
+
DEFAULT_UPLOAD_LABELS.errorAriaLabel,
|
|
3684
4395
|
overrides?.errorAriaLabel,
|
|
3685
4396
|
locale?.upload?.errorAriaLabel
|
|
3686
4397
|
),
|
|
3687
4398
|
uploadingAriaLabel: resolveLocaleText(
|
|
3688
|
-
|
|
4399
|
+
DEFAULT_UPLOAD_LABELS.uploadingAriaLabel,
|
|
3689
4400
|
overrides?.uploadingAriaLabel,
|
|
3690
4401
|
locale?.upload?.uploadingAriaLabel
|
|
3691
4402
|
),
|
|
3692
4403
|
removeFileAriaLabel: resolveLocaleText(
|
|
3693
|
-
|
|
4404
|
+
DEFAULT_UPLOAD_LABELS.removeFileAriaLabel,
|
|
3694
4405
|
overrides?.removeFileAriaLabel,
|
|
3695
4406
|
locale?.upload?.removeFileAriaLabel
|
|
3696
4407
|
),
|
|
3697
4408
|
previewFileAriaLabel: resolveLocaleText(
|
|
3698
|
-
|
|
4409
|
+
DEFAULT_UPLOAD_LABELS.previewFileAriaLabel,
|
|
3699
4410
|
overrides?.previewFileAriaLabel,
|
|
3700
4411
|
locale?.upload?.previewFileAriaLabel
|
|
3701
4412
|
)
|
|
@@ -3711,7 +4422,16 @@ var enUS = {
|
|
|
3711
4422
|
cancelText: "Cancel",
|
|
3712
4423
|
closeText: "Close",
|
|
3713
4424
|
loadingText: "Loading...",
|
|
3714
|
-
emptyText: "No data"
|
|
4425
|
+
emptyText: "No data",
|
|
4426
|
+
noMoreText: "No more data",
|
|
4427
|
+
searchPlaceholder: "Search",
|
|
4428
|
+
clearText: "Clear"
|
|
4429
|
+
},
|
|
4430
|
+
empty: {
|
|
4431
|
+
noData: "No data",
|
|
4432
|
+
noDataAvailable: "No data available",
|
|
4433
|
+
noResults: "No results found",
|
|
4434
|
+
error: "Something went wrong"
|
|
3715
4435
|
},
|
|
3716
4436
|
modal: {
|
|
3717
4437
|
closeAriaLabel: "Close",
|
|
@@ -3721,6 +4441,16 @@ var enUS = {
|
|
|
3721
4441
|
drawer: {
|
|
3722
4442
|
closeAriaLabel: "Close"
|
|
3723
4443
|
},
|
|
4444
|
+
qrcode: {
|
|
4445
|
+
ariaLabel: "QR Code",
|
|
4446
|
+
expiredText: "QR code expired",
|
|
4447
|
+
refreshText: "Refresh",
|
|
4448
|
+
loadingText: "Loading..."
|
|
4449
|
+
},
|
|
4450
|
+
timeline: {
|
|
4451
|
+
pendingText: "Loading..."
|
|
4452
|
+
},
|
|
4453
|
+
upload: DEFAULT_UPLOAD_LABELS,
|
|
3724
4454
|
pagination: {
|
|
3725
4455
|
totalText: "Total {total} items",
|
|
3726
4456
|
itemsPerPageText: "/ page",
|
|
@@ -3748,23 +4478,132 @@ var enUS = {
|
|
|
3748
4478
|
columnSettingsText: "Column settings",
|
|
3749
4479
|
columnSettingsAriaLabel: "Column settings",
|
|
3750
4480
|
lockColumnAriaLabel: "Lock column {column}",
|
|
3751
|
-
unlockColumnAriaLabel: "Unlock column {column}"
|
|
4481
|
+
unlockColumnAriaLabel: "Unlock column {column}",
|
|
4482
|
+
allText: "All",
|
|
4483
|
+
filterPlaceholder: "Filter...",
|
|
4484
|
+
exportCsvText: "Export CSV",
|
|
4485
|
+
exportExcelText: "Export Excel",
|
|
4486
|
+
exportCsvAriaLabel: "Export to CSV",
|
|
4487
|
+
exportExcelAriaLabel: "Export to Excel",
|
|
4488
|
+
expandRowAriaLabel: "Expand row",
|
|
4489
|
+
collapseRowAriaLabel: "Collapse row"
|
|
3752
4490
|
},
|
|
4491
|
+
datePicker: EN_US_DATEPICKER_LOCALE,
|
|
4492
|
+
timePicker: DEFAULT_TIME_PICKER_LABELS,
|
|
3753
4493
|
formWizard: {
|
|
3754
4494
|
prevText: "Previous",
|
|
3755
4495
|
nextText: "Next",
|
|
3756
4496
|
finishText: "Finish"
|
|
3757
4497
|
},
|
|
4498
|
+
tour: {
|
|
4499
|
+
prevText: "Previous",
|
|
4500
|
+
nextText: "Next",
|
|
4501
|
+
finishText: "Finish",
|
|
4502
|
+
closeAriaLabel: "Close tour"
|
|
4503
|
+
},
|
|
4504
|
+
calendar: {
|
|
4505
|
+
previousMonth: "Previous month",
|
|
4506
|
+
nextMonth: "Next month",
|
|
4507
|
+
previousYear: "Previous year",
|
|
4508
|
+
nextYear: "Next year",
|
|
4509
|
+
yearSelectAriaLabel: "Year",
|
|
4510
|
+
monthSelectAriaLabel: "Month",
|
|
4511
|
+
daySelectAriaLabel: "Day"
|
|
4512
|
+
},
|
|
4513
|
+
fileManager: {
|
|
4514
|
+
rootText: "Root"
|
|
4515
|
+
},
|
|
4516
|
+
imageViewer: {
|
|
4517
|
+
dialogAriaLabel: "Image viewer",
|
|
4518
|
+
previewDialogAriaLabel: "Image preview",
|
|
4519
|
+
closeAriaLabel: "Close",
|
|
4520
|
+
closePreviewAriaLabel: "Close preview",
|
|
4521
|
+
previousImageAriaLabel: "Previous image",
|
|
4522
|
+
nextImageAriaLabel: "Next image",
|
|
4523
|
+
zoomOutAriaLabel: "Zoom out",
|
|
4524
|
+
resetAriaLabel: "Reset",
|
|
4525
|
+
zoomInAriaLabel: "Zoom in",
|
|
4526
|
+
rotateLeftAriaLabel: "Rotate left",
|
|
4527
|
+
rotateRightAriaLabel: "Rotate right"
|
|
4528
|
+
},
|
|
4529
|
+
imageEditor: {
|
|
4530
|
+
selectImageText: "Select image",
|
|
4531
|
+
selectImageAriaLabel: "Select image to crop and upload",
|
|
4532
|
+
cropModalTitle: "Crop image",
|
|
4533
|
+
cropCancelText: "Cancel",
|
|
4534
|
+
cropConfirmText: "Confirm crop",
|
|
4535
|
+
cropperDialogAriaLabel: "Image cropper",
|
|
4536
|
+
imageToCropAriaLabel: "Image to crop",
|
|
4537
|
+
moveCropAreaAriaLabel: "Move crop area",
|
|
4538
|
+
resizeCropAreaAriaLabel: "Resize crop area {handle}",
|
|
4539
|
+
loadingCropImageAriaLabel: "Loading image for cropping",
|
|
4540
|
+
annotationToolbarAriaLabel: "Annotation tools",
|
|
4541
|
+
annotationEditorAriaLabel: "Image annotation editor",
|
|
4542
|
+
annotationCanvasAriaLabel: "Image annotation canvas",
|
|
4543
|
+
loadingAnnotationImageAriaLabel: "Loading image for annotation",
|
|
4544
|
+
selectToolText: "Select",
|
|
4545
|
+
rectangleToolText: "Rectangle",
|
|
4546
|
+
ellipseToolText: "Ellipse",
|
|
4547
|
+
polygonToolText: "Polygon",
|
|
4548
|
+
freehandToolText: "Freehand",
|
|
4549
|
+
deleteText: "Delete"
|
|
4550
|
+
},
|
|
4551
|
+
status: {
|
|
4552
|
+
tagCloseAriaLabel: "Close tag",
|
|
4553
|
+
badgeLabel: "notification",
|
|
4554
|
+
badgeCountLabel: "{count} notifications"
|
|
4555
|
+
},
|
|
3758
4556
|
taskBoard: {
|
|
3759
4557
|
emptyColumnText: "No tasks",
|
|
3760
4558
|
addCardText: "Add task",
|
|
4559
|
+
addColumnText: "Add column",
|
|
3761
4560
|
wipLimitText: "WIP limit: {limit}",
|
|
3762
4561
|
dragHintText: "Drag to move",
|
|
3763
4562
|
boardAriaLabel: "Task Board"
|
|
4563
|
+
},
|
|
4564
|
+
formValidation: {
|
|
4565
|
+
required: "This field is required",
|
|
4566
|
+
typeString: "Value must be a string",
|
|
4567
|
+
typeNumber: "Value must be a number",
|
|
4568
|
+
typeBoolean: "Value must be a boolean",
|
|
4569
|
+
typeArray: "Value must be an array",
|
|
4570
|
+
typeObject: "Value must be an object",
|
|
4571
|
+
email: "Please enter a valid email address",
|
|
4572
|
+
phone: "Please enter a valid phone number",
|
|
4573
|
+
url: "Please enter a valid URL",
|
|
4574
|
+
date: "Please enter a valid date",
|
|
4575
|
+
idCard: "Please enter a valid ID card number",
|
|
4576
|
+
minLength: "Minimum length is {min} characters",
|
|
4577
|
+
maxLength: "Maximum length is {max} characters",
|
|
4578
|
+
minValue: "Minimum value is {min}",
|
|
4579
|
+
maxValue: "Maximum value is {max}",
|
|
4580
|
+
minItems: "Minimum {min} items required",
|
|
4581
|
+
maxItems: "Maximum {max} items allowed",
|
|
4582
|
+
patternMismatch: "Value does not match the required pattern",
|
|
4583
|
+
validatorFailed: "Validation failed",
|
|
4584
|
+
validatorError: "Validation error occurred"
|
|
3764
4585
|
}
|
|
3765
4586
|
};
|
|
3766
4587
|
|
|
3767
4588
|
// src/utils/i18n/define-locale.ts
|
|
4589
|
+
var DATEPICKER_LOCALES2 = [
|
|
4590
|
+
EN_US_DATEPICKER_LOCALE,
|
|
4591
|
+
ZH_CN_DATEPICKER_LOCALE,
|
|
4592
|
+
ZH_TW_DATEPICKER_LOCALE,
|
|
4593
|
+
JA_JP_DATEPICKER_LOCALE,
|
|
4594
|
+
KO_KR_DATEPICKER_LOCALE,
|
|
4595
|
+
TH_TH_DATEPICKER_LOCALE,
|
|
4596
|
+
VI_VN_DATEPICKER_LOCALE,
|
|
4597
|
+
ID_ID_DATEPICKER_LOCALE,
|
|
4598
|
+
ES_ES_DATEPICKER_LOCALE,
|
|
4599
|
+
FR_FR_DATEPICKER_LOCALE,
|
|
4600
|
+
DE_DE_DATEPICKER_LOCALE,
|
|
4601
|
+
PT_BR_DATEPICKER_LOCALE,
|
|
4602
|
+
AR_SA_DATEPICKER_LOCALE
|
|
4603
|
+
];
|
|
4604
|
+
var DATEPICKER_LOCALE_BY_ID2 = new Map(
|
|
4605
|
+
DATEPICKER_LOCALES2.map((locale) => [locale.locale, locale])
|
|
4606
|
+
);
|
|
3768
4607
|
function isPlainObject(value) {
|
|
3769
4608
|
if (value === null || typeof value !== "object") return false;
|
|
3770
4609
|
const proto = Object.getPrototypeOf(value);
|
|
@@ -3786,7 +4625,9 @@ function deepMerge(base, override) {
|
|
|
3786
4625
|
return out;
|
|
3787
4626
|
}
|
|
3788
4627
|
function defineLocale(overrides = {}) {
|
|
3789
|
-
|
|
4628
|
+
const locale = overrides.locale ? DATEPICKER_LOCALE_BY_ID2.get(overrides.locale) : void 0;
|
|
4629
|
+
const normalizedOverrides = locale && !overrides.datePicker ? { ...overrides, datePicker: locale } : overrides;
|
|
4630
|
+
return deepMerge(enUS, normalizedOverrides);
|
|
3790
4631
|
}
|
|
3791
4632
|
function defineText(text = {}) {
|
|
3792
4633
|
return defineLocale(text);
|
|
@@ -4013,6 +4854,18 @@ function isAtMax(value, max = Infinity) {
|
|
|
4013
4854
|
if (value === null || value === void 0) return false;
|
|
4014
4855
|
return value >= max;
|
|
4015
4856
|
}
|
|
4857
|
+
function formatInputNumberDisplay(value, options = {}) {
|
|
4858
|
+
if (value === null || value === void 0) return "";
|
|
4859
|
+
if (options.formatter) return options.formatter(value);
|
|
4860
|
+
if (options.precision !== void 0) return value.toFixed(options.precision);
|
|
4861
|
+
return String(value);
|
|
4862
|
+
}
|
|
4863
|
+
function parseInputNumberValue(str, options = {}) {
|
|
4864
|
+
if (str === "" || str === "-") return null;
|
|
4865
|
+
if (options.parser) return options.parser(str);
|
|
4866
|
+
const num = Number(str);
|
|
4867
|
+
return Number.isNaN(num) ? null : num;
|
|
4868
|
+
}
|
|
4016
4869
|
|
|
4017
4870
|
// src/utils/form-item-styles.ts
|
|
4018
4871
|
var FORM_ITEM_SPACING = {
|
|
@@ -4146,6 +4999,14 @@ var SELECT_SIZE_CLASSES = {
|
|
|
4146
4999
|
md: "text-base py-2",
|
|
4147
5000
|
lg: "text-lg py-2.5"
|
|
4148
5001
|
};
|
|
5002
|
+
var SELECT_VIRTUAL_ITEM_HEIGHT = {
|
|
5003
|
+
sm: 32,
|
|
5004
|
+
md: 40,
|
|
5005
|
+
lg: 48
|
|
5006
|
+
};
|
|
5007
|
+
function getSelectVirtualItemHeight(size = "md") {
|
|
5008
|
+
return SELECT_VIRTUAL_ITEM_HEIGHT[size] ?? SELECT_VIRTUAL_ITEM_HEIGHT.md;
|
|
5009
|
+
}
|
|
4149
5010
|
function getSelectSizeClasses(size) {
|
|
4150
5011
|
return SELECT_SIZE_CLASSES[size];
|
|
4151
5012
|
}
|
|
@@ -4407,128 +5268,128 @@ function isEmpty(value) {
|
|
|
4407
5268
|
}
|
|
4408
5269
|
return false;
|
|
4409
5270
|
}
|
|
4410
|
-
function validateType(value, type, customMessage) {
|
|
5271
|
+
function validateType(value, type, customMessage, messages = DEFAULT_FORM_VALIDATION_LABELS) {
|
|
4411
5272
|
switch (type) {
|
|
4412
5273
|
case "string":
|
|
4413
5274
|
if (typeof value !== "string") {
|
|
4414
|
-
return customMessage ||
|
|
5275
|
+
return customMessage || messages.typeString;
|
|
4415
5276
|
}
|
|
4416
5277
|
break;
|
|
4417
5278
|
case "number":
|
|
4418
5279
|
if (typeof value !== "number" && isNaN(Number(value))) {
|
|
4419
|
-
return customMessage ||
|
|
5280
|
+
return customMessage || messages.typeNumber;
|
|
4420
5281
|
}
|
|
4421
5282
|
break;
|
|
4422
5283
|
case "boolean":
|
|
4423
5284
|
if (typeof value !== "boolean") {
|
|
4424
|
-
return customMessage ||
|
|
5285
|
+
return customMessage || messages.typeBoolean;
|
|
4425
5286
|
}
|
|
4426
5287
|
break;
|
|
4427
5288
|
case "array":
|
|
4428
5289
|
if (!Array.isArray(value)) {
|
|
4429
|
-
return customMessage ||
|
|
5290
|
+
return customMessage || messages.typeArray;
|
|
4430
5291
|
}
|
|
4431
5292
|
break;
|
|
4432
5293
|
case "object":
|
|
4433
5294
|
if (typeof value !== "object" || Array.isArray(value)) {
|
|
4434
|
-
return customMessage ||
|
|
5295
|
+
return customMessage || messages.typeObject;
|
|
4435
5296
|
}
|
|
4436
5297
|
break;
|
|
4437
5298
|
case "email":
|
|
4438
5299
|
if (typeof value === "string" && !EMAIL_PATTERN.test(value)) {
|
|
4439
|
-
return customMessage ||
|
|
5300
|
+
return customMessage || messages.email;
|
|
4440
5301
|
}
|
|
4441
5302
|
break;
|
|
4442
5303
|
case "phone":
|
|
4443
5304
|
if (typeof value === "string") {
|
|
4444
5305
|
const digits = value.replace(/\D/g, "");
|
|
4445
5306
|
if (!PHONE_PATTERN.test(value) || digits.length < 7) {
|
|
4446
|
-
return customMessage ||
|
|
5307
|
+
return customMessage || messages.phone;
|
|
4447
5308
|
}
|
|
4448
5309
|
}
|
|
4449
5310
|
break;
|
|
4450
5311
|
case "url":
|
|
4451
5312
|
if (typeof value === "string" && !URL_PATTERN.test(value)) {
|
|
4452
|
-
return customMessage ||
|
|
5313
|
+
return customMessage || messages.url;
|
|
4453
5314
|
}
|
|
4454
5315
|
break;
|
|
4455
5316
|
case "date":
|
|
4456
5317
|
if (!(value instanceof Date) && isNaN(Date.parse(String(value)))) {
|
|
4457
|
-
return customMessage ||
|
|
5318
|
+
return customMessage || messages.date;
|
|
4458
5319
|
}
|
|
4459
5320
|
break;
|
|
4460
5321
|
case "id-card":
|
|
4461
5322
|
if (typeof value === "string" && !ID_CARD_PATTERN.test(value)) {
|
|
4462
|
-
return customMessage ||
|
|
5323
|
+
return customMessage || messages.idCard;
|
|
4463
5324
|
}
|
|
4464
5325
|
break;
|
|
4465
5326
|
}
|
|
4466
5327
|
return null;
|
|
4467
5328
|
}
|
|
4468
|
-
function validateRange(value, min, max, customMessage) {
|
|
5329
|
+
function validateRange(value, min, max, customMessage, messages = DEFAULT_FORM_VALIDATION_LABELS) {
|
|
4469
5330
|
if (typeof value === "string") {
|
|
4470
5331
|
if (min !== void 0 && value.length < min) {
|
|
4471
|
-
return customMessage ||
|
|
5332
|
+
return customMessage || messages.minLength.replace("{min}", String(min));
|
|
4472
5333
|
}
|
|
4473
5334
|
if (max !== void 0 && value.length > max) {
|
|
4474
|
-
return customMessage ||
|
|
5335
|
+
return customMessage || messages.maxLength.replace("{max}", String(max));
|
|
4475
5336
|
}
|
|
4476
5337
|
}
|
|
4477
5338
|
if (typeof value === "number") {
|
|
4478
5339
|
if (min !== void 0 && value < min) {
|
|
4479
|
-
return customMessage ||
|
|
5340
|
+
return customMessage || messages.minValue.replace("{min}", String(min));
|
|
4480
5341
|
}
|
|
4481
5342
|
if (max !== void 0 && value > max) {
|
|
4482
|
-
return customMessage ||
|
|
5343
|
+
return customMessage || messages.maxValue.replace("{max}", String(max));
|
|
4483
5344
|
}
|
|
4484
5345
|
}
|
|
4485
5346
|
if (Array.isArray(value)) {
|
|
4486
5347
|
if (min !== void 0 && value.length < min) {
|
|
4487
|
-
return customMessage ||
|
|
5348
|
+
return customMessage || messages.minItems.replace("{min}", String(min));
|
|
4488
5349
|
}
|
|
4489
5350
|
if (max !== void 0 && value.length > max) {
|
|
4490
|
-
return customMessage ||
|
|
5351
|
+
return customMessage || messages.maxItems.replace("{max}", String(max));
|
|
4491
5352
|
}
|
|
4492
5353
|
}
|
|
4493
5354
|
return null;
|
|
4494
5355
|
}
|
|
4495
|
-
async function validateRule(value, rule, allValues) {
|
|
5356
|
+
async function validateRule(value, rule, allValues, messages = DEFAULT_FORM_VALIDATION_LABELS) {
|
|
4496
5357
|
if (!rule.required && isEmpty(value)) {
|
|
4497
5358
|
return null;
|
|
4498
5359
|
}
|
|
4499
5360
|
const transformedValue = rule.transform ? rule.transform(value) : value;
|
|
4500
5361
|
if (rule.required && isEmpty(transformedValue)) {
|
|
4501
|
-
return rule.message ||
|
|
5362
|
+
return rule.message || messages.required;
|
|
4502
5363
|
}
|
|
4503
5364
|
if (rule.type && !isEmpty(transformedValue)) {
|
|
4504
|
-
const typeError = validateType(transformedValue, rule.type, rule.message);
|
|
5365
|
+
const typeError = validateType(transformedValue, rule.type, rule.message, messages);
|
|
4505
5366
|
if (typeError) return typeError;
|
|
4506
5367
|
}
|
|
4507
5368
|
if (!isEmpty(transformedValue)) {
|
|
4508
|
-
const rangeError = validateRange(transformedValue, rule.min, rule.max, rule.message);
|
|
5369
|
+
const rangeError = validateRange(transformedValue, rule.min, rule.max, rule.message, messages);
|
|
4509
5370
|
if (rangeError) return rangeError;
|
|
4510
5371
|
}
|
|
4511
5372
|
if (rule.pattern && typeof transformedValue === "string") {
|
|
4512
5373
|
if (!rule.pattern.test(transformedValue)) {
|
|
4513
|
-
return rule.message ||
|
|
5374
|
+
return rule.message || messages.patternMismatch;
|
|
4514
5375
|
}
|
|
4515
5376
|
}
|
|
4516
5377
|
if (rule.validator) {
|
|
4517
5378
|
try {
|
|
4518
5379
|
const result = await rule.validator(transformedValue, allValues);
|
|
4519
5380
|
if (result === false) {
|
|
4520
|
-
return rule.message ||
|
|
5381
|
+
return rule.message || messages.validatorFailed;
|
|
4521
5382
|
}
|
|
4522
5383
|
if (typeof result === "string") {
|
|
4523
5384
|
return result;
|
|
4524
5385
|
}
|
|
4525
5386
|
} catch {
|
|
4526
|
-
return rule.message ||
|
|
5387
|
+
return rule.message || messages.validatorError;
|
|
4527
5388
|
}
|
|
4528
5389
|
}
|
|
4529
5390
|
return null;
|
|
4530
5391
|
}
|
|
4531
|
-
async function validateField(fieldName, value, rules, allValues, trigger) {
|
|
5392
|
+
async function validateField(fieldName, value, rules, allValues, trigger, messages = DEFAULT_FORM_VALIDATION_LABELS) {
|
|
4532
5393
|
if (!rules) {
|
|
4533
5394
|
return null;
|
|
4534
5395
|
}
|
|
@@ -4541,18 +5402,18 @@ async function validateField(fieldName, value, rules, allValues, trigger) {
|
|
|
4541
5402
|
continue;
|
|
4542
5403
|
}
|
|
4543
5404
|
}
|
|
4544
|
-
const error = await validateRule(value, rule, allValues);
|
|
5405
|
+
const error = await validateRule(value, rule, allValues, messages);
|
|
4545
5406
|
if (error) {
|
|
4546
5407
|
return error;
|
|
4547
5408
|
}
|
|
4548
5409
|
}
|
|
4549
5410
|
return null;
|
|
4550
5411
|
}
|
|
4551
|
-
async function validateForm(values, rules) {
|
|
5412
|
+
async function validateForm(values, rules, messages = DEFAULT_FORM_VALIDATION_LABELS) {
|
|
4552
5413
|
const errors = [];
|
|
4553
5414
|
for (const [fieldName, fieldRules] of Object.entries(rules)) {
|
|
4554
5415
|
const value = getValueByPath(values, fieldName);
|
|
4555
|
-
const error = await validateField(fieldName, value, fieldRules, values);
|
|
5416
|
+
const error = await validateField(fieldName, value, fieldRules, values, void 0, messages);
|
|
4556
5417
|
if (error) {
|
|
4557
5418
|
errors.push({
|
|
4558
5419
|
field: fieldName,
|
|
@@ -4565,14 +5426,14 @@ async function validateForm(values, rules) {
|
|
|
4565
5426
|
errors
|
|
4566
5427
|
};
|
|
4567
5428
|
}
|
|
4568
|
-
async function validateFormFields(values, rules, fieldNames, trigger) {
|
|
5429
|
+
async function validateFormFields(values, rules, fieldNames, trigger, messages = DEFAULT_FORM_VALIDATION_LABELS) {
|
|
4569
5430
|
const errors = [];
|
|
4570
5431
|
const uniqueFieldNames = Array.from(new Set(fieldNames));
|
|
4571
5432
|
for (const fieldName of uniqueFieldNames) {
|
|
4572
5433
|
const fieldRules = rules[fieldName];
|
|
4573
5434
|
if (!fieldRules) continue;
|
|
4574
5435
|
const value = getValueByPath(values, fieldName);
|
|
4575
|
-
const error = await validateField(fieldName, value, fieldRules, values, trigger);
|
|
5436
|
+
const error = await validateField(fieldName, value, fieldRules, values, trigger, messages);
|
|
4576
5437
|
if (error) {
|
|
4577
5438
|
errors.push({ field: fieldName, message: error });
|
|
4578
5439
|
}
|
|
@@ -4670,23 +5531,28 @@ function parseDate(value) {
|
|
|
4670
5531
|
const parsed = new Date(value);
|
|
4671
5532
|
return isNaN(parsed.getTime()) ? null : parsed;
|
|
4672
5533
|
}
|
|
4673
|
-
|
|
5534
|
+
var defaultDateFormatOptions = {
|
|
5535
|
+
year: "numeric",
|
|
5536
|
+
month: "2-digit",
|
|
5537
|
+
day: "2-digit"
|
|
5538
|
+
};
|
|
5539
|
+
function getDateFormatParts(format) {
|
|
4674
5540
|
switch (format) {
|
|
4675
|
-
case "yyyy-MM-dd":
|
|
4676
|
-
case "yyyy/MM/dd":
|
|
4677
|
-
return { year: "numeric", month: "2-digit", day: "2-digit" };
|
|
4678
5541
|
case "MM/dd/yyyy":
|
|
4679
|
-
return
|
|
5542
|
+
return ["month", "/", "day", "/", "year"];
|
|
4680
5543
|
case "dd/MM/yyyy":
|
|
4681
|
-
return
|
|
5544
|
+
return ["day", "/", "month", "/", "year"];
|
|
5545
|
+
case "yyyy/MM/dd":
|
|
5546
|
+
return ["year", "/", "month", "/", "day"];
|
|
5547
|
+
case "yyyy-MM-dd":
|
|
4682
5548
|
default:
|
|
4683
|
-
return
|
|
5549
|
+
return ["year", "-", "month", "-", "day"];
|
|
4684
5550
|
}
|
|
4685
5551
|
}
|
|
4686
5552
|
function formatDate(date, format = "yyyy-MM-dd", locale) {
|
|
4687
5553
|
if (!date || isNaN(date.getTime())) return "";
|
|
4688
5554
|
if (locale) {
|
|
4689
|
-
const localized =
|
|
5555
|
+
const localized = safeIntlFormatDateParts(locale, format, date);
|
|
4690
5556
|
if (localized) return localized;
|
|
4691
5557
|
}
|
|
4692
5558
|
const year = date.getFullYear();
|
|
@@ -4705,7 +5571,7 @@ function formatDate(date, format = "yyyy-MM-dd", locale) {
|
|
|
4705
5571
|
return `${year}-${month}-${day}`;
|
|
4706
5572
|
}
|
|
4707
5573
|
}
|
|
4708
|
-
function formatDateWithLocale(date, locale, options =
|
|
5574
|
+
function formatDateWithLocale(date, locale, options = defaultDateFormatOptions) {
|
|
4709
5575
|
if (!date || isNaN(date.getTime())) return "";
|
|
4710
5576
|
if (!locale) return formatDate(date);
|
|
4711
5577
|
const localized = safeIntlFormat(locale, options, date);
|
|
@@ -4715,10 +5581,27 @@ function isSameDay(date1, date2) {
|
|
|
4715
5581
|
if (!date1 || !date2) return false;
|
|
4716
5582
|
return date1.getFullYear() === date2.getFullYear() && date1.getMonth() === date2.getMonth() && date1.getDate() === date2.getDate();
|
|
4717
5583
|
}
|
|
4718
|
-
function normalizeDate(date) {
|
|
4719
|
-
const normalized = new Date(date);
|
|
4720
|
-
normalized.setHours(0, 0, 0, 0);
|
|
4721
|
-
return normalized;
|
|
5584
|
+
function normalizeDate(date) {
|
|
5585
|
+
const normalized = new Date(date);
|
|
5586
|
+
normalized.setHours(0, 0, 0, 0);
|
|
5587
|
+
return normalized;
|
|
5588
|
+
}
|
|
5589
|
+
function addDays(date, days) {
|
|
5590
|
+
const next = new Date(date);
|
|
5591
|
+
next.setDate(next.getDate() + days);
|
|
5592
|
+
return next;
|
|
5593
|
+
}
|
|
5594
|
+
function addMonths(date, months) {
|
|
5595
|
+
const next = new Date(date);
|
|
5596
|
+
const day = next.getDate();
|
|
5597
|
+
next.setDate(1);
|
|
5598
|
+
next.setMonth(next.getMonth() + months);
|
|
5599
|
+
const maxDay = getDaysInMonth(next.getFullYear(), next.getMonth());
|
|
5600
|
+
next.setDate(Math.min(day, maxDay));
|
|
5601
|
+
return next;
|
|
5602
|
+
}
|
|
5603
|
+
function addYears(date, years) {
|
|
5604
|
+
return addMonths(date, years * 12);
|
|
4722
5605
|
}
|
|
4723
5606
|
function isDateInRange(date, minDate, maxDate) {
|
|
4724
5607
|
if (isNaN(date.getTime())) return false;
|
|
@@ -4801,6 +5684,30 @@ function safeIntlFormat(locale, options, date) {
|
|
|
4801
5684
|
return "";
|
|
4802
5685
|
}
|
|
4803
5686
|
}
|
|
5687
|
+
function safeIntlFormatDateParts(locale, format, date) {
|
|
5688
|
+
try {
|
|
5689
|
+
const key = `${locale}_${JSON.stringify(defaultDateFormatOptions)}_parts`;
|
|
5690
|
+
let fmt = intlCache.get(key);
|
|
5691
|
+
if (!fmt) {
|
|
5692
|
+
fmt = new Intl.DateTimeFormat(locale, defaultDateFormatOptions);
|
|
5693
|
+
intlCache.set(key, fmt);
|
|
5694
|
+
}
|
|
5695
|
+
const parts = fmt.formatToParts(date);
|
|
5696
|
+
const partMap = new Map(parts.map((part) => [part.type, part.value]));
|
|
5697
|
+
const year = partMap.get("year");
|
|
5698
|
+
const month = partMap.get("month");
|
|
5699
|
+
const day = partMap.get("day");
|
|
5700
|
+
if (!year || !month || !day) return "";
|
|
5701
|
+
return getDateFormatParts(format).map((part) => {
|
|
5702
|
+
if (part === "year") return year;
|
|
5703
|
+
if (part === "month") return month;
|
|
5704
|
+
if (part === "day") return day;
|
|
5705
|
+
return part;
|
|
5706
|
+
}).join("");
|
|
5707
|
+
} catch {
|
|
5708
|
+
return "";
|
|
5709
|
+
}
|
|
5710
|
+
}
|
|
4804
5711
|
function formatMonthYear(year, month, locale) {
|
|
4805
5712
|
if (locale) {
|
|
4806
5713
|
const text = safeIntlFormat(
|
|
@@ -4889,6 +5796,32 @@ function isToday(date) {
|
|
|
4889
5796
|
const today = /* @__PURE__ */ new Date();
|
|
4890
5797
|
return isSameDay(date, today);
|
|
4891
5798
|
}
|
|
5799
|
+
function getDatePickerCalendarCellState(input) {
|
|
5800
|
+
const { date, selectedDate = null, selectedRange = [null, null], isRangeMode = false } = input;
|
|
5801
|
+
const [rangeStart, rangeEnd] = selectedRange;
|
|
5802
|
+
const normDate = normalizeDate(date);
|
|
5803
|
+
const normStart = rangeStart ? normalizeDate(rangeStart) : null;
|
|
5804
|
+
const normEnd = rangeEnd ? normalizeDate(rangeEnd) : null;
|
|
5805
|
+
const isSelectingEnd = isRangeMode && Boolean(rangeStart) && !rangeEnd;
|
|
5806
|
+
const isRangeStart = isRangeMode && rangeStart ? isSameDay(date, rangeStart) : false;
|
|
5807
|
+
const isRangeEnd = isRangeMode && rangeEnd ? isSameDay(date, rangeEnd) : false;
|
|
5808
|
+
const isInRange = Boolean(
|
|
5809
|
+
isRangeMode && normStart && normEnd && normDate >= normStart && normDate <= normEnd
|
|
5810
|
+
);
|
|
5811
|
+
const isSelected = !isRangeMode ? selectedDate ? isSameDay(date, selectedDate) : false : isRangeStart || isRangeEnd;
|
|
5812
|
+
const isBeforeRangeStart = Boolean(isSelectingEnd && normStart && normDate < normStart);
|
|
5813
|
+
const isDisabled = Boolean(input.isDateDisabled?.(date)) || isBeforeRangeStart;
|
|
5814
|
+
return {
|
|
5815
|
+
iso: formatDate(date, "yyyy-MM-dd"),
|
|
5816
|
+
isCurrentMonthDay: input.isCurrentMonth?.(date) ?? true,
|
|
5817
|
+
isSelected,
|
|
5818
|
+
isTodayDay: isToday(date),
|
|
5819
|
+
isDisabled,
|
|
5820
|
+
isInRange,
|
|
5821
|
+
isRangeStart,
|
|
5822
|
+
isRangeEnd
|
|
5823
|
+
};
|
|
5824
|
+
}
|
|
4892
5825
|
|
|
4893
5826
|
// src/utils/datepicker-styles.ts
|
|
4894
5827
|
var datePickerBaseClasses = "relative inline-block w-full";
|
|
@@ -5145,20 +6078,20 @@ function formatTimeDisplayWithLocale(hours, minutes, seconds = 0, format = "24",
|
|
|
5145
6078
|
const suffix = period === "AM" ? labels.am : labels.pm;
|
|
5146
6079
|
return `${timeStr} ${suffix}`;
|
|
5147
6080
|
}
|
|
5148
|
-
function isTimeInRange(hours, minutes, minTime, maxTime) {
|
|
5149
|
-
const
|
|
6081
|
+
function isTimeInRange(hours, minutes, minTime, maxTime, seconds = 0) {
|
|
6082
|
+
const currentSeconds = hours * 3600 + minutes * 60 + seconds;
|
|
5150
6083
|
if (minTime) {
|
|
5151
6084
|
const min = parseTime(minTime);
|
|
5152
6085
|
if (min) {
|
|
5153
|
-
const
|
|
5154
|
-
if (
|
|
6086
|
+
const minSeconds = min.hours * 3600 + min.minutes * 60 + min.seconds;
|
|
6087
|
+
if (currentSeconds < minSeconds) return false;
|
|
5155
6088
|
}
|
|
5156
6089
|
}
|
|
5157
6090
|
if (maxTime) {
|
|
5158
6091
|
const max = parseTime(maxTime);
|
|
5159
6092
|
if (max) {
|
|
5160
|
-
const
|
|
5161
|
-
if (
|
|
6093
|
+
const maxSeconds = max.hours * 3600 + max.minutes * 60 + max.seconds;
|
|
6094
|
+
if (currentSeconds > maxSeconds) return false;
|
|
5162
6095
|
}
|
|
5163
6096
|
}
|
|
5164
6097
|
return true;
|
|
@@ -5192,6 +6125,26 @@ function getCurrentTime(showSeconds = false) {
|
|
|
5192
6125
|
return formatTime(now.getHours(), now.getMinutes(), now.getSeconds(), showSeconds);
|
|
5193
6126
|
}
|
|
5194
6127
|
|
|
6128
|
+
// src/utils/file-utils.ts
|
|
6129
|
+
function formatBytes(bytes, options = {}) {
|
|
6130
|
+
if (bytes === void 0 || bytes === null) return options.emptyText ?? "";
|
|
6131
|
+
const safeBytes = Number.isFinite(bytes) ? Math.max(0, bytes) : 0;
|
|
6132
|
+
if (safeBytes === 0) return "0 B";
|
|
6133
|
+
const units = ["B", "KB", "MB", "GB", "TB"];
|
|
6134
|
+
const k = 1024;
|
|
6135
|
+
const index = Math.min(units.length - 1, Math.floor(Math.log(safeBytes) / Math.log(k)));
|
|
6136
|
+
const size = safeBytes / Math.pow(k, index);
|
|
6137
|
+
const precision = Math.max(0, Math.floor(options.precision ?? 2));
|
|
6138
|
+
const text = size.toFixed(precision);
|
|
6139
|
+
return `${options.trimTrailingZeros ? text.replace(/\.0+$/, "").replace(/(\.\d*?)0+$/, "$1") : text} ${units[index]}`;
|
|
6140
|
+
}
|
|
6141
|
+
function getFileExtensionName(name, options) {
|
|
6142
|
+
const dot = name.lastIndexOf(".");
|
|
6143
|
+
if (dot <= 0 || dot === name.length - 1) return "";
|
|
6144
|
+
const extension = name.slice(dot + 1).toLowerCase();
|
|
6145
|
+
return options?.includeDot ? `.${extension}` : extension;
|
|
6146
|
+
}
|
|
6147
|
+
|
|
5195
6148
|
// src/utils/upload-utils.ts
|
|
5196
6149
|
var DEFAULT_UPLOAD_CHUNK_SIZE = 1024 * 1024;
|
|
5197
6150
|
var uploadStatusIconSizeClasses = {
|
|
@@ -5313,8 +6266,7 @@ function generateFileId() {
|
|
|
5313
6266
|
return `upload-${Date.now()}-${Math.random().toString(36).substring(2, 11)}`;
|
|
5314
6267
|
}
|
|
5315
6268
|
function getFileExtension(fileName) {
|
|
5316
|
-
|
|
5317
|
-
return `.${fileName.split(".").pop()?.toLowerCase() || ""}`;
|
|
6269
|
+
return getFileExtensionName(fileName, { includeDot: true });
|
|
5318
6270
|
}
|
|
5319
6271
|
function fileToUploadFile(file) {
|
|
5320
6272
|
return {
|
|
@@ -5399,11 +6351,7 @@ function validateFileSize(file, maxSize) {
|
|
|
5399
6351
|
return file.size <= maxSize;
|
|
5400
6352
|
}
|
|
5401
6353
|
function formatFileSize(bytes) {
|
|
5402
|
-
|
|
5403
|
-
const units = ["B", "KB", "MB", "GB", "TB"];
|
|
5404
|
-
const k = 1024;
|
|
5405
|
-
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
5406
|
-
return `${(bytes / Math.pow(k, i)).toFixed(2)} ${units[i]}`;
|
|
6354
|
+
return formatBytes(bytes, { precision: 2 });
|
|
5407
6355
|
}
|
|
5408
6356
|
function getUploadButtonClasses(disabled) {
|
|
5409
6357
|
const baseClasses2 = [
|
|
@@ -5934,6 +6882,34 @@ function getTableColgroup(options) {
|
|
|
5934
6882
|
}
|
|
5935
6883
|
return entries;
|
|
5936
6884
|
}
|
|
6885
|
+
function hasTableSelectionColumn(rowSelection) {
|
|
6886
|
+
return !!rowSelection && rowSelection.showCheckbox !== false;
|
|
6887
|
+
}
|
|
6888
|
+
function getTableSelectionState(input) {
|
|
6889
|
+
const selectedSet = new Set(input.selectedRowKeys);
|
|
6890
|
+
const selectableRowKeys = input.rowKeys.filter((key, index) => {
|
|
6891
|
+
const record = input.records[index];
|
|
6892
|
+
return !input.getCheckboxProps?.(record)?.disabled;
|
|
6893
|
+
});
|
|
6894
|
+
const allSelected = selectableRowKeys.length > 0 && selectableRowKeys.every((key) => selectedSet.has(key));
|
|
6895
|
+
const someSelected = selectableRowKeys.some((key) => selectedSet.has(key)) && !allSelected;
|
|
6896
|
+
return { selectableRowKeys, allSelected, someSelected };
|
|
6897
|
+
}
|
|
6898
|
+
function getNextTableSelectAllKeys(selectedRowKeys, selectableRowKeys, checked) {
|
|
6899
|
+
const selectableSet = new Set(selectableRowKeys);
|
|
6900
|
+
if (!checked) {
|
|
6901
|
+
return selectedRowKeys.filter((key) => !selectableSet.has(key));
|
|
6902
|
+
}
|
|
6903
|
+
const next = [...selectedRowKeys];
|
|
6904
|
+
const nextSet = new Set(next);
|
|
6905
|
+
for (const key of selectableRowKeys) {
|
|
6906
|
+
if (!nextSet.has(key)) {
|
|
6907
|
+
next.push(key);
|
|
6908
|
+
nextSet.add(key);
|
|
6909
|
+
}
|
|
6910
|
+
}
|
|
6911
|
+
return next;
|
|
6912
|
+
}
|
|
5937
6913
|
function freezeTableColumnWidths(columns, measuredWidths = {}, previousFrozen = {}) {
|
|
5938
6914
|
const next = {};
|
|
5939
6915
|
for (const column of columns) {
|
|
@@ -6197,6 +7173,48 @@ function filterData(data, filters) {
|
|
|
6197
7173
|
});
|
|
6198
7174
|
});
|
|
6199
7175
|
}
|
|
7176
|
+
function filterTableData(data, columns, filters) {
|
|
7177
|
+
if (!filters || Object.keys(filters).length === 0) {
|
|
7178
|
+
return data;
|
|
7179
|
+
}
|
|
7180
|
+
const filterFnByKey = /* @__PURE__ */ new Map();
|
|
7181
|
+
for (const column of columns) {
|
|
7182
|
+
if (column.filter?.filterFn) {
|
|
7183
|
+
filterFnByKey.set(column.key, column.filter.filterFn);
|
|
7184
|
+
}
|
|
7185
|
+
}
|
|
7186
|
+
return data.filter((record) => {
|
|
7187
|
+
return Object.entries(filters).every(([key, filterValue]) => {
|
|
7188
|
+
if (filterValue === "" || filterValue === null || filterValue === void 0) {
|
|
7189
|
+
return true;
|
|
7190
|
+
}
|
|
7191
|
+
const cellValue = record[key];
|
|
7192
|
+
const customFn = filterFnByKey.get(key);
|
|
7193
|
+
if (customFn) {
|
|
7194
|
+
return customFn(cellValue, filterValue);
|
|
7195
|
+
}
|
|
7196
|
+
if (typeof filterValue === "string") {
|
|
7197
|
+
return String(cellValue).toLowerCase().includes(filterValue.toLowerCase());
|
|
7198
|
+
}
|
|
7199
|
+
return cellValue === filterValue;
|
|
7200
|
+
});
|
|
7201
|
+
});
|
|
7202
|
+
}
|
|
7203
|
+
function getTableVirtualWindow(scrollTop, viewportHeight, itemHeight, rowCount, overscan = 5) {
|
|
7204
|
+
if (rowCount <= 0 || itemHeight <= 0) {
|
|
7205
|
+
return { startIndex: 0, endIndex: -1, topPad: 0, bottomPad: 0 };
|
|
7206
|
+
}
|
|
7207
|
+
const safeScrollTop = Math.max(0, Number.isFinite(scrollTop) ? scrollTop : 0);
|
|
7208
|
+
const startIndex = Math.max(0, Math.floor(safeScrollTop / itemHeight) - overscan);
|
|
7209
|
+
const visibleCount = Math.ceil(Math.max(0, viewportHeight) / itemHeight) + overscan * 2;
|
|
7210
|
+
const endIndex = Math.min(rowCount - 1, startIndex + visibleCount);
|
|
7211
|
+
return {
|
|
7212
|
+
startIndex,
|
|
7213
|
+
endIndex,
|
|
7214
|
+
topPad: startIndex * itemHeight,
|
|
7215
|
+
bottomPad: Math.max(0, (rowCount - 1 - endIndex) * itemHeight)
|
|
7216
|
+
};
|
|
7217
|
+
}
|
|
6200
7218
|
function paginateData(data, current, pageSize) {
|
|
6201
7219
|
const startIndex = (current - 1) * pageSize;
|
|
6202
7220
|
const endIndex = startIndex + pageSize;
|
|
@@ -6498,6 +7516,94 @@ var listItemTitleClasses = "font-medium text-[var(--tiger-text,#111827)] truncat
|
|
|
6498
7516
|
var listItemDescriptionClasses = "text-sm text-[var(--tiger-text-muted,#6b7280)] mt-1";
|
|
6499
7517
|
var listItemExtraClasses = "flex-shrink-0 ml-4";
|
|
6500
7518
|
var listGridContainerClasses = "grid gap-4";
|
|
7519
|
+
var GRID_COLUMNS = {
|
|
7520
|
+
1: "grid-cols-1",
|
|
7521
|
+
2: "grid-cols-2",
|
|
7522
|
+
3: "grid-cols-3",
|
|
7523
|
+
4: "grid-cols-4",
|
|
7524
|
+
5: "grid-cols-5",
|
|
7525
|
+
6: "grid-cols-6",
|
|
7526
|
+
7: "grid-cols-7",
|
|
7527
|
+
8: "grid-cols-8",
|
|
7528
|
+
9: "grid-cols-9",
|
|
7529
|
+
10: "grid-cols-10",
|
|
7530
|
+
11: "grid-cols-11",
|
|
7531
|
+
12: "grid-cols-12"
|
|
7532
|
+
};
|
|
7533
|
+
var SM_GRID_COLUMNS = {
|
|
7534
|
+
1: "sm:grid-cols-1",
|
|
7535
|
+
2: "sm:grid-cols-2",
|
|
7536
|
+
3: "sm:grid-cols-3",
|
|
7537
|
+
4: "sm:grid-cols-4",
|
|
7538
|
+
5: "sm:grid-cols-5",
|
|
7539
|
+
6: "sm:grid-cols-6",
|
|
7540
|
+
7: "sm:grid-cols-7",
|
|
7541
|
+
8: "sm:grid-cols-8",
|
|
7542
|
+
9: "sm:grid-cols-9",
|
|
7543
|
+
10: "sm:grid-cols-10",
|
|
7544
|
+
11: "sm:grid-cols-11",
|
|
7545
|
+
12: "sm:grid-cols-12"
|
|
7546
|
+
};
|
|
7547
|
+
var MD_GRID_COLUMNS = {
|
|
7548
|
+
1: "md:grid-cols-1",
|
|
7549
|
+
2: "md:grid-cols-2",
|
|
7550
|
+
3: "md:grid-cols-3",
|
|
7551
|
+
4: "md:grid-cols-4",
|
|
7552
|
+
5: "md:grid-cols-5",
|
|
7553
|
+
6: "md:grid-cols-6",
|
|
7554
|
+
7: "md:grid-cols-7",
|
|
7555
|
+
8: "md:grid-cols-8",
|
|
7556
|
+
9: "md:grid-cols-9",
|
|
7557
|
+
10: "md:grid-cols-10",
|
|
7558
|
+
11: "md:grid-cols-11",
|
|
7559
|
+
12: "md:grid-cols-12"
|
|
7560
|
+
};
|
|
7561
|
+
var LG_GRID_COLUMNS = {
|
|
7562
|
+
1: "lg:grid-cols-1",
|
|
7563
|
+
2: "lg:grid-cols-2",
|
|
7564
|
+
3: "lg:grid-cols-3",
|
|
7565
|
+
4: "lg:grid-cols-4",
|
|
7566
|
+
5: "lg:grid-cols-5",
|
|
7567
|
+
6: "lg:grid-cols-6",
|
|
7568
|
+
7: "lg:grid-cols-7",
|
|
7569
|
+
8: "lg:grid-cols-8",
|
|
7570
|
+
9: "lg:grid-cols-9",
|
|
7571
|
+
10: "lg:grid-cols-10",
|
|
7572
|
+
11: "lg:grid-cols-11",
|
|
7573
|
+
12: "lg:grid-cols-12"
|
|
7574
|
+
};
|
|
7575
|
+
var XL_GRID_COLUMNS = {
|
|
7576
|
+
1: "xl:grid-cols-1",
|
|
7577
|
+
2: "xl:grid-cols-2",
|
|
7578
|
+
3: "xl:grid-cols-3",
|
|
7579
|
+
4: "xl:grid-cols-4",
|
|
7580
|
+
5: "xl:grid-cols-5",
|
|
7581
|
+
6: "xl:grid-cols-6",
|
|
7582
|
+
7: "xl:grid-cols-7",
|
|
7583
|
+
8: "xl:grid-cols-8",
|
|
7584
|
+
9: "xl:grid-cols-9",
|
|
7585
|
+
10: "xl:grid-cols-10",
|
|
7586
|
+
11: "xl:grid-cols-11",
|
|
7587
|
+
12: "xl:grid-cols-12"
|
|
7588
|
+
};
|
|
7589
|
+
var XXL_GRID_COLUMNS = {
|
|
7590
|
+
1: "2xl:grid-cols-1",
|
|
7591
|
+
2: "2xl:grid-cols-2",
|
|
7592
|
+
3: "2xl:grid-cols-3",
|
|
7593
|
+
4: "2xl:grid-cols-4",
|
|
7594
|
+
5: "2xl:grid-cols-5",
|
|
7595
|
+
6: "2xl:grid-cols-6",
|
|
7596
|
+
7: "2xl:grid-cols-7",
|
|
7597
|
+
8: "2xl:grid-cols-8",
|
|
7598
|
+
9: "2xl:grid-cols-9",
|
|
7599
|
+
10: "2xl:grid-cols-10",
|
|
7600
|
+
11: "2xl:grid-cols-11",
|
|
7601
|
+
12: "2xl:grid-cols-12"
|
|
7602
|
+
};
|
|
7603
|
+
function getColumnClass(map, value) {
|
|
7604
|
+
if (!value || !Number.isFinite(value)) return void 0;
|
|
7605
|
+
return map[Math.floor(value)];
|
|
7606
|
+
}
|
|
6501
7607
|
function getListClasses(bordered) {
|
|
6502
7608
|
const classes = [listBaseClasses, listBorderClasses[bordered]];
|
|
6503
7609
|
return classes.filter(Boolean).join(" ");
|
|
@@ -6521,27 +7627,18 @@ function getListHeaderFooterClasses(size, isFooter = false) {
|
|
|
6521
7627
|
}
|
|
6522
7628
|
function getGridColumnClasses(column, xs, sm, md, lg, xl, xxl) {
|
|
6523
7629
|
const classes = [];
|
|
6524
|
-
|
|
6525
|
-
|
|
6526
|
-
|
|
6527
|
-
if (
|
|
6528
|
-
|
|
6529
|
-
|
|
6530
|
-
|
|
6531
|
-
|
|
6532
|
-
|
|
6533
|
-
if (
|
|
6534
|
-
|
|
6535
|
-
|
|
6536
|
-
if (lg) {
|
|
6537
|
-
classes.push(`lg:grid-cols-${lg}`);
|
|
6538
|
-
}
|
|
6539
|
-
if (xl) {
|
|
6540
|
-
classes.push(`xl:grid-cols-${xl}`);
|
|
6541
|
-
}
|
|
6542
|
-
if (xxl) {
|
|
6543
|
-
classes.push(`2xl:grid-cols-${xxl}`);
|
|
6544
|
-
}
|
|
7630
|
+
const baseClass = getColumnClass(GRID_COLUMNS, xs ?? column);
|
|
7631
|
+
if (baseClass) classes.push(baseClass);
|
|
7632
|
+
const smClass = getColumnClass(SM_GRID_COLUMNS, sm);
|
|
7633
|
+
if (smClass) classes.push(smClass);
|
|
7634
|
+
const mdClass = getColumnClass(MD_GRID_COLUMNS, md);
|
|
7635
|
+
if (mdClass) classes.push(mdClass);
|
|
7636
|
+
const lgClass = getColumnClass(LG_GRID_COLUMNS, lg);
|
|
7637
|
+
if (lgClass) classes.push(lgClass);
|
|
7638
|
+
const xlClass = getColumnClass(XL_GRID_COLUMNS, xl);
|
|
7639
|
+
if (xlClass) classes.push(xlClass);
|
|
7640
|
+
const xxlClass = getColumnClass(XXL_GRID_COLUMNS, xxl);
|
|
7641
|
+
if (xxlClass) classes.push(xxlClass);
|
|
6545
7642
|
return classes.join(" ");
|
|
6546
7643
|
}
|
|
6547
7644
|
|
|
@@ -6701,6 +7798,75 @@ function getVisibleTreeItems(treeData, expandedKeys = /* @__PURE__ */ new Set(),
|
|
|
6701
7798
|
traverse(treeData, 1);
|
|
6702
7799
|
return result;
|
|
6703
7800
|
}
|
|
7801
|
+
function getFirstVisibleChildKey(visibleItems, parentKey) {
|
|
7802
|
+
const index = visibleItems.findIndex((item) => item.key === parentKey);
|
|
7803
|
+
if (index < 0) return void 0;
|
|
7804
|
+
const base = visibleItems[index];
|
|
7805
|
+
for (let i = index + 1; i < visibleItems.length; i++) {
|
|
7806
|
+
const item = visibleItems[i];
|
|
7807
|
+
if (item.level <= base.level) break;
|
|
7808
|
+
if (item.parentKey === parentKey && !item.node.disabled) return item.key;
|
|
7809
|
+
}
|
|
7810
|
+
return void 0;
|
|
7811
|
+
}
|
|
7812
|
+
function getTreeKeyboardAction(ctx) {
|
|
7813
|
+
const {
|
|
7814
|
+
key,
|
|
7815
|
+
nodeKey,
|
|
7816
|
+
currentKey,
|
|
7817
|
+
focusableKeys,
|
|
7818
|
+
parentKey,
|
|
7819
|
+
firstChildKey,
|
|
7820
|
+
isExpandable,
|
|
7821
|
+
isExpanded,
|
|
7822
|
+
isParentExpanded,
|
|
7823
|
+
isChecked,
|
|
7824
|
+
selectable,
|
|
7825
|
+
checkable
|
|
7826
|
+
} = ctx;
|
|
7827
|
+
const currentIndex = focusableKeys.findIndex((k) => k === currentKey);
|
|
7828
|
+
const focusAt = (index) => ({
|
|
7829
|
+
type: "focus",
|
|
7830
|
+
key: focusableKeys[index] ?? currentKey
|
|
7831
|
+
});
|
|
7832
|
+
switch (key) {
|
|
7833
|
+
case "ArrowDown":
|
|
7834
|
+
return focusAt(currentIndex + 1);
|
|
7835
|
+
case "ArrowUp":
|
|
7836
|
+
return focusAt(currentIndex - 1);
|
|
7837
|
+
case "Home":
|
|
7838
|
+
return focusAt(0);
|
|
7839
|
+
case "End":
|
|
7840
|
+
return focusAt(focusableKeys.length - 1);
|
|
7841
|
+
case "ArrowRight":
|
|
7842
|
+
if (isExpandable && !isExpanded) return { type: "toggleExpand", key: nodeKey };
|
|
7843
|
+
if (isExpandable && isExpanded) return { type: "focus", key: firstChildKey ?? currentKey };
|
|
7844
|
+
return { type: "none" };
|
|
7845
|
+
case "ArrowLeft":
|
|
7846
|
+
if (isExpandable && isExpanded) return { type: "toggleExpand", key: nodeKey };
|
|
7847
|
+
return { type: "focus", key: parentKey ?? currentKey };
|
|
7848
|
+
case "Escape":
|
|
7849
|
+
if (isExpandable && isExpanded) return { type: "toggleExpand", key: nodeKey };
|
|
7850
|
+
if (parentKey !== void 0) {
|
|
7851
|
+
return {
|
|
7852
|
+
type: "collapseAndFocus",
|
|
7853
|
+
collapseKey: isParentExpanded ? parentKey : void 0,
|
|
7854
|
+
focusKey: parentKey
|
|
7855
|
+
};
|
|
7856
|
+
}
|
|
7857
|
+
return { type: "none" };
|
|
7858
|
+
case "Enter":
|
|
7859
|
+
if (selectable) return { type: "select", key: nodeKey };
|
|
7860
|
+
if (isExpandable) return { type: "toggleExpand", key: nodeKey };
|
|
7861
|
+
return { type: "none" };
|
|
7862
|
+
case " ":
|
|
7863
|
+
if (checkable) return { type: "check", key: nodeKey, checked: !isChecked };
|
|
7864
|
+
if (isExpandable) return { type: "toggleExpand", key: nodeKey };
|
|
7865
|
+
return { type: "none" };
|
|
7866
|
+
default:
|
|
7867
|
+
return null;
|
|
7868
|
+
}
|
|
7869
|
+
}
|
|
6704
7870
|
var treeBaseClasses = "w-full bg-white rounded-[var(--tiger-radius-md,0.5rem)]";
|
|
6705
7871
|
var treeNodeWrapperClasses = "select-none";
|
|
6706
7872
|
var treeNodeContentClasses = "flex items-center px-2 py-1.5 cursor-pointer rounded transition-colors duration-200";
|
|
@@ -7458,6 +8624,10 @@ function createSubmenuHeightTransitionController(element, options) {
|
|
|
7458
8624
|
}
|
|
7459
8625
|
};
|
|
7460
8626
|
}
|
|
8627
|
+
function getMenuNavigationKeys(mode, isRoot) {
|
|
8628
|
+
const isHorizontalRoot = isRoot && mode === "horizontal";
|
|
8629
|
+
return isHorizontalRoot ? { nextKey: "ArrowRight", prevKey: "ArrowLeft" } : { nextKey: "ArrowDown", prevKey: "ArrowUp" };
|
|
8630
|
+
}
|
|
7461
8631
|
function getMenuButtons(container) {
|
|
7462
8632
|
return Array.from(
|
|
7463
8633
|
container.querySelectorAll('button[data-tiger-menuitem="true"]')
|
|
@@ -7725,6 +8895,9 @@ function getBreadcrumbCollapsedItems(totalItems, maxItems) {
|
|
|
7725
8895
|
|
|
7726
8896
|
// src/utils/steps-utils.ts
|
|
7727
8897
|
var stepFinishChar = "\u2713";
|
|
8898
|
+
var stepFinishIconViewBox = "0 0 24 24";
|
|
8899
|
+
var stepFinishIconStrokeWidth = "3";
|
|
8900
|
+
var stepFinishIconPathD = "M4.5 12.75l6 6 9-13.5";
|
|
7728
8901
|
function getStepsContainerClasses(direction) {
|
|
7729
8902
|
const baseClasses2 = "tiger-steps w-full list-none m-0 p-0";
|
|
7730
8903
|
if (direction === "vertical") {
|
|
@@ -8983,7 +10156,7 @@ function getCodeBlockCopyButtonClasses(isCopied, ...classes) {
|
|
|
8983
10156
|
);
|
|
8984
10157
|
}
|
|
8985
10158
|
|
|
8986
|
-
// src/theme/colors.ts
|
|
10159
|
+
// src/theme-runtime/colors.ts
|
|
8987
10160
|
var defaultThemeColors = {
|
|
8988
10161
|
primary: {
|
|
8989
10162
|
bg: "bg-[var(--tiger-primary,#2563eb)]",
|
|
@@ -9461,6 +10634,9 @@ function getInitialCropRect(imageWidth, imageHeight, aspectRatio) {
|
|
|
9461
10634
|
};
|
|
9462
10635
|
}
|
|
9463
10636
|
function cropCanvas(image, cropRect, displayWidth, displayHeight, outputType = "image/png", quality = 0.92) {
|
|
10637
|
+
if (!isBrowser()) {
|
|
10638
|
+
throw new Error("Image canvas cropping is only available in the browser");
|
|
10639
|
+
}
|
|
9464
10640
|
const scaleX = image.naturalWidth / displayWidth;
|
|
9465
10641
|
const scaleY = image.naturalHeight / displayHeight;
|
|
9466
10642
|
const sx = cropRect.x * scaleX;
|
|
@@ -9801,6 +10977,9 @@ function getAnchorLinkClasses(active, className) {
|
|
|
9801
10977
|
return [anchorLinkBaseClasses, active && anchorLinkActiveClasses, className].filter(Boolean).join(" ");
|
|
9802
10978
|
}
|
|
9803
10979
|
function getAnchorTargetElement(href) {
|
|
10980
|
+
if (!isBrowser()) {
|
|
10981
|
+
return null;
|
|
10982
|
+
}
|
|
9804
10983
|
if (!href || !href.startsWith("#")) {
|
|
9805
10984
|
return null;
|
|
9806
10985
|
}
|
|
@@ -9811,18 +10990,27 @@ function getAnchorTargetElement(href) {
|
|
|
9811
10990
|
return document.getElementById(id);
|
|
9812
10991
|
}
|
|
9813
10992
|
function getContainerScrollTop(container) {
|
|
10993
|
+
if (!isBrowser()) {
|
|
10994
|
+
return container?.scrollTop ?? 0;
|
|
10995
|
+
}
|
|
9814
10996
|
if (container === window) {
|
|
9815
10997
|
return window.scrollY || document.documentElement.scrollTop;
|
|
9816
10998
|
}
|
|
9817
10999
|
return container.scrollTop;
|
|
9818
11000
|
}
|
|
9819
11001
|
function getContainerHeight(container) {
|
|
11002
|
+
if (!isBrowser()) {
|
|
11003
|
+
return container?.clientHeight ?? 0;
|
|
11004
|
+
}
|
|
9820
11005
|
if (container === window) {
|
|
9821
11006
|
return window.innerHeight;
|
|
9822
11007
|
}
|
|
9823
11008
|
return container.clientHeight;
|
|
9824
11009
|
}
|
|
9825
11010
|
function getElementOffsetTop(element, container) {
|
|
11011
|
+
if (!isBrowser()) {
|
|
11012
|
+
return 0;
|
|
11013
|
+
}
|
|
9826
11014
|
if (container === window) {
|
|
9827
11015
|
const rect = element.getBoundingClientRect();
|
|
9828
11016
|
return rect.top + window.scrollY;
|
|
@@ -9842,6 +11030,9 @@ function getElementOffsetTop(element, container) {
|
|
|
9842
11030
|
return offset2;
|
|
9843
11031
|
}
|
|
9844
11032
|
function scrollToAnchor(href, container, targetOffset = 0) {
|
|
11033
|
+
if (!isBrowser()) {
|
|
11034
|
+
return;
|
|
11035
|
+
}
|
|
9845
11036
|
const element = getAnchorTargetElement(href);
|
|
9846
11037
|
if (!element) {
|
|
9847
11038
|
return;
|
|
@@ -9854,6 +11045,9 @@ function findActiveAnchor(links, container, bounds = 5, targetOffset = 0) {
|
|
|
9854
11045
|
if (links.length === 0) {
|
|
9855
11046
|
return "";
|
|
9856
11047
|
}
|
|
11048
|
+
if (!isBrowser()) {
|
|
11049
|
+
return links[0] || "";
|
|
11050
|
+
}
|
|
9857
11051
|
const scrollTop = getContainerScrollTop(container);
|
|
9858
11052
|
for (let i = links.length - 1; i >= 0; i--) {
|
|
9859
11053
|
const href = links[i];
|
|
@@ -9868,11 +11062,11 @@ function findActiveAnchor(links, container, bounds = 5, targetOffset = 0) {
|
|
|
9868
11062
|
return links[0] || "";
|
|
9869
11063
|
}
|
|
9870
11064
|
function createAnchorObserver(links, options) {
|
|
11065
|
+
if (!isBrowser()) return () => {
|
|
11066
|
+
};
|
|
9871
11067
|
if (typeof IntersectionObserver === "undefined") return () => {
|
|
9872
11068
|
};
|
|
9873
11069
|
const { offsetTop = 0, root = null, onChange } = options;
|
|
9874
|
-
if (!isBrowser()) return () => {
|
|
9875
|
-
};
|
|
9876
11070
|
const targets = /* @__PURE__ */ new Map();
|
|
9877
11071
|
for (const href of links) {
|
|
9878
11072
|
const el = getAnchorTargetElement(href);
|
|
@@ -9963,6 +11157,8 @@ function getScatterHoverSize(baseSize) {
|
|
|
9963
11157
|
}
|
|
9964
11158
|
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}}`;
|
|
9965
11159
|
var SCATTER_ENTRANCE_CLASS = "tiger-scatter-entrance";
|
|
11160
|
+
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}}`;
|
|
11161
|
+
var DONUT_ENTRANCE_CLASS = "tiger-donut-entrance";
|
|
9966
11162
|
|
|
9967
11163
|
// src/utils/chart/scale.ts
|
|
9968
11164
|
var clampNumber = (value, min, max) => Math.min(max, Math.max(min, value));
|
|
@@ -10853,6 +12049,57 @@ function resolveChartTooltipContent(hoveredIndex, data, formatter, defaultFormat
|
|
|
10853
12049
|
function getChartTooltipTransform(position) {
|
|
10854
12050
|
return `translate3d(${position.x}px, ${position.y}px, 0)`;
|
|
10855
12051
|
}
|
|
12052
|
+
function resolveChartTooltipPosition(input) {
|
|
12053
|
+
const offsetX = input.offsetX ?? 12;
|
|
12054
|
+
const offsetY = input.offsetY ?? -8;
|
|
12055
|
+
const padding = input.padding ?? 8;
|
|
12056
|
+
const anchorX = Number.isFinite(input.x) ? input.x : 0;
|
|
12057
|
+
const anchorY = Number.isFinite(input.y) ? input.y : 0;
|
|
12058
|
+
const rectWidth = Number.isFinite(input.rect.width) ? Math.max(0, input.rect.width) : 0;
|
|
12059
|
+
const rectHeight = Number.isFinite(input.rect.height) ? Math.max(0, input.rect.height) : 0;
|
|
12060
|
+
const viewportWidth = Number.isFinite(input.viewport.width) ? Math.max(0, input.viewport.width) : 0;
|
|
12061
|
+
const viewportHeight = Number.isFinite(input.viewport.height) ? Math.max(0, input.viewport.height) : 0;
|
|
12062
|
+
let nextX = anchorX + offsetX;
|
|
12063
|
+
let nextY = anchorY + offsetY;
|
|
12064
|
+
if (nextX + rectWidth > viewportWidth - padding) {
|
|
12065
|
+
nextX = anchorX - rectWidth - offsetX;
|
|
12066
|
+
}
|
|
12067
|
+
if (nextY + rectHeight > viewportHeight - padding) {
|
|
12068
|
+
nextY = anchorY - rectHeight - Math.abs(offsetY);
|
|
12069
|
+
}
|
|
12070
|
+
return {
|
|
12071
|
+
x: Math.max(padding, nextX),
|
|
12072
|
+
y: Math.max(padding, nextY)
|
|
12073
|
+
};
|
|
12074
|
+
}
|
|
12075
|
+
function downsampleSeriesData(data, threshold, getValue = (_item, index) => index) {
|
|
12076
|
+
const safeThreshold = Math.max(0, Math.floor(Number.isFinite(threshold) ? threshold : 0));
|
|
12077
|
+
if (safeThreshold === 0 || data.length <= safeThreshold) {
|
|
12078
|
+
return data.map((item, index) => ({ item, index }));
|
|
12079
|
+
}
|
|
12080
|
+
if (safeThreshold === 1) {
|
|
12081
|
+
return [{ item: data[0], index: 0 }];
|
|
12082
|
+
}
|
|
12083
|
+
const result = [{ item: data[0], index: 0 }];
|
|
12084
|
+
const bucketSize = (data.length - 2) / Math.max(1, safeThreshold - 2);
|
|
12085
|
+
for (let bucket = 0; bucket < safeThreshold - 2; bucket++) {
|
|
12086
|
+
const start = Math.floor(1 + bucket * bucketSize);
|
|
12087
|
+
const end = Math.min(data.length - 1, Math.floor(1 + (bucket + 1) * bucketSize));
|
|
12088
|
+
let selectedIndex = start;
|
|
12089
|
+
let selectedValue = Number.NEGATIVE_INFINITY;
|
|
12090
|
+
for (let index = start; index < end; index++) {
|
|
12091
|
+
const rawValue = getValue(data[index], index);
|
|
12092
|
+
const value = Math.abs(Number.isFinite(rawValue) ? rawValue : 0);
|
|
12093
|
+
if (value > selectedValue) {
|
|
12094
|
+
selectedValue = value;
|
|
12095
|
+
selectedIndex = index;
|
|
12096
|
+
}
|
|
12097
|
+
}
|
|
12098
|
+
result.push({ item: data[selectedIndex], index: selectedIndex });
|
|
12099
|
+
}
|
|
12100
|
+
result.push({ item: data[data.length - 1], index: data.length - 1 });
|
|
12101
|
+
return result;
|
|
12102
|
+
}
|
|
10856
12103
|
function resolveMultiSeriesTooltipContent(hoveredPoint, series, formatter, defaultFormatter) {
|
|
10857
12104
|
if (!hoveredPoint) return "";
|
|
10858
12105
|
const { seriesIndex, pointIndex } = hoveredPoint;
|
|
@@ -10888,19 +12135,25 @@ function defaultRadarTooltipFormatter(datum, seriesIndex, _pointIndex, series) {
|
|
|
10888
12135
|
function computeFunnelSegments(data, opts) {
|
|
10889
12136
|
if (data.length === 0) return [];
|
|
10890
12137
|
const { width, height, gap = 2, pinch = false, colors } = opts;
|
|
12138
|
+
const safeWidth = Number.isFinite(width) ? Math.max(0, width) : 0;
|
|
12139
|
+
const safeHeight = Number.isFinite(height) ? Math.max(0, height) : 0;
|
|
12140
|
+
const safeGap = Number.isFinite(gap) ? Math.max(0, gap) : 0;
|
|
12141
|
+
if (safeWidth <= 0 || safeHeight <= 0) return [];
|
|
10891
12142
|
const palette = colors ?? DEFAULT_CHART_COLORS;
|
|
10892
|
-
const
|
|
10893
|
-
|
|
10894
|
-
|
|
10895
|
-
const
|
|
10896
|
-
const
|
|
12143
|
+
const values = data.map((d) => Number.isFinite(d.value) ? Math.max(0, d.value) : 0);
|
|
12144
|
+
const maxValue = Math.max(...values);
|
|
12145
|
+
if (maxValue <= 0) return [];
|
|
12146
|
+
const totalGap = Math.min(safeHeight, safeGap * (data.length - 1));
|
|
12147
|
+
const segH = Math.max(0, (safeHeight - totalGap) / data.length);
|
|
12148
|
+
const halfW = safeWidth / 2;
|
|
10897
12149
|
return data.map((d, i) => {
|
|
10898
|
-
const
|
|
10899
|
-
const
|
|
12150
|
+
const value = values[i];
|
|
12151
|
+
const topRatio = value / maxValue;
|
|
12152
|
+
const nextVal = i < data.length - 1 ? values[i + 1] : pinch ? 0 : value;
|
|
10900
12153
|
const bottomRatio = nextVal / maxValue;
|
|
10901
|
-
const tw =
|
|
10902
|
-
const bw =
|
|
10903
|
-
const y = i * (segH +
|
|
12154
|
+
const tw = safeWidth * topRatio;
|
|
12155
|
+
const bw = safeWidth * bottomRatio;
|
|
12156
|
+
const y = i * (segH + safeGap);
|
|
10904
12157
|
const cx = halfW;
|
|
10905
12158
|
const cy = y + segH / 2;
|
|
10906
12159
|
const x1 = cx - tw / 2;
|
|
@@ -10911,7 +12164,7 @@ function computeFunnelSegments(data, opts) {
|
|
|
10911
12164
|
return {
|
|
10912
12165
|
index: i,
|
|
10913
12166
|
label: d.label ?? `Stage ${i + 1}`,
|
|
10914
|
-
value
|
|
12167
|
+
value,
|
|
10915
12168
|
color: d.color ?? palette[i % palette.length],
|
|
10916
12169
|
path,
|
|
10917
12170
|
cx,
|
|
@@ -10966,9 +12219,13 @@ function createGaugeAnimation(options) {
|
|
|
10966
12219
|
function degToRad(deg) {
|
|
10967
12220
|
return deg * Math.PI / 180;
|
|
10968
12221
|
}
|
|
12222
|
+
function safeNumber(value, fallback = 0) {
|
|
12223
|
+
return Number.isFinite(value) ? value : fallback;
|
|
12224
|
+
}
|
|
10969
12225
|
function createGaugeArcPath(cx, cy, radius, startDeg, endDeg, arcWidth) {
|
|
10970
|
-
const outerR = radius;
|
|
10971
|
-
const
|
|
12226
|
+
const outerR = Math.max(0, safeNumber(radius));
|
|
12227
|
+
const safeArcWidth = Math.max(0, safeNumber(arcWidth));
|
|
12228
|
+
const innerR = Math.max(0, outerR - safeArcWidth);
|
|
10972
12229
|
const startRad = degToRad(startDeg - 90);
|
|
10973
12230
|
const endRad = degToRad(endDeg - 90);
|
|
10974
12231
|
const outerStart = {
|
|
@@ -10998,8 +12255,9 @@ function createGaugeArcPath(cx, cy, radius, startDeg, endDeg, arcWidth) {
|
|
|
10998
12255
|
}
|
|
10999
12256
|
function createGaugeNeedlePath(cx, cy, length, angleDeg, needleWidth = 4) {
|
|
11000
12257
|
const rad = degToRad(angleDeg - 90);
|
|
11001
|
-
const
|
|
11002
|
-
const
|
|
12258
|
+
const safeLength = Math.max(0, safeNumber(length));
|
|
12259
|
+
const tipX = cx + safeLength * Math.cos(rad);
|
|
12260
|
+
const tipY = cy + safeLength * Math.sin(rad);
|
|
11003
12261
|
const perpRad = rad + Math.PI / 2;
|
|
11004
12262
|
const halfW = needleWidth / 2;
|
|
11005
12263
|
const bx1 = cx + halfW * Math.cos(perpRad);
|
|
@@ -11009,20 +12267,32 @@ function createGaugeNeedlePath(cx, cy, length, angleDeg, needleWidth = 4) {
|
|
|
11009
12267
|
return `M${bx1},${by1} L${tipX},${tipY} L${bx2},${by2} Z`;
|
|
11010
12268
|
}
|
|
11011
12269
|
function valueToGaugeAngle(value, min, max, startAngle, endAngle) {
|
|
11012
|
-
const
|
|
11013
|
-
|
|
12270
|
+
const safeStart = safeNumber(startAngle);
|
|
12271
|
+
const safeEnd = safeNumber(endAngle, safeStart);
|
|
12272
|
+
const safeMin = safeNumber(min);
|
|
12273
|
+
const safeMax = safeNumber(max, safeMin);
|
|
12274
|
+
if (safeMax <= safeMin) return safeStart;
|
|
12275
|
+
const ratio = Math.max(0, Math.min(1, (safeNumber(value, safeMin) - safeMin) / (safeMax - safeMin)));
|
|
12276
|
+
return safeStart + ratio * (safeEnd - safeStart);
|
|
11014
12277
|
}
|
|
11015
12278
|
function computeGaugeTicks(cx, cy, radius, min, max, startAngle, endAngle, tickCount) {
|
|
11016
12279
|
const ticks = [];
|
|
11017
|
-
|
|
11018
|
-
|
|
11019
|
-
|
|
11020
|
-
|
|
12280
|
+
const safeTickCount = Math.max(1, Math.floor(safeNumber(tickCount, 1)));
|
|
12281
|
+
const safeRadius = Math.max(0, safeNumber(radius));
|
|
12282
|
+
const safeMin = safeNumber(min);
|
|
12283
|
+
const safeMax = safeNumber(max, safeMin);
|
|
12284
|
+
const safeStart = safeNumber(startAngle);
|
|
12285
|
+
const safeEnd = safeNumber(endAngle, safeStart);
|
|
12286
|
+
for (let i = 0; i <= safeTickCount; i++) {
|
|
12287
|
+
const ratio = i / safeTickCount;
|
|
12288
|
+
const val = safeMax <= safeMin ? safeMin : safeMin + ratio * (safeMax - safeMin);
|
|
12289
|
+
const angle = safeStart + ratio * (safeEnd - safeStart);
|
|
11021
12290
|
const rad = degToRad(angle - 90);
|
|
11022
|
-
const
|
|
11023
|
-
const
|
|
11024
|
-
const
|
|
11025
|
-
const
|
|
12291
|
+
const innerRadius = Math.max(0, safeRadius - 8);
|
|
12292
|
+
const outerX = cx + safeRadius * Math.cos(rad);
|
|
12293
|
+
const outerY = cy + safeRadius * Math.sin(rad);
|
|
12294
|
+
const innerX = cx + innerRadius * Math.cos(rad);
|
|
12295
|
+
const innerY = cy + innerRadius * Math.sin(rad);
|
|
11026
12296
|
ticks.push({
|
|
11027
12297
|
x1: innerX,
|
|
11028
12298
|
y1: innerY,
|
|
@@ -11061,9 +12331,14 @@ function getHeatmapCellIndexAtPoint(cells, x, y) {
|
|
|
11061
12331
|
return index >= 0 ? index : null;
|
|
11062
12332
|
}
|
|
11063
12333
|
function interpolateColor(minColor, maxColor, t) {
|
|
12334
|
+
const clamped = Number.isFinite(t) ? Math.max(0, Math.min(1, t)) : 0;
|
|
11064
12335
|
const [r1, g1, b1] = hexToRgb(minColor);
|
|
11065
12336
|
const [r2, g2, b2] = hexToRgb(maxColor);
|
|
11066
|
-
return rgbToHex(
|
|
12337
|
+
return rgbToHex(
|
|
12338
|
+
r1 + (r2 - r1) * clamped,
|
|
12339
|
+
g1 + (g2 - g1) * clamped,
|
|
12340
|
+
b1 + (b2 - b1) * clamped
|
|
12341
|
+
);
|
|
11067
12342
|
}
|
|
11068
12343
|
function interpolateColorOklch(minColor, maxColor, t) {
|
|
11069
12344
|
const clamped = Math.max(0, Math.min(1, t));
|
|
@@ -11083,30 +12358,36 @@ function computeHeatmapCells(data, opts) {
|
|
|
11083
12358
|
} = opts;
|
|
11084
12359
|
const cols = xLabels.length;
|
|
11085
12360
|
const rows = yLabels.length;
|
|
11086
|
-
|
|
11087
|
-
const
|
|
11088
|
-
const
|
|
12361
|
+
const safeWidth = Number.isFinite(width) ? Math.max(0, width) : 0;
|
|
12362
|
+
const safeHeight = Number.isFinite(height) ? Math.max(0, height) : 0;
|
|
12363
|
+
const safeCellGap = Number.isFinite(cellGap) ? Math.max(0, cellGap) : 0;
|
|
12364
|
+
if (cols === 0 || rows === 0 || safeWidth <= 0 || safeHeight <= 0) return [];
|
|
12365
|
+
const totalGapX = Math.min(safeWidth, safeCellGap * (cols - 1));
|
|
12366
|
+
const totalGapY = Math.min(safeHeight, safeCellGap * (rows - 1));
|
|
12367
|
+
const cellW = Math.max(0, (safeWidth - totalGapX) / cols);
|
|
12368
|
+
const cellH = Math.max(0, (safeHeight - totalGapY) / rows);
|
|
11089
12369
|
const valMap = /* @__PURE__ */ new Map();
|
|
11090
12370
|
for (const d of data) {
|
|
11091
|
-
valMap.set(`${d.x}|${d.y}`, d.value);
|
|
12371
|
+
valMap.set(`${d.x}|${d.y}`, Number.isFinite(d.value) ? d.value : 0);
|
|
11092
12372
|
}
|
|
11093
|
-
|
|
11094
|
-
let
|
|
11095
|
-
|
|
11096
|
-
|
|
11097
|
-
|
|
12373
|
+
const finiteValues = Array.from(valMap.values());
|
|
12374
|
+
let minVal = 0;
|
|
12375
|
+
let maxVal = 0;
|
|
12376
|
+
if (finiteValues.length > 0) {
|
|
12377
|
+
minVal = Math.min(...finiteValues, 0);
|
|
12378
|
+
maxVal = Math.max(...finiteValues, 0);
|
|
11098
12379
|
}
|
|
11099
12380
|
if (minVal === maxVal) maxVal = minVal + 1;
|
|
11100
12381
|
const cells = [];
|
|
11101
12382
|
for (let r = 0; r < rows; r++) {
|
|
11102
12383
|
for (let c = 0; c < cols; c++) {
|
|
11103
12384
|
const val = valMap.get(`${xLabels[c]}|${yLabels[r]}`) ?? 0;
|
|
11104
|
-
const heat = (val - minVal) / (maxVal - minVal);
|
|
12385
|
+
const heat = Math.max(0, Math.min(1, (val - minVal) / (maxVal - minVal)));
|
|
11105
12386
|
cells.push({
|
|
11106
12387
|
row: r,
|
|
11107
12388
|
col: c,
|
|
11108
|
-
x: c * (cellW +
|
|
11109
|
-
y: r * (cellH +
|
|
12389
|
+
x: c * (cellW + safeCellGap),
|
|
12390
|
+
y: r * (cellH + safeCellGap),
|
|
11110
12391
|
w: cellW,
|
|
11111
12392
|
h: cellH,
|
|
11112
12393
|
heat,
|
|
@@ -11121,66 +12402,35 @@ function computeHeatmapCells(data, opts) {
|
|
|
11121
12402
|
}
|
|
11122
12403
|
|
|
11123
12404
|
// src/utils/treemap-chart-utils.ts
|
|
11124
|
-
var flattenCache = /* @__PURE__ */ new WeakMap();
|
|
11125
12405
|
function flattenData(data, depth = 0) {
|
|
11126
|
-
if (depth === 0) {
|
|
11127
|
-
const cached = flattenCache.get(data);
|
|
11128
|
-
if (cached) return cached;
|
|
11129
|
-
}
|
|
11130
12406
|
const result = [];
|
|
11131
12407
|
for (const d of data) {
|
|
11132
12408
|
if (d.children && d.children.length > 0) {
|
|
11133
12409
|
result.push(...flattenData(d.children, depth + 1));
|
|
11134
12410
|
} else {
|
|
11135
|
-
result.push({
|
|
12411
|
+
result.push({
|
|
12412
|
+
label: d.label,
|
|
12413
|
+
value: Number.isFinite(d.value) ? Math.max(0, d.value) : 0,
|
|
12414
|
+
depth,
|
|
12415
|
+
color: d.color
|
|
12416
|
+
});
|
|
11136
12417
|
}
|
|
11137
12418
|
}
|
|
11138
|
-
if (depth === 0) {
|
|
11139
|
-
flattenCache.set(data, result);
|
|
11140
|
-
}
|
|
11141
12419
|
return result;
|
|
11142
12420
|
}
|
|
11143
|
-
var _tmLastData = null;
|
|
11144
|
-
var _tmLastW = 0;
|
|
11145
|
-
var _tmLastH = 0;
|
|
11146
|
-
var _tmLastGap = 0;
|
|
11147
|
-
var _tmLastColors = null;
|
|
11148
|
-
var _tmLastResult = [];
|
|
11149
12421
|
function computeTreeMapNodes(data, opts) {
|
|
11150
12422
|
const { width, height, gap = 2, colors } = opts;
|
|
12423
|
+
const safeWidth = Number.isFinite(width) ? Math.max(0, width) : 0;
|
|
12424
|
+
const safeHeight = Number.isFinite(height) ? Math.max(0, height) : 0;
|
|
12425
|
+
const safeGap = Number.isFinite(gap) ? Math.max(0, gap) : 0;
|
|
11151
12426
|
const palette = colors ?? DEFAULT_CHART_COLORS;
|
|
11152
|
-
if (data === _tmLastData && width === _tmLastW && height === _tmLastH && gap === _tmLastGap && palette === _tmLastColors) {
|
|
11153
|
-
return _tmLastResult;
|
|
11154
|
-
}
|
|
11155
12427
|
const flat = flattenData(data);
|
|
11156
|
-
if (flat.length === 0)
|
|
11157
|
-
_tmLastData = data;
|
|
11158
|
-
_tmLastW = width;
|
|
11159
|
-
_tmLastH = height;
|
|
11160
|
-
_tmLastGap = gap;
|
|
11161
|
-
_tmLastColors = palette;
|
|
11162
|
-
_tmLastResult = [];
|
|
11163
|
-
return _tmLastResult;
|
|
11164
|
-
}
|
|
12428
|
+
if (flat.length === 0 || safeWidth <= 0 || safeHeight <= 0) return [];
|
|
11165
12429
|
const totalValue = flat.reduce((s, d) => s + d.value, 0);
|
|
11166
|
-
if (totalValue
|
|
11167
|
-
_tmLastData = data;
|
|
11168
|
-
_tmLastW = width;
|
|
11169
|
-
_tmLastH = height;
|
|
11170
|
-
_tmLastGap = gap;
|
|
11171
|
-
_tmLastColors = palette;
|
|
11172
|
-
_tmLastResult = [];
|
|
11173
|
-
return _tmLastResult;
|
|
11174
|
-
}
|
|
12430
|
+
if (totalValue <= 0) return [];
|
|
11175
12431
|
const sorted = flat.map((d, i) => ({ ...d, originalIndex: i })).sort((a, b) => b.value - a.value);
|
|
11176
12432
|
const nodes = [];
|
|
11177
|
-
layoutRect(sorted, 0, 0,
|
|
11178
|
-
_tmLastData = data;
|
|
11179
|
-
_tmLastW = width;
|
|
11180
|
-
_tmLastH = height;
|
|
11181
|
-
_tmLastGap = gap;
|
|
11182
|
-
_tmLastColors = palette;
|
|
11183
|
-
_tmLastResult = nodes;
|
|
12433
|
+
layoutRect(sorted, 0, 0, safeWidth, safeHeight, safeGap, palette, nodes);
|
|
11184
12434
|
return nodes;
|
|
11185
12435
|
}
|
|
11186
12436
|
function layoutRect(items, x, y, w, h, gap, palette, out) {
|
|
@@ -11227,41 +12477,22 @@ function layoutRect(items, x, y, w, h, gap, palette, out) {
|
|
|
11227
12477
|
}
|
|
11228
12478
|
|
|
11229
12479
|
// src/utils/sunburst-chart-utils.ts
|
|
11230
|
-
var sumCache = /* @__PURE__ */ new WeakMap();
|
|
11231
12480
|
function sumValue(d) {
|
|
11232
|
-
const cached = sumCache.get(d);
|
|
11233
|
-
if (cached !== void 0) return cached;
|
|
11234
12481
|
let v;
|
|
11235
12482
|
if (d.children && d.children.length > 0) {
|
|
11236
12483
|
v = d.children.reduce((s, c) => s + sumValue(c), 0);
|
|
11237
12484
|
} else {
|
|
11238
12485
|
v = d.value;
|
|
11239
12486
|
}
|
|
11240
|
-
|
|
11241
|
-
return v;
|
|
11242
|
-
}
|
|
11243
|
-
function precomputeSums(items) {
|
|
11244
|
-
for (const item of items) {
|
|
11245
|
-
if (item.children && item.children.length > 0) {
|
|
11246
|
-
precomputeSums(item.children);
|
|
11247
|
-
}
|
|
11248
|
-
sumValue(item);
|
|
11249
|
-
}
|
|
12487
|
+
return Number.isFinite(v) ? Math.max(0, v) : 0;
|
|
11250
12488
|
}
|
|
11251
|
-
var _sbLastData = null;
|
|
11252
|
-
var _sbLastCx = 0;
|
|
11253
|
-
var _sbLastCy = 0;
|
|
11254
|
-
var _sbLastIR = 0;
|
|
11255
|
-
var _sbLastOR = 0;
|
|
11256
|
-
var _sbLastColors = null;
|
|
11257
|
-
var _sbLastResult = [];
|
|
11258
12489
|
function computeSunburstArcs(data, opts) {
|
|
11259
|
-
const {
|
|
12490
|
+
const { innerRadius, outerRadius, colors } = opts;
|
|
12491
|
+
const cx = Number.isFinite(opts.cx) ? opts.cx : 0;
|
|
12492
|
+
const cy = Number.isFinite(opts.cy) ? opts.cy : 0;
|
|
12493
|
+
const safeInnerRadius = Number.isFinite(innerRadius) ? Math.max(0, innerRadius) : 0;
|
|
12494
|
+
const safeOuterRadius = Number.isFinite(outerRadius) ? Math.max(safeInnerRadius, outerRadius) : safeInnerRadius;
|
|
11260
12495
|
const palette = colors ?? DEFAULT_CHART_COLORS;
|
|
11261
|
-
if (data === _sbLastData && cx === _sbLastCx && cy === _sbLastCy && innerRadius === _sbLastIR && outerRadius === _sbLastOR && palette === _sbLastColors) {
|
|
11262
|
-
return _sbLastResult;
|
|
11263
|
-
}
|
|
11264
|
-
precomputeSums(data);
|
|
11265
12496
|
function maxDepth(items, d) {
|
|
11266
12497
|
let m = d;
|
|
11267
12498
|
for (const item of items) {
|
|
@@ -11272,7 +12503,7 @@ function computeSunburstArcs(data, opts) {
|
|
|
11272
12503
|
return m;
|
|
11273
12504
|
}
|
|
11274
12505
|
const depth = maxDepth(data, 0);
|
|
11275
|
-
const ringWidth = depth > 0 ? (
|
|
12506
|
+
const ringWidth = depth > 0 ? (safeOuterRadius - safeInnerRadius) / (depth + 1) : safeOuterRadius - safeInnerRadius;
|
|
11276
12507
|
const arcs = [];
|
|
11277
12508
|
let flatIndex = 0;
|
|
11278
12509
|
function layoutLevel(items, startAngle, endAngle, level, parentColorIdx) {
|
|
@@ -11284,8 +12515,8 @@ function computeSunburstArcs(data, opts) {
|
|
|
11284
12515
|
const sweep = (endAngle - startAngle) * val / total;
|
|
11285
12516
|
const sa = angle;
|
|
11286
12517
|
const ea = angle + sweep;
|
|
11287
|
-
const iR =
|
|
11288
|
-
const oR = iR + ringWidth - 1;
|
|
12518
|
+
const iR = safeInnerRadius + level * ringWidth;
|
|
12519
|
+
const oR = Math.max(iR, iR + ringWidth - 1);
|
|
11289
12520
|
const colorIdx = level === 0 ? i : parentColorIdx;
|
|
11290
12521
|
const color = item.color ?? palette[colorIdx % palette.length];
|
|
11291
12522
|
const path = createPieArcPath({
|
|
@@ -11299,7 +12530,7 @@ function computeSunburstArcs(data, opts) {
|
|
|
11299
12530
|
arcs.push({
|
|
11300
12531
|
index: flatIndex++,
|
|
11301
12532
|
label: item.label,
|
|
11302
|
-
value:
|
|
12533
|
+
value: val,
|
|
11303
12534
|
depth: level,
|
|
11304
12535
|
startAngle: sa,
|
|
11305
12536
|
endAngle: ea,
|
|
@@ -11314,13 +12545,6 @@ function computeSunburstArcs(data, opts) {
|
|
|
11314
12545
|
});
|
|
11315
12546
|
}
|
|
11316
12547
|
layoutLevel(data, -Math.PI / 2, 3 * Math.PI / 2, 0, 0);
|
|
11317
|
-
_sbLastData = data;
|
|
11318
|
-
_sbLastCx = cx;
|
|
11319
|
-
_sbLastCy = cy;
|
|
11320
|
-
_sbLastIR = innerRadius;
|
|
11321
|
-
_sbLastOR = outerRadius;
|
|
11322
|
-
_sbLastColors = palette;
|
|
11323
|
-
_sbLastResult = arcs;
|
|
11324
12548
|
return arcs;
|
|
11325
12549
|
}
|
|
11326
12550
|
|
|
@@ -11383,13 +12607,12 @@ var resultIconPaths = {
|
|
|
11383
12607
|
function getResultIconPath(status) {
|
|
11384
12608
|
return resultIconPaths[status];
|
|
11385
12609
|
}
|
|
11386
|
-
var
|
|
11387
|
-
|
|
11388
|
-
|
|
11389
|
-
|
|
11390
|
-
};
|
|
12610
|
+
var HTTP_RESULT_STATUSES = /* @__PURE__ */ new Set(["404", "403", "500"]);
|
|
12611
|
+
function isHttpResultStatus(status) {
|
|
12612
|
+
return HTTP_RESULT_STATUSES.has(status);
|
|
12613
|
+
}
|
|
11391
12614
|
function getResultHttpLabel(status) {
|
|
11392
|
-
return
|
|
12615
|
+
return isHttpResultStatus(status) ? status : void 0;
|
|
11393
12616
|
}
|
|
11394
12617
|
|
|
11395
12618
|
// src/utils/empty-utils.ts
|
|
@@ -11404,8 +12627,19 @@ var presetDescriptions = {
|
|
|
11404
12627
|
"no-results": "No results found",
|
|
11405
12628
|
error: "Something went wrong"
|
|
11406
12629
|
};
|
|
11407
|
-
function getEmptyDescription(preset) {
|
|
11408
|
-
|
|
12630
|
+
function getEmptyDescription(preset, locale) {
|
|
12631
|
+
switch (preset) {
|
|
12632
|
+
case "no-data":
|
|
12633
|
+
return locale?.empty?.noDataAvailable ?? presetDescriptions[preset];
|
|
12634
|
+
case "no-results":
|
|
12635
|
+
return locale?.empty?.noResults ?? presetDescriptions[preset];
|
|
12636
|
+
case "error":
|
|
12637
|
+
return locale?.empty?.error ?? presetDescriptions[preset];
|
|
12638
|
+
case "default":
|
|
12639
|
+
case "simple":
|
|
12640
|
+
default:
|
|
12641
|
+
return locale?.empty?.noData ?? locale?.common?.emptyText ?? presetDescriptions[preset];
|
|
12642
|
+
}
|
|
11409
12643
|
}
|
|
11410
12644
|
var emptyIllustrationViewBox = "0 0 64 41";
|
|
11411
12645
|
var emptyIllustrationPaths = [
|
|
@@ -12166,6 +13400,18 @@ var defaultChatMessageStatusInfo = {
|
|
|
12166
13400
|
function getChatMessageStatusInfo(status, statusMap = defaultChatMessageStatusInfo) {
|
|
12167
13401
|
return statusMap[status] || defaultChatMessageStatusInfo[status];
|
|
12168
13402
|
}
|
|
13403
|
+
var chatStatusBarBaseClasses = "px-5 py-2 border-t border-[var(--tiger-border,#e5e7eb)] text-xs italic bg-[var(--tiger-surface-muted,#f9fafb)]";
|
|
13404
|
+
var chatStatusBarVariantText = {
|
|
13405
|
+
default: "text-[var(--tiger-text-muted,#6b7280)]",
|
|
13406
|
+
primary: "text-[var(--tiger-primary,#2563eb)]",
|
|
13407
|
+
success: "text-[var(--tiger-success,#22c55e)]",
|
|
13408
|
+
warning: "text-[var(--tiger-warning,#f59e0b)]",
|
|
13409
|
+
danger: "text-[var(--tiger-danger,#ef4444)]",
|
|
13410
|
+
info: "text-[var(--tiger-info,#3b82f6)]"
|
|
13411
|
+
};
|
|
13412
|
+
function getChatStatusBarClasses(variant = "info") {
|
|
13413
|
+
return `${chatStatusBarBaseClasses} ${chatStatusBarVariantText[variant] ?? chatStatusBarVariantText.info}`;
|
|
13414
|
+
}
|
|
12169
13415
|
|
|
12170
13416
|
// src/utils/activity-feed-utils.ts
|
|
12171
13417
|
var activityItemClasses = "tiger-activity-item";
|
|
@@ -12895,13 +14141,14 @@ function isCascaderOptionExpandable(option) {
|
|
|
12895
14141
|
if (option.isLeaf) return false;
|
|
12896
14142
|
return !!(option.children && option.children.length > 0);
|
|
12897
14143
|
}
|
|
12898
|
-
function flattenCascaderOptions(options, parentPath = [], parentValuePath = []) {
|
|
14144
|
+
function flattenCascaderOptions(options, parentPath = [], parentValuePath = [], changeOnSelect = false) {
|
|
12899
14145
|
const result = [];
|
|
12900
14146
|
for (const option of options) {
|
|
12901
14147
|
const currentPath = [...parentPath, option];
|
|
12902
14148
|
const currentValuePath = [...parentValuePath, option.value];
|
|
12903
14149
|
const isDisabled = currentPath.some((o) => o.disabled);
|
|
12904
|
-
|
|
14150
|
+
const isLeaf = !option.children || option.children.length === 0 || !!option.isLeaf;
|
|
14151
|
+
if (isLeaf || changeOnSelect) {
|
|
12905
14152
|
result.push({
|
|
12906
14153
|
path: currentPath,
|
|
12907
14154
|
valuePath: currentValuePath,
|
|
@@ -12910,7 +14157,9 @@ function flattenCascaderOptions(options, parentPath = [], parentValuePath = [])
|
|
|
12910
14157
|
});
|
|
12911
14158
|
}
|
|
12912
14159
|
if (option.children && option.children.length > 0) {
|
|
12913
|
-
result.push(
|
|
14160
|
+
result.push(
|
|
14161
|
+
...flattenCascaderOptions(option.children, currentPath, currentValuePath, changeOnSelect)
|
|
14162
|
+
);
|
|
12914
14163
|
}
|
|
12915
14164
|
}
|
|
12916
14165
|
return result;
|
|
@@ -13294,143 +14543,52 @@ function validateCronExpression(expression) {
|
|
|
13294
14543
|
}
|
|
13295
14544
|
function validateCronField(value, meta) {
|
|
13296
14545
|
const trimmed = value.trim();
|
|
13297
|
-
if (!trimmed) return `${meta.label} is required`;
|
|
13298
|
-
return trimmed.split(",").map((part) => validateCronFieldPart(part, meta)).find((message) => message !== null) ?? null;
|
|
13299
|
-
}
|
|
13300
|
-
function getCronFieldIssue(result, field) {
|
|
13301
|
-
return result.issues.find((issue) => issue.field === field);
|
|
13302
|
-
}
|
|
13303
|
-
function getSafeCronExpressionParts(expression) {
|
|
13304
|
-
const parts = getCronExpressionParts(expression);
|
|
13305
|
-
if (parts.length === cronFieldMetas.length) return parts;
|
|
13306
|
-
return getCronExpressionParts(defaultCronExpression);
|
|
13307
|
-
}
|
|
13308
|
-
function getCronFieldIndex(field) {
|
|
13309
|
-
return cronFieldMetas.findIndex((meta) => meta.key === field);
|
|
13310
|
-
}
|
|
13311
|
-
function validateCronFieldPart(part, meta) {
|
|
13312
|
-
const [rangePart, stepPart] = part.split("/");
|
|
13313
|
-
if (part.split("/").length > 2) return `${meta.label} has an invalid step expression`;
|
|
13314
|
-
if (stepPart !== void 0 && !isCronIntegerInRange(stepPart, 1, meta.max)) {
|
|
13315
|
-
return `${meta.label} step must be between 1 and ${meta.max}`;
|
|
13316
|
-
}
|
|
13317
|
-
if (rangePart === "*") return null;
|
|
13318
|
-
const rangeMatch = rangePart.match(/^(\d+)-(\d+)$/);
|
|
13319
|
-
if (rangeMatch) {
|
|
13320
|
-
const start = Number(rangeMatch[1]);
|
|
13321
|
-
const end = Number(rangeMatch[2]);
|
|
13322
|
-
if (!isNumberInRange(start, meta.min, meta.max) || !isNumberInRange(end, meta.min, meta.max)) {
|
|
13323
|
-
return `${meta.label} must be between ${meta.min} and ${meta.max}`;
|
|
13324
|
-
}
|
|
13325
|
-
if (start > end) return `${meta.label} range start must be less than or equal to end`;
|
|
13326
|
-
return null;
|
|
13327
|
-
}
|
|
13328
|
-
if (/^\d+$/.test(rangePart)) {
|
|
13329
|
-
return isCronIntegerInRange(rangePart, meta.min, meta.max) ? null : `${meta.label} must be between ${meta.min} and ${meta.max}`;
|
|
13330
|
-
}
|
|
13331
|
-
return `${meta.label} must be *, a number, a range, a step, or a comma list`;
|
|
13332
|
-
}
|
|
13333
|
-
function isCronIntegerInRange(value, min, max) {
|
|
13334
|
-
if (!/^\d+$/.test(value)) return false;
|
|
13335
|
-
return isNumberInRange(Number(value), min, max);
|
|
13336
|
-
}
|
|
13337
|
-
function isNumberInRange(value, min, max) {
|
|
13338
|
-
return Number.isInteger(value) && value >= min && value <= max;
|
|
13339
|
-
}
|
|
13340
|
-
function clampCronNumber(value, min, max) {
|
|
13341
|
-
if (!Number.isFinite(value)) return min;
|
|
13342
|
-
return Math.max(min, Math.min(max, Math.round(value)));
|
|
13343
|
-
}
|
|
13344
|
-
|
|
13345
|
-
// src/utils/picker-utils.ts
|
|
13346
|
-
var defaultIsDisabled = (item) => !!item?.disabled;
|
|
13347
|
-
function findFirstEnabledIndex(items, isDisabled = defaultIsDisabled) {
|
|
13348
|
-
for (let i = 0; i < items.length; i++) {
|
|
13349
|
-
if (!isDisabled(items[i])) return i;
|
|
13350
|
-
}
|
|
13351
|
-
return -1;
|
|
13352
|
-
}
|
|
13353
|
-
function findLastEnabledIndex(items, isDisabled = defaultIsDisabled) {
|
|
13354
|
-
for (let i = items.length - 1; i >= 0; i--) {
|
|
13355
|
-
if (!isDisabled(items[i])) return i;
|
|
13356
|
-
}
|
|
13357
|
-
return -1;
|
|
13358
|
-
}
|
|
13359
|
-
function findNextEnabledIndex(items, current, direction, isDisabled = defaultIsDisabled) {
|
|
13360
|
-
if (items.length === 0) return -1;
|
|
13361
|
-
const start = current < 0 ? direction === 1 ? 0 : items.length - 1 : current + direction;
|
|
13362
|
-
for (let i = start; i >= 0 && i < items.length; i += direction) {
|
|
13363
|
-
if (!isDisabled(items[i])) return i;
|
|
13364
|
-
}
|
|
13365
|
-
return current;
|
|
13366
|
-
}
|
|
13367
|
-
function getInitialPickerActiveIndex(items, activeFirst, isDisabled = defaultIsDisabled) {
|
|
13368
|
-
return activeFirst ? findFirstEnabledIndex(items, isDisabled) : -1;
|
|
13369
|
-
}
|
|
13370
|
-
function getPickerNavigationIndex(items, current, key, isDisabled = defaultIsDisabled) {
|
|
13371
|
-
switch (key) {
|
|
13372
|
-
case "ArrowDown":
|
|
13373
|
-
return findNextEnabledIndex(items, current, 1, isDisabled);
|
|
13374
|
-
case "ArrowUp":
|
|
13375
|
-
return findNextEnabledIndex(items, current, -1, isDisabled);
|
|
13376
|
-
case "Home":
|
|
13377
|
-
return findFirstEnabledIndex(items, isDisabled);
|
|
13378
|
-
case "End":
|
|
13379
|
-
return findLastEnabledIndex(items, isDisabled);
|
|
13380
|
-
default:
|
|
13381
|
-
return current;
|
|
13382
|
-
}
|
|
13383
|
-
}
|
|
13384
|
-
function getPickerOptionId(listboxId, index) {
|
|
13385
|
-
return `${listboxId}-option-${index}`;
|
|
13386
|
-
}
|
|
13387
|
-
function getDisclosureStateAttr(open) {
|
|
13388
|
-
return { "data-state": open ? "open" : "closed" };
|
|
13389
|
-
}
|
|
13390
|
-
function getPickerComboboxAria({
|
|
13391
|
-
expanded,
|
|
13392
|
-
listboxId,
|
|
13393
|
-
activeIndex = -1,
|
|
13394
|
-
activeOptionId
|
|
13395
|
-
}) {
|
|
13396
|
-
return {
|
|
13397
|
-
role: "combobox",
|
|
13398
|
-
"aria-expanded": expanded,
|
|
13399
|
-
"aria-haspopup": "listbox",
|
|
13400
|
-
"aria-controls": expanded ? listboxId : void 0,
|
|
13401
|
-
"aria-activedescendant": expanded ? activeOptionId ?? (activeIndex >= 0 ? getPickerOptionId(listboxId, activeIndex) : void 0) : void 0,
|
|
13402
|
-
"data-state": expanded ? "open" : "closed"
|
|
13403
|
-
};
|
|
14546
|
+
if (!trimmed) return `${meta.label} is required`;
|
|
14547
|
+
return trimmed.split(",").map((part) => validateCronFieldPart(part, meta)).find((message) => message !== null) ?? null;
|
|
13404
14548
|
}
|
|
13405
|
-
function
|
|
13406
|
-
return
|
|
13407
|
-
id,
|
|
13408
|
-
role: "listbox",
|
|
13409
|
-
"aria-label": label
|
|
13410
|
-
};
|
|
14549
|
+
function getCronFieldIssue(result, field) {
|
|
14550
|
+
return result.issues.find((issue) => issue.field === field);
|
|
13411
14551
|
}
|
|
13412
|
-
function
|
|
13413
|
-
|
|
13414
|
-
|
|
13415
|
-
|
|
13416
|
-
return {
|
|
13417
|
-
role: "option",
|
|
13418
|
-
"aria-selected": selected,
|
|
13419
|
-
"aria-disabled": disabled || void 0
|
|
13420
|
-
};
|
|
14552
|
+
function getSafeCronExpressionParts(expression) {
|
|
14553
|
+
const parts = getCronExpressionParts(expression);
|
|
14554
|
+
if (parts.length === cronFieldMetas.length) return parts;
|
|
14555
|
+
return getCronExpressionParts(defaultCronExpression);
|
|
13421
14556
|
}
|
|
13422
|
-
function
|
|
13423
|
-
|
|
13424
|
-
|
|
13425
|
-
|
|
13426
|
-
|
|
13427
|
-
|
|
13428
|
-
|
|
13429
|
-
|
|
13430
|
-
|
|
13431
|
-
|
|
13432
|
-
|
|
14557
|
+
function getCronFieldIndex(field) {
|
|
14558
|
+
return cronFieldMetas.findIndex((meta) => meta.key === field);
|
|
14559
|
+
}
|
|
14560
|
+
function validateCronFieldPart(part, meta) {
|
|
14561
|
+
const [rangePart, stepPart] = part.split("/");
|
|
14562
|
+
if (part.split("/").length > 2) return `${meta.label} has an invalid step expression`;
|
|
14563
|
+
if (stepPart !== void 0 && !isCronIntegerInRange(stepPart, 1, meta.max)) {
|
|
14564
|
+
return `${meta.label} step must be between 1 and ${meta.max}`;
|
|
14565
|
+
}
|
|
14566
|
+
if (rangePart === "*") return null;
|
|
14567
|
+
const rangeMatch = rangePart.match(/^(\d+)-(\d+)$/);
|
|
14568
|
+
if (rangeMatch) {
|
|
14569
|
+
const start = Number(rangeMatch[1]);
|
|
14570
|
+
const end = Number(rangeMatch[2]);
|
|
14571
|
+
if (!isNumberInRange(start, meta.min, meta.max) || !isNumberInRange(end, meta.min, meta.max)) {
|
|
14572
|
+
return `${meta.label} must be between ${meta.min} and ${meta.max}`;
|
|
14573
|
+
}
|
|
14574
|
+
if (start > end) return `${meta.label} range start must be less than or equal to end`;
|
|
14575
|
+
return null;
|
|
14576
|
+
}
|
|
14577
|
+
if (/^\d+$/.test(rangePart)) {
|
|
14578
|
+
return isCronIntegerInRange(rangePart, meta.min, meta.max) ? null : `${meta.label} must be between ${meta.min} and ${meta.max}`;
|
|
13433
14579
|
}
|
|
14580
|
+
return `${meta.label} must be *, a number, a range, a step, or a comma list`;
|
|
14581
|
+
}
|
|
14582
|
+
function isCronIntegerInRange(value, min, max) {
|
|
14583
|
+
if (!/^\d+$/.test(value)) return false;
|
|
14584
|
+
return isNumberInRange(Number(value), min, max);
|
|
14585
|
+
}
|
|
14586
|
+
function isNumberInRange(value, min, max) {
|
|
14587
|
+
return Number.isInteger(value) && value >= min && value <= max;
|
|
14588
|
+
}
|
|
14589
|
+
function clampCronNumber(value, min, max) {
|
|
14590
|
+
if (!Number.isFinite(value)) return min;
|
|
14591
|
+
return Math.max(min, Math.min(max, Math.round(value)));
|
|
13434
14592
|
}
|
|
13435
14593
|
|
|
13436
14594
|
// src/utils/spotlight-utils.ts
|
|
@@ -13673,6 +14831,19 @@ function splitTransferData(dataSource, targetKeys) {
|
|
|
13673
14831
|
}
|
|
13674
14832
|
return { sourceItems, targetItems };
|
|
13675
14833
|
}
|
|
14834
|
+
function moveTransferItems(direction, targetKeys, selectedKeys, dataSource) {
|
|
14835
|
+
const disabledKeys = /* @__PURE__ */ new Set();
|
|
14836
|
+
for (const item of dataSource) {
|
|
14837
|
+
if (item.disabled) disabledKeys.add(item.key);
|
|
14838
|
+
}
|
|
14839
|
+
const dataKeys = new Set(dataSource.map((item) => item.key));
|
|
14840
|
+
const movedKeys = [...selectedKeys].filter((key) => dataKeys.has(key) && !disabledKeys.has(key));
|
|
14841
|
+
if (direction === "right") {
|
|
14842
|
+
return { targetKeys: [...targetKeys, ...movedKeys], movedKeys };
|
|
14843
|
+
}
|
|
14844
|
+
const movedSet = new Set(movedKeys);
|
|
14845
|
+
return { targetKeys: targetKeys.filter((key) => !movedSet.has(key)), movedKeys };
|
|
14846
|
+
}
|
|
13676
14847
|
function filterTransferItems(items, query, filterFn) {
|
|
13677
14848
|
if (!query) return items;
|
|
13678
14849
|
const fn = filterFn ?? defaultTransferFilter;
|
|
@@ -14304,9 +15475,14 @@ var minusPathD = "M5 10a1 1 0 011-1h8a1 1 0 110 2H6a1 1 0 01-1-1z";
|
|
|
14304
15475
|
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";
|
|
14305
15476
|
var stepperIconViewBox = "0 0 20 20";
|
|
14306
15477
|
function clampStepperValue(value, min, max, precision) {
|
|
14307
|
-
|
|
14308
|
-
|
|
14309
|
-
|
|
15478
|
+
const safeMin = Number.isFinite(min) || min === Number.NEGATIVE_INFINITY ? min : 0;
|
|
15479
|
+
const safeMax = Number.isFinite(max) || max === Number.POSITIVE_INFINITY ? max : safeMin;
|
|
15480
|
+
const lower = Math.min(safeMin, safeMax);
|
|
15481
|
+
const upper = Math.max(safeMin, safeMax);
|
|
15482
|
+
const fallback = Number.isFinite(lower) ? lower : 0;
|
|
15483
|
+
let v = Math.max(lower, Math.min(upper, Number.isFinite(value) ? value : fallback));
|
|
15484
|
+
if (precision !== void 0 && Number.isFinite(precision) && precision >= 0) {
|
|
15485
|
+
v = Number(v.toFixed(Math.floor(precision)));
|
|
14310
15486
|
}
|
|
14311
15487
|
return v;
|
|
14312
15488
|
}
|
|
@@ -14683,6 +15859,7 @@ function exportTableToExcel(columns, data) {
|
|
|
14683
15859
|
return `<!doctype html><html><head><meta charset="utf-8"></head><body><table><thead><tr>${headerCells}</tr></thead><tbody>${bodyRows}</tbody></table></body></html>`;
|
|
14684
15860
|
}
|
|
14685
15861
|
function downloadCsv(csvContent, filename = "export") {
|
|
15862
|
+
if (!isBrowser()) return;
|
|
14686
15863
|
const blob = new Blob([csvContent], { type: "text/csv;charset=utf-8;" });
|
|
14687
15864
|
const url = URL.createObjectURL(blob);
|
|
14688
15865
|
const link = document.createElement("a");
|
|
@@ -14695,6 +15872,7 @@ function downloadCsv(csvContent, filename = "export") {
|
|
|
14695
15872
|
URL.revokeObjectURL(url);
|
|
14696
15873
|
}
|
|
14697
15874
|
function downloadExcel(excelContent, filename = "export") {
|
|
15875
|
+
if (!isBrowser()) return;
|
|
14698
15876
|
const blob = new Blob([excelContent], { type: "application/vnd.ms-excel;charset=utf-8;" });
|
|
14699
15877
|
const url = URL.createObjectURL(blob);
|
|
14700
15878
|
const link = document.createElement("a");
|
|
@@ -15342,6 +16520,26 @@ function calculateResizeDelta(handle, mouseDeltaX, mouseDeltaY, axis) {
|
|
|
15342
16520
|
}
|
|
15343
16521
|
return { deltaWidth, deltaHeight };
|
|
15344
16522
|
}
|
|
16523
|
+
var RESIZE_KEYBOARD_STEP = 10;
|
|
16524
|
+
function getResizeKeyboardDelta(key, step = RESIZE_KEYBOARD_STEP) {
|
|
16525
|
+
switch (key) {
|
|
16526
|
+
case "ArrowRight":
|
|
16527
|
+
return { deltaX: step, deltaY: 0 };
|
|
16528
|
+
case "ArrowLeft":
|
|
16529
|
+
return { deltaX: -step, deltaY: 0 };
|
|
16530
|
+
case "ArrowDown":
|
|
16531
|
+
return { deltaX: 0, deltaY: step };
|
|
16532
|
+
case "ArrowUp":
|
|
16533
|
+
return { deltaX: 0, deltaY: -step };
|
|
16534
|
+
default:
|
|
16535
|
+
return null;
|
|
16536
|
+
}
|
|
16537
|
+
}
|
|
16538
|
+
function getResizeHandleOrientation(handle) {
|
|
16539
|
+
if (handle === "left" || handle === "right") return "vertical";
|
|
16540
|
+
if (handle === "top" || handle === "bottom") return "horizontal";
|
|
16541
|
+
return void 0;
|
|
16542
|
+
}
|
|
15345
16543
|
function clampDimensions(width, height, minWidth, minHeight, maxWidth, maxHeight) {
|
|
15346
16544
|
let w = Math.max(width, minWidth);
|
|
15347
16545
|
let h = Math.max(height, minHeight);
|
|
@@ -15365,6 +16563,19 @@ var codeEditorHighlightClasses = "p-3 font-mono text-sm leading-relaxed whitespa
|
|
|
15365
16563
|
var codeEditorLineNumberClasses = "select-none text-right pr-3 pl-2 border-r min-w-[3rem] flex-shrink-0";
|
|
15366
16564
|
var codeEditorLineNumberLightClasses = "bg-gray-50 border-gray-200 text-gray-400";
|
|
15367
16565
|
var codeEditorLineNumberDarkClasses = "bg-gray-800 border-gray-700 text-gray-500";
|
|
16566
|
+
var codeEditorActiveLineLightClasses = "bg-gray-100";
|
|
16567
|
+
var codeEditorActiveLineDarkClasses = "bg-gray-800/60";
|
|
16568
|
+
function getCodeEditorActiveLineClasses(theme) {
|
|
16569
|
+
return theme === "dark" ? codeEditorActiveLineDarkClasses : codeEditorActiveLineLightClasses;
|
|
16570
|
+
}
|
|
16571
|
+
function getActiveLineIndex(value, caretPosition) {
|
|
16572
|
+
const clamped = Math.max(0, Math.min(caretPosition, value.length));
|
|
16573
|
+
let line = 0;
|
|
16574
|
+
for (let i = 0; i < clamped; i++) {
|
|
16575
|
+
if (value[i] === "\n") line++;
|
|
16576
|
+
}
|
|
16577
|
+
return line;
|
|
16578
|
+
}
|
|
15368
16579
|
var tokenClassesLight = {
|
|
15369
16580
|
keyword: "text-purple-600 font-semibold",
|
|
15370
16581
|
string: "text-green-600",
|
|
@@ -15758,6 +16969,66 @@ function isContentEmpty(html) {
|
|
|
15758
16969
|
const stripped = html.replace(/<br\s*\/?>/gi, "").replace(/<\/?[^>]*>/g, "").replace(/ /gi, "").trim();
|
|
15759
16970
|
return stripped.length === 0;
|
|
15760
16971
|
}
|
|
16972
|
+
function escapeHtml(value) {
|
|
16973
|
+
return value.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
16974
|
+
}
|
|
16975
|
+
function decodeHtmlEntities(value) {
|
|
16976
|
+
return value.replace(/ /gi, " ").replace(/</gi, "<").replace(/>/gi, ">").replace(/"/gi, '"').replace(/'/gi, "'").replace(/&/gi, "&");
|
|
16977
|
+
}
|
|
16978
|
+
function inlineMarkdownToHtml(value) {
|
|
16979
|
+
return escapeHtml(value).replace(/\*\*([^*]+)\*\*/g, "<strong>$1</strong>").replace(/\*([^*]+)\*/g, "<em>$1</em>").replace(/`([^`]+)`/g, "<code>$1</code>");
|
|
16980
|
+
}
|
|
16981
|
+
function richTextModeToHtml(value, mode = "html") {
|
|
16982
|
+
if (mode === "html") return sanitizeHtml(value);
|
|
16983
|
+
if (mode === "plain") {
|
|
16984
|
+
return escapeHtml(value).split(/\r?\n/).map((line) => line ? `<p>${line}</p>` : "<p><br></p>").join("");
|
|
16985
|
+
}
|
|
16986
|
+
const lines = value.split(/\r?\n/);
|
|
16987
|
+
const html = [];
|
|
16988
|
+
let listItems = [];
|
|
16989
|
+
const flushList = () => {
|
|
16990
|
+
if (listItems.length === 0) return;
|
|
16991
|
+
html.push(
|
|
16992
|
+
`<ul>${listItems.map((item) => `<li>${inlineMarkdownToHtml(item)}</li>`).join("")}</ul>`
|
|
16993
|
+
);
|
|
16994
|
+
listItems = [];
|
|
16995
|
+
};
|
|
16996
|
+
for (const line of lines) {
|
|
16997
|
+
const trimmed = line.trim();
|
|
16998
|
+
const bullet = /^[-*]\s+(.+)$/.exec(trimmed);
|
|
16999
|
+
if (bullet) {
|
|
17000
|
+
listItems.push(bullet[1]);
|
|
17001
|
+
continue;
|
|
17002
|
+
}
|
|
17003
|
+
flushList();
|
|
17004
|
+
if (!trimmed) {
|
|
17005
|
+
html.push("<p><br></p>");
|
|
17006
|
+
} else if (trimmed.startsWith("### ")) {
|
|
17007
|
+
html.push(`<h3>${inlineMarkdownToHtml(trimmed.slice(4))}</h3>`);
|
|
17008
|
+
} else if (trimmed.startsWith("## ")) {
|
|
17009
|
+
html.push(`<h2>${inlineMarkdownToHtml(trimmed.slice(3))}</h2>`);
|
|
17010
|
+
} else if (trimmed.startsWith("# ")) {
|
|
17011
|
+
html.push(`<h1>${inlineMarkdownToHtml(trimmed.slice(2))}</h1>`);
|
|
17012
|
+
} else {
|
|
17013
|
+
html.push(`<p>${inlineMarkdownToHtml(trimmed)}</p>`);
|
|
17014
|
+
}
|
|
17015
|
+
}
|
|
17016
|
+
flushList();
|
|
17017
|
+
return sanitizeHtml(html.join(""));
|
|
17018
|
+
}
|
|
17019
|
+
function htmlToText(value) {
|
|
17020
|
+
return decodeHtmlEntities(
|
|
17021
|
+
sanitizeHtml(value).replace(/<\/(h[1-6]|p|div|li)>/gi, "\n").replace(/<br\s*\/?>/gi, "\n").replace(/<\/ul>/gi, "\n").replace(/<[^>]+>/g, "")
|
|
17022
|
+
).replace(/\n{3,}/g, "\n\n").trim();
|
|
17023
|
+
}
|
|
17024
|
+
function richTextHtmlToMode(html, mode = "html") {
|
|
17025
|
+
const sanitized = sanitizeHtml(html);
|
|
17026
|
+
if (mode === "html") return sanitized;
|
|
17027
|
+
if (mode === "plain") return htmlToText(sanitized);
|
|
17028
|
+
return decodeHtmlEntities(
|
|
17029
|
+
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, "")
|
|
17030
|
+
).replace(/\n{3,}/g, "\n\n").trim();
|
|
17031
|
+
}
|
|
15761
17032
|
function parseHeight(height) {
|
|
15762
17033
|
if (height === void 0) return void 0;
|
|
15763
17034
|
if (typeof height === "number") return `${height}px`;
|
|
@@ -16051,15 +17322,15 @@ function createBuiltinRichTextEngine() {
|
|
|
16051
17322
|
name: "builtin",
|
|
16052
17323
|
create(ctx) {
|
|
16053
17324
|
const { element } = ctx;
|
|
17325
|
+
const mode = ctx.mode ?? "html";
|
|
16054
17326
|
let readOnly = ctx.readOnly;
|
|
16055
17327
|
let disabled = ctx.disabled;
|
|
16056
17328
|
element.contentEditable = String(!(readOnly || disabled));
|
|
16057
|
-
const initial =
|
|
17329
|
+
const initial = richTextModeToHtml(ctx.initialValue, mode);
|
|
16058
17330
|
if (initial) element.innerHTML = initial;
|
|
16059
17331
|
const handleInput = () => {
|
|
16060
17332
|
const html = element.innerHTML;
|
|
16061
|
-
|
|
16062
|
-
ctx.notifyChange(sanitized);
|
|
17333
|
+
ctx.notifyChange(richTextHtmlToMode(html, mode));
|
|
16063
17334
|
};
|
|
16064
17335
|
const refreshActiveFormats = () => {
|
|
16065
17336
|
if (!isBrowser()) return;
|
|
@@ -16123,11 +17394,11 @@ function createBuiltinRichTextEngine() {
|
|
|
16123
17394
|
};
|
|
16124
17395
|
return {
|
|
16125
17396
|
setValue(html) {
|
|
16126
|
-
const sanitized =
|
|
17397
|
+
const sanitized = richTextModeToHtml(html, mode);
|
|
16127
17398
|
if (element.innerHTML !== sanitized) element.innerHTML = sanitized;
|
|
16128
17399
|
},
|
|
16129
17400
|
getValue() {
|
|
16130
|
-
return
|
|
17401
|
+
return richTextHtmlToMode(element.innerHTML, mode);
|
|
16131
17402
|
},
|
|
16132
17403
|
exec,
|
|
16133
17404
|
refreshActiveFormats,
|
|
@@ -16156,7 +17427,6 @@ var kanbanSwimlaneDotClasses = "w-2.5 h-2.5 rounded-full shrink-0";
|
|
|
16156
17427
|
var kanbanSwimlaneCollapsedClasses = "hidden";
|
|
16157
17428
|
var kanbanFilterHighlightClasses = "bg-[var(--tiger-warning,#fbbf24)]/20";
|
|
16158
17429
|
var kanbanAddColumnClasses = "flex items-center justify-center shrink-0 w-76 min-h-[120px] rounded-[var(--tiger-radius-lg,0.75rem)] border-2 border-dashed border-[var(--tiger-border,#e5e7eb)] bg-[var(--tiger-surface-muted,#f9fafb)]/40 text-sm font-medium text-[var(--tiger-text-muted,#6b7280)] hover:border-[var(--tiger-primary,#2563eb)]/80 hover:text-[var(--tiger-primary,#2563eb)] hover:bg-[var(--tiger-surface,#ffffff)] hover:shadow-sm cursor-pointer transition-all duration-300 active:scale-98";
|
|
16159
|
-
var kanbanAddCardClasses = taskBoardAddCardClasses;
|
|
16160
17430
|
function filterCards(cards, filterText) {
|
|
16161
17431
|
if (!filterText.trim()) return cards;
|
|
16162
17432
|
const lower = filterText.toLowerCase();
|
|
@@ -16227,17 +17497,54 @@ var virtualTableBorderedClasses = "[&_td]:border-r [&_th]:border-r [&_td:last-ch
|
|
|
16227
17497
|
var virtualTableEmptyClasses = "flex items-center justify-center py-12 text-sm text-[var(--tiger-text-muted,#9ca3af)]";
|
|
16228
17498
|
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";
|
|
16229
17499
|
function calculateVirtualRange(scrollTop, viewportHeight, totalRows, rowHeight, overscan = 5) {
|
|
16230
|
-
|
|
17500
|
+
const safeTotalRows = Number.isFinite(totalRows) ? Math.max(0, Math.floor(totalRows)) : 0;
|
|
17501
|
+
const safeRowHeight = Number.isFinite(rowHeight) ? rowHeight : 0;
|
|
17502
|
+
const safeViewportHeight = Number.isFinite(viewportHeight) ? Math.max(0, viewportHeight) : 0;
|
|
17503
|
+
const safeScrollTop = Number.isFinite(scrollTop) ? Math.max(0, scrollTop) : 0;
|
|
17504
|
+
const safeOverscan = Number.isFinite(overscan) ? Math.max(0, Math.floor(overscan)) : 0;
|
|
17505
|
+
if (safeTotalRows === 0 || safeRowHeight <= 0 || safeViewportHeight <= 0) {
|
|
16231
17506
|
return { start: 0, end: 0, offsetTop: 0, totalHeight: 0 };
|
|
16232
17507
|
}
|
|
16233
|
-
const totalHeight =
|
|
16234
|
-
const startRaw = Math.floor(
|
|
16235
|
-
const visibleCount = Math.ceil(
|
|
16236
|
-
const start = Math.max(0, startRaw -
|
|
16237
|
-
const end = Math.min(
|
|
16238
|
-
const offsetTop = start *
|
|
17508
|
+
const totalHeight = safeTotalRows * safeRowHeight;
|
|
17509
|
+
const startRaw = Math.floor(safeScrollTop / safeRowHeight);
|
|
17510
|
+
const visibleCount = Math.ceil(safeViewportHeight / safeRowHeight);
|
|
17511
|
+
const start = Math.max(0, Math.min(safeTotalRows, startRaw - safeOverscan));
|
|
17512
|
+
const end = Math.max(start, Math.min(safeTotalRows, startRaw + visibleCount + safeOverscan));
|
|
17513
|
+
const offsetTop = start * safeRowHeight;
|
|
16239
17514
|
return { start, end, offsetTop, totalHeight };
|
|
16240
17515
|
}
|
|
17516
|
+
function calculateVirtualColumnRange(scrollLeft, viewportWidth, columnWidths, overscan = 2) {
|
|
17517
|
+
const count = columnWidths.length;
|
|
17518
|
+
if (count === 0 || viewportWidth <= 0) {
|
|
17519
|
+
return { start: 0, end: count, leftPad: 0, rightPad: 0 };
|
|
17520
|
+
}
|
|
17521
|
+
const safeScrollLeft = Math.max(0, Number.isFinite(scrollLeft) ? scrollLeft : 0);
|
|
17522
|
+
const safeOverscan = Math.max(0, Math.floor(overscan));
|
|
17523
|
+
let acc = 0;
|
|
17524
|
+
let rawStart = 0;
|
|
17525
|
+
for (let i = 0; i < count; i++) {
|
|
17526
|
+
if (acc + columnWidths[i] > safeScrollLeft) {
|
|
17527
|
+
rawStart = i;
|
|
17528
|
+
break;
|
|
17529
|
+
}
|
|
17530
|
+
acc += columnWidths[i];
|
|
17531
|
+
if (i === count - 1) rawStart = count - 1;
|
|
17532
|
+
}
|
|
17533
|
+
const viewEnd = safeScrollLeft + viewportWidth;
|
|
17534
|
+
let endExclusive = rawStart;
|
|
17535
|
+
let endAcc = acc;
|
|
17536
|
+
while (endExclusive < count && endAcc < viewEnd) {
|
|
17537
|
+
endAcc += columnWidths[endExclusive];
|
|
17538
|
+
endExclusive++;
|
|
17539
|
+
}
|
|
17540
|
+
const start = Math.max(0, rawStart - safeOverscan);
|
|
17541
|
+
const end = Math.min(count, endExclusive + safeOverscan);
|
|
17542
|
+
let leftPad = 0;
|
|
17543
|
+
for (let i = 0; i < start; i++) leftPad += columnWidths[i];
|
|
17544
|
+
let rightPad = 0;
|
|
17545
|
+
for (let i = end; i < count; i++) rightPad += columnWidths[i];
|
|
17546
|
+
return { start, end, leftPad, rightPad };
|
|
17547
|
+
}
|
|
16241
17548
|
function getVirtualRowKey(row, index, rowKey) {
|
|
16242
17549
|
if (!rowKey) return index;
|
|
16243
17550
|
if (typeof rowKey === "function") return rowKey(row, index);
|
|
@@ -16324,8 +17631,14 @@ function shouldLoadMore(el, threshold, direction = "vertical", inverse = false)
|
|
|
16324
17631
|
}
|
|
16325
17632
|
function createInfiniteScrollObserver(sentinel, options) {
|
|
16326
17633
|
if (typeof IntersectionObserver === "undefined") return null;
|
|
16327
|
-
const {
|
|
16328
|
-
|
|
17634
|
+
const {
|
|
17635
|
+
threshold = 100,
|
|
17636
|
+
direction = "vertical",
|
|
17637
|
+
root = null,
|
|
17638
|
+
inverse = false,
|
|
17639
|
+
onLoadMore
|
|
17640
|
+
} = options;
|
|
17641
|
+
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`;
|
|
16329
17642
|
const observer = new IntersectionObserver(
|
|
16330
17643
|
(entries) => {
|
|
16331
17644
|
const entry = entries[entries.length - 1];
|
|
@@ -16348,7 +17661,7 @@ function getInfiniteScrollContainerClasses(direction, className) {
|
|
|
16348
17661
|
}
|
|
16349
17662
|
|
|
16350
17663
|
// src/utils/file-manager-utils.ts
|
|
16351
|
-
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";
|
|
17664
|
+
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";
|
|
16352
17665
|
var fileManagerToolbarClasses = "flex items-center gap-2 px-3 py-2 border-b border-[var(--tiger-border,#e5e7eb)] bg-[var(--tiger-bg-secondary,#f9fafb)]";
|
|
16353
17666
|
var fileManagerBreadcrumbClasses = "flex items-center gap-1 text-sm text-[var(--tiger-text-secondary,#6b7280)]";
|
|
16354
17667
|
var fileManagerBreadcrumbItemClasses = "cursor-pointer hover:text-[var(--tiger-primary,#2563eb)] transition-colors";
|
|
@@ -16398,18 +17711,10 @@ function filterHiddenFiles(items, showHidden) {
|
|
|
16398
17711
|
return items.filter((item) => !item.name.startsWith("."));
|
|
16399
17712
|
}
|
|
16400
17713
|
function formatFileSizeLabel(bytes) {
|
|
16401
|
-
|
|
16402
|
-
if (bytes === 0) return "0 B";
|
|
16403
|
-
const units = ["B", "KB", "MB", "GB", "TB"];
|
|
16404
|
-
const k = 1024;
|
|
16405
|
-
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
16406
|
-
const size = bytes / Math.pow(k, i);
|
|
16407
|
-
return `${size % 1 === 0 ? size : size.toFixed(1)} ${units[i]}`;
|
|
17714
|
+
return formatBytes(bytes, { precision: 1, trimTrailingZeros: true });
|
|
16408
17715
|
}
|
|
16409
17716
|
function getFileExtension2(name) {
|
|
16410
|
-
|
|
16411
|
-
if (dot <= 0) return "";
|
|
16412
|
-
return name.slice(dot + 1).toLowerCase();
|
|
17717
|
+
return getFileExtensionName(name);
|
|
16413
17718
|
}
|
|
16414
17719
|
function navigateToFolder(files, path) {
|
|
16415
17720
|
let current = files;
|
|
@@ -16761,8 +18066,10 @@ function normalizeGanttDate(value) {
|
|
|
16761
18066
|
return time;
|
|
16762
18067
|
}
|
|
16763
18068
|
function getGanttTaskAriaLabel(task) {
|
|
16764
|
-
const
|
|
16765
|
-
const
|
|
18069
|
+
const startMs = normalizeGanttDate(task.start);
|
|
18070
|
+
const endMs = normalizeGanttDate(task.end);
|
|
18071
|
+
const start = Number.isFinite(startMs) ? formatGanttDate(new Date(startMs), "day") : "unknown";
|
|
18072
|
+
const end = Number.isFinite(endMs) ? formatGanttDate(new Date(endMs), "day") : "unknown";
|
|
16766
18073
|
const progress = typeof task.progress === "number" ? `, ${clampProgress(task.progress)}%` : "";
|
|
16767
18074
|
return `${task.label}, ${start} to ${end}${progress}`;
|
|
16768
18075
|
}
|
|
@@ -16775,19 +18082,28 @@ function getGanttDependencyPath(dependency) {
|
|
|
16775
18082
|
}
|
|
16776
18083
|
function computeGanttLayout(data, options = {}) {
|
|
16777
18084
|
const {
|
|
16778
|
-
width = 720,
|
|
16779
|
-
rowHeight = 40,
|
|
16780
|
-
barHeight = 18,
|
|
16781
|
-
taskLabelWidth = 140,
|
|
16782
|
-
timelineHeight = 36,
|
|
16783
|
-
minBarWidth = 6,
|
|
18085
|
+
width: rawWidth = 720,
|
|
18086
|
+
rowHeight: rawRowHeight = 40,
|
|
18087
|
+
barHeight: rawBarHeight = 18,
|
|
18088
|
+
taskLabelWidth: rawTaskLabelWidth = 140,
|
|
18089
|
+
timelineHeight: rawTimelineHeight = 36,
|
|
18090
|
+
minBarWidth: rawMinBarWidth = 6,
|
|
16784
18091
|
scale = "week",
|
|
16785
18092
|
colors = DEFAULT_CHART_COLORS,
|
|
16786
18093
|
dateFormatter
|
|
16787
18094
|
} = options;
|
|
18095
|
+
const width = Number.isFinite(rawWidth) ? Math.max(0, rawWidth) : 0;
|
|
18096
|
+
const rowHeight = Number.isFinite(rawRowHeight) ? Math.max(0, rawRowHeight) : 0;
|
|
18097
|
+
const barHeight = Number.isFinite(rawBarHeight) ? Math.max(0, rawBarHeight) : 0;
|
|
18098
|
+
const taskLabelWidth = Number.isFinite(rawTaskLabelWidth) ? Math.max(0, rawTaskLabelWidth) : 0;
|
|
18099
|
+
const timelineHeight = Number.isFinite(rawTimelineHeight) ? Math.max(0, rawTimelineHeight) : 0;
|
|
18100
|
+
const minBarWidth = Number.isFinite(rawMinBarWidth) ? Math.max(0, rawMinBarWidth) : 0;
|
|
16788
18101
|
if (data.length === 0) {
|
|
16789
|
-
const
|
|
16790
|
-
const
|
|
18102
|
+
const fallbackMin = Date.now();
|
|
18103
|
+
const rawMinMs2 = normalizeGanttDate(options.minDate ?? fallbackMin);
|
|
18104
|
+
const minMs2 = Number.isFinite(rawMinMs2) ? rawMinMs2 : fallbackMin;
|
|
18105
|
+
const rawMaxMs2 = normalizeGanttDate(options.maxDate ?? minMs2 + DAY_MS);
|
|
18106
|
+
const maxMs2 = Number.isFinite(rawMaxMs2) && rawMaxMs2 > minMs2 ? rawMaxMs2 : minMs2 + DAY_MS;
|
|
16791
18107
|
return {
|
|
16792
18108
|
tasks: [],
|
|
16793
18109
|
dependencies: [],
|
|
@@ -16803,24 +18119,28 @@ function computeGanttLayout(data, options = {}) {
|
|
|
16803
18119
|
const taskRanges = data.map((task) => {
|
|
16804
18120
|
const rawStart = normalizeGanttDate(task.start);
|
|
16805
18121
|
const rawEnd = normalizeGanttDate(task.end);
|
|
16806
|
-
const
|
|
16807
|
-
const
|
|
18122
|
+
const startFallback = Number.isFinite(rawEnd) ? rawEnd : Date.now();
|
|
18123
|
+
const endFallback = Number.isFinite(rawStart) ? rawStart : startFallback + DAY_MS;
|
|
18124
|
+
const safeStart = Number.isFinite(rawStart) ? rawStart : startFallback;
|
|
18125
|
+
const safeEnd = Number.isFinite(rawEnd) ? rawEnd : endFallback;
|
|
18126
|
+
const startMs = Math.min(safeStart, safeEnd);
|
|
18127
|
+
const endMs = Math.max(safeStart, safeEnd);
|
|
16808
18128
|
return { task, startMs, endMs: endMs === startMs ? endMs + DAY_MS : endMs };
|
|
16809
18129
|
});
|
|
16810
|
-
const
|
|
16811
|
-
|
|
16812
|
-
);
|
|
16813
|
-
const
|
|
16814
|
-
|
|
16815
|
-
);
|
|
18130
|
+
const inferredMinMs = Math.min(...taskRanges.map((item) => item.startMs));
|
|
18131
|
+
const inferredMaxMs = Math.max(...taskRanges.map((item) => item.endMs));
|
|
18132
|
+
const rawMinMs = normalizeGanttDate(options.minDate ?? inferredMinMs);
|
|
18133
|
+
const rawMaxMs = normalizeGanttDate(options.maxDate ?? inferredMaxMs);
|
|
18134
|
+
const minMs = Number.isFinite(rawMinMs) ? rawMinMs : inferredMinMs;
|
|
18135
|
+
const maxMs = Number.isFinite(rawMaxMs) ? rawMaxMs : inferredMaxMs;
|
|
16816
18136
|
const safeMaxMs = maxMs > minMs ? maxMs : minMs + DAY_MS;
|
|
16817
18137
|
const timelineWidth = Math.max(0, width - taskLabelWidth);
|
|
16818
18138
|
const rangeMs = safeMaxMs - minMs;
|
|
16819
18139
|
const xForTime = (time) => taskLabelWidth + (time - minMs) / rangeMs * timelineWidth;
|
|
16820
18140
|
const tasks = taskRanges.map(({ task, startMs, endMs }, index) => {
|
|
16821
18141
|
const x = xForTime(startMs);
|
|
16822
|
-
const
|
|
16823
|
-
const barWidth = Math.max(minBarWidth,
|
|
18142
|
+
const rawWidth2 = xForTime(endMs) - x;
|
|
18143
|
+
const barWidth = Math.max(minBarWidth, rawWidth2);
|
|
16824
18144
|
return {
|
|
16825
18145
|
id: task.id,
|
|
16826
18146
|
task,
|
|
@@ -16873,15 +18193,19 @@ function computeGanttLayout(data, options = {}) {
|
|
|
16873
18193
|
};
|
|
16874
18194
|
}
|
|
16875
18195
|
function createGanttTimelineTicks(minMs, maxMs, timelineWidth, taskLabelWidth, scale, formatter = formatGanttDate) {
|
|
18196
|
+
const safeMinMs = Number.isFinite(minMs) ? minMs : Date.now();
|
|
18197
|
+
const safeMaxMs = Number.isFinite(maxMs) && maxMs > safeMinMs ? maxMs : safeMinMs + DAY_MS;
|
|
18198
|
+
const safeTimelineWidth = Number.isFinite(timelineWidth) ? Math.max(0, timelineWidth) : 0;
|
|
18199
|
+
const safeTaskLabelWidth = Number.isFinite(taskLabelWidth) ? Math.max(0, taskLabelWidth) : 0;
|
|
16876
18200
|
const ticks = [];
|
|
16877
|
-
const rangeMs = Math.max(DAY_MS,
|
|
16878
|
-
let current = startOfTick(new Date(
|
|
16879
|
-
while (current.getTime() <=
|
|
18201
|
+
const rangeMs = Math.max(DAY_MS, safeMaxMs - safeMinMs);
|
|
18202
|
+
let current = startOfTick(new Date(safeMinMs), scale);
|
|
18203
|
+
while (current.getTime() <= safeMaxMs) {
|
|
16880
18204
|
const currentMs = current.getTime();
|
|
16881
|
-
if (currentMs >=
|
|
18205
|
+
if (currentMs >= safeMinMs) {
|
|
16882
18206
|
ticks.push({
|
|
16883
18207
|
value: new Date(currentMs),
|
|
16884
|
-
x:
|
|
18208
|
+
x: safeTaskLabelWidth + (currentMs - safeMinMs) / rangeMs * safeTimelineWidth,
|
|
16885
18209
|
label: formatter(new Date(currentMs), scale)
|
|
16886
18210
|
});
|
|
16887
18211
|
}
|
|
@@ -16889,8 +18213,8 @@ function createGanttTimelineTicks(minMs, maxMs, timelineWidth, taskLabelWidth, s
|
|
|
16889
18213
|
if (ticks.length > 64) break;
|
|
16890
18214
|
}
|
|
16891
18215
|
if (ticks.length === 0) {
|
|
16892
|
-
const date = new Date(
|
|
16893
|
-
ticks.push({ value: date, x:
|
|
18216
|
+
const date = new Date(safeMinMs);
|
|
18217
|
+
ticks.push({ value: date, x: safeTaskLabelWidth, label: formatter(date, scale) });
|
|
16894
18218
|
}
|
|
16895
18219
|
return ticks;
|
|
16896
18220
|
}
|
|
@@ -17177,6 +18501,7 @@ function getChartSvgDataUrl(svg) {
|
|
|
17177
18501
|
return `data:image/svg+xml;charset=utf-8,${encodeURIComponent(serializeChartSvg(svg))}`;
|
|
17178
18502
|
}
|
|
17179
18503
|
function downloadChartSvg(svg, filename = "chart") {
|
|
18504
|
+
if (!isBrowser()) return;
|
|
17180
18505
|
downloadChartBlob(
|
|
17181
18506
|
new Blob([serializeChartSvg(svg)], { type: "image/svg+xml;charset=utf-8" }),
|
|
17182
18507
|
`${filename}.svg`
|
|
@@ -17216,6 +18541,7 @@ async function exportChartPng(svg, options = {}) {
|
|
|
17216
18541
|
});
|
|
17217
18542
|
}
|
|
17218
18543
|
async function downloadChartPng(svg, options = {}) {
|
|
18544
|
+
if (!isBrowser()) return;
|
|
17219
18545
|
const blob = await exportChartPng(svg, options);
|
|
17220
18546
|
downloadChartBlob(blob, `${options.filename ?? "chart"}.png`);
|
|
17221
18547
|
}
|
|
@@ -17286,16 +18612,16 @@ var imageViewerNavBtnClasses = "fixed top-1/2 -translate-y-1/2 z-50 p-3 text-whi
|
|
|
17286
18612
|
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";
|
|
17287
18613
|
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";
|
|
17288
18614
|
var imageViewerIcons = {
|
|
17289
|
-
zoomIn:
|
|
17290
|
-
zoomOut:
|
|
18615
|
+
zoomIn: zoomInIconPath,
|
|
18616
|
+
zoomOut: zoomOutIconPath,
|
|
17291
18617
|
rotateLeft: "M3 10h7V3M21 14h-7v7M16.7 7.3A8 8 0 004.1 9.9M7.3 16.7A8 8 0 0019.9 14.1",
|
|
17292
18618
|
rotateRight: "M14 10h7V3M10 14H3v7M7.3 7.3A8 8 0 0119.9 9.9M16.7 16.7A8 8 0 014.1 14.1",
|
|
17293
|
-
close:
|
|
17294
|
-
prev:
|
|
17295
|
-
next:
|
|
18619
|
+
close: previewCloseIconPath,
|
|
18620
|
+
prev: prevIconPath,
|
|
18621
|
+
next: nextIconPath
|
|
17296
18622
|
};
|
|
17297
18623
|
function clampZoom(zoom, min, max) {
|
|
17298
|
-
return
|
|
18624
|
+
return clampScale(zoom, min, max);
|
|
17299
18625
|
}
|
|
17300
18626
|
function normalizeRotation(rotation) {
|
|
17301
18627
|
return (rotation % 360 + 360) % 360;
|
|
@@ -17329,24 +18655,19 @@ function movePan(pan, clientX, clientY) {
|
|
|
17329
18655
|
translateY: pan.startTranslateY + (clientY - pan.startY)
|
|
17330
18656
|
};
|
|
17331
18657
|
}
|
|
17332
|
-
function touchDistance(t1, t2) {
|
|
17333
|
-
const dx = t1.clientX - t2.clientX;
|
|
17334
|
-
const dy = t1.clientY - t2.clientY;
|
|
17335
|
-
return Math.sqrt(dx * dx + dy * dy);
|
|
17336
|
-
}
|
|
17337
18658
|
function createPinchState() {
|
|
17338
18659
|
return { isPinching: false, initialDistance: 0, initialScale: 1 };
|
|
17339
18660
|
}
|
|
17340
18661
|
function startPinch(t1, t2, currentScale) {
|
|
17341
18662
|
return {
|
|
17342
18663
|
isPinching: true,
|
|
17343
|
-
initialDistance:
|
|
18664
|
+
initialDistance: getTouchDistance(t1, t2),
|
|
17344
18665
|
initialScale: currentScale
|
|
17345
18666
|
};
|
|
17346
18667
|
}
|
|
17347
18668
|
function movePinch(pinch, t1, t2, minZoom, maxZoom) {
|
|
17348
18669
|
if (pinch.initialDistance === 0) return pinch.initialScale;
|
|
17349
|
-
const currentDistance =
|
|
18670
|
+
const currentDistance = getTouchDistance(t1, t2);
|
|
17350
18671
|
const ratio = currentDistance / pinch.initialDistance;
|
|
17351
18672
|
return clampZoom(pinch.initialScale * ratio, minZoom, maxZoom);
|
|
17352
18673
|
}
|
|
@@ -17392,7 +18713,7 @@ async function getCropperResult(cropper) {
|
|
|
17392
18713
|
return await cropper.getCropResult();
|
|
17393
18714
|
}
|
|
17394
18715
|
|
|
17395
|
-
// src/theme/checkbox.ts
|
|
18716
|
+
// src/theme-runtime/checkbox.ts
|
|
17396
18717
|
var checkboxSizeClasses2 = {
|
|
17397
18718
|
sm: "w-4 h-4",
|
|
17398
18719
|
md: "w-5 h-5",
|
|
@@ -17417,7 +18738,7 @@ function getCheckboxLabelClasses(size = "md", disabled = false) {
|
|
|
17417
18738
|
return [baseClasses2, sizeClass, disabledClasses].filter(Boolean).join(" ");
|
|
17418
18739
|
}
|
|
17419
18740
|
|
|
17420
|
-
// src/theme/switch.ts
|
|
18741
|
+
// src/theme-runtime/switch.ts
|
|
17421
18742
|
var switchBaseClasses = "relative inline-flex items-center rounded-full transition-all duration-150 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-[0.98]";
|
|
17422
18743
|
var switchSizeClasses = {
|
|
17423
18744
|
sm: "h-5 w-9",
|
|
@@ -17452,7 +18773,7 @@ function getSwitchThumbClasses(size = "md", checked = false) {
|
|
|
17452
18773
|
return classNames(baseClasses2, sizeClass, translateClass);
|
|
17453
18774
|
}
|
|
17454
18775
|
|
|
17455
|
-
// src/theme/slider.ts
|
|
18776
|
+
// src/theme-runtime/slider.ts
|
|
17456
18777
|
var sliderBaseClasses = "relative w-full";
|
|
17457
18778
|
var sliderTrackClasses = "bg-[var(--tiger-border,#e5e7eb)] rounded-full";
|
|
17458
18779
|
var sliderRangeClasses = "bg-[var(--tiger-primary,#2563eb)] rounded-full absolute h-full";
|
|
@@ -17491,7 +18812,7 @@ function getSliderTooltipClasses(size = "md") {
|
|
|
17491
18812
|
return [sliderTooltipClasses, sizeClass].filter(Boolean).join(" ");
|
|
17492
18813
|
}
|
|
17493
18814
|
|
|
17494
|
-
// src/theme/index.ts
|
|
18815
|
+
// src/theme-runtime/index.ts
|
|
17495
18816
|
var THEME_CSS_VARS = {
|
|
17496
18817
|
// Primary colors
|
|
17497
18818
|
primary: "--tiger-primary",
|
|
@@ -17729,78 +19050,108 @@ var MODERN_REDUCED_MOTION_TOKENS = {
|
|
|
17729
19050
|
"--tiger-transition-emphasized": "transform 0ms linear"
|
|
17730
19051
|
};
|
|
17731
19052
|
|
|
17732
|
-
// src/
|
|
17733
|
-
var
|
|
17734
|
-
|
|
17735
|
-
|
|
17736
|
-
|
|
17737
|
-
|
|
17738
|
-
|
|
17739
|
-
|
|
17740
|
-
|
|
17741
|
-
|
|
17742
|
-
|
|
17743
|
-
|
|
17744
|
-
|
|
17745
|
-
|
|
17746
|
-
|
|
17747
|
-
|
|
17748
|
-
|
|
17749
|
-
|
|
17750
|
-
|
|
17751
|
-
|
|
17752
|
-
|
|
17753
|
-
|
|
17754
|
-
|
|
17755
|
-
|
|
17756
|
-
|
|
17757
|
-
|
|
17758
|
-
|
|
17759
|
-
|
|
17760
|
-
|
|
17761
|
-
|
|
17762
|
-
|
|
17763
|
-
|
|
17764
|
-
|
|
17765
|
-
|
|
17766
|
-
|
|
17767
|
-
|
|
17768
|
-
|
|
17769
|
-
|
|
17770
|
-
|
|
17771
|
-
|
|
17772
|
-
|
|
17773
|
-
|
|
17774
|
-
|
|
17775
|
-
|
|
17776
|
-
|
|
17777
|
-
|
|
17778
|
-
|
|
17779
|
-
|
|
17780
|
-
|
|
17781
|
-
|
|
17782
|
-
|
|
17783
|
-
|
|
17784
|
-
|
|
17785
|
-
|
|
17786
|
-
|
|
17787
|
-
|
|
17788
|
-
|
|
17789
|
-
|
|
17790
|
-
|
|
17791
|
-
|
|
17792
|
-
|
|
17793
|
-
|
|
17794
|
-
|
|
17795
|
-
|
|
17796
|
-
|
|
17797
|
-
|
|
17798
|
-
|
|
17799
|
-
|
|
17800
|
-
|
|
17801
|
-
|
|
17802
|
-
|
|
19053
|
+
// src/themes/default/theme.ts
|
|
19054
|
+
var defaultThemeLightColors = {
|
|
19055
|
+
primary: "#2563eb",
|
|
19056
|
+
primaryHover: "#1d4ed8",
|
|
19057
|
+
primaryActive: "#1e40af",
|
|
19058
|
+
primaryDisabled: "#93c5fd",
|
|
19059
|
+
secondary: "#4b5563",
|
|
19060
|
+
secondaryHover: "#374151",
|
|
19061
|
+
secondaryActive: "#1f2937",
|
|
19062
|
+
secondaryDisabled: "#9ca3af",
|
|
19063
|
+
outlineBgHover: "#eff6ff",
|
|
19064
|
+
ghostBgHover: "#eff6ff",
|
|
19065
|
+
focusRing: "#2563eb",
|
|
19066
|
+
surface: "#ffffff",
|
|
19067
|
+
surfaceMuted: "#f9fafb",
|
|
19068
|
+
surfaceRaised: "#ffffff",
|
|
19069
|
+
text: "#111827",
|
|
19070
|
+
textSecondary: "#6b7280",
|
|
19071
|
+
textDisabled: "#d1d5db",
|
|
19072
|
+
border: "#e5e7eb",
|
|
19073
|
+
borderStrong: "#9ca3af",
|
|
19074
|
+
success: "#16a34a",
|
|
19075
|
+
warning: "#d97706",
|
|
19076
|
+
error: "#dc2626",
|
|
19077
|
+
info: "#3b82f6",
|
|
19078
|
+
chart1: "#2563eb",
|
|
19079
|
+
chart2: "#16a34a",
|
|
19080
|
+
chart3: "#d97706",
|
|
19081
|
+
chart4: "#a855f7",
|
|
19082
|
+
chart5: "#0ea5e9",
|
|
19083
|
+
chart6: "#ef4444"
|
|
19084
|
+
};
|
|
19085
|
+
var defaultThemeDarkColors = {
|
|
19086
|
+
primary: "#60a5fa",
|
|
19087
|
+
primaryHover: "#93c5fd",
|
|
19088
|
+
primaryActive: "#bfdbfe",
|
|
19089
|
+
primaryDisabled: "#1e40af",
|
|
19090
|
+
secondary: "#9ca3af",
|
|
19091
|
+
secondaryHover: "#d1d5db",
|
|
19092
|
+
secondaryActive: "#e5e7eb",
|
|
19093
|
+
secondaryDisabled: "#4b5563",
|
|
19094
|
+
outlineBgHover: "#1e3a5f",
|
|
19095
|
+
ghostBgHover: "#1e3a5f",
|
|
19096
|
+
focusRing: "#60a5fa",
|
|
19097
|
+
surface: "#111827",
|
|
19098
|
+
surfaceMuted: "#1f2937",
|
|
19099
|
+
surfaceRaised: "#1f2937",
|
|
19100
|
+
text: "#f9fafb",
|
|
19101
|
+
textSecondary: "#d1d5db",
|
|
19102
|
+
textDisabled: "#4b5563",
|
|
19103
|
+
border: "#374151",
|
|
19104
|
+
borderStrong: "#6b7280",
|
|
19105
|
+
success: "#4ade80",
|
|
19106
|
+
warning: "#fbbf24",
|
|
19107
|
+
error: "#f87171",
|
|
19108
|
+
info: "#60a5fa",
|
|
19109
|
+
chart1: "#60a5fa",
|
|
19110
|
+
chart2: "#4ade80",
|
|
19111
|
+
chart3: "#fbbf24",
|
|
19112
|
+
chart4: "#c084fc",
|
|
19113
|
+
chart5: "#38bdf8",
|
|
19114
|
+
chart6: "#f87171"
|
|
19115
|
+
};
|
|
19116
|
+
var defaultTheme = {
|
|
19117
|
+
name: "default",
|
|
19118
|
+
label: "Default",
|
|
19119
|
+
light: {
|
|
19120
|
+
colors: defaultThemeLightColors,
|
|
19121
|
+
radius: { sm: "4px", md: "6px", lg: "10px", xl: "14px", none: "0", full: "9999px" },
|
|
19122
|
+
shadows: {
|
|
19123
|
+
xs: "0 1px 2px 0 rgba(0,0,0,0.05)",
|
|
19124
|
+
sm: "0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px -1px rgba(0,0,0,0.1)",
|
|
19125
|
+
md: "0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1)",
|
|
19126
|
+
lg: "0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1)",
|
|
19127
|
+
xl: "0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1)"
|
|
19128
|
+
}
|
|
19129
|
+
},
|
|
19130
|
+
dark: {
|
|
19131
|
+
colors: defaultThemeDarkColors,
|
|
19132
|
+
shadows: {
|
|
19133
|
+
xs: "0 1px 2px 0 rgba(0,0,0,0.2)",
|
|
19134
|
+
sm: "0 1px 3px 0 rgba(0,0,0,0.3), 0 1px 2px -1px rgba(0,0,0,0.25)",
|
|
19135
|
+
md: "0 4px 6px -1px rgba(0,0,0,0.3), 0 2px 4px -2px rgba(0,0,0,0.25)",
|
|
19136
|
+
lg: "0 10px 15px -3px rgba(0,0,0,0.3), 0 4px 6px -4px rgba(0,0,0,0.25)",
|
|
19137
|
+
xl: "0 20px 25px -5px rgba(0,0,0,0.3), 0 8px 10px -6px rgba(0,0,0,0.25)"
|
|
19138
|
+
}
|
|
19139
|
+
}
|
|
17803
19140
|
};
|
|
19141
|
+
|
|
19142
|
+
// src/tailwind-plugin.ts
|
|
19143
|
+
function presetToVars(colors) {
|
|
19144
|
+
const vars = {};
|
|
19145
|
+
for (const [key, value] of Object.entries(colors)) {
|
|
19146
|
+
const varName = THEME_CSS_VARS[key];
|
|
19147
|
+
if (varName && value) {
|
|
19148
|
+
vars[varName] = value;
|
|
19149
|
+
}
|
|
19150
|
+
}
|
|
19151
|
+
return vars;
|
|
19152
|
+
}
|
|
19153
|
+
var tigercatTheme = presetToVars(defaultThemeLightColors);
|
|
19154
|
+
var tigercatDarkTheme = presetToVars(defaultThemeDarkColors);
|
|
17804
19155
|
var tigercatDirectionBase = {
|
|
17805
19156
|
'[dir="rtl"] .tiger-rtl-mirror, [data-tiger-dir="rtl"] .tiger-rtl-mirror': {
|
|
17806
19157
|
transform: "scaleX(-1)"
|
|
@@ -17839,16 +19190,6 @@ var tigercatPlugin = (0, import_plugin.default)(function({ addBase }) {
|
|
|
17839
19190
|
...tigercatReducedMotionBase
|
|
17840
19191
|
});
|
|
17841
19192
|
});
|
|
17842
|
-
function presetToVars(colors) {
|
|
17843
|
-
const vars = {};
|
|
17844
|
-
for (const [key, value] of Object.entries(colors)) {
|
|
17845
|
-
const varName = THEME_CSS_VARS[key];
|
|
17846
|
-
if (varName && value) {
|
|
17847
|
-
vars[varName] = value;
|
|
17848
|
-
}
|
|
17849
|
-
}
|
|
17850
|
-
return vars;
|
|
17851
|
-
}
|
|
17852
19193
|
function createTigercatPlugin(options = {}) {
|
|
17853
19194
|
return (0, import_plugin.default)(function({ addBase }) {
|
|
17854
19195
|
const preset = options.preset;
|
|
@@ -17873,18 +19214,77 @@ function createTigercatPlugin(options = {}) {
|
|
|
17873
19214
|
}
|
|
17874
19215
|
|
|
17875
19216
|
// src/themes/manager.ts
|
|
17876
|
-
|
|
19217
|
+
var THEME_CONFIG_CSS_VARS = {
|
|
19218
|
+
typography: {
|
|
19219
|
+
fontFamily: "--tiger-font-family",
|
|
19220
|
+
fontFamilyMono: "--tiger-font-family-mono",
|
|
19221
|
+
fontSizeBase: "--tiger-font-size-base",
|
|
19222
|
+
fontSizeSm: "--tiger-font-size-sm",
|
|
19223
|
+
fontSizeLg: "--tiger-font-size-lg",
|
|
19224
|
+
fontWeightNormal: "--tiger-font-weight-normal",
|
|
19225
|
+
fontWeightMedium: "--tiger-font-weight-medium",
|
|
19226
|
+
fontWeightSemibold: "--tiger-font-weight-semibold",
|
|
19227
|
+
fontWeightBold: "--tiger-font-weight-bold",
|
|
19228
|
+
lineHeightNormal: "--tiger-line-height-normal",
|
|
19229
|
+
lineHeightTight: "--tiger-line-height-tight"
|
|
19230
|
+
},
|
|
19231
|
+
radius: {
|
|
19232
|
+
none: "--tiger-radius-none",
|
|
19233
|
+
sm: "--tiger-radius-sm",
|
|
19234
|
+
md: "--tiger-radius-md",
|
|
19235
|
+
lg: "--tiger-radius-lg",
|
|
19236
|
+
xl: "--tiger-radius-xl",
|
|
19237
|
+
full: "--tiger-radius-full"
|
|
19238
|
+
},
|
|
19239
|
+
shadows: {
|
|
19240
|
+
xs: "--tiger-shadow-xs",
|
|
19241
|
+
sm: "--tiger-shadow-sm",
|
|
19242
|
+
md: "--tiger-shadow-md",
|
|
19243
|
+
lg: "--tiger-shadow-lg",
|
|
19244
|
+
xl: "--tiger-shadow-xl"
|
|
19245
|
+
},
|
|
19246
|
+
spacing: {
|
|
19247
|
+
xs: "--tiger-spacing-xs",
|
|
19248
|
+
sm: "--tiger-spacing-sm",
|
|
19249
|
+
md: "--tiger-spacing-md",
|
|
19250
|
+
lg: "--tiger-spacing-lg",
|
|
19251
|
+
xl: "--tiger-spacing-xl"
|
|
19252
|
+
},
|
|
19253
|
+
motion: {
|
|
19254
|
+
durationFast: "--tiger-duration-fast",
|
|
19255
|
+
durationBase: "--tiger-duration-base",
|
|
19256
|
+
durationSlow: "--tiger-duration-slow",
|
|
19257
|
+
easing: "--tiger-easing"
|
|
19258
|
+
}
|
|
19259
|
+
};
|
|
19260
|
+
function themeConfigToCssVars(config) {
|
|
17877
19261
|
const vars = {};
|
|
17878
|
-
|
|
17879
|
-
const
|
|
17880
|
-
|
|
17881
|
-
vars[varName] = value;
|
|
19262
|
+
if (config.colors) {
|
|
19263
|
+
for (const [key, value] of Object.entries(config.colors)) {
|
|
19264
|
+
const varName = THEME_CSS_VARS[key];
|
|
19265
|
+
if (varName && value) vars[varName] = value;
|
|
17882
19266
|
}
|
|
17883
19267
|
}
|
|
17884
|
-
|
|
19268
|
+
for (const section of ["typography", "radius", "shadows", "spacing", "motion"]) {
|
|
19269
|
+
const values = config[section];
|
|
19270
|
+
if (!values) continue;
|
|
19271
|
+
const varNames = THEME_CONFIG_CSS_VARS[section];
|
|
19272
|
+
for (const [key, value] of Object.entries(values)) {
|
|
19273
|
+
const varName = varNames[key];
|
|
19274
|
+
if (varName && value) vars[varName] = value;
|
|
19275
|
+
}
|
|
19276
|
+
}
|
|
19277
|
+
return vars;
|
|
17885
19278
|
}
|
|
17886
|
-
function
|
|
17887
|
-
removeCssVarsCached(target,
|
|
19279
|
+
function clearThemeConfig(target) {
|
|
19280
|
+
removeCssVarsCached(target, [
|
|
19281
|
+
...Object.values(THEME_CSS_VARS),
|
|
19282
|
+
...Object.values(THEME_CONFIG_CSS_VARS.typography),
|
|
19283
|
+
...Object.values(THEME_CONFIG_CSS_VARS.radius),
|
|
19284
|
+
...Object.values(THEME_CONFIG_CSS_VARS.shadows),
|
|
19285
|
+
...Object.values(THEME_CONFIG_CSS_VARS.spacing),
|
|
19286
|
+
...Object.values(THEME_CONFIG_CSS_VARS.motion)
|
|
19287
|
+
]);
|
|
17888
19288
|
}
|
|
17889
19289
|
function resolveSystemDark() {
|
|
17890
19290
|
if (!isBrowser()) return false;
|
|
@@ -17981,12 +19381,10 @@ var ThemeManagerImpl = class {
|
|
|
17981
19381
|
if (!isBrowser()) return;
|
|
17982
19382
|
const root = document.documentElement;
|
|
17983
19383
|
const preset = this.presets.get(this.currentThemeName);
|
|
17984
|
-
|
|
19384
|
+
clearThemeConfig(root);
|
|
17985
19385
|
if (preset) {
|
|
17986
19386
|
const config = this.resolvedDark ? preset.dark : preset.light;
|
|
17987
|
-
|
|
17988
|
-
applyColors(config.colors, root);
|
|
17989
|
-
}
|
|
19387
|
+
setCssVarsCached(root, themeConfigToCssVars(config));
|
|
17990
19388
|
}
|
|
17991
19389
|
if (this.resolvedDark) {
|
|
17992
19390
|
root.classList.add("dark");
|
|
@@ -18025,93 +19423,6 @@ var ThemeManagerImpl = class {
|
|
|
18025
19423
|
};
|
|
18026
19424
|
var ThemeManager = new ThemeManagerImpl();
|
|
18027
19425
|
|
|
18028
|
-
// src/themes/default/theme.ts
|
|
18029
|
-
var defaultTheme = {
|
|
18030
|
-
name: "default",
|
|
18031
|
-
label: "Default",
|
|
18032
|
-
light: {
|
|
18033
|
-
colors: {
|
|
18034
|
-
primary: "#2563eb",
|
|
18035
|
-
primaryHover: "#1d4ed8",
|
|
18036
|
-
primaryActive: "#1e40af",
|
|
18037
|
-
primaryDisabled: "#93c5fd",
|
|
18038
|
-
secondary: "#4b5563",
|
|
18039
|
-
secondaryHover: "#374151",
|
|
18040
|
-
secondaryActive: "#1f2937",
|
|
18041
|
-
secondaryDisabled: "#9ca3af",
|
|
18042
|
-
outlineBgHover: "#eff6ff",
|
|
18043
|
-
ghostBgHover: "#eff6ff",
|
|
18044
|
-
focusRing: "#2563eb",
|
|
18045
|
-
surface: "#ffffff",
|
|
18046
|
-
surfaceMuted: "#f9fafb",
|
|
18047
|
-
surfaceRaised: "#ffffff",
|
|
18048
|
-
text: "#111827",
|
|
18049
|
-
textSecondary: "#6b7280",
|
|
18050
|
-
textDisabled: "#d1d5db",
|
|
18051
|
-
border: "#e5e7eb",
|
|
18052
|
-
borderStrong: "#9ca3af",
|
|
18053
|
-
success: "#16a34a",
|
|
18054
|
-
warning: "#d97706",
|
|
18055
|
-
error: "#dc2626",
|
|
18056
|
-
info: "#3b82f6",
|
|
18057
|
-
chart1: "#2563eb",
|
|
18058
|
-
chart2: "#16a34a",
|
|
18059
|
-
chart3: "#d97706",
|
|
18060
|
-
chart4: "#a855f7",
|
|
18061
|
-
chart5: "#0ea5e9",
|
|
18062
|
-
chart6: "#ef4444"
|
|
18063
|
-
},
|
|
18064
|
-
radius: { sm: "4px", md: "6px", lg: "10px", xl: "14px", none: "0", full: "9999px" },
|
|
18065
|
-
shadows: {
|
|
18066
|
-
xs: "0 1px 2px 0 rgba(0,0,0,0.05)",
|
|
18067
|
-
sm: "0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px -1px rgba(0,0,0,0.1)",
|
|
18068
|
-
md: "0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1)",
|
|
18069
|
-
lg: "0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1)",
|
|
18070
|
-
xl: "0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1)"
|
|
18071
|
-
}
|
|
18072
|
-
},
|
|
18073
|
-
dark: {
|
|
18074
|
-
colors: {
|
|
18075
|
-
primary: "#60a5fa",
|
|
18076
|
-
primaryHover: "#93c5fd",
|
|
18077
|
-
primaryActive: "#bfdbfe",
|
|
18078
|
-
primaryDisabled: "#1e40af",
|
|
18079
|
-
secondary: "#9ca3af",
|
|
18080
|
-
secondaryHover: "#d1d5db",
|
|
18081
|
-
secondaryActive: "#e5e7eb",
|
|
18082
|
-
secondaryDisabled: "#4b5563",
|
|
18083
|
-
outlineBgHover: "#1e3a5f",
|
|
18084
|
-
ghostBgHover: "#1e3a5f",
|
|
18085
|
-
focusRing: "#60a5fa",
|
|
18086
|
-
surface: "#111827",
|
|
18087
|
-
surfaceMuted: "#1f2937",
|
|
18088
|
-
surfaceRaised: "#1f2937",
|
|
18089
|
-
text: "#f9fafb",
|
|
18090
|
-
textSecondary: "#d1d5db",
|
|
18091
|
-
textDisabled: "#4b5563",
|
|
18092
|
-
border: "#374151",
|
|
18093
|
-
borderStrong: "#6b7280",
|
|
18094
|
-
success: "#4ade80",
|
|
18095
|
-
warning: "#fbbf24",
|
|
18096
|
-
error: "#f87171",
|
|
18097
|
-
info: "#60a5fa",
|
|
18098
|
-
chart1: "#60a5fa",
|
|
18099
|
-
chart2: "#4ade80",
|
|
18100
|
-
chart3: "#fbbf24",
|
|
18101
|
-
chart4: "#c084fc",
|
|
18102
|
-
chart5: "#38bdf8",
|
|
18103
|
-
chart6: "#f87171"
|
|
18104
|
-
},
|
|
18105
|
-
shadows: {
|
|
18106
|
-
xs: "0 1px 2px 0 rgba(0,0,0,0.2)",
|
|
18107
|
-
sm: "0 1px 3px 0 rgba(0,0,0,0.3), 0 1px 2px -1px rgba(0,0,0,0.25)",
|
|
18108
|
-
md: "0 4px 6px -1px rgba(0,0,0,0.3), 0 2px 4px -2px rgba(0,0,0,0.25)",
|
|
18109
|
-
lg: "0 10px 15px -3px rgba(0,0,0,0.3), 0 4px 6px -4px rgba(0,0,0,0.25)",
|
|
18110
|
-
xl: "0 20px 25px -5px rgba(0,0,0,0.3), 0 8px 10px -6px rgba(0,0,0,0.25)"
|
|
18111
|
-
}
|
|
18112
|
-
}
|
|
18113
|
-
};
|
|
18114
|
-
|
|
18115
19426
|
// src/themes/vibrant/theme.ts
|
|
18116
19427
|
var vibrantTheme = {
|
|
18117
19428
|
name: "vibrant",
|
|
@@ -19054,7 +20365,7 @@ var designTokens = {
|
|
|
19054
20365
|
};
|
|
19055
20366
|
|
|
19056
20367
|
// src/index.ts
|
|
19057
|
-
var version = "1.
|
|
20368
|
+
var version = "1.5.0";
|
|
19058
20369
|
// Annotate the CommonJS export names for ESM import in node:
|
|
19059
20370
|
0 && (module.exports = {
|
|
19060
20371
|
ANIMATION_DURATION_FAST_MS,
|
|
@@ -19069,15 +20380,26 @@ var version = "1.2.0";
|
|
|
19069
20380
|
ChevronRightIconPath,
|
|
19070
20381
|
ClockIconPath,
|
|
19071
20382
|
CloseIconPath,
|
|
20383
|
+
DEFAULT_CALENDAR_LABELS,
|
|
19072
20384
|
DEFAULT_CHART_COLORS,
|
|
20385
|
+
DEFAULT_FILE_MANAGER_LABELS,
|
|
20386
|
+
DEFAULT_FORM_VALIDATION_LABELS,
|
|
19073
20387
|
DEFAULT_FORM_WIZARD_LABELS,
|
|
19074
20388
|
DEFAULT_HEATMAP_CANVAS_THRESHOLD,
|
|
20389
|
+
DEFAULT_IMAGE_EDITOR_LABELS,
|
|
20390
|
+
DEFAULT_IMAGE_VIEWER_LABELS,
|
|
19075
20391
|
DEFAULT_PAGINATION_LABELS,
|
|
20392
|
+
DEFAULT_STATUS_LABELS,
|
|
19076
20393
|
DEFAULT_TABLE_LABELS,
|
|
19077
20394
|
DEFAULT_TASK_BOARD_LABELS,
|
|
20395
|
+
DEFAULT_TIME_PICKER_LABELS,
|
|
20396
|
+
DEFAULT_TOUR_LABELS,
|
|
19078
20397
|
DEFAULT_UPLOAD_CHUNK_SIZE,
|
|
20398
|
+
DEFAULT_UPLOAD_LABELS,
|
|
19079
20399
|
DONUT_BASE_SHADOW,
|
|
19080
20400
|
DONUT_EMPHASIS_SHADOW,
|
|
20401
|
+
DONUT_ENTRANCE_CLASS,
|
|
20402
|
+
DONUT_ENTRANCE_KEYFRAMES,
|
|
19081
20403
|
DROPDOWN_CHEVRON_PATH,
|
|
19082
20404
|
DROPDOWN_ENTER_CLASS,
|
|
19083
20405
|
DURATION_CLASS,
|
|
@@ -19107,6 +20429,7 @@ var version = "1.2.0";
|
|
|
19107
20429
|
POPOVER_TEXT_CLASSES,
|
|
19108
20430
|
POPOVER_TITLE_CLASSES,
|
|
19109
20431
|
RADAR_SPLIT_AREA_COLORS,
|
|
20432
|
+
RESIZE_KEYBOARD_STEP,
|
|
19110
20433
|
SCATTER_ENTRANCE_CLASS,
|
|
19111
20434
|
SCATTER_ENTRANCE_KEYFRAMES,
|
|
19112
20435
|
SHAKE_CLASS,
|
|
@@ -19121,6 +20444,7 @@ var version = "1.2.0";
|
|
|
19121
20444
|
SVG_PATH_ANIMATION_CSS,
|
|
19122
20445
|
TABLE_AUTO_VIRTUAL_THRESHOLD,
|
|
19123
20446
|
TABLE_VIRTUAL_RECOMMENDATION_THRESHOLD,
|
|
20447
|
+
THEME_CONFIG_CSS_VARS,
|
|
19124
20448
|
THEME_CSS_VARS,
|
|
19125
20449
|
TIGER_BREAKPOINT_CSS_VALUES,
|
|
19126
20450
|
TIGER_VIEWPORT_BREAKPOINTS,
|
|
@@ -19132,11 +20456,20 @@ var version = "1.2.0";
|
|
|
19132
20456
|
TimePickerCloseIconPath,
|
|
19133
20457
|
VIEW_TRANSITION_CSS,
|
|
19134
20458
|
WEEKDAYS,
|
|
20459
|
+
ZH_CN_CALENDAR_LABELS,
|
|
19135
20460
|
ZH_CN_DATEPICKER_LOCALE,
|
|
20461
|
+
ZH_CN_FILE_MANAGER_LABELS,
|
|
20462
|
+
ZH_CN_FORM_VALIDATION_LABELS,
|
|
19136
20463
|
ZH_CN_FORM_WIZARD_LABELS,
|
|
20464
|
+
ZH_CN_IMAGE_EDITOR_LABELS,
|
|
20465
|
+
ZH_CN_IMAGE_VIEWER_LABELS,
|
|
19137
20466
|
ZH_CN_PAGINATION_LABELS,
|
|
20467
|
+
ZH_CN_STATUS_LABELS,
|
|
19138
20468
|
ZH_CN_TABLE_LABELS,
|
|
19139
20469
|
ZH_CN_TASK_BOARD_LABELS,
|
|
20470
|
+
ZH_CN_TIME_PICKER_LABELS,
|
|
20471
|
+
ZH_CN_TOUR_LABELS,
|
|
20472
|
+
ZH_CN_UPLOAD_LABELS,
|
|
19140
20473
|
activeOpacityClasses,
|
|
19141
20474
|
activePressClasses,
|
|
19142
20475
|
activityItemActionsClasses,
|
|
@@ -19146,6 +20479,9 @@ var version = "1.2.0";
|
|
|
19146
20479
|
activityItemHeaderClasses,
|
|
19147
20480
|
activityItemLayoutClasses,
|
|
19148
20481
|
activityItemTitleGroupClasses,
|
|
20482
|
+
addDays,
|
|
20483
|
+
addMonths,
|
|
20484
|
+
addYears,
|
|
19149
20485
|
affixWrapperClasses,
|
|
19150
20486
|
alertBannerClasses,
|
|
19151
20487
|
alertBaseClasses,
|
|
@@ -19242,6 +20578,7 @@ var version = "1.2.0";
|
|
|
19242
20578
|
calculateResizeDelta,
|
|
19243
20579
|
calculateStepStatus,
|
|
19244
20580
|
calculateTransform,
|
|
20581
|
+
calculateVirtualColumnRange,
|
|
19245
20582
|
calculateVirtualRange,
|
|
19246
20583
|
calendarHeaderClasses,
|
|
19247
20584
|
calendarNavButtonClasses,
|
|
@@ -19293,6 +20630,7 @@ var version = "1.2.0";
|
|
|
19293
20630
|
chartCanvasBaseClasses,
|
|
19294
20631
|
chartGridLineClasses,
|
|
19295
20632
|
chartInteractiveClasses,
|
|
20633
|
+
chatStatusBarBaseClasses,
|
|
19296
20634
|
checkSolidIcon20PathD,
|
|
19297
20635
|
checkboxLabelSizeClasses,
|
|
19298
20636
|
checkboxSizeClasses,
|
|
@@ -19331,6 +20669,8 @@ var version = "1.2.0";
|
|
|
19331
20669
|
codeBlockCopyButtonBaseClasses,
|
|
19332
20670
|
codeBlockCopyButtonCopiedClasses,
|
|
19333
20671
|
codeBlockPreClasses,
|
|
20672
|
+
codeEditorActiveLineDarkClasses,
|
|
20673
|
+
codeEditorActiveLineLightClasses,
|
|
19334
20674
|
codeEditorBaseClasses,
|
|
19335
20675
|
codeEditorDarkClasses,
|
|
19336
20676
|
codeEditorDisabledClasses,
|
|
@@ -19425,6 +20765,7 @@ var version = "1.2.0";
|
|
|
19425
20765
|
createImageAnnotationBox,
|
|
19426
20766
|
createImageAnnotationPath,
|
|
19427
20767
|
createInfiniteScrollObserver,
|
|
20768
|
+
createInstanceCounter,
|
|
19428
20769
|
createLinePath,
|
|
19429
20770
|
createLinearScale,
|
|
19430
20771
|
createLongPressController,
|
|
@@ -19535,6 +20876,7 @@ var version = "1.2.0";
|
|
|
19535
20876
|
downloadCsv,
|
|
19536
20877
|
downloadExcel,
|
|
19537
20878
|
downloadTableExport,
|
|
20879
|
+
downsampleSeriesData,
|
|
19538
20880
|
drawSignatureStrokes,
|
|
19539
20881
|
dynamicSizeStrategy,
|
|
19540
20882
|
easeOutCubic,
|
|
@@ -19585,6 +20927,7 @@ var version = "1.2.0";
|
|
|
19585
20927
|
filterHiddenFiles,
|
|
19586
20928
|
filterMenuItems,
|
|
19587
20929
|
filterOptions,
|
|
20930
|
+
filterTableData,
|
|
19588
20931
|
filterTransferItems,
|
|
19589
20932
|
filterTreeNodes,
|
|
19590
20933
|
filterTreeSelectNodes,
|
|
@@ -19620,8 +20963,10 @@ var version = "1.2.0";
|
|
|
19620
20963
|
focusMenuEdge,
|
|
19621
20964
|
focusRingClasses,
|
|
19622
20965
|
focusRingInsetClasses,
|
|
20966
|
+
focusTimePickerOption,
|
|
19623
20967
|
formatActivityTime,
|
|
19624
20968
|
formatBadgeContent,
|
|
20969
|
+
formatBytes,
|
|
19625
20970
|
formatChatTime,
|
|
19626
20971
|
formatColorString,
|
|
19627
20972
|
formatCommentTime,
|
|
@@ -19631,6 +20976,7 @@ var version = "1.2.0";
|
|
|
19631
20976
|
formatFileSize,
|
|
19632
20977
|
formatFileSizeLabel,
|
|
19633
20978
|
formatGanttDate,
|
|
20979
|
+
formatInputNumberDisplay,
|
|
19634
20980
|
formatIntlNumber,
|
|
19635
20981
|
formatMonthYear,
|
|
19636
20982
|
formatPageAriaLabel,
|
|
@@ -19662,6 +21008,7 @@ var version = "1.2.0";
|
|
|
19662
21008
|
getAccessibleTransitionClasses,
|
|
19663
21009
|
getActiveElement,
|
|
19664
21010
|
getActiveIndex,
|
|
21011
|
+
getActiveLineIndex,
|
|
19665
21012
|
getActiveTourStepPosition,
|
|
19666
21013
|
getActiveTourSteps,
|
|
19667
21014
|
getAlertIconPath,
|
|
@@ -19699,6 +21046,7 @@ var version = "1.2.0";
|
|
|
19699
21046
|
getCalendarContainerClasses,
|
|
19700
21047
|
getCalendarDayClasses,
|
|
19701
21048
|
getCalendarDays,
|
|
21049
|
+
getCalendarLabels,
|
|
19702
21050
|
getCalendarMonthClasses,
|
|
19703
21051
|
getCalendarMonthDaysCacheSize,
|
|
19704
21052
|
getCardClasses,
|
|
@@ -19725,6 +21073,7 @@ var version = "1.2.0";
|
|
|
19725
21073
|
getChartSvgDataUrl,
|
|
19726
21074
|
getChartTooltipTransform,
|
|
19727
21075
|
getChatMessageStatusInfo,
|
|
21076
|
+
getChatStatusBarClasses,
|
|
19728
21077
|
getCheckboxCellClasses,
|
|
19729
21078
|
getCheckboxClasses,
|
|
19730
21079
|
getCheckboxLabelClasses,
|
|
@@ -19732,6 +21081,7 @@ var version = "1.2.0";
|
|
|
19732
21081
|
getCircleSize,
|
|
19733
21082
|
getCodeBlockContainerClasses,
|
|
19734
21083
|
getCodeBlockCopyButtonClasses,
|
|
21084
|
+
getCodeEditorActiveLineClasses,
|
|
19735
21085
|
getCodeEditorContainerClasses,
|
|
19736
21086
|
getColGutterClasses,
|
|
19737
21087
|
getColMergedStyleVars,
|
|
@@ -19766,6 +21116,8 @@ var version = "1.2.0";
|
|
|
19766
21116
|
getCropperResult,
|
|
19767
21117
|
getCurrentActiveTourStep,
|
|
19768
21118
|
getCurrentTime,
|
|
21119
|
+
getCyclicIndex,
|
|
21120
|
+
getDatePickerCalendarCellState,
|
|
19769
21121
|
getDatePickerDayCellClasses,
|
|
19770
21122
|
getDatePickerIconButtonClasses,
|
|
19771
21123
|
getDatePickerInputClasses,
|
|
@@ -19813,10 +21165,13 @@ var version = "1.2.0";
|
|
|
19813
21165
|
getFieldDependencies,
|
|
19814
21166
|
getFieldError,
|
|
19815
21167
|
getFileExtension,
|
|
21168
|
+
getFileExtensionName,
|
|
19816
21169
|
getFileItemClasses,
|
|
19817
21170
|
getFileListItemClasses,
|
|
19818
21171
|
getFileManagerContainerClasses,
|
|
21172
|
+
getFileManagerLabels,
|
|
19819
21173
|
getFirstDayOfMonth,
|
|
21174
|
+
getFirstVisibleChildKey,
|
|
19820
21175
|
getFixedColumnOffsets,
|
|
19821
21176
|
getFixedColumnPosition,
|
|
19822
21177
|
getFixedColumnStyle,
|
|
@@ -19832,6 +21187,7 @@ var version = "1.2.0";
|
|
|
19832
21187
|
getFormItemErrorClasses,
|
|
19833
21188
|
getFormItemFieldClasses,
|
|
19834
21189
|
getFormItemLabelClasses,
|
|
21190
|
+
getFormValidationLabels,
|
|
19835
21191
|
getFormWizardLabels,
|
|
19836
21192
|
getFunnelGradientPrefix,
|
|
19837
21193
|
getGanttDependencyPath,
|
|
@@ -19852,9 +21208,11 @@ var version = "1.2.0";
|
|
|
19852
21208
|
getImageAnnotationStrokeColor,
|
|
19853
21209
|
getImageAnnotationToolButtonClasses,
|
|
19854
21210
|
getImageAnnotationToolLabel,
|
|
21211
|
+
getImageEditorLabels,
|
|
19855
21212
|
getImageGroupClasses,
|
|
19856
21213
|
getImageImgClasses,
|
|
19857
21214
|
getImageTransformStyle,
|
|
21215
|
+
getImageViewerLabels,
|
|
19858
21216
|
getImmediateTigerLocale,
|
|
19859
21217
|
getInfiniteScrollContainerClasses,
|
|
19860
21218
|
getInitialCollapseContentStyle,
|
|
@@ -19911,6 +21269,7 @@ var version = "1.2.0";
|
|
|
19911
21269
|
getMenuItemClasses,
|
|
19912
21270
|
getMenuItemIndent,
|
|
19913
21271
|
getMenuItems,
|
|
21272
|
+
getMenuNavigationKeys,
|
|
19914
21273
|
getMessageIconPath,
|
|
19915
21274
|
getMessageTypeClasses,
|
|
19916
21275
|
getModalContainerClasses,
|
|
@@ -19921,6 +21280,7 @@ var version = "1.2.0";
|
|
|
19921
21280
|
getNextColorSwatchIndex,
|
|
19922
21281
|
getNextImageAnnotationTool,
|
|
19923
21282
|
getNextSlideIndex,
|
|
21283
|
+
getNextTableSelectAllKeys,
|
|
19924
21284
|
getNotificationIconPath,
|
|
19925
21285
|
getNotificationTypeClasses,
|
|
19926
21286
|
getNumberExtent,
|
|
@@ -19993,6 +21353,8 @@ var version = "1.2.0";
|
|
|
19993
21353
|
getRadioVisualClasses,
|
|
19994
21354
|
getRateStarClasses,
|
|
19995
21355
|
getResizableHandleClasses,
|
|
21356
|
+
getResizeHandleOrientation,
|
|
21357
|
+
getResizeKeyboardDelta,
|
|
19996
21358
|
getResultColorScheme,
|
|
19997
21359
|
getResultHttpLabel,
|
|
19998
21360
|
getResultIconPath,
|
|
@@ -20022,6 +21384,7 @@ var version = "1.2.0";
|
|
|
20022
21384
|
getSelectOptionClasses,
|
|
20023
21385
|
getSelectSizeClasses,
|
|
20024
21386
|
getSelectTriggerClasses,
|
|
21387
|
+
getSelectVirtualItemHeight,
|
|
20025
21388
|
getSeparatorContent,
|
|
20026
21389
|
getShortDayNames,
|
|
20027
21390
|
getShortMonthNames,
|
|
@@ -20060,6 +21423,7 @@ var version = "1.2.0";
|
|
|
20060
21423
|
getStaggeredMotionStyle,
|
|
20061
21424
|
getStatisticTitleClasses,
|
|
20062
21425
|
getStatisticValueClasses,
|
|
21426
|
+
getStatusLabels,
|
|
20063
21427
|
getStatusVariant,
|
|
20064
21428
|
getStepContentClasses,
|
|
20065
21429
|
getStepDescriptionClasses,
|
|
@@ -20095,7 +21459,9 @@ var version = "1.2.0";
|
|
|
20095
21459
|
getTableResponsiveCardListClasses,
|
|
20096
21460
|
getTableResponsiveTableClasses,
|
|
20097
21461
|
getTableRowClasses,
|
|
21462
|
+
getTableSelectionState,
|
|
20098
21463
|
getTableVirtualRecommendation,
|
|
21464
|
+
getTableVirtualWindow,
|
|
20099
21465
|
getTableWrapperClasses,
|
|
20100
21466
|
getTabsContainerClasses,
|
|
20101
21467
|
getTagVariantClasses,
|
|
@@ -20125,6 +21491,7 @@ var version = "1.2.0";
|
|
|
20125
21491
|
getTotalPages,
|
|
20126
21492
|
getTotalTextClasses,
|
|
20127
21493
|
getTouchDistance,
|
|
21494
|
+
getTourLabels,
|
|
20128
21495
|
getTourPopoverPosition,
|
|
20129
21496
|
getTourSpotlightStyle,
|
|
20130
21497
|
getTourTargetRect,
|
|
@@ -20133,6 +21500,7 @@ var version = "1.2.0";
|
|
|
20133
21500
|
getTransferItemClasses,
|
|
20134
21501
|
getTransformOrigin,
|
|
20135
21502
|
getTransitionClasses,
|
|
21503
|
+
getTreeKeyboardAction,
|
|
20136
21504
|
getTreeMapGradientPrefix,
|
|
20137
21505
|
getTreeNodeClasses,
|
|
20138
21506
|
getTreeNodeExpandIconClasses,
|
|
@@ -20182,6 +21550,7 @@ var version = "1.2.0";
|
|
|
20182
21550
|
handleUploadDrop,
|
|
20183
21551
|
hasErrors,
|
|
20184
21552
|
hasGutter,
|
|
21553
|
+
hasTableSelectionColumn,
|
|
20185
21554
|
hexToRgb,
|
|
20186
21555
|
highContrastTheme,
|
|
20187
21556
|
hsvToRgb,
|
|
@@ -20277,6 +21646,7 @@ var version = "1.2.0";
|
|
|
20277
21646
|
isEscapeKey,
|
|
20278
21647
|
isEventOutside,
|
|
20279
21648
|
isHTMLElement,
|
|
21649
|
+
isHttpResultStatus,
|
|
20280
21650
|
isImageAnnotationPathClosed,
|
|
20281
21651
|
isImageAnnotationShapeTool,
|
|
20282
21652
|
isInlineFormat,
|
|
@@ -20307,7 +21677,6 @@ var version = "1.2.0";
|
|
|
20307
21677
|
isValidHex,
|
|
20308
21678
|
isValidUrl,
|
|
20309
21679
|
isWipExceeded,
|
|
20310
|
-
kanbanAddCardClasses,
|
|
20311
21680
|
kanbanAddColumnClasses,
|
|
20312
21681
|
kanbanCardCountClasses,
|
|
20313
21682
|
kanbanFilterHighlightClasses,
|
|
@@ -20429,6 +21798,7 @@ var version = "1.2.0";
|
|
|
20429
21798
|
moveItemBetweenContainers,
|
|
20430
21799
|
movePan,
|
|
20431
21800
|
movePinch,
|
|
21801
|
+
moveTransferItems,
|
|
20432
21802
|
naturalTheme,
|
|
20433
21803
|
navigateToFolder,
|
|
20434
21804
|
nextIconPath,
|
|
@@ -20480,6 +21850,7 @@ var version = "1.2.0";
|
|
|
20480
21850
|
parseDragData,
|
|
20481
21851
|
parseHeight,
|
|
20482
21852
|
parseHotkey,
|
|
21853
|
+
parseInputNumberValue,
|
|
20483
21854
|
parseInputValue,
|
|
20484
21855
|
parseMarkdownHeight,
|
|
20485
21856
|
parsePaneSize,
|
|
@@ -20583,6 +21954,7 @@ var version = "1.2.0";
|
|
|
20583
21954
|
resolveCarouselSwipeDirection,
|
|
20584
21955
|
resolveChartPalette,
|
|
20585
21956
|
resolveChartTooltipContent,
|
|
21957
|
+
resolveChartTooltipPosition,
|
|
20586
21958
|
resolveConditionalFormRules,
|
|
20587
21959
|
resolveCreatableSelectOption,
|
|
20588
21960
|
resolveDragConfig,
|
|
@@ -20617,6 +21989,8 @@ var version = "1.2.0";
|
|
|
20617
21989
|
richTextContainerDisabled,
|
|
20618
21990
|
richTextEditorAreaBase,
|
|
20619
21991
|
richTextEditorAreaReadOnly,
|
|
21992
|
+
richTextHtmlToMode,
|
|
21993
|
+
richTextModeToHtml,
|
|
20620
21994
|
richTextPlaceholderClasses,
|
|
20621
21995
|
richTextToolbarButtonActive,
|
|
20622
21996
|
richTextToolbarButtonBase,
|
|
@@ -20678,6 +22052,7 @@ var version = "1.2.0";
|
|
|
20678
22052
|
sliderGetValueFromPosition,
|
|
20679
22053
|
sliderNormalizeValue,
|
|
20680
22054
|
sliderRangeClasses,
|
|
22055
|
+
sliderResolveMarks,
|
|
20681
22056
|
sliderSizeClasses,
|
|
20682
22057
|
sliderThumbClasses,
|
|
20683
22058
|
sliderTooltipClasses,
|
|
@@ -20727,6 +22102,9 @@ var version = "1.2.0";
|
|
|
20727
22102
|
statusSuccessIconPath,
|
|
20728
22103
|
statusWarningIconPath,
|
|
20729
22104
|
stepFinishChar,
|
|
22105
|
+
stepFinishIconPathD,
|
|
22106
|
+
stepFinishIconStrokeWidth,
|
|
22107
|
+
stepFinishIconViewBox,
|
|
20730
22108
|
stepValue,
|
|
20731
22109
|
stepperBaseClasses,
|
|
20732
22110
|
stepperIconViewBox,
|
|
@@ -20813,6 +22191,7 @@ var version = "1.2.0";
|
|
|
20813
22191
|
textDecorationClasses,
|
|
20814
22192
|
textSizeClasses,
|
|
20815
22193
|
textWeightClasses,
|
|
22194
|
+
themeConfigToCssVars,
|
|
20816
22195
|
tigercatDarkTheme,
|
|
20817
22196
|
tigercatPlugin,
|
|
20818
22197
|
tigercatTheme,
|