libey-ng-component-library 0.0.18 → 0.0.20

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.
@@ -2,7 +2,18 @@ import * as i0 from '@angular/core';
2
2
  import { Injectable, Component, TemplateRef, Directive, Input, ContentChild, EventEmitter, ViewEncapsulation, Output, ContentChildren, ViewChild, NgModule } from '@angular/core';
3
3
  import * as i1 from '@angular/common';
4
4
  import { CommonModule, DatePipe } from '@angular/common';
5
- import { FormsModule } from '@angular/forms';
5
+ import * as i4 from '@angular/forms';
6
+ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
7
+ import { Subject } from 'rxjs';
8
+ import * as i1$1 from 'angular2-signaturepad';
9
+ import { SignaturePad, SignaturePadModule } from 'angular2-signaturepad';
10
+ export { SignaturePad, SignaturePadModule } from 'angular2-signaturepad';
11
+ import * as i2 from '@ng-select/ng-select';
12
+ import { NgSelectModule } from '@ng-select/ng-select';
13
+ export { NgSelectModule } from '@ng-select/ng-select';
14
+ import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
15
+ export { NgbModule } from '@ng-bootstrap/ng-bootstrap';
16
+ export * from '@popperjs/core';
6
17
 
7
18
  class LibeyNgComponentLibraryService {
8
19
  constructor() { }
@@ -334,17 +345,1700 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
334
345
  }]
335
346
  }] });
336
347
 
