From f19afb00449c11aae02de8b5ff4776faa02e1341 Mon Sep 17 00:00:00 2001 From: Ildar Galeev Date: Thu, 27 Jan 2022 17:49:34 +0300 Subject: [PATCH] Delete unused modules (#23) --- package-lock.json | 1588 +---------------- package.json | 8 +- src/app/app.component.ts | 6 - src/app/app.module.ts | 4 - src/app/claim-mgt/claim-mgt-routing.module.ts | 21 - src/app/claim-mgt/claim-mgt.module.ts | 11 - .../claim-mgt/claim/claim-routing.module.ts | 23 - src/app/claim-mgt/claim/claim-statuses.ts | 10 - src/app/claim-mgt/claim/claim.component.html | 8 - src/app/claim-mgt/claim/claim.component.scss | 5 - src/app/claim-mgt/claim/claim.component.ts | 33 - src/app/claim-mgt/claim/claim.module.ts | 50 - src/app/claim-mgt/claim/claim.service.ts | 26 - .../claim/conversation/action-icon.pipe.ts | 22 - .../claim/conversation/action-name.pipe.ts | 24 - .../comment/comment.component.html | 5 - .../comment/comment.component.scss | 3 - .../conversation/comment/comment.component.ts | 12 - .../conversation/conversation.component.html | 113 -- .../conversation/conversation.component.ts | 160 -- .../claim/conversation/conversation.module.ts | 78 - .../conversation/conversation.service.ts | 62 - .../edit-unsaved-modification.component.html | 110 -- .../edit-unsaved-modification.component.ts | 42 - .../edit-unsaved-modification.module.ts | 22 - .../contractor-selector/action-type.ts | 4 - .../contractor-selector.component.html | 24 - .../contractor-selector.component.ts | 30 - .../contractor-selector.module.ts | 36 - .../contractors-table.component.html | 51 - .../contractors-table.component.scss | 20 - .../contractors-table.component.ts | 80 - .../contractor-selector/selectable-item.ts | 7 - .../contractor-selector/selector-type.pipe.ts | 19 - .../converters/index.ts | 2 - .../converters/to-contractor-modification.ts | 16 - ...to-individual-entity-party-modification.ts | 53 - .../to-international-legal-entity.ts | 14 - .../to-legal-entity-party-modification.ts | 25 - .../converters/to-russian-legal-entity.ts | 27 - .../creators/create-contract-creation.ts | 18 - .../creators/create-contractor.ts | 25 - .../create-international-bank-account.ts | 22 - .../creators/create-payout-tool-creation.ts | 34 - .../creators/create-russian-bank-account.ts | 15 - .../creators/create-shop-account-creation.ts | 10 - .../creators/create-shop-creation.ts | 36 - .../creators/index.ts | 3 - .../extract-form-checkbox-name.pipe.ts | 19 - .../extract-form-value.ts | 14 - .../extract-party-modification.component.html | 28 - .../extract-party-modification.component.ts | 38 - .../extract-party-modification.module.ts | 36 - .../extract-party-modifications.service.ts | 66 - .../conversation/file-container/download.ts | 15 - .../file-container.component.html | 6 - .../file-container.component.scss | 7 - .../file-container.component.ts | 26 - .../file-container/file-container.module.ts | 15 - .../file-container/file-container.service.ts | 50 - .../conversation/file-container/index.ts | 2 - .../file-uploader.component.html | 5 - .../file-uploader.component.scss | 3 - .../file-uploader/file-uploader.component.ts | 34 - .../file-uploader/file-uploader.module.ts | 25 - .../file-uploader/file-uploader.service.ts | 91 - .../claim/conversation/questionary.service.ts | 29 - ...uthority-confirming-document-title.pipe.ts | 20 - .../bank-account-info.component.html | 16 - .../bank-account-info.component.ts | 12 - .../questionary/bank-account-info/index.ts | 1 - .../beneficial-owner-info.component.html | 98 - .../beneficial-owner-info.component.ts | 12 - .../beneficial-owner-info/index.ts | 1 - .../contact-info/contact-info.component.html | 8 - .../contact-info/contact-info.component.ts | 12 - .../questionary/contact-info/index.ts | 1 - .../questionary/empty-default.pipe.ts | 11 - .../identity-document-info.component.html | 16 - .../identity-document-info.component.ts | 12 - .../identity-document-info/index.ts | 1 - .../claim/conversation/questionary/index.ts | 1 - .../individual-entity-info/index.ts | 1 - .../individual-entity-info.component.html | 15 - .../individual-entity-info.component.ts | 12 - .../questionary/legal-owner-info/index.ts | 1 - .../legal-owner-info.component.html | 45 - .../legal-owner-info.component.ts | 11 - .../questionary/organization-info/index.ts | 3 - .../international-entity/index.ts | 1 - .../international-entity.component.html | 19 - .../international-entity.component.ts | 12 - .../organization-info.component.html | 7 - .../organization-info.component.ts | 22 - .../organization-info/russian-entity/index.ts | 1 - .../russian-entity.component.html | 58 - .../russian-entity.component.ts | 42 - .../questionary/pdl-info/index.ts | 1 - .../pdl-info/pdl-info.component.html | 8 - .../pdl-info/pdl-info.component.ts | 11 - .../questionary/private-entity-info/index.ts | 1 - .../private-entity-info.component.html | 22 - .../private-entity-info.component.ts | 12 - .../questionary/questionary.component.html | 91 - .../questionary/questionary.component.scss | 3 - .../questionary/questionary.component.ts | 55 - .../questionary/questionary.module.ts | 64 - .../questionary/serial-number.pipe.ts | 10 - .../questionary/shop-info/index.ts | 1 - .../shop-info/shop-info.component.html | 8 - .../shop-info/shop-info.component.ts | 12 - .../conversation/questionary/yes-no.pipe.ts | 13 - .../conversation/reason/reason.component.html | 8 - .../conversation/reason/reason.component.ts | 11 - .../save-party-modifications.service.ts | 90 - .../send-comment/_send-comment-theme.scss | 9 - .../claim/conversation/send-comment/index.ts | 1 - .../send-comment/send-comment.component.html | 16 - .../send-comment/send-comment.component.scss | 9 - .../send-comment/send-comment.component.ts | 35 - .../send-comment/send-comment.service.ts | 103 -- .../add-comments-to-timeline-info.ts | 26 - .../get-claim-modification-timeline-action.ts | 39 - .../conversation/to-timeline-info/index.ts | 2 - .../to-timeline-info/model/index.ts | 2 - .../to-timeline-info/model/timeline-action.ts | 13 - .../model/timeline-item-info.ts | 14 - .../to-timeline-info/to-timeline-info.ts | 66 - .../claim/details/details.component.html | 62 - .../claim/details/details.component.ts | 57 - src/app/claim-mgt/claim/index.ts | 1 - .../extract-modifications-reducer.ts | 24 - .../claim-mgt/claim/recreate-claim/index.ts | 1 - .../recreate-claim/recreate-claim.service.ts | 87 - .../get-available-claim-statuses.ts | 25 - .../status-changer.component.html | 33 - .../status-changer.component.scss | 3 - .../status-changer.component.ts | 71 - .../status-changer/status-changer.service.ts | 114 -- .../unsaved-party-modifications/index.ts | 1 - ...unsaved-party-modifications.component.html | 18 - .../unsaved-party-modifications.component.ts | 50 - .../unsaved-party-modifications.module.ts | 26 - .../unsaved-party-modifications.service.ts | 57 - .../claim-actions.component.html | 3 - .../claim-actions/claim-actions.component.ts | 19 - src/app/claims/claims-routing.module.ts | 26 - .../claims-table/claims-table.component.html | 40 - .../claims-table/claims-table.component.scss | 7 - .../claims-table/claims-table.component.ts | 32 - src/app/claims/claims.component.html | 18 - src/app/claims/claims.component.ts | 39 - src/app/claims/claims.module.ts | 58 - .../create-claim/create-claim.component.html | 14 - .../create-claim/create-claim.component.ts | 31 - .../search-form/search-form.component.html | 13 - .../search-form/search-form.component.ts | 31 - .../claims/search-form/search-form.service.ts | 39 - src/app/document/cm-margins-to-in.spec.ts | 18 - src/app/document/cm-margins-to-in.ts | 13 - src/app/document/cm-to-in.spec.ts | 13 - src/app/document/cm-to-in.ts | 3 - src/app/document/document.module.ts | 9 - src/app/document/document.service.ts | 29 - src/app/document/fonts-config.ts | 21 - src/app/document/fonts/blob-to-base64.ts | 12 - src/app/document/fonts/font.ts | 6 - src/app/document/fonts/fonts-data.ts | 6 - src/app/document/fonts/fonts.service.ts | 48 - src/app/document/fonts/fonts.spec.ts | 40 - src/app/document/fonts/index.ts | 2 - src/app/document/fonts/to-fonts.spec.ts | 27 - src/app/document/fonts/to-fonts.ts | 20 - src/app/document/index.ts | 7 - src/app/document/pdfmake-typings.ts | 13 - .../_chargeback-details-theme.scss | 9 - ...ge-chargeback-status-dialog.component.html | 29 - ...ange-chargeback-status-dialog.component.ts | 64 - ...change-chargeback-status-dialog.service.ts | 38 - .../change-chargeback-status-dialog/index.ts | 2 - .../chargeback-details-routing.module.ts | 22 - .../chargeback-details.component.html | 75 - .../chargeback-details.component.ts | 117 -- .../chargeback-details.module.ts | 57 - .../chargeback-details.service.ts | 62 - src/app/sections/chargeback-details/index.ts | 3 - .../reopen-chargeback-dialog/index.ts | 1 - .../reopen-chargeback-dialog.component.html | 29 - .../reopen-chargeback-dialog.component.ts | 80 - .../deposit-details/deposit-details.module.ts | 4 - ...hargebacks-search-filters-store.service.ts | 38 - ...gebacks-main-search-filters.component.html | 30 - ...gebacks-main-search-filters.component.scss | 3 - ...argebacks-main-search-filters.component.ts | 47 - .../chargebacks-main-search-filters.module.ts | 52 - ...chargebacks-main-search-filters.service.ts | 44 - .../chargebacks-main-search-filters/index.ts | 2 - ...ebacks-other-search-filters.component.html | 10 - ...rgebacks-other-search-filters.component.ts | 40 - ...chargebacks-other-search-filters.module.ts | 41 - ...hargebacks-other-search-filters.service.ts | 47 - .../chargebacks-other-search-filters/index.ts | 3 - .../other-filters-dialog/index.ts | 2 - .../other-filters-dialog.component.html | 35 - .../other-filters-dialog.component.ts | 42 - .../other-filters-dialog.module.ts | 36 - .../chargebacks-search-filters/form-value.ts | 8 - .../chargebacks-search-filters/index.ts | 3 - src/app/sections/party-chargebacks/index.ts | 1 - .../party-chargebacks-routing.module.ts | 22 - .../party-chargebacks.component.html | 28 - .../party-chargebacks.component.ts | 32 - .../party-chargebacks.module.ts | 47 - .../party-claim/_party-claim-theme.scss | 2 - .../claim-changeset.component.html | 7 - .../claim-changeset.component.ts | 32 +- .../claim-changeset/claim-changeset.module.ts | 2 - .../claim-changeset.service.ts | 38 +- .../changeset/timeline-items/menu-config.ts | 5 +- .../questionary-timeline-item/index.ts | 2 - .../questionary-content.component.html | 76 - .../questionary-content.component.ts | 19 - .../questionary-timeline-item.component.html | 32 - .../questionary-timeline-item.component.ts | 53 - .../questionary-timeline-item.module.ts | 38 - .../questionary-timeline-item.service.ts | 46 - .../serial-number.pipe.ts | 10 - .../unsaved-claim-changeset.component.html | 7 - .../unsaved-claim-changeset.module.ts | 2 - .../claims-table/claims-table.component.ts | 5 - .../sections/party/party-routing.module.ts | 10 - src/app/sections/party/party.component.ts | 7 - .../payment-details.component.html | 18 - .../payment-details.component.ts | 42 +- .../payment-details/payment-details.module.ts | 4 - .../payment-refunds/refunds-search-params.ts | 3 +- .../search-table/search-table.component.ts | 5 - .../chargebacks-table.component.html | 73 - .../chargebacks-table.component.scss | 7 - .../chargebacks-table.component.ts | 73 - .../chargebacks-table.module.ts | 42 - .../fetch-chargebacks.service.ts | 49 - .../components/chargebacks-table/index.ts | 2 - .../create-chargeback-dialog.component.html | 45 - .../create-chargeback-dialog.component.ts | 76 - .../create-chargeback-dialog.module.ts | 37 - .../create-chargeback-dialog/index.ts | 2 - src/app/shared/components/index.ts | 2 - .../_extract-party-modifications-theme.scss | 5 - .../contractor-selector/action-type.ts | 4 - .../contractor-selector.component.html | 25 - .../contractor-selector.component.ts | 34 - .../contractor-selector.module.ts | 36 - .../_contractors-table-theme.scss | 5 - .../changeset-infos-to-selectable-items.ts | 15 - .../contractors-table.component.html | 59 - .../contractors-table.component.scss | 24 - .../contractors-table.component.ts | 66 - .../contractors-table.service.ts | 55 - .../items-filter-predicate.ts | 4 - .../contractor-selector/index.ts | 1 - .../contractor-selector/selectable-item.ts | 8 - .../contractor-selector/selector-type.pipe.ts | 19 - .../converters/index.ts | 2 - .../converters/to-contractor-modification.ts | 16 - ...to-individual-entity-party-modification.ts | 53 - .../to-international-legal-entity.ts | 14 - .../to-legal-entity-party-modification.ts | 26 - .../converters/to-russian-legal-entity.ts | 27 - .../creators/create-contract-creation.ts | 18 - .../creators/create-contractor.ts | 25 - .../create-international-bank-account.ts | 22 - .../creators/create-payout-tool-creation.ts | 34 - .../creators/create-russian-bank-account.ts | 15 - .../creators/create-shop-account-creation.ts | 10 - .../creators/create-shop-creation.ts | 36 - .../creators/index.ts | 3 - .../extract-form-checkbox-name.pipe.ts | 19 - .../extract-form-value.ts | 14 - .../party-modifications-extractor/index.ts | 2 - ...ifications-extractor-dialog.component.html | 29 - ...odifications-extractor-dialog.component.ts | 44 - ...-modifications-extractor-dialog.service.ts | 66 - .../party-modifications-extractor.module.ts | 36 - .../party-modifications-extractor.service.ts | 52 - .../beneficial-owner/create-company-header.ts | 12 - .../beneficial-owner/get-doc-def.ts | 174 -- .../get-individual-residency-info.ts | 21 - .../beneficial-owner/index.ts | 1 - .../create-content/create-captioned-text.ts | 31 - .../create-content/create-checkbox.ts | 86 - .../create-content/create-ending.ts | 24 - .../create-content/create-grid.ts | 33 - .../create-content/create-header.ts | 8 - .../create-content/create-headline.ts | 12 - .../create-content/create-icons.ts | 19 - .../create-content/create-paragraph.ts | 94 - .../create-content/create-table-body.ts | 17 - .../create-content/get-columns-count.ts | 8 - .../create-content/icons.ts | 6 - .../create-content/index.ts | 12 - .../create-content/text.ts | 16 - .../create-questionary/colors.ts | 1 - .../create-questionary/create-footer.ts | 40 - .../create-questionary/create-questionary.ts | 40 - .../create-questionary/create-styles.ts | 17 - .../create-table-layouts.ts | 47 - .../create-questionary/doc-def.ts | 8 - .../create-questionary/index.ts | 4 - .../get-beneficial-owner-doc-def.ts | 11 - .../get-beneficial-owners.ts | 15 - .../get-entity-questionary-doc-def.ts | 14 - .../components/questionary-document/index.ts | 2 - .../questionary-document.module.ts | 10 - .../questionary-document.service.ts | 47 - .../russian-individual-entity/get-doc-def.ts | 246 --- .../get-individual-entity-name.ts | 3 - .../russian-individual-entity/index.ts | 1 - .../get-authority-confirming-document.ts | 26 - .../russian-legal-entity/get-doc-def.ts | 297 --- .../russian-legal-entity/index.ts | 1 - .../select-data/get-business-info.ts | 32 - .../select-data/get-company-info.ts | 15 - .../select-data/get-contact-info.ts | 8 - .../select-data/get-date.ts | 5 - .../select-data/get-identity-document.ts | 22 - .../select-data/get-percent.ts | 5 - .../select-data/get-shop-location-url.ts | 7 - .../select-data/has-chief-accountant.ts | 8 - .../questionary-document/select-data/index.ts | 10 - .../select-data/simple-yes-no.ts | 6 - .../select-data/yes-no.spec.ts | 19 - .../select-data/yes-no.ts | 11 - .../shared/services/app-auth-guard/roles.ts | 5 - src/app/styles/themes/_theme.scss | 3 - src/app/thrift-services/ank/ank.module.ts | 6 - src/app/thrift-services/ank/ank.service.ts | 30 - src/app/thrift-services/ank/index.ts | 1 - src/app/thrift-services/index.ts | 2 - .../skipper/chargebacks.service.ts | 38 - src/app/thrift-services/skipper/index.ts | 3 - .../skipper/skipper-instance-utils.ts | 16 - .../thrift-services/skipper/skipper.module.ts | 8 - thrift-config.json | 2 - 344 files changed, 111 insertions(+), 10597 deletions(-) delete mode 100644 src/app/claim-mgt/claim-mgt-routing.module.ts delete mode 100644 src/app/claim-mgt/claim-mgt.module.ts delete mode 100644 src/app/claim-mgt/claim/claim-routing.module.ts delete mode 100644 src/app/claim-mgt/claim/claim-statuses.ts delete mode 100644 src/app/claim-mgt/claim/claim.component.html delete mode 100644 src/app/claim-mgt/claim/claim.component.scss delete mode 100644 src/app/claim-mgt/claim/claim.component.ts delete mode 100644 src/app/claim-mgt/claim/claim.module.ts delete mode 100644 src/app/claim-mgt/claim/claim.service.ts delete mode 100644 src/app/claim-mgt/claim/conversation/action-icon.pipe.ts delete mode 100644 src/app/claim-mgt/claim/conversation/action-name.pipe.ts delete mode 100644 src/app/claim-mgt/claim/conversation/comment/comment.component.html delete mode 100644 src/app/claim-mgt/claim/conversation/comment/comment.component.scss delete mode 100644 src/app/claim-mgt/claim/conversation/comment/comment.component.ts delete mode 100644 src/app/claim-mgt/claim/conversation/conversation.component.html delete mode 100644 src/app/claim-mgt/claim/conversation/conversation.component.ts delete mode 100644 src/app/claim-mgt/claim/conversation/conversation.module.ts delete mode 100644 src/app/claim-mgt/claim/conversation/conversation.service.ts delete mode 100644 src/app/claim-mgt/claim/conversation/edit-unsaved-modification/edit-unsaved-modification.component.html delete mode 100644 src/app/claim-mgt/claim/conversation/edit-unsaved-modification/edit-unsaved-modification.component.ts delete mode 100644 src/app/claim-mgt/claim/conversation/edit-unsaved-modification/edit-unsaved-modification.module.ts delete mode 100644 src/app/claim-mgt/claim/conversation/extract-party-modifications/contractor-selector/action-type.ts delete mode 100644 src/app/claim-mgt/claim/conversation/extract-party-modifications/contractor-selector/contractor-selector.component.html delete mode 100644 src/app/claim-mgt/claim/conversation/extract-party-modifications/contractor-selector/contractor-selector.component.ts delete mode 100644 src/app/claim-mgt/claim/conversation/extract-party-modifications/contractor-selector/contractor-selector.module.ts delete mode 100644 src/app/claim-mgt/claim/conversation/extract-party-modifications/contractor-selector/contractors-table/contractors-table.component.html delete mode 100644 src/app/claim-mgt/claim/conversation/extract-party-modifications/contractor-selector/contractors-table/contractors-table.component.scss delete mode 100644 src/app/claim-mgt/claim/conversation/extract-party-modifications/contractor-selector/contractors-table/contractors-table.component.ts delete mode 100644 src/app/claim-mgt/claim/conversation/extract-party-modifications/contractor-selector/selectable-item.ts delete mode 100644 src/app/claim-mgt/claim/conversation/extract-party-modifications/contractor-selector/selector-type.pipe.ts delete mode 100644 src/app/claim-mgt/claim/conversation/extract-party-modifications/converters/index.ts delete mode 100644 src/app/claim-mgt/claim/conversation/extract-party-modifications/converters/to-contractor-modification.ts delete mode 100644 src/app/claim-mgt/claim/conversation/extract-party-modifications/converters/to-individual-entity-party-modification.ts delete mode 100644 src/app/claim-mgt/claim/conversation/extract-party-modifications/converters/to-international-legal-entity.ts delete mode 100644 src/app/claim-mgt/claim/conversation/extract-party-modifications/converters/to-legal-entity-party-modification.ts delete mode 100644 src/app/claim-mgt/claim/conversation/extract-party-modifications/converters/to-russian-legal-entity.ts delete mode 100644 src/app/claim-mgt/claim/conversation/extract-party-modifications/creators/create-contract-creation.ts delete mode 100644 src/app/claim-mgt/claim/conversation/extract-party-modifications/creators/create-contractor.ts delete mode 100644 src/app/claim-mgt/claim/conversation/extract-party-modifications/creators/create-international-bank-account.ts delete mode 100644 src/app/claim-mgt/claim/conversation/extract-party-modifications/creators/create-payout-tool-creation.ts delete mode 100644 src/app/claim-mgt/claim/conversation/extract-party-modifications/creators/create-russian-bank-account.ts delete mode 100644 src/app/claim-mgt/claim/conversation/extract-party-modifications/creators/create-shop-account-creation.ts delete mode 100644 src/app/claim-mgt/claim/conversation/extract-party-modifications/creators/create-shop-creation.ts delete mode 100644 src/app/claim-mgt/claim/conversation/extract-party-modifications/creators/index.ts delete mode 100644 src/app/claim-mgt/claim/conversation/extract-party-modifications/extract-form-checkbox-name.pipe.ts delete mode 100644 src/app/claim-mgt/claim/conversation/extract-party-modifications/extract-form-value.ts delete mode 100644 src/app/claim-mgt/claim/conversation/extract-party-modifications/extract-party-modification.component.html delete mode 100644 src/app/claim-mgt/claim/conversation/extract-party-modifications/extract-party-modification.component.ts delete mode 100644 src/app/claim-mgt/claim/conversation/extract-party-modifications/extract-party-modification.module.ts delete mode 100644 src/app/claim-mgt/claim/conversation/extract-party-modifications/extract-party-modifications.service.ts delete mode 100644 src/app/claim-mgt/claim/conversation/file-container/download.ts delete mode 100644 src/app/claim-mgt/claim/conversation/file-container/file-container.component.html delete mode 100644 src/app/claim-mgt/claim/conversation/file-container/file-container.component.scss delete mode 100644 src/app/claim-mgt/claim/conversation/file-container/file-container.component.ts delete mode 100644 src/app/claim-mgt/claim/conversation/file-container/file-container.module.ts delete mode 100644 src/app/claim-mgt/claim/conversation/file-container/file-container.service.ts delete mode 100644 src/app/claim-mgt/claim/conversation/file-container/index.ts delete mode 100644 src/app/claim-mgt/claim/conversation/file-uploader/file-uploader.component.html delete mode 100644 src/app/claim-mgt/claim/conversation/file-uploader/file-uploader.component.scss delete mode 100644 src/app/claim-mgt/claim/conversation/file-uploader/file-uploader.component.ts delete mode 100644 src/app/claim-mgt/claim/conversation/file-uploader/file-uploader.module.ts delete mode 100644 src/app/claim-mgt/claim/conversation/file-uploader/file-uploader.service.ts delete mode 100644 src/app/claim-mgt/claim/conversation/questionary.service.ts delete mode 100644 src/app/claim-mgt/claim/conversation/questionary/authority-confirming-document-title.pipe.ts delete mode 100644 src/app/claim-mgt/claim/conversation/questionary/bank-account-info/bank-account-info.component.html delete mode 100644 src/app/claim-mgt/claim/conversation/questionary/bank-account-info/bank-account-info.component.ts delete mode 100644 src/app/claim-mgt/claim/conversation/questionary/bank-account-info/index.ts delete mode 100644 src/app/claim-mgt/claim/conversation/questionary/beneficial-owner-info/beneficial-owner-info.component.html delete mode 100644 src/app/claim-mgt/claim/conversation/questionary/beneficial-owner-info/beneficial-owner-info.component.ts delete mode 100644 src/app/claim-mgt/claim/conversation/questionary/beneficial-owner-info/index.ts delete mode 100644 src/app/claim-mgt/claim/conversation/questionary/contact-info/contact-info.component.html delete mode 100644 src/app/claim-mgt/claim/conversation/questionary/contact-info/contact-info.component.ts delete mode 100644 src/app/claim-mgt/claim/conversation/questionary/contact-info/index.ts delete mode 100644 src/app/claim-mgt/claim/conversation/questionary/empty-default.pipe.ts delete mode 100644 src/app/claim-mgt/claim/conversation/questionary/identity-document-info/identity-document-info.component.html delete mode 100644 src/app/claim-mgt/claim/conversation/questionary/identity-document-info/identity-document-info.component.ts delete mode 100644 src/app/claim-mgt/claim/conversation/questionary/identity-document-info/index.ts delete mode 100644 src/app/claim-mgt/claim/conversation/questionary/index.ts delete mode 100644 src/app/claim-mgt/claim/conversation/questionary/individual-entity-info/index.ts delete mode 100644 src/app/claim-mgt/claim/conversation/questionary/individual-entity-info/individual-entity-info.component.html delete mode 100644 src/app/claim-mgt/claim/conversation/questionary/individual-entity-info/individual-entity-info.component.ts delete mode 100644 src/app/claim-mgt/claim/conversation/questionary/legal-owner-info/index.ts delete mode 100644 src/app/claim-mgt/claim/conversation/questionary/legal-owner-info/legal-owner-info.component.html delete mode 100644 src/app/claim-mgt/claim/conversation/questionary/legal-owner-info/legal-owner-info.component.ts delete mode 100644 src/app/claim-mgt/claim/conversation/questionary/organization-info/index.ts delete mode 100644 src/app/claim-mgt/claim/conversation/questionary/organization-info/international-entity/index.ts delete mode 100644 src/app/claim-mgt/claim/conversation/questionary/organization-info/international-entity/international-entity.component.html delete mode 100644 src/app/claim-mgt/claim/conversation/questionary/organization-info/international-entity/international-entity.component.ts delete mode 100644 src/app/claim-mgt/claim/conversation/questionary/organization-info/organization-info.component.html delete mode 100644 src/app/claim-mgt/claim/conversation/questionary/organization-info/organization-info.component.ts delete mode 100644 src/app/claim-mgt/claim/conversation/questionary/organization-info/russian-entity/index.ts delete mode 100644 src/app/claim-mgt/claim/conversation/questionary/organization-info/russian-entity/russian-entity.component.html delete mode 100644 src/app/claim-mgt/claim/conversation/questionary/organization-info/russian-entity/russian-entity.component.ts delete mode 100644 src/app/claim-mgt/claim/conversation/questionary/pdl-info/index.ts delete mode 100644 src/app/claim-mgt/claim/conversation/questionary/pdl-info/pdl-info.component.html delete mode 100644 src/app/claim-mgt/claim/conversation/questionary/pdl-info/pdl-info.component.ts delete mode 100644 src/app/claim-mgt/claim/conversation/questionary/private-entity-info/index.ts delete mode 100644 src/app/claim-mgt/claim/conversation/questionary/private-entity-info/private-entity-info.component.html delete mode 100644 src/app/claim-mgt/claim/conversation/questionary/private-entity-info/private-entity-info.component.ts delete mode 100644 src/app/claim-mgt/claim/conversation/questionary/questionary.component.html delete mode 100644 src/app/claim-mgt/claim/conversation/questionary/questionary.component.scss delete mode 100644 src/app/claim-mgt/claim/conversation/questionary/questionary.component.ts delete mode 100644 src/app/claim-mgt/claim/conversation/questionary/questionary.module.ts delete mode 100644 src/app/claim-mgt/claim/conversation/questionary/serial-number.pipe.ts delete mode 100644 src/app/claim-mgt/claim/conversation/questionary/shop-info/index.ts delete mode 100644 src/app/claim-mgt/claim/conversation/questionary/shop-info/shop-info.component.html delete mode 100644 src/app/claim-mgt/claim/conversation/questionary/shop-info/shop-info.component.ts delete mode 100644 src/app/claim-mgt/claim/conversation/questionary/yes-no.pipe.ts delete mode 100644 src/app/claim-mgt/claim/conversation/reason/reason.component.html delete mode 100644 src/app/claim-mgt/claim/conversation/reason/reason.component.ts delete mode 100644 src/app/claim-mgt/claim/conversation/save-party-modifications.service.ts delete mode 100644 src/app/claim-mgt/claim/conversation/send-comment/_send-comment-theme.scss delete mode 100644 src/app/claim-mgt/claim/conversation/send-comment/index.ts delete mode 100644 src/app/claim-mgt/claim/conversation/send-comment/send-comment.component.html delete mode 100644 src/app/claim-mgt/claim/conversation/send-comment/send-comment.component.scss delete mode 100644 src/app/claim-mgt/claim/conversation/send-comment/send-comment.component.ts delete mode 100644 src/app/claim-mgt/claim/conversation/send-comment/send-comment.service.ts delete mode 100644 src/app/claim-mgt/claim/conversation/to-timeline-info/add-comments-to-timeline-info.ts delete mode 100644 src/app/claim-mgt/claim/conversation/to-timeline-info/get-claim-modification-timeline-action.ts delete mode 100644 src/app/claim-mgt/claim/conversation/to-timeline-info/index.ts delete mode 100644 src/app/claim-mgt/claim/conversation/to-timeline-info/model/index.ts delete mode 100644 src/app/claim-mgt/claim/conversation/to-timeline-info/model/timeline-action.ts delete mode 100644 src/app/claim-mgt/claim/conversation/to-timeline-info/model/timeline-item-info.ts delete mode 100644 src/app/claim-mgt/claim/conversation/to-timeline-info/to-timeline-info.ts delete mode 100644 src/app/claim-mgt/claim/details/details.component.html delete mode 100644 src/app/claim-mgt/claim/details/details.component.ts delete mode 100644 src/app/claim-mgt/claim/index.ts delete mode 100644 src/app/claim-mgt/claim/recreate-claim/extract-modifications-reducer.ts delete mode 100644 src/app/claim-mgt/claim/recreate-claim/index.ts delete mode 100644 src/app/claim-mgt/claim/recreate-claim/recreate-claim.service.ts delete mode 100644 src/app/claim-mgt/claim/status-changer/get-available-claim-statuses.ts delete mode 100644 src/app/claim-mgt/claim/status-changer/status-changer.component.html delete mode 100644 src/app/claim-mgt/claim/status-changer/status-changer.component.scss delete mode 100644 src/app/claim-mgt/claim/status-changer/status-changer.component.ts delete mode 100644 src/app/claim-mgt/claim/status-changer/status-changer.service.ts delete mode 100644 src/app/claim-mgt/claim/unsaved-party-modifications/index.ts delete mode 100644 src/app/claim-mgt/claim/unsaved-party-modifications/unsaved-party-modifications.component.html delete mode 100644 src/app/claim-mgt/claim/unsaved-party-modifications/unsaved-party-modifications.component.ts delete mode 100644 src/app/claim-mgt/claim/unsaved-party-modifications/unsaved-party-modifications.module.ts delete mode 100644 src/app/claim-mgt/claim/unsaved-party-modifications/unsaved-party-modifications.service.ts delete mode 100644 src/app/claims/claim-actions/claim-actions.component.html delete mode 100644 src/app/claims/claim-actions/claim-actions.component.ts delete mode 100644 src/app/claims/claims-routing.module.ts delete mode 100644 src/app/claims/claims-table/claims-table.component.html delete mode 100644 src/app/claims/claims-table/claims-table.component.scss delete mode 100644 src/app/claims/claims-table/claims-table.component.ts delete mode 100644 src/app/claims/claims.component.html delete mode 100644 src/app/claims/claims.component.ts delete mode 100644 src/app/claims/claims.module.ts delete mode 100644 src/app/claims/create-claim/create-claim.component.html delete mode 100644 src/app/claims/create-claim/create-claim.component.ts delete mode 100644 src/app/claims/search-form/search-form.component.html delete mode 100644 src/app/claims/search-form/search-form.component.ts delete mode 100644 src/app/claims/search-form/search-form.service.ts delete mode 100644 src/app/document/cm-margins-to-in.spec.ts delete mode 100644 src/app/document/cm-margins-to-in.ts delete mode 100644 src/app/document/cm-to-in.spec.ts delete mode 100644 src/app/document/cm-to-in.ts delete mode 100644 src/app/document/document.module.ts delete mode 100644 src/app/document/document.service.ts delete mode 100644 src/app/document/fonts-config.ts delete mode 100644 src/app/document/fonts/blob-to-base64.ts delete mode 100644 src/app/document/fonts/font.ts delete mode 100644 src/app/document/fonts/fonts-data.ts delete mode 100644 src/app/document/fonts/fonts.service.ts delete mode 100644 src/app/document/fonts/fonts.spec.ts delete mode 100644 src/app/document/fonts/index.ts delete mode 100644 src/app/document/fonts/to-fonts.spec.ts delete mode 100644 src/app/document/fonts/to-fonts.ts delete mode 100644 src/app/document/index.ts delete mode 100644 src/app/document/pdfmake-typings.ts delete mode 100644 src/app/sections/chargeback-details/_chargeback-details-theme.scss delete mode 100644 src/app/sections/chargeback-details/change-chargeback-status-dialog/change-chargeback-status-dialog.component.html delete mode 100644 src/app/sections/chargeback-details/change-chargeback-status-dialog/change-chargeback-status-dialog.component.ts delete mode 100644 src/app/sections/chargeback-details/change-chargeback-status-dialog/change-chargeback-status-dialog.service.ts delete mode 100644 src/app/sections/chargeback-details/change-chargeback-status-dialog/index.ts delete mode 100644 src/app/sections/chargeback-details/chargeback-details-routing.module.ts delete mode 100644 src/app/sections/chargeback-details/chargeback-details.component.html delete mode 100644 src/app/sections/chargeback-details/chargeback-details.component.ts delete mode 100644 src/app/sections/chargeback-details/chargeback-details.module.ts delete mode 100644 src/app/sections/chargeback-details/chargeback-details.service.ts delete mode 100644 src/app/sections/chargeback-details/index.ts delete mode 100644 src/app/sections/chargeback-details/reopen-chargeback-dialog/index.ts delete mode 100644 src/app/sections/chargeback-details/reopen-chargeback-dialog/reopen-chargeback-dialog.component.html delete mode 100644 src/app/sections/chargeback-details/reopen-chargeback-dialog/reopen-chargeback-dialog.component.ts delete mode 100644 src/app/sections/party-chargebacks/chargebacks-search-filters-store.service.ts delete mode 100644 src/app/sections/party-chargebacks/chargebacks-search-filters/chargebacks-main-search-filters/chargebacks-main-search-filters.component.html delete mode 100644 src/app/sections/party-chargebacks/chargebacks-search-filters/chargebacks-main-search-filters/chargebacks-main-search-filters.component.scss delete mode 100644 src/app/sections/party-chargebacks/chargebacks-search-filters/chargebacks-main-search-filters/chargebacks-main-search-filters.component.ts delete mode 100644 src/app/sections/party-chargebacks/chargebacks-search-filters/chargebacks-main-search-filters/chargebacks-main-search-filters.module.ts delete mode 100644 src/app/sections/party-chargebacks/chargebacks-search-filters/chargebacks-main-search-filters/chargebacks-main-search-filters.service.ts delete mode 100644 src/app/sections/party-chargebacks/chargebacks-search-filters/chargebacks-main-search-filters/index.ts delete mode 100644 src/app/sections/party-chargebacks/chargebacks-search-filters/chargebacks-other-search-filters/chargebacks-other-search-filters.component.html delete mode 100644 src/app/sections/party-chargebacks/chargebacks-search-filters/chargebacks-other-search-filters/chargebacks-other-search-filters.component.ts delete mode 100644 src/app/sections/party-chargebacks/chargebacks-search-filters/chargebacks-other-search-filters/chargebacks-other-search-filters.module.ts delete mode 100644 src/app/sections/party-chargebacks/chargebacks-search-filters/chargebacks-other-search-filters/chargebacks-other-search-filters.service.ts delete mode 100644 src/app/sections/party-chargebacks/chargebacks-search-filters/chargebacks-other-search-filters/index.ts delete mode 100644 src/app/sections/party-chargebacks/chargebacks-search-filters/chargebacks-other-search-filters/other-filters-dialog/index.ts delete mode 100644 src/app/sections/party-chargebacks/chargebacks-search-filters/chargebacks-other-search-filters/other-filters-dialog/other-filters-dialog.component.html delete mode 100644 src/app/sections/party-chargebacks/chargebacks-search-filters/chargebacks-other-search-filters/other-filters-dialog/other-filters-dialog.component.ts delete mode 100644 src/app/sections/party-chargebacks/chargebacks-search-filters/chargebacks-other-search-filters/other-filters-dialog/other-filters-dialog.module.ts delete mode 100644 src/app/sections/party-chargebacks/chargebacks-search-filters/form-value.ts delete mode 100644 src/app/sections/party-chargebacks/chargebacks-search-filters/index.ts delete mode 100644 src/app/sections/party-chargebacks/index.ts delete mode 100644 src/app/sections/party-chargebacks/party-chargebacks-routing.module.ts delete mode 100644 src/app/sections/party-chargebacks/party-chargebacks.component.html delete mode 100644 src/app/sections/party-chargebacks/party-chargebacks.component.ts delete mode 100644 src/app/sections/party-chargebacks/party-chargebacks.module.ts delete mode 100644 src/app/sections/party-claim/changeset/timeline-items/questionary-timeline-item/index.ts delete mode 100644 src/app/sections/party-claim/changeset/timeline-items/questionary-timeline-item/questionary-content/questionary-content.component.html delete mode 100644 src/app/sections/party-claim/changeset/timeline-items/questionary-timeline-item/questionary-content/questionary-content.component.ts delete mode 100644 src/app/sections/party-claim/changeset/timeline-items/questionary-timeline-item/questionary-timeline-item.component.html delete mode 100644 src/app/sections/party-claim/changeset/timeline-items/questionary-timeline-item/questionary-timeline-item.component.ts delete mode 100644 src/app/sections/party-claim/changeset/timeline-items/questionary-timeline-item/questionary-timeline-item.module.ts delete mode 100644 src/app/sections/party-claim/changeset/timeline-items/questionary-timeline-item/questionary-timeline-item.service.ts delete mode 100644 src/app/sections/party-claim/changeset/timeline-items/questionary-timeline-item/serial-number.pipe.ts delete mode 100644 src/app/shared/components/chargebacks-table/chargebacks-table.component.html delete mode 100644 src/app/shared/components/chargebacks-table/chargebacks-table.component.scss delete mode 100644 src/app/shared/components/chargebacks-table/chargebacks-table.component.ts delete mode 100644 src/app/shared/components/chargebacks-table/chargebacks-table.module.ts delete mode 100644 src/app/shared/components/chargebacks-table/fetch-chargebacks.service.ts delete mode 100644 src/app/shared/components/chargebacks-table/index.ts delete mode 100644 src/app/shared/components/create-chargeback-dialog/create-chargeback-dialog.component.html delete mode 100644 src/app/shared/components/create-chargeback-dialog/create-chargeback-dialog.component.ts delete mode 100644 src/app/shared/components/create-chargeback-dialog/create-chargeback-dialog.module.ts delete mode 100644 src/app/shared/components/create-chargeback-dialog/index.ts delete mode 100644 src/app/shared/components/party-modifications-extractor/_extract-party-modifications-theme.scss delete mode 100644 src/app/shared/components/party-modifications-extractor/contractor-selector/action-type.ts delete mode 100644 src/app/shared/components/party-modifications-extractor/contractor-selector/contractor-selector.component.html delete mode 100644 src/app/shared/components/party-modifications-extractor/contractor-selector/contractor-selector.component.ts delete mode 100644 src/app/shared/components/party-modifications-extractor/contractor-selector/contractor-selector.module.ts delete mode 100644 src/app/shared/components/party-modifications-extractor/contractor-selector/contractors-table/_contractors-table-theme.scss delete mode 100644 src/app/shared/components/party-modifications-extractor/contractor-selector/contractors-table/changeset-infos-to-selectable-items.ts delete mode 100644 src/app/shared/components/party-modifications-extractor/contractor-selector/contractors-table/contractors-table.component.html delete mode 100644 src/app/shared/components/party-modifications-extractor/contractor-selector/contractors-table/contractors-table.component.scss delete mode 100644 src/app/shared/components/party-modifications-extractor/contractor-selector/contractors-table/contractors-table.component.ts delete mode 100644 src/app/shared/components/party-modifications-extractor/contractor-selector/contractors-table/contractors-table.service.ts delete mode 100644 src/app/shared/components/party-modifications-extractor/contractor-selector/contractors-table/items-filter-predicate.ts delete mode 100644 src/app/shared/components/party-modifications-extractor/contractor-selector/index.ts delete mode 100644 src/app/shared/components/party-modifications-extractor/contractor-selector/selectable-item.ts delete mode 100644 src/app/shared/components/party-modifications-extractor/contractor-selector/selector-type.pipe.ts delete mode 100644 src/app/shared/components/party-modifications-extractor/converters/index.ts delete mode 100644 src/app/shared/components/party-modifications-extractor/converters/to-contractor-modification.ts delete mode 100644 src/app/shared/components/party-modifications-extractor/converters/to-individual-entity-party-modification.ts delete mode 100644 src/app/shared/components/party-modifications-extractor/converters/to-international-legal-entity.ts delete mode 100644 src/app/shared/components/party-modifications-extractor/converters/to-legal-entity-party-modification.ts delete mode 100644 src/app/shared/components/party-modifications-extractor/converters/to-russian-legal-entity.ts delete mode 100644 src/app/shared/components/party-modifications-extractor/creators/create-contract-creation.ts delete mode 100644 src/app/shared/components/party-modifications-extractor/creators/create-contractor.ts delete mode 100644 src/app/shared/components/party-modifications-extractor/creators/create-international-bank-account.ts delete mode 100644 src/app/shared/components/party-modifications-extractor/creators/create-payout-tool-creation.ts delete mode 100644 src/app/shared/components/party-modifications-extractor/creators/create-russian-bank-account.ts delete mode 100644 src/app/shared/components/party-modifications-extractor/creators/create-shop-account-creation.ts delete mode 100644 src/app/shared/components/party-modifications-extractor/creators/create-shop-creation.ts delete mode 100644 src/app/shared/components/party-modifications-extractor/creators/index.ts delete mode 100644 src/app/shared/components/party-modifications-extractor/extract-form-checkbox-name.pipe.ts delete mode 100644 src/app/shared/components/party-modifications-extractor/extract-form-value.ts delete mode 100644 src/app/shared/components/party-modifications-extractor/index.ts delete mode 100644 src/app/shared/components/party-modifications-extractor/party-modifications-extractor-dialog.component.html delete mode 100644 src/app/shared/components/party-modifications-extractor/party-modifications-extractor-dialog.component.ts delete mode 100644 src/app/shared/components/party-modifications-extractor/party-modifications-extractor-dialog.service.ts delete mode 100644 src/app/shared/components/party-modifications-extractor/party-modifications-extractor.module.ts delete mode 100644 src/app/shared/components/party-modifications-extractor/party-modifications-extractor.service.ts delete mode 100644 src/app/shared/components/questionary-document/beneficial-owner/create-company-header.ts delete mode 100644 src/app/shared/components/questionary-document/beneficial-owner/get-doc-def.ts delete mode 100644 src/app/shared/components/questionary-document/beneficial-owner/get-individual-residency-info.ts delete mode 100644 src/app/shared/components/questionary-document/beneficial-owner/index.ts delete mode 100644 src/app/shared/components/questionary-document/create-content/create-captioned-text.ts delete mode 100644 src/app/shared/components/questionary-document/create-content/create-checkbox.ts delete mode 100644 src/app/shared/components/questionary-document/create-content/create-ending.ts delete mode 100644 src/app/shared/components/questionary-document/create-content/create-grid.ts delete mode 100644 src/app/shared/components/questionary-document/create-content/create-header.ts delete mode 100644 src/app/shared/components/questionary-document/create-content/create-headline.ts delete mode 100644 src/app/shared/components/questionary-document/create-content/create-icons.ts delete mode 100644 src/app/shared/components/questionary-document/create-content/create-paragraph.ts delete mode 100644 src/app/shared/components/questionary-document/create-content/create-table-body.ts delete mode 100644 src/app/shared/components/questionary-document/create-content/get-columns-count.ts delete mode 100644 src/app/shared/components/questionary-document/create-content/icons.ts delete mode 100644 src/app/shared/components/questionary-document/create-content/index.ts delete mode 100644 src/app/shared/components/questionary-document/create-content/text.ts delete mode 100644 src/app/shared/components/questionary-document/create-questionary/colors.ts delete mode 100644 src/app/shared/components/questionary-document/create-questionary/create-footer.ts delete mode 100644 src/app/shared/components/questionary-document/create-questionary/create-questionary.ts delete mode 100644 src/app/shared/components/questionary-document/create-questionary/create-styles.ts delete mode 100644 src/app/shared/components/questionary-document/create-questionary/create-table-layouts.ts delete mode 100644 src/app/shared/components/questionary-document/create-questionary/doc-def.ts delete mode 100644 src/app/shared/components/questionary-document/create-questionary/index.ts delete mode 100644 src/app/shared/components/questionary-document/get-beneficial-owner-doc-def.ts delete mode 100644 src/app/shared/components/questionary-document/get-beneficial-owners.ts delete mode 100644 src/app/shared/components/questionary-document/get-entity-questionary-doc-def.ts delete mode 100644 src/app/shared/components/questionary-document/index.ts delete mode 100644 src/app/shared/components/questionary-document/questionary-document.module.ts delete mode 100644 src/app/shared/components/questionary-document/questionary-document.service.ts delete mode 100644 src/app/shared/components/questionary-document/russian-individual-entity/get-doc-def.ts delete mode 100644 src/app/shared/components/questionary-document/russian-individual-entity/get-individual-entity-name.ts delete mode 100644 src/app/shared/components/questionary-document/russian-individual-entity/index.ts delete mode 100644 src/app/shared/components/questionary-document/russian-legal-entity/get-authority-confirming-document.ts delete mode 100644 src/app/shared/components/questionary-document/russian-legal-entity/get-doc-def.ts delete mode 100644 src/app/shared/components/questionary-document/russian-legal-entity/index.ts delete mode 100644 src/app/shared/components/questionary-document/select-data/get-business-info.ts delete mode 100644 src/app/shared/components/questionary-document/select-data/get-company-info.ts delete mode 100644 src/app/shared/components/questionary-document/select-data/get-contact-info.ts delete mode 100644 src/app/shared/components/questionary-document/select-data/get-date.ts delete mode 100644 src/app/shared/components/questionary-document/select-data/get-identity-document.ts delete mode 100644 src/app/shared/components/questionary-document/select-data/get-percent.ts delete mode 100644 src/app/shared/components/questionary-document/select-data/get-shop-location-url.ts delete mode 100644 src/app/shared/components/questionary-document/select-data/has-chief-accountant.ts delete mode 100644 src/app/shared/components/questionary-document/select-data/index.ts delete mode 100644 src/app/shared/components/questionary-document/select-data/simple-yes-no.ts delete mode 100644 src/app/shared/components/questionary-document/select-data/yes-no.spec.ts delete mode 100644 src/app/shared/components/questionary-document/select-data/yes-no.ts delete mode 100644 src/app/thrift-services/ank/ank.module.ts delete mode 100644 src/app/thrift-services/ank/ank.service.ts delete mode 100644 src/app/thrift-services/ank/index.ts delete mode 100644 src/app/thrift-services/skipper/chargebacks.service.ts delete mode 100644 src/app/thrift-services/skipper/index.ts delete mode 100644 src/app/thrift-services/skipper/skipper-instance-utils.ts delete mode 100644 src/app/thrift-services/skipper/skipper.module.ts diff --git a/package-lock.json b/package-lock.json index d220aa72..c8952798 100644 --- a/package-lock.json +++ b/package-lock.json @@ -41,7 +41,6 @@ "moment": "~2.22.2", "monaco-editor": "^0.21.2", "ngx-mat-select-search": "^4.0.0", - "pdfmake": "^0.1.64", "rxjs": "^6.6.3", "short-uuid": "^4.1.0", "transliteration": "^2.1.8", @@ -66,11 +65,9 @@ "@types/jwt-decode": "~2.2.1", "@types/lodash-es": "~4.17.3", "@types/node": "^16.4.12", - "@types/pdfmake": "^0.1.9", "@types/uuid": "~3.4.3", "@typescript-eslint/eslint-plugin": "^5.8.0", "@typescript-eslint/parser": "~5.8.0", - "ank-proto": "github:valitydev/ank-proto#d638e44eb8632fd62f0d6730294e51637babcc78", "chalk": "^4.1.0", "concurrently": "^6.5.1", "damsel": "github:valitydev/damsel#827f692653e8110b0280a4608ff540d2662842ce", @@ -100,7 +97,6 @@ "messages-proto": "github:valitydev/messages-proto#a177efb574136961bcd0a8236b4bfc425264de29", "ngx-build-plus": "^13.0.1", "prettier": "~2.0.4", - "skipper-proto": "github:valitydev/skipper-proto#d33d87cd9080925861f755b11ee1f16378076f74", "ts-mockito": "^2.6.1", "ts-node": "~8.8.2", "typescript": "~4.5.4" @@ -4340,12 +4336,6 @@ "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==", "dev": true }, - "node_modules/@types/pdfmake": { - "version": "0.1.9", - "resolved": "https://registry.npmjs.org/@types/pdfmake/-/pdfmake-0.1.9.tgz", - "integrity": "sha512-Svf7zMp5WvitWpBFGnuNuIKYSzdt0OcddRLF9wVirZFd9zZ+UsY0tiLmWsS5p4KgTuDA9aspGYik3J88jWmDYw==", - "dev": true - }, "node_modules/@types/retry": { "version": "0.12.1", "resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.1.tgz", @@ -6035,35 +6025,6 @@ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, - "node_modules/acorn-node": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/acorn-node/-/acorn-node-1.8.2.tgz", - "integrity": "sha512-8mt+fslDufLYntIoPAaIMUe/lrbrehIiwmR3t2k9LljIzoigEPF27eLk2hy8zSGzmR/ogr7zbRKINMo1u0yh5A==", - "dependencies": { - "acorn": "^7.0.0", - "acorn-walk": "^7.0.0", - "xtend": "^4.0.2" - } - }, - "node_modules/acorn-node/node_modules/acorn": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz", - "integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-walk": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.0.0.tgz", - "integrity": "sha512-7Bv1We7ZGuU79zZbb6rRqcpxo3OY+zrdtloZWoyD8fmGX+FeXRjE+iuGkZjSXLVovLzrsvMGMy0EkwA0E0umxg==", - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/adjust-sourcemap-loader": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/adjust-sourcemap-loader/-/adjust-sourcemap-loader-4.0.0.tgz", @@ -6261,15 +6222,6 @@ "ajv": "^6.9.1" } }, - "node_modules/amdefine": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", - "optional": true, - "engines": { - "node": ">=0.4.2" - } - }, "node_modules/angular-file": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/angular-file/-/angular-file-3.0.1.tgz", @@ -6288,12 +6240,6 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz", "integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==" }, - "node_modules/ank-proto": { - "version": "1.0.0", - "resolved": "git+ssh://git@github.com/valitydev/ank-proto.git#d638e44eb8632fd62f0d6730294e51637babcc78", - "integrity": "sha512-rss8og4RaymypLwTzU7u/4ATDqqo+n7yk+eX8bNiTeQkT1rEzdp2jMuORNkRyQ6NelTc/qa67n6j2KK6EZVpiA==", - "dev": true - }, "node_modules/ansi-colors": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", @@ -6445,11 +6391,6 @@ "integrity": "sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ==", "dev": true }, - "node_modules/array-from": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/array-from/-/array-from-2.1.1.tgz", - "integrity": "sha1-z+nYwmYoudxa7MYqn12PHzUsEZU=" - }, "node_modules/array-includes": { "version": "3.1.4", "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.4.tgz", @@ -6552,84 +6493,6 @@ "node": ">=0.10.0" } }, - "node_modules/ast-transform": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/ast-transform/-/ast-transform-0.0.0.tgz", - "integrity": "sha1-dJRAWIh9goPhidlUYAlHvJj+AGI=", - "dependencies": { - "escodegen": "~1.2.0", - "esprima": "~1.0.4", - "through": "~2.3.4" - } - }, - "node_modules/ast-transform/node_modules/escodegen": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.2.0.tgz", - "integrity": "sha1-Cd55Z3kcyVi3+Jot220jRRrzJ+E=", - "dependencies": { - "esprima": "~1.0.4", - "estraverse": "~1.5.0", - "esutils": "~1.0.0" - }, - "bin": { - "escodegen": "bin/escodegen.js", - "esgenerate": "bin/esgenerate.js" - }, - "engines": { - "node": ">=0.4.0" - }, - "optionalDependencies": { - "source-map": "~0.1.30" - } - }, - "node_modules/ast-transform/node_modules/esprima": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-1.0.4.tgz", - "integrity": "sha1-n1V+CPw7TSbs6d00+Pv0drYlha0=", - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/ast-transform/node_modules/estraverse": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.5.1.tgz", - "integrity": "sha1-hno+jlip+EYYr7bC3bzZFrfLr3E=", - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/ast-transform/node_modules/esutils": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-1.0.0.tgz", - "integrity": "sha1-gVHTWOIMisx/t0XnRywAJf5JZXA=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/ast-transform/node_modules/source-map": { - "version": "0.1.43", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.43.tgz", - "integrity": "sha1-wkvBRspRfBRx9drL4lcbK3+eM0Y=", - "optional": true, - "dependencies": { - "amdefine": ">=0.0.4" - }, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/ast-types": { - "version": "0.7.8", - "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.7.8.tgz", - "integrity": "sha1-kC0uDWDQcb3NRtwRXhgJ7RHBOKk=", - "engines": { - "node": ">= 0.6" - } - }, "node_modules/async": { "version": "2.6.3", "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", @@ -7741,46 +7604,11 @@ "node": ">=8" } }, - "node_modules/brfs": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/brfs/-/brfs-2.0.2.tgz", - "integrity": "sha512-IrFjVtwu4eTJZyu8w/V2gxU7iLTtcHih67sgEdzrhjLBMHp2uYefUBfdM4k2UvcuWMgV7PQDZHSLeNWnLFKWVQ==", - "dependencies": { - "quote-stream": "^1.0.1", - "resolve": "^1.1.5", - "static-module": "^3.0.2", - "through2": "^2.0.0" - }, - "bin": { - "brfs": "bin/cmd.js" - } - }, "node_modules/brorand": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" }, - "node_modules/brotli": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/brotli/-/brotli-1.3.2.tgz", - "integrity": "sha1-UlqcrU/LqWR119OI9q7LE+7VL0Y=", - "dependencies": { - "base64-js": "^1.1.2" - } - }, - "node_modules/browser-resolve": { - "version": "1.11.3", - "resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.11.3.tgz", - "integrity": "sha512-exDi1BYWB/6raKHmDTCicQfTkqwN5fioMFV4j8BsfMU4R2DK/QfZfK7kOVkmWCNANf0snkBzqGqAJBao9gZMdQ==", - "dependencies": { - "resolve": "1.1.7" - } - }, - "node_modules/browser-resolve/node_modules/resolve": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", - "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=" - }, "node_modules/browserify-aes": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", @@ -7815,16 +7643,6 @@ "safe-buffer": "^5.1.2" } }, - "node_modules/browserify-optional": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/browserify-optional/-/browserify-optional-1.0.1.tgz", - "integrity": "sha1-HhNyLP3g2F8SFnbCpyztUzoBiGk=", - "dependencies": { - "ast-transform": "0.0.0", - "ast-types": "^0.7.0", - "browser-resolve": "^1.8.1" - } - }, "node_modules/browserify-rsa": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.1.0.tgz", @@ -7927,14 +7745,6 @@ "isarray": "^1.0.0" } }, - "node_modules/buffer-equal": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-0.0.1.tgz", - "integrity": "sha1-kbx0sR6kBbyRa8aqkI+q+ltKrEs=", - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/buffer-from": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", @@ -8077,6 +7887,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, "dependencies": { "function-bind": "^1.1.1", "get-intrinsic": "^1.0.2" @@ -9166,11 +8977,6 @@ "node": "*" } }, - "node_modules/crypto-js": { - "version": "3.1.9-1", - "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-3.1.9-1.tgz", - "integrity": "sha1-/aGedh/Ad+Af+/3G6f38WeiAbNg=" - }, "node_modules/css": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/css/-/css-3.0.0.tgz", @@ -9555,15 +9361,6 @@ "resolved": "https://registry.npmjs.org/cyclist/-/cyclist-1.0.1.tgz", "integrity": "sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk=" }, - "node_modules/d": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", - "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", - "dependencies": { - "es5-ext": "^0.10.50", - "type": "^1.0.1" - } - }, "node_modules/damsel": { "version": "1.0.0", "resolved": "git+ssh://git@github.com/valitydev/damsel.git#827f692653e8110b0280a4608ff540d2662842ce", @@ -9628,6 +9425,7 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.1.tgz", "integrity": "sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g==", + "dev": true, "dependencies": { "is-arguments": "^1.0.4", "is-date-object": "^1.0.1", @@ -9640,7 +9438,8 @@ "node_modules/deep-is": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", - "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=" + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true }, "node_modules/default-gateway": { "version": "6.0.3", @@ -9803,6 +9602,7 @@ "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "dev": true, "dependencies": { "object-keys": "^1.0.12" }, @@ -9993,11 +9793,6 @@ "integrity": "sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==", "dev": true }, - "node_modules/dfa": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/dfa/-/dfa-1.2.0.tgz", - "integrity": "sha512-ED3jP8saaweFTjeGX8HQPjeC1YYyZs98jGNZx6IiBvxW7JG5v492kamAQB3m2wop07CvU/RQmzcKr6bgcC5D/Q==" - }, "node_modules/di": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/di/-/di-0.0.1.tgz", @@ -10164,14 +9959,6 @@ "url": "https://github.com/fb55/domutils?sponsor=1" } }, - "node_modules/duplexer2": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", - "integrity": "sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=", - "dependencies": { - "readable-stream": "^2.0.2" - } - }, "node_modules/duplexify": { "version": "3.7.1", "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", @@ -10462,6 +10249,7 @@ "version": "1.19.1", "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.19.1.tgz", "integrity": "sha512-2vJ6tjA/UfqLm2MPs7jxVybLoB8i1t1Jd9R3kISld20sIxPcTbLuggQOUxeWeAvIUkduv/CfMjuh4WmiXr2v9w==", + "dev": true, "dependencies": { "call-bind": "^1.0.2", "es-to-primitive": "^1.2.1", @@ -10500,6 +10288,7 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, "dependencies": { "is-callable": "^1.1.4", "is-date-object": "^1.0.1", @@ -10509,69 +10298,6 @@ "node": ">= 0.4" } }, - "node_modules/es5-ext": { - "version": "0.10.53", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.53.tgz", - "integrity": "sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q==", - "dependencies": { - "es6-iterator": "~2.0.3", - "es6-symbol": "~3.1.3", - "next-tick": "~1.0.0" - } - }, - "node_modules/es6-iterator": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", - "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", - "dependencies": { - "d": "1", - "es5-ext": "^0.10.35", - "es6-symbol": "^3.1.1" - } - }, - "node_modules/es6-map": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/es6-map/-/es6-map-0.1.5.tgz", - "integrity": "sha1-kTbgUD3MBqMBaQ8LsU/042TpSfA=", - "dependencies": { - "d": "1", - "es5-ext": "~0.10.14", - "es6-iterator": "~2.0.1", - "es6-set": "~0.1.5", - "es6-symbol": "~3.1.1", - "event-emitter": "~0.3.5" - } - }, - "node_modules/es6-set": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/es6-set/-/es6-set-0.1.5.tgz", - "integrity": "sha1-0rPsXU2ADO2BjbU40ol02wpzzLE=", - "dependencies": { - "d": "1", - "es5-ext": "~0.10.14", - "es6-iterator": "~2.0.1", - "es6-symbol": "3.1.1", - "event-emitter": "~0.3.5" - } - }, - "node_modules/es6-set/node_modules/es6-symbol": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz", - "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", - "dependencies": { - "d": "1", - "es5-ext": "~0.10.14" - } - }, - "node_modules/es6-symbol": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", - "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", - "dependencies": { - "d": "^1.0.1", - "ext": "^1.1.2" - } - }, "node_modules/esbuild": { "version": "0.14.11", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.14.11.tgz", @@ -10871,48 +10597,6 @@ "node": ">=0.8.0" } }, - "node_modules/escodegen": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.9.1.tgz", - "integrity": "sha512-6hTjO1NAWkHnDk3OqQ4YrCuwwmGHL9S3nPlzBOUG/R44rda3wLNrfvQ5fkSGjyhHFKM7ALPKcKGrwvCLe0lC7Q==", - "dependencies": { - "esprima": "^3.1.3", - "estraverse": "^4.2.0", - "esutils": "^2.0.2", - "optionator": "^0.8.1" - }, - "bin": { - "escodegen": "bin/escodegen.js", - "esgenerate": "bin/esgenerate.js" - }, - "engines": { - "node": ">=4.0" - }, - "optionalDependencies": { - "source-map": "~0.6.1" - } - }, - "node_modules/escodegen/node_modules/esprima": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", - "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=", - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/escodegen/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "optional": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/eslint": { "version": "8.7.0", "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.7.0.tgz", @@ -11592,6 +11276,7 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, "bin": { "esparse": "bin/esparse.js", "esvalidate": "bin/esvalidate.js" @@ -11648,11 +11333,6 @@ "node": ">=4.0" } }, - "node_modules/estree-is-function": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/estree-is-function/-/estree-is-function-1.0.0.tgz", - "integrity": "sha512-nSCWn1jkSq2QAtkaVLJZY2ezwcFO161HVc174zL1KPW3RJ+O6C3eJb8Nx7OXzvhoEv+nLgSR1g71oWUHUDTrJA==" - }, "node_modules/esutils": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", @@ -11670,15 +11350,6 @@ "node": ">= 0.6" } }, - "node_modules/event-emitter": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", - "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=", - "dependencies": { - "d": "1", - "es5-ext": "~0.10.14" - } - }, "node_modules/eventemitter-asyncresource": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/eventemitter-asyncresource/-/eventemitter-asyncresource-1.0.0.tgz", @@ -11831,19 +11502,6 @@ } ] }, - "node_modules/ext": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/ext/-/ext-1.4.0.tgz", - "integrity": "sha512-Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A==", - "dependencies": { - "type": "^2.0.0" - } - }, - "node_modules/ext/node_modules/type": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/type/-/type-2.0.0.tgz", - "integrity": "sha512-KBt58xCHry4Cejnc2ISQAF7QY+ORngsWfxezO68+12hKV6lQY8P/psIkcbjeHWn7MqcgciWJyCCevFMJdIXpow==" - }, "node_modules/extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", @@ -11974,36 +11632,6 @@ "node": ">=0.10.0" } }, - "node_modules/falafel": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/falafel/-/falafel-2.1.0.tgz", - "integrity": "sha1-lrsXdh2rqU9G0AFzizzt86Z/4Gw=", - "dependencies": { - "acorn": "^5.0.0", - "foreach": "^2.0.5", - "isarray": "0.0.1", - "object-keys": "^1.0.6" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/falafel/node_modules/acorn": { - "version": "5.7.4", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.4.tgz", - "integrity": "sha512-1D++VG7BhrtvQpNbBzovKNc1FLGGEE/oGe7b9xJm/RFHMBeUaUGpluV9RLjZa47YFdPcDAenEYuq9pQPcMdLJg==", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/falafel/node_modules/isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" - }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -12058,7 +11686,8 @@ "node_modules/fast-levenshtein": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true }, "node_modules/fastest-levenshtein": { "version": "1.0.12", @@ -12305,102 +11934,6 @@ } } }, - "node_modules/fontkit": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/fontkit/-/fontkit-1.8.0.tgz", - "integrity": "sha512-EFDRCca7khfQWYu1iFhsqeABpi87f03MBdkT93ZE6YhqCdMzb5Eojb6c4dlJikGv5liuhByyzA7ikpIPTSBWbQ==", - "dependencies": { - "babel-runtime": "^6.11.6", - "brfs": "^1.4.0", - "brotli": "^1.2.0", - "browserify-optional": "^1.0.0", - "clone": "^1.0.1", - "deep-equal": "^1.0.0", - "dfa": "^1.0.0", - "restructure": "^0.5.3", - "tiny-inflate": "^1.0.2", - "unicode-properties": "^1.0.0", - "unicode-trie": "^0.3.0" - } - }, - "node_modules/fontkit/node_modules/brfs": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/brfs/-/brfs-1.6.1.tgz", - "integrity": "sha512-OfZpABRQQf+Xsmju8XE9bDjs+uU4vLREGolP7bDgcpsI17QREyZ4Bl+2KLxxx1kCgA0fAIhKQBaBYh+PEcCqYQ==", - "dependencies": { - "quote-stream": "^1.0.1", - "resolve": "^1.1.5", - "static-module": "^2.2.0", - "through2": "^2.0.0" - }, - "bin": { - "brfs": "bin/cmd.js" - } - }, - "node_modules/fontkit/node_modules/clone": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", - "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", - "engines": { - "node": ">=0.8" - } - }, - "node_modules/fontkit/node_modules/magic-string": { - "version": "0.22.5", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.22.5.tgz", - "integrity": "sha512-oreip9rJZkzvA8Qzk9HFs8fZGF/u7H/gtrE8EN6RjKJ9kh2HlC+yQ2QezifqTZfGyiuAV0dRv5a+y/8gBb1m9w==", - "dependencies": { - "vlq": "^0.2.2" - } - }, - "node_modules/fontkit/node_modules/merge-source-map": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/merge-source-map/-/merge-source-map-1.0.4.tgz", - "integrity": "sha1-pd5GU42uhNQRTMXqArR3KmNGcB8=", - "dependencies": { - "source-map": "^0.5.6" - } - }, - "node_modules/fontkit/node_modules/object-inspect": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.4.1.tgz", - "integrity": "sha512-wqdhLpfCUbEsoEwl3FXwGyv8ief1k/1aUdIPCqVnupM6e8l63BEJdiF/0swtn04/8p05tG/T0FrpTlfwvljOdw==" - }, - "node_modules/fontkit/node_modules/pako": { - "version": "0.2.9", - "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz", - "integrity": "sha1-8/dSL073gjSNqBYbrZ7P1Rv4OnU=" - }, - "node_modules/fontkit/node_modules/static-module": { - "version": "2.2.5", - "resolved": "https://registry.npmjs.org/static-module/-/static-module-2.2.5.tgz", - "integrity": "sha512-D8vv82E/Kpmz3TXHKG8PPsCPg+RAX6cbCOyvjM6x04qZtQ47EtJFVwRsdov3n5d6/6ynrOY9XB4JkaZwB2xoRQ==", - "dependencies": { - "concat-stream": "~1.6.0", - "convert-source-map": "^1.5.1", - "duplexer2": "~0.1.4", - "escodegen": "~1.9.0", - "falafel": "^2.1.0", - "has": "^1.0.1", - "magic-string": "^0.22.4", - "merge-source-map": "1.0.4", - "object-inspect": "~1.4.0", - "quote-stream": "~1.0.2", - "readable-stream": "~2.3.3", - "shallow-copy": "~0.0.1", - "static-eval": "^2.0.0", - "through2": "~2.0.3" - } - }, - "node_modules/fontkit/node_modules/unicode-trie": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/unicode-trie/-/unicode-trie-0.3.1.tgz", - "integrity": "sha1-1nHd3YkQGgi6w3tqUWEBBgIFIIU=", - "dependencies": { - "pako": "^0.2.5", - "tiny-inflate": "^1.0.0" - } - }, "node_modules/for-in": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", @@ -12409,11 +11942,6 @@ "node": ">=0.10.0" } }, - "node_modules/foreach": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", - "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=" - }, "node_modules/forwarded": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", @@ -12618,11 +12146,6 @@ "node": ">=6.9.0" } }, - "node_modules/get-assigned-identifiers": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/get-assigned-identifiers/-/get-assigned-identifiers-1.2.0.tgz", - "integrity": "sha512-mBBwmeGTrxEMO4pMaaf/uUEFHnYtwr8FTe8Y/mer4rcV/bye0qGm6pw1bGZFGStxC5O76c5ZAVBGnqHmOaJpdQ==" - }, "node_modules/get-caller-file": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", @@ -12632,6 +12155,7 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "dev": true, "dependencies": { "function-bind": "^1.1.1", "has": "^1.0.3", @@ -12665,6 +12189,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", + "dev": true, "dependencies": { "call-bind": "^1.0.2", "get-intrinsic": "^1.1.1" @@ -12812,7 +12337,8 @@ "node_modules/has-bigints": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz", - "integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==" + "integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==", + "dev": true }, "node_modules/has-flag": { "version": "3.0.0", @@ -12827,6 +12353,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", + "dev": true, "engines": { "node": ">= 0.4" }, @@ -12838,6 +12365,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "dev": true, "dependencies": { "has-symbols": "^1.0.2" }, @@ -13479,6 +13007,7 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz", "integrity": "sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==", + "dev": true, "dependencies": { "get-intrinsic": "^1.1.0", "has": "^1.0.3", @@ -13545,6 +13074,7 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.0.4.tgz", "integrity": "sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA==", + "dev": true, "engines": { "node": ">= 0.4" } @@ -13558,7 +13088,8 @@ "node_modules/is-bigint": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.1.tgz", - "integrity": "sha512-J0ELF4yHFxHy0cmSxZuheDOz2luOdVvqjwmEcj8H/L1JHeuEDSDbeRP+Dk9kFVk5RTFzbucJ2Kb9F7ixY2QaCg==" + "integrity": "sha512-J0ELF4yHFxHy0cmSxZuheDOz2luOdVvqjwmEcj8H/L1JHeuEDSDbeRP+Dk9kFVk5RTFzbucJ2Kb9F7ixY2QaCg==", + "dev": true }, "node_modules/is-binary-path": { "version": "1.0.1", @@ -13576,6 +13107,7 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.0.tgz", "integrity": "sha512-a7Uprx8UtD+HWdyYwnD1+ExtTgqQtD2k/1yJgtXP6wnMm8byhkoTZRl+95LLThpzNZJ5aEvi46cdH+ayMFRwmA==", + "dev": true, "dependencies": { "call-bind": "^1.0.0" }, @@ -13592,6 +13124,7 @@ "version": "1.2.4", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==", + "dev": true, "engines": { "node": ">= 0.4" }, @@ -13636,6 +13169,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==", + "dev": true, "engines": { "node": ">= 0.4" } @@ -13746,6 +13280,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==", + "dev": true, "engines": { "node": ">= 0.4" } @@ -13763,6 +13298,7 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.4.tgz", "integrity": "sha512-zohwelOAur+5uXtk8O3GPQ1eAcu4ZX3UwxQhUlfFFMNpUd83gXgjbhJh6HmB6LUNV/ieOLQuDwJO3dWJosUeMw==", + "dev": true, "engines": { "node": ">= 0.4" } @@ -13812,6 +13348,7 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dev": true, "dependencies": { "call-bind": "^1.0.2", "has-tostringtag": "^1.0.0" @@ -13827,6 +13364,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.1.tgz", "integrity": "sha512-IU0NmyknYZN0rChcKhRO1X8LYz5Isj/Fsqh8NJOSf+N/hCOTwy29F32Ik7a+QszE63IdvmwdTPDd6cZ5pg4cwA==", + "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -13843,6 +13381,7 @@ "version": "1.0.7", "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "dev": true, "dependencies": { "has-tostringtag": "^1.0.0" }, @@ -13857,6 +13396,7 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", + "dev": true, "dependencies": { "has-symbols": "^1.0.1" }, @@ -13880,6 +13420,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "dev": true, "dependencies": { "call-bind": "^1.0.2" }, @@ -14672,18 +14213,6 @@ "node": ">=0.10.0" } }, - "node_modules/levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", - "dependencies": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" - }, - "engines": { - "node": ">= 0.8.0" - } - }, "node_modules/license-webpack-plugin": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/license-webpack-plugin/-/license-webpack-plugin-4.0.0.tgz", @@ -14710,24 +14239,6 @@ "node": ">=10.13.0" } }, - "node_modules/linebreak": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/linebreak/-/linebreak-1.0.2.tgz", - "integrity": "sha512-bJwSRsJeAmaZYnkcwl5sCQNfSDAhBuXxb6L27tb+qkBRtUQSSTUa5bcgCPD6hFEkRNlpWHfK7nFMmcANU7ZP1w==", - "dependencies": { - "base64-js": "0.0.8", - "brfs": "^2.0.2", - "unicode-trie": "^1.0.0" - } - }, - "node_modules/linebreak/node_modules/base64-js": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-0.0.8.tgz", - "integrity": "sha1-EQHpVE9KdrG8OybUUsqW16NeeXg=", - "engines": { - "node": ">= 0.4" - } - }, "node_modules/lines-and-columns": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", @@ -15623,11 +15134,6 @@ "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==" }, - "node_modules/next-tick": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", - "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=" - }, "node_modules/ngx-build-plus": { "version": "13.0.1", "resolved": "https://registry.npmjs.org/ngx-build-plus/-/ngx-build-plus-13.0.1.tgz", @@ -16182,6 +15688,7 @@ "version": "1.12.0", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.0.tgz", "integrity": "sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g==", + "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -16190,6 +15697,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.0.2.tgz", "integrity": "sha512-Epah+btZd5wrrfjkJZq1AOB9O6OxUQto45hzFd7lXGrpHPGE0W1k+426yrZV+k6NJOzLNNW/nVsmZdIWsAqoOQ==", + "dev": true, "engines": { "node": ">= 0.4" } @@ -16198,6 +15706,7 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true, "engines": { "node": ">= 0.4" } @@ -16217,6 +15726,7 @@ "version": "4.1.2", "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "dev": true, "dependencies": { "call-bind": "^1.0.0", "define-properties": "^1.1.3", @@ -16332,22 +15842,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/optionator": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", - "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", - "dependencies": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.6", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "word-wrap": "~1.2.3" - }, - "engines": { - "node": ">= 0.8.0" - } - }, "node_modules/ora": { "version": "5.4.1", "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", @@ -16822,39 +16316,6 @@ "node": ">=0.12" } }, - "node_modules/pdfkit": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/pdfkit/-/pdfkit-0.11.0.tgz", - "integrity": "sha512-1s9gaumXkYxcVF1iRtSmLiISF2r4nHtsTgpwXiK8Swe+xwk/1pm8FJjYqN7L3x13NsWnGyUFntWcO8vfqq+wwA==", - "dependencies": { - "crypto-js": "^3.1.9-1", - "fontkit": "^1.8.0", - "linebreak": "^1.0.2", - "png-js": "^1.0.0" - } - }, - "node_modules/pdfmake": { - "version": "0.1.64", - "resolved": "https://registry.npmjs.org/pdfmake/-/pdfmake-0.1.64.tgz", - "integrity": "sha512-mfI1+0lBRHYbi+NcB8tJaDAq33bd6NzrOmPxPregNN17M4EC5P+TEmGn3QBPLaTmKLhC+sV0WHV6sVx/KdK9GQ==", - "dependencies": { - "iconv-lite": "^0.5.1", - "linebreak": "^1.0.2", - "pdfkit": "^0.11.0", - "svg-to-pdfkit": "^0.1.8" - } - }, - "node_modules/pdfmake/node_modules/iconv-lite": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.5.1.tgz", - "integrity": "sha512-ONHr16SQvKZNSqjQT9gy5z24Jw+uqfO02/ngBSBoqChZ+W8qXX7GPRa1RoUnzGADw8K63R1BXUMzarCVQBpY8Q==", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", @@ -16948,11 +16409,6 @@ "node": ">=8" } }, - "node_modules/png-js": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/png-js/-/png-js-1.0.0.tgz", - "integrity": "sha512-k+YsbhpA9e+EFfKjTCH3VW6aoKlyNYI6NYdTfDL4CIvFnvsuO84ttonmZE7rc+v23SLTH8XX+5w/Ak9v0xGY4g==" - }, "node_modules/portfinder": { "version": "1.0.28", "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.28.tgz", @@ -19244,14 +18700,6 @@ "node": ">=0.10.0" } }, - "node_modules/prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", - "engines": { - "node": ">= 0.8.0" - } - }, "node_modules/prettier": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.0.4.tgz", @@ -19442,19 +18890,6 @@ "node": ">=0.4.x" } }, - "node_modules/quote-stream": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/quote-stream/-/quote-stream-1.0.2.tgz", - "integrity": "sha1-hJY/jJwmuULhU/7rU6rnRlK34LI=", - "dependencies": { - "buffer-equal": "0.0.1", - "minimist": "^1.1.3", - "through2": "^2.0.0" - }, - "bin": { - "quote-stream": "bin/cmd.js" - } - }, "node_modules/randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", @@ -19624,6 +19059,7 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.3.0.tgz", "integrity": "sha512-2+Q0C5g951OlYlJz6yu5/M33IcsESLlLfsyIaLJaG4FA2r4yP8MvVMJUUP/fVBkSpbbbZlS5gynbEWLipiiXiQ==", + "dev": true, "dependencies": { "define-properties": "^1.1.3", "es-abstract": "^1.17.0-next.1" @@ -19896,14 +19332,6 @@ "node": ">=8" } }, - "node_modules/restructure": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/restructure/-/restructure-0.5.4.tgz", - "integrity": "sha1-9U591WNZD7NP1r9Vh2EJrsyyjeg=", - "dependencies": { - "browserify-optional": "^1.0.0" - } - }, "node_modules/ret": { "version": "0.1.15", "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", @@ -20097,19 +19525,6 @@ "url": "https://opencollective.com/webpack" } }, - "node_modules/scope-analyzer": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/scope-analyzer/-/scope-analyzer-2.0.5.tgz", - "integrity": "sha512-+U5H0417mnTEstCD5VwOYO7V4vYuSqwqjFap40ythe67bhMFL5C3UgPwyBv7KDJsqUBIKafOD57xMlh1rN7eaw==", - "dependencies": { - "array-from": "^2.1.1", - "es6-map": "^0.1.5", - "es6-set": "^0.1.5", - "es6-symbol": "^3.1.1", - "estree-is-function": "^1.0.0", - "get-assigned-identifiers": "^1.1.0" - } - }, "node_modules/select-hose": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", @@ -20301,11 +19716,6 @@ "node": ">=8" } }, - "node_modules/shallow-copy": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/shallow-copy/-/shallow-copy-0.0.1.tgz", - "integrity": "sha1-QV9CcC1z2BAzApLMXuhurhoRoXA=" - }, "node_modules/shebang-command": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", @@ -20349,6 +19759,7 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dev": true, "dependencies": { "call-bind": "^1.0.0", "get-intrinsic": "^1.0.2", @@ -20363,13 +19774,6 @@ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==" }, - "node_modules/skipper-proto": { - "version": "1.0.0", - "resolved": "git+ssh://git@github.com/valitydev/skipper-proto.git#d33d87cd9080925861f755b11ee1f16378076f74", - "integrity": "sha512-DnConyYJCU+xXD2L+DpMWNsz3h1AkkiYhwn8R3gGQyOxgEHvDMyO9IpMXq07PLIQb+haBolPVjrZUZy3lQC/mw==", - "dev": true, - "license": "UNLICENSED" - }, "node_modules/slash": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", @@ -20908,44 +20312,6 @@ "node": ">= 8" } }, - "node_modules/static-eval": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/static-eval/-/static-eval-2.0.3.tgz", - "integrity": "sha512-zsxDGucfAh8T339sSKgpFbvg15Fms2IVaJGC+jqp0bVsxhcpM+iMeAI8weNo8dmf4OblgifTBUoyk1vGVtYw2w==", - "dependencies": { - "escodegen": "^1.11.1" - } - }, - "node_modules/static-eval/node_modules/escodegen": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.13.0.tgz", - "integrity": "sha512-eYk2dCkxR07DsHA/X2hRBj0CFAZeri/LyDMc0C8JT1Hqi6JnVpMhJ7XFITbb0+yZS3lVkaPL2oCkZ3AVmeVbMw==", - "dependencies": { - "esprima": "^4.0.1", - "estraverse": "^4.2.0", - "esutils": "^2.0.2", - "optionator": "^0.8.1" - }, - "bin": { - "escodegen": "bin/escodegen.js", - "esgenerate": "bin/esgenerate.js" - }, - "engines": { - "node": ">=4.0" - }, - "optionalDependencies": { - "source-map": "~0.6.1" - } - }, - "node_modules/static-eval/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "optional": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/static-extend": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", @@ -20969,48 +20335,6 @@ "node": ">=0.10.0" } }, - "node_modules/static-module": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/static-module/-/static-module-3.0.3.tgz", - "integrity": "sha512-RDaMYaI5o/ym0GkCqL/PlD1Pn216omp8fY81okxZ6f6JQxWW5tptOw9reXoZX85yt/scYvbWIt6uoszeyf+/MQ==", - "dependencies": { - "acorn-node": "^1.3.0", - "concat-stream": "~1.6.0", - "convert-source-map": "^1.5.1", - "duplexer2": "~0.1.4", - "escodegen": "~1.9.0", - "has": "^1.0.1", - "magic-string": "^0.22.4", - "merge-source-map": "1.0.4", - "object-inspect": "~1.4.0", - "readable-stream": "~2.3.3", - "scope-analyzer": "^2.0.1", - "shallow-copy": "~0.0.1", - "static-eval": "^2.0.2", - "through2": "~2.0.3" - } - }, - "node_modules/static-module/node_modules/magic-string": { - "version": "0.22.5", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.22.5.tgz", - "integrity": "sha512-oreip9rJZkzvA8Qzk9HFs8fZGF/u7H/gtrE8EN6RjKJ9kh2HlC+yQ2QezifqTZfGyiuAV0dRv5a+y/8gBb1m9w==", - "dependencies": { - "vlq": "^0.2.2" - } - }, - "node_modules/static-module/node_modules/merge-source-map": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/merge-source-map/-/merge-source-map-1.0.4.tgz", - "integrity": "sha1-pd5GU42uhNQRTMXqArR3KmNGcB8=", - "dependencies": { - "source-map": "^0.5.6" - } - }, - "node_modules/static-module/node_modules/object-inspect": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.4.1.tgz", - "integrity": "sha512-wqdhLpfCUbEsoEwl3FXwGyv8ief1k/1aUdIPCqVnupM6e8l63BEJdiF/0swtn04/8p05tG/T0FrpTlfwvljOdw==" - }, "node_modules/statuses": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", @@ -21140,6 +20464,7 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==", + "dev": true, "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.1.3" @@ -21152,6 +20477,7 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz", "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==", + "dev": true, "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.1.3" @@ -21300,14 +20626,6 @@ "node": ">=4" } }, - "node_modules/svg-to-pdfkit": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/svg-to-pdfkit/-/svg-to-pdfkit-0.1.8.tgz", - "integrity": "sha512-QItiGZBy5TstGy+q8mjQTMGRlDDOARXLxH+sgVm1n/LYeo0zFcQlcCh8m4zi8QxctrxB9Kue/lStc/RD5iLadQ==", - "dependencies": { - "pdfkit": ">=0.8.1" - } - }, "node_modules/symbol-observable": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-4.0.0.tgz", @@ -21499,7 +20817,8 @@ "node_modules/through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true }, "node_modules/through2": { "version": "2.0.5", @@ -21527,11 +20846,6 @@ "node": ">=0.6.0" } }, - "node_modules/tiny-inflate": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/tiny-inflate/-/tiny-inflate-1.0.3.tgz", - "integrity": "sha512-pkY1fj1cKHb2seWDy0B16HeWyczlJA9/WW3u3c4z/NiWDsO3DOU5D7nhTLE9CF0yXv/QZFY7sEJmj24dK+Rrqw==" - }, "node_modules/tmp": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", @@ -21911,22 +21225,6 @@ "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=" }, - "node_modules/type": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", - "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==" - }, - "node_modules/type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", - "dependencies": { - "prelude-ls": "~1.1.2" - }, - "engines": { - "node": ">= 0.8.0" - } - }, "node_modules/type-fest": { "version": "0.21.3", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", @@ -21999,6 +21297,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz", "integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==", + "dev": true, "dependencies": { "function-bind": "^1.1.1", "has-bigints": "^1.0.1", @@ -22037,29 +21336,6 @@ "node": ">=4" } }, - "node_modules/unicode-properties": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/unicode-properties/-/unicode-properties-1.3.1.tgz", - "integrity": "sha512-nIV3Tf3LcUEZttY/2g4ZJtGXhWwSkuLL+rCu0DIAMbjyVPj+8j5gNVz4T/sVbnQybIsd5SFGkPKg/756OY6jlA==", - "dependencies": { - "base64-js": "^1.3.0", - "unicode-trie": "^2.0.0" - } - }, - "node_modules/unicode-properties/node_modules/pako": { - "version": "0.2.9", - "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz", - "integrity": "sha1-8/dSL073gjSNqBYbrZ7P1Rv4OnU=" - }, - "node_modules/unicode-properties/node_modules/unicode-trie": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unicode-trie/-/unicode-trie-2.0.0.tgz", - "integrity": "sha512-x7bc76x0bm4prf1VLg79uhAzKw8DVboClSN5VxJuQ+LKDOVEW9CdH+VY7SP+vX7xCYQqzzgQpFqz15zeLvAtZQ==", - "dependencies": { - "pako": "^0.2.5", - "tiny-inflate": "^1.0.0" - } - }, "node_modules/unicode-property-aliases-ecmascript": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.0.0.tgz", @@ -22069,20 +21345,6 @@ "node": ">=4" } }, - "node_modules/unicode-trie": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unicode-trie/-/unicode-trie-1.0.0.tgz", - "integrity": "sha512-v5raLKsobbFbWLMoX9+bChts/VhPPj3XpkNr/HbqkirXR1DPk8eo9IYKyvk0MQZFkaoRsFj2Rmaqgi2rfAZYtA==", - "dependencies": { - "pako": "^0.2.5", - "tiny-inflate": "^1.0.0" - } - }, - "node_modules/unicode-trie/node_modules/pako": { - "version": "0.2.9", - "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz", - "integrity": "sha1-8/dSL073gjSNqBYbrZ7P1Rv4OnU=" - }, "node_modules/union-value": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", @@ -22287,11 +21549,6 @@ "node": ">= 0.8" } }, - "node_modules/vlq": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/vlq/-/vlq-0.2.3.tgz", - "integrity": "sha512-DRibZL6DsNhIgYQ+wNdWDL2SL3bKPlVrRiBqV5yuMm++op8W4kGFtaQfCs4KEJn0wBZcHVHJ3eoywX8983k1ow==" - }, "node_modules/vm-browserify": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz", @@ -23187,6 +22444,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dev": true, "dependencies": { "is-bigint": "^1.0.1", "is-boolean-object": "^1.1.0", @@ -23218,6 +22476,7 @@ "version": "1.2.3", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": true, "engines": { "node": ">=0.10.0" } @@ -26500,12 +25759,6 @@ "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==", "dev": true }, - "@types/pdfmake": { - "version": "0.1.9", - "resolved": "https://registry.npmjs.org/@types/pdfmake/-/pdfmake-0.1.9.tgz", - "integrity": "sha512-Svf7zMp5WvitWpBFGnuNuIKYSzdt0OcddRLF9wVirZFd9zZ+UsY0tiLmWsS5p4KgTuDA9aspGYik3J88jWmDYw==", - "dev": true - }, "@types/retry": { "version": "0.12.1", "resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.1.tgz", @@ -27766,28 +27019,6 @@ "dev": true, "requires": {} }, - "acorn-node": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/acorn-node/-/acorn-node-1.8.2.tgz", - "integrity": "sha512-8mt+fslDufLYntIoPAaIMUe/lrbrehIiwmR3t2k9LljIzoigEPF27eLk2hy8zSGzmR/ogr7zbRKINMo1u0yh5A==", - "requires": { - "acorn": "^7.0.0", - "acorn-walk": "^7.0.0", - "xtend": "^4.0.2" - }, - "dependencies": { - "acorn": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz", - "integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==" - } - } - }, - "acorn-walk": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.0.0.tgz", - "integrity": "sha512-7Bv1We7ZGuU79zZbb6rRqcpxo3OY+zrdtloZWoyD8fmGX+FeXRjE+iuGkZjSXLVovLzrsvMGMy0EkwA0E0umxg==" - }, "adjust-sourcemap-loader": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/adjust-sourcemap-loader/-/adjust-sourcemap-loader-4.0.0.tgz", @@ -27936,12 +27167,6 @@ "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", "requires": {} }, - "amdefine": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", - "optional": true - }, "angular-file": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/angular-file/-/angular-file-3.0.1.tgz", @@ -27962,12 +27187,6 @@ } } }, - "ank-proto": { - "version": "git+ssh://git@github.com/valitydev/ank-proto.git#d638e44eb8632fd62f0d6730294e51637babcc78", - "integrity": "sha512-rss8og4RaymypLwTzU7u/4ATDqqo+n7yk+eX8bNiTeQkT1rEzdp2jMuORNkRyQ6NelTc/qa67n6j2KK6EZVpiA==", - "dev": true, - "from": "ank-proto@github:valitydev/ank-proto#d638e44eb8632fd62f0d6730294e51637babcc78" - }, "ansi-colors": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", @@ -28082,11 +27301,6 @@ "integrity": "sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ==", "dev": true }, - "array-from": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/array-from/-/array-from-2.1.1.tgz", - "integrity": "sha1-z+nYwmYoudxa7MYqn12PHzUsEZU=" - }, "array-includes": { "version": "3.1.4", "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.4.tgz", @@ -28169,58 +27383,6 @@ "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=" }, - "ast-transform": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/ast-transform/-/ast-transform-0.0.0.tgz", - "integrity": "sha1-dJRAWIh9goPhidlUYAlHvJj+AGI=", - "requires": { - "escodegen": "~1.2.0", - "esprima": "~1.0.4", - "through": "~2.3.4" - }, - "dependencies": { - "escodegen": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.2.0.tgz", - "integrity": "sha1-Cd55Z3kcyVi3+Jot220jRRrzJ+E=", - "requires": { - "esprima": "~1.0.4", - "estraverse": "~1.5.0", - "esutils": "~1.0.0", - "source-map": "~0.1.30" - } - }, - "esprima": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-1.0.4.tgz", - "integrity": "sha1-n1V+CPw7TSbs6d00+Pv0drYlha0=" - }, - "estraverse": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.5.1.tgz", - "integrity": "sha1-hno+jlip+EYYr7bC3bzZFrfLr3E=" - }, - "esutils": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-1.0.0.tgz", - "integrity": "sha1-gVHTWOIMisx/t0XnRywAJf5JZXA=" - }, - "source-map": { - "version": "0.1.43", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.43.tgz", - "integrity": "sha1-wkvBRspRfBRx9drL4lcbK3+eM0Y=", - "optional": true, - "requires": { - "amdefine": ">=0.0.4" - } - } - } - }, - "ast-types": { - "version": "0.7.8", - "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.7.8.tgz", - "integrity": "sha1-kC0uDWDQcb3NRtwRXhgJ7RHBOKk=" - }, "async": { "version": "2.6.3", "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", @@ -29221,45 +28383,11 @@ "fill-range": "^7.0.1" } }, - "brfs": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/brfs/-/brfs-2.0.2.tgz", - "integrity": "sha512-IrFjVtwu4eTJZyu8w/V2gxU7iLTtcHih67sgEdzrhjLBMHp2uYefUBfdM4k2UvcuWMgV7PQDZHSLeNWnLFKWVQ==", - "requires": { - "quote-stream": "^1.0.1", - "resolve": "^1.1.5", - "static-module": "^3.0.2", - "through2": "^2.0.0" - } - }, "brorand": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" }, - "brotli": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/brotli/-/brotli-1.3.2.tgz", - "integrity": "sha1-UlqcrU/LqWR119OI9q7LE+7VL0Y=", - "requires": { - "base64-js": "^1.1.2" - } - }, - "browser-resolve": { - "version": "1.11.3", - "resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.11.3.tgz", - "integrity": "sha512-exDi1BYWB/6raKHmDTCicQfTkqwN5fioMFV4j8BsfMU4R2DK/QfZfK7kOVkmWCNANf0snkBzqGqAJBao9gZMdQ==", - "requires": { - "resolve": "1.1.7" - }, - "dependencies": { - "resolve": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", - "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=" - } - } - }, "browserify-aes": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", @@ -29294,16 +28422,6 @@ "safe-buffer": "^5.1.2" } }, - "browserify-optional": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/browserify-optional/-/browserify-optional-1.0.1.tgz", - "integrity": "sha1-HhNyLP3g2F8SFnbCpyztUzoBiGk=", - "requires": { - "ast-transform": "0.0.0", - "ast-types": "^0.7.0", - "browser-resolve": "^1.8.1" - } - }, "browserify-rsa": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.1.0.tgz", @@ -29381,11 +28499,6 @@ "isarray": "^1.0.0" } }, - "buffer-equal": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-0.0.1.tgz", - "integrity": "sha1-kbx0sR6kBbyRa8aqkI+q+ltKrEs=" - }, "buffer-from": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", @@ -29503,6 +28616,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, "requires": { "function-bind": "^1.1.1", "get-intrinsic": "^1.0.2" @@ -30359,11 +29473,6 @@ "randomfill": "^1.0.3" } }, - "crypto-js": { - "version": "3.1.9-1", - "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-3.1.9-1.tgz", - "integrity": "sha1-/aGedh/Ad+Af+/3G6f38WeiAbNg=" - }, "css": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/css/-/css-3.0.0.tgz", @@ -30651,15 +29760,6 @@ "resolved": "https://registry.npmjs.org/cyclist/-/cyclist-1.0.1.tgz", "integrity": "sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk=" }, - "d": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", - "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", - "requires": { - "es5-ext": "^0.10.50", - "type": "^1.0.1" - } - }, "damsel": { "version": "git+ssh://git@github.com/valitydev/damsel.git#827f692653e8110b0280a4608ff540d2662842ce", "integrity": "sha512-WL8ag0aN3o//0IYs5zn0deIIb8NpE3A/6pZoTQ6xl548cAGRROhPc21bRA6PTVTSXmfEFkX7QwUQirMZx/NTKA==", @@ -30706,6 +29806,7 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.1.tgz", "integrity": "sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g==", + "dev": true, "requires": { "is-arguments": "^1.0.4", "is-date-object": "^1.0.1", @@ -30718,7 +29819,8 @@ "deep-is": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", - "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=" + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true }, "default-gateway": { "version": "6.0.3", @@ -30837,6 +29939,7 @@ "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "dev": true, "requires": { "object-keys": "^1.0.12" } @@ -30989,11 +30092,6 @@ "integrity": "sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==", "dev": true }, - "dfa": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/dfa/-/dfa-1.2.0.tgz", - "integrity": "sha512-ED3jP8saaweFTjeGX8HQPjeC1YYyZs98jGNZx6IiBvxW7JG5v492kamAQB3m2wop07CvU/RQmzcKr6bgcC5D/Q==" - }, "di": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/di/-/di-0.0.1.tgz", @@ -31130,14 +30228,6 @@ "domhandler": "^4.2.0" } }, - "duplexer2": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", - "integrity": "sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=", - "requires": { - "readable-stream": "^2.0.2" - } - }, "duplexify": { "version": "3.7.1", "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", @@ -31369,6 +30459,7 @@ "version": "1.19.1", "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.19.1.tgz", "integrity": "sha512-2vJ6tjA/UfqLm2MPs7jxVybLoB8i1t1Jd9R3kISld20sIxPcTbLuggQOUxeWeAvIUkduv/CfMjuh4WmiXr2v9w==", + "dev": true, "requires": { "call-bind": "^1.0.2", "es-to-primitive": "^1.2.1", @@ -31401,77 +30492,13 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, "requires": { "is-callable": "^1.1.4", "is-date-object": "^1.0.1", "is-symbol": "^1.0.2" } }, - "es5-ext": { - "version": "0.10.53", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.53.tgz", - "integrity": "sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q==", - "requires": { - "es6-iterator": "~2.0.3", - "es6-symbol": "~3.1.3", - "next-tick": "~1.0.0" - } - }, - "es6-iterator": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", - "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", - "requires": { - "d": "1", - "es5-ext": "^0.10.35", - "es6-symbol": "^3.1.1" - } - }, - "es6-map": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/es6-map/-/es6-map-0.1.5.tgz", - "integrity": "sha1-kTbgUD3MBqMBaQ8LsU/042TpSfA=", - "requires": { - "d": "1", - "es5-ext": "~0.10.14", - "es6-iterator": "~2.0.1", - "es6-set": "~0.1.5", - "es6-symbol": "~3.1.1", - "event-emitter": "~0.3.5" - } - }, - "es6-set": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/es6-set/-/es6-set-0.1.5.tgz", - "integrity": "sha1-0rPsXU2ADO2BjbU40ol02wpzzLE=", - "requires": { - "d": "1", - "es5-ext": "~0.10.14", - "es6-iterator": "~2.0.1", - "es6-symbol": "3.1.1", - "event-emitter": "~0.3.5" - }, - "dependencies": { - "es6-symbol": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz", - "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", - "requires": { - "d": "1", - "es5-ext": "~0.10.14" - } - } - } - }, - "es6-symbol": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", - "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", - "requires": { - "d": "^1.0.1", - "ext": "^1.1.2" - } - }, "esbuild": { "version": "0.14.11", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.14.11.tgz", @@ -31647,31 +30674,6 @@ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" }, - "escodegen": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.9.1.tgz", - "integrity": "sha512-6hTjO1NAWkHnDk3OqQ4YrCuwwmGHL9S3nPlzBOUG/R44rda3wLNrfvQ5fkSGjyhHFKM7ALPKcKGrwvCLe0lC7Q==", - "requires": { - "esprima": "^3.1.3", - "estraverse": "^4.2.0", - "esutils": "^2.0.2", - "optionator": "^0.8.1", - "source-map": "~0.6.1" - }, - "dependencies": { - "esprima": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", - "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=" - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "optional": true - } - } - }, "eslint": { "version": "8.7.0", "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.7.0.tgz", @@ -32176,7 +31178,8 @@ "esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true }, "esquery": { "version": "1.4.0", @@ -32215,11 +31218,6 @@ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==" }, - "estree-is-function": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/estree-is-function/-/estree-is-function-1.0.0.tgz", - "integrity": "sha512-nSCWn1jkSq2QAtkaVLJZY2ezwcFO161HVc174zL1KPW3RJ+O6C3eJb8Nx7OXzvhoEv+nLgSR1g71oWUHUDTrJA==" - }, "esutils": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", @@ -32231,15 +31229,6 @@ "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", "dev": true }, - "event-emitter": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", - "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=", - "requires": { - "d": "1", - "es5-ext": "~0.10.14" - } - }, "eventemitter-asyncresource": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/eventemitter-asyncresource/-/eventemitter-asyncresource-1.0.0.tgz", @@ -32364,21 +31353,6 @@ } } }, - "ext": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/ext/-/ext-1.4.0.tgz", - "integrity": "sha512-Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A==", - "requires": { - "type": "^2.0.0" - }, - "dependencies": { - "type": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/type/-/type-2.0.0.tgz", - "integrity": "sha512-KBt58xCHry4Cejnc2ISQAF7QY+ORngsWfxezO68+12hKV6lQY8P/psIkcbjeHWn7MqcgciWJyCCevFMJdIXpow==" - } - } - }, "extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", @@ -32485,29 +31459,6 @@ } } }, - "falafel": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/falafel/-/falafel-2.1.0.tgz", - "integrity": "sha1-lrsXdh2rqU9G0AFzizzt86Z/4Gw=", - "requires": { - "acorn": "^5.0.0", - "foreach": "^2.0.5", - "isarray": "0.0.1", - "object-keys": "^1.0.6" - }, - "dependencies": { - "acorn": { - "version": "5.7.4", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.4.tgz", - "integrity": "sha512-1D++VG7BhrtvQpNbBzovKNc1FLGGEE/oGe7b9xJm/RFHMBeUaUGpluV9RLjZa47YFdPcDAenEYuq9pQPcMdLJg==" - }, - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" - } - } - }, "fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -32555,7 +31506,8 @@ "fast-levenshtein": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true }, "fastest-levenshtein": { "version": "1.0.12", @@ -32749,108 +31701,11 @@ "integrity": "sha512-HWqDgT7ZEkqRzBvc2s64vSZ/hfOceEol3ac/7tKwzuvEyWx3/4UegXh5oBOIotkGsObyk3xznnSRVADBgWSQVg==", "dev": true }, - "fontkit": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/fontkit/-/fontkit-1.8.0.tgz", - "integrity": "sha512-EFDRCca7khfQWYu1iFhsqeABpi87f03MBdkT93ZE6YhqCdMzb5Eojb6c4dlJikGv5liuhByyzA7ikpIPTSBWbQ==", - "requires": { - "babel-runtime": "^6.11.6", - "brfs": "^1.4.0", - "brotli": "^1.2.0", - "browserify-optional": "^1.0.0", - "clone": "^1.0.1", - "deep-equal": "^1.0.0", - "dfa": "^1.0.0", - "restructure": "^0.5.3", - "tiny-inflate": "^1.0.2", - "unicode-properties": "^1.0.0", - "unicode-trie": "^0.3.0" - }, - "dependencies": { - "brfs": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/brfs/-/brfs-1.6.1.tgz", - "integrity": "sha512-OfZpABRQQf+Xsmju8XE9bDjs+uU4vLREGolP7bDgcpsI17QREyZ4Bl+2KLxxx1kCgA0fAIhKQBaBYh+PEcCqYQ==", - "requires": { - "quote-stream": "^1.0.1", - "resolve": "^1.1.5", - "static-module": "^2.2.0", - "through2": "^2.0.0" - } - }, - "clone": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", - "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=" - }, - "magic-string": { - "version": "0.22.5", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.22.5.tgz", - "integrity": "sha512-oreip9rJZkzvA8Qzk9HFs8fZGF/u7H/gtrE8EN6RjKJ9kh2HlC+yQ2QezifqTZfGyiuAV0dRv5a+y/8gBb1m9w==", - "requires": { - "vlq": "^0.2.2" - } - }, - "merge-source-map": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/merge-source-map/-/merge-source-map-1.0.4.tgz", - "integrity": "sha1-pd5GU42uhNQRTMXqArR3KmNGcB8=", - "requires": { - "source-map": "^0.5.6" - } - }, - "object-inspect": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.4.1.tgz", - "integrity": "sha512-wqdhLpfCUbEsoEwl3FXwGyv8ief1k/1aUdIPCqVnupM6e8l63BEJdiF/0swtn04/8p05tG/T0FrpTlfwvljOdw==" - }, - "pako": { - "version": "0.2.9", - "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz", - "integrity": "sha1-8/dSL073gjSNqBYbrZ7P1Rv4OnU=" - }, - "static-module": { - "version": "2.2.5", - "resolved": "https://registry.npmjs.org/static-module/-/static-module-2.2.5.tgz", - "integrity": "sha512-D8vv82E/Kpmz3TXHKG8PPsCPg+RAX6cbCOyvjM6x04qZtQ47EtJFVwRsdov3n5d6/6ynrOY9XB4JkaZwB2xoRQ==", - "requires": { - "concat-stream": "~1.6.0", - "convert-source-map": "^1.5.1", - "duplexer2": "~0.1.4", - "escodegen": "~1.9.0", - "falafel": "^2.1.0", - "has": "^1.0.1", - "magic-string": "^0.22.4", - "merge-source-map": "1.0.4", - "object-inspect": "~1.4.0", - "quote-stream": "~1.0.2", - "readable-stream": "~2.3.3", - "shallow-copy": "~0.0.1", - "static-eval": "^2.0.0", - "through2": "~2.0.3" - } - }, - "unicode-trie": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/unicode-trie/-/unicode-trie-0.3.1.tgz", - "integrity": "sha1-1nHd3YkQGgi6w3tqUWEBBgIFIIU=", - "requires": { - "pako": "^0.2.5", - "tiny-inflate": "^1.0.0" - } - } - } - }, "for-in": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=" }, - "foreach": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", - "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=" - }, "forwarded": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", @@ -33016,11 +31871,6 @@ "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", "dev": true }, - "get-assigned-identifiers": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/get-assigned-identifiers/-/get-assigned-identifiers-1.2.0.tgz", - "integrity": "sha512-mBBwmeGTrxEMO4pMaaf/uUEFHnYtwr8FTe8Y/mer4rcV/bye0qGm6pw1bGZFGStxC5O76c5ZAVBGnqHmOaJpdQ==" - }, "get-caller-file": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", @@ -33030,6 +31880,7 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "dev": true, "requires": { "function-bind": "^1.1.1", "has": "^1.0.3", @@ -33054,6 +31905,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", + "dev": true, "requires": { "call-bind": "^1.0.2", "get-intrinsic": "^1.1.1" @@ -33166,7 +32018,8 @@ "has-bigints": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz", - "integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==" + "integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==", + "dev": true }, "has-flag": { "version": "3.0.0", @@ -33177,12 +32030,14 @@ "has-symbols": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", - "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==" + "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", + "dev": true }, "has-tostringtag": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "dev": true, "requires": { "has-symbols": "^1.0.2" } @@ -33704,6 +32559,7 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz", "integrity": "sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==", + "dev": true, "requires": { "get-intrinsic": "^1.1.0", "has": "^1.0.3", @@ -33756,7 +32612,8 @@ "is-arguments": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.0.4.tgz", - "integrity": "sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA==" + "integrity": "sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA==", + "dev": true }, "is-arrayish": { "version": "0.2.1", @@ -33767,7 +32624,8 @@ "is-bigint": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.1.tgz", - "integrity": "sha512-J0ELF4yHFxHy0cmSxZuheDOz2luOdVvqjwmEcj8H/L1JHeuEDSDbeRP+Dk9kFVk5RTFzbucJ2Kb9F7ixY2QaCg==" + "integrity": "sha512-J0ELF4yHFxHy0cmSxZuheDOz2luOdVvqjwmEcj8H/L1JHeuEDSDbeRP+Dk9kFVk5RTFzbucJ2Kb9F7ixY2QaCg==", + "dev": true }, "is-binary-path": { "version": "1.0.1", @@ -33782,6 +32640,7 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.0.tgz", "integrity": "sha512-a7Uprx8UtD+HWdyYwnD1+ExtTgqQtD2k/1yJgtXP6wnMm8byhkoTZRl+95LLThpzNZJ5aEvi46cdH+ayMFRwmA==", + "dev": true, "requires": { "call-bind": "^1.0.0" } @@ -33794,7 +32653,8 @@ "is-callable": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", - "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==" + "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==", + "dev": true }, "is-core-module": { "version": "2.8.1", @@ -33825,7 +32685,8 @@ "is-date-object": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", - "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==" + "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==", + "dev": true }, "is-descriptor": { "version": "0.1.6", @@ -33898,7 +32759,8 @@ "is-negative-zero": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", - "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==" + "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==", + "dev": true }, "is-number": { "version": "7.0.0", @@ -33909,7 +32771,8 @@ "is-number-object": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.4.tgz", - "integrity": "sha512-zohwelOAur+5uXtk8O3GPQ1eAcu4ZX3UwxQhUlfFFMNpUd83gXgjbhJh6HmB6LUNV/ieOLQuDwJO3dWJosUeMw==" + "integrity": "sha512-zohwelOAur+5uXtk8O3GPQ1eAcu4ZX3UwxQhUlfFFMNpUd83gXgjbhJh6HmB6LUNV/ieOLQuDwJO3dWJosUeMw==", + "dev": true }, "is-path-cwd": { "version": "2.2.0", @@ -33941,6 +32804,7 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dev": true, "requires": { "call-bind": "^1.0.2", "has-tostringtag": "^1.0.0" @@ -33949,7 +32813,8 @@ "is-shared-array-buffer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.1.tgz", - "integrity": "sha512-IU0NmyknYZN0rChcKhRO1X8LYz5Isj/Fsqh8NJOSf+N/hCOTwy29F32Ik7a+QszE63IdvmwdTPDd6cZ5pg4cwA==" + "integrity": "sha512-IU0NmyknYZN0rChcKhRO1X8LYz5Isj/Fsqh8NJOSf+N/hCOTwy29F32Ik7a+QszE63IdvmwdTPDd6cZ5pg4cwA==", + "dev": true }, "is-stream": { "version": "1.1.0", @@ -33960,6 +32825,7 @@ "version": "1.0.7", "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "dev": true, "requires": { "has-tostringtag": "^1.0.0" } @@ -33968,6 +32834,7 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", + "dev": true, "requires": { "has-symbols": "^1.0.1" } @@ -33982,6 +32849,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "dev": true, "requires": { "call-bind": "^1.0.2" } @@ -34598,15 +33466,6 @@ "klona": "^2.0.4" } }, - "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", - "requires": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" - } - }, "license-webpack-plugin": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/license-webpack-plugin/-/license-webpack-plugin-4.0.0.tgz", @@ -34624,23 +33483,6 @@ } } }, - "linebreak": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/linebreak/-/linebreak-1.0.2.tgz", - "integrity": "sha512-bJwSRsJeAmaZYnkcwl5sCQNfSDAhBuXxb6L27tb+qkBRtUQSSTUa5bcgCPD6hFEkRNlpWHfK7nFMmcANU7ZP1w==", - "requires": { - "base64-js": "0.0.8", - "brfs": "^2.0.2", - "unicode-trie": "^1.0.0" - }, - "dependencies": { - "base64-js": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-0.0.8.tgz", - "integrity": "sha1-EQHpVE9KdrG8OybUUsqW16NeeXg=" - } - } - }, "lines-and-columns": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", @@ -35375,11 +34217,6 @@ "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==" }, - "next-tick": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", - "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=" - }, "ngx-build-plus": { "version": "13.0.1", "resolved": "https://registry.npmjs.org/ngx-build-plus/-/ngx-build-plus-13.0.1.tgz", @@ -35818,17 +34655,20 @@ "object-inspect": { "version": "1.12.0", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.0.tgz", - "integrity": "sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g==" + "integrity": "sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g==", + "dev": true }, "object-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.0.2.tgz", - "integrity": "sha512-Epah+btZd5wrrfjkJZq1AOB9O6OxUQto45hzFd7lXGrpHPGE0W1k+426yrZV+k6NJOzLNNW/nVsmZdIWsAqoOQ==" + "integrity": "sha512-Epah+btZd5wrrfjkJZq1AOB9O6OxUQto45hzFd7lXGrpHPGE0W1k+426yrZV+k6NJOzLNNW/nVsmZdIWsAqoOQ==", + "dev": true }, "object-keys": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==" + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true }, "object-visit": { "version": "1.0.1", @@ -35842,6 +34682,7 @@ "version": "4.1.2", "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "dev": true, "requires": { "call-bind": "^1.0.0", "define-properties": "^1.1.3", @@ -35923,19 +34764,6 @@ "is-wsl": "^2.2.0" } }, - "optionator": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", - "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", - "requires": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.6", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "word-wrap": "~1.2.3" - } - }, "ora": { "version": "5.4.1", "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", @@ -36300,38 +35128,6 @@ "sha.js": "^2.4.8" } }, - "pdfkit": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/pdfkit/-/pdfkit-0.11.0.tgz", - "integrity": "sha512-1s9gaumXkYxcVF1iRtSmLiISF2r4nHtsTgpwXiK8Swe+xwk/1pm8FJjYqN7L3x13NsWnGyUFntWcO8vfqq+wwA==", - "requires": { - "crypto-js": "^3.1.9-1", - "fontkit": "^1.8.0", - "linebreak": "^1.0.2", - "png-js": "^1.0.0" - } - }, - "pdfmake": { - "version": "0.1.64", - "resolved": "https://registry.npmjs.org/pdfmake/-/pdfmake-0.1.64.tgz", - "integrity": "sha512-mfI1+0lBRHYbi+NcB8tJaDAq33bd6NzrOmPxPregNN17M4EC5P+TEmGn3QBPLaTmKLhC+sV0WHV6sVx/KdK9GQ==", - "requires": { - "iconv-lite": "^0.5.1", - "linebreak": "^1.0.2", - "pdfkit": "^0.11.0", - "svg-to-pdfkit": "^0.1.8" - }, - "dependencies": { - "iconv-lite": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.5.1.tgz", - "integrity": "sha512-ONHr16SQvKZNSqjQT9gy5z24Jw+uqfO02/ngBSBoqChZ+W8qXX7GPRa1RoUnzGADw8K63R1BXUMzarCVQBpY8Q==", - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - } - } - }, "picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", @@ -36401,11 +35197,6 @@ } } }, - "png-js": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/png-js/-/png-js-1.0.0.tgz", - "integrity": "sha512-k+YsbhpA9e+EFfKjTCH3VW6aoKlyNYI6NYdTfDL4CIvFnvsuO84ttonmZE7rc+v23SLTH8XX+5w/Ak9v0xGY4g==" - }, "portfinder": { "version": "1.0.28", "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.28.tgz", @@ -38176,11 +36967,6 @@ "uniq": "^1.0.1" } }, - "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=" - }, "prettier": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.0.4.tgz", @@ -38328,16 +37114,6 @@ "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=" }, - "quote-stream": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/quote-stream/-/quote-stream-1.0.2.tgz", - "integrity": "sha1-hJY/jJwmuULhU/7rU6rnRlK34LI=", - "requires": { - "buffer-equal": "0.0.1", - "minimist": "^1.1.3", - "through2": "^2.0.0" - } - }, "randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", @@ -38485,6 +37261,7 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.3.0.tgz", "integrity": "sha512-2+Q0C5g951OlYlJz6yu5/M33IcsESLlLfsyIaLJaG4FA2r4yP8MvVMJUUP/fVBkSpbbbZlS5gynbEWLipiiXiQ==", + "dev": true, "requires": { "define-properties": "^1.1.3", "es-abstract": "^1.17.0-next.1" @@ -38681,14 +37458,6 @@ "signal-exit": "^3.0.2" } }, - "restructure": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/restructure/-/restructure-0.5.4.tgz", - "integrity": "sha1-9U591WNZD7NP1r9Vh2EJrsyyjeg=", - "requires": { - "browserify-optional": "^1.0.0" - } - }, "ret": { "version": "0.1.15", "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", @@ -38826,19 +37595,6 @@ "ajv-keywords": "^3.5.2" } }, - "scope-analyzer": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/scope-analyzer/-/scope-analyzer-2.0.5.tgz", - "integrity": "sha512-+U5H0417mnTEstCD5VwOYO7V4vYuSqwqjFap40ythe67bhMFL5C3UgPwyBv7KDJsqUBIKafOD57xMlh1rN7eaw==", - "requires": { - "array-from": "^2.1.1", - "es6-map": "^0.1.5", - "es6-set": "^0.1.5", - "es6-symbol": "^3.1.1", - "estree-is-function": "^1.0.0", - "get-assigned-identifiers": "^1.1.0" - } - }, "select-hose": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", @@ -39003,11 +37759,6 @@ "kind-of": "^6.0.2" } }, - "shallow-copy": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/shallow-copy/-/shallow-copy-0.0.1.tgz", - "integrity": "sha1-QV9CcC1z2BAzApLMXuhurhoRoXA=" - }, "shebang-command": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", @@ -39041,6 +37792,7 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dev": true, "requires": { "call-bind": "^1.0.0", "get-intrinsic": "^1.0.2", @@ -39052,12 +37804,6 @@ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==" }, - "skipper-proto": { - "version": "git+ssh://git@github.com/valitydev/skipper-proto.git#d33d87cd9080925861f755b11ee1f16378076f74", - "integrity": "sha512-DnConyYJCU+xXD2L+DpMWNsz3h1AkkiYhwn8R3gGQyOxgEHvDMyO9IpMXq07PLIQb+haBolPVjrZUZy3lQC/mw==", - "dev": true, - "from": "skipper-proto@github:valitydev/skipper-proto#d33d87cd9080925861f755b11ee1f16378076f74" - }, "slash": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", @@ -39491,34 +38237,6 @@ "minipass": "^3.1.1" } }, - "static-eval": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/static-eval/-/static-eval-2.0.3.tgz", - "integrity": "sha512-zsxDGucfAh8T339sSKgpFbvg15Fms2IVaJGC+jqp0bVsxhcpM+iMeAI8weNo8dmf4OblgifTBUoyk1vGVtYw2w==", - "requires": { - "escodegen": "^1.11.1" - }, - "dependencies": { - "escodegen": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.13.0.tgz", - "integrity": "sha512-eYk2dCkxR07DsHA/X2hRBj0CFAZeri/LyDMc0C8JT1Hqi6JnVpMhJ7XFITbb0+yZS3lVkaPL2oCkZ3AVmeVbMw==", - "requires": { - "esprima": "^4.0.1", - "estraverse": "^4.2.0", - "esutils": "^2.0.2", - "optionator": "^0.8.1", - "source-map": "~0.6.1" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "optional": true - } - } - }, "static-extend": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", @@ -39538,50 +38256,6 @@ } } }, - "static-module": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/static-module/-/static-module-3.0.3.tgz", - "integrity": "sha512-RDaMYaI5o/ym0GkCqL/PlD1Pn216omp8fY81okxZ6f6JQxWW5tptOw9reXoZX85yt/scYvbWIt6uoszeyf+/MQ==", - "requires": { - "acorn-node": "^1.3.0", - "concat-stream": "~1.6.0", - "convert-source-map": "^1.5.1", - "duplexer2": "~0.1.4", - "escodegen": "~1.9.0", - "has": "^1.0.1", - "magic-string": "^0.22.4", - "merge-source-map": "1.0.4", - "object-inspect": "~1.4.0", - "readable-stream": "~2.3.3", - "scope-analyzer": "^2.0.1", - "shallow-copy": "~0.0.1", - "static-eval": "^2.0.2", - "through2": "~2.0.3" - }, - "dependencies": { - "magic-string": { - "version": "0.22.5", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.22.5.tgz", - "integrity": "sha512-oreip9rJZkzvA8Qzk9HFs8fZGF/u7H/gtrE8EN6RjKJ9kh2HlC+yQ2QezifqTZfGyiuAV0dRv5a+y/8gBb1m9w==", - "requires": { - "vlq": "^0.2.2" - } - }, - "merge-source-map": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/merge-source-map/-/merge-source-map-1.0.4.tgz", - "integrity": "sha1-pd5GU42uhNQRTMXqArR3KmNGcB8=", - "requires": { - "source-map": "^0.5.6" - } - }, - "object-inspect": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.4.1.tgz", - "integrity": "sha512-wqdhLpfCUbEsoEwl3FXwGyv8ief1k/1aUdIPCqVnupM6e8l63BEJdiF/0swtn04/8p05tG/T0FrpTlfwvljOdw==" - } - } - }, "statuses": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", @@ -39690,6 +38364,7 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==", + "dev": true, "requires": { "call-bind": "^1.0.2", "define-properties": "^1.1.3" @@ -39699,6 +38374,7 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz", "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==", + "dev": true, "requires": { "call-bind": "^1.0.2", "define-properties": "^1.1.3" @@ -39799,14 +38475,6 @@ "has-flag": "^3.0.0" } }, - "svg-to-pdfkit": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/svg-to-pdfkit/-/svg-to-pdfkit-0.1.8.tgz", - "integrity": "sha512-QItiGZBy5TstGy+q8mjQTMGRlDDOARXLxH+sgVm1n/LYeo0zFcQlcCh8m4zi8QxctrxB9Kue/lStc/RD5iLadQ==", - "requires": { - "pdfkit": ">=0.8.1" - } - }, "symbol-observable": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-4.0.0.tgz", @@ -39940,7 +38608,8 @@ "through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true }, "through2": { "version": "2.0.5", @@ -39965,11 +38634,6 @@ "setimmediate": "^1.0.4" } }, - "tiny-inflate": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/tiny-inflate/-/tiny-inflate-1.0.3.tgz", - "integrity": "sha512-pkY1fj1cKHb2seWDy0B16HeWyczlJA9/WW3u3c4z/NiWDsO3DOU5D7nhTLE9CF0yXv/QZFY7sEJmj24dK+Rrqw==" - }, "tmp": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", @@ -40263,19 +38927,6 @@ "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=" }, - "type": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", - "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==" - }, - "type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", - "requires": { - "prelude-ls": "~1.1.2" - } - }, "type-fest": { "version": "0.21.3", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", @@ -40319,6 +38970,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz", "integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==", + "dev": true, "requires": { "function-bind": "^1.1.1", "has-bigints": "^1.0.1", @@ -40348,53 +39000,12 @@ "integrity": "sha512-7Yhkc0Ye+t4PNYzOGKedDhXbYIBe1XEQYQxOPyhcXNMJ0WCABqqj6ckydd6pWRZTHV4GuCPKdBAUiMc60tsKVw==", "dev": true }, - "unicode-properties": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/unicode-properties/-/unicode-properties-1.3.1.tgz", - "integrity": "sha512-nIV3Tf3LcUEZttY/2g4ZJtGXhWwSkuLL+rCu0DIAMbjyVPj+8j5gNVz4T/sVbnQybIsd5SFGkPKg/756OY6jlA==", - "requires": { - "base64-js": "^1.3.0", - "unicode-trie": "^2.0.0" - }, - "dependencies": { - "pako": { - "version": "0.2.9", - "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz", - "integrity": "sha1-8/dSL073gjSNqBYbrZ7P1Rv4OnU=" - }, - "unicode-trie": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unicode-trie/-/unicode-trie-2.0.0.tgz", - "integrity": "sha512-x7bc76x0bm4prf1VLg79uhAzKw8DVboClSN5VxJuQ+LKDOVEW9CdH+VY7SP+vX7xCYQqzzgQpFqz15zeLvAtZQ==", - "requires": { - "pako": "^0.2.5", - "tiny-inflate": "^1.0.0" - } - } - } - }, "unicode-property-aliases-ecmascript": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.0.0.tgz", "integrity": "sha512-5Zfuy9q/DFr4tfO7ZPeVXb1aPoeQSdeFMLpYuFebehDAhbuevLs5yxSZmIFN1tP5F9Wl4IpJrYojg85/zgyZHQ==", "dev": true }, - "unicode-trie": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unicode-trie/-/unicode-trie-1.0.0.tgz", - "integrity": "sha512-v5raLKsobbFbWLMoX9+bChts/VhPPj3XpkNr/HbqkirXR1DPk8eo9IYKyvk0MQZFkaoRsFj2Rmaqgi2rfAZYtA==", - "requires": { - "pako": "^0.2.5", - "tiny-inflate": "^1.0.0" - }, - "dependencies": { - "pako": { - "version": "0.2.9", - "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz", - "integrity": "sha1-8/dSL073gjSNqBYbrZ7P1Rv4OnU=" - } - } - }, "union-value": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", @@ -40565,11 +39176,6 @@ "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", "dev": true }, - "vlq": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/vlq/-/vlq-0.2.3.tgz", - "integrity": "sha512-DRibZL6DsNhIgYQ+wNdWDL2SL3bKPlVrRiBqV5yuMm++op8W4kGFtaQfCs4KEJn0wBZcHVHJ3eoywX8983k1ow==" - }, "vm-browserify": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz", @@ -41205,6 +39811,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dev": true, "requires": { "is-bigint": "^1.0.1", "is-boolean-object": "^1.1.0", @@ -41235,7 +39842,8 @@ "word-wrap": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==" + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": true }, "worker-farm": { "version": "1.7.0", diff --git a/package.json b/package.json index 4984694a..e6d69b8a 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "start": "ng serve --proxy-config proxy.conf.js --port 4200", "build": "ng build --extra-webpack-config webpack.extra.js", "test": "ng test", - "lint-cmd": "eslint \"src/**/*.{ts,js,html}\" --max-warnings 1596", + "lint-cmd": "eslint \"src/**/*.{ts,js,html}\" --max-warnings 1307", "lint-cache-cmd": "npm run lint-cmd -- --cache", "lint": "npm run lint-cache-cmd", "lint-fix": "npm run lint-cache-cmd -- --fix", @@ -55,7 +55,6 @@ "moment": "~2.22.2", "monaco-editor": "^0.21.2", "ngx-mat-select-search": "^4.0.0", - "pdfmake": "^0.1.64", "rxjs": "^6.6.3", "short-uuid": "^4.1.0", "transliteration": "^2.1.8", @@ -80,11 +79,9 @@ "@types/jwt-decode": "~2.2.1", "@types/lodash-es": "~4.17.3", "@types/node": "^16.4.12", - "@types/pdfmake": "^0.1.9", "@types/uuid": "~3.4.3", "@typescript-eslint/eslint-plugin": "^5.8.0", "@typescript-eslint/parser": "~5.8.0", - "ank-proto": "github:valitydev/ank-proto#d638e44eb8632fd62f0d6730294e51637babcc78", "chalk": "^4.1.0", "concurrently": "^6.5.1", "damsel": "github:valitydev/damsel#827f692653e8110b0280a4608ff540d2662842ce", @@ -114,9 +111,8 @@ "messages-proto": "github:valitydev/messages-proto#a177efb574136961bcd0a8236b4bfc425264de29", "ngx-build-plus": "^13.0.1", "prettier": "~2.0.4", - "skipper-proto": "github:valitydev/skipper-proto#d33d87cd9080925861f755b11ee1f16378076f74", "ts-mockito": "^2.6.1", "ts-node": "~8.8.2", "typescript": "~4.5.4" } -} \ No newline at end of file +} diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 2506f83a..fd406c89 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -41,12 +41,6 @@ export class AppComponent implements OnInit { const menuItems = [ { name: 'Domain config', route: '/domain', activateRoles: [DomainConfigRole.Checkout] }, { name: 'Payouts', route: '/payouts', activateRoles: [PayoutRole.Read] }, - // FR-688 - // { - // name: 'Claims-Deprecated', - // route: '/claims-deprecated', - // activateRoles: [ClaimManagementRole.GetClaims], - // }, { name: 'Claims', route: '/claims', activateRoles: [ClaimManagementRole.GetClaims] }, { name: 'Payment adjustment', diff --git a/src/app/app.module.ts b/src/app/app.module.ts index f235543a..a2935c18 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -20,9 +20,7 @@ import 'moment/locale/ru'; import { AppRoutingModule } from './app-routing.module'; import { AppComponent } from './app.component'; -import { ClaimMgtModule } from './claim-mgt/claim-mgt.module'; import { ClaimModule } from './claim/claim.module'; -import { ClaimsModule } from './claims/claims.module'; import { CoreModule } from './core/core.module'; import { DomainModule } from './domain'; import icons from './icons.json'; @@ -64,7 +62,6 @@ moment.locale('en'); MatMenuModule, MatSidenavModule, MatListModule, - ClaimsModule, ClaimModule, PayoutsModule, PaymentAdjustmentModule, @@ -72,7 +69,6 @@ moment.locale('en'); RepairingModule, ThemeManagerModule, SettingsModule, - ClaimMgtModule, PartyModule, SearchPartiesModule, SearchClaimsModule, diff --git a/src/app/claim-mgt/claim-mgt-routing.module.ts b/src/app/claim-mgt/claim-mgt-routing.module.ts deleted file mode 100644 index 633045b2..00000000 --- a/src/app/claim-mgt/claim-mgt-routing.module.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { NgModule } from '@angular/core'; -import { RouterModule } from '@angular/router'; - -import { AppAuthGuardService, ClaimManagementRole } from '@cc/app/shared/services'; - -@NgModule({ - imports: [ - RouterModule.forChild([ - { - path: 'claim-mgt/party', - loadChildren: () => import('./claim').then((m) => m.ClaimModule), - canActivate: [AppAuthGuardService], - data: { - roles: [ClaimManagementRole.GetClaims], - }, - }, - ]), - ], - exports: [RouterModule], -}) -export class ClaimMgtRouting {} diff --git a/src/app/claim-mgt/claim-mgt.module.ts b/src/app/claim-mgt/claim-mgt.module.ts deleted file mode 100644 index ca7a44c0..00000000 --- a/src/app/claim-mgt/claim-mgt.module.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { NgModule } from '@angular/core'; - -import { ClaimMgtRouting } from './claim-mgt-routing.module'; - -/** - * @deprecated FR-688 - */ -@NgModule({ - imports: [ClaimMgtRouting], -}) -export class ClaimMgtModule {} diff --git a/src/app/claim-mgt/claim/claim-routing.module.ts b/src/app/claim-mgt/claim/claim-routing.module.ts deleted file mode 100644 index bf61531a..00000000 --- a/src/app/claim-mgt/claim/claim-routing.module.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { NgModule } from '@angular/core'; -import { RouterModule } from '@angular/router'; - -import { AppAuthGuardService, ClaimManagementRole } from '@cc/app/shared/services'; - -import { ClaimComponent } from './claim.component'; - -@NgModule({ - imports: [ - RouterModule.forChild([ - { - path: ':party_id/claim/:claim_id', - component: ClaimComponent, - canActivate: [AppAuthGuardService], - data: { - roles: [ClaimManagementRole.GetClaims], - }, - }, - ]), - ], - exports: [RouterModule], -}) -export class ClaimRoutingModule {} diff --git a/src/app/claim-mgt/claim/claim-statuses.ts b/src/app/claim-mgt/claim/claim-statuses.ts deleted file mode 100644 index f4ab972b..00000000 --- a/src/app/claim-mgt/claim/claim-statuses.ts +++ /dev/null @@ -1,10 +0,0 @@ -export enum ClaimStatuses { - /* eslint-disable @typescript-eslint/naming-convention */ - pending = 'pending', - review = 'review', - pending_acceptance = 'pending_acceptance', - accepted = 'accepted', - denied = 'denied', - revoked = 'revoked', - /* eslint-enable @typescript-eslint/naming-convention */ -} diff --git a/src/app/claim-mgt/claim/claim.component.html b/src/app/claim-mgt/claim/claim.component.html deleted file mode 100644 index 4cf968ec..00000000 --- a/src/app/claim-mgt/claim/claim.component.html +++ /dev/null @@ -1,8 +0,0 @@ -
-

Claim #{{ claim.id }}

- - -
diff --git a/src/app/claim-mgt/claim/claim.component.scss b/src/app/claim-mgt/claim/claim.component.scss deleted file mode 100644 index 6f13f4c7..00000000 --- a/src/app/claim-mgt/claim/claim.component.scss +++ /dev/null @@ -1,5 +0,0 @@ -.container { - padding: 20px 0 20px 0; - max-width: 890px; - margin: 0 auto; -} diff --git a/src/app/claim-mgt/claim/claim.component.ts b/src/app/claim-mgt/claim/claim.component.ts deleted file mode 100644 index 85cf6815..00000000 --- a/src/app/claim-mgt/claim/claim.component.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; -import Int64 from '@vality/thrift-ts/lib/int64'; - -import { ClaimManagementService } from '../../thrift-services/damsel/claim-management.service'; -import { ClaimService } from './claim.service'; -import { RecreateClaimService } from './recreate-claim'; - -@Component({ - templateUrl: 'claim.component.html', - styleUrls: ['claim.component.scss'], - providers: [ClaimManagementService, ClaimService, RecreateClaimService], -}) -export class ClaimComponent implements OnInit { - claim$ = this.claimService.claim$; - - constructor(private route: ActivatedRoute, private claimService: ClaimService) {} - - ngOnInit() { - this.getClaim(); - } - - conversationChanged() { - this.getClaim(); - } - - private getClaim() { - this.route.params.subscribe((params) => { - const { party_id, claim_id } = params; - this.claimService.getClaim(party_id, new Int64(Number(claim_id))); - }); - } -} diff --git a/src/app/claim-mgt/claim/claim.module.ts b/src/app/claim-mgt/claim/claim.module.ts deleted file mode 100644 index 90b88067..00000000 --- a/src/app/claim-mgt/claim/claim.module.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { CommonModule } from '@angular/common'; -import { NgModule } from '@angular/core'; -import { FlexModule } from '@angular/flex-layout'; -import { ReactiveFormsModule } from '@angular/forms'; -import { MatBottomSheetModule } from '@angular/material/bottom-sheet'; -import { MatButtonModule } from '@angular/material/button'; -import { MatCardModule } from '@angular/material/card'; -import { MatDialogModule } from '@angular/material/dialog'; -import { MatInputModule } from '@angular/material/input'; -import { MatListModule } from '@angular/material/list'; -import { MatProgressBarModule } from '@angular/material/progress-bar'; -import { MatSelectModule } from '@angular/material/select'; -import { MatStepperModule } from '@angular/material/stepper'; - -import { ApiModelPipesModule, ThriftPipesModule } from '@cc/app/shared/pipes'; -import { ConfirmActionDialogModule } from '@cc/components/confirm-action-dialog'; - -import { ClaimRoutingModule } from './claim-routing.module'; -import { ClaimComponent } from './claim.component'; -import { ConversationModule } from './conversation/conversation.module'; -import { DetailsComponent } from './details/details.component'; -import { StatusChangerComponent } from './status-changer/status-changer.component'; - -/** - * @deprecated FR-688 - */ -@NgModule({ - imports: [ - ClaimRoutingModule, - CommonModule, - MatCardModule, - FlexModule, - MatSelectModule, - ConversationModule, - MatButtonModule, - MatDialogModule, - MatProgressBarModule, - ReactiveFormsModule, - MatInputModule, - MatListModule, - MatBottomSheetModule, - MatStepperModule, - ConfirmActionDialogModule, - ThriftPipesModule, - ApiModelPipesModule, - ], - declarations: [ClaimComponent, DetailsComponent, StatusChangerComponent], - entryComponents: [StatusChangerComponent], -}) -export class ClaimModule {} diff --git a/src/app/claim-mgt/claim/claim.service.ts b/src/app/claim-mgt/claim/claim.service.ts deleted file mode 100644 index 40b3f644..00000000 --- a/src/app/claim-mgt/claim/claim.service.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { Injectable } from '@angular/core'; -import { MatSnackBar } from '@angular/material/snack-bar'; -import { Subject } from 'rxjs'; - -import { ClaimManagementService } from '../../thrift-services/damsel/claim-management.service'; -import { Claim, ClaimID } from '../../thrift-services/damsel/gen-model/claim_management'; - -@Injectable() -export class ClaimService { - claim$: Subject = new Subject(); - - constructor( - private claimManagementService: ClaimManagementService, - private snackBar: MatSnackBar - ) {} - - getClaim(partyID: string, claimID: ClaimID) { - this.claimManagementService.getClaim(partyID, claimID).subscribe( - (claim) => this.claim$.next(claim), - (e) => { - console.error(e); - this.snackBar.open('Error loading the claim', 'OK'); - } - ); - } -} diff --git a/src/app/claim-mgt/claim/conversation/action-icon.pipe.ts b/src/app/claim-mgt/claim/conversation/action-icon.pipe.ts deleted file mode 100644 index 164c5459..00000000 --- a/src/app/claim-mgt/claim/conversation/action-icon.pipe.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { Pipe, PipeTransform } from '@angular/core'; - -import { TimelineAction } from './to-timeline-info/model'; - -@Pipe({ - name: 'actionIcon', -}) -export class ActionIconPipe implements PipeTransform { - transform(action: TimelineAction): string { - return ({ - [TimelineAction.statusPending]: 'visibility', - [TimelineAction.statusReview]: 'forward', - [TimelineAction.statusRevoked]: 'close', - [TimelineAction.statusDenied]: 'close', - [TimelineAction.statusAccepted]: 'done', - [TimelineAction.filesAdded]: 'attach_file', - [TimelineAction.commentAdded]: 'mode_comment', - [TimelineAction.changesAdded]: 'add', - [TimelineAction.partyModification]: 'add', - } as const)[action]; - } -} diff --git a/src/app/claim-mgt/claim/conversation/action-name.pipe.ts b/src/app/claim-mgt/claim/conversation/action-name.pipe.ts deleted file mode 100644 index 993509da..00000000 --- a/src/app/claim-mgt/claim/conversation/action-name.pipe.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { Pipe, PipeTransform } from '@angular/core'; - -import { TimelineAction } from './to-timeline-info/model'; - -const TIMELINE_ACTION_NAME_TO_TITLE: { [N in TimelineAction]: string } = { - [TimelineAction.statusPending]: 'Changed status to Pending', - [TimelineAction.statusReview]: 'Changed status to Review', - [TimelineAction.statusRevoked]: 'Changed status to Revoked', - [TimelineAction.statusDenied]: 'Changed status to Denied', - [TimelineAction.statusAccepted]: 'Changed status to Accepted', - [TimelineAction.filesAdded]: 'Files added', - [TimelineAction.commentAdded]: 'Comment added', - [TimelineAction.changesAdded]: 'Changes added', - [TimelineAction.partyModification]: 'Party modification', -}; - -@Pipe({ - name: 'actionName', -}) -export class ActionNamePipe implements PipeTransform { - transform(action: TimelineAction): string { - return TIMELINE_ACTION_NAME_TO_TITLE[action] || action; - } -} diff --git a/src/app/claim-mgt/claim/conversation/comment/comment.component.html b/src/app/claim-mgt/claim/conversation/comment/comment.component.html deleted file mode 100644 index 1a0ed142..00000000 --- a/src/app/claim-mgt/claim/conversation/comment/comment.component.html +++ /dev/null @@ -1,5 +0,0 @@ - - - {{ conversation ? conversation.messages[0].text : "Can't load conversation" }} - - diff --git a/src/app/claim-mgt/claim/conversation/comment/comment.component.scss b/src/app/claim-mgt/claim/conversation/comment/comment.component.scss deleted file mode 100644 index a242ece1..00000000 --- a/src/app/claim-mgt/claim/conversation/comment/comment.component.scss +++ /dev/null @@ -1,3 +0,0 @@ -mat-card-content { - word-break: break-all; -} diff --git a/src/app/claim-mgt/claim/conversation/comment/comment.component.ts b/src/app/claim-mgt/claim/conversation/comment/comment.component.ts deleted file mode 100644 index bda7690f..00000000 --- a/src/app/claim-mgt/claim/conversation/comment/comment.component.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Component, Input } from '@angular/core'; - -import { Conversation } from '../../../../thrift-services/messages/gen-model/messages'; - -@Component({ - selector: 'cc-conversation-comment', - templateUrl: 'comment.component.html', - styleUrls: ['comment.component.scss'], -}) -export class CommentComponent { - @Input() conversation: Conversation; -} diff --git a/src/app/claim-mgt/claim/conversation/conversation.component.html b/src/app/claim-mgt/claim/conversation/conversation.component.html deleted file mode 100644 index 01d73686..00000000 --- a/src/app/claim-mgt/claim/conversation/conversation.component.html +++ /dev/null @@ -1,113 +0,0 @@ -
-

Changeset

- - - -
- {{ item.action | actionName }} by {{ item.user_info.username }} at - {{ item.created_at | date: 'dd.MM.yyyy HH:mm:ss' }} ({{ - item.created_at | humanizedDuration: { largest: 1, hasAgoEnding: true } - }}) -
-
- - - - -
-
- - {{ item.action | actionIcon }} - - - - - - - - - - - - {{ getKey(modification) }} - - {{ - modification.claim_modification - ? getKey(modification.claim_modification) - : getKey(modification.party_modification) - }} - - - - - - -
-
-
- -
- -
- -
- - - - - - - - - -
diff --git a/src/app/claim-mgt/claim/conversation/conversation.component.ts b/src/app/claim-mgt/claim/conversation/conversation.component.ts deleted file mode 100644 index 6666abc1..00000000 --- a/src/app/claim-mgt/claim/conversation/conversation.component.ts +++ /dev/null @@ -1,160 +0,0 @@ -import { - Component, - EventEmitter, - Input, - OnChanges, - OnInit, - Output, - SimpleChanges, -} from '@angular/core'; -import { MatBottomSheet } from '@angular/material/bottom-sheet'; -import { MatDialog } from '@angular/material/dialog'; -import { MatSnackBar } from '@angular/material/snack-bar'; -import { Router } from '@angular/router'; -import { combineLatest, from, of } from 'rxjs'; -import { filter, first, map, switchMap } from 'rxjs/operators'; - -import { AppAuthGuardService, ClaimManagementRole } from '@cc/app/shared/services'; -import { extractClaimStatus } from '@cc/app/shared/utils'; -import { getUnionKey } from '@cc/utils/get-union-key'; - -import { ClaimStatus } from '../../../papi/model'; -import { - PartyModificationEmitter, - UnitActionsNavListComponent, -} from '../../../party-modification-creator-legacy'; -import { Questionary } from '../../../thrift-services/ank/gen-model/questionary_manager'; -import { Claim, Modification } from '../../../thrift-services/damsel/gen-model/claim_management'; -import { PartyModification } from '../../../thrift-services/damsel/gen-model/payment_processing'; -import { RecreateClaimService } from '../recreate-claim'; -import { ConversationService } from './conversation.service'; -import { ExtractPartyModificationComponent } from './extract-party-modifications/extract-party-modification.component'; -import { QuestionaryService } from './questionary.service'; -import { SavePartyModificationsService } from './save-party-modifications.service'; -import { TimelineAction } from './to-timeline-info/model'; - -@Component({ - selector: 'cc-claim-conversation', - templateUrl: 'conversation.component.html', - providers: [ConversationService, QuestionaryService, SavePartyModificationsService], -}) -export class ConversationComponent implements OnChanges, OnInit { - @Input() claim: Claim; - @Output() conversationChangedEvent = new EventEmitter(); - - timelineInfo$ = this.conversationService.timelineInfos$; - questionary$ = this.questionaryService.questionary$; - timelineAction = TimelineAction; - claimStatus: ClaimStatus; - claimStatuses = ClaimStatus; - - unsavedModifications$ = this.savePartyModService.unsavedModifications$; - hasUnsavedModifications$ = this.savePartyModService.hasUnsavedModifications$; - isSaving$ = this.savePartyModService.isSaving$; - - canAddClaimMod = this.appAuthGuardService.userHasRoles([ClaimManagementRole.AddPartyMod]); - canAddPartyMod = this.appAuthGuardService.userHasRoles([ClaimManagementRole.AddPartyMod]); - - constructor( - private router: Router, - private conversationService: ConversationService, - private questionaryService: QuestionaryService, - private bottomSheet: MatBottomSheet, - private savePartyModService: SavePartyModificationsService, - private recreateClaimService: RecreateClaimService, - private partyModEmitter: PartyModificationEmitter, - private snackBar: MatSnackBar, - private appAuthGuardService: AppAuthGuardService, - private dialog: MatDialog - ) {} - - ngOnChanges(changes: SimpleChanges) { - const { currentValue } = changes.claim; - if (currentValue) { - this.claimStatus = extractClaimStatus(currentValue.status); - this.conversationService.enrichWithData(currentValue.changeset); - } - } - - ngOnInit() { - this.recreateClaimService.recreated$ - .pipe( - switchMap(({ party_id, id }) => - from( - this.router.navigate([ - 'claim-mgt', - 'party', - party_id, - 'claim', - id.toString(), - ]) - ) - ) - ) - .subscribe(() => - this.snackBar.open('Claim recreated successfully', 'OK', { duration: 2000 }) - ); - this.recreateClaimService.extractedModifications$ - .pipe(map((mods) => mods.map((modification) => modification.party_modification))) - .subscribe((m) => this.savePartyModService.partyModificationsChanged(m)); - this.partyModEmitter.modification$ - .pipe( - switchMap((m) => combineLatest([of(m), this.unsavedModifications$.pipe(first())])), - map(([m, unsavedMods]) => [...unsavedMods, m]) - ) - .subscribe((m) => this.savePartyModService.partyModificationsChanged(m)); - this.recreateClaimService.extractError$.subscribe(() => - this.snackBar.open('An error occurred while claim recreated', 'OK') - ); - } - - partyModificationsChanged(m: PartyModification[]) { - this.savePartyModService.partyModificationsChanged(m); - } - - saveModifications() { - this.savePartyModService.save(); - } - - updateConversation(modifications: Modification[]) { - this.conversationService - .updateConversation(this.claim.party_id, this.claim.id, modifications) - .subscribe(() => this.conversationChangedEvent.emit()); - } - - getKey(modification: Modification) { - return getUnionKey(modification); - } - - addPartyModification() { - this.bottomSheet.open(UnitActionsNavListComponent, { - data: { - type: 'allActions', - partyID: this.claim.party_id, - }, - }); - } - - extractPartyModification(questionary: Questionary) { - const dialog = this.dialog.open(ExtractPartyModificationComponent, { - disableClose: true, - data: { questionary, partyID: this.claim.party_id }, - width: '800px', - }); - dialog - .afterClosed() - .pipe(filter((r) => r.length > 0)) - .subscribe((result) => { - this.snackBar.open('Party modifications extracted successfully', 'OK', { - duration: 1500, - }); - this.partyModificationsChanged(result); - }); - } - - canUseActionsForQuestionary(modifications: Modification[]) { - return ( - modifications.filter((m) => !!m?.claim_modification?.document_modification).length > 0 - ); - } -} diff --git a/src/app/claim-mgt/claim/conversation/conversation.module.ts b/src/app/claim-mgt/claim/conversation/conversation.module.ts deleted file mode 100644 index a5828e0c..00000000 --- a/src/app/claim-mgt/claim/conversation/conversation.module.ts +++ /dev/null @@ -1,78 +0,0 @@ -import { LayoutModule } from '@angular/cdk/layout'; -import { CommonModule } from '@angular/common'; -import { NgModule } from '@angular/core'; -import { FlexLayoutModule } from '@angular/flex-layout'; -import { ReactiveFormsModule } from '@angular/forms'; -import { MatButtonModule } from '@angular/material/button'; -import { MatCardModule } from '@angular/material/card'; -import { MatDividerModule } from '@angular/material/divider'; -import { MatExpansionModule } from '@angular/material/expansion'; -import { MatFormFieldModule } from '@angular/material/form-field'; -import { MatIconModule } from '@angular/material/icon'; -import { MatInputModule } from '@angular/material/input'; -import { MatListModule } from '@angular/material/list'; -import { MatMenuModule } from '@angular/material/menu'; -import { MatSelectModule } from '@angular/material/select'; - -import { QuestionaryDocumentModule } from '@cc/app/shared/components'; -import { HumanizeDurationModule } from '@cc/app/shared/pipes/humanize-duration'; -import { PrettyJsonModule } from '@cc/components/pretty-json'; -import { TimelineModule } from '@cc/components/timeline'; - -import { MonacoEditorModule } from '../../../monaco-editor'; -import { PartyModificationCreatorLegacyModule } from '../../../party-modification-creator-legacy'; -import { AnkModule } from '../../../thrift-services'; -import { MessagesModule } from '../../../thrift-services/messages'; -import { UnsavedPartyModificationsModule } from '../unsaved-party-modifications'; -import { ActionIconPipe } from './action-icon.pipe'; -import { ActionNamePipe } from './action-name.pipe'; -import { CommentComponent } from './comment/comment.component'; -import { ConversationComponent } from './conversation.component'; -import { ExtractPartyModificationModule } from './extract-party-modifications/extract-party-modification.module'; -import { FileContainerModule } from './file-container'; -import { FileUploaderModule } from './file-uploader/file-uploader.module'; -import { QuestionaryModule } from './questionary/questionary.module'; -import { ReasonComponent } from './reason/reason.component'; -import { SendCommentComponent } from './send-comment'; - -@NgModule({ - imports: [ - LayoutModule, - MatButtonModule, - FlexLayoutModule, - MatFormFieldModule, - MatInputModule, - TimelineModule, - MatIconModule, - CommonModule, - ReactiveFormsModule, - MatExpansionModule, - MonacoEditorModule, - MessagesModule, - MatCardModule, - HumanizeDurationModule, - MatSelectModule, - FileContainerModule, - FileUploaderModule, - AnkModule, - QuestionaryDocumentModule, - MatListModule, - QuestionaryModule, - UnsavedPartyModificationsModule, - PartyModificationCreatorLegacyModule, - MatDividerModule, - ExtractPartyModificationModule, - MatMenuModule, - PrettyJsonModule, - ], - declarations: [ - ConversationComponent, - ReasonComponent, - SendCommentComponent, - ActionIconPipe, - ActionNamePipe, - CommentComponent, - ], - exports: [ConversationComponent], -}) -export class ConversationModule {} diff --git a/src/app/claim-mgt/claim/conversation/conversation.service.ts b/src/app/claim-mgt/claim/conversation/conversation.service.ts deleted file mode 100644 index ce3577d8..00000000 --- a/src/app/claim-mgt/claim/conversation/conversation.service.ts +++ /dev/null @@ -1,62 +0,0 @@ -import { Injectable } from '@angular/core'; -// eslint-disable-next-line you-dont-need-lodash-underscore/flatten -import flatten from 'lodash-es/flatten'; -import { from, Observable, Subject } from 'rxjs'; -import { catchError, map } from 'rxjs/operators'; - -import { ClaimManagementService } from '../../../thrift-services/damsel/claim-management.service'; -import { - ClaimChangeset, - ClaimID, - Modification, -} from '../../../thrift-services/damsel/gen-model/claim_management'; -import { ConversationId } from '../../../thrift-services/messages/gen-model/messages'; -import { MessagesService } from '../../../thrift-services/messages/messages.service'; -import { addCommentsToTimelineInfos, toTimelineInfo } from './to-timeline-info'; -import { TimelineAction, TimelineItemInfo } from './to-timeline-info/model'; - -@Injectable() -export class ConversationService { - timelineInfos$ = new Subject(); - - constructor( - private claimManagementService: ClaimManagementService, - private messagesService: MessagesService - ) {} - - updateConversation( - partyId: string, - claimId: ClaimID, - modifications: Modification[] - ): Observable { - return this.claimManagementService.updateClaim(partyId, claimId, modifications); - } - - enrichWithData(changeset: ClaimChangeset) { - from(this.addCommentsToInfo(toTimelineInfo(changeset))).subscribe((infos) => - this.timelineInfos$.next(infos) - ); - } - - private addCommentsToInfo(timelineInfos: TimelineItemInfo[]): Observable { - const commentAddedIds: ConversationId[] = flatten( - timelineInfos - .filter((info) => info.action === TimelineAction.commentAdded) - .map((commentInfo: TimelineItemInfo) => - commentInfo.modifications.map( - (m) => m.claim_modification.comment_modification.id - ) - ) - ); - - return this.messagesService.getConversations(commentAddedIds, {}).pipe( - map((conversationsResponse) => - addCommentsToTimelineInfos(conversationsResponse.conversations, timelineInfos) - ), - catchError((e) => { - console.error(e); - return [timelineInfos]; - }) - ); - } -} diff --git a/src/app/claim-mgt/claim/conversation/edit-unsaved-modification/edit-unsaved-modification.component.html b/src/app/claim-mgt/claim/conversation/edit-unsaved-modification/edit-unsaved-modification.component.html deleted file mode 100644 index 4a628f69..00000000 --- a/src/app/claim-mgt/claim/conversation/edit-unsaved-modification/edit-unsaved-modification.component.html +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/app/claim-mgt/claim/conversation/edit-unsaved-modification/edit-unsaved-modification.component.ts b/src/app/claim-mgt/claim/conversation/edit-unsaved-modification/edit-unsaved-modification.component.ts deleted file mode 100644 index dd05136d..00000000 --- a/src/app/claim-mgt/claim/conversation/edit-unsaved-modification/edit-unsaved-modification.component.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { Component, Inject } from '@angular/core'; -import { FormBuilder, FormGroup } from '@angular/forms'; -import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; - -import { prepareModificationsToBackend } from '@cc/app/shared/components/party-modification-creator/create-modification-dialog/prepare-modifications-to-backend'; -import { getUnionKey } from '@cc/utils/get-union-key'; - -import { PartyModification } from '../../../../thrift-services/damsel/gen-model/claim_management'; - -type ModificationType = - | 'contractor_modification' - | 'contract_modification' - | 'shop_modification' - | 'wallet_modification'; - -@Component({ - templateUrl: 'edit-unsaved-modification.component.html', -}) -export class EditUnsavedModificationComponent { - mod: PartyModification = this.data; - form: FormGroup = this.fb.group({}); - modType: ModificationType = getUnionKey(this.mod); - - constructor( - private dialogRef: MatDialogRef, - private fb: FormBuilder, - @Inject(MAT_DIALOG_DATA) private data: PartyModification - ) {} - - save() { - this.dialogRef.close({ - [this.modType]: { - id: this.mod[this.modType].id, - modification: { - [getUnionKey( - this.mod[this.modType].modification - )]: prepareModificationsToBackend(this.form.value), - }, - }, - }); - } -} diff --git a/src/app/claim-mgt/claim/conversation/edit-unsaved-modification/edit-unsaved-modification.module.ts b/src/app/claim-mgt/claim/conversation/edit-unsaved-modification/edit-unsaved-modification.module.ts deleted file mode 100644 index 47adb894..00000000 --- a/src/app/claim-mgt/claim/conversation/edit-unsaved-modification/edit-unsaved-modification.module.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { CommonModule } from '@angular/common'; -import { NgModule } from '@angular/core'; -import { FlexModule } from '@angular/flex-layout'; -import { MatButtonModule } from '@angular/material/button'; -import { MatDialogModule } from '@angular/material/dialog'; - -import { PartyModificationFormsModule } from '@cc/app/shared/components'; - -import { EditUnsavedModificationComponent } from './edit-unsaved-modification.component'; - -@NgModule({ - declarations: [EditUnsavedModificationComponent], - entryComponents: [EditUnsavedModificationComponent], - imports: [ - CommonModule, - MatDialogModule, - MatButtonModule, - FlexModule, - PartyModificationFormsModule, - ], -}) -export class EditUnsavedModificationModule {} diff --git a/src/app/claim-mgt/claim/conversation/extract-party-modifications/contractor-selector/action-type.ts b/src/app/claim-mgt/claim/conversation/extract-party-modifications/contractor-selector/action-type.ts deleted file mode 100644 index c6d5f397..00000000 --- a/src/app/claim-mgt/claim/conversation/extract-party-modifications/contractor-selector/action-type.ts +++ /dev/null @@ -1,4 +0,0 @@ -export enum ActionType { - AttachNew = 'attachNew', - Attach = 'attach', -} diff --git a/src/app/claim-mgt/claim/conversation/extract-party-modifications/contractor-selector/contractor-selector.component.html b/src/app/claim-mgt/claim/conversation/extract-party-modifications/contractor-selector/contractor-selector.component.html deleted file mode 100644 index d0438b1c..00000000 --- a/src/app/claim-mgt/claim/conversation/extract-party-modifications/contractor-selector/contractor-selector.component.html +++ /dev/null @@ -1,24 +0,0 @@ -
-
Contractor
- - {{ item | ccSelectorType }} - - - -
- - - -
-
- - - -
diff --git a/src/app/claim-mgt/claim/conversation/extract-party-modifications/contractor-selector/contractor-selector.component.ts b/src/app/claim-mgt/claim/conversation/extract-party-modifications/contractor-selector/contractor-selector.component.ts deleted file mode 100644 index 48446f9e..00000000 --- a/src/app/claim-mgt/claim/conversation/extract-party-modifications/contractor-selector/contractor-selector.component.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { Component, Input, OnInit } from '@angular/core'; -import { FormControl, FormGroup, Validators } from '@angular/forms'; -import { MatRadioChange } from '@angular/material/radio'; - -import { PartyID } from '../../../../../thrift-services/damsel/gen-model/domain'; -import { ActionType } from './action-type'; - -@Component({ - selector: 'cc-contractor-selector', - templateUrl: 'contractor-selector.component.html', -}) -export class ContractorSelectorComponent implements OnInit { - @Input() - partyID: PartyID; - - @Input() - contractorForm: FormGroup; - - actionType = ActionType; - actionTypes = [ActionType.AttachNew, ActionType.Attach]; - selectedTarget = ActionType.AttachNew; - - targetChanges($event: MatRadioChange) { - this.selectedTarget = $event.value; - } - - ngOnInit(): void { - this.contractorForm.registerControl('id', new FormControl('', [Validators.required])); - } -} diff --git a/src/app/claim-mgt/claim/conversation/extract-party-modifications/contractor-selector/contractor-selector.module.ts b/src/app/claim-mgt/claim/conversation/extract-party-modifications/contractor-selector/contractor-selector.module.ts deleted file mode 100644 index 6f4cc9db..00000000 --- a/src/app/claim-mgt/claim/conversation/extract-party-modifications/contractor-selector/contractor-selector.module.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { CommonModule } from '@angular/common'; -import { NgModule } from '@angular/core'; -import { FlexModule } from '@angular/flex-layout'; -import { ReactiveFormsModule } from '@angular/forms'; -import { MatCheckboxModule } from '@angular/material/checkbox'; -import { MatFormFieldModule } from '@angular/material/form-field'; -import { MatInputModule } from '@angular/material/input'; -import { MatPaginatorModule } from '@angular/material/paginator'; -import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; -import { MatRadioModule } from '@angular/material/radio'; -import { MatTableModule } from '@angular/material/table'; - -import { PrettyJsonModule } from '@cc/components/pretty-json'; - -import { ContractorSelectorComponent } from './contractor-selector.component'; -import { ContractorsTableComponent } from './contractors-table/contractors-table.component'; -import { SelectorTypePipe } from './selector-type.pipe'; - -@NgModule({ - imports: [ - FlexModule, - MatRadioModule, - CommonModule, - ReactiveFormsModule, - MatFormFieldModule, - MatInputModule, - MatProgressSpinnerModule, - MatCheckboxModule, - MatTableModule, - MatPaginatorModule, - PrettyJsonModule, - ], - exports: [ContractorSelectorComponent], - declarations: [ContractorSelectorComponent, SelectorTypePipe, ContractorsTableComponent], -}) -export class ContractorSelectorModule {} diff --git a/src/app/claim-mgt/claim/conversation/extract-party-modifications/contractor-selector/contractors-table/contractors-table.component.html b/src/app/claim-mgt/claim/conversation/extract-party-modifications/contractor-selector/contractors-table/contractors-table.component.html deleted file mode 100644 index 7d0433f3..00000000 --- a/src/app/claim-mgt/claim/conversation/extract-party-modifications/contractor-selector/contractors-table/contractors-table.component.html +++ /dev/null @@ -1,51 +0,0 @@ -
-
- -
-
-
- - - -
-
- - - - - - - - - - - - - - - - -
- - ID - {{ item.data.id }} - Data - -
-
-
- -
diff --git a/src/app/claim-mgt/claim/conversation/extract-party-modifications/contractor-selector/contractors-table/contractors-table.component.scss b/src/app/claim-mgt/claim/conversation/extract-party-modifications/contractor-selector/contractors-table/contractors-table.component.scss deleted file mode 100644 index 33c7e750..00000000 --- a/src/app/claim-mgt/claim/conversation/extract-party-modifications/contractor-selector/contractors-table/contractors-table.component.scss +++ /dev/null @@ -1,20 +0,0 @@ -table { - overflow: auto; -} - -.mat-column-select, -.mat-column-id { - padding-left: 8px; - padding-right: 16px; -} - -.mat-column-data { - padding-left: 16px; - white-space: nowrap; -} - -.table-container { - width: 100%; - max-width: 735px; - overflow: auto; -} diff --git a/src/app/claim-mgt/claim/conversation/extract-party-modifications/contractor-selector/contractors-table/contractors-table.component.ts b/src/app/claim-mgt/claim/conversation/extract-party-modifications/contractor-selector/contractors-table/contractors-table.component.ts deleted file mode 100644 index 1d81d1f5..00000000 --- a/src/app/claim-mgt/claim/conversation/extract-party-modifications/contractor-selector/contractors-table/contractors-table.component.ts +++ /dev/null @@ -1,80 +0,0 @@ -import { Component, Input, OnInit, QueryList, ViewChildren } from '@angular/core'; -import { FormGroup } from '@angular/forms'; -import { MatCheckboxChange } from '@angular/material/checkbox'; -import { MatPaginator } from '@angular/material/paginator'; -import { MatSnackBar } from '@angular/material/snack-bar'; -import { MatTableDataSource } from '@angular/material/table'; -import { map } from 'rxjs/operators'; - -import { getUnionValue } from '@cc/utils/get-union-key'; - -import { PartyService } from '../../../../../../papi/party.service'; -import { PartyID } from '../../../../../../thrift-services/damsel/gen-model/domain'; -import { SelectableItem } from '../selectable-item'; - -@Component({ - selector: 'cc-contractors-table', - styleUrls: ['contractors-table.component.scss'], - templateUrl: 'contractors-table.component.html', -}) -export class ContractorsTableComponent implements OnInit { - @Input() - partyID: PartyID; - - @Input() - contractorForm: FormGroup; - - dataSource: MatTableDataSource = new MatTableDataSource(); - - isLoading = true; - displayedColumns = ['select', 'id', 'data']; - - @ViewChildren('paginator') paginator: QueryList; - - constructor(private partyService: PartyService, private snackBar: MatSnackBar) {} - - change(item: SelectableItem, change: MatCheckboxChange) { - for (const selectedItem of this.dataSource.data) { - selectedItem.checked = false; - } - item.checked = change.checked; - const id = change.checked ? item.id : ''; - this.contractorForm.setValue({ id }); - } - - ngOnInit(): void { - this.dataSource.filterPredicate = this.itemsFilter; - this.partyService - .getParty(this.partyID) - .pipe( - map((party) => { - const result = []; - party.contractors.forEach((data, id) => result.push({ data, id })); - return result; - }) - ) - .subscribe( - (contractors: SelectableItem[]) => { - this.isLoading = false; - this.dataSource = new MatTableDataSource(contractors); - this.dataSource.paginator = this.paginator.first; - }, - () => { - this.isLoading = false; - this.snackBar.open('An error occurred when receiving contractors', 'OK'); - } - ); - } - - applyFilter(filterValue: string) { - this.dataSource.filter = filterValue.trim().toLowerCase(); - } - - expandData(item: any) { - return getUnionValue(getUnionValue(item.data.contractor)); - } - - private itemsFilter(item: SelectableItem, filter: string): boolean { - return JSON.stringify(item).includes(filter); - } -} diff --git a/src/app/claim-mgt/claim/conversation/extract-party-modifications/contractor-selector/selectable-item.ts b/src/app/claim-mgt/claim/conversation/extract-party-modifications/contractor-selector/selectable-item.ts deleted file mode 100644 index 59c7af3a..00000000 --- a/src/app/claim-mgt/claim/conversation/extract-party-modifications/contractor-selector/selectable-item.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { Contractor } from '../../../../../thrift-services/damsel/gen-model/domain'; - -export class SelectableItem { - id: string; - data: Contractor; - checked: boolean; -} diff --git a/src/app/claim-mgt/claim/conversation/extract-party-modifications/contractor-selector/selector-type.pipe.ts b/src/app/claim-mgt/claim/conversation/extract-party-modifications/contractor-selector/selector-type.pipe.ts deleted file mode 100644 index 675b4166..00000000 --- a/src/app/claim-mgt/claim/conversation/extract-party-modifications/contractor-selector/selector-type.pipe.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Pipe, PipeTransform } from '@angular/core'; - -import { ActionType } from './action-type'; - -@Pipe({ - name: 'ccSelectorType', -}) -export class SelectorTypePipe implements PipeTransform { - transform(value: string): any { - switch (value) { - case ActionType.AttachNew: - return 'Attach new'; - case ActionType.Attach: - return 'Select from party'; - default: - return value; - } - } -} diff --git a/src/app/claim-mgt/claim/conversation/extract-party-modifications/converters/index.ts b/src/app/claim-mgt/claim/conversation/extract-party-modifications/converters/index.ts deleted file mode 100644 index 273638e6..00000000 --- a/src/app/claim-mgt/claim/conversation/extract-party-modifications/converters/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './to-individual-entity-party-modification'; -export * from './to-legal-entity-party-modification'; diff --git a/src/app/claim-mgt/claim/conversation/extract-party-modifications/converters/to-contractor-modification.ts b/src/app/claim-mgt/claim/conversation/extract-party-modifications/converters/to-contractor-modification.ts deleted file mode 100644 index 1e522afe..00000000 --- a/src/app/claim-mgt/claim/conversation/extract-party-modifications/converters/to-contractor-modification.ts +++ /dev/null @@ -1,16 +0,0 @@ -import * as uuid from 'uuid/v4'; - -import { - ContractorModification, - PartyModification, -} from '../../../../../thrift-services/damsel/gen-model/claim_management'; - -export const toContractorModification = ( - modification: ContractorModification, - id: string = uuid() -): PartyModification => ({ - contractor_modification: { - id, - modification, - }, -}); diff --git a/src/app/claim-mgt/claim/conversation/extract-party-modifications/converters/to-individual-entity-party-modification.ts b/src/app/claim-mgt/claim/conversation/extract-party-modifications/converters/to-individual-entity-party-modification.ts deleted file mode 100644 index 3fb8ec5a..00000000 --- a/src/app/claim-mgt/claim/conversation/extract-party-modifications/converters/to-individual-entity-party-modification.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { getOr } from '@cc/utils/get-or'; - -import { QuestionaryData } from '../../../../../thrift-services/ank/gen-model/questionary_manager'; -import { PartyModification } from '../../../../../thrift-services/damsel/gen-model/claim_management'; -import { createRussianBankAccount } from '../creators/create-russian-bank-account'; -import { toContractorModification } from './to-contractor-modification'; - -const PATH = 'contractor.individual_entity.russian_individual_entity'; - -export const toIndividualEntityPartyModification = ( - d: QuestionaryData, - contractorID: string -): PartyModification => - toContractorModification( - { - creation: { - legal_entity: { - russian_legal_entity: { - registered_name: getOr(d, `${PATH}.name`, ''), - registered_number: getOr( - d, - `${PATH}.registration_info.individual_registration_info.ogrnip`, - '' - ), - inn: getOr(d, `${PATH}.inn`, '') || '', - actual_address: getOr( - d, - `${PATH}.registration_info.individual_registration_info.registration_place`, - '' - ), - post_address: getOr( - d, - `${PATH}.registration_info.individual_registration_info.registration_place`, - '' - ), - representative_position: '', - representative_full_name: getOr( - d, - `${PATH}.russian_private_entity.fio`, - '' - ), - representative_document: getOr( - d, - `${PATH}.identity_document.russian_domestic_password.series_number`, - '' - ), - russian_bank_account: createRussianBankAccount(d), - }, - }, - }, - }, - contractorID - ); diff --git a/src/app/claim-mgt/claim/conversation/extract-party-modifications/converters/to-international-legal-entity.ts b/src/app/claim-mgt/claim/conversation/extract-party-modifications/converters/to-international-legal-entity.ts deleted file mode 100644 index 05da0419..00000000 --- a/src/app/claim-mgt/claim/conversation/extract-party-modifications/converters/to-international-legal-entity.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { getOr } from '@cc/utils/get-or'; - -import { QuestionaryData } from '../../../../../thrift-services/ank/gen-model/questionary_manager'; -import { InternationalLegalEntity } from '../../../../../thrift-services/damsel/gen-model/domain'; - -const PATH = 'contractor.legal_entity.international_legal_entity'; - -export const toInternationalLegalEntity = (d: QuestionaryData): InternationalLegalEntity => ({ - legal_name: d.contractor.legal_entity.international_legal_entity.legal_name, - trading_name: getOr(d, `${PATH}.trading_name`, ''), - registered_address: getOr(d, `${PATH}.registered_address`, ''), - actual_address: getOr(d, `${PATH}.actual_address`, ''), - registered_number: getOr(d, `${PATH}.registered_number`, ''), -}); diff --git a/src/app/claim-mgt/claim/conversation/extract-party-modifications/converters/to-legal-entity-party-modification.ts b/src/app/claim-mgt/claim/conversation/extract-party-modifications/converters/to-legal-entity-party-modification.ts deleted file mode 100644 index cefef520..00000000 --- a/src/app/claim-mgt/claim/conversation/extract-party-modifications/converters/to-legal-entity-party-modification.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { QuestionaryData } from '../../../../../thrift-services/ank/gen-model/questionary_manager'; -import { PartyModification } from '../../../../../thrift-services/damsel/gen-model/claim_management'; -import { toContractorModification } from './to-contractor-modification'; -import { toInternationalLegalEntity } from './to-international-legal-entity'; -import { toRussianLegalEntity } from './to-russian-legal-entity'; - -export const toLegalEntityPartyModification = ( - d: QuestionaryData, - contractorID: string -): PartyModification => - toContractorModification( - { - creation: { - legal_entity: { - russian_legal_entity: d.contractor.legal_entity.russian_legal_entity - ? toRussianLegalEntity(d) - : undefined, - international_legal_entity: d.contractor.legal_entity.international_legal_entity - ? toInternationalLegalEntity(d) - : undefined, - }, - }, - }, - contractorID - ); diff --git a/src/app/claim-mgt/claim/conversation/extract-party-modifications/converters/to-russian-legal-entity.ts b/src/app/claim-mgt/claim/conversation/extract-party-modifications/converters/to-russian-legal-entity.ts deleted file mode 100644 index 50923186..00000000 --- a/src/app/claim-mgt/claim/conversation/extract-party-modifications/converters/to-russian-legal-entity.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { getOr } from '@cc/utils/get-or'; - -import { QuestionaryData } from '../../../../../thrift-services/ank/gen-model/questionary_manager'; -import { RussianLegalEntity } from '../../../../../thrift-services/damsel/gen-model/domain'; -import { createRussianBankAccount } from '../creators/create-russian-bank-account'; - -const PATH = 'contractor.legal_entity.russian_legal_entity'; - -export const toRussianLegalEntity = (d: QuestionaryData): RussianLegalEntity => ({ - registered_name: getOr(d, `${PATH}.name`, ''), - registered_number: getOr(d, `${PATH}.registration_info.legal_registration_info.ogrn`, ''), - inn: getOr(d, `${PATH}.inn`, ''), - actual_address: - getOr(d, `${PATH}.registration_info.legal_registration_info.actual_address`, '') || - getOr(d, `${PATH}.registration_info.legal_registration_info.registration_address`, ''), - post_address: - getOr(d, `${PATH}.postal_address`, '') || - getOr(d, `${PATH}.registration_info.legal_registration_info.registration_address`, ''), - representative_position: getOr(d, `${PATH}.legal_owner_info.head_position`, ''), - representative_full_name: getOr(d, `${PATH}.legal_owner_info.russian_private_entity.fio`, ''), - representative_document: getOr( - d, - `${PATH}.legal_owner_info.identity_document.russian_domestic_password.series_number`, - '' - ), - russian_bank_account: createRussianBankAccount(d), -}); diff --git a/src/app/claim-mgt/claim/conversation/extract-party-modifications/creators/create-contract-creation.ts b/src/app/claim-mgt/claim/conversation/extract-party-modifications/creators/create-contract-creation.ts deleted file mode 100644 index f7a9689d..00000000 --- a/src/app/claim-mgt/claim/conversation/extract-party-modifications/creators/create-contract-creation.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { PartyModification } from '../../../../../thrift-services/damsel/gen-model/claim_management'; -import { PaymentInstitutionRef } from '../../../../../thrift-services/damsel/gen-model/domain'; - -export const createContractCreation = ( - contractorId: string, - contractId: string, - paymentInstitution: PaymentInstitutionRef -): PartyModification => ({ - contract_modification: { - id: contractId, - modification: { - creation: { - contractor_id: contractorId, - payment_institution: paymentInstitution, - }, - }, - }, -}); diff --git a/src/app/claim-mgt/claim/conversation/extract-party-modifications/creators/create-contractor.ts b/src/app/claim-mgt/claim/conversation/extract-party-modifications/creators/create-contractor.ts deleted file mode 100644 index 0c1e051c..00000000 --- a/src/app/claim-mgt/claim/conversation/extract-party-modifications/creators/create-contractor.ts +++ /dev/null @@ -1,25 +0,0 @@ -import get from 'lodash-es/get'; - -import { QuestionaryData } from '../../../../../thrift-services/ank/gen-model/questionary_manager'; -import { PartyModification } from '../../../../../thrift-services/damsel/gen-model/claim_management'; -import { toIndividualEntityPartyModification, toLegalEntityPartyModification } from '../converters'; - -export const createContractor = (d: QuestionaryData, contractorID: string): PartyModification => { - const isLegalEntityExist = get(d, 'contractor.legal_entity', false); - const isIndividualEntityExist = get(d, 'contractor.individual_entity', false); - - const legalEntityCreation = isLegalEntityExist - ? toLegalEntityPartyModification(d, contractorID) - : null; - const individualEntityCreation = isIndividualEntityExist - ? toIndividualEntityPartyModification(d, contractorID) - : null; - - if (isLegalEntityExist) { - return legalEntityCreation; - } else if (isIndividualEntityExist) { - return individualEntityCreation; - } else { - return null; - } -}; diff --git a/src/app/claim-mgt/claim/conversation/extract-party-modifications/creators/create-international-bank-account.ts b/src/app/claim-mgt/claim/conversation/extract-party-modifications/creators/create-international-bank-account.ts deleted file mode 100644 index 0b60d36e..00000000 --- a/src/app/claim-mgt/claim/conversation/extract-party-modifications/creators/create-international-bank-account.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { getOr } from '@cc/utils/get-or'; - -import { QuestionaryData } from '../../../../../thrift-services/ank/gen-model/questionary_manager'; -import { InternationalBankAccount } from '../../../../../thrift-services/damsel/gen-model/domain'; - -const PATH = 'bank_account.international_bank_account'; - -export const createInternationalBankAccount = (d: QuestionaryData): InternationalBankAccount => { - const internationalBankAccount = getOr(d, PATH, null); - const accountNumber = getOr(internationalBankAccount, `number`, ''); - const bank = getOr(internationalBankAccount, `bank`, ''); - const correspondentAccount = getOr(internationalBankAccount, `correspondent_account`, ''); - const iban = getOr(internationalBankAccount, `iban`, ''); - const accountHolder = getOr(internationalBankAccount, `account_holder`, ''); - return { - number: accountNumber, - bank, - correspondent_account: correspondentAccount, - iban, - account_holder: accountHolder, - }; -}; diff --git a/src/app/claim-mgt/claim/conversation/extract-party-modifications/creators/create-payout-tool-creation.ts b/src/app/claim-mgt/claim/conversation/extract-party-modifications/creators/create-payout-tool-creation.ts deleted file mode 100644 index 39d87c62..00000000 --- a/src/app/claim-mgt/claim/conversation/extract-party-modifications/creators/create-payout-tool-creation.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { QuestionaryData } from '../../../../../thrift-services/ank/gen-model/questionary_manager'; -import { PartyModification } from '../../../../../thrift-services/damsel/gen-model/claim_management'; -import { createInternationalBankAccount } from './create-international-bank-account'; -import { createRussianBankAccount } from './create-russian-bank-account'; - -export const createPayoutToolCreation = ( - d: QuestionaryData, - contractID: string, - payoutToolID: string -): PartyModification => ({ - contract_modification: { - id: contractID, - modification: { - payout_tool_modification: { - payout_tool_id: payoutToolID, - modification: { - creation: { - currency: { - symbolic_code: 'RUB', - }, - tool_info: { - russian_bank_account: d.bank_account.russian_bank_account - ? createRussianBankAccount(d) - : undefined, - international_bank_account: d.bank_account.international_bank_account - ? createInternationalBankAccount(d) - : undefined, - }, - }, - }, - }, - }, - }, -}); diff --git a/src/app/claim-mgt/claim/conversation/extract-party-modifications/creators/create-russian-bank-account.ts b/src/app/claim-mgt/claim/conversation/extract-party-modifications/creators/create-russian-bank-account.ts deleted file mode 100644 index 5af44c88..00000000 --- a/src/app/claim-mgt/claim/conversation/extract-party-modifications/creators/create-russian-bank-account.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { getOr } from '@cc/utils/get-or'; - -import { QuestionaryData } from '../../../../../thrift-services/ank/gen-model/questionary_manager'; -import { RussianBankAccount } from '../../../../../thrift-services/damsel/gen-model/domain'; - -const PATH = 'bank_account.russian_bank_account'; - -export const createRussianBankAccount = (d: QuestionaryData): RussianBankAccount => { - const russianBankAccount = getOr(d, PATH, null); - const account = getOr(russianBankAccount, `account`, ''); - const bankName = getOr(russianBankAccount, `bank_name`, ''); - const bankBik = getOr(russianBankAccount, `bank_bik`, ''); - const bankPostAccount = getOr(russianBankAccount, `bank_post_account`, ''); - return { account, bank_name: bankName, bank_bik: bankBik, bank_post_account: bankPostAccount }; -}; diff --git a/src/app/claim-mgt/claim/conversation/extract-party-modifications/creators/create-shop-account-creation.ts b/src/app/claim-mgt/claim/conversation/extract-party-modifications/creators/create-shop-account-creation.ts deleted file mode 100644 index 36f88001..00000000 --- a/src/app/claim-mgt/claim/conversation/extract-party-modifications/creators/create-shop-account-creation.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { PartyModification } from '../../../../../thrift-services/damsel/gen-model/claim_management'; - -export const createShopAccountCreation = (shopID: string): PartyModification => ({ - shop_modification: { - id: shopID, - modification: { - shop_account_creation: { currency: { symbolic_code: 'RUB' } }, - }, - }, -}); diff --git a/src/app/claim-mgt/claim/conversation/extract-party-modifications/creators/create-shop-creation.ts b/src/app/claim-mgt/claim/conversation/extract-party-modifications/creators/create-shop-creation.ts deleted file mode 100644 index 12dc6bd1..00000000 --- a/src/app/claim-mgt/claim/conversation/extract-party-modifications/creators/create-shop-creation.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { getOr } from '@cc/utils/get-or'; - -import { QuestionaryData } from '../../../../../thrift-services/ank/gen-model/questionary_manager'; -import { PartyModification } from '../../../../../thrift-services/damsel/gen-model/claim_management'; - -export const createShopCreation = ( - d: QuestionaryData, - contractId: string, - payoutToolId: string, - categoryID: number, - shopID: string -): PartyModification => { - const defaultLocation = { url: '' }; - const location = getOr(d, 'shop_info.location', defaultLocation); - - const defaultDetails = { - name: '', - description: '', - }; - const details = getOr(d, 'shop_info.details', defaultDetails); - - return { - shop_modification: { - id: shopID, - modification: { - creation: { - contract_id: contractId, - payout_tool_id: payoutToolId, - location, - details, - category: { id: categoryID }, - }, - }, - }, - }; -}; diff --git a/src/app/claim-mgt/claim/conversation/extract-party-modifications/creators/index.ts b/src/app/claim-mgt/claim/conversation/extract-party-modifications/creators/index.ts deleted file mode 100644 index 54afdcf2..00000000 --- a/src/app/claim-mgt/claim/conversation/extract-party-modifications/creators/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './create-contract-creation'; -export * from './create-payout-tool-creation'; -export * from './create-shop-creation'; diff --git a/src/app/claim-mgt/claim/conversation/extract-party-modifications/extract-form-checkbox-name.pipe.ts b/src/app/claim-mgt/claim/conversation/extract-party-modifications/extract-form-checkbox-name.pipe.ts deleted file mode 100644 index 2e608787..00000000 --- a/src/app/claim-mgt/claim/conversation/extract-party-modifications/extract-form-checkbox-name.pipe.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Pipe, PipeTransform } from '@angular/core'; - -@Pipe({ - name: 'ccExtractFormCheckboxName', -}) -export class ExtractFormCheckboxNamePipe implements PipeTransform { - transform(value: string): string { - switch (value) { - case 'contractCreation': - return 'Contract creation'; - case 'payoutToolCreation': - return 'Payout tool creation'; - case 'shopCreation': - return 'Shop creation'; - default: - return value; - } - } -} diff --git a/src/app/claim-mgt/claim/conversation/extract-party-modifications/extract-form-value.ts b/src/app/claim-mgt/claim/conversation/extract-party-modifications/extract-form-value.ts deleted file mode 100644 index 36a1d1f4..00000000 --- a/src/app/claim-mgt/claim/conversation/extract-party-modifications/extract-form-value.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { - CategoryRef, - PaymentInstitutionRef, -} from '../../../../thrift-services/damsel/gen-model/domain'; - -interface ContractorId { - id: string; -} - -export interface ExtractFormValue { - category: CategoryRef; - payment_institution: PaymentInstitutionRef; - contractor: ContractorId; -} diff --git a/src/app/claim-mgt/claim/conversation/extract-party-modifications/extract-party-modification.component.html b/src/app/claim-mgt/claim/conversation/extract-party-modifications/extract-party-modification.component.html deleted file mode 100644 index 884e951e..00000000 --- a/src/app/claim-mgt/claim/conversation/extract-party-modifications/extract-party-modification.component.html +++ /dev/null @@ -1,28 +0,0 @@ -
- -
-
Party modifications extraction params
-
- - - - -
-
-
- - - - -
diff --git a/src/app/claim-mgt/claim/conversation/extract-party-modifications/extract-party-modification.component.ts b/src/app/claim-mgt/claim/conversation/extract-party-modifications/extract-party-modification.component.ts deleted file mode 100644 index 88248673..00000000 --- a/src/app/claim-mgt/claim/conversation/extract-party-modifications/extract-party-modification.component.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { Component, Inject } from '@angular/core'; -import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; - -import { Questionary } from '../../../../thrift-services/ank/gen-model/questionary_manager'; -import { PartyID } from '../../../../thrift-services/damsel/gen-model/domain'; -import { ExtractPartyModificationsService } from './extract-party-modifications.service'; - -export interface ExtractPartyModification { - questionary: Questionary; - partyID: PartyID; -} - -@Component({ - templateUrl: 'extract-party-modification.component.html', - providers: [ExtractPartyModificationsService], -}) -export class ExtractPartyModificationComponent { - form = this.extractPartyModificationsService.form; - partyID: string; - isContractorAvailable: boolean; - - constructor( - private dialogRef: MatDialogRef, - private extractPartyModificationsService: ExtractPartyModificationsService, - @Inject(MAT_DIALOG_DATA) private data: ExtractPartyModification - ) { - this.partyID = this.data.partyID; - this.isContractorAvailable = - !!this.data.questionary.data.contractor?.legal_entity || - !!this.data.questionary.data.contractor?.individual_entity; - } - - extract() { - this.dialogRef.close( - this.extractPartyModificationsService.mapToModifications(this.data.questionary.data) - ); - } -} diff --git a/src/app/claim-mgt/claim/conversation/extract-party-modifications/extract-party-modification.module.ts b/src/app/claim-mgt/claim/conversation/extract-party-modifications/extract-party-modification.module.ts deleted file mode 100644 index 1ce92bdb..00000000 --- a/src/app/claim-mgt/claim/conversation/extract-party-modifications/extract-party-modification.module.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { CommonModule } from '@angular/common'; -import { NgModule } from '@angular/core'; -import { FlexModule } from '@angular/flex-layout'; -import { ReactiveFormsModule } from '@angular/forms'; -import { MatButtonModule } from '@angular/material/button'; -import { MatCheckboxModule } from '@angular/material/checkbox'; -import { MatDialogModule } from '@angular/material/dialog'; -import { MatDividerModule } from '@angular/material/divider'; -import { MatInputModule } from '@angular/material/input'; -import { MatRadioModule } from '@angular/material/radio'; - -import { PartyModificationFormsModule } from '@cc/app/shared/components'; - -import { ContractorSelectorModule } from './contractor-selector/contractor-selector.module'; -import { ExtractFormCheckboxNamePipe } from './extract-form-checkbox-name.pipe'; -import { ExtractPartyModificationComponent } from './extract-party-modification.component'; - -@NgModule({ - declarations: [ExtractPartyModificationComponent, ExtractFormCheckboxNamePipe], - exports: [ExtractPartyModificationComponent], - imports: [ - FlexModule, - MatDialogModule, - MatButtonModule, - MatInputModule, - ReactiveFormsModule, - MatCheckboxModule, - CommonModule, - PartyModificationFormsModule, - MatDividerModule, - MatRadioModule, - ContractorSelectorModule, - ], - entryComponents: [ExtractPartyModificationComponent], -}) -export class ExtractPartyModificationModule {} diff --git a/src/app/claim-mgt/claim/conversation/extract-party-modifications/extract-party-modifications.service.ts b/src/app/claim-mgt/claim/conversation/extract-party-modifications/extract-party-modifications.service.ts deleted file mode 100644 index c2fa0a78..00000000 --- a/src/app/claim-mgt/claim/conversation/extract-party-modifications/extract-party-modifications.service.ts +++ /dev/null @@ -1,66 +0,0 @@ -import { Injectable } from '@angular/core'; -import { FormBuilder } from '@angular/forms'; -import * as uuid from 'uuid/v4'; - -import { QuestionaryData } from '../../../../thrift-services/ank/gen-model/questionary_manager'; -import { PartyModification } from '../../../../thrift-services/damsel/gen-model/claim_management'; -import { createContractCreation, createPayoutToolCreation, createShopCreation } from './creators'; -import { createContractor } from './creators/create-contractor'; -import { createShopAccountCreation } from './creators/create-shop-account-creation'; -import { ExtractFormValue } from './extract-form-value'; - -@Injectable() -export class ExtractPartyModificationsService { - form = this.fb.group({ - category: this.fb.group({}), - payment_institution: this.fb.group({}), - contractor: this.fb.group({}), - }); - - constructor(private fb: FormBuilder) {} - - mapToModifications(d: QuestionaryData): PartyModification[] { - const { - category, - payment_institution, - contractor: { id }, - }: ExtractFormValue = this.form.value; - const contractorID = uuid(); - const shopID = uuid(); - const contractID = uuid(); - const payoutToolID = uuid(); - - const result = []; - - if (d.contractor) { - const contractorCreationModification = createContractor(d, contractorID); - result.push(contractorCreationModification); - } - - const contractCreationModification = createContractCreation( - d.contractor ? contractorID : id, - contractID, - payment_institution - ); - result.push(contractCreationModification); - - const payoutToolCreationModification = createPayoutToolCreation( - d, - contractID, - payoutToolID - ); - result.push(payoutToolCreationModification); - - const shopCreationModification = createShopCreation( - d, - contractID, - payoutToolID, - category.id, - shopID - ); - const shopAccountCreation = createShopAccountCreation(shopID); - result.push(shopCreationModification, shopAccountCreation); - - return result; - } -} diff --git a/src/app/claim-mgt/claim/conversation/file-container/download.ts b/src/app/claim-mgt/claim/conversation/file-container/download.ts deleted file mode 100644 index bf2ad38b..00000000 --- a/src/app/claim-mgt/claim/conversation/file-container/download.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * https://github.com/sindresorhus/multi-download/blob/master/index.js - */ -export function download(url: string, name?: string): void { - const a = document.createElement('a'); - a.download = name; - a.href = url; - a.style.display = 'none'; - document.body.append(a); - a.click(); - // Chrome requires the timeout - setTimeout(() => { - a.remove(); - }, 100); -} diff --git a/src/app/claim-mgt/claim/conversation/file-container/file-container.component.html b/src/app/claim-mgt/claim/conversation/file-container/file-container.component.html deleted file mode 100644 index d78039a1..00000000 --- a/src/app/claim-mgt/claim/conversation/file-container/file-container.component.html +++ /dev/null @@ -1,6 +0,0 @@ - - -
{{ fileData.file_name }}
- cloud_download -
-
diff --git a/src/app/claim-mgt/claim/conversation/file-container/file-container.component.scss b/src/app/claim-mgt/claim/conversation/file-container/file-container.component.scss deleted file mode 100644 index 662b635c..00000000 --- a/src/app/claim-mgt/claim/conversation/file-container/file-container.component.scss +++ /dev/null @@ -1,7 +0,0 @@ -.download-icon { - color: rgba(0, 0, 0, 0.87); -} - -.download-icon:hover { - cursor: pointer; -} diff --git a/src/app/claim-mgt/claim/conversation/file-container/file-container.component.ts b/src/app/claim-mgt/claim/conversation/file-container/file-container.component.ts deleted file mode 100644 index 3109f9f0..00000000 --- a/src/app/claim-mgt/claim/conversation/file-container/file-container.component.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { Component, Input, OnInit } from '@angular/core'; - -import { FileContainerService } from './file-container.service'; - -@Component({ - selector: 'cc-file-container', - templateUrl: 'file-container.component.html', - styleUrls: ['file-container.component.scss'], - providers: [FileContainerService], -}) -export class FileContainerComponent implements OnInit { - @Input() - fileID: string; - - fileData$ = this.fileContainerService.fileData$; - - constructor(private fileContainerService: FileContainerService) {} - - ngOnInit() { - this.fileContainerService.getFileInfo(this.fileID); - } - - downloadFile() { - this.fileContainerService.downloadFile(this.fileID); - } -} diff --git a/src/app/claim-mgt/claim/conversation/file-container/file-container.module.ts b/src/app/claim-mgt/claim/conversation/file-container/file-container.module.ts deleted file mode 100644 index f9b943f8..00000000 --- a/src/app/claim-mgt/claim/conversation/file-container/file-container.module.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { CommonModule } from '@angular/common'; -import { NgModule } from '@angular/core'; -import { FlexModule } from '@angular/flex-layout'; -import { MatCardModule } from '@angular/material/card'; -import { MatIconModule } from '@angular/material/icon'; - -import { FileStorageModule } from '../../../../thrift-services/file-storage'; -import { FileContainerComponent } from './file-container.component'; - -@NgModule({ - imports: [CommonModule, MatCardModule, FlexModule, MatIconModule, FileStorageModule], - exports: [FileContainerComponent], - declarations: [FileContainerComponent], -}) -export class FileContainerModule {} diff --git a/src/app/claim-mgt/claim/conversation/file-container/file-container.service.ts b/src/app/claim-mgt/claim/conversation/file-container/file-container.service.ts deleted file mode 100644 index 5d05fadf..00000000 --- a/src/app/claim-mgt/claim/conversation/file-container/file-container.service.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { Injectable } from '@angular/core'; -import { MatSnackBar } from '@angular/material/snack-bar'; -import * as moment from 'moment'; -import { Observable, Subject } from 'rxjs'; -import { filter, map, shareReplay, switchMap } from 'rxjs/operators'; - -import { booleanDelay } from '@cc/utils/boolean-delay'; - -import { FileStorageService } from '../../../../thrift-services/file-storage/file-storage.service'; -import { FileData } from '../../../../thrift-services/file-storage/gen-model/file_storage'; -import { download } from './download'; - -@Injectable() -export class FileContainerService { - private getFileInfo$ = new Subject(); - - // eslint-disable-next-line @typescript-eslint/member-ordering - fileData$: Observable = this.getFileInfo$.pipe( - switchMap((fileID) => this.fileStorageService.getFileData(fileID)), - filter((file) => Object.keys(file).length > 0), - map((file: FileData) => ({ ...file, file_name: decodeURI(file?.file_name) })), - shareReplay(1) - ); - - // eslint-disable-next-line @typescript-eslint/member-ordering - isLoading$ = this.fileData$.pipe(booleanDelay(), shareReplay(1)); - - constructor(private fileStorageService: FileStorageService, private snackBar: MatSnackBar) { - this.fileData$.subscribe(); - } - - getFileInfo(fileID: string) { - this.getFileInfo$.next(fileID); - } - - downloadFile(fileID: string) { - this.fileStorageService - .generateDownloadUrl(fileID, moment().add(1, 'h').toISOString()) - .subscribe( - (url) => { - if (typeof url === 'string') { - download(url); - } else { - this.snackBar.open('File not found', 'OK'); - } - }, - () => this.snackBar.open('Download error', 'OK') - ); - } -} diff --git a/src/app/claim-mgt/claim/conversation/file-container/index.ts b/src/app/claim-mgt/claim/conversation/file-container/index.ts deleted file mode 100644 index a2a454fc..00000000 --- a/src/app/claim-mgt/claim/conversation/file-container/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './file-container.module'; -export * from './file-container.component'; diff --git a/src/app/claim-mgt/claim/conversation/file-uploader/file-uploader.component.html b/src/app/claim-mgt/claim/conversation/file-uploader/file-uploader.component.html deleted file mode 100644 index e015ada5..00000000 --- a/src/app/claim-mgt/claim/conversation/file-uploader/file-uploader.component.html +++ /dev/null @@ -1,5 +0,0 @@ -
- -
diff --git a/src/app/claim-mgt/claim/conversation/file-uploader/file-uploader.component.scss b/src/app/claim-mgt/claim/conversation/file-uploader/file-uploader.component.scss deleted file mode 100644 index d637ba16..00000000 --- a/src/app/claim-mgt/claim/conversation/file-uploader/file-uploader.component.scss +++ /dev/null @@ -1,3 +0,0 @@ -.cc-file-uploader:hover { - cursor: pointer; -} diff --git a/src/app/claim-mgt/claim/conversation/file-uploader/file-uploader.component.ts b/src/app/claim-mgt/claim/conversation/file-uploader/file-uploader.component.ts deleted file mode 100644 index bb67ee35..00000000 --- a/src/app/claim-mgt/claim/conversation/file-uploader/file-uploader.component.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; - -import { Modification } from '../../../../thrift-services/damsel/gen-model/claim_management'; -import { FileUploaderService } from './file-uploader.service'; - -@Component({ - selector: 'cc-file-uploader', - templateUrl: 'file-uploader.component.html', - styleUrls: ['file-uploader.component.scss'], -}) -export class FileUploaderComponent implements OnInit { - @Output() - filesUploaded: EventEmitter = new EventEmitter(); - - @Input() - disabled: boolean; - - startUploading$ = this.fileUploaderService.startUploading$; - inProgress$ = this.fileUploaderService.inProgress$; - - constructor(private fileUploaderService: FileUploaderService) {} - - ngOnInit(): void { - this.fileUploaderService.filesUploaded$.subscribe((values) => - this.filesUploaded.emit( - values.map((v) => this.fileUploaderService.createModification(v)) - ) - ); - } - - startUploading(files: File[]) { - this.startUploading$.next(files); - } -} diff --git a/src/app/claim-mgt/claim/conversation/file-uploader/file-uploader.module.ts b/src/app/claim-mgt/claim/conversation/file-uploader/file-uploader.module.ts deleted file mode 100644 index 0826f620..00000000 --- a/src/app/claim-mgt/claim/conversation/file-uploader/file-uploader.module.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { CommonModule } from '@angular/common'; -import { NgModule } from '@angular/core'; -import { FlexModule } from '@angular/flex-layout'; -import { MatButtonModule } from '@angular/material/button'; -import { MatIconModule } from '@angular/material/icon'; -import { ngfModule } from 'angular-file'; - -import { FileStorageModule } from '../../../../thrift-services/file-storage'; -import { FileUploaderComponent } from './file-uploader.component'; -import { FileUploaderService } from './file-uploader.service'; - -@NgModule({ - imports: [ - FlexModule, - ngfModule, - CommonModule, - MatIconModule, - MatButtonModule, - FileStorageModule, - ], - exports: [FileUploaderComponent], - declarations: [FileUploaderComponent], - providers: [FileUploaderService], -}) -export class FileUploaderModule {} diff --git a/src/app/claim-mgt/claim/conversation/file-uploader/file-uploader.service.ts b/src/app/claim-mgt/claim/conversation/file-uploader/file-uploader.service.ts deleted file mode 100644 index 611fd891..00000000 --- a/src/app/claim-mgt/claim/conversation/file-uploader/file-uploader.service.ts +++ /dev/null @@ -1,91 +0,0 @@ -import { HttpClient } from '@angular/common/http'; -import { Injectable } from '@angular/core'; -import { MatSnackBar } from '@angular/material/snack-bar'; -import * as moment from 'moment'; -import { forkJoin, merge, Observable, of, Subject } from 'rxjs'; -import { catchError, filter, map, shareReplay, switchMap } from 'rxjs/operators'; - -import { progress } from '@cc/app/shared/custom-operators'; - -import { Modification } from '../../../../thrift-services/damsel/gen-model/claim_management'; -import { FileStorageService } from '../../../../thrift-services/file-storage/file-storage.service'; -import { NewFileResult } from '../../../../thrift-services/file-storage/gen-model/file_storage'; -import { Value } from '../../../../thrift-services/file-storage/gen-model/msgpack'; - -@Injectable() -export class FileUploaderService { - startUploading$ = new Subject(); - - filesUploadingError$ = new Subject(); - - filesUploaded$: Observable = this.startUploading$.pipe( - switchMap((files) => - this.uploadFiles(files).pipe( - catchError(() => { - this.filesUploadingError$.next(null); - return of([]); - }) - ) - ), - filter((v) => !!v.length), - shareReplay(1) - ); - - inProgress$: Observable = progress( - this.startUploading$, - merge(this.filesUploaded$, this.filesUploadingError$) - ); - - constructor( - private fileStorageService: FileStorageService, - private snackBar: MatSnackBar, - private http: HttpClient - ) { - this.filesUploadingError$.subscribe(() => this.snackBar.open('File uploading error', 'OK')); - } - - uploadFiles(files: File[]): Observable { - return forkJoin( - files.map((file) => - this.getUploadLink().pipe( - switchMap((uploadData) => - forkJoin([ - of(uploadData.file_data_id), - this.uploadFileToUrl(file, uploadData.upload_url), - ]) - ), - map(([fileId]) => fileId) - ) - ) - ); - } - - createModification(id: string): Modification { - return { - claim_modification: { - file_modification: { - id, - modification: { - creation: {}, - }, - }, - }, - }; - } - - private getUploadLink(): Observable { - return this.fileStorageService.createNewFile( - new Map(), - moment().add(1, 'h').toISOString() - ); - } - - private uploadFileToUrl(file: File, url: string): Observable { - return this.http.put(url, file, { - headers: { - 'Content-Disposition': `attachment;filename=${encodeURI(file.name)}`, - 'Content-Type': '', - }, - }); - } -} diff --git a/src/app/claim-mgt/claim/conversation/questionary.service.ts b/src/app/claim-mgt/claim/conversation/questionary.service.ts deleted file mode 100644 index 82a95bdf..00000000 --- a/src/app/claim-mgt/claim/conversation/questionary.service.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { Injectable } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; -import { combineLatest, ConnectableObservable, of } from 'rxjs'; -import { map, pluck, publishReplay, switchMap } from 'rxjs/operators'; - -import { AnkService } from '../../../thrift-services/ank/ank.service'; -import { Questionary } from '../../../thrift-services/ank/gen-model/questionary_manager'; -import { ConversationService } from './conversation.service'; -import { TimelineAction } from './to-timeline-info/model'; - -@Injectable() -export class QuestionaryService { - questionary$ = this.conversationService.timelineInfos$.pipe( - map((timelineInfos) => timelineInfos.find((i) => i.action === TimelineAction.changesAdded)), - pluck('modifications', 0, 'claim_modification', 'document_modification', 'id'), - switchMap((id) => combineLatest([of(id), this.route.params.pipe(pluck('party_id'))])), - switchMap(([questId, partyId]) => this.ankService.get(questId, partyId)), - pluck('questionary'), - publishReplay(1) - ) as ConnectableObservable; - - constructor( - private conversationService: ConversationService, - private ankService: AnkService, - private route: ActivatedRoute - ) { - this.questionary$.connect(); - } -} diff --git a/src/app/claim-mgt/claim/conversation/questionary/authority-confirming-document-title.pipe.ts b/src/app/claim-mgt/claim/conversation/questionary/authority-confirming-document-title.pipe.ts deleted file mode 100644 index 82b2b268..00000000 --- a/src/app/claim-mgt/claim/conversation/questionary/authority-confirming-document-title.pipe.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Pipe, PipeTransform } from '@angular/core'; - -import { AuthorityConfirmingDocumentType } from '../../../../model/questionary'; - -const AUTHORITY_CONFIRMING_DOCUMENT_TITLE_BY_TYPE: { - [N in AuthorityConfirmingDocumentType]: string; -} = { - meetingOfParticipants: 'Протокол общего собрания акционеров', - meetingOfShareholders: 'Протокол общего собрания участников', - solePartyDecision: 'Решение единственного участника', -}; - -@Pipe({ - name: 'authorityConfirmingDocumentTitle', -}) -export class AuthorityConfirmingDocumentTitlePipe implements PipeTransform { - transform(type: AuthorityConfirmingDocumentType | string): string { - return AUTHORITY_CONFIRMING_DOCUMENT_TITLE_BY_TYPE[type] || type; - } -} diff --git a/src/app/claim-mgt/claim/conversation/questionary/bank-account-info/bank-account-info.component.html b/src/app/claim-mgt/claim/conversation/questionary/bank-account-info/bank-account-info.component.html deleted file mode 100644 index f8de8e86..00000000 --- a/src/app/claim-mgt/claim/conversation/questionary/bank-account-info/bank-account-info.component.html +++ /dev/null @@ -1,16 +0,0 @@ -
- - {{ bankAccount?.bank_name | emptyDefault }} - -
- - {{ bankAccount?.bank_bik | emptyDefault }} - - - {{ bankAccount?.bank_post_account | emptyDefault }} - -
- - {{ bankAccount?.account | emptyDefault }} - -
diff --git a/src/app/claim-mgt/claim/conversation/questionary/bank-account-info/bank-account-info.component.ts b/src/app/claim-mgt/claim/conversation/questionary/bank-account-info/bank-account-info.component.ts deleted file mode 100644 index 93ad3903..00000000 --- a/src/app/claim-mgt/claim/conversation/questionary/bank-account-info/bank-account-info.component.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { ChangeDetectionStrategy, Component, Input } from '@angular/core'; - -import { RussianBankAccount } from '../../../../../thrift-services/ank/gen-model/questionary'; - -@Component({ - selector: 'cc-bank-account-info', - templateUrl: 'bank-account-info.component.html', - changeDetection: ChangeDetectionStrategy.OnPush, -}) -export class BankAccountInfoComponent { - @Input() bankAccount: RussianBankAccount; -} diff --git a/src/app/claim-mgt/claim/conversation/questionary/bank-account-info/index.ts b/src/app/claim-mgt/claim/conversation/questionary/bank-account-info/index.ts deleted file mode 100644 index d256fc4c..00000000 --- a/src/app/claim-mgt/claim/conversation/questionary/bank-account-info/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './bank-account-info.component'; diff --git a/src/app/claim-mgt/claim/conversation/questionary/beneficial-owner-info/beneficial-owner-info.component.html b/src/app/claim-mgt/claim/conversation/questionary/beneficial-owner-info/beneficial-owner-info.component.html deleted file mode 100644 index ee319f61..00000000 --- a/src/app/claim-mgt/claim/conversation/questionary/beneficial-owner-info/beneficial-owner-info.component.html +++ /dev/null @@ -1,98 +0,0 @@ -
- - {{ beneficialOwner?.ownership_percentage | emptyDefault }} - - - - - - - - - - - - - - {{ beneficialOwner?.migration_card_info?.card_number | emptyDefault }} - -
- {{ - beneficialOwner?.migration_card_info?.beginning_date | date | emptyDefault - }} - {{ - beneficialOwner?.migration_card_info?.expiration_date | date | emptyDefault - }} -
- - - - - {{ beneficialOwner?.residence_approve?.name | emptyDefault }} - -
- - {{ beneficialOwner?.residence_approve?.series | emptyDefault }} - - - {{ beneficialOwner?.residence_approve?.number | emptyDefault }} - -
-
- {{ - beneficialOwner?.residence_approve?.beginning_date | date | emptyDefault - }} - {{ - beneficialOwner?.residence_approve?.expiration_date | date | emptyDefault - }} -
- - - -
- {{ - beneficialOwner?.inn | emptyDefault - }} - {{ - beneficialOwner?.snils | emptyDefault - }} -
- - - - - - - - -
- - {{ - beneficialOwner?.residency_info?.individual_residency_info?.usa_tax_resident - | yesNo - | emptyDefault - }} - - - {{ - beneficialOwner?.residency_info?.individual_residency_info?.except_usa_tax_resident - | yesNo - | emptyDefault - }} - -
-
diff --git a/src/app/claim-mgt/claim/conversation/questionary/beneficial-owner-info/beneficial-owner-info.component.ts b/src/app/claim-mgt/claim/conversation/questionary/beneficial-owner-info/beneficial-owner-info.component.ts deleted file mode 100644 index b064e356..00000000 --- a/src/app/claim-mgt/claim/conversation/questionary/beneficial-owner-info/beneficial-owner-info.component.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { ChangeDetectionStrategy, Component, Input } from '@angular/core'; - -import { BeneficialOwner } from '../../../../../thrift-services/ank/gen-model/questionary'; - -@Component({ - selector: 'cc-beneficial-owner-info', - templateUrl: 'beneficial-owner-info.component.html', - changeDetection: ChangeDetectionStrategy.OnPush, -}) -export class BeneficialOwnerInfoComponent { - @Input() beneficialOwner: BeneficialOwner; -} diff --git a/src/app/claim-mgt/claim/conversation/questionary/beneficial-owner-info/index.ts b/src/app/claim-mgt/claim/conversation/questionary/beneficial-owner-info/index.ts deleted file mode 100644 index 66268378..00000000 --- a/src/app/claim-mgt/claim/conversation/questionary/beneficial-owner-info/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './beneficial-owner-info.component'; diff --git a/src/app/claim-mgt/claim/conversation/questionary/contact-info/contact-info.component.html b/src/app/claim-mgt/claim/conversation/questionary/contact-info/contact-info.component.html deleted file mode 100644 index f5e5795a..00000000 --- a/src/app/claim-mgt/claim/conversation/questionary/contact-info/contact-info.component.html +++ /dev/null @@ -1,8 +0,0 @@ -
- - {{ contactInfo?.email | emptyDefault }} - - - {{ contactInfo?.phone_number | emptyDefault }} - -
diff --git a/src/app/claim-mgt/claim/conversation/questionary/contact-info/contact-info.component.ts b/src/app/claim-mgt/claim/conversation/questionary/contact-info/contact-info.component.ts deleted file mode 100644 index bbc27576..00000000 --- a/src/app/claim-mgt/claim/conversation/questionary/contact-info/contact-info.component.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { ChangeDetectionStrategy, Component, Input } from '@angular/core'; - -import { ContactInfo } from '../../../../../thrift-services/ank/gen-model/questionary'; - -@Component({ - selector: 'cc-contact-info', - templateUrl: 'contact-info.component.html', - changeDetection: ChangeDetectionStrategy.OnPush, -}) -export class ContactInfoComponent { - @Input() contactInfo: ContactInfo; -} diff --git a/src/app/claim-mgt/claim/conversation/questionary/contact-info/index.ts b/src/app/claim-mgt/claim/conversation/questionary/contact-info/index.ts deleted file mode 100644 index f96b9be1..00000000 --- a/src/app/claim-mgt/claim/conversation/questionary/contact-info/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './contact-info.component'; diff --git a/src/app/claim-mgt/claim/conversation/questionary/empty-default.pipe.ts b/src/app/claim-mgt/claim/conversation/questionary/empty-default.pipe.ts deleted file mode 100644 index 3f7b6aa5..00000000 --- a/src/app/claim-mgt/claim/conversation/questionary/empty-default.pipe.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Pipe, PipeTransform } from '@angular/core'; -import isNil from 'lodash-es/isNil'; - -@Pipe({ - name: 'emptyDefault', -}) -export class EmptyDefaultPipe implements PipeTransform { - transform(value: any): string { - return isNil(value) || value === '' ? '-' : value; - } -} diff --git a/src/app/claim-mgt/claim/conversation/questionary/identity-document-info/identity-document-info.component.html b/src/app/claim-mgt/claim/conversation/questionary/identity-document-info/identity-document-info.component.html deleted file mode 100644 index 1d82df58..00000000 --- a/src/app/claim-mgt/claim/conversation/questionary/identity-document-info/identity-document-info.component.html +++ /dev/null @@ -1,16 +0,0 @@ -
-
- - {{ identityDocument?.series_number | emptyDefault }} - - - {{ identityDocument?.issuer_code | emptyDefault }} - -
- - {{ identityDocument?.issued_at | emptyDefault }} - - - {{ identityDocument?.issuer | emptyDefault }} - -
diff --git a/src/app/claim-mgt/claim/conversation/questionary/identity-document-info/identity-document-info.component.ts b/src/app/claim-mgt/claim/conversation/questionary/identity-document-info/identity-document-info.component.ts deleted file mode 100644 index 265ea68f..00000000 --- a/src/app/claim-mgt/claim/conversation/questionary/identity-document-info/identity-document-info.component.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { ChangeDetectionStrategy, Component, Input } from '@angular/core'; - -import { RussianDomesticPassport } from '../../../../../thrift-services/ank/gen-model/questionary'; - -@Component({ - selector: 'cc-identity-document-info', - templateUrl: 'identity-document-info.component.html', - changeDetection: ChangeDetectionStrategy.OnPush, -}) -export class IdentityDocumentInfoComponent { - @Input() identityDocument: RussianDomesticPassport; -} diff --git a/src/app/claim-mgt/claim/conversation/questionary/identity-document-info/index.ts b/src/app/claim-mgt/claim/conversation/questionary/identity-document-info/index.ts deleted file mode 100644 index 315dd19f..00000000 --- a/src/app/claim-mgt/claim/conversation/questionary/identity-document-info/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './identity-document-info.component'; diff --git a/src/app/claim-mgt/claim/conversation/questionary/index.ts b/src/app/claim-mgt/claim/conversation/questionary/index.ts deleted file mode 100644 index 7d123aa3..00000000 --- a/src/app/claim-mgt/claim/conversation/questionary/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './questionary.component'; diff --git a/src/app/claim-mgt/claim/conversation/questionary/individual-entity-info/index.ts b/src/app/claim-mgt/claim/conversation/questionary/individual-entity-info/index.ts deleted file mode 100644 index 83a530f0..00000000 --- a/src/app/claim-mgt/claim/conversation/questionary/individual-entity-info/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './individual-entity-info.component'; diff --git a/src/app/claim-mgt/claim/conversation/questionary/individual-entity-info/individual-entity-info.component.html b/src/app/claim-mgt/claim/conversation/questionary/individual-entity-info/individual-entity-info.component.html deleted file mode 100644 index 1869baef..00000000 --- a/src/app/claim-mgt/claim/conversation/questionary/individual-entity-info/individual-entity-info.component.html +++ /dev/null @@ -1,15 +0,0 @@ -
- - - - - - - - - -
diff --git a/src/app/claim-mgt/claim/conversation/questionary/individual-entity-info/individual-entity-info.component.ts b/src/app/claim-mgt/claim/conversation/questionary/individual-entity-info/individual-entity-info.component.ts deleted file mode 100644 index a6edbfac..00000000 --- a/src/app/claim-mgt/claim/conversation/questionary/individual-entity-info/individual-entity-info.component.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { ChangeDetectionStrategy, Component, Input } from '@angular/core'; - -import { RussianIndividualEntity } from '../../../../../thrift-services/ank/gen-model/questionary'; - -@Component({ - selector: 'cc-individual-entity-info', - templateUrl: 'individual-entity-info.component.html', - changeDetection: ChangeDetectionStrategy.OnPush, -}) -export class IndividualEntityInfoComponent { - @Input() individualEntity: RussianIndividualEntity; -} diff --git a/src/app/claim-mgt/claim/conversation/questionary/legal-owner-info/index.ts b/src/app/claim-mgt/claim/conversation/questionary/legal-owner-info/index.ts deleted file mode 100644 index d383b019..00000000 --- a/src/app/claim-mgt/claim/conversation/questionary/legal-owner-info/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './legal-owner-info.component'; diff --git a/src/app/claim-mgt/claim/conversation/questionary/legal-owner-info/legal-owner-info.component.html b/src/app/claim-mgt/claim/conversation/questionary/legal-owner-info/legal-owner-info.component.html deleted file mode 100644 index 17cdc153..00000000 --- a/src/app/claim-mgt/claim/conversation/questionary/legal-owner-info/legal-owner-info.component.html +++ /dev/null @@ -1,45 +0,0 @@ -
- - - - -
- {{ - legalOwnerInfo.inn | emptyDefault - }} - {{ - legalOwnerInfo.snils | emptyDefault - }} -
- - - -
- {{ - legalOwnerInfo.head_position | emptyDefault - }} - {{ - legalOwnerInfo.term_of_office | emptyDefault - }} -
- - - - - - - {{ - legalOwnerInfo.authority_confirming_document?.type - | authorityConfirmingDocumentTitle - | emptyDefault - }} - - - - - -
diff --git a/src/app/claim-mgt/claim/conversation/questionary/legal-owner-info/legal-owner-info.component.ts b/src/app/claim-mgt/claim/conversation/questionary/legal-owner-info/legal-owner-info.component.ts deleted file mode 100644 index 454036b8..00000000 --- a/src/app/claim-mgt/claim/conversation/questionary/legal-owner-info/legal-owner-info.component.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Component, Input } from '@angular/core'; - -import { LegalOwnerInfo } from '../../../../../thrift-services/ank/gen-model/questionary'; - -@Component({ - selector: 'cc-legal-owner-info', - templateUrl: 'legal-owner-info.component.html', -}) -export class LegalOwnerInfoComponent { - @Input() legalOwnerInfo: LegalOwnerInfo; -} diff --git a/src/app/claim-mgt/claim/conversation/questionary/organization-info/index.ts b/src/app/claim-mgt/claim/conversation/questionary/organization-info/index.ts deleted file mode 100644 index c762a9c6..00000000 --- a/src/app/claim-mgt/claim/conversation/questionary/organization-info/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './organization-info.component'; -export * from './international-entity'; -export * from './russian-entity'; diff --git a/src/app/claim-mgt/claim/conversation/questionary/organization-info/international-entity/index.ts b/src/app/claim-mgt/claim/conversation/questionary/organization-info/international-entity/index.ts deleted file mode 100644 index a730c6c3..00000000 --- a/src/app/claim-mgt/claim/conversation/questionary/organization-info/international-entity/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './international-entity.component'; diff --git a/src/app/claim-mgt/claim/conversation/questionary/organization-info/international-entity/international-entity.component.html b/src/app/claim-mgt/claim/conversation/questionary/organization-info/international-entity/international-entity.component.html deleted file mode 100644 index 27838113..00000000 --- a/src/app/claim-mgt/claim/conversation/questionary/organization-info/international-entity/international-entity.component.html +++ /dev/null @@ -1,19 +0,0 @@ -
-
- {{ - entity?.legal_name | emptyDefault - }} - {{ - entity?.trading_name | emptyDefault - }} -
- - {{ entity?.registered_address | emptyDefault }} - - - {{ entity?.actual_address | emptyDefault }} - - - {{ entity?.registered_number | emptyDefault }} - -
diff --git a/src/app/claim-mgt/claim/conversation/questionary/organization-info/international-entity/international-entity.component.ts b/src/app/claim-mgt/claim/conversation/questionary/organization-info/international-entity/international-entity.component.ts deleted file mode 100644 index 0be1db7a..00000000 --- a/src/app/claim-mgt/claim/conversation/questionary/organization-info/international-entity/international-entity.component.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { ChangeDetectionStrategy, Component, Input } from '@angular/core'; - -import { InternationalLegalEntity } from '../../../../../../thrift-services/ank/gen-model/questionary'; - -@Component({ - selector: 'cc-international-entity', - templateUrl: 'international-entity.component.html', - changeDetection: ChangeDetectionStrategy.OnPush, -}) -export class InternationalEntityComponent { - @Input() entity: InternationalLegalEntity; -} diff --git a/src/app/claim-mgt/claim/conversation/questionary/organization-info/organization-info.component.html b/src/app/claim-mgt/claim/conversation/questionary/organization-info/organization-info.component.html deleted file mode 100644 index 48f838da..00000000 --- a/src/app/claim-mgt/claim/conversation/questionary/organization-info/organization-info.component.html +++ /dev/null @@ -1,7 +0,0 @@ -
- - -
diff --git a/src/app/claim-mgt/claim/conversation/questionary/organization-info/organization-info.component.ts b/src/app/claim-mgt/claim/conversation/questionary/organization-info/organization-info.component.ts deleted file mode 100644 index a2dbddc7..00000000 --- a/src/app/claim-mgt/claim/conversation/questionary/organization-info/organization-info.component.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { ChangeDetectionStrategy, Component, Input } from '@angular/core'; - -import { getUnionValue } from '@cc/utils/get-union-key'; - -import { Contractor } from '../../../../../thrift-services/ank/gen-model/questionary'; - -@Component({ - selector: 'cc-organization-info', - templateUrl: 'organization-info.component.html', - changeDetection: ChangeDetectionStrategy.OnPush, -}) -export class OrganizationInfoComponent { - @Input() contractor: Contractor; - - get entity() { - return getUnionValue(getUnionValue(this.contractor)) as any; - } - - get isInternationalLegalEntity() { - return !!this.contractor?.legal_entity?.international_legal_entity; - } -} diff --git a/src/app/claim-mgt/claim/conversation/questionary/organization-info/russian-entity/index.ts b/src/app/claim-mgt/claim/conversation/questionary/organization-info/russian-entity/index.ts deleted file mode 100644 index 679c0c48..00000000 --- a/src/app/claim-mgt/claim/conversation/questionary/organization-info/russian-entity/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './russian-entity.component'; diff --git a/src/app/claim-mgt/claim/conversation/questionary/organization-info/russian-entity/russian-entity.component.html b/src/app/claim-mgt/claim/conversation/questionary/organization-info/russian-entity/russian-entity.component.html deleted file mode 100644 index 1e021a1f..00000000 --- a/src/app/claim-mgt/claim/conversation/questionary/organization-info/russian-entity/russian-entity.component.html +++ /dev/null @@ -1,58 +0,0 @@ -
-
- {{ entity?.name | emptyDefault }} - {{ entity?.inn | emptyDefault }} -
- - {{ registrationAddress | emptyDefault }} - - - - - - {{ entity?.additional_info?.staff_count | emptyDefault }} - -
- - {{ - !!entity?.additional_info?.accountant_info?.with_chief_accountant - | yesNo - | emptyDefault - }} - - - {{ accountantType | emptyDefault }} - - - {{ - entity?.additional_info?.accountant_info?.without_chief_accountant - ?.accounting_organization?.inn | emptyDefault - }} - -
- - - -
- - {{ entity?.additional_info?.has_beneficiary | yesNo | emptyDefault }} - - - {{ entity?.additional_info?.has_liquidation_process | yesNo | emptyDefault }} - -
- - - -
- - {{ entity?.additional_info?.month_operation_count | emptyDefault }} - - - {{ entity?.additional_info?.month_operation_sum | emptyDefault }} - -
-
diff --git a/src/app/claim-mgt/claim/conversation/questionary/organization-info/russian-entity/russian-entity.component.ts b/src/app/claim-mgt/claim/conversation/questionary/organization-info/russian-entity/russian-entity.component.ts deleted file mode 100644 index 12b98b05..00000000 --- a/src/app/claim-mgt/claim/conversation/questionary/organization-info/russian-entity/russian-entity.component.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { ChangeDetectionStrategy, Component, Input } from '@angular/core'; -import get from 'lodash-es/get'; - -import { getUnionKey } from '@cc/utils/get-union-key'; - -import { - RussianIndividualEntity, - RussianLegalEntity, - WithoutChiefAccountant, -} from '../../../../../../thrift-services/ank/gen-model/questionary'; - -const WITHOUT_CHIEF_ACCOUNTANT_TITLES: { [name in keyof WithoutChiefAccountant]: string } = { - accounting_organization: 'Организация ведущая бухгалтерский учет', - head_accounting: 'Руководитель организации', - individual_accountant: 'Бухгалтер - индивидуальный специалист', -}; - -@Component({ - selector: 'cc-russian-entity', - templateUrl: 'russian-entity.component.html', - changeDetection: ChangeDetectionStrategy.OnPush, -}) -export class RussianEntityComponent { - @Input() entity: RussianLegalEntity | RussianIndividualEntity; - - get registrationAddress() { - if (this.entity?.registration_info?.individual_registration_info) { - return this.entity.registration_info.individual_registration_info.registration_place; - } else if (this.entity?.registration_info?.legal_registration_info) { - return this.entity.registration_info.legal_registration_info.registration_address; - } - return ''; - } - - get accountantType() { - return WITHOUT_CHIEF_ACCOUNTANT_TITLES[ - getUnionKey( - get(this.entity, ['additional_info', 'accountant_info', 'without_chief_accountant']) - ) - ]; - } -} diff --git a/src/app/claim-mgt/claim/conversation/questionary/pdl-info/index.ts b/src/app/claim-mgt/claim/conversation/questionary/pdl-info/index.ts deleted file mode 100644 index 4489592d..00000000 --- a/src/app/claim-mgt/claim/conversation/questionary/pdl-info/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './pdl-info.component'; diff --git a/src/app/claim-mgt/claim/conversation/questionary/pdl-info/pdl-info.component.html b/src/app/claim-mgt/claim/conversation/questionary/pdl-info/pdl-info.component.html deleted file mode 100644 index e27bea7f..00000000 --- a/src/app/claim-mgt/claim/conversation/questionary/pdl-info/pdl-info.component.html +++ /dev/null @@ -1,8 +0,0 @@ -
- {{ - pdl?.pdl_category | yesNo | emptyDefault - }} - {{ - pdl?.pdl_relation_degree | emptyDefault - }} -
diff --git a/src/app/claim-mgt/claim/conversation/questionary/pdl-info/pdl-info.component.ts b/src/app/claim-mgt/claim/conversation/questionary/pdl-info/pdl-info.component.ts deleted file mode 100644 index 2ed6dd1a..00000000 --- a/src/app/claim-mgt/claim/conversation/questionary/pdl-info/pdl-info.component.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { ChangeDetectionStrategy, Component, Input } from '@angular/core'; - -@Component({ - selector: 'cc-pdl-info', - templateUrl: 'pdl-info.component.html', - changeDetection: ChangeDetectionStrategy.OnPush, -}) -export class PdlInfoComponent { - @Input() - pdl: { pdl_category: string; pdl_relation_degree: string }; -} diff --git a/src/app/claim-mgt/claim/conversation/questionary/private-entity-info/index.ts b/src/app/claim-mgt/claim/conversation/questionary/private-entity-info/index.ts deleted file mode 100644 index f5c267ee..00000000 --- a/src/app/claim-mgt/claim/conversation/questionary/private-entity-info/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './private-entity-info.component'; diff --git a/src/app/claim-mgt/claim/conversation/questionary/private-entity-info/private-entity-info.component.html b/src/app/claim-mgt/claim/conversation/questionary/private-entity-info/private-entity-info.component.html deleted file mode 100644 index 504141f0..00000000 --- a/src/app/claim-mgt/claim/conversation/questionary/private-entity-info/private-entity-info.component.html +++ /dev/null @@ -1,22 +0,0 @@ -
-
- {{ - privateEntity?.fio | emptyDefault - }} - {{ - privateEntity?.birth_date | date | emptyDefault - }} -
- {{ - privateEntity?.birth_place | emptyDefault - }} - {{ - privateEntity?.residence_address | emptyDefault - }} - {{ - privateEntity?.citizenship | emptyDefault - }} - {{ - privateEntity?.actual_address | emptyDefault - }} -
diff --git a/src/app/claim-mgt/claim/conversation/questionary/private-entity-info/private-entity-info.component.ts b/src/app/claim-mgt/claim/conversation/questionary/private-entity-info/private-entity-info.component.ts deleted file mode 100644 index 698bacdd..00000000 --- a/src/app/claim-mgt/claim/conversation/questionary/private-entity-info/private-entity-info.component.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { ChangeDetectionStrategy, Component, Input } from '@angular/core'; - -import { RussianPrivateEntity } from '../../../../../thrift-services/ank/gen-model/questionary'; - -@Component({ - selector: 'cc-private-entity-info', - templateUrl: 'private-entity-info.component.html', - changeDetection: ChangeDetectionStrategy.OnPush, -}) -export class PrivateEntityInfoComponent { - @Input() privateEntity: RussianPrivateEntity; -} diff --git a/src/app/claim-mgt/claim/conversation/questionary/questionary.component.html b/src/app/claim-mgt/claim/conversation/questionary/questionary.component.html deleted file mode 100644 index ba3a02f1..00000000 --- a/src/app/claim-mgt/claim/conversation/questionary/questionary.component.html +++ /dev/null @@ -1,91 +0,0 @@ -
- - - - Сведения об организации - - - - - - - Сведения о юридическом лице - - - - - - - Сведения о физическом лице - - - - - - - Сведения о магазине - - - - - - - Банковские реквизиты для вывода денежных средств - - - - - - - Контактная информация - - - - - - - - - - Beneficial owner {{ i | serialNumber: entity?.beneficial_owners?.length }} - - - - - - - - - - - - -
diff --git a/src/app/claim-mgt/claim/conversation/questionary/questionary.component.scss b/src/app/claim-mgt/claim/conversation/questionary/questionary.component.scss deleted file mode 100644 index a242ece1..00000000 --- a/src/app/claim-mgt/claim/conversation/questionary/questionary.component.scss +++ /dev/null @@ -1,3 +0,0 @@ -mat-card-content { - word-break: break-all; -} diff --git a/src/app/claim-mgt/claim/conversation/questionary/questionary.component.ts b/src/app/claim-mgt/claim/conversation/questionary/questionary.component.ts deleted file mode 100644 index b1da1afe..00000000 --- a/src/app/claim-mgt/claim/conversation/questionary/questionary.component.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { Component, Input } from '@angular/core'; -import get from 'lodash-es/get'; -import * as moment from 'moment'; -import { TCreatedPdf } from 'pdfmake/build/pdfmake'; -import { Observable } from 'rxjs'; -import { slugify } from 'transliteration'; - -import { QuestionaryDocumentService } from '@cc/app/shared/components'; -import { getCompanyInfo } from '@cc/app/shared/components/questionary-document/select-data'; -import { getUnionValue } from '@cc/utils/get-union-key'; - -import { BeneficialOwner } from '../../../../thrift-services/ank/gen-model/questionary'; -import { Questionary } from '../../../../thrift-services/ank/gen-model/questionary_manager'; - -const FILENAME_LENGTH = 100; - -@Component({ - selector: 'cc-questionary', - templateUrl: 'questionary.component.html', - styleUrls: ['questionary.component.scss'], -}) -export class QuestionaryComponent { - beneficialOwnersDocuments$: Observable; - - @Input() - questionary: Questionary; - - get entity() { - return getUnionValue(getUnionValue(get(this.questionary, ['data', 'contractor']))) as any; - } - - constructor(private questionaryDocumentService: QuestionaryDocumentService) {} - - downloadDocument() { - this.questionaryDocumentService - .createDoc(this.questionary) - .subscribe((doc) => doc.download(this.createFilename('Russian entity questionary'))); - } - - downloadBeneficialOwnerDocument(beneficialOwner: BeneficialOwner, idx: number) { - const { companyName, companyInn } = getCompanyInfo(this.questionary); - this.questionaryDocumentService - .createBeneficialOwnerDoc(beneficialOwner, companyName, companyInn) - .subscribe((doc) => - doc.download(this.createFilename(`Beneficial owner questionary N${idx}`)) - ); - } - - createFilename(name: string) { - const { companyName, companyInn } = getCompanyInfo(this.questionary); - return slugify([name, moment().utc().format(), companyInn, companyName].join('-'), { - separator: '_', - }).slice(0, FILENAME_LENGTH); - } -} diff --git a/src/app/claim-mgt/claim/conversation/questionary/questionary.module.ts b/src/app/claim-mgt/claim/conversation/questionary/questionary.module.ts deleted file mode 100644 index db7f3873..00000000 --- a/src/app/claim-mgt/claim/conversation/questionary/questionary.module.ts +++ /dev/null @@ -1,64 +0,0 @@ -import { LayoutModule } from '@angular/cdk/layout'; -import { CommonModule } from '@angular/common'; -import { NgModule } from '@angular/core'; -import { FlexLayoutModule } from '@angular/flex-layout'; -import { MatButtonModule } from '@angular/material/button'; -import { MatCardModule } from '@angular/material/card'; -import { MatExpansionModule } from '@angular/material/expansion'; -import { MatListModule } from '@angular/material/list'; - -import { DetailsItemModule } from '@cc/components/details-item'; - -import { AuthorityConfirmingDocumentTitlePipe } from './authority-confirming-document-title.pipe'; -import { BankAccountInfoComponent } from './bank-account-info'; -import { BeneficialOwnerInfoComponent } from './beneficial-owner-info'; -import { ContactInfoComponent } from './contact-info'; -import { EmptyDefaultPipe } from './empty-default.pipe'; -import { IdentityDocumentInfoComponent } from './identity-document-info'; -import { IndividualEntityInfoComponent } from './individual-entity-info'; -import { LegalOwnerInfoComponent } from './legal-owner-info'; -import { - InternationalEntityComponent, - OrganizationInfoComponent, - RussianEntityComponent, -} from './organization-info'; -import { PdlInfoComponent } from './pdl-info'; -import { PrivateEntityInfoComponent } from './private-entity-info'; -import { QuestionaryComponent } from './questionary.component'; -import { SerialNumberPipe } from './serial-number.pipe'; -import { ShopInfoComponent } from './shop-info'; -import { YesNoPipe } from './yes-no.pipe'; - -@NgModule({ - imports: [ - LayoutModule, - MatButtonModule, - FlexLayoutModule, - CommonModule, - MatExpansionModule, - MatCardModule, - MatListModule, - DetailsItemModule, - ], - declarations: [ - QuestionaryComponent, - RussianEntityComponent, - InternationalEntityComponent, - OrganizationInfoComponent, - YesNoPipe, - LegalOwnerInfoComponent, - EmptyDefaultPipe, - AuthorityConfirmingDocumentTitlePipe, - IndividualEntityInfoComponent, - IdentityDocumentInfoComponent, - BankAccountInfoComponent, - ShopInfoComponent, - ContactInfoComponent, - PrivateEntityInfoComponent, - SerialNumberPipe, - BeneficialOwnerInfoComponent, - PdlInfoComponent, - ], - exports: [QuestionaryComponent], -}) -export class QuestionaryModule {} diff --git a/src/app/claim-mgt/claim/conversation/questionary/serial-number.pipe.ts b/src/app/claim-mgt/claim/conversation/questionary/serial-number.pipe.ts deleted file mode 100644 index 678737ed..00000000 --- a/src/app/claim-mgt/claim/conversation/questionary/serial-number.pipe.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Pipe, PipeTransform } from '@angular/core'; - -@Pipe({ - name: 'serialNumber', -}) -export class SerialNumberPipe implements PipeTransform { - transform(idx: number, count?: number): string { - return count > 1 ? `#${idx + 1}` : ''; - } -} diff --git a/src/app/claim-mgt/claim/conversation/questionary/shop-info/index.ts b/src/app/claim-mgt/claim/conversation/questionary/shop-info/index.ts deleted file mode 100644 index b281f746..00000000 --- a/src/app/claim-mgt/claim/conversation/questionary/shop-info/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './shop-info.component'; diff --git a/src/app/claim-mgt/claim/conversation/questionary/shop-info/shop-info.component.html b/src/app/claim-mgt/claim/conversation/questionary/shop-info/shop-info.component.html deleted file mode 100644 index 8714f6b2..00000000 --- a/src/app/claim-mgt/claim/conversation/questionary/shop-info/shop-info.component.html +++ /dev/null @@ -1,8 +0,0 @@ -
- - {{ shopInfo?.details?.name | emptyDefault }} - - - {{ shopInfo?.location?.url | emptyDefault }} - -
diff --git a/src/app/claim-mgt/claim/conversation/questionary/shop-info/shop-info.component.ts b/src/app/claim-mgt/claim/conversation/questionary/shop-info/shop-info.component.ts deleted file mode 100644 index 61d5fa02..00000000 --- a/src/app/claim-mgt/claim/conversation/questionary/shop-info/shop-info.component.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { ChangeDetectionStrategy, Component, Input } from '@angular/core'; - -import { ShopInfo } from '../../../../../thrift-services/ank/gen-model/questionary'; - -@Component({ - selector: 'cc-shop-info', - templateUrl: 'shop-info.component.html', - changeDetection: ChangeDetectionStrategy.OnPush, -}) -export class ShopInfoComponent { - @Input() shopInfo: ShopInfo; -} diff --git a/src/app/claim-mgt/claim/conversation/questionary/yes-no.pipe.ts b/src/app/claim-mgt/claim/conversation/questionary/yes-no.pipe.ts deleted file mode 100644 index efd468b8..00000000 --- a/src/app/claim-mgt/claim/conversation/questionary/yes-no.pipe.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Pipe, PipeTransform } from '@angular/core'; - -@Pipe({ - name: 'yesNo', -}) -export class YesNoPipe implements PipeTransform { - transform(bool: boolean): string { - if (typeof bool !== 'boolean') { - return null; - } - return bool ? 'Да' : 'Нет'; - } -} diff --git a/src/app/claim-mgt/claim/conversation/reason/reason.component.html b/src/app/claim-mgt/claim/conversation/reason/reason.component.html deleted file mode 100644 index f52dcc70..00000000 --- a/src/app/claim-mgt/claim/conversation/reason/reason.component.html +++ /dev/null @@ -1,8 +0,0 @@ - - - {{ - statusModificationUnit.status.denied?.reason || - statusModificationUnit.status.revoked?.reason - }} - - diff --git a/src/app/claim-mgt/claim/conversation/reason/reason.component.ts b/src/app/claim-mgt/claim/conversation/reason/reason.component.ts deleted file mode 100644 index 2d5ccce5..00000000 --- a/src/app/claim-mgt/claim/conversation/reason/reason.component.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Component, Input } from '@angular/core'; - -import { StatusModificationUnit } from '../../../../thrift-services/damsel/gen-model/claim_management'; - -@Component({ - selector: 'cc-reason', - templateUrl: 'reason.component.html', -}) -export class ReasonComponent { - @Input() statusModificationUnit: StatusModificationUnit; -} diff --git a/src/app/claim-mgt/claim/conversation/save-party-modifications.service.ts b/src/app/claim-mgt/claim/conversation/save-party-modifications.service.ts deleted file mode 100644 index c443f0fe..00000000 --- a/src/app/claim-mgt/claim/conversation/save-party-modifications.service.ts +++ /dev/null @@ -1,90 +0,0 @@ -import { Injectable } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; -import Int64 from '@vality/thrift-ts/lib/int64'; -import isEqual from 'lodash-es/isEqual'; -import { forkJoin, Observable, of, ReplaySubject, Subject } from 'rxjs'; -import { - debounceTime, - distinctUntilChanged, - first, - map, - pluck, - shareReplay, - startWith, - switchMap, - tap, -} from 'rxjs/operators'; - -import { ClaimManagementService } from '../../../thrift-services/damsel/claim-management.service'; -import { Modification } from '../../../thrift-services/damsel/gen-model/claim_management'; -import { PartyModification } from '../../../thrift-services/damsel/gen-model/payment_processing'; -import { ClaimService } from '../claim.service'; - -@Injectable() -export class SavePartyModificationsService { - private unsaved$: Subject = new ReplaySubject(1); - private save$ = new Subject(); - private saving$: Subject = new Subject(); - - // eslint-disable-next-line @typescript-eslint/member-ordering - unsavedModifications$: Observable = this.unsaved$.pipe( - startWith([]), - distinctUntilChanged(isEqual), - shareReplay(1) - ); - // eslint-disable-next-line @typescript-eslint/member-ordering - hasUnsavedModifications$ = this.unsaved$.pipe(map((m) => m.length > 0)); - // eslint-disable-next-line @typescript-eslint/member-ordering - isSaving$ = this.saving$.asObservable(); - - constructor( - private route: ActivatedRoute, - private claimManagementService: ClaimManagementService, - private claimService: ClaimService - ) { - const partyId$ = this.route.params.pipe(pluck('party_id'), first()); - const claimId$ = this.route.params.pipe( - pluck('claim_id'), - map((claimId) => new Int64(Number(claimId))), - first() - ); - const claim$ = forkJoin([partyId$, claimId$]).pipe( - switchMap(([partyId, claimId]) => - this.claimManagementService.getClaim(partyId, claimId) - ) - ); - this.save$ - .pipe( - tap(() => this.saving$.next(true)), - debounceTime(300), - switchMap(() => this.unsavedModifications$.pipe(first())), - map((modifications) => - modifications.map((partyModification) => ({ - party_modification: partyModification, - })) - ), - switchMap((changeset) => forkJoin([partyId$, claimId$, of(changeset)])), - switchMap(([partyId, claimId, changeset]) => - this.claimManagementService.updateClaim( - partyId, - claimId, - changeset as Modification[] - ) - ), - switchMap(() => claim$) - ) - .subscribe((claim) => { - this.saving$.next(false); - this.unsaved$.next([]); - this.claimService.claim$.next(claim); // TODO need refactoring - }); - } - - partyModificationsChanged(m: PartyModification[]) { - this.unsaved$.next(m); - } - - save() { - this.save$.next(); - } -} diff --git a/src/app/claim-mgt/claim/conversation/send-comment/_send-comment-theme.scss b/src/app/claim-mgt/claim/conversation/send-comment/_send-comment-theme.scss deleted file mode 100644 index 14ea1077..00000000 --- a/src/app/claim-mgt/claim/conversation/send-comment/_send-comment-theme.scss +++ /dev/null @@ -1,9 +0,0 @@ -@use '@angular/material' as mat; - -@mixin cc-send-comment-theme($theme) { - $warn: map-get($theme, warn); - - .cc-send-comment-error { - color: mat.get-color-from-palette($warn, 500) !important; - } -} diff --git a/src/app/claim-mgt/claim/conversation/send-comment/index.ts b/src/app/claim-mgt/claim/conversation/send-comment/index.ts deleted file mode 100644 index ec71f70b..00000000 --- a/src/app/claim-mgt/claim/conversation/send-comment/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './send-comment.component'; diff --git a/src/app/claim-mgt/claim/conversation/send-comment/send-comment.component.html b/src/app/claim-mgt/claim/conversation/send-comment/send-comment.component.html deleted file mode 100644 index 8a726043..00000000 --- a/src/app/claim-mgt/claim/conversation/send-comment/send-comment.component.html +++ /dev/null @@ -1,16 +0,0 @@ -
- - Write a comment... - - -
- -
-
diff --git a/src/app/claim-mgt/claim/conversation/send-comment/send-comment.component.scss b/src/app/claim-mgt/claim/conversation/send-comment/send-comment.component.scss deleted file mode 100644 index 61b68ea5..00000000 --- a/src/app/claim-mgt/claim/conversation/send-comment/send-comment.component.scss +++ /dev/null @@ -1,9 +0,0 @@ -$cc-send-comment-action-padding: 10px 0 0 0; - -.send-comment-action { - padding: $cc-send-comment-action-padding; -} - -button { - margin-bottom: 1.25em; -} diff --git a/src/app/claim-mgt/claim/conversation/send-comment/send-comment.component.ts b/src/app/claim-mgt/claim/conversation/send-comment/send-comment.component.ts deleted file mode 100644 index cce1bbd8..00000000 --- a/src/app/claim-mgt/claim/conversation/send-comment/send-comment.component.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { Component, EventEmitter, Output } from '@angular/core'; -import { FormGroup } from '@angular/forms'; - -import { Modification } from '../../../../thrift-services/damsel/gen-model/claim_management'; -import { SendCommentService } from './send-comment.service'; - -@Component({ - selector: 'cc-send-comment', - templateUrl: 'send-comment.component.html', - styleUrls: ['send-comment.component.scss'], - providers: [SendCommentService], -}) -export class SendCommentComponent { - @Output() conversationSaved: EventEmitter = new EventEmitter(); - - form: FormGroup = this.sendCommentService.form; - inProgress$ = this.sendCommentService.inProgress$; - - constructor(private sendCommentService: SendCommentService) { - this.sendCommentService.conversationSaved$.subscribe((id) => - this.conversationSaved.next([sendCommentService.createModification(id)]) - ); - this.inProgress$.subscribe((inProgress) => { - if (inProgress) { - this.form.controls.comment.disable(); - } else { - this.form.controls.comment.enable(); - } - }); - } - - sendComment(comment: string) { - this.sendCommentService.sendComment(comment); - } -} diff --git a/src/app/claim-mgt/claim/conversation/send-comment/send-comment.service.ts b/src/app/claim-mgt/claim/conversation/send-comment/send-comment.service.ts deleted file mode 100644 index cc2986aa..00000000 --- a/src/app/claim-mgt/claim/conversation/send-comment/send-comment.service.ts +++ /dev/null @@ -1,103 +0,0 @@ -import { Injectable } from '@angular/core'; -import { FormBuilder, FormGroup, Validators } from '@angular/forms'; -import { MatSnackBar } from '@angular/material/snack-bar'; -import get from 'lodash-es/get'; -import { BehaviorSubject, forkJoin, merge, Observable, of, Subject } from 'rxjs'; -import { catchError, filter, pluck, switchMap, tap } from 'rxjs/operators'; -import * as uuid from 'uuid/v4'; - -import { progress } from '@cc/app/shared/custom-operators'; - -import { KeycloakTokenInfoService } from '../../../../keycloak-token-info.service'; -import { Modification } from '../../../../thrift-services/damsel/gen-model/claim_management'; -import { ConversationId, User } from '../../../../thrift-services/messages/gen-model/messages'; -import { MessagesService } from '../../../../thrift-services/messages/messages.service'; -import { createSingleMessageConversationParams } from '../../../../thrift-services/messages/utils'; - -@Injectable() -export class SendCommentService { - private conversationId$: BehaviorSubject = new BehaviorSubject(null); - private error$: BehaviorSubject = new BehaviorSubject({ hasError: false }); - private sendComment$: Subject = new Subject(); - - // eslint-disable-next-line @typescript-eslint/member-ordering - form: FormGroup; - // eslint-disable-next-line @typescript-eslint/member-ordering - conversationSaved$: Observable = this.conversationId$.pipe( - filter((id) => !!id) - ); - // eslint-disable-next-line @typescript-eslint/member-ordering - errorCode$: Observable = this.error$.pipe(pluck('code')); - // eslint-disable-next-line @typescript-eslint/member-ordering - inProgress$: Observable = progress( - this.sendComment$, - merge(this.conversationId$, this.error$) - ); - - constructor( - private fb: FormBuilder, - private messagesService: MessagesService, - private keycloakTokenInfoService: KeycloakTokenInfoService, - private snackBar: MatSnackBar - ) { - this.form = this.fb.group({ - comment: ['', [Validators.maxLength(1000)]], - }); - - this.sendComment$ - .pipe( - tap(() => this.error$.next({ hasError: false })), - switchMap((text) => { - const { name, email, sub } = this.keycloakTokenInfoService.decodedUserToken; - const user: User = { fullname: name, email, user_id: sub }; - const conversationId = uuid(); - const conversation = createSingleMessageConversationParams( - conversationId, - text, - sub - ); - return forkJoin([ - of(conversationId), - this.messagesService.saveConversations([conversation], user).pipe( - catchError((ex) => { - console.error(ex); - this.snackBar.open( - `There was an error sending a comment: ${ex}`, - 'OK', - { duration: 5000 } - ); - const error = { hasError: true, code: 'saveConversationsFailed' }; - this.error$.next(error); - return of(error); - }) - ), - ]); - }), - filter(([, res]) => get(res, ['hasError']) !== true) - ) - .subscribe(([conversationId]) => { - this.conversationId$.next(conversationId); - this.form.reset(); - }); - } - - sendComment(comment: string) { - if (comment.length === 0) { - return; - } - this.sendComment$.next(comment); - } - - createModification(id: ConversationId): Modification { - return { - claim_modification: { - comment_modification: { - id, - modification: { - creation: {}, - }, - }, - }, - }; - } -} diff --git a/src/app/claim-mgt/claim/conversation/to-timeline-info/add-comments-to-timeline-info.ts b/src/app/claim-mgt/claim/conversation/to-timeline-info/add-comments-to-timeline-info.ts deleted file mode 100644 index 730ea8cc..00000000 --- a/src/app/claim-mgt/claim/conversation/to-timeline-info/add-comments-to-timeline-info.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { Conversation } from '../../../../thrift-services/messages/gen-model/messages'; -import { TimelineAction, TimelineItemInfo } from './model'; - -export const addCommentsToTimelineInfos = ( - conversations: Conversation[], - infos: TimelineItemInfo[] -): TimelineItemInfo[] => - infos.map((info) => { - if (info.action === TimelineAction.commentAdded) { - return { - ...info, - data: conversations - ? conversations.find( - (conversation) => - !!info.modifications.find( - (m) => - m.claim_modification.comment_modification.id === - conversation.conversation_id - ) - ) - : null, - }; - } else { - return info; - } - }); diff --git a/src/app/claim-mgt/claim/conversation/to-timeline-info/get-claim-modification-timeline-action.ts b/src/app/claim-mgt/claim/conversation/to-timeline-info/get-claim-modification-timeline-action.ts deleted file mode 100644 index 4f9f95d8..00000000 --- a/src/app/claim-mgt/claim/conversation/to-timeline-info/get-claim-modification-timeline-action.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { getUnionKey } from '@cc/utils/get-union-key'; - -import { ClaimStatus } from '../../../../papi/model'; -import { - ClaimModification, - StatusModificationUnit, -} from '../../../../thrift-services/damsel/gen-model/claim_management'; -import { TimelineAction } from './model'; - -function getStatusModificationTimelineAction(unit: StatusModificationUnit): TimelineAction | null { - switch (getUnionKey(unit.status)) { - case ClaimStatus.Accepted: - return TimelineAction.statusAccepted; - case ClaimStatus.Denied: - return TimelineAction.statusDenied; - case ClaimStatus.Pending: - return TimelineAction.statusPending; - case ClaimStatus.Review: - return TimelineAction.statusReview; - case ClaimStatus.Revoked: - return TimelineAction.statusRevoked; - case ClaimStatus.PendingAcceptance: - return null; - } -} - -export function getClaimModificationTimelineAction(m: ClaimModification): TimelineAction | null { - switch (getUnionKey(m)) { - case 'document_modification': - return TimelineAction.changesAdded; - case 'status_modification': - return getStatusModificationTimelineAction(m.status_modification); - case 'file_modification': - return TimelineAction.filesAdded; - case 'comment_modification': - return TimelineAction.commentAdded; - } - throw new Error(`Unknown claimModification: ${m}`); -} diff --git a/src/app/claim-mgt/claim/conversation/to-timeline-info/index.ts b/src/app/claim-mgt/claim/conversation/to-timeline-info/index.ts deleted file mode 100644 index 1e62683c..00000000 --- a/src/app/claim-mgt/claim/conversation/to-timeline-info/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './to-timeline-info'; -export * from './add-comments-to-timeline-info'; diff --git a/src/app/claim-mgt/claim/conversation/to-timeline-info/model/index.ts b/src/app/claim-mgt/claim/conversation/to-timeline-info/model/index.ts deleted file mode 100644 index 318b8b47..00000000 --- a/src/app/claim-mgt/claim/conversation/to-timeline-info/model/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './timeline-item-info'; -export * from './timeline-action'; diff --git a/src/app/claim-mgt/claim/conversation/to-timeline-info/model/timeline-action.ts b/src/app/claim-mgt/claim/conversation/to-timeline-info/model/timeline-action.ts deleted file mode 100644 index cc17143f..00000000 --- a/src/app/claim-mgt/claim/conversation/to-timeline-info/model/timeline-action.ts +++ /dev/null @@ -1,13 +0,0 @@ -export enum TimelineAction { - /* eslint-disable @typescript-eslint/naming-convention */ - partyModification = 'partyModification', - changesAdded = 'changesAdded', - filesAdded = 'filesAdded', - commentAdded = 'commentAdded', - statusReview = 'statusReview', - statusPending = 'statusPending', - statusDenied = 'statusDenied', - statusRevoked = 'statusRevoked', - statusAccepted = 'statusAccepted', - /* eslint-enable @typescript-eslint/naming-convention */ -} diff --git a/src/app/claim-mgt/claim/conversation/to-timeline-info/model/timeline-item-info.ts b/src/app/claim-mgt/claim/conversation/to-timeline-info/model/timeline-item-info.ts deleted file mode 100644 index 797ff9d3..00000000 --- a/src/app/claim-mgt/claim/conversation/to-timeline-info/model/timeline-item-info.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { - Modification, - UserInfo, -} from '../../../../../thrift-services/damsel/gen-model/claim_management'; -import { Conversation } from '../../../../../thrift-services/messages/gen-model/messages'; -import { TimelineAction } from './timeline-action'; - -export interface TimelineItemInfo { - action: TimelineAction; - user_info: UserInfo; - created_at: string; - modifications: Modification[]; - data?: Conversation; -} diff --git a/src/app/claim-mgt/claim/conversation/to-timeline-info/to-timeline-info.ts b/src/app/claim-mgt/claim/conversation/to-timeline-info/to-timeline-info.ts deleted file mode 100644 index 25a97d3d..00000000 --- a/src/app/claim-mgt/claim/conversation/to-timeline-info/to-timeline-info.ts +++ /dev/null @@ -1,66 +0,0 @@ -import { sortUnitsByCreatedAtAsc } from '@cc/app/shared/utils'; -import { getUnionKey } from '@cc/utils/get-union-key'; - -import { - Modification, - ModificationUnit, -} from '../../../../thrift-services/damsel/gen-model/claim_management'; -import { getClaimModificationTimelineAction } from './get-claim-modification-timeline-action'; -import { TimelineAction, TimelineItemInfo } from './model'; - -const isSame = (x: TimelineItemInfo, y: TimelineItemInfo): boolean => - x.action === y.action && x.user_info.type === y.user_info.type; - -const getUnitTimelineAction = (modification: Modification): TimelineAction | null => { - switch (getUnionKey(modification)) { - case 'claim_modification': - return getClaimModificationTimelineAction(modification.claim_modification); - case 'party_modification': - return TimelineAction.partyModification; - } -}; - -const concatLastItem = ( - acc: TimelineItemInfo[], - updateItem: TimelineItemInfo -): TimelineItemInfo[] => - acc.map((accItem, accItemIndex) => - accItemIndex === acc.length - 1 - ? { - ...updateItem, - modifications: accItem.modifications.concat(updateItem.modifications), - } - : accItem - ); - -const acceptTimelineItem = ( - acc: TimelineItemInfo[], - { created_at, modification, user_info }: ModificationUnit -): TimelineItemInfo[] => { - const action = getUnitTimelineAction(modification); - if (action === null) { - return acc; - } - const modifications = [modification]; - const result = { - action, - user_info, - created_at, - modifications, - }; - if (acc.length !== 0 && modifications.length !== 0) { - const lastItem = acc[acc.length - 1]; - if (isSame(result, lastItem)) { - return concatLastItem(acc, result); - } - } - return acc.concat(result); -}; - -export const toTimelineInfo = (units: ModificationUnit[]): TimelineItemInfo[] => { - if (!units || units.length === 0) { - return []; - } - const sortedUnits = sortUnitsByCreatedAtAsc(units); - return sortedUnits.reduce(acceptTimelineItem, []); -}; diff --git a/src/app/claim-mgt/claim/details/details.component.html b/src/app/claim-mgt/claim/details/details.component.html deleted file mode 100644 index 0637c1dd..00000000 --- a/src/app/claim-mgt/claim/details/details.component.html +++ /dev/null @@ -1,62 +0,0 @@ - - -
-
- -
{{ claim.id }}
-
-
- -
{{ claim.revision }}
-
-
- -
{{ claim.status | ccClaimStatusThrift | ccClaimStatus }}
-
-
- -
{{ claim.status.revoked?.reason || claim.status.denied?.reason }}
-
-
-
-
- -
{{ claim.party_id }}
-
-
- -
{{ claim.created_at | date: 'dd.MM.yyyy HH:mm:ss' }}
-
-
- -
{{ claim.updated_at | date: 'dd.MM.yyyy HH:mm:ss' }}
-
-
-
- - - - - - - -
diff --git a/src/app/claim-mgt/claim/details/details.component.ts b/src/app/claim-mgt/claim/details/details.component.ts deleted file mode 100644 index a0320a25..00000000 --- a/src/app/claim-mgt/claim/details/details.component.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { Component, Input } from '@angular/core'; -import { MatDialog } from '@angular/material/dialog'; -import { filter } from 'rxjs/operators'; - -import { AppAuthGuardService, ClaimManagementRole } from '@cc/app/shared/services'; - -import { Claim } from '../../../thrift-services/damsel/gen-model/claim_management'; -import { ClaimService } from '../claim.service'; -import { RecreateClaimService } from '../recreate-claim'; -import { getAvailableClaimStatuses } from '../status-changer/get-available-claim-statuses'; -import { StatusChangerComponent } from '../status-changer/status-changer.component'; - -@Component({ - selector: 'cc-claim-details', - templateUrl: 'details.component.html', -}) -export class DetailsComponent { - @Input() claim: Claim; - - recreateClaimInProcess$ = this.recreateClaimService.isInProcess$; - - canRecreate = this.appAuthGuardService.userHasRoles([ClaimManagementRole.CreateClaim]); - canAddClaimMod = this.appAuthGuardService.userHasRoles([ClaimManagementRole.AddPartyMod]); - - constructor( - private dialog: MatDialog, - private claimService: ClaimService, - private recreateClaimService: RecreateClaimService, - private appAuthGuardService: AppAuthGuardService - ) {} - - editStatus() { - this.dialog - .open(StatusChangerComponent, { - width: '500px', - disableClose: true, - data: { - partyID: this.claim.party_id, - claimID: this.claim.id, - claimStatus: this.claim.status, - }, - }) - .afterClosed() - .pipe(filter((r) => r)) - .subscribe(() => { - this.claimService.getClaim(this.claim.party_id, this.claim.id); - }); - } - - canChangeStatus(): boolean { - return getAvailableClaimStatuses(this.claim.status).length > 0; - } - - recreate() { - this.recreateClaimService.recreate(this.claim); - } -} diff --git a/src/app/claim-mgt/claim/index.ts b/src/app/claim-mgt/claim/index.ts deleted file mode 100644 index 1b27ecb4..00000000 --- a/src/app/claim-mgt/claim/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './claim.module'; diff --git a/src/app/claim-mgt/claim/recreate-claim/extract-modifications-reducer.ts b/src/app/claim-mgt/claim/recreate-claim/extract-modifications-reducer.ts deleted file mode 100644 index 8b462f80..00000000 --- a/src/app/claim-mgt/claim/recreate-claim/extract-modifications-reducer.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { Modification } from '../../../thrift-services/damsel/gen-model/claim_management'; - -export interface ExtractPayload { - recreateModifications: Modification[]; - extractedModifications: Modification[]; -} - -export const extractModificationsReducer = ( - acc: ExtractPayload, - curr: Modification -): ExtractPayload => { - if (curr.claim_modification && !curr.claim_modification.status_modification) { - acc.recreateModifications = [...acc.recreateModifications, curr]; - } - if (curr.party_modification) { - acc.extractedModifications = [...acc.extractedModifications, curr]; - } - return acc; -}; - -export const EXTRACT_SEED = { - recreateModifications: [], - extractedModifications: [], -}; diff --git a/src/app/claim-mgt/claim/recreate-claim/index.ts b/src/app/claim-mgt/claim/recreate-claim/index.ts deleted file mode 100644 index 7435f831..00000000 --- a/src/app/claim-mgt/claim/recreate-claim/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './recreate-claim.service'; diff --git a/src/app/claim-mgt/claim/recreate-claim/recreate-claim.service.ts b/src/app/claim-mgt/claim/recreate-claim/recreate-claim.service.ts deleted file mode 100644 index b859c341..00000000 --- a/src/app/claim-mgt/claim/recreate-claim/recreate-claim.service.ts +++ /dev/null @@ -1,87 +0,0 @@ -import { Injectable } from '@angular/core'; -import { MatDialog } from '@angular/material/dialog'; -import head from 'lodash-es/head'; -import isEmpty from 'lodash-es/isEmpty'; -import negate from 'lodash-es/negate'; -import { BehaviorSubject, forkJoin, Observable, of, Subject } from 'rxjs'; -import { catchError, filter, map, shareReplay, switchMap, switchMapTo, tap } from 'rxjs/operators'; - -import { ConfirmActionDialogComponent } from '@cc/components/confirm-action-dialog'; - -import { ClaimManagementService } from '../../../thrift-services/damsel/claim-management.service'; -import { Claim, Modification } from '../../../thrift-services/damsel/gen-model/claim_management'; -import { extractModificationsReducer, EXTRACT_SEED } from './extract-modifications-reducer'; - -@Injectable() -export class RecreateClaimService { - private extracted$: Subject = new Subject(); - private recreate$: Subject = new Subject(); - private error$: Subject = new Subject(); - private inProcess$: Subject = new BehaviorSubject(false); - - // eslint-disable-next-line @typescript-eslint/member-ordering - extractError$ = this.error$.asObservable(); - // eslint-disable-next-line @typescript-eslint/member-ordering - isInProcess$ = this.inProcess$.asObservable(); - // eslint-disable-next-line @typescript-eslint/member-ordering - extractedModifications$: Observable = this.extracted$.asObservable(); - // eslint-disable-next-line @typescript-eslint/member-ordering - recreated$: Observable = this.recreate$.pipe( - switchMap((targetClaim) => - forkJoin([ - of(targetClaim), - this.dialog - .open(ConfirmActionDialogComponent) - .afterClosed() - .pipe(filter((r) => r === 'confirm')), - ]) - ), - switchMap(([{ id, party_id, changeset }]) => - forkJoin([ - of(id), - of(party_id), - of( - changeset - .map((unit) => unit.modification) - .reduce(extractModificationsReducer, EXTRACT_SEED) - ), - ]) - ), - switchMap(([claimId, partyId, { recreateModifications, extractedModifications }]) => { - const createNewClaim$ = this.claimMgtService - .createClaim(partyId, recreateModifications) - .pipe( - catchError((err) => { - console.error(err); - this.error$.next(err); - this.inProcess$.next(false); - return of(null); - }), - filter(negate(isEmpty)) - ); - const revokeCurrentClaim$ = this.claimMgtService - .revokeClaim(partyId, claimId, `Claim recreated with ID: ${claimId}`) - .pipe( - catchError((err) => { - console.error(err); - return of(true); - }) - ); - return of(true).pipe( - tap(() => this.inProcess$.next(true)), - switchMapTo(createNewClaim$), - switchMap((recreated) => forkJoin([of(recreated), revokeCurrentClaim$])), - map(head), - tap(() => this.extracted$.next(extractedModifications)), - tap(() => this.inProcess$.next(false)) - ); - }), - shareReplay(1) - ); - - constructor(private dialog: MatDialog, private claimMgtService: ClaimManagementService) {} - - recreate(claim: Claim) { - this.recreate$.next(claim); - } -} diff --git a/src/app/claim-mgt/claim/status-changer/get-available-claim-statuses.ts b/src/app/claim-mgt/claim/status-changer/get-available-claim-statuses.ts deleted file mode 100644 index 3b384b33..00000000 --- a/src/app/claim-mgt/claim/status-changer/get-available-claim-statuses.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { ClaimStatus as ClaimStatusEnum } from '../../../papi/model'; -import { extractClaimStatus } from '../../../shared/utils'; -import { ClaimStatus } from '../../../thrift-services/damsel/gen-model/claim_management'; -import { ClaimStatuses } from '../claim-statuses'; - -export const getAvailableClaimStatuses = (status: ClaimStatus): ClaimStatuses[] => { - switch (extractClaimStatus(status)) { - case ClaimStatusEnum.Pending: - return [ - ClaimStatuses.accepted, - ClaimStatuses.review, - ClaimStatuses.denied, - ClaimStatuses.revoked, - ]; - case ClaimStatusEnum.Review: - return [ - ClaimStatuses.accepted, - ClaimStatuses.pending, - ClaimStatuses.denied, - ClaimStatuses.revoked, - ]; - default: - return []; - } -}; diff --git a/src/app/claim-mgt/claim/status-changer/status-changer.component.html b/src/app/claim-mgt/claim/status-changer/status-changer.component.html deleted file mode 100644 index 84052d6a..00000000 --- a/src/app/claim-mgt/claim/status-changer/status-changer.component.html +++ /dev/null @@ -1,33 +0,0 @@ -
Change claim status
- -
- - - {{ - action - }} - - - - - -
-
- - - - - diff --git a/src/app/claim-mgt/claim/status-changer/status-changer.component.scss b/src/app/claim-mgt/claim/status-changer/status-changer.component.scss deleted file mode 100644 index dd0e4211..00000000 --- a/src/app/claim-mgt/claim/status-changer/status-changer.component.scss +++ /dev/null @@ -1,3 +0,0 @@ -.hidden { - display: none; -} diff --git a/src/app/claim-mgt/claim/status-changer/status-changer.component.ts b/src/app/claim-mgt/claim/status-changer/status-changer.component.ts deleted file mode 100644 index 66a37424..00000000 --- a/src/app/claim-mgt/claim/status-changer/status-changer.component.ts +++ /dev/null @@ -1,71 +0,0 @@ -import { Component, Inject, OnInit } from '@angular/core'; -import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; - -import { AppAuthGuardService, ClaimManagementRole } from '@cc/app/shared/services'; - -import { ClaimID, ClaimStatus } from '../../../thrift-services/damsel/gen-model/claim_management'; -import { ClaimStatuses } from '../claim-statuses'; -import { getAvailableClaimStatuses } from './get-available-claim-statuses'; -import { StatusChangerService } from './status-changer.service'; - -interface ActionsInterface { - partyID: string; - claimID: ClaimID; - claimStatus: ClaimStatus; -} - -@Component({ - templateUrl: 'status-changer.component.html', - providers: [StatusChangerService], - styleUrls: ['status-changer.component.scss'], -}) -export class StatusChangerComponent implements OnInit { - actions = getAvailableClaimStatuses(this.data.claimStatus).filter((status: ClaimStatuses) => - this.statusFilter(status) - ); - form = this.actionsService.form; - isLoading$ = this.actionsService.isLoading$; - - constructor( - private dialogRef: MatDialogRef, - private actionsService: StatusChangerService, - private appAuthGuardService: AppAuthGuardService, - @Inject(MAT_DIALOG_DATA) private data: ActionsInterface - ) {} - - ngOnInit(): void { - this.actionsService.claim$.subscribe(() => { - this.dialogRef.close(true); - }); - } - - confirm(): void { - this.actionsService.updateClaim(this.data.partyID, this.data.claimID); - } - - isReasonVisible(): boolean { - const { type } = this.form.getRawValue(); - return type === ClaimStatuses.denied || type === ClaimStatuses.revoked; - } - - private statusFilter(status: ClaimStatuses): boolean { - switch (status) { - case ClaimStatuses.accepted: - return this.appAuthGuardService.userHasRoles([ClaimManagementRole.AcceptClaim]); - case ClaimStatuses.denied: - return this.appAuthGuardService.userHasRoles([ClaimManagementRole.DenyClaim]); - case ClaimStatuses.review: - return this.appAuthGuardService.userHasRoles([ - ClaimManagementRole.RequestClaimReview, - ]); - case ClaimStatuses.revoked: - return this.appAuthGuardService.userHasRoles([ClaimManagementRole.RevokeClaim]); - case ClaimStatuses.pending: - return this.appAuthGuardService.userHasRoles([ - ClaimManagementRole.RequestClaimChanges, - ]); - default: - return false; - } - } -} diff --git a/src/app/claim-mgt/claim/status-changer/status-changer.service.ts b/src/app/claim-mgt/claim/status-changer/status-changer.service.ts deleted file mode 100644 index d2e67d80..00000000 --- a/src/app/claim-mgt/claim/status-changer/status-changer.service.ts +++ /dev/null @@ -1,114 +0,0 @@ -import { Injectable } from '@angular/core'; -import { FormBuilder, Validators } from '@angular/forms'; -import { MatSnackBar } from '@angular/material/snack-bar'; -import { ConnectableObservable, Observable, Subject } from 'rxjs'; -import { - catchError, - distinctUntilChanged, - filter, - pairwise, - pluck, - publish, - shareReplay, - switchMap, -} from 'rxjs/operators'; - -import { progress } from '@cc/app/shared/custom-operators'; - -import { ClaimManagementService } from '../../../thrift-services/damsel/claim-management.service'; -import { ClaimID } from '../../../thrift-services/damsel/gen-model/claim_management'; -import { ClaimStatuses } from '../claim-statuses'; - -class UpdateClaim { - partyID: string; - claimID: ClaimID; - action: ClaimStatuses; -} - -@Injectable() -export class StatusChangerService { - private updateClaim$ = new Subject(); - - // eslint-disable-next-line @typescript-eslint/member-ordering - form = this.initForm(); - - // eslint-disable-next-line @typescript-eslint/member-ordering - claim$: Observable = this.updateClaim$.pipe( - switchMap(({ partyID, claimID, action }) => { - switch (action) { - case ClaimStatuses.denied: - return this.claimManagementService - .denyClaim(partyID, claimID, this.form.getRawValue().reason) - .pipe(catchError((e) => this.handleError(e))); - case ClaimStatuses.pending: - return this.claimManagementService - .requestClaimChanges(partyID, claimID) - .pipe(catchError((e) => this.handleError(e))); - case ClaimStatuses.review: - return this.claimManagementService - .requestClaimReview(partyID, claimID) - .pipe(catchError((e) => this.handleError(e))); - case ClaimStatuses.accepted: - return this.claimManagementService - .acceptClaim(partyID, claimID) - .pipe(catchError((e) => this.handleError(e))); - case ClaimStatuses.revoked: - return this.claimManagementService - .revokeClaim(partyID, claimID, this.form.getRawValue().reason) - .pipe(catchError((e) => this.handleError(e))); - default: - throw new Error('Wrong action type!'); - } - }), - shareReplay(1) - ); - - // eslint-disable-next-line @typescript-eslint/member-ordering - isLoading$ = progress(this.updateClaim$, this.claim$).pipe( - shareReplay(1), - publish() - ) as ConnectableObservable; - - constructor( - private fb: FormBuilder, - private claimManagementService: ClaimManagementService, - private snackBar: MatSnackBar - ) { - this.isLoading$.connect(); - this.form.valueChanges - .pipe( - distinctUntilChanged((p, c) => p.type === c.type && p.reason === c.reason), - pairwise(), - filter(([prev, curr]) => prev.reason === curr.reason), - pluck(1, 'type') - ) - .subscribe((type) => { - switch (type) { - case ClaimStatuses.denied: - case ClaimStatuses.revoked: - this.form.setControl('reason', this.fb.control(null, Validators.required)); - break; - default: - this.form.setControl('reason', this.fb.control(null)); - break; - } - }); - } - - updateClaim(partyID: string, claimID: ClaimID) { - this.updateClaim$.next({ partyID, claimID, action: this.form.getRawValue().type }); - } - - private handleError(e: any) { - this.snackBar.open('Status change error', 'OK', { duration: 5000 }); - console.error(e); - return []; - } - - private initForm() { - return this.fb.group({ - type: ['', Validators.required], - reason: null, - }); - } -} diff --git a/src/app/claim-mgt/claim/unsaved-party-modifications/index.ts b/src/app/claim-mgt/claim/unsaved-party-modifications/index.ts deleted file mode 100644 index 22e98d17..00000000 --- a/src/app/claim-mgt/claim/unsaved-party-modifications/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './unsaved-party-modifications.module'; diff --git a/src/app/claim-mgt/claim/unsaved-party-modifications/unsaved-party-modifications.component.html b/src/app/claim-mgt/claim/unsaved-party-modifications/unsaved-party-modifications.component.html deleted file mode 100644 index ca0abe39..00000000 --- a/src/app/claim-mgt/claim/unsaved-party-modifications/unsaved-party-modifications.component.html +++ /dev/null @@ -1,18 +0,0 @@ -
-

Unsaved party modifications

- - - - Party modification - - - - - - - - -
diff --git a/src/app/claim-mgt/claim/unsaved-party-modifications/unsaved-party-modifications.component.ts b/src/app/claim-mgt/claim/unsaved-party-modifications/unsaved-party-modifications.component.ts deleted file mode 100644 index a1044da7..00000000 --- a/src/app/claim-mgt/claim/unsaved-party-modifications/unsaved-party-modifications.component.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { - ChangeDetectionStrategy, - Component, - EventEmitter, - Input, - OnChanges, - OnInit, - Output, - SimpleChanges, -} from '@angular/core'; -import isEqual from 'lodash-es/isEqual'; - -import { PartyModification } from '../../../thrift-services/damsel/gen-model/payment_processing'; -import { UnsavedPartyModificationService } from './unsaved-party-modifications.service'; - -@Component({ - selector: 'cc-unsaved-party-modifications', - templateUrl: 'unsaved-party-modifications.component.html', - providers: [UnsavedPartyModificationService], - changeDetection: ChangeDetectionStrategy.OnPush, -}) -export class UnsavedPartyModificationsComponent implements OnChanges, OnInit { - @Input() partyModifications: PartyModification[]; - @Output() partyModificationsChanged: EventEmitter = new EventEmitter(); - - unsavedPartyModifications$ = this.unsavedPartyModService.unsavedPartyModifications$; - - constructor(private unsavedPartyModService: UnsavedPartyModificationService) {} - - ngOnInit() { - this.unsavedPartyModifications$.subscribe((m) => this.partyModificationsChanged.emit(m)); - } - - ngOnChanges({ partyModifications }: SimpleChanges) { - if ( - partyModifications && - !isEqual(partyModifications.previousValue, partyModifications.currentValue) - ) { - this.unsavedPartyModService.setUpUnsaved(partyModifications.currentValue); - } - } - - remove(pos: number) { - this.unsavedPartyModService.remove(pos); - } - - edit(pos: number) { - this.unsavedPartyModService.edit(pos); - } -} diff --git a/src/app/claim-mgt/claim/unsaved-party-modifications/unsaved-party-modifications.module.ts b/src/app/claim-mgt/claim/unsaved-party-modifications/unsaved-party-modifications.module.ts deleted file mode 100644 index c75304f8..00000000 --- a/src/app/claim-mgt/claim/unsaved-party-modifications/unsaved-party-modifications.module.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { CommonModule } from '@angular/common'; -import { NgModule } from '@angular/core'; -import { FlexLayoutModule } from '@angular/flex-layout'; -import { MatButtonModule } from '@angular/material/button'; -import { MatDialogModule } from '@angular/material/dialog'; -import { MatExpansionModule } from '@angular/material/expansion'; - -import { PrettyJsonModule } from '@cc/components/pretty-json'; - -import { EditUnsavedModificationModule } from '../conversation/edit-unsaved-modification/edit-unsaved-modification.module'; -import { UnsavedPartyModificationsComponent } from './unsaved-party-modifications.component'; - -@NgModule({ - imports: [ - CommonModule, - MatExpansionModule, - MatButtonModule, - FlexLayoutModule, - MatDialogModule, - EditUnsavedModificationModule, - PrettyJsonModule, - ], - declarations: [UnsavedPartyModificationsComponent], - exports: [UnsavedPartyModificationsComponent], -}) -export class UnsavedPartyModificationsModule {} diff --git a/src/app/claim-mgt/claim/unsaved-party-modifications/unsaved-party-modifications.service.ts b/src/app/claim-mgt/claim/unsaved-party-modifications/unsaved-party-modifications.service.ts deleted file mode 100644 index 9c5458ab..00000000 --- a/src/app/claim-mgt/claim/unsaved-party-modifications/unsaved-party-modifications.service.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { Injectable } from '@angular/core'; -import { MatDialog } from '@angular/material/dialog'; -import { BehaviorSubject, forkJoin, Observable, of, Subject } from 'rxjs'; -import { filter, first, map, switchMap } from 'rxjs/operators'; - -import { PartyModification } from '../../../thrift-services/damsel/gen-model/payment_processing'; -import { EditUnsavedModificationComponent } from '../conversation/edit-unsaved-modification/edit-unsaved-modification.component'; - -type PartyModificationPosition = number; - -@Injectable() -export class UnsavedPartyModificationService { - private unsaved$: BehaviorSubject = new BehaviorSubject([]); - private remove$: Subject = new Subject(); - private edit$: Subject = new Subject(); - - // eslint-disable-next-line @typescript-eslint/member-ordering - unsavedPartyModifications$: Observable = this.unsaved$.asObservable(); - - constructor(private dialog: MatDialog) { - this.remove$ - .pipe( - switchMap((pos) => forkJoin([of(pos), this.unsaved$.pipe(first())])), - map(([pos, modifications]) => modifications.filter((_, i) => pos !== i)) - ) - .subscribe((modifications) => this.unsaved$.next(modifications)); - - this.edit$ - .pipe( - switchMap((pos) => forkJoin([of(pos), this.unsaved$.pipe(first())])), - switchMap(([pos, mods]) => { - const d = this.dialog.open(EditUnsavedModificationComponent, { - disableClose: true, - data: mods[pos], - }); - return forkJoin([of(mods), of(pos), d.afterClosed()]); - }), - filter(([, , newMod]) => !!newMod) - ) - .subscribe(([mods, pos, newMod]) => { - mods[pos] = newMod; - this.setUpUnsaved(mods); - }); - } - - setUpUnsaved(modifications: PartyModification[]) { - this.unsaved$.next(modifications); - } - - remove(pos: PartyModificationPosition) { - this.remove$.next(pos); - } - - edit(pos: number) { - this.edit$.next(pos); - } -} diff --git a/src/app/claims/claim-actions/claim-actions.component.html b/src/app/claims/claim-actions/claim-actions.component.html deleted file mode 100644 index 6da93e6a..00000000 --- a/src/app/claims/claim-actions/claim-actions.component.html +++ /dev/null @@ -1,3 +0,0 @@ -
- -
diff --git a/src/app/claims/claim-actions/claim-actions.component.ts b/src/app/claims/claim-actions/claim-actions.component.ts deleted file mode 100644 index a9beb64e..00000000 --- a/src/app/claims/claim-actions/claim-actions.component.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Component } from '@angular/core'; -import { MatDialog } from '@angular/material/dialog'; - -import { CreateClaimComponent } from '../create-claim/create-claim.component'; - -@Component({ - selector: 'cc-claim-actions', - templateUrl: 'claim-actions.component.html', -}) -export class ClaimActionsComponent { - constructor(private dialogRef: MatDialog) {} - - createClaim() { - this.dialogRef.open(CreateClaimComponent, { - width: '400px', - disableClose: true, - }); - } -} diff --git a/src/app/claims/claims-routing.module.ts b/src/app/claims/claims-routing.module.ts deleted file mode 100644 index 1ae745d2..00000000 --- a/src/app/claims/claims-routing.module.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { NgModule } from '@angular/core'; -import { RouterModule } from '@angular/router'; - -import { AppAuthGuardService, ClaimManagementRole } from '@cc/app/shared/services'; - -import { ClaimsComponent } from './claims.component'; - -/** - * @deprecated FR-688 - */ -@NgModule({ - imports: [ - RouterModule.forChild([ - { - path: 'claims-deprecated', - component: ClaimsComponent, - canActivate: [AppAuthGuardService], - data: { - roles: [ClaimManagementRole.GetClaims], - }, - }, - ]), - ], - exports: [RouterModule], -}) -export class ClaimsRoutingModule {} diff --git a/src/app/claims/claims-table/claims-table.component.html b/src/app/claims/claims-table/claims-table.component.html deleted file mode 100644 index 471cb687..00000000 --- a/src/app/claims/claims-table/claims-table.component.html +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Party ID{{ claim.partyId }}Claim ID{{ claim.claimId }}Status{{ claim.status }}Revision{{ claim.revision }}Created at - {{ claim.createdAt | date: 'dd.MM.yyyy HH:mm:ss' }} - Updated at - {{ claim.updatedAt | date: 'dd.MM.yyyy HH:mm:ss' }} - - -
diff --git a/src/app/claims/claims-table/claims-table.component.scss b/src/app/claims/claims-table/claims-table.component.scss deleted file mode 100644 index 3d384031..00000000 --- a/src/app/claims/claims-table/claims-table.component.scss +++ /dev/null @@ -1,7 +0,0 @@ -table { - width: 100%; -} - -.action-cell { - width: 10px; -} diff --git a/src/app/claims/claims-table/claims-table.component.ts b/src/app/claims/claims-table/claims-table.component.ts deleted file mode 100644 index d36a29c2..00000000 --- a/src/app/claims/claims-table/claims-table.component.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { Component, Input } from '@angular/core'; -import { Router } from '@angular/router'; - -import { ClaimActionType } from '../../claim/claim-action-type'; -import { ClaimInfo } from '../../papi/model'; - -@Component({ - selector: 'cc-claims-table', - templateUrl: 'claims-table.component.html', - styleUrls: ['./claims-table.component.scss'], -}) -export class ClaimsTableComponent { - @Input() - claims: ClaimInfo[]; - - displayedColumns = [ - 'partyID', - 'claimID', - 'status', - 'revision', - 'createdAt', - 'updatedAt', - 'claimDetailButton', - ]; - - constructor(private router: Router) {} - - navigateToClaim(claim: ClaimInfo) { - const c = claim as any; - this.router.navigate([`/claims/${c.partyId}/${ClaimActionType.Edit}/${c.claimId}`]); - } -} diff --git a/src/app/claims/claims.component.html b/src/app/claims/claims.component.html deleted file mode 100644 index 39d07c64..00000000 --- a/src/app/claims/claims.component.html +++ /dev/null @@ -1,18 +0,0 @@ - - - Search claims - - - - - - - - - Claim actions - - - - -
-
diff --git a/src/app/claims/claims.component.ts b/src/app/claims/claims.component.ts deleted file mode 100644 index bb775240..00000000 --- a/src/app/claims/claims.component.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { HttpErrorResponse } from '@angular/common/http'; -import { Component, OnInit } from '@angular/core'; -import { MatSnackBar } from '@angular/material/snack-bar'; - -import { ClaimService } from '../papi/claim.service'; -import { ClaimInfo } from '../papi/model'; -import { ClaimSearchParams } from '../papi/params'; - -@Component({ - templateUrl: 'claims.component.html', - styleUrls: [], -}) -export class ClaimsComponent implements OnInit { - isLoading = false; - - claims: ClaimInfo[]; - - constructor(private claimService: ClaimService, private snackBar: MatSnackBar) {} - - ngOnInit() { - this.search({ claimStatus: 'pending' }); - } - - search(params: ClaimSearchParams) { - this.isLoading = true; - this.claimService.getClaims(params).subscribe( - (claims) => { - this.isLoading = false; - this.claims = claims.reverse(); - }, - (error: HttpErrorResponse) => { - this.isLoading = false; - this.snackBar.open(`${error.status}: ${error.message}`, 'OK', { - duration: 1500, - }); - } - ); - } -} diff --git a/src/app/claims/claims.module.ts b/src/app/claims/claims.module.ts deleted file mode 100644 index b799685a..00000000 --- a/src/app/claims/claims.module.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { CdkTableModule } from '@angular/cdk/table'; -import { CommonModule } from '@angular/common'; -import { NgModule } from '@angular/core'; -import { FlexLayoutModule } from '@angular/flex-layout'; -import { ReactiveFormsModule } from '@angular/forms'; -import { MatButtonModule } from '@angular/material/button'; -import { MatCardModule } from '@angular/material/card'; -import { MatDialogModule } from '@angular/material/dialog'; -import { MatFormFieldModule } from '@angular/material/form-field'; -import { MatIconModule } from '@angular/material/icon'; -import { MatInputModule } from '@angular/material/input'; -import { MatMenuModule } from '@angular/material/menu'; -import { MatProgressBarModule } from '@angular/material/progress-bar'; -import { MatSelectModule } from '@angular/material/select'; -import { MatSnackBarModule } from '@angular/material/snack-bar'; -import { MatTableModule } from '@angular/material/table'; - -import { CardContainerModule } from '@cc/components/card-container/card-container.module'; - -import { PapiModule } from '../papi/papi.module'; -import { ClaimActionsComponent } from './claim-actions/claim-actions.component'; -import { ClaimsRoutingModule } from './claims-routing.module'; -import { ClaimsTableComponent } from './claims-table/claims-table.component'; -import { ClaimsComponent } from './claims.component'; -import { CreateClaimComponent } from './create-claim/create-claim.component'; -import { SearchFormComponent } from './search-form/search-form.component'; - -@NgModule({ - imports: [ - CommonModule, - ClaimsRoutingModule, - FlexLayoutModule, - PapiModule, - ReactiveFormsModule, - MatCardModule, - MatFormFieldModule, - MatInputModule, - MatSelectModule, - MatProgressBarModule, - MatSnackBarModule, - MatTableModule, - MatButtonModule, - MatIconModule, - MatMenuModule, - MatDialogModule, - CdkTableModule, - CardContainerModule, - ], - declarations: [ - ClaimsComponent, - SearchFormComponent, - ClaimsTableComponent, - ClaimActionsComponent, - CreateClaimComponent, - ], - entryComponents: [CreateClaimComponent], -}) -export class ClaimsModule {} diff --git a/src/app/claims/create-claim/create-claim.component.html b/src/app/claims/create-claim/create-claim.component.html deleted file mode 100644 index f19ad8fd..00000000 --- a/src/app/claims/create-claim/create-claim.component.html +++ /dev/null @@ -1,14 +0,0 @@ -

Claim creation

- -
- - - -
-
- - - - diff --git a/src/app/claims/create-claim/create-claim.component.ts b/src/app/claims/create-claim/create-claim.component.ts deleted file mode 100644 index 10b888e4..00000000 --- a/src/app/claims/create-claim/create-claim.component.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { FormBuilder, FormGroup, Validators } from '@angular/forms'; -import { MatDialogRef } from '@angular/material/dialog'; -import { Router } from '@angular/router'; - -import { ClaimActionType } from '../../claim/claim-action-type'; - -@Component({ - templateUrl: 'create-claim.component.html', -}) -export class CreateClaimComponent implements OnInit { - form: FormGroup; - - constructor( - private dialogRef: MatDialogRef, - private router: Router, - private fb: FormBuilder - ) {} - - ngOnInit() { - this.form = this.fb.group({ - partyId: ['', Validators.required], - }); - } - - submit() { - const partyId = this.form.value.partyId.trim(); - this.dialogRef.close(); - this.router.navigate([`/claims/${partyId}/${ClaimActionType.Create}`]); - } -} diff --git a/src/app/claims/search-form/search-form.component.html b/src/app/claims/search-form/search-form.component.html deleted file mode 100644 index d0d7972c..00000000 --- a/src/app/claims/search-form/search-form.component.html +++ /dev/null @@ -1,13 +0,0 @@ -
- - - any - {{ - status - }} - - - - - -
diff --git a/src/app/claims/search-form/search-form.component.ts b/src/app/claims/search-form/search-form.component.ts deleted file mode 100644 index e8d3a11b..00000000 --- a/src/app/claims/search-form/search-form.component.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { Component, EventEmitter, OnInit, Output } from '@angular/core'; -import { FormGroup } from '@angular/forms'; -import { debounceTime } from 'rxjs/internal/operators'; - -import { ClaimSearchParams } from '../../papi/params'; -import { SearchFormService } from './search-form.service'; - -@Component({ - selector: 'cc-search-form', - templateUrl: 'search-form.component.html', - providers: [SearchFormService], -}) -export class SearchFormComponent implements OnInit { - @Output() - valueChanges: EventEmitter = new EventEmitter(); - - form: FormGroup; - - claimStatuses: string[]; - - constructor(private searchFormService: SearchFormService) {} - - ngOnInit() { - const { claimStatuses, form, formValueToSearchParams } = this.searchFormService; - this.claimStatuses = claimStatuses; - this.form = form; - this.form.valueChanges - .pipe(debounceTime(300)) - .subscribe((value) => this.valueChanges.emit(formValueToSearchParams(value))); - } -} diff --git a/src/app/claims/search-form/search-form.service.ts b/src/app/claims/search-form/search-form.service.ts deleted file mode 100644 index 6c463f68..00000000 --- a/src/app/claims/search-form/search-form.service.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { Injectable } from '@angular/core'; -import { FormBuilder, FormGroup } from '@angular/forms'; -import mapValues from 'lodash-es/mapValues'; -// eslint-disable-next-line you-dont-need-lodash-underscore/values -import values from 'lodash-es/values'; - -import { ClaimStatus } from '../../papi/model'; -import { ClaimSearchParams } from '../../papi/params'; - -@Injectable() -export class SearchFormService { - form: FormGroup; - - claimStatuses: string[]; - - constructor(private fb: FormBuilder) { - this.form = this.prepareForm(); - this.claimStatuses = values(ClaimStatus); - } - - formValueToSearchParams(formValue): ClaimSearchParams { - return mapValues(formValue, (value) => { - let result = value; - if (value === '') { - result = null; - } else if (typeof value === 'string') { - result = value.trim(); - } - return result; - }); - } - - private prepareForm(): FormGroup { - return this.fb.group({ - claimStatus: 'pending', - partyId: '', - }); - } -} diff --git a/src/app/document/cm-margins-to-in.spec.ts b/src/app/document/cm-margins-to-in.spec.ts deleted file mode 100644 index b990aa21..00000000 --- a/src/app/document/cm-margins-to-in.spec.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { cmMarginsToIn } from './cm-margins-to-in'; - -describe('cmMarginsToIn', () => { - it('should convert 4 cm margins to in', () => { - const margins = cmMarginsToIn(5.08, 2.54, 5.08, 7.62); - expect(margins).toEqual([144, 72, 144, 216]); - }); - - it('should convert 2 cm margins to in', () => { - const margins = cmMarginsToIn(5.08, 7.62); - expect(margins).toEqual([144, 216]); - }); - - it('should convert 1 cm margins to in', () => { - const margins = cmMarginsToIn(7.62); - expect(margins).toBe(216); - }); -}); diff --git a/src/app/document/cm-margins-to-in.ts b/src/app/document/cm-margins-to-in.ts deleted file mode 100644 index ea9a30ff..00000000 --- a/src/app/document/cm-margins-to-in.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Margins } from 'pdfmake/build/pdfmake'; - -import { cmToIn } from './cm-to-in'; - -/** - * left, top, right, bottom - */ -export function cmMarginsToIn( - ...marginsCm: [number] | [number, number] | [number, number, number, number] | number[] -): Margins { - const marginsIn = marginsCm.slice(0, 4).map((cm) => cmToIn(cm)); - return (marginsIn.length === 1 ? marginsIn[0] : marginsIn) as Margins; -} diff --git a/src/app/document/cm-to-in.spec.ts b/src/app/document/cm-to-in.spec.ts deleted file mode 100644 index d5b9e7e4..00000000 --- a/src/app/document/cm-to-in.spec.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { cmToIn } from './cm-to-in'; - -describe('cmToIn', () => { - it('should convert cm to in', () => { - const cm = cmToIn(5.08, 72); - expect(cm).toBe(144); - }); - - it('should convert cm to in with selected dpi', () => { - const cm = cmToIn(5.08, 100); - expect(cm).toBe(200); - }); -}); diff --git a/src/app/document/cm-to-in.ts b/src/app/document/cm-to-in.ts deleted file mode 100644 index 1cd642a1..00000000 --- a/src/app/document/cm-to-in.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function cmToIn(cm: number, dpi = 72): number { - return (cm / 2.54) * dpi; -} diff --git a/src/app/document/document.module.ts b/src/app/document/document.module.ts deleted file mode 100644 index c9362712..00000000 --- a/src/app/document/document.module.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { NgModule } from '@angular/core'; - -import { DocumentService } from './document.service'; -import { FontsService } from './fonts'; - -@NgModule({ - providers: [DocumentService, FontsService], -}) -export class DocumentModule {} diff --git a/src/app/document/document.service.ts b/src/app/document/document.service.ts deleted file mode 100644 index 94d31d69..00000000 --- a/src/app/document/document.service.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { Injectable } from '@angular/core'; -import { - createPdf, - TableLayoutFunctions, - TCreatedPdf, - TDocumentDefinitions, -} from 'pdfmake/build/pdfmake'; -import { Observable } from 'rxjs'; -import { map, timeout } from 'rxjs/operators'; - -import { FontsService } from './fonts'; -import { FONTS_CONFIG } from './fonts-config'; - -@Injectable() -export class DocumentService { - constructor(private fontsService: FontsService) { - this.fontsService.loadFonts(FONTS_CONFIG); - } - - createPdf( - docDefinition: TDocumentDefinitions, - tableLayouts?: { [name: string]: TableLayoutFunctions } - ): Observable { - return this.fontsService.fontsData$.pipe( - timeout(5000), - map(({ fonts, vfs }) => createPdf(docDefinition, tableLayouts, fonts, vfs)) - ); - } -} diff --git a/src/app/document/fonts-config.ts b/src/app/document/fonts-config.ts deleted file mode 100644 index 1b1f96a9..00000000 --- a/src/app/document/fonts-config.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { TFontFamilyTypes } from 'pdfmake/build/pdfmake'; - -const FONTS_DIR = '/assets/fonts/'; -const ROBOTO_DIR = `${FONTS_DIR}Roboto/`; - -export enum FontFamily { - Serif, - Fa, -} - -export const FONTS_CONFIG: { [name in FontFamily]: TFontFamilyTypes } = { - [FontFamily.Serif]: { - normal: `${ROBOTO_DIR}Roboto-Regular.ttf`, - bold: `${ROBOTO_DIR}Roboto-Bold.ttf`, - italics: `${ROBOTO_DIR}Roboto-RegularItalic.ttf`, - bolditalics: `${ROBOTO_DIR}Roboto-BoldItalic.ttf`, - }, - [FontFamily.Fa]: { - normal: `${FONTS_DIR}font-awesome5/fa-regular-400.ttf`, - }, -}; diff --git a/src/app/document/fonts/blob-to-base64.ts b/src/app/document/fonts/blob-to-base64.ts deleted file mode 100644 index 19ec8687..00000000 --- a/src/app/document/fonts/blob-to-base64.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Observable } from 'rxjs'; - -export function blobToBase64(blob: Blob): Observable { - return new Observable((observer) => { - const reader = new FileReader(); - reader.readAsDataURL(blob); - reader.onloadend = () => { - observer.next(reader.result.toString().split(';base64,')[1]); - observer.complete(); - }; - }); -} diff --git a/src/app/document/fonts/font.ts b/src/app/document/fonts/font.ts deleted file mode 100644 index ab4fcf19..00000000 --- a/src/app/document/fonts/font.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface Font { - family: string | number; - type: string; - url: string; - hash: string; -} diff --git a/src/app/document/fonts/fonts-data.ts b/src/app/document/fonts/fonts-data.ts deleted file mode 100644 index 278a8757..00000000 --- a/src/app/document/fonts/fonts-data.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { fonts, vfs } from 'pdfmake/build/pdfmake'; - -export interface FontsData { - vfs: typeof vfs; - fonts: typeof fonts; -} diff --git a/src/app/document/fonts/fonts.service.ts b/src/app/document/fonts/fonts.service.ts deleted file mode 100644 index 03039038..00000000 --- a/src/app/document/fonts/fonts.service.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { HttpClient } from '@angular/common/http'; -import { Injectable } from '@angular/core'; -import { forkJoin, Observable } from 'rxjs'; -import { map, shareReplay, switchMap } from 'rxjs/operators'; - -import { blobToBase64 } from './blob-to-base64'; -import { Font } from './font'; -import { FontsData } from './fonts-data'; -import { toFonts } from './to-fonts'; - -@Injectable() -export class FontsService { - fontsData$: Observable; - - constructor(private http: HttpClient) {} - - loadFonts(fontsUrls: FontsData['fonts']): Observable { - const fonts = toFonts(fontsUrls); - return (this.fontsData$ = forkJoin(fonts.map(({ url }) => this.loadFont(url))).pipe( - map((fontsBase64) => ({ - vfs: this.getVFS(fonts, fontsBase64), - fonts: this.getFonts(fonts), - })), - shareReplay(1) - )); - } - - private loadFont(url: string): Observable { - return this.http - .get(url, { responseType: 'blob' }) - .pipe(switchMap((blob) => blobToBase64(blob))); - } - - private getFonts(fonts: Font[]): FontsData['fonts'] { - return fonts.reduce((accFonts, { family, type, hash }) => { - if (accFonts[family]) accFonts[family][type] = hash; - else accFonts[family] = { [type]: hash }; - return accFonts; - }, {} as FontsData['fonts']); - } - - private getVFS(fonts: Font[], fontsBase64: string[]): FontsData['vfs'] { - return fonts.reduce((accVFS, font, idx) => { - accVFS[font.hash] = fontsBase64[idx]; - return accVFS; - }, {} as FontsData['vfs']); - } -} diff --git a/src/app/document/fonts/fonts.spec.ts b/src/app/document/fonts/fonts.spec.ts deleted file mode 100644 index 66089533..00000000 --- a/src/app/document/fonts/fonts.spec.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing'; -import { getTestBed, TestBed } from '@angular/core/testing'; - -import { FontsService } from './fonts.service'; - -describe('FontsService', () => { - const fonts = { - serif: { - normal: '/assets/regular.ttf', - }, - }; - - function createDocumentFontsServiceService() { - TestBed.configureTestingModule({ - imports: [HttpClientTestingModule], - providers: [FontsService], - }); - const injector = getTestBed(); - // eslint-disable-next-line import/no-deprecated - const service: FontsService = injector.get(FontsService); - // eslint-disable-next-line import/no-deprecated - const httpMock: HttpTestingController = injector.get(HttpTestingController); - return { injector, service, httpMock }; - } - - it('should load fonts', () => { - const { service, httpMock } = createDocumentFontsServiceService(); - const blob = new Blob([new Uint8Array(2)]); - service.loadFonts(fonts); - service.fontsData$.subscribe((result) => { - expect(result).toEqual({ - vfs: { serif_normal: 'AAA=' }, - fonts: { serif: { normal: 'serif_normal' } }, - }); - }); - const req = httpMock.expectOne('/assets/regular.ttf'); - req.flush(blob); - expect(req.request.method).toBe('GET'); - }); -}); diff --git a/src/app/document/fonts/index.ts b/src/app/document/fonts/index.ts deleted file mode 100644 index 00845b32..00000000 --- a/src/app/document/fonts/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './font'; -export * from './fonts.service'; diff --git a/src/app/document/fonts/to-fonts.spec.ts b/src/app/document/fonts/to-fonts.spec.ts deleted file mode 100644 index 7240306e..00000000 --- a/src/app/document/fonts/to-fonts.spec.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { TFontFamilyTypes } from 'pdfmake/build/pdfmake'; - -import { toFonts } from './to-fonts'; - -describe('toFonts', () => { - const fonts: { [name in string | number]: TFontFamilyTypes } = { - test: { - normal: 'normal', - bold: 'bold', - italics: '🥳', - bolditalics: 'url5', - }, - 1: { - normal: 'url', - }, - }; - - it('should return fonts list', () => { - expect(toFonts(fonts)).toEqual([ - { family: '1', type: 'normal', hash: '1_normal', url: 'url' }, - { family: 'test', type: 'normal', hash: 'test_normal', url: 'normal' }, - { family: 'test', type: 'bold', hash: 'test_bold', url: 'bold' }, - { family: 'test', type: 'italics', hash: 'test_italics', url: '🥳' }, - { family: 'test', type: 'bolditalics', hash: 'test_bolditalics', url: 'url5' }, - ]); - }); -}); diff --git a/src/app/document/fonts/to-fonts.ts b/src/app/document/fonts/to-fonts.ts deleted file mode 100644 index f015262b..00000000 --- a/src/app/document/fonts/to-fonts.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { TFontFamilyTypes } from 'pdfmake/build/pdfmake'; - -import { Font } from './font'; - -function familyToFonts(familyName: string | number, family: TFontFamilyTypes): Font[] { - return (Object.entries(family) as [string, string][]).map(([type, url]) => ({ - family: familyName, - type, - hash: `${familyName}_${type}`, - url, - })); -} - -export function toFonts(pdfMakeFonts: { [name in string | number]: TFontFamilyTypes }): Font[] { - return Object.entries(pdfMakeFonts).reduce( - (accFonts, [familyName, familyFonts]) => - accFonts.concat(familyToFonts(familyName, familyFonts)), - [] as Font[] - ); -} diff --git a/src/app/document/index.ts b/src/app/document/index.ts deleted file mode 100644 index ee3274ed..00000000 --- a/src/app/document/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -export * from './document.module'; -export * from './document.service'; -export * from './fonts'; -export * from './fonts-config'; -export * from './pdfmake-typings'; -export * from './cm-to-in'; -export * from './cm-margins-to-in'; diff --git a/src/app/document/pdfmake-typings.ts b/src/app/document/pdfmake-typings.ts deleted file mode 100644 index 25ac82aa..00000000 --- a/src/app/document/pdfmake-typings.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { - Content as PDFMakeContent, - Style as PDFMakeStyle, - Table as PDFMakeTable, - TableCell as PDFMakeTableCell, -} from 'pdfmake/build/pdfmake'; -import { Overwrite } from 'utility-types'; - -type Style = PDFMakeStyle | string | string[]; - -export type Content = Overwrite; -export type TableCell = Overwrite; -export type Table = Overwrite; diff --git a/src/app/sections/chargeback-details/_chargeback-details-theme.scss b/src/app/sections/chargeback-details/_chargeback-details-theme.scss deleted file mode 100644 index f1072af7..00000000 --- a/src/app/sections/chargeback-details/_chargeback-details-theme.scss +++ /dev/null @@ -1,9 +0,0 @@ -@use '@angular/material' as mat; - -@mixin cc-chargeback-details-theme($theme) { - $foreground: map-get($theme, foreground); - - .cc-chargeback-details-caption { - color: mat.get-color-from-palette($foreground, secondary-text); - } -} diff --git a/src/app/sections/chargeback-details/change-chargeback-status-dialog/change-chargeback-status-dialog.component.html b/src/app/sections/chargeback-details/change-chargeback-status-dialog/change-chargeback-status-dialog.component.html deleted file mode 100644 index 6c8b2230..00000000 --- a/src/app/sections/chargeback-details/change-chargeback-status-dialog/change-chargeback-status-dialog.component.html +++ /dev/null @@ -1,29 +0,0 @@ -
-

Change chargeback status

- - - Status - - - {{ c }} - - - - - - - - - - - - - -
diff --git a/src/app/sections/chargeback-details/change-chargeback-status-dialog/change-chargeback-status-dialog.component.ts b/src/app/sections/chargeback-details/change-chargeback-status-dialog/change-chargeback-status-dialog.component.ts deleted file mode 100644 index 66607017..00000000 --- a/src/app/sections/chargeback-details/change-chargeback-status-dialog/change-chargeback-status-dialog.component.ts +++ /dev/null @@ -1,64 +0,0 @@ -import { ChangeDetectionStrategy, Component, Inject } from '@angular/core'; -import { FormBuilder } from '@angular/forms'; -import { MatDialogConfig, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; -import { MatSnackBar } from '@angular/material/snack-bar'; - -import { - ChangeChargebackStatusDialogService, - STATUSES, -} from './change-chargeback-status-dialog.service'; - -@Component({ - selector: 'cc-change-chargeback-status-dialog', - templateUrl: 'change-chargeback-status-dialog.component.html', - changeDetection: ChangeDetectionStrategy.OnPush, - providers: [ChangeChargebackStatusDialogService], -}) -export class ChangeChargebackStatusDialogComponent { - static defaultConfig: MatDialogConfig = { - disableClose: true, - width: '552px', - }; - - form = this.fb.group({ - status: '', - date: '', - }); - statuses = STATUSES; - - constructor( - private fb: FormBuilder, - @Inject(MAT_DIALOG_DATA) - public params: { - invoiceID: string; - paymentID: string; - chargebackID: string; - }, - private dialogRef: MatDialogRef, - private snackBar: MatSnackBar, - private changeChargebackStatusDialogService: ChangeChargebackStatusDialogService - ) {} - - changeStatus() { - const { status, date } = this.form.value; - this.changeChargebackStatusDialogService - .changeStatus({ - status, - date: date ? date.utc().format() : undefined, - invoiceID: this.params.invoiceID, - paymentID: this.params.paymentID, - chargebackID: this.params.chargebackID, - }) - .subscribe( - () => this.dialogRef.close(), - (error) => { - console.error(error); - this.snackBar.open('An error occurred while chargeback changing status', 'OK'); - } - ); - } - - cancel() { - this.dialogRef.close(); - } -} diff --git a/src/app/sections/chargeback-details/change-chargeback-status-dialog/change-chargeback-status-dialog.service.ts b/src/app/sections/chargeback-details/change-chargeback-status-dialog/change-chargeback-status-dialog.service.ts deleted file mode 100644 index e26ee0ad..00000000 --- a/src/app/sections/chargeback-details/change-chargeback-status-dialog/change-chargeback-status-dialog.service.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { Injectable } from '@angular/core'; - -import { PaymentProcessingService } from '../../../thrift-services/damsel/payment-processing.service'; - -export const STATUSES = ['Accept', 'Cancell', 'Reject'] as const; - -@Injectable() -export class ChangeChargebackStatusDialogService { - constructor(private paymentProcessingService: PaymentProcessingService) {} - - changeStatus({ - status, - date, - invoiceID, - paymentID, - chargebackID, - }: { - status: string; - date: string; - invoiceID: string; - paymentID: string; - chargebackID: string; - }) { - const fnByStatus = { - /* eslint-disable @typescript-eslint/naming-convention */ - Accept: this.paymentProcessingService.acceptChargeback, - Cancell: this.paymentProcessingService.cancelChargeback, - Reject: this.paymentProcessingService.rejectChargeback, - /* eslint-enable @typescript-eslint/naming-convention */ - }; - return fnByStatus[status as typeof STATUSES[number]].bind(this.paymentProcessingService)( - invoiceID, - paymentID, - chargebackID, - Object.assign({}, !!date && { occurred_at: date }) - ); - } -} diff --git a/src/app/sections/chargeback-details/change-chargeback-status-dialog/index.ts b/src/app/sections/chargeback-details/change-chargeback-status-dialog/index.ts deleted file mode 100644 index 603f7729..00000000 --- a/src/app/sections/chargeback-details/change-chargeback-status-dialog/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './change-chargeback-status-dialog.component'; -export * from './change-chargeback-status-dialog.service'; diff --git a/src/app/sections/chargeback-details/chargeback-details-routing.module.ts b/src/app/sections/chargeback-details/chargeback-details-routing.module.ts deleted file mode 100644 index fd4b023b..00000000 --- a/src/app/sections/chargeback-details/chargeback-details-routing.module.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { NgModule } from '@angular/core'; -import { RouterModule } from '@angular/router'; - -import { AppAuthGuardService, ChargebackRole } from '@cc/app/shared/services'; - -import { ChargebackDetailsComponent } from './chargeback-details.component'; - -@NgModule({ - imports: [ - RouterModule.forChild([ - { - path: '', - component: ChargebackDetailsComponent, - canActivate: [AppAuthGuardService], - data: { - roles: [ChargebackRole.Manage], - }, - }, - ]), - ], -}) -export class ChargebackDetailsRoutingModule {} diff --git a/src/app/sections/chargeback-details/chargeback-details.component.html b/src/app/sections/chargeback-details/chargeback-details.component.html deleted file mode 100644 index d2643e02..00000000 --- a/src/app/sections/chargeback-details/chargeback-details.component.html +++ /dev/null @@ -1,75 +0,0 @@ -
-
-
- Chargeback -
- {{ (chargeback$ | async)?.status | ccMapUnion: mapStatus }} -
-
-
-
- #{{ (chargeback$ | async)?.id }} -
-
- {{ (chargeback$ | async)?.stage | ccMapUnion: mapStage }} -
-
-
- - -

Chargeback data

-
- - {{ chargeback.created_at | date: 'dd.MM.yy HH:mm:ss' }} - - - {{ chargeback.levy.amount | ccFormatAmount }} - {{ chargeback.levy.currency.symbolic_code | ccCurrency }} - - - {{ chargeback.body.amount | ccFormatAmount }} - {{ chargeback.body.currency.symbolic_code | ccCurrency }} - -
- - -

Reason

-
- - {{ chargeback.reason.category | ccUnionKey }} - - - {{ chargeback.reason.code }} - -
- - - -
-

Payment

- -
- -
-
-
- - - - - - -
diff --git a/src/app/sections/chargeback-details/chargeback-details.component.ts b/src/app/sections/chargeback-details/chargeback-details.component.ts deleted file mode 100644 index 1f522080..00000000 --- a/src/app/sections/chargeback-details/chargeback-details.component.ts +++ /dev/null @@ -1,117 +0,0 @@ -import { ChangeDetectionStrategy, Component } from '@angular/core'; -import { MatDialog } from '@angular/material/dialog'; -import { Router } from '@angular/router'; -import { combineLatest } from 'rxjs'; -import { delay, first, map, pluck, shareReplay, switchMap } from 'rxjs/operators'; - -import { getUnionKey } from '@cc/utils/index'; - -import { - InvoicePaymentChargebackStage, - InvoicePaymentChargebackStatus, -} from '../../thrift-services/damsel/gen-model/domain'; -import { ChangeChargebackStatusDialogComponent } from './change-chargeback-status-dialog'; -import { ChargebackDetailsService } from './chargeback-details.service'; -import { ReopenChargebackDialogComponent } from './reopen-chargeback-dialog'; - -@Component({ - selector: 'cc-chargeback-details', - templateUrl: 'chargeback-details.component.html', - changeDetection: ChangeDetectionStrategy.OnPush, - providers: [ChargebackDetailsService], -}) -export class ChargebackDetailsComponent { - mapStatus: { [N in keyof InvoicePaymentChargebackStatus] } = { - accepted: 'Accepted', - cancelled: 'Cancelled', - pending: 'Pending', - rejected: 'Rejected', - }; - - mapStage: { [N in keyof InvoicePaymentChargebackStage] } = { - arbitration: 'Arbitration', - chargeback: 'Chargeback', - pre_arbitration: 'Pre-arbitration', - }; - - chargeback$ = this.chargebackDetailsService.chargeback$; - shop$ = this.chargebackDetailsService.shop$; - payment$ = this.chargebackDetailsService.payment$; - - reopenAvailable$ = this.chargeback$.pipe( - map((c) => getUnionKey(c.status) === 'rejected' && getUnionKey(c.stage) !== 'arbitration'), - shareReplay(1) - ); - - changeStatusAvailable$ = this.chargeback$.pipe( - pluck('status'), - map(getUnionKey), - map((s) => s === 'pending'), - shareReplay(1) - ); - - constructor( - private chargebackDetailsService: ChargebackDetailsService, - private dialog: MatDialog, - private router: Router - ) {} - - changeStatus() { - combineLatest([this.chargeback$, this.payment$]) - .pipe( - first(), - switchMap(([{ id: chargebackID }, { id: paymentID, invoice_id: invoiceID }]) => - this.dialog - .open(ChangeChargebackStatusDialogComponent, { - ...ChangeChargebackStatusDialogComponent.defaultConfig, - data: { - invoiceID, - paymentID, - chargebackID, - }, - }) - .afterClosed() - ), - delay(1000) - ) - .subscribe(() => this.chargebackDetailsService.loadChargeback()); - } - - reopen() { - combineLatest([this.chargeback$, this.payment$]) - .pipe( - first(), - switchMap( - ([{ id: chargebackID, stage }, { id: paymentID, invoice_id: invoiceID }]) => - this.dialog - .open(ReopenChargebackDialogComponent, { - ...ReopenChargebackDialogComponent.defaultConfig, - data: { - invoiceID, - paymentID, - chargebackID, - stage: getUnionKey(stage), - }, - }) - .afterClosed() - ), - delay(1000) - ) - .subscribe(() => this.chargebackDetailsService.loadChargeback()); - } - - navigateToPayment() { - this.payment$ - .pipe(first()) - .subscribe((p) => - this.router.navigate([ - 'party', - p.owner_id, - 'invoice', - p.invoice_id, - 'payment', - p.id, - ]) - ); - } -} diff --git a/src/app/sections/chargeback-details/chargeback-details.module.ts b/src/app/sections/chargeback-details/chargeback-details.module.ts deleted file mode 100644 index d51a0ed6..00000000 --- a/src/app/sections/chargeback-details/chargeback-details.module.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { CommonModule } from '@angular/common'; -import { NgModule } from '@angular/core'; -import { FlexLayoutModule } from '@angular/flex-layout'; -import { ReactiveFormsModule } from '@angular/forms'; -import { MatButtonModule } from '@angular/material/button'; -import { MatCardModule } from '@angular/material/card'; -import { MatDatepickerModule } from '@angular/material/datepicker'; -import { MatDialogModule } from '@angular/material/dialog'; -import { MatDividerModule } from '@angular/material/divider'; -import { MatFormFieldModule } from '@angular/material/form-field'; -import { MatIconModule } from '@angular/material/icon'; -import { MatInputModule } from '@angular/material/input'; -import { MatSelectModule } from '@angular/material/select'; -import { MatSnackBarModule } from '@angular/material/snack-bar'; - -import { CommonPipesModule, ThriftPipesModule } from '@cc/app/shared/pipes'; -import { DetailsItemModule } from '@cc/components/details-item'; -import { HeadlineModule } from '@cc/components/headline'; - -import { PaymentMainInfoModule } from '../payment-details/payment-main-info'; -import { ChangeChargebackStatusDialogComponent } from './change-chargeback-status-dialog'; -import { ChargebackDetailsRoutingModule } from './chargeback-details-routing.module'; -import { ChargebackDetailsComponent } from './chargeback-details.component'; -import { ReopenChargebackDialogComponent } from './reopen-chargeback-dialog'; - -const EXPORTED_DECLARATIONS = [ - ChargebackDetailsComponent, - ChangeChargebackStatusDialogComponent, - ReopenChargebackDialogComponent, -]; - -@NgModule({ - imports: [ - ChargebackDetailsRoutingModule, - CommonModule, - HeadlineModule, - MatCardModule, - MatDividerModule, - DetailsItemModule, - FlexLayoutModule, - PaymentMainInfoModule, - MatButtonModule, - ReactiveFormsModule, - MatSnackBarModule, - MatDialogModule, - MatDatepickerModule, - MatFormFieldModule, - MatSelectModule, - MatInputModule, - MatIconModule, - ThriftPipesModule, - CommonPipesModule, - ], - declarations: EXPORTED_DECLARATIONS, - exports: EXPORTED_DECLARATIONS, -}) -export class ChargebackDetailsModule {} diff --git a/src/app/sections/chargeback-details/chargeback-details.service.ts b/src/app/sections/chargeback-details/chargeback-details.service.ts deleted file mode 100644 index f7140fcc..00000000 --- a/src/app/sections/chargeback-details/chargeback-details.service.ts +++ /dev/null @@ -1,62 +0,0 @@ -import { Injectable } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; -import { combineLatest, Subject } from 'rxjs'; -import { map, pluck, shareReplay, startWith, switchMap } from 'rxjs/operators'; - -import { PartyService } from '../../papi/party.service'; -import { createDsl } from '../../query-dsl'; -import { MerchantStatisticsService } from '../../thrift-services/damsel/merchant-statistics.service'; -import { PaymentProcessingService } from '../../thrift-services/damsel/payment-processing.service'; - -@Injectable() -export class ChargebackDetailsService { - private loadChargeback$ = new Subject(); - - // eslint-disable-next-line @typescript-eslint/member-ordering - payment$ = this.route.params.pipe( - switchMap(({ partyID, invoiceID, paymentID }) => - this.merchantStatisticsService - .getPayments({ - dsl: createDsl({ - payments: { - ...(paymentID ? { payment_id: paymentID } : {}), - ...(partyID ? { merchant_id: partyID } : {}), - ...(invoiceID ? { invoice_id: invoiceID } : {}), - }, - }), - }) - .pipe(map(({ data }) => data.payments[0])) - ), - shareReplay(1) - ); - - // eslint-disable-next-line @typescript-eslint/member-ordering - shop$ = combineLatest([ - this.route.params.pipe(pluck('partyID')), - this.payment$.pipe(pluck('shop_id')), - ]).pipe( - switchMap(([partyID, shopID]) => this.partyService.getShop(partyID, shopID)), - shareReplay(1) - ); - - // eslint-disable-next-line @typescript-eslint/member-ordering - chargeback$ = this.loadChargeback$.pipe( - startWith(null), - switchMap(() => this.route.params), - switchMap((p) => - this.paymentProcessingService.getChargeback(p.invoiceID, p.paymentID, p.chargebackID) - ), - shareReplay(1) - ); - - constructor( - private partyService: PartyService, - private merchantStatisticsService: MerchantStatisticsService, - private route: ActivatedRoute, - private paymentProcessingService: PaymentProcessingService - ) {} - - loadChargeback() { - this.loadChargeback$.next(); - } -} diff --git a/src/app/sections/chargeback-details/index.ts b/src/app/sections/chargeback-details/index.ts deleted file mode 100644 index 99b702ba..00000000 --- a/src/app/sections/chargeback-details/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './chargeback-details.component'; -export * from './chargeback-details.module'; -export * from './chargeback-details.service'; diff --git a/src/app/sections/chargeback-details/reopen-chargeback-dialog/index.ts b/src/app/sections/chargeback-details/reopen-chargeback-dialog/index.ts deleted file mode 100644 index 482ce524..00000000 --- a/src/app/sections/chargeback-details/reopen-chargeback-dialog/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './reopen-chargeback-dialog.component'; diff --git a/src/app/sections/chargeback-details/reopen-chargeback-dialog/reopen-chargeback-dialog.component.html b/src/app/sections/chargeback-details/reopen-chargeback-dialog/reopen-chargeback-dialog.component.html deleted file mode 100644 index 58fb74b3..00000000 --- a/src/app/sections/chargeback-details/reopen-chargeback-dialog/reopen-chargeback-dialog.component.html +++ /dev/null @@ -1,29 +0,0 @@ -
-

Reopen chargeback

- - - Reopen stage (optional) - - - {{ c }} - - - -
- - Levy amount (optional) - - - - Body amount (optional) - - -
-
- - - - -
diff --git a/src/app/sections/chargeback-details/reopen-chargeback-dialog/reopen-chargeback-dialog.component.ts b/src/app/sections/chargeback-details/reopen-chargeback-dialog/reopen-chargeback-dialog.component.ts deleted file mode 100644 index 71cd1ec3..00000000 --- a/src/app/sections/chargeback-details/reopen-chargeback-dialog/reopen-chargeback-dialog.component.ts +++ /dev/null @@ -1,80 +0,0 @@ -import { ChangeDetectionStrategy, Component, Inject } from '@angular/core'; -import { FormBuilder } from '@angular/forms'; -import { MatDialogConfig, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; -import { MatSnackBar } from '@angular/material/snack-bar'; - -import { toMinor } from '@cc/utils/index'; - -import { InvoicePaymentChargebackStage } from '../../../thrift-services/damsel/gen-model/domain'; -import { PaymentProcessingService } from '../../../thrift-services/damsel/payment-processing.service'; - -@Component({ - selector: 'cc-reopen-chargeback-dialog', - templateUrl: 'reopen-chargeback-dialog.component.html', - changeDetection: ChangeDetectionStrategy.OnPush, -}) -export class ReopenChargebackDialogComponent { - static defaultConfig: MatDialogConfig = { - disableClose: true, - width: '552px', - }; - - form = this.fb.group({ - stage: '', - leavyAmount: '', - bodyAmount: '', - date: '', - }); - stages: (keyof InvoicePaymentChargebackStage)[] = ['arbitration']; - - constructor( - private fb: FormBuilder, - @Inject(MAT_DIALOG_DATA) - public params: { - invoiceID: string; - paymentID: string; - chargebackID: string; - stage: keyof InvoicePaymentChargebackStage; - }, - private dialogRef: MatDialogRef, - private snackBar: MatSnackBar, - private paymentProcessingService: PaymentProcessingService - ) {} - - reopen() { - const { stage, leavyAmount, bodyAmount } = this.form.value; - this.paymentProcessingService - .reopenChargeback( - this.params.invoiceID, - this.params.paymentID, - this.params.chargebackID, - Object.assign( - {}, - !!stage && { move_to_stage: { [stage]: {} } }, - !!bodyAmount && { - body: { - amount: toMinor(bodyAmount) as any, - currency: { symbolic_code: 'RUB' }, - }, - }, - !!leavyAmount && { - levy: { - amount: toMinor(leavyAmount) as any, - currency: { symbolic_code: 'RUB' }, - }, - } - ) - ) - .subscribe( - () => this.dialogRef.close(), - (error) => { - console.error(error); - this.snackBar.open('An error occurred while reopen chargeback', 'OK'); - } - ); - } - - cancel() { - this.dialogRef.close(); - } -} diff --git a/src/app/sections/deposit-details/deposit-details.module.ts b/src/app/sections/deposit-details/deposit-details.module.ts index 999ea41b..8780d5bc 100644 --- a/src/app/sections/deposit-details/deposit-details.module.ts +++ b/src/app/sections/deposit-details/deposit-details.module.ts @@ -7,8 +7,6 @@ import { MatDialogModule } from '@angular/material/dialog'; import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; import { StatusModule } from '@cc/app/shared/components'; -import { ChargebacksTableModule } from '@cc/app/shared/components/chargebacks-table'; -import { CreateChargebackDialogModule } from '@cc/app/shared/components/create-chargeback-dialog'; import { DetailsItemModule } from '@cc/components/details-item'; import { HeadlineModule } from '@cc/components/headline'; @@ -27,10 +25,8 @@ import { RevertsModule } from './reverts/reverts.module'; DetailsItemModule, StatusModule, MatProgressSpinnerModule, - ChargebacksTableModule, MatButtonModule, MatDialogModule, - CreateChargebackDialogModule, DepositMainInfoModule, RevertsModule, ], diff --git a/src/app/sections/party-chargebacks/chargebacks-search-filters-store.service.ts b/src/app/sections/party-chargebacks/chargebacks-search-filters-store.service.ts deleted file mode 100644 index daedbf6a..00000000 --- a/src/app/sections/party-chargebacks/chargebacks-search-filters-store.service.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { Injectable } from '@angular/core'; -import { ActivatedRoute, Params, Router } from '@angular/router'; -import pickBy from 'lodash-es/pickBy'; - -import { QueryParamsStore } from '@cc/app/shared/services'; -import { wrapValuesToArray } from '@cc/utils/wrap-values-to-array'; - -import { FormValue } from './chargebacks-search-filters'; - -const ARRAY_PARAMS: (keyof FormValue)[] = [ - 'shop_ids', - 'chargeback_statuses', - 'chargeback_stages', - 'chargeback_categories', -]; - -@Injectable() -export class ChargebacksSearchFiltersStore extends QueryParamsStore { - constructor(protected router: Router, protected route: ActivatedRoute) { - super(router, route); - } - - mapToData(queryParams: Params = {}) { - return { - ...queryParams, - ...wrapValuesToArray( - pickBy( - queryParams, - (v, k: keyof FormValue) => typeof v === 'string' && ARRAY_PARAMS.includes(k) - ) - ), - } as FormValue; - } - - mapToParams(data: Partial = {}): Params { - return data; - } -} diff --git a/src/app/sections/party-chargebacks/chargebacks-search-filters/chargebacks-main-search-filters/chargebacks-main-search-filters.component.html b/src/app/sections/party-chargebacks/chargebacks-search-filters/chargebacks-main-search-filters/chargebacks-main-search-filters.component.html deleted file mode 100644 index 720bd75d..00000000 --- a/src/app/sections/party-chargebacks/chargebacks-search-filters/chargebacks-main-search-filters/chargebacks-main-search-filters.component.html +++ /dev/null @@ -1,30 +0,0 @@ -
- - Date Range - - - - - - keyboard_arrow_down - - - - - - - - Shops - - - {{ shop.details.name }} - - - -
diff --git a/src/app/sections/party-chargebacks/chargebacks-search-filters/chargebacks-main-search-filters/chargebacks-main-search-filters.component.scss b/src/app/sections/party-chargebacks/chargebacks-search-filters/chargebacks-main-search-filters/chargebacks-main-search-filters.component.scss deleted file mode 100644 index 49ea12d2..00000000 --- a/src/app/sections/party-chargebacks/chargebacks-search-filters/chargebacks-main-search-filters/chargebacks-main-search-filters.component.scss +++ /dev/null @@ -1,3 +0,0 @@ -.mat-form-field { - min-width: 0; -} diff --git a/src/app/sections/party-chargebacks/chargebacks-search-filters/chargebacks-main-search-filters/chargebacks-main-search-filters.component.ts b/src/app/sections/party-chargebacks/chargebacks-search-filters/chargebacks-main-search-filters/chargebacks-main-search-filters.component.ts deleted file mode 100644 index 533fcee8..00000000 --- a/src/app/sections/party-chargebacks/chargebacks-search-filters/chargebacks-main-search-filters/chargebacks-main-search-filters.component.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { - ChangeDetectionStrategy, - Component, - EventEmitter, - Input, - OnInit, - Output, -} from '@angular/core'; -import moment from 'moment'; - -import { ChargebacksParams } from '../../../../query-dsl'; -import { ChargebacksMainSearchFiltersService } from './chargebacks-main-search-filters.service'; - -@Component({ - selector: 'cc-chargebacks-main-search-filters', - templateUrl: 'chargebacks-main-search-filters.component.html', - styleUrls: ['chargebacks-main-search-filters.component.scss'], - changeDetection: ChangeDetectionStrategy.OnPush, - providers: [ChargebacksMainSearchFiltersService], -}) -export class ChargebacksMainSearchFiltersComponent implements OnInit { - @Input() partyID: string; - @Input() initParams: ChargebacksParams; - @Output() valueChanges = new EventEmitter(); - - shops$ = this.chargebacksMainSearchFiltersService.shops$; - - form = this.chargebacksMainSearchFiltersService.form; - - constructor(private chargebacksMainSearchFiltersService: ChargebacksMainSearchFiltersService) { - this.chargebacksMainSearchFiltersService.searchParamsChanges$.subscribe((params) => - this.valueChanges.emit(params) - ); - } - - ngOnInit() { - const { from_time, to_time, ...params } = this.initParams || {}; - this.chargebacksMainSearchFiltersService.init( - Object.assign( - params, - !!from_time && { from_time: moment(from_time) }, - !!to_time && { to_time: moment(to_time) } - ) - ); - this.chargebacksMainSearchFiltersService.getShops(this.partyID); - } -} diff --git a/src/app/sections/party-chargebacks/chargebacks-search-filters/chargebacks-main-search-filters/chargebacks-main-search-filters.module.ts b/src/app/sections/party-chargebacks/chargebacks-search-filters/chargebacks-main-search-filters/chargebacks-main-search-filters.module.ts deleted file mode 100644 index 420d1755..00000000 --- a/src/app/sections/party-chargebacks/chargebacks-search-filters/chargebacks-main-search-filters/chargebacks-main-search-filters.module.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { CommonModule } from '@angular/common'; -import { NgModule } from '@angular/core'; -import { FlexLayoutModule } from '@angular/flex-layout'; -import { FormsModule, ReactiveFormsModule } from '@angular/forms'; -import { MatBadgeModule } from '@angular/material/badge'; -import { MatButtonModule } from '@angular/material/button'; -import { MatOptionModule, MAT_DATE_FORMATS } from '@angular/material/core'; -import { MatDatepickerModule } from '@angular/material/datepicker'; -import { MatDialogModule } from '@angular/material/dialog'; -import { MatDividerModule } from '@angular/material/divider'; -import { MatFormFieldModule } from '@angular/material/form-field'; -import { MatIconModule } from '@angular/material/icon'; -import { MatInputModule } from '@angular/material/input'; -import { MatSelectModule } from '@angular/material/select'; - -import { ChargebacksMainSearchFiltersComponent } from './chargebacks-main-search-filters.component'; - -export const RU_DATE_FORMATS = { - parse: { - dateInput: ['l', 'LL'], - }, - display: { - dateInput: 'DD.MM.YYYY', - monthYearLabel: 'DD.MM.YYYY', - dateA11yLabel: 'DD.MM.YYYY', - monthYearA11yLabel: 'DD.MM.YYYY', - }, -}; - -@NgModule({ - imports: [ - CommonModule, - ReactiveFormsModule, - MatFormFieldModule, - MatDatepickerModule, - MatIconModule, - MatInputModule, - MatButtonModule, - MatBadgeModule, - MatDialogModule, - MatDividerModule, - FlexLayoutModule, - MatSelectModule, - MatDialogModule, - FormsModule, - MatOptionModule, - ], - declarations: [ChargebacksMainSearchFiltersComponent], - exports: [ChargebacksMainSearchFiltersComponent], - providers: [{ provide: MAT_DATE_FORMATS, useValue: RU_DATE_FORMATS }], -}) -export class ChargebacksMainSearchFiltersModule {} diff --git a/src/app/sections/party-chargebacks/chargebacks-search-filters/chargebacks-main-search-filters/chargebacks-main-search-filters.service.ts b/src/app/sections/party-chargebacks/chargebacks-search-filters/chargebacks-main-search-filters/chargebacks-main-search-filters.service.ts deleted file mode 100644 index 9969987c..00000000 --- a/src/app/sections/party-chargebacks/chargebacks-search-filters/chargebacks-main-search-filters/chargebacks-main-search-filters.service.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { Injectable } from '@angular/core'; -import { FormBuilder, Validators } from '@angular/forms'; -import * as moment from 'moment'; -import { ReplaySubject } from 'rxjs'; -import { debounceTime, filter, shareReplay, switchMap } from 'rxjs/operators'; - -import { PartyService } from '../../../../papi/party.service'; -import { FormValue } from '../form-value'; - -@Injectable() -export class ChargebacksMainSearchFiltersService { - private getShops$ = new ReplaySubject(); - - // eslint-disable-next-line @typescript-eslint/member-ordering - form = this.fb.group({ - from_time: [moment().subtract(1, 'y').startOf('d'), Validators.required], - to_time: [moment().endOf('d'), Validators.required], - invoice_id: '', - shop_ids: '', - }); - - // eslint-disable-next-line @typescript-eslint/member-ordering - searchParamsChanges$ = this.form.valueChanges.pipe( - debounceTime(600), - filter(() => this.form.valid), - shareReplay(1) - ); - - // eslint-disable-next-line @typescript-eslint/member-ordering - shops$ = this.getShops$.pipe( - switchMap((partyID) => this.partyService.getShops(partyID)), - shareReplay(1) - ); - - constructor(private partyService: PartyService, private fb: FormBuilder) {} - - getShops(id: string) { - this.getShops$.next(id); - } - - init(params: FormValue) { - this.form.patchValue(params); - } -} diff --git a/src/app/sections/party-chargebacks/chargebacks-search-filters/chargebacks-main-search-filters/index.ts b/src/app/sections/party-chargebacks/chargebacks-search-filters/chargebacks-main-search-filters/index.ts deleted file mode 100644 index f2b688a6..00000000 --- a/src/app/sections/party-chargebacks/chargebacks-search-filters/chargebacks-main-search-filters/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './chargebacks-main-search-filters.component'; -export * from './chargebacks-main-search-filters.module'; diff --git a/src/app/sections/party-chargebacks/chargebacks-search-filters/chargebacks-other-search-filters/chargebacks-other-search-filters.component.html b/src/app/sections/party-chargebacks/chargebacks-search-filters/chargebacks-other-search-filters/chargebacks-other-search-filters.component.html deleted file mode 100644 index 4bb0ad6a..00000000 --- a/src/app/sections/party-chargebacks/chargebacks-search-filters/chargebacks-other-search-filters/chargebacks-other-search-filters.component.html +++ /dev/null @@ -1,10 +0,0 @@ - diff --git a/src/app/sections/party-chargebacks/chargebacks-search-filters/chargebacks-other-search-filters/chargebacks-other-search-filters.component.ts b/src/app/sections/party-chargebacks/chargebacks-search-filters/chargebacks-other-search-filters/chargebacks-other-search-filters.component.ts deleted file mode 100644 index aed422b6..00000000 --- a/src/app/sections/party-chargebacks/chargebacks-search-filters/chargebacks-other-search-filters/chargebacks-other-search-filters.component.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { - ChangeDetectionStrategy, - Component, - EventEmitter, - Input, - OnInit, - Output, -} from '@angular/core'; - -import { ChargebacksParams } from '../../../../query-dsl'; -import { ChargebacksOtherSearchFiltersService } from './chargebacks-other-search-filters.service'; - -@Component({ - selector: 'cc-chargebacks-other-search-filters', - templateUrl: 'chargebacks-other-search-filters.component.html', - changeDetection: ChangeDetectionStrategy.OnPush, - providers: [ChargebacksOtherSearchFiltersService], -}) -export class ChargebacksOtherSearchFiltersComponent implements OnInit { - @Input() initParams: ChargebacksParams; - @Output() valueChanges = new EventEmitter(); - - count$ = this.chargebacksOtherSearchFiltersService.filtersCount$; - - constructor( - private chargebacksOtherSearchFiltersService: ChargebacksOtherSearchFiltersService - ) { - this.chargebacksOtherSearchFiltersService.formParams$.subscribe((params) => { - this.valueChanges.emit(params); - }); - } - - ngOnInit() { - this.chargebacksOtherSearchFiltersService.init(this.initParams); - } - - openOtherFiltersDialog() { - this.chargebacksOtherSearchFiltersService.openOtherFiltersDialog(); - } -} diff --git a/src/app/sections/party-chargebacks/chargebacks-search-filters/chargebacks-other-search-filters/chargebacks-other-search-filters.module.ts b/src/app/sections/party-chargebacks/chargebacks-search-filters/chargebacks-other-search-filters/chargebacks-other-search-filters.module.ts deleted file mode 100644 index f20e063c..00000000 --- a/src/app/sections/party-chargebacks/chargebacks-search-filters/chargebacks-other-search-filters/chargebacks-other-search-filters.module.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { CommonModule } from '@angular/common'; -import { NgModule } from '@angular/core'; -import { FlexLayoutModule } from '@angular/flex-layout'; -import { FormsModule, ReactiveFormsModule } from '@angular/forms'; -import { MatBadgeModule } from '@angular/material/badge'; -import { MatButtonModule } from '@angular/material/button'; -import { MatOptionModule } from '@angular/material/core'; -import { MatDatepickerModule } from '@angular/material/datepicker'; -import { MatDialogModule } from '@angular/material/dialog'; -import { MatDividerModule } from '@angular/material/divider'; -import { MatFormFieldModule } from '@angular/material/form-field'; -import { MatIconModule } from '@angular/material/icon'; -import { MatInputModule } from '@angular/material/input'; -import { MatSelectModule } from '@angular/material/select'; - -import { ChargebacksOtherSearchFiltersComponent } from './chargebacks-other-search-filters.component'; -import { OtherFiltersDialogModule } from './other-filters-dialog'; - -@NgModule({ - imports: [ - CommonModule, - ReactiveFormsModule, - MatFormFieldModule, - MatDatepickerModule, - MatIconModule, - MatInputModule, - MatButtonModule, - MatBadgeModule, - MatDialogModule, - MatDividerModule, - FlexLayoutModule, - MatSelectModule, - MatDialogModule, - FormsModule, - MatOptionModule, - OtherFiltersDialogModule, - ], - declarations: [ChargebacksOtherSearchFiltersComponent], - exports: [ChargebacksOtherSearchFiltersComponent], -}) -export class ChargebacksOtherSearchFiltersModule {} diff --git a/src/app/sections/party-chargebacks/chargebacks-search-filters/chargebacks-other-search-filters/chargebacks-other-search-filters.service.ts b/src/app/sections/party-chargebacks/chargebacks-search-filters/chargebacks-other-search-filters/chargebacks-other-search-filters.service.ts deleted file mode 100644 index cbd74de9..00000000 --- a/src/app/sections/party-chargebacks/chargebacks-search-filters/chargebacks-other-search-filters/chargebacks-other-search-filters.service.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { Injectable } from '@angular/core'; -import { MatDialog } from '@angular/material/dialog'; -import pick from 'lodash-es/pick'; -import { ReplaySubject } from 'rxjs'; -import { filter, map, shareReplay, switchMap, take } from 'rxjs/operators'; - -import { ChargebacksParams } from '../../../../query-dsl'; -import { OtherFiltersDialogComponent } from './other-filters-dialog'; - -@Injectable() -export class ChargebacksOtherSearchFiltersService { - formParams$ = new ReplaySubject(1); - filtersCount$ = this.formParams$.pipe( - map((p) => this.getActiveParamsCount(p) || null), - shareReplay(1) - ); - - constructor(private dialog: MatDialog) {} - - init(params: ChargebacksParams) { - this.formParams$.next( - pick(params, ['chargeback_statuses', 'chargeback_categories', 'chargeback_stages']) - ); - } - - openOtherFiltersDialog() { - this.formParams$ - .pipe( - take(1), - switchMap((data) => - this.dialog - .open(OtherFiltersDialogComponent, { - disableClose: true, - width: '552px', - data, - }) - .afterClosed() - ), - filter((v) => v) - ) - .subscribe((p) => this.formParams$.next(p)); - } - - private getActiveParamsCount(params: any) { - return Object.values(params).filter((p) => (Array.isArray(p) ? p?.length : p)).length; - } -} diff --git a/src/app/sections/party-chargebacks/chargebacks-search-filters/chargebacks-other-search-filters/index.ts b/src/app/sections/party-chargebacks/chargebacks-search-filters/chargebacks-other-search-filters/index.ts deleted file mode 100644 index 0160f199..00000000 --- a/src/app/sections/party-chargebacks/chargebacks-search-filters/chargebacks-other-search-filters/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './chargebacks-other-search-filters.component'; -export * from './chargebacks-other-search-filters.module'; -export * from './other-filters-dialog'; diff --git a/src/app/sections/party-chargebacks/chargebacks-search-filters/chargebacks-other-search-filters/other-filters-dialog/index.ts b/src/app/sections/party-chargebacks/chargebacks-search-filters/chargebacks-other-search-filters/other-filters-dialog/index.ts deleted file mode 100644 index 4879cb28..00000000 --- a/src/app/sections/party-chargebacks/chargebacks-search-filters/chargebacks-other-search-filters/other-filters-dialog/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './other-filters-dialog.component'; -export * from './other-filters-dialog.module'; diff --git a/src/app/sections/party-chargebacks/chargebacks-search-filters/chargebacks-other-search-filters/other-filters-dialog/other-filters-dialog.component.html b/src/app/sections/party-chargebacks/chargebacks-search-filters/chargebacks-other-search-filters/other-filters-dialog/other-filters-dialog.component.html deleted file mode 100644 index f390eed9..00000000 --- a/src/app/sections/party-chargebacks/chargebacks-search-filters/chargebacks-other-search-filters/other-filters-dialog/other-filters-dialog.component.html +++ /dev/null @@ -1,35 +0,0 @@ -
-

Other filters

- - - Chargeback Statuses - - - {{ s }} - - - - - - Chargeback Categories - - - {{ c }} - - - - - - Chargeback Stages - - - {{ s }} - - - - - - - - -
diff --git a/src/app/sections/party-chargebacks/chargebacks-search-filters/chargebacks-other-search-filters/other-filters-dialog/other-filters-dialog.component.ts b/src/app/sections/party-chargebacks/chargebacks-search-filters/chargebacks-other-search-filters/other-filters-dialog/other-filters-dialog.component.ts deleted file mode 100644 index fc29c789..00000000 --- a/src/app/sections/party-chargebacks/chargebacks-search-filters/chargebacks-other-search-filters/other-filters-dialog/other-filters-dialog.component.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { ChangeDetectionStrategy, Component, Inject } from '@angular/core'; -import { FormBuilder } from '@angular/forms'; -import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; - -import { - CHARGEBACK_CATEGORIES, - ChargebacksParams, - CHARGEBACK_STAGES, - CHARGEBACK_STATUSES, -} from '../../../../../query-dsl'; - -@Component({ - templateUrl: 'other-filters-dialog.component.html', - changeDetection: ChangeDetectionStrategy.OnPush, -}) -export class OtherFiltersDialogComponent { - chargebackStatuses = CHARGEBACK_STATUSES; - chargebackCategories = CHARGEBACK_CATEGORIES; - chargebackStages = CHARGEBACK_STAGES; - - form = this.fb.group({ - chargeback_statuses: '', - chargeback_categories: '', - chargeback_stages: '', - }); - - constructor( - private dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public initParams: ChargebacksParams, - private fb: FormBuilder - ) { - this.form.patchValue(this.initParams); - } - - cancel() { - this.dialogRef.close(); - } - - save() { - this.dialogRef.close(this.form.value); - } -} diff --git a/src/app/sections/party-chargebacks/chargebacks-search-filters/chargebacks-other-search-filters/other-filters-dialog/other-filters-dialog.module.ts b/src/app/sections/party-chargebacks/chargebacks-search-filters/chargebacks-other-search-filters/other-filters-dialog/other-filters-dialog.module.ts deleted file mode 100644 index 94de303c..00000000 --- a/src/app/sections/party-chargebacks/chargebacks-search-filters/chargebacks-other-search-filters/other-filters-dialog/other-filters-dialog.module.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { CommonModule } from '@angular/common'; -import { NgModule } from '@angular/core'; -import { FlexLayoutModule } from '@angular/flex-layout'; -import { ReactiveFormsModule } from '@angular/forms'; -import { MatBadgeModule } from '@angular/material/badge'; -import { MatButtonModule } from '@angular/material/button'; -import { MatDatepickerModule } from '@angular/material/datepicker'; -import { MatDialogModule } from '@angular/material/dialog'; -import { MatDividerModule } from '@angular/material/divider'; -import { MatFormFieldModule } from '@angular/material/form-field'; -import { MatIconModule } from '@angular/material/icon'; -import { MatInputModule } from '@angular/material/input'; -import { MatSelectModule } from '@angular/material/select'; - -import { OtherFiltersDialogComponent } from './other-filters-dialog.component'; - -@NgModule({ - imports: [ - CommonModule, - ReactiveFormsModule, - MatFormFieldModule, - MatDatepickerModule, - MatIconModule, - MatInputModule, - MatButtonModule, - MatBadgeModule, - MatDialogModule, - MatDividerModule, - FlexLayoutModule, - MatSelectModule, - ], - declarations: [OtherFiltersDialogComponent], - exports: [OtherFiltersDialogComponent], - entryComponents: [OtherFiltersDialogComponent], -}) -export class OtherFiltersDialogModule {} diff --git a/src/app/sections/party-chargebacks/chargebacks-search-filters/form-value.ts b/src/app/sections/party-chargebacks/chargebacks-search-filters/form-value.ts deleted file mode 100644 index 10920648..00000000 --- a/src/app/sections/party-chargebacks/chargebacks-search-filters/form-value.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Moment } from 'moment'; - -import { ChargebacksParams } from '../../../query-dsl'; - -export type FormValue = Omit & { - from_time: Moment; - to_time: Moment; -}; diff --git a/src/app/sections/party-chargebacks/chargebacks-search-filters/index.ts b/src/app/sections/party-chargebacks/chargebacks-search-filters/index.ts deleted file mode 100644 index 553e4170..00000000 --- a/src/app/sections/party-chargebacks/chargebacks-search-filters/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './chargebacks-other-search-filters'; -export * from './chargebacks-main-search-filters'; -export * from './form-value'; diff --git a/src/app/sections/party-chargebacks/index.ts b/src/app/sections/party-chargebacks/index.ts deleted file mode 100644 index e2fb1138..00000000 --- a/src/app/sections/party-chargebacks/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './party-chargebacks.module'; diff --git a/src/app/sections/party-chargebacks/party-chargebacks-routing.module.ts b/src/app/sections/party-chargebacks/party-chargebacks-routing.module.ts deleted file mode 100644 index a708f3f5..00000000 --- a/src/app/sections/party-chargebacks/party-chargebacks-routing.module.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { NgModule } from '@angular/core'; -import { RouterModule } from '@angular/router'; - -import { AppAuthGuardService, ChargebackRole } from '@cc/app/shared/services'; - -import { PartyChargebacksComponent } from './party-chargebacks.component'; - -@NgModule({ - imports: [ - RouterModule.forChild([ - { - path: '', - component: PartyChargebacksComponent, - canActivate: [AppAuthGuardService], - data: { - roles: [ChargebackRole.View], - }, - }, - ]), - ], -}) -export class PartyChargebacksRoutingModule {} diff --git a/src/app/sections/party-chargebacks/party-chargebacks.component.html b/src/app/sections/party-chargebacks/party-chargebacks.component.html deleted file mode 100644 index ee779caa..00000000 --- a/src/app/sections/party-chargebacks/party-chargebacks.component.html +++ /dev/null @@ -1,28 +0,0 @@ -
-
Merchant’s chargebacks
-
- - - - - - - - - -
-
diff --git a/src/app/sections/party-chargebacks/party-chargebacks.component.ts b/src/app/sections/party-chargebacks/party-chargebacks.component.ts deleted file mode 100644 index 0988d529..00000000 --- a/src/app/sections/party-chargebacks/party-chargebacks.component.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { ChangeDetectionStrategy, Component } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; -import { combineLatest, ReplaySubject } from 'rxjs'; -import { map, pluck, shareReplay } from 'rxjs/operators'; - -import { FormValue } from './chargebacks-search-filters'; -import { ChargebacksSearchFiltersStore } from './chargebacks-search-filters-store.service'; - -@Component({ - templateUrl: 'party-chargebacks.component.html', - providers: [ChargebacksSearchFiltersStore], - changeDetection: ChangeDetectionStrategy.OnPush, -}) -export class PartyChargebacksComponent { - partyID$ = this.route.params.pipe(pluck('partyID'), shareReplay(1)); - initSearchParams$ = this.chargebacksSearchFiltersStore.data$; - searchParamsChanges$ = new ReplaySubject(); - otherSearchParamsChanges$ = new ReplaySubject(); - searchParams$ = combineLatest([this.searchParamsChanges$, this.otherSearchParamsChanges$]).pipe( - map(([a, b]) => ({ ...a, ...b })), - shareReplay(1) - ); - - constructor( - private route: ActivatedRoute, - private chargebacksSearchFiltersStore: ChargebacksSearchFiltersStore - ) { - this.searchParams$.subscribe((params) => - this.chargebacksSearchFiltersStore.preserve(params) - ); - } -} diff --git a/src/app/sections/party-chargebacks/party-chargebacks.module.ts b/src/app/sections/party-chargebacks/party-chargebacks.module.ts deleted file mode 100644 index 97c3914d..00000000 --- a/src/app/sections/party-chargebacks/party-chargebacks.module.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { CommonModule } from '@angular/common'; -import { NgModule } from '@angular/core'; -import { FlexModule } from '@angular/flex-layout'; -import { ReactiveFormsModule } from '@angular/forms'; -import { MatBadgeModule } from '@angular/material/badge'; -import { MatButtonModule } from '@angular/material/button'; -import { MatCardModule } from '@angular/material/card'; -import { MatFormFieldModule } from '@angular/material/form-field'; -import { MatIconModule } from '@angular/material/icon'; -import { MatInputModule } from '@angular/material/input'; -import { MatMenuModule } from '@angular/material/menu'; -import { MatProgressBarModule } from '@angular/material/progress-bar'; -import { MatTableModule } from '@angular/material/table'; - -import { StatusModule } from '@cc/app/shared/components'; -import { ChargebacksTableModule } from '@cc/app/shared/components/chargebacks-table'; - -import { - ChargebacksMainSearchFiltersModule, - ChargebacksOtherSearchFiltersModule, -} from './chargebacks-search-filters'; -import { PartyChargebacksRoutingModule } from './party-chargebacks-routing.module'; -import { PartyChargebacksComponent } from './party-chargebacks.component'; - -@NgModule({ - imports: [ - FlexModule, - MatCardModule, - MatProgressBarModule, - CommonModule, - MatButtonModule, - ReactiveFormsModule, - MatFormFieldModule, - MatInputModule, - MatTableModule, - MatMenuModule, - MatIconModule, - PartyChargebacksRoutingModule, - StatusModule, - ChargebacksTableModule, - MatBadgeModule, - ChargebacksMainSearchFiltersModule, - ChargebacksOtherSearchFiltersModule, - ], - declarations: [PartyChargebacksComponent], -}) -export class PartyChargebacksModule {} diff --git a/src/app/sections/party-claim/_party-claim-theme.scss b/src/app/sections/party-claim/_party-claim-theme.scss index fe9878f3..524269a2 100644 --- a/src/app/sections/party-claim/_party-claim-theme.scss +++ b/src/app/sections/party-claim/_party-claim-theme.scss @@ -1,9 +1,7 @@ @import './changeset/timeline-components/timeline-item-loading/timeline-item-loading-theme'; @import './party-claim-title/party-claim-title-theme'; -@import '../../shared/components/party-modifications-extractor/extract-party-modifications-theme'; @mixin cc-party-claim-theme($theme) { @include cc-party-claim-title-theme($theme); @include cc-timeline-item-loading-theme($theme); - @include cc-extract-party-modifications-theme($theme); } diff --git a/src/app/sections/party-claim/changeset/claim-changeset/claim-changeset.component.html b/src/app/sections/party-claim/changeset/claim-changeset/claim-changeset.component.html index b7d70e46..928991b3 100644 --- a/src/app/sections/party-claim/changeset/claim-changeset/claim-changeset.component.html +++ b/src/app/sections/party-claim/changeset/claim-changeset/claim-changeset.component.html @@ -30,13 +30,6 @@ (menuItemSelected)="menuItemSelected($event, i)" [menuConfig]="partyModMenuConfig" > - ([]); filteredChangesetInfos: ChangesetInfo[] = []; - constructor( - private claimChangesetService: ClaimChangesetService, - private partyModificationsExtractorService: PartyModificationsExtractorService - ) {} - - ngOnInit(): void { - this.partyModificationsExtractorService.init(); - } - - ngOnDestroy(): void { - this.partyModificationsExtractorService.destroy(); - } + constructor(private claimChangesetService: ClaimChangesetService) {} simpleTrackBy(index: number): number { return index; @@ -67,11 +48,6 @@ export class ClaimChangesetComponent implements OnInit, OnDestroy { } menuItemSelected($event: MenuConfigItem, i: number) { - this.claimChangesetService.menuItemSelected( - $event, - this.changesetInfos$.getValue(), - i, - this.partyID - ); + this.claimChangesetService.menuItemSelected($event, this.changesetInfos$.getValue(), i); } } diff --git a/src/app/sections/party-claim/changeset/claim-changeset/claim-changeset.module.ts b/src/app/sections/party-claim/changeset/claim-changeset/claim-changeset.module.ts index 2185ae41..1c2451ac 100644 --- a/src/app/sections/party-claim/changeset/claim-changeset/claim-changeset.module.ts +++ b/src/app/sections/party-claim/changeset/claim-changeset/claim-changeset.module.ts @@ -12,7 +12,6 @@ import { CommentTimelineItemModule } from '../timeline-items/comment-timeline-it import { CreatedTimelineItemModule } from '../timeline-items/created-timeline-item'; import { FileTimelineItemModule } from '../timeline-items/file-timeline-item/file-timeline-item.module'; import { PartyModificationTimelineItemModule } from '../timeline-items/party-modification-timeline-item/party-modification-timeline-item.module'; -import { QuestionaryTimelineItemModule } from '../timeline-items/questionary-timeline-item/questionary-timeline-item.module'; import { StatusTimelineItemModule } from '../timeline-items/status-timeline-item/status-timeline-item.module'; import { SaveClaimChangesetService } from '../unsaved-changeset/save-claim-changeset.service'; import { ClaimChangesetComponent } from './claim-changeset.component'; @@ -30,7 +29,6 @@ import { ClaimChangesetComponent } from './claim-changeset.component'; FileTimelineItemModule, CommentTimelineItemModule, PartyModificationTimelineItemModule, - QuestionaryTimelineItemModule, StatusTimelineItemModule, ], declarations: [ClaimChangesetComponent], diff --git a/src/app/sections/party-claim/changeset/claim-changeset/claim-changeset.service.ts b/src/app/sections/party-claim/changeset/claim-changeset/claim-changeset.service.ts index 47e4d78c..e87325fd 100644 --- a/src/app/sections/party-claim/changeset/claim-changeset/claim-changeset.service.ts +++ b/src/app/sections/party-claim/changeset/claim-changeset/claim-changeset.service.ts @@ -1,10 +1,5 @@ import { Injectable } from '@angular/core'; -import { first, map } from 'rxjs/operators'; -import { PartyModificationsExtractorService } from '@cc/app/shared/components'; - -import { Questionary } from '../../../../thrift-services/ank/gen-model/questionary_manager'; -import { PartyID } from '../../../../thrift-services/damsel/gen-model/domain'; import { ChangesetInfo } from '../changeset-infos'; import { MenuConfigAction, MenuConfigItem } from '../timeline-items/menu-config'; import { UnsavedClaimChangesetService } from '../unsaved-changeset/unsaved-claim-changeset.service'; @@ -13,27 +8,9 @@ import { createDeleteFileModification } from './create-delete-file-modification' @Injectable() export class ClaimChangesetService { - constructor( - private unsavedClaimChangesetService: UnsavedClaimChangesetService, - private partyModificationsExtractorService: PartyModificationsExtractorService - ) { - this.partyModificationsExtractorService.modsExtracted$ - .pipe( - map((mods) => - mods.map((partyModification) => ({ party_modification: partyModification })) - ) - ) - .subscribe((mods) => { - mods.forEach((mod) => this.unsavedClaimChangesetService.addModification(mod)); - }); - } + constructor(private unsavedClaimChangesetService: UnsavedClaimChangesetService) {} - menuItemSelected( - $event: MenuConfigItem, - changesetInfos: ChangesetInfo[], - index: number, - partyID: PartyID - ) { + menuItemSelected($event: MenuConfigItem, changesetInfos: ChangesetInfo[], index: number) { const changesetInfo = changesetInfos[index]; switch ($event.action) { case MenuConfigAction.deleteComment: @@ -46,19 +23,8 @@ export class ClaimChangesetService { createDeleteFileModification(changesetInfo) ); break; - case MenuConfigAction.extractPartyModifications: - this.extractPartyModifications($event.data, partyID); - break; default: console.warn('Unsupported method', $event); } } - - extractPartyModifications(questionary: Questionary, partyID: PartyID) { - this.unsavedClaimChangesetService.unsavedChangesetInfos$ - .pipe(first()) - .subscribe((unsaved) => { - this.partyModificationsExtractorService.extractMods(partyID, questionary, unsaved); - }); - } } diff --git a/src/app/sections/party-claim/changeset/timeline-items/menu-config.ts b/src/app/sections/party-claim/changeset/timeline-items/menu-config.ts index af5b79d0..2903d7ea 100644 --- a/src/app/sections/party-claim/changeset/timeline-items/menu-config.ts +++ b/src/app/sections/party-claim/changeset/timeline-items/menu-config.ts @@ -1,17 +1,14 @@ -import { Questionary } from '../../../../thrift-services/ank/gen-model/questionary_manager'; - export enum MenuConfigAction { /* eslint-disable @typescript-eslint/naming-convention */ editPartyModification = 'editPartyModification', deleteComment = 'deleteComment', deleteFile = 'deleteFile', removeUnsavedItem = 'removeUnsavedItem', - extractPartyModifications = 'extractPartyModifications', /* eslint-enable @typescript-eslint/naming-convention */ } export interface MenuConfigItem { action: MenuConfigAction; label: string; - data?: Questionary; + data?: any; } diff --git a/src/app/sections/party-claim/changeset/timeline-items/questionary-timeline-item/index.ts b/src/app/sections/party-claim/changeset/timeline-items/questionary-timeline-item/index.ts deleted file mode 100644 index 2dab1f4c..00000000 --- a/src/app/sections/party-claim/changeset/timeline-items/questionary-timeline-item/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './questionary-timeline-item.component'; -export * from './serial-number.pipe'; diff --git a/src/app/sections/party-claim/changeset/timeline-items/questionary-timeline-item/questionary-content/questionary-content.component.html b/src/app/sections/party-claim/changeset/timeline-items/questionary-timeline-item/questionary-content/questionary-content.component.html deleted file mode 100644 index 9e7226eb..00000000 --- a/src/app/sections/party-claim/changeset/timeline-items/questionary-timeline-item/questionary-content/questionary-content.component.html +++ /dev/null @@ -1,76 +0,0 @@ -
- - - - Contractor - - - - - - - Legal Entity - - - - - - - Individual Entity - - - - - - - Shop Info - - - - - - - Bank Account - - - - - - - Contact Info - - - - -
diff --git a/src/app/sections/party-claim/changeset/timeline-items/questionary-timeline-item/questionary-content/questionary-content.component.ts b/src/app/sections/party-claim/changeset/timeline-items/questionary-timeline-item/questionary-content/questionary-content.component.ts deleted file mode 100644 index 9a9484e9..00000000 --- a/src/app/sections/party-claim/changeset/timeline-items/questionary-timeline-item/questionary-content/questionary-content.component.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Component, Input } from '@angular/core'; -import get from 'lodash-es/get'; - -import { getUnionValue } from '@cc/utils/get-union-key'; - -import { Questionary } from '../../../../../../thrift-services/ank/gen-model/questionary_manager'; - -@Component({ - selector: 'cc-questionary-content', - templateUrl: 'questionary-content.component.html', -}) -export class QuestionaryContentComponent { - @Input() - questionary: Questionary; - - get entity() { - return getUnionValue(getUnionValue(get(this.questionary, ['data', 'contractor']))); - } -} diff --git a/src/app/sections/party-claim/changeset/timeline-items/questionary-timeline-item/questionary-timeline-item.component.html b/src/app/sections/party-claim/changeset/timeline-items/questionary-timeline-item/questionary-timeline-item.component.html deleted file mode 100644 index fb8458a3..00000000 --- a/src/app/sections/party-claim/changeset/timeline-items/questionary-timeline-item/questionary-timeline-item.component.html +++ /dev/null @@ -1,32 +0,0 @@ - - - -
- - - - -
-
- - - {{ 'add' }} - - - - - - -
diff --git a/src/app/sections/party-claim/changeset/timeline-items/questionary-timeline-item/questionary-timeline-item.component.ts b/src/app/sections/party-claim/changeset/timeline-items/questionary-timeline-item/questionary-timeline-item.component.ts deleted file mode 100644 index 544ed91c..00000000 --- a/src/app/sections/party-claim/changeset/timeline-items/questionary-timeline-item/questionary-timeline-item.component.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { Component, Input, OnInit } from '@angular/core'; -import { combineLatest, of, Subject } from 'rxjs'; -import { switchMap } from 'rxjs/operators'; - -import { PartyID } from '../../../../../thrift-services/damsel/gen-model/domain'; -import { ChangesetInfo } from '../../changeset-infos'; -import { MenuConfigAction, MenuConfigItem } from '../menu-config'; -import { TimelimeItemComponent } from '../timelime-item.component'; -import { QuestionaryTimelineItemService } from './questionary-timeline-item.service'; - -@Component({ - selector: 'cc-questionary-timeline-item', - templateUrl: 'questionary-timeline-item.component.html', - providers: [QuestionaryTimelineItemService], -}) -export class QuestionaryTimelineItemComponent extends TimelimeItemComponent implements OnInit { - @Input() - changesetInfo: ChangesetInfo; - - @Input() - partyID: PartyID; - - isLoading$ = this.questionaryTimelineItemService.isLoading$; - error$ = this.questionaryTimelineItemService.error$; - questionaryData$ = this.questionaryTimelineItemService.questionaryData$; - - private extractPartyMod$ = new Subject(); - - constructor(private questionaryTimelineItemService: QuestionaryTimelineItemService) { - super(); - } - - ngOnInit() { - this.questionaryTimelineItemService.getQuestionaryData( - this.changesetInfo.modification.claim_modification.document_modification.id, - this.partyID - ); - - this.extractPartyMod$ - .pipe(switchMap((item) => combineLatest([of(item), this.questionaryData$]))) - .subscribe(([item, questionary]) => { - this.menuItemSelected.emit({ ...item, data: questionary }); - }); - } - - action(item: MenuConfigItem) { - switch (item.action) { - case MenuConfigAction.extractPartyModifications: - this.extractPartyMod$.next(item); - break; - } - } -} diff --git a/src/app/sections/party-claim/changeset/timeline-items/questionary-timeline-item/questionary-timeline-item.module.ts b/src/app/sections/party-claim/changeset/timeline-items/questionary-timeline-item/questionary-timeline-item.module.ts deleted file mode 100644 index a66a4479..00000000 --- a/src/app/sections/party-claim/changeset/timeline-items/questionary-timeline-item/questionary-timeline-item.module.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { CommonModule } from '@angular/common'; -import { NgModule } from '@angular/core'; -import { FlexModule } from '@angular/flex-layout'; -import { MatButtonModule } from '@angular/material/button'; -import { MatExpansionModule } from '@angular/material/expansion'; -import { MatIconModule } from '@angular/material/icon'; -import { MatMenuModule } from '@angular/material/menu'; - -import { PartyModificationsExtractorModule } from '@cc/app/shared/components'; -import { PrettyJsonModule } from '@cc/components/pretty-json'; -import { TimelineModule } from '@cc/components/timeline'; - -import { AnkModule } from '../../../../../thrift-services/ank'; -import { TimelineComponentsModule } from '../../timeline-components'; -import { CommentTimelineItemModule } from '../comment-timeline-item/comment-timeline-item.module'; -import { QuestionaryContentComponent } from './questionary-content/questionary-content.component'; -import { QuestionaryTimelineItemComponent } from './questionary-timeline-item.component'; -import { SerialNumberPipe } from './serial-number.pipe'; - -@NgModule({ - declarations: [QuestionaryTimelineItemComponent, QuestionaryContentComponent, SerialNumberPipe], - imports: [ - AnkModule, - TimelineModule, - CommentTimelineItemModule, - MatButtonModule, - MatIconModule, - MatMenuModule, - FlexModule, - CommonModule, - MatExpansionModule, - TimelineComponentsModule, - PartyModificationsExtractorModule, - PrettyJsonModule, - ], - exports: [QuestionaryTimelineItemComponent], -}) -export class QuestionaryTimelineItemModule {} diff --git a/src/app/sections/party-claim/changeset/timeline-items/questionary-timeline-item/questionary-timeline-item.service.ts b/src/app/sections/party-claim/changeset/timeline-items/questionary-timeline-item/questionary-timeline-item.service.ts deleted file mode 100644 index 26c44f93..00000000 --- a/src/app/sections/party-claim/changeset/timeline-items/questionary-timeline-item/questionary-timeline-item.service.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { Injectable } from '@angular/core'; -import { merge, Observable, of, Subject } from 'rxjs'; -import { catchError, pluck, shareReplay, switchMap } from 'rxjs/operators'; - -import { progress } from '@cc/app/shared/custom-operators'; - -import { AnkService } from '../../../../../thrift-services/ank/ank.service'; -import { - Questionary, - QuestionaryID, -} from '../../../../../thrift-services/ank/gen-model/questionary_manager'; -import { PartyID } from '../../../../../thrift-services/damsel/gen-model/domain'; - -@Injectable() -export class QuestionaryTimelineItemService { - private getQuestionaryData$ = new Subject<{ questionaryID: QuestionaryID; partyID: PartyID }>(); - private hasError$ = new Subject(); - - // eslint-disable-next-line @typescript-eslint/member-ordering - questionaryData$: Observable = this.getQuestionaryData$.pipe( - switchMap(({ questionaryID, partyID }) => - this.ankService.get(questionaryID, partyID).pipe( - catchError((e) => { - this.hasError$.next(e); - return of(e); - }) - ) - ), - pluck('questionary'), - shareReplay(1) - ); - - // eslint-disable-next-line @typescript-eslint/member-ordering - error$ = this.hasError$.asObservable(); - - // eslint-disable-next-line @typescript-eslint/member-ordering - isLoading$ = progress(this.getQuestionaryData$, merge(this.questionaryData$, this.hasError$)); - - constructor(private ankService: AnkService) { - this.questionaryData$.subscribe(); - } - - getQuestionaryData(questionaryID: QuestionaryID, partyID: PartyID) { - this.getQuestionaryData$.next({ questionaryID, partyID }); - } -} diff --git a/src/app/sections/party-claim/changeset/timeline-items/questionary-timeline-item/serial-number.pipe.ts b/src/app/sections/party-claim/changeset/timeline-items/questionary-timeline-item/serial-number.pipe.ts deleted file mode 100644 index 678737ed..00000000 --- a/src/app/sections/party-claim/changeset/timeline-items/questionary-timeline-item/serial-number.pipe.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Pipe, PipeTransform } from '@angular/core'; - -@Pipe({ - name: 'serialNumber', -}) -export class SerialNumberPipe implements PipeTransform { - transform(idx: number, count?: number): string { - return count > 1 ? `#${idx + 1}` : ''; - } -} diff --git a/src/app/sections/party-claim/changeset/unsaved-changeset/unsaved-claim-changeset.component.html b/src/app/sections/party-claim/changeset/unsaved-changeset/unsaved-claim-changeset.component.html index 5c8527a4..b729f7e4 100644 --- a/src/app/sections/party-claim/changeset/unsaved-changeset/unsaved-claim-changeset.component.html +++ b/src/app/sections/party-claim/changeset/unsaved-changeset/unsaved-claim-changeset.component.html @@ -31,13 +31,6 @@ (menuItemSelected)="menuItemSelected($event, i)" [menuConfig]="partyModMenuConfig" > - m.PaymentRoutingRulesModule ), }, - { - path: 'chargebacks', - loadChildren: () => - import('../party-chargebacks').then((m) => m.PartyChargebacksModule), - }, - { - path: 'invoice/:invoiceID/payment/:paymentID/chargeback/:chargebackID', - loadChildren: () => - import('../chargeback-details').then((m) => m.ChargebackDetailsModule), - }, { path: '', redirectTo: 'payments', pathMatch: 'full' }, ], }, diff --git a/src/app/sections/party/party.component.ts b/src/app/sections/party/party.component.ts index 95f77f3c..6a713813 100644 --- a/src/app/sections/party/party.component.ts +++ b/src/app/sections/party/party.component.ts @@ -5,7 +5,6 @@ import { catchError, filter, map, pluck, shareReplay, startWith, switchMap } fro import { AppAuthGuardService, - ChargebackRole, ClaimManagementRole, DomainConfigRole, OperationRole, @@ -74,12 +73,6 @@ export class PartyComponent { url: 'payment-routing-rules', activateRoles: [DomainConfigRole.Checkout], }, - { - name: 'Chargebacks', - url: 'chargebacks', - otherActiveUrlFragments: ['payment', 'invoice', 'chargeback'], - activateRoles: [ChargebackRole.View], - }, ]; return links.filter((item) => this.appAuthGuardService.userHasRoles(item.activateRoles)); } diff --git a/src/app/sections/payment-details/payment-details.component.html b/src/app/sections/payment-details/payment-details.component.html index 6e4af4b8..ecfbcdae 100644 --- a/src/app/sections/payment-details/payment-details.component.html +++ b/src/app/sections/payment-details/payment-details.component.html @@ -18,24 +18,6 @@ > - -
-

Chargebacks

- -
- -
diff --git a/src/app/sections/payment-details/payment-details.component.ts b/src/app/sections/payment-details/payment-details.component.ts index 0b1c241f..68f10a94 100644 --- a/src/app/sections/payment-details/payment-details.component.ts +++ b/src/app/sections/payment-details/payment-details.component.ts @@ -1,13 +1,8 @@ import { ChangeDetectionStrategy, Component } from '@angular/core'; -import { MatDialog } from '@angular/material/dialog'; import { ActivatedRoute } from '@angular/router'; -import { merge, Subject } from 'rxjs'; -import { map, pluck, shareReplay, switchMap, take, withLatestFrom } from 'rxjs/operators'; +import { Subject } from 'rxjs'; +import { pluck, shareReplay } from 'rxjs/operators'; -import { CreateChargebackDialogComponent } from '@cc/app/shared/components/create-chargeback-dialog'; -import { AppAuthGuardService, ChargebackRole } from '@cc/app/shared/services'; - -import { ChargebacksParams } from '../../query-dsl'; import { PaymentDetailsService } from './payment-details.service'; @Component({ @@ -21,40 +16,9 @@ export class PaymentDetailsComponent { isLoading$ = this.paymentDetailsService.isLoading$; shop$ = this.paymentDetailsService.shop$; updateSearchParams$ = new Subject(); - chargebackSearchParams$ = merge( - this.payment$, - this.updateSearchParams$.pipe(withLatestFrom(this.payment$, (_, p) => p)) - ).pipe( - map(({ id, invoice_id }) => ({ invoice_id, payment_id: id } as ChargebacksParams)), - shareReplay(1) - ); - - chargebackRole = ChargebackRole; constructor( private paymentDetailsService: PaymentDetailsService, - private route: ActivatedRoute, - private dialog: MatDialog, - private appAuthGuardService: AppAuthGuardService + private route: ActivatedRoute ) {} - - createChargeback() { - this.payment$ - .pipe( - take(1), - switchMap(({ id: paymentID, invoice_id: invoiceID }) => - this.dialog - .open(CreateChargebackDialogComponent, { - ...CreateChargebackDialogComponent.defaultConfig, - data: { invoiceID, paymentID }, - }) - .afterClosed() - ) - ) - .subscribe(() => this.updateSearchParams$.next()); - } - - userHasRole(role: ChargebackRole): boolean { - return this.appAuthGuardService.userHasRoles([role]); - } } diff --git a/src/app/sections/payment-details/payment-details.module.ts b/src/app/sections/payment-details/payment-details.module.ts index aa95b6db..7b80023c 100644 --- a/src/app/sections/payment-details/payment-details.module.ts +++ b/src/app/sections/payment-details/payment-details.module.ts @@ -7,8 +7,6 @@ import { MatDialogModule } from '@angular/material/dialog'; import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; import { StatusModule } from '@cc/app/shared/components'; -import { ChargebacksTableModule } from '@cc/app/shared/components/chargebacks-table'; -import { CreateChargebackDialogModule } from '@cc/app/shared/components/create-chargeback-dialog'; import { DetailsItemModule } from '@cc/components/details-item'; import { HeadlineModule } from '@cc/components/headline'; @@ -30,10 +28,8 @@ import { PaymentRefundsModule } from './payment-refunds'; PaymentToolModule, MatProgressSpinnerModule, PaymentMainInfoModule, - ChargebacksTableModule, MatButtonModule, MatDialogModule, - CreateChargebackDialogModule, PaymentRefundsModule, ], declarations: [PaymentDetailsComponent], diff --git a/src/app/sections/payment-details/payment-refunds/refunds-search-params.ts b/src/app/sections/payment-details/payment-refunds/refunds-search-params.ts index d89ae3e2..25dcb292 100644 --- a/src/app/sections/payment-details/payment-refunds/refunds-search-params.ts +++ b/src/app/sections/payment-details/payment-refunds/refunds-search-params.ts @@ -1,4 +1,3 @@ -import { OwnerID } from '../../../thrift-services/ank/gen-model/questionary_manager'; import { InvoiceID, InvoicePaymentID, @@ -11,7 +10,7 @@ export interface RefundsSearchParams { invoiceID?: InvoiceID; id?: InvoicePaymentRefundID; paymentID?: InvoicePaymentID; - ownerID?: OwnerID; + ownerID?: string; shopID?: ShopID; status?: InvoicePaymentRefundStatus; createdAt?: string; diff --git a/src/app/sections/search-claims/search-table/search-table.component.ts b/src/app/sections/search-claims/search-table/search-table.component.ts index d6dfbc85..995a96c5 100644 --- a/src/app/sections/search-claims/search-table/search-table.component.ts +++ b/src/app/sections/search-claims/search-table/search-table.component.ts @@ -24,11 +24,6 @@ export class SearchTableComponent { constructor(private router: Router) {} - // FR-688 - // navigateToClaimDeprecated(partyID: string, claimID: number) { - // this.router.navigate([`/claim-mgt/party/${partyID}/claim/${claimID}`]); - // } - navigateToPartyClaims(partyId: string) { this.router.navigate([`/party/${partyId}/claims`]); } diff --git a/src/app/shared/components/chargebacks-table/chargebacks-table.component.html b/src/app/shared/components/chargebacks-table/chargebacks-table.component.html deleted file mode 100644 index 9abe2b83..00000000 --- a/src/app/shared/components/chargebacks-table/chargebacks-table.component.html +++ /dev/null @@ -1,73 +0,0 @@ -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Created At - {{ chargeback.created_at | date: 'dd.MM.yyyy HH:mm:ss' }} - Status - {{ chargeback.chargeback_status | ccMapUnion: mapStatus }} - Stage - {{ chargeback.stage | ccMapUnion: mapStage }} - Levy Amount - {{ chargeback.levy_amount | ccFormatAmount }} - {{ chargeback.levy_currency_code.symbolic_code | ccCurrency }} - Shop - {{ chargeback.shop_id | shopName: partyID }} - - - - - -
- -
- -
- -
- - - -
diff --git a/src/app/shared/components/chargebacks-table/chargebacks-table.component.scss b/src/app/shared/components/chargebacks-table/chargebacks-table.component.scss deleted file mode 100644 index 15a9b19c..00000000 --- a/src/app/shared/components/chargebacks-table/chargebacks-table.component.scss +++ /dev/null @@ -1,7 +0,0 @@ -:host { - display: block; -} - -.action-cell { - width: 8px; -} diff --git a/src/app/shared/components/chargebacks-table/chargebacks-table.component.ts b/src/app/shared/components/chargebacks-table/chargebacks-table.component.ts deleted file mode 100644 index 635ed625..00000000 --- a/src/app/shared/components/chargebacks-table/chargebacks-table.component.ts +++ /dev/null @@ -1,73 +0,0 @@ -import { ChangeDetectionStrategy, Component, Input, OnChanges, OnInit } from '@angular/core'; -import { MatSnackBar } from '@angular/material/snack-bar'; -import { Router } from '@angular/router'; - -import { ChargebacksParams } from '../../../query-dsl'; -import { - InvoicePaymentChargebackStage, - InvoicePaymentChargebackStatus, -} from '../../../thrift-services/damsel/gen-model/domain'; -import { StatChargeback } from '../../../thrift-services/damsel/gen-model/merch_stat'; -import { ComponentChanges } from '../../utils/component-changes'; -import { FetchChargebacksService } from './fetch-chargebacks.service'; - -@Component({ - selector: 'cc-chargebacks-table', - templateUrl: 'chargebacks-table.component.html', - styleUrls: ['chargebacks-table.component.scss'], - changeDetection: ChangeDetectionStrategy.OnPush, -}) -export class ChargebacksTableComponent implements OnInit, OnChanges { - @Input() partyID: string; - @Input() searchParams: ChargebacksParams; - @Input() displayedColumns = ['createdAt', 'status', 'stage', 'levyAmount', 'shop', 'actions']; - - chargebacks$ = this.fetchChargebacksService.searchResult$; - doAction$ = this.fetchChargebacksService.doAction$; - isLoading$ = this.fetchChargebacksService.isLoading$; - hasMore$ = this.fetchChargebacksService.hasMore$; - - mapStatus: { [N in keyof InvoicePaymentChargebackStatus] } = { - accepted: 'Accepted', - cancelled: 'Cancelled', - pending: 'Pending', - rejected: 'Rejected', - }; - - mapStage: { [N in keyof InvoicePaymentChargebackStage] } = { - arbitration: 'Arbitration', - chargeback: 'Chargeback', - pre_arbitration: 'Pre-arbitration', - }; - - constructor( - private router: Router, - private fetchChargebacksService: FetchChargebacksService, - private snackBar: MatSnackBar - ) {} - - ngOnInit() { - this.fetchChargebacksService.errors$.subscribe((e) => - this.snackBar.open(`An error occurred while search chargebacks (${e})`, 'OK') - ); - } - - ngOnChanges({ searchParams }: ComponentChanges) { - if (searchParams) { - this.fetchChargebacksService.search({ - ...searchParams.currentValue, - merchant_id: this.partyID, - }); - } - } - - navigateToChargeback({ chargeback_id, invoice_id, payment_id }: StatChargeback) { - this.router.navigate([ - `/party/${this.partyID}/invoice/${invoice_id}/payment/${payment_id}/chargeback/${chargeback_id}`, - ]); - } - - fetchMore() { - this.fetchChargebacksService.fetchMore(); - } -} diff --git a/src/app/shared/components/chargebacks-table/chargebacks-table.module.ts b/src/app/shared/components/chargebacks-table/chargebacks-table.module.ts deleted file mode 100644 index ee7fa2a2..00000000 --- a/src/app/shared/components/chargebacks-table/chargebacks-table.module.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { CommonModule } from '@angular/common'; -import { NgModule } from '@angular/core'; -import { FlexModule } from '@angular/flex-layout'; -import { MatButtonModule } from '@angular/material/button'; -import { MatIconModule } from '@angular/material/icon'; -import { MatMenuModule } from '@angular/material/menu'; -import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; -import { MatSnackBarModule } from '@angular/material/snack-bar'; -import { MatTableModule } from '@angular/material/table'; - -import { EmptySearchResultModule } from '@cc/components/empty-search-result'; - -import { - ApiModelPipesModule, - CommonPipesModule, - StatusModule, - ThriftPipesModule, -} from '../../../shared'; -import { ChargebacksTableComponent } from './chargebacks-table.component'; -import { FetchChargebacksService } from './fetch-chargebacks.service'; - -@NgModule({ - imports: [ - CommonModule, - MatTableModule, - FlexModule, - StatusModule, - MatButtonModule, - MatIconModule, - MatMenuModule, - MatProgressSpinnerModule, - EmptySearchResultModule, - MatSnackBarModule, - ThriftPipesModule, - CommonPipesModule, - ApiModelPipesModule, - ], - declarations: [ChargebacksTableComponent], - exports: [ChargebacksTableComponent], - providers: [FetchChargebacksService], -}) -export class ChargebacksTableModule {} diff --git a/src/app/shared/components/chargebacks-table/fetch-chargebacks.service.ts b/src/app/shared/components/chargebacks-table/fetch-chargebacks.service.ts deleted file mode 100644 index 9e430cb3..00000000 --- a/src/app/shared/components/chargebacks-table/fetch-chargebacks.service.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { Injectable } from '@angular/core'; -import pickBy from 'lodash-es/pickBy'; -import moment from 'moment'; -import { Observable } from 'rxjs'; -import { map, shareReplay } from 'rxjs/operators'; - -import { FetchResult, PartialFetcher } from '@cc/app/shared/services'; -import { booleanDelay } from '@cc/utils/boolean-delay'; - -import { ChargebacksParams, createDsl } from '../../../query-dsl'; -import { StatChargeback } from '../../../thrift-services/damsel/gen-model/merch_stat'; -import { MerchantStatisticsService } from '../../../thrift-services/damsel/merchant-statistics.service'; - -const SEARCH_LIMIT = 10; - -@Injectable() -export class FetchChargebacksService extends PartialFetcher { - isLoading$ = this.doAction$.pipe(booleanDelay(), shareReplay(1)); - - constructor(private merchantStatisticsService: MerchantStatisticsService) { - super(); - } - - protected fetch( - { from_time, to_time, ...params }: ChargebacksParams, - continuationToken: string - ): Observable> { - return this.merchantStatisticsService - .getChargebacks({ - dsl: createDsl({ - chargebacks: Object.assign( - pickBy(params, (v) => (Array.isArray(v) ? v.length : v)), - !!from_time && { from_time: moment(from_time).utc().format() }, - !!to_time && { to_time: moment(to_time).utc().format() }, - { - size: SEARCH_LIMIT, - } - ), - }), - ...(!!continuationToken && { continuation_token: continuationToken }), - }) - .pipe( - map(({ data, continuation_token }) => ({ - result: data.chargebacks, - continuationToken: continuation_token, - })) - ); - } -} diff --git a/src/app/shared/components/chargebacks-table/index.ts b/src/app/shared/components/chargebacks-table/index.ts deleted file mode 100644 index 0579d44f..00000000 --- a/src/app/shared/components/chargebacks-table/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './chargebacks-table.component'; -export * from './chargebacks-table.module'; diff --git a/src/app/shared/components/create-chargeback-dialog/create-chargeback-dialog.component.html b/src/app/shared/components/create-chargeback-dialog/create-chargeback-dialog.component.html deleted file mode 100644 index d0f8c0f4..00000000 --- a/src/app/shared/components/create-chargeback-dialog/create-chargeback-dialog.component.html +++ /dev/null @@ -1,45 +0,0 @@ -
-

Create chargeback params

- -
- - - - - - - Levy amount - - -
- - -

Reason (optional)

-
- - Category - - - {{ c }} - - - - - Code (optional) - - -
-
- - - - -
diff --git a/src/app/shared/components/create-chargeback-dialog/create-chargeback-dialog.component.ts b/src/app/shared/components/create-chargeback-dialog/create-chargeback-dialog.component.ts deleted file mode 100644 index 06cafbd0..00000000 --- a/src/app/shared/components/create-chargeback-dialog/create-chargeback-dialog.component.ts +++ /dev/null @@ -1,76 +0,0 @@ -import { ChangeDetectionStrategy, Component, Inject } from '@angular/core'; -import { FormBuilder } from '@angular/forms'; -import { MatDialogConfig, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; -import { MatSnackBar } from '@angular/material/snack-bar'; -import { Moment } from 'moment'; -import * as short from 'short-uuid'; - -import { toMinor } from '@cc/utils/index'; - -import { InvoicePaymentChargebackCategory } from '../../../thrift-services/damsel/gen-model/domain'; -import { PaymentProcessingService } from '../../../thrift-services/damsel/payment-processing.service'; - -@Component({ - selector: 'cc-create-chargeback-dialog', - templateUrl: 'create-chargeback-dialog.component.html', - changeDetection: ChangeDetectionStrategy.OnPush, -}) -export class CreateChargebackDialogComponent { - static defaultConfig: MatDialogConfig = { - disableClose: true, - width: '552px', - }; - - form = this.fb.group({ - date: '', - leavyAmount: '', - category: '', - code: '', - }); - categories: (keyof InvoicePaymentChargebackCategory)[] = [ - 'authorisation', - 'dispute', - 'fraud', - 'processing_error', - ]; - - constructor( - private paymentProcessingService: PaymentProcessingService, - private fb: FormBuilder, - @Inject(MAT_DIALOG_DATA) - public params: { - invoiceID: string; - paymentID: string; - }, - private dialogRef: MatDialogRef, - private snackBar: MatSnackBar - ) {} - - create() { - const { leavyAmount, code, category, date } = this.form.value; - this.paymentProcessingService - .createChargeback(this.params.invoiceID, this.params.paymentID, { - id: short().new(), - occurred_at: (date as Moment).utc().format(), - reason: { - code, - category: { [category]: {} }, - }, - levy: { - amount: toMinor(leavyAmount) as any, - currency: { symbolic_code: 'RUB' }, - }, - }) - .subscribe( - () => this.dialogRef.close(), - (error) => { - console.error(error); - this.snackBar.open('An error occurred while chargeback creating', 'OK'); - } - ); - } - - cancel() { - this.dialogRef.close(); - } -} diff --git a/src/app/shared/components/create-chargeback-dialog/create-chargeback-dialog.module.ts b/src/app/shared/components/create-chargeback-dialog/create-chargeback-dialog.module.ts deleted file mode 100644 index dcc23d23..00000000 --- a/src/app/shared/components/create-chargeback-dialog/create-chargeback-dialog.module.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { CommonModule } from '@angular/common'; -import { NgModule } from '@angular/core'; -import { FlexModule } from '@angular/flex-layout'; -import { ReactiveFormsModule } from '@angular/forms'; -import { MatButtonModule } from '@angular/material/button'; -import { MatDatepickerModule } from '@angular/material/datepicker'; -import { MatDialogModule } from '@angular/material/dialog'; -import { MatDividerModule } from '@angular/material/divider'; -import { MatFormFieldModule } from '@angular/material/form-field'; -import { MatInputModule } from '@angular/material/input'; -import { MatSelectModule } from '@angular/material/select'; -import { MatSnackBarModule } from '@angular/material/snack-bar'; - -import { DamselModule } from '../../../thrift-services/damsel'; -import { CreateChargebackDialogComponent } from './create-chargeback-dialog.component'; - -const EXPORTED_DECLARATIONS = [CreateChargebackDialogComponent]; - -@NgModule({ - imports: [ - CommonModule, - FlexModule, - ReactiveFormsModule, - MatFormFieldModule, - MatInputModule, - MatDialogModule, - DamselModule, - MatDividerModule, - MatSelectModule, - MatDatepickerModule, - MatButtonModule, - MatSnackBarModule, - ], - declarations: EXPORTED_DECLARATIONS, - exports: EXPORTED_DECLARATIONS, -}) -export class CreateChargebackDialogModule {} diff --git a/src/app/shared/components/create-chargeback-dialog/index.ts b/src/app/shared/components/create-chargeback-dialog/index.ts deleted file mode 100644 index 6076e955..00000000 --- a/src/app/shared/components/create-chargeback-dialog/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './create-chargeback-dialog.component'; -export * from './create-chargeback-dialog.module'; diff --git a/src/app/shared/components/index.ts b/src/app/shared/components/index.ts index 9ae9446c..4350696f 100644 --- a/src/app/shared/components/index.ts +++ b/src/app/shared/components/index.ts @@ -1,9 +1,7 @@ export * from './claim-search-form'; export * from './party-modification-creator'; export * from './party-modification-forms'; -export * from './party-modifications-extractor'; export * from './payments-search-filters'; export * from './payments-table'; -export * from './questionary-document'; export * from './payments-searcher'; export * from './status'; diff --git a/src/app/shared/components/party-modifications-extractor/_extract-party-modifications-theme.scss b/src/app/shared/components/party-modifications-extractor/_extract-party-modifications-theme.scss deleted file mode 100644 index f4d8a80c..00000000 --- a/src/app/shared/components/party-modifications-extractor/_extract-party-modifications-theme.scss +++ /dev/null @@ -1,5 +0,0 @@ -@import './contractor-selector/contractors-table/contractors-table-theme'; - -@mixin cc-extract-party-modifications-theme($theme) { - @include cc-contractors-table($theme); -} diff --git a/src/app/shared/components/party-modifications-extractor/contractor-selector/action-type.ts b/src/app/shared/components/party-modifications-extractor/contractor-selector/action-type.ts deleted file mode 100644 index c6d5f397..00000000 --- a/src/app/shared/components/party-modifications-extractor/contractor-selector/action-type.ts +++ /dev/null @@ -1,4 +0,0 @@ -export enum ActionType { - AttachNew = 'attachNew', - Attach = 'attach', -} diff --git a/src/app/shared/components/party-modifications-extractor/contractor-selector/contractor-selector.component.html b/src/app/shared/components/party-modifications-extractor/contractor-selector/contractor-selector.component.html deleted file mode 100644 index a988078b..00000000 --- a/src/app/shared/components/party-modifications-extractor/contractor-selector/contractor-selector.component.html +++ /dev/null @@ -1,25 +0,0 @@ -
-
Contractor
- - {{ item | ccSelectorType }} - - - -
- - - -
-
- - - -
diff --git a/src/app/shared/components/party-modifications-extractor/contractor-selector/contractor-selector.component.ts b/src/app/shared/components/party-modifications-extractor/contractor-selector/contractor-selector.component.ts deleted file mode 100644 index cbca9a12..00000000 --- a/src/app/shared/components/party-modifications-extractor/contractor-selector/contractor-selector.component.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { Component, Input, OnInit } from '@angular/core'; -import { FormControl, FormGroup, Validators } from '@angular/forms'; -import { MatRadioChange } from '@angular/material/radio'; - -import { ChangesetInfo } from '../../../../sections/party-claim/changeset/changeset-infos'; -import { PartyID } from '../../../../thrift-services/damsel/gen-model/domain'; -import { ActionType } from './action-type'; - -@Component({ - selector: 'cc-contractor-selector', - templateUrl: 'contractor-selector.component.html', -}) -export class ContractorSelectorComponent implements OnInit { - @Input() - partyID: PartyID; - - @Input() - contractorForm: FormGroup; - - @Input() - unsaved?: ChangesetInfo[]; - - actionType = ActionType; - actionTypes = [ActionType.AttachNew, ActionType.Attach]; - selectedTarget = ActionType.AttachNew; - - targetChanges($event: MatRadioChange) { - this.selectedTarget = $event.value; - } - - ngOnInit(): void { - this.contractorForm.registerControl('id', new FormControl('', [Validators.required])); - } -} diff --git a/src/app/shared/components/party-modifications-extractor/contractor-selector/contractor-selector.module.ts b/src/app/shared/components/party-modifications-extractor/contractor-selector/contractor-selector.module.ts deleted file mode 100644 index 6f4cc9db..00000000 --- a/src/app/shared/components/party-modifications-extractor/contractor-selector/contractor-selector.module.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { CommonModule } from '@angular/common'; -import { NgModule } from '@angular/core'; -import { FlexModule } from '@angular/flex-layout'; -import { ReactiveFormsModule } from '@angular/forms'; -import { MatCheckboxModule } from '@angular/material/checkbox'; -import { MatFormFieldModule } from '@angular/material/form-field'; -import { MatInputModule } from '@angular/material/input'; -import { MatPaginatorModule } from '@angular/material/paginator'; -import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; -import { MatRadioModule } from '@angular/material/radio'; -import { MatTableModule } from '@angular/material/table'; - -import { PrettyJsonModule } from '@cc/components/pretty-json'; - -import { ContractorSelectorComponent } from './contractor-selector.component'; -import { ContractorsTableComponent } from './contractors-table/contractors-table.component'; -import { SelectorTypePipe } from './selector-type.pipe'; - -@NgModule({ - imports: [ - FlexModule, - MatRadioModule, - CommonModule, - ReactiveFormsModule, - MatFormFieldModule, - MatInputModule, - MatProgressSpinnerModule, - MatCheckboxModule, - MatTableModule, - MatPaginatorModule, - PrettyJsonModule, - ], - exports: [ContractorSelectorComponent], - declarations: [ContractorSelectorComponent, SelectorTypePipe, ContractorsTableComponent], -}) -export class ContractorSelectorModule {} diff --git a/src/app/shared/components/party-modifications-extractor/contractor-selector/contractors-table/_contractors-table-theme.scss b/src/app/shared/components/party-modifications-extractor/contractor-selector/contractors-table/_contractors-table-theme.scss deleted file mode 100644 index 0a43c16d..00000000 --- a/src/app/shared/components/party-modifications-extractor/contractor-selector/contractors-table/_contractors-table-theme.scss +++ /dev/null @@ -1,5 +0,0 @@ -@mixin cc-contractors-table($theme) { - .cc-contractors-table-unsaved { - color: map-get($theme, red); - } -} diff --git a/src/app/shared/components/party-modifications-extractor/contractor-selector/contractors-table/changeset-infos-to-selectable-items.ts b/src/app/shared/components/party-modifications-extractor/contractor-selector/contractors-table/changeset-infos-to-selectable-items.ts deleted file mode 100644 index d196cad2..00000000 --- a/src/app/shared/components/party-modifications-extractor/contractor-selector/contractors-table/changeset-infos-to-selectable-items.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { ChangesetInfo } from '../../../../../sections/party-claim/changeset/changeset-infos'; -import { SelectableItem } from '../selectable-item'; - -export const changesetInfosToSelectableItems = (infos: ChangesetInfo[]): SelectableItem[] => - infos - .map((info) => info.modification) - .filter((info) => info.party_modification?.contractor_modification?.modification?.creation) - .map((info) => { - const { id, modification } = info.party_modification.contractor_modification; - return { - id, - data: modification.creation, - unsaved: true, - }; - }); diff --git a/src/app/shared/components/party-modifications-extractor/contractor-selector/contractors-table/contractors-table.component.html b/src/app/shared/components/party-modifications-extractor/contractor-selector/contractors-table/contractors-table.component.html deleted file mode 100644 index 9b9e079f..00000000 --- a/src/app/shared/components/party-modifications-extractor/contractor-selector/contractors-table/contractors-table.component.html +++ /dev/null @@ -1,59 +0,0 @@ -
-
- -
-
-
- - - -
-
- - - - - - - - - - - - - - - - -
- - ID - {{ item.id }} - {{ - item.unsaved ? '*' : '' - }} - Data - -
-
-
- -
- * — unsaved -
-
diff --git a/src/app/shared/components/party-modifications-extractor/contractor-selector/contractors-table/contractors-table.component.scss b/src/app/shared/components/party-modifications-extractor/contractor-selector/contractors-table/contractors-table.component.scss deleted file mode 100644 index 7d2d3f1c..00000000 --- a/src/app/shared/components/party-modifications-extractor/contractor-selector/contractors-table/contractors-table.component.scss +++ /dev/null @@ -1,24 +0,0 @@ -table { - overflow: auto; -} - -.mat-column-select, -.mat-column-id { - padding-left: 8px; - padding-right: 16px; -} - -.mat-column-id { - min-width: 275px; -} - -.mat-column-data { - padding-left: 16px; - white-space: nowrap; -} - -.table-container { - width: 100%; - max-width: 735px; - overflow: auto; -} diff --git a/src/app/shared/components/party-modifications-extractor/contractor-selector/contractors-table/contractors-table.component.ts b/src/app/shared/components/party-modifications-extractor/contractor-selector/contractors-table/contractors-table.component.ts deleted file mode 100644 index d143dcda..00000000 --- a/src/app/shared/components/party-modifications-extractor/contractor-selector/contractors-table/contractors-table.component.ts +++ /dev/null @@ -1,66 +0,0 @@ -import { Component, Input, OnInit, QueryList, ViewChildren } from '@angular/core'; -import { FormGroup } from '@angular/forms'; -import { MatCheckboxChange } from '@angular/material/checkbox'; -import { MatPaginator } from '@angular/material/paginator'; -import { MatTableDataSource } from '@angular/material/table'; - -import { getUnionValue } from '@cc/utils/get-union-key'; - -import { ChangesetInfo } from '../../../../../sections/party-claim/changeset/changeset-infos'; -import { PartyID } from '../../../../../thrift-services/damsel/gen-model/domain'; -import { SelectableItem } from '../selectable-item'; -import { ContractorsTableService } from './contractors-table.service'; -import { itemsFilterPredicate } from './items-filter-predicate'; - -@Component({ - selector: 'cc-contractors-table', - styleUrls: ['contractors-table.component.scss'], - templateUrl: 'contractors-table.component.html', - providers: [ContractorsTableService], -}) -export class ContractorsTableComponent implements OnInit { - @Input() - partyID: PartyID; - - @Input() - contractorForm: FormGroup; - - @Input() - unsaved?: ChangesetInfo[]; - - dataSource: MatTableDataSource = new MatTableDataSource(); - - inProgress$ = this.contractorsTableService.inProgress$; - displayedColumns = ['select', 'id', 'data']; - - @ViewChildren('paginator') paginator: QueryList; - - constructor(private contractorsTableService: ContractorsTableService) { - this.contractorsTableService.selectableItems$.subscribe((contractors) => { - this.dataSource = new MatTableDataSource(contractors); - this.dataSource.paginator = this.paginator.first; - this.dataSource.filterPredicate = itemsFilterPredicate; - }); - } - - change(item: SelectableItem, change: MatCheckboxChange) { - for (const selectedItem of this.dataSource.data) { - selectedItem.checked = false; - } - item.checked = change.checked; - const id = change.checked ? item.id : ''; - this.contractorForm.setValue({ id }); - } - - ngOnInit(): void { - this.contractorsTableService.getContractors(this.partyID, this.unsaved); - } - - applyFilter(filterValue: string) { - this.dataSource.filter = filterValue.trim().toLowerCase(); - } - - expandData(item: any) { - return getUnionValue(getUnionValue(item.data)); - } -} diff --git a/src/app/shared/components/party-modifications-extractor/contractor-selector/contractors-table/contractors-table.service.ts b/src/app/shared/components/party-modifications-extractor/contractor-selector/contractors-table/contractors-table.service.ts deleted file mode 100644 index 70d1870d..00000000 --- a/src/app/shared/components/party-modifications-extractor/contractor-selector/contractors-table/contractors-table.service.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { Injectable } from '@angular/core'; -import { MatSnackBar } from '@angular/material/snack-bar'; -import { combineLatest, merge, Observable, of, Subject } from 'rxjs'; -import { catchError, filter, map, switchMap } from 'rxjs/operators'; - -import { progress } from '@cc/app/shared/custom-operators'; - -import { PartyService } from '../../../../../papi/party.service'; -import { ChangesetInfo } from '../../../../../sections/party-claim/changeset/changeset-infos'; -import { PartyID } from '../../../../../thrift-services/damsel/gen-model/domain'; -import { SelectableItem } from '../selectable-item'; -import { changesetInfosToSelectableItems } from './changeset-infos-to-selectable-items'; - -@Injectable() -export class ContractorsTableService { - private getContractors$ = new Subject<{ partyID: PartyID; unsaved?: ChangesetInfo[] }>(); - private hasError$ = new Subject(); - - // eslint-disable-next-line @typescript-eslint/member-ordering - selectableItems$: Observable = this.getContractors$.pipe( - switchMap(({ partyID, unsaved }) => - combineLatest([ - this.partyService.getParty(partyID).pipe( - map((party) => { - const result = []; - party.contractors.forEach((data, id) => - result.push({ data: data.contractor, id }) - ); - return result; - }), - catchError(() => { - this.snackBar.open('An error occurred when receiving contractors', 'OK'); - this.hasError$.next(); - return of('error'); - }), - filter((result) => result !== 'error') - ), - of(changesetInfosToSelectableItems(unsaved)), - ]).pipe( - map(([partyContractors, unsavedContractors]) => [ - ...unsavedContractors, - ...partyContractors, - ]) - ) - ) - ); - // eslint-disable-next-line @typescript-eslint/member-ordering - inProgress$ = progress(this.getContractors$, merge(this.hasError$, this.selectableItems$)); - - constructor(private partyService: PartyService, private snackBar: MatSnackBar) {} - - getContractors(partyID: PartyID, unsaved?: ChangesetInfo[]) { - this.getContractors$.next({ partyID, unsaved }); - } -} diff --git a/src/app/shared/components/party-modifications-extractor/contractor-selector/contractors-table/items-filter-predicate.ts b/src/app/shared/components/party-modifications-extractor/contractor-selector/contractors-table/items-filter-predicate.ts deleted file mode 100644 index 2d1f3897..00000000 --- a/src/app/shared/components/party-modifications-extractor/contractor-selector/contractors-table/items-filter-predicate.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { SelectableItem } from '../selectable-item'; - -export const itemsFilterPredicate = (item: SelectableItem, filter: string): boolean => - JSON.stringify(item).includes(filter); diff --git a/src/app/shared/components/party-modifications-extractor/contractor-selector/index.ts b/src/app/shared/components/party-modifications-extractor/contractor-selector/index.ts deleted file mode 100644 index 6736e5bf..00000000 --- a/src/app/shared/components/party-modifications-extractor/contractor-selector/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './contractor-selector.module'; diff --git a/src/app/shared/components/party-modifications-extractor/contractor-selector/selectable-item.ts b/src/app/shared/components/party-modifications-extractor/contractor-selector/selectable-item.ts deleted file mode 100644 index f644b994..00000000 --- a/src/app/shared/components/party-modifications-extractor/contractor-selector/selectable-item.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Contractor } from '../../../../thrift-services/damsel/gen-model/domain'; - -export class SelectableItem { - id: string; - data: Contractor; - checked?: boolean; - unsaved?: boolean; -} diff --git a/src/app/shared/components/party-modifications-extractor/contractor-selector/selector-type.pipe.ts b/src/app/shared/components/party-modifications-extractor/contractor-selector/selector-type.pipe.ts deleted file mode 100644 index 58f52d37..00000000 --- a/src/app/shared/components/party-modifications-extractor/contractor-selector/selector-type.pipe.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Pipe, PipeTransform } from '@angular/core'; - -import { ActionType } from './action-type'; - -@Pipe({ - name: 'ccSelectorType', -}) -export class SelectorTypePipe implements PipeTransform { - transform(value: string): any { - switch (value) { - case ActionType.AttachNew: - return 'Attach new'; - case ActionType.Attach: - return 'Select from party or from unsaved'; - default: - return value; - } - } -} diff --git a/src/app/shared/components/party-modifications-extractor/converters/index.ts b/src/app/shared/components/party-modifications-extractor/converters/index.ts deleted file mode 100644 index 273638e6..00000000 --- a/src/app/shared/components/party-modifications-extractor/converters/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './to-individual-entity-party-modification'; -export * from './to-legal-entity-party-modification'; diff --git a/src/app/shared/components/party-modifications-extractor/converters/to-contractor-modification.ts b/src/app/shared/components/party-modifications-extractor/converters/to-contractor-modification.ts deleted file mode 100644 index 47d5646f..00000000 --- a/src/app/shared/components/party-modifications-extractor/converters/to-contractor-modification.ts +++ /dev/null @@ -1,16 +0,0 @@ -import * as uuid from 'uuid/v4'; - -import { - ContractorModification, - PartyModification, -} from '../../../../thrift-services/damsel/gen-model/claim_management'; - -export const toContractorModification = ( - modification: ContractorModification, - id: string = uuid() -): PartyModification => ({ - contractor_modification: { - id, - modification, - }, -}); diff --git a/src/app/shared/components/party-modifications-extractor/converters/to-individual-entity-party-modification.ts b/src/app/shared/components/party-modifications-extractor/converters/to-individual-entity-party-modification.ts deleted file mode 100644 index 361cac80..00000000 --- a/src/app/shared/components/party-modifications-extractor/converters/to-individual-entity-party-modification.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { getOr } from '@cc/utils/get-or'; - -import { QuestionaryData } from '../../../../thrift-services/ank/gen-model/questionary_manager'; -import { PartyModification } from '../../../../thrift-services/damsel/gen-model/claim_management'; -import { createRussianBankAccount } from '../creators/create-russian-bank-account'; -import { toContractorModification } from './to-contractor-modification'; - -const PATH = 'contractor.individual_entity.russian_individual_entity'; - -export const toIndividualEntityPartyModification = ( - d: QuestionaryData, - contractorID: string -): PartyModification => - toContractorModification( - { - creation: { - legal_entity: { - russian_legal_entity: { - registered_name: getOr(d, `${PATH}.name`, ''), - registered_number: getOr( - d, - `${PATH}.registration_info.individual_registration_info.ogrnip`, - '' - ), - inn: getOr(d, `${PATH}.inn`, '') || '', - actual_address: getOr( - d, - `${PATH}.registration_info.individual_registration_info.registration_place`, - '' - ), - post_address: getOr( - d, - `${PATH}.registration_info.individual_registration_info.registration_place`, - '' - ), - representative_position: '', - representative_full_name: getOr( - d, - `${PATH}.russian_private_entity.fio`, - '' - ), - representative_document: getOr( - d, - `${PATH}.identity_document.russian_domestic_password.series_number`, - '' - ), - russian_bank_account: createRussianBankAccount(d), - }, - }, - }, - }, - contractorID - ); diff --git a/src/app/shared/components/party-modifications-extractor/converters/to-international-legal-entity.ts b/src/app/shared/components/party-modifications-extractor/converters/to-international-legal-entity.ts deleted file mode 100644 index 2567afa6..00000000 --- a/src/app/shared/components/party-modifications-extractor/converters/to-international-legal-entity.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { getOr } from '@cc/utils/get-or'; - -import { QuestionaryData } from '../../../../thrift-services/ank/gen-model/questionary_manager'; -import { InternationalLegalEntity } from '../../../../thrift-services/damsel/gen-model/domain'; - -const PATH = 'contractor.legal_entity.international_legal_entity'; - -export const toInternationalLegalEntity = (d: QuestionaryData): InternationalLegalEntity => ({ - legal_name: d.contractor.legal_entity.international_legal_entity.legal_name, - trading_name: getOr(d, `${PATH}.trading_name`, ''), - registered_address: getOr(d, `${PATH}.registered_address`, ''), - actual_address: getOr(d, `${PATH}.actual_address`, ''), - registered_number: getOr(d, `${PATH}.registered_number`, ''), -}); diff --git a/src/app/shared/components/party-modifications-extractor/converters/to-legal-entity-party-modification.ts b/src/app/shared/components/party-modifications-extractor/converters/to-legal-entity-party-modification.ts deleted file mode 100644 index 746a0eaf..00000000 --- a/src/app/shared/components/party-modifications-extractor/converters/to-legal-entity-party-modification.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { QuestionaryData } from '../../../../thrift-services/ank/gen-model/questionary_manager'; -import { PartyModification } from '../../../../thrift-services/damsel/gen-model/claim_management'; -import { toContractorModification } from './to-contractor-modification'; -import { toInternationalLegalEntity } from './to-international-legal-entity'; -import { toRussianLegalEntity } from './to-russian-legal-entity'; - -export const toLegalEntityPartyModification = ( - d: QuestionaryData, - contractorID: string -): PartyModification => - toContractorModification( - { - creation: { - legal_entity: { - russian_legal_entity: d.contractor?.legal_entity?.russian_legal_entity - ? toRussianLegalEntity(d) - : undefined, - international_legal_entity: d.contractor?.legal_entity - ?.international_legal_entity - ? toInternationalLegalEntity(d) - : undefined, - }, - }, - }, - contractorID - ); diff --git a/src/app/shared/components/party-modifications-extractor/converters/to-russian-legal-entity.ts b/src/app/shared/components/party-modifications-extractor/converters/to-russian-legal-entity.ts deleted file mode 100644 index 6f24f6ac..00000000 --- a/src/app/shared/components/party-modifications-extractor/converters/to-russian-legal-entity.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { getOr } from '@cc/utils/get-or'; - -import { QuestionaryData } from '../../../../thrift-services/ank/gen-model/questionary_manager'; -import { RussianLegalEntity } from '../../../../thrift-services/damsel/gen-model/domain'; -import { createRussianBankAccount } from '../creators/create-russian-bank-account'; - -const PATH = 'contractor.legal_entity.russian_legal_entity'; - -export const toRussianLegalEntity = (d: QuestionaryData): RussianLegalEntity => ({ - registered_name: getOr(d, `${PATH}.name`, ''), - registered_number: getOr(d, `${PATH}.registration_info.legal_registration_info.ogrn`, ''), - inn: getOr(d, `${PATH}.inn`, ''), - actual_address: - getOr(d, `${PATH}.registration_info.legal_registration_info.actual_address`, '') || - getOr(d, `${PATH}.registration_info.legal_registration_info.registration_address`, ''), - post_address: - getOr(d, `${PATH}.postal_address`, '') || - getOr(d, `${PATH}.registration_info.legal_registration_info.registration_address`, ''), - representative_position: getOr(d, `${PATH}.legal_owner_info.head_position`, ''), - representative_full_name: getOr(d, `${PATH}.legal_owner_info.russian_private_entity.fio`, ''), - representative_document: getOr( - d, - `${PATH}.legal_owner_info.identity_document.russian_domestic_password.series_number`, - '' - ), - russian_bank_account: createRussianBankAccount(d), -}); diff --git a/src/app/shared/components/party-modifications-extractor/creators/create-contract-creation.ts b/src/app/shared/components/party-modifications-extractor/creators/create-contract-creation.ts deleted file mode 100644 index e3748e9b..00000000 --- a/src/app/shared/components/party-modifications-extractor/creators/create-contract-creation.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { PartyModification } from '../../../../thrift-services/damsel/gen-model/claim_management'; -import { PaymentInstitutionRef } from '../../../../thrift-services/damsel/gen-model/domain'; - -export const createContractCreation = ( - contractorId: string, - contractId: string, - paymentInstitution: PaymentInstitutionRef -): PartyModification => ({ - contract_modification: { - id: contractId, - modification: { - creation: { - contractor_id: contractorId, - payment_institution: paymentInstitution, - }, - }, - }, -}); diff --git a/src/app/shared/components/party-modifications-extractor/creators/create-contractor.ts b/src/app/shared/components/party-modifications-extractor/creators/create-contractor.ts deleted file mode 100644 index 00a24764..00000000 --- a/src/app/shared/components/party-modifications-extractor/creators/create-contractor.ts +++ /dev/null @@ -1,25 +0,0 @@ -import get from 'lodash-es/get'; - -import { QuestionaryData } from '../../../../thrift-services/ank/gen-model/questionary_manager'; -import { PartyModification } from '../../../../thrift-services/damsel/gen-model/claim_management'; -import { toIndividualEntityPartyModification, toLegalEntityPartyModification } from '../converters'; - -export const createContractor = (d: QuestionaryData, contractorID: string): PartyModification => { - const isLegalEntityExist = get(d, 'contractor.legal_entity', false); - const isIndividualEntityExist = get(d, 'contractor.individual_entity', false); - - const legalEntityCreation = isLegalEntityExist - ? toLegalEntityPartyModification(d, contractorID) - : null; - const individualEntityCreation = isIndividualEntityExist - ? toIndividualEntityPartyModification(d, contractorID) - : null; - - if (isLegalEntityExist) { - return legalEntityCreation; - } else if (isIndividualEntityExist) { - return individualEntityCreation; - } else { - return null; - } -}; diff --git a/src/app/shared/components/party-modifications-extractor/creators/create-international-bank-account.ts b/src/app/shared/components/party-modifications-extractor/creators/create-international-bank-account.ts deleted file mode 100644 index 74780192..00000000 --- a/src/app/shared/components/party-modifications-extractor/creators/create-international-bank-account.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { getOr } from '@cc/utils/get-or'; - -import { QuestionaryData } from '../../../../thrift-services/ank/gen-model/questionary_manager'; -import { InternationalBankAccount } from '../../../../thrift-services/damsel/gen-model/domain'; - -const PATH = 'bank_account.international_bank_account'; - -export const createInternationalBankAccount = (d: QuestionaryData): InternationalBankAccount => { - const internationalBankAccount = getOr(d, PATH, null); - const accountNumber = getOr(internationalBankAccount, `number`, ''); - const bank = getOr(internationalBankAccount, `bank`, ''); - const correspondentAccount = getOr(internationalBankAccount, `correspondent_account`, ''); - const iban = getOr(internationalBankAccount, `iban`, ''); - const accountHolder = getOr(internationalBankAccount, `account_holder`, ''); - return { - number: accountNumber, - bank, - correspondent_account: correspondentAccount, - iban, - account_holder: accountHolder, - }; -}; diff --git a/src/app/shared/components/party-modifications-extractor/creators/create-payout-tool-creation.ts b/src/app/shared/components/party-modifications-extractor/creators/create-payout-tool-creation.ts deleted file mode 100644 index e5657a8e..00000000 --- a/src/app/shared/components/party-modifications-extractor/creators/create-payout-tool-creation.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { QuestionaryData } from '../../../../thrift-services/ank/gen-model/questionary_manager'; -import { PartyModification } from '../../../../thrift-services/damsel/gen-model/claim_management'; -import { createInternationalBankAccount } from './create-international-bank-account'; -import { createRussianBankAccount } from './create-russian-bank-account'; - -export const createPayoutToolCreation = ( - d: QuestionaryData, - contractId: string, - payoutToolId: string -): PartyModification => ({ - contract_modification: { - id: contractId, - modification: { - payout_tool_modification: { - payout_tool_id: payoutToolId, - modification: { - creation: { - currency: { - symbolic_code: 'RUB', - }, - tool_info: { - russian_bank_account: d.bank_account?.russian_bank_account - ? createRussianBankAccount(d) - : undefined, - international_bank_account: d.bank_account?.international_bank_account - ? createInternationalBankAccount(d) - : undefined, - }, - }, - }, - }, - }, - }, -}); diff --git a/src/app/shared/components/party-modifications-extractor/creators/create-russian-bank-account.ts b/src/app/shared/components/party-modifications-extractor/creators/create-russian-bank-account.ts deleted file mode 100644 index 012d5c79..00000000 --- a/src/app/shared/components/party-modifications-extractor/creators/create-russian-bank-account.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { getOr } from '@cc/utils/get-or'; - -import { QuestionaryData } from '../../../../thrift-services/ank/gen-model/questionary_manager'; -import { RussianBankAccount } from '../../../../thrift-services/damsel/gen-model/domain'; - -const PATH = 'bank_account.russian_bank_account'; - -export const createRussianBankAccount = (d: QuestionaryData): RussianBankAccount => { - const russianBankAccount = getOr(d, PATH, null); - const account = getOr(russianBankAccount, `account`, ''); - const bankName = getOr(russianBankAccount, `bank_name`, ''); - const bankBik = getOr(russianBankAccount, `bank_bik`, ''); - const bankPostAccount = getOr(russianBankAccount, `bank_post_account`, ''); - return { account, bank_name: bankName, bank_bik: bankBik, bank_post_account: bankPostAccount }; -}; diff --git a/src/app/shared/components/party-modifications-extractor/creators/create-shop-account-creation.ts b/src/app/shared/components/party-modifications-extractor/creators/create-shop-account-creation.ts deleted file mode 100644 index 481a24af..00000000 --- a/src/app/shared/components/party-modifications-extractor/creators/create-shop-account-creation.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { PartyModification } from '../../../../thrift-services/damsel/gen-model/claim_management'; - -export const createShopAccountCreation = (shopId: string): PartyModification => ({ - shop_modification: { - id: shopId, - modification: { - shop_account_creation: { currency: { symbolic_code: 'RUB' } }, - }, - }, -}); diff --git a/src/app/shared/components/party-modifications-extractor/creators/create-shop-creation.ts b/src/app/shared/components/party-modifications-extractor/creators/create-shop-creation.ts deleted file mode 100644 index 32a109a6..00000000 --- a/src/app/shared/components/party-modifications-extractor/creators/create-shop-creation.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { getOr } from '@cc/utils/get-or'; - -import { QuestionaryData } from '../../../../thrift-services/ank/gen-model/questionary_manager'; -import { PartyModification } from '../../../../thrift-services/damsel/gen-model/claim_management'; - -export const createShopCreation = ( - d: QuestionaryData, - contractId: string, - payoutToolId: string, - categoryID: number, - shopID: string -): PartyModification => { - const defaultLocation = { url: '' }; - const location = getOr(d, 'shop_info.location', defaultLocation); - - const defaultDetails = { - name: '', - description: '', - }; - const details = getOr(d, 'shop_info.details', defaultDetails); - - return { - shop_modification: { - id: shopID, - modification: { - creation: { - contract_id: contractId, - payout_tool_id: payoutToolId, - location, - details, - category: { id: categoryID }, - }, - }, - }, - }; -}; diff --git a/src/app/shared/components/party-modifications-extractor/creators/index.ts b/src/app/shared/components/party-modifications-extractor/creators/index.ts deleted file mode 100644 index 54afdcf2..00000000 --- a/src/app/shared/components/party-modifications-extractor/creators/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './create-contract-creation'; -export * from './create-payout-tool-creation'; -export * from './create-shop-creation'; diff --git a/src/app/shared/components/party-modifications-extractor/extract-form-checkbox-name.pipe.ts b/src/app/shared/components/party-modifications-extractor/extract-form-checkbox-name.pipe.ts deleted file mode 100644 index 2e608787..00000000 --- a/src/app/shared/components/party-modifications-extractor/extract-form-checkbox-name.pipe.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Pipe, PipeTransform } from '@angular/core'; - -@Pipe({ - name: 'ccExtractFormCheckboxName', -}) -export class ExtractFormCheckboxNamePipe implements PipeTransform { - transform(value: string): string { - switch (value) { - case 'contractCreation': - return 'Contract creation'; - case 'payoutToolCreation': - return 'Payout tool creation'; - case 'shopCreation': - return 'Shop creation'; - default: - return value; - } - } -} diff --git a/src/app/shared/components/party-modifications-extractor/extract-form-value.ts b/src/app/shared/components/party-modifications-extractor/extract-form-value.ts deleted file mode 100644 index 0cbeb01c..00000000 --- a/src/app/shared/components/party-modifications-extractor/extract-form-value.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { - CategoryRef, - PaymentInstitutionRef, -} from '../../../thrift-services/damsel/gen-model/domain'; - -interface ContractorId { - id: string; -} - -export interface ExtractFormValue { - category: CategoryRef; - payment_institution: PaymentInstitutionRef; - contractor: ContractorId; -} diff --git a/src/app/shared/components/party-modifications-extractor/index.ts b/src/app/shared/components/party-modifications-extractor/index.ts deleted file mode 100644 index 8b9049c2..00000000 --- a/src/app/shared/components/party-modifications-extractor/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './party-modifications-extractor.module'; -export * from './party-modifications-extractor.service'; diff --git a/src/app/shared/components/party-modifications-extractor/party-modifications-extractor-dialog.component.html b/src/app/shared/components/party-modifications-extractor/party-modifications-extractor-dialog.component.html deleted file mode 100644 index 41f3a9c2..00000000 --- a/src/app/shared/components/party-modifications-extractor/party-modifications-extractor-dialog.component.html +++ /dev/null @@ -1,29 +0,0 @@ -
- -
-
Party modifications extraction params
-
- - - - -
-
-
- - - - -
diff --git a/src/app/shared/components/party-modifications-extractor/party-modifications-extractor-dialog.component.ts b/src/app/shared/components/party-modifications-extractor/party-modifications-extractor-dialog.component.ts deleted file mode 100644 index c8418252..00000000 --- a/src/app/shared/components/party-modifications-extractor/party-modifications-extractor-dialog.component.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { Component, Inject } from '@angular/core'; -import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; - -import { ChangesetInfo } from '../../../sections/party-claim/changeset/changeset-infos'; -import { Questionary } from '../../../thrift-services/ank/gen-model/questionary_manager'; -import { PartyID } from '../../../thrift-services/damsel/gen-model/domain'; -import { PartyModificationsExtractorDialogService } from './party-modifications-extractor-dialog.service'; - -export interface ExtractPartyModification { - questionary: Questionary; - partyID: PartyID; - unsaved?: ChangesetInfo[]; -} - -@Component({ - templateUrl: 'party-modifications-extractor-dialog.component.html', - providers: [PartyModificationsExtractorDialogService], -}) -export class PartyModificationsExtractorDialogComponent { - form = this.partyModificationsExtractorDialogService.form; - partyID: string; - unsaved: ChangesetInfo[]; - isContractorAvailable: boolean; - - constructor( - private dialogRef: MatDialogRef, - private partyModificationsExtractorDialogService: PartyModificationsExtractorDialogService, - @Inject(MAT_DIALOG_DATA) private data: ExtractPartyModification - ) { - this.partyID = this.data.partyID; - this.unsaved = this.data.unsaved; - this.isContractorAvailable = - !!this.data.questionary.data.contractor?.legal_entity || - !!this.data.questionary.data.contractor?.individual_entity; - } - - extract() { - this.dialogRef.close( - this.partyModificationsExtractorDialogService.mapToModifications( - this.data.questionary.data - ) - ); - } -} diff --git a/src/app/shared/components/party-modifications-extractor/party-modifications-extractor-dialog.service.ts b/src/app/shared/components/party-modifications-extractor/party-modifications-extractor-dialog.service.ts deleted file mode 100644 index ce3880e7..00000000 --- a/src/app/shared/components/party-modifications-extractor/party-modifications-extractor-dialog.service.ts +++ /dev/null @@ -1,66 +0,0 @@ -import { Injectable } from '@angular/core'; -import { FormBuilder } from '@angular/forms'; -import * as uuid from 'uuid/v4'; - -import { QuestionaryData } from '../../../thrift-services/ank/gen-model/questionary_manager'; -import { PartyModification } from '../../../thrift-services/damsel/gen-model/claim_management'; -import { createContractCreation, createPayoutToolCreation, createShopCreation } from './creators'; -import { createContractor } from './creators/create-contractor'; -import { createShopAccountCreation } from './creators/create-shop-account-creation'; -import { ExtractFormValue } from './extract-form-value'; - -@Injectable() -export class PartyModificationsExtractorDialogService { - form = this.fb.group({ - category: this.fb.group({}), - payment_institution: this.fb.group({}), - contractor: this.fb.group({}), - }); - - constructor(private fb: FormBuilder) {} - - mapToModifications(d: QuestionaryData): PartyModification[] { - const { - category, - payment_institution, - contractor: { id }, - }: ExtractFormValue = this.form.value; - const contractorID = uuid(); - const shopID = uuid(); - const contractID = uuid(); - const payoutToolID = uuid(); - - const result = []; - - if (d.contractor) { - const contractorCreationModification = createContractor(d, contractorID); - result.push(contractorCreationModification); - } - - const contractCreationModification = createContractCreation( - d.contractor ? contractorID : id, - contractID, - payment_institution - ); - result.push(contractCreationModification); - - const payoutToolCreationModification = createPayoutToolCreation( - d, - contractID, - payoutToolID - ); - result.push(payoutToolCreationModification); - - const shopCreationModification = createShopCreation( - d, - contractID, - payoutToolID, - category.id, - shopID - ); - const shopAccountCreation = createShopAccountCreation(shopID); - result.push(shopCreationModification, shopAccountCreation); - - return result; - } -} diff --git a/src/app/shared/components/party-modifications-extractor/party-modifications-extractor.module.ts b/src/app/shared/components/party-modifications-extractor/party-modifications-extractor.module.ts deleted file mode 100644 index fb0ac4f5..00000000 --- a/src/app/shared/components/party-modifications-extractor/party-modifications-extractor.module.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { CommonModule } from '@angular/common'; -import { NgModule } from '@angular/core'; -import { FlexModule } from '@angular/flex-layout'; -import { ReactiveFormsModule } from '@angular/forms'; -import { MatButtonModule } from '@angular/material/button'; -import { MatCheckboxModule } from '@angular/material/checkbox'; -import { MatDialogModule } from '@angular/material/dialog'; -import { MatDividerModule } from '@angular/material/divider'; -import { MatInputModule } from '@angular/material/input'; -import { MatRadioModule } from '@angular/material/radio'; - -import { PartyModificationFormsModule } from '../party-modification-forms'; -import { ContractorSelectorModule } from './contractor-selector'; -import { ExtractFormCheckboxNamePipe } from './extract-form-checkbox-name.pipe'; -import { PartyModificationsExtractorDialogComponent } from './party-modifications-extractor-dialog.component'; -import { PartyModificationsExtractorService } from './party-modifications-extractor.service'; - -@NgModule({ - declarations: [PartyModificationsExtractorDialogComponent, ExtractFormCheckboxNamePipe], - imports: [ - FlexModule, - MatDialogModule, - MatButtonModule, - MatInputModule, - ReactiveFormsModule, - MatCheckboxModule, - CommonModule, - PartyModificationFormsModule, - MatDividerModule, - MatRadioModule, - ContractorSelectorModule, - ], - entryComponents: [PartyModificationsExtractorDialogComponent], - providers: [PartyModificationsExtractorService], -}) -export class PartyModificationsExtractorModule {} diff --git a/src/app/shared/components/party-modifications-extractor/party-modifications-extractor.service.ts b/src/app/shared/components/party-modifications-extractor/party-modifications-extractor.service.ts deleted file mode 100644 index 92d2f291..00000000 --- a/src/app/shared/components/party-modifications-extractor/party-modifications-extractor.service.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { Injectable } from '@angular/core'; -import { MatDialog } from '@angular/material/dialog'; -import { Observable, Subject } from 'rxjs'; -import { filter, switchMap, takeUntil } from 'rxjs/operators'; - -import { ChangesetInfo } from '../../../sections/party-claim/changeset/changeset-infos'; -import { Questionary } from '../../../thrift-services/ank/gen-model/questionary_manager'; -import { PartyModification } from '../../../thrift-services/damsel/gen-model/claim_management'; -import { PartyID } from '../../../thrift-services/damsel/gen-model/domain'; -import { PartyModificationsExtractorDialogComponent } from './party-modifications-extractor-dialog.component'; - -@Injectable() -export class PartyModificationsExtractorService { - private destroy$: Subject = new Subject(); - private extractMods$: Subject<{ - partyID: PartyID; - questionary: Questionary; - unsaved: ChangesetInfo[]; - }> = new Subject(); - private extracted$: Subject = new Subject(); - - // eslint-disable-next-line @typescript-eslint/member-ordering - modsExtracted$: Observable = this.extracted$.asObservable(); - - constructor(private dialog: MatDialog) {} - - init() { - this.extractMods$ - .pipe( - takeUntil(this.destroy$), - switchMap(({ partyID, questionary, unsaved }) => - this.dialog - .open(PartyModificationsExtractorDialogComponent, { - disableClose: true, - data: { questionary, partyID, unsaved }, - width: '800px', - }) - .afterClosed() - .pipe(filter((r) => r.length > 0)) - ) - ) - .subscribe((r) => this.extracted$.next(r)); - } - - extractMods(partyID: PartyID, questionary: Questionary, unsaved: ChangesetInfo[]) { - this.extractMods$.next({ partyID, questionary, unsaved }); - } - - destroy() { - this.destroy$.next(); - } -} diff --git a/src/app/shared/components/questionary-document/beneficial-owner/create-company-header.ts b/src/app/shared/components/questionary-document/beneficial-owner/create-company-header.ts deleted file mode 100644 index ce837476..00000000 --- a/src/app/shared/components/questionary-document/beneficial-owner/create-company-header.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { cmToIn, Content } from '../../../../document'; -import { createCaptionedText } from '../create-content'; - -export function createCompanyHeader(companyName: string, companyInn: string): Content { - return { - columns: [ - { ...createCaptionedText(companyName, 'Наименование вашей компании'), width: 'auto' }, - { ...createCaptionedText(companyInn, 'ИНН'), width: 'auto' }, - ], - columnGap: cmToIn(2), - }; -} diff --git a/src/app/shared/components/questionary-document/beneficial-owner/get-doc-def.ts b/src/app/shared/components/questionary-document/beneficial-owner/get-doc-def.ts deleted file mode 100644 index 52a7e72c..00000000 --- a/src/app/shared/components/questionary-document/beneficial-owner/get-doc-def.ts +++ /dev/null @@ -1,174 +0,0 @@ -import get from 'lodash-es/get'; - -import { toOptional } from '@cc/utils/to-optional'; - -import { BeneficialOwner } from '../../../../thrift-services/ank/gen-model/questionary'; -import { - createEnding, - createHeader, - createHeadline, - createHorizontalCheckbox, - createInlineCheckboxWithTitle, - createInlineParagraph, - createVerticalParagraph, -} from '../create-content'; -import { DocDef } from '../create-questionary'; -import { - getContactInfo, - getDate, - getIdentityDocument, - getPercent, - SIMPLE_YES_NO, - toYesNo, -} from '../select-data'; -import { createCompanyHeader } from './create-company-header'; -import { getIndividualResidencyInfo } from './get-individual-residency-info'; - -const EMPTY = ''; - -export function getDocDef( - beneficialOwner: BeneficialOwner, - companyName: string, - companyInn: string -): DocDef { - const { - russian_private_entity, - migration_card_info, - residence_approve, - ownership_percentage, - inn, - snils, - pdl_relation_degree, - pdl_category, - residency_info, - identity_document, - } = toOptional(beneficialOwner); - const { birth_date, fio, birth_place, citizenship, actual_address, contact_info } = toOptional( - russian_private_entity - ); - const optionalMigrationCardInfo = toOptional(migration_card_info); - const optionalResidenceApprove = toOptional(residence_approve); - - const identityDocumentInfo = getIdentityDocument(identity_document); - const { usaTaxResident, exceptUsaTaxResident } = getIndividualResidencyInfo(residency_info); - const contact = getContactInfo(contact_info); - - return { - content: [ - createHeader('Приложение №'), - createCompanyHeader(companyName, companyInn), - createHeadline('АНКЕТА ФИЗИЧЕСКОГО ЛИЦА - БЕНЕФИЦИАРНОГО ВЛАДЕЛЬЦА'), - createVerticalParagraph('1. Бенефициарный владелец', [ - [ - createHorizontalCheckbox( - [ - 'лицо, не указанное в учредительных документах/выписке ЕГРЮЛ/списке участников/реестре акционеров, но которое косвенно владеет более 25% в капитале компании или контролирует действия компании', - 'лицо, указанное в учредительных документах/выписке ЕГРЮЛ/списке участников/реестре акционеров (участник/акционер), владеющее в конечном счете более 25% в капитале компании', - ], - -1 // TODO - ), - ], - ]), - createInlineParagraph( - '2. Процент владения капиталом юридического лица', - getPercent(ownership_percentage) || EMPTY - ), - createInlineParagraph('3. Фамилия, Имя, Отчество (при наличии)', fio || EMPTY), - createInlineParagraph('4. Дата рождения', getDate(birth_date) || EMPTY), - createInlineParagraph('5. Место рождения', birth_place || EMPTY), - createInlineParagraph('6. Гражданство', citizenship || 'РФ'), // TODO: move to questionary input - createInlineParagraph('7. ИНН (при наличии)', inn || EMPTY), - createInlineParagraph('8. Реквизиты документа, удостоверяющего личность', [ - [`8.1. Вид документа: ${get(identityDocumentInfo, 'name') || EMPTY}`], - [`8.2. Серия и номер: ${get(identityDocumentInfo, 'seriesNumber') || EMPTY}`], - [ - `8.3. Наименование органа, выдавшего документ, код подразделения (при наличии): ${ - identityDocumentInfo.issuer || EMPTY - }`, - ], - [`8.4. Дата выдачи: ${getDate(get(identityDocumentInfo, 'issuedAt')) || EMPTY}`], - ]), - createInlineParagraph('9. Данные миграционной карты¹', [ - [`9.1. Номер карты: ${get(optionalMigrationCardInfo, 'card_number') || EMPTY}`], - [ - `9.2. Дата начала срока пребывания в РФ: ${ - getDate(get(optionalMigrationCardInfo, 'beginning_date')) || EMPTY - }`, - ], - [ - `9.3. Дата окончания срока пребывания в РФ: ${ - getDate(get(optionalMigrationCardInfo, 'expiration_date')) || EMPTY - }`, - ], - ]), - createInlineParagraph( - '10. Данные документа, подтверждающего право иностранного гражданина или лица без гражданства на пребывание (проживание) в РФ¹', - [ - [`10.1. Вид документа: ${get(optionalResidenceApprove, 'name') || EMPTY}`], - [ - `10.2. Серия (при наличии): ${ - get(optionalResidenceApprove, 'series') || EMPTY - }`, - ], - [`10.3. Номер документа: ${get(optionalResidenceApprove, 'number') || EMPTY}`], - [ - `10.4. Дата начала срока действия: ${ - getDate(get(optionalResidenceApprove, 'beginning_date')) || EMPTY - }`, - ], - [ - `10.5. Дата окончания срока действия: ${ - getDate(get(optionalResidenceApprove, 'expiration_date')) || EMPTY - }`, - ], - ] - ), - createInlineParagraph( - '11. Адрес места жительства (регистрации) или места пребывания', - actual_address || EMPTY - ), - createInlineParagraph('12. СНИЛС (при наличии)', snils || EMPTY), - createInlineParagraph('13. Контактная информация (телефон/email)', contact || EMPTY), - createVerticalParagraph( - '14. Принадлежность физического лица к некоторым категориям лиц', - [ - [ - createInlineCheckboxWithTitle( - '14.1. Принадлежность к категории ПДЛ²', - SIMPLE_YES_NO, - toYesNo(pdl_category) - ), - ], - [ - createInlineCheckboxWithTitle( - '14.2. Является родственником ПДЛ', - SIMPLE_YES_NO, - toYesNo(!!pdl_relation_degree) - ), - `14.3. Степень родства: ${pdl_relation_degree || EMPTY}`, - ], - [ - createInlineCheckboxWithTitle( - '14.4. Является ли бенефициарный владелец налогоплательщиком/налоговым резидентом США?', - SIMPLE_YES_NO, - toYesNo(usaTaxResident) - ), - ], - [ - createInlineCheckboxWithTitle( - '14.5. Является ли бенефициарный владелец налогоплательщиком/налоговым резидентом иного иностранного государства (кроме США)?', - SIMPLE_YES_NO, - toYesNo(exceptUsaTaxResident) - ), - ], - ] - ), - ], - prefooter: createEnding(), - footer: [ - '¹ Заполняется только для иностранных граждан и лиц без гражданства, находящихся на территории РФ в случае, если необходимость наличия у них данного документа предусмотрена законодательством РФ', - '² Публичные должностные лица, включая российские, иностранные и международные.', - ].join('\n'), - footerHeight: 3.1, - }; -} diff --git a/src/app/shared/components/questionary-document/beneficial-owner/get-individual-residency-info.ts b/src/app/shared/components/questionary-document/beneficial-owner/get-individual-residency-info.ts deleted file mode 100644 index 3c1b41f2..00000000 --- a/src/app/shared/components/questionary-document/beneficial-owner/get-individual-residency-info.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { ResidencyInfo } from '../../../../thrift-services/ank/gen-model/questionary'; - -export function getIndividualResidencyInfo( - residencyInfo: ResidencyInfo -): { - usaTaxResident: boolean; - exceptUsaTaxResident: boolean; -} { - if (residencyInfo.individual_residency_info) { - const { - usa_tax_resident: usaTaxResident, - except_usa_tax_resident: exceptUsaTaxResident, - } = residencyInfo.individual_residency_info; - return { - usaTaxResident, - exceptUsaTaxResident, - }; - } - console.error("ResidencyInfo isn't IndividualResidencyInfo"); - return null; -} diff --git a/src/app/shared/components/questionary-document/beneficial-owner/index.ts b/src/app/shared/components/questionary-document/beneficial-owner/index.ts deleted file mode 100644 index 5adfcf14..00000000 --- a/src/app/shared/components/questionary-document/beneficial-owner/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './get-doc-def'; diff --git a/src/app/shared/components/questionary-document/create-content/create-captioned-text.ts b/src/app/shared/components/questionary-document/create-content/create-captioned-text.ts deleted file mode 100644 index 000d182e..00000000 --- a/src/app/shared/components/questionary-document/create-content/create-captioned-text.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { Content } from '../../../../document'; -import { Layout } from '../create-questionary'; - -export function createCaptionedText(text: string, caption: string): Content { - return { - layout: Layout.Underline, - table: { - body: [ - [ - { - text, - style: { - bold: true, - alignment: 'center', - }, - }, - ], - [ - { - text: caption, - style: { - bold: true, - alignment: 'center', - italics: true, - }, - }, - ], - ], - }, - }; -} diff --git a/src/app/shared/components/questionary-document/create-content/create-checkbox.ts b/src/app/shared/components/questionary-document/create-content/create-checkbox.ts deleted file mode 100644 index d193388e..00000000 --- a/src/app/shared/components/questionary-document/create-content/create-checkbox.ts +++ /dev/null @@ -1,86 +0,0 @@ -import { Content } from '../../../../document'; -import { Layout } from '../create-questionary'; -import { createGrid } from './create-grid'; -import { ICONS } from './icons'; - -type Items = string[] | [T, string][]; - -function itemsIsKeyValue(srcItems: Items): srcItems is [T, string][] { - return Array.isArray(srcItems[0]); -} - -function itemsToMap(srcItems: Items): Map { - return itemsIsKeyValue(srcItems) - ? new Map(srcItems) - : new Map(srcItems.map((i, idx) => [idx, i] as any)); -} - -function itemsWithActive( - itemsSrc: Items, - activeKey?: T -): { key: T; value: string; isActive: boolean }[] { - const items = itemsToMap(itemsSrc); - return Array.from(items).map(([key, value]) => ({ - key, - value, - isActive: activeKey === key, - })); -} - -export function createCheckbox(text: string, active = false): Content { - return { text: [active ? ICONS.checkSquare : ICONS.square, ' ', text] }; -} - -export function createInlineCheckbox(itemsSrc: Items, activeKey?: T): Content { - const text = itemsWithActive(itemsSrc, activeKey) - .reduce((acc, { value, isActive }) => [...acc, createCheckbox(value, isActive), ' '], []) - .slice(0, -1); - return { text }; -} - -export function createInlineCheckboxWithTitle( - title: string, - items: Items, - activeKey?: T -): Content { - const inlineCheckbox = createInlineCheckbox(items, activeKey); - return { ...inlineCheckbox, text: [`${title}: `, ...inlineCheckbox.text] }; -} - -export function createVerticalCheckbox(itemsSrc: Items, activeKey?: T): Content { - return { - layout: Layout.NoBorders, - table: { - widths: ['*'], - body: itemsWithActive(itemsSrc, activeKey).map(({ value, isActive }) => [ - createCheckbox(value, isActive), - ]), - }, - }; -} - -export function createVerticalCheckboxWithTitle( - title: string, - items: Items, - activeKey?: T -): Content { - const verticalCheckbox = createVerticalCheckbox(items, activeKey); - const { table } = verticalCheckbox; - return { - ...verticalCheckbox, - table: { - ...table, - widths: ['auto', ...table.widths], - body: table.body.map((row, idx) => [idx === 0 ? title : null, ...row]), - }, - }; -} - -export function createHorizontalCheckbox(itemsSrc: Items, activeKey?: T): Content { - return createGrid( - itemsWithActive(itemsSrc, activeKey).map(({ value, isActive }) => - createCheckbox(value, isActive) - ), - 0.25 - ); -} diff --git a/src/app/shared/components/questionary-document/create-content/create-ending.ts b/src/app/shared/components/questionary-document/create-content/create-ending.ts deleted file mode 100644 index 6cee2d50..00000000 --- a/src/app/shared/components/questionary-document/create-content/create-ending.ts +++ /dev/null @@ -1,24 +0,0 @@ -import * as moment from 'moment'; - -import { cmMarginsToIn, Content } from '../../../../document'; - -export function createEnding(): Content { - return { - layout: 'noBorders', - margin: cmMarginsToIn(0, 0.2, 0, 1.1), - table: { - widths: ['*', 'auto'], - body: [ - [ - 'М.П.', - { - text: - moment().locale('ru').format('LL') + - '\n\n\n_____________________/______________/', - style: { alignment: 'right' }, - }, - ], - ], - }, - }; -} diff --git a/src/app/shared/components/questionary-document/create-content/create-grid.ts b/src/app/shared/components/questionary-document/create-content/create-grid.ts deleted file mode 100644 index 35960bce..00000000 --- a/src/app/shared/components/questionary-document/create-content/create-grid.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { cmMarginsToIn, Content, Table } from '../../../../document'; -import { Layout } from '../create-questionary'; -import { createTableBody } from './create-table-body'; -import { getColumnsCount } from './get-columns-count'; - -type Item = Table['body'][number][number] | [Table['body'][number][number], number]; - -function getMargin(idx: number, count: number, gapCm: number) { - const marginFirst = cmMarginsToIn(0, 0, gapCm / 2, 0); - const marginInner = cmMarginsToIn(gapCm / 2, 0, gapCm / 2, 0); - const marginLast = cmMarginsToIn(gapCm / 2, 0, 0, 0); - return idx === 0 ? marginFirst : idx === count - 1 ? marginLast : marginInner; -} - -function getTableCell(i: Item): Content { - const [item, colSpan] = Array.isArray(i) ? i : [i, 1]; - const content = typeof item === 'object' ? item : { text: item }; - return { ...content, colSpan }; -} - -export function createGrid(items: Item[], gapCm: number = 0): Content { - const row = items.map((i, idx) => ({ - ...getTableCell(i), - margin: getMargin(idx, items.length, gapCm), - })); - return { - layout: Layout.Wrapper, - table: { - widths: new Array(getColumnsCount(row)).fill('*'), - body: createTableBody([row]), - }, - }; -} diff --git a/src/app/shared/components/questionary-document/create-content/create-header.ts b/src/app/shared/components/questionary-document/create-content/create-header.ts deleted file mode 100644 index 876047e6..00000000 --- a/src/app/shared/components/questionary-document/create-content/create-header.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Content } from '../../../../document'; - -export function createHeader(text: string): Content { - return { - text, - style: { alignment: 'right' }, - }; -} diff --git a/src/app/shared/components/questionary-document/create-content/create-headline.ts b/src/app/shared/components/questionary-document/create-content/create-headline.ts deleted file mode 100644 index 16359503..00000000 --- a/src/app/shared/components/questionary-document/create-content/create-headline.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { cmMarginsToIn, Content } from '../../../../document'; - -export function createHeadline(text: string): Content { - return { - text, - style: { - alignment: 'center', - bold: true, - }, - margin: cmMarginsToIn(0, 0.1, 0, 0.1), - }; -} diff --git a/src/app/shared/components/questionary-document/create-content/create-icons.ts b/src/app/shared/components/questionary-document/create-content/create-icons.ts deleted file mode 100644 index bd923caa..00000000 --- a/src/app/shared/components/questionary-document/create-content/create-icons.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Content, FontFamily } from '../../../../document'; - -interface SourceIcons { - [name: string]: string; -} - -type Icons = Record; - -export function createIcons>(iconsObj: T): R { - return Object.entries(iconsObj).reduce((acc, [name, text]) => { - acc[name] = { - text, - style: { - font: FontFamily.Fa, - }, - }; - return acc; - }, {} as R); -} diff --git a/src/app/shared/components/questionary-document/create-content/create-paragraph.ts b/src/app/shared/components/questionary-document/create-content/create-paragraph.ts deleted file mode 100644 index 8ff3d695..00000000 --- a/src/app/shared/components/questionary-document/create-content/create-paragraph.ts +++ /dev/null @@ -1,94 +0,0 @@ -import { cmMarginsToIn, Content, Table } from '../../../../document'; -import { Layout, PRIMARY_COLOR } from '../create-questionary'; -import { createGrid } from './create-grid'; -import { createTableBody } from './create-table-body'; -import { getColumnsCount } from './get-columns-count'; - -const MARGIN = cmMarginsToIn(0, 0.1); - -function prepareBody(body: Table['body'] | string): Table['body'] { - body = typeof body === 'string' ? [[body]] : body; - return body.map((i) => i.map((j) => j || '')); -} - -function setBodyColSpans(body: Table['body'], columnsCount: number): Table['body'] { - return body.map((row) => { - const rowColumnsCount = row.reduce( - (sum, col) => sum + (typeof col === 'object' ? col.colSpan || 1 : 1), - 0 - ); - if (rowColumnsCount === columnsCount) { - return row; - } - const lastCol = row[row.length - 1]; - const resultLastCol = - typeof lastCol === 'object' - ? { ...lastCol, colSpan: lastCol.colSpan || 1 } - : { text: lastCol, colSpan: 1 }; - resultLastCol.colSpan += columnsCount - rowColumnsCount; - return [...row.slice(0, -1), resultLastCol]; - }); -} - -function getColumnsCountByBody(body: Table['body']): number { - return body.reduce((maxCount, row) => Math.max(maxCount, getColumnsCount(row)), 1); -} - -export function createVerticalParagraph( - header: string, - body: Table['body'] | string = [[]], - columnsCount?: number -): Content { - body = prepareBody(body); - if (!columnsCount) { - columnsCount = getColumnsCountByBody(body); - } - body = setBodyColSpans(body, columnsCount); - const headerRow: Table['body'][number] = [ - { - colSpan: columnsCount, - style: { color: 'white' }, - text: header, - }, - ]; - return { - layout: Layout.Header, - margin: MARGIN, - table: { - widths: new Array(columnsCount).fill('*'), - body: createTableBody([headerRow, ...body]), - }, - }; -} - -export function createInlineParagraph( - header: string, - body: Table['body'] | string = [[]] -): Content { - body = prepareBody(body); - const headerTable: Content = { - layout: Layout.NoBorders, - table: { - rowSpan: body.length, - widths: ['*'], - body: [ - [ - { - text: header, - style: { color: 'white' }, - fillColor: PRIMARY_COLOR, - }, - ], - ], - }, - }; - const bodyTable = { - layout: Layout.NoBorders, - table: { - rowSpan: body.length, - widths: ['*'], - body, - }, - }; - return { ...createGrid([headerTable, bodyTable]), margin: MARGIN }; -} diff --git a/src/app/shared/components/questionary-document/create-content/create-table-body.ts b/src/app/shared/components/questionary-document/create-content/create-table-body.ts deleted file mode 100644 index e5e86478..00000000 --- a/src/app/shared/components/questionary-document/create-content/create-table-body.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { Table } from '../../../../document'; - -export function createTableBody(body: Table['body']): Table['body'] { - /** - * Магия ✨ таблиц PDFMake (TODO: исправить если что-то изменится) - * В таблице первая колонка с `colSpan` свойством должна иметь после себя `colSpan - 1` пустых колонок - * похоже она использует их для расширения первой колонки - */ - return body.reduce((accBody, row, idx) => { - const [firstColumn, ...otherColumns] = row; - if (typeof firstColumn === 'object' && firstColumn.colSpan && firstColumn.colSpan > 1) { - const firstColumnFiller = new Array(firstColumn.colSpan - 1).fill(null); - accBody[idx] = [firstColumn, ...firstColumnFiller, ...otherColumns]; - } - return accBody; - }, body.slice()); -} diff --git a/src/app/shared/components/questionary-document/create-content/get-columns-count.ts b/src/app/shared/components/questionary-document/create-content/get-columns-count.ts deleted file mode 100644 index 6e4007ae..00000000 --- a/src/app/shared/components/questionary-document/create-content/get-columns-count.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Table } from '../../../../document'; - -export function getColumnsCount(row: Table['body'][number]): number { - return row.reduce( - (accCount, col) => accCount + (typeof col === 'object' && col.colSpan ? col.colSpan : 1), - 0 - ); -} diff --git a/src/app/shared/components/questionary-document/create-content/icons.ts b/src/app/shared/components/questionary-document/create-content/icons.ts deleted file mode 100644 index 7c2de53b..00000000 --- a/src/app/shared/components/questionary-document/create-content/icons.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { createIcons } from './create-icons'; - -export const ICONS = createIcons({ - checkSquare: '', - square: '', -}); diff --git a/src/app/shared/components/questionary-document/create-content/index.ts b/src/app/shared/components/questionary-document/create-content/index.ts deleted file mode 100644 index 962b3de6..00000000 --- a/src/app/shared/components/questionary-document/create-content/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -export * from './create-checkbox'; -export * from './create-paragraph'; -export * from './create-icons'; -export * from './create-header'; -export * from './create-headline'; -export * from './create-ending'; -export * from './create-grid'; -export * from './create-captioned-text'; - -export * from './icons'; - -export * from './text'; diff --git a/src/app/shared/components/questionary-document/create-content/text.ts b/src/app/shared/components/questionary-document/create-content/text.ts deleted file mode 100644 index 29ae32eb..00000000 --- a/src/app/shared/components/questionary-document/create-content/text.ts +++ /dev/null @@ -1,16 +0,0 @@ -export function text( - literals: TemplateStringsArray, - ...placeholders: (string | number | null | undefined)[] -): string { - const resultPlaceholders = placeholders.map((p) => { - switch (p) { - case null: - case undefined: - return ''; - } - return String(p); - }); - return ( - resultPlaceholders.map((p, i) => literals[i] + p).join('') + literals[literals.length - 1] - ); -} diff --git a/src/app/shared/components/questionary-document/create-questionary/colors.ts b/src/app/shared/components/questionary-document/create-questionary/colors.ts deleted file mode 100644 index 8623c38c..00000000 --- a/src/app/shared/components/questionary-document/create-questionary/colors.ts +++ /dev/null @@ -1 +0,0 @@ -export const PRIMARY_COLOR = '#203764'; diff --git a/src/app/shared/components/questionary-document/create-questionary/create-footer.ts b/src/app/shared/components/questionary-document/create-questionary/create-footer.ts deleted file mode 100644 index 20f5d1ce..00000000 --- a/src/app/shared/components/questionary-document/create-questionary/create-footer.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { Margins, TDocumentHeaderFooterFunction } from 'pdfmake/build/pdfmake'; - -import { Content } from '../../../../document'; - -export function createFooter({ - margin, - text, - content, -}: { - margin: Margins; - text: string; - content: Content; -}): TDocumentHeaderFooterFunction { - const lineOffsetIn = 5; - const lineSizeIn = 100; - return () => ({ - margin: [margin[0], margin[1] + lineOffsetIn, margin[2], margin[3]], - columns: [ - [ - content, - { - canvas: [ - { - type: 'line', - x1: 0, - y1: -lineOffsetIn, - x2: lineSizeIn, - y2: -lineOffsetIn, - lineWidth: 0.5, - }, - ], - }, - { - style: { fontSize: 6 }, - text, - }, - ], - ], - }); -} diff --git a/src/app/shared/components/questionary-document/create-questionary/create-questionary.ts b/src/app/shared/components/questionary-document/create-questionary/create-questionary.ts deleted file mode 100644 index 153a5abe..00000000 --- a/src/app/shared/components/questionary-document/create-questionary/create-questionary.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { PageSize, TableLayoutFunctions, TDocumentDefinitions } from 'pdfmake/build/pdfmake'; - -import { cmMarginsToIn } from '../../../../document/cm-margins-to-in'; -import { createFooter } from './create-footer'; -import { createDefaultStyle, createStyles } from './create-styles'; -import { createTableLayouts } from './create-table-layouts'; -import { DocDef } from './doc-def'; - -export function createQuestionary( - data: DocDef -): [TDocumentDefinitions, { [name: string]: TableLayoutFunctions }] { - const leftMarginCm = 3; - const topMarginCm = 2; - const rightMarginCm = 1.5; - const footerMarginCm = 2; - - const pageMarginsIn = cmMarginsToIn( - leftMarginCm, - topMarginCm, - rightMarginCm, - footerMarginCm + data.footerHeight - ); - const footerMarginsIn = cmMarginsToIn(leftMarginCm, 0, rightMarginCm, 0); - - return [ - { - pageSize: 'A4' as PageSize, - pageMargins: pageMarginsIn, - content: data.content, - footer: createFooter({ - margin: footerMarginsIn, - text: data.footer, - content: data.prefooter, - }), - styles: createStyles(), - defaultStyle: createDefaultStyle(), - }, - createTableLayouts(), - ]; -} diff --git a/src/app/shared/components/questionary-document/create-questionary/create-styles.ts b/src/app/shared/components/questionary-document/create-questionary/create-styles.ts deleted file mode 100644 index 38d47c28..00000000 --- a/src/app/shared/components/questionary-document/create-questionary/create-styles.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { Style as PDFMakeStyle } from 'pdfmake/build/pdfmake'; - -import { FontFamily } from '../../../../document'; - -export enum Style {} - -export function createStyles(): { [name in Style]: PDFMakeStyle } { - return {}; -} - -export function createDefaultStyle(): PDFMakeStyle { - return { - font: FontFamily.Serif, - fontSize: 8, - lineHeight: 1, - }; -} diff --git a/src/app/shared/components/questionary-document/create-questionary/create-table-layouts.ts b/src/app/shared/components/questionary-document/create-questionary/create-table-layouts.ts deleted file mode 100644 index 67a02c8a..00000000 --- a/src/app/shared/components/questionary-document/create-questionary/create-table-layouts.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { TableLayoutFunctions } from 'pdfmake/build/pdfmake'; - -import { PRIMARY_COLOR } from './colors'; - -export enum Layout { - NoBorders = 'noBorders', - NoPaddings = 'noPaddings', - Header = 'header', - Wrapper = 'wrapper', - Underline = 'underline', -} - -const NO_PADDINGS: TableLayoutFunctions = { - paddingLeft: () => 0, - paddingRight: () => 0, - paddingTop: () => 0, - paddingBottom: () => 0, -}; - -const NO_BORDERS: TableLayoutFunctions = { - hLineWidth: () => 0, - vLineWidth: () => 0, -}; - -export function createTableLayouts(): { [name in Layout]: TableLayoutFunctions } { - return { - [Layout.NoBorders]: NO_BORDERS, - [Layout.NoPaddings]: NO_PADDINGS, - [Layout.Wrapper]: { - ...NO_BORDERS, - ...NO_PADDINGS, - }, - [Layout.Header]: { - fillColor(rowIdx) { - return rowIdx === 0 ? PRIMARY_COLOR : null; - }, - ...NO_BORDERS, - }, - [Layout.Underline]: { - hLineWidth: (idx) => (idx === 1 ? 0.5 : 0), - vLineWidth: () => 0, - paddingLeft: () => 0, - paddingRight: () => 0, - paddingTop: () => 0, - }, - }; -} diff --git a/src/app/shared/components/questionary-document/create-questionary/doc-def.ts b/src/app/shared/components/questionary-document/create-questionary/doc-def.ts deleted file mode 100644 index aa99f30c..00000000 --- a/src/app/shared/components/questionary-document/create-questionary/doc-def.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Content } from '../../../../document'; - -export interface DocDef { - content: (Content | string)[]; - prefooter?: Content; - footer?: string; - footerHeight?: number; -} diff --git a/src/app/shared/components/questionary-document/create-questionary/index.ts b/src/app/shared/components/questionary-document/create-questionary/index.ts deleted file mode 100644 index 6b6fef6b..00000000 --- a/src/app/shared/components/questionary-document/create-questionary/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export * from './create-questionary'; -export * from './create-table-layouts'; -export * from './doc-def'; -export * from './colors'; diff --git a/src/app/shared/components/questionary-document/get-beneficial-owner-doc-def.ts b/src/app/shared/components/questionary-document/get-beneficial-owner-doc-def.ts deleted file mode 100644 index fa92704c..00000000 --- a/src/app/shared/components/questionary-document/get-beneficial-owner-doc-def.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { BeneficialOwner } from '../../../thrift-services/ank/gen-model/questionary'; -import { getDocDef } from './beneficial-owner'; -import { DocDef } from './create-questionary'; - -export function getBeneficialOwnerDocDef( - beneficialOwner: BeneficialOwner, - companyName: string, - companyInn: string -): DocDef { - return getDocDef(beneficialOwner, companyName, companyInn); -} diff --git a/src/app/shared/components/questionary-document/get-beneficial-owners.ts b/src/app/shared/components/questionary-document/get-beneficial-owners.ts deleted file mode 100644 index 56cfbff6..00000000 --- a/src/app/shared/components/questionary-document/get-beneficial-owners.ts +++ /dev/null @@ -1,15 +0,0 @@ -import get from 'lodash-es/get'; - -import { BeneficialOwner } from '../../../thrift-services/ank/gen-model/questionary'; -import { Questionary } from '../../../thrift-services/ank/gen-model/questionary_manager'; - -export function getBeneficialOwners(questionary: Questionary): BeneficialOwner[] { - if (get(questionary, ['data', 'contractor', 'individual_entity'])) { - return questionary.data.contractor.individual_entity.russian_individual_entity - .beneficial_owners; - } else if (get(questionary, ['data', 'contractor', 'legal_entity'])) { - return questionary.data.contractor.legal_entity.russian_legal_entity.beneficial_owners; - } - console.error('Unknown questionary'); - return []; -} diff --git a/src/app/shared/components/questionary-document/get-entity-questionary-doc-def.ts b/src/app/shared/components/questionary-document/get-entity-questionary-doc-def.ts deleted file mode 100644 index e95893c7..00000000 --- a/src/app/shared/components/questionary-document/get-entity-questionary-doc-def.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { Questionary } from '../../../thrift-services/ank/gen-model/questionary_manager'; -import { DocDef } from './create-questionary'; -import { getDocDef as getRussianIndividualEntityDocDef } from './russian-individual-entity'; -import { getDocDef as getRussianLegalEntityDocDef } from './russian-legal-entity'; - -export function getEntityQuestionaryDocDef(questionary: Questionary): DocDef { - if (questionary.data.contractor.individual_entity) { - return getRussianIndividualEntityDocDef(questionary); - } else if (questionary.data.contractor.legal_entity) { - return getRussianLegalEntityDocDef(questionary); - } - console.error('Unknown questionary'); - return null; -} diff --git a/src/app/shared/components/questionary-document/index.ts b/src/app/shared/components/questionary-document/index.ts deleted file mode 100644 index 2091fa0e..00000000 --- a/src/app/shared/components/questionary-document/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './questionary-document.module'; -export * from './questionary-document.service'; diff --git a/src/app/shared/components/questionary-document/questionary-document.module.ts b/src/app/shared/components/questionary-document/questionary-document.module.ts deleted file mode 100644 index 03212c40..00000000 --- a/src/app/shared/components/questionary-document/questionary-document.module.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { NgModule } from '@angular/core'; - -import { DocumentModule } from '../../../document'; -import { QuestionaryDocumentService } from './questionary-document.service'; - -@NgModule({ - imports: [DocumentModule], - providers: [QuestionaryDocumentService], -}) -export class QuestionaryDocumentModule {} diff --git a/src/app/shared/components/questionary-document/questionary-document.service.ts b/src/app/shared/components/questionary-document/questionary-document.service.ts deleted file mode 100644 index 9b8461e8..00000000 --- a/src/app/shared/components/questionary-document/questionary-document.service.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { Injectable } from '@angular/core'; -import isEmpty from 'lodash-es/isEmpty'; -import { TCreatedPdf } from 'pdfmake/build/pdfmake'; -import { combineLatest, Observable, of } from 'rxjs'; - -import { DocumentService } from '../../../document'; -import { BeneficialOwner } from '../../../thrift-services/ank/gen-model/questionary'; -import { Questionary } from '../../../thrift-services/ank/gen-model/questionary_manager'; -import { createQuestionary } from './create-questionary'; -import { getBeneficialOwnerDocDef } from './get-beneficial-owner-doc-def'; -import { getBeneficialOwners } from './get-beneficial-owners'; -import { getEntityQuestionaryDocDef } from './get-entity-questionary-doc-def'; -import { getCompanyInfo } from './select-data'; - -@Injectable() -export class QuestionaryDocumentService { - constructor(private documentService: DocumentService) {} - - createDoc(questionary: Questionary): Observable { - return this.documentService.createPdf( - ...createQuestionary(getEntityQuestionaryDocDef(questionary)) - ); - } - - createBeneficialOwnerDoc( - beneficialOwner: BeneficialOwner, - companyName: string, - companyInn: string - ): Observable { - const docDef = getBeneficialOwnerDocDef(beneficialOwner, companyName, companyInn); - return this.documentService.createPdf(...createQuestionary(docDef)); - } - - createBeneficialOwnerDocs(questionary: Questionary): Observable { - if (questionary) { - const beneficialOwners = getBeneficialOwners(questionary); - if (!isEmpty(beneficialOwners)) { - const { companyName, companyInn } = getCompanyInfo(questionary); - const beneficialOwnersDocs = beneficialOwners.map((beneficialOwner) => - this.createBeneficialOwnerDoc(beneficialOwner, companyName, companyInn) - ); - return combineLatest(beneficialOwnersDocs); - } - } - return of([]); - } -} diff --git a/src/app/shared/components/questionary-document/russian-individual-entity/get-doc-def.ts b/src/app/shared/components/questionary-document/russian-individual-entity/get-doc-def.ts deleted file mode 100644 index e0ebbcee..00000000 --- a/src/app/shared/components/questionary-document/russian-individual-entity/get-doc-def.ts +++ /dev/null @@ -1,246 +0,0 @@ -import get from 'lodash-es/get'; -import isEmpty from 'lodash-es/isEmpty'; - -import { getUnionKey } from '@cc/utils/get-union-key'; -import { toOptional } from '@cc/utils/to-optional'; - -import { - MonthOperationCount, - MonthOperationSum, - PropertyInfoDocumentType, - WithoutChiefAccountant, -} from '../../../../thrift-services/ank/gen-model/questionary'; -import { Questionary } from '../../../../thrift-services/ank/gen-model/questionary_manager'; -import { - createEnding, - createHeader, - createHeadline, - createInlineCheckbox, - createInlineCheckboxWithTitle, - createVerticalCheckboxWithTitle, - createVerticalParagraph, -} from '../create-content'; -import { DocDef } from '../create-questionary'; -import { getBusinessInfo, getShopLocationURL, SIMPLE_YES_NO, toYesNo, YesNo } from '../select-data'; -import { getIndividualEntityName } from './get-individual-entity-name'; - -const EMPTY = ''; - -/* eslint-disable @typescript-eslint/naming-convention */ -export function getDocDef(questionary: Questionary): DocDef { - const { data } = toOptional(questionary); - const { contractor, shop_info, contact_info } = toOptional(data); - const { location, details } = toOptional(shop_info); - const { name: brandName } = toOptional(details); - const { phone_number, email } = toOptional(contact_info); - const { - additional_info, - russian_private_entity, - registration_info, - inn, - snils, - property_info_document_type, - individual_person_categories, - beneficial_owners, - residency_info, - } = toOptional(get(contractor, ['individual_entity', 'russian_individual_entity'])); - const { - NKO_relation_target, - relationship_with_NKO, - month_operation_sum, - month_operation_count, - benefit_third_parties, - relation_individual_entity, - } = toOptional(additional_info); - const { fio } = toOptional(russian_private_entity); - const registration_place = get(registration_info, [ - 'individual_registration_info', - 'registration_place', - ]); - const documentType = getUnionKey(property_info_document_type); - const { foreign_public_person, foreign_relative_person } = toOptional( - individual_person_categories - ); - const usa_tax_resident = get(residency_info, ['individual_residency_info', 'usa_tax_resident']); - - const name = getIndividualEntityName(fio); - const url = getShopLocationURL(location); - const { hasChiefAccountant, staffCount, accountingOrgInn, accounting } = getBusinessInfo( - additional_info - ); - const pdlRelationDegree = EMPTY; // TODO - const hasBeneficialOwner = !isEmpty(beneficial_owners); - - return { - content: [ - createHeader('Приложение №'), - createHeadline( - 'ОПРОСНЫЙ ЛИСТ – ИНДИВИДУАЛЬНОГО ПРЕДПРИНИМАТЕЛЯ ИЛИ ФИЗИЧЕСКОГО ЛИЦА, ЗАНИМАЮЩЕГОСЯ В УСТАНОВЛЕННОМ ЗАКОНОДАТЕЛЬСТВОМ РФ ПОРЯДКЕ ЧАСТНОЙ ПРАКТИКОЙ' - ), - createVerticalParagraph('1. Основные сведения о Клиенте', [ - [`1.1. Наименование: ${name || EMPTY}`, `1.2. ИНН: ${inn || EMPTY}`], - [ - `1.3. Фирменное наименование: ${brandName || EMPTY}`, - `1.4. СНИЛС №: ${snils || EMPTY}`, - ], - ]), - createVerticalParagraph('2. Контактная информация', [ - [ - `2.1. Телефон: ${phone_number || EMPTY}`, - `2.2. Сайт (Url): ${url || EMPTY}`, - `2.3. Email: ${email || EMPTY}`, - ], - ]), - createVerticalParagraph( - '3. Сведения о целях установления и предполагаемом характере деловых отношений с НКО', - [ - [ - `3.1. Цели установления отношений: ${ - NKO_relation_target || 'подключение интернет-эквайринга' - }`, - `3.2. Характер отношений: ${relationship_with_NKO || 'долгосрочный'}`, - ], - ] - ), - createVerticalParagraph('4. Планируемые операции по счету, в месяц', [ - [ - createVerticalCheckboxWithTitle( - '4.1. Количество операций:', - [ - [MonthOperationCount.lt_ten, 'до 10'], - [MonthOperationCount.btw_ten_to_fifty, '10 - 50'], - [MonthOperationCount.gt_fifty, 'свыше 50'], - ], - month_operation_count - ), - createVerticalCheckboxWithTitle( - '4.2. Сумма операций:', - [ - [MonthOperationSum.lt_five_hundred_thousand, 'до 500 000'], - [ - MonthOperationSum.btw_five_hundred_thousand_to_one_million, - '500 000 - 1 000 000', - ], - [MonthOperationSum.gt_one_million, 'свыше 1 000 000'], - ], - month_operation_sum - ), - ], - ]), - createVerticalParagraph( - '5. Адрес фактического осуществления (ведения) деятельности', - registration_place || EMPTY - ), - createVerticalParagraph( - '6. Тип документа, подтверждающий право нахождения по фактическому адресу', - [ - [ - createInlineCheckbox( - [ - ['lease_contract', 'Договор аренды'], - ['sublease_contract', 'Договор субаренды'], - ['certificate_of_ownership', 'Свидетельство о праве собственности'], - ], - documentType - ), - ], - ] - ), - createVerticalParagraph('7. Сведения о хозяйственной деятельности', [ - [ - createInlineCheckboxWithTitle( - '7.1. Наличие в штате главного бухгалтера', - SIMPLE_YES_NO, - hasChiefAccountant - ), - `7.2. Штатная численность в организации: ${staffCount || EMPTY}`, - ], - [ - { - ...createVerticalCheckboxWithTitle( - '7.3. Бухгалтерский учет осуществляет:', - [ - ['head_accounting', 'ИП лично'], - [ - 'accounting_organization', - `Организация ведущая бух. учет: ИНН: ${ - accountingOrgInn || EMPTY - }`, - ], - ['individual_accountant', 'Бухгалтер – индивидуальный специалист'], - ], - accounting - ), - colSpan: 2, - }, - ], - ]), - createVerticalParagraph( - '8. Принадлежность физического лица к некоторым категория граждан', - [ - [ - { - ...createInlineCheckboxWithTitle( - '8.1. Принадлежность к категории ПДЛ¹', - SIMPLE_YES_NO, - toYesNo(foreign_public_person) - ), - colSpan: 2, - }, - ], - [ - createInlineCheckboxWithTitle( - '8.2. Является родственником ПДЛ', - SIMPLE_YES_NO, - toYesNo(foreign_relative_person) - ), - `8.3. Степень родства: ${pdlRelationDegree || EMPTY}`, - ], - ] - ), - createVerticalParagraph('9. Наличие выгодоприобретателя²', [ - [ - createInlineCheckbox( - [ - [YesNo.No, 'Нет'], - [ - YesNo.Yes, - 'Да (обязательное заполнение анкеты Выгодоприобретателя по форме НКО)', - ], - ], - toYesNo(benefit_third_parties) - ), - ], - ]), - createVerticalParagraph('10. Наличие бенефициарного владельца³', [ - [ - createInlineCheckbox( - [ - [YesNo.No, 'Нет'], - [ - YesNo.Yes, - 'Да (обязательное заполнение приложение для Бенефициарного владельца по форме НКО)', - ], - ], - toYesNo(hasBeneficialOwner) - ), - ], - ]), - createVerticalParagraph( - '11. Имеются ли решения о ликвидации или о любой процедуре, применяемой в деле о банкротстве', - [[createInlineCheckbox(SIMPLE_YES_NO, toYesNo(!!relation_individual_entity))]] - ), - createVerticalParagraph( - '12. Являетесь ли Вы налоговым резидентом США или иного иностранного государства', - [[createInlineCheckbox(SIMPLE_YES_NO, toYesNo(usa_tax_resident))]] - ), - ], - prefooter: createEnding(), - footer: [ - '¹ Публичные должностные лица, включая российские, иностранные и международные.', - '² Выгодоприобретатель - лицо, к выгоде которого действует клиент, в том числе на основании агентского договора, договоров поручения, комиссии и доверительного управления, при проведении операций с денежными средствами и иным имуществом.', - '³ Бенефициарный владелец - физическое лицо, которое в конечном счете прямо или косвенно (через третьих лиц) владеет (имеет преобладающее участие более 25 процентов в капитале) клиентом - юридическим лицом либо имеет возможность контролировать действия клиента. Бенефициарным владельцем клиента - физического лица считается это лицо, за исключением случаев, если имеются основания полагать, что бенефициарным владельцем является иное физическое лицо.', - ].join('\n'), - footerHeight: 3.6, - }; -} diff --git a/src/app/shared/components/questionary-document/russian-individual-entity/get-individual-entity-name.ts b/src/app/shared/components/questionary-document/russian-individual-entity/get-individual-entity-name.ts deleted file mode 100644 index ddf3637a..00000000 --- a/src/app/shared/components/questionary-document/russian-individual-entity/get-individual-entity-name.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function getIndividualEntityName(fio: string) { - return `ИП ${fio}`; -} diff --git a/src/app/shared/components/questionary-document/russian-individual-entity/index.ts b/src/app/shared/components/questionary-document/russian-individual-entity/index.ts deleted file mode 100644 index 5adfcf14..00000000 --- a/src/app/shared/components/questionary-document/russian-individual-entity/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './get-doc-def'; diff --git a/src/app/shared/components/questionary-document/russian-legal-entity/get-authority-confirming-document.ts b/src/app/shared/components/questionary-document/russian-legal-entity/get-authority-confirming-document.ts deleted file mode 100644 index 4373f8a1..00000000 --- a/src/app/shared/components/questionary-document/russian-legal-entity/get-authority-confirming-document.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { toOptional } from '@cc/utils/to-optional'; - -import { AuthorityConfirmingDocumentType } from '../../../../model/questionary'; -import { AuthorityConfirmingDocument } from '../../../../thrift-services/ank/gen-model/questionary'; -import { getDate } from '../select-data'; - -const MAP_AUTHORITY_CONFIRMING_DOCUMENT_TYPE: { - [name in AuthorityConfirmingDocumentType]: string; -} = { - solePartyDecision: 'Решение единственного участника', - meetingOfShareholders: 'Протокол общего собрания участников', - meetingOfParticipants: 'Протокол общего собрания акционеров', -}; - -export function getAuthorityConfirmingDocument( - authorityConfirmingDocument: AuthorityConfirmingDocument -): string { - const { type, number: num, date } = toOptional(authorityConfirmingDocument); - if (type || num || date) { - const printedType = MAP_AUTHORITY_CONFIRMING_DOCUMENT_TYPE[type] || type; - const printedNumber = num ? `№${num}` : null; - const printedDate = date ? `от ${getDate(date)}` : null; - return [printedType, printedNumber, printedDate].filter((i) => i).join(' '); - } - return null; -} diff --git a/src/app/shared/components/questionary-document/russian-legal-entity/get-doc-def.ts b/src/app/shared/components/questionary-document/russian-legal-entity/get-doc-def.ts deleted file mode 100644 index 66fbd60d..00000000 --- a/src/app/shared/components/questionary-document/russian-legal-entity/get-doc-def.ts +++ /dev/null @@ -1,297 +0,0 @@ -import get from 'lodash-es/get'; -import isEmpty from 'lodash-es/isEmpty'; - -import { getUnionKey } from '@cc/utils/get-union-key'; -import { toOptional } from '@cc/utils/to-optional'; - -import { - MonthOperationCount, - MonthOperationSum, - PropertyInfoDocumentType, - WithoutChiefAccountant, -} from '../../../../thrift-services/ank/gen-model/questionary'; -import { Questionary } from '../../../../thrift-services/ank/gen-model/questionary_manager'; -import { - createEnding, - createHeader, - createHeadline, - createInlineCheckbox, - createInlineCheckboxWithTitle, - createVerticalCheckboxWithTitle, - createVerticalParagraph, -} from '../create-content'; -import { DocDef } from '../create-questionary'; -import { - getBusinessInfo, - getContactInfo, - getShopLocationURL, - SIMPLE_YES_NO, - toYesNo, - YesNo, -} from '../select-data'; -import { getAuthorityConfirmingDocument } from './get-authority-confirming-document'; - -const EMPTY = ''; - -/* eslint-disable @typescript-eslint/naming-convention */ -export function getDocDef(questionary: Questionary): DocDef { - const { data } = toOptional(questionary); - const { contractor, shop_info, contact_info } = toOptional(data); - const { location, details } = toOptional(shop_info); - const { name } = toOptional(details); - const { phone_number, email } = toOptional(contact_info); - const russian_legal_entity = get(contractor, ['legal_entity', 'russian_legal_entity']); - const { - additional_info, - inn, - name: brandName, - legal_owner_info, - beneficial_owners, - property_info_document_type, - registration_info, - residency_info, - } = toOptional(russian_legal_entity); - const registration_place = get(registration_info, [ - 'legal_registration_info', - 'registration_place', - ]); - const { tax_resident, fatca, owner_resident } = toOptional( - get(residency_info, 'legal_residency_info') - ); - const { - relation_individual_entity, - benefit_third_parties, - NKO_relation_target, - relationship_with_NKO, - month_operation_sum, - month_operation_count, - } = toOptional(additional_info); - const { - pdl_relation_degree, - pdl_category, - snils, - authority_confirming_document, - russian_private_entity, - } = toOptional(legal_owner_info); - const { fio, contact_info: privateContactInfo } = toOptional(russian_private_entity); - const documentType = getUnionKey(property_info_document_type); - - const url = getShopLocationURL(location); - const contact = getContactInfo(privateContactInfo); - const authorityConfirmingDocumentInfo = getAuthorityConfirmingDocument( - authority_confirming_document - ); - const { hasChiefAccountant, staffCount, accounting, accountingOrgInn } = getBusinessInfo( - additional_info - ); - const hasBeneficialOwner = !isEmpty(beneficial_owners); - - return { - content: [ - createHeader('Приложение №'), - createHeadline( - 'ОПРОСНЫЙ ЛИСТ – ЮРИДИЧЕСКОГО ЛИЦА (НЕ ЯВЛЯЮЩЕГОСЯ КРЕДИТНОЙ ОРГАНИЗАЦИЕЙ)' - ), - createVerticalParagraph('1. Основные сведения о Клиенте', [ - [`1.1. Наименование: ${name || EMPTY}`, `1.2. ИНН: ${inn || EMPTY}`], - [{ text: `1.3. Фирменное наименование: ${brandName || EMPTY}`, colSpan: 2 }], - ]), - createVerticalParagraph('2. Контактная информация', [ - [ - `2.1. Телефон: ${phone_number || EMPTY}`, - `2.2. Сайт (Url): ${url || EMPTY}`, - `2.3. Email: ${email || EMPTY}`, - ], - ]), - createVerticalParagraph( - '3. Сведения о целях установления и предполагаемом характере деловых отношений с НКО', - [ - [ - `3.1. Цели установления отношений: ${ - NKO_relation_target || 'подключение интернет-эквайринга' - }`, - `3.2. Характер отношений: ${relationship_with_NKO || 'долгосрочный'}`, - ], - ] - ), - createVerticalParagraph('4. Планируемые операции, в месяц', [ - [ - createVerticalCheckboxWithTitle( - '4.1. Количество операций:', - [ - [MonthOperationCount.lt_ten, 'до 10'], - [MonthOperationCount.btw_ten_to_fifty, '10 - 50'], - [MonthOperationCount.gt_fifty, 'свыше 50'], - ], - month_operation_count - ), - createVerticalCheckboxWithTitle( - '4.2. Сумма операций:', - [ - [MonthOperationSum.lt_five_hundred_thousand, 'до 500 000'], - [ - MonthOperationSum.btw_five_hundred_thousand_to_one_million, - '500 000 - 1 000 000', - ], - [MonthOperationSum.gt_one_million, 'свыше 1 000 000'], - ], - month_operation_sum - ), - ], - ]), - createVerticalParagraph( - '5. Сведения о единоличном исполнительном органе юридического лица', - [ - [ - { - text: `5.1. ФИО Единоличного исполнительного органа: ${fio || EMPTY}`, - colSpan: 2, - }, - ], - [ - { - text: `5.2. Действует на основании: ${ - authorityConfirmingDocumentInfo || EMPTY - }`, - colSpan: 2, - }, - ], - [ - `5.3. СНИЛС №: ${snils || EMPTY}`, - `5.4. Контактная информация (телефон, email): ${contact || EMPTY}`, - ], - ] - ), - createVerticalParagraph( - '6. Данные о фактическом местонахождении органа управления (Руководителя)', - registration_place || EMPTY - ), - createVerticalParagraph( - '7. Тип документа, подтверждающий право нахождения по фактическому адресу органа управления (Руководителя)', - [ - [ - createInlineCheckbox( - [ - ['lease_contract', 'Договор аренды'], - ['sublease_contract', 'Договор субаренды'], - ['certificate_of_ownership', 'Свидетельство о праве собственности'], - ], - documentType - ), - ], - ] - ), - createVerticalParagraph('8. Сведения о хозяйственной деятельности организации', [ - [ - createInlineCheckboxWithTitle( - '8.1. Наличие в штате главного бухгалтера', - SIMPLE_YES_NO, - hasChiefAccountant - ), - `8.2. Штатная численность в организации: ${staffCount || EMPTY}`, - ], - [ - createVerticalCheckboxWithTitle( - '8.3. Бухгалтерский учет осуществляет:', - [ - ['head_accounting', 'Руководитель организации'], - [ - 'accounting_organization', - `Организация ведущая бух. учет: ИНН: ${accountingOrgInn || EMPTY}`, - ], - ['individual_accountant', 'Бухгалтер – индивидуальный специалист'], - ], - accounting - ), - ], - ]), - createVerticalParagraph( - '9. Принадлежность Единоличного исполнительного органа к некоторым категориям граждан', - [ - [ - createInlineCheckboxWithTitle( - '9.1. Принадлежность к категории ПДЛ¹', - SIMPLE_YES_NO, - toYesNo(pdl_category) - ), - ], - [ - createInlineCheckboxWithTitle( - '9.2. Является родственником ПДЛ', - SIMPLE_YES_NO, - toYesNo(!!pdl_relation_degree) - ), - `9.3. Степень родства: ${pdl_relation_degree || EMPTY}`, - ], - ] - ), - createVerticalParagraph('10. Наличие выгодоприобретателя²', [ - [ - [ - createInlineCheckbox( - [ - [YesNo.No, 'Нет'], - [ - YesNo.Yes, - 'Да (обязательное заполнение анкеты Выгодоприобретателя по форме НКО)', - ], - ], - toYesNo(benefit_third_parties) - ), - ], - ], - ]), - createVerticalParagraph('11. Наличие бенефициарного владельца³', [ - [ - createInlineCheckbox( - [ - [YesNo.No, 'Нет'], - [ - YesNo.Yes, - 'Да (обязательное заполнение приложение для Бенефициарного владельца)', - ], - ], - toYesNo(hasBeneficialOwner) - ), - ], - ]), - createVerticalParagraph( - '12. Имеются ли решения о ликвидации или о любой процедуре, применяемой в деле о банкротстве, в отношении Вашей компании', - [[createInlineCheckbox(SIMPLE_YES_NO, toYesNo(!!relation_individual_entity))]] - ), - createVerticalParagraph('13. Информация об иностранном налоговом резидентстве', [ - [ - { - text: - '13.1. Является ли Ваша организация налоговым резидентом США или иного иностранного государства?', - colSpan: 5, - }, - createInlineCheckbox(SIMPLE_YES_NO, toYesNo(tax_resident)), - ], - [ - { - text: - '13.2. Является ли Бенефициарный владелец Вашей организации с долей владения 10% и более налоговым резидентом иностранного государства?', - colSpan: 5, - }, - createInlineCheckbox(SIMPLE_YES_NO, toYesNo(owner_resident)), - ], - [ - { - text: - '13.3. Является ли Ваша организация Финансовым Институтом в соответствии с FATCA и 173-ФЗ от 28.06.2014?', - colSpan: 5, - }, - createInlineCheckbox(SIMPLE_YES_NO, toYesNo(fatca)), - ], - ]), - ], - prefooter: createEnding(), - footer: [ - '¹ Публичные должностные лица, включая российские, иностранные и международные.', - '² Выгодоприобретатель - лицо, к выгоде которого действует клиент, в том числе на основании агентского договора, договоров поручения, комиссии и доверительного управления, при проведении операций с денежными средствами и иным имуществом.', - '³ Бенефициарный владелец - физическое лицо, которое в конечном счете прямо или косвенно (через третьих лиц) владеет (имеет преобладающее участие более 25 процентов в капитале) клиентом - юридическим лицом либо имеет возможность контролировать действия клиента. Бенефициарным владельцем клиента - физического лица считается это лицо, за исключением случаев, если имеются основания полагать, что бенефициарным владельцем является иное физическое лицо.', - ].join('\n'), - footerHeight: 3.2, - }; -} diff --git a/src/app/shared/components/questionary-document/russian-legal-entity/index.ts b/src/app/shared/components/questionary-document/russian-legal-entity/index.ts deleted file mode 100644 index 5adfcf14..00000000 --- a/src/app/shared/components/questionary-document/russian-legal-entity/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './get-doc-def'; diff --git a/src/app/shared/components/questionary-document/select-data/get-business-info.ts b/src/app/shared/components/questionary-document/select-data/get-business-info.ts deleted file mode 100644 index ac6ebf98..00000000 --- a/src/app/shared/components/questionary-document/select-data/get-business-info.ts +++ /dev/null @@ -1,32 +0,0 @@ -import get from 'lodash-es/get'; - -import { getUnionKey } from '@cc/utils/get-union-key'; -import { toOptional } from '@cc/utils/to-optional'; - -import { - AdditionalInfo, - WithoutChiefAccountant, -} from '../../../../thrift-services/ank/gen-model/questionary'; -import { hasChiefAccountant } from './has-chief-accountant'; -import { YesNo } from './yes-no'; - -export interface BusinessInfo { - hasChiefAccountant: YesNo; - staffCount: number; - accounting: keyof WithoutChiefAccountant; - accountingOrgInn?: string; -} - -export function getBusinessInfo(additionalInfo: AdditionalInfo): BusinessInfo { - const { accountant_info, staff_count } = toOptional(additionalInfo); - return { - hasChiefAccountant: hasChiefAccountant(accountant_info), - staffCount: staff_count, - accounting: getUnionKey(toOptional(accountant_info).without_chief_accountant), - accountingOrgInn: get( - accountant_info, - ['without_chief_accountant', 'accounting_organization', 'inn'], - null - ), - }; -} diff --git a/src/app/shared/components/questionary-document/select-data/get-company-info.ts b/src/app/shared/components/questionary-document/select-data/get-company-info.ts deleted file mode 100644 index 5b4312ab..00000000 --- a/src/app/shared/components/questionary-document/select-data/get-company-info.ts +++ /dev/null @@ -1,15 +0,0 @@ -import get from 'lodash-es/get'; - -import { Questionary } from '../../../../thrift-services/ank/gen-model/questionary_manager'; - -export function getCompanyInfo( - questionary: Questionary -): { companyName: string; companyInn: string } { - return { - companyName: get(questionary, ['data', 'shop_info', 'details', 'name'], ''), - companyInn: - get(questionary, 'data.contractor.legal_entity.russian_legal_entity') || - get(questionary, 'data.contractor.individual_entity.russian_individual_entity') || - '', - }; -} diff --git a/src/app/shared/components/questionary-document/select-data/get-contact-info.ts b/src/app/shared/components/questionary-document/select-data/get-contact-info.ts deleted file mode 100644 index 0cae4553..00000000 --- a/src/app/shared/components/questionary-document/select-data/get-contact-info.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { toOptional } from '@cc/utils/to-optional'; - -import { ContactInfo } from '../../../../thrift-services/ank/gen-model/questionary'; - -export function getContactInfo(contactInfo: ContactInfo): string { - const { phone_number, email } = toOptional(contactInfo); - return [phone_number, email].filter((i) => i).join(', '); -} diff --git a/src/app/shared/components/questionary-document/select-data/get-date.ts b/src/app/shared/components/questionary-document/select-data/get-date.ts deleted file mode 100644 index 13b4083f..00000000 --- a/src/app/shared/components/questionary-document/select-data/get-date.ts +++ /dev/null @@ -1,5 +0,0 @@ -import * as moment from 'moment'; - -export function getDate(date: string): string { - return date ? moment(date).locale('ru').utc().format('L') : null; -} diff --git a/src/app/shared/components/questionary-document/select-data/get-identity-document.ts b/src/app/shared/components/questionary-document/select-data/get-identity-document.ts deleted file mode 100644 index eb11fb4b..00000000 --- a/src/app/shared/components/questionary-document/select-data/get-identity-document.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { IdentityDocument } from '../../../../thrift-services/ank/gen-model/questionary'; - -export function getIdentityDocument( - identityDocument: IdentityDocument -): { name?: string; seriesNumber?: string; issuer?: string; issuedAt?: string } | null { - if (identityDocument && identityDocument.russian_domestic_password) { - const { - series_number, - issuer, - issued_at, - issuer_code, - } = identityDocument.russian_domestic_password; - return { - name: 'Паспорт РФ', - seriesNumber: series_number, - issuer: [issuer, issuer_code].filter((i) => !!i).join(', '), - issuedAt: issued_at, - }; - } - console.error('Unknown identity document'); - return {}; -} diff --git a/src/app/shared/components/questionary-document/select-data/get-percent.ts b/src/app/shared/components/questionary-document/select-data/get-percent.ts deleted file mode 100644 index 7815af4c..00000000 --- a/src/app/shared/components/questionary-document/select-data/get-percent.ts +++ /dev/null @@ -1,5 +0,0 @@ -import isEmpty from 'lodash-es/isEmpty'; - -export function getPercent(value: string | number): string { - return isEmpty(value) ? null : `${value}%`; -} diff --git a/src/app/shared/components/questionary-document/select-data/get-shop-location-url.ts b/src/app/shared/components/questionary-document/select-data/get-shop-location-url.ts deleted file mode 100644 index 3382a8ab..00000000 --- a/src/app/shared/components/questionary-document/select-data/get-shop-location-url.ts +++ /dev/null @@ -1,7 +0,0 @@ -import get from 'lodash-es/get'; - -import { ShopLocation } from '../../../../thrift-services/ank/gen-model/questionary'; - -export function getShopLocationURL(shopLocation: ShopLocation): string { - return get(shopLocation, 'url', null); -} diff --git a/src/app/shared/components/questionary-document/select-data/has-chief-accountant.ts b/src/app/shared/components/questionary-document/select-data/has-chief-accountant.ts deleted file mode 100644 index cbb0cd75..00000000 --- a/src/app/shared/components/questionary-document/select-data/has-chief-accountant.ts +++ /dev/null @@ -1,8 +0,0 @@ -import get from 'lodash-es/get'; - -import { AccountantInfo } from '../../../../thrift-services/ank/gen-model/questionary'; -import { toYesNo, YesNo } from './yes-no'; - -export function hasChiefAccountant(accountantInfo: AccountantInfo): YesNo { - return toYesNo(!!get(accountantInfo, 'with_chief_accountant', false)); -} diff --git a/src/app/shared/components/questionary-document/select-data/index.ts b/src/app/shared/components/questionary-document/select-data/index.ts deleted file mode 100644 index f4baa79c..00000000 --- a/src/app/shared/components/questionary-document/select-data/index.ts +++ /dev/null @@ -1,10 +0,0 @@ -export * from './yes-no'; -export * from './has-chief-accountant'; -export * from './get-shop-location-url'; -export * from './get-contact-info'; -export * from './get-business-info'; -export * from './get-identity-document'; -export * from './get-company-info'; -export * from './get-date'; -export * from './get-percent'; -export * from './simple-yes-no'; diff --git a/src/app/shared/components/questionary-document/select-data/simple-yes-no.ts b/src/app/shared/components/questionary-document/select-data/simple-yes-no.ts deleted file mode 100644 index a937577d..00000000 --- a/src/app/shared/components/questionary-document/select-data/simple-yes-no.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { YesNo } from './yes-no'; - -export const SIMPLE_YES_NO: [YesNo, string][] = [ - [YesNo.Yes, 'Да'], - [YesNo.No, 'Нет'], -]; diff --git a/src/app/shared/components/questionary-document/select-data/yes-no.spec.ts b/src/app/shared/components/questionary-document/select-data/yes-no.spec.ts deleted file mode 100644 index f9840460..00000000 --- a/src/app/shared/components/questionary-document/select-data/yes-no.spec.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { toYesNo, YesNo } from './yes-no'; - -describe('toYesNo', () => { - it('null should return -1', () => { - expect(toYesNo(null)).toBe(-1); - }); - - it('undefined should return -1', () => { - expect(toYesNo(undefined)).toBe(-1); - }); - - it('true should return yes', () => { - expect(toYesNo(true)).toBe(YesNo.Yes); - }); - - it('false should return no', () => { - expect(toYesNo(false)).toBe(YesNo.No); - }); -}); diff --git a/src/app/shared/components/questionary-document/select-data/yes-no.ts b/src/app/shared/components/questionary-document/select-data/yes-no.ts deleted file mode 100644 index 5e40c4e6..00000000 --- a/src/app/shared/components/questionary-document/select-data/yes-no.ts +++ /dev/null @@ -1,11 +0,0 @@ -export enum YesNo { - Yes, - No, -} - -export function toYesNo(value: boolean): YesNo { - if (value === null || value === undefined) { - return -1; - } - return value ? YesNo.Yes : YesNo.No; -} diff --git a/src/app/shared/services/app-auth-guard/roles.ts b/src/app/shared/services/app-auth-guard/roles.ts index eb369818..df9df27b 100644 --- a/src/app/shared/services/app-auth-guard/roles.ts +++ b/src/app/shared/services/app-auth-guard/roles.ts @@ -7,11 +7,6 @@ export enum PaymentAdjustmentRole { Create = 'adjustment:create', } -export enum ChargebackRole { - Manage = 'manage_chargebacks', - View = 'view_chargebacks', -} - export enum OperationRole { SearchOperations = 'search_ops', SearchPayments = 'search_payments', diff --git a/src/app/styles/themes/_theme.scss b/src/app/styles/themes/_theme.scss index 1f345f83..fb7af414 100644 --- a/src/app/styles/themes/_theme.scss +++ b/src/app/styles/themes/_theme.scss @@ -4,7 +4,6 @@ @import '../../shared/components/shared-components-themes'; @import '../../sections/party/party-theme'; -@import '../../sections/chargeback-details/chargeback-details-theme'; @import '../../sections/payment-routing-rules/payment-routing-rules-theme'; @import '../../sections/party-claim/party-claim-theme'; @@ -14,12 +13,10 @@ body.#{map-get($theme, name)} { @include mat.all-component-themes($theme); @include cc-party-theme($theme); - @include cc-chargeback-details-theme($theme); @include cc-components-themes($theme); @include cc-shared-components-themes($theme); @include cc-payment-routing-rules-theme($theme); @include cc-party-claim-theme($theme); - @include cc-extract-party-modifications-theme($theme); @include cc-not-found-theme($theme); } } diff --git a/src/app/thrift-services/ank/ank.module.ts b/src/app/thrift-services/ank/ank.module.ts deleted file mode 100644 index dbaefb0c..00000000 --- a/src/app/thrift-services/ank/ank.module.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { NgModule } from '@angular/core'; - -import { AnkService } from './ank.service'; - -@NgModule({ providers: [AnkService] }) -export class AnkModule {} diff --git a/src/app/thrift-services/ank/ank.service.ts b/src/app/thrift-services/ank/ank.service.ts deleted file mode 100644 index 7bfe7f82..00000000 --- a/src/app/thrift-services/ank/ank.service.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { Injectable, NgZone } from '@angular/core'; -import { Observable } from 'rxjs'; - -import { KeycloakTokenInfoService } from '../../keycloak-token-info.service'; -import { toGenReference } from '../converters'; -import { PartyID } from '../damsel/gen-model/domain'; -import { ThriftService } from '../services/thrift/thrift-service'; -import { - QuestionaryID, - QuestionaryParams, - Snapshot, - Version, -} from './gen-model/questionary_manager'; -import * as QuestionaryManager from './gen-nodejs/QuestionaryManager'; - -@Injectable() -export class AnkService extends ThriftService { - constructor(zone: NgZone, keycloakTokenInfoService: KeycloakTokenInfoService) { - super(zone, keycloakTokenInfoService, '/v1/questionary', QuestionaryManager); - } - - save = (params: QuestionaryParams, version: Version): Observable => - this.toObservableAction('Save')(params, version); - - get = ( - questId: QuestionaryID, - partyId: PartyID, - reference = toGenReference() - ): Observable => this.toObservableAction('Get')(questId, partyId, reference); -} diff --git a/src/app/thrift-services/ank/index.ts b/src/app/thrift-services/ank/index.ts deleted file mode 100644 index 650eaebd..00000000 --- a/src/app/thrift-services/ank/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './ank.module'; diff --git a/src/app/thrift-services/index.ts b/src/app/thrift-services/index.ts index 34b4e63c..6caf7f50 100644 --- a/src/app/thrift-services/index.ts +++ b/src/app/thrift-services/index.ts @@ -1,8 +1,6 @@ export * from './filters'; export * from './utils/thrift-instance'; export * from './utils/get-thrift-instance'; -export * from './ank'; export * from './file-storage'; export * from './messages'; export * from './damsel'; -export * from './skipper'; diff --git a/src/app/thrift-services/skipper/chargebacks.service.ts b/src/app/thrift-services/skipper/chargebacks.service.ts deleted file mode 100644 index 3e3c9f92..00000000 --- a/src/app/thrift-services/skipper/chargebacks.service.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { Injectable, NgZone } from '@angular/core'; -import { Observable } from 'rxjs'; -import { map } from 'rxjs/operators'; - -import { KeycloakTokenInfoService } from '../../keycloak-token-info.service'; -import { ThriftService } from '../services/thrift/thrift-service'; -import { ID } from './gen-model/base'; -import { ChargebackData, ChargebackEvent, ChargebackFilter } from './gen-model/skipper'; -import * as Skipper from './gen-nodejs/Skipper'; -import { createSkipperInstance, skipperInstanceToObject } from './skipper-instance-utils'; - -@Injectable() -export class ChargebacksService extends ThriftService { - constructor(zone: NgZone, keycloakTokenInfoService: KeycloakTokenInfoService) { - super(zone, keycloakTokenInfoService, '/v1/skipper', Skipper); - } - - getChargebacks = (filter: ChargebackFilter): Observable => - this.toObservableAction( - 'getChargebacks', - false - )(createSkipperInstance('skipper', 'ChargebackFilter', filter)).pipe( - map((d) => skipperInstanceToObject('skipper', 'ChargebackData', d)) - ); - - getChargeback = (invoiceID: ID, paymentID: ID, chargebackID: ID): Observable => - this.toObservableAction('getChargeback', false)( - createSkipperInstance('base', 'ID', invoiceID), - createSkipperInstance('base', 'ID', paymentID), - createSkipperInstance('base', 'ID', chargebackID) - ).pipe(map((d) => skipperInstanceToObject('skipper', 'ChargebackData', d))); - - processChargebackData = (event: ChargebackEvent): Observable => - this.toObservableAction( - 'processChargebackData', - false - )(createSkipperInstance('skipper', 'ChargebackEvent', event)); -} diff --git a/src/app/thrift-services/skipper/index.ts b/src/app/thrift-services/skipper/index.ts deleted file mode 100644 index 5d515049..00000000 --- a/src/app/thrift-services/skipper/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './skipper.module'; -export * from './chargebacks.service'; -export * from './skipper-instance-utils'; diff --git a/src/app/thrift-services/skipper/skipper-instance-utils.ts b/src/app/thrift-services/skipper/skipper-instance-utils.ts deleted file mode 100644 index aff526de..00000000 --- a/src/app/thrift-services/skipper/skipper-instance-utils.ts +++ /dev/null @@ -1,16 +0,0 @@ -import metadata from '../../../assets/meta-skipper.json'; -import { createThriftInstanceUtils } from '../utils/thrift-instance'; -import * as base from './gen-nodejs/base_types'; -import * as chargeback from './gen-nodejs/chargeback_types'; -import * as skipper from './gen-nodejs/skipper_types'; - -const NAMESPACES = { - base, - chargeback, - skipper, -}; - -export const { - createThriftInstance: createSkipperInstance, - thriftInstanceToObject: skipperInstanceToObject, -} = createThriftInstanceUtils(metadata, NAMESPACES); diff --git a/src/app/thrift-services/skipper/skipper.module.ts b/src/app/thrift-services/skipper/skipper.module.ts deleted file mode 100644 index 00265396..00000000 --- a/src/app/thrift-services/skipper/skipper.module.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { NgModule } from '@angular/core'; - -import { ChargebacksService } from './chargebacks.service'; - -@NgModule({ - providers: [ChargebacksService], -}) -export class SkipperModule {} diff --git a/thrift-config.json b/thrift-config.json index dba73dce..8d2d4732 100644 --- a/thrift-config.json +++ b/thrift-config.json @@ -5,8 +5,6 @@ "fistful": "./node_modules/fistful-proto/proto", "messages": "./node_modules/messages-proto/proto", "file-storage": "./node_modules/file-storage-proto/proto", - "ank": "./node_modules/ank-proto/proto", - "skipper": { "path": "./node_modules/skipper-proto/proto", "meta": true }, "deanonimus": { "path": "./node_modules/deanonimus-proto/proto", "meta": true } }, "config": [