sales-frontend-bridge 0.0.20 → 0.0.21

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 CHANGED
@@ -2189,6 +2189,17 @@ function extractFileName(filePath) {
2189
2189
  }
2190
2190
  return fileName;
2191
2191
  }
2192
+ function getFileListByGlobalIndex(index, data) {
2193
+ let currentIndex = 0;
2194
+ for (const form of data) {
2195
+ const fileCount = form.file.length;
2196
+ if (index >= currentIndex && index < currentIndex + fileCount) {
2197
+ return form;
2198
+ }
2199
+ currentIndex += fileCount;
2200
+ }
2201
+ return null;
2202
+ }
2192
2203
 
2193
2204
  // src/oz/use-create-report.ts
2194
2205
  function useCreateReport({ documentInfo, extraData = {} }) {
@@ -2281,6 +2292,7 @@ exports.commonPdfExportParam = commonPdfExportParam;
2281
2292
  exports.extractFileName = extractFileName;
2282
2293
  exports.fetchDocument = fetchDocument;
2283
2294
  exports.fetchFont = fetchFont;
2295
+ exports.getFileListByGlobalIndex = getFileListByGlobalIndex;
2284
2296
  exports.useCreateReport = useCreateReport;
2285
2297
  exports.useOzEventListener = useOzEventListener;
2286
2298
  exports.wrapperStyle = wrapperStyle;