348
+ // SigWebTablet.ts
349
+ class SigWebTablet {
350
+ static revokeBlobURL(url) {
351
+ if (window.URL) {
352
+ URL.revokeObjectURL(url);
353
+ }
354
+ else if (window.webkitURL) {
355
+ webkitURL.revokeObjectURL(url);
356
+ }
357
+ }
358
+ static getBlobURL(blob) {
359
+ if (window.URL) {
360
+ return URL.createObjectURL(blob);
361
+ }
362
+ else if (window.webkitURL) {
363
+ return webkitURL.createObjectURL(blob);
364
+ }
365
+ return ''; // Retornar un string vacío en caso de error
366
+ }
367
+ static makeUri() {
368
+ var prot = location.protocol;
369
+ if (prot == 'file:') {
370
+ prot = 'http:';
371
+ }
372
+ if (this.isIE()) {
373
+ if (prot == 'https:') {
374
+ return prot + '//tablet.sigwebtablet.com:47290/SigWeb/';
375
+ }
376
+ else {
377
+ return prot + '//tablet.sigwebtablet.com:47289/SigWeb/';
378
+ }
379
+ }
380
+ if (this.isChrome()) {
381
+ if (prot == 'https:') {
382
+ return prot + '//tablet.sigwebtablet.com:47290/SigWeb/';
383
+ }
384
+ else {
385
+ return prot + '//tablet.sigwebtablet.com:47289/SigWeb/';
386
+ }
387
+ }
388
+ else {
389
+ //FIREFOX
390
+ if (prot == 'https:') {
391
+ return prot + '//tablet.sigwebtablet.com:47290/SigWeb/';
392
+ }
393
+ else {
394
+ return prot + '//tablet.sigwebtablet.com:47289/SigWeb/';
395
+ }
396
+ }
397
+ }
398
+ static generateUUID() {
399
+ return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
400
+ const r = (Math.random() * 16) | 0;
401
+ const v = c === 'x' ? r : (r & 0x3) | 0x8;
402
+ return v.toString(16);
403
+ });
404
+ }
405
+ static isSigWebInstalled() {
406
+ const xhr = new XMLHttpRequest();
407
+ try {
408
+ xhr.open('GET', `${this.baseUri}TabletState?noCache=${this.generateUUID()}`, false);
409
+ xhr.send();
410
+ return xhr.status !== 404 && xhr.status !== 0;
411
+ }
412
+ catch (e) {
413
+ console.log('Error checking SigWeb installation', e);
414
+ return false;
415
+ }
416
+ }
417
+ static isIE() {
418
+ return (navigator.appName === 'Microsoft Internet Explorer' ||
419
+ (navigator.appName === 'Netscape' &&
420
+ new RegExp('Trident/.*rv:([0-9]{1,}[.0-9]{0,})').exec(navigator.userAgent) != null));
421
+ }
422
+ static isChrome() {
423
+ return navigator.userAgent.lastIndexOf('Chrome/') > 0;
424
+ }
425
+ static SigWebcreateXHR() {
426
+ const xhr = new XMLHttpRequest();
427
+ if (!xhr) {
428
+ throw new Error('No se pudo crear XMLHttpRequest');
429
+ }
430
+ return xhr;
431
+ }
432
+ static SigWebSetProperty(prop) {
433
+ const xhr = this.SigWebcreateXHR();
434
+ if (xhr) {
435
+ xhr.open('POST', this.baseUri + prop, true);
436
+ xhr.send(null);
437
+ if (xhr.readyState === 4 && xhr.status === 200) {
438
+ return xhr.responseText;
439
+ }
440
+ }
441
+ return '';
442
+ }
443
+ static SigWebSetPropertySync(prop) {
444
+ const xhr = this.SigWebcreateXHR();
445
+ if (xhr) {
446
+ xhr.open('POST', this.baseUri + prop, false);
447
+ xhr.send();
448
+ if (xhr.readyState === 4 && xhr.status === 200) {
449
+ return xhr.responseText;
450
+ }
451
+ }
452
+ return '';
453
+ }
454
+ static SigWebSetStreamProperty(prop, strm) {
455
+ const xhr = this.SigWebcreateXHR();
456
+ if (xhr) {
457
+ xhr.open('POST', this.baseUri + prop);
458
+ xhr.setRequestHeader('Content-Type', 'text/plain');
459
+ xhr.send(strm);
460
+ }
461
+ return '';
462
+ }
463
+ static SigWebSyncSetStreamProperty(prop, strm) {
464
+ const xhr = this.SigWebcreateXHR();
465
+ if (xhr) {
466
+ xhr.open('POST', this.baseUri + prop, false);
467
+ xhr.setRequestHeader('Content-Type', 'text/plain');
468
+ xhr.send(strm);
469
+ if (xhr.readyState === 4 && xhr.status === 200) {
470
+ return xhr.responseText;
471
+ }
472
+ }
473
+ return '';
474
+ }
475
+ static SigWebSetImageStreamProperty(prop, strm) {
476
+ const xhr = this.SigWebcreateXHR();
477
+ if (xhr) {
478
+ xhr.open('POST', this.baseUri + prop, false);
479
+ xhr.setRequestHeader('Content-Type', 'image/png');
480
+ xhr.send(strm);
481
+ if (xhr.readyState === 4 && xhr.status === 200) {
482
+ return xhr.responseText;
483
+ }
484
+ }
485
+ return '';
486
+ }
487
+ static SigWebSetImageBlobProperty(prop, strm) {
488
+ var xhr = this.SigWebcreateXHR();
489
+ if (xhr) {
490
+ xhr.open('POST', this.baseUri + prop, false);
491
+ xhr.setRequestHeader('Content-Type', 'blob');
492
+ xhr.send(strm);
493
+ if (xhr.readyState == 4 && xhr.status == 200) {
494
+ return xhr.responseText;
495
+ }
496
+ }
497
+ return '';
498
+ }
499
+ static SigWebGetVersion(prop) {
500
+ try {
501
+ var xhr = this.SigWebcreateXHR();
502
+ if (xhr) {
503
+ xhr.open('GET', this.baseUri + prop + '?noCache=' + this.generateUUID(), false);
504
+ xhr.send(null);
505
+ if (xhr.readyState == 4 && xhr.status == 200) {
506
+ return xhr.responseText;
507
+ }
508
+ }
509
+ }
510
+ catch (error) {
511
+ console.error('Error en SigWebGetVersion:', error);
512
+ return null;
513
+ }
514
+ return null;
515
+ }
516
+ static SigWebGetProperty(prop) {
517
+ var xhr = this.SigWebcreateXHR();
518
+ if (xhr) {
519
+ xhr.open('GET', this.baseUri + prop + '?noCache=' + this.generateUUID(), false);
520
+ xhr.send(null);
521
+ if (xhr.readyState == 4 && xhr.status == 200) {
522
+ return xhr.responseText;
523
+ }
524
+ }
525
+ return '';
526
+ }
527
+ static GetSigImageB64(callback) {
528
+ var cvs = document.createElement('canvas');
529
+ var width = this.GetImageXSize();
530
+ var height = this.GetImageYSize();
531
+ cvs.width = width == '' || width == null ? 0 : Number(width);
532
+ cvs.height = height == '' || height == null ? 0 : Number(height);
533
+ var xhr2 = new XMLHttpRequest();
534
+ xhr2.open('GET', this.baseUri + 'SigImage/1' + '?noCache=' + this.generateUUID(), true);
535
+ xhr2.responseType = 'blob';
536
+ xhr2.send(null);
537
+ xhr2.onload = () => {
538
+ var cntx = cvs.getContext('2d');
539
+ var img = new Image();
540
+ img.src = this.getBlobURL(xhr2.response);
541
+ img.onload = () => {
542
+ cntx.drawImage(img, 0, 0);
543
+ var b64String = cvs.toDataURL('image/png');
544
+ var loc = b64String.search('base64,');
545
+ var retstring = b64String.slice(loc + 7, b64String.length);
546
+ if (callback) {
547
+ callback(retstring);
548
+ }
549
+ };
550
+ };
551
+ }
552
+ static SigWebWaitForPenDown(callback) {
553
+ var xhr = this.SigWebcreateXHR();
554
+ if (xhr) {
555
+ xhr.open('GET', this.baseUri + 'WaitForPenDown' + '?noCache=' + this.generateUUID());
556
+ xhr.timeout = 10000;
557
+ xhr.onreadystatechange = () => {
558
+ if (xhr.readyState != 4)
559
+ return;
560
+ if (xhr.status == 200)
561
+ callback();
562
+ };
563
+ xhr.send(null);
564
+ }
565
+ }
566
+ static GetSigImage(ctx) {
567
+ var xhr2 = new XMLHttpRequest();
568
+ xhr2.open('GET', this.baseUri + 'SigImage/1' + '?noCache=' + this.generateUUID(), true);
569
+ xhr2.responseType = 'blob';
570
+ xhr2.send(null);
571
+ xhr2.onload = () => {
572
+ var img = new Image();
573
+ img.src = this.getBlobURL(xhr2.response);
574
+ img.onload = () => {
575
+ ctx.drawImage(img, 0, 0);
576
+ this.revokeBlobURL(img.src);
577
+ img = null;
578
+ };
579
+ };
580
+ }
581
+ static SigWebSetDisplayTarget(obj) {
582
+ this.ctx = obj;
583
+ }
584
+ static SigWebRefresh() {
585
+ var NumPoints = Number(this.NumberOfTabletPoints());
586
+ if (NumPoints == this.NumPointsLastTime) {
587
+ return;
588
+ }
589
+ this.NumPointsLastTime = NumPoints;
590
+ var xhr2 = new XMLHttpRequest();
591
+ xhr2.open('GET', this.baseUri + 'SigImage/0' + '?noCache=' + this.generateUUID(), true);
592
+ xhr2.responseType = 'blob';
593
+ xhr2.onload = () => {
594
+ var img = new Image();
595
+ img.src = this.getBlobURL(xhr2.response);
596
+ // img.src = window.URL.createObjectURL(xhr2.response);
597
+ img.onload = () => {
598
+ this.ctx.drawImage(img, 0, 0);
599
+ this.revokeBlobURL(img.src);
600
+ img = null;
601
+ };
602
+ };
603
+ xhr2.send(null);
604
+ }
605
+ static SigWebEvent() {
606
+ var OldEvStatus = this.EvStatus;
607
+ var xhr = this.SigWebcreateXHR();
608
+ if (xhr) {
609
+ xhr.open('GET', this.baseUri + 'EventStatus' + '?noCache=' + this.generateUUID(), true);
610
+ xhr.onload = () => {
611
+ this.EvStatus = xhr.responseText;
612
+ if (OldEvStatus & 0x01 && this.EvStatus & 0x02) {
613
+ if (this.onSigPenDown) {
614
+ this.onSigPenDown();
615
+ }
616
+ }
617
+ if (OldEvStatus & 0x02 && this.EvStatus & 0x01) {
618
+ if (this.onSigPenUp) {
619
+ this.onSigPenUp();
620
+ }
621
+ }
622
+ };
623
+ xhr.send(null);
624
+ }
625
+ }
626
+ static setSigWebFontThreshold(v) {
627
+ this.SigWebFontThreshold = v;
628
+ }
629
+ static createLcdBitmapFromCanvas(ourCanvas, xp, yp, width, height) {
630
+ var canvasCtx = ourCanvas.getContext('2d');
631
+ var imgData = canvasCtx.getImageData(0, 0, width, height);
632
+ var j = 0;
633
+ var sVal = 0;
634
+ var outData = '';
635
+ var outIdx = 0;
636
+ var data = imgData.data;
637
+ for (var y = 0; y < height; y++)
638
+ for (var x = 0; x < width; x++) {
639
+ var tmp1 = data[j];
640
+ var tmp2 = data[j + 1];
641
+ var tmp3 = data[j + 2];
642
+ var tmp4 = data[j + 3];
643
+ // sVal = tmp1 + (tmp2 << 8 ) + ( tmp3 << 16 ) + (tmp4 << 24 );
644
+ j = j + 4;
645
+ if (tmp1 < this.SigWebFontThreshold) {
646
+ outData += 'B';
647
+ }
648
+ else {
649
+ outData += 'W';
650
+ }
651
+ }
652
+ return outData;
653
+ }
654
+ static toHex(NibVal) {
655
+ switch (NibVal) {
656
+ case 0:
657
+ return '0';
658
+ case 1:
659
+ return '1';
660
+ case 2:
661
+ return '2';
662
+ case 3:
663
+ return '3';
664
+ case 4:
665
+ return '4';
666
+ case 5:
667
+ return '5';
668
+ case 6:
669
+ return '6';
670
+ case 7:
671
+ return '7';
672
+ case 8:
673
+ return '8';
674
+ case 9:
675
+ return '9';
676
+ case 10:
677
+ return 'A';
678
+ case 11:
679
+ return 'B';
680
+ case 12:
681
+ return 'C';
682
+ case 13:
683
+ return 'D';
684
+ case 14:
685
+ return 'E';
686
+ case 15:
687
+ return 'F';
688
+ default:
689
+ return '';
690
+ }
691
+ }
692
+ static ToHexString(ByteVal) {
693
+ var Str = '';
694
+ Str += this.toHex((ByteVal >> 4) & 0x0f);
695
+ Str += this.toHex(ByteVal & 0x0f);
696
+ return Str;
697
+ }
698
+ static textToTablet(x, y, height, str, fnt) {
699
+ var c = document.createElement('canvas');
700
+ var cntx = c.getContext('2d');
701
+ cntx.font = fnt;
702
+ var txt = str;
703
+ var xs = Math.round(cntx.measureText(txt).width);
704
+ var ys = height;
705
+ c.width = xs;
706
+ c.height = ys;
707
+ cntx.font = fnt;
708
+ cntx.fillStyle = '#FFFFFF';
709
+ cntx.rect(0, 0, xs, ys);
710
+ cntx.fill();
711
+ cntx.fillStyle = '#000000';
712
+ cntx.textBaseline = 'top';
713
+ cntx.fillText(txt, 0, 0);
714
+ cntx.drawImage(cntx.canvas, 0, 0, xs, ys);
715
+ var Gstr = this.createLcdBitmapFromCanvas(c, 0, 0, xs, ys);
716
+ this.LcdWriteImageStream(0, 2, x, y, xs, ys, Gstr);
717
+ }
718
+ static LcdWriteImage(Dst, Mode, Xp, Yp, Url) {
719
+ var Prop = 'LcdWriteImage/';
720
+ var NewUrl = Url.replace(/\//g, '_');
721
+ Prop = Prop + Dst + ',' + Mode + ',' + Xp + ',' + Yp + ',' + NewUrl;
722
+ this.SigWebSetPropertySync(Prop);
723
+ }
724
+ static LcdWriteLocalImage(Dst, Mode, Xp, Yp, Url) {
725
+ var Prop = 'LcdWriteImage/';
726
+ Prop = Prop + Dst + ',' + Mode + ',' + Xp + ',' + Yp + ',' + Url;
727
+ this.SigWebSetProperty(Prop);
728
+ }
729
+ static LcdWriteImageStream(Dst, Mode, Xp, Yp, Xs, Ys, Url) {
730
+ var Prop1 = 'LcdWriteImageStreamParams/' +
731
+ Dst +
732
+ ',' +
733
+ Mode +
734
+ ',' +
735
+ Xp +
736
+ ',' +
737
+ Yp +
738
+ ',' +
739
+ Xs +
740
+ ',' +
741
+ Ys;
742
+ var Prop2 = 'LcdWriteImageStream/';
743
+ this.SigWebSetPropertySync(Prop1);
744
+ this.SigWebSetImageStreamProperty(Prop2, Url);
745
+ }
746
+ static LcdWriteImageBlob(Dst, Mode, Xp, Yp, Xs, Ys, Url) {
747
+ var Prop = 'LcdWriteImageStream/';
748
+ Prop = Prop + Dst + ',' + Mode + ',' + Xp + ',' + Yp + ',' + Xs + ',' + Ys;
749
+ this.SigWebSetImageBlobProperty(Prop, Url);
750
+ }
751
+ static measureText(pText, pFontSize, pStyle) {
752
+ var lDiv = document.createElement('lDiv');
753
+ document.body.appendChild(lDiv);
754
+ if (pStyle != null) {
755
+ lDiv.setAttribute('style', pStyle);
756
+ }
757
+ lDiv.style.fontSize = '' + pFontSize + 'px';
758
+ lDiv.style.position = 'absolute';
759
+ lDiv.style.left = '-1000';
760
+ lDiv.style.top = '-1000';
761
+ lDiv.innerHTML = pText;
762
+ var lResult = {
763
+ width: lDiv.clientWidth,
764
+ height: lDiv.clientHeight,
765
+ };
766
+ document.body.removeChild(lDiv);
767
+ lDiv = null;
768
+ return lResult;
769
+ }
770
+ static GetVersionString() {
771
+ var Prop = 'Version';
772
+ Prop = Prop;
773
+ var Str = this.SigWebGetVersion(Prop);
774
+ if (Str == null)
775
+ return Str;
776
+ var trimStr = Str.slice(1, Str.length - 2);
777
+ return trimStr;
778
+ }
779
+ static IsPenDown() {
780
+ return this.EvStatus & 0x01;
781
+ }
782
+ //
783
+ // SigPlusNETSig.cs
784
+ //
785
+ static ClearTablet() {
786
+ var Prop = 'ClearSignature';
787
+ Prop = Prop;
788
+ return this.SigWebGetProperty(Prop);
789
+ }
790
+ static NumberOfTabletPoints() {
791
+ var Prop = 'TotalPoints';
792
+ Prop = Prop;
793
+ return this.SigWebGetProperty(Prop);
794
+ }
795
+ static SetSigString(sigStr, ctx) {
796
+ var Prop = 'SigString';
797
+ Prop = Prop;
798
+ var xhr = this.SigWebcreateXHR();
799
+ if (xhr) {
800
+ xhr.open('POST', this.baseUri + Prop);
801
+ xhr.setRequestHeader('Content-Type', 'text/plain');
802
+ xhr.send(sigStr);
803
+ xhr.onload = () => {
804
+ if (ctx) {
805
+ var can = ctx.canvas;
806
+ this.SetImageXSize(can.width);
807
+ this.SetImageYSize(can.height);
808
+ this.GetSigImage(ctx);
809
+ }
810
+ };
811
+ }
812
+ return '';
813
+ }
814
+ static GetSigString() {
815
+ var Prop = 'SigString';
816
+ Prop = Prop;
817
+ var Str = this.SigWebGetProperty(Prop);
818
+ return Str.slice(1, Str.length - 1);
819
+ }
820
+ static SetSigCompressionMode(v) {
821
+ var Prop = 'CompressionMode/';
822
+ Prop = Prop + v;
823
+ this.SigWebSetPropertySync(Prop);
824
+ }
825
+ static GetSigCompressionMode() {
826
+ var Prop = 'CompressionMode';
827
+ Prop = Prop;
828
+ return this.SigWebGetProperty(Prop);
829
+ }
830
+ static SetEncryptionMode(v) {
831
+ var Prop = 'EncryptionMode/';
832
+ Prop = Prop + v;
833
+ this.SigWebSetPropertySync(Prop);
834
+ }
835
+ static GetEncryptionMode() {
836
+ var Prop = 'EncryptionMode';
837
+ Prop = Prop;
838
+ return this.SigWebGetProperty(Prop);
839
+ }
840
+ static SetKeyString(keyString) {
841
+ var Prop = 'KeyString';
842
+ Prop = Prop;
843
+ this.SigWebSetStreamProperty(Prop, keyString);
844
+ }
845
+ static GetKeyString() {
846
+ var Prop = 'KeyString';
847
+ Prop = Prop;
848
+ var Str = this.SigWebGetProperty(Prop);
849
+ return Str.slice(1, Str.length - 1);
850
+ }
851
+ static AutoKeyStart() {
852
+ var Prop = 'AutoKeyStart';
853
+ Prop = Prop;
854
+ this.SigWebSetPropertySync(Prop);
855
+ }
856
+ static AutoKeyFinish() {
857
+ var Prop = 'AutoKeyFinish';
858
+ Prop = Prop;
859
+ this.SigWebSetPropertySync(Prop);
860
+ }
861
+ static SetAutoKeyData(keyData) {
862
+ var Prop = 'SetAutoKeyData';
863
+ Prop = Prop;
864
+ this.SigWebSetStreamProperty(Prop, keyData);
865
+ }
866
+ static AutoKeyAddData(keyData) {
867
+ var Prop = 'AutoKeyAddData';
868
+ Prop = Prop;
869
+ this.SigWebSetStreamProperty(Prop, keyData);
870
+ return this.GetKeyString();
871
+ }
872
+ // function GetKeyReceipt( ) {}
873
+ static GetKeyReceiptAscii() {
874
+ var Prop = 'KeyReceiptAscii';
875
+ Prop = Prop;
876
+ var Str = this.SigWebGetProperty(Prop);
877
+ return Str.slice(1, Str.length - 1);
878
+ }
879
+ // function GetSigReceipt( ) {}
880
+ static GetSigReceiptAscii() {
881
+ var Prop = 'SigReceiptAscii';
882
+ Prop = Prop;
883
+ var Str = this.SigWebGetProperty(Prop);
884
+ return Str.slice(1, Str.length - 1);
885
+ }
886
+ static SetTimeStamp(timeStamp) {
887
+ var Prop = 'TimeStamp';
888
+ Prop = Prop;
889
+ this.SigWebSetStreamProperty(Prop, timeStamp);
890
+ }
891
+ static GetTimeStamp() {
892
+ var Prop = 'TimeStamp';
893
+ Prop = Prop;
894
+ var Str = this.SigWebGetProperty(Prop);
895
+ return Str.slice(1, Str.length - 1);
896
+ }
897
+ static SetAnnotate(annotate) {
898
+ var Prop = 'Annotate';
899
+ Prop = Prop;
900
+ this.SigWebSetStreamProperty(Prop, annotate);
901
+ }
902
+ static GetAnnotate() {
903
+ var Prop = 'Annotate';
904
+ Prop = Prop;
905
+ var Str = this.SigWebGetProperty(Prop);
906
+ return Str.slice(1, Str.length - 1);
907
+ }
908
+ static SetSaveSigInfo(v) {
909
+ var Prop = 'SaveSigInfo/';
910
+ Prop = Prop + v;
911
+ this.SigWebSetPropertySync(Prop);
912
+ }
913
+ static GetSaveSigInfo() {
914
+ var Prop = 'SaveSigInfo';
915
+ Prop = Prop;
916
+ return this.SigWebGetProperty(Prop);
917
+ }
918
+ static SetSavePressureData(v) {
919
+ var Prop = 'SavePressureData/';
920
+ Prop = Prop + v;
921
+ this.SigWebSetPropertySync(Prop);
922
+ }
923
+ static GetSavePressureData() {
924
+ var Prop = 'SavePressureData';
925
+ Prop = Prop;
926
+ return this.SigWebGetProperty(Prop);
927
+ }
928
+ static SetSaveTimeData(v) {
929
+ var Prop = 'SaveTimeData/';
930
+ Prop = Prop + v;
931
+ this.SigWebSetPropertySync(Prop);
932
+ }
933
+ static GetSaveTimeData() {
934
+ var Prop = 'SaveTimeData';
935
+ Prop = Prop;
936
+ return this.SigWebGetProperty(Prop);
937
+ }
938
+ static SetAntiAliasSpotSize(v) {
939
+ var Prop = 'AntiAliasSpotSize/';
940
+ Prop = Prop + v;
941
+ this.SigWebSetPropertySync(Prop);
942
+ }
943
+ static GetAntiAliasSpotSize() {
944
+ var Prop = 'AntiAliasSpotSize';
945
+ Prop = Prop;
946
+ return this.SigWebGetProperty(Prop);
947
+ }
948
+ static SetAntiAliasLineScale(v) {
949
+ var Prop = 'AntiAliasLineScale/';
950
+ Prop = Prop + v;
951
+ this.SigWebSetPropertySync(Prop);
952
+ }
953
+ static GetAntiAliasLineScale() {
954
+ var Prop = 'AntiAliasLineScale';
955
+ Prop = Prop;
956
+ return this.SigWebGetProperty(Prop);
957
+ }
958
+ static GetNumberOfStrokes() {
959
+ var Prop = 'NumberOfStrokes';
960
+ Prop = Prop;
961
+ return this.SigWebGetProperty(Prop);
962
+ }
963
+ static GetNumPointsForStroke(v) {
964
+ var Prop = 'NumberOfPointsInStroke/';
965
+ Prop = Prop + v;
966
+ return this.SigWebGetProperty(Prop);
967
+ }
968
+ static GetPointXValue(v1, v2) {
969
+ var Prop = 'PointXValue/';
970
+ Prop = Prop + v1 + '/' + v2;
971
+ return this.SigWebGetProperty(Prop);
972
+ }
973
+ static GetPointYValue(v1, v2) {
974
+ var Prop = 'PointYValue/';
975
+ Prop = Prop + v1 + '/' + v2;
976
+ return this.SigWebGetProperty(Prop);
977
+ }
978
+ static SetAntiAliasEnable(v) {
979
+ var Prop = 'AntiAliasEnable/';
980
+ Prop = Prop + v;
981
+ this.SigWebSetPropertySync(Prop);
982
+ }
983
+ static GetAntiAliasEnable() {
984
+ var Prop = 'AntiAliasEnable';
985
+ Prop = Prop;
986
+ return this.SigWebGetProperty(Prop);
987
+ }
988
+ static SetUseAmbientColors(v) {
989
+ var Prop = 'UseAmbientColors/';
990
+ Prop = Prop + v;
991
+ this.SigWebSetPropertySync(Prop);
992
+ }
993
+ //
994
+ // SigPlusNETDisplay.cs
995
+ //
996
+ static SetDisplayXSize(v) {
997
+ var Prop = 'DisplayXSize/';
998
+ Prop = Prop + v;
999
+ this.SigWebSetPropertySync(Prop);
1000
+ }
1001
+ static GetDisplayXSize() {
1002
+ var Prop = 'DisplayXSize';
1003
+ Prop = Prop;
1004
+ return this.SigWebGetProperty(Prop);
1005
+ }
1006
+ static SetDisplayYSize(v) {
1007
+ var Prop = 'DisplayYSize/';
1008
+ Prop = Prop + v;
1009
+ this.SigWebSetPropertySync(Prop);
1010
+ }
1011
+ static GetDisplayYSize() {
1012
+ var Prop = 'DisplayYSize';
1013
+ Prop = Prop;
1014
+ return this.SigWebGetProperty(Prop);
1015
+ }
1016
+ static SetDisplayPenWidth(v) {
1017
+ var Prop = 'DisplayPenWidth/';
1018
+ Prop = Prop + v;
1019
+ this.SigWebSetPropertySync(Prop);
1020
+ }
1021
+ static GetDisplayPenWidth() {
1022
+ var Prop = 'DisplayPenWidth';
1023
+ Prop = Prop;
1024
+ return this.SigWebGetProperty(Prop);
1025
+ }
1026
+ static SetDisplayTimeStamp(v) {
1027
+ var Prop = 'DisplayTimeStamp/';
1028
+ Prop = Prop + v;
1029
+ this.SigWebSetPropertySync(Prop);
1030
+ }
1031
+ static GetDisplayTimeStamp() {
1032
+ var Prop = 'DisplayTimeStamp';
1033
+ Prop = Prop;
1034
+ return this.SigWebGetProperty(Prop);
1035
+ }
1036
+ static SetDisplayTimeStampPosX(v) {
1037
+ var Prop = 'DisplayTimeStampPosX/';
1038
+ Prop = Prop + v;
1039
+ this.SigWebSetPropertySync(Prop);
1040
+ }
1041
+ static GetDisplayTimeStampPosX() {
1042
+ var Prop = 'DisplayTimeStampPosX';
1043
+ Prop = Prop;
1044
+ return this.SigWebGetProperty(Prop);
1045
+ }
1046
+ static SetDisplayTimeStampPosY(v) {
1047
+ var Prop = 'DisplayTimeStampPosY/';
1048
+ Prop = Prop + v;
1049
+ this.SigWebSetPropertySync(Prop);
1050
+ }
1051
+ static GetDisplayTimeStampPosY() {
1052
+ var Prop = 'DisplayTimeStampPosY';
1053
+ Prop = Prop;
1054
+ return this.SigWebGetProperty(Prop);
1055
+ }
1056
+ static SetDisplayTimeStampSize(v) {
1057
+ var Prop = 'DisplayTimeStampSize/';
1058
+ Prop = Prop + v;
1059
+ this.SigWebSetPropertySync(Prop);
1060
+ }
1061
+ static GetDisplayTimeStampSize() {
1062
+ var Prop = 'DisplayTimeStampSize';
1063
+ Prop = Prop;
1064
+ return this.SigWebGetProperty(Prop);
1065
+ }
1066
+ static SetDisplayAnnotate(v) {
1067
+ var Prop = 'DisplayAnnotate/';
1068
+ Prop = Prop + v;
1069
+ this.SigWebSetPropertySync(Prop);
1070
+ }
1071
+ static GetDisplayAnnotate() {
1072
+ var Prop = 'DisplayAnnotate';
1073
+ Prop = Prop;
1074
+ return this.SigWebGetProperty(Prop);
1075
+ }
1076
+ static SetDisplayAnnotatePosX(v) {
1077
+ var Prop = 'DisplayAnnotatePosX/';
1078
+ Prop = Prop + v;
1079
+ this.SigWebSetPropertySync(Prop);
1080
+ }
1081
+ static GetDisplayAnnotatePosX() {
1082
+ var Prop = 'DisplayAnnotatePosX';
1083
+ Prop = Prop;
1084
+ return this.SigWebGetProperty(Prop);
1085
+ }
1086
+ static SetDisplayAnnotatePosY(v) {
1087
+ var Prop = 'DisplayAnnotatePosY/';
1088
+ Prop = Prop + v;
1089
+ this.SigWebSetPropertySync(Prop);
1090
+ }
1091
+ static GetDisplayAnnotatePosY() {
1092
+ var Prop = 'DisplayAnnotatePosY';
1093
+ Prop = Prop;
1094
+ return this.SigWebGetProperty(Prop);
1095
+ }
1096
+ static SetDisplayAnnotateSize(v) {
1097
+ var Prop = 'DisplayAnnotateSize/';
1098
+ Prop = Prop + v;
1099
+ this.SigWebSetPropertySync(Prop);
1100
+ }
1101
+ static GetDisplayAnnotateSize() {
1102
+ var Prop = 'DisplayAnnotateSize';
1103
+ Prop = Prop;
1104
+ return this.SigWebGetProperty(Prop);
1105
+ }
1106
+ //
1107
+ // SigPlusNETImage.cs
1108
+ //
1109
+ // function GetSigImageB64( )
1110
+ // {
1111
+ // var xhr2 = new XMLHttpRequest();
1112
+ // xhr2.open("GET", baseUri + "SigImage/1", false );
1113
+ // xhr2.responseType = "blob"
1114
+ // xhr2.send(null);
1115
+ // if (xhr2.readyState == 4 && xhr.status == 200)
1116
+ // {
1117
+ // return window.URL.createObjectURL(xhr2.response);
1118
+ // }
1119
+ // return null;
1120
+ // }
1121
+ static SetImageXSize(v) {
1122
+ var Prop = 'ImageXSize/';
1123
+ Prop = Prop + v;
1124
+ this.SigWebSetPropertySync(Prop);
1125
+ }
1126
+ static GetImageXSize() {
1127
+ var Prop = 'ImageXSize';
1128
+ Prop = Prop;
1129
+ return this.SigWebGetProperty(Prop);
1130
+ }
1131
+ static SetImageYSize(v) {
1132
+ var Prop = 'ImageYSize/';
1133
+ Prop = Prop + v;
1134
+ this.SigWebSetPropertySync(Prop);
1135
+ }
1136
+ static GetImageYSize() {
1137
+ var Prop = 'ImageYSize';
1138
+ Prop = Prop;
1139
+ return this.SigWebGetProperty(Prop);
1140
+ }
1141
+ static SetImagePenWidth(v) {
1142
+ var Prop = 'ImagePenWidth/';
1143
+ Prop = Prop + v;
1144
+ this.SigWebSetPropertySync(Prop);
1145
+ }
1146
+ static GetImagePenWidth() {
1147
+ var Prop = 'ImagePenWidth';
1148
+ Prop = Prop;
1149
+ return this.SigWebGetProperty(Prop);
1150
+ }
1151
+ static SetImageTimeStamp(v) {
1152
+ var Prop = 'ImageTimeStamp/';
1153
+ Prop = Prop + v;
1154
+ this.SigWebSetPropertySync(Prop);
1155
+ }
1156
+ static GetImageTimeStamp() {
1157
+ var Prop = 'ImageTimeStamp';
1158
+ Prop = Prop;
1159
+ return this.SigWebGetProperty(Prop);
1160
+ }
1161
+ static SetImageTimeStampPosX(v) {
1162
+ var Prop = 'ImageTimeStampPosX/';
1163
+ Prop = Prop + v;
1164
+ this.SigWebSetPropertySync(Prop);
1165
+ }
1166
+ static GetImageTimeStampPosX() {
1167
+ var Prop = 'ImageTimeStampPosX';
1168
+ Prop = Prop;
1169
+ return this.SigWebGetProperty(Prop);
1170
+ }
1171
+ static SetImageTimeStampPosY(v) {
1172
+ var Prop = 'ImageTimeStampPosY/';
1173
+ Prop = Prop + v;
1174
+ this.SigWebSetPropertySync(Prop);
1175
+ }
1176
+ static GetImageTimeStampPosY() {
1177
+ var Prop = 'ImageTimeStampPosY';
1178
+ Prop = Prop;
1179
+ return this.SigWebGetProperty(Prop);
1180
+ }
1181
+ static SetImageTimeStampSize(v) {
1182
+ var Prop = 'ImageTimeStampSize/';
1183
+ Prop = Prop + v;
1184
+ this.SigWebSetPropertySync(Prop);
1185
+ }
1186
+ static GetImageTimeStampSize() {
1187
+ var Prop = 'ImageTimeStampSize';
1188
+ Prop = Prop;
1189
+ return this.SigWebGetProperty(Prop);
1190
+ }
1191
+ static SetImageAnnotate(v) {
1192
+ var Prop = 'ImageAnnotate/';
1193
+ Prop = Prop + v;
1194
+ this.SigWebSetPropertySync(Prop);
1195
+ }
1196
+ static GetImageAnnotate() {
1197
+ var Prop = 'ImageAnnotate';
1198
+ Prop = Prop;
1199
+ return this.SigWebGetProperty(Prop);
1200
+ }
1201
+ static SetImageAnnotatePosX(v) {
1202
+ var Prop = 'ImageAnnotatePosX/';
1203
+ Prop = Prop + v;
1204
+ this.SigWebSetPropertySync(Prop);
1205
+ }
1206
+ static GetImageAnnotatePosX() {
1207
+ var Prop = 'ImageAnnotatePosX';
1208
+ Prop = Prop;
1209
+ return this.SigWebGetProperty(Prop);
1210
+ }
1211
+ static SetImageAnnotatePosY(v) {
1212
+ var Prop = 'ImageAnnotatePosY/';
1213
+ Prop = Prop + v;
1214
+ this.SigWebSetPropertySync(Prop);
1215
+ }
1216
+ static GetImageAnnotatePosY() {
1217
+ var Prop = 'ImageAnnotatePosY';
1218
+ Prop = Prop;
1219
+ return this.SigWebGetProperty(Prop);
1220
+ }
1221
+ static SetImageAnnotateSize(v) {
1222
+ var Prop = 'ImageAnnotateSize/';
1223
+ Prop = Prop + v;
1224
+ this.SigWebSetPropertySync(Prop);
1225
+ }
1226
+ static GetImageAnnotateSize() {
1227
+ var Prop = 'ImageAnnotateSize';
1228
+ Prop = Prop;
1229
+ return this.SigWebGetProperty(Prop);
1230
+ }
1231
+ static SetJustifyX(v) {
1232
+ var Prop = 'JustifyX/';
1233
+ Prop = Prop + v;
1234
+ this.SigWebSetPropertySync(Prop);
1235
+ }
1236
+ static GetJustifyX() {
1237
+ var Prop = 'JustifyX';
1238
+ Prop = Prop;
1239
+ return this.SigWebGetProperty(Prop);
1240
+ }
1241
+ static SetJustifyY(v) {
1242
+ var Prop = 'JustifyY/';
1243
+ Prop = Prop + v;
1244
+ this.SigWebSetPropertySync(Prop);
1245
+ }
1246
+ static GetJustifyY() {
1247
+ var Prop = 'JustifyY';
1248
+ Prop = Prop;
1249
+ return this.SigWebGetProperty(Prop);
1250
+ }
1251
+ static SetJustifyMode(v) {
1252
+ var Prop = 'JustifyMode/';
1253
+ Prop = Prop + v;
1254
+ this.SigWebSetPropertySync(Prop);
1255
+ }
1256
+ static GetJustifyMode() {
1257
+ var Prop = 'JustifyMode';
1258
+ Prop = Prop;
1259
+ return this.SigWebGetProperty(Prop);
1260
+ }
1261
+ //
1262
+ // SigPlusNETKeyPad.cs
1263
+ //
1264
+ static KeyPadAddHotSpot(key, coord, xp, yp, xs, ys) {
1265
+ var Prop = 'KeyPadAddHotSpot/';
1266
+ Prop = Prop + key + ',' + coord + ',' + xp + ',' + yp + ',' + xs + ',' + ys;
1267
+ this.SigWebSetPropertySync(Prop);
1268
+ }
1269
+ static KeyPadMarkHotSpot(key, coord, xp, yp, xs, ys) {
1270
+ this.LCDWriteString(0, 2, xp, yp, '16pt sans-serif', 32, '+');
1271
+ this.LCDWriteString(0, 2, xp + xs, yp, '16pt sans-serif', 32, '+');
1272
+ this.LCDWriteString(0, 2, xp, yp + ys, '16pt sans-serif', 32, '+');
1273
+ this.LCDWriteString(0, 2, xp + xs, yp + ys, '16pt sans-serif', 32, '+');
1274
+ }
1275
+ static KeyPadQueryHotSpot(key) {
1276
+ var Prop = 'KeyPadQueryHotSpot/';
1277
+ Prop = Prop + key;
1278
+ return this.SigWebGetProperty(Prop);
1279
+ }
1280
+ static KeyPadClearHotSpotList() {
1281
+ var Prop = 'KeyPadClearHotSpotList';
1282
+ this.SigWebSetPropertySync(Prop);
1283
+ }
1284
+ static SetSigWindow(coords, xp, yp, xs, ys) {
1285
+ var Prop = 'SigWindow/';
1286
+ Prop = Prop + coords + ',' + xp + ',' + yp + ',' + xs + ',' + ys;
1287
+ this.SigWebSetPropertySync(Prop);
1288
+ }
1289
+ static ClearSigWindow(inside) {
1290
+ var Prop = 'ClearSigWindow/';
1291
+ Prop = Prop + inside;
1292
+ this.SigWebSetPropertySync(Prop);
1293
+ }
1294
+ //
1295
+ // SigPlusNETLCD.cs
1296
+ //
1297
+ static SetLCDCaptureMode(v) {
1298
+ var Prop = 'CaptureMode/';
1299
+ Prop = Prop + v;
1300
+ this.SigWebSetPropertySync(Prop);
1301
+ }
1302
+ static GetLCDCaptureMode() {
1303
+ var Prop = 'CaptureMode';
1304
+ Prop = Prop;
1305
+ return this.SigWebGetProperty(Prop);
1306
+ }
1307
+ static LCDSetWindow(xP, yP, xS, yS) {
1308
+ var Prop = 'LCDSetWindow/';
1309
+ Prop = Prop + xP + ',' + yP + ',' + xS + ',' + yS;
1310
+ this.SigWebSetPropertySync(Prop);
1311
+ }
1312
+ static LCDWriteString(dest, mode, x, y, fnt, size, str) {
1313
+ var c = document.createElement('canvas');
1314
+ var cntx = c.getContext('2d');
1315
+ cntx.font = fnt;
1316
+ var txt = str;
1317
+ var xs = Math.round(cntx.measureText(txt).width);
1318
+ var ys = size;
1319
+ c.width = xs;
1320
+ c.height = ys;
1321
+ if (xs == 0) {
1322
+ return;
1323
+ }
1324
+ cntx.font = fnt;
1325
+ cntx.fillStyle = '#FFFFFF';
1326
+ cntx.rect(0, 0, xs, ys);
1327
+ cntx.fill();
1328
+ cntx.fillStyle = '#000000';
1329
+ cntx.textBaseline = 'top';
1330
+ cntx.fillText(txt, 0, 0);
1331
+ cntx.drawImage(cntx.canvas, 0, 0, xs, ys);
1332
+ var Gstr = this.createLcdBitmapFromCanvas(c, x, y, xs, ys);
1333
+ this.LcdWriteImageStream(dest, mode, x, y, xs, ys, Gstr);
1334
+ }
1335
+ static LCDDrawRectangle(dest, mode, x, y, xs, ys, fill) {
1336
+ var c = document.createElement('canvas');
1337
+ var cntx = c.getContext('2d');
1338
+ c.width = xs;
1339
+ c.height = ys;
1340
+ cntx.fillStyle = fill;
1341
+ cntx.rect(0, 0, xs, ys);
1342
+ cntx.fill();
1343
+ cntx.drawImage(cntx.canvas, 0, 0, xs, ys);
1344
+ var Gstr = this.createLcdBitmapFromCanvas(c, x, y, xs, ys);
1345
+ this.LcdWriteImageBlob(dest, mode, x, y, xs, ys, Gstr);
1346
+ }
1347
+ static LCDDrawButton(dest, mode, x, y, xs, ys, strys, fill, fnt, str) {
1348
+ var c = document.createElement('canvas');
1349
+ var cntx = c.getContext('2d');
1350
+ cntx.font = fnt;
1351
+ var txt = str;
1352
+ var sxs = Math.round(cntx.measureText(txt).width);
1353
+ var sys = strys;
1354
+ c.width = xs;
1355
+ c.height = ys;
1356
+ cntx.font = fnt;
1357
+ cntx.fillStyle = fill;
1358
+ cntx.rect(0, 0, xs, ys);
1359
+ cntx.fill();
1360
+ cntx.fillStyle = '#FFFFFF';
1361
+ cntx.textBaseline = 'top';
1362
+ cntx.fillText(txt, (xs - sxs) / 2, (ys - sys) / 2);
1363
+ cntx.drawImage(cntx.canvas, 0, 0, xs, ys);
1364
+ var Gstr = this.createLcdBitmapFromCanvas(c, x, y, xs, ys);
1365
+ this.LcdWriteImageBlob(dest, mode, x, y, xs, ys, Gstr);
1366
+ }
1367
+ static LCDWriteStringWindow(dest, mode, x, y, fnt, xsize, ysize, str) {
1368
+ var c = document.createElement('canvas');
1369
+ var cntx = c.getContext('2d');
1370
+ cntx.font = fnt;
1371
+ var txt = str;
1372
+ var xs = xsize;
1373
+ var ys = ysize;
1374
+ c.width = xs;
1375
+ c.height = ys;
1376
+ cntx.font = fnt;
1377
+ cntx.fillStyle = '#FFFFFF';
1378
+ cntx.rect(0, 0, xs, ys);
1379
+ cntx.fill();
1380
+ cntx.fillStyle = '#000000';
1381
+ cntx.textBaseline = 'top';
1382
+ cntx.fillText(txt, 0, 0);
1383
+ cntx.drawImage(cntx.canvas, 0, 0, xs, ys);
1384
+ var Gstr = this.createLcdBitmapFromCanvas(c, x, y, xs, ys);
1385
+ this.LcdWriteImageBlob(dest, mode, x, y, xs, ys, Gstr);
1386
+ }
1387
+ static LCDStringWidth(fnt, str) {
1388
+ var c = document.createElement('canvas');
1389
+ var cntx = c.getContext('2d');
1390
+ cntx.font = fnt;
1391
+ var txt = str;
1392
+ var xs = Math.round(cntx.measureText(txt).width);
1393
+ return xs;
1394
+ }
1395
+ static LCDStringHeight(fnt, str) {
1396
+ return 16;
1397
+ }
1398
+ static LcdRefresh(Mode, Xp, Yp, Xs, Ys) {
1399
+ var Prop = 'LcdRefresh/';
1400
+ Prop = Prop + Mode + ',' + Xp + ',' + Yp + ',' + Xs + ',' + Ys;
1401
+ this.SigWebSetPropertySync(Prop);
1402
+ }
1403
+ static LCDSendCmdString(CmdStr, ReturnCount, Result, TimeOut) {
1404
+ var Prop = 'LcdSendCmdString/';
1405
+ Prop = Prop + ReturnCount + ',' + TimeOut;
1406
+ Result = this.SigWebSetStreamProperty(Prop, CmdStr);
1407
+ }
1408
+ static LCDSendCmdData(CmdStr, ReturnCount, Result, TimeOut) {
1409
+ var Prop = 'LcdSendCmdData/';
1410
+ Prop = Prop + ReturnCount + ',' + TimeOut;
1411
+ Result = this.SigWebSetStreamProperty(Prop, CmdStr);
1412
+ }
1413
+ // function LCDSendWindowedGraphicCanvas( dest, mode, x, y, canvas )
1414
+ // {
1415
+ // }
1416
+ // function LCDSendWindowedGraphicCanvas( dest, mode, x, y, xs, ys, canvas )
1417
+ // {
1418
+ // var Gstr = this.createLcdBitmapFromCanvas( canvas, 0, 0, xs, ys)
1419
+ // LcdWriteImageStream( dest, mode, x, y, xs, ys, Gstr );
1420
+ // }
1421
+ static LCDSendWindowedGraphicCanvas(dest, mode, x, y, xs, ys, c, xps, yps) {
1422
+ var canvas = document.createElement('canvas');
1423
+ var Gstr = this.createLcdBitmapFromCanvas(canvas, xps, yps, xs, ys);
1424
+ this.LcdWriteImageStream(dest, mode, x, y, xs, ys, Gstr);
1425
+ }
1426
+ static LCDSendGraphicUrl(dest, mode, x, y, url) {
1427
+ this.LcdWriteImage(dest, mode, x, y, url);
1428
+ }
1429
+ // function LCDSendGraphic( Dest, Mode, XPos, YPos, ImageFileName ) {}
1430
+ // function LCDSendGraphicURL( Dest, Mode, XPos, YPos, URL ) {}
1431
+ static LCDClear() {
1432
+ var Prop = 'LcdClear';
1433
+ Prop = Prop;
1434
+ return this.SigWebGetProperty(Prop);
1435
+ }
1436
+ static LCDSetTabletMap(LCDType, LCDXSize, LCDYSize, LCDXStart, LCDYStart, LCDXStop, LCDYStop) { }
1437
+ static LCDSetPixelDepth(v) {
1438
+ var Prop = 'LcdSetPixelDepth/';
1439
+ Prop = Prop + v;
1440
+ this.SigWebSetPropertySync(Prop);
1441
+ }
1442
+ static LCDGetLCDSize() {
1443
+ var Prop = 'LcdGetLcdSize';
1444
+ Prop = Prop;
1445
+ return this.SigWebGetProperty(Prop);
1446
+ }
1447
+ static LCDGetCompressionMode() {
1448
+ var Prop = 'LcdCompressionMode';
1449
+ Prop = Prop;
1450
+ return this.SigWebGetProperty(Prop);
1451
+ }
1452
+ static LCDGetZCompressionMode() {
1453
+ var Prop = 'LcdZCompressionMode';
1454
+ Prop = Prop;
1455
+ return this.SigWebGetProperty(Prop);
1456
+ }
1457
+ //
1458
+ // SigPlusNETLCD.cs
1459
+ //
1460
+ static SetRealTabletState(v) {
1461
+ var Prop = 'TabletState/';
1462
+ Prop = Prop + v;
1463
+ this.SigWebSetPropertySync(Prop);
1464
+ }
1465
+ static GetTabletState() {
1466
+ var Prop = 'TabletState';
1467
+ Prop = Prop;
1468
+ return this.SigWebGetProperty(Prop);
1469
+ }
1470
+ static SetTabletLogicalXSize(v) {
1471
+ var Prop = 'TabletLogicalXSize/';
1472
+ Prop = Prop + v;
1473
+ this.SigWebSetPropertySync(Prop);
1474
+ }
1475
+ static GetTabletLogicalXSize() {
1476
+ var Prop = 'TabletLogicalXSize';
1477
+ Prop = Prop;
1478
+ return this.SigWebGetProperty(Prop);
1479
+ }
1480
+ static GetTabletLogicalYSize() {
1481
+ var Prop = 'TabletLogicalYSize';
1482
+ Prop = Prop;
1483
+ return this.SigWebGetProperty(Prop);
1484
+ }
1485
+ static SetTabletLogicalYSize(v) {
1486
+ var Prop = 'TabletLogicalYSize/';
1487
+ Prop = Prop + v;
1488
+ this.SigWebSetPropertySync(Prop);
1489
+ }
1490
+ static SetTabletXStart(v) {
1491
+ var Prop = 'TabletXStart/';
1492
+ Prop = Prop + v;
1493
+ this.SigWebSetPropertySync(Prop);
1494
+ }
1495
+ static GetTabletXStart() {
1496
+ var Prop = 'TabletXStart';
1497
+ Prop = Prop;
1498
+ return this.SigWebGetProperty(Prop);
1499
+ }
1500
+ static SetTabletYStart(v) {
1501
+ var Prop = 'TabletYStart/';
1502
+ Prop = Prop + v;
1503
+ this.SigWebSetPropertySync(Prop);
1504
+ }
1505
+ static GetTabletYStart() {
1506
+ var Prop = 'TabletYStart';
1507
+ Prop = Prop;
1508
+ return this.SigWebGetProperty(Prop);
1509
+ }
1510
+ static SetTabletXStop(v) {
1511
+ var Prop = 'TabletXStop/';
1512
+ Prop = Prop + v;
1513
+ this.SigWebSetPropertySync(Prop);
1514
+ }
1515
+ static GetTabletXStop() {
1516
+ var Prop = 'TabletXStop';
1517
+ Prop = Prop;
1518
+ return this.SigWebGetProperty(Prop);
1519
+ }
1520
+ static SetTabletYStop(v) {
1521
+ var Prop = 'TabletYStop/';
1522
+ Prop = Prop + v;
1523
+ this.SigWebSetPropertySync(Prop);
1524
+ }
1525
+ static GetTabletYStop() {
1526
+ var Prop = 'TabletYStop';
1527
+ Prop = Prop;
1528
+ return this.SigWebGetProperty(Prop);
1529
+ }
1530
+ static SetTabletFilterPoints(v) {
1531
+ var Prop = 'TabletFilterPoints/';
1532
+ Prop = Prop + v;
1533
+ this.SigWebSetPropertySync(Prop);
1534
+ }
1535
+ static GetTabletFilterPoints() {
1536
+ var Prop = 'TabletFilterPoints';
1537
+ Prop = Prop;
1538
+ return this.SigWebGetProperty(Prop);
1539
+ }
1540
+ static SetTabletTimingAdvance(v) {
1541
+ var Prop = 'TabletTimingAdvance/';
1542
+ Prop = Prop + v;
1543
+ this.SigWebSetPropertySync(Prop);
1544
+ }
1545
+ static GetTabletTimingAdvance() {
1546
+ var Prop = 'TabletTimingAdvance';
1547
+ Prop = Prop;
1548
+ return this.SigWebGetProperty(Prop);
1549
+ }
1550
+ static SetTabletComPort(v) {
1551
+ var Prop = 'TabletComPort/';
1552
+ Prop = Prop + v;
1553
+ this.SigWebSetPropertySync(Prop);
1554
+ }
1555
+ static GetTabletComPort() {
1556
+ var Prop = 'TabletComPort';
1557
+ Prop = Prop;
1558
+ return this.SigWebGetProperty(Prop);
1559
+ }
1560
+ static SetTabletBaudRate(v) {
1561
+ var Prop = 'TabletBaudRate/';
1562
+ Prop = Prop + v;
1563
+ this.SigWebSetPropertySync(Prop);
1564
+ }
1565
+ static GetTabletBaudRate() {
1566
+ var Prop = 'TabletBaudRate';
1567
+ Prop = Prop;
1568
+ return this.SigWebGetProperty(Prop);
1569
+ }
1570
+ static SetTabletRotation(v) {
1571
+ var Prop = 'TabletRotation/';
1572
+ Prop = Prop + v;
1573
+ this.SigWebSetPropertySync(Prop);
1574
+ }
1575
+ static GetTabletRotation() {
1576
+ var Prop = 'TabletRotation';
1577
+ Prop = Prop;
1578
+ return this.SigWebGetProperty(Prop);
1579
+ }
1580
+ static SetTabletType(v) {
1581
+ var Prop = 'TabletType/';
1582
+ Prop = Prop + v;
1583
+ this.SigWebSetPropertySync(Prop);
1584
+ }
1585
+ static GetTabletType() {
1586
+ var Prop = 'TabletType';
1587
+ Prop = Prop;
1588
+ return this.SigWebGetProperty(Prop);
1589
+ }
1590
+ static SetServerTabletType(v) {
1591
+ var Prop = 'ServerTabletType/';
1592
+ Prop = Prop + v;
1593
+ this.SigWebSetPropertySync(Prop);
1594
+ }
1595
+ static GetServerTabletType() {
1596
+ var Prop = 'ServerTabletType';
1597
+ Prop = Prop;
1598
+ return this.SigWebGetProperty(Prop);
1599
+ }
1600
+ static SetTabletComTest(v) {
1601
+ var Prop = 'TabletComTest/';
1602
+ Prop = Prop + v;
1603
+ this.SigWebSetPropertySync(Prop);
1604
+ }
1605
+ static GetTabletComTest() {
1606
+ var Prop = 'TabletComTest';
1607
+ Prop = Prop;
1608
+ return this.SigWebGetProperty(Prop);
1609
+ }
1610
+ static SetTabletResolution(v) {
1611
+ var Prop = 'TabletResolution/';
1612
+ Prop = Prop + v;
1613
+ this.SigWebSetPropertySync(Prop);
1614
+ }
1615
+ static GetTabletResolution() {
1616
+ var Prop = 'TabletResolution';
1617
+ Prop = Prop;
1618
+ return this.SigWebGetProperty(Prop);
1619
+ }
1620
+ static TabletConnectQuery() {
1621
+ var Prop = 'TabletConnectQuery';
1622
+ Prop = Prop;
1623
+ return this.SigWebGetProperty(Prop);
1624
+ }
1625
+ static TabletModelNumber() {
1626
+ var Prop = 'TabletModelNumber';
1627
+ Prop = Prop;
1628
+ return this.SigWebGetProperty(Prop);
1629
+ }
1630
+ static TabletSerialNumber() {
1631
+ var Prop = 'TabletSerialNumber';
1632
+ Prop = Prop;
1633
+ return this.SigWebGetProperty(Prop);
1634
+ }
1635
+ static SetTabletPortPath(v) {
1636
+ var Prop = 'TabletPortPath/';
1637
+ Prop = Prop + v;
1638
+ this.SigWebSetPropertySync(Prop);
1639
+ }
1640
+ static SetTabletLocalIniFilePath(v) {
1641
+ var Prop = 'TabletLocalIniFilePath/';
1642
+ Prop = Prop + v;
1643
+ this.SigWebSetPropertySync(Prop);
1644
+ }
1645
+ static SetTabletModel(v) {
1646
+ var Prop = 'TabletModel/';
1647
+ Prop = Prop + v;
1648
+ this.SigWebSetPropertySync(Prop);
1649
+ }
1650
+ static SetSerialPortCloseDelay(v) {
1651
+ var Prop = 'SerialPortCloseDelay/';
1652
+ Prop = Prop + v;
1653
+ this.SigWebSetPropertySync(Prop);
1654
+ }
1655
+ static GetSerialPortCloseDelay() {
1656
+ var Prop = 'SerialPortCloseDelay';
1657
+ Prop = Prop;
1658
+ return this.SigWebGetProperty(Prop);
1659
+ }
1660
+ static EnableTabletEncryption() {
1661
+ var Prop = 'EnableTabletEncryption';
1662
+ Prop = Prop;
1663
+ this.SigWebSetPropertySync(Prop);
1664
+ }
1665
+ static SetTabletEncryptionMode(hmode, tmode) {
1666
+ var Prop = 'TabletEncryptionMode/';
1667
+ Prop = Prop + hmode + ',' + tmode;
1668
+ this.SigWebSetPropertySync(Prop);
1669
+ }
1670
+ static SetMaxLogFileSize(v) {
1671
+ var Prop = 'MaxLogFileSize/';
1672
+ Prop = Prop + v;
1673
+ this.SigWebSetPropertySync(Prop);
1674
+ }
1675
+ static GetSigSockServerPath() {
1676
+ var Prop = 'SigSockServerPath';
1677
+ Prop = Prop;
1678
+ return this.SigWebGetProperty(Prop);
1679
+ }
1680
+ static GetSigSockClientName() {
1681
+ var Prop = 'SigSockClientName';
1682
+ Prop = Prop;
1683
+ return this.SigWebGetProperty(Prop);
1684
+ }
1685
+ static GetSigSockPortNumber() {
1686
+ var Prop = 'SigSockPortNumber';
1687
+ Prop = Prop;
1688
+ return this.SigWebGetProperty(Prop);
1689
+ }
1690
+ static SetSigSockServerPath(v) {
1691
+ var Prop = 'SigSockServerPath/';
1692
+ Prop = Prop + v;
1693
+ this.SigWebSetPropertySync(Prop);
1694
+ }
1695
+ static SetSigSockClientName(v) {
1696
+ var Prop = 'SigSockClientName/';
1697
+ Prop = Prop + v;
1698
+ this.SigWebSetPropertySync(Prop);
1699
+ }
1700
+ static SetPortNumber(v) {
1701
+ var Prop = 'PortNumber/';
1702
+ Prop = Prop + v;
1703
+ this.SigWebSetPropertySync(Prop);
1704
+ }
1705
+ static SetSigSockPortNumber(v) {
1706
+ var Prop = 'SigSockPortNumber/';
1707
+ Prop = Prop + v;
1708
+ this.SigWebSetPropertySync(Prop);
1709
+ }
1710
+ static GetFirmwareRevision() {
1711
+ var Prop = 'FirmwareRevision';
1712
+ Prop = Prop;
1713
+ return this.SigWebGetProperty(Prop);
1714
+ }
1715
+ static SetTabletData(sigStr) {
1716
+ var Prop = 'TabletData';
1717
+ Prop = Prop;
1718
+ this.SigWebSetStreamProperty(Prop, sigStr);
1719
+ }
1720
+ static GetTabletData() {
1721
+ var Prop = 'TabletData';
1722
+ Prop = Prop;
1723
+ var Str = this.SigWebGetProperty(Prop);
1724
+ return Str.slice(1, Str.length - 1);
1725
+ }
1726
+ static OpenTablet(v) {
1727
+ var Prop = 'OpenTablet/';
1728
+ Prop = Prop + v;
1729
+ this.SigWebSetPropertySync(Prop);
1730
+ }
1731
+ static CloseTablet() {
1732
+ var Prop = 'CloseTablet';
1733
+ Prop = Prop;
1734
+ this.SigWebSetProperty(Prop);
1735
+ }
1736
+ static ResetParameters() {
1737
+ var Prop = 'ResetParameters';
1738
+ Prop = Prop;
1739
+ this.SigWebSetPropertySync(Prop);
1740
+ }
1741
+ static testRawData() {
1742
+ this.OpenTablet(1);
1743
+ var Str1 = this.GetTabletData();
1744
+ this.CloseTablet();
1745
+ }
1746
+ static SetTabletState(v, ctx, tv) {
1747
+ var delay;
1748
+ if (tv) {
1749
+ delay = tv;
1750
+ }
1751
+ else {
1752
+ delay = 100;
1753
+ }
1754
+ if (this.GetTabletState() != v) {
1755
+ if (v == 1) {
1756
+ if (ctx) {
1757
+ var can = ctx.canvas;
1758
+ this.SetDisplayXSize(can.width);
1759
+ this.SetDisplayYSize(can.height);
1760
+ this.SigWebSetDisplayTarget(ctx);
1761
+ }
1762
+ this.SetRealTabletState(v);
1763
+ var data = this.GetTabletState();
1764
+ var dataResult = data == '' || data == null ? 0 : Number(data);
1765
+ var tmr = null;
1766
+ if (ctx && dataResult != 0) {
1767
+ tmr = setInterval(() => this.SigWebRefresh(), delay);
1768
+ }
1769
+ else {
1770
+ tmr = null;
1771
+ }
1772
+ return tmr;
1773
+ }
1774
+ else {
1775
+ if (ctx) {
1776
+ clearInterval(ctx);
1777
+ }
1778
+ this.SigWebSetDisplayTarget(null);
1779
+ this.SetRealTabletState(v);
1780
+ }
1781
+ }
1782
+ return null;
1783
+ }
1784
+ }
1785
+ SigWebTablet.baseUri = SigWebTablet.makeUri();
1786
+ SigWebTablet.Count = false;
1787
+ SigWebTablet.SigWebFontThreshold = 155;
1788
+ SigWebTablet.NumPointsLastTime = 0;
1789
+
1790
+ class OutputMessage {
1791
+ }
1792
+ class LibeyNgSignatureComponent {
1793
+ constructor() {
1794
+ this.OutputSignature = new EventEmitter();
1795
+ this.DeviceType = 'mousepad';
1796
+ this._destroy$ = new Subject();
1797
+ this.widthView = 500;
1798
+ this.heightView = 200;
1799
+ this.widthRender = 500;
1800
+ this.heightRender = 200;
1801
+ this.signaturePadOptions = {
1802
+ minWidth: 5,
1803
+ canvasWidth: this.widthView,
1804
+ canvasHeight: this.heightView,
1805
+ };
1806
+ this.FileValidated = false;
1807
+ this.NotDriver = false;
1808
+ this.UploadFile = null;
1809
+ }
1810
+ ngAfterViewInit() {
1811
+ this.InitDevice();
1812
+ }
1813
+ ngOnDestroy() {
1814
+ this.closingSigWeb();
1815
+ this._destroy$.next(true);
1816
+ }
1817
+ ChangeDevice() {
1818
+ this.NotDriver = false;
1819
+ this.UploadFile = null;
1820
+ this.File = null;
1821
+ setTimeout(() => {
1822
+ this.InitDevice();
1823
+ }, 200);
1824
+ }
1825
+ InitDevice() {
1826
+ if (this.DeviceType == 'pinpad') {
1827
+ this.cnvContext = (this.canvas.nativeElement).getContext('2d');
1828
+ }
1829
+ if (this.DeviceType == 'mousepad') {
1830
+ this.signaturePad.set('minWidth', 5);
1831
+ this.signaturePad.clear();
1832
+ }
1833
+ }
1834
+ closingSigWeb() {
1835
+ SigWebTablet.ClearTablet();
1836
+ SigWebTablet.SetTabletState(0, this.tmr, null);
1837
+ }
1838
+ onSign() {
1839
+ this.NotDriver = false;
1840
+ this.UploadFile = null;
1841
+ var driver = SigWebTablet.GetVersionString();
1842
+ if (driver == null) {
1843
+ this.NotDriver = true;
1844
+ }
1845
+ else {
1846
+ this.NotDriver = false;
1847
+ console.log('onSign Clicked!');
1848
+ SigWebTablet.SetDisplayXSize(this.widthRender);
1849
+ SigWebTablet.SetDisplayYSize(this.heightRender);
1850
+ SigWebTablet.SetTabletState(0, this.tmr, null);
1851
+ SigWebTablet.SetJustifyMode(0);
1852
+ SigWebTablet.ClearTablet();
1853
+ if (this.tmr == null) {
1854
+ this.tmr = SigWebTablet.SetTabletState(1, this.cnvContext, 50);
1855
+ }
1856
+ else {
1857
+ SigWebTablet.SetTabletState(0, this.tmr, null);
1858
+ this.tmr = null;
1859
+ this.tmr = SigWebTablet.SetTabletState(1, this.cnvContext, 50);
1860
+ }
1861
+ }
1862
+ }
1863
+ onClear() {
1864
+ if (this.UploadFile == null) {
1865
+ if (this.DeviceType == 'pinpad') {
1866
+ SigWebTablet.ClearTablet();
1867
+ if (this.cnvContext) {
1868
+ this.cnvContext.clearRect(0, 0, this.canvas.nativeElement.width, this.canvas.nativeElement.height);
1869
+ }
1870
+ }
1871
+ if (this.DeviceType == 'mousepad') {
1872
+ this.signaturePad.clear();
1873
+ }
1874
+ }
1875
+ else {
1876
+ this.File = null;
1877
+ this.UploadFile = null;
1878
+ this.ChangeDevice();
1879
+ }
1880
+ }
1881
+ onDone() {
1882
+ var result = new OutputMessage();
1883
+ if (this.UploadFile == null) {
1884
+ if (this.DeviceType == 'pinpad') {
1885
+ // if (Number(SigWebTablet.NumberOfTabletPoints()) === 0) {
1886
+ // alert('Por favor firme antes de continuar');
1887
+ // } else {
1888
+ SigWebTablet.SetTabletState(0, this.tmr, null);
1889
+ SigWebTablet.SetSigCompressionMode(1);
1890
+ result.bioSigData = SigWebTablet.GetSigString();
1891
+ result.sigImgData = SigWebTablet.GetSigString();
1892
+ SigWebTablet.SetImageXSize(this.widthRender);
1893
+ SigWebTablet.SetImageYSize(this.heightRender);
1894
+ SigWebTablet.SetImagePenWidth(5);
1895
+ SigWebTablet.GetSigImageB64((base64) => {
1896
+ result.sigString = "data:image/png;base64," + base64;
1897
+ this.OutputSignature.emit(result);
1898
+ });
1899
+ // }
1900
+ }
1901
+ if (this.DeviceType == 'mousepad') {
1902
+ var result = new OutputMessage();
1903
+ result.sigString = this.signaturePad.toDataURL();
1904
+ this.OutputSignature.emit(result);
1905
+ }
1906
+ }
1907
+ else {
1908
+ result.sigString = this.UploadFile;
1909
+ this.OutputSignature.emit(result);
1910
+ }
1911
+ }
1912
+ fileEvent(event) {
1913
+ this.UploadFile = null;
1914
+ this.FileValidated = false;
1915
+ const file = event.target.files[0];
1916
+ if (file.type == 'image/jpeg' || file.type == 'image/png') {
1917
+ this.FileValidated = false;
1918
+ const newWidth = this.widthRender;
1919
+ const newHeight = this.heightRender;
1920
+ this.resizeImage(file, newWidth, newHeight)
1921
+ .then((resizedImageDataUrl) => {
1922
+ this.UploadFile = resizedImageDataUrl;
1923
+ })
1924
+ .catch((error) => {
1925
+ console.error('Error al redimensionar la imagen:', error);
1926
+ });
1927
+ }
1928
+ else {
1929
+ this.File = null;
1930
+ this.UploadFile = null;
1931
+ this.FileValidated = true;
1932
+ }
1933
+ }
1934
+ resizeImage(image, newWidth, newHeight) {
1935
+ return new Promise((resolve, reject) => {
1936
+ const reader = new FileReader();
1937
+ reader.onload = (e) => {
1938
+ const img = new Image();
1939
+ img.src = e.target.result;
1940
+ img.onload = () => {
1941
+ const canvas = document.createElement('canvas');
1942
+ const ctx = canvas.getContext('2d');
1943
+ canvas.width = newWidth;
1944
+ canvas.height = newHeight;
1945
+ ctx.drawImage(img, 0, 0, newWidth, newHeight);
1946
+ const resizedImageDataUrl = canvas.toDataURL(image.type);
1947
+ resolve(resizedImageDataUrl);
1948
+ };
1949
+ img.onerror = (error) => {
1950
+ reject(error);
1951
+ };
1952
+ };
1953
+ reader.readAsDataURL(image);
1954
+ });
1955
+ }
1956
+ }
1957
+ LibeyNgSignatureComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: LibeyNgSignatureComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1958
+ LibeyNgSignatureComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: LibeyNgSignatureComponent, selector: "lib-libey-ng-signature", inputs: { DeviceType: "DeviceType" }, outputs: { OutputSignature: "OutputSignature" }, viewQueries: [{ propertyName: "canvas", first: true, predicate: ["sigImg"], descendants: true }, { propertyName: "signaturePad", first: true, predicate: SignaturePad, descendants: true }], ngImport: i0, template: "<div class=\"container\">\n <div *ngIf=\"UploadFile==null\">\n <div *ngIf=\"DeviceType=='pinpad'\" style=\"cursor: pointer; border: 1px ridge #d2d2d2;\">\n <canvas (click)=\"onSign()\" #sigImg [width]=\"widthView\" [height]=\"heightView\"></canvas> \n </div>\n <div *ngIf=\"DeviceType=='mousepad'\" style=\"border: 1px ridge #d2d2d2;\">\n <signature-pad [options]=\"signaturePadOptions\"></signature-pad>\n </div>\n </div>\n <div *ngIf=\"UploadFile!=null\" style=\"border: 1px ridge #d2d2d2;\">\n <img [src]=\"UploadFile\" [width]=\"widthView\" [height]=\"heightView\" />\n </div>\n</div>\n\n<div class=\"row\">\n <div class=\"col-md-12\">\n <input type=\"file\" (change)=\"fileEvent($event)\" [(ngModel)]=\"File\" class=\"form-control form-control-ph\"\n accept=\"image/png, image/jpeg\" style=\"width: 485px;\">\n <label *ngIf=\"FileValidated\" [ngClass]=\"'text-danger'\">Archivo requerido. Formatos permitidos (jpeg, jpg, png)</label>\n </div>\n</div>\n<div class=\"row\">\n <div class=\"col-md-6\">\n <ng-select [(ngModel)]=\"DeviceType\" class=\"ng-select\" placeholder=\"Seleccionar\" [clearable]=\"false\"\n (change)=\"ChangeDevice()\">\n <ng-option [value]=\"'pinpad'\">Pinpad</ng-option>\n <ng-option [value]=\"'mousepad'\">Mousepad</ng-option>\n </ng-select>\n <label *ngIf=\"NotDriver\" [ngClass]=\"'text-danger'\">No tiene el driver instalado</label>\n </div>\n <div class=\"col-md-6\">\n <p class=\"text-primary font-link-rp\" style=\"text-align: right; cursor: pointer;\" (click)=\"onClear()\">\n Limpiar firma\n </p>\n </div>\n</div>\n\n<div class=\"modal-footer mt-15 mb-4\">\n <button type=\"button\" class=\"btn btn-primary btn-save-rp\" (click)=\"onDone()\"> \n <i class=\"icon-save-white\"></i> Guardar\n </button>\n</div>", styles: [".container{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center}\n"], components: [{ type: i1$1.SignaturePad, selector: "signature-pad", inputs: ["options"], outputs: ["onBeginEvent", "onEndEvent"] }, { type: i2.NgSelectComponent, selector: "ng-select", inputs: ["markFirst", "dropdownPosition", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "bufferAmount", "selectableGroup", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "readonly", "searchWhileComposing", "minTermLength", "editableSearchTerm", "keyDownFn", "multiple", "addTag", "searchable", "clearable", "isOpen", "items", "compareWith", "clearSearchOnAdd", "bindLabel", "placeholder", "notFoundText", "typeToSearchText", "addTagText", "loadingText", "clearAllText", "virtualScroll", "openOnEnter", "appendTo", "bindValue", "appearance", "maxSelectedItems", "groupBy", "groupValue", "tabIndex", "typeahead"], outputs: ["blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"] }, { type: i2.ɵr, selector: "ng-option", inputs: ["disabled", "value"] }], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
1959
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: LibeyNgSignatureComponent, decorators: [{
1960
+ type: Component,
1961
+ args: [{
1962
+ selector: 'lib-libey-ng-signature',
1963
+ templateUrl: './libey-ng-signature.component.html',
1964
+ styleUrls: ['./libey-ng-signature.component.css'],
1965
+ }]
1966
+ }], ctorParameters: function () { return []; }, propDecorators: { OutputSignature: [{
1967
+ type: Output
1968
+ }], DeviceType: [{
1969
+ type: Input
1970
+ }], canvas: [{
1971
+ type: ViewChild,
1972
+ args: ['sigImg', { static: false }]
1973
+ }], signaturePad: [{
1974
+ type: ViewChild,
1975
+ args: [SignaturePad]
1976
+ }] } });
1977
+
1978
+ class LibeyNgSignatureModule {
1979
+ }
1980
+ LibeyNgSignatureModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: LibeyNgSignatureModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1981
+ LibeyNgSignatureModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: LibeyNgSignatureModule, declarations: [LibeyNgSignatureComponent], imports: [FormsModule,
1982
+ ReactiveFormsModule,
1983
+ SignaturePadModule,
1984
+ CommonModule,
1985
+ NgSelectModule,
1986
+ NgbModule], exports: [LibeyNgSignatureComponent,
1987
+ SignaturePadModule,
1988
+ NgSelectModule,
1989
+ NgbModule] });
1990
+ LibeyNgSignatureModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: LibeyNgSignatureModule, imports: [[
1991
+ FormsModule,
1992
+ ReactiveFormsModule,
1993
+ SignaturePadModule,
1994
+ CommonModule,
1995
+ NgSelectModule,
1996
+ NgbModule
1997
+ ], SignaturePadModule,
1998
+ NgSelectModule,
1999
+ NgbModule] });
2000
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: LibeyNgSignatureModule, decorators: [{
2001
+ type: NgModule,
2002
+ args: [{
2003
+ declarations: [
2004
+ LibeyNgSignatureComponent
2005
+ ],
2006
+ imports: [
2007
+ FormsModule,
2008
+ ReactiveFormsModule,
2009
+ SignaturePadModule,
2010
+ CommonModule,
2011
+ NgSelectModule,
2012
+ NgbModule
2013
+ ],
2014
+ exports: [
2015
+ LibeyNgSignatureComponent,
2016
+ SignaturePadModule,
2017
+ NgSelectModule,
2018
+ NgbModule
2019
+ ]
2020
+ }]
2021
+ }] });
2022
+
337
2023
  class LibeyNgComponentLibraryModule {
338
2024
  }
