sa2kit 1.6.106 → 1.6.112

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.mjs CHANGED
@@ -15853,11 +15853,8 @@ var UniversalExportClient = class {
15853
15853
  };
15854
15854
  if (typeof request.configId === "string") {
15855
15855
  requestBody.configId = request.configId;
15856
- } else {
15856
+ } else if (request.configId && typeof request.configId === "object") {
15857
15857
  requestBody.config = request.configId;
15858
- if (request.configId?.id) {
15859
- requestBody.configId = request.configId.id;
15860
- }
15861
15858
  }
15862
15859
  if (isDataArray) {
15863
15860
  requestBody.data = request.dataSource;
@@ -16004,7 +16001,10 @@ var UniversalExportClient = class {
16004
16001
  * 转换API返回的导出结果
16005
16002
  */
16006
16003
  transformExportResultFromAPI(apiResult) {
16007
- const fileBlob = this.createFileBlobFromBase64(apiResult.fileData, apiResult.fileName);
16004
+ const fileBlob = this.createFileBlobFromBase64(
16005
+ apiResult.fileData ?? apiResult.fileBlob,
16006
+ apiResult.fileName
16007
+ );
16008
16008
  return {
16009
16009
  exportId: apiResult.exportId,
16010
16010
  fileName: apiResult.fileName,
@@ -16811,7 +16811,6 @@ var BookingAdminPanel = ({
16811
16811
  config: exportConfig,
16812
16812
  data: exportData,
16813
16813
  customFileName: `\u9884\u8BA2\u4FE1\u606F_${(/* @__PURE__ */ new Date()).toISOString().split("T")[0]}${enableUserPriceCalculation ? "_\u542B\u7528\u6237\u603B\u4EF7" : ""}`,
16814
- // 不传递分页参数,避免导出时被分页限制
16815
16814
  pagination: void 0
16816
16815
  })
16817
16816
  });
@@ -16820,10 +16819,11 @@ var BookingAdminPanel = ({
16820
16819
  throw new Error(errorData.error || `\u5BFC\u51FA\u5931\u8D25: ${response.statusText}`);
16821
16820
  }
16822
16821
  const responseData = await response.json();
16823
- if (responseData.result && responseData.result.fileData) {
16822
+ const base64Payload = responseData.result?.fileData ?? responseData.result?.fileBlob;
16823
+ if (responseData.result && base64Payload) {
16824
16824
  console.log("\u{1F4C1} [BookingAdminPanel] \u68C0\u6D4B\u5230\u6587\u4EF6\u6570\u636E\uFF0C\u5F00\u59CB\u4E0B\u8F7D");
16825
- const { fileData, fileName } = responseData.result;
16826
- const binaryString = atob(fileData);
16825
+ const { fileName } = responseData.result;
16826
+ const binaryString = atob(base64Payload);
16827
16827
  const bytes = new Uint8Array(binaryString.length);
16828
16828
  for (let i = 0; i < binaryString.length; i++) {
16829
16829
  bytes[i] = binaryString.charCodeAt(i);