@qbs-sign/sign-lib 2.1.26-dev.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/README.md +67 -0
- package/components/view-files/view-files.component.d.ts +65 -0
- package/fesm2022/qbs-sign-sign-lib.mjs +956 -0
- package/fesm2022/qbs-sign-sign-lib.mjs.map +1 -0
- package/helpers/scroll-helper.d.ts +1 -0
- package/helpers/tanslate.pipe.d.ts +20 -0
- package/helpers/translation-label-keys.d.ts +16 -0
- package/index.d.ts +5 -0
- package/interfaces/document.interface.d.ts +11 -0
- package/interfaces/input-config.interface.d.ts +19 -0
- package/interfaces/labels.interface.d.ts +7 -0
- package/interfaces/otp.interface.d.ts +3 -0
- package/interfaces/sign-config.interface.d.ts +32 -0
- package/interfaces/sign.interface.d.ts +5 -0
- package/lib/sign-lib.component.d.ts +17 -0
- package/lib/sign-lib.module.d.ts +13 -0
- package/lib/sign-lib.service.d.ts +6 -0
- package/package.json +30 -0
- package/public-api.d.ts +6 -0
- package/services/base.service.d.ts +11 -0
- package/services/document.service.d.ts +12 -0
- package/services/labels.service.d.ts +13 -0
- package/services/otp.service.d.ts +11 -0
- package/services/sign.service.d.ts +13 -0
- package/services/state.service.d.ts +22 -0
- package/services/telemetry.service.d.ts +23 -0
- package/version.d.ts +1 -0
package/README.md
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# @qbs-origin/sign-lib
|
|
2
|
+
|
|
3
|
+
Angular library for digital signature functionality with PDF viewing and signing capabilities.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @qbs-origin/sign-lib
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Peer Dependencies
|
|
12
|
+
|
|
13
|
+
This library requires the following peer dependencies:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install @angular/common @angular/core pdfjs-dist ng2-pdf-viewer
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
Import the `SignLibModule` in your Angular module:
|
|
22
|
+
|
|
23
|
+
```typescript
|
|
24
|
+
import { SignLibModule } from '@qbs-origin/sign-lib';
|
|
25
|
+
|
|
26
|
+
@NgModule({
|
|
27
|
+
imports: [
|
|
28
|
+
SignLibModule
|
|
29
|
+
]
|
|
30
|
+
})
|
|
31
|
+
export class AppModule { }
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Component Usage
|
|
35
|
+
|
|
36
|
+
Use the `SignLibComponent` in your template:
|
|
37
|
+
|
|
38
|
+
```html
|
|
39
|
+
<sign-lib
|
|
40
|
+
[config]="signConfig"
|
|
41
|
+
(libEvent)="onSignEvent($event)">
|
|
42
|
+
</sign-lib>
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Configuration
|
|
46
|
+
|
|
47
|
+
```typescript
|
|
48
|
+
const signConfig = {
|
|
49
|
+
AppDataId: 'your-app-data-id',
|
|
50
|
+
StepId: 'step-identifier',
|
|
51
|
+
Token: 'auth-token',
|
|
52
|
+
BaseUrl: 'https://your-api-url.com',
|
|
53
|
+
AutoSign: false,
|
|
54
|
+
ShowConfirm: true,
|
|
55
|
+
SignMode: 'client' // 'client' | 'both'
|
|
56
|
+
};
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Events
|
|
60
|
+
|
|
61
|
+
The component emits events through `libEvent`:
|
|
62
|
+
- `'success'` - Signing completed successfully
|
|
63
|
+
- `'error'` - An error occurred during signing
|
|
64
|
+
|
|
65
|
+
## License
|
|
66
|
+
|
|
67
|
+
Proprietary - Qoobiss
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { ElementRef, AfterViewChecked, OnInit, OnDestroy } from '@angular/core';
|
|
2
|
+
import { ChangeDetectorRef } from '@angular/core';
|
|
3
|
+
import { LabelKeys } from '../../helpers/translation-label-keys';
|
|
4
|
+
import { StateService } from '../../services/state.service';
|
|
5
|
+
import { OtpService } from '../../services/otp.service';
|
|
6
|
+
import { SignService } from '../../services/sign.service';
|
|
7
|
+
import { DocumentService } from '../../services/document.service';
|
|
8
|
+
import { SignConfig } from '../../interfaces/sign-config.interface';
|
|
9
|
+
import { SignDocument } from '../../interfaces/document.interface';
|
|
10
|
+
import * as i0 from "@angular/core";
|
|
11
|
+
export declare class ViewFilesComponent implements AfterViewChecked, OnInit, OnDestroy {
|
|
12
|
+
private cdr;
|
|
13
|
+
private state;
|
|
14
|
+
private otpService;
|
|
15
|
+
private signService;
|
|
16
|
+
private documentService;
|
|
17
|
+
codeContainer: ElementRef;
|
|
18
|
+
instanceId: string;
|
|
19
|
+
currentIndex: number;
|
|
20
|
+
showPdfContainer: boolean;
|
|
21
|
+
showCodeContainer: boolean;
|
|
22
|
+
showCodeError: boolean;
|
|
23
|
+
showPhoneError: boolean;
|
|
24
|
+
showSendCodeError: boolean;
|
|
25
|
+
otpFlow: boolean;
|
|
26
|
+
isPhoneNumberDisabled: boolean;
|
|
27
|
+
isFirstNameProvided: boolean;
|
|
28
|
+
isLastNameProvided: boolean;
|
|
29
|
+
codeSent: boolean;
|
|
30
|
+
scrollPending: boolean;
|
|
31
|
+
config: SignConfig;
|
|
32
|
+
labelKeys: LabelKeys;
|
|
33
|
+
otpCode: string;
|
|
34
|
+
currentPdf: string;
|
|
35
|
+
subscription: any;
|
|
36
|
+
isLoading: boolean;
|
|
37
|
+
isSigningDocument: boolean;
|
|
38
|
+
isSendingCode: boolean;
|
|
39
|
+
showSuccessSigned: boolean;
|
|
40
|
+
showNoSignedDocuments: boolean;
|
|
41
|
+
showErrorSigned: boolean;
|
|
42
|
+
private hasInitialized;
|
|
43
|
+
private documentsLoadingInProgress;
|
|
44
|
+
private lastInstanceId;
|
|
45
|
+
constructor(cdr: ChangeDetectorRef, state: StateService, otpService: OtpService, signService: SignService, documentService: DocumentService);
|
|
46
|
+
ngOnDestroy(): void;
|
|
47
|
+
ngOnInit(): void;
|
|
48
|
+
private resetComponentState;
|
|
49
|
+
private resetLoadingState;
|
|
50
|
+
loadDocuments(): void;
|
|
51
|
+
convertToSignDocuments(documents: any): SignDocument[];
|
|
52
|
+
ngAfterViewChecked(): void;
|
|
53
|
+
nextPdf(): void;
|
|
54
|
+
previousPdf(): void;
|
|
55
|
+
refreshCurrentPDF(): void;
|
|
56
|
+
proceedSigning(): void;
|
|
57
|
+
get canSendCode(): boolean;
|
|
58
|
+
sendCode(): void;
|
|
59
|
+
retrySendCode(): void;
|
|
60
|
+
signDocuments(): void;
|
|
61
|
+
getB64ForSrc(b64Value: string): string;
|
|
62
|
+
retry(): void;
|
|
63
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ViewFilesComponent, never>;
|
|
64
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ViewFilesComponent, "lib-view-files", never, { "instanceId": { "alias": "instanceId"; "required": false; }; }, {}, never, never, false, never>;
|
|
65
|
+
}
|