339
2025
  LibeyNgComponentLibraryModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: LibeyNgComponentLibraryModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
340
2026
  LibeyNgComponentLibraryModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: LibeyNgComponentLibraryModule, imports: [CommonModule,
341
2027
  FormsModule,
342
- LibeyNgTableModule], exports: [LibeyNgTableModule] });
2028
+ LibeyNgTableModule,
2029
+ LibeyNgSignatureModule,
2030
+ SignaturePadModule], exports: [LibeyNgTableModule,
2031
+ LibeyNgSignatureModule,
2032
+ SignaturePadModule] });
343
2033
  LibeyNgComponentLibraryModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: LibeyNgComponentLibraryModule, providers: [DatePipe], imports: [[
344
2034
  CommonModule,
345
2035
  FormsModule,
346
- LibeyNgTableModule
347
- ], LibeyNgTableModule] });
2036
+ LibeyNgTableModule,
2037
+ LibeyNgSignatureModule,
2038
+ SignaturePadModule
2039
+ ], LibeyNgTableModule,
2040
+ LibeyNgSignatureModule,
2041
+ SignaturePadModule] });
348
2042
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: LibeyNgComponentLibraryModule, decorators: [{
349
2043
  type: NgModule,
350
2044
  args: [{
@@ -352,9 +2046,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
352
2046
  imports: [
353
2047
  CommonModule,
354
2048
  FormsModule,
355
- LibeyNgTableModule
2049
+ LibeyNgTableModule,
2050
+ LibeyNgSignatureModule,
2051
+ SignaturePadModule
2052
+ ],
2053
+ exports: [
2054
+ LibeyNgTableModule,
2055
+ LibeyNgSignatureModule,
2056
+ SignaturePadModule
356
2057
  ],
357
- exports: [LibeyNgTableModule],
358
2058
  providers: [DatePipe]
359
2059
  }]
360
2060
  }] });
@@ -367,5 +2067,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
367
2067
  * Generated bundle index. Do not edit.
368
2068
  */
369
2069
 
370
- export { LibeyColumnDirective, LibeyNgComponentLibraryComponent, LibeyNgComponentLibraryModule, LibeyNgComponentLibraryService, LibeyNgTableComponent, LibeyNgTableModule };
2070
+ export { LibeyColumnDirective, LibeyNgComponentLibraryComponent, LibeyNgComponentLibraryModule, LibeyNgComponentLibraryService, LibeyNgSignatureComponent, LibeyNgSignatureModule, LibeyNgTableComponent, LibeyNgTableModule, SigWebTablet };
371
2071
  //# sourceMappingURL=libey-ng-component-library.js.map