sales-frontend-bridge 0.0.27 → 0.0.28

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
@@ -2063,6 +2063,18 @@ var NativeBridgeOz = class extends CommonBridge {
2063
2063
  async hideOzPdfViewer() {
2064
2064
  return this.core.callToTarget("hideOzPdfViewer");
2065
2065
  }
2066
+ async showSignatureShortcut() {
2067
+ return this.core.callToTarget("showSignatureShortcut");
2068
+ }
2069
+ async hideSignatureShortcut() {
2070
+ return this.core.callToTarget("hideSignatureShortcut");
2071
+ }
2072
+ async showMissingFieldWarning() {
2073
+ return this.core.callToTarget("showMissingFieldWarning");
2074
+ }
2075
+ async hideMissingFieldWarning() {
2076
+ return this.core.callToTarget("hideMissingFieldWarning");
2077
+ }
2066
2078
  // TODO: 필요 플러그인들 추가
2067
2079
  };
2068
2080
 
@@ -2310,22 +2322,37 @@ async function getTotalPageOnAllDocuments(reportCount) {
2310
2322
  return totalPages;
2311
2323
  }
2312
2324
  async function checkDocumentsValidityByIndex(indexList) {
2313
- const result = [];
2325
+ const VALID = "";
2314
2326
  for (let i = 0; i < indexList.length; i++) {
2315
2327
  await sleep();
2316
2328
  const command = `INVALID_INFO_JSON_AT=${indexList[i]}`;
2317
2329
  const { data } = await Bridge.nativeOz.getInformation({ command });
2318
- result.push(data === "");
2330
+ if (data !== VALID) {
2331
+ return false;
2332
+ }
2319
2333
  }
2320
- return result.every((i) => i);
2334
+ return true;
2335
+ }
2336
+ async function validatePages(pageList) {
2337
+ const VALID = "valid";
2338
+ for (let i = 0; i < pageList.length; i++) {
2339
+ await sleep();
2340
+ const command = `INPUT_CHECK_VALIDITY_PAGE_AT=${pageList[i]}`;
2341
+ const { data } = await Bridge.nativeOz.getInformation({ command });
2342
+ if (data !== VALID) {
2343
+ return false;
2344
+ }
2345
+ }
2346
+ return true;
2321
2347
  }
2322
2348
  async function validateAllDocuments(reportCount) {
2349
+ const VALID = "valid";
2323
2350
  const count = reportCount ?? await getReportCount();
2324
2351
  for (let i = 0; i < count; i++) {
2325
2352
  await sleep();
2326
2353
  const command = `INPUT_CHECK_VALIDITY_AT=${i}`;
2327
2354
  const { data } = await Bridge.nativeOz.getInformation({ command });
2328
- if (data !== "valid") {
2355
+ if (data !== VALID) {
2329
2356
  return false;
2330
2357
  }
2331
2358
  }
@@ -2335,6 +2362,10 @@ async function getTotalPage() {
2335
2362
  const { data } = await Bridge.nativeOz.getInformation({ command: "TOTAL_PAGE" });
2336
2363
  return Number(data);
2337
2364
  }
2365
+ async function getCurrentPage() {
2366
+ const { data } = await Bridge.nativeOz.getInformation({ command: `CURRENT_PAGE` });
2367
+ return Number(data);
2368
+ }
2338
2369
 
2339
2370
  // src/oz/use-create-report.ts
2340
2371
  function useCreateReport({ documentList, extraData = {} }) {
@@ -2468,6 +2499,7 @@ exports.enableFocusOnValidation = enableFocusOnValidation;
2468
2499
  exports.extractFileName = extractFileName;
2469
2500
  exports.fetchDocument = fetchDocument;
2470
2501
  exports.fetchFont = fetchFont;
2502
+ exports.getCurrentPage = getCurrentPage;
2471
2503
  exports.getFileListByGlobalIndex = getFileListByGlobalIndex;
2472
2504
  exports.getReportCount = getReportCount;
2473
2505
  exports.getTotalPage = getTotalPage;
@@ -2479,6 +2511,7 @@ exports.useCreateReport = useCreateReport;
2479
2511
  exports.useDocumentInfo = useDocumentInfo;
2480
2512
  exports.useOzEventListener = useOzEventListener;
2481
2513
  exports.validateAllDocuments = validateAllDocuments;
2514
+ exports.validatePages = validatePages;
2482
2515
  exports.wrapperStyle = wrapperStyle;
2483
2516
  //# sourceMappingURL=index.cjs.map
2484
2517
  //# sourceMappingURL=index.cjs.map