@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,46 @@
|
|
|
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
|
+
var ValidationRulesRegistry = /** @class */ (function () {
|
|
13
|
+
function ValidationRulesRegistry(incomingInvoiceValidationRulesRegistry, outgoingInvoiceValidationRulesRegistry, saleOrderValidationRulesRegistry, purchaseOrderValidationRulesRegistry) {
|
|
14
|
+
this.incomingInvoiceValidationRulesRegistry = incomingInvoiceValidationRulesRegistry;
|
|
15
|
+
this.outgoingInvoiceValidationRulesRegistry = outgoingInvoiceValidationRulesRegistry;
|
|
16
|
+
this.saleOrderValidationRulesRegistry = saleOrderValidationRulesRegistry;
|
|
17
|
+
this.purchaseOrderValidationRulesRegistry = purchaseOrderValidationRulesRegistry;
|
|
18
|
+
}
|
|
19
|
+
ValidationRulesRegistry.prototype.get = function (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
|
+
ValidationRulesRegistry.ctorParameters = function () { return [
|
|
34
|
+
{ type: IncomingInvoiceValidationRulesRegistry },
|
|
35
|
+
{ type: OutgoingInvoiceValidationRulesRegistry },
|
|
36
|
+
{ type: SaleOrderValidationRulesRegistry },
|
|
37
|
+
{ type: PurchaseOrderValidationRulesRegistry }
|
|
38
|
+
]; };
|
|
39
|
+
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" });
|
|
40
|
+
ValidationRulesRegistry = __decorate([
|
|
41
|
+
Injectable({ providedIn: 'root' })
|
|
42
|
+
], ValidationRulesRegistry);
|
|
43
|
+
return ValidationRulesRegistry;
|
|
44
|
+
}());
|
|
45
|
+
export { ValidationRulesRegistry };
|
|
46
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmFsaWRhdGlvbi1ydWxlcy5yZWdpc3RyeS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0BzZW5pb3ItZ2VzdGFvLWVtcHJlc2FyaWFsL2VycHgtY29tcG9uZW50cy8iLCJzb3VyY2VzIjpbImNvbXBvbmVudHMvdHJpYnV0b3MvcnVsZXMvdmFsaWRhdGlvbi9yZWdpc3RyaWVzL3ZhbGlkYXRpb24tcnVsZXMucmVnaXN0cnkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFJM0MsT0FBTyxFQUFFLHNDQUFzQyxFQUFFLE1BQU0sOENBQThDLENBQUM7QUFDdEcsT0FBTyxFQUFFLHNDQUFzQyxFQUFFLE1BQU0sOENBQThDLENBQUM7QUFDdEcsT0FBTyxFQUFFLG9DQUFvQyxFQUFFLE1BQU0sNENBQTRDLENBQUM7QUFDbEcsT0FBTyxFQUFFLGdDQUFnQyxFQUFFLE1BQU0sd0NBQXdDLENBQUM7Ozs7OztBQUcxRjtJQUNJLGlDQUNxQixzQ0FBOEUsRUFDOUUsc0NBQThFLEVBQzlFLGdDQUFrRSxFQUNsRSxvQ0FBMEU7UUFIMUUsMkNBQXNDLEdBQXRDLHNDQUFzQyxDQUF3QztRQUM5RSwyQ0FBc0MsR0FBdEMsc0NBQXNDLENBQXdDO1FBQzlFLHFDQUFnQyxHQUFoQyxnQ0FBZ0MsQ0FBa0M7UUFDbEUseUNBQW9DLEdBQXBDLG9DQUFvQyxDQUFzQztJQUM1RixDQUFDO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AgdGF4VHlwZVxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICBjYXNlICdTYWxlIE9yZGVyJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5zYWxlT3JkZXJWYWxpZGF0aW9uUnVsZXNSZWdpc3RyeS5nZXQoXG4gICAgICAgICAgICAgICAgICAgIGNvbnRleHQub3JkZXIudHlwZSxcbiAgICAgICAgICAgICAgICAgICAgdGF4VHlwZVxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICBjYXNlICdQdXJjaGFzZSBPcmRlcic6XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMucHVyY2hhc2VPcmRlclZhbGlkYXRpb25SdWxlc1JlZ2lzdHJ5LmdldChcbiAgICAgICAgICAgICAgICAgICAgY29udGV4dC5vcmRlci50eXBlLFxuICAgICAgICAgICAgICAgICAgICB0YXhUeXBlXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFxuICAgICAgICAgICAgICAgICAgICBgVmFsaWRhdGlvblJ1bGVzUmVnaXN0cnkgbm90IGltcGxlbWVudGVkIGZvciAke2NvbnRleHQuZG9jdW1lbnR9YFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgIH1cbiAgICB9XG59XG4iXX0=
|
|
@@ -0,0 +1,77 @@
|
|
|
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
|
+
var ApplyNetValueToDocumentRequiredValidationRule = /** @class */ (function () {
|
|
8
|
+
function ApplyNetValueToDocumentRequiredValidationRule() {
|
|
9
|
+
}
|
|
10
|
+
ApplyNetValueToDocumentRequiredValidationRule.prototype.apply = function (_a) {
|
|
11
|
+
var document = _a.context.document, _b = _a.item, taxType = _b.name, formGroup = _b.formGroup;
|
|
12
|
+
switch (taxType) {
|
|
13
|
+
case EnumTipoTributo.CBS:
|
|
14
|
+
case EnumTipoTributo.CBS_CREDITO_PRESUMIDO:
|
|
15
|
+
case EnumTipoTributo.IBS_ESTADUAL:
|
|
16
|
+
case EnumTipoTributo.IBS_MUNICIPAL:
|
|
17
|
+
{
|
|
18
|
+
switch (document) {
|
|
19
|
+
case 'Incoming Invoice':
|
|
20
|
+
case 'Outgoing Invoice':
|
|
21
|
+
{
|
|
22
|
+
formGroup
|
|
23
|
+
.get(EnumCampoTributo.AplicarValorLiquidoDocumento)
|
|
24
|
+
.setValidators([Validators.required]);
|
|
25
|
+
formGroup
|
|
26
|
+
.get(EnumCampoTributo.AplicarValorLiquidoDocumento)
|
|
27
|
+
.updateValueAndValidity({
|
|
28
|
+
emitEvent: false
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
break;
|
|
32
|
+
default:
|
|
33
|
+
throw new Error("Regra ApplyNetValueToDocumentRequiredValidationRule n\u00E3o implementada para o imposto " + taxType + ", documento " + document + ".");
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
break;
|
|
37
|
+
case EnumTipoTributo.IBS_CREDITO_PRESUMIDO:
|
|
38
|
+
{
|
|
39
|
+
switch (document) {
|
|
40
|
+
case 'Incoming Invoice':
|
|
41
|
+
case 'Outgoing Invoice':
|
|
42
|
+
{
|
|
43
|
+
formGroup
|
|
44
|
+
.get(EnumCampoTributo.AplicarValorLiquidoDocumento)
|
|
45
|
+
.valueChanges.pipe(startWith(formGroup.get(EnumCampoTributo.AplicarValorLiquidoDocumento).value))
|
|
46
|
+
.subscribe(function (value) {
|
|
47
|
+
var validators = value
|
|
48
|
+
? [Validators.required]
|
|
49
|
+
: [];
|
|
50
|
+
formGroup
|
|
51
|
+
.get(EnumCampoTributo.AplicarValorLiquidoDocumento)
|
|
52
|
+
.setValidators(validators);
|
|
53
|
+
formGroup
|
|
54
|
+
.get(EnumCampoTributo.AplicarValorLiquidoDocumento)
|
|
55
|
+
.updateValueAndValidity({
|
|
56
|
+
emitEvent: false
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
break;
|
|
61
|
+
default:
|
|
62
|
+
throw new Error("Regra ApplyNetValueToDocumentRequiredValidationRule n\u00E3o implementada para o imposto " + taxType + ", documento " + document + ".");
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
break;
|
|
66
|
+
default:
|
|
67
|
+
throw new Error("Regra ApplyNetValueToDocumentRequiredValidationRule n\u00E3o implementada para o imposto " + taxType + ", documento " + document + ".");
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
ApplyNetValueToDocumentRequiredValidationRule.ɵprov = i0.ɵɵdefineInjectable({ factory: function ApplyNetValueToDocumentRequiredValidationRule_Factory() { return new ApplyNetValueToDocumentRequiredValidationRule(); }, token: ApplyNetValueToDocumentRequiredValidationRule, providedIn: "root" });
|
|
71
|
+
ApplyNetValueToDocumentRequiredValidationRule = __decorate([
|
|
72
|
+
Injectable({ providedIn: 'root' })
|
|
73
|
+
], ApplyNetValueToDocumentRequiredValidationRule);
|
|
74
|
+
return ApplyNetValueToDocumentRequiredValidationRule;
|
|
75
|
+
}());
|
|
76
|
+
export { ApplyNetValueToDocumentRequiredValidationRule };
|
|
77
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBwbHktbmV0LXZhbHVlLXRvLWRvY3VtZW50LXJlcXVpcmVkLXZhbGlkYXRpb24tcnVsZS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0BzZW5pb3ItZ2VzdGFvLWVtcHJlc2FyaWFsL2VycHgtY29tcG9uZW50cy8iLCJzb3VyY2VzIjpbImNvbXBvbmVudHMvdHJpYnV0b3MvcnVsZXMvdmFsaWRhdGlvbi9ydWxlcy9yZXF1aXJlZC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2N1bWVudCB9LFxuICAgICAgICBpdGVtOiB7IG5hbWU6IHRheFR5cGUsIGZvcm1Hcm91cCB9XG4gICAgfTogUnVsZVBheWxvYWQpOiB2b2lkIHtcbiAgICAgICAgc3dpdGNoICh0YXhUeXBlKSB7XG4gICAgICAgICAgICBjYXNlIEVudW1UaXBvVHJpYnV0by5DQlM6XG4gICAgICAgICAgICBjYXNlIEVudW1UaXBvVHJpYnV0by5DQlNfQ1JFRElUT19QUkVTVU1JRE86XG4gICAgICAgICAgICBjYXNlIEVudW1UaXBvVHJpYnV0by5JQlNfRVNUQURVQUw6XG4gICAgICAgICAgICBjYXNlIEVudW1UaXBvVHJpYnV0by5JQlNfTVVOSUNJUEFMOlxuICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgc3dpdGNoIChkb2N1bWVudCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnSW5jb21pbmcgSW52b2ljZSc6XG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICdPdXRnb2luZyBJbnZvaWNlJzpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvcm1Hcm91cFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLmdldChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBFbnVtQ2FtcG9UcmlidXRvLkFwbGljYXJWYWxvckxpcXVpZG9Eb2N1bWVudG9cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkhXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAuc2V0VmFsaWRhdG9ycyhbVmFsaWRhdG9ycy5yZXF1aXJlZF0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3JtR3JvdXBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5nZXQoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRW51bUNhbXBvVHJpYnV0by5BcGxpY2FyVmFsb3JMaXF1aWRvRG9jdW1lbnRvXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLnVwZGF0ZVZhbHVlQW5kVmFsaWRpdHkoe1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVtaXRFdmVudDogZmFsc2VcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBgUmVncmEgQXBwbHlOZXRWYWx1ZVRvRG9jdW1lbnRSZXF1aXJlZFZhbGlkYXRpb25SdWxlIG7Do28gaW1wbGVtZW50YWRhIHBhcmEgbyBpbXBvc3RvICR7dGF4VHlwZX0sIGRvY3VtZW50byAke2RvY3VtZW50fS5gXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIGNhc2UgRW51bVRpcG9UcmlidXRvLklCU19DUkVESVRPX1BSRVNVTUlETzpcbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgIHN3aXRjaCAoZG9jdW1lbnQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ0luY29taW5nIEludm9pY2UnOlxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnT3V0Z29pbmcgSW52b2ljZSc6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3JtR3JvdXBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5nZXQoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRW51bUNhbXBvVHJpYnV0by5BcGxpY2FyVmFsb3JMaXF1aWRvRG9jdW1lbnRvXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLnZhbHVlQ2hhbmdlcy5waXBlKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0YXJ0V2l0aChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9ybUdyb3VwLmdldChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEVudW1DYW1wb1RyaWJ1dG8uQXBsaWNhclZhbG9yTGlxdWlkb0RvY3VtZW50b1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIS52YWx1ZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5zdWJzY3JpYmUoKHZhbHVlKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgdmFsaWRhdG9yczogVmFsaWRhdG9yRm5bXSA9IHZhbHVlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gW1ZhbGlkYXRvcnMucmVxdWlyZWRdXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogW107XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3JtR3JvdXBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLmdldChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEVudW1DYW1wb1RyaWJ1dG8uQXBsaWNhclZhbG9yTGlxdWlkb0RvY3VtZW50b1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAuc2V0VmFsaWRhdG9ycyh2YWxpZGF0b3JzKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3JtR3JvdXBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLmdldChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEVudW1DYW1wb1RyaWJ1dG8uQXBsaWNhclZhbG9yTGlxdWlkb0RvY3VtZW50b1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAudXBkYXRlVmFsdWVBbmRWYWxpZGl0eSh7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbWl0RXZlbnQ6IGZhbHNlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGBSZWdyYSBBcHBseU5ldFZhbHVlVG9Eb2N1bWVudFJlcXVpcmVkVmFsaWRhdGlvblJ1bGUgbsOjbyBpbXBsZW1lbnRhZGEgcGFyYSBvIGltcG9zdG8gJHt0YXhUeXBlfSwgZG9jdW1lbnRvICR7ZG9jdW1lbnR9LmBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXG4gICAgICAgICAgICAgICAgICAgIGBSZWdyYSBBcHBseU5ldFZhbHVlVG9Eb2N1bWVudFJlcXVpcmVkVmFsaWRhdGlvblJ1bGUgbsOjbyBpbXBsZW1lbnRhZGEgcGFyYSBvIGltcG9zdG8gJHt0YXhUeXBlfSwgZG9jdW1lbnRvICR7ZG9jdW1lbnR9LmBcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICB9XG4gICAgfVxufVxuIl19
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { __decorate, __read } 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
|
+
var AssessmentPeriodRequiredValidationRule = /** @class */ (function () {
|
|
10
|
+
function AssessmentPeriodRequiredValidationRule() {
|
|
11
|
+
}
|
|
12
|
+
AssessmentPeriodRequiredValidationRule.prototype.apply = function (_a) {
|
|
13
|
+
var context = _a.context, _b = _a.item, taxType = _b.name, formGroup = _b.formGroup;
|
|
14
|
+
var document = context.document;
|
|
15
|
+
switch (taxType) {
|
|
16
|
+
case EnumTipoTributo.CBS_AJUSTE:
|
|
17
|
+
case EnumTipoTributo.IBS_AJUSTE:
|
|
18
|
+
{
|
|
19
|
+
switch (document) {
|
|
20
|
+
case 'Outgoing Invoice':
|
|
21
|
+
{
|
|
22
|
+
combineLatest([
|
|
23
|
+
formGroup
|
|
24
|
+
.get('situacaoTributaria')
|
|
25
|
+
.valueChanges.pipe(startWith(formGroup.get('situacaoTributaria').value), distinctUntilChanged()),
|
|
26
|
+
formGroup
|
|
27
|
+
.get('classificacaoTributaria')
|
|
28
|
+
.valueChanges.pipe(startWith(formGroup.get('classificacaoTributaria').value), distinctUntilChanged()),
|
|
29
|
+
formGroup
|
|
30
|
+
.get(EnumCampoTributo.PeriodoApuracao)
|
|
31
|
+
.valueChanges.pipe(startWith(formGroup.get(EnumCampoTributo.PeriodoApuracao).value), distinctUntilChanged()),
|
|
32
|
+
formGroup
|
|
33
|
+
.get('valor')
|
|
34
|
+
.valueChanges.pipe(startWith(formGroup.get('valor').value), distinctUntilChanged())
|
|
35
|
+
])
|
|
36
|
+
.pipe(map(function (_a) {
|
|
37
|
+
var _b = __read(_a, 4), taxSituation = _b[0], taxClassication = _b[1], assessmentPeriod = _b[2], taxAmount = _b[3];
|
|
38
|
+
return [
|
|
39
|
+
taxSituation,
|
|
40
|
+
taxClassication,
|
|
41
|
+
assessmentPeriod,
|
|
42
|
+
new BigNumber(taxAmount)
|
|
43
|
+
];
|
|
44
|
+
}))
|
|
45
|
+
.subscribe(function (_a) {
|
|
46
|
+
var _b = __read(_a, 4), taxSituation = _b[0], taxClassication = _b[1], assessmentPeriod = _b[2], taxAmount = _b[3];
|
|
47
|
+
var validators = [];
|
|
48
|
+
if (taxSituation ||
|
|
49
|
+
taxClassication ||
|
|
50
|
+
assessmentPeriod ||
|
|
51
|
+
taxAmount.isFinite()) {
|
|
52
|
+
validators = [
|
|
53
|
+
Validators.required
|
|
54
|
+
];
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
validators = [];
|
|
58
|
+
}
|
|
59
|
+
formGroup
|
|
60
|
+
.get(EnumCampoTributo.PeriodoApuracao)
|
|
61
|
+
.setValidators(validators);
|
|
62
|
+
formGroup
|
|
63
|
+
.get(EnumCampoTributo.PeriodoApuracao)
|
|
64
|
+
.updateValueAndValidity({
|
|
65
|
+
emitEvent: false
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
break;
|
|
70
|
+
default:
|
|
71
|
+
throw new Error("Regra AssessmentPeriodRequiredValidationRule n\u00E3o implementada para o imposto " + taxType + ", documento " + document + ".");
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
break;
|
|
75
|
+
default:
|
|
76
|
+
throw new Error("Regra AssessmentPeriodRequiredValidationRule n\u00E3o implementada para o imposto " + taxType + ", documento " + document + ".");
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
AssessmentPeriodRequiredValidationRule.ɵprov = i0.ɵɵdefineInjectable({ factory: function AssessmentPeriodRequiredValidationRule_Factory() { return new AssessmentPeriodRequiredValidationRule(); }, token: AssessmentPeriodRequiredValidationRule, providedIn: "root" });
|
|
80
|
+
AssessmentPeriodRequiredValidationRule = __decorate([
|
|
81
|
+
Injectable({ providedIn: 'root' })
|
|
82
|
+
], AssessmentPeriodRequiredValidationRule);
|
|
83
|
+
return AssessmentPeriodRequiredValidationRule;
|
|
84
|
+
}());
|
|
85
|
+
export { AssessmentPeriodRequiredValidationRule };
|
|
86
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXNzZXNzbWVudC1wZXJpb2QtcmVxdWlyZWQtdmFsaWRhdGlvbi1ydWxlLmpzIiwic291cmNlUm9vdCI6Im5nOi8vQHNlbmlvci1nZXN0YW8tZW1wcmVzYXJpYWwvZXJweC1jb21wb25lbnRzLyIsInNvdXJjZXMiOlsiY29tcG9uZW50cy90cmlidXRvcy9ydWxlcy92YWxpZGF0aW9uL3J1bGVzL3JlcXVpcmVkL2Fzc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tcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ091dGdvaW5nIEludm9pY2UnOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29tYmluZUxhdGVzdChbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3JtR3JvdXBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAuZ2V0KCdzaXR1YWNhb1RyaWJ1dGFyaWEnKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC52YWx1ZUNoYW5nZXMucGlwZShcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RhcnRXaXRoKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9ybUdyb3VwLmdldChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnc2l0dWFjYW9UcmlidXRhcmlhJ1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKS52YWx1ZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXN0aW5jdFVudGlsQ2hhbmdlZCgpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvcm1Hcm91cFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5nZXQoJ2NsYXNzaWZpY2FjYW9UcmlidXRhcmlhJylcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAudmFsdWVDaGFuZ2VzLnBpcGUoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0YXJ0V2l0aChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvcm1Hcm91cC5nZXQoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2NsYXNzaWZpY2FjYW9UcmlidXRhcmlhJ1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKS52YWx1ZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXN0aW5jdFVudGlsQ2hhbmdlZCgpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvcm1Hcm91cFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5nZXQoRW51bUNhbXBvVHJpYnV0by5QZXJpb2RvQXB1cmFjYW8pXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLnZhbHVlQ2hhbmdlcy5waXBlKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGFydFdpdGgoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3JtR3JvdXAuZ2V0KFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEVudW1DYW1wb1RyaWJ1dG8uUGVyaW9kb0FwdXJhY2FvXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApLnZhbHVlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRpc3RpbmN0VW50aWxDaGFuZ2VkKClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9ybUdyb3VwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLmdldCgndmFsb3InKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC52YWx1ZUNoYW5nZXMucGlwZShcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RhcnRXaXRoKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9ybUdyb3VwLmdldCgndmFsb3InKS52YWx1ZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXN0aW5jdFVudGlsQ2hhbmdlZCgpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLnBpcGUoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFwKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGF4U2l0dWF0aW9uLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGF4Q2xhc3NpY2F0aW9uLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXNzZXNzbWVudFBlcmlvZCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRheEFtb3VudFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdKSA9PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRheFNpdHVhdGlvbixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0YXhDbGFzc2ljYXRpb24sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXNzZXNzbWVudFBlcmlvZCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXcgQmlnTnVtYmVyKHRheEFtb3VudClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gYXMgY29uc3RcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAuc3Vic2NyaWJlKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRheFNpdHVhdGlvbixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGF4Q2xhc3NpY2F0aW9uLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhc3Nlc3NtZW50UGVyaW9kLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0YXhBbW91bnRcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB2YWxpZGF0b3JzOiBWYWxpZGF0b3JGbltdID0gW107XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGF4U2l0dWF0aW9uIHx8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0YXhDbGFzc2ljYXRpb24gfHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFzc2Vzc21lbnRQZXJpb2QgfHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRheEFtb3VudC5pc0Zpbml0ZSgpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsaWRhdG9ycyA9IFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBWYWxpZGF0b3JzLnJlcXVpcmVkXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsaWRhdG9ycyA9IFtdO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9ybUdyb3VwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAuZ2V0KFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEVudW1DYW1wb1RyaWJ1dG8uUGVyaW9kb0FwdXJhY2FvXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAuc2V0VmFsaWRhdG9ycyh2YWxpZGF0b3JzKTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3JtR3JvdXBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5nZXQoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRW51bUNhbXBvVHJpYnV0by5QZXJpb2RvQXB1cmFjYW9cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC51cGRhdGVWYWx1ZUFuZFZhbGlkaXR5KHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbWl0RXZlbnQ6IGZhbHNlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBgUmVncmEgQXNzZXNzbWVudFBlcmlvZFJlcXVpcmVkVmFsaWRhdGlvblJ1bGUgbsOjbyBpbXBsZW1lbnRhZGEgcGFyYSBvIGltcG9zdG8gJHt0YXhUeXBlfSwgZG9jdW1lbnRvICR7ZG9jdW1lbnR9LmBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXG4gICAgICAgICAgICAgICAgICAgIGBSZWdyYSBBc3Nlc3NtZW50UGVyaW9kUmVxdWlyZWRWYWxpZGF0aW9uUnVsZSBuw6NvIGltcGxlbWVudGFkYSBwYXJhIG8gaW1wb3N0byAke3RheFR5cGV9LCBkb2N1bWVudG8gJHtkb2N1bWVudH0uYFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgIH1cbiAgICB9XG59XG4iXX0=
|