@esic-lab/data-core-ui 0.0.53 → 0.0.54
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.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +4 -3
- package/dist/index.mjs +4 -3
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -457,8 +457,9 @@ interface FileUploaderProps {
|
|
|
457
457
|
uploadText?: string;
|
|
458
458
|
uploaderWidth?: string;
|
|
459
459
|
attachWidth?: string;
|
|
460
|
+
readOnly?: boolean;
|
|
460
461
|
}
|
|
461
|
-
declare function FileUploader({ onUpload, onError, onRemove, onClickFile, accept, maxSize, disabled, mode, description, label, value, uploadText, uploaderWidth, attachWidth, }: FileUploaderProps): react_jsx_runtime.JSX.Element;
|
|
462
|
+
declare function FileUploader({ onUpload, onError, onRemove, onClickFile, accept, maxSize, disabled, mode, description, label, value, uploadText, uploaderWidth, attachWidth, readOnly, }: FileUploaderProps): react_jsx_runtime.JSX.Element;
|
|
462
463
|
|
|
463
464
|
declare function setMessageApi(api: MessageInstance): void;
|
|
464
465
|
declare function messageSuccess(content: string): void;
|
package/dist/index.d.ts
CHANGED
|
@@ -457,8 +457,9 @@ interface FileUploaderProps {
|
|
|
457
457
|
uploadText?: string;
|
|
458
458
|
uploaderWidth?: string;
|
|
459
459
|
attachWidth?: string;
|
|
460
|
+
readOnly?: boolean;
|
|
460
461
|
}
|
|
461
|
-
declare function FileUploader({ onUpload, onError, onRemove, onClickFile, accept, maxSize, disabled, mode, description, label, value, uploadText, uploaderWidth, attachWidth, }: FileUploaderProps): react_jsx_runtime.JSX.Element;
|
|
462
|
+
declare function FileUploader({ onUpload, onError, onRemove, onClickFile, accept, maxSize, disabled, mode, description, label, value, uploadText, uploaderWidth, attachWidth, readOnly, }: FileUploaderProps): react_jsx_runtime.JSX.Element;
|
|
462
463
|
|
|
463
464
|
declare function setMessageApi(api: MessageInstance): void;
|
|
464
465
|
declare function messageSuccess(content: string): void;
|
package/dist/index.js
CHANGED
|
@@ -3017,7 +3017,8 @@ function FileUploader({
|
|
|
3017
3017
|
value,
|
|
3018
3018
|
uploadText = "\u0E41\u0E19\u0E1A\u0E44\u0E1F\u0E25\u0E4C",
|
|
3019
3019
|
uploaderWidth = "w-full",
|
|
3020
|
-
attachWidth = "w-full"
|
|
3020
|
+
attachWidth = "w-full",
|
|
3021
|
+
readOnly = false
|
|
3021
3022
|
}) {
|
|
3022
3023
|
const [internalFileList, setInternalFileList] = (0, import_react14.useState)([]);
|
|
3023
3024
|
const [uploading, setUploading] = (0, import_react14.useState)(false);
|
|
@@ -3089,7 +3090,7 @@ function FileUploader({
|
|
|
3089
3090
|
};
|
|
3090
3091
|
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "w-full", children: [
|
|
3091
3092
|
label && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "body-1", children: label }),
|
|
3092
|
-
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: uploaderWidth, children: [
|
|
3093
|
+
!readOnly && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: uploaderWidth, children: [
|
|
3093
3094
|
mode === "upload" ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3094
3095
|
"button",
|
|
3095
3096
|
{
|
|
@@ -3159,7 +3160,7 @@ function FileUploader({
|
|
|
3159
3160
|
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "w-[24px] h-[24px] flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_icons_react10.IconFileDescription, { size: 20 }) }),
|
|
3160
3161
|
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "truncate", children: file.name || file.fileName })
|
|
3161
3162
|
] }),
|
|
3162
|
-
!disabled && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3163
|
+
!readOnly && !disabled && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3163
3164
|
import_icons_react10.IconTrash,
|
|
3164
3165
|
{
|
|
3165
3166
|
size: 20,
|
package/dist/index.mjs
CHANGED
|
@@ -2956,7 +2956,8 @@ function FileUploader({
|
|
|
2956
2956
|
value,
|
|
2957
2957
|
uploadText = "\u0E41\u0E19\u0E1A\u0E44\u0E1F\u0E25\u0E4C",
|
|
2958
2958
|
uploaderWidth = "w-full",
|
|
2959
|
-
attachWidth = "w-full"
|
|
2959
|
+
attachWidth = "w-full",
|
|
2960
|
+
readOnly = false
|
|
2960
2961
|
}) {
|
|
2961
2962
|
const [internalFileList, setInternalFileList] = useState12([]);
|
|
2962
2963
|
const [uploading, setUploading] = useState12(false);
|
|
@@ -3028,7 +3029,7 @@ function FileUploader({
|
|
|
3028
3029
|
};
|
|
3029
3030
|
return /* @__PURE__ */ jsxs30("div", { className: "w-full", children: [
|
|
3030
3031
|
label && /* @__PURE__ */ jsx34("p", { className: "body-1", children: label }),
|
|
3031
|
-
/* @__PURE__ */ jsxs30("div", { className: uploaderWidth, children: [
|
|
3032
|
+
!readOnly && /* @__PURE__ */ jsxs30("div", { className: uploaderWidth, children: [
|
|
3032
3033
|
mode === "upload" ? /* @__PURE__ */ jsx34(
|
|
3033
3034
|
"button",
|
|
3034
3035
|
{
|
|
@@ -3098,7 +3099,7 @@ function FileUploader({
|
|
|
3098
3099
|
/* @__PURE__ */ jsx34("div", { className: "w-[24px] h-[24px] flex items-center justify-center", children: /* @__PURE__ */ jsx34(IconFileDescription, { size: 20 }) }),
|
|
3099
3100
|
/* @__PURE__ */ jsx34("span", { className: "truncate", children: file.name || file.fileName })
|
|
3100
3101
|
] }),
|
|
3101
|
-
!disabled && /* @__PURE__ */ jsx34(
|
|
3102
|
+
!readOnly && !disabled && /* @__PURE__ */ jsx34(
|
|
3102
3103
|
IconTrash2,
|
|
3103
3104
|
{
|
|
3104
3105
|
size: 20,
|