@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,237 @@
|
|
|
1
|
+
import { NgTemplateOutlet } from '@angular/common';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { model, input, booleanAttribute, output, contentChild, computed, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
4
|
+
import { formatMessage, pluralMessage, findKanbanItem } from '@trismegisto/primitives';
|
|
5
|
+
import { workflowMessages } from '@trismegisto/angular/workflow-i18n';
|
|
6
|
+
import { ICON_ANGLE, useHermesIcons, IconComponent } from '@trismegisto/angular/icon';
|
|
7
|
+
import { KanbanCardDirective, KanbanComponent } from '@trismegisto/angular/kanban';
|
|
8
|
+
|
|
9
|
+
const SWIMLANE_BOARD_ICONS = [ICON_ANGLE];
|
|
10
|
+
|
|
11
|
+
let sequence = 0;
|
|
12
|
+
/**
|
|
13
|
+
* Quadro kanban com raias (swimlanes): as mesmas colunas repetidas por raia, e cada cartão na raia que
|
|
14
|
+
* `laneOf` disser. Cada raia é um `hm-kanban` (arrastar por ponteiro, toque e teclado, `canMove`) e pode ser
|
|
15
|
+
* recolhida.
|
|
16
|
+
*
|
|
17
|
+
* ```html
|
|
18
|
+
* <hm-swimlane-board [(columns)]="colunas" [lanes]="pessoas" [laneOf]="raiaDoCartao" (moved)="salvar($event)">
|
|
19
|
+
* <ng-template hmKanbanCard let-item><hm-task-card [task]="item" [showStatus]="false" /></ng-template>
|
|
20
|
+
* </hm-swimlane-board>
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* - **Modelo**: `[(columns)]` é o quadro inteiro (o mesmo do `hm-kanban`). Os cartões se movem entre colunas
|
|
24
|
+
* DENTRO da raia; mudar de raia é mudar o dado que `laneOf` lê (responsável, épico), que é do app. A ordem de
|
|
25
|
+
* cada raia dentro da coluna é preservada.
|
|
26
|
+
* - O limite WIP (`limit`) não é repetido por raia (contaria só uma fatia da coluna); as colunas também não se
|
|
27
|
+
* recolhem, para as raias continuarem alinhadas. Cartão cuja raia não está em `lanes` não aparece.
|
|
28
|
+
* - **Trocar de raia** (opt-in, `allowLaneChange`): o cartão também pode ser arrastado para outra raia — por
|
|
29
|
+
* ponteiro, toque ou teclado (Espaço pega; as setas passam de coluna e, depois da última, para a raia
|
|
30
|
+
* seguinte; cada destino é anunciado como "coluna, raia"). `canMoveLane(item, from, to)` decide se a troca
|
|
31
|
+
* vale (a raia recusada nem aparece como destino); `canMove` continua valendo quando a coluna também muda.
|
|
32
|
+
* O quadro só emite `laneChange` com raia e coluna de origem e destino e a posição: o app muda o dado.
|
|
33
|
+
* Raia recolhida não recebe cartões.
|
|
34
|
+
* - Cada raia é uma região nomeada pelo título, com botão de recolher (`aria-expanded`) e a contagem.
|
|
35
|
+
*/
|
|
36
|
+
class SwimlaneBoardComponent {
|
|
37
|
+
#icons = useHermesIcons(SWIMLANE_BOARD_ICONS);
|
|
38
|
+
/** O quadro inteiro. Two-way. */
|
|
39
|
+
columns = model([], ...(ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []));
|
|
40
|
+
lanes = input.required(...(ngDevMode ? [{ debugName: "lanes" }] : /* istanbul ignore next */ []));
|
|
41
|
+
/** Em que raia o cartão fica (id de `lanes`). */
|
|
42
|
+
laneOf = input.required(...(ngDevMode ? [{ debugName: "laneOf" }] : /* istanbul ignore next */ []));
|
|
43
|
+
/** Ids das raias recolhidas. Two-way. */
|
|
44
|
+
collapsedLanes = model([], ...(ngDevMode ? [{ debugName: "collapsedLanes" }] : /* istanbul ignore next */ []));
|
|
45
|
+
canMove = input(null, ...(ngDevMode ? [{ debugName: "canMove" }] : /* istanbul ignore next */ []));
|
|
46
|
+
itemKey = input((item) => item, ...(ngDevMode ? [{ debugName: "itemKey" }] : /* istanbul ignore next */ []));
|
|
47
|
+
itemLabel = input(null, ...(ngDevMode ? [{ debugName: "itemLabel" }] : /* istanbul ignore next */ []));
|
|
48
|
+
/** Nível do título das raias (as colunas usam o seguinte). */
|
|
49
|
+
headingLevel = input(3, ...(ngDevMode ? [{ debugName: "headingLevel" }] : /* istanbul ignore next */ []));
|
|
50
|
+
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
51
|
+
/** Deixa arrastar cartões para outra raia (emite `laneChange`; o app muda o dado). */
|
|
52
|
+
allowLaneChange = input(false, { ...(ngDevMode ? { debugName: "allowLaneChange" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
53
|
+
/** Regra para trocar de raia; `null` = qualquer troca vale (com `allowLaneChange`). */
|
|
54
|
+
canMoveLane = input(null, ...(ngDevMode ? [{ debugName: "canMoveLane" }] : /* istanbul ignore next */ []));
|
|
55
|
+
moved = output();
|
|
56
|
+
/** Intenção de levar um cartão para outra raia (`allowLaneChange`). Nada é aplicado em `columns`. */
|
|
57
|
+
laneChange = output();
|
|
58
|
+
groupId = `hm-swimlane-board-${++sequence}`;
|
|
59
|
+
card = contentChild(KanbanCardDirective, ...(ngDevMode ? [{ debugName: "card" }] : /* istanbul ignore next */ []));
|
|
60
|
+
/** Sobrescreve textos desta peça (parcial; o resto segue o idioma ativo). */
|
|
61
|
+
texts = input(null, ...(ngDevMode ? [{ debugName: "texts" }] : /* istanbul ignore next */ []));
|
|
62
|
+
#messages = workflowMessages(() => this.texts());
|
|
63
|
+
text = computed(() => this.#messages.tasks.swimlanes, ...(ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []));
|
|
64
|
+
views = computed(() => {
|
|
65
|
+
const laneOf = this.laneOf();
|
|
66
|
+
const locale = this.#messages.meta.locale;
|
|
67
|
+
return this.lanes().map((lane) => {
|
|
68
|
+
const columns = this.columns().map((column) => ({
|
|
69
|
+
...column,
|
|
70
|
+
limit: null,
|
|
71
|
+
items: column.items.filter((item) => laneOf(item) === lane.id),
|
|
72
|
+
}));
|
|
73
|
+
const total = columns.reduce((sum, column) => sum + column.items.length, 0);
|
|
74
|
+
const receive = (item, to) => this.#canReceive(item, lane, to.id);
|
|
75
|
+
const columnLabel = (column) => formatMessage(this.text().laneColumn, { column: column.title, lane: lane.title });
|
|
76
|
+
return { lane, columns, count: pluralMessage(this.text().count, total, locale), receive, columnLabel };
|
|
77
|
+
});
|
|
78
|
+
}, ...(ngDevMode ? [{ debugName: "views" }] : /* istanbul ignore next */ []));
|
|
79
|
+
isCollapsed(id) {
|
|
80
|
+
return this.collapsedLanes().includes(id);
|
|
81
|
+
}
|
|
82
|
+
toggle(id) {
|
|
83
|
+
this.collapsedLanes.update((list) => (list.includes(id) ? list.filter((l) => l !== id) : [...list, id]));
|
|
84
|
+
}
|
|
85
|
+
toggleLabel(lane) {
|
|
86
|
+
return formatMessage(this.isCollapsed(lane.id) ? this.text().expand : this.text().collapse, { lane: lane.title });
|
|
87
|
+
}
|
|
88
|
+
/** O cartão (de outra raia) pode cair na coluna `to` da raia `lane`? */
|
|
89
|
+
#canReceive(item, lane, to) {
|
|
90
|
+
const fromLane = this.lanes().find((l) => l.id === this.laneOf()(item));
|
|
91
|
+
if (!fromLane || fromLane.id === lane.id)
|
|
92
|
+
return false;
|
|
93
|
+
const columns = this.columns();
|
|
94
|
+
const where = findKanbanItem(columns, item, this.itemKey());
|
|
95
|
+
const source = where ? columns.find((c) => c.id === where.columnId) : undefined;
|
|
96
|
+
const target = columns.find((c) => c.id === to);
|
|
97
|
+
if (!source || !target)
|
|
98
|
+
return false;
|
|
99
|
+
if (source.id !== target.id && this.canMove() && !this.canMove()(item, source, target))
|
|
100
|
+
return false;
|
|
101
|
+
return this.canMoveLane()?.(item, fromLane, lane) ?? true;
|
|
102
|
+
}
|
|
103
|
+
onReceived(lane, event) {
|
|
104
|
+
const where = findKanbanItem(this.columns(), event.item, this.itemKey());
|
|
105
|
+
if (!where)
|
|
106
|
+
return;
|
|
107
|
+
this.laneChange.emit({
|
|
108
|
+
item: event.item,
|
|
109
|
+
fromLane: this.laneOf()(event.item),
|
|
110
|
+
toLane: lane.id,
|
|
111
|
+
from: where.columnId,
|
|
112
|
+
to: event.to,
|
|
113
|
+
toIndex: event.toIndex,
|
|
114
|
+
via: event.via,
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
/** Devolve as colunas da raia ao quadro inteiro, mantendo o lugar dos cartões das outras raias. */
|
|
118
|
+
onMoved(laneId, event) {
|
|
119
|
+
const laneOf = this.laneOf();
|
|
120
|
+
const laneColumns = new Map(event.columns.map((column) => [column.id, column.items]));
|
|
121
|
+
const next = this.columns().map((column) => {
|
|
122
|
+
const queue = [...(laneColumns.get(column.id) ?? [])];
|
|
123
|
+
const items = [];
|
|
124
|
+
for (const item of column.items) {
|
|
125
|
+
if (laneOf(item) !== laneId)
|
|
126
|
+
items.push(item);
|
|
127
|
+
else if (queue.length)
|
|
128
|
+
items.push(queue.shift());
|
|
129
|
+
}
|
|
130
|
+
items.push(...queue);
|
|
131
|
+
return items.length === column.items.length && items.every((item, i) => item === column.items[i]) ? column : { ...column, items };
|
|
132
|
+
});
|
|
133
|
+
this.columns.set(next);
|
|
134
|
+
this.moved.emit({ ...event, columns: next, lane: laneId });
|
|
135
|
+
}
|
|
136
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: SwimlaneBoardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
137
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.24", type: SwimlaneBoardComponent, isStandalone: true, selector: "hm-swimlane-board", inputs: { columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, lanes: { classPropertyName: "lanes", publicName: "lanes", isSignal: true, isRequired: true, transformFunction: null }, laneOf: { classPropertyName: "laneOf", publicName: "laneOf", isSignal: true, isRequired: true, transformFunction: null }, collapsedLanes: { classPropertyName: "collapsedLanes", publicName: "collapsedLanes", isSignal: true, isRequired: false, transformFunction: null }, canMove: { classPropertyName: "canMove", publicName: "canMove", isSignal: true, isRequired: false, transformFunction: null }, itemKey: { classPropertyName: "itemKey", publicName: "itemKey", isSignal: true, isRequired: false, transformFunction: null }, itemLabel: { classPropertyName: "itemLabel", publicName: "itemLabel", isSignal: true, isRequired: false, transformFunction: null }, headingLevel: { classPropertyName: "headingLevel", publicName: "headingLevel", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, allowLaneChange: { classPropertyName: "allowLaneChange", publicName: "allowLaneChange", isSignal: true, isRequired: false, transformFunction: null }, canMoveLane: { classPropertyName: "canMoveLane", publicName: "canMoveLane", isSignal: true, isRequired: false, transformFunction: null }, texts: { classPropertyName: "texts", publicName: "texts", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { columns: "columnsChange", collapsedLanes: "collapsedLanesChange", moved: "moved", laneChange: "laneChange" }, host: { classAttribute: "hm-swimlane-board" }, queries: [{ propertyName: "card", first: true, predicate: KanbanCardDirective, descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
138
|
+
@for (view of views(); track view.lane.id) {
|
|
139
|
+
<section class="hm-swimlane" [class.hm-swimlane--collapsed]="isCollapsed(view.lane.id)" [attr.aria-label]="view.lane.title">
|
|
140
|
+
<div class="hm-swimlane__header">
|
|
141
|
+
<button
|
|
142
|
+
type="button"
|
|
143
|
+
class="hm-swimlane__toggle"
|
|
144
|
+
[attr.aria-expanded]="!isCollapsed(view.lane.id)"
|
|
145
|
+
[attr.aria-label]="toggleLabel(view.lane)"
|
|
146
|
+
(click)="toggle(view.lane.id)"
|
|
147
|
+
>
|
|
148
|
+
<hm-icon shape="angle" [direction]="isCollapsed(view.lane.id) ? 'right' : 'down'" />
|
|
149
|
+
</button>
|
|
150
|
+
<span class="hm-swimlane__title" role="heading" [attr.aria-level]="headingLevel()">{{ view.lane.title }}</span>
|
|
151
|
+
<span class="hm-swimlane__count">{{ view.count }}</span>
|
|
152
|
+
</div>
|
|
153
|
+
@if (!isCollapsed(view.lane.id)) {
|
|
154
|
+
<hm-kanban
|
|
155
|
+
class="hm-swimlane__board"
|
|
156
|
+
[columns]="view.columns"
|
|
157
|
+
[canMove]="canMove()"
|
|
158
|
+
[itemKey]="itemKey()"
|
|
159
|
+
[itemLabel]="itemLabel()"
|
|
160
|
+
[label]="view.lane.title"
|
|
161
|
+
[collapsible]="false"
|
|
162
|
+
[headingLevel]="headingLevel() + 1"
|
|
163
|
+
[disabled]="disabled()"
|
|
164
|
+
[dragGroup]="allowLaneChange() ? groupId : null"
|
|
165
|
+
[canReceive]="allowLaneChange() ? view.receive : null"
|
|
166
|
+
[columnLabel]="allowLaneChange() ? view.columnLabel : null"
|
|
167
|
+
(moved)="onMoved(view.lane.id, $event)"
|
|
168
|
+
(received)="onReceived(view.lane, $event)"
|
|
169
|
+
>
|
|
170
|
+
<ng-template hmKanbanCard let-item let-column="column" let-index="index">
|
|
171
|
+
<ng-container [ngTemplateOutlet]="card()?.template ?? null" [ngTemplateOutletContext]="{ $implicit: item, column, index }" />
|
|
172
|
+
</ng-template>
|
|
173
|
+
</hm-kanban>
|
|
174
|
+
}
|
|
175
|
+
</section>
|
|
176
|
+
}
|
|
177
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: IconComponent, selector: "hm-icon", inputs: ["shape", "direction", "size", "solid", "badge", "status", "flip", "inverse", "label"] }, { kind: "component", type: KanbanComponent, selector: "hm-kanban", inputs: ["columns", "collapsed", "canMove", "itemKey", "itemLabel", "label", "collapsible", "headingLevel", "disabled", "dragGroup", "canReceive", "columnLabel"], outputs: ["columnsChange", "collapsedChange", "moved", "received"] }, { kind: "directive", type: KanbanCardDirective, selector: "ng-template[hmKanbanCard]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
178
|
+
}
|
|
179
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: SwimlaneBoardComponent, decorators: [{
|
|
180
|
+
type: Component,
|
|
181
|
+
args: [{
|
|
182
|
+
selector: 'hm-swimlane-board',
|
|
183
|
+
imports: [NgTemplateOutlet, IconComponent, KanbanComponent, KanbanCardDirective],
|
|
184
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
185
|
+
host: { class: 'hm-swimlane-board' },
|
|
186
|
+
template: `
|
|
187
|
+
@for (view of views(); track view.lane.id) {
|
|
188
|
+
<section class="hm-swimlane" [class.hm-swimlane--collapsed]="isCollapsed(view.lane.id)" [attr.aria-label]="view.lane.title">
|
|
189
|
+
<div class="hm-swimlane__header">
|
|
190
|
+
<button
|
|
191
|
+
type="button"
|
|
192
|
+
class="hm-swimlane__toggle"
|
|
193
|
+
[attr.aria-expanded]="!isCollapsed(view.lane.id)"
|
|
194
|
+
[attr.aria-label]="toggleLabel(view.lane)"
|
|
195
|
+
(click)="toggle(view.lane.id)"
|
|
196
|
+
>
|
|
197
|
+
<hm-icon shape="angle" [direction]="isCollapsed(view.lane.id) ? 'right' : 'down'" />
|
|
198
|
+
</button>
|
|
199
|
+
<span class="hm-swimlane__title" role="heading" [attr.aria-level]="headingLevel()">{{ view.lane.title }}</span>
|
|
200
|
+
<span class="hm-swimlane__count">{{ view.count }}</span>
|
|
201
|
+
</div>
|
|
202
|
+
@if (!isCollapsed(view.lane.id)) {
|
|
203
|
+
<hm-kanban
|
|
204
|
+
class="hm-swimlane__board"
|
|
205
|
+
[columns]="view.columns"
|
|
206
|
+
[canMove]="canMove()"
|
|
207
|
+
[itemKey]="itemKey()"
|
|
208
|
+
[itemLabel]="itemLabel()"
|
|
209
|
+
[label]="view.lane.title"
|
|
210
|
+
[collapsible]="false"
|
|
211
|
+
[headingLevel]="headingLevel() + 1"
|
|
212
|
+
[disabled]="disabled()"
|
|
213
|
+
[dragGroup]="allowLaneChange() ? groupId : null"
|
|
214
|
+
[canReceive]="allowLaneChange() ? view.receive : null"
|
|
215
|
+
[columnLabel]="allowLaneChange() ? view.columnLabel : null"
|
|
216
|
+
(moved)="onMoved(view.lane.id, $event)"
|
|
217
|
+
(received)="onReceived(view.lane, $event)"
|
|
218
|
+
>
|
|
219
|
+
<ng-template hmKanbanCard let-item let-column="column" let-index="index">
|
|
220
|
+
<ng-container [ngTemplateOutlet]="card()?.template ?? null" [ngTemplateOutletContext]="{ $implicit: item, column, index }" />
|
|
221
|
+
</ng-template>
|
|
222
|
+
</hm-kanban>
|
|
223
|
+
}
|
|
224
|
+
</section>
|
|
225
|
+
}
|
|
226
|
+
`,
|
|
227
|
+
}]
|
|
228
|
+
}], propDecorators: { columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: false }] }, { type: i0.Output, args: ["columnsChange"] }], lanes: [{ type: i0.Input, args: [{ isSignal: true, alias: "lanes", required: true }] }], laneOf: [{ type: i0.Input, args: [{ isSignal: true, alias: "laneOf", required: true }] }], collapsedLanes: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsedLanes", required: false }] }, { type: i0.Output, args: ["collapsedLanesChange"] }], canMove: [{ type: i0.Input, args: [{ isSignal: true, alias: "canMove", required: false }] }], itemKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemKey", required: false }] }], itemLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemLabel", required: false }] }], headingLevel: [{ type: i0.Input, args: [{ isSignal: true, alias: "headingLevel", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], allowLaneChange: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowLaneChange", required: false }] }], canMoveLane: [{ type: i0.Input, args: [{ isSignal: true, alias: "canMoveLane", required: false }] }], moved: [{ type: i0.Output, args: ["moved"] }], laneChange: [{ type: i0.Output, args: ["laneChange"] }], card: [{ type: i0.ContentChild, args: [i0.forwardRef(() => KanbanCardDirective), { isSignal: true }] }], texts: [{ type: i0.Input, args: [{ isSignal: true, alias: "texts", required: false }] }] } });
|
|
229
|
+
|
|
230
|
+
// Ponto de import `@trismegisto/angular/swimlane-board` (secundário do ng-packagr).
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* Generated bundle index. Do not edit.
|
|
234
|
+
*/
|
|
235
|
+
|
|
236
|
+
export { SwimlaneBoardComponent };
|
|
237
|
+
//# sourceMappingURL=trismegisto-angular-swimlane-board.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trismegisto-angular-swimlane-board.mjs","sources":["../../src/swimlane-board/icons.generated.ts","../../src/swimlane-board/swimlane-board.component.ts","../../src/swimlane-board/index.ts","../../src/swimlane-board/trismegisto-angular-swimlane-board.ts"],"sourcesContent":["// GERADO por scripts/generate-internal-icons.mjs — não editar à mão.\n// Ícones que esta pasta usa por dentro; cada @Component/@Directive daqui os registra com\n// `readonly #icons = useHermesIcons(SWIMLANE_BOARD_ICONS);`.\nimport type { RegisteredIcon } from '@trismegisto/icons';\nimport {\n ICON_ANGLE,\n} from '@trismegisto/angular/icon';\n\nexport const SWIMLANE_BOARD_ICONS: readonly RegisteredIcon[] = [ICON_ANGLE];\n","import { NgTemplateOutlet } from '@angular/common';\nimport { booleanAttribute, ChangeDetectionStrategy, Component, computed, contentChild, inject, input, model, output } from '@angular/core';\nimport { KanbanColumn, SwimlaneLaneMove, findKanbanItem, formatMessage, pluralMessage } from '@trismegisto/primitives';\nimport { WorkflowTextOverride, workflowMessages } from '@trismegisto/angular/workflow-i18n';\nimport { IconComponent, useHermesIcons } from '@trismegisto/angular/icon';\nimport { HermesDragVia } from '@trismegisto/angular/drag-drop';\nimport { KanbanCanMove, KanbanCardDirective, KanbanComponent, KanbanMoveEvent, KanbanReceiveEvent } from '@trismegisto/angular/kanban';\nimport { SWIMLANE_BOARD_ICONS } from './icons.generated';\n\n/** Uma raia do quadro (pessoa, equipe, épico, prioridade...). */\nexport interface SwimlaneLane {\n readonly id: string;\n readonly title: string;\n}\n\n/** Um cartão mudou de lugar dentro de uma raia (`hm-swimlane-board` → `moved`). */\nexport interface SwimlaneMoveEvent<T = unknown> extends KanbanMoveEvent<T> {\n /** Raia em que o movimento aconteceu. */\n readonly lane: string;\n}\n\n/**\n * Intenção de levar um cartão para outra raia (`hm-swimlane-board` → `laneChange`, com `allowLaneChange`). O\n * quadro não muda nada: a raia vem do dado (`laneOf`), que é do app. Para aplicar, troque a raia no cartão e\n * use `applySwimlaneLaneMove(columns, evento, laneOf, { replacement })` (`@trismegisto/primitives`) — o evento já\n * tem o formato do movimento.\n */\nexport interface SwimlaneLaneChangeEvent<T = unknown> extends SwimlaneLaneMove<T> {\n /** Raia de origem. */\n readonly fromLane: string;\n /** Coluna de origem. */\n readonly from: string;\n readonly via: HermesDragVia;\n}\n\n/** Regra de negócio para trocar de raia: o cartão pode ir da raia `from` para a `to`? */\nexport type SwimlaneCanMoveLane<T = unknown> = (item: T, from: SwimlaneLane, to: SwimlaneLane) => boolean;\n\nlet sequence = 0;\n\n/**\n * Quadro kanban com raias (swimlanes): as mesmas colunas repetidas por raia, e cada cartão na raia que\n * `laneOf` disser. Cada raia é um `hm-kanban` (arrastar por ponteiro, toque e teclado, `canMove`) e pode ser\n * recolhida.\n *\n * ```html\n * <hm-swimlane-board [(columns)]=\"colunas\" [lanes]=\"pessoas\" [laneOf]=\"raiaDoCartao\" (moved)=\"salvar($event)\">\n * <ng-template hmKanbanCard let-item><hm-task-card [task]=\"item\" [showStatus]=\"false\" /></ng-template>\n * </hm-swimlane-board>\n * ```\n *\n * - **Modelo**: `[(columns)]` é o quadro inteiro (o mesmo do `hm-kanban`). Os cartões se movem entre colunas\n * DENTRO da raia; mudar de raia é mudar o dado que `laneOf` lê (responsável, épico), que é do app. A ordem de\n * cada raia dentro da coluna é preservada.\n * - O limite WIP (`limit`) não é repetido por raia (contaria só uma fatia da coluna); as colunas também não se\n * recolhem, para as raias continuarem alinhadas. Cartão cuja raia não está em `lanes` não aparece.\n * - **Trocar de raia** (opt-in, `allowLaneChange`): o cartão também pode ser arrastado para outra raia — por\n * ponteiro, toque ou teclado (Espaço pega; as setas passam de coluna e, depois da última, para a raia\n * seguinte; cada destino é anunciado como \"coluna, raia\"). `canMoveLane(item, from, to)` decide se a troca\n * vale (a raia recusada nem aparece como destino); `canMove` continua valendo quando a coluna também muda.\n * O quadro só emite `laneChange` com raia e coluna de origem e destino e a posição: o app muda o dado.\n * Raia recolhida não recebe cartões.\n * - Cada raia é uma região nomeada pelo título, com botão de recolher (`aria-expanded`) e a contagem.\n */\n@Component({\n selector: 'hm-swimlane-board',\n imports: [NgTemplateOutlet, IconComponent, KanbanComponent, KanbanCardDirective],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'hm-swimlane-board' },\n template: `\n @for (view of views(); track view.lane.id) {\n <section class=\"hm-swimlane\" [class.hm-swimlane--collapsed]=\"isCollapsed(view.lane.id)\" [attr.aria-label]=\"view.lane.title\">\n <div class=\"hm-swimlane__header\">\n <button\n type=\"button\"\n class=\"hm-swimlane__toggle\"\n [attr.aria-expanded]=\"!isCollapsed(view.lane.id)\"\n [attr.aria-label]=\"toggleLabel(view.lane)\"\n (click)=\"toggle(view.lane.id)\"\n >\n <hm-icon shape=\"angle\" [direction]=\"isCollapsed(view.lane.id) ? 'right' : 'down'\" />\n </button>\n <span class=\"hm-swimlane__title\" role=\"heading\" [attr.aria-level]=\"headingLevel()\">{{ view.lane.title }}</span>\n <span class=\"hm-swimlane__count\">{{ view.count }}</span>\n </div>\n @if (!isCollapsed(view.lane.id)) {\n <hm-kanban\n class=\"hm-swimlane__board\"\n [columns]=\"view.columns\"\n [canMove]=\"canMove()\"\n [itemKey]=\"itemKey()\"\n [itemLabel]=\"itemLabel()\"\n [label]=\"view.lane.title\"\n [collapsible]=\"false\"\n [headingLevel]=\"headingLevel() + 1\"\n [disabled]=\"disabled()\"\n [dragGroup]=\"allowLaneChange() ? groupId : null\"\n [canReceive]=\"allowLaneChange() ? view.receive : null\"\n [columnLabel]=\"allowLaneChange() ? view.columnLabel : null\"\n (moved)=\"onMoved(view.lane.id, $event)\"\n (received)=\"onReceived(view.lane, $event)\"\n >\n <ng-template hmKanbanCard let-item let-column=\"column\" let-index=\"index\">\n <ng-container [ngTemplateOutlet]=\"card()?.template ?? null\" [ngTemplateOutletContext]=\"{ $implicit: item, column, index }\" />\n </ng-template>\n </hm-kanban>\n }\n </section>\n }\n `,\n})\nexport class SwimlaneBoardComponent<T = unknown> {\n readonly #icons = useHermesIcons(SWIMLANE_BOARD_ICONS);\n\n /** O quadro inteiro. Two-way. */\n readonly columns = model<readonly KanbanColumn<T>[]>([]);\n readonly lanes = input.required<readonly SwimlaneLane[]>();\n /** Em que raia o cartão fica (id de `lanes`). */\n readonly laneOf = input.required<(item: T) => string>();\n /** Ids das raias recolhidas. Two-way. */\n readonly collapsedLanes = model<readonly string[]>([]);\n readonly canMove = input<KanbanCanMove<T> | null>(null);\n readonly itemKey = input<(item: T) => unknown>((item: T) => item);\n readonly itemLabel = input<((item: T) => string) | null>(null);\n /** Nível do título das raias (as colunas usam o seguinte). */\n readonly headingLevel = input(3);\n readonly disabled = input(false, { transform: booleanAttribute });\n\n /** Deixa arrastar cartões para outra raia (emite `laneChange`; o app muda o dado). */\n readonly allowLaneChange = input(false, { transform: booleanAttribute });\n /** Regra para trocar de raia; `null` = qualquer troca vale (com `allowLaneChange`). */\n readonly canMoveLane = input<SwimlaneCanMoveLane<T> | null>(null);\n\n readonly moved = output<SwimlaneMoveEvent<T>>();\n /** Intenção de levar um cartão para outra raia (`allowLaneChange`). Nada é aplicado em `columns`. */\n readonly laneChange = output<SwimlaneLaneChangeEvent<T>>();\n\n protected readonly groupId = `hm-swimlane-board-${++sequence}`;\n\n protected readonly card = contentChild(KanbanCardDirective);\n /** Sobrescreve textos desta peça (parcial; o resto segue o idioma ativo). */\n readonly texts = input<WorkflowTextOverride | null>(null);\n readonly #messages = workflowMessages(() => this.texts());\n protected readonly text = computed(() => this.#messages.tasks.swimlanes);\n\n protected readonly views = computed(() => {\n const laneOf = this.laneOf();\n const locale = this.#messages.meta.locale;\n return this.lanes().map((lane) => {\n const columns = this.columns().map((column) => ({\n ...column,\n limit: null,\n items: column.items.filter((item) => laneOf(item) === lane.id),\n }));\n const total = columns.reduce((sum, column) => sum + column.items.length, 0);\n const receive = (item: T, to: KanbanColumn<T>): boolean => this.#canReceive(item, lane, to.id);\n const columnLabel = (column: KanbanColumn<T>): string => formatMessage(this.text().laneColumn, { column: column.title, lane: lane.title });\n return { lane, columns, count: pluralMessage(this.text().count, total, locale), receive, columnLabel };\n });\n });\n\n protected isCollapsed(id: string): boolean {\n return this.collapsedLanes().includes(id);\n }\n\n protected toggle(id: string): void {\n this.collapsedLanes.update((list) => (list.includes(id) ? list.filter((l) => l !== id) : [...list, id]));\n }\n\n protected toggleLabel(lane: SwimlaneLane): string {\n return formatMessage(this.isCollapsed(lane.id) ? this.text().expand : this.text().collapse, { lane: lane.title });\n }\n\n /** O cartão (de outra raia) pode cair na coluna `to` da raia `lane`? */\n #canReceive(item: T, lane: SwimlaneLane, to: string): boolean {\n const fromLane = this.lanes().find((l) => l.id === this.laneOf()(item));\n if (!fromLane || fromLane.id === lane.id) return false;\n const columns = this.columns();\n const where = findKanbanItem(columns, item, this.itemKey());\n const source = where ? columns.find((c) => c.id === where.columnId) : undefined;\n const target = columns.find((c) => c.id === to);\n if (!source || !target) return false;\n if (source.id !== target.id && this.canMove() && !this.canMove()!(item, source, target)) return false;\n return this.canMoveLane()?.(item, fromLane, lane) ?? true;\n }\n\n protected onReceived(lane: SwimlaneLane, event: KanbanReceiveEvent<T>): void {\n const where = findKanbanItem(this.columns(), event.item, this.itemKey());\n if (!where) return;\n this.laneChange.emit({\n item: event.item,\n fromLane: this.laneOf()(event.item),\n toLane: lane.id,\n from: where.columnId,\n to: event.to,\n toIndex: event.toIndex,\n via: event.via,\n });\n }\n\n /** Devolve as colunas da raia ao quadro inteiro, mantendo o lugar dos cartões das outras raias. */\n protected onMoved(laneId: string, event: KanbanMoveEvent<T>): void {\n const laneOf = this.laneOf();\n const laneColumns = new Map(event.columns.map((column) => [column.id, column.items]));\n const next = this.columns().map((column) => {\n const queue = [...(laneColumns.get(column.id) ?? [])];\n const items: T[] = [];\n for (const item of column.items) {\n if (laneOf(item) !== laneId) items.push(item);\n else if (queue.length) items.push(queue.shift()!);\n }\n items.push(...queue);\n return items.length === column.items.length && items.every((item, i) => item === column.items[i]) ? column : { ...column, items };\n });\n this.columns.set(next);\n this.moved.emit({ ...event, columns: next, lane: laneId });\n }\n}\n","// Ponto de import `@trismegisto/angular/swimlane-board` (secundário do ng-packagr).\nexport * from './swimlane-board.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAQO,MAAM,oBAAoB,GAA8B,CAAC,UAAU,CAAC;;AC8B3E,IAAI,QAAQ,GAAG,CAAC;AAEhB;;;;;;;;;;;;;;;;;;;;;;;AAuBG;MAgDU,sBAAsB,CAAA;AACxB,IAAA,MAAM,GAAG,cAAc,CAAC,oBAAoB,CAAC;;AAG7C,IAAA,OAAO,GAAG,KAAK,CAA6B,EAAE,8EAAC;AAC/C,IAAA,KAAK,GAAG,KAAK,CAAC,QAAQ,2EAA2B;;AAEjD,IAAA,MAAM,GAAG,KAAK,CAAC,QAAQ,4EAAuB;;AAE9C,IAAA,cAAc,GAAG,KAAK,CAAoB,EAAE,qFAAC;AAC7C,IAAA,OAAO,GAAG,KAAK,CAA0B,IAAI,8EAAC;IAC9C,OAAO,GAAG,KAAK,CAAuB,CAA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S;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,mBAAmB;oBAC7B,OAAO,EAAE,CAAC,gBAAgB,EAAE,aAAa,EAAE,eAAe,EAAE,mBAAmB,CAAC;oBAChF,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,IAAI,EAAE,EAAE,KAAK,EAAE,mBAAmB,EAAE;AACpC,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCT,EAAA,CAAA;AACF,iBAAA;41CA6BwC,mBAAmB,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,KAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,OAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AC3I5D;;ACAA;;AAEG;;"}
|
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { input, booleanAttribute, output, inject, computed, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { syncStatusIntent, syncProgress, formatMessage, pluralMessage, syncDuration } from '@trismegisto/primitives';
|
|
4
|
+
import { ButtonComponent } from '@trismegisto/angular/button';
|
|
5
|
+
import { HermesI18nService } from '@trismegisto/angular/i18n';
|
|
6
|
+
import { ICON_REFRESH, ICON_STOP, ICON_SYNC, useHermesIcons } from '@trismegisto/angular/icon';
|
|
7
|
+
import { injectIntegrationText, formatIntegrationTimestamp, formatIntegrationDuration } from '@trismegisto/angular/integration-text';
|
|
8
|
+
import { ProgressComponent } from '@trismegisto/angular/progress';
|
|
9
|
+
import { TagComponent } from '@trismegisto/angular/tag';
|
|
10
|
+
|
|
11
|
+
const SYNC_STATUS_MESSAGES_PT_BR = {
|
|
12
|
+
sync: {
|
|
13
|
+
statuses: {
|
|
14
|
+
queued: 'Na fila',
|
|
15
|
+
running: 'Em andamento',
|
|
16
|
+
succeeded: 'Concluída',
|
|
17
|
+
partial: 'Concluída com falhas',
|
|
18
|
+
failed: 'Falhou',
|
|
19
|
+
cancelled: 'Cancelada',
|
|
20
|
+
},
|
|
21
|
+
label: 'Sincronização',
|
|
22
|
+
progress: 'Progresso da sincronização',
|
|
23
|
+
progressValue: '{processed} de {total}',
|
|
24
|
+
processed: { one: '{count} registro processado', other: '{count} registros processados' },
|
|
25
|
+
created: 'Criados',
|
|
26
|
+
updated: 'Atualizados',
|
|
27
|
+
deleted: 'Removidos',
|
|
28
|
+
failed: 'Falhas',
|
|
29
|
+
duration: 'Duração',
|
|
30
|
+
startedAt: 'Início',
|
|
31
|
+
trigger: 'Disparada por',
|
|
32
|
+
errors: { one: '{count} erro', other: '{count} erros' },
|
|
33
|
+
record: 'Registro',
|
|
34
|
+
never: 'Nenhuma sincronização ainda.',
|
|
35
|
+
syncNow: 'Sincronizar agora',
|
|
36
|
+
cancel: 'Cancelar',
|
|
37
|
+
retry: 'Tentar de novo',
|
|
38
|
+
historyLabel: 'Histórico de sincronizações',
|
|
39
|
+
historyEmpty: 'Nenhuma sincronização registrada.',
|
|
40
|
+
records: 'Registros',
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
const SYNC_STATUS_MESSAGES_EN = {
|
|
44
|
+
sync: {
|
|
45
|
+
statuses: {
|
|
46
|
+
queued: 'Queued',
|
|
47
|
+
running: 'Running',
|
|
48
|
+
succeeded: 'Completed',
|
|
49
|
+
partial: 'Completed with failures',
|
|
50
|
+
failed: 'Failed',
|
|
51
|
+
cancelled: 'Cancelled',
|
|
52
|
+
},
|
|
53
|
+
label: 'Sync',
|
|
54
|
+
progress: 'Sync progress',
|
|
55
|
+
progressValue: '{processed} of {total}',
|
|
56
|
+
processed: { one: '{count} record processed', other: '{count} records processed' },
|
|
57
|
+
created: 'Created',
|
|
58
|
+
updated: 'Updated',
|
|
59
|
+
deleted: 'Deleted',
|
|
60
|
+
failed: 'Failures',
|
|
61
|
+
duration: 'Duration',
|
|
62
|
+
startedAt: 'Started',
|
|
63
|
+
trigger: 'Triggered by',
|
|
64
|
+
errors: { one: '{count} error', other: '{count} errors' },
|
|
65
|
+
record: 'Record',
|
|
66
|
+
never: 'No syncs yet.',
|
|
67
|
+
syncNow: 'Sync now',
|
|
68
|
+
cancel: 'Cancel',
|
|
69
|
+
retry: 'Retry',
|
|
70
|
+
historyLabel: 'Sync history',
|
|
71
|
+
historyEmpty: 'No syncs recorded.',
|
|
72
|
+
records: 'Records',
|
|
73
|
+
},
|
|
74
|
+
};
|
|
75
|
+
const SYNC_STATUS_MESSAGES_ES = {
|
|
76
|
+
sync: {
|
|
77
|
+
statuses: {
|
|
78
|
+
queued: 'En cola',
|
|
79
|
+
running: 'En curso',
|
|
80
|
+
succeeded: 'Completada',
|
|
81
|
+
partial: 'Completada con fallos',
|
|
82
|
+
failed: 'Falló',
|
|
83
|
+
cancelled: 'Cancelada',
|
|
84
|
+
},
|
|
85
|
+
label: 'Sincronización',
|
|
86
|
+
progress: 'Progreso de la sincronización',
|
|
87
|
+
progressValue: '{processed} de {total}',
|
|
88
|
+
processed: { one: '{count} registro procesado', other: '{count} registros procesados' },
|
|
89
|
+
created: 'Creados',
|
|
90
|
+
updated: 'Actualizados',
|
|
91
|
+
deleted: 'Eliminados',
|
|
92
|
+
failed: 'Fallos',
|
|
93
|
+
duration: 'Duración',
|
|
94
|
+
startedAt: 'Inicio',
|
|
95
|
+
trigger: 'Iniciada por',
|
|
96
|
+
errors: { one: '{count} error', other: '{count} errores' },
|
|
97
|
+
record: 'Registro',
|
|
98
|
+
never: 'Aún no hay sincronizaciones.',
|
|
99
|
+
syncNow: 'Sincronizar ahora',
|
|
100
|
+
cancel: 'Cancelar',
|
|
101
|
+
retry: 'Reintentar',
|
|
102
|
+
historyLabel: 'Historial de sincronizaciones',
|
|
103
|
+
historyEmpty: 'No hay sincronizaciones registradas.',
|
|
104
|
+
records: 'Registros',
|
|
105
|
+
},
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
const SYNC_STATUS_ICONS = [ICON_REFRESH, ICON_STOP, ICON_SYNC];
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Estado da sincronização (`hm-sync-status`): a execução atual ou a última — estado em texto, progresso
|
|
112
|
+
* (`hm-progress`, determinado quando há `total`, indeterminado sem ele), contadores de criados/atualizados/
|
|
113
|
+
* removidos/falhas, duração, quem disparou, os erros por registro (lista recolhível) e as ações.
|
|
114
|
+
*
|
|
115
|
+
* ```html
|
|
116
|
+
* <hm-sync-status [run]="ultima()" [now]="agora()" (syncNow)="sincronizar()" (cancel)="cancelar()" (retry)="repetir()" />
|
|
117
|
+
* ```
|
|
118
|
+
*
|
|
119
|
+
* - Ações por estado: na fila/em andamento → **Cancelar**; falhou/parcial → **Tentar de novo**; fora de
|
|
120
|
+
* andamento → **Sincronizar agora**. Todas só emitem: quem sincroniza é o app.
|
|
121
|
+
* - `now` (epoch ms) calcula a duração de uma execução em andamento — o componente não tem relógio
|
|
122
|
+
* próprio; o app atualiza `now` no ritmo que quiser (e fixa em teste e captura).
|
|
123
|
+
* - Os erros ficam num `<details>` nativo (teclado e leitor de tela de graça), fechado por padrão.
|
|
124
|
+
*/
|
|
125
|
+
class SyncStatusComponent {
|
|
126
|
+
#icons = useHermesIcons(SYNC_STATUS_ICONS);
|
|
127
|
+
/** Execução atual ou a última; `null` = nunca sincronizou. */
|
|
128
|
+
run = input(null, ...(ngDevMode ? [{ debugName: "run" }] : /* istanbul ignore next */ []));
|
|
129
|
+
/** Instante atual (epoch ms) para a duração de execução em andamento. */
|
|
130
|
+
now = input(0, ...(ngDevMode ? [{ debugName: "now" }] : /* istanbul ignore next */ []));
|
|
131
|
+
timeZone = input(undefined, ...(ngDevMode ? [{ debugName: "timeZone" }] : /* istanbul ignore next */ []));
|
|
132
|
+
/** Esconde as ações. */
|
|
133
|
+
hideActions = input(false, { ...(ngDevMode ? { debugName: "hideActions" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
134
|
+
syncNow = output();
|
|
135
|
+
cancel = output();
|
|
136
|
+
retry = output();
|
|
137
|
+
#i18n = inject(HermesI18nService);
|
|
138
|
+
/** Sobrescrita parcial dos textos da pasta (o app troca a frase sem mudar de idioma). */
|
|
139
|
+
texts = input(null, ...(ngDevMode ? [{ debugName: "texts" }] : /* istanbul ignore next */ []));
|
|
140
|
+
allTexts = computed(() => ({
|
|
141
|
+
...this.#i18n.pick({ 'pt-BR': SYNC_STATUS_MESSAGES_PT_BR, en: SYNC_STATUS_MESSAGES_EN, es: SYNC_STATUS_MESSAGES_ES }, SYNC_STATUS_MESSAGES_PT_BR),
|
|
142
|
+
...(this.texts() ?? {}),
|
|
143
|
+
}), ...(ngDevMode ? [{ debugName: "allTexts" }] : /* istanbul ignore next */ []));
|
|
144
|
+
text = computed(() => this.allTexts().sync, ...(ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []));
|
|
145
|
+
common = injectIntegrationText();
|
|
146
|
+
running = computed(() => {
|
|
147
|
+
const status = this.run()?.status;
|
|
148
|
+
return status === 'running' || status === 'queued';
|
|
149
|
+
}, ...(ngDevMode ? [{ debugName: "running" }] : /* istanbul ignore next */ []));
|
|
150
|
+
canRetry = computed(() => {
|
|
151
|
+
const status = this.run()?.status;
|
|
152
|
+
return status === 'failed' || status === 'partial';
|
|
153
|
+
}, ...(ngDevMode ? [{ debugName: "canRetry" }] : /* istanbul ignore next */ []));
|
|
154
|
+
statusText = computed(() => {
|
|
155
|
+
const run = this.run();
|
|
156
|
+
return run ? this.text().statuses[run.status] : '';
|
|
157
|
+
}, ...(ngDevMode ? [{ debugName: "statusText" }] : /* istanbul ignore next */ []));
|
|
158
|
+
statusColor = computed(() => syncStatusIntent(this.run()?.status ?? 'queued'), ...(ngDevMode ? [{ debugName: "statusColor" }] : /* istanbul ignore next */ []));
|
|
159
|
+
progress = computed(() => {
|
|
160
|
+
const run = this.run();
|
|
161
|
+
return run ? syncProgress(run) : null;
|
|
162
|
+
}, ...(ngDevMode ? [{ debugName: "progress" }] : /* istanbul ignore next */ []));
|
|
163
|
+
progressHint = computed(() => {
|
|
164
|
+
const run = this.run();
|
|
165
|
+
if (!run || run.processed === undefined)
|
|
166
|
+
return '';
|
|
167
|
+
const locale = this.#i18n.formatLocale();
|
|
168
|
+
const number = new Intl.NumberFormat(locale);
|
|
169
|
+
if (run.total)
|
|
170
|
+
return formatMessage(this.text().progressValue, { processed: number.format(run.processed), total: number.format(run.total) });
|
|
171
|
+
return pluralMessage(this.text().processed, run.processed, locale);
|
|
172
|
+
}, ...(ngDevMode ? [{ debugName: "progressHint" }] : /* istanbul ignore next */ []));
|
|
173
|
+
counters = computed(() => {
|
|
174
|
+
const run = this.run();
|
|
175
|
+
if (!run)
|
|
176
|
+
return [];
|
|
177
|
+
const text = this.text();
|
|
178
|
+
const number = new Intl.NumberFormat(this.#i18n.formatLocale());
|
|
179
|
+
return [
|
|
180
|
+
{ key: 'created', label: text.created, value: run.created },
|
|
181
|
+
{ key: 'updated', label: text.updated, value: run.updated },
|
|
182
|
+
{ key: 'deleted', label: text.deleted, value: run.deleted },
|
|
183
|
+
{ key: 'failed', label: text.failed, value: run.failed },
|
|
184
|
+
]
|
|
185
|
+
.filter((c) => c.value !== undefined)
|
|
186
|
+
.map((c) => ({ ...c, text: number.format(c.value ?? 0) }));
|
|
187
|
+
}, ...(ngDevMode ? [{ debugName: "counters" }] : /* istanbul ignore next */ []));
|
|
188
|
+
details = computed(() => {
|
|
189
|
+
const run = this.run();
|
|
190
|
+
if (!run)
|
|
191
|
+
return [];
|
|
192
|
+
const text = this.text();
|
|
193
|
+
const locale = this.#i18n.formatLocale();
|
|
194
|
+
const out = [
|
|
195
|
+
{ label: text.startedAt, value: formatIntegrationTimestamp(run.startedAt, locale, this.timeZone()) },
|
|
196
|
+
{ label: text.duration, value: formatIntegrationDuration(syncDuration(run, this.now() || run.startedAt), this.common().duration, locale) },
|
|
197
|
+
];
|
|
198
|
+
if (run.trigger)
|
|
199
|
+
out.push({ label: text.trigger, value: run.trigger });
|
|
200
|
+
return out;
|
|
201
|
+
}, ...(ngDevMode ? [{ debugName: "details" }] : /* istanbul ignore next */ []));
|
|
202
|
+
errorsSummary = computed(() => pluralMessage(this.text().errors, this.run()?.errors?.length ?? 0, this.#i18n.formatLocale()), ...(ngDevMode ? [{ debugName: "errorsSummary" }] : /* istanbul ignore next */ []));
|
|
203
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: SyncStatusComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
204
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.24", type: SyncStatusComponent, isStandalone: true, selector: "hm-sync-status", inputs: { run: { classPropertyName: "run", publicName: "run", isSignal: true, isRequired: false, transformFunction: null }, now: { classPropertyName: "now", publicName: "now", isSignal: true, isRequired: false, transformFunction: null }, timeZone: { classPropertyName: "timeZone", publicName: "timeZone", isSignal: true, isRequired: false, transformFunction: null }, hideActions: { classPropertyName: "hideActions", publicName: "hideActions", isSignal: true, isRequired: false, transformFunction: null }, texts: { classPropertyName: "texts", publicName: "texts", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { syncNow: "syncNow", cancel: "cancel", retry: "retry" }, host: { properties: { "attr.aria-busy": "running() ? 'true' : null" }, classAttribute: "hm-sync-status" }, ngImport: i0, template: "@if (run(); as current) {\n <div class=\"hm-sync-status__header\">\n <p class=\"hm-sync-status__status\" role=\"status\">\n <span class=\"hm-visually-hidden\">{{ text().label }}:&ngsp;</span>\n <hm-tag [name]=\"statusText()\" [color]=\"statusColor()\" />\n </p>\n @if (!hideActions()) {\n <div class=\"hm-sync-status__actions\">\n @if (running()) {\n <hm-button size=\"small\" emphasis=\"medium\" icon=\"stop\" (clicked)=\"cancel.emit(current)\">{{ text().cancel }}</hm-button>\n } @else {\n @if (canRetry()) {\n <hm-button size=\"small\" emphasis=\"medium\" icon=\"refresh\" (clicked)=\"retry.emit(current)\">{{ text().retry }}</hm-button>\n }\n <hm-button size=\"small\" icon=\"sync\" (clicked)=\"syncNow.emit()\">{{ text().syncNow }}</hm-button>\n }\n </div>\n }\n </div>\n\n @if (running()) {\n <hm-progress\n class=\"hm-sync-status__progress\"\n [label]=\"text().progress\"\n [value]=\"(progress() ?? 0) * 100\"\n [indeterminate]=\"progress() === null\"\n [showValue]=\"progress() !== null\"\n [hint]=\"progressHint()\"\n />\n } @else if (progressHint()) {\n <p class=\"hm-sync-status__processed\">{{ progressHint() }}</p>\n }\n\n @if (counters().length) {\n <dl class=\"hm-sync-status__counters\">\n @for (counter of counters(); track counter.key) {\n <div class=\"hm-sync-status__counter\" [class.hm-sync-status__counter--failed]=\"counter.key === 'failed' && !!counter.value\">\n <dt>{{ counter.label }}</dt>\n <dd>{{ counter.text }}</dd>\n </div>\n }\n </dl>\n }\n\n <dl class=\"hm-sync-status__details\">\n @for (item of details(); track item.label) {\n <div class=\"hm-sync-status__detail\">\n <dt>{{ item.label }}</dt>\n <dd>{{ item.value }}</dd>\n </div>\n }\n </dl>\n\n @if (current.errors?.length) {\n <details class=\"hm-sync-status__errors\">\n <summary class=\"hm-sync-status__errors-summary\">{{ errorsSummary() }}</summary>\n <ul class=\"hm-sync-status__error-list\">\n @for (error of current.errors; track error.id) {\n <li class=\"hm-sync-status__error\">\n @if (error.record) {\n <span class=\"hm-sync-status__error-record\">{{ error.record }}</span>\n }\n <span class=\"hm-sync-status__error-message\">{{ error.message }}</span>\n @if (error.code) {\n <code class=\"hm-sync-status__error-code\">{{ error.code }}</code>\n }\n </li>\n }\n </ul>\n </details>\n }\n} @else {\n <div class=\"hm-sync-status__header\">\n <p class=\"hm-sync-status__never\">{{ text().never }}</p>\n @if (!hideActions()) {\n <div class=\"hm-sync-status__actions\">\n <hm-button size=\"small\" icon=\"sync\" (clicked)=\"syncNow.emit()\">{{ text().syncNow }}</hm-button>\n </div>\n }\n </div>\n}\n", 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: ProgressComponent, selector: "hm-progress", inputs: ["value", "max", "label", "labelHidden", "showValue", "indeterminate", "intent", "size", "hint", "shape"] }, { kind: "component", type: TagComponent, selector: "hm-tag", inputs: ["name", "color", "compact"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
205
|
+
}
|
|
206
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: SyncStatusComponent, decorators: [{
|
|
207
|
+
type: Component,
|
|
208
|
+
args: [{ selector: 'hm-sync-status', imports: [ButtonComponent, ProgressComponent, TagComponent], changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'hm-sync-status', '[attr.aria-busy]': "running() ? 'true' : null" }, template: "@if (run(); as current) {\n <div class=\"hm-sync-status__header\">\n <p class=\"hm-sync-status__status\" role=\"status\">\n <span class=\"hm-visually-hidden\">{{ text().label }}:&ngsp;</span>\n <hm-tag [name]=\"statusText()\" [color]=\"statusColor()\" />\n </p>\n @if (!hideActions()) {\n <div class=\"hm-sync-status__actions\">\n @if (running()) {\n <hm-button size=\"small\" emphasis=\"medium\" icon=\"stop\" (clicked)=\"cancel.emit(current)\">{{ text().cancel }}</hm-button>\n } @else {\n @if (canRetry()) {\n <hm-button size=\"small\" emphasis=\"medium\" icon=\"refresh\" (clicked)=\"retry.emit(current)\">{{ text().retry }}</hm-button>\n }\n <hm-button size=\"small\" icon=\"sync\" (clicked)=\"syncNow.emit()\">{{ text().syncNow }}</hm-button>\n }\n </div>\n }\n </div>\n\n @if (running()) {\n <hm-progress\n class=\"hm-sync-status__progress\"\n [label]=\"text().progress\"\n [value]=\"(progress() ?? 0) * 100\"\n [indeterminate]=\"progress() === null\"\n [showValue]=\"progress() !== null\"\n [hint]=\"progressHint()\"\n />\n } @else if (progressHint()) {\n <p class=\"hm-sync-status__processed\">{{ progressHint() }}</p>\n }\n\n @if (counters().length) {\n <dl class=\"hm-sync-status__counters\">\n @for (counter of counters(); track counter.key) {\n <div class=\"hm-sync-status__counter\" [class.hm-sync-status__counter--failed]=\"counter.key === 'failed' && !!counter.value\">\n <dt>{{ counter.label }}</dt>\n <dd>{{ counter.text }}</dd>\n </div>\n }\n </dl>\n }\n\n <dl class=\"hm-sync-status__details\">\n @for (item of details(); track item.label) {\n <div class=\"hm-sync-status__detail\">\n <dt>{{ item.label }}</dt>\n <dd>{{ item.value }}</dd>\n </div>\n }\n </dl>\n\n @if (current.errors?.length) {\n <details class=\"hm-sync-status__errors\">\n <summary class=\"hm-sync-status__errors-summary\">{{ errorsSummary() }}</summary>\n <ul class=\"hm-sync-status__error-list\">\n @for (error of current.errors; track error.id) {\n <li class=\"hm-sync-status__error\">\n @if (error.record) {\n <span class=\"hm-sync-status__error-record\">{{ error.record }}</span>\n }\n <span class=\"hm-sync-status__error-message\">{{ error.message }}</span>\n @if (error.code) {\n <code class=\"hm-sync-status__error-code\">{{ error.code }}</code>\n }\n </li>\n }\n </ul>\n </details>\n }\n} @else {\n <div class=\"hm-sync-status__header\">\n <p class=\"hm-sync-status__never\">{{ text().never }}</p>\n @if (!hideActions()) {\n <div class=\"hm-sync-status__actions\">\n <hm-button size=\"small\" icon=\"sync\" (clicked)=\"syncNow.emit()\">{{ text().syncNow }}</hm-button>\n </div>\n }\n </div>\n}\n" }]
|
|
209
|
+
}], propDecorators: { run: [{ type: i0.Input, args: [{ isSignal: true, alias: "run", required: false }] }], now: [{ type: i0.Input, args: [{ isSignal: true, alias: "now", required: false }] }], timeZone: [{ type: i0.Input, args: [{ isSignal: true, alias: "timeZone", required: false }] }], hideActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideActions", required: false }] }], syncNow: [{ type: i0.Output, args: ["syncNow"] }], cancel: [{ type: i0.Output, args: ["cancel"] }], retry: [{ type: i0.Output, args: ["retry"] }], texts: [{ type: i0.Input, args: [{ isSignal: true, alias: "texts", required: false }] }] } });
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* Histórico de sincronizações (`hm-sync-history`): uma tabela de `SyncRun` com estado (texto), início,
|
|
213
|
+
* duração, registros processados, falhas e quem disparou. Rola por dentro em telas estreitas.
|
|
214
|
+
*
|
|
215
|
+
* ```html
|
|
216
|
+
* <hm-sync-history [runs]="execucoes" [now]="agora()" />
|
|
217
|
+
* ```
|
|
218
|
+
*
|
|
219
|
+
* - Registros: `processed` quando vier; senão a soma de criados, atualizados e removidos.
|
|
220
|
+
* - `now` só pesa nas execuções sem `finishedAt` (em andamento). `timeZone` fixa o fuso.
|
|
221
|
+
*/
|
|
222
|
+
class SyncHistoryComponent {
|
|
223
|
+
#icons = useHermesIcons(SYNC_STATUS_ICONS);
|
|
224
|
+
runs = input([], ...(ngDevMode ? [{ debugName: "runs" }] : /* istanbul ignore next */ []));
|
|
225
|
+
now = input(0, ...(ngDevMode ? [{ debugName: "now" }] : /* istanbul ignore next */ []));
|
|
226
|
+
timeZone = input(undefined, ...(ngDevMode ? [{ debugName: "timeZone" }] : /* istanbul ignore next */ []));
|
|
227
|
+
#i18n = inject(HermesI18nService);
|
|
228
|
+
/** Sobrescrita parcial dos textos da pasta (o app troca a frase sem mudar de idioma). */
|
|
229
|
+
texts = input(null, ...(ngDevMode ? [{ debugName: "texts" }] : /* istanbul ignore next */ []));
|
|
230
|
+
allTexts = computed(() => ({
|
|
231
|
+
...this.#i18n.pick({ 'pt-BR': SYNC_STATUS_MESSAGES_PT_BR, en: SYNC_STATUS_MESSAGES_EN, es: SYNC_STATUS_MESSAGES_ES }, SYNC_STATUS_MESSAGES_PT_BR),
|
|
232
|
+
...(this.texts() ?? {}),
|
|
233
|
+
}), ...(ngDevMode ? [{ debugName: "allTexts" }] : /* istanbul ignore next */ []));
|
|
234
|
+
text = computed(() => this.allTexts().sync, ...(ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []));
|
|
235
|
+
common = injectIntegrationText();
|
|
236
|
+
rows = computed(() => {
|
|
237
|
+
const text = this.text();
|
|
238
|
+
const locale = this.#i18n.formatLocale();
|
|
239
|
+
const number = new Intl.NumberFormat(locale);
|
|
240
|
+
return this.runs().map((run) => {
|
|
241
|
+
const records = run.processed ?? (run.created ?? 0) + (run.updated ?? 0) + (run.deleted ?? 0);
|
|
242
|
+
return {
|
|
243
|
+
run,
|
|
244
|
+
status: text.statuses[run.status],
|
|
245
|
+
color: syncStatusIntent(run.status),
|
|
246
|
+
started: formatIntegrationTimestamp(run.startedAt, locale, this.timeZone()),
|
|
247
|
+
duration: formatIntegrationDuration(syncDuration(run, this.now() || run.startedAt), this.common().duration, locale),
|
|
248
|
+
records: number.format(records),
|
|
249
|
+
failed: number.format(run.failed ?? 0),
|
|
250
|
+
};
|
|
251
|
+
});
|
|
252
|
+
}, ...(ngDevMode ? [{ debugName: "rows" }] : /* istanbul ignore next */ []));
|
|
253
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: SyncHistoryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
254
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.24", type: SyncHistoryComponent, isStandalone: true, selector: "hm-sync-history", inputs: { runs: { classPropertyName: "runs", publicName: "runs", isSignal: true, isRequired: false, transformFunction: null }, now: { classPropertyName: "now", publicName: "now", isSignal: true, isRequired: false, transformFunction: null }, timeZone: { classPropertyName: "timeZone", publicName: "timeZone", isSignal: true, isRequired: false, transformFunction: null }, texts: { classPropertyName: "texts", publicName: "texts", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "hm-sync-history" }, ngImport: i0, template: "@if (rows().length) {\n <div class=\"hm-sync-history__scroll\" tabindex=\"0\" role=\"group\" [attr.aria-label]=\"text().historyLabel\">\n <table class=\"hm-table hm-sync-history__table\">\n <caption class=\"hm-visually-hidden\">{{ text().historyLabel }}</caption>\n <thead>\n <tr>\n <th scope=\"col\">{{ text().startedAt }}</th>\n <th scope=\"col\">{{ text().label }}</th>\n <th scope=\"col\">{{ text().duration }}</th>\n <th scope=\"col\">{{ text().records }}</th>\n <th scope=\"col\">{{ text().failed }}</th>\n <th scope=\"col\">{{ text().trigger }}</th>\n </tr>\n </thead>\n <tbody>\n @for (row of rows(); track row.run.id) {\n <tr>\n <th scope=\"row\" class=\"hm-sync-history__when\">{{ row.started }}</th>\n <td><hm-tag [name]=\"row.status\" [color]=\"row.color\" /></td>\n <td class=\"hm-sync-history__num\">{{ row.duration }}</td>\n <td class=\"hm-sync-history__num\">{{ row.records }}</td>\n <td class=\"hm-sync-history__num\" [class.hm-sync-history__num--failed]=\"!!row.run.failed\">{{ row.failed }}</td>\n <td>{{ row.run.trigger ?? '' }}</td>\n </tr>\n }\n </tbody>\n </table>\n </div>\n} @else {\n <p class=\"hm-sync-history__empty\">{{ text().historyEmpty }}</p>\n}\n", dependencies: [{ kind: "component", type: TagComponent, selector: "hm-tag", inputs: ["name", "color", "compact"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
255
|
+
}
|
|
256
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: SyncHistoryComponent, decorators: [{
|
|
257
|
+
type: Component,
|
|
258
|
+
args: [{ selector: 'hm-sync-history', imports: [TagComponent], changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'hm-sync-history' }, template: "@if (rows().length) {\n <div class=\"hm-sync-history__scroll\" tabindex=\"0\" role=\"group\" [attr.aria-label]=\"text().historyLabel\">\n <table class=\"hm-table hm-sync-history__table\">\n <caption class=\"hm-visually-hidden\">{{ text().historyLabel }}</caption>\n <thead>\n <tr>\n <th scope=\"col\">{{ text().startedAt }}</th>\n <th scope=\"col\">{{ text().label }}</th>\n <th scope=\"col\">{{ text().duration }}</th>\n <th scope=\"col\">{{ text().records }}</th>\n <th scope=\"col\">{{ text().failed }}</th>\n <th scope=\"col\">{{ text().trigger }}</th>\n </tr>\n </thead>\n <tbody>\n @for (row of rows(); track row.run.id) {\n <tr>\n <th scope=\"row\" class=\"hm-sync-history__when\">{{ row.started }}</th>\n <td><hm-tag [name]=\"row.status\" [color]=\"row.color\" /></td>\n <td class=\"hm-sync-history__num\">{{ row.duration }}</td>\n <td class=\"hm-sync-history__num\">{{ row.records }}</td>\n <td class=\"hm-sync-history__num\" [class.hm-sync-history__num--failed]=\"!!row.run.failed\">{{ row.failed }}</td>\n <td>{{ row.run.trigger ?? '' }}</td>\n </tr>\n }\n </tbody>\n </table>\n </div>\n} @else {\n <p class=\"hm-sync-history__empty\">{{ text().historyEmpty }}</p>\n}\n" }]
|
|
259
|
+
}], propDecorators: { runs: [{ type: i0.Input, args: [{ isSignal: true, alias: "runs", required: false }] }], now: [{ type: i0.Input, args: [{ isSignal: true, alias: "now", required: false }] }], timeZone: [{ type: i0.Input, args: [{ isSignal: true, alias: "timeZone", required: false }] }], texts: [{ type: i0.Input, args: [{ isSignal: true, alias: "texts", required: false }] }] } });
|
|
260
|
+
|
|
261
|
+
// Ponto de import `@trismegisto/angular/sync-status`: estado e histórico de sincronização. Ao criar arquivo
|
|
262
|
+
// público novo na pasta, acrescente a linha.
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* Generated bundle index. Do not edit.
|
|
266
|
+
*/
|
|
267
|
+
|
|
268
|
+
export { SYNC_STATUS_MESSAGES_EN, SYNC_STATUS_MESSAGES_ES, SYNC_STATUS_MESSAGES_PT_BR, SyncHistoryComponent, SyncStatusComponent };
|
|
269
|
+
//# sourceMappingURL=trismegisto-angular-sync-status.mjs.map
|