@trismegisto/angular 3.3.3 → 3.3.5
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-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.mjs +229 -44
- package/fesm2022/trismegisto-angular-workspace.mjs.map +1 -1
- package/fesm2022/trismegisto-angular.mjs +116 -6
- 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-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.d.ts +79 -7
- package/types/trismegisto-angular-workspace.d.ts.map +1 -1
- package/types/trismegisto-angular.d.ts +119 -9
- package/types/trismegisto-angular.d.ts.map +1 -1
|
@@ -0,0 +1,823 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { input, booleanAttribute, output, inject, computed, ChangeDetectionStrategy, Component, model, signal, effect, untracked } from '@angular/core';
|
|
3
|
+
import { summarizeAccess, pluralMessage, accessRuleIssues, formatMessage, updateAccessRule, removeAccessRule, newAccessRuleId } from '@trismegisto/primitives';
|
|
4
|
+
import { AvatarGroupComponent } from '@trismegisto/angular/avatar-group';
|
|
5
|
+
import { ButtonComponent } from '@trismegisto/angular/button';
|
|
6
|
+
import { HermesI18nService, HERMES_MESSAGES } from '@trismegisto/angular/i18n';
|
|
7
|
+
import { ICON_CHECK, ICON_CHECK_CIRCLE, ICON_EXCLAMATION_TRIANGLE, ICON_GLOBE_EARTH, ICON_HOURGLASS, ICON_INFO_CIRCLE, ICON_KEY, ICON_LOCK, ICON_ORGANIZATION, ICON_PLUS, ICON_TIMES, ICON_TIMES_CIRCLE, ICON_TRASH, ICON_USER, ICON_USER_GROUP, ICON_USER_PLUS, useHermesIcons, IconComponent } from '@trismegisto/angular/icon';
|
|
8
|
+
import { IconButtonComponent } from '@trismegisto/angular/icon-button';
|
|
9
|
+
import { SelectComponent } from '@trismegisto/angular/select';
|
|
10
|
+
import { AccountAvatarComponent } from '@trismegisto/angular/account-avatar';
|
|
11
|
+
import { RadioComponent } from '@trismegisto/angular/radio';
|
|
12
|
+
import { TextareaComponent } from '@trismegisto/angular/textarea';
|
|
13
|
+
|
|
14
|
+
const ACCESS_CONTROL_MESSAGES_PT_BR = {
|
|
15
|
+
kinds: {
|
|
16
|
+
user: "Pessoa",
|
|
17
|
+
team: "Equipe",
|
|
18
|
+
organization: "Organização",
|
|
19
|
+
department: "Departamento",
|
|
20
|
+
role: "Papel",
|
|
21
|
+
permission: "Permissão",
|
|
22
|
+
group: "Grupo",
|
|
23
|
+
},
|
|
24
|
+
accessSummary: {
|
|
25
|
+
label: "Resumo de acesso",
|
|
26
|
+
visibility: {
|
|
27
|
+
private: "Privado",
|
|
28
|
+
restricted: "Restrito",
|
|
29
|
+
organization: "Toda a organização",
|
|
30
|
+
public: "Público",
|
|
31
|
+
},
|
|
32
|
+
visibilityHint: {
|
|
33
|
+
private: "Só as pessoas adicionadas têm acesso.",
|
|
34
|
+
restricted: "Só as pessoas e os grupos adicionados têm acesso.",
|
|
35
|
+
organization: "Qualquer pessoa da organização com o link tem acesso.",
|
|
36
|
+
public: "Qualquer pessoa com o link tem acesso, sem entrar.",
|
|
37
|
+
},
|
|
38
|
+
people: {
|
|
39
|
+
zero: "Ninguém com acesso",
|
|
40
|
+
one: "{count} pessoa com acesso",
|
|
41
|
+
other: "{count} pessoas com acesso",
|
|
42
|
+
},
|
|
43
|
+
pending: {
|
|
44
|
+
one: "{count} convite pendente",
|
|
45
|
+
other: "{count} convites pendentes",
|
|
46
|
+
},
|
|
47
|
+
manage: "Gerenciar acesso",
|
|
48
|
+
},
|
|
49
|
+
policyEditor: {
|
|
50
|
+
label: "Política de acesso",
|
|
51
|
+
rule: "Regra {index}",
|
|
52
|
+
subject: "Quem",
|
|
53
|
+
permission: "Permissão",
|
|
54
|
+
effect: "Efeito",
|
|
55
|
+
allow: "Permitir",
|
|
56
|
+
deny: "Bloquear",
|
|
57
|
+
choose: "Escolher…",
|
|
58
|
+
add: "Adicionar regra",
|
|
59
|
+
remove: "Remover regra {index}",
|
|
60
|
+
empty: "Nenhuma regra ainda.",
|
|
61
|
+
denyWins: "Quando duas regras se aplicam à mesma pessoa, o bloqueio vence.",
|
|
62
|
+
issues: {
|
|
63
|
+
duplicate: "Regra repetida.",
|
|
64
|
+
conflict: "Conflita com outra regra: o bloqueio vence.",
|
|
65
|
+
incomplete: "Escolha quem e a permissão.",
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
accessRequest: {
|
|
69
|
+
role: "Acesso pedido",
|
|
70
|
+
reason: "Motivo",
|
|
71
|
+
reasonHint: "Ajuda quem aprova a decidir.",
|
|
72
|
+
submit: "Pedir acesso",
|
|
73
|
+
sentTitle: "Pedido enviado",
|
|
74
|
+
sentBody: "Você será avisado quando houver resposta.",
|
|
75
|
+
status: {
|
|
76
|
+
pending: "Aguardando aprovação",
|
|
77
|
+
approved: "Aprovado",
|
|
78
|
+
denied: "Recusado",
|
|
79
|
+
},
|
|
80
|
+
requested: "pediu acesso como {role}",
|
|
81
|
+
noReason: "Sem motivo informado.",
|
|
82
|
+
approve: "Aprovar",
|
|
83
|
+
deny: "Recusar",
|
|
84
|
+
denyReason: "Motivo da recusa",
|
|
85
|
+
confirmDeny: "Confirmar recusa",
|
|
86
|
+
cancel: "Cancelar",
|
|
87
|
+
},
|
|
88
|
+
};
|
|
89
|
+
const ACCESS_CONTROL_MESSAGES_EN = {
|
|
90
|
+
kinds: {
|
|
91
|
+
user: "Person",
|
|
92
|
+
team: "Team",
|
|
93
|
+
organization: "Organization",
|
|
94
|
+
department: "Department",
|
|
95
|
+
role: "Role",
|
|
96
|
+
permission: "Permission",
|
|
97
|
+
group: "Group",
|
|
98
|
+
},
|
|
99
|
+
accessSummary: {
|
|
100
|
+
label: "Access summary",
|
|
101
|
+
visibility: {
|
|
102
|
+
private: "Private",
|
|
103
|
+
restricted: "Restricted",
|
|
104
|
+
organization: "Whole organization",
|
|
105
|
+
public: "Public",
|
|
106
|
+
},
|
|
107
|
+
visibilityHint: {
|
|
108
|
+
private: "Only the people added have access.",
|
|
109
|
+
restricted: "Only the people and groups added have access.",
|
|
110
|
+
organization: "Anyone in the organization with the link has access.",
|
|
111
|
+
public: "Anyone with the link has access, without signing in.",
|
|
112
|
+
},
|
|
113
|
+
people: {
|
|
114
|
+
zero: "Nobody has access",
|
|
115
|
+
one: "{count} person has access",
|
|
116
|
+
other: "{count} people have access",
|
|
117
|
+
},
|
|
118
|
+
pending: {
|
|
119
|
+
one: "{count} pending invitation",
|
|
120
|
+
other: "{count} pending invitations",
|
|
121
|
+
},
|
|
122
|
+
manage: "Manage access",
|
|
123
|
+
},
|
|
124
|
+
policyEditor: {
|
|
125
|
+
label: "Access policy",
|
|
126
|
+
rule: "Rule {index}",
|
|
127
|
+
subject: "Who",
|
|
128
|
+
permission: "Permission",
|
|
129
|
+
effect: "Effect",
|
|
130
|
+
allow: "Allow",
|
|
131
|
+
deny: "Deny",
|
|
132
|
+
choose: "Choose…",
|
|
133
|
+
add: "Add rule",
|
|
134
|
+
remove: "Remove rule {index}",
|
|
135
|
+
empty: "No rules yet.",
|
|
136
|
+
denyWins: "When two rules apply to the same person, deny wins.",
|
|
137
|
+
issues: {
|
|
138
|
+
duplicate: "Repeated rule.",
|
|
139
|
+
conflict: "Conflicts with another rule: deny wins.",
|
|
140
|
+
incomplete: "Choose who and the permission.",
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
accessRequest: {
|
|
144
|
+
role: "Access requested",
|
|
145
|
+
reason: "Reason",
|
|
146
|
+
reasonHint: "Helps the approver decide.",
|
|
147
|
+
submit: "Request access",
|
|
148
|
+
sentTitle: "Request sent",
|
|
149
|
+
sentBody: "You will be notified when there is an answer.",
|
|
150
|
+
status: {
|
|
151
|
+
pending: "Awaiting approval",
|
|
152
|
+
approved: "Approved",
|
|
153
|
+
denied: "Denied",
|
|
154
|
+
},
|
|
155
|
+
requested: "requested access as {role}",
|
|
156
|
+
noReason: "No reason given.",
|
|
157
|
+
approve: "Approve",
|
|
158
|
+
deny: "Deny",
|
|
159
|
+
denyReason: "Reason for denial",
|
|
160
|
+
confirmDeny: "Confirm denial",
|
|
161
|
+
cancel: "Cancel",
|
|
162
|
+
},
|
|
163
|
+
};
|
|
164
|
+
const ACCESS_CONTROL_MESSAGES_ES = {
|
|
165
|
+
kinds: {
|
|
166
|
+
user: "Persona",
|
|
167
|
+
team: "Equipo",
|
|
168
|
+
organization: "Organización",
|
|
169
|
+
department: "Departamento",
|
|
170
|
+
role: "Rol",
|
|
171
|
+
permission: "Permiso",
|
|
172
|
+
group: "Grupo",
|
|
173
|
+
},
|
|
174
|
+
accessSummary: {
|
|
175
|
+
label: "Resumen de acceso",
|
|
176
|
+
visibility: {
|
|
177
|
+
private: "Privado",
|
|
178
|
+
restricted: "Restringido",
|
|
179
|
+
organization: "Toda la organización",
|
|
180
|
+
public: "Público",
|
|
181
|
+
},
|
|
182
|
+
visibilityHint: {
|
|
183
|
+
private: "Solo las personas añadidas tienen acceso.",
|
|
184
|
+
restricted: "Solo las personas y los grupos añadidos tienen acceso.",
|
|
185
|
+
organization: "Cualquier persona de la organización con el enlace tiene acceso.",
|
|
186
|
+
public: "Cualquier persona con el enlace tiene acceso, sin iniciar sesión.",
|
|
187
|
+
},
|
|
188
|
+
people: {
|
|
189
|
+
zero: "Nadie tiene acceso",
|
|
190
|
+
one: "{count} persona con acceso",
|
|
191
|
+
other: "{count} personas con acceso",
|
|
192
|
+
},
|
|
193
|
+
pending: {
|
|
194
|
+
one: "{count} invitación pendiente",
|
|
195
|
+
other: "{count} invitaciones pendientes",
|
|
196
|
+
},
|
|
197
|
+
manage: "Gestionar acceso",
|
|
198
|
+
},
|
|
199
|
+
policyEditor: {
|
|
200
|
+
label: "Política de acceso",
|
|
201
|
+
rule: "Regla {index}",
|
|
202
|
+
subject: "Quién",
|
|
203
|
+
permission: "Permiso",
|
|
204
|
+
effect: "Efecto",
|
|
205
|
+
allow: "Permitir",
|
|
206
|
+
deny: "Bloquear",
|
|
207
|
+
choose: "Elegir…",
|
|
208
|
+
add: "Añadir regla",
|
|
209
|
+
remove: "Quitar la regla {index}",
|
|
210
|
+
empty: "Todavía no hay reglas.",
|
|
211
|
+
denyWins: "Cuando dos reglas se aplican a la misma persona, gana el bloqueo.",
|
|
212
|
+
issues: {
|
|
213
|
+
duplicate: "Regla repetida.",
|
|
214
|
+
conflict: "Entra en conflicto con otra regla: gana el bloqueo.",
|
|
215
|
+
incomplete: "Elija quién y el permiso.",
|
|
216
|
+
},
|
|
217
|
+
},
|
|
218
|
+
accessRequest: {
|
|
219
|
+
role: "Acceso solicitado",
|
|
220
|
+
reason: "Motivo",
|
|
221
|
+
reasonHint: "Ayuda a quien aprueba a decidir.",
|
|
222
|
+
submit: "Solicitar acceso",
|
|
223
|
+
sentTitle: "Solicitud enviada",
|
|
224
|
+
sentBody: "Recibirá un aviso cuando haya respuesta.",
|
|
225
|
+
status: {
|
|
226
|
+
pending: "Pendiente de aprobación",
|
|
227
|
+
approved: "Aprobada",
|
|
228
|
+
denied: "Rechazada",
|
|
229
|
+
},
|
|
230
|
+
requested: "solicitó acceso como {role}",
|
|
231
|
+
noReason: "Sin motivo indicado.",
|
|
232
|
+
approve: "Aprobar",
|
|
233
|
+
deny: "Rechazar",
|
|
234
|
+
denyReason: "Motivo del rechazo",
|
|
235
|
+
confirmDeny: "Confirmar rechazo",
|
|
236
|
+
cancel: "Cancelar",
|
|
237
|
+
},
|
|
238
|
+
};
|
|
239
|
+
/** Catálogos por idioma, para `HermesI18nService.pick`. */
|
|
240
|
+
const ACCESS_CONTROL_MESSAGES = {
|
|
241
|
+
'pt-BR': ACCESS_CONTROL_MESSAGES_PT_BR,
|
|
242
|
+
en: ACCESS_CONTROL_MESSAGES_EN,
|
|
243
|
+
es: ACCESS_CONTROL_MESSAGES_ES,
|
|
244
|
+
};
|
|
245
|
+
|
|
246
|
+
const ACCESS_CONTROL_ICONS = [ICON_CHECK, ICON_CHECK_CIRCLE, ICON_EXCLAMATION_TRIANGLE, ICON_GLOBE_EARTH, ICON_HOURGLASS, ICON_INFO_CIRCLE, ICON_KEY, ICON_LOCK, ICON_ORGANIZATION, ICON_PLUS, ICON_TIMES, ICON_TIMES_CIRCLE, ICON_TRASH, ICON_USER, ICON_USER_GROUP, ICON_USER_PLUS];
|
|
247
|
+
|
|
248
|
+
const VISIBILITY_ICONS = {
|
|
249
|
+
private: 'lock',
|
|
250
|
+
restricted: 'user-group',
|
|
251
|
+
organization: 'organization',
|
|
252
|
+
public: 'globe-earth',
|
|
253
|
+
};
|
|
254
|
+
/**
|
|
255
|
+
* Resumo de quem tem acesso a um recurso: alcance (privado, restrito, organização, público), quantas
|
|
256
|
+
* pessoas, os primeiros rostos, a contagem por papel e convites pendentes — com o atalho "Gerenciar acesso".
|
|
257
|
+
*
|
|
258
|
+
* ```html
|
|
259
|
+
* <hm-access-summary visibility="restricted" [members]="members" [roles]="roles" manageable (manage)="openSharing()" />
|
|
260
|
+
* ```
|
|
261
|
+
*
|
|
262
|
+
* - `total` quando `members` traz só os primeiros (resumo vindo do servidor).
|
|
263
|
+
* - Só apresentação: `manage` pede a tela de compartilhamento; o app abre.
|
|
264
|
+
*/
|
|
265
|
+
class AccessSummaryComponent {
|
|
266
|
+
#icons = useHermesIcons(ACCESS_CONTROL_ICONS);
|
|
267
|
+
visibility = input('private', ...(ngDevMode ? [{ debugName: "visibility" }] : /* istanbul ignore next */ []));
|
|
268
|
+
/** Quem tem acesso (os primeiros, quando `total` vem do servidor). */
|
|
269
|
+
members = input([], ...(ngDevMode ? [{ debugName: "members" }] : /* istanbul ignore next */ []));
|
|
270
|
+
/** Papéis, para a contagem por papel. */
|
|
271
|
+
roles = input([], ...(ngDevMode ? [{ debugName: "roles" }] : /* istanbul ignore next */ []));
|
|
272
|
+
/** Total de pessoas com acesso; `null` = o tamanho de `members`. */
|
|
273
|
+
total = input(null, ...(ngDevMode ? [{ debugName: "total" }] : /* istanbul ignore next */ []));
|
|
274
|
+
maxAvatars = input(5, ...(ngDevMode ? [{ debugName: "maxAvatars" }] : /* istanbul ignore next */ []));
|
|
275
|
+
/** Mostra o botão "Gerenciar acesso" (`manage`). */
|
|
276
|
+
manageable = input(false, { ...(ngDevMode ? { debugName: "manageable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
277
|
+
manage = output();
|
|
278
|
+
#i18n = inject(HermesI18nService);
|
|
279
|
+
/** Sobrescrita parcial dos textos da peça (padrão: o catálogo do idioma ativo). */
|
|
280
|
+
texts = input({}, ...(ngDevMode ? [{ debugName: "texts" }] : /* istanbul ignore next */ []));
|
|
281
|
+
t = computed(() => ({ ...this.#i18n.pick(ACCESS_CONTROL_MESSAGES, ACCESS_CONTROL_MESSAGES_PT_BR), ...this.texts() }), ...(ngDevMode ? [{ debugName: "t" }] : /* istanbul ignore next */ []));
|
|
282
|
+
text = computed(() => this.t().accessSummary, ...(ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []));
|
|
283
|
+
visibilityIcon = computed(() => VISIBILITY_ICONS[this.visibility()], ...(ngDevMode ? [{ debugName: "visibilityIcon" }] : /* istanbul ignore next */ []));
|
|
284
|
+
summary = computed(() => summarizeAccess(this.members(), this.roles()), ...(ngDevMode ? [{ debugName: "summary" }] : /* istanbul ignore next */ []));
|
|
285
|
+
byRole = computed(() => this.summary().byRole.map((entry) => ({ ...entry, name: this.roles().find((r) => r.id === entry.role)?.name ?? entry.role })), ...(ngDevMode ? [{ debugName: "byRole" }] : /* istanbul ignore next */ []));
|
|
286
|
+
peopleText = computed(() => pluralMessage(this.text().people, this.total() ?? this.summary().total, this.#i18n.formatLocale()), ...(ngDevMode ? [{ debugName: "peopleText" }] : /* istanbul ignore next */ []));
|
|
287
|
+
pendingText = computed(() => pluralMessage(this.text().pending, this.summary().pending, this.#i18n.formatLocale()), ...(ngDevMode ? [{ debugName: "pendingText" }] : /* istanbul ignore next */ []));
|
|
288
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: AccessSummaryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
289
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.24", type: AccessSummaryComponent, isStandalone: true, selector: "hm-access-summary", inputs: { visibility: { classPropertyName: "visibility", publicName: "visibility", isSignal: true, isRequired: false, transformFunction: null }, members: { classPropertyName: "members", publicName: "members", isSignal: true, isRequired: false, transformFunction: null }, roles: { classPropertyName: "roles", publicName: "roles", isSignal: true, isRequired: false, transformFunction: null }, total: { classPropertyName: "total", publicName: "total", isSignal: true, isRequired: false, transformFunction: null }, maxAvatars: { classPropertyName: "maxAvatars", publicName: "maxAvatars", isSignal: true, isRequired: false, transformFunction: null }, manageable: { classPropertyName: "manageable", publicName: "manageable", isSignal: true, isRequired: false, transformFunction: null }, texts: { classPropertyName: "texts", publicName: "texts", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { manage: "manage" }, host: { classAttribute: "hm-access-summary" }, ngImport: i0, template: `
|
|
290
|
+
<div class="hm-access-summary__scope">
|
|
291
|
+
<span class="hm-access-summary__scope-icon"><hm-icon [shape]="visibilityIcon()" /></span>
|
|
292
|
+
<div class="hm-access-summary__scope-text">
|
|
293
|
+
<span class="hm-access-summary__visibility">{{ text().visibility[visibility()] }}</span>
|
|
294
|
+
<span class="hm-access-summary__hint">{{ text().visibilityHint[visibility()] }}</span>
|
|
295
|
+
</div>
|
|
296
|
+
</div>
|
|
297
|
+
<div class="hm-access-summary__people">
|
|
298
|
+
@if (members().length) {
|
|
299
|
+
<hm-avatar-group size="small" [people]="members()" [max]="maxAvatars()" [total]="total()" [label]="peopleText()" />
|
|
300
|
+
}
|
|
301
|
+
<span class="hm-access-summary__count">{{ peopleText() }}</span>
|
|
302
|
+
</div>
|
|
303
|
+
@if (byRole().length || summary().pending) {
|
|
304
|
+
<ul class="hm-access-summary__roles" role="list">
|
|
305
|
+
@for (entry of byRole(); track entry.role) {
|
|
306
|
+
<li class="hm-access-summary__role"><span class="hm-access-summary__role-count">{{ entry.count }}</span> {{ entry.name }}</li>
|
|
307
|
+
}
|
|
308
|
+
@if (summary().pending) {
|
|
309
|
+
<li class="hm-access-summary__role hm-access-summary__role--pending">{{ pendingText() }}</li>
|
|
310
|
+
}
|
|
311
|
+
</ul>
|
|
312
|
+
}
|
|
313
|
+
@if (manageable()) {
|
|
314
|
+
<hm-button class="hm-access-summary__manage" emphasis="medium" size="small" icon="user-plus" (clicked)="manage.emit()">{{ text().manage }}</hm-button>
|
|
315
|
+
}
|
|
316
|
+
`, isInline: true, dependencies: [{ kind: "component", type: AvatarGroupComponent, selector: "hm-avatar-group", inputs: ["people", "max", "size", "label", "total"] }, { 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: IconComponent, selector: "hm-icon", inputs: ["shape", "direction", "size", "solid", "badge", "status", "flip", "inverse", "label"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
317
|
+
}
|
|
318
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: AccessSummaryComponent, decorators: [{
|
|
319
|
+
type: Component,
|
|
320
|
+
args: [{
|
|
321
|
+
selector: 'hm-access-summary',
|
|
322
|
+
imports: [AvatarGroupComponent, ButtonComponent, IconComponent],
|
|
323
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
324
|
+
host: { class: 'hm-access-summary' },
|
|
325
|
+
template: `
|
|
326
|
+
<div class="hm-access-summary__scope">
|
|
327
|
+
<span class="hm-access-summary__scope-icon"><hm-icon [shape]="visibilityIcon()" /></span>
|
|
328
|
+
<div class="hm-access-summary__scope-text">
|
|
329
|
+
<span class="hm-access-summary__visibility">{{ text().visibility[visibility()] }}</span>
|
|
330
|
+
<span class="hm-access-summary__hint">{{ text().visibilityHint[visibility()] }}</span>
|
|
331
|
+
</div>
|
|
332
|
+
</div>
|
|
333
|
+
<div class="hm-access-summary__people">
|
|
334
|
+
@if (members().length) {
|
|
335
|
+
<hm-avatar-group size="small" [people]="members()" [max]="maxAvatars()" [total]="total()" [label]="peopleText()" />
|
|
336
|
+
}
|
|
337
|
+
<span class="hm-access-summary__count">{{ peopleText() }}</span>
|
|
338
|
+
</div>
|
|
339
|
+
@if (byRole().length || summary().pending) {
|
|
340
|
+
<ul class="hm-access-summary__roles" role="list">
|
|
341
|
+
@for (entry of byRole(); track entry.role) {
|
|
342
|
+
<li class="hm-access-summary__role"><span class="hm-access-summary__role-count">{{ entry.count }}</span> {{ entry.name }}</li>
|
|
343
|
+
}
|
|
344
|
+
@if (summary().pending) {
|
|
345
|
+
<li class="hm-access-summary__role hm-access-summary__role--pending">{{ pendingText() }}</li>
|
|
346
|
+
}
|
|
347
|
+
</ul>
|
|
348
|
+
}
|
|
349
|
+
@if (manageable()) {
|
|
350
|
+
<hm-button class="hm-access-summary__manage" emphasis="medium" size="small" icon="user-plus" (clicked)="manage.emit()">{{ text().manage }}</hm-button>
|
|
351
|
+
}
|
|
352
|
+
`,
|
|
353
|
+
}]
|
|
354
|
+
}], propDecorators: { visibility: [{ type: i0.Input, args: [{ isSignal: true, alias: "visibility", required: false }] }], members: [{ type: i0.Input, args: [{ isSignal: true, alias: "members", required: false }] }], roles: [{ type: i0.Input, args: [{ isSignal: true, alias: "roles", required: false }] }], total: [{ type: i0.Input, args: [{ isSignal: true, alias: "total", required: false }] }], maxAvatars: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxAvatars", required: false }] }], manageable: [{ type: i0.Input, args: [{ isSignal: true, alias: "manageable", required: false }] }], manage: [{ type: i0.Output, args: ["manage"] }], texts: [{ type: i0.Input, args: [{ isSignal: true, alias: "texts", required: false }] }] } });
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* Editor de política de acesso: uma lista de regras "quem · permissão · permitir/bloquear", com adicionar e
|
|
358
|
+
* remover e o aviso de regra repetida, conflitante ou incompleta.
|
|
359
|
+
*
|
|
360
|
+
* ```html
|
|
361
|
+
* <hm-access-policy-editor [subjects]="peopleAndGroups" [permissions]="permissions" [(rules)]="rules" />
|
|
362
|
+
* ```
|
|
363
|
+
*
|
|
364
|
+
* - `rules` é um `model`: cada mudança devolve a lista nova; validar no servidor e salvar é com o app.
|
|
365
|
+
* - Regra de avaliação mostrada na tela e aplicada por `resolveAccess` (`@trismegisto/primitives`): bloqueio vence.
|
|
366
|
+
* - Cada regra é um grupo nomeado ("Regra 2") com três campos rotulados; o aviso de problema fica ligado à regra.
|
|
367
|
+
* - `subjects` mistura pessoas, equipes e grupos (o `kind` aparece no nome da opção quando há mais de um tipo).
|
|
368
|
+
*/
|
|
369
|
+
class AccessPolicyEditorComponent {
|
|
370
|
+
#icons = useHermesIcons(ACCESS_CONTROL_ICONS);
|
|
371
|
+
rules = model([], ...(ngDevMode ? [{ debugName: "rules" }] : /* istanbul ignore next */ []));
|
|
372
|
+
/** Quem pode aparecer numa regra (pessoas, equipes, grupos, papéis). */
|
|
373
|
+
subjects = input.required(...(ngDevMode ? [{ debugName: "subjects" }] : /* istanbul ignore next */ []));
|
|
374
|
+
permissions = input.required(...(ngDevMode ? [{ debugName: "permissions" }] : /* istanbul ignore next */ []));
|
|
375
|
+
readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
376
|
+
/** Efeito da regra nova. */
|
|
377
|
+
defaultEffect = input('allow', ...(ngDevMode ? [{ debugName: "defaultEffect" }] : /* istanbul ignore next */ []));
|
|
378
|
+
/** Nome da lista de regras. Vazio = "Política de acesso". */
|
|
379
|
+
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
380
|
+
#i18n = inject(HermesI18nService);
|
|
381
|
+
/** Sobrescrita parcial dos textos da peça (padrão: o catálogo do idioma ativo). */
|
|
382
|
+
texts = input({}, ...(ngDevMode ? [{ debugName: "texts" }] : /* istanbul ignore next */ []));
|
|
383
|
+
t = computed(() => ({ ...this.#i18n.pick(ACCESS_CONTROL_MESSAGES, ACCESS_CONTROL_MESSAGES_PT_BR), ...this.texts() }), ...(ngDevMode ? [{ debugName: "t" }] : /* istanbul ignore next */ []));
|
|
384
|
+
text = computed(() => this.t().policyEditor, ...(ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []));
|
|
385
|
+
issues = computed(() => accessRuleIssues(this.rules()), ...(ngDevMode ? [{ debugName: "issues" }] : /* istanbul ignore next */ []));
|
|
386
|
+
mixedKinds = computed(() => new Set(this.subjects().map((s) => s.kind ?? 'user')).size > 1, ...(ngDevMode ? [{ debugName: "mixedKinds" }] : /* istanbul ignore next */ []));
|
|
387
|
+
issueOf(rule) {
|
|
388
|
+
return this.issues().get(rule.id) ?? null;
|
|
389
|
+
}
|
|
390
|
+
subjectLabel(subject) {
|
|
391
|
+
return this.mixedKinds() ? `${subject.name} · ${this.t().kinds[subject.kind ?? 'user']}` : subject.name;
|
|
392
|
+
}
|
|
393
|
+
ruleLabel(index) {
|
|
394
|
+
return formatMessage(this.text().rule, { index: index + 1 });
|
|
395
|
+
}
|
|
396
|
+
removeLabel(index) {
|
|
397
|
+
return formatMessage(this.text().remove, { index: index + 1 });
|
|
398
|
+
}
|
|
399
|
+
patch(rule, change) {
|
|
400
|
+
this.rules.set(updateAccessRule(this.rules(), rule.id, change));
|
|
401
|
+
}
|
|
402
|
+
remove(rule) {
|
|
403
|
+
this.rules.set(removeAccessRule(this.rules(), rule.id));
|
|
404
|
+
}
|
|
405
|
+
add() {
|
|
406
|
+
this.rules.set([...this.rules(), { id: newAccessRuleId(), subject: '', permission: '', effect: this.defaultEffect() }]);
|
|
407
|
+
}
|
|
408
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: AccessPolicyEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
409
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.24", type: AccessPolicyEditorComponent, isStandalone: true, selector: "hm-access-policy-editor", inputs: { rules: { classPropertyName: "rules", publicName: "rules", isSignal: true, isRequired: false, transformFunction: null }, subjects: { classPropertyName: "subjects", publicName: "subjects", isSignal: true, isRequired: true, transformFunction: null }, permissions: { classPropertyName: "permissions", publicName: "permissions", isSignal: true, isRequired: true, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, defaultEffect: { classPropertyName: "defaultEffect", publicName: "defaultEffect", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, texts: { classPropertyName: "texts", publicName: "texts", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { rules: "rulesChange" }, host: { classAttribute: "hm-access-policy" }, ngImport: i0, template: `
|
|
410
|
+
<p class="hm-access-policy__note">
|
|
411
|
+
<hm-icon class="hm-access-policy__note-icon" shape="info-circle" />
|
|
412
|
+
<span>{{ text().denyWins }}</span>
|
|
413
|
+
</p>
|
|
414
|
+
@if (rules().length) {
|
|
415
|
+
<ol class="hm-access-policy__rules" [attr.aria-label]="label() || text().label">
|
|
416
|
+
@for (rule of rules(); track rule.id; let i = $index) {
|
|
417
|
+
<li class="hm-access-policy__rule" [class.hm-access-policy__rule--issue]="issueOf(rule)">
|
|
418
|
+
<div role="group" class="hm-access-policy__group" [attr.aria-label]="ruleLabel(i)">
|
|
419
|
+
<div class="hm-access-policy__fields">
|
|
420
|
+
<hm-select class="hm-access-policy__subject" [label]="text().subject" [disabled]="readonly()" [value]="rule.subject" (valueChange)="patch(rule, { subject: $event })">
|
|
421
|
+
<option value="">{{ text().choose }}</option>
|
|
422
|
+
@for (subject of subjects(); track subject.id) {
|
|
423
|
+
<option [value]="subject.id">{{ subjectLabel(subject) }}</option>
|
|
424
|
+
}
|
|
425
|
+
</hm-select>
|
|
426
|
+
<hm-select class="hm-access-policy__permission" [label]="text().permission" [disabled]="readonly()" [value]="rule.permission" (valueChange)="patch(rule, { permission: $event })">
|
|
427
|
+
<option value="">{{ text().choose }}</option>
|
|
428
|
+
@for (permission of permissions(); track permission.id) {
|
|
429
|
+
<option [value]="permission.id">{{ permission.name }}</option>
|
|
430
|
+
}
|
|
431
|
+
</hm-select>
|
|
432
|
+
<hm-select class="hm-access-policy__effect" [label]="text().effect" [disabled]="readonly()" [value]="rule.effect" (valueChange)="patch(rule, { effect: $any($event) || 'allow' })">
|
|
433
|
+
<option value="allow">{{ text().allow }}</option>
|
|
434
|
+
<option value="deny">{{ text().deny }}</option>
|
|
435
|
+
</hm-select>
|
|
436
|
+
@if (!readonly()) {
|
|
437
|
+
<hm-icon-button class="hm-access-policy__remove" emphasis="subtle" intent="danger" icon="trash" [label]="removeLabel(i)" (clicked)="remove(rule)" />
|
|
438
|
+
}
|
|
439
|
+
</div>
|
|
440
|
+
@if (issueOf(rule); as issue) {
|
|
441
|
+
<p class="hm-access-policy__issue">
|
|
442
|
+
<hm-icon class="hm-access-policy__issue-icon" shape="exclamation-triangle" />
|
|
443
|
+
<span>{{ text().issues[issue] }}</span>
|
|
444
|
+
</p>
|
|
445
|
+
}
|
|
446
|
+
</div>
|
|
447
|
+
</li>
|
|
448
|
+
}
|
|
449
|
+
</ol>
|
|
450
|
+
} @else {
|
|
451
|
+
<p class="hm-access-policy__empty">{{ text().empty }}</p>
|
|
452
|
+
}
|
|
453
|
+
@if (!readonly()) {
|
|
454
|
+
<hm-button class="hm-access-policy__add" emphasis="medium" size="small" icon="plus" (clicked)="add()">{{ text().add }}</hm-button>
|
|
455
|
+
}
|
|
456
|
+
`, isInline: true, dependencies: [{ kind: "component", type: ButtonComponent, selector: "hm-button", inputs: ["emphasis", "intent", "size", "type", "icon", "iconDirection", "iconEnd", "disabled", "loading", "loadingState", "block", "link", "newTab", "caret", "inMenu", "toggle", "pressed"], outputs: ["loadingStateChange", "pressedChange", "clicked"] }, { kind: "component", type: IconButtonComponent, selector: "hm-icon-button", inputs: ["label", "icon", "solid", "iconDirection", "emphasis", "intent", "size", "disabled", "toggle", "pressed", "keyShortcuts"], outputs: ["pressedChange", "clicked"] }, { kind: "component", type: IconComponent, selector: "hm-icon", inputs: ["shape", "direction", "size", "solid", "badge", "status", "flip", "inverse", "label"] }, { kind: "component", type: SelectComponent, selector: "hm-select", inputs: ["value", "label", "labelHidden", "hint"], outputs: ["valueChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
457
|
+
}
|
|
458
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: AccessPolicyEditorComponent, decorators: [{
|
|
459
|
+
type: Component,
|
|
460
|
+
args: [{
|
|
461
|
+
selector: 'hm-access-policy-editor',
|
|
462
|
+
imports: [ButtonComponent, IconButtonComponent, IconComponent, SelectComponent],
|
|
463
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
464
|
+
host: { class: 'hm-access-policy' },
|
|
465
|
+
template: `
|
|
466
|
+
<p class="hm-access-policy__note">
|
|
467
|
+
<hm-icon class="hm-access-policy__note-icon" shape="info-circle" />
|
|
468
|
+
<span>{{ text().denyWins }}</span>
|
|
469
|
+
</p>
|
|
470
|
+
@if (rules().length) {
|
|
471
|
+
<ol class="hm-access-policy__rules" [attr.aria-label]="label() || text().label">
|
|
472
|
+
@for (rule of rules(); track rule.id; let i = $index) {
|
|
473
|
+
<li class="hm-access-policy__rule" [class.hm-access-policy__rule--issue]="issueOf(rule)">
|
|
474
|
+
<div role="group" class="hm-access-policy__group" [attr.aria-label]="ruleLabel(i)">
|
|
475
|
+
<div class="hm-access-policy__fields">
|
|
476
|
+
<hm-select class="hm-access-policy__subject" [label]="text().subject" [disabled]="readonly()" [value]="rule.subject" (valueChange)="patch(rule, { subject: $event })">
|
|
477
|
+
<option value="">{{ text().choose }}</option>
|
|
478
|
+
@for (subject of subjects(); track subject.id) {
|
|
479
|
+
<option [value]="subject.id">{{ subjectLabel(subject) }}</option>
|
|
480
|
+
}
|
|
481
|
+
</hm-select>
|
|
482
|
+
<hm-select class="hm-access-policy__permission" [label]="text().permission" [disabled]="readonly()" [value]="rule.permission" (valueChange)="patch(rule, { permission: $event })">
|
|
483
|
+
<option value="">{{ text().choose }}</option>
|
|
484
|
+
@for (permission of permissions(); track permission.id) {
|
|
485
|
+
<option [value]="permission.id">{{ permission.name }}</option>
|
|
486
|
+
}
|
|
487
|
+
</hm-select>
|
|
488
|
+
<hm-select class="hm-access-policy__effect" [label]="text().effect" [disabled]="readonly()" [value]="rule.effect" (valueChange)="patch(rule, { effect: $any($event) || 'allow' })">
|
|
489
|
+
<option value="allow">{{ text().allow }}</option>
|
|
490
|
+
<option value="deny">{{ text().deny }}</option>
|
|
491
|
+
</hm-select>
|
|
492
|
+
@if (!readonly()) {
|
|
493
|
+
<hm-icon-button class="hm-access-policy__remove" emphasis="subtle" intent="danger" icon="trash" [label]="removeLabel(i)" (clicked)="remove(rule)" />
|
|
494
|
+
}
|
|
495
|
+
</div>
|
|
496
|
+
@if (issueOf(rule); as issue) {
|
|
497
|
+
<p class="hm-access-policy__issue">
|
|
498
|
+
<hm-icon class="hm-access-policy__issue-icon" shape="exclamation-triangle" />
|
|
499
|
+
<span>{{ text().issues[issue] }}</span>
|
|
500
|
+
</p>
|
|
501
|
+
}
|
|
502
|
+
</div>
|
|
503
|
+
</li>
|
|
504
|
+
}
|
|
505
|
+
</ol>
|
|
506
|
+
} @else {
|
|
507
|
+
<p class="hm-access-policy__empty">{{ text().empty }}</p>
|
|
508
|
+
}
|
|
509
|
+
@if (!readonly()) {
|
|
510
|
+
<hm-button class="hm-access-policy__add" emphasis="medium" size="small" icon="plus" (clicked)="add()">{{ text().add }}</hm-button>
|
|
511
|
+
}
|
|
512
|
+
`,
|
|
513
|
+
}]
|
|
514
|
+
}], propDecorators: { rules: [{ type: i0.Input, args: [{ isSignal: true, alias: "rules", required: false }] }, { type: i0.Output, args: ["rulesChange"] }], subjects: [{ type: i0.Input, args: [{ isSignal: true, alias: "subjects", required: true }] }], permissions: [{ type: i0.Input, args: [{ isSignal: true, alias: "permissions", required: true }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], defaultEffect: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultEffect", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], texts: [{ type: i0.Input, args: [{ isSignal: true, alias: "texts", required: false }] }] } });
|
|
515
|
+
|
|
516
|
+
const STATUS_ICONS = {
|
|
517
|
+
pending: 'hourglass',
|
|
518
|
+
approved: 'check-circle',
|
|
519
|
+
denied: 'times-circle',
|
|
520
|
+
};
|
|
521
|
+
/**
|
|
522
|
+
* Pedido de acesso, do lado de quem pede: escolher o papel, explicar o motivo e enviar; depois, a situação
|
|
523
|
+
* do pedido (aguardando, aprovado, recusado).
|
|
524
|
+
*
|
|
525
|
+
* ```html
|
|
526
|
+
* <hm-access-request [roles]="roles" [status]="status()" [loading]="sending()" (requested)="send($event)" />
|
|
527
|
+
* ```
|
|
528
|
+
*
|
|
529
|
+
* - `status` é do app: `idle` mostra o formulário; os outros mostram o resultado (o app troca depois do envio).
|
|
530
|
+
* - `reasonRequired` exige o motivo. Com um papel só, a escolha some e o pedido vai com ele.
|
|
531
|
+
* - Típico dentro de `hm-state-screen situation="no-permission"`, no lugar da ação de voltar.
|
|
532
|
+
*/
|
|
533
|
+
class AccessRequestComponent {
|
|
534
|
+
#icons = useHermesIcons(ACCESS_CONTROL_ICONS);
|
|
535
|
+
/** Papéis que se pode pedir (o primeiro vem escolhido). */
|
|
536
|
+
roles = input.required(...(ngDevMode ? [{ debugName: "roles" }] : /* istanbul ignore next */ []));
|
|
537
|
+
status = input('idle', ...(ngDevMode ? [{ debugName: "status" }] : /* istanbul ignore next */ []));
|
|
538
|
+
reasonRequired = input(false, { ...(ngDevMode ? { debugName: "reasonRequired" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
539
|
+
loading = input(false, { ...(ngDevMode ? { debugName: "loading" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
540
|
+
/** Texto do botão. Vazio = "Pedir acesso". */
|
|
541
|
+
submitLabel = input('', ...(ngDevMode ? [{ debugName: "submitLabel" }] : /* istanbul ignore next */ []));
|
|
542
|
+
/** Frase extra na situação (ex.: o motivo da recusa, vindo de quem decidiu). */
|
|
543
|
+
statusNote = input('', ...(ngDevMode ? [{ debugName: "statusNote" }] : /* istanbul ignore next */ []));
|
|
544
|
+
requested = output();
|
|
545
|
+
#i18n = inject(HermesI18nService);
|
|
546
|
+
#fieldText = inject(HERMES_MESSAGES).field;
|
|
547
|
+
/** Sobrescrita parcial dos textos da peça (padrão: o catálogo do idioma ativo). */
|
|
548
|
+
texts = input({}, ...(ngDevMode ? [{ debugName: "texts" }] : /* istanbul ignore next */ []));
|
|
549
|
+
t = computed(() => ({ ...this.#i18n.pick(ACCESS_CONTROL_MESSAGES, ACCESS_CONTROL_MESSAGES_PT_BR), ...this.texts() }), ...(ngDevMode ? [{ debugName: "t" }] : /* istanbul ignore next */ []));
|
|
550
|
+
text = computed(() => this.t().accessRequest, ...(ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []));
|
|
551
|
+
role = signal('', ...(ngDevMode ? [{ debugName: "role" }] : /* istanbul ignore next */ []));
|
|
552
|
+
reason = signal('', ...(ngDevMode ? [{ debugName: "reason" }] : /* istanbul ignore next */ []));
|
|
553
|
+
tried = signal(false, ...(ngDevMode ? [{ debugName: "tried" }] : /* istanbul ignore next */ []));
|
|
554
|
+
roleOptions = computed(() => this.roles().map((r) => ({ value: r.id, label: r.name, description: r.description })), ...(ngDevMode ? [{ debugName: "roleOptions" }] : /* istanbul ignore next */ []));
|
|
555
|
+
reasonError = computed(() => this.tried() && this.reasonRequired() && !this.reason().trim() ? this.#fieldText.errors['required'] : '', ...(ngDevMode ? [{ debugName: "reasonError" }] : /* istanbul ignore next */ []));
|
|
556
|
+
statusIcon = computed(() => STATUS_ICONS[this.status()] ?? 'hourglass', ...(ngDevMode ? [{ debugName: "statusIcon" }] : /* istanbul ignore next */ []));
|
|
557
|
+
statusTitle = computed(() => {
|
|
558
|
+
const status = this.status();
|
|
559
|
+
if (status === 'pending')
|
|
560
|
+
return this.text().sentTitle;
|
|
561
|
+
return status === 'idle' ? '' : this.text().status[status];
|
|
562
|
+
}, ...(ngDevMode ? [{ debugName: "statusTitle" }] : /* istanbul ignore next */ []));
|
|
563
|
+
constructor() {
|
|
564
|
+
effect(() => {
|
|
565
|
+
const first = this.roles()[0]?.id ?? '';
|
|
566
|
+
untracked(() => {
|
|
567
|
+
if (!this.roles().some((r) => r.id === this.role()))
|
|
568
|
+
this.role.set(first);
|
|
569
|
+
});
|
|
570
|
+
});
|
|
571
|
+
}
|
|
572
|
+
submit() {
|
|
573
|
+
this.tried.set(true);
|
|
574
|
+
if (this.reasonError() || this.loading())
|
|
575
|
+
return;
|
|
576
|
+
this.requested.emit({ role: this.role(), reason: this.reason().trim() });
|
|
577
|
+
}
|
|
578
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: AccessRequestComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
579
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.24", type: AccessRequestComponent, isStandalone: true, selector: "hm-access-request", inputs: { roles: { classPropertyName: "roles", publicName: "roles", isSignal: true, isRequired: true, transformFunction: null }, status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: false, transformFunction: null }, reasonRequired: { classPropertyName: "reasonRequired", publicName: "reasonRequired", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, submitLabel: { classPropertyName: "submitLabel", publicName: "submitLabel", isSignal: true, isRequired: false, transformFunction: null }, statusNote: { classPropertyName: "statusNote", publicName: "statusNote", isSignal: true, isRequired: false, transformFunction: null }, texts: { classPropertyName: "texts", publicName: "texts", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { requested: "requested" }, host: { classAttribute: "hm-access-request" }, ngImport: i0, template: `
|
|
580
|
+
@if (status() === 'idle') {
|
|
581
|
+
<form class="hm-access-request__form" novalidate (submit)="$event.preventDefault(); submit()">
|
|
582
|
+
@if (roles().length > 1) {
|
|
583
|
+
<hm-radio [label]="text().role" [options]="roleOptions()" [value]="role()" (valueChange)="role.set($event)" />
|
|
584
|
+
}
|
|
585
|
+
<hm-textarea
|
|
586
|
+
[label]="text().reason"
|
|
587
|
+
[hint]="text().reasonHint"
|
|
588
|
+
[rows]="3"
|
|
589
|
+
autoGrow
|
|
590
|
+
[maxRows]="8"
|
|
591
|
+
[required]="reasonRequired()"
|
|
592
|
+
[error]="reasonError()"
|
|
593
|
+
[value]="reason()"
|
|
594
|
+
(valueChange)="reason.set($event)"
|
|
595
|
+
/>
|
|
596
|
+
<div class="hm-access-request__actions">
|
|
597
|
+
<hm-button type="submit" icon="key" [loading]="loading()">{{ submitLabel() || text().submit }}</hm-button>
|
|
598
|
+
</div>
|
|
599
|
+
</form>
|
|
600
|
+
} @else {
|
|
601
|
+
<div [class]="'hm-access-request__status hm-access-request__status--' + status()" role="status">
|
|
602
|
+
<hm-icon class="hm-access-request__status-icon" [shape]="statusIcon()" />
|
|
603
|
+
<div class="hm-access-request__status-text">
|
|
604
|
+
<p class="hm-access-request__status-title">{{ statusTitle() }}</p>
|
|
605
|
+
@if (status() === 'pending') {
|
|
606
|
+
<p class="hm-access-request__status-body">{{ text().sentBody }}</p>
|
|
607
|
+
}
|
|
608
|
+
@if (statusNote()) {
|
|
609
|
+
<p class="hm-access-request__status-body">{{ statusNote() }}</p>
|
|
610
|
+
}
|
|
611
|
+
</div>
|
|
612
|
+
</div>
|
|
613
|
+
}
|
|
614
|
+
`, isInline: true, dependencies: [{ kind: "component", type: ButtonComponent, selector: "hm-button", inputs: ["emphasis", "intent", "size", "type", "icon", "iconDirection", "iconEnd", "disabled", "loading", "loadingState", "block", "link", "newTab", "caret", "inMenu", "toggle", "pressed"], outputs: ["loadingStateChange", "pressedChange", "clicked"] }, { kind: "component", type: IconComponent, selector: "hm-icon", inputs: ["shape", "direction", "size", "solid", "badge", "status", "flip", "inverse", "label"] }, { kind: "component", type: RadioComponent, selector: "hm-radio", inputs: ["value", "label", "options", "appearance", "layout", "hint"], outputs: ["valueChange"] }, { kind: "component", type: TextareaComponent, selector: "hm-textarea", inputs: ["value", "label", "hint", "placeholder", "maxLength", "rows", "autoGrow", "labelHidden", "loading", "maxRows", "submitKey", "mentionCandidates", "mentionTrigger", "texts"], outputs: ["valueChange", "submitted", "mentioned"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
615
|
+
}
|
|
616
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: AccessRequestComponent, decorators: [{
|
|
617
|
+
type: Component,
|
|
618
|
+
args: [{
|
|
619
|
+
selector: 'hm-access-request',
|
|
620
|
+
imports: [ButtonComponent, IconComponent, RadioComponent, TextareaComponent],
|
|
621
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
622
|
+
host: { class: 'hm-access-request' },
|
|
623
|
+
template: `
|
|
624
|
+
@if (status() === 'idle') {
|
|
625
|
+
<form class="hm-access-request__form" novalidate (submit)="$event.preventDefault(); submit()">
|
|
626
|
+
@if (roles().length > 1) {
|
|
627
|
+
<hm-radio [label]="text().role" [options]="roleOptions()" [value]="role()" (valueChange)="role.set($event)" />
|
|
628
|
+
}
|
|
629
|
+
<hm-textarea
|
|
630
|
+
[label]="text().reason"
|
|
631
|
+
[hint]="text().reasonHint"
|
|
632
|
+
[rows]="3"
|
|
633
|
+
autoGrow
|
|
634
|
+
[maxRows]="8"
|
|
635
|
+
[required]="reasonRequired()"
|
|
636
|
+
[error]="reasonError()"
|
|
637
|
+
[value]="reason()"
|
|
638
|
+
(valueChange)="reason.set($event)"
|
|
639
|
+
/>
|
|
640
|
+
<div class="hm-access-request__actions">
|
|
641
|
+
<hm-button type="submit" icon="key" [loading]="loading()">{{ submitLabel() || text().submit }}</hm-button>
|
|
642
|
+
</div>
|
|
643
|
+
</form>
|
|
644
|
+
} @else {
|
|
645
|
+
<div [class]="'hm-access-request__status hm-access-request__status--' + status()" role="status">
|
|
646
|
+
<hm-icon class="hm-access-request__status-icon" [shape]="statusIcon()" />
|
|
647
|
+
<div class="hm-access-request__status-text">
|
|
648
|
+
<p class="hm-access-request__status-title">{{ statusTitle() }}</p>
|
|
649
|
+
@if (status() === 'pending') {
|
|
650
|
+
<p class="hm-access-request__status-body">{{ text().sentBody }}</p>
|
|
651
|
+
}
|
|
652
|
+
@if (statusNote()) {
|
|
653
|
+
<p class="hm-access-request__status-body">{{ statusNote() }}</p>
|
|
654
|
+
}
|
|
655
|
+
</div>
|
|
656
|
+
</div>
|
|
657
|
+
}
|
|
658
|
+
`,
|
|
659
|
+
}]
|
|
660
|
+
}], ctorParameters: () => [], propDecorators: { roles: [{ type: i0.Input, args: [{ isSignal: true, alias: "roles", required: true }] }], status: [{ type: i0.Input, args: [{ isSignal: true, alias: "status", required: false }] }], reasonRequired: [{ type: i0.Input, args: [{ isSignal: true, alias: "reasonRequired", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], submitLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "submitLabel", required: false }] }], statusNote: [{ type: i0.Input, args: [{ isSignal: true, alias: "statusNote", required: false }] }], requested: [{ type: i0.Output, args: ["requested"] }], texts: [{ type: i0.Input, args: [{ isSignal: true, alias: "texts", required: false }] }] } });
|
|
661
|
+
/**
|
|
662
|
+
* Pedido de acesso, do lado de quem aprova: quem pediu, o papel, o motivo e as ações aprovar/recusar — recusar
|
|
663
|
+
* abre o campo do motivo da recusa antes de confirmar.
|
|
664
|
+
*
|
|
665
|
+
* ```html
|
|
666
|
+
* <hm-access-request-review requester="Bruno Lima" email="bruno@exemplo.com" requestedRole="Editor" reason="Vou revisar o contrato."
|
|
667
|
+
* (approve)="approve(req)" (deny)="deny(req, $event)" />
|
|
668
|
+
* ```
|
|
669
|
+
*
|
|
670
|
+
* - `decision` (do app) troca as ações pelo resultado depois de decidido.
|
|
671
|
+
* - `denyReasonRequired` exige o motivo da recusa.
|
|
672
|
+
*/
|
|
673
|
+
class AccessRequestReviewComponent {
|
|
674
|
+
#icons = useHermesIcons(ACCESS_CONTROL_ICONS);
|
|
675
|
+
requester = input.required(...(ngDevMode ? [{ debugName: "requester" }] : /* istanbul ignore next */ []));
|
|
676
|
+
email = input('', ...(ngDevMode ? [{ debugName: "email" }] : /* istanbul ignore next */ []));
|
|
677
|
+
imageUrl = input(null, ...(ngDevMode ? [{ debugName: "imageUrl" }] : /* istanbul ignore next */ []));
|
|
678
|
+
/** Nome do papel pedido. */
|
|
679
|
+
requestedRole = input.required(...(ngDevMode ? [{ debugName: "requestedRole" }] : /* istanbul ignore next */ []));
|
|
680
|
+
reason = input('', ...(ngDevMode ? [{ debugName: "reason" }] : /* istanbul ignore next */ []));
|
|
681
|
+
/** Quando foi pedido (o que `new Date()` aceita). */
|
|
682
|
+
requestedAt = input(null, ...(ngDevMode ? [{ debugName: "requestedAt" }] : /* istanbul ignore next */ []));
|
|
683
|
+
/** Situação depois de decidido. `pending` = mostra as ações. */
|
|
684
|
+
decision = input('pending', ...(ngDevMode ? [{ debugName: "decision" }] : /* istanbul ignore next */ []));
|
|
685
|
+
denyReasonRequired = input(false, { ...(ngDevMode ? { debugName: "denyReasonRequired" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
686
|
+
loading = input(false, { ...(ngDevMode ? { debugName: "loading" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
687
|
+
approve = output();
|
|
688
|
+
/** Recusa confirmada, com o motivo (pode ser vazio). */
|
|
689
|
+
deny = output();
|
|
690
|
+
#i18n = inject(HermesI18nService);
|
|
691
|
+
#fieldText = inject(HERMES_MESSAGES).field;
|
|
692
|
+
/** Sobrescrita parcial dos textos da peça (padrão: o catálogo do idioma ativo). */
|
|
693
|
+
texts = input({}, ...(ngDevMode ? [{ debugName: "texts" }] : /* istanbul ignore next */ []));
|
|
694
|
+
t = computed(() => ({ ...this.#i18n.pick(ACCESS_CONTROL_MESSAGES, ACCESS_CONTROL_MESSAGES_PT_BR), ...this.texts() }), ...(ngDevMode ? [{ debugName: "t" }] : /* istanbul ignore next */ []));
|
|
695
|
+
text = computed(() => this.t().accessRequest, ...(ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []));
|
|
696
|
+
denying = signal(false, ...(ngDevMode ? [{ debugName: "denying" }] : /* istanbul ignore next */ []));
|
|
697
|
+
denyReason = signal('', ...(ngDevMode ? [{ debugName: "denyReason" }] : /* istanbul ignore next */ []));
|
|
698
|
+
tried = signal(false, ...(ngDevMode ? [{ debugName: "tried" }] : /* istanbul ignore next */ []));
|
|
699
|
+
requestedText = computed(() => formatMessage(this.text().requested, { role: this.requestedRole() }), ...(ngDevMode ? [{ debugName: "requestedText" }] : /* istanbul ignore next */ []));
|
|
700
|
+
denyError = computed(() => this.tried() && this.denyReasonRequired() && !this.denyReason().trim() ? this.#fieldText.errors['required'] : '', ...(ngDevMode ? [{ debugName: "denyError" }] : /* istanbul ignore next */ []));
|
|
701
|
+
date = computed(() => {
|
|
702
|
+
const value = this.requestedAt();
|
|
703
|
+
if (value === null || value === '')
|
|
704
|
+
return null;
|
|
705
|
+
const date = value instanceof Date ? value : new Date(value);
|
|
706
|
+
return Number.isNaN(date.getTime()) ? null : date;
|
|
707
|
+
}, ...(ngDevMode ? [{ debugName: "date" }] : /* istanbul ignore next */ []));
|
|
708
|
+
timeIso = computed(() => this.date()?.toISOString() ?? null, ...(ngDevMode ? [{ debugName: "timeIso" }] : /* istanbul ignore next */ []));
|
|
709
|
+
timeText = computed(() => {
|
|
710
|
+
const date = this.date();
|
|
711
|
+
return date ? new Intl.DateTimeFormat(this.#i18n.formatLocale(), { dateStyle: 'medium', timeStyle: 'short' }).format(date) : '';
|
|
712
|
+
}, ...(ngDevMode ? [{ debugName: "timeText" }] : /* istanbul ignore next */ []));
|
|
713
|
+
confirmDeny() {
|
|
714
|
+
this.tried.set(true);
|
|
715
|
+
if (this.denyError() || this.loading())
|
|
716
|
+
return;
|
|
717
|
+
this.deny.emit(this.denyReason().trim());
|
|
718
|
+
}
|
|
719
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: AccessRequestReviewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
720
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.24", type: AccessRequestReviewComponent, isStandalone: true, selector: "hm-access-request-review", inputs: { requester: { classPropertyName: "requester", publicName: "requester", isSignal: true, isRequired: true, transformFunction: null }, email: { classPropertyName: "email", publicName: "email", isSignal: true, isRequired: false, transformFunction: null }, imageUrl: { classPropertyName: "imageUrl", publicName: "imageUrl", isSignal: true, isRequired: false, transformFunction: null }, requestedRole: { classPropertyName: "requestedRole", publicName: "requestedRole", isSignal: true, isRequired: true, transformFunction: null }, reason: { classPropertyName: "reason", publicName: "reason", isSignal: true, isRequired: false, transformFunction: null }, requestedAt: { classPropertyName: "requestedAt", publicName: "requestedAt", isSignal: true, isRequired: false, transformFunction: null }, decision: { classPropertyName: "decision", publicName: "decision", isSignal: true, isRequired: false, transformFunction: null }, denyReasonRequired: { classPropertyName: "denyReasonRequired", publicName: "denyReasonRequired", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, texts: { classPropertyName: "texts", publicName: "texts", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { approve: "approve", deny: "deny" }, host: { classAttribute: "hm-access-review" }, ngImport: i0, template: `
|
|
721
|
+
<div class="hm-access-review__head">
|
|
722
|
+
<hm-account-avatar size="medium" [name]="requester()" [imageUrl]="imageUrl()" />
|
|
723
|
+
<div class="hm-access-review__who">
|
|
724
|
+
<p class="hm-access-review__line"><span class="hm-access-review__name">{{ requester() }}</span> {{ requestedText() }}</p>
|
|
725
|
+
@if (email()) {
|
|
726
|
+
<span class="hm-access-review__email">{{ email() }}</span>
|
|
727
|
+
}
|
|
728
|
+
@if (timeText()) {
|
|
729
|
+
<time class="hm-access-review__time" [attr.datetime]="timeIso()">{{ timeText() }}</time>
|
|
730
|
+
}
|
|
731
|
+
</div>
|
|
732
|
+
</div>
|
|
733
|
+
<blockquote class="hm-access-review__reason" [class.hm-access-review__reason--empty]="!reason()">{{ reason() || text().noReason }}</blockquote>
|
|
734
|
+
@if (decision() !== 'pending') {
|
|
735
|
+
<p [class]="'hm-access-review__decision hm-access-review__decision--' + decision()" role="status">
|
|
736
|
+
<hm-icon class="hm-access-review__decision-icon" [shape]="decision() === 'approved' ? 'check-circle' : 'times-circle'" />
|
|
737
|
+
<span>{{ text().status[decision()] }}</span>
|
|
738
|
+
</p>
|
|
739
|
+
} @else if (denying()) {
|
|
740
|
+
<form class="hm-access-review__deny" novalidate (submit)="$event.preventDefault(); confirmDeny()">
|
|
741
|
+
<hm-textarea
|
|
742
|
+
[label]="text().denyReason"
|
|
743
|
+
[rows]="2"
|
|
744
|
+
autoGrow
|
|
745
|
+
[required]="denyReasonRequired()"
|
|
746
|
+
[error]="denyError()"
|
|
747
|
+
[value]="denyReason()"
|
|
748
|
+
(valueChange)="denyReason.set($event)"
|
|
749
|
+
/>
|
|
750
|
+
<div class="hm-access-review__actions">
|
|
751
|
+
<hm-button type="submit" intent="danger" [loading]="loading()">{{ text().confirmDeny }}</hm-button>
|
|
752
|
+
<hm-button emphasis="minimal" (clicked)="denying.set(false)">{{ text().cancel }}</hm-button>
|
|
753
|
+
</div>
|
|
754
|
+
</form>
|
|
755
|
+
} @else {
|
|
756
|
+
<div class="hm-access-review__actions">
|
|
757
|
+
<hm-button icon="check" [loading]="loading()" (clicked)="approve.emit()">{{ text().approve }}</hm-button>
|
|
758
|
+
<hm-button emphasis="medium" intent="danger" icon="times" (clicked)="denying.set(true)">{{ text().deny }}</hm-button>
|
|
759
|
+
</div>
|
|
760
|
+
}
|
|
761
|
+
`, isInline: true, dependencies: [{ kind: "component", type: AccountAvatarComponent, selector: "hm-account-avatar", inputs: ["name", "imageUrl", "size", "loading", "presence", "texts"] }, { 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: IconComponent, selector: "hm-icon", inputs: ["shape", "direction", "size", "solid", "badge", "status", "flip", "inverse", "label"] }, { kind: "component", type: TextareaComponent, selector: "hm-textarea", inputs: ["value", "label", "hint", "placeholder", "maxLength", "rows", "autoGrow", "labelHidden", "loading", "maxRows", "submitKey", "mentionCandidates", "mentionTrigger", "texts"], outputs: ["valueChange", "submitted", "mentioned"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
762
|
+
}
|
|
763
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: AccessRequestReviewComponent, decorators: [{
|
|
764
|
+
type: Component,
|
|
765
|
+
args: [{
|
|
766
|
+
selector: 'hm-access-request-review',
|
|
767
|
+
imports: [AccountAvatarComponent, ButtonComponent, IconComponent, TextareaComponent],
|
|
768
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
769
|
+
host: { class: 'hm-access-review' },
|
|
770
|
+
template: `
|
|
771
|
+
<div class="hm-access-review__head">
|
|
772
|
+
<hm-account-avatar size="medium" [name]="requester()" [imageUrl]="imageUrl()" />
|
|
773
|
+
<div class="hm-access-review__who">
|
|
774
|
+
<p class="hm-access-review__line"><span class="hm-access-review__name">{{ requester() }}</span> {{ requestedText() }}</p>
|
|
775
|
+
@if (email()) {
|
|
776
|
+
<span class="hm-access-review__email">{{ email() }}</span>
|
|
777
|
+
}
|
|
778
|
+
@if (timeText()) {
|
|
779
|
+
<time class="hm-access-review__time" [attr.datetime]="timeIso()">{{ timeText() }}</time>
|
|
780
|
+
}
|
|
781
|
+
</div>
|
|
782
|
+
</div>
|
|
783
|
+
<blockquote class="hm-access-review__reason" [class.hm-access-review__reason--empty]="!reason()">{{ reason() || text().noReason }}</blockquote>
|
|
784
|
+
@if (decision() !== 'pending') {
|
|
785
|
+
<p [class]="'hm-access-review__decision hm-access-review__decision--' + decision()" role="status">
|
|
786
|
+
<hm-icon class="hm-access-review__decision-icon" [shape]="decision() === 'approved' ? 'check-circle' : 'times-circle'" />
|
|
787
|
+
<span>{{ text().status[decision()] }}</span>
|
|
788
|
+
</p>
|
|
789
|
+
} @else if (denying()) {
|
|
790
|
+
<form class="hm-access-review__deny" novalidate (submit)="$event.preventDefault(); confirmDeny()">
|
|
791
|
+
<hm-textarea
|
|
792
|
+
[label]="text().denyReason"
|
|
793
|
+
[rows]="2"
|
|
794
|
+
autoGrow
|
|
795
|
+
[required]="denyReasonRequired()"
|
|
796
|
+
[error]="denyError()"
|
|
797
|
+
[value]="denyReason()"
|
|
798
|
+
(valueChange)="denyReason.set($event)"
|
|
799
|
+
/>
|
|
800
|
+
<div class="hm-access-review__actions">
|
|
801
|
+
<hm-button type="submit" intent="danger" [loading]="loading()">{{ text().confirmDeny }}</hm-button>
|
|
802
|
+
<hm-button emphasis="minimal" (clicked)="denying.set(false)">{{ text().cancel }}</hm-button>
|
|
803
|
+
</div>
|
|
804
|
+
</form>
|
|
805
|
+
} @else {
|
|
806
|
+
<div class="hm-access-review__actions">
|
|
807
|
+
<hm-button icon="check" [loading]="loading()" (clicked)="approve.emit()">{{ text().approve }}</hm-button>
|
|
808
|
+
<hm-button emphasis="medium" intent="danger" icon="times" (clicked)="denying.set(true)">{{ text().deny }}</hm-button>
|
|
809
|
+
</div>
|
|
810
|
+
}
|
|
811
|
+
`,
|
|
812
|
+
}]
|
|
813
|
+
}], propDecorators: { requester: [{ type: i0.Input, args: [{ isSignal: true, alias: "requester", required: true }] }], email: [{ type: i0.Input, args: [{ isSignal: true, alias: "email", required: false }] }], imageUrl: [{ type: i0.Input, args: [{ isSignal: true, alias: "imageUrl", required: false }] }], requestedRole: [{ type: i0.Input, args: [{ isSignal: true, alias: "requestedRole", required: true }] }], reason: [{ type: i0.Input, args: [{ isSignal: true, alias: "reason", required: false }] }], requestedAt: [{ type: i0.Input, args: [{ isSignal: true, alias: "requestedAt", required: false }] }], decision: [{ type: i0.Input, args: [{ isSignal: true, alias: "decision", required: false }] }], denyReasonRequired: [{ type: i0.Input, args: [{ isSignal: true, alias: "denyReasonRequired", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], approve: [{ type: i0.Output, args: ["approve"] }], deny: [{ type: i0.Output, args: ["deny"] }], texts: [{ type: i0.Input, args: [{ isSignal: true, alias: "texts", required: false }] }] } });
|
|
814
|
+
|
|
815
|
+
// Ponto de import `@trismegisto/angular/access-control` (secundário do ng-packagr): resumo de acesso, editor de política
|
|
816
|
+
// e pedido de acesso (quem pede e quem aprova). Ao criar arquivo público novo na pasta, acrescente a linha.
|
|
817
|
+
|
|
818
|
+
/**
|
|
819
|
+
* Generated bundle index. Do not edit.
|
|
820
|
+
*/
|
|
821
|
+
|
|
822
|
+
export { ACCESS_CONTROL_MESSAGES, ACCESS_CONTROL_MESSAGES_EN, ACCESS_CONTROL_MESSAGES_ES, ACCESS_CONTROL_MESSAGES_PT_BR, AccessPolicyEditorComponent, AccessRequestComponent, AccessRequestReviewComponent, AccessSummaryComponent };
|
|
823
|
+
//# sourceMappingURL=trismegisto-angular-access-control.mjs.map
|