@uzum-tech/ui 2.3.0 → 2.3.2
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 +564 -499
- package/dist/index.mjs +564 -499
- package/dist/index.prod.js +2 -2
- package/dist/index.prod.mjs +2 -2
- package/es/chat/src/Chat.d.ts +1074 -0
- package/es/chat/src/ChatListItems.d.ts +360 -0
- package/es/chat/src/ChatMainArea.d.ts +360 -0
- package/es/chat/src/ChatMainArea.mjs +1 -0
- package/es/chat/src/ChatMessages.d.ts +360 -0
- package/es/chat/src/ChatMessages.mjs +30 -3
- package/es/chat/src/ChatParts/Sidebar.d.ts +78 -0
- package/es/chat/src/interface.d.ts +1 -0
- package/es/chat/styles/dark.d.ts +27 -0
- package/es/chat/styles/dark.mjs +2 -0
- package/es/chat/styles/light.d.ts +27 -0
- package/es/chat/styles/light.mjs +2 -0
- package/es/components.d.ts +1840 -7
- package/es/image/src/ImagePreview.d.ts +1 -0
- package/es/image/src/ImagePreview.mjs +7 -35
- package/es/image/src/public-types.d.ts +4 -4
- package/es/message-bubble/src/MessageBubble.mjs +16 -5
- package/es/message-bubble/src/interface.d.ts +2 -0
- package/es/message-bubble/src/styles/index.cssr.mjs +5 -7
- package/es/upload/index.d.ts +2 -1
- package/es/upload/index.mjs +2 -1
- package/es/upload/src/Upload.d.ts +73 -1007
- package/es/upload/src/Upload.mjs +43 -124
- package/es/upload/src/UploadFile.d.ts +1 -1
- package/es/upload/src/UploadFile.mjs +8 -2
- package/es/upload/src/UploadFileList.mjs +17 -2
- package/es/upload/src/UploadProgress.d.ts +3 -2
- package/es/upload/src/interface.d.ts +1086 -92
- package/es/upload/src/interface.mjs +117 -1
- package/es/upload/src/public-types.d.ts +17 -2
- package/es/upload/src/useUploadActionsRender.d.ts +2 -27
- package/es/upload/src/useUploadActionsRender.mjs +2 -2
- package/es/upload/src/useUploadInternals.d.ts +2 -25
- package/es/upload/src/utils.d.ts +2 -0
- package/es/upload/src/utils.mjs +7 -0
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/lib/chat/src/Chat.d.ts +1074 -0
- package/lib/chat/src/ChatListItems.d.ts +360 -0
- package/lib/chat/src/ChatMainArea.d.ts +360 -0
- package/lib/chat/src/ChatMainArea.js +1 -0
- package/lib/chat/src/ChatMessages.d.ts +360 -0
- package/lib/chat/src/ChatMessages.js +10 -3
- package/lib/chat/src/ChatParts/Sidebar.d.ts +78 -0
- package/lib/chat/src/interface.d.ts +1 -0
- package/lib/chat/styles/dark.d.ts +27 -0
- package/lib/chat/styles/dark.js +6 -4
- package/lib/chat/styles/light.d.ts +27 -0
- package/lib/chat/styles/light.js +6 -4
- package/lib/components.d.ts +1840 -7
- package/lib/image/src/ImagePreview.d.ts +1 -0
- package/lib/image/src/ImagePreview.js +3 -19
- package/lib/image/src/public-types.d.ts +4 -4
- package/lib/message-bubble/src/MessageBubble.js +15 -5
- package/lib/message-bubble/src/interface.d.ts +2 -0
- package/lib/message-bubble/src/styles/index.cssr.js +5 -7
- package/lib/upload/index.d.ts +2 -1
- package/lib/upload/index.js +2 -1
- package/lib/upload/src/Upload.d.ts +73 -1007
- package/lib/upload/src/Upload.js +40 -68
- package/lib/upload/src/UploadFile.d.ts +1 -1
- package/lib/upload/src/UploadFile.js +12 -4
- package/lib/upload/src/UploadFileList.js +8 -1
- package/lib/upload/src/UploadProgress.d.ts +3 -2
- package/lib/upload/src/interface.d.ts +1086 -92
- package/lib/upload/src/interface.js +59 -1
- package/lib/upload/src/public-types.d.ts +17 -2
- package/lib/upload/src/useUploadActionsRender.d.ts +2 -27
- package/lib/upload/src/useUploadActionsRender.js +2 -2
- package/lib/upload/src/useUploadInternals.d.ts +2 -25
- package/lib/upload/src/utils.d.ts +2 -0
- package/lib/upload/src/utils.js +10 -0
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +1 -1
- package/web-types.json +113 -36
package/dist/index.mjs
CHANGED
|
@@ -15756,7 +15756,7 @@ var RemoveIcon = defineComponent({
|
|
|
15756
15756
|
}
|
|
15757
15757
|
});
|
|
15758
15758
|
|
|
15759
|
-
|
|
15759
|
+
defineComponent({
|
|
15760
15760
|
name: "ResizeSmall",
|
|
15761
15761
|
render() {
|
|
15762
15762
|
return /* @__PURE__ */ h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20" }, /* @__PURE__ */ h("g", { fill: "none" }, /* @__PURE__ */ h(
|
|
@@ -45095,6 +45095,58 @@ const listRtl = {
|
|
|
45095
45095
|
};
|
|
45096
45096
|
|
|
45097
45097
|
function self$17(vars) {
|
|
45098
|
+
const {
|
|
45099
|
+
borderRadiusLarge,
|
|
45100
|
+
elementsSecondary,
|
|
45101
|
+
elementsTertiary,
|
|
45102
|
+
textPrimary,
|
|
45103
|
+
textSecondary,
|
|
45104
|
+
textTertiary,
|
|
45105
|
+
brandPrimary400,
|
|
45106
|
+
staticGreen,
|
|
45107
|
+
staticRed,
|
|
45108
|
+
staticWhite
|
|
45109
|
+
} = vars;
|
|
45110
|
+
return {
|
|
45111
|
+
messageBubbleBackgroundColorOwn: elementsTertiary,
|
|
45112
|
+
messageBubbleBackgroundColorOther: elementsTertiary,
|
|
45113
|
+
messageBubbleTextColorOwn: textPrimary,
|
|
45114
|
+
messageBubbleTextColorOther: textPrimary,
|
|
45115
|
+
messageTimeColor: textTertiary,
|
|
45116
|
+
messageStatusReadColor: brandPrimary400,
|
|
45117
|
+
messageStatusSuccessColor: staticGreen,
|
|
45118
|
+
attachmentBackgroundColorOwn: staticWhite,
|
|
45119
|
+
attachmentBackgroundColorOther: staticWhite,
|
|
45120
|
+
messageErrorColor: staticRed,
|
|
45121
|
+
messageBorderRadius: borderRadiusLarge,
|
|
45122
|
+
unreadNotificationBackgroundColor: brandPrimary400,
|
|
45123
|
+
unreadNotificationTextColor: elementsSecondary,
|
|
45124
|
+
serviceMessageTextColor: textSecondary,
|
|
45125
|
+
serviceMessageBackgroundColor: "transparent",
|
|
45126
|
+
messageTitleColor: textPrimary
|
|
45127
|
+
};
|
|
45128
|
+
}
|
|
45129
|
+
const messageBubbleLight = createTheme$1({
|
|
45130
|
+
name: "MessageBubble",
|
|
45131
|
+
common: derived,
|
|
45132
|
+
peers: {
|
|
45133
|
+
StatusIcon: iconLight
|
|
45134
|
+
},
|
|
45135
|
+
self: self$17
|
|
45136
|
+
});
|
|
45137
|
+
|
|
45138
|
+
const messageBubbleDark = createTheme$1({
|
|
45139
|
+
name: "MessageBubble",
|
|
45140
|
+
common: derived$1,
|
|
45141
|
+
peers: {
|
|
45142
|
+
StatusIcon: iconDark$1
|
|
45143
|
+
},
|
|
45144
|
+
self: vars => ({
|
|
45145
|
+
...self$17(vars)
|
|
45146
|
+
})
|
|
45147
|
+
});
|
|
45148
|
+
|
|
45149
|
+
function self$16(vars) {
|
|
45098
45150
|
const {
|
|
45099
45151
|
shadowDepth2
|
|
45100
45152
|
} = vars;
|
|
@@ -45109,7 +45161,7 @@ const selectLight = createTheme$1({
|
|
|
45109
45161
|
InternalSelection: internalSelectionLight,
|
|
45110
45162
|
InternalSelectMenu: internalSelectMenuLight
|
|
45111
45163
|
},
|
|
45112
|
-
self: self$
|
|
45164
|
+
self: self$16
|
|
45113
45165
|
});
|
|
45114
45166
|
|
|
45115
45167
|
const selectDark = {
|
|
@@ -45119,13 +45171,13 @@ const selectDark = {
|
|
|
45119
45171
|
InternalSelection: internalSelectionDark,
|
|
45120
45172
|
InternalSelectMenu: internalSelectMenuDark
|
|
45121
45173
|
},
|
|
45122
|
-
self: self$
|
|
45174
|
+
self: self$16
|
|
45123
45175
|
};
|
|
45124
45176
|
|
|
45125
45177
|
({
|
|
45126
45178
|
style: c$1([])});
|
|
45127
45179
|
|
|
45128
|
-
function self$
|
|
45180
|
+
function self$15(vars) {
|
|
45129
45181
|
const {
|
|
45130
45182
|
borderRadiusSmall,
|
|
45131
45183
|
fontWeightStrong,
|
|
@@ -45220,13 +45272,13 @@ function self$16(vars) {
|
|
|
45220
45272
|
const typographyLight = {
|
|
45221
45273
|
name: "Typography",
|
|
45222
45274
|
common: derived,
|
|
45223
|
-
self: self$
|
|
45275
|
+
self: self$15
|
|
45224
45276
|
};
|
|
45225
45277
|
|
|
45226
45278
|
const typographyDark = {
|
|
45227
45279
|
name: "Typography",
|
|
45228
45280
|
common: derived$1,
|
|
45229
|
-
self: self$
|
|
45281
|
+
self: self$15
|
|
45230
45282
|
};
|
|
45231
45283
|
|
|
45232
45284
|
const chatInputLight = {
|
|
@@ -45264,7 +45316,7 @@ const chatBadgeLight = {
|
|
|
45264
45316
|
};
|
|
45265
45317
|
}
|
|
45266
45318
|
};
|
|
45267
|
-
function self$
|
|
45319
|
+
function self$14(vars) {
|
|
45268
45320
|
const {
|
|
45269
45321
|
borderRadiusLarge,
|
|
45270
45322
|
elementsQuaternary,
|
|
@@ -45331,13 +45383,14 @@ const chatLight = createTheme$1({
|
|
|
45331
45383
|
Button: buttonLight,
|
|
45332
45384
|
List: listLight,
|
|
45333
45385
|
Typography: typographyLight,
|
|
45386
|
+
MessageBubble: messageBubbleLight,
|
|
45334
45387
|
StatusIcon: iconLight,
|
|
45335
45388
|
FooterAttachIcon: iconLight,
|
|
45336
45389
|
FooterSuffixIcon: iconLight,
|
|
45337
45390
|
HeaderShareIcon: iconLight,
|
|
45338
45391
|
HeaderProfileIcon: iconLight
|
|
45339
45392
|
},
|
|
45340
|
-
self: self$
|
|
45393
|
+
self: self$14
|
|
45341
45394
|
});
|
|
45342
45395
|
|
|
45343
45396
|
const chatDark = createTheme$1({
|
|
@@ -45352,6 +45405,7 @@ const chatDark = createTheme$1({
|
|
|
45352
45405
|
Button: buttonDark,
|
|
45353
45406
|
List: listDark$1,
|
|
45354
45407
|
Typography: typographyDark,
|
|
45408
|
+
MessageBubble: messageBubbleDark,
|
|
45355
45409
|
StatusIcon: iconDark$1,
|
|
45356
45410
|
FooterAttachIcon: iconDark$1,
|
|
45357
45411
|
FooterSuffixIcon: iconDark$1,
|
|
@@ -45359,7 +45413,7 @@ const chatDark = createTheme$1({
|
|
|
45359
45413
|
HeaderProfileIcon: iconDark$1
|
|
45360
45414
|
},
|
|
45361
45415
|
self: vars => {
|
|
45362
|
-
const lightVars = self$
|
|
45416
|
+
const lightVars = self$14(vars);
|
|
45363
45417
|
return {
|
|
45364
45418
|
...lightVars
|
|
45365
45419
|
};
|
|
@@ -46708,7 +46762,284 @@ var _UUl = defineComponent({
|
|
|
46708
46762
|
}
|
|
46709
46763
|
});
|
|
46710
46764
|
|
|
46711
|
-
function
|
|
46765
|
+
function isImageFileType(type) {
|
|
46766
|
+
return type.includes("image/");
|
|
46767
|
+
}
|
|
46768
|
+
function getExtname(url = "") {
|
|
46769
|
+
const temp = url.split("/");
|
|
46770
|
+
const filename = temp[temp.length - 1];
|
|
46771
|
+
const filenameWithoutSuffix = filename.split(/#|\?/)[0];
|
|
46772
|
+
return (/\.[^./\\]*$/.exec(filenameWithoutSuffix) || [""])[0];
|
|
46773
|
+
}
|
|
46774
|
+
const imageExtensionRegex = /(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico)$/i;
|
|
46775
|
+
function capitalizeFirstLetter(str) {
|
|
46776
|
+
if (!str) return str;
|
|
46777
|
+
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
46778
|
+
}
|
|
46779
|
+
const isImageFile = file => {
|
|
46780
|
+
if (file.type) {
|
|
46781
|
+
return isImageFileType(file.type);
|
|
46782
|
+
}
|
|
46783
|
+
const fileNameExtension = getExtname(file.name || "");
|
|
46784
|
+
if (imageExtensionRegex.test(fileNameExtension)) {
|
|
46785
|
+
return true;
|
|
46786
|
+
}
|
|
46787
|
+
const url = file.thumbnailUrl || file.url || "";
|
|
46788
|
+
const urlExtension = getExtname(url);
|
|
46789
|
+
if (/^data:image\//.test(url) || imageExtensionRegex.test(urlExtension)) {
|
|
46790
|
+
return true;
|
|
46791
|
+
}
|
|
46792
|
+
return false;
|
|
46793
|
+
};
|
|
46794
|
+
async function createImageDataUrl(file) {
|
|
46795
|
+
return await new Promise(resolve => {
|
|
46796
|
+
if (!file.type || !isImageFileType(file.type)) {
|
|
46797
|
+
resolve("");
|
|
46798
|
+
return;
|
|
46799
|
+
}
|
|
46800
|
+
resolve(window.URL.createObjectURL(file));
|
|
46801
|
+
});
|
|
46802
|
+
}
|
|
46803
|
+
const environmentSupportFile = isBrowser$1 && window.FileReader && window.File;
|
|
46804
|
+
function isFileSystemDirectoryEntry(item) {
|
|
46805
|
+
return item.isDirectory;
|
|
46806
|
+
}
|
|
46807
|
+
function isFileSystemFileEntry(item) {
|
|
46808
|
+
return item.isFile;
|
|
46809
|
+
}
|
|
46810
|
+
async function getFilesFromEntries(entries, directory) {
|
|
46811
|
+
const fileAndEntries = [];
|
|
46812
|
+
let _resolve;
|
|
46813
|
+
let requestCallbackCount = 0;
|
|
46814
|
+
function lock() {
|
|
46815
|
+
requestCallbackCount++;
|
|
46816
|
+
}
|
|
46817
|
+
function unlock() {
|
|
46818
|
+
requestCallbackCount--;
|
|
46819
|
+
if (!requestCallbackCount) {
|
|
46820
|
+
_resolve(fileAndEntries);
|
|
46821
|
+
}
|
|
46822
|
+
}
|
|
46823
|
+
function _getFilesFromEntries(entries2) {
|
|
46824
|
+
entries2.forEach(entry => {
|
|
46825
|
+
if (!entry) return;
|
|
46826
|
+
lock();
|
|
46827
|
+
if (directory && isFileSystemDirectoryEntry(entry)) {
|
|
46828
|
+
const directoryReader = entry.createReader();
|
|
46829
|
+
lock();
|
|
46830
|
+
directoryReader.readEntries(entries3 => {
|
|
46831
|
+
_getFilesFromEntries(entries3);
|
|
46832
|
+
unlock();
|
|
46833
|
+
}, () => {
|
|
46834
|
+
unlock();
|
|
46835
|
+
});
|
|
46836
|
+
} else if (isFileSystemFileEntry(entry)) {
|
|
46837
|
+
lock();
|
|
46838
|
+
entry.file(file => {
|
|
46839
|
+
fileAndEntries.push({
|
|
46840
|
+
file,
|
|
46841
|
+
entry,
|
|
46842
|
+
source: "dnd"
|
|
46843
|
+
});
|
|
46844
|
+
unlock();
|
|
46845
|
+
}, () => {
|
|
46846
|
+
unlock();
|
|
46847
|
+
});
|
|
46848
|
+
}
|
|
46849
|
+
unlock();
|
|
46850
|
+
});
|
|
46851
|
+
}
|
|
46852
|
+
await new Promise(resolve => {
|
|
46853
|
+
_resolve = resolve;
|
|
46854
|
+
_getFilesFromEntries(entries);
|
|
46855
|
+
});
|
|
46856
|
+
return fileAndEntries;
|
|
46857
|
+
}
|
|
46858
|
+
function getFilePreviewSrc(file) {
|
|
46859
|
+
return file.url || file.thumbnailUrl || null;
|
|
46860
|
+
}
|
|
46861
|
+
function isFileSizeExceeded(file, maxSize) {
|
|
46862
|
+
if (maxSize === void 0 || !file) return false;
|
|
46863
|
+
return file.size > maxSize;
|
|
46864
|
+
}
|
|
46865
|
+
function createSettledFileInfo(fileInfo) {
|
|
46866
|
+
const {
|
|
46867
|
+
id,
|
|
46868
|
+
name,
|
|
46869
|
+
percentage,
|
|
46870
|
+
status,
|
|
46871
|
+
url,
|
|
46872
|
+
file,
|
|
46873
|
+
thumbnailUrl,
|
|
46874
|
+
type,
|
|
46875
|
+
fullPath,
|
|
46876
|
+
batchId
|
|
46877
|
+
} = fileInfo;
|
|
46878
|
+
return {
|
|
46879
|
+
id,
|
|
46880
|
+
name,
|
|
46881
|
+
percentage: percentage ?? null,
|
|
46882
|
+
status,
|
|
46883
|
+
url: url ?? null,
|
|
46884
|
+
file: file ?? null,
|
|
46885
|
+
thumbnailUrl: thumbnailUrl ?? null,
|
|
46886
|
+
type: type ?? null,
|
|
46887
|
+
fullPath: fullPath ?? null,
|
|
46888
|
+
batchId: batchId ?? null
|
|
46889
|
+
};
|
|
46890
|
+
}
|
|
46891
|
+
function matchType(name, mimeType, accept) {
|
|
46892
|
+
name = name.toLowerCase();
|
|
46893
|
+
mimeType = mimeType.toLocaleLowerCase();
|
|
46894
|
+
accept = accept.toLocaleLowerCase();
|
|
46895
|
+
const acceptAtoms = accept.split(",").map(acceptAtom => acceptAtom.trim()).filter(Boolean);
|
|
46896
|
+
return acceptAtoms.some(acceptAtom => {
|
|
46897
|
+
if (acceptAtom.startsWith(".")) {
|
|
46898
|
+
if (name.endsWith(acceptAtom)) return true;
|
|
46899
|
+
} else if (acceptAtom.includes("/")) {
|
|
46900
|
+
const [type, subtype] = mimeType.split("/");
|
|
46901
|
+
const [acceptType, acceptSubtype] = acceptAtom.split("/");
|
|
46902
|
+
if (acceptType === "*" || type && acceptType && acceptType === type) {
|
|
46903
|
+
if (acceptSubtype === "*" || subtype && acceptSubtype && acceptSubtype === subtype) {
|
|
46904
|
+
return true;
|
|
46905
|
+
}
|
|
46906
|
+
}
|
|
46907
|
+
} else {
|
|
46908
|
+
return true;
|
|
46909
|
+
}
|
|
46910
|
+
return false;
|
|
46911
|
+
});
|
|
46912
|
+
}
|
|
46913
|
+
function download(url, name) {
|
|
46914
|
+
if (!url) return;
|
|
46915
|
+
const a = document.createElement("a");
|
|
46916
|
+
a.href = url;
|
|
46917
|
+
if (name !== void 0) {
|
|
46918
|
+
a.download = name;
|
|
46919
|
+
}
|
|
46920
|
+
document.body.appendChild(a);
|
|
46921
|
+
a.click();
|
|
46922
|
+
document.body.removeChild(a);
|
|
46923
|
+
}
|
|
46924
|
+
|
|
46925
|
+
const uploadInjectionKey = createInjectionKey("u-upload");
|
|
46926
|
+
const uploadProps = {
|
|
46927
|
+
...useTheme.props,
|
|
46928
|
+
name: {
|
|
46929
|
+
type: String,
|
|
46930
|
+
default: "file"
|
|
46931
|
+
},
|
|
46932
|
+
accept: String,
|
|
46933
|
+
action: String,
|
|
46934
|
+
customRequest: Function,
|
|
46935
|
+
directory: Boolean,
|
|
46936
|
+
directoryDnd: {
|
|
46937
|
+
type: Boolean,
|
|
46938
|
+
default: void 0
|
|
46939
|
+
},
|
|
46940
|
+
method: {
|
|
46941
|
+
type: String,
|
|
46942
|
+
default: "POST"
|
|
46943
|
+
},
|
|
46944
|
+
multiple: Boolean,
|
|
46945
|
+
showFileList: {
|
|
46946
|
+
type: Boolean,
|
|
46947
|
+
default: true
|
|
46948
|
+
},
|
|
46949
|
+
data: [Object, Function],
|
|
46950
|
+
headers: [Object, Function],
|
|
46951
|
+
withCredentials: Boolean,
|
|
46952
|
+
responseType: {
|
|
46953
|
+
type: String,
|
|
46954
|
+
default: ""
|
|
46955
|
+
},
|
|
46956
|
+
disabled: {
|
|
46957
|
+
type: Boolean,
|
|
46958
|
+
default: void 0
|
|
46959
|
+
},
|
|
46960
|
+
vertical: {
|
|
46961
|
+
type: Boolean,
|
|
46962
|
+
default: false
|
|
46963
|
+
},
|
|
46964
|
+
icon: Object,
|
|
46965
|
+
onChange: Function,
|
|
46966
|
+
onRemove: Function,
|
|
46967
|
+
onFinish: Function,
|
|
46968
|
+
onError: Function,
|
|
46969
|
+
onRetry: Function,
|
|
46970
|
+
onBeforeUpload: Function,
|
|
46971
|
+
isErrorState: Function,
|
|
46972
|
+
onDownload: Function,
|
|
46973
|
+
defaultUpload: {
|
|
46974
|
+
type: Boolean,
|
|
46975
|
+
default: true
|
|
46976
|
+
},
|
|
46977
|
+
fileList: Array,
|
|
46978
|
+
"onUpdate:fileList": [Function, Array],
|
|
46979
|
+
onUpdateFileList: [Function, Array],
|
|
46980
|
+
fileListClass: String,
|
|
46981
|
+
fileListStyle: [String, Object],
|
|
46982
|
+
defaultFileList: {
|
|
46983
|
+
type: Array,
|
|
46984
|
+
default: () => []
|
|
46985
|
+
},
|
|
46986
|
+
showCancelButton: {
|
|
46987
|
+
type: Boolean,
|
|
46988
|
+
default: true
|
|
46989
|
+
},
|
|
46990
|
+
showRemoveButton: {
|
|
46991
|
+
type: Boolean,
|
|
46992
|
+
default: true
|
|
46993
|
+
},
|
|
46994
|
+
showDownloadButton: Boolean,
|
|
46995
|
+
showRetryButton: {
|
|
46996
|
+
type: Boolean,
|
|
46997
|
+
default: true
|
|
46998
|
+
},
|
|
46999
|
+
customDownload: Function,
|
|
47000
|
+
showPreviewButton: {
|
|
47001
|
+
type: Boolean,
|
|
47002
|
+
default: true
|
|
47003
|
+
},
|
|
47004
|
+
listType: {
|
|
47005
|
+
type: String,
|
|
47006
|
+
default: "text"
|
|
47007
|
+
},
|
|
47008
|
+
onPreview: Function,
|
|
47009
|
+
shouldUseThumbnailUrl: {
|
|
47010
|
+
type: Function,
|
|
47011
|
+
default: file => {
|
|
47012
|
+
if (!environmentSupportFile) return false;
|
|
47013
|
+
return isImageFile(file);
|
|
47014
|
+
}
|
|
47015
|
+
},
|
|
47016
|
+
createThumbnailUrl: Function,
|
|
47017
|
+
abstract: Boolean,
|
|
47018
|
+
max: Number,
|
|
47019
|
+
maxSize: Number,
|
|
47020
|
+
showTrigger: {
|
|
47021
|
+
type: Boolean,
|
|
47022
|
+
default: true
|
|
47023
|
+
},
|
|
47024
|
+
imageGroupProps: Object,
|
|
47025
|
+
inputProps: Object,
|
|
47026
|
+
triggerClass: String,
|
|
47027
|
+
triggerStyle: [String, Object],
|
|
47028
|
+
renderIcon: Function,
|
|
47029
|
+
label: String,
|
|
47030
|
+
size: {
|
|
47031
|
+
type: String,
|
|
47032
|
+
default: "medium"
|
|
47033
|
+
},
|
|
47034
|
+
title: String,
|
|
47035
|
+
subtitle: String,
|
|
47036
|
+
noIcon: {
|
|
47037
|
+
type: Boolean,
|
|
47038
|
+
default: false
|
|
47039
|
+
}
|
|
47040
|
+
};
|
|
47041
|
+
|
|
47042
|
+
function self$13(vars) {
|
|
46712
47043
|
const {
|
|
46713
47044
|
fontWeight,
|
|
46714
47045
|
fontBodyMedium,
|
|
@@ -46749,16 +47080,16 @@ function self$14(vars) {
|
|
|
46749
47080
|
const progressLight = {
|
|
46750
47081
|
name: "Progress",
|
|
46751
47082
|
common: derived,
|
|
46752
|
-
self: self$
|
|
47083
|
+
self: self$13
|
|
46753
47084
|
};
|
|
46754
47085
|
|
|
46755
47086
|
const progressDark = {
|
|
46756
47087
|
name: "Progress",
|
|
46757
47088
|
common: derived$1,
|
|
46758
|
-
self: self$
|
|
47089
|
+
self: self$13
|
|
46759
47090
|
};
|
|
46760
47091
|
|
|
46761
|
-
function self$
|
|
47092
|
+
function self$12(vars) {
|
|
46762
47093
|
const {
|
|
46763
47094
|
staticGreen,
|
|
46764
47095
|
staticRed,
|
|
@@ -46815,7 +47146,7 @@ const uploadLight = createTheme$1({
|
|
|
46815
47146
|
Button: buttonLight,
|
|
46816
47147
|
Progress: progressLight
|
|
46817
47148
|
},
|
|
46818
|
-
self: self$
|
|
47149
|
+
self: self$12
|
|
46819
47150
|
});
|
|
46820
47151
|
|
|
46821
47152
|
const uploadDark = {
|
|
@@ -46825,7 +47156,7 @@ const uploadDark = {
|
|
|
46825
47156
|
Button: buttonDark,
|
|
46826
47157
|
Progress: progressDark
|
|
46827
47158
|
},
|
|
46828
|
-
self: self$
|
|
47159
|
+
self: self$12
|
|
46829
47160
|
};
|
|
46830
47161
|
|
|
46831
47162
|
var rtlStyle$i = cB("upload", [cM("rtl", `
|
|
@@ -46838,8 +47169,6 @@ const uploadRtl = {
|
|
|
46838
47169
|
style: rtlStyle$i
|
|
46839
47170
|
};
|
|
46840
47171
|
|
|
46841
|
-
const uploadInjectionKey = createInjectionKey("u-upload");
|
|
46842
|
-
|
|
46843
47172
|
var style$1a = c$1([cB("upload", "width: var(--u-upload-width)", [cM("dragger-inside", [cB("upload-trigger", `
|
|
46844
47173
|
display: block;
|
|
46845
47174
|
`)]), cM("drag-over", [cB("upload-dragger", `
|
|
@@ -47304,7 +47633,7 @@ const cardDark = {
|
|
|
47304
47633
|
self: self$1d
|
|
47305
47634
|
};
|
|
47306
47635
|
|
|
47307
|
-
function self$
|
|
47636
|
+
function self$11(vars) {
|
|
47308
47637
|
const {
|
|
47309
47638
|
textPrimary,
|
|
47310
47639
|
fontBodyMedium,
|
|
@@ -47332,12 +47661,12 @@ function self$12(vars) {
|
|
|
47332
47661
|
const codeLight = {
|
|
47333
47662
|
name: "Code",
|
|
47334
47663
|
common: derived,
|
|
47335
|
-
self: self$
|
|
47664
|
+
self: self$11
|
|
47336
47665
|
};
|
|
47337
47666
|
|
|
47338
|
-
function self$
|
|
47667
|
+
function self$10(vars) {
|
|
47339
47668
|
return {
|
|
47340
|
-
...self$
|
|
47669
|
+
...self$11(vars),
|
|
47341
47670
|
// extracted from hljs atom-one-dark.scss
|
|
47342
47671
|
"mono-3": "#5c6370",
|
|
47343
47672
|
"hue-1": "#56b6c2",
|
|
@@ -47353,10 +47682,10 @@ function self$11(vars) {
|
|
|
47353
47682
|
const codeDark = {
|
|
47354
47683
|
name: "Code",
|
|
47355
47684
|
common: derived$1,
|
|
47356
|
-
self: self$
|
|
47685
|
+
self: self$10
|
|
47357
47686
|
};
|
|
47358
47687
|
|
|
47359
|
-
function self
|
|
47688
|
+
function self$$(vars) {
|
|
47360
47689
|
const {
|
|
47361
47690
|
cubicBezierEaseInOut
|
|
47362
47691
|
} = vars;
|
|
@@ -47367,13 +47696,13 @@ function self$10(vars) {
|
|
|
47367
47696
|
const collapseTransitionLight = {
|
|
47368
47697
|
name: "CollapseTransition",
|
|
47369
47698
|
common: derived,
|
|
47370
|
-
self: self
|
|
47699
|
+
self: self$$
|
|
47371
47700
|
};
|
|
47372
47701
|
|
|
47373
47702
|
const collapseTransitionDark = {
|
|
47374
47703
|
name: "CollapseTransition",
|
|
47375
47704
|
common: derived$1,
|
|
47376
|
-
self: self
|
|
47705
|
+
self: self$$
|
|
47377
47706
|
};
|
|
47378
47707
|
|
|
47379
47708
|
var rtlStyle$g = cB("collapse-transition", [cM("rtl", `
|
|
@@ -47386,7 +47715,7 @@ const collapseTransitionRtl = {
|
|
|
47386
47715
|
style: rtlStyle$g
|
|
47387
47716
|
};
|
|
47388
47717
|
|
|
47389
|
-
function self
|
|
47718
|
+
function self$_(vars) {
|
|
47390
47719
|
const {
|
|
47391
47720
|
fontWeight,
|
|
47392
47721
|
fontBodyLarge,
|
|
@@ -47426,13 +47755,13 @@ function self$$(vars) {
|
|
|
47426
47755
|
const collapseLight = {
|
|
47427
47756
|
name: "Collapse",
|
|
47428
47757
|
common: derived,
|
|
47429
|
-
self: self
|
|
47758
|
+
self: self$_
|
|
47430
47759
|
};
|
|
47431
47760
|
|
|
47432
47761
|
const collapseDark = {
|
|
47433
47762
|
name: "Collapse",
|
|
47434
47763
|
common: derived$1,
|
|
47435
|
-
self: self
|
|
47764
|
+
self: self$_
|
|
47436
47765
|
};
|
|
47437
47766
|
|
|
47438
47767
|
var rtlStyle$f = cB("collapse", [cM("rtl", `
|
|
@@ -47455,7 +47784,7 @@ const collapseRtl = {
|
|
|
47455
47784
|
style: rtlStyle$f
|
|
47456
47785
|
};
|
|
47457
47786
|
|
|
47458
|
-
function self$
|
|
47787
|
+
function self$Z(vars) {
|
|
47459
47788
|
const {
|
|
47460
47789
|
borderRadius,
|
|
47461
47790
|
fontBodySmall,
|
|
@@ -47542,7 +47871,7 @@ const dropdownLight = createTheme$1({
|
|
|
47542
47871
|
peers: {
|
|
47543
47872
|
Popover: popoverLight
|
|
47544
47873
|
},
|
|
47545
|
-
self: self$
|
|
47874
|
+
self: self$Z
|
|
47546
47875
|
});
|
|
47547
47876
|
|
|
47548
47877
|
const dropdownDark = {
|
|
@@ -47551,7 +47880,7 @@ const dropdownDark = {
|
|
|
47551
47880
|
peers: {
|
|
47552
47881
|
Popover: popoverDark
|
|
47553
47882
|
},
|
|
47554
|
-
self: self$
|
|
47883
|
+
self: self$Z
|
|
47555
47884
|
};
|
|
47556
47885
|
|
|
47557
47886
|
const popselect = {
|
|
@@ -47563,7 +47892,7 @@ const popselect = {
|
|
|
47563
47892
|
}
|
|
47564
47893
|
};
|
|
47565
47894
|
|
|
47566
|
-
function self$
|
|
47895
|
+
function self$Y(vars) {
|
|
47567
47896
|
const {
|
|
47568
47897
|
shadowDepth2
|
|
47569
47898
|
} = vars;
|
|
@@ -47578,10 +47907,10 @@ const popselectLight = createTheme$1({
|
|
|
47578
47907
|
Popover: popoverLight,
|
|
47579
47908
|
InternalSelectMenu: internalSelectMenuLight
|
|
47580
47909
|
},
|
|
47581
|
-
self: self$
|
|
47910
|
+
self: self$Y
|
|
47582
47911
|
});
|
|
47583
47912
|
|
|
47584
|
-
function self$
|
|
47913
|
+
function self$X(vars) {
|
|
47585
47914
|
const {
|
|
47586
47915
|
brandPrimary100,
|
|
47587
47916
|
transparencySecondary,
|
|
@@ -47679,7 +48008,7 @@ const paginationLight = createTheme$1({
|
|
|
47679
48008
|
Input: inputLight,
|
|
47680
48009
|
Popselect: popselectLight
|
|
47681
48010
|
},
|
|
47682
|
-
self: self$
|
|
48011
|
+
self: self$X
|
|
47683
48012
|
});
|
|
47684
48013
|
|
|
47685
48014
|
const paginationDark = {
|
|
@@ -47690,7 +48019,7 @@ const paginationDark = {
|
|
|
47690
48019
|
Input: inputDark,
|
|
47691
48020
|
Popselect: popselect
|
|
47692
48021
|
},
|
|
47693
|
-
self: self$
|
|
48022
|
+
self: self$X
|
|
47694
48023
|
};
|
|
47695
48024
|
|
|
47696
48025
|
var rtlStyle$e = cB("pagination", [cM("rtl", `
|
|
@@ -47707,7 +48036,7 @@ const paginationRtl = {
|
|
|
47707
48036
|
peers: [inputRtl]
|
|
47708
48037
|
};
|
|
47709
48038
|
|
|
47710
|
-
function self$
|
|
48039
|
+
function self$W(vars) {
|
|
47711
48040
|
const {
|
|
47712
48041
|
heightTiny,
|
|
47713
48042
|
heightSmall,
|
|
@@ -47799,13 +48128,13 @@ function self$X(vars) {
|
|
|
47799
48128
|
const radioLight = {
|
|
47800
48129
|
name: "Radio",
|
|
47801
48130
|
common: derived,
|
|
47802
|
-
self: self$
|
|
48131
|
+
self: self$W
|
|
47803
48132
|
};
|
|
47804
48133
|
|
|
47805
48134
|
const radioDark = {
|
|
47806
48135
|
name: "Radio",
|
|
47807
48136
|
common: derived$1,
|
|
47808
|
-
self: self$
|
|
48137
|
+
self: self$W
|
|
47809
48138
|
};
|
|
47810
48139
|
|
|
47811
48140
|
var rtlStyle$d = c$1([cB("radio", [cM("rtl", `
|
|
@@ -47833,7 +48162,7 @@ const radioRtl = {
|
|
|
47833
48162
|
style: rtlStyle$d
|
|
47834
48163
|
};
|
|
47835
48164
|
|
|
47836
|
-
function self$
|
|
48165
|
+
function self$V(vars) {
|
|
47837
48166
|
const {
|
|
47838
48167
|
borderRadius,
|
|
47839
48168
|
opacityDisabled,
|
|
@@ -47934,7 +48263,7 @@ const dataTableLight = createTheme$1({
|
|
|
47934
48263
|
Ellipsis: ellipsisLight,
|
|
47935
48264
|
Dropdown: dropdownLight
|
|
47936
48265
|
},
|
|
47937
|
-
self: self$
|
|
48266
|
+
self: self$V
|
|
47938
48267
|
});
|
|
47939
48268
|
|
|
47940
48269
|
const dataTableDark = {
|
|
@@ -47951,10 +48280,10 @@ const dataTableDark = {
|
|
|
47951
48280
|
Ellipsis: ellipsisDark,
|
|
47952
48281
|
Dropdown: dropdownDark
|
|
47953
48282
|
},
|
|
47954
|
-
self: self$
|
|
48283
|
+
self: self$V
|
|
47955
48284
|
};
|
|
47956
48285
|
|
|
47957
|
-
function self$
|
|
48286
|
+
function self$U(vars) {
|
|
47958
48287
|
const {
|
|
47959
48288
|
opacityDisabled,
|
|
47960
48289
|
borderRadius,
|
|
@@ -47996,7 +48325,7 @@ const timePickerLight = createTheme$1({
|
|
|
47996
48325
|
Button: buttonLight,
|
|
47997
48326
|
Input: inputLight
|
|
47998
48327
|
},
|
|
47999
|
-
self: self$
|
|
48328
|
+
self: self$U
|
|
48000
48329
|
});
|
|
48001
48330
|
|
|
48002
48331
|
const timePickerDark = {
|
|
@@ -48007,7 +48336,7 @@ const timePickerDark = {
|
|
|
48007
48336
|
Button: buttonDark,
|
|
48008
48337
|
Input: inputDark
|
|
48009
48338
|
},
|
|
48010
|
-
self: self$
|
|
48339
|
+
self: self$U
|
|
48011
48340
|
};
|
|
48012
48341
|
|
|
48013
48342
|
const itemWidth = "38px";
|
|
@@ -48053,7 +48382,7 @@ var commonVars$6 = {
|
|
|
48053
48382
|
calendarRightPaddingYearrange: "0"
|
|
48054
48383
|
};
|
|
48055
48384
|
|
|
48056
|
-
function self$
|
|
48385
|
+
function self$T(vars) {
|
|
48057
48386
|
const {
|
|
48058
48387
|
iconMedium,
|
|
48059
48388
|
fontWeightStrong,
|
|
@@ -48154,7 +48483,7 @@ const datePickerLight = createTheme$1({
|
|
|
48154
48483
|
Scrollbar: scrollbarLight,
|
|
48155
48484
|
Select: internalSelectionLight
|
|
48156
48485
|
},
|
|
48157
|
-
self: self$
|
|
48486
|
+
self: self$T
|
|
48158
48487
|
});
|
|
48159
48488
|
|
|
48160
48489
|
const datePickerDark = {
|
|
@@ -48167,10 +48496,10 @@ const datePickerDark = {
|
|
|
48167
48496
|
Scrollbar: scrollbarDark,
|
|
48168
48497
|
Select: internalSelectionDark
|
|
48169
48498
|
},
|
|
48170
|
-
self: self$
|
|
48499
|
+
self: self$T
|
|
48171
48500
|
};
|
|
48172
48501
|
|
|
48173
|
-
function self$
|
|
48502
|
+
function self$S(vars) {
|
|
48174
48503
|
const {
|
|
48175
48504
|
borderRadius,
|
|
48176
48505
|
lineHeightBodyLarge,
|
|
@@ -48220,13 +48549,13 @@ function self$T(vars) {
|
|
|
48220
48549
|
const descriptionsLight = {
|
|
48221
48550
|
name: "Descriptions",
|
|
48222
48551
|
common: derived,
|
|
48223
|
-
self: self$
|
|
48552
|
+
self: self$S
|
|
48224
48553
|
};
|
|
48225
48554
|
|
|
48226
48555
|
const descriptionsDark = {
|
|
48227
48556
|
name: "Descriptions",
|
|
48228
48557
|
common: derived$1,
|
|
48229
|
-
self: self$
|
|
48558
|
+
self: self$S
|
|
48230
48559
|
};
|
|
48231
48560
|
|
|
48232
48561
|
var commonVars$5 = {
|
|
@@ -48240,7 +48569,7 @@ var commonVars$5 = {
|
|
|
48240
48569
|
closeBorderRadius: "100px"
|
|
48241
48570
|
};
|
|
48242
48571
|
|
|
48243
|
-
function self$
|
|
48572
|
+
function self$R(vars) {
|
|
48244
48573
|
const {
|
|
48245
48574
|
borderRadius,
|
|
48246
48575
|
containerPrimary,
|
|
@@ -48297,7 +48626,7 @@ const dialogLight = createTheme$1({
|
|
|
48297
48626
|
peers: {
|
|
48298
48627
|
Button: buttonLight
|
|
48299
48628
|
},
|
|
48300
|
-
self: self$
|
|
48629
|
+
self: self$R
|
|
48301
48630
|
});
|
|
48302
48631
|
|
|
48303
48632
|
const dialogDark = {
|
|
@@ -48306,10 +48635,10 @@ const dialogDark = {
|
|
|
48306
48635
|
peers: {
|
|
48307
48636
|
Button: buttonDark
|
|
48308
48637
|
},
|
|
48309
|
-
self: self$
|
|
48638
|
+
self: self$R
|
|
48310
48639
|
};
|
|
48311
48640
|
|
|
48312
|
-
function self$
|
|
48641
|
+
function self$Q(vars) {
|
|
48313
48642
|
const {
|
|
48314
48643
|
elementsQuaternary,
|
|
48315
48644
|
textPrimary,
|
|
@@ -48329,13 +48658,13 @@ function self$R(vars) {
|
|
|
48329
48658
|
const dividerLight = {
|
|
48330
48659
|
name: "Divider",
|
|
48331
48660
|
common: derived,
|
|
48332
|
-
self: self$
|
|
48661
|
+
self: self$Q
|
|
48333
48662
|
};
|
|
48334
48663
|
|
|
48335
48664
|
const dividerDark = {
|
|
48336
48665
|
name: "Divider",
|
|
48337
48666
|
common: derived$1,
|
|
48338
|
-
self: self$
|
|
48667
|
+
self: self$Q
|
|
48339
48668
|
};
|
|
48340
48669
|
|
|
48341
48670
|
var commonVars$4 = {
|
|
@@ -48351,7 +48680,7 @@ var commonVars$4 = {
|
|
|
48351
48680
|
contentBorderRadius: "24px"
|
|
48352
48681
|
};
|
|
48353
48682
|
|
|
48354
|
-
function self$
|
|
48683
|
+
function self$P(vars) {
|
|
48355
48684
|
const {
|
|
48356
48685
|
containerPrimary,
|
|
48357
48686
|
textPrimary,
|
|
@@ -48400,7 +48729,7 @@ const drawerLight = createTheme$1({
|
|
|
48400
48729
|
peers: {
|
|
48401
48730
|
Scrollbar: scrollbarLight
|
|
48402
48731
|
},
|
|
48403
|
-
self: self$
|
|
48732
|
+
self: self$P
|
|
48404
48733
|
});
|
|
48405
48734
|
|
|
48406
48735
|
const drawerDark = {
|
|
@@ -48409,7 +48738,7 @@ const drawerDark = {
|
|
|
48409
48738
|
peers: {
|
|
48410
48739
|
Scrollbar: scrollbarDark
|
|
48411
48740
|
},
|
|
48412
|
-
self: self$
|
|
48741
|
+
self: self$P
|
|
48413
48742
|
};
|
|
48414
48743
|
|
|
48415
48744
|
var rtlStyle$c = cB("drawer", [cM("rtl", `
|
|
@@ -48443,7 +48772,7 @@ const dynamicInputDark = {
|
|
|
48443
48772
|
}
|
|
48444
48773
|
};
|
|
48445
48774
|
|
|
48446
|
-
function self$
|
|
48775
|
+
function self$O() {
|
|
48447
48776
|
return commonVariables$1;
|
|
48448
48777
|
}
|
|
48449
48778
|
const dynamicInputLight = createTheme$1({
|
|
@@ -48453,7 +48782,7 @@ const dynamicInputLight = createTheme$1({
|
|
|
48453
48782
|
Input: inputLight,
|
|
48454
48783
|
Button: buttonLight
|
|
48455
48784
|
},
|
|
48456
|
-
self: self$
|
|
48785
|
+
self: self$O
|
|
48457
48786
|
});
|
|
48458
48787
|
|
|
48459
48788
|
var rtlStyle$b = cB("input-number", [cM("rtl", `
|
|
@@ -48494,12 +48823,12 @@ const spaceDark = {
|
|
|
48494
48823
|
}
|
|
48495
48824
|
};
|
|
48496
48825
|
|
|
48497
|
-
function self$
|
|
48826
|
+
function self$N() {
|
|
48498
48827
|
return commonVars$3;
|
|
48499
48828
|
}
|
|
48500
48829
|
const spaceLight = {
|
|
48501
48830
|
name: "Space",
|
|
48502
|
-
self: self$
|
|
48831
|
+
self: self$N
|
|
48503
48832
|
};
|
|
48504
48833
|
|
|
48505
48834
|
var rtlStyle$9 = cB("space", [cM("rtl", `
|
|
@@ -48571,7 +48900,7 @@ const floatButtonGroupDark = {
|
|
|
48571
48900
|
}
|
|
48572
48901
|
};
|
|
48573
48902
|
|
|
48574
|
-
function self$
|
|
48903
|
+
function self$M(vars) {
|
|
48575
48904
|
const {
|
|
48576
48905
|
containerPrimary,
|
|
48577
48906
|
elementsQuaternary,
|
|
@@ -48587,7 +48916,7 @@ function self$N(vars) {
|
|
|
48587
48916
|
const themeLight$4 = {
|
|
48588
48917
|
name: "FloatButtonGroup",
|
|
48589
48918
|
common: derived,
|
|
48590
|
-
self: self$
|
|
48919
|
+
self: self$M
|
|
48591
48920
|
};
|
|
48592
48921
|
|
|
48593
48922
|
const floatButtonDark = {
|
|
@@ -48622,7 +48951,7 @@ const floatButtonDark = {
|
|
|
48622
48951
|
}
|
|
48623
48952
|
};
|
|
48624
48953
|
|
|
48625
|
-
function self$
|
|
48954
|
+
function self$L(vars) {
|
|
48626
48955
|
const {
|
|
48627
48956
|
containerPrimary,
|
|
48628
48957
|
textPrimary,
|
|
@@ -48651,10 +48980,10 @@ function self$M(vars) {
|
|
|
48651
48980
|
const themeLight$3 = {
|
|
48652
48981
|
name: "FloatButton",
|
|
48653
48982
|
common: derived,
|
|
48654
|
-
self: self$
|
|
48983
|
+
self: self$L
|
|
48655
48984
|
};
|
|
48656
48985
|
|
|
48657
|
-
function self$
|
|
48986
|
+
function self$K(vars) {
|
|
48658
48987
|
const {
|
|
48659
48988
|
heightSmall,
|
|
48660
48989
|
heightMedium,
|
|
@@ -48709,16 +49038,16 @@ function self$L(vars) {
|
|
|
48709
49038
|
const formLight = {
|
|
48710
49039
|
name: "Form",
|
|
48711
49040
|
common: derived,
|
|
48712
|
-
self: self$
|
|
49041
|
+
self: self$K
|
|
48713
49042
|
};
|
|
48714
49043
|
|
|
48715
49044
|
const formItemDark = {
|
|
48716
49045
|
name: "Form",
|
|
48717
49046
|
common: derived$1,
|
|
48718
|
-
self: self$
|
|
49047
|
+
self: self$K
|
|
48719
49048
|
};
|
|
48720
49049
|
|
|
48721
|
-
function self$
|
|
49050
|
+
function self$J(vars) {
|
|
48722
49051
|
const {
|
|
48723
49052
|
brandPrimary500,
|
|
48724
49053
|
staticGreen,
|
|
@@ -48755,16 +49084,16 @@ function self$K(vars) {
|
|
|
48755
49084
|
const gradientTextLight = {
|
|
48756
49085
|
name: "GradientText",
|
|
48757
49086
|
common: derived,
|
|
48758
|
-
self: self$
|
|
49087
|
+
self: self$J
|
|
48759
49088
|
};
|
|
48760
49089
|
|
|
48761
49090
|
const gradientTextDark = {
|
|
48762
49091
|
name: "GradientText",
|
|
48763
49092
|
common: derived$1,
|
|
48764
|
-
self: self$
|
|
49093
|
+
self: self$J
|
|
48765
49094
|
};
|
|
48766
49095
|
|
|
48767
|
-
function self$
|
|
49096
|
+
function self$I(vars) {
|
|
48768
49097
|
const {
|
|
48769
49098
|
textSecondary
|
|
48770
49099
|
} = vars;
|
|
@@ -48779,7 +49108,7 @@ const inputNumberLight = createTheme$1({
|
|
|
48779
49108
|
Button: buttonLight,
|
|
48780
49109
|
Input: inputLight
|
|
48781
49110
|
},
|
|
48782
|
-
self: self$
|
|
49111
|
+
self: self$I
|
|
48783
49112
|
});
|
|
48784
49113
|
|
|
48785
49114
|
const inputNumberDark = {
|
|
@@ -48789,10 +49118,10 @@ const inputNumberDark = {
|
|
|
48789
49118
|
Button: buttonDark,
|
|
48790
49119
|
Input: inputDark
|
|
48791
49120
|
},
|
|
48792
|
-
self: self$
|
|
49121
|
+
self: self$I
|
|
48793
49122
|
};
|
|
48794
49123
|
|
|
48795
|
-
function self$
|
|
49124
|
+
function self$H() {
|
|
48796
49125
|
return {
|
|
48797
49126
|
inputWidthSmall: "44px",
|
|
48798
49127
|
inputWidthMedium: "50px",
|
|
@@ -48808,7 +49137,7 @@ const inputOtpLight = createTheme$1({
|
|
|
48808
49137
|
peers: {
|
|
48809
49138
|
Input: inputLight
|
|
48810
49139
|
},
|
|
48811
|
-
self: self$
|
|
49140
|
+
self: self$H
|
|
48812
49141
|
});
|
|
48813
49142
|
|
|
48814
49143
|
const inputOtpDark = {
|
|
@@ -48817,7 +49146,7 @@ const inputOtpDark = {
|
|
|
48817
49146
|
peers: {
|
|
48818
49147
|
Input: inputDark
|
|
48819
49148
|
},
|
|
48820
|
-
self: self$
|
|
49149
|
+
self: self$H
|
|
48821
49150
|
};
|
|
48822
49151
|
|
|
48823
49152
|
var rtlStyle$8 = cB("input-otp", [cM("rtl", `
|
|
@@ -48829,7 +49158,7 @@ const inputOtpRtl = {
|
|
|
48829
49158
|
style: rtlStyle$8
|
|
48830
49159
|
};
|
|
48831
49160
|
|
|
48832
|
-
function self$
|
|
49161
|
+
function self$G(vars) {
|
|
48833
49162
|
const {
|
|
48834
49163
|
textPrimary,
|
|
48835
49164
|
textQuaternary,
|
|
@@ -48875,7 +49204,7 @@ const layoutLight = createTheme$1({
|
|
|
48875
49204
|
peers: {
|
|
48876
49205
|
Scrollbar: scrollbarLight
|
|
48877
49206
|
},
|
|
48878
|
-
self: self$
|
|
49207
|
+
self: self$G
|
|
48879
49208
|
});
|
|
48880
49209
|
|
|
48881
49210
|
const layoutDark = {
|
|
@@ -48884,7 +49213,7 @@ const layoutDark = {
|
|
|
48884
49213
|
peers: {
|
|
48885
49214
|
Scrollbar: scrollbarDark
|
|
48886
49215
|
},
|
|
48887
|
-
self: self$
|
|
49216
|
+
self: self$G
|
|
48888
49217
|
};
|
|
48889
49218
|
|
|
48890
49219
|
const rowDark = {
|
|
@@ -48921,7 +49250,7 @@ const rowRtl = {
|
|
|
48921
49250
|
style: rtlStyle$7
|
|
48922
49251
|
};
|
|
48923
49252
|
|
|
48924
|
-
function self$
|
|
49253
|
+
function self$F(vars) {
|
|
48925
49254
|
const {
|
|
48926
49255
|
brandPrimary500,
|
|
48927
49256
|
staticRed
|
|
@@ -48935,16 +49264,16 @@ function self$G(vars) {
|
|
|
48935
49264
|
const loadingBarLight = {
|
|
48936
49265
|
name: "LoadingBar",
|
|
48937
49266
|
common: derived,
|
|
48938
|
-
self: self$
|
|
49267
|
+
self: self$F
|
|
48939
49268
|
};
|
|
48940
49269
|
|
|
48941
49270
|
const loadingBarDark = {
|
|
48942
49271
|
name: "LoadingBar",
|
|
48943
49272
|
common: derived$1,
|
|
48944
|
-
self: self$
|
|
49273
|
+
self: self$F
|
|
48945
49274
|
};
|
|
48946
49275
|
|
|
48947
|
-
function self$
|
|
49276
|
+
function self$E(vars) {
|
|
48948
49277
|
const {
|
|
48949
49278
|
fontBodyMedium,
|
|
48950
49279
|
textPrimary,
|
|
@@ -48967,7 +49296,7 @@ const logLight = createTheme$1({
|
|
|
48967
49296
|
Scrollbar: scrollbarLight,
|
|
48968
49297
|
Code: codeLight
|
|
48969
49298
|
},
|
|
48970
|
-
self: self$
|
|
49299
|
+
self: self$E
|
|
48971
49300
|
});
|
|
48972
49301
|
|
|
48973
49302
|
const logDark = {
|
|
@@ -48977,25 +49306,25 @@ const logDark = {
|
|
|
48977
49306
|
Scrollbar: scrollbarDark,
|
|
48978
49307
|
Code: codeDark
|
|
48979
49308
|
},
|
|
48980
|
-
self: self$
|
|
49309
|
+
self: self$E
|
|
48981
49310
|
};
|
|
48982
49311
|
|
|
48983
|
-
function self$
|
|
49312
|
+
function self$D() {
|
|
48984
49313
|
return {};
|
|
48985
49314
|
}
|
|
48986
49315
|
const marqueeLight = {
|
|
48987
49316
|
name: "Marquee",
|
|
48988
49317
|
common: derived,
|
|
48989
|
-
self: self$
|
|
49318
|
+
self: self$D
|
|
48990
49319
|
};
|
|
48991
49320
|
|
|
48992
49321
|
const marqueeDark = {
|
|
48993
49322
|
name: "Marquee",
|
|
48994
49323
|
common: derived$1,
|
|
48995
|
-
self: self$
|
|
49324
|
+
self: self$D
|
|
48996
49325
|
};
|
|
48997
49326
|
|
|
48998
|
-
function self$
|
|
49327
|
+
function self$C(vars) {
|
|
48999
49328
|
const {
|
|
49000
49329
|
shadowDepth2
|
|
49001
49330
|
} = vars;
|
|
@@ -49010,7 +49339,7 @@ const mentionLight = createTheme$1({
|
|
|
49010
49339
|
InternalSelectMenu: internalSelectMenuLight,
|
|
49011
49340
|
Input: inputLight
|
|
49012
49341
|
},
|
|
49013
|
-
self: self$
|
|
49342
|
+
self: self$C
|
|
49014
49343
|
});
|
|
49015
49344
|
|
|
49016
49345
|
const listDark = {
|
|
@@ -49020,7 +49349,7 @@ const listDark = {
|
|
|
49020
49349
|
InternalSelectMenu: internalSelectMenuDark,
|
|
49021
49350
|
Input: inputDark
|
|
49022
49351
|
},
|
|
49023
|
-
self: self$
|
|
49352
|
+
self: self$C
|
|
49024
49353
|
};
|
|
49025
49354
|
|
|
49026
49355
|
function createPartialInvertedVars(color, activeItemColor, activeTextColor, groupTextColor) {
|
|
@@ -49063,7 +49392,7 @@ function createPartialInvertedVars(color, activeItemColor, activeTextColor, grou
|
|
|
49063
49392
|
groupTextColorInverted: groupTextColor
|
|
49064
49393
|
};
|
|
49065
49394
|
}
|
|
49066
|
-
function self$
|
|
49395
|
+
function self$B(vars) {
|
|
49067
49396
|
const {
|
|
49068
49397
|
textSecondary,
|
|
49069
49398
|
borderRadiusSmall,
|
|
@@ -49131,7 +49460,7 @@ const menuLight = createTheme$1({
|
|
|
49131
49460
|
Tooltip: tooltipLight,
|
|
49132
49461
|
Dropdown: dropdownLight
|
|
49133
49462
|
},
|
|
49134
|
-
self: self$
|
|
49463
|
+
self: self$B
|
|
49135
49464
|
});
|
|
49136
49465
|
|
|
49137
49466
|
const menuDark = {
|
|
@@ -49141,60 +49470,8 @@ const menuDark = {
|
|
|
49141
49470
|
Tooltip: tooltipDark,
|
|
49142
49471
|
Dropdown: dropdownDark
|
|
49143
49472
|
},
|
|
49144
|
-
self: self$C
|
|
49145
|
-
};
|
|
49146
|
-
|
|
49147
|
-
function self$B(vars) {
|
|
49148
|
-
const {
|
|
49149
|
-
borderRadiusLarge,
|
|
49150
|
-
elementsSecondary,
|
|
49151
|
-
elementsTertiary,
|
|
49152
|
-
textPrimary,
|
|
49153
|
-
textSecondary,
|
|
49154
|
-
textTertiary,
|
|
49155
|
-
brandPrimary400,
|
|
49156
|
-
staticGreen,
|
|
49157
|
-
staticRed,
|
|
49158
|
-
staticWhite
|
|
49159
|
-
} = vars;
|
|
49160
|
-
return {
|
|
49161
|
-
messageBubbleBackgroundColorOwn: elementsTertiary,
|
|
49162
|
-
messageBubbleBackgroundColorOther: elementsTertiary,
|
|
49163
|
-
messageBubbleTextColorOwn: textPrimary,
|
|
49164
|
-
messageBubbleTextColorOther: textPrimary,
|
|
49165
|
-
messageTimeColor: textTertiary,
|
|
49166
|
-
messageStatusReadColor: brandPrimary400,
|
|
49167
|
-
messageStatusSuccessColor: staticGreen,
|
|
49168
|
-
attachmentBackgroundColorOwn: staticWhite,
|
|
49169
|
-
attachmentBackgroundColorOther: staticWhite,
|
|
49170
|
-
messageErrorColor: staticRed,
|
|
49171
|
-
messageBorderRadius: borderRadiusLarge,
|
|
49172
|
-
unreadNotificationBackgroundColor: brandPrimary400,
|
|
49173
|
-
unreadNotificationTextColor: elementsSecondary,
|
|
49174
|
-
serviceMessageTextColor: textSecondary,
|
|
49175
|
-
serviceMessageBackgroundColor: "transparent",
|
|
49176
|
-
messageTitleColor: textPrimary
|
|
49177
|
-
};
|
|
49178
|
-
}
|
|
49179
|
-
const messageBubbleLight = createTheme$1({
|
|
49180
|
-
name: "MessageBubble",
|
|
49181
|
-
common: derived,
|
|
49182
|
-
peers: {
|
|
49183
|
-
StatusIcon: iconLight
|
|
49184
|
-
},
|
|
49185
49473
|
self: self$B
|
|
49186
|
-
}
|
|
49187
|
-
|
|
49188
|
-
const messageBubbleDark = createTheme$1({
|
|
49189
|
-
name: "MessageBubble",
|
|
49190
|
-
common: derived$1,
|
|
49191
|
-
peers: {
|
|
49192
|
-
StatusIcon: iconDark$1
|
|
49193
|
-
},
|
|
49194
|
-
self: vars => ({
|
|
49195
|
-
...self$B(vars)
|
|
49196
|
-
})
|
|
49197
|
-
});
|
|
49474
|
+
};
|
|
49198
49475
|
|
|
49199
49476
|
function self$A(vars) {
|
|
49200
49477
|
const {
|
|
@@ -50570,20 +50847,6 @@ const imageDark = {
|
|
|
50570
50847
|
self: self$g
|
|
50571
50848
|
};
|
|
50572
50849
|
|
|
50573
|
-
const prevIcon = /* @__PURE__ */ h("svg", { viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ h(
|
|
50574
|
-
"path",
|
|
50575
|
-
{
|
|
50576
|
-
d: "M6 5C5.75454 5 5.55039 5.17688 5.50806 5.41012L5.5 5.5V14.5C5.5 14.7761 5.72386 15 6 15C6.24546 15 6.44961 14.8231 6.49194 14.5899L6.5 14.5V5.5C6.5 5.22386 6.27614 5 6 5ZM13.8536 5.14645C13.68 4.97288 13.4106 4.9536 13.2157 5.08859L13.1464 5.14645L8.64645 9.64645C8.47288 9.82001 8.4536 10.0894 8.58859 10.2843L8.64645 10.3536L13.1464 14.8536C13.3417 15.0488 13.6583 15.0488 13.8536 14.8536C14.0271 14.68 14.0464 14.4106 13.9114 14.2157L13.8536 14.1464L9.70711 10L13.8536 5.85355C14.0488 5.65829 14.0488 5.34171 13.8536 5.14645Z",
|
|
50577
|
-
fill: "currentColor"
|
|
50578
|
-
}
|
|
50579
|
-
));
|
|
50580
|
-
const nextIcon = /* @__PURE__ */ h("svg", { viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ h(
|
|
50581
|
-
"path",
|
|
50582
|
-
{
|
|
50583
|
-
d: "M13.5 5C13.7455 5 13.9496 5.17688 13.9919 5.41012L14 5.5V14.5C14 14.7761 13.7761 15 13.5 15C13.2545 15 13.0504 14.8231 13.0081 14.5899L13 14.5V5.5C13 5.22386 13.2239 5 13.5 5ZM5.64645 5.14645C5.82001 4.97288 6.08944 4.9536 6.28431 5.08859L6.35355 5.14645L10.8536 9.64645C11.0271 9.82001 11.0464 10.0894 10.9114 10.2843L10.8536 10.3536L6.35355 14.8536C6.15829 15.0488 5.84171 15.0488 5.64645 14.8536C5.47288 14.68 5.4536 14.4106 5.58859 14.2157L5.64645 14.1464L9.79289 10L5.64645 5.85355C5.45118 5.65829 5.45118 5.34171 5.64645 5.14645Z",
|
|
50584
|
-
fill: "currentColor"
|
|
50585
|
-
}
|
|
50586
|
-
));
|
|
50587
50850
|
const closeIcon = /* @__PURE__ */ h("svg", { viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ h(
|
|
50588
50851
|
"path",
|
|
50589
50852
|
{
|
|
@@ -50591,22 +50854,6 @@ const closeIcon = /* @__PURE__ */ h("svg", { viewBox: "0 0 20 20", fill: "none",
|
|
|
50591
50854
|
fill: "currentColor"
|
|
50592
50855
|
}
|
|
50593
50856
|
));
|
|
50594
|
-
const downloadIcon = /* @__PURE__ */ h(
|
|
50595
|
-
"svg",
|
|
50596
|
-
{
|
|
50597
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
50598
|
-
width: "32",
|
|
50599
|
-
height: "32",
|
|
50600
|
-
viewBox: "0 0 1024 1024"
|
|
50601
|
-
},
|
|
50602
|
-
/* @__PURE__ */ h(
|
|
50603
|
-
"path",
|
|
50604
|
-
{
|
|
50605
|
-
fill: "currentColor",
|
|
50606
|
-
d: "M505.7 661a8 8 0 0 0 12.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"
|
|
50607
|
-
}
|
|
50608
|
-
)
|
|
50609
|
-
);
|
|
50610
50857
|
|
|
50611
50858
|
const imagePreviewSharedProps = {
|
|
50612
50859
|
...useTheme.props,
|
|
@@ -51056,7 +51303,8 @@ var _UImagePreview = defineComponent({
|
|
|
51056
51303
|
toolbarIconColor,
|
|
51057
51304
|
toolbarBorderRadius,
|
|
51058
51305
|
toolbarBoxShadow,
|
|
51059
|
-
toolbarColor
|
|
51306
|
+
toolbarColor,
|
|
51307
|
+
overlayColor
|
|
51060
51308
|
}
|
|
51061
51309
|
} = themeRef.value;
|
|
51062
51310
|
return {
|
|
@@ -51064,7 +51312,8 @@ var _UImagePreview = defineComponent({
|
|
|
51064
51312
|
"--u-toolbar-icon-color": toolbarIconColor,
|
|
51065
51313
|
"--u-toolbar-color": toolbarColor,
|
|
51066
51314
|
"--u-toolbar-border-radius": toolbarBorderRadius,
|
|
51067
|
-
"--u-toolbar-box-shadow": toolbarBoxShadow
|
|
51315
|
+
"--u-toolbar-box-shadow": toolbarBoxShadow,
|
|
51316
|
+
"--u-overlay-color": overlayColor
|
|
51068
51317
|
};
|
|
51069
51318
|
});
|
|
51070
51319
|
const { inlineThemeDisabled } = useConfig();
|
|
@@ -51113,14 +51362,6 @@ var _UImagePreview = defineComponent({
|
|
|
51113
51362
|
},
|
|
51114
51363
|
render() {
|
|
51115
51364
|
const { clsPrefix, renderToolbar, withTooltip } = this;
|
|
51116
|
-
const prevNode = withTooltip(
|
|
51117
|
-
/* @__PURE__ */ h(UBaseIcon, { clsPrefix, onClick: this.handleSwitchPrev }, { default: () => prevIcon }),
|
|
51118
|
-
"tipPrevious"
|
|
51119
|
-
);
|
|
51120
|
-
const nextNode = withTooltip(
|
|
51121
|
-
/* @__PURE__ */ h(UBaseIcon, { clsPrefix, onClick: this.handleSwitchNext }, { default: () => nextIcon }),
|
|
51122
|
-
"tipNext"
|
|
51123
|
-
);
|
|
51124
51365
|
const rotateCounterclockwiseNode = withTooltip(
|
|
51125
51366
|
/* @__PURE__ */ h(UBaseIcon, { clsPrefix, onClick: this.rotateCounterclockwise }, {
|
|
51126
51367
|
default: () => /* @__PURE__ */ h(RotateCounterclockwiseIcon, null)
|
|
@@ -51133,22 +51374,10 @@ var _UImagePreview = defineComponent({
|
|
|
51133
51374
|
}),
|
|
51134
51375
|
"tipClockwise"
|
|
51135
51376
|
);
|
|
51136
|
-
const originalSizeNode = withTooltip(
|
|
51137
|
-
/* @__PURE__ */ h(UBaseIcon, { clsPrefix, onClick: this.resizeToOrignalImageSize }, {
|
|
51138
|
-
default: () => {
|
|
51139
|
-
return /* @__PURE__ */ h(ResizeSmallIcon, null);
|
|
51140
|
-
}
|
|
51141
|
-
}),
|
|
51142
|
-
"tipOriginalSize"
|
|
51143
|
-
);
|
|
51144
51377
|
const zoomOutNode = withTooltip(
|
|
51145
51378
|
/* @__PURE__ */ h(UBaseIcon, { clsPrefix, onClick: this.zoomOut }, { default: () => /* @__PURE__ */ h(ZoomOutIcon, null) }),
|
|
51146
51379
|
"tipZoomOut"
|
|
51147
51380
|
);
|
|
51148
|
-
const downloadNode = withTooltip(
|
|
51149
|
-
/* @__PURE__ */ h(UBaseIcon, { clsPrefix, onClick: this.handleDownloadClick }, { default: () => downloadIcon }),
|
|
51150
|
-
"tipDownload"
|
|
51151
|
-
);
|
|
51152
51381
|
const closeNode = withTooltip(
|
|
51153
51382
|
/* @__PURE__ */ h(UBaseIcon, { clsPrefix, onClick: () => this.close() }, { default: () => closeIcon }),
|
|
51154
51383
|
"tipClose"
|
|
@@ -51190,17 +51419,13 @@ var _UImagePreview = defineComponent({
|
|
|
51190
51419
|
return null;
|
|
51191
51420
|
return /* @__PURE__ */ h("div", { class: `${clsPrefix}-image-preview-toolbar` }, renderToolbar ? renderToolbar({
|
|
51192
51421
|
nodes: {
|
|
51193
|
-
prev: prevNode,
|
|
51194
|
-
next: nextNode,
|
|
51195
51422
|
rotateCounterclockwise: rotateCounterclockwiseNode,
|
|
51196
51423
|
rotateClockwise: rotateClockwiseNode,
|
|
51197
|
-
resizeToOriginalSize: originalSizeNode,
|
|
51198
51424
|
zoomOut: zoomOutNode,
|
|
51199
51425
|
zoomIn: zoomInNode,
|
|
51200
|
-
download: downloadNode,
|
|
51201
51426
|
close: closeNode
|
|
51202
51427
|
}
|
|
51203
|
-
}) : /* @__PURE__ */ h(Fragment, null,
|
|
51428
|
+
}) : /* @__PURE__ */ h(Fragment, null, rotateCounterclockwiseNode, rotateClockwiseNode, zoomOutNode, zoomInNode, closeNode));
|
|
51204
51429
|
}
|
|
51205
51430
|
}) : null,
|
|
51206
51431
|
/* @__PURE__ */ h(
|
|
@@ -51855,7 +52080,7 @@ var _USpin = defineComponent({
|
|
|
51855
52080
|
}
|
|
51856
52081
|
});
|
|
51857
52082
|
|
|
51858
|
-
function useUploadActionsRender(
|
|
52083
|
+
function useUploadActionsRender(options) {
|
|
51859
52084
|
const {
|
|
51860
52085
|
clsPrefix,
|
|
51861
52086
|
listType,
|
|
@@ -51875,7 +52100,7 @@ function useUploadActionsRender(opts) {
|
|
|
51875
52100
|
handleRetryClick,
|
|
51876
52101
|
handleDownloadClick,
|
|
51877
52102
|
capitalizeFirstLetter
|
|
51878
|
-
} =
|
|
52103
|
+
} = options;
|
|
51879
52104
|
const getExt = (name) => {
|
|
51880
52105
|
const i = name.lastIndexOf(".");
|
|
51881
52106
|
return i === -1 || i === name.length - 1 ? "" : name.slice(i + 1);
|
|
@@ -52002,159 +52227,6 @@ function useUploadActionsRender(opts) {
|
|
|
52002
52227
|
return { icon, actionsNode };
|
|
52003
52228
|
}
|
|
52004
52229
|
|
|
52005
|
-
function isImageFileType(type) {
|
|
52006
|
-
return type.includes("image/");
|
|
52007
|
-
}
|
|
52008
|
-
function getExtname(url = "") {
|
|
52009
|
-
const temp = url.split("/");
|
|
52010
|
-
const filename = temp[temp.length - 1];
|
|
52011
|
-
const filenameWithoutSuffix = filename.split(/#|\?/)[0];
|
|
52012
|
-
return (/\.[^./\\]*$/.exec(filenameWithoutSuffix) || [""])[0];
|
|
52013
|
-
}
|
|
52014
|
-
const imageExtensionRegex = /(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico)$/i;
|
|
52015
|
-
function capitalizeFirstLetter(str) {
|
|
52016
|
-
if (!str) return str;
|
|
52017
|
-
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
52018
|
-
}
|
|
52019
|
-
const isImageFile = file => {
|
|
52020
|
-
if (file.type) {
|
|
52021
|
-
return isImageFileType(file.type);
|
|
52022
|
-
}
|
|
52023
|
-
const fileNameExtension = getExtname(file.name || "");
|
|
52024
|
-
if (imageExtensionRegex.test(fileNameExtension)) {
|
|
52025
|
-
return true;
|
|
52026
|
-
}
|
|
52027
|
-
const url = file.thumbnailUrl || file.url || "";
|
|
52028
|
-
const urlExtension = getExtname(url);
|
|
52029
|
-
if (/^data:image\//.test(url) || imageExtensionRegex.test(urlExtension)) {
|
|
52030
|
-
return true;
|
|
52031
|
-
}
|
|
52032
|
-
return false;
|
|
52033
|
-
};
|
|
52034
|
-
async function createImageDataUrl(file) {
|
|
52035
|
-
return await new Promise(resolve => {
|
|
52036
|
-
if (!file.type || !isImageFileType(file.type)) {
|
|
52037
|
-
resolve("");
|
|
52038
|
-
return;
|
|
52039
|
-
}
|
|
52040
|
-
resolve(window.URL.createObjectURL(file));
|
|
52041
|
-
});
|
|
52042
|
-
}
|
|
52043
|
-
const environmentSupportFile = isBrowser$1 && window.FileReader && window.File;
|
|
52044
|
-
function isFileSystemDirectoryEntry(item) {
|
|
52045
|
-
return item.isDirectory;
|
|
52046
|
-
}
|
|
52047
|
-
function isFileSystemFileEntry(item) {
|
|
52048
|
-
return item.isFile;
|
|
52049
|
-
}
|
|
52050
|
-
async function getFilesFromEntries(entries, directory) {
|
|
52051
|
-
const fileAndEntries = [];
|
|
52052
|
-
let _resolve;
|
|
52053
|
-
let requestCallbackCount = 0;
|
|
52054
|
-
function lock() {
|
|
52055
|
-
requestCallbackCount++;
|
|
52056
|
-
}
|
|
52057
|
-
function unlock() {
|
|
52058
|
-
requestCallbackCount--;
|
|
52059
|
-
if (!requestCallbackCount) {
|
|
52060
|
-
_resolve(fileAndEntries);
|
|
52061
|
-
}
|
|
52062
|
-
}
|
|
52063
|
-
function _getFilesFromEntries(entries2) {
|
|
52064
|
-
entries2.forEach(entry => {
|
|
52065
|
-
if (!entry) return;
|
|
52066
|
-
lock();
|
|
52067
|
-
if (directory && isFileSystemDirectoryEntry(entry)) {
|
|
52068
|
-
const directoryReader = entry.createReader();
|
|
52069
|
-
lock();
|
|
52070
|
-
directoryReader.readEntries(entries3 => {
|
|
52071
|
-
_getFilesFromEntries(entries3);
|
|
52072
|
-
unlock();
|
|
52073
|
-
}, () => {
|
|
52074
|
-
unlock();
|
|
52075
|
-
});
|
|
52076
|
-
} else if (isFileSystemFileEntry(entry)) {
|
|
52077
|
-
lock();
|
|
52078
|
-
entry.file(file => {
|
|
52079
|
-
fileAndEntries.push({
|
|
52080
|
-
file,
|
|
52081
|
-
entry,
|
|
52082
|
-
source: "dnd"
|
|
52083
|
-
});
|
|
52084
|
-
unlock();
|
|
52085
|
-
}, () => {
|
|
52086
|
-
unlock();
|
|
52087
|
-
});
|
|
52088
|
-
}
|
|
52089
|
-
unlock();
|
|
52090
|
-
});
|
|
52091
|
-
}
|
|
52092
|
-
await new Promise(resolve => {
|
|
52093
|
-
_resolve = resolve;
|
|
52094
|
-
_getFilesFromEntries(entries);
|
|
52095
|
-
});
|
|
52096
|
-
return fileAndEntries;
|
|
52097
|
-
}
|
|
52098
|
-
function createSettledFileInfo(fileInfo) {
|
|
52099
|
-
const {
|
|
52100
|
-
id,
|
|
52101
|
-
name,
|
|
52102
|
-
percentage,
|
|
52103
|
-
status,
|
|
52104
|
-
url,
|
|
52105
|
-
file,
|
|
52106
|
-
thumbnailUrl,
|
|
52107
|
-
type,
|
|
52108
|
-
fullPath,
|
|
52109
|
-
batchId
|
|
52110
|
-
} = fileInfo;
|
|
52111
|
-
return {
|
|
52112
|
-
id,
|
|
52113
|
-
name,
|
|
52114
|
-
percentage: percentage ?? null,
|
|
52115
|
-
status,
|
|
52116
|
-
url: url ?? null,
|
|
52117
|
-
file: file ?? null,
|
|
52118
|
-
thumbnailUrl: thumbnailUrl ?? null,
|
|
52119
|
-
type: type ?? null,
|
|
52120
|
-
fullPath: fullPath ?? null,
|
|
52121
|
-
batchId: batchId ?? null
|
|
52122
|
-
};
|
|
52123
|
-
}
|
|
52124
|
-
function matchType(name, mimeType, accept) {
|
|
52125
|
-
name = name.toLowerCase();
|
|
52126
|
-
mimeType = mimeType.toLocaleLowerCase();
|
|
52127
|
-
accept = accept.toLocaleLowerCase();
|
|
52128
|
-
const acceptAtoms = accept.split(",").map(acceptAtom => acceptAtom.trim()).filter(Boolean);
|
|
52129
|
-
return acceptAtoms.some(acceptAtom => {
|
|
52130
|
-
if (acceptAtom.startsWith(".")) {
|
|
52131
|
-
if (name.endsWith(acceptAtom)) return true;
|
|
52132
|
-
} else if (acceptAtom.includes("/")) {
|
|
52133
|
-
const [type, subtype] = mimeType.split("/");
|
|
52134
|
-
const [acceptType, acceptSubtype] = acceptAtom.split("/");
|
|
52135
|
-
if (acceptType === "*" || type && acceptType && acceptType === type) {
|
|
52136
|
-
if (acceptSubtype === "*" || subtype && acceptSubtype && acceptSubtype === subtype) {
|
|
52137
|
-
return true;
|
|
52138
|
-
}
|
|
52139
|
-
}
|
|
52140
|
-
} else {
|
|
52141
|
-
return true;
|
|
52142
|
-
}
|
|
52143
|
-
return false;
|
|
52144
|
-
});
|
|
52145
|
-
}
|
|
52146
|
-
function download(url, name) {
|
|
52147
|
-
if (!url) return;
|
|
52148
|
-
const a = document.createElement("a");
|
|
52149
|
-
a.href = url;
|
|
52150
|
-
if (name !== void 0) {
|
|
52151
|
-
a.download = name;
|
|
52152
|
-
}
|
|
52153
|
-
document.body.appendChild(a);
|
|
52154
|
-
a.click();
|
|
52155
|
-
document.body.removeChild(a);
|
|
52156
|
-
}
|
|
52157
|
-
|
|
52158
52230
|
const buttonThemeOverrides = {
|
|
52159
52231
|
paddingMedium: "0 3px",
|
|
52160
52232
|
heightMedium: "24px",
|
|
@@ -52232,7 +52304,12 @@ var UUploadFile = defineComponent({
|
|
|
52232
52304
|
file: { status },
|
|
52233
52305
|
listType
|
|
52234
52306
|
} = props;
|
|
52235
|
-
|
|
52307
|
+
if (!["finished"].includes(status))
|
|
52308
|
+
return false;
|
|
52309
|
+
if (listType === "preview-list") {
|
|
52310
|
+
return UUpload.isFilePreviewable(props.file);
|
|
52311
|
+
}
|
|
52312
|
+
return !!mergedThumbnailUrlRef.value && listType === "image-card";
|
|
52236
52313
|
});
|
|
52237
52314
|
async function handleRetryClick() {
|
|
52238
52315
|
const onRetry = UUpload.onRetryRef.value;
|
|
@@ -52311,6 +52388,8 @@ var UUploadFile = defineComponent({
|
|
|
52311
52388
|
} = UUpload;
|
|
52312
52389
|
if (onPreview) {
|
|
52313
52390
|
onPreview(props.file);
|
|
52391
|
+
} else if (props.listType === "preview-list") {
|
|
52392
|
+
UUpload.openFilePreview(props.file);
|
|
52314
52393
|
} else if (props.listType === "image-card") {
|
|
52315
52394
|
const { value } = imageRef;
|
|
52316
52395
|
if (!value)
|
|
@@ -52397,7 +52476,8 @@ var UUploadFile = defineComponent({
|
|
|
52397
52476
|
`${clsPrefix}-upload-file`,
|
|
52398
52477
|
`${clsPrefix}-upload-file--${this.progressStatus}-status`,
|
|
52399
52478
|
file.url && file.status !== "error" && imageCardTypes.includes(listType) && `${clsPrefix}-upload-file--with-url`,
|
|
52400
|
-
`${clsPrefix}-upload-file--${listType === "image" || listType === "image-card" ? "image-card" : "text"}-type
|
|
52479
|
+
`${clsPrefix}-upload-file--${listType === "image" || listType === "image-card" ? "image-card" : "text"}-type`,
|
|
52480
|
+
listType === "preview-list" && `${clsPrefix}-upload-file--preview-list-type`
|
|
52401
52481
|
]
|
|
52402
52482
|
},
|
|
52403
52483
|
/* @__PURE__ */ h(
|
|
@@ -52565,11 +52645,17 @@ var _UUploadFileList = defineComponent({
|
|
|
52565
52645
|
themeClassRef,
|
|
52566
52646
|
maxReachedRef,
|
|
52567
52647
|
showTriggerRef,
|
|
52568
|
-
imageGroupPropsRef
|
|
52648
|
+
imageGroupPropsRef,
|
|
52649
|
+
previewSrcListRef,
|
|
52650
|
+
previewShowRef,
|
|
52651
|
+
previewCurrentRef
|
|
52569
52652
|
} = UUpload;
|
|
52570
52653
|
const isImageCardTypeRef = computed(
|
|
52571
52654
|
() => listTypeRef.value === "image-card" || listTypeRef.value === "image"
|
|
52572
52655
|
);
|
|
52656
|
+
const isPreviewListTypeRef = computed(
|
|
52657
|
+
() => listTypeRef.value === "preview-list"
|
|
52658
|
+
);
|
|
52573
52659
|
const renderFileList = () => mergedFileListRef.value.map((file) => /* @__PURE__ */ h(
|
|
52574
52660
|
UUploadFile,
|
|
52575
52661
|
{
|
|
@@ -52583,6 +52669,21 @@ var _UUploadFileList = defineComponent({
|
|
|
52583
52669
|
const renderUploadFileList = () => isImageCardTypeRef.value ? /* @__PURE__ */ h(_UImageGroup, { ...imageGroupPropsRef.value }, { default: renderFileList }) : /* @__PURE__ */ h(FadeInExpandTransition, { group: true }, {
|
|
52584
52670
|
default: renderFileList
|
|
52585
52671
|
});
|
|
52672
|
+
const renderPreview = () => /* @__PURE__ */ h(
|
|
52673
|
+
_UImageGroup,
|
|
52674
|
+
{
|
|
52675
|
+
...imageGroupPropsRef.value,
|
|
52676
|
+
srcList: previewSrcListRef.value,
|
|
52677
|
+
show: previewShowRef.value,
|
|
52678
|
+
current: previewCurrentRef.value,
|
|
52679
|
+
onUpdateShow: (show) => {
|
|
52680
|
+
previewShowRef.value = show;
|
|
52681
|
+
},
|
|
52682
|
+
onUpdateCurrent: (current) => {
|
|
52683
|
+
previewCurrentRef.value = current;
|
|
52684
|
+
}
|
|
52685
|
+
}
|
|
52686
|
+
);
|
|
52586
52687
|
return () => {
|
|
52587
52688
|
const { value: mergedClsPrefix } = mergedClsPrefixRef;
|
|
52588
52689
|
const { value: abstract } = abstractRef;
|
|
@@ -52601,6 +52702,7 @@ var _UUploadFileList = defineComponent({
|
|
|
52601
52702
|
]
|
|
52602
52703
|
},
|
|
52603
52704
|
renderUploadFileList(),
|
|
52705
|
+
isPreviewListTypeRef.value && renderPreview(),
|
|
52604
52706
|
showTriggerRef.value && !maxReachedRef.value && isImageCardTypeRef.value && /* @__PURE__ */ h(_UUploadTrigger, null, slots)
|
|
52605
52707
|
);
|
|
52606
52708
|
};
|
|
@@ -52866,119 +52968,6 @@ function useUploadInternals(options) {
|
|
|
52866
52968
|
};
|
|
52867
52969
|
}
|
|
52868
52970
|
|
|
52869
|
-
const uploadProps = {
|
|
52870
|
-
...useTheme.props,
|
|
52871
|
-
name: {
|
|
52872
|
-
type: String,
|
|
52873
|
-
default: "file"
|
|
52874
|
-
},
|
|
52875
|
-
accept: String,
|
|
52876
|
-
action: String,
|
|
52877
|
-
customRequest: Function,
|
|
52878
|
-
directory: Boolean,
|
|
52879
|
-
directoryDnd: { type: Boolean, default: void 0 },
|
|
52880
|
-
method: {
|
|
52881
|
-
type: String,
|
|
52882
|
-
default: "POST"
|
|
52883
|
-
},
|
|
52884
|
-
multiple: Boolean,
|
|
52885
|
-
showFileList: {
|
|
52886
|
-
type: Boolean,
|
|
52887
|
-
default: true
|
|
52888
|
-
},
|
|
52889
|
-
data: [Object, Function],
|
|
52890
|
-
headers: [Object, Function],
|
|
52891
|
-
withCredentials: Boolean,
|
|
52892
|
-
responseType: {
|
|
52893
|
-
type: String,
|
|
52894
|
-
default: ""
|
|
52895
|
-
},
|
|
52896
|
-
disabled: {
|
|
52897
|
-
type: Boolean,
|
|
52898
|
-
default: void 0
|
|
52899
|
-
},
|
|
52900
|
-
vertical: {
|
|
52901
|
-
type: Boolean,
|
|
52902
|
-
default: false
|
|
52903
|
-
},
|
|
52904
|
-
icon: Object,
|
|
52905
|
-
onChange: Function,
|
|
52906
|
-
onRemove: Function,
|
|
52907
|
-
onFinish: Function,
|
|
52908
|
-
onError: Function,
|
|
52909
|
-
onRetry: Function,
|
|
52910
|
-
onBeforeUpload: Function,
|
|
52911
|
-
isErrorState: Function,
|
|
52912
|
-
/** currently not used */
|
|
52913
|
-
onDownload: Function,
|
|
52914
|
-
defaultUpload: {
|
|
52915
|
-
type: Boolean,
|
|
52916
|
-
default: true
|
|
52917
|
-
},
|
|
52918
|
-
fileList: Array,
|
|
52919
|
-
"onUpdate:fileList": [Function, Array],
|
|
52920
|
-
onUpdateFileList: [Function, Array],
|
|
52921
|
-
fileListClass: String,
|
|
52922
|
-
fileListStyle: [String, Object],
|
|
52923
|
-
defaultFileList: {
|
|
52924
|
-
type: Array,
|
|
52925
|
-
default: () => []
|
|
52926
|
-
},
|
|
52927
|
-
showCancelButton: {
|
|
52928
|
-
type: Boolean,
|
|
52929
|
-
default: true
|
|
52930
|
-
},
|
|
52931
|
-
showRemoveButton: {
|
|
52932
|
-
type: Boolean,
|
|
52933
|
-
default: true
|
|
52934
|
-
},
|
|
52935
|
-
showDownloadButton: Boolean,
|
|
52936
|
-
showRetryButton: {
|
|
52937
|
-
type: Boolean,
|
|
52938
|
-
default: true
|
|
52939
|
-
},
|
|
52940
|
-
customDownload: Function,
|
|
52941
|
-
showPreviewButton: {
|
|
52942
|
-
type: Boolean,
|
|
52943
|
-
default: true
|
|
52944
|
-
},
|
|
52945
|
-
listType: {
|
|
52946
|
-
type: String,
|
|
52947
|
-
default: "text"
|
|
52948
|
-
},
|
|
52949
|
-
onPreview: Function,
|
|
52950
|
-
shouldUseThumbnailUrl: {
|
|
52951
|
-
type: Function,
|
|
52952
|
-
default: (file) => {
|
|
52953
|
-
if (!environmentSupportFile)
|
|
52954
|
-
return false;
|
|
52955
|
-
return isImageFile(file);
|
|
52956
|
-
}
|
|
52957
|
-
},
|
|
52958
|
-
createThumbnailUrl: Function,
|
|
52959
|
-
abstract: Boolean,
|
|
52960
|
-
max: Number,
|
|
52961
|
-
showTrigger: {
|
|
52962
|
-
type: Boolean,
|
|
52963
|
-
default: true
|
|
52964
|
-
},
|
|
52965
|
-
imageGroupProps: Object,
|
|
52966
|
-
inputProps: Object,
|
|
52967
|
-
triggerClass: String,
|
|
52968
|
-
triggerStyle: [String, Object],
|
|
52969
|
-
renderIcon: Function,
|
|
52970
|
-
label: String,
|
|
52971
|
-
size: {
|
|
52972
|
-
type: String,
|
|
52973
|
-
default: "medium"
|
|
52974
|
-
},
|
|
52975
|
-
title: String,
|
|
52976
|
-
subtitle: String,
|
|
52977
|
-
noIcon: {
|
|
52978
|
-
type: Boolean,
|
|
52979
|
-
default: false
|
|
52980
|
-
}
|
|
52981
|
-
};
|
|
52982
52971
|
var _UUpload = defineComponent({
|
|
52983
52972
|
name: "Upload",
|
|
52984
52973
|
props: uploadProps,
|
|
@@ -53028,15 +53017,15 @@ var _UUpload = defineComponent({
|
|
|
53028
53017
|
function openFileDialog() {
|
|
53029
53018
|
inputElRef.value?.click();
|
|
53030
53019
|
}
|
|
53031
|
-
function handleFileInputChange(
|
|
53032
|
-
const target =
|
|
53020
|
+
function handleFileInputChange(event) {
|
|
53021
|
+
const target = event.target;
|
|
53033
53022
|
handleFileAddition(
|
|
53034
53023
|
target.files ? Array.from(target.files).map((file) => ({
|
|
53035
53024
|
file,
|
|
53036
53025
|
entry: null,
|
|
53037
53026
|
source: "input"
|
|
53038
53027
|
})) : null,
|
|
53039
|
-
|
|
53028
|
+
event
|
|
53040
53029
|
);
|
|
53041
53030
|
target.value = "";
|
|
53042
53031
|
}
|
|
@@ -53056,12 +53045,12 @@ var _UUpload = defineComponent({
|
|
|
53056
53045
|
uploadKeyIndexRef.value += 1;
|
|
53057
53046
|
return key;
|
|
53058
53047
|
}
|
|
53059
|
-
function handleFileAddition(fileAndEntries,
|
|
53048
|
+
function handleFileAddition(fileAndEntries, event) {
|
|
53060
53049
|
if (!fileAndEntries || fileAndEntries.length === 0)
|
|
53061
53050
|
return;
|
|
53062
53051
|
const { onBeforeUpload } = props;
|
|
53063
53052
|
fileAndEntries = mergedMultipleRef.value ? fileAndEntries : [fileAndEntries[0]];
|
|
53064
|
-
const { max, accept } = props;
|
|
53053
|
+
const { max, accept, maxSize } = props;
|
|
53065
53054
|
fileAndEntries = fileAndEntries.filter(({ file, source }) => {
|
|
53066
53055
|
if (source === "dnd" && accept?.trim()) {
|
|
53067
53056
|
return matchType(file.name, file.type, accept);
|
|
@@ -53090,6 +53079,10 @@ var _UUpload = defineComponent({
|
|
|
53090
53079
|
thumbnailUrl: null,
|
|
53091
53080
|
fullPath: entry?.fullPath ?? `/${file.webkitRelativePath || file.name}`
|
|
53092
53081
|
};
|
|
53082
|
+
if (isFileSizeExceeded(file, maxSize)) {
|
|
53083
|
+
fileInfo.status = "error";
|
|
53084
|
+
return fileInfo;
|
|
53085
|
+
}
|
|
53093
53086
|
if (!onBeforeUpload || await onBeforeUpload({
|
|
53094
53087
|
file: fileInfo,
|
|
53095
53088
|
fileList: mergedFileListRef.value
|
|
@@ -53102,7 +53095,7 @@ var _UUpload = defineComponent({
|
|
|
53102
53095
|
let nextTickChain = Promise.resolve();
|
|
53103
53096
|
fileInfos.forEach((fileInfo) => {
|
|
53104
53097
|
nextTickChain = nextTickChain.then(nextTick).then(() => {
|
|
53105
|
-
fileInfo && doChange(fileInfo,
|
|
53098
|
+
fileInfo && doChange(fileInfo, event, {
|
|
53106
53099
|
append: true
|
|
53107
53100
|
});
|
|
53108
53101
|
});
|
|
@@ -53129,6 +53122,15 @@ var _UUpload = defineComponent({
|
|
|
53129
53122
|
filesToUpload.forEach((file) => {
|
|
53130
53123
|
const { status } = file;
|
|
53131
53124
|
if (status === "pending" || status === "error" && shouldReupload) {
|
|
53125
|
+
if (isFileSizeExceeded(file.file, props.maxSize)) {
|
|
53126
|
+
if (status === "pending") {
|
|
53127
|
+
const fileAfterChange = Object.assign({}, file, {
|
|
53128
|
+
status: "error"
|
|
53129
|
+
});
|
|
53130
|
+
doChange(fileAfterChange);
|
|
53131
|
+
}
|
|
53132
|
+
return;
|
|
53133
|
+
}
|
|
53132
53134
|
if (props.customRequest) {
|
|
53133
53135
|
customSubmitImpl({
|
|
53134
53136
|
inst: {
|
|
@@ -53209,6 +53211,26 @@ var _UUpload = defineComponent({
|
|
|
53209
53211
|
}
|
|
53210
53212
|
return "";
|
|
53211
53213
|
}
|
|
53214
|
+
function isFilePreviewable(file) {
|
|
53215
|
+
return props.shouldUseThumbnailUrl(file) && getFilePreviewSrc(file) !== null;
|
|
53216
|
+
}
|
|
53217
|
+
const previewFileListRef = computed(
|
|
53218
|
+
() => mergedFileListRef.value.filter(isFilePreviewable)
|
|
53219
|
+
);
|
|
53220
|
+
const previewSrcListRef = computed(
|
|
53221
|
+
() => previewFileListRef.value.map((file) => getFilePreviewSrc(file))
|
|
53222
|
+
);
|
|
53223
|
+
const previewShowRef = ref(false);
|
|
53224
|
+
const previewCurrentRef = ref(0);
|
|
53225
|
+
function openFilePreview(file) {
|
|
53226
|
+
const index = previewFileListRef.value.findIndex(
|
|
53227
|
+
({ id }) => id === file.id
|
|
53228
|
+
);
|
|
53229
|
+
if (index < 0)
|
|
53230
|
+
return;
|
|
53231
|
+
previewCurrentRef.value = index;
|
|
53232
|
+
previewShowRef.value = true;
|
|
53233
|
+
}
|
|
53212
53234
|
const cssVarsRef = computed(() => {
|
|
53213
53235
|
const { value: size } = formItem.mergedSizeRef;
|
|
53214
53236
|
const {
|
|
@@ -53328,7 +53350,12 @@ var _UUpload = defineComponent({
|
|
|
53328
53350
|
imageGroupPropsRef: toRef(props, "imageGroupProps"),
|
|
53329
53351
|
mergedDirectoryDndRef: computed(() => {
|
|
53330
53352
|
return props.directoryDnd ?? props.directory;
|
|
53331
|
-
})
|
|
53353
|
+
}),
|
|
53354
|
+
previewSrcListRef,
|
|
53355
|
+
previewShowRef,
|
|
53356
|
+
previewCurrentRef,
|
|
53357
|
+
isFilePreviewable,
|
|
53358
|
+
openFilePreview
|
|
53332
53359
|
});
|
|
53333
53360
|
const exposedMethods = {
|
|
53334
53361
|
clear: () => {
|
|
@@ -54645,6 +54672,8 @@ var style$16 = cB("message-bubble", `
|
|
|
54645
54672
|
width: fit-content;
|
|
54646
54673
|
display: flex;
|
|
54647
54674
|
flex-direction: column;
|
|
54675
|
+
padding: 12px;
|
|
54676
|
+
gap: 12px;
|
|
54648
54677
|
`, [cM("own", `
|
|
54649
54678
|
background-color: var(--u-message-bubble-background-color-own);
|
|
54650
54679
|
color: var(--u-message-bubble-text-color-own);
|
|
@@ -54652,16 +54681,12 @@ var style$16 = cB("message-bubble", `
|
|
|
54652
54681
|
border-bottom-right-radius: 6px;
|
|
54653
54682
|
`)]), cE("title", `
|
|
54654
54683
|
color: var(--u-message-bubble-title-color);
|
|
54655
|
-
padding: 12px 16px 0;
|
|
54656
54684
|
white-space: pre-wrap;
|
|
54657
54685
|
`), cE("text", `
|
|
54658
|
-
padding: 12px 16px;
|
|
54659
54686
|
white-space: pre-wrap;
|
|
54660
|
-
`), cE("
|
|
54661
|
-
|
|
54662
|
-
|
|
54663
|
-
padding-top: 12px;
|
|
54664
|
-
`)]), cE("meta", `
|
|
54687
|
+
`), cE("after-content", `
|
|
54688
|
+
white-space: normal;
|
|
54689
|
+
`), cE("meta", `
|
|
54665
54690
|
display: flex;
|
|
54666
54691
|
align-items: center;
|
|
54667
54692
|
gap: 4px;
|
|
@@ -54833,6 +54858,12 @@ var _UMessageBubble = defineComponent({
|
|
|
54833
54858
|
);
|
|
54834
54859
|
return url ?? null;
|
|
54835
54860
|
};
|
|
54861
|
+
const getAttachmentUrl = (attachment) => {
|
|
54862
|
+
if (!attachment.url || attachment.url === "#")
|
|
54863
|
+
return null;
|
|
54864
|
+
return attachment.url;
|
|
54865
|
+
};
|
|
54866
|
+
const isAttachmentPreviewable = (file) => Boolean(file.thumbnailUrl);
|
|
54836
54867
|
const handleAttachmentDownload = async (file) => {
|
|
54837
54868
|
if (props.onAttachmentDownload) {
|
|
54838
54869
|
const attachment = normalizedAttachmentsRef.value.find(
|
|
@@ -54873,7 +54904,7 @@ var _UMessageBubble = defineComponent({
|
|
|
54873
54904
|
name: attachment.name,
|
|
54874
54905
|
status: attachment.status || MessageBubbleAttachmentStatus.FINISHED,
|
|
54875
54906
|
percentage: attachment.percentage ?? null,
|
|
54876
|
-
url: attachment
|
|
54907
|
+
url: getAttachmentUrl(attachment),
|
|
54877
54908
|
thumbnailUrl: getThumbnailUrl(attachment),
|
|
54878
54909
|
type: attachment.type ?? null,
|
|
54879
54910
|
file: null,
|
|
@@ -54884,6 +54915,8 @@ var _UMessageBubble = defineComponent({
|
|
|
54884
54915
|
_UUpload,
|
|
54885
54916
|
{
|
|
54886
54917
|
abstract: true,
|
|
54918
|
+
listType: "preview-list",
|
|
54919
|
+
shouldUseThumbnailUrl: isAttachmentPreviewable,
|
|
54887
54920
|
fileList,
|
|
54888
54921
|
fileListStyle: withPadding ? {
|
|
54889
54922
|
display: "flex",
|
|
@@ -54924,8 +54957,10 @@ var _UMessageBubble = defineComponent({
|
|
|
54924
54957
|
props.actions && props.actions.length > 0
|
|
54925
54958
|
);
|
|
54926
54959
|
const hasTitle = Boolean(props.title || slots.title);
|
|
54960
|
+
const afterContentSlot = slots.afterContent || slots["after-content"];
|
|
54961
|
+
const hasAfterContent = Boolean(afterContentSlot);
|
|
54927
54962
|
const hasContentInsideBubble = Boolean(
|
|
54928
|
-
props.content || slots.default || hasTitle || normalizedAttachmentsRef.value.length > 1
|
|
54963
|
+
props.content || slots.default || hasAfterContent || hasTitle || normalizedAttachmentsRef.value.length > 1
|
|
54929
54964
|
);
|
|
54930
54965
|
const messageBubbleContent = hasContentInsideBubble ? /* @__PURE__ */ h(
|
|
54931
54966
|
"div",
|
|
@@ -54944,7 +54979,14 @@ var _UMessageBubble = defineComponent({
|
|
|
54944
54979
|
slots.title ? slots.title(messagePayloadRef.value) : resolveRenderContent(props.title)
|
|
54945
54980
|
),
|
|
54946
54981
|
normalizedAttachmentsRef.value.length > 0 && renderAttachment(true),
|
|
54947
|
-
(props.content || slots.default) && /* @__PURE__ */ h("div", { class: `${mergedClsPrefixRef.value}-message-bubble__text` }, slots.default ? slots.default(messagePayloadRef.value) : resolveRenderContent(props.content))
|
|
54982
|
+
(props.content || slots.default) && /* @__PURE__ */ h("div", { class: `${mergedClsPrefixRef.value}-message-bubble__text` }, slots.default ? slots.default(messagePayloadRef.value) : resolveRenderContent(props.content)),
|
|
54983
|
+
hasAfterContent && /* @__PURE__ */ h(
|
|
54984
|
+
"div",
|
|
54985
|
+
{
|
|
54986
|
+
class: `${mergedClsPrefixRef.value}-message-bubble__after-content`
|
|
54987
|
+
},
|
|
54988
|
+
afterContentSlot?.(messagePayloadRef.value)
|
|
54989
|
+
)
|
|
54948
54990
|
) : normalizedAttachmentsRef.value.length === 1 ? renderAttachment() : null;
|
|
54949
54991
|
return /* @__PURE__ */ h(
|
|
54950
54992
|
"div",
|
|
@@ -55586,6 +55628,21 @@ var _UChatMessages = defineComponent({
|
|
|
55586
55628
|
const { mergedClsPrefixRef } = useConfig(props);
|
|
55587
55629
|
const themeRef = UChat?.mergedThemeRef ?? useTheme("Chat", "-chat", style$15, chatLight, props, mergedClsPrefixRef);
|
|
55588
55630
|
const { localeRef } = useLocale("Chat");
|
|
55631
|
+
const messageBubbleThemeOverridesRef = computed(() => {
|
|
55632
|
+
const { self, peerOverrides } = themeRef.value;
|
|
55633
|
+
return {
|
|
55634
|
+
messageBubbleBackgroundColorOwn: self.messageBubbleBackgroundColorOwn,
|
|
55635
|
+
messageBubbleBackgroundColorOther: self.messageBubbleBackgroundColorOther,
|
|
55636
|
+
messageBubbleTextColorOwn: self.messageBubbleTextColorOwn,
|
|
55637
|
+
messageBubbleTextColorOther: self.messageBubbleTextColorOther,
|
|
55638
|
+
messageTimeColor: self.messageTimeColor,
|
|
55639
|
+
attachmentBackgroundColorOwn: self.attachmentBackgroundColorOwn,
|
|
55640
|
+
attachmentBackgroundColorOther: self.attachmentBackgroundColorOther,
|
|
55641
|
+
unreadNotificationBackgroundColor: self.unreadNotificationBackgroundColor,
|
|
55642
|
+
unreadNotificationTextColor: self.unreadNotificationTextColor,
|
|
55643
|
+
...peerOverrides.MessageBubble
|
|
55644
|
+
};
|
|
55645
|
+
});
|
|
55589
55646
|
const cssVarsRef = computed(() => {
|
|
55590
55647
|
const {
|
|
55591
55648
|
common: {
|
|
@@ -55701,7 +55758,9 @@ var _UChatMessages = defineComponent({
|
|
|
55701
55758
|
{
|
|
55702
55759
|
type: MessageBubbleType.SERVICE,
|
|
55703
55760
|
serviceVariant: MessageBubbleServiceVariant.UNREAD,
|
|
55704
|
-
content: `${count} ${mergedUnreadNotificationTextRef.value}
|
|
55761
|
+
content: `${count} ${mergedUnreadNotificationTextRef.value}`,
|
|
55762
|
+
theme: themeRef.value.peers.MessageBubble,
|
|
55763
|
+
themeOverrides: messageBubbleThemeOverridesRef.value
|
|
55705
55764
|
}
|
|
55706
55765
|
);
|
|
55707
55766
|
};
|
|
@@ -55713,7 +55772,9 @@ var _UChatMessages = defineComponent({
|
|
|
55713
55772
|
key: String(message.id),
|
|
55714
55773
|
type: MessageBubbleType.SERVICE,
|
|
55715
55774
|
serviceVariant,
|
|
55716
|
-
content: message.content
|
|
55775
|
+
content: message.content,
|
|
55776
|
+
theme: themeRef.value.peers.MessageBubble,
|
|
55777
|
+
themeOverrides: messageBubbleThemeOverridesRef.value
|
|
55717
55778
|
}
|
|
55718
55779
|
);
|
|
55719
55780
|
};
|
|
@@ -55756,12 +55817,15 @@ var _UChatMessages = defineComponent({
|
|
|
55756
55817
|
retryText: mergedRetryTextRef.value,
|
|
55757
55818
|
actions: getMessageBubbleActions(message),
|
|
55758
55819
|
onRetry: handleMessageBubbleRetry,
|
|
55759
|
-
onAttachmentDownload: handleMessageBubbleAttachmentDownload
|
|
55820
|
+
onAttachmentDownload: handleMessageBubbleAttachmentDownload,
|
|
55821
|
+
theme: themeRef.value.peers.MessageBubble,
|
|
55822
|
+
themeOverrides: messageBubbleThemeOverridesRef.value
|
|
55760
55823
|
},
|
|
55761
55824
|
{
|
|
55762
55825
|
bubbleActions: slots.bubbleActions ? () => slots.bubbleActions?.(message) : void 0,
|
|
55763
55826
|
messageStatus: slots.messageStatus ? () => slots.messageStatus?.(message) : void 0,
|
|
55764
55827
|
messageAttachment: slots.messageAttachment ? () => slots.messageAttachment?.(message) : void 0,
|
|
55828
|
+
afterContent: slots.messageAfterContent ? () => slots.messageAfterContent?.(message) : void 0,
|
|
55765
55829
|
"upload-file-title": slots.messageAttachmentTitle,
|
|
55766
55830
|
"upload-file-subtitle": slots.messageAttachmentSubtitle
|
|
55767
55831
|
}
|
|
@@ -56568,6 +56632,7 @@ var _UChatMainArea = defineComponent({
|
|
|
56568
56632
|
messageAttachmentTitle: slots.messageAttachmentTitle,
|
|
56569
56633
|
messageAttachmentSubtitle: slots.messageAttachmentSubtitle,
|
|
56570
56634
|
messageStatus: slots.messageStatus,
|
|
56635
|
+
messageAfterContent: slots.messageAfterContent,
|
|
56571
56636
|
bubbleActions: slots.bubbleActions
|
|
56572
56637
|
}
|
|
56573
56638
|
);
|
|
@@ -117061,7 +117126,7 @@ function useThemeVars() {
|
|
|
117061
117126
|
});
|
|
117062
117127
|
}
|
|
117063
117128
|
|
|
117064
|
-
var version = "2.3.
|
|
117129
|
+
var version = "2.3.2";
|
|
117065
117130
|
|
|
117066
117131
|
function create({
|
|
117067
117132
|
componentPrefix = "U",
|