sales-frontend-components 0.0.132 → 0.0.133
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 +49 -0
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.esm.js +50 -3
- package/dist/index.esm.js.map +1 -1
- package/package.json +14 -14
package/dist/index.cjs.js
CHANGED
|
@@ -4124,12 +4124,61 @@ const useRemoteIdentityVerificationPopup = (config) => {
|
|
|
4124
4124
|
};
|
|
4125
4125
|
};
|
|
4126
4126
|
|
|
4127
|
+
function DudUpload() {
|
|
4128
|
+
const [test, setTest] = React.useState();
|
|
4129
|
+
const { mutateAsync, data } = method.useDudExternalFileUploadMutation();
|
|
4130
|
+
const up = async () => {
|
|
4131
|
+
const b = await salesFrontendUtils.fileToBase64(test.target.files[0]);
|
|
4132
|
+
const f = salesFrontendUtils.base64ToFile(b, "test.png");
|
|
4133
|
+
mutateAsync({
|
|
4134
|
+
data: f,
|
|
4135
|
+
//테스트시, 가능한 증번 입력
|
|
4136
|
+
fileIdentifierValue: "123123123",
|
|
4137
|
+
preservationTerm: 1
|
|
4138
|
+
});
|
|
4139
|
+
};
|
|
4140
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
4141
|
+
/* @__PURE__ */ jsxRuntime.jsx("input", { type: "file", onChange: setTest }),
|
|
4142
|
+
/* @__PURE__ */ jsxRuntime.jsx("input", { type: "button", value: "up", onClick: up }),
|
|
4143
|
+
/* @__PURE__ */ jsxRuntime.jsx("br", {}),
|
|
4144
|
+
JSON.stringify(data)
|
|
4145
|
+
] });
|
|
4146
|
+
}
|
|
4147
|
+
|
|
4148
|
+
function DudDownload() {
|
|
4149
|
+
const [fileId, setFileId] = React.useState("");
|
|
4150
|
+
const [enabled, setEnable] = React.useState(false);
|
|
4151
|
+
const { data } = method.useDudExternalFileDownloadQuery(
|
|
4152
|
+
{
|
|
4153
|
+
fileMgmtId: fileId,
|
|
4154
|
+
outputType: "BINARY"
|
|
4155
|
+
},
|
|
4156
|
+
{
|
|
4157
|
+
enabled
|
|
4158
|
+
}
|
|
4159
|
+
);
|
|
4160
|
+
React.useEffect(() => {
|
|
4161
|
+
console.log("data", data, data instanceof Blob, data instanceof File);
|
|
4162
|
+
if (data instanceof Blob) {
|
|
4163
|
+
salesFrontendUtils.downloadBlob(data, "test.pdf");
|
|
4164
|
+
return;
|
|
4165
|
+
}
|
|
4166
|
+
}, [data]);
|
|
4167
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
4168
|
+
/* @__PURE__ */ jsxRuntime.jsx("input", { type: "text", value: fileId, onChange: (e) => setFileId(e.target.value) }),
|
|
4169
|
+
/* @__PURE__ */ jsxRuntime.jsx("input", { type: "button", value: "down", onClick: () => setEnable(true) }),
|
|
4170
|
+
JSON.stringify(data)
|
|
4171
|
+
] });
|
|
4172
|
+
}
|
|
4173
|
+
|
|
4127
4174
|
exports.Attachment = Attachment;
|
|
4128
4175
|
exports.BankStockSearchModal = BankStockSearchModal;
|
|
4129
4176
|
exports.CODES = CODES;
|
|
4130
4177
|
exports.CustomerSearch = CustomerSearch;
|
|
4131
4178
|
exports.CustomerSearchModal = CustomerSearchModal;
|
|
4132
4179
|
exports.DeaCustomerSearchModal = DeaCustomerSearchModal;
|
|
4180
|
+
exports.DudDownload = DudDownload;
|
|
4181
|
+
exports.DudUpload = DudUpload;
|
|
4133
4182
|
exports.EmployeeSearchModal = EmployeeSearchModal;
|
|
4134
4183
|
exports.FormCheckbox = FormCheckbox;
|
|
4135
4184
|
exports.FormCheckboxButton = FormCheckboxButton;
|