@senior-gestao-empresarial/erpx-components 0.0.0-develop-3bab051d
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/senior-gestao-empresarial-erpx-components.umd.js +37665 -0
- package/bundles/senior-gestao-empresarial-erpx-components.umd.js.map +1 -0
- package/bundles/senior-gestao-empresarial-erpx-components.umd.min.js +17 -0
- package/bundles/senior-gestao-empresarial-erpx-components.umd.min.js.map +1 -0
- package/components/breadcrumb/breadcrumb.component.d.ts +21 -0
- package/components/breadcrumb/breadcrumb.module.d.ts +2 -0
- package/components/breadcrumb/index.d.ts +2 -0
- package/components/focus/focus.service.d.ts +4 -0
- package/components/lote-serie/erp-lote-serie.component.d.ts +183 -0
- package/components/lote-serie/erp-lote-serie.module.d.ts +2 -0
- package/components/lote-serie/erp-lote-serie.service.d.ts +137 -0
- package/components/lote-serie/index.d.ts +2 -0
- package/components/rateio-editor/erp-rateio-editor.component.d.ts +202 -0
- package/components/rateio-editor/erp-rateio-editor.converter.d.ts +18 -0
- package/components/rateio-editor/erp-rateio-editor.module.d.ts +2 -0
- package/components/rateio-editor/erp-rateio-editor.service.d.ts +17 -0
- package/components/rateio-editor/erp-rateio-editor.types.d.ts +171 -0
- package/components/rateio-editor/index.d.ts +4 -0
- package/components/resumo/erp-resumo.component.d.ts +17 -0
- package/components/resumo/erp-resumo.module.d.ts +2 -0
- package/components/resumo/erp-resumo.service.d.ts +2 -0
- package/components/resumo/index.d.ts +2 -0
- package/components/tributos/calculators/effective-tax-rate-calculator.d.ts +34 -0
- package/components/tributos/calculators/gross-amount-calculator.d.ts +20 -0
- package/components/tributos/calculators/tax-amount-calculator.d.ts +54 -0
- package/components/tributos/erp-tributos.component.d.ts +215 -0
- package/components/tributos/erp-tributos.module.d.ts +2 -0
- package/components/tributos/erp-tributos.service.d.ts +10 -0
- package/components/tributos/erp-tributos.types.d.ts +286 -0
- package/components/tributos/index.d.ts +12 -0
- package/components/tributos/mappings/enum-tip-imp-cst-mapping.d.ts +2 -0
- package/components/tributos/rules/calculation/registries/calculation-rules-registries/calculation-rules.registry.d.ts +15 -0
- package/components/tributos/rules/calculation/registries/calculation-rules-registries/incoming-invoice-calculation-rules.registry.d.ts +28 -0
- package/components/tributos/rules/calculation/registries/calculation-rules-registries/outgoing-invoice-calculation-rules.registry.d.ts +30 -0
- package/components/tributos/rules/calculation/registries/calculation-rules-registries/purchase-order-calculation-rules.registry.d.ts +22 -0
- package/components/tributos/rules/calculation/registries/calculation-rules-registries/sale-order-calculation-rules.registry.d.ts +22 -0
- package/components/tributos/rules/calculation/rules/apply-net-value-to-document-calculation-rule.d.ts +5 -0
- package/components/tributos/rules/calculation/rules/assessment-period-calculation-rule.d.ts +5 -0
- package/components/tributos/rules/calculation/rules/effective-tax-rate-calculation-rule.d.ts +8 -0
- package/components/tributos/rules/calculation/rules/gross-amount-calculation-rule.d.ts +8 -0
- package/components/tributos/rules/calculation/rules/manual-tax-calculation-rule.d.ts +5 -0
- package/components/tributos/rules/calculation/rules/tax-amount-calculation-rule.d.ts +8 -0
- package/components/tributos/rules/calculation/rules/tax-calculation-type-calculation-rule.d.ts +5 -0
- package/components/tributos/rules/calculation/rules/tax-classification-calculation-rule.d.ts +6 -0
- package/components/tributos/rules/calculation/rules/tax-rate-calculation-rule.d.ts +5 -0
- package/components/tributos/rules/calculation/rules/tax-situation-calculation-rule.d.ts +5 -0
- package/components/tributos/rules/calculation/rules/taxable-base-calculation-rule.d.ts +8 -0
- package/components/tributos/rules/rules.service.d.ts +19 -0
- package/components/tributos/rules/status/registries/incoming-invoice-status-rules.registry.d.ts +16 -0
- package/components/tributos/rules/status/registries/outgoing-invoice-status-rules.registry.d.ts +12 -0
- package/components/tributos/rules/status/registries/purchase-order-status-rules.registry.d.ts +12 -0
- package/components/tributos/rules/status/registries/sale-order-status-rules.registry.d.ts +8 -0
- package/components/tributos/rules/status/registries/status-rules.registry.d.ts +15 -0
- package/components/tributos/rules/status/rules/apply-net-value-to-document-status-rule.d.ts +5 -0
- package/components/tributos/rules/status/rules/tax-classification-status-rule.d.ts +5 -0
- package/components/tributos/rules/status/rules/tax-rate-status-rule.d.ts +5 -0
- package/components/tributos/rules/status/rules/taxable-base-status-rule.d.ts +5 -0
- package/components/tributos/rules/types/available-fields.d.ts +2 -0
- package/components/tributos/rules/types/available-taxes.d.ts +1 -0
- package/components/tributos/rules/types/field-calculation-rule-mapping.d.ts +6 -0
- package/components/tributos/rules/types/field-rule-mapping.d.ts +6 -0
- package/components/tributos/rules/types/field-status-rule-mapping.d.ts +6 -0
- package/components/tributos/rules/types/rule-payload.d.ts +9 -0
- package/components/tributos/rules/types/schemas/incoming-invoice.schema.d.ts +235 -0
- package/components/tributos/rules/types/schemas/outgoing-invoice.schema.d.ts +349 -0
- package/components/tributos/rules/types/schemas/purchase-order.schema.d.ts +26 -0
- package/components/tributos/rules/types/schemas/sale-order.schema.d.ts +131 -0
- package/components/tributos/rules/types/strategies-by-document.d.ts +12 -0
- package/components/tributos/rules/types/strategies.d.ts +4 -0
- package/components/tributos/rules/types/tax-rule.d.ts +4 -0
- package/components/tributos/rules/validation/registries/incoming-invoice-validation-rules.registry.d.ts +20 -0
- package/components/tributos/rules/validation/registries/outgoing-invoice-validation-rules.registry.d.ts +22 -0
- package/components/tributos/rules/validation/registries/purchase-order-validation-rules.registry.d.ts +14 -0
- package/components/tributos/rules/validation/registries/sale-order-validation-rules.registry.d.ts +14 -0
- package/components/tributos/rules/validation/registries/validation-rules.registry.d.ts +15 -0
- package/components/tributos/rules/validation/rules/required/apply-net-value-to-document-required-validation-rule.d.ts +5 -0
- package/components/tributos/rules/validation/rules/required/assessment-period-required-validation-rule.d.ts +5 -0
- package/components/tributos/rules/validation/rules/required/tax-amount-required-validation-rule.d.ts +5 -0
- package/components/tributos/rules/validation/rules/required/tax-classification-required-validation-rule.d.ts +5 -0
- package/components/tributos/rules/validation/rules/required/tax-rate-required-validation-rule.d.ts +6 -0
- package/components/tributos/rules/validation/rules/required/tax-situation-required-validation-rule.d.ts +6 -0
- package/components/tributos/rules/validation/rules/required/taxable-base-required-validation-rule.d.ts +6 -0
- package/components/tributos/services/tax-rounding.service.d.ts +5 -0
- package/components/tributos/stores/tax.store.d.ts +10 -0
- package/components/tributos/tax-reform-utilities.d.ts +36 -0
- package/components/tributos/types/context.d.ts +7 -0
- package/components/tributos/types/controllership-incoming-invoice-context.d.ts +5 -0
- package/components/tributos/types/controllership-incoming-invoice.d.ts +3 -0
- package/components/tributos/types/controllership-outgoing-invoice-context.d.ts +5 -0
- package/components/tributos/types/controllership-outgoing-invoice.d.ts +3 -0
- package/components/tributos/types/credit-invoice-type.d.ts +1 -0
- package/components/tributos/types/debit-invoice-type.d.ts +1 -0
- package/components/tributos/types/group.d.ts +6 -0
- package/components/tributos/types/incoming-invoice-context.d.ts +5 -0
- package/components/tributos/types/incoming-invoice-item.d.ts +4 -0
- package/components/tributos/types/incoming-invoice-type.d.ts +1 -0
- package/components/tributos/types/incoming-invoice.d.ts +11 -0
- package/components/tributos/types/item-type.d.ts +1 -0
- package/components/tributos/types/outgoing-Invoice.d.ts +11 -0
- package/components/tributos/types/outgoing-invoice-context.d.ts +5 -0
- package/components/tributos/types/outgoing-invoice-item.d.ts +4 -0
- package/components/tributos/types/outgoing-invoice-type.d.ts +1 -0
- package/components/tributos/types/purchase-order-context.d.ts +5 -0
- package/components/tributos/types/purchase-order-type.d.ts +1 -0
- package/components/tributos/types/purchase-order.d.ts +8 -0
- package/components/tributos/types/sale-order-context.d.ts +5 -0
- package/components/tributos/types/sale-order-type.d.ts +1 -0
- package/components/tributos/types/sale-order.d.ts +8 -0
- package/components/tributos/types/tax.d.ts +8 -0
- package/components/utils/breakpoints.d.ts +10 -0
- package/components/utils/export-utils.d.ts +6 -0
- package/components/utils/index.d.ts +3 -0
- package/components/utils/loading-context.d.ts +7 -0
- package/components/utils/utils.d.ts +4 -0
- package/core/entities/entity-service.d.ts +32 -0
- package/core/entities/quantidade-disponivel-demanda/quantidade-disponivel-demanda-dto.d.ts +36 -0
- package/core/entities/quantidade-disponivel-demanda/quantidade-disponivel-demanda.d.ts +40 -0
- package/core/entities/quantidade-disponivel-demanda/quantidade-disponivel-demanda.module.d.ts +2 -0
- package/core/entities/quantidade-disponivel-demanda/quantidade-disponivel-demanda.service.d.ts +11 -0
- package/core/enums/enum-classificacao-tributaria.d.ts +4 -0
- package/core/enums/enum-tipo-calculo-imposto.d.ts +5 -0
- package/core/enums/enum-tipo-documento-parametros.d.ts +7 -0
- package/core/enums/enum-tipo-documento.d.ts +10 -0
- package/core/enums/erpx-com-processo-faturamento-backend/enum-indicativo-padrao.d.ts +5 -0
- package/core/enums/erpx-cpl-imp-cadastros-backend/enum-indicativo-padrao.d.ts +8 -0
- package/esm2015/components/breadcrumb/breadcrumb.component.js +86 -0
- package/esm2015/components/breadcrumb/breadcrumb.module.js +17 -0
- package/esm2015/components/breadcrumb/index.js +3 -0
- package/esm2015/components/focus/focus.service.js +32 -0
- package/esm2015/components/lote-serie/erp-lote-serie.component.js +1772 -0
- package/esm2015/components/lote-serie/erp-lote-serie.module.js +47 -0
- package/esm2015/components/lote-serie/erp-lote-serie.service.js +94 -0
- package/esm2015/components/lote-serie/index.js +3 -0
- package/esm2015/components/rateio-editor/erp-rateio-editor.component.js +794 -0
- package/esm2015/components/rateio-editor/erp-rateio-editor.converter.js +52 -0
- package/esm2015/components/rateio-editor/erp-rateio-editor.module.js +40 -0
- package/esm2015/components/rateio-editor/erp-rateio-editor.service.js +49 -0
- package/esm2015/components/rateio-editor/erp-rateio-editor.types.js +5 -0
- package/esm2015/components/rateio-editor/index.js +4 -0
- package/esm2015/components/resumo/erp-resumo.component.js +19 -0
- package/esm2015/components/resumo/erp-resumo.module.js +25 -0
- package/esm2015/components/resumo/erp-resumo.service.js +13 -0
- package/esm2015/components/resumo/index.js +2 -0
- package/esm2015/components/tributos/calculators/effective-tax-rate-calculator.js +53 -0
- package/esm2015/components/tributos/calculators/gross-amount-calculator.js +37 -0
- package/esm2015/components/tributos/calculators/tax-amount-calculator.js +87 -0
- package/esm2015/components/tributos/erp-tributos.component.js +5176 -0
- package/esm2015/components/tributos/erp-tributos.module.js +33 -0
- package/esm2015/components/tributos/erp-tributos.service.js +23 -0
- package/esm2015/components/tributos/erp-tributos.types.js +268 -0
- package/esm2015/components/tributos/index.js +4 -0
- package/esm2015/components/tributos/mappings/enum-tip-imp-cst-mapping.js +33 -0
- package/esm2015/components/tributos/rules/calculation/registries/calculation-rules-registries/calculation-rules.registry.js +45 -0
- package/esm2015/components/tributos/rules/calculation/registries/calculation-rules-registries/incoming-invoice-calculation-rules.registry.js +3102 -0
- package/esm2015/components/tributos/rules/calculation/registries/calculation-rules-registries/outgoing-invoice-calculation-rules.registry.js +4516 -0
- package/esm2015/components/tributos/rules/calculation/registries/calculation-rules-registries/purchase-order-calculation-rules.registry.js +294 -0
- package/esm2015/components/tributos/rules/calculation/registries/calculation-rules-registries/sale-order-calculation-rules.registry.js +1464 -0
- package/esm2015/components/tributos/rules/calculation/rules/apply-net-value-to-document-calculation-rule.js +48 -0
- package/esm2015/components/tributos/rules/calculation/rules/assessment-period-calculation-rule.js +55 -0
- package/esm2015/components/tributos/rules/calculation/rules/effective-tax-rate-calculation-rule.js +83 -0
- package/esm2015/components/tributos/rules/calculation/rules/gross-amount-calculation-rule.js +74 -0
- package/esm2015/components/tributos/rules/calculation/rules/manual-tax-calculation-rule.js +72 -0
- package/esm2015/components/tributos/rules/calculation/rules/tax-amount-calculation-rule.js +244 -0
- package/esm2015/components/tributos/rules/calculation/rules/tax-calculation-type-calculation-rule.js +74 -0
- package/esm2015/components/tributos/rules/calculation/rules/tax-classification-calculation-rule.js +170 -0
- package/esm2015/components/tributos/rules/calculation/rules/tax-rate-calculation-rule.js +100 -0
- package/esm2015/components/tributos/rules/calculation/rules/tax-situation-calculation-rule.js +124 -0
- package/esm2015/components/tributos/rules/calculation/rules/taxable-base-calculation-rule.js +292 -0
- package/esm2015/components/tributos/rules/rules.service.js +61 -0
- package/esm2015/components/tributos/rules/status/registries/incoming-invoice-status-rules.registry.js +1076 -0
- package/esm2015/components/tributos/rules/status/registries/outgoing-invoice-status-rules.registry.js +1317 -0
- package/esm2015/components/tributos/rules/status/registries/purchase-order-status-rules.registry.js +62 -0
- package/esm2015/components/tributos/rules/status/registries/sale-order-status-rules.registry.js +18 -0
- package/esm2015/components/tributos/rules/status/registries/status-rules.registry.js +45 -0
- package/esm2015/components/tributos/rules/status/rules/apply-net-value-to-document-status-rule.js +39 -0
- package/esm2015/components/tributos/rules/status/rules/tax-classification-status-rule.js +94 -0
- package/esm2015/components/tributos/rules/status/rules/tax-rate-status-rule.js +61 -0
- package/esm2015/components/tributos/rules/status/rules/taxable-base-status-rule.js +65 -0
- package/esm2015/components/tributos/rules/types/available-fields.js +1 -0
- package/esm2015/components/tributos/rules/types/available-taxes.js +1 -0
- package/esm2015/components/tributos/rules/types/field-calculation-rule-mapping.js +1 -0
- package/esm2015/components/tributos/rules/types/field-rule-mapping.js +1 -0
- package/esm2015/components/tributos/rules/types/field-status-rule-mapping.js +1 -0
- package/esm2015/components/tributos/rules/types/rule-payload.js +1 -0
- package/esm2015/components/tributos/rules/types/schemas/incoming-invoice.schema.js +1816 -0
- package/esm2015/components/tributos/rules/types/schemas/outgoing-invoice.schema.js +2750 -0
- package/esm2015/components/tributos/rules/types/schemas/purchase-order.schema.js +150 -0
- package/esm2015/components/tributos/rules/types/schemas/sale-order.schema.js +879 -0
- package/esm2015/components/tributos/rules/types/strategies-by-document.js +1 -0
- package/esm2015/components/tributos/rules/types/strategies.js +1 -0
- package/esm2015/components/tributos/rules/types/tax-rule.js +1 -0
- package/esm2015/components/tributos/rules/validation/registries/incoming-invoice-validation-rules.registry.js +3606 -0
- package/esm2015/components/tributos/rules/validation/registries/outgoing-invoice-validation-rules.registry.js +5452 -0
- package/esm2015/components/tributos/rules/validation/registries/purchase-order-validation-rules.registry.js +270 -0
- package/esm2015/components/tributos/rules/validation/registries/sale-order-validation-rules.registry.js +1392 -0
- package/esm2015/components/tributos/rules/validation/registries/validation-rules.registry.js +45 -0
- package/esm2015/components/tributos/rules/validation/rules/required/apply-net-value-to-document-required-validation-rule.js +73 -0
- package/esm2015/components/tributos/rules/validation/rules/required/assessment-period-required-validation-rule.js +78 -0
- package/esm2015/components/tributos/rules/validation/rules/required/tax-amount-required-validation-rule.js +902 -0
- package/esm2015/components/tributos/rules/validation/rules/required/tax-classification-required-validation-rule.js +401 -0
- package/esm2015/components/tributos/rules/validation/rules/required/tax-rate-required-validation-rule.js +719 -0
- package/esm2015/components/tributos/rules/validation/rules/required/tax-situation-required-validation-rule.js +300 -0
- package/esm2015/components/tributos/rules/validation/rules/required/taxable-base-required-validation-rule.js +717 -0
- package/esm2015/components/tributos/services/tax-rounding.service.js +18 -0
- package/esm2015/components/tributos/stores/tax.store.js +19 -0
- package/esm2015/components/tributos/tax-reform-utilities.js +243 -0
- package/esm2015/components/tributos/types/context.js +1 -0
- package/esm2015/components/tributos/types/controllership-incoming-invoice-context.js +1 -0
- package/esm2015/components/tributos/types/controllership-incoming-invoice.js +1 -0
- package/esm2015/components/tributos/types/controllership-outgoing-invoice-context.js +1 -0
- package/esm2015/components/tributos/types/controllership-outgoing-invoice.js +1 -0
- package/esm2015/components/tributos/types/credit-invoice-type.js +1 -0
- package/esm2015/components/tributos/types/debit-invoice-type.js +1 -0
- package/esm2015/components/tributos/types/group.js +1 -0
- package/esm2015/components/tributos/types/incoming-invoice-context.js +1 -0
- package/esm2015/components/tributos/types/incoming-invoice-item.js +1 -0
- package/esm2015/components/tributos/types/incoming-invoice-type.js +1 -0
- package/esm2015/components/tributos/types/incoming-invoice.js +1 -0
- package/esm2015/components/tributos/types/item-type.js +1 -0
- package/esm2015/components/tributos/types/outgoing-Invoice.js +1 -0
- package/esm2015/components/tributos/types/outgoing-invoice-context.js +1 -0
- package/esm2015/components/tributos/types/outgoing-invoice-item.js +1 -0
- package/esm2015/components/tributos/types/outgoing-invoice-type.js +1 -0
- package/esm2015/components/tributos/types/purchase-order-context.js +1 -0
- package/esm2015/components/tributos/types/purchase-order-type.js +1 -0
- package/esm2015/components/tributos/types/purchase-order.js +1 -0
- package/esm2015/components/tributos/types/sale-order-context.js +1 -0
- package/esm2015/components/tributos/types/sale-order-type.js +1 -0
- package/esm2015/components/tributos/types/sale-order.js +1 -0
- package/esm2015/components/tributos/types/tax.js +2 -0
- package/esm2015/components/utils/breakpoints.js +11 -0
- package/esm2015/components/utils/export-utils.js +71 -0
- package/esm2015/components/utils/index.js +4 -0
- package/esm2015/components/utils/loading-context.js +20 -0
- package/esm2015/components/utils/utils.js +18 -0
- package/esm2015/core/entities/entity-service.js +91 -0
- package/esm2015/core/entities/quantidade-disponivel-demanda/quantidade-disponivel-demanda-dto.js +1 -0
- package/esm2015/core/entities/quantidade-disponivel-demanda/quantidade-disponivel-demanda.js +62 -0
- package/esm2015/core/entities/quantidade-disponivel-demanda/quantidade-disponivel-demanda.module.js +24 -0
- package/esm2015/core/entities/quantidade-disponivel-demanda/quantidade-disponivel-demanda.service.js +24 -0
- package/esm2015/core/enums/enum-classificacao-tributaria.js +6 -0
- package/esm2015/core/enums/enum-tipo-calculo-imposto.js +7 -0
- package/esm2015/core/enums/enum-tipo-documento-parametros.js +9 -0
- package/esm2015/core/enums/enum-tipo-documento.js +12 -0
- package/esm2015/core/enums/erpx-com-processo-faturamento-backend/enum-indicativo-padrao.js +7 -0
- package/esm2015/core/enums/erpx-cpl-imp-cadastros-backend/enum-indicativo-padrao.js +10 -0
- package/esm2015/locale/fallback.js +56 -0
- package/esm2015/public-api.js +8 -0
- package/esm2015/senior-gestao-empresarial-erpx-components.js +58 -0
- package/esm5/components/breadcrumb/breadcrumb.component.js +91 -0
- package/esm5/components/breadcrumb/breadcrumb.module.js +20 -0
- package/esm5/components/breadcrumb/index.js +3 -0
- package/esm5/components/focus/focus.service.js +35 -0
- package/esm5/components/lote-serie/erp-lote-serie.component.js +1830 -0
- package/esm5/components/lote-serie/erp-lote-serie.module.js +50 -0
- package/esm5/components/lote-serie/erp-lote-serie.service.js +96 -0
- package/esm5/components/lote-serie/index.js +3 -0
- package/esm5/components/rateio-editor/erp-rateio-editor.component.js +861 -0
- package/esm5/components/rateio-editor/erp-rateio-editor.converter.js +68 -0
- package/esm5/components/rateio-editor/erp-rateio-editor.module.js +43 -0
- package/esm5/components/rateio-editor/erp-rateio-editor.service.js +51 -0
- package/esm5/components/rateio-editor/erp-rateio-editor.types.js +5 -0
- package/esm5/components/rateio-editor/index.js +4 -0
- package/esm5/components/resumo/erp-resumo.component.js +22 -0
- package/esm5/components/resumo/erp-resumo.module.js +28 -0
- package/esm5/components/resumo/erp-resumo.service.js +16 -0
- package/esm5/components/resumo/index.js +2 -0
- package/esm5/components/tributos/calculators/effective-tax-rate-calculator.js +58 -0
- package/esm5/components/tributos/calculators/gross-amount-calculator.js +39 -0
- package/esm5/components/tributos/calculators/tax-amount-calculator.js +91 -0
- package/esm5/components/tributos/erp-tributos.component.js +5296 -0
- package/esm5/components/tributos/erp-tributos.module.js +36 -0
- package/esm5/components/tributos/erp-tributos.service.js +24 -0
- package/esm5/components/tributos/erp-tributos.types.js +268 -0
- package/esm5/components/tributos/index.js +4 -0
- package/esm5/components/tributos/mappings/enum-tip-imp-cst-mapping.js +33 -0
- package/esm5/components/tributos/rules/calculation/registries/calculation-rules-registries/calculation-rules.registry.js +46 -0
- package/esm5/components/tributos/rules/calculation/registries/calculation-rules-registries/incoming-invoice-calculation-rules.registry.js +3104 -0
- package/esm5/components/tributos/rules/calculation/registries/calculation-rules-registries/outgoing-invoice-calculation-rules.registry.js +4518 -0
- package/esm5/components/tributos/rules/calculation/registries/calculation-rules-registries/purchase-order-calculation-rules.registry.js +296 -0
- package/esm5/components/tributos/rules/calculation/registries/calculation-rules-registries/sale-order-calculation-rules.registry.js +1466 -0
- package/esm5/components/tributos/rules/calculation/rules/apply-net-value-to-document-calculation-rule.js +60 -0
- package/esm5/components/tributos/rules/calculation/rules/assessment-period-calculation-rule.js +77 -0
- package/esm5/components/tributos/rules/calculation/rules/effective-tax-rate-calculation-rule.js +92 -0
- package/esm5/components/tributos/rules/calculation/rules/gross-amount-calculation-rule.js +83 -0
- package/esm5/components/tributos/rules/calculation/rules/manual-tax-calculation-rule.js +87 -0
- package/esm5/components/tributos/rules/calculation/rules/tax-amount-calculation-rule.js +286 -0
- package/esm5/components/tributos/rules/calculation/rules/tax-calculation-type-calculation-rule.js +89 -0
- package/esm5/components/tributos/rules/calculation/rules/tax-classification-calculation-rule.js +241 -0
- package/esm5/components/tributos/rules/calculation/rules/tax-rate-calculation-rule.js +118 -0
- package/esm5/components/tributos/rules/calculation/rules/tax-situation-calculation-rule.js +200 -0
- package/esm5/components/tributos/rules/calculation/rules/taxable-base-calculation-rule.js +330 -0
- package/esm5/components/tributos/rules/rules.service.js +139 -0
- package/esm5/components/tributos/rules/status/registries/incoming-invoice-status-rules.registry.js +1078 -0
- package/esm5/components/tributos/rules/status/registries/outgoing-invoice-status-rules.registry.js +1319 -0
- package/esm5/components/tributos/rules/status/registries/purchase-order-status-rules.registry.js +64 -0
- package/esm5/components/tributos/rules/status/registries/sale-order-status-rules.registry.js +19 -0
- package/esm5/components/tributos/rules/status/registries/status-rules.registry.js +46 -0
- package/esm5/components/tributos/rules/status/rules/apply-net-value-to-document-status-rule.js +43 -0
- package/esm5/components/tributos/rules/status/rules/tax-classification-status-rule.js +106 -0
- package/esm5/components/tributos/rules/status/rules/tax-rate-status-rule.js +68 -0
- package/esm5/components/tributos/rules/status/rules/taxable-base-status-rule.js +72 -0
- package/esm5/components/tributos/rules/types/available-fields.js +1 -0
- package/esm5/components/tributos/rules/types/available-taxes.js +1 -0
- package/esm5/components/tributos/rules/types/field-calculation-rule-mapping.js +1 -0
- package/esm5/components/tributos/rules/types/field-rule-mapping.js +1 -0
- package/esm5/components/tributos/rules/types/field-status-rule-mapping.js +1 -0
- package/esm5/components/tributos/rules/types/rule-payload.js +1 -0
- package/esm5/components/tributos/rules/types/schemas/incoming-invoice.schema.js +1817 -0
- package/esm5/components/tributos/rules/types/schemas/outgoing-invoice.schema.js +2751 -0
- package/esm5/components/tributos/rules/types/schemas/purchase-order.schema.js +151 -0
- package/esm5/components/tributos/rules/types/schemas/sale-order.schema.js +880 -0
- package/esm5/components/tributos/rules/types/strategies-by-document.js +1 -0
- package/esm5/components/tributos/rules/types/strategies.js +1 -0
- package/esm5/components/tributos/rules/types/tax-rule.js +1 -0
- package/esm5/components/tributos/rules/validation/registries/incoming-invoice-validation-rules.registry.js +3608 -0
- package/esm5/components/tributos/rules/validation/registries/outgoing-invoice-validation-rules.registry.js +5454 -0
- package/esm5/components/tributos/rules/validation/registries/purchase-order-validation-rules.registry.js +272 -0
- package/esm5/components/tributos/rules/validation/registries/sale-order-validation-rules.registry.js +1394 -0
- package/esm5/components/tributos/rules/validation/registries/validation-rules.registry.js +46 -0
- package/esm5/components/tributos/rules/validation/rules/required/apply-net-value-to-document-required-validation-rule.js +77 -0
- package/esm5/components/tributos/rules/validation/rules/required/assessment-period-required-validation-rule.js +86 -0
- package/esm5/components/tributos/rules/validation/rules/required/tax-amount-required-validation-rule.js +968 -0
- package/esm5/components/tributos/rules/validation/rules/required/tax-classification-required-validation-rule.js +433 -0
- package/esm5/components/tributos/rules/validation/rules/required/tax-rate-required-validation-rule.js +774 -0
- package/esm5/components/tributos/rules/validation/rules/required/tax-situation-required-validation-rule.js +323 -0
- package/esm5/components/tributos/rules/validation/rules/required/taxable-base-required-validation-rule.js +772 -0
- package/esm5/components/tributos/services/tax-rounding.service.js +23 -0
- package/esm5/components/tributos/stores/tax.store.js +26 -0
- package/esm5/components/tributos/tax-reform-utilities.js +249 -0
- package/esm5/components/tributos/types/context.js +1 -0
- package/esm5/components/tributos/types/controllership-incoming-invoice-context.js +1 -0
- package/esm5/components/tributos/types/controllership-incoming-invoice.js +1 -0
- package/esm5/components/tributos/types/controllership-outgoing-invoice-context.js +1 -0
- package/esm5/components/tributos/types/controllership-outgoing-invoice.js +1 -0
- package/esm5/components/tributos/types/credit-invoice-type.js +1 -0
- package/esm5/components/tributos/types/debit-invoice-type.js +1 -0
- package/esm5/components/tributos/types/group.js +1 -0
- package/esm5/components/tributos/types/incoming-invoice-context.js +1 -0
- package/esm5/components/tributos/types/incoming-invoice-item.js +1 -0
- package/esm5/components/tributos/types/incoming-invoice-type.js +1 -0
- package/esm5/components/tributos/types/incoming-invoice.js +1 -0
- package/esm5/components/tributos/types/item-type.js +1 -0
- package/esm5/components/tributos/types/outgoing-Invoice.js +1 -0
- package/esm5/components/tributos/types/outgoing-invoice-context.js +1 -0
- package/esm5/components/tributos/types/outgoing-invoice-item.js +1 -0
- package/esm5/components/tributos/types/outgoing-invoice-type.js +1 -0
- package/esm5/components/tributos/types/purchase-order-context.js +1 -0
- package/esm5/components/tributos/types/purchase-order-type.js +1 -0
- package/esm5/components/tributos/types/purchase-order.js +1 -0
- package/esm5/components/tributos/types/sale-order-context.js +1 -0
- package/esm5/components/tributos/types/sale-order-type.js +1 -0
- package/esm5/components/tributos/types/sale-order.js +1 -0
- package/esm5/components/tributos/types/tax.js +2 -0
- package/esm5/components/utils/breakpoints.js +11 -0
- package/esm5/components/utils/export-utils.js +78 -0
- package/esm5/components/utils/index.js +4 -0
- package/esm5/components/utils/loading-context.js +22 -0
- package/esm5/components/utils/utils.js +20 -0
- package/esm5/core/entities/entity-service.js +98 -0
- package/esm5/core/entities/quantidade-disponivel-demanda/quantidade-disponivel-demanda-dto.js +1 -0
- package/esm5/core/entities/quantidade-disponivel-demanda/quantidade-disponivel-demanda.js +67 -0
- package/esm5/core/entities/quantidade-disponivel-demanda/quantidade-disponivel-demanda.module.js +27 -0
- package/esm5/core/entities/quantidade-disponivel-demanda/quantidade-disponivel-demanda.service.js +27 -0
- package/esm5/core/enums/enum-classificacao-tributaria.js +6 -0
- package/esm5/core/enums/enum-tipo-calculo-imposto.js +7 -0
- package/esm5/core/enums/enum-tipo-documento-parametros.js +9 -0
- package/esm5/core/enums/enum-tipo-documento.js +12 -0
- package/esm5/core/enums/erpx-com-processo-faturamento-backend/enum-indicativo-padrao.js +7 -0
- package/esm5/core/enums/erpx-cpl-imp-cadastros-backend/enum-indicativo-padrao.js +10 -0
- package/esm5/locale/fallback.js +56 -0
- package/esm5/public-api.js +8 -0
- package/esm5/senior-gestao-empresarial-erpx-components.js +58 -0
- package/fesm2015/senior-gestao-empresarial-erpx-components.js +36350 -0
- package/fesm2015/senior-gestao-empresarial-erpx-components.js.map +1 -0
- package/fesm5/senior-gestao-empresarial-erpx-components.js +37396 -0
- package/fesm5/senior-gestao-empresarial-erpx-components.js.map +1 -0
- package/locale/fallback.d.ts +55 -0
- package/package.json +23 -0
- package/public-api.d.ts +7 -0
- package/senior-gestao-empresarial-erpx-components.d.ts +57 -0
- package/senior-gestao-empresarial-erpx-components.metadata.json +1 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { Injectable } from '@angular/core';
|
|
3
|
+
import { IncomingInvoiceValidationRulesRegistry } from './incoming-invoice-validation-rules.registry';
|
|
4
|
+
import { OutgoingInvoiceValidationRulesRegistry } from './outgoing-invoice-validation-rules.registry';
|
|
5
|
+
import { PurchaseOrderValidationRulesRegistry } from './purchase-order-validation-rules.registry';
|
|
6
|
+
import { SaleOrderValidationRulesRegistry } from './sale-order-validation-rules.registry';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
import * as i1 from "./incoming-invoice-validation-rules.registry";
|
|
9
|
+
import * as i2 from "./outgoing-invoice-validation-rules.registry";
|
|
10
|
+
import * as i3 from "./sale-order-validation-rules.registry";
|
|
11
|
+
import * as i4 from "./purchase-order-validation-rules.registry";
|
|
12
|
+
let ValidationRulesRegistry = class ValidationRulesRegistry {
|
|
13
|
+
constructor(incomingInvoiceValidationRulesRegistry, outgoingInvoiceValidationRulesRegistry, saleOrderValidationRulesRegistry, purchaseOrderValidationRulesRegistry) {
|
|
14
|
+
this.incomingInvoiceValidationRulesRegistry = incomingInvoiceValidationRulesRegistry;
|
|
15
|
+
this.outgoingInvoiceValidationRulesRegistry = outgoingInvoiceValidationRulesRegistry;
|
|
16
|
+
this.saleOrderValidationRulesRegistry = saleOrderValidationRulesRegistry;
|
|
17
|
+
this.purchaseOrderValidationRulesRegistry = purchaseOrderValidationRulesRegistry;
|
|
18
|
+
}
|
|
19
|
+
get(context, taxType) {
|
|
20
|
+
switch (context.document) {
|
|
21
|
+
case 'Incoming Invoice':
|
|
22
|
+
return this.incomingInvoiceValidationRulesRegistry.get(context.invoice.type, taxType);
|
|
23
|
+
case 'Outgoing Invoice':
|
|
24
|
+
return this.outgoingInvoiceValidationRulesRegistry.get(context.invoice.type, taxType);
|
|
25
|
+
case 'Sale Order':
|
|
26
|
+
return this.saleOrderValidationRulesRegistry.get(context.order.type, taxType);
|
|
27
|
+
case 'Purchase Order':
|
|
28
|
+
return this.purchaseOrderValidationRulesRegistry.get(context.order.type, taxType);
|
|
29
|
+
default:
|
|
30
|
+
throw new Error(`ValidationRulesRegistry not implemented for ${context.document}`);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
ValidationRulesRegistry.ctorParameters = () => [
|
|
35
|
+
{ type: IncomingInvoiceValidationRulesRegistry },
|
|
36
|
+
{ type: OutgoingInvoiceValidationRulesRegistry },
|
|
37
|
+
{ type: SaleOrderValidationRulesRegistry },
|
|
38
|
+
{ type: PurchaseOrderValidationRulesRegistry }
|
|
39
|
+
];
|
|
40
|
+
ValidationRulesRegistry.ɵprov = i0.ɵɵdefineInjectable({ factory: function ValidationRulesRegistry_Factory() { return new ValidationRulesRegistry(i0.ɵɵinject(i1.IncomingInvoiceValidationRulesRegistry), i0.ɵɵinject(i2.OutgoingInvoiceValidationRulesRegistry), i0.ɵɵinject(i3.SaleOrderValidationRulesRegistry), i0.ɵɵinject(i4.PurchaseOrderValidationRulesRegistry)); }, token: ValidationRulesRegistry, providedIn: "root" });
|
|
41
|
+
ValidationRulesRegistry = __decorate([
|
|
42
|
+
Injectable({ providedIn: 'root' })
|
|
43
|
+
], ValidationRulesRegistry);
|
|
44
|
+
export { ValidationRulesRegistry };
|
|
45
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmFsaWRhdGlvbi1ydWxlcy5yZWdpc3RyeS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0BzZW5pb3ItZ2VzdGFvLWVtcHJlc2FyaWFsL2VycHgtY29tcG9uZW50cy8iLCJzb3VyY2VzIjpbImNvbXBvbmVudHMvdHJpYnV0b3MvcnVsZXMvdmFsaWRhdGlvbi9yZWdpc3RyaWVzL3ZhbGlkYXRpb24tcnVsZXMucmVnaXN0cnkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFJM0MsT0FBTyxFQUFFLHNDQUFzQyxFQUFFLE1BQU0sOENBQThDLENBQUM7QUFDdEcsT0FBTyxFQUFFLHNDQUFzQyxFQUFFLE1BQU0sOENBQThDLENBQUM7QUFDdEcsT0FBTyxFQUFFLG9DQUFvQyxFQUFFLE1BQU0sNENBQTRDLENBQUM7QUFDbEcsT0FBTyxFQUFFLGdDQUFnQyxFQUFFLE1BQU0sd0NBQXdDLENBQUM7Ozs7OztBQUcxRixJQUFhLHVCQUF1QixHQUFwQyxNQUFhLHVCQUF1QjtJQUNoQyxZQUNxQixzQ0FBOEUsRUFDOUUsc0NBQThFLEVBQzlFLGdDQUFrRSxFQUNsRSxvQ0FBMEU7UUFIMUUsMkNBQXNDLEdBQXRDLHNDQUFzQyxDQUF3QztRQUM5RSwyQ0FBc0MsR0FBdEMsc0NBQXNDLENBQXdDO1FBQzlFLHFDQUFnQyxHQUFoQyxnQ0FBZ0MsQ0FBa0M7UUFDbEUseUNBQW9DLEdBQXBDLG9DQUFvQyxDQUFzQztJQUM1RixDQUFDO0lBRUosR0FBRy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gICAgICBwcml2YXRlIHJlYWRvbmx5IG91dGdvaW5nSW52b2ljZVZhbGlkYXRpb25SdWxlc1JlZ2lzdHJ5OiBPdXRnb2luZ0ludm9pY2VWYWxpZGF0aW9uUnVsZXNSZWdpc3RyeSxcbiAgICAgICAgcHJpdmF0ZSByZWFkb25seSBzYWxlT3JkZXJWYWxpZGF0aW9uUnVsZXNSZWdpc3RyeTogU2FsZU9yZGVyVmFsaWRhdGlvblJ1bGVzUmVnaXN0cnksXG4gICAgICAgIHByaXZhdGUgcmVhZG9ubHkgcHVyY2hhc2VPcmRlclZhbGlkYXRpb25SdWxlc1JlZ2lzdHJ5OiBQdXJjaGFzZU9yZGVyVmFsaWRhdGlvblJ1bGVzUmVnaXN0cnlcbiAgICApIHt9XG5cbiAgICBnZXQoY29udGV4dDogQ29udGV4dCwgdGF4VHlwZTogRW51bVRpcG9UcmlidXRvKTogRmllbGRSdWxlTWFwcGluZ1tdIHtcbiAgICAgICAgc3dpdGNoIChjb250ZXh0LmRvY3VtZW50KSB7XG4gICAgICAgICAgICBjYXNlICdJbmNvbWluZyBJbnZvaWNlJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5pbmNvbWluZ0ludm9pY2VWYWxpZGF0aW9uUnVsZXNSZWdpc3RyeS5nZXQoXG4gICAgICAgICAgICAgICAgICAgIGNvbnRleHQuaW52b2ljZS50eXBlLFxuICAgICAgICAgICAgICAgICAgICB0YXhUeXBlXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIGNhc2UgJ091dGdvaW5nIEludm9pY2UnOlxuICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLm91dGdvaW5nSW52b2ljZVZhbGlkYXRpb25SdWxlc1JlZ2lzdHJ5LmdldChcbiAgICAgICAgICAgICAgICAgICAgY29udGV4dC5pbnZvaWNlLnR5cGUsXG4gICAgICAgICAgICAgICAgICAgIHRheFR5cGVcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgY2FzZSAnU2FsZSBPcmRlcic6XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuc2FsZU9yZGVyVmFsaWRhdGlvblJ1bGVzUmVnaXN0cnkuZ2V0KFxuICAgICAgICAgICAgICAgICAgICBjb250ZXh0Lm9yZGVyLnR5cGUsXG4gICAgICAgICAgICAgICAgICAgIHRheFR5cGVcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgY2FzZSAnUHVyY2hhc2UgT3JkZXInOlxuICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLnB1cmNoYXNlT3JkZXJWYWxpZGF0aW9uUnVsZXNSZWdpc3RyeS5nZXQoXG4gICAgICAgICAgICAgICAgICAgIGNvbnRleHQub3JkZXIudHlwZSxcbiAgICAgICAgICAgICAgICAgICAgdGF4VHlwZVxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcbiAgICAgICAgICAgICAgICAgICAgYFZhbGlkYXRpb25SdWxlc1JlZ2lzdHJ5IG5vdCBpbXBsZW1lbnRlZCBmb3IgJHtjb250ZXh0LmRvY3VtZW50fWBcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICB9XG4gICAgfVxufVxuIl19
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { Injectable } from '@angular/core';
|
|
3
|
+
import { Validators } from '@angular/forms';
|
|
4
|
+
import { startWith } from 'rxjs/operators';
|
|
5
|
+
import { EnumCampoTributo, EnumTipoTributo } from '../../../../erp-tributos.types';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
let ApplyNetValueToDocumentRequiredValidationRule = class ApplyNetValueToDocumentRequiredValidationRule {
|
|
8
|
+
apply({ context: { document }, item: { name: taxType, formGroup } }) {
|
|
9
|
+
switch (taxType) {
|
|
10
|
+
case EnumTipoTributo.CBS:
|
|
11
|
+
case EnumTipoTributo.CBS_CREDITO_PRESUMIDO:
|
|
12
|
+
case EnumTipoTributo.IBS_ESTADUAL:
|
|
13
|
+
case EnumTipoTributo.IBS_MUNICIPAL:
|
|
14
|
+
{
|
|
15
|
+
switch (document) {
|
|
16
|
+
case 'Incoming Invoice':
|
|
17
|
+
case 'Outgoing Invoice':
|
|
18
|
+
{
|
|
19
|
+
formGroup
|
|
20
|
+
.get(EnumCampoTributo.AplicarValorLiquidoDocumento)
|
|
21
|
+
.setValidators([Validators.required]);
|
|
22
|
+
formGroup
|
|
23
|
+
.get(EnumCampoTributo.AplicarValorLiquidoDocumento)
|
|
24
|
+
.updateValueAndValidity({
|
|
25
|
+
emitEvent: false
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
break;
|
|
29
|
+
default:
|
|
30
|
+
throw new Error(`Regra ApplyNetValueToDocumentRequiredValidationRule não implementada para o imposto ${taxType}, documento ${document}.`);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
break;
|
|
34
|
+
case EnumTipoTributo.IBS_CREDITO_PRESUMIDO:
|
|
35
|
+
{
|
|
36
|
+
switch (document) {
|
|
37
|
+
case 'Incoming Invoice':
|
|
38
|
+
case 'Outgoing Invoice':
|
|
39
|
+
{
|
|
40
|
+
formGroup
|
|
41
|
+
.get(EnumCampoTributo.AplicarValorLiquidoDocumento)
|
|
42
|
+
.valueChanges.pipe(startWith(formGroup.get(EnumCampoTributo.AplicarValorLiquidoDocumento).value))
|
|
43
|
+
.subscribe((value) => {
|
|
44
|
+
const validators = value
|
|
45
|
+
? [Validators.required]
|
|
46
|
+
: [];
|
|
47
|
+
formGroup
|
|
48
|
+
.get(EnumCampoTributo.AplicarValorLiquidoDocumento)
|
|
49
|
+
.setValidators(validators);
|
|
50
|
+
formGroup
|
|
51
|
+
.get(EnumCampoTributo.AplicarValorLiquidoDocumento)
|
|
52
|
+
.updateValueAndValidity({
|
|
53
|
+
emitEvent: false
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
break;
|
|
58
|
+
default:
|
|
59
|
+
throw new Error(`Regra ApplyNetValueToDocumentRequiredValidationRule não implementada para o imposto ${taxType}, documento ${document}.`);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
break;
|
|
63
|
+
default:
|
|
64
|
+
throw new Error(`Regra ApplyNetValueToDocumentRequiredValidationRule não implementada para o imposto ${taxType}, documento ${document}.`);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
ApplyNetValueToDocumentRequiredValidationRule.ɵprov = i0.ɵɵdefineInjectable({ factory: function ApplyNetValueToDocumentRequiredValidationRule_Factory() { return new ApplyNetValueToDocumentRequiredValidationRule(); }, token: ApplyNetValueToDocumentRequiredValidationRule, providedIn: "root" });
|
|
69
|
+
ApplyNetValueToDocumentRequiredValidationRule = __decorate([
|
|
70
|
+
Injectable({ providedIn: 'root' })
|
|
71
|
+
], ApplyNetValueToDocumentRequiredValidationRule);
|
|
72
|
+
export { ApplyNetValueToDocumentRequiredValidationRule };
|
|
73
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBwbHktbmV0LXZhbHVlLXRvLWRvY3VtZW50LXJlcXVpcmVkLXZhbGlkYXRpb24tcnVsZS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0BzZW5pb3ItZ2VzdGFvLWVtcHJlc2FyaWFsL2VycHgtY29tcG9uZW50cy8iLCJzb3VyY2VzIjpbImNvbXBvbmVudHMvdHJpYnV0b3MvcnVsZXMvdmFsaWRhdGlvbi9ydWxlcy9yZXF1aXJlZC9hcHBseS1uZXQtdmFsdWUtdG8tZG9jdW1lbnQtcmVxdWlyZWQtdmFsaWRhdGlvbi1ydWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQzNDLE9BQU8sRUFBZSxVQUFVLEVBQUUsTUFB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2l0Y2ggKHRheFR5cGUpIHtcbiAgICAgICAgICAgIGNhc2UgRW51bVRpcG9UcmlidXRvLkNCUzpcbiAgICAgICAgICAgIGNhc2UgRW51bVRpcG9UcmlidXRvLkNCU19DUkVESVRPX1BSRVNVTUlETzpcbiAgICAgICAgICAgIGNhc2UgRW51bVRpcG9UcmlidXRvLklCU19FU1RBRFVBTDpcbiAgICAgICAgICAgIGNhc2UgRW51bVRpcG9UcmlidXRvLklCU19NVU5JQ0lQQUw6XG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICBzd2l0Y2ggKGRvY3VtZW50KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICdJbmNvbWluZyBJbnZvaWNlJzpcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ091dGdvaW5nIEludm9pY2UnOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9ybUdyb3VwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAuZ2V0KFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEVudW1DYW1wb1RyaWJ1dG8uQXBsaWNhclZhbG9yTGlxdWlkb0RvY3VtZW50b1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSFcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5zZXRWYWxpZGF0b3JzKFtWYWxpZGF0b3JzLnJlcXVpcmVkXSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvcm1Hcm91cFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLmdldChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBFbnVtQ2FtcG9UcmlidXRvLkFwbGljYXJWYWxvckxpcXVpZG9Eb2N1bWVudG9cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkhXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAudXBkYXRlVmFsdWVBbmRWYWxpZGl0eSh7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZW1pdEV2ZW50OiBmYWxzZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGBSZWdyYSBBcHBseU5ldFZhbHVlVG9Eb2N1bWVudFJlcXVpcmVkVmFsaWRhdGlvblJ1bGUgbsOjbyBpbXBsZW1lbnRhZGEgcGFyYSBvIGltcG9zdG8gJHt0YXhUeXBlfSwgZG9jdW1lbnRvICR7ZG9jdW1lbnR9LmBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgY2FzZSBFbnVtVGlwb1RyaWJ1dG8uSUJTX0NSRURJVE9fUFJFU1VNSURPOlxuICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgc3dpdGNoIChkb2N1bWVudCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnSW5jb21pbmcgSW52b2ljZSc6XG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICdPdXRnb2luZyBJbnZvaWNlJzpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvcm1Hcm91cFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLmdldChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBFbnVtQ2FtcG9UcmlidXRvLkFwbGljYXJWYWxvckxpcXVpZG9Eb2N1bWVudG9cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkhXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAudmFsdWVDaGFuZ2VzLnBpcGUoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RhcnRXaXRoKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3JtR3JvdXAuZ2V0KFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRW51bUNhbXBvVHJpYnV0by5BcGxpY2FyVmFsb3JMaXF1aWRvRG9jdW1lbnRvXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkhLnZhbHVlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLnN1YnNjcmliZSgodmFsdWUpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCB2YWxpZGF0b3JzOiBWYWxpZGF0b3JGbltdID0gdmFsdWVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBbVmFsaWRhdG9ycy5yZXF1aXJlZF1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBbXTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvcm1Hcm91cFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAuZ2V0KFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRW51bUNhbXBvVHJpYnV0by5BcGxpY2FyVmFsb3JMaXF1aWRvRG9jdW1lbnRvXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkhXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5zZXRWYWxpZGF0b3JzKHZhbGlkYXRvcnMpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvcm1Hcm91cFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAuZ2V0KFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRW51bUNhbXBvVHJpYnV0by5BcGxpY2FyVmFsb3JMaXF1aWRvRG9jdW1lbnRvXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkhXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC51cGRhdGVWYWx1ZUFuZFZhbGlkaXR5KHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVtaXRFdmVudDogZmFsc2VcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYFJlZ3JhIEFwcGx5TmV0VmFsdWVUb0RvY3VtZW50UmVxdWlyZWRWYWxpZGF0aW9uUnVsZSBuw6NvIGltcGxlbWVudGFkYSBwYXJhIG8gaW1wb3N0byAke3RheFR5cGV9LCBkb2N1bWVudG8gJHtkb2N1bWVudH0uYFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcbiAgICAgICAgICAgICAgICAgICAgYFJlZ3JhIEFwcGx5TmV0VmFsdWVUb0RvY3VtZW50UmVxdWlyZWRWYWxpZGF0aW9uUnVsZSBuw6NvIGltcGxlbWVudGFkYSBwYXJhIG8gaW1wb3N0byAke3RheFR5cGV9LCBkb2N1bWVudG8gJHtkb2N1bWVudH0uYFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgIH1cbiAgICB9XG59XG4iXX0=
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { Injectable } from '@angular/core';
|
|
3
|
+
import { Validators } from '@angular/forms';
|
|
4
|
+
import BigNumber from 'bignumber.js';
|
|
5
|
+
import { combineLatest } from 'rxjs';
|
|
6
|
+
import { distinctUntilChanged, map, startWith } from 'rxjs/operators';
|
|
7
|
+
import { EnumCampoTributo, EnumTipoTributo } from '../../../../erp-tributos.types';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
let AssessmentPeriodRequiredValidationRule = class AssessmentPeriodRequiredValidationRule {
|
|
10
|
+
apply({ context, item: { name: taxType, formGroup } }) {
|
|
11
|
+
const { document } = context;
|
|
12
|
+
switch (taxType) {
|
|
13
|
+
case EnumTipoTributo.CBS_AJUSTE:
|
|
14
|
+
case EnumTipoTributo.IBS_AJUSTE:
|
|
15
|
+
{
|
|
16
|
+
switch (document) {
|
|
17
|
+
case 'Outgoing Invoice':
|
|
18
|
+
{
|
|
19
|
+
combineLatest([
|
|
20
|
+
formGroup
|
|
21
|
+
.get('situacaoTributaria')
|
|
22
|
+
.valueChanges.pipe(startWith(formGroup.get('situacaoTributaria').value), distinctUntilChanged()),
|
|
23
|
+
formGroup
|
|
24
|
+
.get('classificacaoTributaria')
|
|
25
|
+
.valueChanges.pipe(startWith(formGroup.get('classificacaoTributaria').value), distinctUntilChanged()),
|
|
26
|
+
formGroup
|
|
27
|
+
.get(EnumCampoTributo.PeriodoApuracao)
|
|
28
|
+
.valueChanges.pipe(startWith(formGroup.get(EnumCampoTributo.PeriodoApuracao).value), distinctUntilChanged()),
|
|
29
|
+
formGroup
|
|
30
|
+
.get('valor')
|
|
31
|
+
.valueChanges.pipe(startWith(formGroup.get('valor').value), distinctUntilChanged())
|
|
32
|
+
])
|
|
33
|
+
.pipe(map(([taxSituation, taxClassication, assessmentPeriod, taxAmount]) => [
|
|
34
|
+
taxSituation,
|
|
35
|
+
taxClassication,
|
|
36
|
+
assessmentPeriod,
|
|
37
|
+
new BigNumber(taxAmount)
|
|
38
|
+
]))
|
|
39
|
+
.subscribe(([taxSituation, taxClassication, assessmentPeriod, taxAmount]) => {
|
|
40
|
+
let validators = [];
|
|
41
|
+
if (taxSituation ||
|
|
42
|
+
taxClassication ||
|
|
43
|
+
assessmentPeriod ||
|
|
44
|
+
taxAmount.isFinite()) {
|
|
45
|
+
validators = [
|
|
46
|
+
Validators.required
|
|
47
|
+
];
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
validators = [];
|
|
51
|
+
}
|
|
52
|
+
formGroup
|
|
53
|
+
.get(EnumCampoTributo.PeriodoApuracao)
|
|
54
|
+
.setValidators(validators);
|
|
55
|
+
formGroup
|
|
56
|
+
.get(EnumCampoTributo.PeriodoApuracao)
|
|
57
|
+
.updateValueAndValidity({
|
|
58
|
+
emitEvent: false
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
break;
|
|
63
|
+
default:
|
|
64
|
+
throw new Error(`Regra AssessmentPeriodRequiredValidationRule não implementada para o imposto ${taxType}, documento ${document}.`);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
break;
|
|
68
|
+
default:
|
|
69
|
+
throw new Error(`Regra AssessmentPeriodRequiredValidationRule não implementada para o imposto ${taxType}, documento ${document}.`);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
AssessmentPeriodRequiredValidationRule.ɵprov = i0.ɵɵdefineInjectable({ factory: function AssessmentPeriodRequiredValidationRule_Factory() { return new AssessmentPeriodRequiredValidationRule(); }, token: AssessmentPeriodRequiredValidationRule, providedIn: "root" });
|
|
74
|
+
AssessmentPeriodRequiredValidationRule = __decorate([
|
|
75
|
+
Injectable({ providedIn: 'root' })
|
|
76
|
+
], AssessmentPeriodRequiredValidationRule);
|
|
77
|
+
export { AssessmentPeriodRequiredValidationRule };
|
|
78
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXNzZXNzbWVudC1wZXJpb2QtcmVxdWlyZWQtdmFsaWRhdGlvbi1ydWxlLmpzIiwic291cmNlUm9vdCI6Im5nOi8vQHNlbmlvci1nZXN0YW8tZW1wcmVzYXJpYWwvZXJweC1jb21wb25lbnRzLyIsInNvdXJjZXMiOlsiY29tcG9uZW50cy90cmlidXRvcy9ydWxlcy92YWxpZGF0aW9uL3J1bGVzL3JlcXVpcmVkL2Fzc2Vzc21lbnQtcGVyaW9kLXJlcXVpcmVkLXZhbGlkYXRpb24tcnVsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUMzQyxPQUFPLEVBQWUsVUFBVSxFQUFFLE1BQU0sZ0JBQWdCLENBQUM7QUFDekQsT0FBTyxTQUFTLE1BQU0sY0FBYyxDQUFDO0FBQ3JDLE9BQU8sRUFBRSxhQUFhLEVBQUUsTUFBTSxNQUFNLENBQUM7QUFDckMsT0FBTyxFQUFFLG9CQUFvQixFQUFFLEdBQUcsRUFBRSxTQUFTLEVBQUUsTUFBT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XMnO1xuaW1wb3J0IHsgUnVsZVBheWxvYWQgfSBmcm9tICcuLi8uLi8uLi90eXBlcy9ydWxlLXBheWxvYWQnO1xuaW1wb3J0IHsgVGF4UnVsZSB9IGZyb20gJy4uLy4uLy4uL3R5cGVzL3RheC1ydWxlJztcblxuQEluamVjdGFibGUoeyBwcm92aWRlZEluOiAncm9vdCcgfSlcbmV4cG9ydCBjbGFzcyBBc3Nlc3NtZW50UGVyaW9kUmVxdWlyZWRWYWxpZGF0aW9uUnVsZSBpbXBsZW1lbnRzIFRheFJ1bGUge1xuICAgIGFwcGx5KHsgY29udGV4dCwgaXRlbTogeyBuYW1lOiB0YXhUeXBlLCBmb3JtR3JvdXAgfSB9OiBSdWxlUGF5bG9hZCk6IHZvaWQge1xuICAgICAgICBjb25zdCB7IGRvY3VtZW50IH0gPSBjb250ZXh0O1xuXG4gICAgICAgIHN3aXRjaCAodGF4VHlwZSkge1xuICAgICAgICAgICAgY2FzZSBFbnVtVGlwb1RyaWJ1dG8uQ0JTX0FKVVNURTpcbiAgICAgICAgICAgIGNhc2UgRW51bVRpcG9UcmlidXRvLklCU19BSlVTVEU6XG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICBzd2l0Y2ggKGRvY3VtZW50KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICdPdXRnb2luZyBJbnZvaWNlJzpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbWJpbmVMYXRlc3QoW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9ybUdyb3VwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLmdldCgnc2l0dWFjYW9UcmlidXRhcmlhJylcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAudmFsdWVDaGFuZ2VzLnBpcGUoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0YXJ0V2l0aChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvcm1Hcm91cC5nZXQoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3NpdHVhY2FvVHJpYnV0YXJpYSdcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkudmFsdWVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGlzdGluY3RVbnRpbENoYW5nZWQoKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3JtR3JvdXBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAuZ2V0KCdjbGFzc2lmaWNhY2FvVHJpYnV0YXJpYScpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLnZhbHVlQ2hhbmdlcy5waXBlKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGFydFdpdGgoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3JtR3JvdXAuZ2V0KFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdjbGFzc2lmaWNhY2FvVHJpYnV0YXJpYSdcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkudmFsdWVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGlzdGluY3RVbnRpbENoYW5nZWQoKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3JtR3JvdXBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAuZ2V0KEVudW1DYW1wb1RyaWJ1dG8uUGVyaW9kb0FwdXJhY2FvKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC52YWx1ZUNoYW5nZXMucGlwZShcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RhcnRXaXRoKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9ybUdyb3VwLmdldChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBFbnVtQ2FtcG9UcmlidXRvLlBlcmlvZG9BcHVyYWNhb1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKS52YWx1ZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXN0aW5jdFVudGlsQ2hhbmdlZCgpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvcm1Hcm91cFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5nZXQoJ3ZhbG9yJylcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAudmFsdWVDaGFuZ2VzLnBpcGUoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0YXJ0V2l0aChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvcm1Hcm91cC5nZXQoJ3ZhbG9yJykudmFsdWVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGlzdGluY3RVbnRpbENoYW5nZWQoKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5waXBlKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1hcChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRheFNpdHVhdGlvbixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRheENsYXNzaWNhdGlvbixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFzc2Vzc21lbnRQZXJpb2QsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0YXhBbW91bnRcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSkgPT5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0YXhTaXR1YXRpb24sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGF4Q2xhc3NpY2F0aW9uLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFzc2Vzc21lbnRQZXJpb2QsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3IEJpZ051bWJlcih0YXhBbW91bnQpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdIGFzIGNvbnN0XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLnN1YnNjcmliZShcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0YXhTaXR1YXRpb24sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRheENsYXNzaWNhdGlvbixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXNzZXNzbWVudFBlcmlvZCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGF4QW1vdW50XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdmFsaWRhdG9yczogVmFsaWRhdG9yRm5bXSA9IFtdO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRheFNpdHVhdGlvbiB8fFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGF4Q2xhc3NpY2F0aW9uIHx8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhc3Nlc3NtZW50UGVyaW9kIHx8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0YXhBbW91bnQuaXNGaW5pdGUoKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbGlkYXRvcnMgPSBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVmFsaWRhdG9ycy5yZXF1aXJlZFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbGlkYXRvcnMgPSBbXTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvcm1Hcm91cFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLmdldChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBFbnVtQ2FtcG9UcmlidXRvLlBlcmlvZG9BcHVyYWNhb1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLnNldFZhbGlkYXRvcnModmFsaWRhdG9ycyk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9ybUdyb3VwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAuZ2V0KFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEVudW1DYW1wb1RyaWJ1dG8uUGVyaW9kb0FwdXJhY2FvXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAudXBkYXRlVmFsdWVBbmRWYWxpZGl0eSh7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZW1pdEV2ZW50OiBmYWxzZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYFJlZ3JhIEFzc2Vzc21lbnRQZXJpb2RSZXF1aXJlZFZhbGlkYXRpb25SdWxlIG7Do28gaW1wbGVtZW50YWRhIHBhcmEgbyBpbXBvc3RvICR7dGF4VHlwZX0sIGRvY3VtZW50byAke2RvY3VtZW50fS5gXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFxuICAgICAgICAgICAgICAgICAgICBgUmVncmEgQXNzZXNzbWVudFBlcmlvZFJlcXVpcmVkVmFsaWRhdGlvblJ1bGUgbsOjbyBpbXBsZW1lbnRhZGEgcGFyYSBvIGltcG9zdG8gJHt0YXhUeXBlfSwgZG9jdW1lbnRvICR7ZG9jdW1lbnR9LmBcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICB9XG4gICAgfVxufVxuIl19
|