x-next 1.5.0 → 1.6.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/AI_USAGE.md +2 -2
- package/CHANGELOG.md +36 -0
- package/dist/_utils/color.d.ts +53 -0
- package/dist/components/color-picker/ColorPicker.d.ts +239 -0
- package/dist/components/color-picker/gradient-slider.d.ts +52 -0
- package/dist/components/color-picker/index.d.ts +238 -0
- package/dist/components/color-picker/panel.d.ts +721 -0
- package/dist/components/color-picker/sv-panel.d.ts +48 -0
- package/dist/components/date-picker/DatePicker.vue.d.ts +3 -3
- package/dist/components/date-picker/index.d.ts +6 -6
- package/dist/components/dropdown/Dropdown.vue.d.ts +34 -4
- package/dist/components/dropdown/DropdownButton.vue.d.ts +35 -5
- package/dist/components/dropdown/DropdownSubmenu.vue.d.ts +34 -4
- package/dist/components/dropdown/dropdown-panel.vue.d.ts +30 -0
- package/dist/components/dropdown/index.d.ts +209 -29
- package/dist/components/form/FormItem.vue.d.ts +3 -3
- package/dist/components/form/form-item-label.vue.d.ts +3 -3
- package/dist/components/form/index.d.ts +6 -6
- package/dist/components/form-select/Select.d.ts +3 -3
- package/dist/components/form-select/SelectDropdown.vue.d.ts +30 -0
- package/dist/components/form-select/index.d.ts +66 -6
- package/dist/components/form-slider/Slider.vue.d.ts +3 -3
- package/dist/components/form-slider/index.d.ts +6 -6
- package/dist/components/form-slider/slider-button.vue.d.ts +3 -3
- package/dist/components/heatmap/Heatmap.d.ts +311 -0
- package/dist/components/heatmap/helpers/matrix.d.ts +58 -0
- package/dist/components/heatmap/index.d.ts +372 -0
- package/dist/components/heatmap/interface.d.ts +57 -0
- package/dist/components/image/Image.vue.d.ts +3 -3
- package/dist/components/image/ImagePreview.vue.d.ts +3 -3
- package/dist/components/image/ImagePreviewAction.d.ts +3 -3
- package/dist/components/image/ImagePreviewGroup.vue.d.ts +3 -3
- package/dist/components/image/index.d.ts +24 -24
- package/dist/components/image/preview-toolbar.vue.d.ts +3 -3
- package/dist/components/index.d.ts +2 -0
- package/dist/components/menu/sub-menu-pop.vue.d.ts +3 -3
- package/dist/components/network/Network.vue.d.ts +1 -1
- package/dist/components/network/index.d.ts +3 -3
- package/dist/components/network/utils.d.ts +2 -0
- package/dist/components/pagination/page-item-ellipsis.vue.d.ts +9 -0
- package/dist/components/pagination/page-jumper.vue.d.ts +6 -0
- package/dist/components/pagination/page-options.vue.d.ts +6 -6
- package/dist/components/popover/Popover.d.ts +1 -1
- package/dist/components/popover/index.d.ts +3 -3
- package/dist/components/popup/Popup.d.ts +1 -1
- package/dist/components/popup/index.d.ts +3 -3
- package/dist/components/skeleton/SkeletonShape.vue.d.ts +3 -3
- package/dist/components/skeleton/index.d.ts +6 -6
- package/dist/components/spin/Spin.d.ts +38 -0
- package/dist/components/spin/index.d.ts +30 -0
- package/dist/components/table/Table.d.ts +1 -1
- package/dist/components/table/index.d.ts +3 -3
- package/dist/components/tabs/Tabs.d.ts +1 -1
- package/dist/components/tabs/index.d.ts +3 -3
- package/dist/components/time-picker/TimePicker.vue.d.ts +3 -3
- package/dist/components/time-picker/index.d.ts +6 -6
- package/dist/components/tooltip/Tooltip.vue.d.ts +1 -1
- package/dist/components/tooltip/index.d.ts +3 -3
- package/dist/components/trigger/Trigger.d.ts +1 -1
- package/dist/components/trigger/index.d.ts +3 -3
- package/dist/components/watermark/Watermark.d.ts +1 -1
- package/dist/components/watermark/index.d.ts +3 -3
- package/dist/es/_styles/palette-aliases.js +8 -0
- package/dist/es/_utils/color.js +73 -0
- package/dist/es/components/button/Button.js +2 -2
- package/dist/es/components/color-picker/ColorPicker.js +239 -0
- package/dist/es/components/color-picker/gradient-slider.js +79 -0
- package/dist/es/components/color-picker/index.js +8 -0
- package/dist/es/components/color-picker/panel.js +307 -0
- package/dist/es/components/color-picker/sv-panel.js +99 -0
- package/dist/es/components/dropdown/dropdown-panel.vue.js +17 -17
- package/dist/es/components/form-input/Input.js +7 -7
- package/dist/es/components/form-input/InputPassword.vue2.js +2 -2
- package/dist/es/components/form-input/InputSearch.js +2 -2
- package/dist/es/components/form-input-number/InputNumber.js +12 -12
- package/dist/es/components/heatmap/Heatmap.js +334 -0
- package/dist/es/components/heatmap/helpers/matrix.js +106 -0
- package/dist/es/components/heatmap/index.js +8 -0
- package/dist/es/components/index.js +118 -114
- package/dist/es/components/menu/sub-menu-pop.vue2.js +12 -12
- package/dist/es/components/network/Network.vue2.js +72 -72
- package/dist/es/components/network/utils.js +44 -35
- package/dist/es/components/pagination/Pagination.js +113 -104
- package/dist/es/components/pagination/page-item-ellipsis.vue.js +13 -12
- package/dist/es/components/pagination/page-item-ellipsis.vue2.js +19 -15
- package/dist/es/components/pagination/page-jumper.vue.js +13 -12
- package/dist/es/components/pagination/page-jumper.vue2.js +7 -4
- package/dist/es/components/pagination/page-options.vue.js +4 -3
- package/dist/es/components/pagination/page-options.vue2.js +17 -15
- package/dist/es/components/skeleton/Skeleton.vue.js +11 -9
- package/dist/es/components/skeleton/SkeletonLine.vue.js +9 -8
- package/dist/es/components/skeleton/SkeletonShape.vue.js +8 -7
- package/dist/es/components/spin/Spin.js +124 -60
- package/dist/es/components/table/Table.js +3 -1
- package/dist/es/components/trigger/Trigger.js +19 -19
- package/dist/es/icons/_self/empty-better.js +25 -8
- package/dist/es/index.js +162 -158
- package/dist/es/locale/en-US.js +17 -1
- package/dist/es/locale/zh-CN.js +17 -1
- package/dist/es/style.css +1 -1
- package/dist/index.cjs +4 -4
- package/dist/index.umd.js +4 -4
- package/dist/locale/interface.d.ts +28 -0
- package/dist/style/base.css +1 -1
- package/dist/style/button.css +1 -1
- package/dist/style/color-picker.css +1 -0
- package/dist/style/color-picker.js +2 -0
- package/dist/style/date-picker.css +1 -1
- package/dist/style/empty.css +1 -1
- package/dist/style/form-checkbox.css +1 -1
- package/dist/style/form-input-tag.css +1 -1
- package/dist/style/form-input.css +1 -1
- package/dist/style/form-radio.css +1 -1
- package/dist/style/form-textarea.css +1 -1
- package/dist/style/form.css +1 -1
- package/dist/style/heatmap.css +1 -0
- package/dist/style/heatmap.js +2 -0
- package/dist/style/image.css +1 -1
- package/dist/style/menu.css +1 -1
- package/dist/style/pagination.css +1 -1
- package/dist/style/skeleton.css +1 -1
- package/dist/style/spin.css +1 -1
- package/dist/style/steps.css +1 -1
- package/dist/style/table.css +1 -1
- package/dist/style.css +1 -1
- package/dist/types.d.ts +2 -0
- package/package.json +1 -1
- package/volar.d.ts +2 -0
|
@@ -0,0 +1,372 @@
|
|
|
1
|
+
export declare const Heatmap: {
|
|
2
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
|
|
3
|
+
data: {
|
|
4
|
+
type: import('vue').PropType<import('./interface').HeatmapData>;
|
|
5
|
+
default: () => never[];
|
|
6
|
+
};
|
|
7
|
+
year: {
|
|
8
|
+
type: NumberConstructor;
|
|
9
|
+
};
|
|
10
|
+
startDate: {
|
|
11
|
+
type: import('vue').PropType<import('./interface').HeatmapRange>;
|
|
12
|
+
};
|
|
13
|
+
endDate: {
|
|
14
|
+
type: import('vue').PropType<import('./interface').HeatmapRange>;
|
|
15
|
+
};
|
|
16
|
+
activeColors: {
|
|
17
|
+
type: import('vue').PropType<string[]>;
|
|
18
|
+
};
|
|
19
|
+
minimumColor: {
|
|
20
|
+
type: StringConstructor;
|
|
21
|
+
};
|
|
22
|
+
size: {
|
|
23
|
+
type: import('vue').PropType<import('./interface').HeatmapSize>;
|
|
24
|
+
};
|
|
25
|
+
firstDayOfWeek: {
|
|
26
|
+
type: import('vue').PropType<import('./interface').HeatmapFirstDayOfWeek>;
|
|
27
|
+
default: number;
|
|
28
|
+
validator: (value: number) => boolean;
|
|
29
|
+
};
|
|
30
|
+
showWeekLabels: {
|
|
31
|
+
type: BooleanConstructor;
|
|
32
|
+
default: boolean;
|
|
33
|
+
};
|
|
34
|
+
showMonthLabels: {
|
|
35
|
+
type: BooleanConstructor;
|
|
36
|
+
default: boolean;
|
|
37
|
+
};
|
|
38
|
+
showColorIndicator: {
|
|
39
|
+
type: BooleanConstructor;
|
|
40
|
+
default: boolean;
|
|
41
|
+
};
|
|
42
|
+
tooltip: {
|
|
43
|
+
type: import('vue').PropType<import('./interface').HeatmapTooltipProps>;
|
|
44
|
+
default: boolean;
|
|
45
|
+
};
|
|
46
|
+
loading: {
|
|
47
|
+
type: import('vue').PropType<import('./interface').HeatmapLoadingProps>;
|
|
48
|
+
default: boolean;
|
|
49
|
+
};
|
|
50
|
+
ariaLabel: {
|
|
51
|
+
type: StringConstructor;
|
|
52
|
+
};
|
|
53
|
+
}>> & Readonly<{
|
|
54
|
+
onCellClick?: ((cell: import('./interface').HeatmapCell, ev: MouseEvent) => any) | undefined;
|
|
55
|
+
}>, {
|
|
56
|
+
t: (key: import('../..').LocaleKey | (string & {}), params?: Record<string, string | number>) => string;
|
|
57
|
+
className: {
|
|
58
|
+
block: string;
|
|
59
|
+
element: (className: string) => string;
|
|
60
|
+
modifier: (className: string) => string;
|
|
61
|
+
is: (className: string) => string;
|
|
62
|
+
};
|
|
63
|
+
mergedSize: import('vue').ComputedRef<"mini" | "small" | "medium" | "large">;
|
|
64
|
+
cells: import('vue').ComputedRef<import('./interface').HeatmapCell[]>;
|
|
65
|
+
rows: import('vue').ComputedRef<import('./interface').HeatmapCell[][]>;
|
|
66
|
+
range: import('vue').ComputedRef<import('./interface').HeatmapResolvedRange | null>;
|
|
67
|
+
gridStyle: import('vue').ComputedRef<{
|
|
68
|
+
'--x-heatmap-cell-size': string;
|
|
69
|
+
gridTemplateRows: string;
|
|
70
|
+
}>;
|
|
71
|
+
weekdayLabels: import('vue').ComputedRef<string[]>;
|
|
72
|
+
monthLabels: import('vue').ComputedRef<{
|
|
73
|
+
text: string;
|
|
74
|
+
colIndex: number;
|
|
75
|
+
}[]>;
|
|
76
|
+
activeCell: import('vue').ComputedRef<import('./interface').HeatmapCell | null>;
|
|
77
|
+
tooltipEnabled: import('vue').ComputedRef<boolean>;
|
|
78
|
+
tooltipStyle: import('vue').ComputedRef<{
|
|
79
|
+
left?: undefined;
|
|
80
|
+
top?: undefined;
|
|
81
|
+
} | {
|
|
82
|
+
left: string;
|
|
83
|
+
top: string;
|
|
84
|
+
}>;
|
|
85
|
+
cellColor: (cell: import('./interface').HeatmapCell) => string;
|
|
86
|
+
cellLabel: (cell: import('./interface').HeatmapCell) => string;
|
|
87
|
+
handleCellClick: (cell: import('./interface').HeatmapCell, ev: MouseEvent) => void;
|
|
88
|
+
throttledMove: {
|
|
89
|
+
(...args: any[]): void;
|
|
90
|
+
cancel(): void;
|
|
91
|
+
};
|
|
92
|
+
clearActive: () => void;
|
|
93
|
+
isInRange: (cell: import('./interface').HeatmapCell) => boolean;
|
|
94
|
+
colorPalette: import('vue').ComputedRef<string[]>;
|
|
95
|
+
slots: Readonly<{
|
|
96
|
+
tooltip?: ((props: unknown) => unknown) | undefined;
|
|
97
|
+
cell?: ((props: unknown) => unknown) | undefined;
|
|
98
|
+
footer?: (() => unknown) | undefined;
|
|
99
|
+
indicator?: ((props: {
|
|
100
|
+
colors: string[];
|
|
101
|
+
}) => unknown) | undefined;
|
|
102
|
+
'indicator-leading-text'?: (() => unknown) | undefined;
|
|
103
|
+
'indicator-trailing-text'?: (() => unknown) | undefined;
|
|
104
|
+
}>;
|
|
105
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
106
|
+
cellClick: (cell: import('./interface').HeatmapCell, ev: MouseEvent) => true;
|
|
107
|
+
}, import('vue').PublicProps, {
|
|
108
|
+
loading: import('./interface').HeatmapLoadingProps;
|
|
109
|
+
data: import('./interface').HeatmapData;
|
|
110
|
+
tooltip: import('./interface').HeatmapTooltipProps;
|
|
111
|
+
firstDayOfWeek: import('./interface').HeatmapFirstDayOfWeek;
|
|
112
|
+
showWeekLabels: boolean;
|
|
113
|
+
showMonthLabels: boolean;
|
|
114
|
+
showColorIndicator: boolean;
|
|
115
|
+
}, true, {}, import('vue').SlotsType<{
|
|
116
|
+
tooltip?: (props: unknown) => unknown;
|
|
117
|
+
cell?: (props: unknown) => unknown;
|
|
118
|
+
footer?: () => unknown;
|
|
119
|
+
indicator?: (props: {
|
|
120
|
+
colors: string[];
|
|
121
|
+
}) => unknown;
|
|
122
|
+
'indicator-leading-text'?: () => unknown;
|
|
123
|
+
'indicator-trailing-text'?: () => unknown;
|
|
124
|
+
}>, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
125
|
+
P: {};
|
|
126
|
+
B: {};
|
|
127
|
+
D: {};
|
|
128
|
+
C: {};
|
|
129
|
+
M: {};
|
|
130
|
+
Defaults: {};
|
|
131
|
+
}, Readonly<import('vue').ExtractPropTypes<{
|
|
132
|
+
data: {
|
|
133
|
+
type: import('vue').PropType<import('./interface').HeatmapData>;
|
|
134
|
+
default: () => never[];
|
|
135
|
+
};
|
|
136
|
+
year: {
|
|
137
|
+
type: NumberConstructor;
|
|
138
|
+
};
|
|
139
|
+
startDate: {
|
|
140
|
+
type: import('vue').PropType<import('./interface').HeatmapRange>;
|
|
141
|
+
};
|
|
142
|
+
endDate: {
|
|
143
|
+
type: import('vue').PropType<import('./interface').HeatmapRange>;
|
|
144
|
+
};
|
|
145
|
+
activeColors: {
|
|
146
|
+
type: import('vue').PropType<string[]>;
|
|
147
|
+
};
|
|
148
|
+
minimumColor: {
|
|
149
|
+
type: StringConstructor;
|
|
150
|
+
};
|
|
151
|
+
size: {
|
|
152
|
+
type: import('vue').PropType<import('./interface').HeatmapSize>;
|
|
153
|
+
};
|
|
154
|
+
firstDayOfWeek: {
|
|
155
|
+
type: import('vue').PropType<import('./interface').HeatmapFirstDayOfWeek>;
|
|
156
|
+
default: number;
|
|
157
|
+
validator: (value: number) => boolean;
|
|
158
|
+
};
|
|
159
|
+
showWeekLabels: {
|
|
160
|
+
type: BooleanConstructor;
|
|
161
|
+
default: boolean;
|
|
162
|
+
};
|
|
163
|
+
showMonthLabels: {
|
|
164
|
+
type: BooleanConstructor;
|
|
165
|
+
default: boolean;
|
|
166
|
+
};
|
|
167
|
+
showColorIndicator: {
|
|
168
|
+
type: BooleanConstructor;
|
|
169
|
+
default: boolean;
|
|
170
|
+
};
|
|
171
|
+
tooltip: {
|
|
172
|
+
type: import('vue').PropType<import('./interface').HeatmapTooltipProps>;
|
|
173
|
+
default: boolean;
|
|
174
|
+
};
|
|
175
|
+
loading: {
|
|
176
|
+
type: import('vue').PropType<import('./interface').HeatmapLoadingProps>;
|
|
177
|
+
default: boolean;
|
|
178
|
+
};
|
|
179
|
+
ariaLabel: {
|
|
180
|
+
type: StringConstructor;
|
|
181
|
+
};
|
|
182
|
+
}>> & Readonly<{
|
|
183
|
+
onCellClick?: ((cell: import('./interface').HeatmapCell, ev: MouseEvent) => any) | undefined;
|
|
184
|
+
}>, {
|
|
185
|
+
t: (key: import('../..').LocaleKey | (string & {}), params?: Record<string, string | number>) => string;
|
|
186
|
+
className: {
|
|
187
|
+
block: string;
|
|
188
|
+
element: (className: string) => string;
|
|
189
|
+
modifier: (className: string) => string;
|
|
190
|
+
is: (className: string) => string;
|
|
191
|
+
};
|
|
192
|
+
mergedSize: import('vue').ComputedRef<"mini" | "small" | "medium" | "large">;
|
|
193
|
+
cells: import('vue').ComputedRef<import('./interface').HeatmapCell[]>;
|
|
194
|
+
rows: import('vue').ComputedRef<import('./interface').HeatmapCell[][]>;
|
|
195
|
+
range: import('vue').ComputedRef<import('./interface').HeatmapResolvedRange | null>;
|
|
196
|
+
gridStyle: import('vue').ComputedRef<{
|
|
197
|
+
'--x-heatmap-cell-size': string;
|
|
198
|
+
gridTemplateRows: string;
|
|
199
|
+
}>;
|
|
200
|
+
weekdayLabels: import('vue').ComputedRef<string[]>;
|
|
201
|
+
monthLabels: import('vue').ComputedRef<{
|
|
202
|
+
text: string;
|
|
203
|
+
colIndex: number;
|
|
204
|
+
}[]>;
|
|
205
|
+
activeCell: import('vue').ComputedRef<import('./interface').HeatmapCell | null>;
|
|
206
|
+
tooltipEnabled: import('vue').ComputedRef<boolean>;
|
|
207
|
+
tooltipStyle: import('vue').ComputedRef<{
|
|
208
|
+
left?: undefined;
|
|
209
|
+
top?: undefined;
|
|
210
|
+
} | {
|
|
211
|
+
left: string;
|
|
212
|
+
top: string;
|
|
213
|
+
}>;
|
|
214
|
+
cellColor: (cell: import('./interface').HeatmapCell) => string;
|
|
215
|
+
cellLabel: (cell: import('./interface').HeatmapCell) => string;
|
|
216
|
+
handleCellClick: (cell: import('./interface').HeatmapCell, ev: MouseEvent) => void;
|
|
217
|
+
throttledMove: {
|
|
218
|
+
(...args: any[]): void;
|
|
219
|
+
cancel(): void;
|
|
220
|
+
};
|
|
221
|
+
clearActive: () => void;
|
|
222
|
+
isInRange: (cell: import('./interface').HeatmapCell) => boolean;
|
|
223
|
+
colorPalette: import('vue').ComputedRef<string[]>;
|
|
224
|
+
slots: Readonly<{
|
|
225
|
+
tooltip?: ((props: unknown) => unknown) | undefined;
|
|
226
|
+
cell?: ((props: unknown) => unknown) | undefined;
|
|
227
|
+
footer?: (() => unknown) | undefined;
|
|
228
|
+
indicator?: ((props: {
|
|
229
|
+
colors: string[];
|
|
230
|
+
}) => unknown) | undefined;
|
|
231
|
+
'indicator-leading-text'?: (() => unknown) | undefined;
|
|
232
|
+
'indicator-trailing-text'?: (() => unknown) | undefined;
|
|
233
|
+
}>;
|
|
234
|
+
}, {}, {}, {}, {
|
|
235
|
+
loading: import('./interface').HeatmapLoadingProps;
|
|
236
|
+
data: import('./interface').HeatmapData;
|
|
237
|
+
tooltip: import('./interface').HeatmapTooltipProps;
|
|
238
|
+
firstDayOfWeek: import('./interface').HeatmapFirstDayOfWeek;
|
|
239
|
+
showWeekLabels: boolean;
|
|
240
|
+
showMonthLabels: boolean;
|
|
241
|
+
showColorIndicator: boolean;
|
|
242
|
+
}>;
|
|
243
|
+
__isFragment?: never;
|
|
244
|
+
__isTeleport?: never;
|
|
245
|
+
__isSuspense?: never;
|
|
246
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('vue').ExtractPropTypes<{
|
|
247
|
+
data: {
|
|
248
|
+
type: import('vue').PropType<import('./interface').HeatmapData>;
|
|
249
|
+
default: () => never[];
|
|
250
|
+
};
|
|
251
|
+
year: {
|
|
252
|
+
type: NumberConstructor;
|
|
253
|
+
};
|
|
254
|
+
startDate: {
|
|
255
|
+
type: import('vue').PropType<import('./interface').HeatmapRange>;
|
|
256
|
+
};
|
|
257
|
+
endDate: {
|
|
258
|
+
type: import('vue').PropType<import('./interface').HeatmapRange>;
|
|
259
|
+
};
|
|
260
|
+
activeColors: {
|
|
261
|
+
type: import('vue').PropType<string[]>;
|
|
262
|
+
};
|
|
263
|
+
minimumColor: {
|
|
264
|
+
type: StringConstructor;
|
|
265
|
+
};
|
|
266
|
+
size: {
|
|
267
|
+
type: import('vue').PropType<import('./interface').HeatmapSize>;
|
|
268
|
+
};
|
|
269
|
+
firstDayOfWeek: {
|
|
270
|
+
type: import('vue').PropType<import('./interface').HeatmapFirstDayOfWeek>;
|
|
271
|
+
default: number;
|
|
272
|
+
validator: (value: number) => boolean;
|
|
273
|
+
};
|
|
274
|
+
showWeekLabels: {
|
|
275
|
+
type: BooleanConstructor;
|
|
276
|
+
default: boolean;
|
|
277
|
+
};
|
|
278
|
+
showMonthLabels: {
|
|
279
|
+
type: BooleanConstructor;
|
|
280
|
+
default: boolean;
|
|
281
|
+
};
|
|
282
|
+
showColorIndicator: {
|
|
283
|
+
type: BooleanConstructor;
|
|
284
|
+
default: boolean;
|
|
285
|
+
};
|
|
286
|
+
tooltip: {
|
|
287
|
+
type: import('vue').PropType<import('./interface').HeatmapTooltipProps>;
|
|
288
|
+
default: boolean;
|
|
289
|
+
};
|
|
290
|
+
loading: {
|
|
291
|
+
type: import('vue').PropType<import('./interface').HeatmapLoadingProps>;
|
|
292
|
+
default: boolean;
|
|
293
|
+
};
|
|
294
|
+
ariaLabel: {
|
|
295
|
+
type: StringConstructor;
|
|
296
|
+
};
|
|
297
|
+
}>> & Readonly<{
|
|
298
|
+
onCellClick?: ((cell: import('./interface').HeatmapCell, ev: MouseEvent) => any) | undefined;
|
|
299
|
+
}>, {
|
|
300
|
+
t: (key: import('../..').LocaleKey | (string & {}), params?: Record<string, string | number>) => string;
|
|
301
|
+
className: {
|
|
302
|
+
block: string;
|
|
303
|
+
element: (className: string) => string;
|
|
304
|
+
modifier: (className: string) => string;
|
|
305
|
+
is: (className: string) => string;
|
|
306
|
+
};
|
|
307
|
+
mergedSize: import('vue').ComputedRef<"mini" | "small" | "medium" | "large">;
|
|
308
|
+
cells: import('vue').ComputedRef<import('./interface').HeatmapCell[]>;
|
|
309
|
+
rows: import('vue').ComputedRef<import('./interface').HeatmapCell[][]>;
|
|
310
|
+
range: import('vue').ComputedRef<import('./interface').HeatmapResolvedRange | null>;
|
|
311
|
+
gridStyle: import('vue').ComputedRef<{
|
|
312
|
+
'--x-heatmap-cell-size': string;
|
|
313
|
+
gridTemplateRows: string;
|
|
314
|
+
}>;
|
|
315
|
+
weekdayLabels: import('vue').ComputedRef<string[]>;
|
|
316
|
+
monthLabels: import('vue').ComputedRef<{
|
|
317
|
+
text: string;
|
|
318
|
+
colIndex: number;
|
|
319
|
+
}[]>;
|
|
320
|
+
activeCell: import('vue').ComputedRef<import('./interface').HeatmapCell | null>;
|
|
321
|
+
tooltipEnabled: import('vue').ComputedRef<boolean>;
|
|
322
|
+
tooltipStyle: import('vue').ComputedRef<{
|
|
323
|
+
left?: undefined;
|
|
324
|
+
top?: undefined;
|
|
325
|
+
} | {
|
|
326
|
+
left: string;
|
|
327
|
+
top: string;
|
|
328
|
+
}>;
|
|
329
|
+
cellColor: (cell: import('./interface').HeatmapCell) => string;
|
|
330
|
+
cellLabel: (cell: import('./interface').HeatmapCell) => string;
|
|
331
|
+
handleCellClick: (cell: import('./interface').HeatmapCell, ev: MouseEvent) => void;
|
|
332
|
+
throttledMove: {
|
|
333
|
+
(...args: any[]): void;
|
|
334
|
+
cancel(): void;
|
|
335
|
+
};
|
|
336
|
+
clearActive: () => void;
|
|
337
|
+
isInRange: (cell: import('./interface').HeatmapCell) => boolean;
|
|
338
|
+
colorPalette: import('vue').ComputedRef<string[]>;
|
|
339
|
+
slots: Readonly<{
|
|
340
|
+
tooltip?: ((props: unknown) => unknown) | undefined;
|
|
341
|
+
cell?: ((props: unknown) => unknown) | undefined;
|
|
342
|
+
footer?: (() => unknown) | undefined;
|
|
343
|
+
indicator?: ((props: {
|
|
344
|
+
colors: string[];
|
|
345
|
+
}) => unknown) | undefined;
|
|
346
|
+
'indicator-leading-text'?: (() => unknown) | undefined;
|
|
347
|
+
'indicator-trailing-text'?: (() => unknown) | undefined;
|
|
348
|
+
}>;
|
|
349
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
350
|
+
cellClick: (cell: import('./interface').HeatmapCell, ev: MouseEvent) => true;
|
|
351
|
+
}, string, {
|
|
352
|
+
loading: import('./interface').HeatmapLoadingProps;
|
|
353
|
+
data: import('./interface').HeatmapData;
|
|
354
|
+
tooltip: import('./interface').HeatmapTooltipProps;
|
|
355
|
+
firstDayOfWeek: import('./interface').HeatmapFirstDayOfWeek;
|
|
356
|
+
showWeekLabels: boolean;
|
|
357
|
+
showMonthLabels: boolean;
|
|
358
|
+
showColorIndicator: boolean;
|
|
359
|
+
}, {}, string, import('vue').SlotsType<{
|
|
360
|
+
tooltip?: (props: unknown) => unknown;
|
|
361
|
+
cell?: (props: unknown) => unknown;
|
|
362
|
+
footer?: () => unknown;
|
|
363
|
+
indicator?: (props: {
|
|
364
|
+
colors: string[];
|
|
365
|
+
}) => unknown;
|
|
366
|
+
'indicator-leading-text'?: () => unknown;
|
|
367
|
+
'indicator-trailing-text'?: () => unknown;
|
|
368
|
+
}>, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & {
|
|
369
|
+
install(app: import('vue').App): void;
|
|
370
|
+
};
|
|
371
|
+
export { Heatmap as default };
|
|
372
|
+
export type { HeatmapCell, HeatmapData, HeatmapDataItem, HeatmapFirstDayOfWeek, HeatmapSize, HeatmapSlots, HeatmapTooltipSlotProps, } from './interface';
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { Dayjs } from 'dayjs';
|
|
2
|
+
import { Size } from '../../_utils/constant';
|
|
3
|
+
import { TooltipProps } from '../tooltip/props';
|
|
4
|
+
export type HeatmapSize = Extract<Size, 'small' | 'medium' | 'large'>;
|
|
5
|
+
export type HeatmapFirstDayOfWeek = 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
6
|
+
export interface HeatmapDataItem {
|
|
7
|
+
/** 该天的任意时间戳(内部按当天零点归并) */
|
|
8
|
+
timestamp: number;
|
|
9
|
+
/** 该天的值;`null` / `undefined` 表示无数据 */
|
|
10
|
+
value?: number | null;
|
|
11
|
+
}
|
|
12
|
+
export type HeatmapData = HeatmapDataItem[];
|
|
13
|
+
/** 供 tooltip / cell 插槽使用的格子信息 */
|
|
14
|
+
export interface HeatmapCell {
|
|
15
|
+
timestamp: number;
|
|
16
|
+
date: Dayjs;
|
|
17
|
+
value: number | null;
|
|
18
|
+
/** 0 表示无数据(使用 minimumColor),1..n 为色阶档位 */
|
|
19
|
+
level: number;
|
|
20
|
+
rowIndex: number;
|
|
21
|
+
colIndex: number;
|
|
22
|
+
}
|
|
23
|
+
export interface HeatmapResolvedRange {
|
|
24
|
+
/** 按 firstDayOfWeek 对齐后的渲染起点 */
|
|
25
|
+
start: Dayjs;
|
|
26
|
+
/** 按 firstDayOfWeek 对齐后的渲染终点 */
|
|
27
|
+
end: Dayjs;
|
|
28
|
+
days: number;
|
|
29
|
+
weeks: number;
|
|
30
|
+
/** 用户请求的原始起点(未对齐),用于标记补齐格 */
|
|
31
|
+
requestedStart: Dayjs;
|
|
32
|
+
/** 用户请求的原始终点(未对齐),用于标记补齐格 */
|
|
33
|
+
requestedEnd: Dayjs;
|
|
34
|
+
}
|
|
35
|
+
/** 用户传入的区间:number 为时间戳,string 交给 dayjs 解析 */
|
|
36
|
+
export type HeatmapRange = number | string;
|
|
37
|
+
export interface HeatmapMonthLabel {
|
|
38
|
+
text: string;
|
|
39
|
+
colIndex: number;
|
|
40
|
+
}
|
|
41
|
+
export interface HeatmapTooltipSlotProps extends HeatmapCell {
|
|
42
|
+
/** 该格的展示文本(日期 + 值),slot 可直接复用 */
|
|
43
|
+
label: string;
|
|
44
|
+
}
|
|
45
|
+
export type HeatmapTooltipProps = boolean | TooltipProps;
|
|
46
|
+
/** `true` 走默认 Spin,对象直接作为 Spin 的 props 透传 */
|
|
47
|
+
export type HeatmapLoadingProps = boolean | Record<string, unknown>;
|
|
48
|
+
export interface HeatmapSlots {
|
|
49
|
+
tooltip?: (props: HeatmapTooltipSlotProps) => unknown;
|
|
50
|
+
cell?: (props: HeatmapCell) => unknown;
|
|
51
|
+
footer?: () => unknown;
|
|
52
|
+
indicator?: (props: {
|
|
53
|
+
colors: string[];
|
|
54
|
+
}) => unknown;
|
|
55
|
+
'indicator-leading-text'?: () => unknown;
|
|
56
|
+
'indicator-trailing-text'?: () => unknown;
|
|
57
|
+
}
|
|
@@ -1068,11 +1068,11 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
1068
1068
|
mini: boolean;
|
|
1069
1069
|
disabled: boolean;
|
|
1070
1070
|
position: "top" | "tl" | "tr" | "bottom" | "bl" | "br" | "left" | "lt" | "lb" | "right" | "rt" | "rb";
|
|
1071
|
+
trigger: "hover" | "click" | "focus" | "contextMenu" | ("hover" | "click" | "focus" | "contextMenu")[];
|
|
1071
1072
|
animationName: string;
|
|
1072
1073
|
autoFitPosition: boolean;
|
|
1073
1074
|
popupVisible: boolean;
|
|
1074
1075
|
defaultPopupVisible: boolean;
|
|
1075
|
-
trigger: "hover" | "click" | "focus" | "contextMenu" | ("hover" | "click" | "focus" | "contextMenu")[];
|
|
1076
1076
|
popupOffset: number;
|
|
1077
1077
|
showArrow: boolean;
|
|
1078
1078
|
alignPoint: boolean;
|
|
@@ -1254,11 +1254,11 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
1254
1254
|
mini: boolean;
|
|
1255
1255
|
disabled: boolean;
|
|
1256
1256
|
position: "top" | "tl" | "tr" | "bottom" | "bl" | "br" | "left" | "lt" | "lb" | "right" | "rt" | "rb";
|
|
1257
|
+
trigger: "hover" | "click" | "focus" | "contextMenu" | ("hover" | "click" | "focus" | "contextMenu")[];
|
|
1257
1258
|
animationName: string;
|
|
1258
1259
|
autoFitPosition: boolean;
|
|
1259
1260
|
popupVisible: boolean;
|
|
1260
1261
|
defaultPopupVisible: boolean;
|
|
1261
|
-
trigger: "hover" | "click" | "focus" | "contextMenu" | ("hover" | "click" | "focus" | "contextMenu")[];
|
|
1262
1262
|
popupOffset: number;
|
|
1263
1263
|
showArrow: boolean;
|
|
1264
1264
|
alignPoint: boolean;
|
|
@@ -1443,11 +1443,11 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
1443
1443
|
mini: boolean;
|
|
1444
1444
|
disabled: boolean;
|
|
1445
1445
|
position: "top" | "tl" | "tr" | "bottom" | "bl" | "br" | "left" | "lt" | "lb" | "right" | "rt" | "rb";
|
|
1446
|
+
trigger: "hover" | "click" | "focus" | "contextMenu" | ("hover" | "click" | "focus" | "contextMenu")[];
|
|
1446
1447
|
animationName: string;
|
|
1447
1448
|
autoFitPosition: boolean;
|
|
1448
1449
|
popupVisible: boolean;
|
|
1449
1450
|
defaultPopupVisible: boolean;
|
|
1450
|
-
trigger: "hover" | "click" | "focus" | "contextMenu" | ("hover" | "click" | "focus" | "contextMenu")[];
|
|
1451
1451
|
popupOffset: number;
|
|
1452
1452
|
showArrow: boolean;
|
|
1453
1453
|
alignPoint: boolean;
|
|
@@ -697,11 +697,11 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
697
697
|
mini: boolean;
|
|
698
698
|
disabled: boolean;
|
|
699
699
|
position: "top" | "tl" | "tr" | "bottom" | "bl" | "br" | "left" | "lt" | "lb" | "right" | "rt" | "rb";
|
|
700
|
+
trigger: "hover" | "click" | "focus" | "contextMenu" | ("hover" | "click" | "focus" | "contextMenu")[];
|
|
700
701
|
animationName: string;
|
|
701
702
|
autoFitPosition: boolean;
|
|
702
703
|
popupVisible: boolean;
|
|
703
704
|
defaultPopupVisible: boolean;
|
|
704
|
-
trigger: "hover" | "click" | "focus" | "contextMenu" | ("hover" | "click" | "focus" | "contextMenu")[];
|
|
705
705
|
popupOffset: number;
|
|
706
706
|
showArrow: boolean;
|
|
707
707
|
alignPoint: boolean;
|
|
@@ -883,11 +883,11 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
883
883
|
mini: boolean;
|
|
884
884
|
disabled: boolean;
|
|
885
885
|
position: "top" | "tl" | "tr" | "bottom" | "bl" | "br" | "left" | "lt" | "lb" | "right" | "rt" | "rb";
|
|
886
|
+
trigger: "hover" | "click" | "focus" | "contextMenu" | ("hover" | "click" | "focus" | "contextMenu")[];
|
|
886
887
|
animationName: string;
|
|
887
888
|
autoFitPosition: boolean;
|
|
888
889
|
popupVisible: boolean;
|
|
889
890
|
defaultPopupVisible: boolean;
|
|
890
|
-
trigger: "hover" | "click" | "focus" | "contextMenu" | ("hover" | "click" | "focus" | "contextMenu")[];
|
|
891
891
|
popupOffset: number;
|
|
892
892
|
showArrow: boolean;
|
|
893
893
|
alignPoint: boolean;
|
|
@@ -1072,11 +1072,11 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
1072
1072
|
mini: boolean;
|
|
1073
1073
|
disabled: boolean;
|
|
1074
1074
|
position: "top" | "tl" | "tr" | "bottom" | "bl" | "br" | "left" | "lt" | "lb" | "right" | "rt" | "rb";
|
|
1075
|
+
trigger: "hover" | "click" | "focus" | "contextMenu" | ("hover" | "click" | "focus" | "contextMenu")[];
|
|
1075
1076
|
animationName: string;
|
|
1076
1077
|
autoFitPosition: boolean;
|
|
1077
1078
|
popupVisible: boolean;
|
|
1078
1079
|
defaultPopupVisible: boolean;
|
|
1079
|
-
trigger: "hover" | "click" | "focus" | "contextMenu" | ("hover" | "click" | "focus" | "contextMenu")[];
|
|
1080
1080
|
popupOffset: number;
|
|
1081
1081
|
showArrow: boolean;
|
|
1082
1082
|
alignPoint: boolean;
|
|
@@ -196,11 +196,11 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
196
196
|
mini: boolean;
|
|
197
197
|
disabled: boolean;
|
|
198
198
|
position: "top" | "tl" | "tr" | "bottom" | "bl" | "br" | "left" | "lt" | "lb" | "right" | "rt" | "rb";
|
|
199
|
+
trigger: "hover" | "click" | "focus" | "contextMenu" | ("hover" | "click" | "focus" | "contextMenu")[];
|
|
199
200
|
animationName: string;
|
|
200
201
|
autoFitPosition: boolean;
|
|
201
202
|
popupVisible: boolean;
|
|
202
203
|
defaultPopupVisible: boolean;
|
|
203
|
-
trigger: "hover" | "click" | "focus" | "contextMenu" | ("hover" | "click" | "focus" | "contextMenu")[];
|
|
204
204
|
popupOffset: number;
|
|
205
205
|
showArrow: boolean;
|
|
206
206
|
alignPoint: boolean;
|
|
@@ -382,11 +382,11 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
382
382
|
mini: boolean;
|
|
383
383
|
disabled: boolean;
|
|
384
384
|
position: "top" | "tl" | "tr" | "bottom" | "bl" | "br" | "left" | "lt" | "lb" | "right" | "rt" | "rb";
|
|
385
|
+
trigger: "hover" | "click" | "focus" | "contextMenu" | ("hover" | "click" | "focus" | "contextMenu")[];
|
|
385
386
|
animationName: string;
|
|
386
387
|
autoFitPosition: boolean;
|
|
387
388
|
popupVisible: boolean;
|
|
388
389
|
defaultPopupVisible: boolean;
|
|
389
|
-
trigger: "hover" | "click" | "focus" | "contextMenu" | ("hover" | "click" | "focus" | "contextMenu")[];
|
|
390
390
|
popupOffset: number;
|
|
391
391
|
showArrow: boolean;
|
|
392
392
|
alignPoint: boolean;
|
|
@@ -571,11 +571,11 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
571
571
|
mini: boolean;
|
|
572
572
|
disabled: boolean;
|
|
573
573
|
position: "top" | "tl" | "tr" | "bottom" | "bl" | "br" | "left" | "lt" | "lb" | "right" | "rt" | "rb";
|
|
574
|
+
trigger: "hover" | "click" | "focus" | "contextMenu" | ("hover" | "click" | "focus" | "contextMenu")[];
|
|
574
575
|
animationName: string;
|
|
575
576
|
autoFitPosition: boolean;
|
|
576
577
|
popupVisible: boolean;
|
|
577
578
|
defaultPopupVisible: boolean;
|
|
578
|
-
trigger: "hover" | "click" | "focus" | "contextMenu" | ("hover" | "click" | "focus" | "contextMenu")[];
|
|
579
579
|
popupOffset: number;
|
|
580
580
|
showArrow: boolean;
|
|
581
581
|
alignPoint: boolean;
|
|
@@ -792,11 +792,11 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
792
792
|
mini: boolean;
|
|
793
793
|
disabled: boolean;
|
|
794
794
|
position: "top" | "tl" | "tr" | "bottom" | "bl" | "br" | "left" | "lt" | "lb" | "right" | "rt" | "rb";
|
|
795
|
+
trigger: "hover" | "click" | "focus" | "contextMenu" | ("hover" | "click" | "focus" | "contextMenu")[];
|
|
795
796
|
animationName: string;
|
|
796
797
|
autoFitPosition: boolean;
|
|
797
798
|
popupVisible: boolean;
|
|
798
799
|
defaultPopupVisible: boolean;
|
|
799
|
-
trigger: "hover" | "click" | "focus" | "contextMenu" | ("hover" | "click" | "focus" | "contextMenu")[];
|
|
800
800
|
popupOffset: number;
|
|
801
801
|
showArrow: boolean;
|
|
802
802
|
alignPoint: boolean;
|
|
@@ -978,11 +978,11 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
978
978
|
mini: boolean;
|
|
979
979
|
disabled: boolean;
|
|
980
980
|
position: "top" | "tl" | "tr" | "bottom" | "bl" | "br" | "left" | "lt" | "lb" | "right" | "rt" | "rb";
|
|
981
|
+
trigger: "hover" | "click" | "focus" | "contextMenu" | ("hover" | "click" | "focus" | "contextMenu")[];
|
|
981
982
|
animationName: string;
|
|
982
983
|
autoFitPosition: boolean;
|
|
983
984
|
popupVisible: boolean;
|
|
984
985
|
defaultPopupVisible: boolean;
|
|
985
|
-
trigger: "hover" | "click" | "focus" | "contextMenu" | ("hover" | "click" | "focus" | "contextMenu")[];
|
|
986
986
|
popupOffset: number;
|
|
987
987
|
showArrow: boolean;
|
|
988
988
|
alignPoint: boolean;
|
|
@@ -1167,11 +1167,11 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
1167
1167
|
mini: boolean;
|
|
1168
1168
|
disabled: boolean;
|
|
1169
1169
|
position: "top" | "tl" | "tr" | "bottom" | "bl" | "br" | "left" | "lt" | "lb" | "right" | "rt" | "rb";
|
|
1170
|
+
trigger: "hover" | "click" | "focus" | "contextMenu" | ("hover" | "click" | "focus" | "contextMenu")[];
|
|
1170
1171
|
animationName: string;
|
|
1171
1172
|
autoFitPosition: boolean;
|
|
1172
1173
|
popupVisible: boolean;
|
|
1173
1174
|
defaultPopupVisible: boolean;
|
|
1174
|
-
trigger: "hover" | "click" | "focus" | "contextMenu" | ("hover" | "click" | "focus" | "contextMenu")[];
|
|
1175
1175
|
popupOffset: number;
|
|
1176
1176
|
showArrow: boolean;
|
|
1177
1177
|
alignPoint: boolean;
|