myrtex-mf-signer 1.1.63 → 1.1.65
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 +11 -11
- package/esm2020/lib/components/certificate-select/certificate-select.component.mjs +3 -3
- package/esm2020/lib/components/sign-modal/sign-modal.component.mjs +3 -3
- package/esm2020/lib/models/certificate.model.mjs +1 -1
- package/esm2020/lib/models/index.mjs +1 -1
- package/esm2020/lib/models/internal/verify.cert.model.mjs +1 -1
- package/esm2020/lib/models/internal/verify.cert.response.model.mjs +1 -1
- package/esm2020/lib/models/sign-request.model.mjs +1 -1
- package/esm2020/lib/models/sign-validate-response.model.mjs +1 -1
- package/esm2020/lib/models/signed-result.model.mjs +1 -1
- package/esm2020/lib/myrtex-signer.module.mjs +1 -1
- package/esm2020/lib/providers/cryptojinn.provider.mjs +8 -4
- package/esm2020/lib/providers/cryptots.provider.mjs +8 -5
- package/esm2020/lib/providers/signprovider.factory.mjs +1 -1
- package/esm2020/lib/services/certificate.adjuster.mjs +5 -1
- package/esm2020/lib/services/crypto.api.service.mjs +2 -2
- package/esm2020/lib/services/crypto.base.service.mjs +1 -1
- package/esm2020/lib/services/crypto.service.mjs +1 -1
- package/esm2020/lib/services/cryptopro/crypto.pro.base.service.mjs +20 -12
- package/esm2020/lib/services/download.service.mjs +1 -1
- package/esm2020/lib/services/public.sign.service.mjs +1 -1
- package/fesm2015/myrtex-mf-signer.mjs +42 -25
- package/fesm2015/myrtex-mf-signer.mjs.map +1 -1
- package/fesm2020/myrtex-mf-signer.mjs +40 -23
- package/fesm2020/myrtex-mf-signer.mjs.map +1 -1
- package/lib/models/sign-request.model.d.ts +2 -0
- package/lib/models/sign-validate-response.model.d.ts +0 -1
- package/lib/models/signed-result.model.d.ts +0 -4
- package/lib/services/certificate.adjuster.d.ts +1 -0
- package/package.json +2 -2
|
@@ -90,6 +90,10 @@ class CertificateAdjuster {
|
|
|
90
90
|
return this.extract(certSubjectName, ['INN', 'ИНН', '1.2.643.3.131.1.1']);
|
|
91
91
|
}
|
|
92
92
|
;
|
|
93
|
+
getCertSnils(certSubjectName) {
|
|
94
|
+
return this.extract(certSubjectName, ['SNILS', 'СНИЛС', '1.2.643.100.3']);
|
|
95
|
+
}
|
|
96
|
+
;
|
|
93
97
|
getCertName(certSubjectName) {
|
|
94
98
|
return this.extract(certSubjectName, 'CN');
|
|
95
99
|
}
|
|
@@ -142,6 +146,7 @@ class CryptoProBaseService extends CryptoBaseService {
|
|
|
142
146
|
fio: instance.getCertFio(subjectName),
|
|
143
147
|
post: instance.getCertPost(subjectName),
|
|
144
148
|
ogrn: instance.getCertOgrn(subjectName),
|
|
149
|
+
snils: instance.getCertSnils(subjectName),
|
|
145
150
|
organization: instance.getCertOrg(subjectName),
|
|
146
151
|
inn: instance.getCertInn(subjectName),
|
|
147
152
|
validFromDate: validFromDate.toLocaleDateString('ru-RU'),
|
|
@@ -161,26 +166,33 @@ class CryptoProBaseService extends CryptoBaseService {
|
|
|
161
166
|
}
|
|
162
167
|
else if ([SignerTypeEnum.UL, SignerTypeEnum.IP]
|
|
163
168
|
.indexOf(filter?.certificateCheck?.signerType || SignerTypeEnum.Unknown) > -1) {
|
|
164
|
-
// filterOk = certificate.ogrn ? true : false;
|
|
165
169
|
if (filterOk) {
|
|
166
170
|
const organization = certificate.organization || certificate.cn;
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|| (filter?.certificateCheck?.shortName &&
|
|
171
|
-
strippingCharacters(filter?.certificateCheck?.shortName).indexOf(strippingCharacters(organization)) > -1);
|
|
172
|
-
if (!orgIsValid) {
|
|
171
|
+
const orgIsValid = filter?.certificateCheck?.ogrn === certificate.ogrn;
|
|
172
|
+
if (!orgIsValid) {
|
|
173
|
+
if (filter?.certificateCheck?.isChief) {
|
|
173
174
|
filterOk = false;
|
|
174
175
|
}
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
176
|
+
else {
|
|
177
|
+
const orgNameIsValid = (filter?.certificateCheck?.fullName &&
|
|
178
|
+
strippingCharacters(filter?.certificateCheck?.fullName)
|
|
179
|
+
.indexOf(strippingCharacters(organization)) > -1)
|
|
180
|
+
|| (filter?.certificateCheck?.shortName &&
|
|
181
|
+
strippingCharacters(filter?.certificateCheck?.shortName)
|
|
182
|
+
.indexOf(strippingCharacters(organization)) > -1);
|
|
183
|
+
if (!orgNameIsValid) {
|
|
184
|
+
filterOk = false;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
178
187
|
}
|
|
179
188
|
}
|
|
180
189
|
}
|
|
181
190
|
if (filterOk && filter?.certificateCheck?.signerType) {
|
|
182
191
|
const fio = certificate.fio.toLowerCase();
|
|
183
|
-
|
|
192
|
+
const snils = certificate.snils.replace(/[\s-]+/g, '');
|
|
193
|
+
const snilsCert = filter?.certificateCheck?.snils?.replace(/[\s-]+/g, '');
|
|
194
|
+
if (filter?.certificateCheck?.fio?.toLocaleLowerCase() !== fio ||
|
|
195
|
+
snilsCert !== snils) {
|
|
184
196
|
filterOk = false;
|
|
185
197
|
}
|
|
186
198
|
}
|
|
@@ -235,10 +247,10 @@ class CertificateSelectComponent extends SimpleModalComponent {
|
|
|
235
247
|
}
|
|
236
248
|
}
|
|
237
249
|
CertificateSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: CertificateSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
238
|
-
CertificateSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: CertificateSelectComponent, selector: "lib-certificate-select", usesInheritance: true, ngImport: i0, template: "<div class=\"modal-content open accent-head certificate\">\
|
|
250
|
+
CertificateSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: CertificateSelectComponent, selector: "lib-certificate-select", usesInheritance: true, ngImport: i0, template: "<div class=\"modal-content open accent-head certificate\">\n <div class=\"modal-header\">\n <div class=\"modal-title\" [innerHTML]=\"'\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043A\u0430\u0442'\">\n </div>\n <span class='close close-click' (click)=\"close()\">\n <svg width='14' height='14' fill='none' xmlns='http://www.w3.org/2000/svg'>\n <path d='M13 1L1 13M1 1l12 12' stroke='#3A3A3A' stroke-width='1.5' stroke-linecap='round'\n stroke-linejoin='round' />\n </svg>\n </span>\n </div>\n <div class=\"modal-body text-center\">\n\n <div class=\"modal-body-other\">\n <div *ngFor=\"let cert of certificates\">\n <div class=\"modal-body-info\">\n <div class=\"modal-body-info__item\">\n <span class=\"text\">\n \u0412\u043B\u0430\u0434\u0435\u043B\u0435\u0446:\n </span>\n <span class=\"text\">\n {{cert.cn}}<br/>\n {{cert.fio}}<span *ngIf=\"cert.post\">, {{cert.post}}</span>\n </span>\n </div>\n <div class=\"modal-body-info__item\">\n <span class=\"text\">\n \u0421\u0440\u043E\u043A \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F:\n </span>\n <span class=\"text\">\n {{cert.validFromDate}} - {{cert.validToDate}}\n </span>\n </div>\n <div class=\"modal-body-info__item\">\n <span class=\"text hash\">\n {{cert.thumbprint}} {{cert.isExpired ? \"(\u0438\u0441\u0442\u0435\u043A)\" : \"\"}}\n </span>\n </div>\n <button\n (click)=\"ok(cert)\"\n [disabled]=\"cert.isExpired\"\n class=\"btn btn-md\">\u0421\u043E\u0437\u0434\u0430\u0442\u044C \u043F\u043E\u0434\u043F\u0438\u0441\u044C</button>\n </div>\n </div>\n </div>\n </div>\n <div class=\"modal-footer\">\n </div>\n</div>", styles: [":host{display:contents}:host textarea{width:100%;height:600px;border:0}\n"], directives: [{ type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
239
251
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: CertificateSelectComponent, decorators: [{
|
|
240
252
|
type: Component,
|
|
241
|
-
args: [{ selector: 'lib-certificate-select', template: "<div class=\"modal-content open accent-head certificate\">\
|
|
253
|
+
args: [{ selector: 'lib-certificate-select', template: "<div class=\"modal-content open accent-head certificate\">\n <div class=\"modal-header\">\n <div class=\"modal-title\" [innerHTML]=\"'\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043A\u0430\u0442'\">\n </div>\n <span class='close close-click' (click)=\"close()\">\n <svg width='14' height='14' fill='none' xmlns='http://www.w3.org/2000/svg'>\n <path d='M13 1L1 13M1 1l12 12' stroke='#3A3A3A' stroke-width='1.5' stroke-linecap='round'\n stroke-linejoin='round' />\n </svg>\n </span>\n </div>\n <div class=\"modal-body text-center\">\n\n <div class=\"modal-body-other\">\n <div *ngFor=\"let cert of certificates\">\n <div class=\"modal-body-info\">\n <div class=\"modal-body-info__item\">\n <span class=\"text\">\n \u0412\u043B\u0430\u0434\u0435\u043B\u0435\u0446:\n </span>\n <span class=\"text\">\n {{cert.cn}}<br/>\n {{cert.fio}}<span *ngIf=\"cert.post\">, {{cert.post}}</span>\n </span>\n </div>\n <div class=\"modal-body-info__item\">\n <span class=\"text\">\n \u0421\u0440\u043E\u043A \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F:\n </span>\n <span class=\"text\">\n {{cert.validFromDate}} - {{cert.validToDate}}\n </span>\n </div>\n <div class=\"modal-body-info__item\">\n <span class=\"text hash\">\n {{cert.thumbprint}} {{cert.isExpired ? \"(\u0438\u0441\u0442\u0435\u043A)\" : \"\"}}\n </span>\n </div>\n <button\n (click)=\"ok(cert)\"\n [disabled]=\"cert.isExpired\"\n class=\"btn btn-md\">\u0421\u043E\u0437\u0434\u0430\u0442\u044C \u043F\u043E\u0434\u043F\u0438\u0441\u044C</button>\n </div>\n </div>\n </div>\n </div>\n <div class=\"modal-footer\">\n </div>\n</div>", styles: [":host{display:contents}:host textarea{width:100%;height:600px;border:0}\n"] }]
|
|
242
254
|
}], ctorParameters: function () { return []; } });
|
|
243
255
|
|
|
244
256
|
class CryptoProTsService extends CryptoProBaseService {
|
|
@@ -414,7 +426,7 @@ class CryptoApiService extends EndpointBaseService {
|
|
|
414
426
|
return this.http.post(`${this.urlCrypto}/verify`, data);
|
|
415
427
|
}
|
|
416
428
|
validate(data) {
|
|
417
|
-
return this.http.post(`${this.urlSigner}/
|
|
429
|
+
return this.http.post(`${this.urlSigner}/cryptopro/validate`, { data });
|
|
418
430
|
}
|
|
419
431
|
}
|
|
420
432
|
CryptoApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: CryptoApiService, deps: [{ token: i1$1.HttpClient }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
@@ -555,12 +567,15 @@ class CryptoJinnProvider {
|
|
|
555
567
|
console.log('Подписанные данные', signedData);
|
|
556
568
|
}
|
|
557
569
|
if (!options?.skipServerCheck) {
|
|
558
|
-
const verifyResult = await this.cryptoApiService.
|
|
570
|
+
const verifyResult = await this.cryptoApiService.verify({
|
|
571
|
+
data: data,
|
|
572
|
+
signature: Base64.encode(signedData),
|
|
573
|
+
detached: false
|
|
574
|
+
}).toPromise();
|
|
559
575
|
return {
|
|
560
576
|
data: signedData,
|
|
561
577
|
success: verifyResult.success,
|
|
562
|
-
certificate: modalResult.selected
|
|
563
|
-
validateResult: verifyResult.validateResult
|
|
578
|
+
certificate: modalResult.selected
|
|
564
579
|
};
|
|
565
580
|
}
|
|
566
581
|
else {
|
|
@@ -602,12 +617,15 @@ class CryptoTsProvider {
|
|
|
602
617
|
}
|
|
603
618
|
const signedData = await service.sign(modalResult.selected.certificate, data);
|
|
604
619
|
if (!options?.skipServerCheck) {
|
|
605
|
-
const
|
|
620
|
+
const verifyResult = await this.cryptoApiService.verify({
|
|
621
|
+
data: data,
|
|
622
|
+
signature: Base64.encode(signedData),
|
|
623
|
+
detached: false
|
|
624
|
+
}).toPromise();
|
|
606
625
|
return {
|
|
607
626
|
data,
|
|
608
627
|
signed: signedData,
|
|
609
|
-
success:
|
|
610
|
-
validateResult: validateResult.validateResult,
|
|
628
|
+
success: verifyResult.success,
|
|
611
629
|
certificate: modalResult.selected,
|
|
612
630
|
};
|
|
613
631
|
}
|
|
@@ -616,7 +634,6 @@ class CryptoTsProvider {
|
|
|
616
634
|
data,
|
|
617
635
|
signed: signedData,
|
|
618
636
|
success: true,
|
|
619
|
-
validateResult: '',
|
|
620
637
|
certificate: modalResult.selected,
|
|
621
638
|
};
|
|
622
639
|
}
|
|
@@ -847,10 +864,10 @@ class SignModalComponent extends SimpleModalComponent {
|
|
|
847
864
|
}
|
|
848
865
|
}
|
|
849
866
|
SignModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SignModalComponent, deps: [{ token: SignProviderFactory }, { token: DownloadService }, { token: i3.AlertService }], target: i0.ɵɵFactoryTarget.Component });
|
|
850
|
-
SignModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: SignModalComponent, selector: "lib-sign-modal", usesInheritance: true, ngImport: i0, template: "<div class=\"modal-content accent-head xl\">\
|
|
867
|
+
SignModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: SignModalComponent, selector: "lib-sign-modal", usesInheritance: true, ngImport: i0, template: "<div class=\"modal-content accent-head xl\">\n <div class=\"modal-header\">\n <div class=\"modal-title uppercase\">\n <h4 class=\"ng-binding\">{{title || '\u041D\u0430\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430 \u043D\u0430 \u043F\u043E\u0434\u043F\u0438\u0441\u0430\u043D\u0438\u0435'}}</h4>\n </div>\n <span class=\"close close-click\" (click)=\"close()\">\n <svg width=\"14\" height=\"14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M13 1L1 13M1 1l12 12\" stroke=\"#3A3A3A\" stroke-width=\"1.5\" stroke-linecap=\"round\"\n stroke-linejoin=\"round\"></path>\n </svg>\n </span>\n </div>\n\n <div class=\"modal-body text-center\">\n <div class=\"widget\">\n <my-tabs>\n <app-tab tabTitle=\"\u0412\u0438\u0437\u0443\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u044F \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430\" *ngIf=\"pdfUrl\">\n <pre *ngIf=\"downloadingPdf\">\n \u041F\u043E\u0434\u043E\u0436\u0434\u0438\u0442\u0435, \u0438\u0434\u0435\u0442 \u0444\u043E\u0440\u043C\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430\n </pre>\n <iframe *ngIf=\"!downloadingPdf\" [src]=\"pdfViewUrl | safeurl\"\n title=\"webviewer\" frameborder=\"0\" width=\"100%\" height=\"800\"></iframe>\n </app-tab>\n <app-tab tabTitle=\"\u041F\u043E\u0434\u043F\u0438\u0441\u044B\u0432\u0430\u0435\u043C\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435\" *ngIf=\"xmlUrl\">\n <pre [innerText]=\"xmlToSign\"></pre>\n </app-tab>\n </my-tabs>\n </div>\n </div>\n\n <div class=\"modal-footer\">\n <div *ngIf=\"pdfUrl || xmlUrl || additionalPdfUrl\"\n class=\"modal-footer-item\">\n <a *ngIf=\"pdfUrl\"\n class=\"modal-footer-item__link\"\n target=\"_blank\"\n [href]=\"pdfUrl\">\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M18 21.25H6C5.30964 21.25 4.75 20.6904 4.75 20V4C4.75 3.30964 5.30964 2.75 6 2.75H13.1893L19.25 8.81066V20C19.25 20.6904 18.6904 21.25 18 21.25Z\"\n stroke=\"#282828\" stroke-width=\"1.5\"/>\n </svg>\n <span>\u0421\u043A\u0430\u0447\u0430\u0442\u044C \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442</span>\n </a>\n <a *ngIf=\"xmlUrl\"\n class=\"modal-footer-item__link\"\n target=\"_blank\"\n [href]=\"xmlUrl\">\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M6 16L2 12L6 8\" stroke=\"#282828\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n <path d=\"M18 16L22 12L18 8\" stroke=\"#282828\" stroke-width=\"1.5\" stroke-linecap=\"round\"\n stroke-linejoin=\"round\"/>\n <path d=\"M7.56689 19.1782L15.5669 5.32182\" stroke=\"#282828\" stroke-width=\"1.5\" stroke-linecap=\"round\"\n stroke-linejoin=\"round\"/>\n </svg>\n <span>\u0421\u043A\u0430\u0447\u0430\u0442\u044C XML-\u0434\u0430\u043D\u043D\u044B\u0435</span>\n </a>\n <a *ngIf=\"additionalPdfUrl\"\n class=\"modal-footer-item__link\"\n target=\"_blank\"\n [href]=\"additionalPdfUrl\">\n <svg width=\"24\" height=\"20\" viewBox=\"0 0 24 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M7.21404 14.2776C7.50693 13.9847 7.98181 13.9847 8.2747 14.2776L12.2747 18.2776C12.5676 18.5705 12.5676 19.0454 12.2747 19.3383C11.9818 19.6312 11.5069 19.6312 11.214 19.3383L7.21404 15.3383C6.92115 15.0454 6.92115 14.5705 7.21404 14.2776Z\" fill=\"#33373C\"/>\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M16.2747 14.2776C16.5676 14.5705 16.5676 15.0454 16.2747 15.3383L12.2747 19.3383C11.9818 19.6312 11.5069 19.6312 11.214 19.3383C10.9211 19.0454 10.9211 18.5705 11.214 18.2776L15.214 14.2776C15.5069 13.9847 15.9818 13.9847 16.2747 14.2776Z\" fill=\"#33373C\"/>\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M11.7444 9.05796C12.1586 9.05796 12.4944 9.39374 12.4944 9.80796V18.808C12.4944 19.2222 12.1586 19.558 11.7444 19.558C11.3302 19.558 10.9944 19.2222 10.9944 18.808V9.80796C10.9944 9.39374 11.3302 9.05796 11.7444 9.05796Z\" fill=\"#33373C\"/>\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M0.978206 4.66339C2.62297 1.48351 6.12559 -0.37405 9.73462 0.063407C13.146 0.476912 15.9708 2.84408 17.0094 6.05796H17.7444C20.2757 6.05796 22.4565 7.67267 23.2559 10.0708C23.2593 10.0811 23.2625 10.0915 23.2655 10.1019C23.9483 12.4917 23.1511 15.0227 21.0835 16.516C20.7477 16.7585 20.2789 16.6829 20.0364 16.3471C19.7938 16.0113 19.8695 15.5425 20.2053 15.2999C21.7333 14.1964 22.337 12.335 21.8277 10.5297C21.223 8.73647 19.6077 7.55796 17.7444 7.55796H16.4444C16.1002 7.55796 15.8002 7.32373 15.7168 6.98986C14.9919 4.0904 12.5447 1.915 9.55412 1.55251C6.56314 1.18997 3.66577 2.7324 2.31053 5.35252C0.950478 7.98196 1.3145 11.2478 3.3074 13.5125C3.58105 13.8234 3.5508 14.2974 3.23984 14.571C2.92888 14.8446 2.45498 14.8144 2.18133 14.5034C-0.225765 11.7681 -0.66174 7.83395 0.978206 4.66339Z\" fill=\"#33373C\"/>\n </svg>\n <span>{{additionalPdfUrlTitle}}</span>\n </a>\n </div>\n <div class=\"modal-footer-item\">\n <button\n class=\"mrx-btn mrx-btn-secondary mrx-btn-md wpx-120 mr-3\"\n (click)=\"cancel()\"\n >\n <div class=\"mrx-btn-label\">{{cancelLabel || '\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C'}}</div>\n </button>\n <button\n class=\"mrx-btn mrx-btn-primary mrx-btn-md\"\n [disabled]=\"disabled\"\n (click)=\"ok()\"\n >\n <div class=\"mrx-btn-label\">{{okLabel || '\u041F\u043E\u0434\u043F\u0438\u0441\u0430\u0442\u044C'}}</div>\n </button>\n </div>\n </div>\n</div>\n", styles: [":host{display:contents}:host pre{width:100%;height:600px;border:0;text-align:left;overflow-y:scroll}.modal-footer{justify-content:space-between;align-items:center}.modal-footer-item__link{display:inline-flex;align-items:center;font-family:PT Sans,sans-serif;font-weight:700;font-size:14px;line-height:160%;color:var(--Main1);margin-right:16px}.modal-footer-item__link svg{margin-right:4px}.modal-body iframe{height:600px}pre{height:600px;overflow:scroll}\n"], components: [{ type: i3.TabsComponent, selector: "my-tabs" }, { type: i3.TabComponent, selector: "app-tab", inputs: ["tabTitle", "active"] }], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "safeurl": i3.SafeUrlPipe } });
|
|
851
868
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SignModalComponent, decorators: [{
|
|
852
869
|
type: Component,
|
|
853
|
-
args: [{ selector: 'lib-sign-modal', template: "<div class=\"modal-content accent-head xl\">\
|
|
870
|
+
args: [{ selector: 'lib-sign-modal', template: "<div class=\"modal-content accent-head xl\">\n <div class=\"modal-header\">\n <div class=\"modal-title uppercase\">\n <h4 class=\"ng-binding\">{{title || '\u041D\u0430\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430 \u043D\u0430 \u043F\u043E\u0434\u043F\u0438\u0441\u0430\u043D\u0438\u0435'}}</h4>\n </div>\n <span class=\"close close-click\" (click)=\"close()\">\n <svg width=\"14\" height=\"14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M13 1L1 13M1 1l12 12\" stroke=\"#3A3A3A\" stroke-width=\"1.5\" stroke-linecap=\"round\"\n stroke-linejoin=\"round\"></path>\n </svg>\n </span>\n </div>\n\n <div class=\"modal-body text-center\">\n <div class=\"widget\">\n <my-tabs>\n <app-tab tabTitle=\"\u0412\u0438\u0437\u0443\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u044F \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430\" *ngIf=\"pdfUrl\">\n <pre *ngIf=\"downloadingPdf\">\n \u041F\u043E\u0434\u043E\u0436\u0434\u0438\u0442\u0435, \u0438\u0434\u0435\u0442 \u0444\u043E\u0440\u043C\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430\n </pre>\n <iframe *ngIf=\"!downloadingPdf\" [src]=\"pdfViewUrl | safeurl\"\n title=\"webviewer\" frameborder=\"0\" width=\"100%\" height=\"800\"></iframe>\n </app-tab>\n <app-tab tabTitle=\"\u041F\u043E\u0434\u043F\u0438\u0441\u044B\u0432\u0430\u0435\u043C\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435\" *ngIf=\"xmlUrl\">\n <pre [innerText]=\"xmlToSign\"></pre>\n </app-tab>\n </my-tabs>\n </div>\n </div>\n\n <div class=\"modal-footer\">\n <div *ngIf=\"pdfUrl || xmlUrl || additionalPdfUrl\"\n class=\"modal-footer-item\">\n <a *ngIf=\"pdfUrl\"\n class=\"modal-footer-item__link\"\n target=\"_blank\"\n [href]=\"pdfUrl\">\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M18 21.25H6C5.30964 21.25 4.75 20.6904 4.75 20V4C4.75 3.30964 5.30964 2.75 6 2.75H13.1893L19.25 8.81066V20C19.25 20.6904 18.6904 21.25 18 21.25Z\"\n stroke=\"#282828\" stroke-width=\"1.5\"/>\n </svg>\n <span>\u0421\u043A\u0430\u0447\u0430\u0442\u044C \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442</span>\n </a>\n <a *ngIf=\"xmlUrl\"\n class=\"modal-footer-item__link\"\n target=\"_blank\"\n [href]=\"xmlUrl\">\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M6 16L2 12L6 8\" stroke=\"#282828\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n <path d=\"M18 16L22 12L18 8\" stroke=\"#282828\" stroke-width=\"1.5\" stroke-linecap=\"round\"\n stroke-linejoin=\"round\"/>\n <path d=\"M7.56689 19.1782L15.5669 5.32182\" stroke=\"#282828\" stroke-width=\"1.5\" stroke-linecap=\"round\"\n stroke-linejoin=\"round\"/>\n </svg>\n <span>\u0421\u043A\u0430\u0447\u0430\u0442\u044C XML-\u0434\u0430\u043D\u043D\u044B\u0435</span>\n </a>\n <a *ngIf=\"additionalPdfUrl\"\n class=\"modal-footer-item__link\"\n target=\"_blank\"\n [href]=\"additionalPdfUrl\">\n <svg width=\"24\" height=\"20\" viewBox=\"0 0 24 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M7.21404 14.2776C7.50693 13.9847 7.98181 13.9847 8.2747 14.2776L12.2747 18.2776C12.5676 18.5705 12.5676 19.0454 12.2747 19.3383C11.9818 19.6312 11.5069 19.6312 11.214 19.3383L7.21404 15.3383C6.92115 15.0454 6.92115 14.5705 7.21404 14.2776Z\" fill=\"#33373C\"/>\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M16.2747 14.2776C16.5676 14.5705 16.5676 15.0454 16.2747 15.3383L12.2747 19.3383C11.9818 19.6312 11.5069 19.6312 11.214 19.3383C10.9211 19.0454 10.9211 18.5705 11.214 18.2776L15.214 14.2776C15.5069 13.9847 15.9818 13.9847 16.2747 14.2776Z\" fill=\"#33373C\"/>\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M11.7444 9.05796C12.1586 9.05796 12.4944 9.39374 12.4944 9.80796V18.808C12.4944 19.2222 12.1586 19.558 11.7444 19.558C11.3302 19.558 10.9944 19.2222 10.9944 18.808V9.80796C10.9944 9.39374 11.3302 9.05796 11.7444 9.05796Z\" fill=\"#33373C\"/>\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M0.978206 4.66339C2.62297 1.48351 6.12559 -0.37405 9.73462 0.063407C13.146 0.476912 15.9708 2.84408 17.0094 6.05796H17.7444C20.2757 6.05796 22.4565 7.67267 23.2559 10.0708C23.2593 10.0811 23.2625 10.0915 23.2655 10.1019C23.9483 12.4917 23.1511 15.0227 21.0835 16.516C20.7477 16.7585 20.2789 16.6829 20.0364 16.3471C19.7938 16.0113 19.8695 15.5425 20.2053 15.2999C21.7333 14.1964 22.337 12.335 21.8277 10.5297C21.223 8.73647 19.6077 7.55796 17.7444 7.55796H16.4444C16.1002 7.55796 15.8002 7.32373 15.7168 6.98986C14.9919 4.0904 12.5447 1.915 9.55412 1.55251C6.56314 1.18997 3.66577 2.7324 2.31053 5.35252C0.950478 7.98196 1.3145 11.2478 3.3074 13.5125C3.58105 13.8234 3.5508 14.2974 3.23984 14.571C2.92888 14.8446 2.45498 14.8144 2.18133 14.5034C-0.225765 11.7681 -0.66174 7.83395 0.978206 4.66339Z\" fill=\"#33373C\"/>\n </svg>\n <span>{{additionalPdfUrlTitle}}</span>\n </a>\n </div>\n <div class=\"modal-footer-item\">\n <button\n class=\"mrx-btn mrx-btn-secondary mrx-btn-md wpx-120 mr-3\"\n (click)=\"cancel()\"\n >\n <div class=\"mrx-btn-label\">{{cancelLabel || '\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C'}}</div>\n </button>\n <button\n class=\"mrx-btn mrx-btn-primary mrx-btn-md\"\n [disabled]=\"disabled\"\n (click)=\"ok()\"\n >\n <div class=\"mrx-btn-label\">{{okLabel || '\u041F\u043E\u0434\u043F\u0438\u0441\u0430\u0442\u044C'}}</div>\n </button>\n </div>\n </div>\n</div>\n", styles: [":host{display:contents}:host pre{width:100%;height:600px;border:0;text-align:left;overflow-y:scroll}.modal-footer{justify-content:space-between;align-items:center}.modal-footer-item__link{display:inline-flex;align-items:center;font-family:PT Sans,sans-serif;font-weight:700;font-size:14px;line-height:160%;color:var(--Main1);margin-right:16px}.modal-footer-item__link svg{margin-right:4px}.modal-body iframe{height:600px}pre{height:600px;overflow:scroll}\n"] }]
|
|
854
871
|
}], ctorParameters: function () { return [{ type: SignProviderFactory }, { type: DownloadService }, { type: i3.AlertService }]; } });
|
|
855
872
|
|
|
856
873
|
class SignService {
|