@shznet/pdf-sign-angular 0.1.0 → 0.2.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.
Files changed (2) hide show
  1. package/README.md +18 -13
  2. package/package.json +17 -6
package/README.md CHANGED
@@ -5,36 +5,41 @@ Angular component wrapper for `@shznet/pdf-sign-control`.
5
5
  ## Installation
6
6
 
7
7
  ```bash
8
- npm install @shznet/pdf-sign-angular @shznet/pdf-sign-control pdfjs-dist
8
+ npm install @shznet/pdf-sign-angular pdfjs-dist
9
9
  ```
10
10
 
11
11
  ## Usage
12
12
 
13
- Import the module in your `app.module.ts`:
13
+ Import the component (Standalone) or Module:
14
14
 
15
15
  ```typescript
16
- import { PdfSignAngularModule } from '@shznet/pdf-sign-angular';
16
+ import { PdfSignAngularComponent } from '@shznet/pdf-sign-angular';
17
17
 
18
- @NgModule({
19
- imports: [PdfSignAngularModule],
20
- // ...
18
+ @Component({
19
+ ...
20
+ imports: [PdfSignAngularComponent],
21
+ ...
21
22
  })
22
- export class AppModule {}
23
+ export class AppComponent {}
23
24
  ```
24
25
 
25
26
  Use the component in your template:
26
27
 
27
28
  ```html
28
29
  <lib-pdf-sign-angular
29
- [url]="'https://example.com/doc.pdf'"
30
- [scale]="1.0"
31
- (pdfLoaded)="onPdfLoaded()"
30
+ [src]="'https://example.com/doc.pdf'"
31
+ [viewMode]="'scroll'"
32
+ (loaded)="onPdfLoaded()"
32
33
  >
33
34
  </lib-pdf-sign-angular>
34
35
  ```
35
36
 
36
37
  ## Inputs & Outputs
37
38
 
38
- - **[url]**: `string` - Path to the PDF file.
39
- - **[scale]**: `number` - Zoom level.
40
- - **(pdfLoaded)**: `EventEmitter<void>` - Emitted when PDF renders successfully.
39
+ - **[src]**: `string | Uint8Array | ArrayBuffer` - Source of the PDF file.
40
+ - **[viewMode]**: `'single' | 'scroll'` - View mode configuration.
41
+ - **[fields]**: `SignatureField[]` - Initial fields.
42
+ - **(loaded)**: `EventEmitter<void>` - Emitted when PDF renders successfully.
43
+ - **(pageChange)**: `EventEmitter<{ page: number, total: number }>` - Emitted on navigation.
44
+ - **(scaleChange)**: `EventEmitter<{ scale: number }>` - Emitted on zoom.
45
+ - **(fieldsChange)**: `EventEmitter<SignatureField[]>` - Emitted when fields change.
package/package.json CHANGED
@@ -1,10 +1,24 @@
1
1
  {
2
2
  "name": "@shznet/pdf-sign-angular",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
+ "description": "Angular wrapper for @shznet/pdf-sign-control",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/ShzNet/pdf-signature-control.git"
9
+ },
10
+ "author": "Chien Tran <chientranit@gmail.com>",
11
+ "bugs": {
12
+ "url": "https://github.com/ShzNet/pdf-signature-control/issues"
13
+ },
14
+ "homepage": "https://github.com/ShzNet/pdf-signature-control#readme",
15
+ "dependencies": {
16
+ "@shznet/pdf-sign-control": "*",
17
+ "tslib": "^2.3.0"
18
+ },
4
19
  "peerDependencies": {
5
20
  "@angular/common": "^21.0.0",
6
- "@angular/core": "^21.0.0",
7
- "@shznet/pdf-sign-control": "*"
21
+ "@angular/core": "^21.0.0"
8
22
  },
9
23
  "publishConfig": {
10
24
  "access": "public"
@@ -20,8 +34,5 @@
20
34
  "types": "./types/shznet-pdf-sign-angular.d.ts",
21
35
  "default": "./fesm2022/shznet-pdf-sign-angular.mjs"
22
36
  }
23
- },
24
- "dependencies": {
25
- "tslib": "^2.3.0"
26
37
  }
27
38
  }