@ngstarter-ui/components 21.0.73 → 21.0.75

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 (38) hide show
  1. package/ai/component-registry.json +97 -1
  2. package/fesm2022/{ngstarter-ui-components-content-editor-code-block.component-BZniTqu-.mjs → ngstarter-ui-components-content-editor-code-block.component-CLfzSb69.mjs} +2 -2
  3. package/fesm2022/{ngstarter-ui-components-content-editor-code-block.component-BZniTqu-.mjs.map → ngstarter-ui-components-content-editor-code-block.component-CLfzSb69.mjs.map} +1 -1
  4. package/fesm2022/{ngstarter-ui-components-content-editor-embed-block-QzDMzd3u.mjs → ngstarter-ui-components-content-editor-embed-block-BMBObSRE.mjs} +2 -2
  5. package/fesm2022/{ngstarter-ui-components-content-editor-embed-block-QzDMzd3u.mjs.map → ngstarter-ui-components-content-editor-embed-block-BMBObSRE.mjs.map} +1 -1
  6. package/fesm2022/{ngstarter-ui-components-content-editor-heading-block.component-CnYRnDBY.mjs → ngstarter-ui-components-content-editor-heading-block.component-DL9PehLX.mjs} +2 -2
  7. package/fesm2022/{ngstarter-ui-components-content-editor-heading-block.component-CnYRnDBY.mjs.map → ngstarter-ui-components-content-editor-heading-block.component-DL9PehLX.mjs.map} +1 -1
  8. package/fesm2022/{ngstarter-ui-components-content-editor-image-block.component-IP_eRCQ2.mjs → ngstarter-ui-components-content-editor-image-block.component-DJWItlMf.mjs} +2 -2
  9. package/fesm2022/{ngstarter-ui-components-content-editor-image-block.component-IP_eRCQ2.mjs.map → ngstarter-ui-components-content-editor-image-block.component-DJWItlMf.mjs.map} +1 -1
  10. package/fesm2022/{ngstarter-ui-components-content-editor-list-block.component-amyfzXOW.mjs → ngstarter-ui-components-content-editor-list-block.component-J9vhrddX.mjs} +2 -2
  11. package/fesm2022/{ngstarter-ui-components-content-editor-list-block.component-amyfzXOW.mjs.map → ngstarter-ui-components-content-editor-list-block.component-J9vhrddX.mjs.map} +1 -1
  12. package/fesm2022/{ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-DA-VnRa_.mjs → ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-Be8dDH3z.mjs} +40 -40
  13. package/fesm2022/ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-Be8dDH3z.mjs.map +1 -0
  14. package/fesm2022/{ngstarter-ui-components-content-editor-paragraph-block.component-DtophI4_.mjs → ngstarter-ui-components-content-editor-paragraph-block.component-DxE2SXVt.mjs} +2 -2
  15. package/fesm2022/{ngstarter-ui-components-content-editor-paragraph-block.component-DtophI4_.mjs.map → ngstarter-ui-components-content-editor-paragraph-block.component-DxE2SXVt.mjs.map} +1 -1
  16. package/fesm2022/{ngstarter-ui-components-content-editor-quote-block.component-B20eHQdw.mjs → ngstarter-ui-components-content-editor-quote-block.component-BEt5JkO8.mjs} +2 -2
  17. package/fesm2022/{ngstarter-ui-components-content-editor-quote-block.component-B20eHQdw.mjs.map → ngstarter-ui-components-content-editor-quote-block.component-BEt5JkO8.mjs.map} +1 -1
  18. package/fesm2022/{ngstarter-ui-components-content-editor-table-block.component-hJ4OxKRX.mjs → ngstarter-ui-components-content-editor-table-block.component-BeCHXahH.mjs} +9 -9
  19. package/fesm2022/ngstarter-ui-components-content-editor-table-block.component-BeCHXahH.mjs.map +1 -0
  20. package/fesm2022/{ngstarter-ui-components-content-editor-video-block.component-Cs7L1wwX.mjs → ngstarter-ui-components-content-editor-video-block.component-BzFQtQwc.mjs} +2 -2
  21. package/fesm2022/{ngstarter-ui-components-content-editor-video-block.component-Cs7L1wwX.mjs.map → ngstarter-ui-components-content-editor-video-block.component-BzFQtQwc.mjs.map} +1 -1
  22. package/fesm2022/ngstarter-ui-components-content-editor.mjs +1 -1
  23. package/fesm2022/ngstarter-ui-components-dialog.mjs +2 -2
  24. package/fesm2022/ngstarter-ui-components-dialog.mjs.map +1 -1
  25. package/fesm2022/ngstarter-ui-components-form-builder.mjs +23 -35
  26. package/fesm2022/ngstarter-ui-components-form-builder.mjs.map +1 -1
  27. package/fesm2022/ngstarter-ui-components-pdf-builder.mjs +60 -29
  28. package/fesm2022/ngstarter-ui-components-pdf-builder.mjs.map +1 -1
  29. package/fesm2022/ngstarter-ui-components-pdf-signer.mjs +805 -0
  30. package/fesm2022/ngstarter-ui-components-pdf-signer.mjs.map +1 -0
  31. package/fesm2022/ngstarter-ui-components-pdf-viewer.mjs +2 -2
  32. package/fesm2022/ngstarter-ui-components-pdf-viewer.mjs.map +1 -1
  33. package/package.json +5 -1
  34. package/types/ngstarter-ui-components-form-builder.d.ts +2 -4
  35. package/types/ngstarter-ui-components-pdf-builder.d.ts +119 -3
  36. package/types/ngstarter-ui-components-pdf-signer.d.ts +144 -0
  37. package/fesm2022/ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-DA-VnRa_.mjs.map +0 -1
  38. package/fesm2022/ngstarter-ui-components-content-editor-table-block.component-hJ4OxKRX.mjs.map +0 -1
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ngstarter-ui/components",
3
3
  "description": "NgStarter - AI-friendly Enterprise Angular UI Components and Admin Panel",
