edatalia-websign 3.2.9 → 3.3.1
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/CHANGELOG.md +13 -0
- package/README.md +33 -0
- package/dist/offline-sw.js +658 -0
- package/dist/web-sign-core.js +1 -1
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,19 @@
|
|
|
3
3
|
All significant updates to this project will be documented here.
|
|
4
4
|
This changelog is public.
|
|
5
5
|
|
|
6
|
+
## [3.3.1] - 2025-01-27
|
|
7
|
+
|
|
8
|
+
### Fixed
|
|
9
|
+
|
|
10
|
+
- Signotec double `setDisplayPDF` call when EBP is enabled
|
|
11
|
+
|
|
12
|
+
## [3.3.0] - 2025-01-27
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
|
|
16
|
+
- **Middleware Mode:** New `useMiddleware` parameter to route signature data through an external middleware before completing the signature flow.
|
|
17
|
+
- **Offline Mode:** New `offlineMode` and `offlineModeAutoFetch` parameters to enable offline signature capture using Service Worker with automatic sync when connection is restored.
|
|
18
|
+
|
|
6
19
|
## [3.2.8] - 2025-01-15
|
|
7
20
|
|
|
8
21
|
### Fixed
|
package/README.md
CHANGED
|
@@ -197,6 +197,9 @@ All parameters below are part of the `config` object:
|
|
|
197
197
|
| `properties` | `Object` | Specifies pdf signature properties like author, reason, contact and location |
|
|
198
198
|
| `displayCanvasSignatureButtonsInDTU` | `boolean` | When set to true, this parameter enables display of signature action buttons directly within the DTU device canvas interface, allowing users to perform signature-related operations from the DTU screen itself |
|
|
199
199
|
| `enableBridge` | `boolean` | When set to true, this parameter tries to communicate with WebSign Bridge, see more in the [corresponding section](#-websign-bridge-desktop-helper) |
|
|
200
|
+
| `useMiddleware` | `boolean` | Routes signature data through an external middleware via callback before completing the flow |
|
|
201
|
+
| `offlineMode` | `boolean` | Enables offline signature capture using Service Worker |
|
|
202
|
+
| `offlineModeAutoFetch` | `boolean` | Auto-syncs pending requests in background without prompting the user |
|
|
200
203
|
---
|
|
201
204
|
|
|
202
205
|
|
|
@@ -322,6 +325,36 @@ const config = {
|
|
|
322
325
|
|
|
323
326
|
WebSign Bridge is a lightweight desktop companion that enhances WebSign with native capabilities via a local service. It enables high‑performance operations and access to the local environment when your app runs in the browser.
|
|
324
327
|
|
|
328
|
+
---
|
|
329
|
+
|
|
330
|
+
## 📴 Offline Mode
|
|
331
|
+
|
|
332
|
+
WebSign supports intermittent connectivity scenarios. Although it's called "offline mode", the user needs connection to receive the signed PDF. However, if connection is lost at the moment of signing, the request is stored locally and processed when WebSign is launched again.
|
|
333
|
+
|
|
334
|
+
### Setup
|
|
335
|
+
|
|
336
|
+
1. Copy the Service Worker file to your project root:
|
|
337
|
+
|
|
338
|
+
```bash
|
|
339
|
+
cp node_modules/edatalia-websign/dist/offline-sw.js ./public/
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
2. Enable offline mode in your config:
|
|
343
|
+
|
|
344
|
+
```js
|
|
345
|
+
const config = {
|
|
346
|
+
offlineMode: true,
|
|
347
|
+
offlineModeAutoFetch: true, // auto-sync pending requests without prompting
|
|
348
|
+
// ... other config
|
|
349
|
+
};
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
### Requirements
|
|
353
|
+
|
|
354
|
+
- **HTTPS with valid SSL certificate**: Service Workers require a secure context. For local development, use tools like `mkcert` to generate a trusted certificate.
|
|
355
|
+
|
|
356
|
+
---
|
|
357
|
+
|
|
325
358
|
### Why use the Bridge?
|
|
326
359
|
|
|
327
360
|
⚡ Speed-ups in signature workflows (reduced latency on device I/O and PDF handling)
|