@uzum-tech/ui 2.4.4 → 2.4.6
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/index.js +118 -43
- package/dist/index.mjs +118 -43
- package/dist/index.prod.js +3 -3
- package/dist/index.prod.mjs +3 -3
- package/es/_internal/safe-top-scrollbar/src/SafeTopScrollbar.d.ts +21 -0
- package/es/_internal/safe-top-scrollbar/src/SafeTopScrollbar.mjs +14 -1
- package/es/_internal/scrollbar/src/Scrollbar.d.ts +21 -0
- package/es/_internal/scrollbar/src/Scrollbar.mjs +14 -1
- package/es/_internal/select-menu/src/SelectMenuParts/List.d.ts +2 -0
- package/es/_utils/composable/use-scroll-edge-detector.d.ts +9 -0
- package/es/_utils/composable/use-scroll-edge-detector.mjs +44 -0
- package/es/button/src/Button.d.ts +4 -0
- package/es/button/src/Button.mjs +4 -2
- package/es/cascader/src/CascaderSubmenu.d.ts +2 -0
- package/es/chat/src/Chat.d.ts +12 -24
- package/es/chat/src/ChatMainArea.d.ts +4 -7
- package/es/chat/src/ChatMainArea.mjs +12 -37
- package/es/chat/src/ChatParts/ChatAttachmentButton/ChatAttachmentButton.d.ts +1 -1
- package/es/chat/src/ChatParts/ChatHeader/ChatHeader.d.ts +1 -1
- package/es/chat/src/interface.d.ts +2 -0
- package/es/components.d.ts +92 -32
- package/es/data-table/src/DataTable.d.ts +14 -0
- package/es/data-table/src/DataTable.mjs +2 -0
- package/es/data-table/src/TableParts/Body.d.ts +2 -0
- package/es/data-table/src/interface.d.ts +7 -0
- package/es/data-table/src/interface.mjs +6 -0
- package/es/data-table/src/use-scroll.d.ts +1 -0
- package/es/data-table/src/use-scroll.mjs +8 -1
- package/es/date-picker/src/DatePicker.d.ts +11 -0
- package/es/date-picker/src/DatePicker.mjs +8 -4
- package/es/date-picker-v2/src/DatePickerV2.d.ts +1 -0
- package/es/date-picker-v2/src/DatePickerV2.mjs +6 -2
- package/es/date-picker-v2/src/composables/useCalendarScroll.d.ts +96 -0
- package/es/date-picker-v2/src/panel/CalendarPanel.d.ts +96 -0
- package/es/date-picker-v2/src/panel/CalendarRangePanel.d.ts +96 -0
- package/es/dialog/src/DialogProvider.d.ts +1 -1579
- package/es/editor/src/EditorParts/EditorContent/EditorContent.d.ts +2 -0
- package/es/infinite-scroll/src/InfiniteScroll.d.ts +2 -0
- package/es/input/src/Input.d.ts +2 -0
- package/es/kanban/src/Kanban.d.ts +1 -1
- package/es/layout/src/Layout.d.ts +4 -0
- package/es/layout/src/LayoutContent.d.ts +2 -0
- package/es/layout/src/LayoutSider.d.ts +2 -0
- package/es/legacy-transfer/src/TransferList.d.ts +2 -0
- package/es/log/src/Log.d.ts +2 -0
- package/es/modal/src/BodyWrapper.d.ts +2 -0
- package/es/modal-fullscreen/src/ModalFull.d.ts +2 -0
- package/es/safe-top-scrollbar/src/SafeTopScrollbar.d.ts +13 -0
- package/es/safe-top-scrollbar/src/SafeTopScrollbar.mjs +7 -0
- package/es/scrollbar/src/Scrollbar.d.ts +13 -0
- package/es/scrollbar/src/Scrollbar.mjs +7 -0
- package/es/time-picker/src/TimePicker.d.ts +8 -0
- package/es/transfer/src/TransferList.d.ts +2 -0
- package/es/tree/src/Tree.d.ts +2 -0
- package/es/typography/src/text.d.ts +1 -1
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/virtual-list/src/VirtualList.d.ts +2 -0
- package/lib/_internal/safe-top-scrollbar/src/SafeTopScrollbar.d.ts +21 -0
- package/lib/_internal/safe-top-scrollbar/src/SafeTopScrollbar.js +9 -2
- package/lib/_internal/scrollbar/src/Scrollbar.d.ts +21 -0
- package/lib/_internal/scrollbar/src/Scrollbar.js +9 -2
- package/lib/_internal/select-menu/src/SelectMenuParts/List.d.ts +2 -0
- package/lib/_utils/composable/use-scroll-edge-detector.d.ts +9 -0
- package/lib/_utils/composable/use-scroll-edge-detector.js +42 -0
- package/lib/button/src/Button.d.ts +4 -0
- package/lib/button/src/Button.js +8 -3
- package/lib/cascader/src/CascaderSubmenu.d.ts +2 -0
- package/lib/chat/src/Chat.d.ts +12 -24
- package/lib/chat/src/ChatMainArea.d.ts +4 -7
- package/lib/chat/src/ChatMainArea.js +6 -36
- package/lib/chat/src/ChatParts/ChatAttachmentButton/ChatAttachmentButton.d.ts +1 -1
- package/lib/chat/src/ChatParts/ChatHeader/ChatHeader.d.ts +1 -1
- package/lib/chat/src/interface.d.ts +2 -0
- package/lib/components.d.ts +92 -32
- package/lib/data-table/src/DataTable.d.ts +14 -0
- package/lib/data-table/src/DataTable.js +2 -1
- package/lib/data-table/src/TableParts/Body.d.ts +2 -0
- package/lib/data-table/src/interface.d.ts +7 -0
- package/lib/data-table/src/interface.js +4 -1
- package/lib/data-table/src/use-scroll.d.ts +1 -0
- package/lib/data-table/src/use-scroll.js +5 -1
- package/lib/date-picker/src/DatePicker.d.ts +11 -0
- package/lib/date-picker/src/DatePicker.js +6 -2
- package/lib/date-picker-v2/src/DatePickerV2.d.ts +1 -0
- package/lib/date-picker-v2/src/DatePickerV2.js +6 -2
- package/lib/date-picker-v2/src/composables/useCalendarScroll.d.ts +96 -0
- package/lib/date-picker-v2/src/panel/CalendarPanel.d.ts +96 -0
- package/lib/date-picker-v2/src/panel/CalendarRangePanel.d.ts +96 -0
- package/lib/dialog/src/DialogProvider.d.ts +1 -1579
- package/lib/editor/src/EditorParts/EditorContent/EditorContent.d.ts +2 -0
- package/lib/infinite-scroll/src/InfiniteScroll.d.ts +2 -0
- package/lib/input/src/Input.d.ts +2 -0
- package/lib/kanban/src/Kanban.d.ts +1 -1
- package/lib/layout/src/Layout.d.ts +4 -0
- package/lib/layout/src/LayoutContent.d.ts +2 -0
- package/lib/layout/src/LayoutSider.d.ts +2 -0
- package/lib/legacy-transfer/src/TransferList.d.ts +2 -0
- package/lib/log/src/Log.d.ts +2 -0
- package/lib/modal/src/BodyWrapper.d.ts +2 -0
- package/lib/modal-fullscreen/src/ModalFull.d.ts +2 -0
- package/lib/safe-top-scrollbar/src/SafeTopScrollbar.d.ts +13 -0
- package/lib/safe-top-scrollbar/src/SafeTopScrollbar.js +5 -1
- package/lib/scrollbar/src/Scrollbar.d.ts +13 -0
- package/lib/scrollbar/src/Scrollbar.js +5 -1
- package/lib/time-picker/src/TimePicker.d.ts +8 -0
- package/lib/transfer/src/TransferList.d.ts +2 -0
- package/lib/tree/src/Tree.d.ts +2 -0
- package/lib/typography/src/text.d.ts +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/virtual-list/src/VirtualList.d.ts +2 -0
- package/package.json +1 -1
- package/web-types.json +72 -2
|
@@ -46,6 +46,7 @@ export interface SafeTopScrollbarInstMethods {
|
|
|
46
46
|
clientHeight: number;
|
|
47
47
|
};
|
|
48
48
|
adjustScrollTop: (heightDiff: number) => void;
|
|
49
|
+
resetScrollEdgeState: () => void;
|
|
49
50
|
}
|
|
50
51
|
export interface SafeTopScrollbarInst extends SafeTopScrollbarInstMethods {
|
|
51
52
|
$el: HTMLElement;
|
|
@@ -80,6 +81,12 @@ declare const safeTopscrollbarProps: {
|
|
|
80
81
|
readonly onScroll: PropType<(e: Event) => void>;
|
|
81
82
|
readonly onWheel: PropType<(e: WheelEvent) => void>;
|
|
82
83
|
readonly onResize: PropType<(e: ResizeObserverEntry) => void>;
|
|
84
|
+
readonly onScrollToTop: PropType<() => void>;
|
|
85
|
+
readonly onScrollToBottom: PropType<() => void>;
|
|
86
|
+
readonly scrollThreshold: {
|
|
87
|
+
readonly type: NumberConstructor;
|
|
88
|
+
readonly default: 5;
|
|
89
|
+
};
|
|
83
90
|
readonly internalOnUpdateScrollLeft: PropType<(scrollLeft: number) => void>;
|
|
84
91
|
readonly internalHoistYRail: BooleanConstructor;
|
|
85
92
|
readonly yPlacement: {
|
|
@@ -156,6 +163,12 @@ declare const SafeTopScrollbar: import("vue").DefineComponent<import("vue").Extr
|
|
|
156
163
|
readonly onScroll: PropType<(e: Event) => void>;
|
|
157
164
|
readonly onWheel: PropType<(e: WheelEvent) => void>;
|
|
158
165
|
readonly onResize: PropType<(e: ResizeObserverEntry) => void>;
|
|
166
|
+
readonly onScrollToTop: PropType<() => void>;
|
|
167
|
+
readonly onScrollToBottom: PropType<() => void>;
|
|
168
|
+
readonly scrollThreshold: {
|
|
169
|
+
readonly type: NumberConstructor;
|
|
170
|
+
readonly default: 5;
|
|
171
|
+
};
|
|
159
172
|
readonly internalOnUpdateScrollLeft: PropType<(scrollLeft: number) => void>;
|
|
160
173
|
readonly internalHoistYRail: BooleanConstructor;
|
|
161
174
|
readonly yPlacement: {
|
|
@@ -264,6 +277,7 @@ declare const SafeTopScrollbar: import("vue").DefineComponent<import("vue").Extr
|
|
|
264
277
|
clientHeight: number;
|
|
265
278
|
};
|
|
266
279
|
adjustScrollTop: (heightDiff: number) => void;
|
|
280
|
+
resetScrollEdgeState: () => void;
|
|
267
281
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
268
282
|
readonly duration: {
|
|
269
283
|
readonly type: NumberConstructor;
|
|
@@ -291,6 +305,12 @@ declare const SafeTopScrollbar: import("vue").DefineComponent<import("vue").Extr
|
|
|
291
305
|
readonly onScroll: PropType<(e: Event) => void>;
|
|
292
306
|
readonly onWheel: PropType<(e: WheelEvent) => void>;
|
|
293
307
|
readonly onResize: PropType<(e: ResizeObserverEntry) => void>;
|
|
308
|
+
readonly onScrollToTop: PropType<() => void>;
|
|
309
|
+
readonly onScrollToBottom: PropType<() => void>;
|
|
310
|
+
readonly scrollThreshold: {
|
|
311
|
+
readonly type: NumberConstructor;
|
|
312
|
+
readonly default: 5;
|
|
313
|
+
};
|
|
294
314
|
readonly internalOnUpdateScrollLeft: PropType<(scrollLeft: number) => void>;
|
|
295
315
|
readonly internalHoistYRail: BooleanConstructor;
|
|
296
316
|
readonly yPlacement: {
|
|
@@ -344,6 +364,7 @@ declare const SafeTopScrollbar: import("vue").DefineComponent<import("vue").Extr
|
|
|
344
364
|
readonly trigger: "none" | "hover";
|
|
345
365
|
readonly useUnifiedContainer: boolean;
|
|
346
366
|
readonly triggerDisplayManually: boolean;
|
|
367
|
+
readonly scrollThreshold: number;
|
|
347
368
|
readonly internalHoistYRail: boolean;
|
|
348
369
|
readonly yPlacement: "left" | "right";
|
|
349
370
|
readonly xPlacement: "top" | "bottom";
|
|
@@ -5,6 +5,7 @@ import { computed, defineComponent, Fragment, h, mergeProps, onBeforeUnmount, on
|
|
|
5
5
|
import { VResizeObserver } from 'vueuc';
|
|
6
6
|
import { useConfig, useRtl, useTheme, useThemeClass } from "../../../_mixins/index.mjs";
|
|
7
7
|
import { rtlInset, useReactivated, Wrapper } from "../../../_utils/index.mjs";
|
|
8
|
+
import { useScrollEdgeDetector } from "../../../_utils/composable/use-scroll-edge-detector.mjs";
|
|
8
9
|
import { scrollbarLight } from "../styles/index.mjs";
|
|
9
10
|
import style from "./styles/index.cssr.mjs";
|
|
10
11
|
const safeTopscrollbarProps = Object.assign(Object.assign({}, useTheme.props), {
|
|
@@ -35,6 +36,12 @@ const safeTopscrollbarProps = Object.assign(Object.assign({}, useTheme.props), {
|
|
|
35
36
|
onScroll: Function,
|
|
36
37
|
onWheel: Function,
|
|
37
38
|
onResize: Function,
|
|
39
|
+
onScrollToTop: Function,
|
|
40
|
+
onScrollToBottom: Function,
|
|
41
|
+
scrollThreshold: {
|
|
42
|
+
type: Number,
|
|
43
|
+
default: 5
|
|
44
|
+
},
|
|
38
45
|
internalOnUpdateScrollLeft: Function,
|
|
39
46
|
internalHoistYRail: Boolean,
|
|
40
47
|
yPlacement: {
|
|
@@ -84,6 +91,10 @@ const SafeTopScrollbar = defineComponent({
|
|
|
84
91
|
let memoMouseY = 0;
|
|
85
92
|
let previousScrollHeight = 0;
|
|
86
93
|
let previousScrollTop = 0;
|
|
94
|
+
const {
|
|
95
|
+
detectScrollEdges,
|
|
96
|
+
resetScrollEdgeState
|
|
97
|
+
} = useScrollEdgeDetector(() => props);
|
|
87
98
|
const isIos = useIsIos();
|
|
88
99
|
const themeRef = useTheme('SafeTopScrollbar', '-safe-top-scrollbar', style, scrollbarLight, props, mergedClsPrefixRef);
|
|
89
100
|
const yBarSizeRef = computed(() => {
|
|
@@ -379,6 +390,7 @@ const SafeTopScrollbar = defineComponent({
|
|
|
379
390
|
previousScrollTop = container.scrollTop;
|
|
380
391
|
}
|
|
381
392
|
syncScrollState();
|
|
393
|
+
detectScrollEdges(e);
|
|
382
394
|
}
|
|
383
395
|
function syncScrollState() {
|
|
384
396
|
// only collect scroll state, do not trigger any dom event
|
|
@@ -738,7 +750,8 @@ const SafeTopScrollbar = defineComponent({
|
|
|
738
750
|
handleMouseEnterWrapper,
|
|
739
751
|
handleMouseLeaveWrapper,
|
|
740
752
|
getScrollState,
|
|
741
|
-
adjustScrollTop
|
|
753
|
+
adjustScrollTop,
|
|
754
|
+
resetScrollEdgeState
|
|
742
755
|
};
|
|
743
756
|
return Object.assign(Object.assign({}, exposedMethods), {
|
|
744
757
|
mergedClsPrefix: mergedClsPrefixRef,
|
|
@@ -40,6 +40,7 @@ export interface ScrollbarInstMethods {
|
|
|
40
40
|
sync: () => void;
|
|
41
41
|
handleMouseEnterWrapper: () => void;
|
|
42
42
|
handleMouseLeaveWrapper: () => void;
|
|
43
|
+
resetScrollEdgeState: () => void;
|
|
43
44
|
}
|
|
44
45
|
export interface ScrollbarInst extends ScrollbarInstMethods {
|
|
45
46
|
$el: HTMLElement;
|
|
@@ -74,6 +75,12 @@ declare const scrollbarProps: {
|
|
|
74
75
|
readonly onScroll: PropType<(e: Event) => void>;
|
|
75
76
|
readonly onWheel: PropType<(e: WheelEvent) => void>;
|
|
76
77
|
readonly onResize: PropType<(e: ResizeObserverEntry) => void>;
|
|
78
|
+
readonly onScrollToTop: PropType<() => void>;
|
|
79
|
+
readonly onScrollToBottom: PropType<() => void>;
|
|
80
|
+
readonly scrollThreshold: {
|
|
81
|
+
readonly type: NumberConstructor;
|
|
82
|
+
readonly default: 5;
|
|
83
|
+
};
|
|
77
84
|
readonly internalOnUpdateScrollLeft: PropType<(scrollLeft: number) => void>;
|
|
78
85
|
readonly internalHoistYRail: BooleanConstructor;
|
|
79
86
|
readonly yPlacement: {
|
|
@@ -150,6 +157,12 @@ declare const Scrollbar: import("vue").DefineComponent<import("vue").ExtractProp
|
|
|
150
157
|
readonly onScroll: PropType<(e: Event) => void>;
|
|
151
158
|
readonly onWheel: PropType<(e: WheelEvent) => void>;
|
|
152
159
|
readonly onResize: PropType<(e: ResizeObserverEntry) => void>;
|
|
160
|
+
readonly onScrollToTop: PropType<() => void>;
|
|
161
|
+
readonly onScrollToBottom: PropType<() => void>;
|
|
162
|
+
readonly scrollThreshold: {
|
|
163
|
+
readonly type: NumberConstructor;
|
|
164
|
+
readonly default: 5;
|
|
165
|
+
};
|
|
153
166
|
readonly internalOnUpdateScrollLeft: PropType<(scrollLeft: number) => void>;
|
|
154
167
|
readonly internalHoistYRail: BooleanConstructor;
|
|
155
168
|
readonly yPlacement: {
|
|
@@ -252,6 +265,7 @@ declare const Scrollbar: import("vue").DefineComponent<import("vue").ExtractProp
|
|
|
252
265
|
sync: () => void;
|
|
253
266
|
handleMouseEnterWrapper: () => void;
|
|
254
267
|
handleMouseLeaveWrapper: () => void;
|
|
268
|
+
resetScrollEdgeState: () => void;
|
|
255
269
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
256
270
|
readonly duration: {
|
|
257
271
|
readonly type: NumberConstructor;
|
|
@@ -279,6 +293,12 @@ declare const Scrollbar: import("vue").DefineComponent<import("vue").ExtractProp
|
|
|
279
293
|
readonly onScroll: PropType<(e: Event) => void>;
|
|
280
294
|
readonly onWheel: PropType<(e: WheelEvent) => void>;
|
|
281
295
|
readonly onResize: PropType<(e: ResizeObserverEntry) => void>;
|
|
296
|
+
readonly onScrollToTop: PropType<() => void>;
|
|
297
|
+
readonly onScrollToBottom: PropType<() => void>;
|
|
298
|
+
readonly scrollThreshold: {
|
|
299
|
+
readonly type: NumberConstructor;
|
|
300
|
+
readonly default: 5;
|
|
301
|
+
};
|
|
282
302
|
readonly internalOnUpdateScrollLeft: PropType<(scrollLeft: number) => void>;
|
|
283
303
|
readonly internalHoistYRail: BooleanConstructor;
|
|
284
304
|
readonly yPlacement: {
|
|
@@ -332,6 +352,7 @@ declare const Scrollbar: import("vue").DefineComponent<import("vue").ExtractProp
|
|
|
332
352
|
readonly trigger: "none" | "hover";
|
|
333
353
|
readonly useUnifiedContainer: boolean;
|
|
334
354
|
readonly triggerDisplayManually: boolean;
|
|
355
|
+
readonly scrollThreshold: number;
|
|
335
356
|
readonly internalHoistYRail: boolean;
|
|
336
357
|
readonly yPlacement: "left" | "right";
|
|
337
358
|
readonly xPlacement: "top" | "bottom";
|
|
@@ -5,6 +5,7 @@ import { computed, defineComponent, Fragment, h, mergeProps, onBeforeUnmount, on
|
|
|
5
5
|
import { VResizeObserver } from 'vueuc';
|
|
6
6
|
import { useConfig, useRtl, useTheme, useThemeClass } from "../../../_mixins/index.mjs";
|
|
7
7
|
import { rtlInset, useReactivated, Wrapper } from "../../../_utils/index.mjs";
|
|
8
|
+
import { useScrollEdgeDetector } from "../../../_utils/composable/use-scroll-edge-detector.mjs";
|
|
8
9
|
import { scrollbarLight } from "../styles/index.mjs";
|
|
9
10
|
import style from "./styles/index.cssr.mjs";
|
|
10
11
|
const scrollbarProps = Object.assign(Object.assign({}, useTheme.props), {
|
|
@@ -35,6 +36,12 @@ const scrollbarProps = Object.assign(Object.assign({}, useTheme.props), {
|
|
|
35
36
|
onScroll: Function,
|
|
36
37
|
onWheel: Function,
|
|
37
38
|
onResize: Function,
|
|
39
|
+
onScrollToTop: Function,
|
|
40
|
+
onScrollToBottom: Function,
|
|
41
|
+
scrollThreshold: {
|
|
42
|
+
type: Number,
|
|
43
|
+
default: 5
|
|
44
|
+
},
|
|
38
45
|
internalOnUpdateScrollLeft: Function,
|
|
39
46
|
internalHoistYRail: Boolean,
|
|
40
47
|
yPlacement: {
|
|
@@ -82,6 +89,10 @@ const Scrollbar = defineComponent({
|
|
|
82
89
|
let memoXLeft = 0;
|
|
83
90
|
let memoMouseX = 0;
|
|
84
91
|
let memoMouseY = 0;
|
|
92
|
+
const {
|
|
93
|
+
detectScrollEdges,
|
|
94
|
+
resetScrollEdgeState
|
|
95
|
+
} = useScrollEdgeDetector(() => props);
|
|
85
96
|
const isIos = useIsIos();
|
|
86
97
|
const themeRef = useTheme('Scrollbar', '-scrollbar', style, scrollbarLight, props, mergedClsPrefixRef);
|
|
87
98
|
const yBarSizeRef = computed(() => {
|
|
@@ -355,6 +366,7 @@ const Scrollbar = defineComponent({
|
|
|
355
366
|
} = props;
|
|
356
367
|
if (onScroll) onScroll(e);
|
|
357
368
|
syncScrollState();
|
|
369
|
+
detectScrollEdges(e);
|
|
358
370
|
}
|
|
359
371
|
function syncScrollState() {
|
|
360
372
|
// only collect scroll state, do not trigger any dom event
|
|
@@ -672,7 +684,8 @@ const Scrollbar = defineComponent({
|
|
|
672
684
|
sync,
|
|
673
685
|
syncUnifiedContainer,
|
|
674
686
|
handleMouseEnterWrapper,
|
|
675
|
-
handleMouseLeaveWrapper
|
|
687
|
+
handleMouseLeaveWrapper,
|
|
688
|
+
resetScrollEdgeState
|
|
676
689
|
};
|
|
677
690
|
return Object.assign(Object.assign({}, exposedMethods), {
|
|
678
691
|
mergedClsPrefix: mergedClsPrefixRef,
|
|
@@ -66,6 +66,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
66
66
|
sync: () => void;
|
|
67
67
|
handleMouseEnterWrapper: () => void;
|
|
68
68
|
handleMouseLeaveWrapper: () => void;
|
|
69
|
+
resetScrollEdgeState: () => void;
|
|
69
70
|
} | null, ScrollbarInst | {
|
|
70
71
|
$el: HTMLElement;
|
|
71
72
|
containerRef: HTMLElement | null;
|
|
@@ -77,6 +78,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
77
78
|
sync: () => void;
|
|
78
79
|
handleMouseEnterWrapper: () => void;
|
|
79
80
|
handleMouseLeaveWrapper: () => void;
|
|
81
|
+
resetScrollEdgeState: () => void;
|
|
80
82
|
} | null>;
|
|
81
83
|
doScroll: (e: Event) => void;
|
|
82
84
|
handleVirtualListScroll: (e: Event) => void;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface ScrollEdgeOptions {
|
|
2
|
+
scrollThreshold: number;
|
|
3
|
+
onScrollToTop?: VoidFunction;
|
|
4
|
+
onScrollToBottom?: VoidFunction;
|
|
5
|
+
}
|
|
6
|
+
export declare function useScrollEdgeDetector(getOptions: () => ScrollEdgeOptions): {
|
|
7
|
+
detectScrollEdges: (event: Event) => void;
|
|
8
|
+
resetScrollEdgeState: () => void;
|
|
9
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export function useScrollEdgeDetector(getOptions) {
|
|
2
|
+
let lastEdgeScrollTop = 0;
|
|
3
|
+
let scrollTopFired = false;
|
|
4
|
+
let scrollBottomFired = false;
|
|
5
|
+
const detectScrollEdges = event => {
|
|
6
|
+
var _a, _b;
|
|
7
|
+
const options = getOptions();
|
|
8
|
+
if (!options.onScrollToTop && !options.onScrollToBottom) return;
|
|
9
|
+
const target = event.target;
|
|
10
|
+
if (!target) return;
|
|
11
|
+
const {
|
|
12
|
+
scrollTop,
|
|
13
|
+
scrollHeight,
|
|
14
|
+
clientHeight
|
|
15
|
+
} = target;
|
|
16
|
+
const scrollDirection = scrollTop > lastEdgeScrollTop ? 'down' : 'up';
|
|
17
|
+
const nearTop = scrollTop <= options.scrollThreshold;
|
|
18
|
+
const nearBottom = scrollHeight - (scrollTop + clientHeight) <= options.scrollThreshold;
|
|
19
|
+
if (scrollTop > options.scrollThreshold) {
|
|
20
|
+
scrollTopFired = false;
|
|
21
|
+
}
|
|
22
|
+
if (scrollHeight - (scrollTop + clientHeight) > options.scrollThreshold) {
|
|
23
|
+
scrollBottomFired = false;
|
|
24
|
+
}
|
|
25
|
+
if (nearTop && scrollDirection === 'up' && !scrollTopFired) {
|
|
26
|
+
scrollTopFired = true;
|
|
27
|
+
(_a = options.onScrollToTop) === null || _a === void 0 ? void 0 : _a.call(options);
|
|
28
|
+
}
|
|
29
|
+
if (nearBottom && scrollDirection === 'down' && !scrollBottomFired) {
|
|
30
|
+
scrollBottomFired = true;
|
|
31
|
+
(_b = options.onScrollToBottom) === null || _b === void 0 ? void 0 : _b.call(options);
|
|
32
|
+
}
|
|
33
|
+
lastEdgeScrollTop = scrollTop;
|
|
34
|
+
};
|
|
35
|
+
const resetScrollEdgeState = () => {
|
|
36
|
+
lastEdgeScrollTop = 0;
|
|
37
|
+
scrollTopFired = false;
|
|
38
|
+
scrollBottomFired = false;
|
|
39
|
+
};
|
|
40
|
+
return {
|
|
41
|
+
detectScrollEdges,
|
|
42
|
+
resetScrollEdgeState
|
|
43
|
+
};
|
|
44
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ButtonHTMLAttributes, ExtractPropTypes, PropType, SlotsType, VNode, VNodeChild } from 'vue';
|
|
2
2
|
import type { BaseWaveRef } from '../../_internal';
|
|
3
3
|
import type { ExtractPublicPropTypes, MaybeArray } from '../../_utils';
|
|
4
|
+
import type { IconProps } from '../../icon';
|
|
4
5
|
import type { ButtonSize, ButtonType } from './public-types';
|
|
5
6
|
export declare const buttonProps: {
|
|
6
7
|
readonly color: StringConstructor;
|
|
@@ -36,6 +37,7 @@ export declare const buttonProps: {
|
|
|
36
37
|
};
|
|
37
38
|
readonly dashed: BooleanConstructor;
|
|
38
39
|
readonly renderIcon: PropType<() => VNodeChild>;
|
|
40
|
+
readonly iconProps: PropType<IconProps>;
|
|
39
41
|
readonly iconPlacement: {
|
|
40
42
|
readonly type: PropType<"left" | "right">;
|
|
41
43
|
readonly default: "left";
|
|
@@ -754,6 +756,7 @@ declare const Button: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
754
756
|
};
|
|
755
757
|
readonly dashed: BooleanConstructor;
|
|
756
758
|
readonly renderIcon: PropType<() => VNodeChild>;
|
|
759
|
+
readonly iconProps: PropType<IconProps>;
|
|
757
760
|
readonly iconPlacement: {
|
|
758
761
|
readonly type: PropType<"left" | "right">;
|
|
759
762
|
readonly default: "left";
|
|
@@ -1528,6 +1531,7 @@ declare const Button: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
1528
1531
|
};
|
|
1529
1532
|
readonly dashed: BooleanConstructor;
|
|
1530
1533
|
readonly renderIcon: PropType<() => VNodeChild>;
|
|
1534
|
+
readonly iconProps: PropType<IconProps>;
|
|
1531
1535
|
readonly iconPlacement: {
|
|
1532
1536
|
readonly type: PropType<"left" | "right">;
|
|
1533
1537
|
readonly default: "left";
|
package/es/button/src/Button.mjs
CHANGED
|
@@ -8,6 +8,7 @@ import { call, color2Class, createKey, isSlotEmpty, resolveWrappedSlot, warnOnce
|
|
|
8
8
|
import { createColor, createHoverColor, createPressedColor } from "../../_utils/color/index.mjs";
|
|
9
9
|
import { isSafari } from "../../_utils/env/browser.mjs";
|
|
10
10
|
import { buttonGroupInjectionKey } from "../../button-group/src/context.mjs";
|
|
11
|
+
import { UIcon } from "../../icon/index.mjs";
|
|
11
12
|
import { buttonLight } from "../styles/index.mjs";
|
|
12
13
|
import style from "./styles/index.cssr.mjs";
|
|
13
14
|
export const buttonProps = Object.assign(Object.assign({}, useTheme.props), {
|
|
@@ -44,6 +45,7 @@ export const buttonProps = Object.assign(Object.assign({}, useTheme.props), {
|
|
|
44
45
|
},
|
|
45
46
|
dashed: Boolean,
|
|
46
47
|
renderIcon: Function,
|
|
48
|
+
iconProps: Object,
|
|
47
49
|
iconPlacement: {
|
|
48
50
|
type: String,
|
|
49
51
|
default: 'left'
|
|
@@ -517,7 +519,7 @@ const Button = defineComponent({
|
|
|
517
519
|
}, this.iconPlacement === 'right' && children, h(UFadeInExpandTransition, {
|
|
518
520
|
width: true
|
|
519
521
|
}, {
|
|
520
|
-
default: () => resolveWrappedSlot(this.$slots.icon, children => (this.loading || this.renderIcon ||
|
|
522
|
+
default: () => resolveWrappedSlot(this.$slots.icon, children => (this.loading || children || this.renderIcon || this.iconProps) && h("span", {
|
|
521
523
|
class: `${mergedClsPrefix}-button__icon`,
|
|
522
524
|
style: {
|
|
523
525
|
margin: isSlotEmpty(this.$slots.default) ? '0' : ''
|
|
@@ -532,7 +534,7 @@ const Button = defineComponent({
|
|
|
532
534
|
key: "icon",
|
|
533
535
|
class: `${mergedClsPrefix}-icon-slot`,
|
|
534
536
|
role: "none"
|
|
535
|
-
}, this.renderIcon ? this.renderIcon() :
|
|
537
|
+
}, children || (this.renderIcon ? this.renderIcon() : this.iconProps ? h(UIcon, Object.assign({}, this.iconProps)) : null))
|
|
536
538
|
})))
|
|
537
539
|
}), this.iconPlacement === 'left' && children, !this.text ? h(UBaseWave, {
|
|
538
540
|
ref: "waveElRef",
|
|
@@ -1248,6 +1248,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
1248
1248
|
sync: () => void;
|
|
1249
1249
|
handleMouseEnterWrapper: () => void;
|
|
1250
1250
|
handleMouseLeaveWrapper: () => void;
|
|
1251
|
+
resetScrollEdgeState: () => void;
|
|
1251
1252
|
} | null, ScrollbarInst | {
|
|
1252
1253
|
$el: HTMLElement;
|
|
1253
1254
|
containerRef: HTMLElement | null;
|
|
@@ -1259,6 +1260,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
1259
1260
|
sync: () => void;
|
|
1260
1261
|
handleMouseEnterWrapper: () => void;
|
|
1261
1262
|
handleMouseLeaveWrapper: () => void;
|
|
1263
|
+
resetScrollEdgeState: () => void;
|
|
1262
1264
|
} | null>;
|
|
1263
1265
|
vlInstRef: import("vue").Ref<{
|
|
1264
1266
|
listElRef: HTMLElement;
|
package/es/chat/src/Chat.d.ts
CHANGED
|
@@ -10815,11 +10815,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
10815
10815
|
themeClass: import("vue").Ref<string, string>;
|
|
10816
10816
|
onRender: () => void;
|
|
10817
10817
|
isStandalone: boolean;
|
|
10818
|
-
messagesBodyRef: import("vue").Ref<
|
|
10819
|
-
$el: HTMLElement;
|
|
10820
|
-
} | undefined, HTMLElement | {
|
|
10821
|
-
$el: HTMLElement;
|
|
10822
|
-
} | undefined>;
|
|
10818
|
+
messagesBodyRef: import("vue").Ref<import("./interface").MessagesBodyInst | undefined, import("./interface").MessagesBodyInst | undefined>;
|
|
10823
10819
|
inputValue: import("vue").WritableComputedRef<string, string>;
|
|
10824
10820
|
attachmentFileList: import("vue").Ref<{
|
|
10825
10821
|
id: string;
|
|
@@ -10875,7 +10871,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
10875
10871
|
handleFooterUpdateValue: (value: string) => void;
|
|
10876
10872
|
handleFooterSend: (value: string) => void;
|
|
10877
10873
|
cancelEditingMessage: () => void;
|
|
10878
|
-
|
|
10874
|
+
onMessagesScrollToTop: import("vue").Ref<(() => void) | undefined, (() => void) | undefined>;
|
|
10875
|
+
onMessagesScrollToBottom: import("vue").Ref<(() => void) | undefined, (() => void) | undefined>;
|
|
10879
10876
|
scrollToBottom: () => void;
|
|
10880
10877
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
|
|
10881
10878
|
readonly loading: boolean;
|
|
@@ -17549,11 +17546,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
17549
17546
|
themeClass: import("vue").Ref<string, string>;
|
|
17550
17547
|
onRender: () => void;
|
|
17551
17548
|
isStandalone: boolean;
|
|
17552
|
-
messagesBodyRef: import("vue").Ref<
|
|
17553
|
-
$el: HTMLElement;
|
|
17554
|
-
} | undefined, HTMLElement | {
|
|
17555
|
-
$el: HTMLElement;
|
|
17556
|
-
} | undefined>;
|
|
17549
|
+
messagesBodyRef: import("vue").Ref<import("./interface").MessagesBodyInst | undefined, import("./interface").MessagesBodyInst | undefined>;
|
|
17557
17550
|
inputValue: import("vue").WritableComputedRef<string, string>;
|
|
17558
17551
|
attachmentFileList: import("vue").Ref<{
|
|
17559
17552
|
id: string;
|
|
@@ -17609,7 +17602,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
17609
17602
|
handleFooterUpdateValue: (value: string) => void;
|
|
17610
17603
|
handleFooterSend: (value: string) => void;
|
|
17611
17604
|
cancelEditingMessage: () => void;
|
|
17612
|
-
|
|
17605
|
+
onMessagesScrollToTop: import("vue").Ref<(() => void) | undefined, (() => void) | undefined>;
|
|
17606
|
+
onMessagesScrollToBottom: import("vue").Ref<(() => void) | undefined, (() => void) | undefined>;
|
|
17613
17607
|
scrollToBottom: () => void;
|
|
17614
17608
|
}, {}, {}, {}, {
|
|
17615
17609
|
readonly loading: boolean;
|
|
@@ -24276,11 +24270,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
24276
24270
|
themeClass: import("vue").Ref<string, string>;
|
|
24277
24271
|
onRender: () => void;
|
|
24278
24272
|
isStandalone: boolean;
|
|
24279
|
-
messagesBodyRef: import("vue").Ref<
|
|
24280
|
-
$el: HTMLElement;
|
|
24281
|
-
} | undefined, HTMLElement | {
|
|
24282
|
-
$el: HTMLElement;
|
|
24283
|
-
} | undefined>;
|
|
24273
|
+
messagesBodyRef: import("vue").Ref<import("./interface").MessagesBodyInst | undefined, import("./interface").MessagesBodyInst | undefined>;
|
|
24284
24274
|
inputValue: import("vue").WritableComputedRef<string, string>;
|
|
24285
24275
|
attachmentFileList: import("vue").Ref<{
|
|
24286
24276
|
id: string;
|
|
@@ -24336,7 +24326,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
24336
24326
|
handleFooterUpdateValue: (value: string) => void;
|
|
24337
24327
|
handleFooterSend: (value: string) => void;
|
|
24338
24328
|
cancelEditingMessage: () => void;
|
|
24339
|
-
|
|
24329
|
+
onMessagesScrollToTop: import("vue").Ref<(() => void) | undefined, (() => void) | undefined>;
|
|
24330
|
+
onMessagesScrollToBottom: import("vue").Ref<(() => void) | undefined, (() => void) | undefined>;
|
|
24340
24331
|
scrollToBottom: () => void;
|
|
24341
24332
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
|
|
24342
24333
|
readonly loading: boolean;
|
|
@@ -31010,11 +31001,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
31010
31001
|
themeClass: import("vue").Ref<string, string>;
|
|
31011
31002
|
onRender: () => void;
|
|
31012
31003
|
isStandalone: boolean;
|
|
31013
|
-
messagesBodyRef: import("vue").Ref<
|
|
31014
|
-
$el: HTMLElement;
|
|
31015
|
-
} | undefined, HTMLElement | {
|
|
31016
|
-
$el: HTMLElement;
|
|
31017
|
-
} | undefined>;
|
|
31004
|
+
messagesBodyRef: import("vue").Ref<import("./interface").MessagesBodyInst | undefined, import("./interface").MessagesBodyInst | undefined>;
|
|
31018
31005
|
inputValue: import("vue").WritableComputedRef<string, string>;
|
|
31019
31006
|
attachmentFileList: import("vue").Ref<{
|
|
31020
31007
|
id: string;
|
|
@@ -31070,7 +31057,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
31070
31057
|
handleFooterUpdateValue: (value: string) => void;
|
|
31071
31058
|
handleFooterSend: (value: string) => void;
|
|
31072
31059
|
cancelEditingMessage: () => void;
|
|
31073
|
-
|
|
31060
|
+
onMessagesScrollToTop: import("vue").Ref<(() => void) | undefined, (() => void) | undefined>;
|
|
31061
|
+
onMessagesScrollToBottom: import("vue").Ref<(() => void) | undefined, (() => void) | undefined>;
|
|
31074
31062
|
scrollToBottom: () => void;
|
|
31075
31063
|
}, {}, {}, {}, {
|
|
31076
31064
|
readonly loading: boolean;
|
|
@@ -5,7 +5,7 @@ import type { ButtonProps } from '../../button';
|
|
|
5
5
|
import type { IconProps } from '../../icon';
|
|
6
6
|
import type { InputProps } from '../../input';
|
|
7
7
|
import type { UploadFileInfo, UploadProps } from '../../upload';
|
|
8
|
-
import type { ChatBubbleAction, ChatId, ChatListItemData, ChatMessageData, HandleOnChangeType, OnAttachmentDownload, OnAttachmentUpload, OnMessageSend } from './interface';
|
|
8
|
+
import type { ChatBubbleAction, ChatId, ChatListItemData, ChatMessageData, HandleOnChangeType, MessagesBodyInst, OnAttachmentDownload, OnAttachmentUpload, OnMessageSend } from './interface';
|
|
9
9
|
export declare const chatMainAreaProps: {
|
|
10
10
|
readonly selectedChat: {
|
|
11
11
|
readonly type: PropType<ChatListItemData>;
|
|
@@ -9430,11 +9430,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
9430
9430
|
themeClass: Ref<string, string>;
|
|
9431
9431
|
onRender: () => void;
|
|
9432
9432
|
isStandalone: boolean;
|
|
9433
|
-
messagesBodyRef: Ref<
|
|
9434
|
-
$el: HTMLElement;
|
|
9435
|
-
} | undefined, HTMLElement | {
|
|
9436
|
-
$el: HTMLElement;
|
|
9437
|
-
} | undefined>;
|
|
9433
|
+
messagesBodyRef: Ref<MessagesBodyInst | undefined, MessagesBodyInst | undefined>;
|
|
9438
9434
|
inputValue: import("vue").WritableComputedRef<string, string>;
|
|
9439
9435
|
attachmentFileList: Ref<{
|
|
9440
9436
|
id: string;
|
|
@@ -9490,7 +9486,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
9490
9486
|
handleFooterUpdateValue: (value: string) => void;
|
|
9491
9487
|
handleFooterSend: (value: string) => void;
|
|
9492
9488
|
cancelEditingMessage: () => void;
|
|
9493
|
-
|
|
9489
|
+
onMessagesScrollToTop: Ref<(() => void) | undefined, (() => void) | undefined>;
|
|
9490
|
+
onMessagesScrollToBottom: Ref<(() => void) | undefined, (() => void) | undefined>;
|
|
9494
9491
|
scrollToBottom: () => void;
|
|
9495
9492
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
9496
9493
|
readonly selectedChat: {
|
|
@@ -401,9 +401,6 @@ export default defineComponent({
|
|
|
401
401
|
});
|
|
402
402
|
const attachmentFileList = ref([]);
|
|
403
403
|
const uploadedAttachmentsMap = ref(new Map());
|
|
404
|
-
const lastScrollTop = ref(0);
|
|
405
|
-
const scrollTopFired = ref(false);
|
|
406
|
-
const scrollBottomFired = ref(false);
|
|
407
404
|
const editingMessage = ref(null);
|
|
408
405
|
const unreadMessagesCount = computed(() => {
|
|
409
406
|
if (!messagesRef.value) return 0;
|
|
@@ -421,9 +418,8 @@ export default defineComponent({
|
|
|
421
418
|
const unreadBeforeRead = unreadCountsBeforeReadRef.value[newChat.id] || 0;
|
|
422
419
|
unreadCountOnOpen.value = unreadBeforeRead;
|
|
423
420
|
lastMessageId.value = null;
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
scrollBottomFired.value = false;
|
|
421
|
+
const scrollbarInst = messagesBodyRef.value;
|
|
422
|
+
if (scrollbarInst && 'resetScrollEdgeState' in scrollbarInst) scrollbarInst.resetScrollEdgeState();
|
|
427
423
|
shouldScrollOnLoad.value = true;
|
|
428
424
|
attachmentFileList.value = [];
|
|
429
425
|
uploadedAttachmentsMap.value.clear();
|
|
@@ -487,35 +483,6 @@ export default defineComponent({
|
|
|
487
483
|
const showUnreadNotification = computed(() => {
|
|
488
484
|
return hasUnreadMessages.value && showNotificationManually.value;
|
|
489
485
|
});
|
|
490
|
-
const handleMessagesScroll = e => {
|
|
491
|
-
var _a, _b;
|
|
492
|
-
const target = e.target;
|
|
493
|
-
if (!target) return;
|
|
494
|
-
const {
|
|
495
|
-
scrollTop,
|
|
496
|
-
scrollHeight,
|
|
497
|
-
clientHeight
|
|
498
|
-
} = target;
|
|
499
|
-
const threshold = 5;
|
|
500
|
-
const scrollDirection = scrollTop > lastScrollTop.value ? 'down' : 'up';
|
|
501
|
-
const nearTop = scrollTop <= threshold;
|
|
502
|
-
const nearBottom = scrollHeight - (scrollTop + clientHeight) <= threshold;
|
|
503
|
-
if (scrollTop > threshold) {
|
|
504
|
-
scrollTopFired.value = false;
|
|
505
|
-
}
|
|
506
|
-
if (scrollHeight - (scrollTop + clientHeight) > threshold) {
|
|
507
|
-
scrollBottomFired.value = false;
|
|
508
|
-
}
|
|
509
|
-
if (nearTop && scrollDirection === 'up' && !scrollTopFired.value) {
|
|
510
|
-
scrollTopFired.value = true;
|
|
511
|
-
(_a = onMessagesScrollToTop === null || onMessagesScrollToTop === void 0 ? void 0 : onMessagesScrollToTop.value) === null || _a === void 0 ? void 0 : _a.call(onMessagesScrollToTop);
|
|
512
|
-
}
|
|
513
|
-
if (nearBottom && scrollDirection === 'down' && !scrollBottomFired.value) {
|
|
514
|
-
scrollBottomFired.value = true;
|
|
515
|
-
(_b = onMessagesScrollToBottom === null || onMessagesScrollToBottom === void 0 ? void 0 : onMessagesScrollToBottom.value) === null || _b === void 0 ? void 0 : _b.call(onMessagesScrollToBottom);
|
|
516
|
-
}
|
|
517
|
-
lastScrollTop.value = scrollTop;
|
|
518
|
-
};
|
|
519
486
|
function scrollToBottom() {
|
|
520
487
|
const element = messagesBodyRef.value;
|
|
521
488
|
if (!element) return;
|
|
@@ -754,7 +721,8 @@ export default defineComponent({
|
|
|
754
721
|
handleFooterUpdateValue,
|
|
755
722
|
handleFooterSend,
|
|
756
723
|
cancelEditingMessage,
|
|
757
|
-
|
|
724
|
+
onMessagesScrollToTop,
|
|
725
|
+
onMessagesScrollToBottom,
|
|
758
726
|
scrollToBottom
|
|
759
727
|
};
|
|
760
728
|
},
|
|
@@ -771,7 +739,14 @@ export default defineComponent({
|
|
|
771
739
|
}), h(USafeTopScrollbar, {
|
|
772
740
|
ref: "messagesBodyRef",
|
|
773
741
|
class: `${mergedClsPrefix}-chat-main__body`,
|
|
774
|
-
|
|
742
|
+
onScrollToTop: () => {
|
|
743
|
+
var _a;
|
|
744
|
+
return (_a = this.onMessagesScrollToTop) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
745
|
+
},
|
|
746
|
+
onScrollToBottom: () => {
|
|
747
|
+
var _a;
|
|
748
|
+
return (_a = this.onMessagesScrollToBottom) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
749
|
+
}
|
|
775
750
|
}, {
|
|
776
751
|
default: () => h(ChatMessagesArea, {
|
|
777
752
|
showUnreadNotification: this.showUnreadNotification,
|
|
@@ -9114,7 +9114,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
9114
9114
|
}>> & Readonly<{}>, {
|
|
9115
9115
|
readonly disabled: boolean;
|
|
9116
9116
|
readonly show: boolean;
|
|
9117
|
-
readonly buttonProps: Partial<ButtonProps>;
|
|
9118
9117
|
readonly iconProps: Partial<IconProps>;
|
|
9118
|
+
readonly buttonProps: Partial<ButtonProps>;
|
|
9119
9119
|
}, SlotsType<ChatAttachmentButtonSlots>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
9120
9120
|
export default _default;
|
|
@@ -9225,12 +9225,12 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
9225
9225
|
readonly closeButtonText: string;
|
|
9226
9226
|
readonly shareButtonTooltip: string;
|
|
9227
9227
|
readonly profileButtonTooltip: string;
|
|
9228
|
+
readonly iconProps: Partial<IconProps>;
|
|
9228
9229
|
readonly typingChatIds: import("../../interface").ChatId[];
|
|
9229
9230
|
readonly onChatClose: VoidFunction;
|
|
9230
9231
|
readonly onChatShare: VoidFunction;
|
|
9231
9232
|
readonly onUserProfile: VoidFunction;
|
|
9232
9233
|
readonly buttonProps: Partial<ButtonProps>;
|
|
9233
|
-
readonly iconProps: Partial<IconProps>;
|
|
9234
9234
|
readonly selectedChat: ChatListItemData;
|
|
9235
9235
|
readonly shareButtonProps: Partial<ButtonProps>;
|
|
9236
9236
|
readonly profileButtonProps: Partial<ButtonProps>;
|
|
@@ -7,6 +7,7 @@ import type { ButtonProps } from '../../button';
|
|
|
7
7
|
import type { EmptyProps } from '../../empty';
|
|
8
8
|
import type { IconProps } from '../../icon';
|
|
9
9
|
import type { InputProps } from '../../input';
|
|
10
|
+
import type { SafeTopScrollbarInst } from '../../safe-top-scrollbar';
|
|
10
11
|
import type { UploadProps } from '../../upload';
|
|
11
12
|
import type { OnChangePayload } from '../../upload/src/interface';
|
|
12
13
|
import type { ChatTheme } from '../styles';
|
|
@@ -250,6 +251,7 @@ export interface ChatListInst {
|
|
|
250
251
|
addItem: (item: ChatListItemData) => void;
|
|
251
252
|
removeItem: (key: ChatId) => void;
|
|
252
253
|
}
|
|
254
|
+
export type MessagesBodyInst = HTMLElement | SafeTopScrollbarInst;
|
|
253
255
|
export type HandleOnChangeType = ((data: OnChangePayload) => void) | undefined;
|
|
254
256
|
export type OnChatSelect = (key: ChatId, item: ChatListItemData) => void;
|
|
255
257
|
export type OnMessageSend = (content: string, attachments?: ChatAttachment[]) => void;
|