sales-frontend-bridge 0.0.28 → 0.0.29
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 +48 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +78 -8
- package/dist/index.d.ts +78 -8
- package/dist/index.js +42 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2213,6 +2213,14 @@ var commonPdfExportParam = [
|
|
|
2213
2213
|
// 폰트를 포함시킬때 사용하는 글자만 포함시킨다
|
|
2214
2214
|
`pdf.fontembedding_subset=true`
|
|
2215
2215
|
];
|
|
2216
|
+
var commentPenDefaultParam = [
|
|
2217
|
+
`comment.selectedpen=highlightpen`,
|
|
2218
|
+
`comment.highlightpen_thick=15`
|
|
2219
|
+
];
|
|
2220
|
+
var commentPenYellow = [...commentPenDefaultParam, `comment.highlightpen_color=ffcc00`];
|
|
2221
|
+
var commentPenPink = [...commentPenDefaultParam, `comment.highlightpen_color=ff29a2`];
|
|
2222
|
+
var commentPenGreen = [...commentPenDefaultParam, `comment.highlightpen_color=00e536`];
|
|
2223
|
+
var commentPenEraser = [`comment.selectedpen=eraser`];
|
|
2216
2224
|
var wrapperStyle = { display: "flex", flexFlow: "column", gap: "10px" };
|
|
2217
2225
|
var btnStyle = { border: "1px solid red", minHeight: "40px" };
|
|
2218
2226
|
|
|
@@ -2366,6 +2374,39 @@ async function getCurrentPage() {
|
|
|
2366
2374
|
const { data } = await Bridge.nativeOz.getInformation({ command: `CURRENT_PAGE` });
|
|
2367
2375
|
return Number(data);
|
|
2368
2376
|
}
|
|
2377
|
+
async function isCommentMode() {
|
|
2378
|
+
const { data } = await Bridge.nativeOz.getInformation({
|
|
2379
|
+
command: `COMMENT_MODE`
|
|
2380
|
+
});
|
|
2381
|
+
return data === "comment";
|
|
2382
|
+
}
|
|
2383
|
+
async function setCommentMode(penConfig) {
|
|
2384
|
+
const command = `mode_comment_all`;
|
|
2385
|
+
const commentEnabled = await isCommentMode();
|
|
2386
|
+
const param = [
|
|
2387
|
+
...commentEnabled ? [] : [`viewer.screentool=comment`],
|
|
2388
|
+
...penConfig
|
|
2389
|
+
].join("\n");
|
|
2390
|
+
await sleep();
|
|
2391
|
+
return await Bridge.nativeOz.scriptEx({ command, param });
|
|
2392
|
+
}
|
|
2393
|
+
async function setEnableCommentMode(type = "yellow") {
|
|
2394
|
+
let param;
|
|
2395
|
+
if (type === "yellow") {
|
|
2396
|
+
param = commentPenYellow;
|
|
2397
|
+
} else if (type === "pink") {
|
|
2398
|
+
param = commentPenPink;
|
|
2399
|
+
} else if (type === "green") {
|
|
2400
|
+
param = commentPenGreen;
|
|
2401
|
+
} else {
|
|
2402
|
+
param = commentPenEraser;
|
|
2403
|
+
}
|
|
2404
|
+
return await setCommentMode(param);
|
|
2405
|
+
}
|
|
2406
|
+
async function setDisableCommentMode() {
|
|
2407
|
+
const command = `mode_input_all`;
|
|
2408
|
+
return await Bridge.nativeOz.script({ command });
|
|
2409
|
+
}
|
|
2369
2410
|
|
|
2370
2411
|
// src/oz/use-create-report.ts
|
|
2371
2412
|
function useCreateReport({ documentList, extraData = {} }) {
|
|
@@ -2492,6 +2533,10 @@ exports.OZViewerEvent = OZViewerEvent;
|
|
|
2492
2533
|
exports.btnStyle = btnStyle;
|
|
2493
2534
|
exports.categorizeByPageRange = categorizeByPageRange;
|
|
2494
2535
|
exports.checkDocumentsValidityByIndex = checkDocumentsValidityByIndex;
|
|
2536
|
+
exports.commentPenEraser = commentPenEraser;
|
|
2537
|
+
exports.commentPenGreen = commentPenGreen;
|
|
2538
|
+
exports.commentPenPink = commentPenPink;
|
|
2539
|
+
exports.commentPenYellow = commentPenYellow;
|
|
2495
2540
|
exports.commonOzParam = commonOzParam;
|
|
2496
2541
|
exports.commonPdfExportParam = commonPdfExportParam;
|
|
2497
2542
|
exports.disableFocusOnValidation = disableFocusOnValidation;
|
|
@@ -2504,6 +2549,9 @@ exports.getFileListByGlobalIndex = getFileListByGlobalIndex;
|
|
|
2504
2549
|
exports.getReportCount = getReportCount;
|
|
2505
2550
|
exports.getTotalPage = getTotalPage;
|
|
2506
2551
|
exports.getTotalPageOnAllDocuments = getTotalPageOnAllDocuments;
|
|
2552
|
+
exports.isCommentMode = isCommentMode;
|
|
2553
|
+
exports.setDisableCommentMode = setDisableCommentMode;
|
|
2554
|
+
exports.setEnableCommentMode = setEnableCommentMode;
|
|
2507
2555
|
exports.sleep = sleep;
|
|
2508
2556
|
exports.triggerClickOnAllDocuments = triggerClickOnAllDocuments;
|
|
2509
2557
|
exports.triggerCropImageOnAllDocuments = triggerCropImageOnAllDocuments;
|