@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
package/dist/index.mjs
CHANGED
|
@@ -11550,7 +11550,7 @@ const ruRu = {
|
|
|
11550
11550
|
uncheckTableAll: "\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u0432\u0441\u0435 \u0432 \u0442\u0430\u0431\u043B\u0438\u0446\u0435",
|
|
11551
11551
|
confirm: "\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C",
|
|
11552
11552
|
clear: "\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C",
|
|
11553
|
-
columnSettingsTitle: "\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\
|
|
11553
|
+
columnSettingsTitle: "\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0430 \u0442\u0430\u0431\u043B\u0438\u0446\u044B",
|
|
11554
11554
|
columnSettingsButton: "\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0430 \u0442\u0430\u0431\u043B\u0438\u0446\u044B",
|
|
11555
11555
|
columnSettingsSubtitle: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043A\u043E\u043B\u043E\u043D\u043A\u0438 \u0438 \u0438\u0437\u043C\u0435\u043D\u0438\u0442\u0435 \u0438\u0445 \u043F\u043E\u0440\u044F\u0434\u043E\u043A",
|
|
11556
11556
|
columnSettingsSelectAll: "\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0432\u0441\u0435",
|
|
@@ -17272,6 +17272,50 @@ function useRadio(props) {
|
|
|
17272
17272
|
};
|
|
17273
17273
|
}
|
|
17274
17274
|
|
|
17275
|
+
function useScrollEdgeDetector(getOptions) {
|
|
17276
|
+
let lastEdgeScrollTop = 0;
|
|
17277
|
+
let scrollTopFired = false;
|
|
17278
|
+
let scrollBottomFired = false;
|
|
17279
|
+
const detectScrollEdges = event => {
|
|
17280
|
+
const options = getOptions();
|
|
17281
|
+
if (!options.onScrollToTop && !options.onScrollToBottom) return;
|
|
17282
|
+
const target = event.target;
|
|
17283
|
+
if (!target) return;
|
|
17284
|
+
const {
|
|
17285
|
+
scrollTop,
|
|
17286
|
+
scrollHeight,
|
|
17287
|
+
clientHeight
|
|
17288
|
+
} = target;
|
|
17289
|
+
const scrollDirection = scrollTop > lastEdgeScrollTop ? "down" : "up";
|
|
17290
|
+
const nearTop = scrollTop <= options.scrollThreshold;
|
|
17291
|
+
const nearBottom = scrollHeight - (scrollTop + clientHeight) <= options.scrollThreshold;
|
|
17292
|
+
if (scrollTop > options.scrollThreshold) {
|
|
17293
|
+
scrollTopFired = false;
|
|
17294
|
+
}
|
|
17295
|
+
if (scrollHeight - (scrollTop + clientHeight) > options.scrollThreshold) {
|
|
17296
|
+
scrollBottomFired = false;
|
|
17297
|
+
}
|
|
17298
|
+
if (nearTop && scrollDirection === "up" && !scrollTopFired) {
|
|
17299
|
+
scrollTopFired = true;
|
|
17300
|
+
options.onScrollToTop?.();
|
|
17301
|
+
}
|
|
17302
|
+
if (nearBottom && scrollDirection === "down" && !scrollBottomFired) {
|
|
17303
|
+
scrollBottomFired = true;
|
|
17304
|
+
options.onScrollToBottom?.();
|
|
17305
|
+
}
|
|
17306
|
+
lastEdgeScrollTop = scrollTop;
|
|
17307
|
+
};
|
|
17308
|
+
const resetScrollEdgeState = () => {
|
|
17309
|
+
lastEdgeScrollTop = 0;
|
|
17310
|
+
scrollTopFired = false;
|
|
17311
|
+
scrollBottomFired = false;
|
|
17312
|
+
};
|
|
17313
|
+
return {
|
|
17314
|
+
detectScrollEdges,
|
|
17315
|
+
resetScrollEdgeState
|
|
17316
|
+
};
|
|
17317
|
+
}
|
|
17318
|
+
|
|
17275
17319
|
const commonVars$a = {
|
|
17276
17320
|
railInsetHorizontalBottom: "auto 2px 4px 2px",
|
|
17277
17321
|
railInsetHorizontalTop: "4px 2px auto 2px",
|
|
@@ -17417,6 +17461,12 @@ const safeTopscrollbarProps = {
|
|
|
17417
17461
|
onScroll: Function,
|
|
17418
17462
|
onWheel: Function,
|
|
17419
17463
|
onResize: Function,
|
|
17464
|
+
onScrollToTop: Function,
|
|
17465
|
+
onScrollToBottom: Function,
|
|
17466
|
+
scrollThreshold: {
|
|
17467
|
+
type: Number,
|
|
17468
|
+
default: 5
|
|
17469
|
+
},
|
|
17420
17470
|
internalOnUpdateScrollLeft: Function,
|
|
17421
17471
|
internalHoistYRail: Boolean,
|
|
17422
17472
|
yPlacement: {
|
|
@@ -17464,6 +17514,9 @@ const SafeTopScrollbar$1 = defineComponent({
|
|
|
17464
17514
|
let memoMouseY = 0;
|
|
17465
17515
|
let previousScrollHeight = 0;
|
|
17466
17516
|
let previousScrollTop = 0;
|
|
17517
|
+
const { detectScrollEdges, resetScrollEdgeState } = useScrollEdgeDetector(
|
|
17518
|
+
() => props
|
|
17519
|
+
);
|
|
17467
17520
|
const isIos = useIsIos();
|
|
17468
17521
|
const themeRef = useTheme(
|
|
17469
17522
|
"SafeTopScrollbar",
|
|
@@ -17716,6 +17769,7 @@ const SafeTopScrollbar$1 = defineComponent({
|
|
|
17716
17769
|
previousScrollTop = container.scrollTop;
|
|
17717
17770
|
}
|
|
17718
17771
|
syncScrollState();
|
|
17772
|
+
detectScrollEdges(e);
|
|
17719
17773
|
}
|
|
17720
17774
|
function syncScrollState() {
|
|
17721
17775
|
const { value: container } = mergedContainerRef;
|
|
@@ -18017,7 +18071,8 @@ const SafeTopScrollbar$1 = defineComponent({
|
|
|
18017
18071
|
handleMouseEnterWrapper,
|
|
18018
18072
|
handleMouseLeaveWrapper,
|
|
18019
18073
|
getScrollState,
|
|
18020
|
-
adjustScrollTop
|
|
18074
|
+
adjustScrollTop,
|
|
18075
|
+
resetScrollEdgeState
|
|
18021
18076
|
};
|
|
18022
18077
|
return {
|
|
18023
18078
|
...exposedMethods,
|
|
@@ -18344,6 +18399,12 @@ const scrollbarProps$1 = {
|
|
|
18344
18399
|
onScroll: Function,
|
|
18345
18400
|
onWheel: Function,
|
|
18346
18401
|
onResize: Function,
|
|
18402
|
+
onScrollToTop: Function,
|
|
18403
|
+
onScrollToBottom: Function,
|
|
18404
|
+
scrollThreshold: {
|
|
18405
|
+
type: Number,
|
|
18406
|
+
default: 5
|
|
18407
|
+
},
|
|
18347
18408
|
internalOnUpdateScrollLeft: Function,
|
|
18348
18409
|
internalHoistYRail: Boolean,
|
|
18349
18410
|
yPlacement: {
|
|
@@ -18385,6 +18446,9 @@ const Scrollbar$1 = defineComponent({
|
|
|
18385
18446
|
let memoXLeft = 0;
|
|
18386
18447
|
let memoMouseX = 0;
|
|
18387
18448
|
let memoMouseY = 0;
|
|
18449
|
+
const { detectScrollEdges, resetScrollEdgeState } = useScrollEdgeDetector(
|
|
18450
|
+
() => props
|
|
18451
|
+
);
|
|
18388
18452
|
const isIos = useIsIos();
|
|
18389
18453
|
const themeRef = useTheme(
|
|
18390
18454
|
"Scrollbar",
|
|
@@ -18619,6 +18683,7 @@ const Scrollbar$1 = defineComponent({
|
|
|
18619
18683
|
if (onScroll)
|
|
18620
18684
|
onScroll(e);
|
|
18621
18685
|
syncScrollState();
|
|
18686
|
+
detectScrollEdges(e);
|
|
18622
18687
|
}
|
|
18623
18688
|
function syncScrollState() {
|
|
18624
18689
|
const { value: container } = mergedContainerRef;
|
|
@@ -18891,7 +18956,8 @@ const Scrollbar$1 = defineComponent({
|
|
|
18891
18956
|
sync,
|
|
18892
18957
|
syncUnifiedContainer,
|
|
18893
18958
|
handleMouseEnterWrapper,
|
|
18894
|
-
handleMouseLeaveWrapper
|
|
18959
|
+
handleMouseLeaveWrapper,
|
|
18960
|
+
resetScrollEdgeState
|
|
18895
18961
|
};
|
|
18896
18962
|
return {
|
|
18897
18963
|
...exposedMethods,
|
|
@@ -51966,6 +52032,9 @@ const safeTopScrollbarProps = {
|
|
|
51966
52032
|
trigger: String,
|
|
51967
52033
|
xScrollable: Boolean,
|
|
51968
52034
|
onScroll: Function,
|
|
52035
|
+
onScrollToTop: Function,
|
|
52036
|
+
onScrollToBottom: Function,
|
|
52037
|
+
scrollThreshold: Number,
|
|
51969
52038
|
size: Number
|
|
51970
52039
|
};
|
|
51971
52040
|
const SafeTopScrollbar = defineComponent({
|
|
@@ -51989,6 +52058,9 @@ const SafeTopScrollbar = defineComponent({
|
|
|
51989
52058
|
},
|
|
51990
52059
|
adjustScrollTop: (heightDiff) => {
|
|
51991
52060
|
scrollbarInstRef.value?.adjustScrollTop(heightDiff);
|
|
52061
|
+
},
|
|
52062
|
+
resetScrollEdgeState: () => {
|
|
52063
|
+
scrollbarInstRef.value?.resetScrollEdgeState();
|
|
51992
52064
|
}
|
|
51993
52065
|
};
|
|
51994
52066
|
return {
|
|
@@ -52341,6 +52413,7 @@ function self$13(vars) {
|
|
|
52341
52413
|
fontBodyMedium,
|
|
52342
52414
|
lineHeightBodyMedium,
|
|
52343
52415
|
borderRadiusLarge,
|
|
52416
|
+
borderRadiusSmall,
|
|
52344
52417
|
containerSecondary,
|
|
52345
52418
|
brandPrimary300,
|
|
52346
52419
|
brandPrimary500
|
|
@@ -52373,6 +52446,9 @@ function self$13(vars) {
|
|
|
52373
52446
|
widthSmall: "140px",
|
|
52374
52447
|
widthMedium: "auto",
|
|
52375
52448
|
widthLarge: "auto",
|
|
52449
|
+
previewCardWidth: "80px",
|
|
52450
|
+
previewCardHeight: "72px",
|
|
52451
|
+
previewCardBorderRadius: borderRadiusSmall,
|
|
52376
52452
|
containerSecondary,
|
|
52377
52453
|
brandPrimary300,
|
|
52378
52454
|
elementsQuaternary
|
|
@@ -52514,6 +52590,10 @@ var style$1k = c$1([cB("upload", "width: var(--u-upload-width)", [cM("dragger-in
|
|
|
52514
52590
|
grid-template-columns: repeat(auto-fill, 238px);
|
|
52515
52591
|
grid-gap: 8px;
|
|
52516
52592
|
margin-top: 0;
|
|
52593
|
+
`), cM("preview-card-grid", `
|
|
52594
|
+
display: grid;
|
|
52595
|
+
grid-template-columns: repeat(auto-fill, var(--u-upload-preview-card-width));
|
|
52596
|
+
grid-gap: 8px;
|
|
52517
52597
|
`), cB("upload-file", `
|
|
52518
52598
|
display: block;
|
|
52519
52599
|
box-sizing: border-box;
|
|
@@ -52532,6 +52612,11 @@ var style$1k = c$1([cB("upload", "width: var(--u-upload-width)", [cM("dragger-in
|
|
|
52532
52612
|
`), cE("action", `
|
|
52533
52613
|
opacity: 1;
|
|
52534
52614
|
z-index: 10;
|
|
52615
|
+
`)])]), cM("preview-card-type", [cB("upload-file-info", [cE("preview", `
|
|
52616
|
+
filter: blur(3px);
|
|
52617
|
+
`), cE("action", `
|
|
52618
|
+
opacity: 1;
|
|
52619
|
+
z-index: 10;
|
|
52535
52620
|
`)])])]), cM("text-type", `
|
|
52536
52621
|
border: var(--u-item-border-image-card);
|
|
52537
52622
|
margin-bottom: 12px;
|
|
@@ -52616,6 +52701,8 @@ var style$1k = c$1([cB("upload", "width: var(--u-upload-width)", [cM("dragger-in
|
|
|
52616
52701
|
background-color: var(--u-item-color-hover-error);
|
|
52617
52702
|
`), cB("upload-file-info", [cE("name", "color: var(--u-item-text-color-error);"), cE("thumbnail", "color: var(--u-item-text-color-error);")]), cM("image-card-type", `
|
|
52618
52703
|
border: var(--u-item-border-image-card-error);
|
|
52704
|
+
`), cM("preview-card-type", `
|
|
52705
|
+
border: var(--u-item-border-image-card-error);
|
|
52619
52706
|
`)]), cM("with-url", `
|
|
52620
52707
|
cursor: pointer;
|
|
52621
52708
|
`, [cB("upload-file-info", [cE("name", `
|
|
@@ -52772,7 +52859,79 @@ var style$1k = c$1([cB("upload", "width: var(--u-upload-width)", [cM("dragger-in
|
|
|
52772
52859
|
`), c$1(":nth-child(3)", `
|
|
52773
52860
|
font-size: 12px;
|
|
52774
52861
|
color: var(--u-item-text-color-success);
|
|
52775
|
-
`)])])
|
|
52862
|
+
`)])]), cM("preview-card-type", `
|
|
52863
|
+
position: relative;
|
|
52864
|
+
width: var(--u-upload-preview-card-width);
|
|
52865
|
+
height: var(--u-upload-preview-card-height);
|
|
52866
|
+
border: var(--u-item-border-image-card);
|
|
52867
|
+
border-radius: var(--u-upload-preview-card-border-radius);
|
|
52868
|
+
background-color: var(--u-upload-info-bg-color);
|
|
52869
|
+
overflow: hidden;
|
|
52870
|
+
transition: border-color .3s var(--u-bezier), background-color .3s var(--u-bezier);
|
|
52871
|
+
`, [cB("upload-file-overlay", `
|
|
52872
|
+
border-radius: inherit;
|
|
52873
|
+
`), cB("upload-file-info", `
|
|
52874
|
+
padding-top: 0;
|
|
52875
|
+
padding-bottom: 0;
|
|
52876
|
+
width: 100%;
|
|
52877
|
+
height: 100%;
|
|
52878
|
+
justify-content: center;
|
|
52879
|
+
`, [cE("thumbnail", `
|
|
52880
|
+
width: 100%;
|
|
52881
|
+
height: 100%;
|
|
52882
|
+
cursor: pointer;
|
|
52883
|
+
`, [cM("icon", `
|
|
52884
|
+
display: flex;
|
|
52885
|
+
align-items: flex-start;
|
|
52886
|
+
justify-content: center;
|
|
52887
|
+
background-color: transparent;
|
|
52888
|
+
border-radius: 0;
|
|
52889
|
+
margin-right: 0;
|
|
52890
|
+
width: 100%;
|
|
52891
|
+
height: 100%;
|
|
52892
|
+
`)]), cE("preview", `
|
|
52893
|
+
flex-shrink: 0;
|
|
52894
|
+
width: 56px;
|
|
52895
|
+
height: 67px;
|
|
52896
|
+
margin-top: 16px;
|
|
52897
|
+
border-radius: 7px;
|
|
52898
|
+
transition: filter .2s var(--u-bezier);
|
|
52899
|
+
`, [cB("upload-file-info__preview--ext", `
|
|
52900
|
+
font-size: 8px;
|
|
52901
|
+
line-height: 10px;
|
|
52902
|
+
font-weight: 700;
|
|
52903
|
+
top: 6px;
|
|
52904
|
+
left: 6px;
|
|
52905
|
+
`), cB("upload-file-info__preview--content", `
|
|
52906
|
+
top: 29px;
|
|
52907
|
+
left: 6px;
|
|
52908
|
+
width: 43px;
|
|
52909
|
+
height: 3px;
|
|
52910
|
+
border-radius: 2px;
|
|
52911
|
+
`, [c$1("&::before", `
|
|
52912
|
+
top: -6px;
|
|
52913
|
+
width: 43px;
|
|
52914
|
+
height: 3px;
|
|
52915
|
+
border-radius: 2px;
|
|
52916
|
+
`), c$1("&::after", `
|
|
52917
|
+
top: 6px;
|
|
52918
|
+
width: 24px;
|
|
52919
|
+
height: 3px;
|
|
52920
|
+
border-radius: 2px;
|
|
52921
|
+
`)])]), cE("action", `
|
|
52922
|
+
padding-top: 0;
|
|
52923
|
+
padding-bottom: 0;
|
|
52924
|
+
z-index: 2;
|
|
52925
|
+
`, [cB("button", `
|
|
52926
|
+
width: 24px;
|
|
52927
|
+
height: 24px;
|
|
52928
|
+
min-width: 24px;
|
|
52929
|
+
padding: 0;
|
|
52930
|
+
border-radius: 50%;
|
|
52931
|
+
box-shadow: 0px 8px 20px 0px rgba(0, 0, 0, 0.08);
|
|
52932
|
+
`, [cB("base-icon", `
|
|
52933
|
+
font-size: 16px;
|
|
52934
|
+
`)])])])])])]), cB("upload-file-input", `
|
|
52776
52935
|
display: block;
|
|
52777
52936
|
width: 0;
|
|
52778
52937
|
height: 0;
|
|
@@ -57468,8 +57627,13 @@ function useUploadActionsRender(options) {
|
|
|
57468
57627
|
return i === -1 || i === name.length - 1 ? "" : name.slice(i + 1);
|
|
57469
57628
|
};
|
|
57470
57629
|
const isImageType = ["image", "image-card"].includes(listType);
|
|
57630
|
+
const isPreviewCardType = listType === "preview-card";
|
|
57471
57631
|
const fileExt = getExt(file.name);
|
|
57472
57632
|
const capitalizedExt = capitalizeFirstLetter(fileExt);
|
|
57633
|
+
const showRetry = showRetryButton && !disabled;
|
|
57634
|
+
const showDownload = showDownloadButton && !isPreviewCardType;
|
|
57635
|
+
const showRemoveOrCancel = (showRemoveButton || showCancelButton) && !disabled && !(isPreviewCardType && showRetry);
|
|
57636
|
+
const showPreview = showPreviewButton && !(isPreviewCardType && (showRetry || showRemoveOrCancel));
|
|
57473
57637
|
const fallbackIcon = h$1(
|
|
57474
57638
|
"div",
|
|
57475
57639
|
{
|
|
@@ -57506,11 +57670,11 @@ function useUploadActionsRender(options) {
|
|
|
57506
57670
|
{
|
|
57507
57671
|
class: [
|
|
57508
57672
|
`${clsPrefix}-upload-file-info__action`,
|
|
57509
|
-
`${clsPrefix}-upload-file--${isImageType ? "image-card" : "text"}-type`
|
|
57673
|
+
`${clsPrefix}-upload-file--${isImageType ? "image-card" : isPreviewCardType ? "preview-card" : "text"}-type`
|
|
57510
57674
|
]
|
|
57511
57675
|
},
|
|
57512
57676
|
[
|
|
57513
|
-
|
|
57677
|
+
showPreview && h$1(
|
|
57514
57678
|
Button,
|
|
57515
57679
|
{
|
|
57516
57680
|
key: "preview",
|
|
@@ -57525,7 +57689,7 @@ function useUploadActionsRender(options) {
|
|
|
57525
57689
|
icon: () => h$1(UBaseIcon, { clsPrefix }, { default: () => h$1(EyeIcon) })
|
|
57526
57690
|
}
|
|
57527
57691
|
),
|
|
57528
|
-
|
|
57692
|
+
showRemoveOrCancel && h$1(
|
|
57529
57693
|
Button,
|
|
57530
57694
|
{
|
|
57531
57695
|
key: "cancelOrTrash",
|
|
@@ -57554,7 +57718,7 @@ function useUploadActionsRender(options) {
|
|
|
57554
57718
|
)
|
|
57555
57719
|
}
|
|
57556
57720
|
),
|
|
57557
|
-
|
|
57721
|
+
showRetry && h$1(
|
|
57558
57722
|
Button,
|
|
57559
57723
|
{
|
|
57560
57724
|
key: "retry",
|
|
@@ -57569,7 +57733,7 @@ function useUploadActionsRender(options) {
|
|
|
57569
57733
|
icon: () => h$1(UBaseIcon, { clsPrefix }, { default: () => h$1(RetryIcon) })
|
|
57570
57734
|
}
|
|
57571
57735
|
),
|
|
57572
|
-
|
|
57736
|
+
showDownload && h$1(
|
|
57573
57737
|
Button,
|
|
57574
57738
|
{
|
|
57575
57739
|
key: "download",
|
|
@@ -57592,7 +57756,8 @@ function useUploadActionsRender(options) {
|
|
|
57592
57756
|
const buttonThemeOverrides = {
|
|
57593
57757
|
paddingMedium: "0 3px",
|
|
57594
57758
|
heightMedium: "24px",
|
|
57595
|
-
iconSizeMedium: "18px"
|
|
57759
|
+
iconSizeMedium: "18px",
|
|
57760
|
+
textColor: "#101010"
|
|
57596
57761
|
};
|
|
57597
57762
|
var UUploadFile = defineComponent({
|
|
57598
57763
|
name: "UploadFile",
|
|
@@ -57668,7 +57833,7 @@ var UUploadFile = defineComponent({
|
|
|
57668
57833
|
} = props;
|
|
57669
57834
|
if (!["finished"].includes(status))
|
|
57670
57835
|
return false;
|
|
57671
|
-
if (listType === "preview-list") {
|
|
57836
|
+
if (listType === "preview-list" || listType === "preview-card") {
|
|
57672
57837
|
return UUpload.isFilePreviewable(props.file);
|
|
57673
57838
|
}
|
|
57674
57839
|
return !!mergedThumbnailUrlRef.value && listType === "image-card";
|
|
@@ -57750,7 +57915,7 @@ var UUploadFile = defineComponent({
|
|
|
57750
57915
|
} = UUpload;
|
|
57751
57916
|
if (onPreview) {
|
|
57752
57917
|
onPreview(props.file);
|
|
57753
|
-
} else if (props.listType === "preview-list") {
|
|
57918
|
+
} else if (props.listType === "preview-list" || props.listType === "preview-card") {
|
|
57754
57919
|
UUpload.openFilePreview(props.file);
|
|
57755
57920
|
} else if (props.listType === "image-card") {
|
|
57756
57921
|
const { value } = imageRef;
|
|
@@ -57824,10 +57989,11 @@ var UUploadFile = defineComponent({
|
|
|
57824
57989
|
_USpin,
|
|
57825
57990
|
{
|
|
57826
57991
|
color: "tertiary",
|
|
57827
|
-
|
|
57992
|
+
size: listType === "preview-card" ? 24 : void 0,
|
|
57993
|
+
description: listType === "preview-card" ? void 0 : this.localeRef.uploading,
|
|
57828
57994
|
show: this.showProgress,
|
|
57829
57995
|
class: [
|
|
57830
|
-
!this.vertical && !imageCardTypes.includes(listType) && `${clsPrefix}-upload-file-loader--default`
|
|
57996
|
+
!this.vertical && !imageCardTypes.includes(listType) && listType !== "preview-card" && `${clsPrefix}-upload-file-loader--default`
|
|
57831
57997
|
]
|
|
57832
57998
|
},
|
|
57833
57999
|
{
|
|
@@ -57838,8 +58004,9 @@ var UUploadFile = defineComponent({
|
|
|
57838
58004
|
`${clsPrefix}-upload-file`,
|
|
57839
58005
|
`${clsPrefix}-upload-file--${this.progressStatus}-status`,
|
|
57840
58006
|
file.url && file.status !== "error" && imageCardTypes.includes(listType) && `${clsPrefix}-upload-file--with-url`,
|
|
57841
|
-
`${clsPrefix}-upload-file--${listType === "image" || listType === "image-card" ? "image-card" : "text"}-type`,
|
|
57842
|
-
listType === "preview-list" && `${clsPrefix}-upload-file--preview-list-type
|
|
58007
|
+
listType !== "preview-card" && `${clsPrefix}-upload-file--${listType === "image" || listType === "image-card" ? "image-card" : "text"}-type`,
|
|
58008
|
+
listType === "preview-list" && `${clsPrefix}-upload-file--preview-list-type`,
|
|
58009
|
+
listType === "preview-card" && `${clsPrefix}-upload-file--preview-card-type`
|
|
57843
58010
|
]
|
|
57844
58011
|
},
|
|
57845
58012
|
/* @__PURE__ */ h$1(
|
|
@@ -57850,8 +58017,8 @@ var UUploadFile = defineComponent({
|
|
|
57850
58017
|
imageCardTypes.includes(listType) && `${clsPrefix}-upload-file-info--vertical`
|
|
57851
58018
|
]
|
|
57852
58019
|
},
|
|
57853
|
-
icon,
|
|
57854
|
-
/* @__PURE__ */ h$1("div", { class: `${clsPrefix}-upload-file-info__name` }, /* @__PURE__ */ h$1(Fragment$1, null, /* @__PURE__ */ h$1("span", { onClick: this.handlePreviewClick }, this.$slots["upload-file-title"] ? this.$slots["upload-file-title"]({ file }) : file.name), /* @__PURE__ */ h$1("span", { onClick: this.handlePreviewClick }, this.$slots["upload-file-subtitle"] ? this.$slots["upload-file-subtitle"]({ file }) : ""))),
|
|
58020
|
+
listType === "preview-card" ? cloneVNode(icon, { onClick: this.handlePreviewClick }) : icon,
|
|
58021
|
+
listType !== "preview-card" && /* @__PURE__ */ h$1("div", { class: `${clsPrefix}-upload-file-info__name` }, /* @__PURE__ */ h$1(Fragment$1, null, /* @__PURE__ */ h$1("span", { onClick: this.handlePreviewClick }, this.$slots["upload-file-title"] ? this.$slots["upload-file-title"]({ file }) : file.name), /* @__PURE__ */ h$1("span", { onClick: this.handlePreviewClick }, this.$slots["upload-file-subtitle"] ? this.$slots["upload-file-subtitle"]({ file }) : ""))),
|
|
57855
58022
|
actionsNode
|
|
57856
58023
|
),
|
|
57857
58024
|
this.showProgress && /* @__PURE__ */ h$1("div", { class: `${clsPrefix}-upload-file-overlay` })
|
|
@@ -58018,6 +58185,9 @@ var _UUploadFileList = defineComponent({
|
|
|
58018
58185
|
const isPreviewListTypeRef = computed(
|
|
58019
58186
|
() => listTypeRef.value === "preview-list"
|
|
58020
58187
|
);
|
|
58188
|
+
const isPreviewCardTypeRef = computed(
|
|
58189
|
+
() => listTypeRef.value === "preview-card"
|
|
58190
|
+
);
|
|
58021
58191
|
const renderFileList = () => mergedFileListRef.value.map((file) => /* @__PURE__ */ h$1(
|
|
58022
58192
|
UUploadFile,
|
|
58023
58193
|
{
|
|
@@ -58055,6 +58225,7 @@ var _UUploadFileList = defineComponent({
|
|
|
58055
58225
|
class: [
|
|
58056
58226
|
`${mergedClsPrefix}-upload-file-list`,
|
|
58057
58227
|
isImageCardTypeRef.value && `${mergedClsPrefix}-upload-file-list--grid`,
|
|
58228
|
+
isPreviewCardTypeRef.value && `${mergedClsPrefix}-upload-file-list--preview-card-grid`,
|
|
58058
58229
|
fileListClassRef.value,
|
|
58059
58230
|
abstract ? themeClassRef?.value : void 0
|
|
58060
58231
|
],
|
|
@@ -58064,7 +58235,7 @@ var _UUploadFileList = defineComponent({
|
|
|
58064
58235
|
]
|
|
58065
58236
|
},
|
|
58066
58237
|
renderUploadFileList(),
|
|
58067
|
-
isPreviewListTypeRef.value && renderPreview(),
|
|
58238
|
+
(isPreviewListTypeRef.value || isPreviewCardTypeRef.value) && renderPreview(),
|
|
58068
58239
|
showTriggerRef.value && !maxReachedRef.value && isImageCardTypeRef.value && /* @__PURE__ */ h$1(_UUploadTrigger, null, slots)
|
|
58069
58240
|
);
|
|
58070
58241
|
};
|
|
@@ -58623,6 +58794,9 @@ var _UUpload = defineComponent({
|
|
|
58623
58794
|
containerSecondary,
|
|
58624
58795
|
brandPrimary300,
|
|
58625
58796
|
elementsQuaternary,
|
|
58797
|
+
previewCardWidth,
|
|
58798
|
+
previewCardHeight,
|
|
58799
|
+
previewCardBorderRadius,
|
|
58626
58800
|
[createKey$1("width", size)]: width
|
|
58627
58801
|
}
|
|
58628
58802
|
} = themeRef.value;
|
|
@@ -58654,7 +58828,10 @@ var _UUpload = defineComponent({
|
|
|
58654
58828
|
"--u-upload-dragger-width": width,
|
|
58655
58829
|
"--u-upload-info-bg-color": containerSecondary,
|
|
58656
58830
|
"--u-upload-preview-color": brandPrimary300,
|
|
58657
|
-
"--u-upload-empty-border-color": elementsQuaternary
|
|
58831
|
+
"--u-upload-empty-border-color": elementsQuaternary,
|
|
58832
|
+
"--u-upload-preview-card-width": previewCardWidth,
|
|
58833
|
+
"--u-upload-preview-card-height": previewCardHeight,
|
|
58834
|
+
"--u-upload-preview-card-border-radius": previewCardBorderRadius
|
|
58658
58835
|
};
|
|
58659
58836
|
});
|
|
58660
58837
|
const themeClassHandle = inlineThemeDisabled ? useThemeClass(
|
|
@@ -95103,9 +95280,6 @@ var _UChatMainArea = defineComponent({
|
|
|
95103
95280
|
});
|
|
95104
95281
|
const attachmentFileList = ref([]);
|
|
95105
95282
|
const uploadedAttachmentsMap = ref(/* @__PURE__ */ new Map());
|
|
95106
|
-
const lastScrollTop = ref(0);
|
|
95107
|
-
const scrollTopFired = ref(false);
|
|
95108
|
-
const scrollBottomFired = ref(false);
|
|
95109
95283
|
const editingMessage = ref(null);
|
|
95110
95284
|
const unreadMessagesCount = computed(() => {
|
|
95111
95285
|
if (!messagesRef.value)
|
|
@@ -95128,9 +95302,9 @@ var _UChatMainArea = defineComponent({
|
|
|
95128
95302
|
const unreadBeforeRead = unreadCountsBeforeReadRef.value[newChat.id] || 0;
|
|
95129
95303
|
unreadCountOnOpen.value = unreadBeforeRead;
|
|
95130
95304
|
lastMessageId.value = null;
|
|
95131
|
-
|
|
95132
|
-
|
|
95133
|
-
|
|
95305
|
+
const scrollbarInst = messagesBodyRef.value;
|
|
95306
|
+
if (scrollbarInst && "resetScrollEdgeState" in scrollbarInst)
|
|
95307
|
+
scrollbarInst.resetScrollEdgeState();
|
|
95134
95308
|
shouldScrollOnLoad.value = true;
|
|
95135
95309
|
attachmentFileList.value = [];
|
|
95136
95310
|
uploadedAttachmentsMap.value.clear();
|
|
@@ -95195,31 +95369,6 @@ var _UChatMainArea = defineComponent({
|
|
|
95195
95369
|
const showUnreadNotification = computed(() => {
|
|
95196
95370
|
return hasUnreadMessages.value && showNotificationManually.value;
|
|
95197
95371
|
});
|
|
95198
|
-
const handleMessagesScroll = (e) => {
|
|
95199
|
-
const target = e.target;
|
|
95200
|
-
if (!target)
|
|
95201
|
-
return;
|
|
95202
|
-
const { scrollTop, scrollHeight, clientHeight } = target;
|
|
95203
|
-
const threshold = 5;
|
|
95204
|
-
const scrollDirection = scrollTop > lastScrollTop.value ? "down" : "up";
|
|
95205
|
-
const nearTop = scrollTop <= threshold;
|
|
95206
|
-
const nearBottom = scrollHeight - (scrollTop + clientHeight) <= threshold;
|
|
95207
|
-
if (scrollTop > threshold) {
|
|
95208
|
-
scrollTopFired.value = false;
|
|
95209
|
-
}
|
|
95210
|
-
if (scrollHeight - (scrollTop + clientHeight) > threshold) {
|
|
95211
|
-
scrollBottomFired.value = false;
|
|
95212
|
-
}
|
|
95213
|
-
if (nearTop && scrollDirection === "up" && !scrollTopFired.value) {
|
|
95214
|
-
scrollTopFired.value = true;
|
|
95215
|
-
onMessagesScrollToTop?.value?.();
|
|
95216
|
-
}
|
|
95217
|
-
if (nearBottom && scrollDirection === "down" && !scrollBottomFired.value) {
|
|
95218
|
-
scrollBottomFired.value = true;
|
|
95219
|
-
onMessagesScrollToBottom?.value?.();
|
|
95220
|
-
}
|
|
95221
|
-
lastScrollTop.value = scrollTop;
|
|
95222
|
-
};
|
|
95223
95372
|
function scrollToBottom() {
|
|
95224
95373
|
const element = messagesBodyRef.value;
|
|
95225
95374
|
if (!element)
|
|
@@ -95463,7 +95612,8 @@ var _UChatMainArea = defineComponent({
|
|
|
95463
95612
|
handleFooterUpdateValue,
|
|
95464
95613
|
handleFooterSend,
|
|
95465
95614
|
cancelEditingMessage,
|
|
95466
|
-
|
|
95615
|
+
onMessagesScrollToTop,
|
|
95616
|
+
onMessagesScrollToBottom,
|
|
95467
95617
|
scrollToBottom
|
|
95468
95618
|
};
|
|
95469
95619
|
},
|
|
@@ -95484,7 +95634,8 @@ var _UChatMainArea = defineComponent({
|
|
|
95484
95634
|
{
|
|
95485
95635
|
ref: "messagesBodyRef",
|
|
95486
95636
|
class: `${mergedClsPrefix}-chat-main__body`,
|
|
95487
|
-
|
|
95637
|
+
onScrollToTop: () => this.onMessagesScrollToTop?.(),
|
|
95638
|
+
onScrollToBottom: () => this.onMessagesScrollToBottom?.()
|
|
95488
95639
|
},
|
|
95489
95640
|
{
|
|
95490
95641
|
default: () => /* @__PURE__ */ h$1(
|
|
@@ -95542,6 +95693,9 @@ const scrollbarProps = {
|
|
|
95542
95693
|
trigger: String,
|
|
95543
95694
|
xScrollable: Boolean,
|
|
95544
95695
|
onScroll: Function,
|
|
95696
|
+
onScrollToTop: Function,
|
|
95697
|
+
onScrollToBottom: Function,
|
|
95698
|
+
scrollThreshold: Number,
|
|
95545
95699
|
contentClass: String,
|
|
95546
95700
|
contentStyle: [Object, String],
|
|
95547
95701
|
size: Number,
|
|
@@ -95565,6 +95719,9 @@ const Scrollbar = defineComponent({
|
|
|
95565
95719
|
},
|
|
95566
95720
|
scrollBy: (...args) => {
|
|
95567
95721
|
scrollbarInstRef.value?.scrollBy(args[0], args[1]);
|
|
95722
|
+
},
|
|
95723
|
+
resetScrollEdgeState: () => {
|
|
95724
|
+
scrollbarInstRef.value?.resetScrollEdgeState();
|
|
95568
95725
|
}
|
|
95569
95726
|
};
|
|
95570
95727
|
return {
|
|
@@ -106484,7 +106641,7 @@ var ColumnSettingsDrawer = defineComponent({
|
|
|
106484
106641
|
{
|
|
106485
106642
|
class: `${mergedClsPrefixRef.value}-data-table-column-settings__item-title`
|
|
106486
106643
|
},
|
|
106487
|
-
() => row.title
|
|
106644
|
+
() => typeof row.title === "function" ? row.title() : row.title
|
|
106488
106645
|
)
|
|
106489
106646
|
]
|
|
106490
106647
|
);
|
|
@@ -106673,12 +106830,6 @@ var ColumnSettingsDrawer = defineComponent({
|
|
|
106673
106830
|
}
|
|
106674
106831
|
});
|
|
106675
106832
|
|
|
106676
|
-
var TableColumnType = /* @__PURE__ */(TableColumnType2 => {
|
|
106677
|
-
TableColumnType2["SELECTION"] = "selection";
|
|
106678
|
-
TableColumnType2["EXPAND"] = "expand";
|
|
106679
|
-
TableColumnType2["DRAGGABLE"] = "draggable";
|
|
106680
|
-
return TableColumnType2;
|
|
106681
|
-
})(TableColumnType || {});
|
|
106682
106833
|
const dataTableProps = {
|
|
106683
106834
|
...useTheme.props,
|
|
106684
106835
|
onUnstableColumnResize: Function,
|
|
@@ -106812,6 +106963,12 @@ const dataTableProps = {
|
|
|
106812
106963
|
"onUpdate:expandedRowKeys": [Function, Array],
|
|
106813
106964
|
onUpdateExpandedRowKeys: [Function, Array],
|
|
106814
106965
|
onScroll: Function,
|
|
106966
|
+
onScrollToTop: Function,
|
|
106967
|
+
onScrollToBottom: Function,
|
|
106968
|
+
scrollThreshold: {
|
|
106969
|
+
type: Number,
|
|
106970
|
+
default: 5
|
|
106971
|
+
},
|
|
106815
106972
|
// deprecated
|
|
106816
106973
|
onPageChange: [Function, Array],
|
|
106817
106974
|
onPageSizeChange: [Function, Array],
|
|
@@ -106820,6 +106977,12 @@ const dataTableProps = {
|
|
|
106820
106977
|
onCheckedRowKeysChange: [Function, Array]
|
|
106821
106978
|
};
|
|
106822
106979
|
const dataTableInjectionKey = createInjectionKey("u-data-table");
|
|
106980
|
+
var TableColumnType = /* @__PURE__ */(TableColumnType2 => {
|
|
106981
|
+
TableColumnType2["SELECTION"] = "selection";
|
|
106982
|
+
TableColumnType2["EXPAND"] = "expand";
|
|
106983
|
+
TableColumnType2["DRAGGABLE"] = "draggable";
|
|
106984
|
+
return TableColumnType2;
|
|
106985
|
+
})(TableColumnType || {});
|
|
106823
106986
|
|
|
106824
106987
|
function renderBodyEmpty(deps) {
|
|
106825
106988
|
const {
|
|
@@ -110659,7 +110822,10 @@ function isConfigurableColumn(column) {
|
|
|
110659
110822
|
return column.visible !== false;
|
|
110660
110823
|
}
|
|
110661
110824
|
function toColumnTitle(column) {
|
|
110662
|
-
|
|
110825
|
+
if (column.settingsTitle !== void 0) return column.settingsTitle;
|
|
110826
|
+
const title = column.title;
|
|
110827
|
+
if (typeof title === "function") return () => title(column);
|
|
110828
|
+
return title ?? String(column.key);
|
|
110663
110829
|
}
|
|
110664
110830
|
function calcColumnsScrollX(columns, getResizableWidth) {
|
|
110665
110831
|
let total = 0;
|
|
@@ -110918,26 +111084,34 @@ function useGroupHeader(props, getResizableWidth) {
|
|
|
110918
111084
|
|
|
110919
111085
|
function useResizable() {
|
|
110920
111086
|
const resizableWidthsRef = ref({});
|
|
111087
|
+
const preferredWidthsRef = ref({});
|
|
110921
111088
|
function getResizableWidth(key) {
|
|
110922
111089
|
return resizableWidthsRef.value[key];
|
|
110923
111090
|
}
|
|
110924
111091
|
function doUpdateResizableWidth(column, width) {
|
|
110925
111092
|
if ("key" in column) {
|
|
111093
|
+
preferredWidthsRef.value[column.key] = width;
|
|
110926
111094
|
resizableWidthsRef.value[column.key] = width;
|
|
110927
111095
|
}
|
|
110928
111096
|
}
|
|
110929
111097
|
function setResizableWidths(widths) {
|
|
110930
111098
|
resizableWidthsRef.value = widths;
|
|
110931
111099
|
}
|
|
111100
|
+
function setPreferredWidths(widths) {
|
|
111101
|
+
preferredWidthsRef.value = widths;
|
|
111102
|
+
}
|
|
110932
111103
|
function clearResizableWidth() {
|
|
111104
|
+
preferredWidthsRef.value = {};
|
|
110933
111105
|
resizableWidthsRef.value = {};
|
|
110934
111106
|
}
|
|
110935
111107
|
return {
|
|
110936
111108
|
getResizableWidth,
|
|
110937
111109
|
doUpdateResizableWidth,
|
|
110938
111110
|
setResizableWidths,
|
|
111111
|
+
setPreferredWidths,
|
|
110939
111112
|
clearResizableWidth,
|
|
110940
|
-
resizableWidthsRef
|
|
111113
|
+
resizableWidthsRef,
|
|
111114
|
+
preferredWidthsRef
|
|
110941
111115
|
};
|
|
110942
111116
|
}
|
|
110943
111117
|
|
|
@@ -111189,6 +111363,10 @@ function useScroll(props, {
|
|
|
111189
111363
|
const leftActiveFixedChildrenColKeysRef = ref([]);
|
|
111190
111364
|
const rightActiveFixedColKeyRef = ref(null);
|
|
111191
111365
|
const rightActiveFixedChildrenColKeysRef = ref([]);
|
|
111366
|
+
const {
|
|
111367
|
+
detectScrollEdges,
|
|
111368
|
+
resetScrollEdgeState
|
|
111369
|
+
} = useScrollEdgeDetector(() => props);
|
|
111192
111370
|
const styleScrollXRef = computed(() => {
|
|
111193
111371
|
return formatLength(props.scrollX);
|
|
111194
111372
|
});
|
|
@@ -111333,6 +111511,7 @@ function useScroll(props, {
|
|
|
111333
111511
|
}
|
|
111334
111512
|
function handleTableBodyScroll(event) {
|
|
111335
111513
|
props.onScroll?.(event);
|
|
111514
|
+
detectScrollEdges(event);
|
|
111336
111515
|
if (scrollPartRef.value !== "head") {
|
|
111337
111516
|
beforeNextFrameOnce(syncScrollState);
|
|
111338
111517
|
} else {
|
|
@@ -111392,7 +111571,8 @@ function useScroll(props, {
|
|
|
111392
111571
|
syncScrollState,
|
|
111393
111572
|
handleTableBodyScroll,
|
|
111394
111573
|
handleTableHeaderScroll,
|
|
111395
|
-
setHeaderScrollLeft
|
|
111574
|
+
setHeaderScrollLeft,
|
|
111575
|
+
resetScrollEdgeState
|
|
111396
111576
|
};
|
|
111397
111577
|
}
|
|
111398
111578
|
|
|
@@ -111983,15 +112163,15 @@ var _UDataTable = defineComponent({
|
|
|
111983
112163
|
clearResizableWidth,
|
|
111984
112164
|
doUpdateResizableWidth,
|
|
111985
112165
|
setResizableWidths,
|
|
111986
|
-
|
|
112166
|
+
setPreferredWidths,
|
|
112167
|
+
resizableWidthsRef,
|
|
112168
|
+
preferredWidthsRef
|
|
111987
112169
|
} = useResizable();
|
|
111988
112170
|
if (props.localStorageKey && props.resizableStorage !== false) {
|
|
111989
112171
|
const storedWidths = loadTableState(props.localStorageKey)?.columnWidths;
|
|
111990
112172
|
if (storedWidths && Object.keys(storedWidths).length > 0) {
|
|
111991
|
-
|
|
111992
|
-
|
|
111993
|
-
...storedWidths
|
|
111994
|
-
};
|
|
112173
|
+
setPreferredWidths({ ...storedWidths });
|
|
112174
|
+
setResizableWidths({ ...storedWidths });
|
|
111995
112175
|
}
|
|
111996
112176
|
}
|
|
111997
112177
|
const {
|
|
@@ -112103,6 +112283,7 @@ var _UDataTable = defineComponent({
|
|
|
112103
112283
|
handleTableHeaderScroll,
|
|
112104
112284
|
syncScrollState,
|
|
112105
112285
|
setHeaderScrollLeft,
|
|
112286
|
+
resetScrollEdgeState,
|
|
112106
112287
|
leftActiveFixedColKeyRef,
|
|
112107
112288
|
leftActiveFixedChildrenColKeysRef,
|
|
112108
112289
|
rightActiveFixedColKeyRef,
|
|
@@ -112150,7 +112331,7 @@ var _UDataTable = defineComponent({
|
|
|
112150
112331
|
watch(
|
|
112151
112332
|
() => props.localStorageKey ? {
|
|
112152
112333
|
key: props.localStorageKey,
|
|
112153
|
-
columnWidths:
|
|
112334
|
+
columnWidths: preferredWidthsRef.value,
|
|
112154
112335
|
columnsConfig: columnsConfigRef.value,
|
|
112155
112336
|
page: mergedPaginationRef.value?.page,
|
|
112156
112337
|
pageSize: mergedPaginationRef.value?.pageSize,
|
|
@@ -112225,23 +112406,23 @@ var _UDataTable = defineComponent({
|
|
|
112225
112406
|
systemMaxWidth: props.resizableMaxWidth
|
|
112226
112407
|
};
|
|
112227
112408
|
});
|
|
112228
|
-
function buildNonFixedModeWidthMap(
|
|
112409
|
+
function buildNonFixedModeWidthMap(preferredWidths, resizableColumns) {
|
|
112229
112410
|
const { systemMinWidth, systemMaxWidth } = widthConstraintSignalRef.value;
|
|
112230
112411
|
return {
|
|
112231
112412
|
keys: resizableColumns.map((column) => column.key),
|
|
112232
112413
|
widthMap: sanitizeColumnWidthMap(resizableColumns, {
|
|
112233
112414
|
systemMinWidth,
|
|
112234
112415
|
systemMaxWidth,
|
|
112235
|
-
source:
|
|
112416
|
+
source: preferredWidths
|
|
112236
112417
|
})
|
|
112237
112418
|
};
|
|
112238
112419
|
}
|
|
112239
|
-
function buildFixedModeWidthMap(visibleLeafColumns,
|
|
112420
|
+
function buildFixedModeWidthMap(visibleLeafColumns, sourceWidths) {
|
|
112240
112421
|
const { systemMinWidth, systemMaxWidth } = widthConstraintSignalRef.value;
|
|
112241
112422
|
const preferredWidths = sanitizeColumnWidthMap(visibleLeafColumns, {
|
|
112242
112423
|
systemMinWidth,
|
|
112243
112424
|
systemMaxWidth,
|
|
112244
|
-
source:
|
|
112425
|
+
source: sourceWidths
|
|
112245
112426
|
});
|
|
112246
112427
|
const containerWidth = containerWidthSignalRef.value;
|
|
112247
112428
|
if (containerWidth === void 0) {
|
|
@@ -112267,16 +112448,16 @@ var _UDataTable = defineComponent({
|
|
|
112267
112448
|
}
|
|
112268
112449
|
function reconcileResizableWidths(_reason) {
|
|
112269
112450
|
const visibleLeafColumns = visibleLeafColumnsSignalRef.value;
|
|
112270
|
-
const
|
|
112451
|
+
const preferredWidths = preferredWidthsRef.value;
|
|
112271
112452
|
if (!visibleLeafColumns.length || !resizableColumnPresentRef.value) {
|
|
112272
|
-
if (Object.keys(
|
|
112273
|
-
|
|
112453
|
+
if (Object.keys(resizableWidthsRef.value).length) {
|
|
112454
|
+
setResizableWidths({});
|
|
112274
112455
|
}
|
|
112275
112456
|
return;
|
|
112276
112457
|
}
|
|
112277
112458
|
if (modeSignalRef.value !== "fixed") {
|
|
112278
112459
|
const { widthMap, keys } = buildNonFixedModeWidthMap(
|
|
112279
|
-
|
|
112460
|
+
preferredWidths,
|
|
112280
112461
|
resizableColumnsSignalRef.value
|
|
112281
112462
|
);
|
|
112282
112463
|
syncResizableWidths(widthMap, keys);
|
|
@@ -112285,7 +112466,7 @@ var _UDataTable = defineComponent({
|
|
|
112285
112466
|
const visibleLeafKeys = visibleLeafColumns.map((column) => column.key);
|
|
112286
112467
|
const nextWidths = buildFixedModeWidthMap(
|
|
112287
112468
|
visibleLeafColumns,
|
|
112288
|
-
|
|
112469
|
+
preferredWidths
|
|
112289
112470
|
);
|
|
112290
112471
|
syncResizableWidths(nextWidths, visibleLeafKeys);
|
|
112291
112472
|
}
|
|
@@ -112316,7 +112497,7 @@ var _UDataTable = defineComponent({
|
|
|
112316
112497
|
}
|
|
112317
112498
|
);
|
|
112318
112499
|
watch(
|
|
112319
|
-
() =>
|
|
112500
|
+
() => preferredWidthsRef.value,
|
|
112320
112501
|
() => {
|
|
112321
112502
|
reconcileResizableWidths();
|
|
112322
112503
|
},
|
|
@@ -112587,6 +112768,7 @@ var _UDataTable = defineComponent({
|
|
|
112587
112768
|
scrollTo: (arg0, arg1) => {
|
|
112588
112769
|
mainTableInstRef.value?.scrollTo(arg0, arg1);
|
|
112589
112770
|
},
|
|
112771
|
+
resetScrollEdgeState,
|
|
112590
112772
|
getData: () => {
|
|
112591
112773
|
const originalData = props.data || [];
|
|
112592
112774
|
const totalRowData = autoSummaryRef.value && rawPaginatedDataRef.value ? autoSummaryRef.value(rawPaginatedDataRef.value) : null;
|
|
@@ -118807,11 +118989,14 @@ var _UDatePicker = defineComponent({
|
|
|
118807
118989
|
}
|
|
118808
118990
|
}
|
|
118809
118991
|
function handleClear() {
|
|
118810
|
-
doUpdateValue(null, { doConfirm: false });
|
|
118811
118992
|
doUpdateShow(false);
|
|
118812
118993
|
inputInstRef.value?.deactivate?.();
|
|
118813
118994
|
doClear();
|
|
118814
118995
|
}
|
|
118996
|
+
function handleSelectionClear() {
|
|
118997
|
+
handleClear();
|
|
118998
|
+
doUpdateValue(null, { doConfirm: false });
|
|
118999
|
+
}
|
|
118815
119000
|
function handlePanelClear() {
|
|
118816
119001
|
inputInstRef.value?.deactivate?.();
|
|
118817
119002
|
doClear();
|
|
@@ -119272,6 +119457,7 @@ var _UDatePicker = defineComponent({
|
|
|
119272
119457
|
handleClickOutside,
|
|
119273
119458
|
handleKeydown,
|
|
119274
119459
|
handleClear,
|
|
119460
|
+
handleSelectionClear,
|
|
119275
119461
|
handlePanelClear,
|
|
119276
119462
|
handleTriggerClick,
|
|
119277
119463
|
handleInputActivate,
|
|
@@ -119406,7 +119592,7 @@ var _UDatePicker = defineComponent({
|
|
|
119406
119592
|
onFocus: this.handleInputFocus,
|
|
119407
119593
|
onBlur: this.handleInputBlur,
|
|
119408
119594
|
onClick: this.handleTriggerClick,
|
|
119409
|
-
onClear: this.
|
|
119595
|
+
onClear: this.handleSelectionClear
|
|
119410
119596
|
},
|
|
119411
119597
|
{
|
|
119412
119598
|
arrow: () => this.$slots.arrow?.()
|
|
@@ -120920,7 +121106,6 @@ var _UDatePickerV2 = defineComponent({
|
|
|
120920
121106
|
}
|
|
120921
121107
|
}
|
|
120922
121108
|
function handleClear() {
|
|
120923
|
-
doUpdateValue(null);
|
|
120924
121109
|
doUpdateShow(false);
|
|
120925
121110
|
singleInputValueRef.value = "";
|
|
120926
121111
|
rangeStartInputValueRef.value = "";
|
|
@@ -120932,6 +121117,10 @@ var _UDatePickerV2 = defineComponent({
|
|
|
120932
121117
|
hoverDateRef.value = null;
|
|
120933
121118
|
}
|
|
120934
121119
|
}
|
|
121120
|
+
function handleSelectionClear() {
|
|
121121
|
+
handleClear();
|
|
121122
|
+
doUpdateValue(null);
|
|
121123
|
+
}
|
|
120935
121124
|
function handleSelect(value) {
|
|
120936
121125
|
doUpdateValue(value);
|
|
120937
121126
|
doUpdateShow(false);
|
|
@@ -121248,6 +121437,7 @@ var _UDatePickerV2 = defineComponent({
|
|
|
121248
121437
|
handleInputBlur,
|
|
121249
121438
|
handleClickOutside,
|
|
121250
121439
|
handleClear,
|
|
121440
|
+
handleSelectionClear,
|
|
121251
121441
|
handleSelect,
|
|
121252
121442
|
handleKeydown,
|
|
121253
121443
|
handleInputUpdateValue,
|
|
@@ -121337,7 +121527,7 @@ var _UDatePickerV2 = defineComponent({
|
|
|
121337
121527
|
onFocus: this.handleInputFocus,
|
|
121338
121528
|
onBlur: this.handleInputBlur,
|
|
121339
121529
|
onClick: this.handleTriggerClick,
|
|
121340
|
-
onClear: this.
|
|
121530
|
+
onClear: this.handleSelectionClear
|
|
121341
121531
|
},
|
|
121342
121532
|
{
|
|
121343
121533
|
arrow: () => this.$slots.arrow?.()
|
|
@@ -154903,7 +155093,7 @@ function useThemeVars() {
|
|
|
154903
155093
|
});
|
|
154904
155094
|
}
|
|
154905
155095
|
|
|
154906
|
-
var version = "2.4.
|
|
155096
|
+
var version = "2.4.5";
|
|
154907
155097
|
|
|
154908
155098
|
function create({
|
|
154909
155099
|
componentPrefix = "U",
|