@uzum-tech/ui 2.4.3 → 2.4.5
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 +274 -84
- package/dist/index.mjs +274 -84
- 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/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/interface.d.ts +2 -0
- package/es/components.d.ts +109 -31
- package/es/data-table/src/ColumnSettings/ColumnSettingsDrawer.d.ts +2 -2
- package/es/data-table/src/ColumnSettings/ColumnSettingsDrawer.mjs +1 -1
- package/es/data-table/src/DataTable.d.ts +14 -0
- package/es/data-table/src/DataTable.mjs +18 -13
- package/es/data-table/src/TableParts/Body.d.ts +2 -0
- package/es/data-table/src/interface.d.ts +160 -151
- package/es/data-table/src/interface.mjs +13 -7
- package/es/data-table/src/use-column-settings.mjs +4 -1
- package/es/data-table/src/use-resizable.d.ts +2 -0
- package/es/data-table/src/use-resizable.mjs +9 -1
- 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/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/locales/common/ruRU.mjs +1 -1
- 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/upload/src/Upload.d.ts +21 -0
- package/es/upload/src/Upload.mjs +7 -1
- package/es/upload/src/UploadFile.d.ts +6 -0
- package/es/upload/src/UploadFile.mjs +12 -8
- package/es/upload/src/UploadFileList.mjs +3 -2
- package/es/upload/src/UploadProgress.d.ts +6 -0
- package/es/upload/src/interface.d.ts +10 -1
- package/es/upload/src/styles/index.cssr.mjs +84 -1
- package/es/upload/src/useUploadActionsRender.mjs +10 -5
- package/es/upload/styles/light.d.ts +6 -0
- package/es/upload/styles/light.mjs +4 -0
- 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/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/interface.d.ts +2 -0
- package/lib/components.d.ts +109 -31
- package/lib/data-table/src/ColumnSettings/ColumnSettingsDrawer.d.ts +2 -2
- package/lib/data-table/src/ColumnSettings/ColumnSettingsDrawer.js +1 -1
- package/lib/data-table/src/DataTable.d.ts +14 -0
- package/lib/data-table/src/DataTable.js +16 -14
- package/lib/data-table/src/TableParts/Body.d.ts +2 -0
- package/lib/data-table/src/interface.d.ts +160 -151
- package/lib/data-table/src/interface.js +11 -8
- package/lib/data-table/src/use-column-settings.js +6 -1
- package/lib/data-table/src/use-resizable.d.ts +2 -0
- package/lib/data-table/src/use-resizable.js +9 -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/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/locales/common/ruRU.js +1 -1
- 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/upload/src/Upload.d.ts +21 -0
- package/lib/upload/src/Upload.js +5 -2
- package/lib/upload/src/UploadFile.d.ts +6 -0
- package/lib/upload/src/UploadFile.js +19 -11
- package/lib/upload/src/UploadFileList.js +5 -1
- package/lib/upload/src/UploadProgress.d.ts +6 -0
- package/lib/upload/src/interface.d.ts +10 -1
- package/lib/upload/src/styles/index.cssr.js +84 -1
- package/lib/upload/src/useUploadActionsRender.js +17 -7
- package/lib/upload/styles/light.d.ts +6 -0
- package/lib/upload/styles/light.js +4 -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 +73 -10
|
@@ -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";
|
|
@@ -11,6 +11,7 @@ const vue_1 = require("vue");
|
|
|
11
11
|
const vueuc_1 = require("vueuc");
|
|
12
12
|
const _mixins_1 = require("../../../_mixins");
|
|
13
13
|
const _utils_1 = require("../../../_utils");
|
|
14
|
+
const use_scroll_edge_detector_1 = require("../../../_utils/composable/use-scroll-edge-detector");
|
|
14
15
|
const styles_1 = require("../styles");
|
|
15
16
|
const index_cssr_1 = __importDefault(require("./styles/index.cssr"));
|
|
16
17
|
const safeTopscrollbarProps = Object.assign(Object.assign({}, _mixins_1.useTheme.props), { duration: {
|
|
@@ -24,7 +25,10 @@ const safeTopscrollbarProps = Object.assign(Object.assign({}, _mixins_1.useTheme
|
|
|
24
25
|
default: 'hover'
|
|
25
26
|
}, useUnifiedContainer: Boolean, triggerDisplayManually: Boolean,
|
|
26
27
|
// If container is set, resize observer won't not attached
|
|
27
|
-
container: Function, content: Function, containerClass: String, containerStyle: [String, Object], contentClass: [String, Array], contentStyle: [String, Object], horizontalRailStyle: [String, Object], verticalRailStyle: [String, Object], onScroll: Function, onWheel: Function, onResize: Function,
|
|
28
|
+
container: Function, content: Function, containerClass: String, containerStyle: [String, Object], contentClass: [String, Array], contentStyle: [String, Object], horizontalRailStyle: [String, Object], verticalRailStyle: [String, Object], onScroll: Function, onWheel: Function, onResize: Function, onScrollToTop: Function, onScrollToBottom: Function, scrollThreshold: {
|
|
29
|
+
type: Number,
|
|
30
|
+
default: 5
|
|
31
|
+
}, internalOnUpdateScrollLeft: Function, internalHoistYRail: Boolean, yPlacement: {
|
|
28
32
|
type: String,
|
|
29
33
|
default: 'right'
|
|
30
34
|
}, xPlacement: {
|
|
@@ -65,6 +69,7 @@ const SafeTopScrollbar = (0, vue_1.defineComponent)({
|
|
|
65
69
|
let memoMouseY = 0;
|
|
66
70
|
let previousScrollHeight = 0;
|
|
67
71
|
let previousScrollTop = 0;
|
|
72
|
+
const { detectScrollEdges, resetScrollEdgeState } = (0, use_scroll_edge_detector_1.useScrollEdgeDetector)(() => props);
|
|
68
73
|
const isIos = (0, vooks_1.useIsIos)();
|
|
69
74
|
const themeRef = (0, _mixins_1.useTheme)('SafeTopScrollbar', '-safe-top-scrollbar', index_cssr_1.default, styles_1.scrollbarLight, props, mergedClsPrefixRef);
|
|
70
75
|
const yBarSizeRef = (0, vue_1.computed)(() => {
|
|
@@ -327,6 +332,7 @@ const SafeTopScrollbar = (0, vue_1.defineComponent)({
|
|
|
327
332
|
previousScrollTop = container.scrollTop;
|
|
328
333
|
}
|
|
329
334
|
syncScrollState();
|
|
335
|
+
detectScrollEdges(e);
|
|
330
336
|
}
|
|
331
337
|
function syncScrollState() {
|
|
332
338
|
// only collect scroll state, do not trigger any dom event
|
|
@@ -617,7 +623,8 @@ const SafeTopScrollbar = (0, vue_1.defineComponent)({
|
|
|
617
623
|
handleMouseEnterWrapper,
|
|
618
624
|
handleMouseLeaveWrapper,
|
|
619
625
|
getScrollState,
|
|
620
|
-
adjustScrollTop
|
|
626
|
+
adjustScrollTop,
|
|
627
|
+
resetScrollEdgeState
|
|
621
628
|
};
|
|
622
629
|
return Object.assign(Object.assign({}, exposedMethods), { mergedClsPrefix: mergedClsPrefixRef, rtlEnabled: rtlEnabledRef, containerScrollTop: containerScrollTopRef, wrapperRef,
|
|
623
630
|
containerRef,
|
|
@@ -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";
|
|
@@ -11,6 +11,7 @@ const vue_1 = require("vue");
|
|
|
11
11
|
const vueuc_1 = require("vueuc");
|
|
12
12
|
const _mixins_1 = require("../../../_mixins");
|
|
13
13
|
const _utils_1 = require("../../../_utils");
|
|
14
|
+
const use_scroll_edge_detector_1 = require("../../../_utils/composable/use-scroll-edge-detector");
|
|
14
15
|
const styles_1 = require("../styles");
|
|
15
16
|
const index_cssr_1 = __importDefault(require("./styles/index.cssr"));
|
|
16
17
|
const scrollbarProps = Object.assign(Object.assign({}, _mixins_1.useTheme.props), { duration: {
|
|
@@ -24,7 +25,10 @@ const scrollbarProps = Object.assign(Object.assign({}, _mixins_1.useTheme.props)
|
|
|
24
25
|
default: 'hover'
|
|
25
26
|
}, useUnifiedContainer: Boolean, triggerDisplayManually: Boolean,
|
|
26
27
|
// If container is set, resize observer won't not attached
|
|
27
|
-
container: Function, content: Function, containerClass: String, containerStyle: [String, Object], contentClass: [String, Array], contentStyle: [String, Object], horizontalRailStyle: [String, Object], verticalRailStyle: [String, Object], onScroll: Function, onWheel: Function, onResize: Function,
|
|
28
|
+
container: Function, content: Function, containerClass: String, containerStyle: [String, Object], contentClass: [String, Array], contentStyle: [String, Object], horizontalRailStyle: [String, Object], verticalRailStyle: [String, Object], onScroll: Function, onWheel: Function, onResize: Function, onScrollToTop: Function, onScrollToBottom: Function, scrollThreshold: {
|
|
29
|
+
type: Number,
|
|
30
|
+
default: 5
|
|
31
|
+
}, internalOnUpdateScrollLeft: Function, internalHoistYRail: Boolean, yPlacement: {
|
|
28
32
|
type: String,
|
|
29
33
|
default: 'right'
|
|
30
34
|
}, xPlacement: {
|
|
@@ -63,6 +67,7 @@ const Scrollbar = (0, vue_1.defineComponent)({
|
|
|
63
67
|
let memoXLeft = 0;
|
|
64
68
|
let memoMouseX = 0;
|
|
65
69
|
let memoMouseY = 0;
|
|
70
|
+
const { detectScrollEdges, resetScrollEdgeState } = (0, use_scroll_edge_detector_1.useScrollEdgeDetector)(() => props);
|
|
66
71
|
const isIos = (0, vooks_1.useIsIos)();
|
|
67
72
|
const themeRef = (0, _mixins_1.useTheme)('Scrollbar', '-scrollbar', index_cssr_1.default, styles_1.scrollbarLight, props, mergedClsPrefixRef);
|
|
68
73
|
const yBarSizeRef = (0, vue_1.computed)(() => {
|
|
@@ -306,6 +311,7 @@ const Scrollbar = (0, vue_1.defineComponent)({
|
|
|
306
311
|
if (onScroll)
|
|
307
312
|
onScroll(e);
|
|
308
313
|
syncScrollState();
|
|
314
|
+
detectScrollEdges(e);
|
|
309
315
|
}
|
|
310
316
|
function syncScrollState() {
|
|
311
317
|
// only collect scroll state, do not trigger any dom event
|
|
@@ -565,7 +571,8 @@ const Scrollbar = (0, vue_1.defineComponent)({
|
|
|
565
571
|
sync,
|
|
566
572
|
syncUnifiedContainer,
|
|
567
573
|
handleMouseEnterWrapper,
|
|
568
|
-
handleMouseLeaveWrapper
|
|
574
|
+
handleMouseLeaveWrapper,
|
|
575
|
+
resetScrollEdgeState
|
|
569
576
|
};
|
|
570
577
|
return Object.assign(Object.assign({}, exposedMethods), { mergedClsPrefix: mergedClsPrefixRef, rtlEnabled: rtlEnabledRef, containerScrollTop: containerScrollTopRef, wrapperRef,
|
|
571
578
|
containerRef,
|
|
@@ -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,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useScrollEdgeDetector = useScrollEdgeDetector;
|
|
4
|
+
function useScrollEdgeDetector(getOptions) {
|
|
5
|
+
let lastEdgeScrollTop = 0;
|
|
6
|
+
let scrollTopFired = false;
|
|
7
|
+
let scrollBottomFired = false;
|
|
8
|
+
const detectScrollEdges = (event) => {
|
|
9
|
+
var _a, _b;
|
|
10
|
+
const options = getOptions();
|
|
11
|
+
if (!options.onScrollToTop && !options.onScrollToBottom)
|
|
12
|
+
return;
|
|
13
|
+
const target = event.target;
|
|
14
|
+
if (!target)
|
|
15
|
+
return;
|
|
16
|
+
const { scrollTop, scrollHeight, clientHeight } = target;
|
|
17
|
+
const scrollDirection = scrollTop > lastEdgeScrollTop ? 'down' : 'up';
|
|
18
|
+
const nearTop = scrollTop <= options.scrollThreshold;
|
|
19
|
+
const nearBottom = scrollHeight - (scrollTop + clientHeight) <= options.scrollThreshold;
|
|
20
|
+
if (scrollTop > options.scrollThreshold) {
|
|
21
|
+
scrollTopFired = false;
|
|
22
|
+
}
|
|
23
|
+
if (scrollHeight - (scrollTop + clientHeight) > options.scrollThreshold) {
|
|
24
|
+
scrollBottomFired = false;
|
|
25
|
+
}
|
|
26
|
+
if (nearTop && scrollDirection === 'up' && !scrollTopFired) {
|
|
27
|
+
scrollTopFired = true;
|
|
28
|
+
(_a = options.onScrollToTop) === null || _a === void 0 ? void 0 : _a.call(options);
|
|
29
|
+
}
|
|
30
|
+
if (nearBottom && scrollDirection === 'down' && !scrollBottomFired) {
|
|
31
|
+
scrollBottomFired = true;
|
|
32
|
+
(_b = options.onScrollToBottom) === null || _b === void 0 ? void 0 : _b.call(options);
|
|
33
|
+
}
|
|
34
|
+
lastEdgeScrollTop = scrollTop;
|
|
35
|
+
};
|
|
36
|
+
const resetScrollEdgeState = () => {
|
|
37
|
+
lastEdgeScrollTop = 0;
|
|
38
|
+
scrollTopFired = false;
|
|
39
|
+
scrollBottomFired = false;
|
|
40
|
+
};
|
|
41
|
+
return { detectScrollEdges, resetScrollEdgeState };
|
|
42
|
+
}
|
|
@@ -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/lib/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: {
|
|
@@ -274,9 +274,6 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
274
274
|
});
|
|
275
275
|
const attachmentFileList = (0, vue_1.ref)([]);
|
|
276
276
|
const uploadedAttachmentsMap = (0, vue_1.ref)(new Map());
|
|
277
|
-
const lastScrollTop = (0, vue_1.ref)(0);
|
|
278
|
-
const scrollTopFired = (0, vue_1.ref)(false);
|
|
279
|
-
const scrollBottomFired = (0, vue_1.ref)(false);
|
|
280
277
|
const editingMessage = (0, vue_1.ref)(null);
|
|
281
278
|
const unreadMessagesCount = (0, vue_1.computed)(() => {
|
|
282
279
|
if (!messagesRef.value)
|
|
@@ -295,9 +292,9 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
295
292
|
const unreadBeforeRead = unreadCountsBeforeReadRef.value[newChat.id] || 0;
|
|
296
293
|
unreadCountOnOpen.value = unreadBeforeRead;
|
|
297
294
|
lastMessageId.value = null;
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
295
|
+
const scrollbarInst = messagesBodyRef.value;
|
|
296
|
+
if (scrollbarInst && 'resetScrollEdgeState' in scrollbarInst)
|
|
297
|
+
scrollbarInst.resetScrollEdgeState();
|
|
301
298
|
shouldScrollOnLoad.value = true;
|
|
302
299
|
attachmentFileList.value = [];
|
|
303
300
|
uploadedAttachmentsMap.value.clear();
|
|
@@ -361,34 +358,6 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
361
358
|
const showUnreadNotification = (0, vue_1.computed)(() => {
|
|
362
359
|
return hasUnreadMessages.value && showNotificationManually.value;
|
|
363
360
|
});
|
|
364
|
-
const handleMessagesScroll = (e) => {
|
|
365
|
-
var _a, _b;
|
|
366
|
-
const target = e.target;
|
|
367
|
-
if (!target)
|
|
368
|
-
return;
|
|
369
|
-
const { scrollTop, scrollHeight, clientHeight } = target;
|
|
370
|
-
const threshold = 5;
|
|
371
|
-
const scrollDirection = scrollTop > lastScrollTop.value ? 'down' : 'up';
|
|
372
|
-
const nearTop = scrollTop <= threshold;
|
|
373
|
-
const nearBottom = scrollHeight - (scrollTop + clientHeight) <= threshold;
|
|
374
|
-
if (scrollTop > threshold) {
|
|
375
|
-
scrollTopFired.value = false;
|
|
376
|
-
}
|
|
377
|
-
if (scrollHeight - (scrollTop + clientHeight) > threshold) {
|
|
378
|
-
scrollBottomFired.value = false;
|
|
379
|
-
}
|
|
380
|
-
if (nearTop && scrollDirection === 'up' && !scrollTopFired.value) {
|
|
381
|
-
scrollTopFired.value = true;
|
|
382
|
-
(_a = onMessagesScrollToTop === null || onMessagesScrollToTop === void 0 ? void 0 : onMessagesScrollToTop.value) === null || _a === void 0 ? void 0 : _a.call(onMessagesScrollToTop);
|
|
383
|
-
}
|
|
384
|
-
if (nearBottom
|
|
385
|
-
&& scrollDirection === 'down'
|
|
386
|
-
&& !scrollBottomFired.value) {
|
|
387
|
-
scrollBottomFired.value = true;
|
|
388
|
-
(_b = onMessagesScrollToBottom === null || onMessagesScrollToBottom === void 0 ? void 0 : onMessagesScrollToBottom.value) === null || _b === void 0 ? void 0 : _b.call(onMessagesScrollToBottom);
|
|
389
|
-
}
|
|
390
|
-
lastScrollTop.value = scrollTop;
|
|
391
|
-
};
|
|
392
361
|
function scrollToBottom() {
|
|
393
362
|
const element = messagesBodyRef.value;
|
|
394
363
|
if (!element)
|
|
@@ -633,7 +602,8 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
633
602
|
handleFooterUpdateValue,
|
|
634
603
|
handleFooterSend,
|
|
635
604
|
cancelEditingMessage,
|
|
636
|
-
|
|
605
|
+
onMessagesScrollToTop,
|
|
606
|
+
onMessagesScrollToBottom,
|
|
637
607
|
scrollToBottom
|
|
638
608
|
};
|
|
639
609
|
},
|
|
@@ -646,7 +616,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
646
616
|
this.isStandalone && `${mergedClsPrefix}-chat-main--standalone`
|
|
647
617
|
] },
|
|
648
618
|
!this.isStandalone && ((0, vue_1.h)(ChatHeader_1.default, null, { actions: this.$slots.headerActions })),
|
|
649
|
-
(0, vue_1.h)(safe_top_scrollbar_1.USafeTopScrollbar, { ref: "messagesBodyRef", class: `${mergedClsPrefix}-chat-main__body`,
|
|
619
|
+
(0, vue_1.h)(safe_top_scrollbar_1.USafeTopScrollbar, { ref: "messagesBodyRef", class: `${mergedClsPrefix}-chat-main__body`, onScrollToTop: () => { var _a; return (_a = this.onMessagesScrollToTop) === null || _a === void 0 ? void 0 : _a.call(this); }, onScrollToBottom: () => { var _a; return (_a = this.onMessagesScrollToBottom) === null || _a === void 0 ? void 0 : _a.call(this); } }, {
|
|
650
620
|
default: () => ((0, vue_1.h)(ChatMessagesArea_1.default, { showUnreadNotification: this.showUnreadNotification, unreadNotificationCount: this.unreadCountOnOpen }, {
|
|
651
621
|
messageAttachment: this.$slots.messageAttachment,
|
|
652
622
|
messageAttachmentTitle: this.$slots.messageAttachmentTitle,
|
|
@@ -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;
|