@zero-library/common 3.0.6 → 3.0.8
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.cjs.js +11 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.mts +8 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.esm.js +8 -2
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -295,6 +295,11 @@ var isJson = (text = "") => {
|
|
|
295
295
|
return false;
|
|
296
296
|
}
|
|
297
297
|
};
|
|
298
|
+
var isDocument = (fileName) => {
|
|
299
|
+
if (!fileName) return false;
|
|
300
|
+
const ext = getFileSuffixName(fileName);
|
|
301
|
+
return ["pdf", "doc", "docx", "xls", "xlsx", "ppt", "pptx", "csv"].includes(ext);
|
|
302
|
+
};
|
|
298
303
|
var OperatorToMethodName = {
|
|
299
304
|
"+": "plus",
|
|
300
305
|
"-": "minus",
|
|
@@ -3223,7 +3228,7 @@ var luyaFilePreview_default = ({ suffix, fileUrl, emptyProps, fileName }) => {
|
|
|
3223
3228
|
return /* @__PURE__ */ jsxRuntime.jsx(antd.Result, { subTitle: `\u6682\u4E0D\u652F\u6301 ${suffix || ""} \u6587\u4EF6\u7684\u9884\u89C8` });
|
|
3224
3229
|
}
|
|
3225
3230
|
}, [suffix, fileUrl, fileName]);
|
|
3226
|
-
return /* @__PURE__ */ jsxRuntime.jsx(antd.Flex, { justify: "center", align: "center", className: "height-full", children: Preview });
|
|
3231
|
+
return /* @__PURE__ */ jsxRuntime.jsx(antd.Flex, { justify: "center", align: "center", className: "height-full p-t-16 p-b-16 p-l-16", children: Preview });
|
|
3227
3232
|
};
|
|
3228
3233
|
var FilePreviewDrawer_default = ({ open, title = "\u6587\u4EF6\u9884\u89C8", onClose, ...props }) => {
|
|
3229
3234
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -9920,6 +9925,10 @@ var UserAvatar_default = ({ size, avatarSrc, userName }) => {
|
|
|
9920
9925
|
return avatarSrc ? /* @__PURE__ */ jsxRuntime.jsx(antd.Avatar, { size, src: avatarSrc }) : /* @__PURE__ */ jsxRuntime.jsx(antd.Avatar, { size, className: "cursor-pointer", style: { backgroundColor: "var(--ant-color-primary)" }, children: userName?.slice(0, 1)?.toLocaleUpperCase() });
|
|
9921
9926
|
};
|
|
9922
9927
|
|
|
9928
|
+
Object.defineProperty(exports, "microApp", {
|
|
9929
|
+
enumerable: true,
|
|
9930
|
+
get: function () { return microApp__default.default; }
|
|
9931
|
+
});
|
|
9923
9932
|
exports.AudioPlayer = AudioPlayer_default;
|
|
9924
9933
|
exports.BusinessCode = BusinessCode;
|
|
9925
9934
|
exports.DEFAULT_DATE_FORMAT = DEFAULT_DATE_FORMAT;
|
|
@@ -10009,6 +10018,7 @@ exports.isBlob = isBlob;
|
|
|
10009
10018
|
exports.isBoolean = isBoolean;
|
|
10010
10019
|
exports.isDate = isDate;
|
|
10011
10020
|
exports.isDef = isDef;
|
|
10021
|
+
exports.isDocument = isDocument;
|
|
10012
10022
|
exports.isElement = isElement;
|
|
10013
10023
|
exports.isEmpty = isEmpty;
|
|
10014
10024
|
exports.isEmptyObj = isEmptyObj;
|