4
- "version": "21.0.73",
4
+ "version": "21.0.75",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/elementarlabsdev/ngstarter.git"
@@ -431,6 +431,10 @@
431
431
  "types": "./types/ngstarter-ui-components-pdf-builder.d.ts",
432
432
  "default": "./fesm2022/ngstarter-ui-components-pdf-builder.mjs"
433
433
  },
434
+ "./pdf-signer": {
435
+ "types": "./types/ngstarter-ui-components-pdf-signer.d.ts",
436
+ "default": "./fesm2022/ngstarter-ui-components-pdf-signer.mjs"
437
+ },
434
438
  "./pdf-viewer": {
435
439
  "types": "./types/ngstarter-ui-components-pdf-viewer.d.ts",
436
440
  "default": "./fesm2022/ngstarter-ui-components-pdf-viewer.mjs"
@@ -374,7 +374,6 @@ declare class FormBuilder implements OnDestroy {
374
374
  readonly paletteTitle: _angular_core.InputSignal<string>;
375
375
  readonly inspectorTitle: _angular_core.InputSignal<string>;
376
376
  readonly canvasDropPlaceholderDelay: _angular_core.InputSignalWithTransform<number, unknown>;
377
- readonly uploadCallback: _angular_core.InputSignal<FormBuilderUploadCallback | null | undefined>;
378
377
  readonly fieldSelected: _angular_core.OutputEmitterRef<FormBuilderFieldChange>;
379
378
  readonly fieldAdded: _angular_core.OutputEmitterRef<FormBuilderFieldChange>;
380
379
  readonly fieldRemoved: _angular_core.OutputEmitterRef<FormBuilderFieldChange>;
@@ -560,7 +559,7 @@ declare class FormBuilder implements OnDestroy {
560
559
  private findFieldLocation;
561
560
  private deletePreviewControls;
562
561
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<FormBuilder, never>;
563
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<FormBuilder, "ngs-form-builder", ["ngsFormBuilder"], { "schema": { "alias": "schema"; "required": false; "isSignal": true; }; "paletteTitle": { "alias": "paletteTitle"; "required": false; "isSignal": true; }; "inspectorTitle": { "alias": "inspectorTitle"; "required": false; "isSignal": true; }; "canvasDropPlaceholderDelay": { "alias": "canvasDropPlaceholderDelay"; "required": false; "isSignal": true; }; "uploadCallback": { "alias": "uploadCallback"; "required": false; "isSignal": true; }; }, { "schema": "schemaChange"; "fieldSelected": "fieldSelected"; "fieldAdded": "fieldAdded"; "fieldRemoved": "fieldRemoved"; }, never, never, true, never>;
562
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<FormBuilder, "ngs-form-builder", ["ngsFormBuilder"], { "schema": { "alias": "schema"; "required": false; "isSignal": true; }; "paletteTitle": { "alias": "paletteTitle"; "required": false; "isSignal": true; }; "inspectorTitle": { "alias": "inspectorTitle"; "required": false; "isSignal": true; }; "canvasDropPlaceholderDelay": { "alias": "canvasDropPlaceholderDelay"; "required": false; "isSignal": true; }; }, { "schema": "schemaChange"; "fieldSelected": "fieldSelected"; "fieldAdded": "fieldAdded"; "fieldRemoved": "fieldRemoved"; }, never, never, true, never>;
564
563
  }
565
564
  declare function createDefaultFormBuilderSchema(): FormBuilderSchema;
566
565
 
@@ -740,6 +739,7 @@ declare class FormBuilderFieldHost {
740
739
  protected readonly customLoaded: _angular_core.WritableSignal<boolean>;
741
740
  protected readonly controlValue: _angular_core.WritableSignal<any>;
742
741
  protected readonly controlStateVersion: _angular_core.WritableSignal<number>;
742
+ protected readonly logoUploadLocalPreview: _angular_core.WritableSignal<string>;
743
743
  protected readonly textInputType: _angular_core.Signal<"email" | "text" | "number">;
744
744
  protected readonly calculatedInputType: _angular_core.Signal<"text" | "number">;
745
745
  protected readonly plainTextValue: _angular_core.Signal<string>;
@@ -769,8 +769,6 @@ declare class FormBuilderFieldHost {
769
769
  protected readonly logoUploadPreviewKey: _angular_core.Signal<string>;
770
770
  protected readonly logoUploadImageSrc: _angular_core.Signal<string>;
771
771
  protected readonly logoUploadFileName: _angular_core.Signal<string>;
772
- protected readonly logoUploadFileSize: _angular_core.Signal<string>;
773
- protected readonly logoUploadState: _angular_core.Signal<"uploading" | "uploaded">;
774
772
  protected readonly spacerHeight: _angular_core.Signal<number>;
775
773
  protected readonly dateRangeStartValue: _angular_core.Signal<string>;
776
774
  protected readonly dateRangeEndValue: _angular_core.Signal<string>;
@@ -2,6 +2,8 @@ import * as _angular_core from '@angular/core';
2
2
  import { Datepicker, DatepickerInput } from '@ngstarter-ui/components/datepicker';
3
3
  import { PdfViewerSource, PdfViewerAnnotationView, PdfViewerSearchResultView, PdfViewerLoadedEvent, PdfViewerSearchOptions } from '@ngstarter-ui/components/pdf-viewer';
4
4
  import { Tree } from '@ngstarter-ui/components/tree';
5
+ import { TypedSignaturePadValue } from '@ngstarter-ui/components/signature-pad';
6
+ import { UploadFileSelectedEvent } from '@ngstarter-ui/components/upload';
5
7
 
6
8
  type PdfBuilderCanvasTool = 'select' | 'pan' | 'text';
7
9
  type PdfBuilderFieldType = 'text' | 'variable' | 'date' | 'signature' | 'initials' | 'checkbox' | 'stamp';
@@ -57,6 +59,37 @@ interface PdfBuilderField {
57
59
  readonly readonly: boolean;
58
60
  readonly locked: boolean;
59
61
  }
62
+ type PdfBuilderFieldMetrics = Pick<PdfBuilderField, 'width' | 'height'>;
63
+ declare const PDF_BUILDER_DEFAULT_FIELD_METRICS: {
64
+ readonly text: {
65
+ readonly width: 168;
66
+ readonly height: 28;
67
+ };
68
+ readonly variable: {
69
+ readonly width: 168;
70
+ readonly height: 28;
71
+ };
72
+ readonly date: {
73
+ readonly width: 118;
74
+ readonly height: 28;
75
+ };
76
+ readonly signature: {
77
+ readonly width: 154;
78
+ readonly height: 42;
79
+ };
80
+ readonly initials: {
81
+ readonly width: 105;
82
+ readonly height: 42;
83
+ };
84
+ readonly checkbox: {
85
+ readonly width: 16;
86
+ readonly height: 16;
87
+ };
88
+ readonly stamp: {
89
+ readonly width: 120;
90
+ readonly height: 77;
91
+ };
92
+ };
60
93
  interface PdfBuilderRecipient {
61
94
  readonly id: string;
62
95
  readonly name: string;
@@ -82,6 +115,7 @@ interface PdfBuilderStampAsset {
82
115
  readonly name: string;
83
116
  readonly description?: string;
84
117
  readonly imageUrl?: string;
118
+ readonly dataUrl?: string;
85
119
  }
86
120
  interface PdfBuilderStampSelection {
87
121
  readonly field: PdfBuilderField;
@@ -401,7 +435,6 @@ declare class PdfBuilder {
401
435
  protected requestAddRecipient(): void;
402
436
  protected updateRecipientSearch(query: string): void;
403
437
  protected requestCreateRecipientContact(event?: Event): void;
404
- protected requestEditRecipientDetails(recipient: PdfBuilderRecipient, event?: Event): void;
405
438
  protected requestReplaceRecipient(recipient: PdfBuilderRecipient, event?: Event): void;
406
439
  protected requestRemoveRecipient(recipient: PdfBuilderRecipient, event?: Event): void;
407
440
  protected openSelectedDatePicker(event?: Event): void;
@@ -438,6 +471,7 @@ declare class PdfBuilder {
438
471
  protected assignSelectedFieldRecipient(recipient: PdfBuilderRecipient, event?: Event): void;
439
472
  protected updateSelectedField<K extends keyof PdfBuilderField>(key: K, value: PdfBuilderField[K]): void;
440
473
  private applyStampDialogResult;
474
+ private readImageFileAsDataUrl;
441
475
  private applySignatureDialogResult;
442
476
  private applyInitialsDialogResult;
443
477
  private resolveSignatureUploadResult;
@@ -536,5 +570,87 @@ declare class PdfBuilder {
536
570
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<PdfBuilder, "ngs-pdf-builder", ["ngsPdfBuilder"], { "schema": { "alias": "schema"; "required": false; "isSignal": true; }; "annotations": { "alias": "annotations"; "required": false; "isSignal": true; }; "recipients": { "alias": "recipients"; "required": false; "isSignal": true; }; "signers": { "alias": "signers"; "required": false; "isSignal": true; }; "stamps": { "alias": "stamps"; "required": false; "isSignal": true; }; "uploadedSignatures": { "alias": "uploadedSignatures"; "required": false; "isSignal": true; }; "uploadedInitials": { "alias": "uploadedInitials"; "required": false; "isSignal": true; }; "drawnSignatureUploadCallback": { "alias": "drawnSignatureUploadCallback"; "required": false; "isSignal": true; }; "signatureImageUploadCallback": { "alias": "signatureImageUploadCallback"; "required": false; "isSignal": true; }; "initialsImageUploadCallback": { "alias": "initialsImageUploadCallback"; "required": false; "isSignal": true; }; }, { "schemaChange": "schemaChange"; "createBlankPdf": "createBlankPdf"; "exportPdf": "exportPdf"; "recipientSelected": "recipientSelected"; "addRecipient": "addRecipient"; "recipientSearchChanged": "recipientSearchChanged"; "createRecipientContact": "createRecipientContact"; "editRecipientDetails": "editRecipientDetails"; "replaceRecipient": "replaceRecipient"; "removeRecipient": "removeRecipient"; "stampSelected": "stampSelected"; "stampUploaded": "stampUploaded"; "signatureSelected": "signatureSelected"; "signatureUploaded": "signatureUploaded"; "signatureDrawn": "signatureDrawn"; "signatureTyped": "signatureTyped"; "initialsSelected": "initialsSelected"; "initialsUploaded": "initialsUploaded"; "initialsTyped": "initialsTyped"; }, never, never, true, never>;
537
571
  }
538
572
 
539
- export { PdfBuilder };
540
- export type { PdfBuilderCanvasTool, PdfBuilderDrawnSignatureUploadCallback, PdfBuilderDrawnSignatureUploadContext, PdfBuilderField, PdfBuilderFieldSigner, PdfBuilderFieldSlot, PdfBuilderFieldType, PdfBuilderInitialsAsset, PdfBuilderInitialsImageUploadCallback, PdfBuilderInitialsImageUploadContext, PdfBuilderInitialsSelection, PdfBuilderInitialsType, PdfBuilderInitialsUpload, PdfBuilderPageRotation, PdfBuilderRecipient, PdfBuilderSchema, PdfBuilderSchemaPage, PdfBuilderSchemaPageKind, PdfBuilderScrollLayout, PdfBuilderSignatureAsset, PdfBuilderSignatureDraw, PdfBuilderSignatureImageUploadCallback, PdfBuilderSignatureImageUploadContext, PdfBuilderSignatureSelection, PdfBuilderSignatureType, PdfBuilderSignatureUpload, PdfBuilderSignatureUploadCallbackResult, PdfBuilderSigner, PdfBuilderSpreadMode, PdfBuilderStampAsset, PdfBuilderStampSelection, PdfBuilderStampUpload };
573
+ interface PdfBuilderSignatureDialogData {
574
+ readonly signatures: readonly PdfBuilderSignatureAsset[];
575
+ readonly title?: string;
576
+ readonly includeDraw?: boolean;
577
+ readonly typePlaceholder?: string;
578
+ readonly uploadMainText?: string;
579
+ readonly uploadDropText?: string;
580
+ readonly uploadInvalidText?: string;
581
+ readonly uploadAllowedTypesText?: string;
582
+ readonly savedTabLabel?: string;
583
+ readonly savedListLabel?: string;
584
+ readonly acceptLabel?: string;
585
+ }
586
+ type PdfBuilderSignatureDialogResult = {
587
+ readonly type: 'asset';
588
+ readonly signature: PdfBuilderSignatureAsset;
589
+ } | {
590
+ readonly type: 'draw';
591
+ readonly dataUrl: string;
592
+ } | {
593
+ readonly type: 'type';
594
+ readonly value: string;
595
+ readonly dataUrl: string;
596
+ readonly fontFamily: string;
597
+ readonly color: string;
598
+ } | {
599
+ readonly type: 'file';
600
+ readonly file: File;
601
+ };
602
+ declare class PdfBuilderSignatureDialog {
603
+ private readonly dialogRef;
604
+ protected readonly data: PdfBuilderSignatureDialogData;
605
+ protected readonly title: _angular_core.Signal<string>;
606
+ protected readonly includeDraw: _angular_core.Signal<boolean>;
607
+ protected readonly typePlaceholder: _angular_core.Signal<string>;
608
+ protected readonly uploadMainText: _angular_core.Signal<string>;
609
+ protected readonly uploadDropText: _angular_core.Signal<string>;
610
+ protected readonly uploadInvalidText: _angular_core.Signal<string>;
611
+ protected readonly uploadAllowedTypesText: _angular_core.Signal<string>;
612
+ protected readonly savedTabLabel: _angular_core.Signal<string>;
613
+ protected readonly savedListLabel: _angular_core.Signal<string>;
614
+ protected readonly acceptLabel: _angular_core.Signal<string>;
615
+ protected readonly selectedSignature: _angular_core.WritableSignal<PdfBuilderSignatureAsset | null>;
616
+ protected readonly drawnSignature: _angular_core.WritableSignal<string>;
617
+ protected readonly typedSignature: _angular_core.WritableSignal<TypedSignaturePadValue | null>;
618
+ protected readonly selectedFile: _angular_core.WritableSignal<File | null>;
619
+ protected readonly canApply: _angular_core.Signal<boolean>;
620
+ protected handleDrawnSignature(dataUrl: string): void;
621
+ protected handleTypedSignature(signature: TypedSignaturePadValue): void;
622
+ protected handleFileSelected(event: UploadFileSelectedEvent): void;
623
+ protected selectSignature(signature: PdfBuilderSignatureAsset): void;
624
+ protected getSignatureAssetImage(signature: PdfBuilderSignatureAsset): string;
625
+ protected apply(): void;
626
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<PdfBuilderSignatureDialog, never>;
627
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<PdfBuilderSignatureDialog, "ngs-pdf-builder-signature-dialog", never, {}, {}, never, never, true, never>;
628
+ }
629
+
630
+ interface PdfBuilderStampDialogData {
631
+ readonly stamps: readonly PdfBuilderStampAsset[];
632
+ }
633
+ type PdfBuilderStampDialogResult = {
634
+ readonly type: 'asset';
635
+ readonly stamp: PdfBuilderStampAsset;
636
+ } | {
637
+ readonly type: 'file';
638
+ readonly file: File;
639
+ };
640
+ declare class PdfBuilderStampDialog {
641
+ private readonly dialogRef;
642
+ protected readonly data: PdfBuilderStampDialogData;
643
+ protected readonly selectedStamp: _angular_core.WritableSignal<PdfBuilderStampAsset | null>;
644
+ protected readonly selectedFile: _angular_core.WritableSignal<File | null>;
645
+ protected readonly savedStamps: _angular_core.Signal<PdfBuilderStampAsset[]>;
646
+ protected readonly canApply: _angular_core.Signal<boolean>;
647
+ protected selectStamp(stamp: PdfBuilderStampAsset): void;
648
+ protected handleFileSelected(event: UploadFileSelectedEvent): void;
649
+ protected getStampAssetImage(stamp: PdfBuilderStampAsset): string;
650
+ protected apply(): void;
651
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<PdfBuilderStampDialog, never>;
652
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<PdfBuilderStampDialog, "ngs-pdf-builder-stamp-dialog", never, {}, {}, never, never, true, never>;
653
+ }
654
+
655
+ export { PDF_BUILDER_DEFAULT_FIELD_METRICS, PdfBuilder, PdfBuilderSignatureDialog, PdfBuilderStampDialog };
656
+ export type { PdfBuilderCanvasTool, PdfBuilderDrawnSignatureUploadCallback, PdfBuilderDrawnSignatureUploadContext, PdfBuilderField, PdfBuilderFieldMetrics, PdfBuilderFieldSigner, PdfBuilderFieldSlot, PdfBuilderFieldType, PdfBuilderInitialsAsset, PdfBuilderInitialsImageUploadCallback, PdfBuilderInitialsImageUploadContext, PdfBuilderInitialsSelection, PdfBuilderInitialsType, PdfBuilderInitialsUpload, PdfBuilderPageRotation, PdfBuilderRecipient, PdfBuilderSchema, PdfBuilderSchemaPage, PdfBuilderSchemaPageKind, PdfBuilderScrollLayout, PdfBuilderSignatureAsset, PdfBuilderSignatureDialogData, PdfBuilderSignatureDialogResult, PdfBuilderSignatureDraw, PdfBuilderSignatureImageUploadCallback, PdfBuilderSignatureImageUploadContext, PdfBuilderSignatureSelection, PdfBuilderSignatureType, PdfBuilderSignatureUpload, PdfBuilderSignatureUploadCallbackResult, PdfBuilderSigner, PdfBuilderSpreadMode, PdfBuilderStampAsset, PdfBuilderStampDialogData, PdfBuilderStampDialogResult, PdfBuilderStampSelection, PdfBuilderStampUpload };
@@ -0,0 +1,144 @@
1
+ import * as _ngstarter_ui_components_pdf_builder from '@ngstarter-ui/components/pdf-builder';
2
+ import { PdfBuilderSchema, PdfBuilderSigner, PdfBuilderStampAsset, PdfBuilderSignatureAsset, PdfBuilderDrawnSignatureUploadCallback, PdfBuilderSignatureImageUploadCallback, PdfBuilderInitialsImageUploadCallback, PdfBuilderField, PdfBuilderStampSelection, PdfBuilderStampUpload, PdfBuilderSignatureSelection, PdfBuilderSignatureUpload, PdfBuilderSignatureType, PdfBuilderInitialsSelection, PdfBuilderInitialsUpload, PdfBuilderSchemaPage } from '@ngstarter-ui/components/pdf-builder';
3
+ import * as _angular_core from '@angular/core';
4
+ import { Datepicker, DatepickerInput } from '@ngstarter-ui/components/datepicker';
5
+ import { PdfViewerSource, PdfViewerLoadedEvent } from '@ngstarter-ui/components/pdf-viewer';
6
+ import { ScrollbarArea } from '@ngstarter-ui/components/scrollbar-area';
7
+
8
+ interface PdfSignerPage {
9
+ readonly page: number;
10
+ readonly label: string;
11
+ readonly kind: 'source' | 'virtual';
12
+ readonly sourcePage: number | null;
13
+ }
14
+ interface PdfSignerPageSpread {
15
+ readonly id: string;
16
+ readonly leadingPlaceholder: boolean;
17
+ readonly pages: readonly PdfSignerPage[];
18
+ }
19
+ interface PdfSignerFieldValueChange {
20
+ readonly field: PdfBuilderField;
21
+ readonly previousValue: string;
22
+ readonly value: string;
23
+ readonly schema: PdfBuilderSchema;
24
+ }
25
+ declare class PdfSigner {
26
+ private readonly document;
27
+ private readonly dialog;
28
+ private readonly elementRef;
29
+ private readonly renderer;
30
+ private lastEmittedSchema;
31
+ readonly schema: _angular_core.InputSignal<PdfBuilderSchema | null>;
32
+ readonly signer: _angular_core.InputSignal<PdfBuilderSigner | null>;
33
+ readonly showPageList: _angular_core.InputSignalWithTransform<boolean, unknown>;
34
+ readonly showOtherSignerFields: _angular_core.InputSignal<boolean>;
35
+ readonly stamps: _angular_core.InputSignal<readonly PdfBuilderStampAsset[]>;
36
+ readonly uploadedSignatures: _angular_core.InputSignal<readonly PdfBuilderSignatureAsset[]>;
37
+ readonly uploadedInitials: _angular_core.InputSignal<readonly PdfBuilderSignatureAsset[]>;
38
+ readonly drawnSignatureUploadCallback: _angular_core.InputSignal<PdfBuilderDrawnSignatureUploadCallback | null | undefined>;
39
+ readonly signatureImageUploadCallback: _angular_core.InputSignal<PdfBuilderSignatureImageUploadCallback | null | undefined>;
40
+ readonly initialsImageUploadCallback: _angular_core.InputSignal<PdfBuilderInitialsImageUploadCallback | null | undefined>;
41
+ readonly schemaChange: _angular_core.OutputEmitterRef<PdfBuilderSchema>;
42
+ readonly fieldValueChange: _angular_core.OutputEmitterRef<PdfSignerFieldValueChange>;
43
+ readonly stampSelected: _angular_core.OutputEmitterRef<PdfBuilderStampSelection>;
44
+ readonly stampUploaded: _angular_core.OutputEmitterRef<PdfBuilderStampUpload>;
45
+ readonly signatureSelected: _angular_core.OutputEmitterRef<PdfBuilderSignatureSelection>;
46
+ readonly signatureUploaded: _angular_core.OutputEmitterRef<PdfBuilderSignatureUpload>;
47
+ readonly signatureDrawn: _angular_core.OutputEmitterRef<{
48
+ readonly field: PdfBuilderField;
49
+ readonly dataUrl: string;
50
+ }>;
51
+ readonly signatureTyped: _angular_core.OutputEmitterRef<PdfBuilderSignatureType>;
52
+ readonly initialsSelected: _angular_core.OutputEmitterRef<PdfBuilderInitialsSelection>;
53
+ readonly initialsUploaded: _angular_core.OutputEmitterRef<PdfBuilderInitialsUpload>;
54
+ readonly initialsTyped: _angular_core.OutputEmitterRef<PdfBuilderSignatureType>;
55
+ protected readonly dateFieldPicker: _angular_core.Signal<Datepicker<Date> | undefined>;
56
+ protected readonly dateFieldInput: _angular_core.Signal<DatepickerInput<Date> | undefined>;
57
+ protected readonly viewerScrollbar: _angular_core.Signal<ScrollbarArea | undefined>;
58
+ protected readonly wasmUrl = "/assets/embedpdf/pdfium.wasm";
59
+ protected readonly pdfScale: _angular_core.WritableSignal<number>;
60
+ protected readonly textFieldPlaceholder = "Enter value";
61
+ protected readonly documentPages: _angular_core.WritableSignal<readonly PdfBuilderSchemaPage[]>;
62
+ protected readonly fields: _angular_core.WritableSignal<readonly PdfBuilderField[]>;
63
+ protected readonly activePage: _angular_core.WritableSignal<number>;
64
+ protected readonly documentName: _angular_core.Signal<string>;
65
+ protected readonly documentSource: _angular_core.Signal<PdfViewerSource>;
66
+ protected readonly pageCount: _angular_core.Signal<number>;
67
+ protected readonly spreadMode: _angular_core.Signal<_ngstarter_ui_components_pdf_builder.PdfBuilderSpreadMode>;
68
+ protected readonly scrollLayout: _angular_core.Signal<_ngstarter_ui_components_pdf_builder.PdfBuilderScrollLayout>;
69
+ protected readonly pageRotation: _angular_core.Signal<_ngstarter_ui_components_pdf_builder.PdfBuilderPageRotation>;
70
+ protected readonly canGoPrevious: _angular_core.Signal<boolean>;
71
+ protected readonly canGoNext: _angular_core.Signal<boolean>;
72
+ protected readonly currentSignerFieldCount: _angular_core.Signal<number>;
73
+ protected readonly completedCurrentSignerFieldCount: _angular_core.Signal<number>;
74
+ protected readonly nextIncompleteField: _angular_core.Signal<PdfBuilderField>;
75
+ protected readonly pages: _angular_core.Signal<readonly PdfSignerPage[]>;
76
+ protected readonly pageSpreads: _angular_core.Signal<readonly PdfSignerPageSpread[]>;
77
+ constructor();
78
+ protected pageFields(pageNumber: number): readonly PdfBuilderField[];
79
+ protected isFieldEditable(field: PdfBuilderField): boolean;
80
+ protected isFieldInteractive(field: PdfBuilderField): boolean;
81
+ protected isButtonActionField(field: PdfBuilderField): boolean;
82
+ protected isFieldFilled(field: PdfBuilderField): boolean;
83
+ protected isCheckboxChecked(field: PdfBuilderField): boolean;
84
+ protected getFieldDisplayValue(field: PdfBuilderField): string;
85
+ protected getFieldTooltip(field: PdfBuilderField): string;
86
+ protected isImageValue(value: string): boolean;
87
+ protected executeFieldAction(field: PdfBuilderField, event?: Event): void;
88
+ protected updateTextFieldValueFromEditor(fieldId: string, editor: HTMLElement): void;
89
+ protected selectPage(pageNumber: number): void;
90
+ protected previousPage(): void;
91
+ protected nextPage(): void;
92
+ protected goToField(field: PdfBuilderField, event?: Event): void;
93
+ protected isSourcePdfPage(pageNumber: number): boolean;
94
+ protected getSourcePageNumber(pageNumber: number): number;
95
+ protected onPdfLoaded(event: PdfViewerLoadedEvent): void;
96
+ private restoreSchema;
97
+ private getSchemaPages;
98
+ private createSourcePages;
99
+ private createVirtualPage;
100
+ private groupPagesIntoSpreads;
101
+ private isOwnedByCurrentSigner;
102
+ private updateFieldValue;
103
+ private updateField;
104
+ private emitFieldChange;
105
+ private focusTextFieldEditor;
106
+ private syncTextFieldEditors;
107
+ private openDateFieldPicker;
108
+ private applyDateFieldValue;
109
+ private parseDateFieldValue;
110
+ private openStampDialog;
111
+ private applyStampDialogResult;
112
+ private readImageFileAsDataUrl;
113
+ private openSignatureDialog;
114
+ private openInitialsDialog;
115
+ private applySignatureDialogResult;
116
+ private applyInitialsDialogResult;
117
+ private resolveSignatureUploadResult;
118
+ private resolveInitialsUploadResult;
119
+ private getSignatureResultLabel;
120
+ private getSignatureResultValue;
121
+ private getDialogResultLabel;
122
+ private getDialogResultValue;
123
+ private syncPageGeometry;
124
+ private syncOverlayGeometry;
125
+ private getRenderedPageScale;
126
+ private getPageShellElement;
127
+ private getPageShellElements;
128
+ private getOverlayFieldElements;
129
+ private getOverlayFieldElement;
130
+ private scrollFieldIntoViewport;
131
+ private scrollElementIntoView;
132
+ private getElementClientRect;
133
+ private getDatePickerAnchorElement;
134
+ private getTextFieldEditorElement;
135
+ private placeContentEditableCaretAtEnd;
136
+ private scheduleDomSync;
137
+ private setCssVar;
138
+ private clamp;
139
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<PdfSigner, never>;
140
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<PdfSigner, "ngs-pdf-signer", ["ngsPdfSigner"], { "schema": { "alias": "schema"; "required": false; "isSignal": true; }; "signer": { "alias": "signer"; "required": false; "isSignal": true; }; "showPageList": { "alias": "showPageList"; "required": false; "isSignal": true; }; "showOtherSignerFields": { "alias": "showOtherSignerFields"; "required": false; "isSignal": true; }; "stamps": { "alias": "stamps"; "required": false; "isSignal": true; }; "uploadedSignatures": { "alias": "uploadedSignatures"; "required": false; "isSignal": true; }; "uploadedInitials": { "alias": "uploadedInitials"; "required": false; "isSignal": true; }; "drawnSignatureUploadCallback": { "alias": "drawnSignatureUploadCallback"; "required": false; "isSignal": true; }; "signatureImageUploadCallback": { "alias": "signatureImageUploadCallback"; "required": false; "isSignal": true; }; "initialsImageUploadCallback": { "alias": "initialsImageUploadCallback"; "required": false; "isSignal": true; }; }, { "schemaChange": "schemaChange"; "fieldValueChange": "fieldValueChange"; "stampSelected": "stampSelected"; "stampUploaded": "stampUploaded"; "signatureSelected": "signatureSelected"; "signatureUploaded": "signatureUploaded"; "signatureDrawn": "signatureDrawn"; "signatureTyped": "signatureTyped"; "initialsSelected": "initialsSelected"; "initialsUploaded": "initialsUploaded"; "initialsTyped": "initialsTyped"; }, never, never, true, never>;
141
+ }
142
+
143
+ export { PdfSigner };
144
+ export type { PdfSignerFieldValueChange };