@trismegisto/angular 3.3.2 → 3.3.4
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/fesm2022/trismegisto-angular-access-control.mjs +823 -0
- package/fesm2022/trismegisto-angular-access-control.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-account-avatar.mjs +54 -3
- package/fesm2022/trismegisto-angular-account-avatar.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-account-closure.mjs +221 -0
- package/fesm2022/trismegisto-angular-account-closure.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-account-forms.mjs +924 -0
- package/fesm2022/trismegisto-angular-account-forms.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-account-switcher.mjs +202 -0
- package/fesm2022/trismegisto-angular-account-switcher.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-address.mjs +631 -0
- package/fesm2022/trismegisto-angular-address.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-alert-history.mjs +294 -0
- package/fesm2022/trismegisto-angular-alert-history.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-alert-rule-editor.mjs +450 -0
- package/fesm2022/trismegisto-angular-alert-rule-editor.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-anchor-nav.mjs +157 -0
- package/fesm2022/trismegisto-angular-anchor-nav.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-announcer.mjs +79 -0
- package/fesm2022/trismegisto-angular-announcer.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-api-exchange.mjs +202 -0
- package/fesm2022/trismegisto-angular-api-exchange.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-appointment-details.mjs +254 -0
- package/fesm2022/trismegisto-angular-appointment-details.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-approval.mjs +242 -0
- package/fesm2022/trismegisto-angular-approval.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-assignee.mjs +271 -0
- package/fesm2022/trismegisto-angular-assignee.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-attachment.mjs +1 -1
- package/fesm2022/trismegisto-angular-attachment.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-availability-editor.mjs +187 -0
- package/fesm2022/trismegisto-angular-availability-editor.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-avatar-group.mjs +1 -1
- package/fesm2022/trismegisto-angular-avatar-group.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-backlog.mjs +244 -0
- package/fesm2022/trismegisto-angular-backlog.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-billing.mjs +1007 -0
- package/fesm2022/trismegisto-angular-billing.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-bottom-navigation.mjs +203 -0
- package/fesm2022/trismegisto-angular-bottom-navigation.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-bottom-sheet.mjs +428 -0
- package/fesm2022/trismegisto-angular-bottom-sheet.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-card-container.mjs +1 -1
- package/fesm2022/trismegisto-angular-card-container.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-cart.mjs +677 -0
- package/fesm2022/trismegisto-angular-cart.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-cascader.mjs +419 -0
- package/fesm2022/trismegisto-angular-cascader.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-change-history.mjs +148 -0
- package/fesm2022/trismegisto-angular-change-history.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-code-diff.mjs +2 -2
- package/fesm2022/trismegisto-angular-code-diff.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-color-picker.mjs +145 -0
- package/fesm2022/trismegisto-angular-color-picker.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-combobox-multi.mjs +6 -4
- package/fesm2022/trismegisto-angular-combobox-multi.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-commerce-format.mjs +103 -0
- package/fesm2022/trismegisto-angular-commerce-format.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-connection-wizard.mjs +159 -0
- package/fesm2022/trismegisto-angular-connection-wizard.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-consent.mjs +382 -0
- package/fesm2022/trismegisto-angular-consent.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-credentials-form.mjs +461 -0
- package/fesm2022/trismegisto-angular-credentials-form.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-data-grid.mjs +690 -18
- package/fesm2022/trismegisto-angular-data-grid.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-data-source-picker.mjs +115 -0
- package/fesm2022/trismegisto-angular-data-source-picker.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-date-picker.mjs +99 -10
- package/fesm2022/trismegisto-angular-date-picker.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-datetime-picker.mjs +183 -0
- package/fesm2022/trismegisto-angular-datetime-picker.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-deadline.mjs +326 -0
- package/fesm2022/trismegisto-angular-deadline.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-deploy-pipeline.mjs +259 -0
- package/fesm2022/trismegisto-angular-deploy-pipeline.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-drawer.mjs +11 -5
- package/fesm2022/trismegisto-angular-drawer.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-endpoint-card.mjs +143 -0
- package/fesm2022/trismegisto-angular-endpoint-card.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-entity-picker.mjs +246 -0
- package/fesm2022/trismegisto-angular-entity-picker.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-environment-picker.mjs +217 -0
- package/fesm2022/trismegisto-angular-environment-picker.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-event-calendar.mjs +234 -11
- package/fesm2022/trismegisto-angular-event-calendar.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-execution-status.mjs +211 -0
- package/fesm2022/trismegisto-angular-execution-status.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-feature-flags.mjs +153 -0
- package/fesm2022/trismegisto-angular-feature-flags.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-field-mapping.mjs +178 -0
- package/fesm2022/trismegisto-angular-field-mapping.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-file-list.mjs +222 -0
- package/fesm2022/trismegisto-angular-file-list.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-file-permissions.mjs +273 -0
- package/fesm2022/trismegisto-angular-file-permissions.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-file-upload.mjs +1 -1
- package/fesm2022/trismegisto-angular-file-upload.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-file-versions.mjs +139 -0
- package/fesm2022/trismegisto-angular-file-versions.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-filter-bar.mjs +1 -1
- package/fesm2022/trismegisto-angular-filter-bar.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-finance.mjs +912 -0
- package/fesm2022/trismegisto-angular-finance.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-form-error-summary.mjs +195 -0
- package/fesm2022/trismegisto-angular-form-error-summary.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-forms.mjs +21 -3
- package/fesm2022/trismegisto-angular-forms.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-gantt.mjs +453 -0
- package/fesm2022/trismegisto-angular-gantt.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-header.mjs +22 -5
- package/fesm2022/trismegisto-angular-header.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-health-status.mjs +204 -0
- package/fesm2022/trismegisto-angular-health-status.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-icon.mjs +96 -1
- package/fesm2022/trismegisto-angular-icon.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-identity-document.mjs +274 -0
- package/fesm2022/trismegisto-angular-identity-document.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-image-gallery.mjs +320 -0
- package/fesm2022/trismegisto-angular-image-gallery.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-incident.mjs +735 -0
- package/fesm2022/trismegisto-angular-incident.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-input.mjs +2 -1
- package/fesm2022/trismegisto-angular-input.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-integration-text.mjs +82 -0
- package/fesm2022/trismegisto-angular-integration-text.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-integration.mjs +423 -0
- package/fesm2022/trismegisto-angular-integration.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-invoice.mjs +381 -0
- package/fesm2022/trismegisto-angular-invoice.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-json-viewer.mjs +388 -0
- package/fesm2022/trismegisto-angular-json-viewer.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-kanban.mjs +49 -9
- package/fesm2022/trismegisto-angular-kanban.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-level-badge.mjs +192 -0
- package/fesm2022/trismegisto-angular-level-badge.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-location-select.mjs +213 -0
- package/fesm2022/trismegisto-angular-location-select.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-log-viewer.mjs +260 -0
- package/fesm2022/trismegisto-angular-log-viewer.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-maintenance-window.mjs +286 -0
- package/fesm2022/trismegisto-angular-maintenance-window.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-member-list.mjs +303 -0
- package/fesm2022/trismegisto-angular-member-list.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-mention-text.mjs +44 -0
- package/fesm2022/trismegisto-angular-mention-text.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-menu.mjs +10 -4
- package/fesm2022/trismegisto-angular-menu.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-message.mjs +132 -7
- package/fesm2022/trismegisto-angular-message.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-metric-explorer.mjs +367 -0
- package/fesm2022/trismegisto-angular-metric-explorer.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-modal.mjs +14 -5
- package/fesm2022/trismegisto-angular-modal.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-monitoring-text.mjs +121 -0
- package/fesm2022/trismegisto-angular-monitoring-text.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-month-picker.mjs +232 -0
- package/fesm2022/trismegisto-angular-month-picker.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-navigation-menu.mjs +68 -9
- package/fesm2022/trismegisto-angular-navigation-menu.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-number-field.mjs +275 -0
- package/fesm2022/trismegisto-angular-number-field.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-observability-text.mjs +244 -0
- package/fesm2022/trismegisto-angular-observability-text.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-order.mjs +443 -0
- package/fesm2022/trismegisto-angular-order.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-org-chart.mjs +678 -0
- package/fesm2022/trismegisto-angular-org-chart.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-password-strength.mjs +204 -0
- package/fesm2022/trismegisto-angular-password-strength.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-payment-fields.mjs +818 -0
- package/fesm2022/trismegisto-angular-payment-fields.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-payment-form.mjs +405 -0
- package/fesm2022/trismegisto-angular-payment-form.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-payment-method.mjs +331 -0
- package/fesm2022/trismegisto-angular-payment-method.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-pdf-viewer.mjs +113 -0
- package/fesm2022/trismegisto-angular-pdf-viewer.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-permission-matrix.mjs +266 -0
- package/fesm2022/trismegisto-angular-permission-matrix.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-pipes.mjs +171 -2
- package/fesm2022/trismegisto-angular-pipes.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-popconfirm.mjs +239 -0
- package/fesm2022/trismegisto-angular-popconfirm.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-popover.mjs +6 -2
- package/fesm2022/trismegisto-angular-popover.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-price.mjs +276 -0
- package/fesm2022/trismegisto-angular-price.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-product.mjs +800 -0
- package/fesm2022/trismegisto-angular-product.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-progress.mjs +119 -4
- package/fesm2022/trismegisto-angular-progress.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-rating.mjs +166 -0
- package/fesm2022/trismegisto-angular-rating.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-reason-dialog.mjs +137 -0
- package/fesm2022/trismegisto-angular-reason-dialog.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-recurrence-editor.mjs +429 -0
- package/fesm2022/trismegisto-angular-recurrence-editor.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-release-timeline.mjs +175 -0
- package/fesm2022/trismegisto-angular-release-timeline.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-report-history.mjs +251 -0
- package/fesm2022/trismegisto-angular-report-history.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-report-schedule.mjs +240 -0
- package/fesm2022/trismegisto-angular-report-schedule.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-resource-calendar.mjs +172 -0
- package/fesm2022/trismegisto-angular-resource-calendar.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-resource-usage.mjs +208 -0
- package/fesm2022/trismegisto-angular-resource-usage.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-return-request.mjs +316 -0
- package/fesm2022/trismegisto-angular-return-request.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-rich-text.mjs +1 -1
- package/fesm2022/trismegisto-angular-rich-text.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-risk-register.mjs +342 -0
- package/fesm2022/trismegisto-angular-risk-register.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-save-status.mjs +166 -0
- package/fesm2022/trismegisto-angular-save-status.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-service-map.mjs +471 -0
- package/fesm2022/trismegisto-angular-service-map.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-service-status.mjs +278 -0
- package/fesm2022/trismegisto-angular-service-status.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-shipping.mjs +410 -0
- package/fesm2022/trismegisto-angular-shipping.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-sidebar.mjs +3 -0
- package/fesm2022/trismegisto-angular-sidebar.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-skip-link.mjs +74 -0
- package/fesm2022/trismegisto-angular-skip-link.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-sla-summary.mjs +349 -0
- package/fesm2022/trismegisto-angular-sla-summary.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-slot-picker.mjs +229 -0
- package/fesm2022/trismegisto-angular-slot-picker.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-split-button.mjs +190 -0
- package/fesm2022/trismegisto-angular-split-button.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-status-badge.mjs +80 -0
- package/fesm2022/trismegisto-angular-status-badge.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-status-select.mjs +156 -0
- package/fesm2022/trismegisto-angular-status-select.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-storage-usage.mjs +136 -0
- package/fesm2022/trismegisto-angular-storage-usage.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-swimlane-board.mjs +237 -0
- package/fesm2022/trismegisto-angular-swimlane-board.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-sync-status.mjs +269 -0
- package/fesm2022/trismegisto-angular-sync-status.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-tag-input.mjs +345 -0
- package/fesm2022/trismegisto-angular-tag-input.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-task-card.mjs +315 -0
- package/fesm2022/trismegisto-angular-task-card.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-task-detail.mjs +737 -0
- package/fesm2022/trismegisto-angular-task-detail.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-textarea.mjs +129 -8
- package/fesm2022/trismegisto-angular-textarea.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-time-range.mjs +201 -0
- package/fesm2022/trismegisto-angular-time-range.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-toast.mjs +135 -34
- package/fesm2022/trismegisto-angular-toast.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-tour.mjs +385 -0
- package/fesm2022/trismegisto-angular-tour.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-trace-waterfall.mjs +511 -0
- package/fesm2022/trismegisto-angular-trace-waterfall.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-transaction.mjs +616 -0
- package/fesm2022/trismegisto-angular-transaction.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-tree-select.mjs +444 -0
- package/fesm2022/trismegisto-angular-tree-select.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-tree.mjs +1 -1
- package/fesm2022/trismegisto-angular-tree.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-unsaved-changes.mjs +147 -0
- package/fesm2022/trismegisto-angular-unsaved-changes.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-uptime-bar.mjs +271 -0
- package/fesm2022/trismegisto-angular-uptime-bar.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-user-card.mjs +298 -0
- package/fesm2022/trismegisto-angular-user-card.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-vehicle-plate.mjs +245 -0
- package/fesm2022/trismegisto-angular-vehicle-plate.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-webhook.mjs +358 -0
- package/fesm2022/trismegisto-angular-webhook.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-wizard.mjs +2 -2
- package/fesm2022/trismegisto-angular-wizard.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-workflow-diagram.mjs +441 -0
- package/fesm2022/trismegisto-angular-workflow-diagram.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-workflow-i18n.mjs +890 -0
- package/fesm2022/trismegisto-angular-workflow-i18n.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-workload.mjs +172 -0
- package/fesm2022/trismegisto-angular-workload.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-workspace-persistence.mjs +3 -2
- package/fesm2022/trismegisto-angular-workspace-persistence.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-workspace.mjs +229 -44
- package/fesm2022/trismegisto-angular-workspace.mjs.map +1 -1
- package/fesm2022/trismegisto-angular.mjs +117 -7
- package/fesm2022/trismegisto-angular.mjs.map +1 -1
- package/package.json +449 -5
- package/types/trismegisto-angular-access-control.d.ts +330 -0
- package/types/trismegisto-angular-access-control.d.ts.map +1 -0
- package/types/trismegisto-angular-account-avatar.d.ts +18 -1
- package/types/trismegisto-angular-account-avatar.d.ts.map +1 -1
- package/types/trismegisto-angular-account-closure.d.ts +85 -0
- package/types/trismegisto-angular-account-closure.d.ts.map +1 -0
- package/types/trismegisto-angular-account-forms.d.ts +381 -0
- package/types/trismegisto-angular-account-forms.d.ts.map +1 -0
- package/types/trismegisto-angular-account-switcher.d.ts +60 -0
- package/types/trismegisto-angular-account-switcher.d.ts.map +1 -0
- package/types/trismegisto-angular-address.d.ts +267 -0
- package/types/trismegisto-angular-address.d.ts.map +1 -0
- package/types/trismegisto-angular-alert-history.d.ts +77 -0
- package/types/trismegisto-angular-alert-history.d.ts.map +1 -0
- package/types/trismegisto-angular-alert-rule-editor.d.ts +123 -0
- package/types/trismegisto-angular-alert-rule-editor.d.ts.map +1 -0
- package/types/trismegisto-angular-anchor-nav.d.ts +78 -0
- package/types/trismegisto-angular-anchor-nav.d.ts.map +1 -0
- package/types/trismegisto-angular-announcer.d.ts +49 -0
- package/types/trismegisto-angular-announcer.d.ts.map +1 -0
- package/types/trismegisto-angular-api-exchange.d.ts +155 -0
- package/types/trismegisto-angular-api-exchange.d.ts.map +1 -0
- package/types/trismegisto-angular-appointment-details.d.ts +123 -0
- package/types/trismegisto-angular-appointment-details.d.ts.map +1 -0
- package/types/trismegisto-angular-approval.d.ts +109 -0
- package/types/trismegisto-angular-approval.d.ts.map +1 -0
- package/types/trismegisto-angular-assignee.d.ts +120 -0
- package/types/trismegisto-angular-assignee.d.ts.map +1 -0
- package/types/trismegisto-angular-availability-editor.d.ts +100 -0
- package/types/trismegisto-angular-availability-editor.d.ts.map +1 -0
- package/types/trismegisto-angular-backlog.d.ts +98 -0
- package/types/trismegisto-angular-backlog.d.ts.map +1 -0
- package/types/trismegisto-angular-billing.d.ts +851 -0
- package/types/trismegisto-angular-billing.d.ts.map +1 -0
- package/types/trismegisto-angular-bottom-navigation.d.ts +83 -0
- package/types/trismegisto-angular-bottom-navigation.d.ts.map +1 -0
- package/types/trismegisto-angular-bottom-sheet.d.ts +121 -0
- package/types/trismegisto-angular-bottom-sheet.d.ts.map +1 -0
- package/types/trismegisto-angular-cart.d.ts +267 -0
- package/types/trismegisto-angular-cart.d.ts.map +1 -0
- package/types/trismegisto-angular-cascader.d.ts +133 -0
- package/types/trismegisto-angular-cascader.d.ts.map +1 -0
- package/types/trismegisto-angular-change-history.d.ts +58 -0
- package/types/trismegisto-angular-change-history.d.ts.map +1 -0
- package/types/trismegisto-angular-color-picker.d.ts +73 -0
- package/types/trismegisto-angular-color-picker.d.ts.map +1 -0
- package/types/trismegisto-angular-combobox-multi.d.ts +3 -1
- package/types/trismegisto-angular-combobox-multi.d.ts.map +1 -1
- package/types/trismegisto-angular-commerce-format.d.ts +43 -0
- package/types/trismegisto-angular-commerce-format.d.ts.map +1 -0
- package/types/trismegisto-angular-connection-wizard.d.ts +110 -0
- package/types/trismegisto-angular-connection-wizard.d.ts.map +1 -0
- package/types/trismegisto-angular-consent.d.ts +142 -0
- package/types/trismegisto-angular-consent.d.ts.map +1 -0
- package/types/trismegisto-angular-credentials-form.d.ts +242 -0
- package/types/trismegisto-angular-credentials-form.d.ts.map +1 -0
- package/types/trismegisto-angular-data-grid.d.ts +382 -48
- package/types/trismegisto-angular-data-grid.d.ts.map +1 -1
- package/types/trismegisto-angular-data-source-picker.d.ts +73 -0
- package/types/trismegisto-angular-data-source-picker.d.ts.map +1 -0
- package/types/trismegisto-angular-date-picker.d.ts +75 -4
- package/types/trismegisto-angular-date-picker.d.ts.map +1 -1
- package/types/trismegisto-angular-datetime-picker.d.ts +89 -0
- package/types/trismegisto-angular-datetime-picker.d.ts.map +1 -0
- package/types/trismegisto-angular-deadline.d.ts +143 -0
- package/types/trismegisto-angular-deadline.d.ts.map +1 -0
- package/types/trismegisto-angular-deploy-pipeline.d.ts +100 -0
- package/types/trismegisto-angular-deploy-pipeline.d.ts.map +1 -0
- package/types/trismegisto-angular-drawer.d.ts +6 -3
- package/types/trismegisto-angular-drawer.d.ts.map +1 -1
- package/types/trismegisto-angular-endpoint-card.d.ts +113 -0
- package/types/trismegisto-angular-endpoint-card.d.ts.map +1 -0
- package/types/trismegisto-angular-entity-picker.d.ts +88 -0
- package/types/trismegisto-angular-entity-picker.d.ts.map +1 -0
- package/types/trismegisto-angular-environment-picker.d.ts +72 -0
- package/types/trismegisto-angular-environment-picker.d.ts.map +1 -0
- package/types/trismegisto-angular-event-calendar.d.ts +52 -6
- package/types/trismegisto-angular-event-calendar.d.ts.map +1 -1
- package/types/trismegisto-angular-execution-status.d.ts +76 -0
- package/types/trismegisto-angular-execution-status.d.ts.map +1 -0
- package/types/trismegisto-angular-feature-flags.d.ts +97 -0
- package/types/trismegisto-angular-feature-flags.d.ts.map +1 -0
- package/types/trismegisto-angular-field-mapping.d.ts +118 -0
- package/types/trismegisto-angular-field-mapping.d.ts.map +1 -0
- package/types/trismegisto-angular-file-list.d.ts +136 -0
- package/types/trismegisto-angular-file-list.d.ts.map +1 -0
- package/types/trismegisto-angular-file-permissions.d.ts +171 -0
- package/types/trismegisto-angular-file-permissions.d.ts.map +1 -0
- package/types/trismegisto-angular-file-versions.d.ts +93 -0
- package/types/trismegisto-angular-file-versions.d.ts.map +1 -0
- package/types/trismegisto-angular-finance.d.ts +623 -0
- package/types/trismegisto-angular-finance.d.ts.map +1 -0
- package/types/trismegisto-angular-form-error-summary.d.ts +98 -0
- package/types/trismegisto-angular-form-error-summary.d.ts.map +1 -0
- package/types/trismegisto-angular-forms.d.ts +14 -1
- package/types/trismegisto-angular-forms.d.ts.map +1 -1
- package/types/trismegisto-angular-gantt.d.ts +128 -0
- package/types/trismegisto-angular-gantt.d.ts.map +1 -0
- package/types/trismegisto-angular-header.d.ts +5 -1
- package/types/trismegisto-angular-header.d.ts.map +1 -1
- package/types/trismegisto-angular-health-status.d.ts +71 -0
- package/types/trismegisto-angular-health-status.d.ts.map +1 -0
- package/types/trismegisto-angular-icon.d.ts +96 -1
- package/types/trismegisto-angular-icon.d.ts.map +1 -1
- package/types/trismegisto-angular-identity-document.d.ts +112 -0
- package/types/trismegisto-angular-identity-document.d.ts.map +1 -0
- package/types/trismegisto-angular-image-gallery.d.ts +129 -0
- package/types/trismegisto-angular-image-gallery.d.ts.map +1 -0
- package/types/trismegisto-angular-incident.d.ts +212 -0
- package/types/trismegisto-angular-incident.d.ts.map +1 -0
- package/types/trismegisto-angular-input.d.ts.map +1 -1
- package/types/trismegisto-angular-integration-text.d.ts +42 -0
- package/types/trismegisto-angular-integration-text.d.ts.map +1 -0
- package/types/trismegisto-angular-integration.d.ts +283 -0
- package/types/trismegisto-angular-integration.d.ts.map +1 -0
- package/types/trismegisto-angular-invoice.d.ts +221 -0
- package/types/trismegisto-angular-invoice.d.ts.map +1 -0
- package/types/trismegisto-angular-json-viewer.d.ts +117 -0
- package/types/trismegisto-angular-json-viewer.d.ts.map +1 -0
- package/types/trismegisto-angular-kanban.d.ts +38 -3
- package/types/trismegisto-angular-kanban.d.ts.map +1 -1
- package/types/trismegisto-angular-level-badge.d.ts +87 -0
- package/types/trismegisto-angular-level-badge.d.ts.map +1 -0
- package/types/trismegisto-angular-location-select.d.ts +80 -0
- package/types/trismegisto-angular-location-select.d.ts.map +1 -0
- package/types/trismegisto-angular-log-viewer.d.ts +125 -0
- package/types/trismegisto-angular-log-viewer.d.ts.map +1 -0
- package/types/trismegisto-angular-maintenance-window.d.ts +89 -0
- package/types/trismegisto-angular-maintenance-window.d.ts.map +1 -0
- package/types/trismegisto-angular-member-list.d.ts +80 -0
- package/types/trismegisto-angular-member-list.d.ts.map +1 -0
- package/types/trismegisto-angular-mention-text.d.ts +28 -0
- package/types/trismegisto-angular-mention-text.d.ts.map +1 -0
- package/types/trismegisto-angular-menu.d.ts +4 -1
- package/types/trismegisto-angular-menu.d.ts.map +1 -1
- package/types/trismegisto-angular-message.d.ts +31 -2
- package/types/trismegisto-angular-message.d.ts.map +1 -1
- package/types/trismegisto-angular-metric-explorer.d.ts +117 -0
- package/types/trismegisto-angular-metric-explorer.d.ts.map +1 -0
- package/types/trismegisto-angular-modal.d.ts +1 -0
- package/types/trismegisto-angular-modal.d.ts.map +1 -1
- package/types/trismegisto-angular-monitoring-text.d.ts +57 -0
- package/types/trismegisto-angular-monitoring-text.d.ts.map +1 -0
- package/types/trismegisto-angular-month-picker.d.ts +104 -0
- package/types/trismegisto-angular-month-picker.d.ts.map +1 -0
- package/types/trismegisto-angular-navigation-menu.d.ts +35 -2
- package/types/trismegisto-angular-navigation-menu.d.ts.map +1 -1
- package/types/trismegisto-angular-number-field.d.ts +148 -0
- package/types/trismegisto-angular-number-field.d.ts.map +1 -0
- package/types/trismegisto-angular-observability-text.d.ts +85 -0
- package/types/trismegisto-angular-observability-text.d.ts.map +1 -0
- package/types/trismegisto-angular-order.d.ts +268 -0
- package/types/trismegisto-angular-order.d.ts.map +1 -0
- package/types/trismegisto-angular-org-chart.d.ts +145 -0
- package/types/trismegisto-angular-org-chart.d.ts.map +1 -0
- package/types/trismegisto-angular-password-strength.d.ts +74 -0
- package/types/trismegisto-angular-password-strength.d.ts.map +1 -0
- package/types/trismegisto-angular-payment-fields.d.ts +450 -0
- package/types/trismegisto-angular-payment-fields.d.ts.map +1 -0
- package/types/trismegisto-angular-payment-form.d.ts +189 -0
- package/types/trismegisto-angular-payment-form.d.ts.map +1 -0
- package/types/trismegisto-angular-payment-method.d.ts +238 -0
- package/types/trismegisto-angular-payment-method.d.ts.map +1 -0
- package/types/trismegisto-angular-pdf-viewer.d.ts +70 -0
- package/types/trismegisto-angular-pdf-viewer.d.ts.map +1 -0
- package/types/trismegisto-angular-permission-matrix.d.ts +70 -0
- package/types/trismegisto-angular-permission-matrix.d.ts.map +1 -0
- package/types/trismegisto-angular-pipes.d.ts +108 -2
- package/types/trismegisto-angular-pipes.d.ts.map +1 -1
- package/types/trismegisto-angular-popconfirm.d.ts +115 -0
- package/types/trismegisto-angular-popconfirm.d.ts.map +1 -0
- package/types/trismegisto-angular-popover.d.ts +3 -1
- package/types/trismegisto-angular-popover.d.ts.map +1 -1
- package/types/trismegisto-angular-price.d.ts +185 -0
- package/types/trismegisto-angular-price.d.ts.map +1 -0
- package/types/trismegisto-angular-product.d.ts +391 -0
- package/types/trismegisto-angular-product.d.ts.map +1 -0
- package/types/trismegisto-angular-progress.d.ts +20 -3
- package/types/trismegisto-angular-progress.d.ts.map +1 -1
- package/types/trismegisto-angular-rating.d.ts +83 -0
- package/types/trismegisto-angular-rating.d.ts.map +1 -0
- package/types/trismegisto-angular-reason-dialog.d.ts +65 -0
- package/types/trismegisto-angular-reason-dialog.d.ts.map +1 -0
- package/types/trismegisto-angular-recurrence-editor.d.ts +151 -0
- package/types/trismegisto-angular-recurrence-editor.d.ts.map +1 -0
- package/types/trismegisto-angular-release-timeline.d.ts +79 -0
- package/types/trismegisto-angular-release-timeline.d.ts.map +1 -0
- package/types/trismegisto-angular-report-history.d.ts +144 -0
- package/types/trismegisto-angular-report-history.d.ts.map +1 -0
- package/types/trismegisto-angular-report-schedule.d.ts +138 -0
- package/types/trismegisto-angular-report-schedule.d.ts.map +1 -0
- package/types/trismegisto-angular-resource-calendar.d.ts +107 -0
- package/types/trismegisto-angular-resource-calendar.d.ts.map +1 -0
- package/types/trismegisto-angular-resource-usage.d.ts +91 -0
- package/types/trismegisto-angular-resource-usage.d.ts.map +1 -0
- package/types/trismegisto-angular-return-request.d.ts +158 -0
- package/types/trismegisto-angular-return-request.d.ts.map +1 -0
- package/types/trismegisto-angular-risk-register.d.ts +130 -0
- package/types/trismegisto-angular-risk-register.d.ts.map +1 -0
- package/types/trismegisto-angular-save-status.d.ts +67 -0
- package/types/trismegisto-angular-save-status.d.ts.map +1 -0
- package/types/trismegisto-angular-service-map.d.ts +111 -0
- package/types/trismegisto-angular-service-map.d.ts.map +1 -0
- package/types/trismegisto-angular-service-status.d.ts +82 -0
- package/types/trismegisto-angular-service-status.d.ts.map +1 -0
- package/types/trismegisto-angular-shipping.d.ts +221 -0
- package/types/trismegisto-angular-shipping.d.ts.map +1 -0
- package/types/trismegisto-angular-sidebar.d.ts +1 -0
- package/types/trismegisto-angular-sidebar.d.ts.map +1 -1
- package/types/trismegisto-angular-skip-link.d.ts +53 -0
- package/types/trismegisto-angular-skip-link.d.ts.map +1 -0
- package/types/trismegisto-angular-sla-summary.d.ts +104 -0
- package/types/trismegisto-angular-sla-summary.d.ts.map +1 -0
- package/types/trismegisto-angular-slot-picker.d.ts +128 -0
- package/types/trismegisto-angular-slot-picker.d.ts.map +1 -0
- package/types/trismegisto-angular-split-button.d.ts +81 -0
- package/types/trismegisto-angular-split-button.d.ts.map +1 -0
- package/types/trismegisto-angular-status-badge.d.ts +40 -0
- package/types/trismegisto-angular-status-badge.d.ts.map +1 -0
- package/types/trismegisto-angular-status-select.d.ts +76 -0
- package/types/trismegisto-angular-status-select.d.ts.map +1 -0
- package/types/trismegisto-angular-storage-usage.d.ts +82 -0
- package/types/trismegisto-angular-storage-usage.d.ts.map +1 -0
- package/types/trismegisto-angular-swimlane-board.d.ts +114 -0
- package/types/trismegisto-angular-swimlane-board.d.ts.map +1 -0
- package/types/trismegisto-angular-sync-status.d.ts +191 -0
- package/types/trismegisto-angular-sync-status.d.ts.map +1 -0
- package/types/trismegisto-angular-tag-input.d.ts +121 -0
- package/types/trismegisto-angular-tag-input.d.ts.map +1 -0
- package/types/trismegisto-angular-task-card.d.ts +106 -0
- package/types/trismegisto-angular-task-card.d.ts.map +1 -0
- package/types/trismegisto-angular-task-detail.d.ts +248 -0
- package/types/trismegisto-angular-task-detail.d.ts.map +1 -0
- package/types/trismegisto-angular-textarea.d.ts +31 -1
- package/types/trismegisto-angular-textarea.d.ts.map +1 -1
- package/types/trismegisto-angular-time-range.d.ts +92 -0
- package/types/trismegisto-angular-time-range.d.ts.map +1 -0
- package/types/trismegisto-angular-toast.d.ts +50 -11
- package/types/trismegisto-angular-toast.d.ts.map +1 -1
- package/types/trismegisto-angular-tour.d.ts +116 -0
- package/types/trismegisto-angular-tour.d.ts.map +1 -0
- package/types/trismegisto-angular-trace-waterfall.d.ts +111 -0
- package/types/trismegisto-angular-trace-waterfall.d.ts.map +1 -0
- package/types/trismegisto-angular-transaction.d.ts +542 -0
- package/types/trismegisto-angular-transaction.d.ts.map +1 -0
- package/types/trismegisto-angular-tree-select.d.ts +197 -0
- package/types/trismegisto-angular-tree-select.d.ts.map +1 -0
- package/types/trismegisto-angular-unsaved-changes.d.ts +101 -0
- package/types/trismegisto-angular-unsaved-changes.d.ts.map +1 -0
- package/types/trismegisto-angular-uptime-bar.d.ts +90 -0
- package/types/trismegisto-angular-uptime-bar.d.ts.map +1 -0
- package/types/trismegisto-angular-user-card.d.ts +126 -0
- package/types/trismegisto-angular-user-card.d.ts.map +1 -0
- package/types/trismegisto-angular-vehicle-plate.d.ts +107 -0
- package/types/trismegisto-angular-vehicle-plate.d.ts.map +1 -0
- package/types/trismegisto-angular-webhook.d.ts +244 -0
- package/types/trismegisto-angular-webhook.d.ts.map +1 -0
- package/types/trismegisto-angular-workflow-diagram.d.ts +136 -0
- package/types/trismegisto-angular-workflow-diagram.d.ts.map +1 -0
- package/types/trismegisto-angular-workflow-i18n.d.ts +358 -0
- package/types/trismegisto-angular-workflow-i18n.d.ts.map +1 -0
- package/types/trismegisto-angular-workload.d.ts +64 -0
- package/types/trismegisto-angular-workload.d.ts.map +1 -0
- package/types/trismegisto-angular-workspace-persistence.d.ts +5 -4
- package/types/trismegisto-angular-workspace-persistence.d.ts.map +1 -1
- package/types/trismegisto-angular-workspace.d.ts +79 -7
- package/types/trismegisto-angular-workspace.d.ts.map +1 -1
- package/types/trismegisto-angular.d.ts +120 -10
- package/types/trismegisto-angular.d.ts.map +1 -1
|
@@ -0,0 +1,912 @@
|
|
|
1
|
+
import { NgTemplateOutlet } from '@angular/common';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { input, booleanAttribute, model, computed, ChangeDetectionStrategy, Component, signal } from '@angular/core';
|
|
4
|
+
import { readCredit, formatMessage, budgetVariance, budgetTotals, pluralMessage, BUDGET_STATUS_TONES, summarizeFinances, trendDirection, trendTone, reconciliationState, canMatch, suggestMatches } from '@trismegisto/primitives';
|
|
5
|
+
import { localCatalog, formatLocale, formatDate, formatMoney, formatPercent } from '@trismegisto/angular/commerce-format';
|
|
6
|
+
import { IconButtonComponent } from '@trismegisto/angular/icon-button';
|
|
7
|
+
import { ICON_BALANCE, ICON_CHECK_CIRCLE, ICON_EYE, ICON_EYE_HIDE, ICON_LINK, ICON_MONEY_DOWN, ICON_MONEY_UP, ICON_UNLINK, ICON_WAND, useHermesIcons, IconComponent } from '@trismegisto/angular/icon';
|
|
8
|
+
import { TagComponent } from '@trismegisto/angular/tag';
|
|
9
|
+
import { StatCardComponent } from '@trismegisto/angular/stat-card';
|
|
10
|
+
import { ButtonComponent } from '@trismegisto/angular/button';
|
|
11
|
+
|
|
12
|
+
const FINANCE_ICONS = [ICON_BALANCE, ICON_CHECK_CIRCLE, ICON_EYE, ICON_EYE_HIDE, ICON_LINK, ICON_MONEY_DOWN, ICON_MONEY_UP, ICON_UNLINK, ICON_WAND];
|
|
13
|
+
|
|
14
|
+
// Textos das peças de `@trismegisto/angular/finance` em pt-BR, en e es — fora do HERMES_MESSAGES de propósito
|
|
15
|
+
// (o pt-BR do catálogo geral vai embutido em todo app). O componente escolhe pelo idioma ativo
|
|
16
|
+
// (`HermesI18nService.pick`) e o app sobrescreve qualquer texto pelo input `texts`.
|
|
17
|
+
const FINANCE_MESSAGES_PT_BR = {
|
|
18
|
+
balance: {
|
|
19
|
+
balance: 'Saldo',
|
|
20
|
+
available: 'Disponível',
|
|
21
|
+
pending: 'A liberar',
|
|
22
|
+
creditLimit: 'Limite total',
|
|
23
|
+
creditUsed: 'Usado',
|
|
24
|
+
creditAvailable: 'Limite disponível',
|
|
25
|
+
credit: 'Crédito',
|
|
26
|
+
hide: 'Ocultar valores',
|
|
27
|
+
show: 'Mostrar valores',
|
|
28
|
+
hidden: 'Valor oculto',
|
|
29
|
+
updated: 'Atualizado em {date}',
|
|
30
|
+
},
|
|
31
|
+
summary: {
|
|
32
|
+
heading: 'Resumo financeiro',
|
|
33
|
+
revenue: 'Receitas',
|
|
34
|
+
expenses: 'Despesas',
|
|
35
|
+
net: 'Resultado',
|
|
36
|
+
margin: 'Margem de {percent}',
|
|
37
|
+
vsPrevious: 'vs. período anterior',
|
|
38
|
+
profit: 'Lucro',
|
|
39
|
+
loss: 'Prejuízo',
|
|
40
|
+
comparison: 'Receitas e despesas',
|
|
41
|
+
},
|
|
42
|
+
budgetStatus: {
|
|
43
|
+
under: 'Abaixo do previsto',
|
|
44
|
+
'on-track': 'Dentro do previsto',
|
|
45
|
+
near: 'Perto do limite',
|
|
46
|
+
over: 'Acima do orçamento',
|
|
47
|
+
},
|
|
48
|
+
budget: {
|
|
49
|
+
heading: 'Orçamento',
|
|
50
|
+
category: 'Categoria',
|
|
51
|
+
budget: 'Orçado',
|
|
52
|
+
actual: 'Realizado',
|
|
53
|
+
variance: 'Variação',
|
|
54
|
+
status: 'Situação',
|
|
55
|
+
total: 'Total',
|
|
56
|
+
usedOf: '{percent} do orçado',
|
|
57
|
+
overCount: {
|
|
58
|
+
one: '{count} categoria acima do orçamento',
|
|
59
|
+
other: '{count} categorias acima do orçamento',
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
reconciliation: {
|
|
63
|
+
heading: 'Conciliação',
|
|
64
|
+
statement: 'Extrato bancário',
|
|
65
|
+
ledger: 'Lançamentos do sistema',
|
|
66
|
+
matched: 'Conciliados',
|
|
67
|
+
select: 'Selecionar {description}',
|
|
68
|
+
match: 'Conciliar selecionados',
|
|
69
|
+
unmatch: 'Desfazer conciliação de {description}',
|
|
70
|
+
suggest: 'Sugerir pares',
|
|
71
|
+
suggested: { one: '{count} par sugerido.', other: '{count} pares sugeridos.' },
|
|
72
|
+
noSuggestion: 'Nenhum par encontrado com o mesmo valor e data próxima.',
|
|
73
|
+
difference: 'Diferença',
|
|
74
|
+
statementTotal: 'Total do extrato',
|
|
75
|
+
ledgerTotal: 'Total do sistema',
|
|
76
|
+
balanced: 'Tudo conciliado.',
|
|
77
|
+
amountsDiffer: 'Os valores selecionados são diferentes.',
|
|
78
|
+
pending: { one: '{count} pendente', other: '{count} pendentes' },
|
|
79
|
+
empty: 'Nada pendente.',
|
|
80
|
+
matchedAnnounce: '{statement} conciliado com {ledger}.',
|
|
81
|
+
},
|
|
82
|
+
};
|
|
83
|
+
const FINANCE_MESSAGES_EN = {
|
|
84
|
+
balance: {
|
|
85
|
+
balance: 'Balance',
|
|
86
|
+
available: 'Available',
|
|
87
|
+
pending: 'Pending',
|
|
88
|
+
creditLimit: 'Total limit',
|
|
89
|
+
creditUsed: 'Used',
|
|
90
|
+
creditAvailable: 'Available credit',
|
|
91
|
+
credit: 'Credit',
|
|
92
|
+
hide: 'Hide amounts',
|
|
93
|
+
show: 'Show amounts',
|
|
94
|
+
hidden: 'Amount hidden',
|
|
95
|
+
updated: 'Updated {date}',
|
|
96
|
+
},
|
|
97
|
+
summary: {
|
|
98
|
+
heading: 'Financial summary',
|
|
99
|
+
revenue: 'Revenue',
|
|
100
|
+
expenses: 'Expenses',
|
|
101
|
+
net: 'Net result',
|
|
102
|
+
margin: '{percent} margin',
|
|
103
|
+
vsPrevious: 'vs. previous period',
|
|
104
|
+
profit: 'Profit',
|
|
105
|
+
loss: 'Loss',
|
|
106
|
+
comparison: 'Revenue and expenses',
|
|
107
|
+
},
|
|
108
|
+
budgetStatus: {
|
|
109
|
+
under: 'Under plan',
|
|
110
|
+
'on-track': 'On track',
|
|
111
|
+
near: 'Near the limit',
|
|
112
|
+
over: 'Over budget',
|
|
113
|
+
},
|
|
114
|
+
budget: {
|
|
115
|
+
heading: 'Budget',
|
|
116
|
+
category: 'Category',
|
|
117
|
+
budget: 'Budgeted',
|
|
118
|
+
actual: 'Actual',
|
|
119
|
+
variance: 'Variance',
|
|
120
|
+
status: 'Status',
|
|
121
|
+
total: 'Total',
|
|
122
|
+
usedOf: '{percent} of budget',
|
|
123
|
+
overCount: { one: '{count} category over budget', other: '{count} categories over budget' },
|
|
124
|
+
},
|
|
125
|
+
reconciliation: {
|
|
126
|
+
heading: 'Reconciliation',
|
|
127
|
+
statement: 'Bank statement',
|
|
128
|
+
ledger: 'System entries',
|
|
129
|
+
matched: 'Reconciled',
|
|
130
|
+
select: 'Select {description}',
|
|
131
|
+
match: 'Reconcile selected',
|
|
132
|
+
unmatch: 'Undo reconciliation of {description}',
|
|
133
|
+
suggest: 'Suggest matches',
|
|
134
|
+
suggested: { one: '{count} match suggested.', other: '{count} matches suggested.' },
|
|
135
|
+
noSuggestion: 'No matches found with the same amount and a close date.',
|
|
136
|
+
difference: 'Difference',
|
|
137
|
+
statementTotal: 'Statement total',
|
|
138
|
+
ledgerTotal: 'System total',
|
|
139
|
+
balanced: 'Everything is reconciled.',
|
|
140
|
+
amountsDiffer: 'The selected amounts are different.',
|
|
141
|
+
pending: { one: '{count} pending', other: '{count} pending' },
|
|
142
|
+
empty: 'Nothing pending.',
|
|
143
|
+
matchedAnnounce: '{statement} reconciled with {ledger}.',
|
|
144
|
+
},
|
|
145
|
+
};
|
|
146
|
+
const FINANCE_MESSAGES_ES = {
|
|
147
|
+
balance: {
|
|
148
|
+
balance: 'Saldo',
|
|
149
|
+
available: 'Disponible',
|
|
150
|
+
pending: 'Por liberar',
|
|
151
|
+
creditLimit: 'Límite total',
|
|
152
|
+
creditUsed: 'Usado',
|
|
153
|
+
creditAvailable: 'Límite disponible',
|
|
154
|
+
credit: 'Crédito',
|
|
155
|
+
hide: 'Ocultar importes',
|
|
156
|
+
show: 'Mostrar importes',
|
|
157
|
+
hidden: 'Importe oculto',
|
|
158
|
+
updated: 'Actualizado el {date}',
|
|
159
|
+
},
|
|
160
|
+
summary: {
|
|
161
|
+
heading: 'Resumen financiero',
|
|
162
|
+
revenue: 'Ingresos',
|
|
163
|
+
expenses: 'Gastos',
|
|
164
|
+
net: 'Resultado',
|
|
165
|
+
margin: 'Margen de {percent}',
|
|
166
|
+
vsPrevious: 'vs. período anterior',
|
|
167
|
+
profit: 'Ganancia',
|
|
168
|
+
loss: 'Pérdida',
|
|
169
|
+
comparison: 'Ingresos y gastos',
|
|
170
|
+
},
|
|
171
|
+
budgetStatus: {
|
|
172
|
+
under: 'Por debajo de lo previsto',
|
|
173
|
+
'on-track': 'Dentro de lo previsto',
|
|
174
|
+
near: 'Cerca del límite',
|
|
175
|
+
over: 'Por encima del presupuesto',
|
|
176
|
+
},
|
|
177
|
+
budget: {
|
|
178
|
+
heading: 'Presupuesto',
|
|
179
|
+
category: 'Categoría',
|
|
180
|
+
budget: 'Presupuestado',
|
|
181
|
+
actual: 'Real',
|
|
182
|
+
variance: 'Variación',
|
|
183
|
+
status: 'Estado',
|
|
184
|
+
total: 'Total',
|
|
185
|
+
usedOf: '{percent} del presupuesto',
|
|
186
|
+
overCount: {
|
|
187
|
+
one: '{count} categoría por encima del presupuesto',
|
|
188
|
+
other: '{count} categorías por encima del presupuesto',
|
|
189
|
+
},
|
|
190
|
+
},
|
|
191
|
+
reconciliation: {
|
|
192
|
+
heading: 'Conciliación',
|
|
193
|
+
statement: 'Extracto bancario',
|
|
194
|
+
ledger: 'Asientos del sistema',
|
|
195
|
+
matched: 'Conciliados',
|
|
196
|
+
select: 'Seleccionar {description}',
|
|
197
|
+
match: 'Conciliar seleccionados',
|
|
198
|
+
unmatch: 'Deshacer conciliación de {description}',
|
|
199
|
+
suggest: 'Sugerir pares',
|
|
200
|
+
suggested: { one: '{count} par sugerido.', other: '{count} pares sugeridos.' },
|
|
201
|
+
noSuggestion: 'No se encontraron pares con el mismo importe y fecha cercana.',
|
|
202
|
+
difference: 'Diferencia',
|
|
203
|
+
statementTotal: 'Total del extracto',
|
|
204
|
+
ledgerTotal: 'Total del sistema',
|
|
205
|
+
balanced: 'Todo conciliado.',
|
|
206
|
+
amountsDiffer: 'Los importes seleccionados son diferentes.',
|
|
207
|
+
pending: { one: '{count} pendiente', other: '{count} pendientes' },
|
|
208
|
+
empty: 'Nada pendiente.',
|
|
209
|
+
matchedAnnounce: '{statement} conciliado con {ledger}.',
|
|
210
|
+
},
|
|
211
|
+
};
|
|
212
|
+
const FINANCE_MESSAGES = { 'pt-BR': FINANCE_MESSAGES_PT_BR, en: FINANCE_MESSAGES_EN, es: FINANCE_MESSAGES_ES };
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Saldo e crédito (`hm-balance-card`): saldo em destaque, valor a liberar, o limite de crédito com a parte
|
|
216
|
+
* usada numa barra e o limite disponível, com o botão de ocultar valores (olho) para uso em público.
|
|
217
|
+
*
|
|
218
|
+
* ```html
|
|
219
|
+
* <hm-balance-card [balance]="conta.saldo" [pending]="conta.aLiberar" [credit]="{ limit: 5000, used: 1250 }" hideable [(hidden)]="ocultar" />
|
|
220
|
+
* ```
|
|
221
|
+
*
|
|
222
|
+
* Oculto, cada valor vira "••••" na tela e "Valor oculto" para leitor de tela; o estado é controlado
|
|
223
|
+
* (`[(hidden)]`) para o app lembrar a escolha.
|
|
224
|
+
*/
|
|
225
|
+
class BalanceCardComponent {
|
|
226
|
+
#icons = useHermesIcons(FINANCE_ICONS);
|
|
227
|
+
balance = input.required(...(ngDevMode ? [{ debugName: "balance" }] : /* istanbul ignore next */ []));
|
|
228
|
+
currency = input('BRL', ...(ngDevMode ? [{ debugName: "currency" }] : /* istanbul ignore next */ []));
|
|
229
|
+
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
230
|
+
/** Valor a liberar (vendas a receber, depósito em compensação). */
|
|
231
|
+
pending = input(null, ...(ngDevMode ? [{ debugName: "pending" }] : /* istanbul ignore next */ []));
|
|
232
|
+
credit = input(null, ...(ngDevMode ? [{ debugName: "credit" }] : /* istanbul ignore next */ []));
|
|
233
|
+
updatedAt = input(null, ...(ngDevMode ? [{ debugName: "updatedAt" }] : /* istanbul ignore next */ []));
|
|
234
|
+
/** Mostra o botão de ocultar valores. */
|
|
235
|
+
hideable = input(false, { ...(ngDevMode ? { debugName: "hideable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
236
|
+
hidden = model(false, ...(ngDevMode ? [{ debugName: "hidden" }] : /* istanbul ignore next */ []));
|
|
237
|
+
/** Sobrescreve textos do catálogo da peça (`FINANCE_MESSAGES_PT_BR`). */
|
|
238
|
+
texts = input(null, ...(ngDevMode ? [{ debugName: "texts" }] : /* istanbul ignore next */ []));
|
|
239
|
+
#text = localCatalog(FINANCE_MESSAGES, FINANCE_MESSAGES_PT_BR, () => this.texts());
|
|
240
|
+
#locale = formatLocale();
|
|
241
|
+
text = computed(() => this.#text().balance, ...(ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []));
|
|
242
|
+
reading = computed(() => {
|
|
243
|
+
const line = this.credit();
|
|
244
|
+
return line ? readCredit(line.limit, line.used, this.currency()) : null;
|
|
245
|
+
}, ...(ngDevMode ? [{ debugName: "reading" }] : /* istanbul ignore next */ []));
|
|
246
|
+
usedPercent = computed(() => Math.min(100, (this.reading()?.fraction ?? 0) * 100), ...(ngDevMode ? [{ debugName: "usedPercent" }] : /* istanbul ignore next */ []));
|
|
247
|
+
updatedText = computed(() => {
|
|
248
|
+
const date = formatDate(this.updatedAt(), this.#locale(), { dateStyle: 'short', timeStyle: 'short' });
|
|
249
|
+
return date ? formatMessage(this.text().updated, { date }) : '';
|
|
250
|
+
}, ...(ngDevMode ? [{ debugName: "updatedText" }] : /* istanbul ignore next */ []));
|
|
251
|
+
format(value) {
|
|
252
|
+
return formatMoney(value, this.currency(), this.#locale());
|
|
253
|
+
}
|
|
254
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: BalanceCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
255
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.24", type: BalanceCardComponent, isStandalone: true, selector: "hm-balance-card", inputs: { balance: { classPropertyName: "balance", publicName: "balance", isSignal: true, isRequired: true, transformFunction: null }, currency: { classPropertyName: "currency", publicName: "currency", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, pending: { classPropertyName: "pending", publicName: "pending", isSignal: true, isRequired: false, transformFunction: null }, credit: { classPropertyName: "credit", publicName: "credit", isSignal: true, isRequired: false, transformFunction: null }, updatedAt: { classPropertyName: "updatedAt", publicName: "updatedAt", isSignal: true, isRequired: false, transformFunction: null }, hideable: { classPropertyName: "hideable", publicName: "hideable", isSignal: true, isRequired: false, transformFunction: null }, hidden: { classPropertyName: "hidden", publicName: "hidden", isSignal: true, isRequired: false, transformFunction: null }, texts: { classPropertyName: "texts", publicName: "texts", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { hidden: "hiddenChange" }, host: { classAttribute: "hm-balance-card" }, ngImport: i0, template: `
|
|
256
|
+
<div class="hm-balance-card__header">
|
|
257
|
+
<span class="hm-balance-card__label">{{ label() || text().balance }}</span>
|
|
258
|
+
@if (hideable()) {
|
|
259
|
+
<hm-icon-button
|
|
260
|
+
[icon]="hidden() ? 'eye' : 'eye-hide'"
|
|
261
|
+
emphasis="subtle"
|
|
262
|
+
size="small"
|
|
263
|
+
toggle
|
|
264
|
+
[pressed]="hidden()"
|
|
265
|
+
[label]="text().hide"
|
|
266
|
+
(clicked)="hidden.set(!hidden())"
|
|
267
|
+
/>
|
|
268
|
+
}
|
|
269
|
+
</div>
|
|
270
|
+
<span class="hm-balance-card__amount" [class.hm-balance-card__amount--negative]="balance() < 0">
|
|
271
|
+
<ng-container [ngTemplateOutlet]="money" [ngTemplateOutletContext]="{ $implicit: balance() }" />
|
|
272
|
+
</span>
|
|
273
|
+
@if (pending()) {
|
|
274
|
+
<span class="hm-balance-card__meta">{{ text().pending }}: <ng-container [ngTemplateOutlet]="money" [ngTemplateOutletContext]="{ $implicit: pending() ?? 0 }" /></span>
|
|
275
|
+
}
|
|
276
|
+
@if (credit(); as line) {
|
|
277
|
+
<div class="hm-balance-card__credit">
|
|
278
|
+
<span class="hm-balance-card__credit-label">{{ text().credit }}</span>
|
|
279
|
+
<div class="hm-balance-card__bar" aria-hidden="true">
|
|
280
|
+
<span class="hm-balance-card__fill" [style.inline-size.%]="usedPercent()"></span>
|
|
281
|
+
</div>
|
|
282
|
+
<dl class="hm-balance-card__facts">
|
|
283
|
+
<div><dt>{{ text().creditUsed }}</dt><dd><ng-container [ngTemplateOutlet]="money" [ngTemplateOutletContext]="{ $implicit: line.used }" /></dd></div>
|
|
284
|
+
<div><dt>{{ text().creditAvailable }}</dt><dd><ng-container [ngTemplateOutlet]="money" [ngTemplateOutletContext]="{ $implicit: reading()!.available }" /></dd></div>
|
|
285
|
+
<div><dt>{{ text().creditLimit }}</dt><dd><ng-container [ngTemplateOutlet]="money" [ngTemplateOutletContext]="{ $implicit: line.limit }" /></dd></div>
|
|
286
|
+
</dl>
|
|
287
|
+
</div>
|
|
288
|
+
}
|
|
289
|
+
@if (updatedText()) {
|
|
290
|
+
<span class="hm-balance-card__updated">{{ updatedText() }}</span>
|
|
291
|
+
}
|
|
292
|
+
<ng-content />
|
|
293
|
+
<ng-template #money let-value>
|
|
294
|
+
@if (hidden()) {
|
|
295
|
+
<span aria-hidden="true">••••</span><span class="hm-visually-hidden">{{ text().hidden }}</span>
|
|
296
|
+
} @else {
|
|
297
|
+
{{ format(value) }}
|
|
298
|
+
}
|
|
299
|
+
</ng-template>
|
|
300
|
+
`, isInline: true, dependencies: [{ kind: "component", type: IconButtonComponent, selector: "hm-icon-button", inputs: ["label", "icon", "solid", "iconDirection", "emphasis", "intent", "size", "disabled", "toggle", "pressed", "keyShortcuts"], outputs: ["pressedChange", "clicked"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
301
|
+
}
|
|
302
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: BalanceCardComponent, decorators: [{
|
|
303
|
+
type: Component,
|
|
304
|
+
args: [{
|
|
305
|
+
selector: 'hm-balance-card',
|
|
306
|
+
imports: [IconButtonComponent, NgTemplateOutlet],
|
|
307
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
308
|
+
host: { class: 'hm-balance-card' },
|
|
309
|
+
template: `
|
|
310
|
+
<div class="hm-balance-card__header">
|
|
311
|
+
<span class="hm-balance-card__label">{{ label() || text().balance }}</span>
|
|
312
|
+
@if (hideable()) {
|
|
313
|
+
<hm-icon-button
|
|
314
|
+
[icon]="hidden() ? 'eye' : 'eye-hide'"
|
|
315
|
+
emphasis="subtle"
|
|
316
|
+
size="small"
|
|
317
|
+
toggle
|
|
318
|
+
[pressed]="hidden()"
|
|
319
|
+
[label]="text().hide"
|
|
320
|
+
(clicked)="hidden.set(!hidden())"
|
|
321
|
+
/>
|
|
322
|
+
}
|
|
323
|
+
</div>
|
|
324
|
+
<span class="hm-balance-card__amount" [class.hm-balance-card__amount--negative]="balance() < 0">
|
|
325
|
+
<ng-container [ngTemplateOutlet]="money" [ngTemplateOutletContext]="{ $implicit: balance() }" />
|
|
326
|
+
</span>
|
|
327
|
+
@if (pending()) {
|
|
328
|
+
<span class="hm-balance-card__meta">{{ text().pending }}: <ng-container [ngTemplateOutlet]="money" [ngTemplateOutletContext]="{ $implicit: pending() ?? 0 }" /></span>
|
|
329
|
+
}
|
|
330
|
+
@if (credit(); as line) {
|
|
331
|
+
<div class="hm-balance-card__credit">
|
|
332
|
+
<span class="hm-balance-card__credit-label">{{ text().credit }}</span>
|
|
333
|
+
<div class="hm-balance-card__bar" aria-hidden="true">
|
|
334
|
+
<span class="hm-balance-card__fill" [style.inline-size.%]="usedPercent()"></span>
|
|
335
|
+
</div>
|
|
336
|
+
<dl class="hm-balance-card__facts">
|
|
337
|
+
<div><dt>{{ text().creditUsed }}</dt><dd><ng-container [ngTemplateOutlet]="money" [ngTemplateOutletContext]="{ $implicit: line.used }" /></dd></div>
|
|
338
|
+
<div><dt>{{ text().creditAvailable }}</dt><dd><ng-container [ngTemplateOutlet]="money" [ngTemplateOutletContext]="{ $implicit: reading()!.available }" /></dd></div>
|
|
339
|
+
<div><dt>{{ text().creditLimit }}</dt><dd><ng-container [ngTemplateOutlet]="money" [ngTemplateOutletContext]="{ $implicit: line.limit }" /></dd></div>
|
|
340
|
+
</dl>
|
|
341
|
+
</div>
|
|
342
|
+
}
|
|
343
|
+
@if (updatedText()) {
|
|
344
|
+
<span class="hm-balance-card__updated">{{ updatedText() }}</span>
|
|
345
|
+
}
|
|
346
|
+
<ng-content />
|
|
347
|
+
<ng-template #money let-value>
|
|
348
|
+
@if (hidden()) {
|
|
349
|
+
<span aria-hidden="true">••••</span><span class="hm-visually-hidden">{{ text().hidden }}</span>
|
|
350
|
+
} @else {
|
|
351
|
+
{{ format(value) }}
|
|
352
|
+
}
|
|
353
|
+
</ng-template>
|
|
354
|
+
`,
|
|
355
|
+
}]
|
|
356
|
+
}], propDecorators: { balance: [{ type: i0.Input, args: [{ isSignal: true, alias: "balance", required: true }] }], currency: [{ type: i0.Input, args: [{ isSignal: true, alias: "currency", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], pending: [{ type: i0.Input, args: [{ isSignal: true, alias: "pending", required: false }] }], credit: [{ type: i0.Input, args: [{ isSignal: true, alias: "credit", required: false }] }], updatedAt: [{ type: i0.Input, args: [{ isSignal: true, alias: "updatedAt", required: false }] }], hideable: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideable", required: false }] }], hidden: [{ type: i0.Input, args: [{ isSignal: true, alias: "hidden", required: false }] }, { type: i0.Output, args: ["hiddenChange"] }], texts: [{ type: i0.Input, args: [{ isSignal: true, alias: "texts", required: false }] }] } });
|
|
357
|
+
|
|
358
|
+
/**
|
|
359
|
+
* Orçamento × realizado (`hm-budget-variance`): uma linha por categoria com orçado, realizado, a barra do
|
|
360
|
+
* quanto já foi usado (com a marca do esperado até agora), a variação em valor e porcentagem e a
|
|
361
|
+
* situação (abaixo do previsto, dentro, perto do limite, acima), e a linha de total.
|
|
362
|
+
*
|
|
363
|
+
* ```html
|
|
364
|
+
* <hm-budget-variance [lines]="orcamento" [expectedFraction]="0.5" />
|
|
365
|
+
* ```
|
|
366
|
+
*
|
|
367
|
+
* Pensado para DESPESA: realizar acima do orçado é ruim. `expectedFraction` (ex.: 0,5 no meio do mês)
|
|
368
|
+
* permite dizer "abaixo do previsto" antes do fim do período. A situação vem escrita, não só na cor.
|
|
369
|
+
*/
|
|
370
|
+
class BudgetVarianceComponent {
|
|
371
|
+
#icons = useHermesIcons(FINANCE_ICONS);
|
|
372
|
+
lines = input([], ...(ngDevMode ? [{ debugName: "lines" }] : /* istanbul ignore next */ []));
|
|
373
|
+
currency = input('BRL', ...(ngDevMode ? [{ debugName: "currency" }] : /* istanbul ignore next */ []));
|
|
374
|
+
/** Fração do período já corrida (1 = período fechado). */
|
|
375
|
+
expectedFraction = input(1, ...(ngDevMode ? [{ debugName: "expectedFraction" }] : /* istanbul ignore next */ []));
|
|
376
|
+
/** A partir de que fração do orçado avisa "perto do limite". */
|
|
377
|
+
nearAt = input(0.9, ...(ngDevMode ? [{ debugName: "nearAt" }] : /* istanbul ignore next */ []));
|
|
378
|
+
caption = input('', ...(ngDevMode ? [{ debugName: "caption" }] : /* istanbul ignore next */ []));
|
|
379
|
+
hideCaption = input(false, { ...(ngDevMode ? { debugName: "hideCaption" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
380
|
+
/** Sobrescreve textos do catálogo da peça (`FINANCE_MESSAGES_PT_BR`). */
|
|
381
|
+
texts = input(null, ...(ngDevMode ? [{ debugName: "texts" }] : /* istanbul ignore next */ []));
|
|
382
|
+
#text = localCatalog(FINANCE_MESSAGES, FINANCE_MESSAGES_PT_BR, () => this.texts());
|
|
383
|
+
#locale = formatLocale();
|
|
384
|
+
text = computed(() => this.#text().budget, ...(ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []));
|
|
385
|
+
statusText = computed(() => this.#text().budgetStatus, ...(ngDevMode ? [{ debugName: "statusText" }] : /* istanbul ignore next */ []));
|
|
386
|
+
#options = computed(() => ({ expectedFraction: this.expectedFraction(), nearAt: this.nearAt(), currency: this.currency() }), ...(ngDevMode ? [{ debugName: "#options" }] : /* istanbul ignore next */ []));
|
|
387
|
+
rows = computed(() => this.lines().map((line) => budgetVariance(line, this.#options())), ...(ngDevMode ? [{ debugName: "rows" }] : /* istanbul ignore next */ []));
|
|
388
|
+
totals = computed(() => budgetTotals(this.lines(), this.#options()), ...(ngDevMode ? [{ debugName: "totals" }] : /* istanbul ignore next */ []));
|
|
389
|
+
overText = computed(() => this.totals().overCount ? pluralMessage(this.text().overCount, this.totals().overCount, this.#locale()) : '', ...(ngDevMode ? [{ debugName: "overText" }] : /* istanbul ignore next */ []));
|
|
390
|
+
money(value) {
|
|
391
|
+
return formatMoney(value, this.currency(), this.#locale());
|
|
392
|
+
}
|
|
393
|
+
signed(value) {
|
|
394
|
+
return formatMoney(value, this.currency(), this.#locale(), { signDisplay: 'exceptZero' });
|
|
395
|
+
}
|
|
396
|
+
percent(value) {
|
|
397
|
+
return formatPercent(value, this.#locale(), { signDisplay: 'exceptZero' });
|
|
398
|
+
}
|
|
399
|
+
usedText(fraction) {
|
|
400
|
+
return formatMessage(this.text().usedOf, { percent: formatPercent(fraction * 100, this.#locale(), { digits: 0 }) });
|
|
401
|
+
}
|
|
402
|
+
fill(fraction) {
|
|
403
|
+
return Math.min(100, Math.max(0, fraction * 100));
|
|
404
|
+
}
|
|
405
|
+
tone(status) {
|
|
406
|
+
return BUDGET_STATUS_TONES[status];
|
|
407
|
+
}
|
|
408
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: BudgetVarianceComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
409
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.24", type: BudgetVarianceComponent, isStandalone: true, selector: "hm-budget-variance", inputs: { lines: { classPropertyName: "lines", publicName: "lines", isSignal: true, isRequired: false, transformFunction: null }, currency: { classPropertyName: "currency", publicName: "currency", isSignal: true, isRequired: false, transformFunction: null }, expectedFraction: { classPropertyName: "expectedFraction", publicName: "expectedFraction", isSignal: true, isRequired: false, transformFunction: null }, nearAt: { classPropertyName: "nearAt", publicName: "nearAt", isSignal: true, isRequired: false, transformFunction: null }, caption: { classPropertyName: "caption", publicName: "caption", isSignal: true, isRequired: false, transformFunction: null }, hideCaption: { classPropertyName: "hideCaption", publicName: "hideCaption", isSignal: true, isRequired: false, transformFunction: null }, texts: { classPropertyName: "texts", publicName: "texts", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "hm-budget-variance" }, ngImport: i0, template: `
|
|
410
|
+
@if (overText()) {
|
|
411
|
+
<p class="hm-budget-variance__alert">{{ overText() }}</p>
|
|
412
|
+
}
|
|
413
|
+
<div class="hm-budget-variance__scroll" tabindex="0" role="region" [attr.aria-label]="caption() || text().heading">
|
|
414
|
+
<table class="hm-budget-variance__table">
|
|
415
|
+
<caption [class.hm-visually-hidden]="hideCaption()">{{ caption() || text().heading }}</caption>
|
|
416
|
+
<thead>
|
|
417
|
+
<tr>
|
|
418
|
+
<th scope="col">{{ text().category }}</th>
|
|
419
|
+
<th scope="col" class="hm-budget-variance__num">{{ text().budget }}</th>
|
|
420
|
+
<th scope="col" class="hm-budget-variance__num">{{ text().actual }}</th>
|
|
421
|
+
<th scope="col" class="hm-budget-variance__num">{{ text().variance }}</th>
|
|
422
|
+
<th scope="col">{{ text().status }}</th>
|
|
423
|
+
</tr>
|
|
424
|
+
</thead>
|
|
425
|
+
<tbody>
|
|
426
|
+
@for (row of rows(); track row.id) {
|
|
427
|
+
<tr>
|
|
428
|
+
<th scope="row">{{ row.label }}</th>
|
|
429
|
+
<td class="hm-budget-variance__num">{{ money(row.budget) }}</td>
|
|
430
|
+
<td class="hm-budget-variance__actual">
|
|
431
|
+
<span class="hm-budget-variance__num-text">{{ money(row.actual) }}</span>
|
|
432
|
+
<span class="hm-budget-variance__bar" [class]="'hm-budget-variance__bar hm-budget-variance__bar--' + row.status">
|
|
433
|
+
<span class="hm-budget-variance__fill" [style.inline-size.%]="fill(row.fraction)"></span>
|
|
434
|
+
@if (expectedFraction() < 1) {
|
|
435
|
+
<span class="hm-budget-variance__expected" [style.inset-inline-start.%]="expectedFraction() * 100" aria-hidden="true"></span>
|
|
436
|
+
}
|
|
437
|
+
</span>
|
|
438
|
+
<span class="hm-budget-variance__used">{{ usedText(row.fraction) }}</span>
|
|
439
|
+
</td>
|
|
440
|
+
<td class="hm-budget-variance__num" [class.hm-budget-variance__over]="row.variance > 0">
|
|
441
|
+
{{ signed(row.variance) }}
|
|
442
|
+
@if (row.variancePercent !== null) {
|
|
443
|
+
<span class="hm-budget-variance__pct">({{ percent(row.variancePercent) }})</span>
|
|
444
|
+
}
|
|
445
|
+
</td>
|
|
446
|
+
<td><hm-tag [name]="statusText()[row.status]" [color]="tone(row.status)" /></td>
|
|
447
|
+
</tr>
|
|
448
|
+
}
|
|
449
|
+
</tbody>
|
|
450
|
+
<tfoot>
|
|
451
|
+
<tr>
|
|
452
|
+
<th scope="row">{{ text().total }}</th>
|
|
453
|
+
<td class="hm-budget-variance__num">{{ money(totals().budget) }}</td>
|
|
454
|
+
<td class="hm-budget-variance__num">{{ money(totals().actual) }}</td>
|
|
455
|
+
<td class="hm-budget-variance__num" [class.hm-budget-variance__over]="totals().variance > 0">
|
|
456
|
+
{{ signed(totals().variance) }}
|
|
457
|
+
@if (totals().variancePercent !== null) {
|
|
458
|
+
<span class="hm-budget-variance__pct">({{ percent(totals().variancePercent ?? 0) }})</span>
|
|
459
|
+
}
|
|
460
|
+
</td>
|
|
461
|
+
<td></td>
|
|
462
|
+
</tr>
|
|
463
|
+
</tfoot>
|
|
464
|
+
</table>
|
|
465
|
+
</div>
|
|
466
|
+
`, isInline: true, dependencies: [{ kind: "component", type: TagComponent, selector: "hm-tag", inputs: ["name", "color", "compact"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
467
|
+
}
|
|
468
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: BudgetVarianceComponent, decorators: [{
|
|
469
|
+
type: Component,
|
|
470
|
+
args: [{
|
|
471
|
+
selector: 'hm-budget-variance',
|
|
472
|
+
imports: [TagComponent],
|
|
473
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
474
|
+
host: { class: 'hm-budget-variance' },
|
|
475
|
+
template: `
|
|
476
|
+
@if (overText()) {
|
|
477
|
+
<p class="hm-budget-variance__alert">{{ overText() }}</p>
|
|
478
|
+
}
|
|
479
|
+
<div class="hm-budget-variance__scroll" tabindex="0" role="region" [attr.aria-label]="caption() || text().heading">
|
|
480
|
+
<table class="hm-budget-variance__table">
|
|
481
|
+
<caption [class.hm-visually-hidden]="hideCaption()">{{ caption() || text().heading }}</caption>
|
|
482
|
+
<thead>
|
|
483
|
+
<tr>
|
|
484
|
+
<th scope="col">{{ text().category }}</th>
|
|
485
|
+
<th scope="col" class="hm-budget-variance__num">{{ text().budget }}</th>
|
|
486
|
+
<th scope="col" class="hm-budget-variance__num">{{ text().actual }}</th>
|
|
487
|
+
<th scope="col" class="hm-budget-variance__num">{{ text().variance }}</th>
|
|
488
|
+
<th scope="col">{{ text().status }}</th>
|
|
489
|
+
</tr>
|
|
490
|
+
</thead>
|
|
491
|
+
<tbody>
|
|
492
|
+
@for (row of rows(); track row.id) {
|
|
493
|
+
<tr>
|
|
494
|
+
<th scope="row">{{ row.label }}</th>
|
|
495
|
+
<td class="hm-budget-variance__num">{{ money(row.budget) }}</td>
|
|
496
|
+
<td class="hm-budget-variance__actual">
|
|
497
|
+
<span class="hm-budget-variance__num-text">{{ money(row.actual) }}</span>
|
|
498
|
+
<span class="hm-budget-variance__bar" [class]="'hm-budget-variance__bar hm-budget-variance__bar--' + row.status">
|
|
499
|
+
<span class="hm-budget-variance__fill" [style.inline-size.%]="fill(row.fraction)"></span>
|
|
500
|
+
@if (expectedFraction() < 1) {
|
|
501
|
+
<span class="hm-budget-variance__expected" [style.inset-inline-start.%]="expectedFraction() * 100" aria-hidden="true"></span>
|
|
502
|
+
}
|
|
503
|
+
</span>
|
|
504
|
+
<span class="hm-budget-variance__used">{{ usedText(row.fraction) }}</span>
|
|
505
|
+
</td>
|
|
506
|
+
<td class="hm-budget-variance__num" [class.hm-budget-variance__over]="row.variance > 0">
|
|
507
|
+
{{ signed(row.variance) }}
|
|
508
|
+
@if (row.variancePercent !== null) {
|
|
509
|
+
<span class="hm-budget-variance__pct">({{ percent(row.variancePercent) }})</span>
|
|
510
|
+
}
|
|
511
|
+
</td>
|
|
512
|
+
<td><hm-tag [name]="statusText()[row.status]" [color]="tone(row.status)" /></td>
|
|
513
|
+
</tr>
|
|
514
|
+
}
|
|
515
|
+
</tbody>
|
|
516
|
+
<tfoot>
|
|
517
|
+
<tr>
|
|
518
|
+
<th scope="row">{{ text().total }}</th>
|
|
519
|
+
<td class="hm-budget-variance__num">{{ money(totals().budget) }}</td>
|
|
520
|
+
<td class="hm-budget-variance__num">{{ money(totals().actual) }}</td>
|
|
521
|
+
<td class="hm-budget-variance__num" [class.hm-budget-variance__over]="totals().variance > 0">
|
|
522
|
+
{{ signed(totals().variance) }}
|
|
523
|
+
@if (totals().variancePercent !== null) {
|
|
524
|
+
<span class="hm-budget-variance__pct">({{ percent(totals().variancePercent ?? 0) }})</span>
|
|
525
|
+
}
|
|
526
|
+
</td>
|
|
527
|
+
<td></td>
|
|
528
|
+
</tr>
|
|
529
|
+
</tfoot>
|
|
530
|
+
</table>
|
|
531
|
+
</div>
|
|
532
|
+
`,
|
|
533
|
+
}]
|
|
534
|
+
}], propDecorators: { lines: [{ type: i0.Input, args: [{ isSignal: true, alias: "lines", required: false }] }], currency: [{ type: i0.Input, args: [{ isSignal: true, alias: "currency", required: false }] }], expectedFraction: [{ type: i0.Input, args: [{ isSignal: true, alias: "expectedFraction", required: false }] }], nearAt: [{ type: i0.Input, args: [{ isSignal: true, alias: "nearAt", required: false }] }], caption: [{ type: i0.Input, args: [{ isSignal: true, alias: "caption", required: false }] }], hideCaption: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideCaption", required: false }] }], texts: [{ type: i0.Input, args: [{ isSignal: true, alias: "texts", required: false }] }] } });
|
|
535
|
+
|
|
536
|
+
/**
|
|
537
|
+
* Resumo financeiro e KPIs de receita e despesa (`hm-financial-summary`): três `hm-stat-card` (receitas,
|
|
538
|
+
* despesas, resultado com a margem) com a variação contra o período anterior — receita subindo é bom,
|
|
539
|
+
* despesa subindo é ruim — e a comparação receitas × despesas em barras.
|
|
540
|
+
*
|
|
541
|
+
* ```html
|
|
542
|
+
* <hm-financial-summary period="Outubro de 2026" [revenue]="120500" [expenses]="84300" [previousRevenue]="101200" [previousExpenses]="80100" />
|
|
543
|
+
* ```
|
|
544
|
+
*/
|
|
545
|
+
class FinancialSummaryComponent {
|
|
546
|
+
#icons = useHermesIcons(FINANCE_ICONS);
|
|
547
|
+
revenue = input.required(...(ngDevMode ? [{ debugName: "revenue" }] : /* istanbul ignore next */ []));
|
|
548
|
+
expenses = input.required(...(ngDevMode ? [{ debugName: "expenses" }] : /* istanbul ignore next */ []));
|
|
549
|
+
previousRevenue = input(null, ...(ngDevMode ? [{ debugName: "previousRevenue" }] : /* istanbul ignore next */ []));
|
|
550
|
+
previousExpenses = input(null, ...(ngDevMode ? [{ debugName: "previousExpenses" }] : /* istanbul ignore next */ []));
|
|
551
|
+
currency = input('BRL', ...(ngDevMode ? [{ debugName: "currency" }] : /* istanbul ignore next */ []));
|
|
552
|
+
/** Período já escrito ("Outubro de 2026"). */
|
|
553
|
+
period = input('', ...(ngDevMode ? [{ debugName: "period" }] : /* istanbul ignore next */ []));
|
|
554
|
+
heading = input('', ...(ngDevMode ? [{ debugName: "heading" }] : /* istanbul ignore next */ []));
|
|
555
|
+
headingLevel = input(2, ...(ngDevMode ? [{ debugName: "headingLevel" }] : /* istanbul ignore next */ []));
|
|
556
|
+
hideHeading = input(false, { ...(ngDevMode ? { debugName: "hideHeading" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
557
|
+
showComparison = input(true, { ...(ngDevMode ? { debugName: "showComparison" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
558
|
+
/** Valores em notação compacta ("R$ 120,5 mil"). */
|
|
559
|
+
compactValues = input(false, { ...(ngDevMode ? { debugName: "compactValues" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
560
|
+
/** Sobrescreve textos do catálogo da peça (`FINANCE_MESSAGES_PT_BR`). */
|
|
561
|
+
texts = input(null, ...(ngDevMode ? [{ debugName: "texts" }] : /* istanbul ignore next */ []));
|
|
562
|
+
#text = localCatalog(FINANCE_MESSAGES, FINANCE_MESSAGES_PT_BR, () => this.texts());
|
|
563
|
+
#locale = formatLocale();
|
|
564
|
+
text = computed(() => this.#text().summary, ...(ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []));
|
|
565
|
+
summary = computed(() => summarizeFinances({
|
|
566
|
+
revenue: this.revenue(),
|
|
567
|
+
expenses: this.expenses(),
|
|
568
|
+
previousRevenue: this.previousRevenue(),
|
|
569
|
+
previousExpenses: this.previousExpenses(),
|
|
570
|
+
currency: this.currency(),
|
|
571
|
+
}), ...(ngDevMode ? [{ debugName: "summary" }] : /* istanbul ignore next */ []));
|
|
572
|
+
bars = computed(() => {
|
|
573
|
+
const { revenue, expenses } = this.summary();
|
|
574
|
+
const max = Math.max(revenue, expenses, 1);
|
|
575
|
+
return { revenue: (Math.max(0, revenue) / max) * 100, expenses: (Math.max(0, expenses) / max) * 100 };
|
|
576
|
+
}, ...(ngDevMode ? [{ debugName: "bars" }] : /* istanbul ignore next */ []));
|
|
577
|
+
#trend(change, higherIsBetter) {
|
|
578
|
+
if (change === null)
|
|
579
|
+
return null;
|
|
580
|
+
const direction = trendDirection(change);
|
|
581
|
+
return {
|
|
582
|
+
value: formatPercent(change, this.#locale(), { signDisplay: 'exceptZero' }),
|
|
583
|
+
direction,
|
|
584
|
+
intent: trendTone(direction, higherIsBetter),
|
|
585
|
+
label: this.text().vsPrevious,
|
|
586
|
+
};
|
|
587
|
+
}
|
|
588
|
+
kpis = computed(() => {
|
|
589
|
+
const summary = this.summary();
|
|
590
|
+
const text = this.text();
|
|
591
|
+
const money = (value) => formatMoney(value, this.currency(), this.#locale(), { compact: this.compactValues() });
|
|
592
|
+
const net = summary.net;
|
|
593
|
+
return [
|
|
594
|
+
{ key: 'revenue', icon: 'money-up', label: text.revenue, value: money(summary.revenue), intent: 'neutral', trend: this.#trend(summary.revenueChange, true), description: '' },
|
|
595
|
+
{ key: 'expenses', icon: 'money-down', label: text.expenses, value: money(summary.expenses), intent: 'neutral', trend: this.#trend(summary.expensesChange, false), description: '' },
|
|
596
|
+
{
|
|
597
|
+
key: 'net',
|
|
598
|
+
icon: 'balance',
|
|
599
|
+
label: text.net,
|
|
600
|
+
value: money(net),
|
|
601
|
+
intent: net >= 0 ? 'success' : 'danger',
|
|
602
|
+
trend: this.#trend(summary.netChange, true),
|
|
603
|
+
description: [net >= 0 ? text.profit : text.loss, summary.margin === null ? '' : formatMessage(text.margin, { percent: formatPercent(summary.margin, this.#locale()) })]
|
|
604
|
+
.filter(Boolean)
|
|
605
|
+
.join(' · '),
|
|
606
|
+
},
|
|
607
|
+
];
|
|
608
|
+
}, ...(ngDevMode ? [{ debugName: "kpis" }] : /* istanbul ignore next */ []));
|
|
609
|
+
money(value) {
|
|
610
|
+
return formatMoney(value, this.currency(), this.#locale());
|
|
611
|
+
}
|
|
612
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: FinancialSummaryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
613
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.24", type: FinancialSummaryComponent, isStandalone: true, selector: "hm-financial-summary", inputs: { revenue: { classPropertyName: "revenue", publicName: "revenue", isSignal: true, isRequired: true, transformFunction: null }, expenses: { classPropertyName: "expenses", publicName: "expenses", isSignal: true, isRequired: true, transformFunction: null }, previousRevenue: { classPropertyName: "previousRevenue", publicName: "previousRevenue", isSignal: true, isRequired: false, transformFunction: null }, previousExpenses: { classPropertyName: "previousExpenses", publicName: "previousExpenses", isSignal: true, isRequired: false, transformFunction: null }, currency: { classPropertyName: "currency", publicName: "currency", isSignal: true, isRequired: false, transformFunction: null }, period: { classPropertyName: "period", publicName: "period", isSignal: true, isRequired: false, transformFunction: null }, heading: { classPropertyName: "heading", publicName: "heading", isSignal: true, isRequired: false, transformFunction: null }, headingLevel: { classPropertyName: "headingLevel", publicName: "headingLevel", isSignal: true, isRequired: false, transformFunction: null }, hideHeading: { classPropertyName: "hideHeading", publicName: "hideHeading", isSignal: true, isRequired: false, transformFunction: null }, showComparison: { classPropertyName: "showComparison", publicName: "showComparison", isSignal: true, isRequired: false, transformFunction: null }, compactValues: { classPropertyName: "compactValues", publicName: "compactValues", isSignal: true, isRequired: false, transformFunction: null }, texts: { classPropertyName: "texts", publicName: "texts", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "hm-financial-summary" }, ngImport: i0, template: `
|
|
614
|
+
@if (!hideHeading()) {
|
|
615
|
+
<div class="hm-financial-summary__heading">
|
|
616
|
+
<span role="heading" [attr.aria-level]="headingLevel()">{{ heading() || text().heading }}</span>
|
|
617
|
+
@if (period()) {
|
|
618
|
+
<span class="hm-financial-summary__period">{{ period() }}</span>
|
|
619
|
+
}
|
|
620
|
+
</div>
|
|
621
|
+
}
|
|
622
|
+
<div class="hm-financial-summary__kpis">
|
|
623
|
+
@for (kpi of kpis(); track kpi.key) {
|
|
624
|
+
<hm-stat-card [icon]="kpi.icon" [label]="kpi.label" [value]="kpi.value" [intent]="kpi.intent" [trend]="kpi.trend" [description]="kpi.description" />
|
|
625
|
+
}
|
|
626
|
+
</div>
|
|
627
|
+
@if (showComparison()) {
|
|
628
|
+
<div class="hm-financial-summary__compare" role="group" [attr.aria-label]="text().comparison">
|
|
629
|
+
<div class="hm-financial-summary__bar-row">
|
|
630
|
+
<span class="hm-financial-summary__bar-label">{{ text().revenue }}</span>
|
|
631
|
+
<span class="hm-financial-summary__bar"><span class="hm-financial-summary__fill hm-financial-summary__fill--revenue" [style.inline-size.%]="bars().revenue"></span></span>
|
|
632
|
+
<span class="hm-financial-summary__bar-value">{{ money(summary().revenue) }}</span>
|
|
633
|
+
</div>
|
|
634
|
+
<div class="hm-financial-summary__bar-row">
|
|
635
|
+
<span class="hm-financial-summary__bar-label">{{ text().expenses }}</span>
|
|
636
|
+
<span class="hm-financial-summary__bar"><span class="hm-financial-summary__fill hm-financial-summary__fill--expenses" [style.inline-size.%]="bars().expenses"></span></span>
|
|
637
|
+
<span class="hm-financial-summary__bar-value">{{ money(summary().expenses) }}</span>
|
|
638
|
+
</div>
|
|
639
|
+
</div>
|
|
640
|
+
}
|
|
641
|
+
`, isInline: true, dependencies: [{ kind: "component", type: StatCardComponent, selector: "hm-stat-card", inputs: ["icon", "label", "value", "intent", "fill", "description", "details", "trend", "hint", "size", "selectable", "selected", "loading"], outputs: ["selectedChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
642
|
+
}
|
|
643
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: FinancialSummaryComponent, decorators: [{
|
|
644
|
+
type: Component,
|
|
645
|
+
args: [{
|
|
646
|
+
selector: 'hm-financial-summary',
|
|
647
|
+
imports: [StatCardComponent],
|
|
648
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
649
|
+
host: { class: 'hm-financial-summary' },
|
|
650
|
+
template: `
|
|
651
|
+
@if (!hideHeading()) {
|
|
652
|
+
<div class="hm-financial-summary__heading">
|
|
653
|
+
<span role="heading" [attr.aria-level]="headingLevel()">{{ heading() || text().heading }}</span>
|
|
654
|
+
@if (period()) {
|
|
655
|
+
<span class="hm-financial-summary__period">{{ period() }}</span>
|
|
656
|
+
}
|
|
657
|
+
</div>
|
|
658
|
+
}
|
|
659
|
+
<div class="hm-financial-summary__kpis">
|
|
660
|
+
@for (kpi of kpis(); track kpi.key) {
|
|
661
|
+
<hm-stat-card [icon]="kpi.icon" [label]="kpi.label" [value]="kpi.value" [intent]="kpi.intent" [trend]="kpi.trend" [description]="kpi.description" />
|
|
662
|
+
}
|
|
663
|
+
</div>
|
|
664
|
+
@if (showComparison()) {
|
|
665
|
+
<div class="hm-financial-summary__compare" role="group" [attr.aria-label]="text().comparison">
|
|
666
|
+
<div class="hm-financial-summary__bar-row">
|
|
667
|
+
<span class="hm-financial-summary__bar-label">{{ text().revenue }}</span>
|
|
668
|
+
<span class="hm-financial-summary__bar"><span class="hm-financial-summary__fill hm-financial-summary__fill--revenue" [style.inline-size.%]="bars().revenue"></span></span>
|
|
669
|
+
<span class="hm-financial-summary__bar-value">{{ money(summary().revenue) }}</span>
|
|
670
|
+
</div>
|
|
671
|
+
<div class="hm-financial-summary__bar-row">
|
|
672
|
+
<span class="hm-financial-summary__bar-label">{{ text().expenses }}</span>
|
|
673
|
+
<span class="hm-financial-summary__bar"><span class="hm-financial-summary__fill hm-financial-summary__fill--expenses" [style.inline-size.%]="bars().expenses"></span></span>
|
|
674
|
+
<span class="hm-financial-summary__bar-value">{{ money(summary().expenses) }}</span>
|
|
675
|
+
</div>
|
|
676
|
+
</div>
|
|
677
|
+
}
|
|
678
|
+
`,
|
|
679
|
+
}]
|
|
680
|
+
}], propDecorators: { revenue: [{ type: i0.Input, args: [{ isSignal: true, alias: "revenue", required: true }] }], expenses: [{ type: i0.Input, args: [{ isSignal: true, alias: "expenses", required: true }] }], previousRevenue: [{ type: i0.Input, args: [{ isSignal: true, alias: "previousRevenue", required: false }] }], previousExpenses: [{ type: i0.Input, args: [{ isSignal: true, alias: "previousExpenses", required: false }] }], currency: [{ type: i0.Input, args: [{ isSignal: true, alias: "currency", required: false }] }], period: [{ type: i0.Input, args: [{ isSignal: true, alias: "period", required: false }] }], heading: [{ type: i0.Input, args: [{ isSignal: true, alias: "heading", required: false }] }], headingLevel: [{ type: i0.Input, args: [{ isSignal: true, alias: "headingLevel", required: false }] }], hideHeading: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideHeading", required: false }] }], showComparison: [{ type: i0.Input, args: [{ isSignal: true, alias: "showComparison", required: false }] }], compactValues: [{ type: i0.Input, args: [{ isSignal: true, alias: "compactValues", required: false }] }], texts: [{ type: i0.Input, args: [{ isSignal: true, alias: "texts", required: false }] }] } });
|
|
681
|
+
|
|
682
|
+
let sequence = 0;
|
|
683
|
+
/**
|
|
684
|
+
* Conciliação bancária (`hm-reconciliation`): o extrato do banco de um lado, os lançamentos do sistema do
|
|
685
|
+
* outro; escolhe-se um de cada lado (mesmo valor) e "Conciliar selecionados" forma o par. "Sugerir pares"
|
|
686
|
+
* casa sozinho os de mesmo valor com data próxima (`suggestMatches`). Embaixo, os pares conciliados (com
|
|
687
|
+
* desfazer) e os totais com a diferença.
|
|
688
|
+
*
|
|
689
|
+
* ```html
|
|
690
|
+
* <hm-reconciliation [statement]="extrato" [ledger]="lancamentos" [(matches)]="pares" />
|
|
691
|
+
* ```
|
|
692
|
+
*
|
|
693
|
+
* - Controlado por `[(matches)]`: o app grava os pares quando quiser (ao fechar o período, por exemplo).
|
|
694
|
+
* - Cada lado é um grupo de rádios (setas trocam a escolha); só valores iguais formam par — a frase ao
|
|
695
|
+
* lado do botão diz por que ele está desabilitado.
|
|
696
|
+
*/
|
|
697
|
+
class ReconciliationComponent {
|
|
698
|
+
#icons = useHermesIcons(FINANCE_ICONS);
|
|
699
|
+
/** Lançamentos do extrato bancário (positivo = entrada). */
|
|
700
|
+
statement = input([], ...(ngDevMode ? [{ debugName: "statement" }] : /* istanbul ignore next */ []));
|
|
701
|
+
/** Lançamentos do sistema. */
|
|
702
|
+
ledger = input([], ...(ngDevMode ? [{ debugName: "ledger" }] : /* istanbul ignore next */ []));
|
|
703
|
+
matches = model([], ...(ngDevMode ? [{ debugName: "matches" }] : /* istanbul ignore next */ []));
|
|
704
|
+
currency = input('BRL', ...(ngDevMode ? [{ debugName: "currency" }] : /* istanbul ignore next */ []));
|
|
705
|
+
/** Distância máxima de datas para a sugestão. */
|
|
706
|
+
dateToleranceDays = input(3, ...(ngDevMode ? [{ debugName: "dateToleranceDays" }] : /* istanbul ignore next */ []));
|
|
707
|
+
/** Sobrescreve textos do catálogo da peça (`FINANCE_MESSAGES_PT_BR`). */
|
|
708
|
+
texts = input(null, ...(ngDevMode ? [{ debugName: "texts" }] : /* istanbul ignore next */ []));
|
|
709
|
+
#text = localCatalog(FINANCE_MESSAGES, FINANCE_MESSAGES_PT_BR, () => this.texts());
|
|
710
|
+
#locale = formatLocale();
|
|
711
|
+
text = computed(() => this.#text().reconciliation, ...(ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []));
|
|
712
|
+
name = `hm-reconciliation-${++sequence}`;
|
|
713
|
+
selectedStatement = signal(null, ...(ngDevMode ? [{ debugName: "selectedStatement" }] : /* istanbul ignore next */ []));
|
|
714
|
+
selectedLedger = signal(null, ...(ngDevMode ? [{ debugName: "selectedLedger" }] : /* istanbul ignore next */ []));
|
|
715
|
+
announcement = signal('', ...(ngDevMode ? [{ debugName: "announcement" }] : /* istanbul ignore next */ []));
|
|
716
|
+
state = computed(() => reconciliationState(this.statement(), this.ledger(), this.matches(), this.currency()), ...(ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []));
|
|
717
|
+
sides = computed(() => {
|
|
718
|
+
const state = this.state();
|
|
719
|
+
const text = this.text();
|
|
720
|
+
const locale = this.#locale();
|
|
721
|
+
return [
|
|
722
|
+
{ key: 'statement', title: text.statement, entries: state.unmatchedStatement, selected: this.selectedStatement(), pending: pluralMessage(text.pending, state.unmatchedStatement.length, locale) },
|
|
723
|
+
{ key: 'ledger', title: text.ledger, entries: state.unmatchedLedger, selected: this.selectedLedger(), pending: pluralMessage(text.pending, state.unmatchedLedger.length, locale) },
|
|
724
|
+
];
|
|
725
|
+
}, ...(ngDevMode ? [{ debugName: "sides" }] : /* istanbul ignore next */ []));
|
|
726
|
+
#picked = computed(() => {
|
|
727
|
+
const statement = this.state().unmatchedStatement.find((entry) => entry.id === this.selectedStatement());
|
|
728
|
+
const ledger = this.state().unmatchedLedger.find((entry) => entry.id === this.selectedLedger());
|
|
729
|
+
return statement && ledger ? { statement, ledger } : null;
|
|
730
|
+
}, ...(ngDevMode ? [{ debugName: "#picked" }] : /* istanbul ignore next */ []));
|
|
731
|
+
canPair = computed(() => {
|
|
732
|
+
const picked = this.#picked();
|
|
733
|
+
return !!picked && canMatch(picked.statement, picked.ledger, this.currency());
|
|
734
|
+
}, ...(ngDevMode ? [{ debugName: "canPair" }] : /* istanbul ignore next */ []));
|
|
735
|
+
pairHint = computed(() => (this.#picked() && !this.canPair() ? this.text().amountsDiffer : ''), ...(ngDevMode ? [{ debugName: "pairHint" }] : /* istanbul ignore next */ []));
|
|
736
|
+
pairs = computed(() => {
|
|
737
|
+
const statement = new Map(this.statement().map((entry) => [entry.id, entry]));
|
|
738
|
+
const ledger = new Map(this.ledger().map((entry) => [entry.id, entry]));
|
|
739
|
+
return this.state().matches.map((match) => ({ statement: statement.get(match.statementId), ledger: ledger.get(match.ledgerId) }));
|
|
740
|
+
}, ...(ngDevMode ? [{ debugName: "pairs" }] : /* istanbul ignore next */ []));
|
|
741
|
+
select(side, id) {
|
|
742
|
+
(side === 'statement' ? this.selectedStatement : this.selectedLedger).set(id);
|
|
743
|
+
}
|
|
744
|
+
pair() {
|
|
745
|
+
const picked = this.#picked();
|
|
746
|
+
if (!picked || !this.canPair())
|
|
747
|
+
return;
|
|
748
|
+
this.matches.set([...this.matches(), { statementId: picked.statement.id, ledgerId: picked.ledger.id }]);
|
|
749
|
+
this.selectedStatement.set(null);
|
|
750
|
+
this.selectedLedger.set(null);
|
|
751
|
+
this.announcement.set(formatMessage(this.text().matchedAnnounce, { statement: picked.statement.description, ledger: picked.ledger.description }));
|
|
752
|
+
}
|
|
753
|
+
unpair(statementId) {
|
|
754
|
+
this.matches.set(this.matches().filter((match) => match.statementId !== statementId));
|
|
755
|
+
}
|
|
756
|
+
suggest() {
|
|
757
|
+
const found = suggestMatches(this.statement(), this.ledger(), {
|
|
758
|
+
dateToleranceDays: this.dateToleranceDays(),
|
|
759
|
+
existing: this.state().matches,
|
|
760
|
+
currency: this.currency(),
|
|
761
|
+
});
|
|
762
|
+
if (found.length)
|
|
763
|
+
this.matches.set([...this.state().matches, ...found]);
|
|
764
|
+
this.announcement.set(found.length ? pluralMessage(this.text().suggested, found.length, this.#locale()) : this.text().noSuggestion);
|
|
765
|
+
}
|
|
766
|
+
unmatchLabel(entry) {
|
|
767
|
+
return formatMessage(this.text().unmatch, { description: entry.description });
|
|
768
|
+
}
|
|
769
|
+
day(entry) {
|
|
770
|
+
return formatDate(entry.date, this.#locale(), { day: '2-digit', month: 'short' });
|
|
771
|
+
}
|
|
772
|
+
money(value) {
|
|
773
|
+
return formatMoney(value, this.currency(), this.#locale(), { signDisplay: 'exceptZero' });
|
|
774
|
+
}
|
|
775
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: ReconciliationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
776
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.24", type: ReconciliationComponent, isStandalone: true, selector: "hm-reconciliation", inputs: { statement: { classPropertyName: "statement", publicName: "statement", isSignal: true, isRequired: false, transformFunction: null }, ledger: { classPropertyName: "ledger", publicName: "ledger", isSignal: true, isRequired: false, transformFunction: null }, matches: { classPropertyName: "matches", publicName: "matches", isSignal: true, isRequired: false, transformFunction: null }, currency: { classPropertyName: "currency", publicName: "currency", isSignal: true, isRequired: false, transformFunction: null }, dateToleranceDays: { classPropertyName: "dateToleranceDays", publicName: "dateToleranceDays", isSignal: true, isRequired: false, transformFunction: null }, texts: { classPropertyName: "texts", publicName: "texts", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { matches: "matchesChange" }, host: { classAttribute: "hm-reconciliation" }, ngImport: i0, template: `
|
|
777
|
+
<div class="hm-reconciliation__toolbar">
|
|
778
|
+
<hm-button emphasis="medium" size="small" icon="wand" [disabled]="!state().unmatchedStatement.length" (clicked)="suggest()">{{ text().suggest }}</hm-button>
|
|
779
|
+
<hm-button size="small" icon="link" [disabled]="!canPair()" (clicked)="pair()">{{ text().match }}</hm-button>
|
|
780
|
+
@if (pairHint()) {
|
|
781
|
+
<span class="hm-reconciliation__hint">{{ pairHint() }}</span>
|
|
782
|
+
}
|
|
783
|
+
<span class="hm-visually-hidden" aria-live="polite">{{ announcement() }}</span>
|
|
784
|
+
</div>
|
|
785
|
+
<div class="hm-reconciliation__columns">
|
|
786
|
+
@for (side of sides(); track side.key) {
|
|
787
|
+
<fieldset class="hm-reconciliation__side">
|
|
788
|
+
<legend class="hm-reconciliation__legend">
|
|
789
|
+
{{ side.title }} <span class="hm-reconciliation__pending">{{ side.pending }}</span>
|
|
790
|
+
</legend>
|
|
791
|
+
@for (entry of side.entries; track entry.id) {
|
|
792
|
+
<label class="hm-reconciliation__entry" [class.hm-reconciliation__entry--checked]="side.selected === entry.id">
|
|
793
|
+
<input
|
|
794
|
+
type="radio"
|
|
795
|
+
class="hm-reconciliation__control"
|
|
796
|
+
[name]="name + '-' + side.key"
|
|
797
|
+
[checked]="side.selected === entry.id"
|
|
798
|
+
(change)="select(side.key, entry.id)"
|
|
799
|
+
/>
|
|
800
|
+
<span class="hm-reconciliation__date">{{ day(entry) }}</span>
|
|
801
|
+
<span class="hm-reconciliation__description">{{ entry.description }}</span>
|
|
802
|
+
<span class="hm-reconciliation__amount" [class.hm-reconciliation__amount--in]="entry.amount > 0">{{ money(entry.amount) }}</span>
|
|
803
|
+
</label>
|
|
804
|
+
} @empty {
|
|
805
|
+
<p class="hm-reconciliation__empty">{{ text().empty }}</p>
|
|
806
|
+
}
|
|
807
|
+
</fieldset>
|
|
808
|
+
}
|
|
809
|
+
</div>
|
|
810
|
+
@if (pairs().length) {
|
|
811
|
+
<div class="hm-reconciliation__matched">
|
|
812
|
+
<div class="hm-reconciliation__matched-title">{{ text().matched }}</div>
|
|
813
|
+
<ul class="hm-reconciliation__pairs">
|
|
814
|
+
@for (pair of pairs(); track pair.statement.id) {
|
|
815
|
+
<li class="hm-reconciliation__pair">
|
|
816
|
+
<span>{{ pair.statement.description }}</span>
|
|
817
|
+
<hm-icon shape="link" />
|
|
818
|
+
<span>{{ pair.ledger.description }}</span>
|
|
819
|
+
<span class="hm-reconciliation__amount">{{ money(pair.statement.amount) }}</span>
|
|
820
|
+
<hm-icon-button icon="unlink" emphasis="subtle" size="small" [label]="unmatchLabel(pair.statement)" (clicked)="unpair(pair.statement.id)" />
|
|
821
|
+
</li>
|
|
822
|
+
}
|
|
823
|
+
</ul>
|
|
824
|
+
</div>
|
|
825
|
+
}
|
|
826
|
+
<dl class="hm-reconciliation__totals">
|
|
827
|
+
<div><dt>{{ text().statementTotal }}</dt><dd>{{ money(state().statementTotal) }}</dd></div>
|
|
828
|
+
<div><dt>{{ text().ledgerTotal }}</dt><dd>{{ money(state().ledgerTotal) }}</dd></div>
|
|
829
|
+
<div [class.hm-reconciliation__difference--off]="state().difference !== 0"><dt>{{ text().difference }}</dt><dd>{{ money(state().difference) }}</dd></div>
|
|
830
|
+
</dl>
|
|
831
|
+
@if (state().balanced) {
|
|
832
|
+
<p class="hm-reconciliation__balanced"><hm-icon shape="check-circle" /> {{ text().balanced }}</p>
|
|
833
|
+
}
|
|
834
|
+
`, isInline: true, dependencies: [{ kind: "component", type: ButtonComponent, selector: "hm-button", inputs: ["emphasis", "intent", "size", "type", "icon", "iconDirection", "iconEnd", "disabled", "loading", "loadingState", "block", "link", "newTab", "caret", "inMenu", "toggle", "pressed"], outputs: ["loadingStateChange", "pressedChange", "clicked"] }, { kind: "component", type: IconButtonComponent, selector: "hm-icon-button", inputs: ["label", "icon", "solid", "iconDirection", "emphasis", "intent", "size", "disabled", "toggle", "pressed", "keyShortcuts"], outputs: ["pressedChange", "clicked"] }, { kind: "component", type: IconComponent, selector: "hm-icon", inputs: ["shape", "direction", "size", "solid", "badge", "status", "flip", "inverse", "label"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
835
|
+
}
|
|
836
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: ReconciliationComponent, decorators: [{
|
|
837
|
+
type: Component,
|
|
838
|
+
args: [{
|
|
839
|
+
selector: 'hm-reconciliation',
|
|
840
|
+
imports: [ButtonComponent, IconButtonComponent, IconComponent],
|
|
841
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
842
|
+
host: { class: 'hm-reconciliation' },
|
|
843
|
+
template: `
|
|
844
|
+
<div class="hm-reconciliation__toolbar">
|
|
845
|
+
<hm-button emphasis="medium" size="small" icon="wand" [disabled]="!state().unmatchedStatement.length" (clicked)="suggest()">{{ text().suggest }}</hm-button>
|
|
846
|
+
<hm-button size="small" icon="link" [disabled]="!canPair()" (clicked)="pair()">{{ text().match }}</hm-button>
|
|
847
|
+
@if (pairHint()) {
|
|
848
|
+
<span class="hm-reconciliation__hint">{{ pairHint() }}</span>
|
|
849
|
+
}
|
|
850
|
+
<span class="hm-visually-hidden" aria-live="polite">{{ announcement() }}</span>
|
|
851
|
+
</div>
|
|
852
|
+
<div class="hm-reconciliation__columns">
|
|
853
|
+
@for (side of sides(); track side.key) {
|
|
854
|
+
<fieldset class="hm-reconciliation__side">
|
|
855
|
+
<legend class="hm-reconciliation__legend">
|
|
856
|
+
{{ side.title }} <span class="hm-reconciliation__pending">{{ side.pending }}</span>
|
|
857
|
+
</legend>
|
|
858
|
+
@for (entry of side.entries; track entry.id) {
|
|
859
|
+
<label class="hm-reconciliation__entry" [class.hm-reconciliation__entry--checked]="side.selected === entry.id">
|
|
860
|
+
<input
|
|
861
|
+
type="radio"
|
|
862
|
+
class="hm-reconciliation__control"
|
|
863
|
+
[name]="name + '-' + side.key"
|
|
864
|
+
[checked]="side.selected === entry.id"
|
|
865
|
+
(change)="select(side.key, entry.id)"
|
|
866
|
+
/>
|
|
867
|
+
<span class="hm-reconciliation__date">{{ day(entry) }}</span>
|
|
868
|
+
<span class="hm-reconciliation__description">{{ entry.description }}</span>
|
|
869
|
+
<span class="hm-reconciliation__amount" [class.hm-reconciliation__amount--in]="entry.amount > 0">{{ money(entry.amount) }}</span>
|
|
870
|
+
</label>
|
|
871
|
+
} @empty {
|
|
872
|
+
<p class="hm-reconciliation__empty">{{ text().empty }}</p>
|
|
873
|
+
}
|
|
874
|
+
</fieldset>
|
|
875
|
+
}
|
|
876
|
+
</div>
|
|
877
|
+
@if (pairs().length) {
|
|
878
|
+
<div class="hm-reconciliation__matched">
|
|
879
|
+
<div class="hm-reconciliation__matched-title">{{ text().matched }}</div>
|
|
880
|
+
<ul class="hm-reconciliation__pairs">
|
|
881
|
+
@for (pair of pairs(); track pair.statement.id) {
|
|
882
|
+
<li class="hm-reconciliation__pair">
|
|
883
|
+
<span>{{ pair.statement.description }}</span>
|
|
884
|
+
<hm-icon shape="link" />
|
|
885
|
+
<span>{{ pair.ledger.description }}</span>
|
|
886
|
+
<span class="hm-reconciliation__amount">{{ money(pair.statement.amount) }}</span>
|
|
887
|
+
<hm-icon-button icon="unlink" emphasis="subtle" size="small" [label]="unmatchLabel(pair.statement)" (clicked)="unpair(pair.statement.id)" />
|
|
888
|
+
</li>
|
|
889
|
+
}
|
|
890
|
+
</ul>
|
|
891
|
+
</div>
|
|
892
|
+
}
|
|
893
|
+
<dl class="hm-reconciliation__totals">
|
|
894
|
+
<div><dt>{{ text().statementTotal }}</dt><dd>{{ money(state().statementTotal) }}</dd></div>
|
|
895
|
+
<div><dt>{{ text().ledgerTotal }}</dt><dd>{{ money(state().ledgerTotal) }}</dd></div>
|
|
896
|
+
<div [class.hm-reconciliation__difference--off]="state().difference !== 0"><dt>{{ text().difference }}</dt><dd>{{ money(state().difference) }}</dd></div>
|
|
897
|
+
</dl>
|
|
898
|
+
@if (state().balanced) {
|
|
899
|
+
<p class="hm-reconciliation__balanced"><hm-icon shape="check-circle" /> {{ text().balanced }}</p>
|
|
900
|
+
}
|
|
901
|
+
`,
|
|
902
|
+
}]
|
|
903
|
+
}], propDecorators: { statement: [{ type: i0.Input, args: [{ isSignal: true, alias: "statement", required: false }] }], ledger: [{ type: i0.Input, args: [{ isSignal: true, alias: "ledger", required: false }] }], matches: [{ type: i0.Input, args: [{ isSignal: true, alias: "matches", required: false }] }, { type: i0.Output, args: ["matchesChange"] }], currency: [{ type: i0.Input, args: [{ isSignal: true, alias: "currency", required: false }] }], dateToleranceDays: [{ type: i0.Input, args: [{ isSignal: true, alias: "dateToleranceDays", required: false }] }], texts: [{ type: i0.Input, args: [{ isSignal: true, alias: "texts", required: false }] }] } });
|
|
904
|
+
|
|
905
|
+
// Ponto de import `@trismegisto/angular/finance` (secundário do ng-packagr).
|
|
906
|
+
|
|
907
|
+
/**
|
|
908
|
+
* Generated bundle index. Do not edit.
|
|
909
|
+
*/
|
|
910
|
+
|
|
911
|
+
export { BalanceCardComponent, BudgetVarianceComponent, FINANCE_MESSAGES, FINANCE_MESSAGES_EN, FINANCE_MESSAGES_ES, FINANCE_MESSAGES_PT_BR, FinancialSummaryComponent, ReconciliationComponent };
|
|
912
|
+
//# sourceMappingURL=trismegisto-angular-finance.mjs.map
|