@pallasoft/ps-file-components 1.3.0 → 1.5.0
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/components/ps-document-scanner-loader.d.ts +1 -0
- package/dist/components/ps-document-scanner-loader.js +40 -0
- package/dist/components/ps-document-scanner-sheet.d.ts +2 -0
- package/dist/components/ps-document-scanner-sheet.js +186 -0
- package/dist/components/ps-document-scanner.d.ts +2 -0
- package/dist/components/ps-document-scanner.js +17 -0
- package/dist/components/ps-file-picker-actions.d.ts +10 -0
- package/dist/components/ps-file-picker-actions.js +21 -0
- package/dist/components/ps-file-picker.d.ts +7 -1
- package/dist/components/ps-file-picker.js +30 -6
- package/dist/components/ps-file-viewer-pane.d.ts +2 -0
- package/dist/components/ps-file-viewer-pane.js +39 -0
- package/dist/components/ps-scan-button.d.ts +13 -0
- package/dist/components/ps-scan-button.js +9 -0
- package/dist/components/ps-scan-camera-view.d.ts +27 -0
- package/dist/components/ps-scan-camera-view.js +34 -0
- package/dist/components/ps-scan-crop-editor.d.ts +13 -0
- package/dist/components/ps-scan-crop-editor.js +69 -0
- package/dist/components/ps-scan-denied-steps.d.ts +6 -0
- package/dist/components/ps-scan-denied-steps.js +33 -0
- package/dist/components/ps-scan-icon-button.d.ts +11 -0
- package/dist/components/ps-scan-icon-button.js +9 -0
- package/dist/components/ps-scan-illustration.d.ts +1 -0
- package/dist/components/ps-scan-illustration.js +6 -0
- package/dist/components/ps-scan-loupe.d.ts +10 -0
- package/dist/components/ps-scan-loupe.js +31 -0
- package/dist/components/ps-scan-page-list.d.ts +14 -0
- package/dist/components/ps-scan-page-list.js +22 -0
- package/dist/components/ps-scan-page-stack.d.ts +7 -0
- package/dist/components/ps-scan-page-stack.js +6 -0
- package/dist/components/ps-scan-permission-view.d.ts +11 -0
- package/dist/components/ps-scan-permission-view.js +48 -0
- package/dist/components/ps-scan-photo-button.d.ts +8 -0
- package/dist/components/ps-scan-photo-button.js +20 -0
- package/dist/components/ps-scan-review.d.ts +24 -0
- package/dist/components/ps-scan-review.js +37 -0
- package/dist/components/ps-scan-shutter.d.ts +7 -0
- package/dist/components/ps-scan-shutter.js +6 -0
- package/dist/components/ps-scan-viewfinder-overlay.d.ts +8 -0
- package/dist/components/ps-scan-viewfinder-overlay.js +28 -0
- package/dist/components/ps-upload-row.js +1 -1
- package/dist/constants/ps-document-scanner-labels.d.ts +80 -0
- package/dist/constants/ps-document-scanner-labels.js +83 -0
- package/dist/constants/ps-file-picker-labels.d.ts +5 -3
- package/dist/constants/ps-file-picker-labels.js +5 -3
- package/dist/constants/ps-scan-camera-status.d.ts +11 -0
- package/dist/constants/ps-scan-camera-status.js +13 -0
- package/dist/constants/ps-scan-chrome-classes.d.ts +12 -0
- package/dist/constants/ps-scan-chrome-classes.js +15 -0
- package/dist/constants/ps-scan-config.d.ts +48 -0
- package/dist/constants/ps-scan-config.js +51 -0
- package/dist/constants/ps-scan-corner-order.d.ts +1 -0
- package/dist/constants/ps-scan-corner-order.js +4 -0
- package/dist/constants/ps-scan-filter.d.ts +7 -0
- package/dist/constants/ps-scan-filter.js +9 -0
- package/dist/constants/ps-scan-output-format.d.ts +5 -0
- package/dist/constants/ps-scan-output-format.js +7 -0
- package/dist/constants/ps-scan-platform.d.ts +6 -0
- package/dist/constants/ps-scan-platform.js +8 -0
- package/dist/constants/ps-scan-step.d.ts +6 -0
- package/dist/constants/ps-scan-step.js +8 -0
- package/dist/esm/components/ps-document-scanner-loader.js +4 -0
- package/dist/esm/components/ps-document-scanner-sheet.js +182 -0
- package/dist/esm/components/ps-document-scanner.js +13 -0
- package/dist/esm/components/ps-file-picker-actions.js +17 -0
- package/dist/esm/components/ps-file-picker.js +31 -7
- package/dist/esm/components/ps-file-viewer-pane.js +35 -0
- package/dist/esm/components/ps-scan-button.js +5 -0
- package/dist/esm/components/ps-scan-camera-view.js +30 -0
- package/dist/esm/components/ps-scan-crop-editor.js +65 -0
- package/dist/esm/components/ps-scan-denied-steps.js +29 -0
- package/dist/esm/components/ps-scan-icon-button.js +5 -0
- package/dist/esm/components/ps-scan-illustration.js +2 -0
- package/dist/esm/components/ps-scan-loupe.js +27 -0
- package/dist/esm/components/ps-scan-page-list.js +18 -0
- package/dist/esm/components/ps-scan-page-stack.js +2 -0
- package/dist/esm/components/ps-scan-permission-view.js +44 -0
- package/dist/esm/components/ps-scan-photo-button.js +16 -0
- package/dist/esm/components/ps-scan-review.js +33 -0
- package/dist/esm/components/ps-scan-shutter.js +2 -0
- package/dist/esm/components/ps-scan-viewfinder-overlay.js +24 -0
- package/dist/esm/components/ps-upload-row.js +1 -1
- package/dist/esm/constants/ps-document-scanner-labels.js +80 -0
- package/dist/esm/constants/ps-file-picker-labels.js +5 -3
- package/dist/esm/constants/ps-scan-camera-status.js +10 -0
- package/dist/esm/constants/ps-scan-chrome-classes.js +12 -0
- package/dist/esm/constants/ps-scan-config.js +48 -0
- package/dist/esm/constants/ps-scan-corner-order.js +1 -0
- package/dist/esm/constants/ps-scan-filter.js +6 -0
- package/dist/esm/constants/ps-scan-output-format.js +4 -0
- package/dist/esm/constants/ps-scan-platform.js +5 -0
- package/dist/esm/constants/ps-scan-step.js +5 -0
- package/dist/esm/hooks/use-ps-focus-trap.js +45 -0
- package/dist/esm/hooks/use-ps-scan-camera.js +99 -0
- package/dist/esm/hooks/use-ps-scan-live-detection.js +45 -0
- package/dist/esm/hooks/use-ps-scan-pages.js +62 -0
- package/dist/esm/hooks/use-ps-scan-previews.js +57 -0
- package/dist/esm/index.js +8 -0
- package/dist/esm/models/ps-document-scanner-props.js +1 -0
- package/dist/esm/models/ps-document-scanner-sheet-props.js +1 -0
- package/dist/esm/models/ps-file-picker-scan.js +1 -0
- package/dist/esm/models/ps-file-viewer-pane-props.js +1 -0
- package/dist/esm/models/ps-scan-added-page.js +1 -0
- package/dist/esm/models/ps-scan-camera-session.js +1 -0
- package/dist/esm/models/ps-scan-decoded-image.js +1 -0
- package/dist/esm/models/ps-scan-levels.js +1 -0
- package/dist/esm/models/ps-scan-live-detection.js +1 -0
- package/dist/esm/models/ps-scan-output-options.js +1 -0
- package/dist/esm/models/ps-scan-page.js +1 -0
- package/dist/esm/models/ps-scan-pdf-page.js +1 -0
- package/dist/esm/models/ps-scan-prepared.js +1 -0
- package/dist/esm/models/ps-scan-quad.js +1 -0
- package/dist/esm/models/ps-scan-raster.js +1 -0
- package/dist/esm/models/ps-scan-rendered-page.js +1 -0
- package/dist/esm/models/ps-scan-stability.js +1 -0
- package/dist/esm/services/ps-scan-camera-service.js +95 -0
- package/dist/esm/services/ps-scan-canvas-service.js +52 -0
- package/dist/esm/services/ps-scan-edge-service.js +156 -0
- package/dist/esm/services/ps-scan-enhance-service.js +97 -0
- package/dist/esm/services/ps-scan-file-name-service.js +25 -0
- package/dist/esm/services/ps-scan-geometry-service.js +116 -0
- package/dist/esm/services/ps-scan-homography-service.js +46 -0
- package/dist/esm/services/ps-scan-hull-service.js +59 -0
- package/dist/esm/services/ps-scan-image-filter-service.js +52 -0
- package/dist/esm/services/ps-scan-order-service.js +13 -0
- package/dist/esm/services/ps-scan-output-service.js +24 -0
- package/dist/esm/services/ps-scan-pdf-service.js +56 -0
- package/dist/esm/services/ps-scan-pipeline-service.js +40 -0
- package/dist/esm/services/ps-scan-platform-service.js +15 -0
- package/dist/esm/services/ps-scan-raster-service.js +67 -0
- package/dist/esm/services/ps-scan-stability-service.js +41 -0
- package/dist/esm/services/ps-scan-template-service.js +5 -0
- package/dist/esm/services/ps-scan-warp-service.js +35 -0
- package/dist/hooks/use-ps-focus-trap.d.ts +2 -0
- package/dist/hooks/use-ps-focus-trap.js +49 -0
- package/dist/hooks/use-ps-scan-camera.d.ts +11 -0
- package/dist/hooks/use-ps-scan-camera.js +103 -0
- package/dist/hooks/use-ps-scan-live-detection.d.ts +3 -0
- package/dist/hooks/use-ps-scan-live-detection.js +49 -0
- package/dist/hooks/use-ps-scan-pages.d.ts +12 -0
- package/dist/hooks/use-ps-scan-pages.js +66 -0
- package/dist/hooks/use-ps-scan-previews.d.ts +2 -0
- package/dist/hooks/use-ps-scan-previews.js +61 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +8 -0
- package/dist/models/ps-document-scanner-props.d.ts +16 -0
- package/dist/models/ps-document-scanner-props.js +2 -0
- package/dist/models/ps-document-scanner-sheet-props.d.ts +14 -0
- package/dist/models/ps-document-scanner-sheet-props.js +2 -0
- package/dist/models/ps-file-picker-scan.d.ts +4 -0
- package/dist/models/ps-file-picker-scan.js +2 -0
- package/dist/models/ps-file-viewer-pane-props.d.ts +12 -0
- package/dist/models/ps-file-viewer-pane-props.js +2 -0
- package/dist/models/ps-scan-added-page.d.ts +5 -0
- package/dist/models/ps-scan-added-page.js +2 -0
- package/dist/models/ps-scan-camera-session.d.ts +5 -0
- package/dist/models/ps-scan-camera-session.js +2 -0
- package/dist/models/ps-scan-decoded-image.d.ts +6 -0
- package/dist/models/ps-scan-decoded-image.js +2 -0
- package/dist/models/ps-scan-levels.d.ts +4 -0
- package/dist/models/ps-scan-levels.js +2 -0
- package/dist/models/ps-scan-live-detection.d.ts +5 -0
- package/dist/models/ps-scan-live-detection.js +2 -0
- package/dist/models/ps-scan-output-options.d.ts +7 -0
- package/dist/models/ps-scan-output-options.js +2 -0
- package/dist/models/ps-scan-page.d.ts +12 -0
- package/dist/models/ps-scan-page.js +2 -0
- package/dist/models/ps-scan-pdf-page.d.ts +5 -0
- package/dist/models/ps-scan-pdf-page.js +2 -0
- package/dist/models/ps-scan-prepared.d.ts +7 -0
- package/dist/models/ps-scan-prepared.js +2 -0
- package/dist/models/ps-scan-quad.d.ts +2 -0
- package/dist/models/ps-scan-quad.js +2 -0
- package/dist/models/ps-scan-raster.d.ts +5 -0
- package/dist/models/ps-scan-raster.js +2 -0
- package/dist/models/ps-scan-rendered-page.d.ts +5 -0
- package/dist/models/ps-scan-rendered-page.js +2 -0
- package/dist/models/ps-scan-stability.d.ts +8 -0
- package/dist/models/ps-scan-stability.js +2 -0
- package/dist/services/ps-scan-camera-service.d.ts +14 -0
- package/dist/services/ps-scan-camera-service.js +99 -0
- package/dist/services/ps-scan-canvas-service.d.ts +9 -0
- package/dist/services/ps-scan-canvas-service.js +56 -0
- package/dist/services/ps-scan-edge-service.d.ts +9 -0
- package/dist/services/ps-scan-edge-service.js +160 -0
- package/dist/services/ps-scan-enhance-service.d.ts +9 -0
- package/dist/services/ps-scan-enhance-service.js +101 -0
- package/dist/services/ps-scan-file-name-service.d.ts +6 -0
- package/dist/services/ps-scan-file-name-service.js +29 -0
- package/dist/services/ps-scan-geometry-service.d.ts +20 -0
- package/dist/services/ps-scan-geometry-service.js +120 -0
- package/dist/services/ps-scan-homography-service.d.ts +7 -0
- package/dist/services/ps-scan-homography-service.js +50 -0
- package/dist/services/ps-scan-hull-service.d.ts +6 -0
- package/dist/services/ps-scan-hull-service.js +63 -0
- package/dist/services/ps-scan-image-filter-service.d.ts +6 -0
- package/dist/services/ps-scan-image-filter-service.js +56 -0
- package/dist/services/ps-scan-order-service.d.ts +4 -0
- package/dist/services/ps-scan-order-service.js +17 -0
- package/dist/services/ps-scan-output-service.d.ts +5 -0
- package/dist/services/ps-scan-output-service.js +28 -0
- package/dist/services/ps-scan-pdf-service.d.ts +5 -0
- package/dist/services/ps-scan-pdf-service.js +60 -0
- package/dist/services/ps-scan-pipeline-service.d.ts +10 -0
- package/dist/services/ps-scan-pipeline-service.js +44 -0
- package/dist/services/ps-scan-platform-service.d.ts +4 -0
- package/dist/services/ps-scan-platform-service.js +19 -0
- package/dist/services/ps-scan-raster-service.d.ts +6 -0
- package/dist/services/ps-scan-raster-service.js +71 -0
- package/dist/services/ps-scan-stability-service.d.ts +9 -0
- package/dist/services/ps-scan-stability-service.js +45 -0
- package/dist/services/ps-scan-template-service.d.ts +3 -0
- package/dist/services/ps-scan-template-service.js +9 -0
- package/dist/services/ps-scan-warp-service.d.ts +6 -0
- package/dist/services/ps-scan-warp-service.js +39 -0
- package/package.json +9 -6
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { PsDocumentScannerLabels } from '../constants/ps-document-scanner-labels';
|
|
2
|
+
import type { PsLabelSet } from '../models/ps-label-set';
|
|
3
|
+
export interface PsScanDeniedStepsProps {
|
|
4
|
+
labels: PsLabelSet<typeof PsDocumentScannerLabels>;
|
|
5
|
+
}
|
|
6
|
+
export declare const PsScanDeniedSteps: ({ labels }: PsScanDeniedStepsProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PsScanDeniedSteps = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const ps_design_system_1 = require("@pallasoft/ps-design-system");
|
|
7
|
+
const ps_scan_platform_1 = require("../constants/ps-scan-platform");
|
|
8
|
+
const ps_scan_platform_service_1 = require("../services/ps-scan-platform-service");
|
|
9
|
+
const PsScanDeniedSteps = ({ labels }) => {
|
|
10
|
+
const [platform, setPlatform] = (0, react_1.useState)(() => ps_scan_platform_service_1.PsScanPlatformService.detect());
|
|
11
|
+
const platforms = [
|
|
12
|
+
{
|
|
13
|
+
key: ps_scan_platform_1.PsScanPlatform.Ios,
|
|
14
|
+
label: labels.platformIos,
|
|
15
|
+
steps: [labels.deniedIos1, labels.deniedIos2, labels.deniedIos3],
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
key: ps_scan_platform_1.PsScanPlatform.Android,
|
|
19
|
+
label: labels.platformAndroid,
|
|
20
|
+
steps: [labels.deniedAndroid1, labels.deniedAndroid2, labels.deniedAndroid3],
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
key: ps_scan_platform_1.PsScanPlatform.Desktop,
|
|
24
|
+
label: labels.platformDesktop,
|
|
25
|
+
steps: [labels.deniedDesktop1, labels.deniedDesktop2, labels.deniedDesktop3],
|
|
26
|
+
},
|
|
27
|
+
];
|
|
28
|
+
const active = platforms.find((item) => item.key === platform);
|
|
29
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: 'flex w-full flex-col gap-4 rounded-ps-control border border-white/10 bg-white/5 p-4 text-left', children: [(0, jsx_runtime_1.jsx)("div", { className: 'grid grid-cols-3 gap-1 rounded-ps-control bg-black/40 p-1', role: 'group', children: platforms.map((item) => ((0, jsx_runtime_1.jsx)("button", { "aria-pressed": item.key === platform, className: ps_design_system_1.PallasoftClassNameService.merge('ps-focus-ring ps-control min-w-0 truncate rounded-ps-control px-2 text-xs font-semibold transition', item.key === platform
|
|
30
|
+
? 'bg-white text-black'
|
|
31
|
+
: 'text-white/70 hover:bg-white/10 hover:text-white'), onClick: () => setPlatform(item.key), type: 'button', children: item.label }, item.key))) }), (0, jsx_runtime_1.jsx)("ol", { className: 'flex flex-col gap-3', children: (active === undefined ? [] : active.steps).map((step, index) => ((0, jsx_runtime_1.jsxs)("li", { className: 'flex items-start gap-3 text-sm leading-5 text-white/85', children: [(0, jsx_runtime_1.jsx)("span", { className: 'flex size-6 shrink-0 items-center justify-center rounded-full bg-primary text-xs font-bold text-[color:var(--ps-color-primary-contrast)]', children: index + 1 }), (0, jsx_runtime_1.jsx)("span", { className: 'pt-0.5', children: step })] }, step))) })] }));
|
|
32
|
+
};
|
|
33
|
+
exports.PsScanDeniedSteps = PsScanDeniedSteps;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type PsIconKey } from '@pallasoft/ps-icons';
|
|
2
|
+
export interface PsScanIconButtonProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
iconClassName?: string;
|
|
6
|
+
iconKey: PsIconKey;
|
|
7
|
+
isPressed?: boolean;
|
|
8
|
+
label: string;
|
|
9
|
+
onClick: () => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const PsScanIconButton: ({ className, disabled, iconClassName, iconKey, isPressed, label, onClick, }: PsScanIconButtonProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PsScanIconButton = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const ps_design_system_1 = require("@pallasoft/ps-design-system");
|
|
6
|
+
const ps_icons_1 = require("@pallasoft/ps-icons");
|
|
7
|
+
const ps_scan_chrome_classes_1 = require("../constants/ps-scan-chrome-classes");
|
|
8
|
+
const PsScanIconButton = ({ className, disabled, iconClassName, iconKey, isPressed, label, onClick, }) => ((0, jsx_runtime_1.jsx)("button", { "aria-label": label, "aria-pressed": isPressed, className: ps_design_system_1.PallasoftClassNameService.merge(ps_scan_chrome_classes_1.PsScanChromeClasses.icon, isPressed ? ps_scan_chrome_classes_1.PsScanChromeClasses.iconOn : ps_scan_chrome_classes_1.PsScanChromeClasses.iconOff, className), disabled: disabled, onClick: onClick, title: label, type: 'button', children: (0, jsx_runtime_1.jsx)(ps_icons_1.PsIcon, { "aria-hidden": 'true', className: ps_design_system_1.PallasoftClassNameService.merge('size-ps-control-icon-standalone', iconClassName), iconKey: iconKey }) }));
|
|
9
|
+
exports.PsScanIconButton = PsScanIconButton;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const PsScanIllustration: () => import("react").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PsScanIllustration = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const PsScanIllustration = () => ((0, jsx_runtime_1.jsxs)("svg", { "aria-hidden": 'true', className: 'h-auto w-40', fill: 'none', viewBox: '0 0 160 160', children: [(0, jsx_runtime_1.jsx)("rect", { className: 'fill-white/5 stroke-white/15', height: '148', rx: '28', width: '148', x: '6', y: '6' }), (0, jsx_runtime_1.jsx)("path", { className: 'fill-white', d: 'M52 34h56a4 4 0 0 1 4 4v84l-8-5-8 5-8-5-8 5-8-5-8 5-8-5-8 5V38a4 4 0 0 1 4-4Z' }), (0, jsx_runtime_1.jsx)("path", { className: 'stroke-black/25', d: 'M62 52h36M62 64h28M62 76h36M62 88h20M88 100h10', strokeLinecap: 'round', strokeWidth: '4' }), (0, jsx_runtime_1.jsx)("path", { className: 'stroke-primary', d: 'M38 46V30a6 6 0 0 1 6-6h16M100 24h16a6 6 0 0 1 6 6v16M122 114v16a6 6 0 0 1-6 6h-16M60 136H44a6 6 0 0 1-6-6v-16', strokeLinecap: 'round', strokeWidth: '5' }), (0, jsx_runtime_1.jsx)("rect", { className: 'fill-primary motion-safe:animate-pulse', height: '4', rx: '2', width: '96', x: '32', y: '78' })] }));
|
|
6
|
+
exports.PsScanIllustration = PsScanIllustration;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { PsPageSize } from '../models/ps-page-size';
|
|
2
|
+
import type { PsPoint } from '../models/ps-point';
|
|
3
|
+
import type { PsScanQuad } from '../models/ps-scan-quad';
|
|
4
|
+
export interface PsScanLoupeProps {
|
|
5
|
+
corners: PsScanQuad;
|
|
6
|
+
point: PsPoint;
|
|
7
|
+
source: string;
|
|
8
|
+
stage: PsPageSize;
|
|
9
|
+
}
|
|
10
|
+
export declare const PsScanLoupe: ({ corners, point, source, stage }: PsScanLoupeProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PsScanLoupe = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const ps_scan_config_1 = require("../constants/ps-scan-config");
|
|
6
|
+
const PsScanLoupe = ({ corners, point, source, stage }) => {
|
|
7
|
+
const size = ps_scan_config_1.PsScanConfig.loupeSize;
|
|
8
|
+
const zoom = ps_scan_config_1.PsScanConfig.loupeZoom;
|
|
9
|
+
const centreX = point.x * stage.width * zoom;
|
|
10
|
+
const centreY = point.y * stage.height * zoom;
|
|
11
|
+
const pointX = point.x * stage.width;
|
|
12
|
+
const pointY = point.y * stage.height;
|
|
13
|
+
const isBelow = pointY - ps_scan_config_1.PsScanConfig.loupeOffset - size < 0;
|
|
14
|
+
const left = Math.min(Math.max(pointX - size / 2, -size / 4), stage.width - (size * 3) / 4);
|
|
15
|
+
const top = isBelow
|
|
16
|
+
? pointY + ps_scan_config_1.PsScanConfig.loupeOffset
|
|
17
|
+
: pointY - ps_scan_config_1.PsScanConfig.loupeOffset - size;
|
|
18
|
+
return ((0, jsx_runtime_1.jsx)("div", { "aria-hidden": 'true', className: 'pointer-events-none absolute z-10 overflow-hidden rounded-full border-4 border-white bg-black shadow-2xl animate-ps-scale-in', style: {
|
|
19
|
+
backgroundImage: `url("${source}")`,
|
|
20
|
+
backgroundPosition: `${size / 2 - centreX}px ${size / 2 - centreY}px`,
|
|
21
|
+
backgroundRepeat: 'no-repeat',
|
|
22
|
+
backgroundSize: `${stage.width * zoom}px ${stage.height * zoom}px`,
|
|
23
|
+
height: size,
|
|
24
|
+
left,
|
|
25
|
+
top,
|
|
26
|
+
width: size,
|
|
27
|
+
}, children: (0, jsx_runtime_1.jsxs)("svg", { className: 'absolute inset-0 size-full', viewBox: `0 0 ${size} ${size}`, children: [(0, jsx_runtime_1.jsx)("polygon", { className: 'fill-none stroke-primary', points: corners
|
|
28
|
+
.map((corner) => `${corner.x * stage.width * zoom - centreX + size / 2},${corner.y * stage.height * zoom - centreY + size / 2}`)
|
|
29
|
+
.join(' '), strokeWidth: '2' }), (0, jsx_runtime_1.jsx)("path", { className: 'stroke-white', d: `M${size / 2 - 10} ${size / 2}H${size / 2 + 10}M${size / 2} ${size / 2 - 10}V${size / 2 + 10}`, strokeLinecap: 'round', strokeWidth: '2' })] }) }));
|
|
30
|
+
};
|
|
31
|
+
exports.PsScanLoupe = PsScanLoupe;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { PsDocumentScannerLabels } from '../constants/ps-document-scanner-labels';
|
|
2
|
+
import type { PsLabelSet } from '../models/ps-label-set';
|
|
3
|
+
import type { PsScanPage } from '../models/ps-scan-page';
|
|
4
|
+
export interface PsScanPageListProps {
|
|
5
|
+
activeId: string;
|
|
6
|
+
canAddPage: boolean;
|
|
7
|
+
labels: PsLabelSet<typeof PsDocumentScannerLabels>;
|
|
8
|
+
onAddPage: () => void;
|
|
9
|
+
onMove: (from: number, to: number) => void;
|
|
10
|
+
onSelect: (id: string) => void;
|
|
11
|
+
pages: PsScanPage[];
|
|
12
|
+
previews: Record<string, string>;
|
|
13
|
+
}
|
|
14
|
+
export declare const PsScanPageList: ({ activeId, canAddPage, labels, onAddPage, onMove, onSelect, pages, previews, }: PsScanPageListProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PsScanPageList = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const ps_core_components_1 = require("@pallasoft/ps-core-components");
|
|
6
|
+
const ps_design_system_1 = require("@pallasoft/ps-design-system");
|
|
7
|
+
const ps_icons_1 = require("@pallasoft/ps-icons");
|
|
8
|
+
const ps_scan_template_service_1 = require("../services/ps-scan-template-service");
|
|
9
|
+
const PsScanPageList = ({ activeId, canAddPage, labels, onAddPage, onMove, onSelect, pages, previews, }) => {
|
|
10
|
+
const items = pages.map((page, index) => ({
|
|
11
|
+
id: page.id,
|
|
12
|
+
label: `${labels.page} ${index + 1}`,
|
|
13
|
+
}));
|
|
14
|
+
const say = (template, label, position) => ps_scan_template_service_1.PsScanTemplateService.fill(template, { count: pages.length, page: label, position });
|
|
15
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: 'ps-scrollbar-hidden -mx-4 flex items-center gap-3 overflow-x-auto px-4 py-2 sm:mx-0 sm:px-0 lg:flex-wrap lg:overflow-visible', children: [(0, jsx_runtime_1.jsx)(ps_core_components_1.PsSortableList, { announcements: {
|
|
16
|
+
cancelled: (label) => say(labels.reorderCancelled, label, 0),
|
|
17
|
+
dropped: (label, position) => say(labels.reorderDropped, label, position),
|
|
18
|
+
lifted: (label, position) => say(labels.reorderLifted, label, position),
|
|
19
|
+
moved: (label, position) => say(labels.reorderMoved, label, position),
|
|
20
|
+
}, className: 'flex items-center gap-3 lg:flex-wrap', getHandleLabel: (label) => ps_scan_template_service_1.PsScanTemplateService.fill(labels.dragPage, { page: label }), handleClassName: 'ps-focus-ring absolute inset-0 cursor-grab touch-none rounded-md active:cursor-grabbing', handleIcon: (0, jsx_runtime_1.jsx)("span", { "aria-hidden": 'true' }), instructions: labels.reorderInstructions, isHorizontal: true, items: items, onMove: (_id, from, to) => onMove(from, to), renderItem: ({ handle, index, isOverlay, item }) => ((0, jsx_runtime_1.jsxs)("div", { "aria-current": item.id === activeId, className: 'relative flex flex-col items-center gap-1.5', onClick: () => onSelect(item.id), role: 'listitem', children: [(0, jsx_runtime_1.jsxs)("span", { className: ps_design_system_1.PallasoftClassNameService.merge('relative block h-[4.5rem] w-14 overflow-hidden rounded-md bg-white/10 ring-offset-2 ring-offset-black transition', item.id === activeId ? 'ring-2 ring-primary' : 'opacity-75', isOverlay ? 'shadow-2xl' : ''), children: [previews[item.id] === undefined ? ((0, jsx_runtime_1.jsx)("span", { className: 'ps-skeleton block size-full' })) : ((0, jsx_runtime_1.jsx)("img", { alt: '', className: 'size-full object-cover', src: previews[item.id] })), handle] }), (0, jsx_runtime_1.jsx)("span", { className: ps_design_system_1.PallasoftClassNameService.merge('text-xs font-semibold tabular-nums', item.id === activeId ? 'text-white' : 'text-white/55'), children: index + 1 })] })), role: 'list' }), canAddPage ? ((0, jsx_runtime_1.jsxs)("div", { className: 'flex shrink-0 flex-col items-center gap-1.5', children: [(0, jsx_runtime_1.jsx)("button", { "aria-label": labels.addPage, className: 'ps-focus-ring flex h-[4.5rem] w-14 items-center justify-center rounded-md border-2 border-dashed border-white/25 text-white/70 transition hover:border-white/50 hover:text-white', onClick: onAddPage, title: labels.addPage, type: 'button', children: (0, jsx_runtime_1.jsx)(ps_icons_1.PsIcon, { "aria-hidden": 'true', className: 'size-5', iconKey: ps_icons_1.PsIconKey.Plus }) }), (0, jsx_runtime_1.jsx)("span", { "aria-hidden": 'true', className: 'text-xs text-transparent', children: "0" })] })) : null] }));
|
|
21
|
+
};
|
|
22
|
+
exports.PsScanPageList = PsScanPageList;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PsScanPageStack = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const PsScanPageStack = ({ count, label, onOpen, preview }) => ((0, jsx_runtime_1.jsxs)("button", { "aria-label": label, className: 'ps-focus-ring relative flex h-16 w-12 shrink-0 rounded-md animate-ps-scale-in', onClick: onOpen, title: label, type: 'button', children: [count > 1 ? ((0, jsx_runtime_1.jsx)("span", { "aria-hidden": 'true', className: 'absolute inset-0 rotate-6 rounded-md border-2 border-white/60 bg-white/30' })) : null, (0, jsx_runtime_1.jsx)("span", { className: 'relative block size-full overflow-hidden rounded-md border-2 border-white bg-white/20', children: preview === undefined ? null : ((0, jsx_runtime_1.jsx)("img", { alt: '', className: 'size-full object-cover', src: preview })) }), (0, jsx_runtime_1.jsx)("span", { className: 'absolute -right-2 -top-2 flex h-6 min-w-6 items-center justify-center rounded-full bg-primary px-1.5 text-xs font-bold tabular-nums text-[color:var(--ps-color-primary-contrast)]', children: count })] }));
|
|
6
|
+
exports.PsScanPageStack = PsScanPageStack;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PsDocumentScannerLabels } from '../constants/ps-document-scanner-labels';
|
|
2
|
+
import { PsScanCameraStatus } from '../constants/ps-scan-camera-status';
|
|
3
|
+
import type { PsLabelSet } from '../models/ps-label-set';
|
|
4
|
+
export interface PsScanPermissionViewProps {
|
|
5
|
+
isMultiple: boolean;
|
|
6
|
+
labels: PsLabelSet<typeof PsDocumentScannerLabels>;
|
|
7
|
+
onAllow: () => void;
|
|
8
|
+
onFiles: (files: File[]) => void;
|
|
9
|
+
status: PsScanCameraStatus;
|
|
10
|
+
}
|
|
11
|
+
export declare const PsScanPermissionView: ({ isMultiple, labels, onAllow, onFiles, status, }: PsScanPermissionViewProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PsScanPermissionView = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const ps_core_components_1 = require("@pallasoft/ps-core-components");
|
|
6
|
+
const ps_icons_1 = require("@pallasoft/ps-icons");
|
|
7
|
+
const ps_scan_camera_status_1 = require("../constants/ps-scan-camera-status");
|
|
8
|
+
const ps_scan_button_1 = require("./ps-scan-button");
|
|
9
|
+
const ps_scan_denied_steps_1 = require("./ps-scan-denied-steps");
|
|
10
|
+
const ps_scan_illustration_1 = require("./ps-scan-illustration");
|
|
11
|
+
const ps_scan_photo_button_1 = require("./ps-scan-photo-button");
|
|
12
|
+
const PsScanPermissionView = ({ isMultiple, labels, onAllow, onFiles, status, }) => {
|
|
13
|
+
if (status === ps_scan_camera_status_1.PsScanCameraStatus.Checking || status === ps_scan_camera_status_1.PsScanCameraStatus.Starting)
|
|
14
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: 'flex h-full flex-col items-center justify-center gap-3 text-sm text-white/75', role: 'status', children: [(0, jsx_runtime_1.jsx)(ps_core_components_1.PsSpinner, { color: 'current', label: labels.cameraStarting, size: 'small' }), (0, jsx_runtime_1.jsx)("span", { children: labels.cameraStarting })] }));
|
|
15
|
+
const screens = {
|
|
16
|
+
[ps_scan_camera_status_1.PsScanCameraStatus.Busy]: {
|
|
17
|
+
body: labels.busyBody,
|
|
18
|
+
iconKey: ps_icons_1.PsIconKey.Camera,
|
|
19
|
+
title: labels.busyTitle,
|
|
20
|
+
},
|
|
21
|
+
[ps_scan_camera_status_1.PsScanCameraStatus.Denied]: {
|
|
22
|
+
body: labels.deniedBody,
|
|
23
|
+
iconKey: ps_icons_1.PsIconKey.CameraOff,
|
|
24
|
+
title: labels.deniedTitle,
|
|
25
|
+
},
|
|
26
|
+
[ps_scan_camera_status_1.PsScanCameraStatus.Insecure]: {
|
|
27
|
+
body: labels.insecureBody,
|
|
28
|
+
iconKey: ps_icons_1.PsIconKey.Shield,
|
|
29
|
+
title: labels.insecureTitle,
|
|
30
|
+
},
|
|
31
|
+
[ps_scan_camera_status_1.PsScanCameraStatus.Prompt]: {
|
|
32
|
+
body: labels.primerBody,
|
|
33
|
+
iconKey: ps_icons_1.PsIconKey.Camera,
|
|
34
|
+
title: labels.primerTitle,
|
|
35
|
+
},
|
|
36
|
+
[ps_scan_camera_status_1.PsScanCameraStatus.Ready]: { body: '', iconKey: ps_icons_1.PsIconKey.Camera, title: '' },
|
|
37
|
+
[ps_scan_camera_status_1.PsScanCameraStatus.Unavailable]: {
|
|
38
|
+
body: labels.unavailableBody,
|
|
39
|
+
iconKey: ps_icons_1.PsIconKey.CameraOff,
|
|
40
|
+
title: labels.unavailableTitle,
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
const screen = screens[status];
|
|
44
|
+
const isPrimer = status === ps_scan_camera_status_1.PsScanCameraStatus.Prompt;
|
|
45
|
+
const canRetry = status === ps_scan_camera_status_1.PsScanCameraStatus.Denied || status === ps_scan_camera_status_1.PsScanCameraStatus.Busy;
|
|
46
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: 'flex h-full min-h-0 flex-col overflow-y-auto', children: (0, jsx_runtime_1.jsxs)("div", { className: 'm-auto flex w-full max-w-sm flex-col items-center gap-6 px-6 pb-[max(1.5rem,env(safe-area-inset-bottom))] pt-20 text-center animate-ps-slide-up', children: [isPrimer ? ((0, jsx_runtime_1.jsx)(ps_scan_illustration_1.PsScanIllustration, {})) : ((0, jsx_runtime_1.jsx)("span", { className: 'flex size-20 items-center justify-center rounded-full bg-white/10 text-white', children: (0, jsx_runtime_1.jsx)(ps_icons_1.PsIcon, { "aria-hidden": 'true', className: 'size-9', iconKey: screen.iconKey }) })), (0, jsx_runtime_1.jsxs)("div", { className: 'flex flex-col gap-2', children: [(0, jsx_runtime_1.jsx)("h2", { className: 'text-xl font-semibold leading-tight text-white sm:text-2xl', children: screen.title }), (0, jsx_runtime_1.jsx)("p", { className: 'text-sm leading-6 text-white/70', children: screen.body })] }), status === ps_scan_camera_status_1.PsScanCameraStatus.Denied ? (0, jsx_runtime_1.jsx)(ps_scan_denied_steps_1.PsScanDeniedSteps, { labels: labels }) : null, (0, jsx_runtime_1.jsxs)("div", { className: 'flex w-full flex-col gap-3', children: [isPrimer || canRetry ? ((0, jsx_runtime_1.jsx)(ps_scan_button_1.PsScanButton, { className: 'w-full', isLarge: true, isPrimary: true, leadingIcon: isPrimer ? ((0, jsx_runtime_1.jsx)(ps_icons_1.PsIcon, { "aria-hidden": 'true', className: 'size-4', iconKey: ps_icons_1.PsIconKey.Camera })) : undefined, onClick: onAllow, children: isPrimer ? labels.allowCamera : labels.tryAgain })) : null, (0, jsx_runtime_1.jsx)(ps_scan_photo_button_1.PsScanPhotoButton, { className: 'w-full', isMultiple: isMultiple, label: labels.choosePhoto, onFiles: onFiles })] })] }) }));
|
|
47
|
+
};
|
|
48
|
+
exports.PsScanPermissionView = PsScanPermissionView;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface PsScanPhotoButtonProps {
|
|
2
|
+
className?: string;
|
|
3
|
+
isIconOnly?: boolean;
|
|
4
|
+
isMultiple: boolean;
|
|
5
|
+
label: string;
|
|
6
|
+
onFiles: (files: File[]) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const PsScanPhotoButton: ({ className, isIconOnly, isMultiple, label, onFiles, }: PsScanPhotoButtonProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PsScanPhotoButton = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const ps_icons_1 = require("@pallasoft/ps-icons");
|
|
7
|
+
const ps_scan_button_1 = require("./ps-scan-button");
|
|
8
|
+
const ps_scan_icon_button_1 = require("./ps-scan-icon-button");
|
|
9
|
+
const PsScanPhotoButton = ({ className, isIconOnly = false, isMultiple, label, onFiles, }) => {
|
|
10
|
+
const input = (0, react_1.useRef)(null);
|
|
11
|
+
const open = () => input.current?.click();
|
|
12
|
+
const onChange = (event) => {
|
|
13
|
+
const files = Array.from(event.target.files === null ? [] : event.target.files);
|
|
14
|
+
event.target.value = '';
|
|
15
|
+
if (files.length > 0)
|
|
16
|
+
onFiles(files);
|
|
17
|
+
};
|
|
18
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [isIconOnly ? ((0, jsx_runtime_1.jsx)(ps_scan_icon_button_1.PsScanIconButton, { className: className, iconKey: ps_icons_1.PsIconKey.Image, label: label, onClick: open })) : ((0, jsx_runtime_1.jsx)(ps_scan_button_1.PsScanButton, { className: className, isLarge: true, leadingIcon: (0, jsx_runtime_1.jsx)(ps_icons_1.PsIcon, { "aria-hidden": 'true', className: 'size-4', iconKey: ps_icons_1.PsIconKey.Image }), onClick: open, children: label })), (0, jsx_runtime_1.jsx)("input", { accept: 'image/*', "aria-hidden": 'true', className: 'sr-only', multiple: isMultiple, onChange: onChange, ref: input, tabIndex: -1, type: 'file' })] }));
|
|
19
|
+
};
|
|
20
|
+
exports.PsScanPhotoButton = PsScanPhotoButton;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { PsDocumentScannerLabels } from '../constants/ps-document-scanner-labels';
|
|
2
|
+
import { PsScanFilter } from '../constants/ps-scan-filter';
|
|
3
|
+
import type { PsLabelSet } from '../models/ps-label-set';
|
|
4
|
+
import type { PsScanPage } from '../models/ps-scan-page';
|
|
5
|
+
export interface PsScanReviewProps {
|
|
6
|
+
canAddPage: boolean;
|
|
7
|
+
error: string;
|
|
8
|
+
isBusy: boolean;
|
|
9
|
+
labels: PsLabelSet<typeof PsDocumentScannerLabels>;
|
|
10
|
+
onAddPage: () => void;
|
|
11
|
+
onClose: () => void;
|
|
12
|
+
onDelete: () => void;
|
|
13
|
+
onEditCrop: () => void;
|
|
14
|
+
onFilter: (filter: PsScanFilter) => void;
|
|
15
|
+
onFinish: () => void;
|
|
16
|
+
onMove: (from: number, to: number) => void;
|
|
17
|
+
onRetake: () => void;
|
|
18
|
+
onRotate: () => void;
|
|
19
|
+
onSelect: (id: string) => void;
|
|
20
|
+
page: PsScanPage;
|
|
21
|
+
pages: PsScanPage[];
|
|
22
|
+
previews: Record<string, string>;
|
|
23
|
+
}
|
|
24
|
+
export declare const PsScanReview: ({ canAddPage, error, isBusy, labels, onAddPage, onClose, onDelete, onEditCrop, onFilter, onFinish, onMove, onRetake, onRotate, onSelect, page, pages, previews, }: PsScanReviewProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PsScanReview = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const ps_design_system_1 = require("@pallasoft/ps-design-system");
|
|
6
|
+
const ps_icons_1 = require("@pallasoft/ps-icons");
|
|
7
|
+
const ps_scan_chrome_classes_1 = require("../constants/ps-scan-chrome-classes");
|
|
8
|
+
const ps_scan_filter_1 = require("../constants/ps-scan-filter");
|
|
9
|
+
const ps_scan_template_service_1 = require("../services/ps-scan-template-service");
|
|
10
|
+
const ps_scan_button_1 = require("./ps-scan-button");
|
|
11
|
+
const ps_scan_icon_button_1 = require("./ps-scan-icon-button");
|
|
12
|
+
const ps_scan_page_list_1 = require("./ps-scan-page-list");
|
|
13
|
+
const PsScanReview = ({ canAddPage, error, isBusy, labels, onAddPage, onClose, onDelete, onEditCrop, onFilter, onFinish, onMove, onRetake, onRotate, onSelect, page, pages, previews, }) => {
|
|
14
|
+
const index = pages.findIndex((item) => item.id === page.id);
|
|
15
|
+
const preview = previews[page.id];
|
|
16
|
+
const filters = [
|
|
17
|
+
{ key: ps_scan_filter_1.PsScanFilter.Original, label: labels.filterOriginal },
|
|
18
|
+
{ key: ps_scan_filter_1.PsScanFilter.Colour, label: labels.filterColour },
|
|
19
|
+
{ key: ps_scan_filter_1.PsScanFilter.Greyscale, label: labels.filterGreyscale },
|
|
20
|
+
{ key: ps_scan_filter_1.PsScanFilter.Document, label: labels.filterDocument },
|
|
21
|
+
];
|
|
22
|
+
const tools = [
|
|
23
|
+
{ iconKey: ps_icons_1.PsIconKey.Crop, label: labels.editCrop, onClick: onEditCrop },
|
|
24
|
+
{ iconKey: ps_icons_1.PsIconKey.Rotate, label: labels.rotate, onClick: onRotate },
|
|
25
|
+
{ iconKey: ps_icons_1.PsIconKey.Refresh, label: labels.retake, onClick: onRetake },
|
|
26
|
+
{ iconKey: ps_icons_1.PsIconKey.Trash, label: labels.deletePage, onClick: onDelete },
|
|
27
|
+
];
|
|
28
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: 'flex h-full min-h-0 flex-col bg-black text-white animate-ps-fade-in lg:flex-row', children: [(0, jsx_runtime_1.jsxs)("section", { className: 'flex min-h-0 flex-1 flex-col', children: [(0, jsx_runtime_1.jsxs)("header", { className: 'grid shrink-0 grid-cols-[2.75rem_1fr_2.75rem] items-center gap-3 px-4 pb-1 pt-[max(1rem,env(safe-area-inset-top))]', children: [(0, jsx_runtime_1.jsx)(ps_scan_icon_button_1.PsScanIconButton, { iconKey: ps_icons_1.PsIconKey.Close, label: labels.close, onClick: onClose }), (0, jsx_runtime_1.jsxs)("div", { className: 'flex items-center justify-center gap-1', children: [(0, jsx_runtime_1.jsx)(ps_scan_icon_button_1.PsScanIconButton, { disabled: index <= 0, iconClassName: 'rotate-180', iconKey: ps_icons_1.PsIconKey.ChevronRight, label: labels.previousPage, onClick: () => onSelect(pages[index - 1].id) }), (0, jsx_runtime_1.jsx)("h2", { className: 'min-w-16 text-center text-sm font-semibold tabular-nums', children: ps_scan_template_service_1.PsScanTemplateService.fill(labels.pageOf, {
|
|
29
|
+
count: pages.length,
|
|
30
|
+
position: index + 1,
|
|
31
|
+
}) }), (0, jsx_runtime_1.jsx)(ps_scan_icon_button_1.PsScanIconButton, { disabled: index >= pages.length - 1, iconKey: ps_icons_1.PsIconKey.ChevronRight, label: labels.nextPage, onClick: () => onSelect(pages[index + 1].id) })] }), (0, jsx_runtime_1.jsx)(ps_scan_icon_button_1.PsScanIconButton, { disabled: !canAddPage, iconKey: ps_icons_1.PsIconKey.Camera, label: labels.addPage, onClick: onAddPage })] }), (0, jsx_runtime_1.jsx)("div", { className: 'flex min-h-0 flex-1 items-center justify-center px-6 py-4', children: preview === undefined ? ((0, jsx_runtime_1.jsx)("span", { "aria-hidden": 'true', className: 'ps-skeleton block h-4/5 w-3/5 rounded-sm' })) : ((0, jsx_runtime_1.jsx)("img", { alt: `${labels.page} ${index + 1}`, className: 'max-h-full max-w-full rounded-sm object-contain shadow-[0_24px_60px_-20px_rgb(0_0_0/0.9)] animate-ps-fade-in', src: preview }, preview)) })] }), (0, jsx_runtime_1.jsxs)("aside", { className: 'flex shrink-0 flex-col gap-3 border-white/10 px-4 pb-[max(1rem,env(safe-area-inset-bottom))] lg:w-[22rem] lg:gap-5 lg:overflow-y-auto lg:border-l lg:pt-[max(1rem,env(safe-area-inset-top))]', children: [(0, jsx_runtime_1.jsx)("div", { "aria-label": labels.filters, className: 'grid grid-cols-4 gap-2 sm:mx-auto sm:w-full sm:max-w-md lg:max-w-none lg:grid-cols-2', role: 'group', children: filters.map((filter) => ((0, jsx_runtime_1.jsx)("button", { "aria-pressed": page.filter === filter.key, className: ps_design_system_1.PallasoftClassNameService.merge(ps_scan_chrome_classes_1.PsScanChromeClasses.chip, page.filter === filter.key
|
|
32
|
+
? ps_scan_chrome_classes_1.PsScanChromeClasses.iconOn
|
|
33
|
+
: 'bg-white/10 text-white/85 hover:bg-white/20'), onClick: () => onFilter(filter.key), type: 'button', children: filter.label }, filter.key))) }), (0, jsx_runtime_1.jsx)("div", { className: 'grid grid-cols-4 gap-1 sm:mx-auto sm:w-full sm:max-w-md lg:max-w-none', children: tools.map((tool) => ((0, jsx_runtime_1.jsxs)("button", { className: ps_scan_chrome_classes_1.PsScanChromeClasses.tool, onClick: tool.onClick, type: 'button', children: [(0, jsx_runtime_1.jsx)(ps_icons_1.PsIcon, { "aria-hidden": 'true', className: 'size-ps-control-icon-standalone', iconKey: tool.iconKey }), (0, jsx_runtime_1.jsx)("span", { children: tool.label })] }, tool.label))) }), (0, jsx_runtime_1.jsxs)("section", { "aria-label": labels.pages, className: 'min-w-0 sm:mx-auto sm:w-full sm:max-w-md lg:max-w-none', children: [(0, jsx_runtime_1.jsx)("h3", { className: 'hidden text-xs font-semibold uppercase tracking-wide text-white/50 lg:block', children: labels.pages }), (0, jsx_runtime_1.jsx)(ps_scan_page_list_1.PsScanPageList, { activeId: page.id, canAddPage: canAddPage, labels: labels, onAddPage: onAddPage, onMove: onMove, onSelect: onSelect, pages: pages, previews: previews })] }), error === '' ? null : ((0, jsx_runtime_1.jsx)("p", { className: 'rounded-ps-control bg-danger px-3 py-2 text-sm text-white', role: 'alert', children: error })), (0, jsx_runtime_1.jsx)(ps_scan_button_1.PsScanButton, { className: 'w-full sm:mx-auto sm:max-w-md lg:mt-auto lg:max-w-none', isLarge: true, isLoading: isBusy, isPrimary: true, leadingIcon: (0, jsx_runtime_1.jsx)(ps_icons_1.PsIcon, { "aria-hidden": 'true', className: 'size-4', iconKey: ps_icons_1.PsIconKey.Upload }), loadingLabel: labels.finishing, onClick: onFinish, children: pages.length === 1
|
|
34
|
+
? labels.finishOne
|
|
35
|
+
: ps_scan_template_service_1.PsScanTemplateService.fill(labels.finish, { count: pages.length }) })] })] }));
|
|
36
|
+
};
|
|
37
|
+
exports.PsScanReview = PsScanReview;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PsScanShutter = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const PsScanShutter = ({ disabled, label, onCapture, progress }) => ((0, jsx_runtime_1.jsxs)("button", { "aria-label": label, className: 'ps-focus-ring group relative flex size-[4.75rem] shrink-0 items-center justify-center rounded-full disabled:opacity-40', disabled: disabled, onClick: onCapture, title: label, type: 'button', children: [(0, jsx_runtime_1.jsxs)("svg", { "aria-hidden": 'true', className: 'absolute inset-0 size-full -rotate-90', viewBox: '0 0 76 76', children: [(0, jsx_runtime_1.jsx)("circle", { className: 'stroke-white', cx: '38', cy: '38', fill: 'none', r: '35', strokeWidth: '4' }), (0, jsx_runtime_1.jsx)("circle", { className: 'stroke-primary transition-[stroke-dashoffset] duration-150 ease-linear', cx: '38', cy: '38', fill: 'none', pathLength: '100', r: '35', strokeDasharray: '100', strokeDashoffset: 100 - Math.round(progress * 100), strokeLinecap: 'round', strokeWidth: '4' })] }), (0, jsx_runtime_1.jsx)("span", { className: 'size-[3.75rem] rounded-full bg-white transition-transform duration-150 group-active:scale-90' })] }));
|
|
6
|
+
exports.PsScanShutter = PsScanShutter;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { PsPageSize } from '../models/ps-page-size';
|
|
2
|
+
import type { PsScanQuad } from '../models/ps-scan-quad';
|
|
3
|
+
export interface PsScanViewfinderOverlayProps {
|
|
4
|
+
area: PsPageSize;
|
|
5
|
+
quad: PsScanQuad | null;
|
|
6
|
+
video: PsPageSize;
|
|
7
|
+
}
|
|
8
|
+
export declare const PsScanViewfinderOverlay: ({ area, quad, video }: PsScanViewfinderOverlayProps) => import("react").JSX.Element | null;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PsScanViewfinderOverlay = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const ps_scan_config_1 = require("../constants/ps-scan-config");
|
|
6
|
+
const ps_scan_geometry_service_1 = require("../services/ps-scan-geometry-service");
|
|
7
|
+
const PsScanViewfinderOverlay = ({ area, quad, video }) => {
|
|
8
|
+
if (area.width <= 0 || area.height <= 0)
|
|
9
|
+
return null;
|
|
10
|
+
const box = ps_scan_geometry_service_1.PsScanGeometryService.cover(area, video);
|
|
11
|
+
const left = (area.width - box.width) / 2;
|
|
12
|
+
const top = (area.height - box.height) / 2;
|
|
13
|
+
const frameHeight = Math.min(area.height * ps_scan_config_1.PsScanConfig.guideHeightRatio, (area.width * ps_scan_config_1.PsScanConfig.guideWidthRatio) / ps_scan_config_1.PsScanConfig.guideAspect);
|
|
14
|
+
const frameWidth = frameHeight * ps_scan_config_1.PsScanConfig.guideAspect;
|
|
15
|
+
const frameLeft = (area.width - frameWidth) / 2;
|
|
16
|
+
const frameTop = (area.height - frameHeight) / 2 - area.height * ps_scan_config_1.PsScanConfig.guideLift;
|
|
17
|
+
const arm = Math.min(ps_scan_config_1.PsScanConfig.guideArm, frameWidth * ps_scan_config_1.PsScanConfig.guideArmRatio);
|
|
18
|
+
const corners = [
|
|
19
|
+
`M${frameLeft} ${frameTop + arm}V${frameTop}H${frameLeft + arm}`,
|
|
20
|
+
`M${frameLeft + frameWidth - arm} ${frameTop}H${frameLeft + frameWidth}V${frameTop + arm}`,
|
|
21
|
+
`M${frameLeft + frameWidth} ${frameTop + frameHeight - arm}V${frameTop + frameHeight}H${frameLeft + frameWidth - arm}`,
|
|
22
|
+
`M${frameLeft + arm} ${frameTop + frameHeight}H${frameLeft}V${frameTop + frameHeight - arm}`,
|
|
23
|
+
].join('');
|
|
24
|
+
return ((0, jsx_runtime_1.jsx)("svg", { "aria-hidden": 'true', className: 'pointer-events-none absolute inset-0 size-full', viewBox: `0 0 ${area.width} ${area.height}`, children: quad === null || box.width === 0 ? ((0, jsx_runtime_1.jsx)("path", { className: 'stroke-white/75 animate-ps-fade-in', d: corners, fill: 'none', strokeLinecap: 'round', strokeLinejoin: 'round', strokeWidth: '4' })) : ((0, jsx_runtime_1.jsx)("polygon", { className: 'fill-primary/10 stroke-primary', points: quad
|
|
25
|
+
.map((point) => `${left + point.x * box.width},${top + point.y * box.height}`)
|
|
26
|
+
.join(' '), strokeLinejoin: 'round', strokeWidth: '3' })) }));
|
|
27
|
+
};
|
|
28
|
+
exports.PsScanViewfinderOverlay = PsScanViewfinderOverlay;
|
|
@@ -19,6 +19,6 @@ const PsUploadRow = ({ item, labels, onCancel, onRemove, onRetry }) => {
|
|
|
19
19
|
: item.status === ps_upload_status_1.PsUploadStatus.failed && item.error
|
|
20
20
|
? item.error
|
|
21
21
|
: labels[item.status];
|
|
22
|
-
return ((0, jsx_runtime_1.jsxs)("li", { className: 'flex items-center gap-3 rounded-ps-control border border-line px-3 py-2.5', children: [(0, jsx_runtime_1.jsx)(ps_file_kind_icon_1.PsFileKindIcon, { contentType: item.file.type, name: item.file.name }), (0, jsx_runtime_1.jsxs)("div", { className: 'flex min-w-0 flex-1 flex-col gap-1.5', children: [(0, jsx_runtime_1.jsx)("p", { className: 'truncate text-sm font-medium text-ink', children: item.file.name }), (0, jsx_runtime_1.jsx)(ps_progress_bar_1.PsProgressBar, { label: item.file.name, tone: ps_upload_status_tones_1.PsUploadStatusTones[item.status], value: isProblem ? 1 : item.progress }), (0, jsx_runtime_1.jsxs)("p", { className: `truncate text-xs ${isProblem ? 'text-danger' : item.status === ps_upload_status_1.PsUploadStatus.done ? 'text-success' : 'text-ink/55'}`, role: item.status === ps_upload_status_1.PsUploadStatus.failed ? 'alert' : undefined, children: [size, " \u00B7 ", status] })] }), (0, jsx_runtime_1.jsxs)("div", { className: 'flex w-
|
|
22
|
+
return ((0, jsx_runtime_1.jsxs)("li", { className: 'flex items-center gap-3 rounded-ps-control border border-line px-3 py-2.5', children: [(0, jsx_runtime_1.jsx)(ps_file_kind_icon_1.PsFileKindIcon, { contentType: item.file.type, name: item.file.name }), (0, jsx_runtime_1.jsxs)("div", { className: 'flex min-w-0 flex-1 flex-col gap-1.5', children: [(0, jsx_runtime_1.jsx)("p", { className: 'truncate text-sm font-medium text-ink', children: item.file.name }), (0, jsx_runtime_1.jsx)(ps_progress_bar_1.PsProgressBar, { label: item.file.name, tone: ps_upload_status_tones_1.PsUploadStatusTones[item.status], value: isProblem ? 1 : item.progress }), (0, jsx_runtime_1.jsxs)("p", { className: `truncate text-xs ${isProblem ? 'text-danger' : item.status === ps_upload_status_1.PsUploadStatus.done ? 'text-success' : 'text-ink/55'}`, role: item.status === ps_upload_status_1.PsUploadStatus.failed ? 'alert' : undefined, children: [size, " \u00B7 ", status] })] }), (0, jsx_runtime_1.jsxs)("div", { className: 'flex w-20 shrink-0 items-center justify-end gap-1', children: [isProblem ? ((0, jsx_runtime_1.jsx)(ps_file_icon_button_1.PsFileIconButton, { iconKey: ps_icons_1.PsIconKey.Refresh, label: `${labels.retry} ${item.file.name}`, onClick: onRetry })) : null, isActive ? ((0, jsx_runtime_1.jsx)(ps_file_icon_button_1.PsFileIconButton, { iconKey: ps_icons_1.PsIconKey.Close, label: `${labels.cancel} ${item.file.name}`, onClick: onCancel, tone: 'danger' })) : item.status === ps_upload_status_1.PsUploadStatus.done ? ((0, jsx_runtime_1.jsx)("span", { className: 'ps-control-square ps-control-compact inline-flex items-center justify-center text-success', children: (0, jsx_runtime_1.jsx)(ps_icons_1.PsIcon, { "aria-label": labels.done, className: 'h-4 w-4', iconKey: ps_icons_1.PsIconKey.Check }) })) : ((0, jsx_runtime_1.jsx)(ps_file_icon_button_1.PsFileIconButton, { iconKey: ps_icons_1.PsIconKey.Close, label: `${labels.remove} ${item.file.name}`, onClick: onRemove }))] })] }));
|
|
23
23
|
};
|
|
24
24
|
exports.PsUploadRow = PsUploadRow;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
export declare const PsDocumentScannerLabels: {
|
|
2
|
+
readonly addPage: "Add page";
|
|
3
|
+
readonly allowCamera: "Allow camera";
|
|
4
|
+
readonly auto: "Auto";
|
|
5
|
+
readonly autoCapture: "Capture automatically when the page is steady";
|
|
6
|
+
readonly autoDetect: "Detect edges";
|
|
7
|
+
readonly busyBody: "Another app is using the camera. Close it, then try again.";
|
|
8
|
+
readonly busyTitle: "Your camera is busy";
|
|
9
|
+
readonly cameraStarting: "Starting camera";
|
|
10
|
+
readonly capture: "Take photo";
|
|
11
|
+
readonly choosePhoto: "Choose a photo instead";
|
|
12
|
+
readonly choosePhotos: "Choose photos";
|
|
13
|
+
readonly close: "Close scanner";
|
|
14
|
+
readonly cornerBottomLeft: "Bottom left corner";
|
|
15
|
+
readonly cornerBottomRight: "Bottom right corner";
|
|
16
|
+
readonly cornerTopLeft: "Top left corner";
|
|
17
|
+
readonly cornerTopRight: "Top right corner";
|
|
18
|
+
readonly cropHint: "Drag the corners to the edges of the page.";
|
|
19
|
+
readonly cropTitle: "Adjust corners";
|
|
20
|
+
readonly deletePage: "Delete";
|
|
21
|
+
readonly deniedAndroid1: "Tap the icon to the left of the address bar.";
|
|
22
|
+
readonly deniedAndroid2: "Open Permissions, then Camera.";
|
|
23
|
+
readonly deniedAndroid3: "Choose Allow, then come back and tap Try again.";
|
|
24
|
+
readonly deniedBody: "You can turn it back on in a few taps.";
|
|
25
|
+
readonly deniedDesktop1: "Click the camera or site icon in the address bar.";
|
|
26
|
+
readonly deniedDesktop2: "Set Camera to Allow for this site.";
|
|
27
|
+
readonly deniedDesktop3: "Close the menu, then click Try again.";
|
|
28
|
+
readonly deniedIos1: "Tap aA in the address bar, then Website Settings.";
|
|
29
|
+
readonly deniedIos2: "Set Camera to Allow.";
|
|
30
|
+
readonly deniedIos3: "Come back and tap Try again.";
|
|
31
|
+
readonly deniedTitle: "Camera access is off";
|
|
32
|
+
readonly done: "Done";
|
|
33
|
+
readonly dragPage: "Drag {page} to reorder";
|
|
34
|
+
readonly editCrop: "Crop";
|
|
35
|
+
readonly edgesFound: "Page edges found.";
|
|
36
|
+
readonly edgesNotFound: "Edges not found. Drag the corners to the page.";
|
|
37
|
+
readonly filterColour: "Colour";
|
|
38
|
+
readonly filterDocument: "Document";
|
|
39
|
+
readonly filterGreyscale: "Greyscale";
|
|
40
|
+
readonly filterOriginal: "Original";
|
|
41
|
+
readonly filters: "Filter";
|
|
42
|
+
readonly finish: "Upload {count} pages";
|
|
43
|
+
readonly finishOne: "Upload 1 page";
|
|
44
|
+
readonly finishing: "Preparing your scan";
|
|
45
|
+
readonly hintFind: "Point your camera at a document";
|
|
46
|
+
readonly hintFound: "Document found";
|
|
47
|
+
readonly hintHold: "Hold steady";
|
|
48
|
+
readonly insecureBody: "The camera only works on a secure (https) page. You can still choose a photo.";
|
|
49
|
+
readonly insecureTitle: "Camera not available here";
|
|
50
|
+
readonly keepScan: "Keep scan";
|
|
51
|
+
readonly maxPages: "You reached the page limit.";
|
|
52
|
+
readonly nextPage: "Next page";
|
|
53
|
+
readonly page: "Page";
|
|
54
|
+
readonly pageAdded: "Page {position} added.";
|
|
55
|
+
readonly pageDeleted: "Page deleted.";
|
|
56
|
+
readonly pageMoved: "{page} moved to position {position} of {count}.";
|
|
57
|
+
readonly pageOf: "{position} of {count}";
|
|
58
|
+
readonly pages: "Pages";
|
|
59
|
+
readonly platformAndroid: "Android";
|
|
60
|
+
readonly platformDesktop: "Computer";
|
|
61
|
+
readonly platformIos: "iPhone";
|
|
62
|
+
readonly previousPage: "Previous page";
|
|
63
|
+
readonly primerBody: "The camera is only used while the scanner is open. Nothing is saved until you upload.";
|
|
64
|
+
readonly primerTitle: "Allow camera access to scan your documents";
|
|
65
|
+
readonly processFailed: "The scan could not be prepared. Try again.";
|
|
66
|
+
readonly reorderCancelled: "{page} stays where it was.";
|
|
67
|
+
readonly reorderDropped: "{page} dropped at {position} of {count}.";
|
|
68
|
+
readonly reorderInstructions: "Press space to lift a page, the arrow keys to move it and space to drop it.";
|
|
69
|
+
readonly reorderLifted: "{page} lifted from {position} of {count}.";
|
|
70
|
+
readonly reorderMoved: "{page} is now {position} of {count}.";
|
|
71
|
+
readonly retake: "Retake";
|
|
72
|
+
readonly rotate: "Rotate";
|
|
73
|
+
readonly title: "Scan document";
|
|
74
|
+
readonly torchOff: "Turn flash off";
|
|
75
|
+
readonly torchOn: "Turn flash on";
|
|
76
|
+
readonly tryAgain: "Try again";
|
|
77
|
+
readonly unavailableBody: "This device has no camera the browser can use. Choose a photo of the page instead.";
|
|
78
|
+
readonly unavailableTitle: "No camera found";
|
|
79
|
+
readonly viewPages: "Review {count} pages";
|
|
80
|
+
};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PsDocumentScannerLabels = void 0;
|
|
4
|
+
exports.PsDocumentScannerLabels = {
|
|
5
|
+
addPage: 'Add page',
|
|
6
|
+
allowCamera: 'Allow camera',
|
|
7
|
+
auto: 'Auto',
|
|
8
|
+
autoCapture: 'Capture automatically when the page is steady',
|
|
9
|
+
autoDetect: 'Detect edges',
|
|
10
|
+
busyBody: 'Another app is using the camera. Close it, then try again.',
|
|
11
|
+
busyTitle: 'Your camera is busy',
|
|
12
|
+
cameraStarting: 'Starting camera',
|
|
13
|
+
capture: 'Take photo',
|
|
14
|
+
choosePhoto: 'Choose a photo instead',
|
|
15
|
+
choosePhotos: 'Choose photos',
|
|
16
|
+
close: 'Close scanner',
|
|
17
|
+
cornerBottomLeft: 'Bottom left corner',
|
|
18
|
+
cornerBottomRight: 'Bottom right corner',
|
|
19
|
+
cornerTopLeft: 'Top left corner',
|
|
20
|
+
cornerTopRight: 'Top right corner',
|
|
21
|
+
cropHint: 'Drag the corners to the edges of the page.',
|
|
22
|
+
cropTitle: 'Adjust corners',
|
|
23
|
+
deletePage: 'Delete',
|
|
24
|
+
deniedAndroid1: 'Tap the icon to the left of the address bar.',
|
|
25
|
+
deniedAndroid2: 'Open Permissions, then Camera.',
|
|
26
|
+
deniedAndroid3: 'Choose Allow, then come back and tap Try again.',
|
|
27
|
+
deniedBody: 'You can turn it back on in a few taps.',
|
|
28
|
+
deniedDesktop1: 'Click the camera or site icon in the address bar.',
|
|
29
|
+
deniedDesktop2: 'Set Camera to Allow for this site.',
|
|
30
|
+
deniedDesktop3: 'Close the menu, then click Try again.',
|
|
31
|
+
deniedIos1: 'Tap aA in the address bar, then Website Settings.',
|
|
32
|
+
deniedIos2: 'Set Camera to Allow.',
|
|
33
|
+
deniedIos3: 'Come back and tap Try again.',
|
|
34
|
+
deniedTitle: 'Camera access is off',
|
|
35
|
+
done: 'Done',
|
|
36
|
+
dragPage: 'Drag {page} to reorder',
|
|
37
|
+
editCrop: 'Crop',
|
|
38
|
+
edgesFound: 'Page edges found.',
|
|
39
|
+
edgesNotFound: 'Edges not found. Drag the corners to the page.',
|
|
40
|
+
filterColour: 'Colour',
|
|
41
|
+
filterDocument: 'Document',
|
|
42
|
+
filterGreyscale: 'Greyscale',
|
|
43
|
+
filterOriginal: 'Original',
|
|
44
|
+
filters: 'Filter',
|
|
45
|
+
finish: 'Upload {count} pages',
|
|
46
|
+
finishOne: 'Upload 1 page',
|
|
47
|
+
finishing: 'Preparing your scan',
|
|
48
|
+
hintFind: 'Point your camera at a document',
|
|
49
|
+
hintFound: 'Document found',
|
|
50
|
+
hintHold: 'Hold steady',
|
|
51
|
+
insecureBody: 'The camera only works on a secure (https) page. You can still choose a photo.',
|
|
52
|
+
insecureTitle: 'Camera not available here',
|
|
53
|
+
keepScan: 'Keep scan',
|
|
54
|
+
maxPages: 'You reached the page limit.',
|
|
55
|
+
nextPage: 'Next page',
|
|
56
|
+
page: 'Page',
|
|
57
|
+
pageAdded: 'Page {position} added.',
|
|
58
|
+
pageDeleted: 'Page deleted.',
|
|
59
|
+
pageMoved: '{page} moved to position {position} of {count}.',
|
|
60
|
+
pageOf: '{position} of {count}',
|
|
61
|
+
pages: 'Pages',
|
|
62
|
+
platformAndroid: 'Android',
|
|
63
|
+
platformDesktop: 'Computer',
|
|
64
|
+
platformIos: 'iPhone',
|
|
65
|
+
previousPage: 'Previous page',
|
|
66
|
+
primerBody: 'The camera is only used while the scanner is open. Nothing is saved until you upload.',
|
|
67
|
+
primerTitle: 'Allow camera access to scan your documents',
|
|
68
|
+
processFailed: 'The scan could not be prepared. Try again.',
|
|
69
|
+
reorderCancelled: '{page} stays where it was.',
|
|
70
|
+
reorderDropped: '{page} dropped at {position} of {count}.',
|
|
71
|
+
reorderInstructions: 'Press space to lift a page, the arrow keys to move it and space to drop it.',
|
|
72
|
+
reorderLifted: '{page} lifted from {position} of {count}.',
|
|
73
|
+
reorderMoved: '{page} is now {position} of {count}.',
|
|
74
|
+
retake: 'Retake',
|
|
75
|
+
rotate: 'Rotate',
|
|
76
|
+
title: 'Scan document',
|
|
77
|
+
torchOff: 'Turn flash off',
|
|
78
|
+
torchOn: 'Turn flash on',
|
|
79
|
+
tryAgain: 'Try again',
|
|
80
|
+
unavailableBody: 'This device has no camera the browser can use. Choose a photo of the page instead.',
|
|
81
|
+
unavailableTitle: 'No camera found',
|
|
82
|
+
viewPages: 'Review {count} pages',
|
|
83
|
+
};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
export declare const PsFilePickerLabels: {
|
|
2
|
-
readonly
|
|
3
|
-
readonly
|
|
2
|
+
readonly choose: "Choose files";
|
|
3
|
+
readonly chooseOne: "Choose a file";
|
|
4
|
+
readonly dragHint: "Drag and drop files here";
|
|
5
|
+
readonly dragHintOne: "Drag and drop a file here";
|
|
4
6
|
readonly dropActive: "Drop to upload";
|
|
5
|
-
readonly formats: "Accepted formats:";
|
|
6
7
|
readonly invalidType: "is not a supported file type.";
|
|
8
|
+
readonly scan: "Scan with camera";
|
|
7
9
|
readonly tooLarge: "is too large.";
|
|
8
10
|
};
|