@apexcura/ui-components 0.0.16-Beta28 → 0.0.16-Beta29
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 +11 -12
- package/dist/index.mjs +11 -12
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1137,22 +1137,21 @@ var DropDownGroup = (props) => {
|
|
|
1137
1137
|
options: props.secondOptions,
|
|
1138
1138
|
className: props.className,
|
|
1139
1139
|
filterOption: secondFilterOptions,
|
|
1140
|
-
placeholder:
|
|
1141
|
-
value:
|
|
1140
|
+
placeholder: props.secondPlaceholder,
|
|
1141
|
+
value: selectedValue.secondValue,
|
|
1142
1142
|
showSearch: true
|
|
1143
1143
|
}
|
|
1144
1144
|
)));
|
|
1145
1145
|
};
|
|
1146
1146
|
|
|
1147
1147
|
// src/Components/FilesUpload.tsx
|
|
1148
|
-
var import_react27 = __toESM(require("react"));
|
|
1149
1148
|
var import_antd18 = require("antd");
|
|
1150
1149
|
var import_icons5 = require("@ant-design/icons");
|
|
1150
|
+
var import_react27 = __toESM(require("react"));
|
|
1151
1151
|
var FileUpload = (props) => {
|
|
1152
1152
|
const { Dragger } = import_antd18.Upload;
|
|
1153
|
-
const
|
|
1154
|
-
|
|
1155
|
-
);
|
|
1153
|
+
const initialFiles = Array.isArray(props.value) ? props.value : [];
|
|
1154
|
+
const [files, setFiles] = (0, import_react27.useState)(initialFiles);
|
|
1156
1155
|
const handleChange = ({ fileList }) => {
|
|
1157
1156
|
setFiles(fileList);
|
|
1158
1157
|
if (props.onChange) {
|
|
@@ -1162,17 +1161,17 @@ var FileUpload = (props) => {
|
|
|
1162
1161
|
});
|
|
1163
1162
|
}
|
|
1164
1163
|
};
|
|
1165
|
-
const customRequest = (
|
|
1166
|
-
|
|
1164
|
+
const customRequest = (options) => {
|
|
1165
|
+
const { onSuccess } = options;
|
|
1167
1166
|
setTimeout(() => {
|
|
1168
|
-
onSuccess
|
|
1167
|
+
if (onSuccess) {
|
|
1168
|
+
onSuccess("ok");
|
|
1169
|
+
}
|
|
1169
1170
|
}, 0);
|
|
1170
1171
|
};
|
|
1171
|
-
|
|
1172
|
-
return /* @__PURE__ */ import_react27.default.createElement("div", { className: props.containerClassName }, /* @__PURE__ */ import_react27.default.createElement(
|
|
1172
|
+
return /* @__PURE__ */ import_react27.default.createElement("div", null, /* @__PURE__ */ import_react27.default.createElement(
|
|
1173
1173
|
Dragger,
|
|
1174
1174
|
{
|
|
1175
|
-
className: props.className,
|
|
1176
1175
|
action: "",
|
|
1177
1176
|
accept: props.accept,
|
|
1178
1177
|
listType: "picture",
|
package/dist/index.mjs
CHANGED
|
@@ -1066,22 +1066,21 @@ var DropDownGroup = (props) => {
|
|
|
1066
1066
|
options: props.secondOptions,
|
|
1067
1067
|
className: props.className,
|
|
1068
1068
|
filterOption: secondFilterOptions,
|
|
1069
|
-
placeholder:
|
|
1070
|
-
value:
|
|
1069
|
+
placeholder: props.secondPlaceholder,
|
|
1070
|
+
value: selectedValue.secondValue,
|
|
1071
1071
|
showSearch: true
|
|
1072
1072
|
}
|
|
1073
1073
|
)));
|
|
1074
1074
|
};
|
|
1075
1075
|
|
|
1076
1076
|
// src/Components/FilesUpload.tsx
|
|
1077
|
-
import React26, { useState as useState8 } from "react";
|
|
1078
1077
|
import { Upload } from "antd";
|
|
1079
1078
|
import { InboxOutlined } from "@ant-design/icons";
|
|
1079
|
+
import React26, { useState as useState8 } from "react";
|
|
1080
1080
|
var FileUpload = (props) => {
|
|
1081
1081
|
const { Dragger } = Upload;
|
|
1082
|
-
const
|
|
1083
|
-
|
|
1084
|
-
);
|
|
1082
|
+
const initialFiles = Array.isArray(props.value) ? props.value : [];
|
|
1083
|
+
const [files, setFiles] = useState8(initialFiles);
|
|
1085
1084
|
const handleChange = ({ fileList }) => {
|
|
1086
1085
|
setFiles(fileList);
|
|
1087
1086
|
if (props.onChange) {
|
|
@@ -1091,17 +1090,17 @@ var FileUpload = (props) => {
|
|
|
1091
1090
|
});
|
|
1092
1091
|
}
|
|
1093
1092
|
};
|
|
1094
|
-
const customRequest = (
|
|
1095
|
-
|
|
1093
|
+
const customRequest = (options) => {
|
|
1094
|
+
const { onSuccess } = options;
|
|
1096
1095
|
setTimeout(() => {
|
|
1097
|
-
onSuccess
|
|
1096
|
+
if (onSuccess) {
|
|
1097
|
+
onSuccess("ok");
|
|
1098
|
+
}
|
|
1098
1099
|
}, 0);
|
|
1099
1100
|
};
|
|
1100
|
-
|
|
1101
|
-
return /* @__PURE__ */ React26.createElement("div", { className: props.containerClassName }, /* @__PURE__ */ React26.createElement(
|
|
1101
|
+
return /* @__PURE__ */ React26.createElement("div", null, /* @__PURE__ */ React26.createElement(
|
|
1102
1102
|
Dragger,
|
|
1103
1103
|
{
|
|
1104
|
-
className: props.className,
|
|
1105
1104
|
action: "",
|
|
1106
1105
|
accept: props.accept,
|
|
1107
1106
|
listType: "picture",
|