@trismegisto/angular 3.3.2 → 3.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/trismegisto-angular-access-control.mjs +823 -0
- package/fesm2022/trismegisto-angular-access-control.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-account-avatar.mjs +54 -3
- package/fesm2022/trismegisto-angular-account-avatar.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-account-closure.mjs +221 -0
- package/fesm2022/trismegisto-angular-account-closure.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-account-forms.mjs +924 -0
- package/fesm2022/trismegisto-angular-account-forms.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-account-switcher.mjs +202 -0
- package/fesm2022/trismegisto-angular-account-switcher.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-address.mjs +631 -0
- package/fesm2022/trismegisto-angular-address.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-alert-history.mjs +294 -0
- package/fesm2022/trismegisto-angular-alert-history.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-alert-rule-editor.mjs +450 -0
- package/fesm2022/trismegisto-angular-alert-rule-editor.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-anchor-nav.mjs +157 -0
- package/fesm2022/trismegisto-angular-anchor-nav.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-announcer.mjs +79 -0
- package/fesm2022/trismegisto-angular-announcer.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-api-exchange.mjs +202 -0
- package/fesm2022/trismegisto-angular-api-exchange.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-appointment-details.mjs +254 -0
- package/fesm2022/trismegisto-angular-appointment-details.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-approval.mjs +242 -0
- package/fesm2022/trismegisto-angular-approval.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-assignee.mjs +271 -0
- package/fesm2022/trismegisto-angular-assignee.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-attachment.mjs +1 -1
- package/fesm2022/trismegisto-angular-attachment.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-availability-editor.mjs +187 -0
- package/fesm2022/trismegisto-angular-availability-editor.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-avatar-group.mjs +1 -1
- package/fesm2022/trismegisto-angular-avatar-group.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-backlog.mjs +244 -0
- package/fesm2022/trismegisto-angular-backlog.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-billing.mjs +1007 -0
- package/fesm2022/trismegisto-angular-billing.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-bottom-navigation.mjs +203 -0
- package/fesm2022/trismegisto-angular-bottom-navigation.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-bottom-sheet.mjs +428 -0
- package/fesm2022/trismegisto-angular-bottom-sheet.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-card-container.mjs +1 -1
- package/fesm2022/trismegisto-angular-card-container.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-cart.mjs +677 -0
- package/fesm2022/trismegisto-angular-cart.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-cascader.mjs +419 -0
- package/fesm2022/trismegisto-angular-cascader.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-change-history.mjs +148 -0
- package/fesm2022/trismegisto-angular-change-history.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-code-diff.mjs +2 -2
- package/fesm2022/trismegisto-angular-code-diff.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-color-picker.mjs +145 -0
- package/fesm2022/trismegisto-angular-color-picker.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-combobox-multi.mjs +6 -4
- package/fesm2022/trismegisto-angular-combobox-multi.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-commerce-format.mjs +103 -0
- package/fesm2022/trismegisto-angular-commerce-format.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-connection-wizard.mjs +159 -0
- package/fesm2022/trismegisto-angular-connection-wizard.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-consent.mjs +382 -0
- package/fesm2022/trismegisto-angular-consent.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-credentials-form.mjs +461 -0
- package/fesm2022/trismegisto-angular-credentials-form.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-data-grid.mjs +690 -18
- package/fesm2022/trismegisto-angular-data-grid.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-data-source-picker.mjs +115 -0
- package/fesm2022/trismegisto-angular-data-source-picker.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-date-picker.mjs +99 -10
- package/fesm2022/trismegisto-angular-date-picker.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-datetime-picker.mjs +183 -0
- package/fesm2022/trismegisto-angular-datetime-picker.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-deadline.mjs +326 -0
- package/fesm2022/trismegisto-angular-deadline.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-deploy-pipeline.mjs +259 -0
- package/fesm2022/trismegisto-angular-deploy-pipeline.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-drawer.mjs +11 -5
- package/fesm2022/trismegisto-angular-drawer.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-endpoint-card.mjs +143 -0
- package/fesm2022/trismegisto-angular-endpoint-card.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-entity-picker.mjs +246 -0
- package/fesm2022/trismegisto-angular-entity-picker.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-environment-picker.mjs +217 -0
- package/fesm2022/trismegisto-angular-environment-picker.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-event-calendar.mjs +234 -11
- package/fesm2022/trismegisto-angular-event-calendar.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-execution-status.mjs +211 -0
- package/fesm2022/trismegisto-angular-execution-status.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-feature-flags.mjs +153 -0
- package/fesm2022/trismegisto-angular-feature-flags.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-field-mapping.mjs +178 -0
- package/fesm2022/trismegisto-angular-field-mapping.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-file-list.mjs +222 -0
- package/fesm2022/trismegisto-angular-file-list.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-file-permissions.mjs +273 -0
- package/fesm2022/trismegisto-angular-file-permissions.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-file-upload.mjs +1 -1
- package/fesm2022/trismegisto-angular-file-upload.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-file-versions.mjs +139 -0
- package/fesm2022/trismegisto-angular-file-versions.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-filter-bar.mjs +1 -1
- package/fesm2022/trismegisto-angular-filter-bar.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-finance.mjs +912 -0
- package/fesm2022/trismegisto-angular-finance.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-form-error-summary.mjs +195 -0
- package/fesm2022/trismegisto-angular-form-error-summary.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-forms.mjs +21 -3
- package/fesm2022/trismegisto-angular-forms.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-gantt.mjs +453 -0
- package/fesm2022/trismegisto-angular-gantt.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-header.mjs +22 -5
- package/fesm2022/trismegisto-angular-header.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-health-status.mjs +204 -0
- package/fesm2022/trismegisto-angular-health-status.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-icon.mjs +96 -1
- package/fesm2022/trismegisto-angular-icon.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-identity-document.mjs +274 -0
- package/fesm2022/trismegisto-angular-identity-document.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-image-gallery.mjs +320 -0
- package/fesm2022/trismegisto-angular-image-gallery.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-incident.mjs +735 -0
- package/fesm2022/trismegisto-angular-incident.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-input.mjs +2 -1
- package/fesm2022/trismegisto-angular-input.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-integration-text.mjs +82 -0
- package/fesm2022/trismegisto-angular-integration-text.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-integration.mjs +423 -0
- package/fesm2022/trismegisto-angular-integration.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-invoice.mjs +381 -0
- package/fesm2022/trismegisto-angular-invoice.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-json-viewer.mjs +388 -0
- package/fesm2022/trismegisto-angular-json-viewer.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-kanban.mjs +49 -9
- package/fesm2022/trismegisto-angular-kanban.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-level-badge.mjs +192 -0
- package/fesm2022/trismegisto-angular-level-badge.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-location-select.mjs +213 -0
- package/fesm2022/trismegisto-angular-location-select.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-log-viewer.mjs +260 -0
- package/fesm2022/trismegisto-angular-log-viewer.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-maintenance-window.mjs +286 -0
- package/fesm2022/trismegisto-angular-maintenance-window.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-member-list.mjs +303 -0
- package/fesm2022/trismegisto-angular-member-list.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-mention-text.mjs +44 -0
- package/fesm2022/trismegisto-angular-mention-text.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-menu.mjs +10 -4
- package/fesm2022/trismegisto-angular-menu.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-message.mjs +132 -7
- package/fesm2022/trismegisto-angular-message.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-metric-explorer.mjs +367 -0
- package/fesm2022/trismegisto-angular-metric-explorer.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-modal.mjs +14 -5
- package/fesm2022/trismegisto-angular-modal.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-monitoring-text.mjs +121 -0
- package/fesm2022/trismegisto-angular-monitoring-text.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-month-picker.mjs +232 -0
- package/fesm2022/trismegisto-angular-month-picker.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-navigation-menu.mjs +68 -9
- package/fesm2022/trismegisto-angular-navigation-menu.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-number-field.mjs +275 -0
- package/fesm2022/trismegisto-angular-number-field.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-observability-text.mjs +244 -0
- package/fesm2022/trismegisto-angular-observability-text.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-order.mjs +443 -0
- package/fesm2022/trismegisto-angular-order.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-org-chart.mjs +678 -0
- package/fesm2022/trismegisto-angular-org-chart.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-password-strength.mjs +204 -0
- package/fesm2022/trismegisto-angular-password-strength.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-payment-fields.mjs +818 -0
- package/fesm2022/trismegisto-angular-payment-fields.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-payment-form.mjs +405 -0
- package/fesm2022/trismegisto-angular-payment-form.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-payment-method.mjs +331 -0
- package/fesm2022/trismegisto-angular-payment-method.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-pdf-viewer.mjs +113 -0
- package/fesm2022/trismegisto-angular-pdf-viewer.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-permission-matrix.mjs +266 -0
- package/fesm2022/trismegisto-angular-permission-matrix.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-pipes.mjs +171 -2
- package/fesm2022/trismegisto-angular-pipes.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-popconfirm.mjs +239 -0
- package/fesm2022/trismegisto-angular-popconfirm.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-popover.mjs +6 -2
- package/fesm2022/trismegisto-angular-popover.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-price.mjs +276 -0
- package/fesm2022/trismegisto-angular-price.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-product.mjs +800 -0
- package/fesm2022/trismegisto-angular-product.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-progress.mjs +119 -4
- package/fesm2022/trismegisto-angular-progress.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-rating.mjs +166 -0
- package/fesm2022/trismegisto-angular-rating.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-reason-dialog.mjs +137 -0
- package/fesm2022/trismegisto-angular-reason-dialog.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-recurrence-editor.mjs +429 -0
- package/fesm2022/trismegisto-angular-recurrence-editor.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-release-timeline.mjs +175 -0
- package/fesm2022/trismegisto-angular-release-timeline.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-report-history.mjs +251 -0
- package/fesm2022/trismegisto-angular-report-history.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-report-schedule.mjs +240 -0
- package/fesm2022/trismegisto-angular-report-schedule.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-resource-calendar.mjs +172 -0
- package/fesm2022/trismegisto-angular-resource-calendar.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-resource-usage.mjs +208 -0
- package/fesm2022/trismegisto-angular-resource-usage.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-return-request.mjs +316 -0
- package/fesm2022/trismegisto-angular-return-request.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-rich-text.mjs +1 -1
- package/fesm2022/trismegisto-angular-rich-text.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-risk-register.mjs +342 -0
- package/fesm2022/trismegisto-angular-risk-register.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-save-status.mjs +166 -0
- package/fesm2022/trismegisto-angular-save-status.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-service-map.mjs +471 -0
- package/fesm2022/trismegisto-angular-service-map.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-service-status.mjs +278 -0
- package/fesm2022/trismegisto-angular-service-status.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-shipping.mjs +410 -0
- package/fesm2022/trismegisto-angular-shipping.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-sidebar.mjs +3 -0
- package/fesm2022/trismegisto-angular-sidebar.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-skip-link.mjs +74 -0
- package/fesm2022/trismegisto-angular-skip-link.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-sla-summary.mjs +349 -0
- package/fesm2022/trismegisto-angular-sla-summary.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-slot-picker.mjs +229 -0
- package/fesm2022/trismegisto-angular-slot-picker.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-split-button.mjs +190 -0
- package/fesm2022/trismegisto-angular-split-button.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-status-badge.mjs +80 -0
- package/fesm2022/trismegisto-angular-status-badge.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-status-select.mjs +156 -0
- package/fesm2022/trismegisto-angular-status-select.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-storage-usage.mjs +136 -0
- package/fesm2022/trismegisto-angular-storage-usage.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-swimlane-board.mjs +237 -0
- package/fesm2022/trismegisto-angular-swimlane-board.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-sync-status.mjs +269 -0
- package/fesm2022/trismegisto-angular-sync-status.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-tag-input.mjs +345 -0
- package/fesm2022/trismegisto-angular-tag-input.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-task-card.mjs +315 -0
- package/fesm2022/trismegisto-angular-task-card.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-task-detail.mjs +737 -0
- package/fesm2022/trismegisto-angular-task-detail.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-textarea.mjs +129 -8
- package/fesm2022/trismegisto-angular-textarea.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-time-range.mjs +201 -0
- package/fesm2022/trismegisto-angular-time-range.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-toast.mjs +135 -34
- package/fesm2022/trismegisto-angular-toast.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-tour.mjs +385 -0
- package/fesm2022/trismegisto-angular-tour.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-trace-waterfall.mjs +511 -0
- package/fesm2022/trismegisto-angular-trace-waterfall.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-transaction.mjs +616 -0
- package/fesm2022/trismegisto-angular-transaction.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-tree-select.mjs +444 -0
- package/fesm2022/trismegisto-angular-tree-select.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-tree.mjs +1 -1
- package/fesm2022/trismegisto-angular-tree.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-unsaved-changes.mjs +147 -0
- package/fesm2022/trismegisto-angular-unsaved-changes.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-uptime-bar.mjs +271 -0
- package/fesm2022/trismegisto-angular-uptime-bar.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-user-card.mjs +298 -0
- package/fesm2022/trismegisto-angular-user-card.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-vehicle-plate.mjs +245 -0
- package/fesm2022/trismegisto-angular-vehicle-plate.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-webhook.mjs +358 -0
- package/fesm2022/trismegisto-angular-webhook.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-wizard.mjs +2 -2
- package/fesm2022/trismegisto-angular-wizard.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-workflow-diagram.mjs +441 -0
- package/fesm2022/trismegisto-angular-workflow-diagram.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-workflow-i18n.mjs +890 -0
- package/fesm2022/trismegisto-angular-workflow-i18n.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-workload.mjs +172 -0
- package/fesm2022/trismegisto-angular-workload.mjs.map +1 -0
- package/fesm2022/trismegisto-angular-workspace-persistence.mjs +3 -2
- package/fesm2022/trismegisto-angular-workspace-persistence.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-workspace.mjs +229 -44
- package/fesm2022/trismegisto-angular-workspace.mjs.map +1 -1
- package/fesm2022/trismegisto-angular.mjs +117 -7
- package/fesm2022/trismegisto-angular.mjs.map +1 -1
- package/package.json +449 -5
- package/types/trismegisto-angular-access-control.d.ts +330 -0
- package/types/trismegisto-angular-access-control.d.ts.map +1 -0
- package/types/trismegisto-angular-account-avatar.d.ts +18 -1
- package/types/trismegisto-angular-account-avatar.d.ts.map +1 -1
- package/types/trismegisto-angular-account-closure.d.ts +85 -0
- package/types/trismegisto-angular-account-closure.d.ts.map +1 -0
- package/types/trismegisto-angular-account-forms.d.ts +381 -0
- package/types/trismegisto-angular-account-forms.d.ts.map +1 -0
- package/types/trismegisto-angular-account-switcher.d.ts +60 -0
- package/types/trismegisto-angular-account-switcher.d.ts.map +1 -0
- package/types/trismegisto-angular-address.d.ts +267 -0
- package/types/trismegisto-angular-address.d.ts.map +1 -0
- package/types/trismegisto-angular-alert-history.d.ts +77 -0
- package/types/trismegisto-angular-alert-history.d.ts.map +1 -0
- package/types/trismegisto-angular-alert-rule-editor.d.ts +123 -0
- package/types/trismegisto-angular-alert-rule-editor.d.ts.map +1 -0
- package/types/trismegisto-angular-anchor-nav.d.ts +78 -0
- package/types/trismegisto-angular-anchor-nav.d.ts.map +1 -0
- package/types/trismegisto-angular-announcer.d.ts +49 -0
- package/types/trismegisto-angular-announcer.d.ts.map +1 -0
- package/types/trismegisto-angular-api-exchange.d.ts +155 -0
- package/types/trismegisto-angular-api-exchange.d.ts.map +1 -0
- package/types/trismegisto-angular-appointment-details.d.ts +123 -0
- package/types/trismegisto-angular-appointment-details.d.ts.map +1 -0
- package/types/trismegisto-angular-approval.d.ts +109 -0
- package/types/trismegisto-angular-approval.d.ts.map +1 -0
- package/types/trismegisto-angular-assignee.d.ts +120 -0
- package/types/trismegisto-angular-assignee.d.ts.map +1 -0
- package/types/trismegisto-angular-availability-editor.d.ts +100 -0
- package/types/trismegisto-angular-availability-editor.d.ts.map +1 -0
- package/types/trismegisto-angular-backlog.d.ts +98 -0
- package/types/trismegisto-angular-backlog.d.ts.map +1 -0
- package/types/trismegisto-angular-billing.d.ts +851 -0
- package/types/trismegisto-angular-billing.d.ts.map +1 -0
- package/types/trismegisto-angular-bottom-navigation.d.ts +83 -0
- package/types/trismegisto-angular-bottom-navigation.d.ts.map +1 -0
- package/types/trismegisto-angular-bottom-sheet.d.ts +121 -0
- package/types/trismegisto-angular-bottom-sheet.d.ts.map +1 -0
- package/types/trismegisto-angular-cart.d.ts +267 -0
- package/types/trismegisto-angular-cart.d.ts.map +1 -0
- package/types/trismegisto-angular-cascader.d.ts +133 -0
- package/types/trismegisto-angular-cascader.d.ts.map +1 -0
- package/types/trismegisto-angular-change-history.d.ts +58 -0
- package/types/trismegisto-angular-change-history.d.ts.map +1 -0
- package/types/trismegisto-angular-color-picker.d.ts +73 -0
- package/types/trismegisto-angular-color-picker.d.ts.map +1 -0
- package/types/trismegisto-angular-combobox-multi.d.ts +3 -1
- package/types/trismegisto-angular-combobox-multi.d.ts.map +1 -1
- package/types/trismegisto-angular-commerce-format.d.ts +43 -0
- package/types/trismegisto-angular-commerce-format.d.ts.map +1 -0
- package/types/trismegisto-angular-connection-wizard.d.ts +110 -0
- package/types/trismegisto-angular-connection-wizard.d.ts.map +1 -0
- package/types/trismegisto-angular-consent.d.ts +142 -0
- package/types/trismegisto-angular-consent.d.ts.map +1 -0
- package/types/trismegisto-angular-credentials-form.d.ts +242 -0
- package/types/trismegisto-angular-credentials-form.d.ts.map +1 -0
- package/types/trismegisto-angular-data-grid.d.ts +382 -48
- package/types/trismegisto-angular-data-grid.d.ts.map +1 -1
- package/types/trismegisto-angular-data-source-picker.d.ts +73 -0
- package/types/trismegisto-angular-data-source-picker.d.ts.map +1 -0
- package/types/trismegisto-angular-date-picker.d.ts +75 -4
- package/types/trismegisto-angular-date-picker.d.ts.map +1 -1
- package/types/trismegisto-angular-datetime-picker.d.ts +89 -0
- package/types/trismegisto-angular-datetime-picker.d.ts.map +1 -0
- package/types/trismegisto-angular-deadline.d.ts +143 -0
- package/types/trismegisto-angular-deadline.d.ts.map +1 -0
- package/types/trismegisto-angular-deploy-pipeline.d.ts +100 -0
- package/types/trismegisto-angular-deploy-pipeline.d.ts.map +1 -0
- package/types/trismegisto-angular-drawer.d.ts +6 -3
- package/types/trismegisto-angular-drawer.d.ts.map +1 -1
- package/types/trismegisto-angular-endpoint-card.d.ts +113 -0
- package/types/trismegisto-angular-endpoint-card.d.ts.map +1 -0
- package/types/trismegisto-angular-entity-picker.d.ts +88 -0
- package/types/trismegisto-angular-entity-picker.d.ts.map +1 -0
- package/types/trismegisto-angular-environment-picker.d.ts +72 -0
- package/types/trismegisto-angular-environment-picker.d.ts.map +1 -0
- package/types/trismegisto-angular-event-calendar.d.ts +52 -6
- package/types/trismegisto-angular-event-calendar.d.ts.map +1 -1
- package/types/trismegisto-angular-execution-status.d.ts +76 -0
- package/types/trismegisto-angular-execution-status.d.ts.map +1 -0
- package/types/trismegisto-angular-feature-flags.d.ts +97 -0
- package/types/trismegisto-angular-feature-flags.d.ts.map +1 -0
- package/types/trismegisto-angular-field-mapping.d.ts +118 -0
- package/types/trismegisto-angular-field-mapping.d.ts.map +1 -0
- package/types/trismegisto-angular-file-list.d.ts +136 -0
- package/types/trismegisto-angular-file-list.d.ts.map +1 -0
- package/types/trismegisto-angular-file-permissions.d.ts +171 -0
- package/types/trismegisto-angular-file-permissions.d.ts.map +1 -0
- package/types/trismegisto-angular-file-versions.d.ts +93 -0
- package/types/trismegisto-angular-file-versions.d.ts.map +1 -0
- package/types/trismegisto-angular-finance.d.ts +623 -0
- package/types/trismegisto-angular-finance.d.ts.map +1 -0
- package/types/trismegisto-angular-form-error-summary.d.ts +98 -0
- package/types/trismegisto-angular-form-error-summary.d.ts.map +1 -0
- package/types/trismegisto-angular-forms.d.ts +14 -1
- package/types/trismegisto-angular-forms.d.ts.map +1 -1
- package/types/trismegisto-angular-gantt.d.ts +128 -0
- package/types/trismegisto-angular-gantt.d.ts.map +1 -0
- package/types/trismegisto-angular-header.d.ts +5 -1
- package/types/trismegisto-angular-header.d.ts.map +1 -1
- package/types/trismegisto-angular-health-status.d.ts +71 -0
- package/types/trismegisto-angular-health-status.d.ts.map +1 -0
- package/types/trismegisto-angular-icon.d.ts +96 -1
- package/types/trismegisto-angular-icon.d.ts.map +1 -1
- package/types/trismegisto-angular-identity-document.d.ts +112 -0
- package/types/trismegisto-angular-identity-document.d.ts.map +1 -0
- package/types/trismegisto-angular-image-gallery.d.ts +129 -0
- package/types/trismegisto-angular-image-gallery.d.ts.map +1 -0
- package/types/trismegisto-angular-incident.d.ts +212 -0
- package/types/trismegisto-angular-incident.d.ts.map +1 -0
- package/types/trismegisto-angular-input.d.ts.map +1 -1
- package/types/trismegisto-angular-integration-text.d.ts +42 -0
- package/types/trismegisto-angular-integration-text.d.ts.map +1 -0
- package/types/trismegisto-angular-integration.d.ts +283 -0
- package/types/trismegisto-angular-integration.d.ts.map +1 -0
- package/types/trismegisto-angular-invoice.d.ts +221 -0
- package/types/trismegisto-angular-invoice.d.ts.map +1 -0
- package/types/trismegisto-angular-json-viewer.d.ts +117 -0
- package/types/trismegisto-angular-json-viewer.d.ts.map +1 -0
- package/types/trismegisto-angular-kanban.d.ts +38 -3
- package/types/trismegisto-angular-kanban.d.ts.map +1 -1
- package/types/trismegisto-angular-level-badge.d.ts +87 -0
- package/types/trismegisto-angular-level-badge.d.ts.map +1 -0
- package/types/trismegisto-angular-location-select.d.ts +80 -0
- package/types/trismegisto-angular-location-select.d.ts.map +1 -0
- package/types/trismegisto-angular-log-viewer.d.ts +125 -0
- package/types/trismegisto-angular-log-viewer.d.ts.map +1 -0
- package/types/trismegisto-angular-maintenance-window.d.ts +89 -0
- package/types/trismegisto-angular-maintenance-window.d.ts.map +1 -0
- package/types/trismegisto-angular-member-list.d.ts +80 -0
- package/types/trismegisto-angular-member-list.d.ts.map +1 -0
- package/types/trismegisto-angular-mention-text.d.ts +28 -0
- package/types/trismegisto-angular-mention-text.d.ts.map +1 -0
- package/types/trismegisto-angular-menu.d.ts +4 -1
- package/types/trismegisto-angular-menu.d.ts.map +1 -1
- package/types/trismegisto-angular-message.d.ts +31 -2
- package/types/trismegisto-angular-message.d.ts.map +1 -1
- package/types/trismegisto-angular-metric-explorer.d.ts +117 -0
- package/types/trismegisto-angular-metric-explorer.d.ts.map +1 -0
- package/types/trismegisto-angular-modal.d.ts +1 -0
- package/types/trismegisto-angular-modal.d.ts.map +1 -1
- package/types/trismegisto-angular-monitoring-text.d.ts +57 -0
- package/types/trismegisto-angular-monitoring-text.d.ts.map +1 -0
- package/types/trismegisto-angular-month-picker.d.ts +104 -0
- package/types/trismegisto-angular-month-picker.d.ts.map +1 -0
- package/types/trismegisto-angular-navigation-menu.d.ts +35 -2
- package/types/trismegisto-angular-navigation-menu.d.ts.map +1 -1
- package/types/trismegisto-angular-number-field.d.ts +148 -0
- package/types/trismegisto-angular-number-field.d.ts.map +1 -0
- package/types/trismegisto-angular-observability-text.d.ts +85 -0
- package/types/trismegisto-angular-observability-text.d.ts.map +1 -0
- package/types/trismegisto-angular-order.d.ts +268 -0
- package/types/trismegisto-angular-order.d.ts.map +1 -0
- package/types/trismegisto-angular-org-chart.d.ts +145 -0
- package/types/trismegisto-angular-org-chart.d.ts.map +1 -0
- package/types/trismegisto-angular-password-strength.d.ts +74 -0
- package/types/trismegisto-angular-password-strength.d.ts.map +1 -0
- package/types/trismegisto-angular-payment-fields.d.ts +450 -0
- package/types/trismegisto-angular-payment-fields.d.ts.map +1 -0
- package/types/trismegisto-angular-payment-form.d.ts +189 -0
- package/types/trismegisto-angular-payment-form.d.ts.map +1 -0
- package/types/trismegisto-angular-payment-method.d.ts +238 -0
- package/types/trismegisto-angular-payment-method.d.ts.map +1 -0
- package/types/trismegisto-angular-pdf-viewer.d.ts +70 -0
- package/types/trismegisto-angular-pdf-viewer.d.ts.map +1 -0
- package/types/trismegisto-angular-permission-matrix.d.ts +70 -0
- package/types/trismegisto-angular-permission-matrix.d.ts.map +1 -0
- package/types/trismegisto-angular-pipes.d.ts +108 -2
- package/types/trismegisto-angular-pipes.d.ts.map +1 -1
- package/types/trismegisto-angular-popconfirm.d.ts +115 -0
- package/types/trismegisto-angular-popconfirm.d.ts.map +1 -0
- package/types/trismegisto-angular-popover.d.ts +3 -1
- package/types/trismegisto-angular-popover.d.ts.map +1 -1
- package/types/trismegisto-angular-price.d.ts +185 -0
- package/types/trismegisto-angular-price.d.ts.map +1 -0
- package/types/trismegisto-angular-product.d.ts +391 -0
- package/types/trismegisto-angular-product.d.ts.map +1 -0
- package/types/trismegisto-angular-progress.d.ts +20 -3
- package/types/trismegisto-angular-progress.d.ts.map +1 -1
- package/types/trismegisto-angular-rating.d.ts +83 -0
- package/types/trismegisto-angular-rating.d.ts.map +1 -0
- package/types/trismegisto-angular-reason-dialog.d.ts +65 -0
- package/types/trismegisto-angular-reason-dialog.d.ts.map +1 -0
- package/types/trismegisto-angular-recurrence-editor.d.ts +151 -0
- package/types/trismegisto-angular-recurrence-editor.d.ts.map +1 -0
- package/types/trismegisto-angular-release-timeline.d.ts +79 -0
- package/types/trismegisto-angular-release-timeline.d.ts.map +1 -0
- package/types/trismegisto-angular-report-history.d.ts +144 -0
- package/types/trismegisto-angular-report-history.d.ts.map +1 -0
- package/types/trismegisto-angular-report-schedule.d.ts +138 -0
- package/types/trismegisto-angular-report-schedule.d.ts.map +1 -0
- package/types/trismegisto-angular-resource-calendar.d.ts +107 -0
- package/types/trismegisto-angular-resource-calendar.d.ts.map +1 -0
- package/types/trismegisto-angular-resource-usage.d.ts +91 -0
- package/types/trismegisto-angular-resource-usage.d.ts.map +1 -0
- package/types/trismegisto-angular-return-request.d.ts +158 -0
- package/types/trismegisto-angular-return-request.d.ts.map +1 -0
- package/types/trismegisto-angular-risk-register.d.ts +130 -0
- package/types/trismegisto-angular-risk-register.d.ts.map +1 -0
- package/types/trismegisto-angular-save-status.d.ts +67 -0
- package/types/trismegisto-angular-save-status.d.ts.map +1 -0
- package/types/trismegisto-angular-service-map.d.ts +111 -0
- package/types/trismegisto-angular-service-map.d.ts.map +1 -0
- package/types/trismegisto-angular-service-status.d.ts +82 -0
- package/types/trismegisto-angular-service-status.d.ts.map +1 -0
- package/types/trismegisto-angular-shipping.d.ts +221 -0
- package/types/trismegisto-angular-shipping.d.ts.map +1 -0
- package/types/trismegisto-angular-sidebar.d.ts +1 -0
- package/types/trismegisto-angular-sidebar.d.ts.map +1 -1
- package/types/trismegisto-angular-skip-link.d.ts +53 -0
- package/types/trismegisto-angular-skip-link.d.ts.map +1 -0
- package/types/trismegisto-angular-sla-summary.d.ts +104 -0
- package/types/trismegisto-angular-sla-summary.d.ts.map +1 -0
- package/types/trismegisto-angular-slot-picker.d.ts +128 -0
- package/types/trismegisto-angular-slot-picker.d.ts.map +1 -0
- package/types/trismegisto-angular-split-button.d.ts +81 -0
- package/types/trismegisto-angular-split-button.d.ts.map +1 -0
- package/types/trismegisto-angular-status-badge.d.ts +40 -0
- package/types/trismegisto-angular-status-badge.d.ts.map +1 -0
- package/types/trismegisto-angular-status-select.d.ts +76 -0
- package/types/trismegisto-angular-status-select.d.ts.map +1 -0
- package/types/trismegisto-angular-storage-usage.d.ts +82 -0
- package/types/trismegisto-angular-storage-usage.d.ts.map +1 -0
- package/types/trismegisto-angular-swimlane-board.d.ts +114 -0
- package/types/trismegisto-angular-swimlane-board.d.ts.map +1 -0
- package/types/trismegisto-angular-sync-status.d.ts +191 -0
- package/types/trismegisto-angular-sync-status.d.ts.map +1 -0
- package/types/trismegisto-angular-tag-input.d.ts +121 -0
- package/types/trismegisto-angular-tag-input.d.ts.map +1 -0
- package/types/trismegisto-angular-task-card.d.ts +106 -0
- package/types/trismegisto-angular-task-card.d.ts.map +1 -0
- package/types/trismegisto-angular-task-detail.d.ts +248 -0
- package/types/trismegisto-angular-task-detail.d.ts.map +1 -0
- package/types/trismegisto-angular-textarea.d.ts +31 -1
- package/types/trismegisto-angular-textarea.d.ts.map +1 -1
- package/types/trismegisto-angular-time-range.d.ts +92 -0
- package/types/trismegisto-angular-time-range.d.ts.map +1 -0
- package/types/trismegisto-angular-toast.d.ts +50 -11
- package/types/trismegisto-angular-toast.d.ts.map +1 -1
- package/types/trismegisto-angular-tour.d.ts +116 -0
- package/types/trismegisto-angular-tour.d.ts.map +1 -0
- package/types/trismegisto-angular-trace-waterfall.d.ts +111 -0
- package/types/trismegisto-angular-trace-waterfall.d.ts.map +1 -0
- package/types/trismegisto-angular-transaction.d.ts +542 -0
- package/types/trismegisto-angular-transaction.d.ts.map +1 -0
- package/types/trismegisto-angular-tree-select.d.ts +197 -0
- package/types/trismegisto-angular-tree-select.d.ts.map +1 -0
- package/types/trismegisto-angular-unsaved-changes.d.ts +101 -0
- package/types/trismegisto-angular-unsaved-changes.d.ts.map +1 -0
- package/types/trismegisto-angular-uptime-bar.d.ts +90 -0
- package/types/trismegisto-angular-uptime-bar.d.ts.map +1 -0
- package/types/trismegisto-angular-user-card.d.ts +126 -0
- package/types/trismegisto-angular-user-card.d.ts.map +1 -0
- package/types/trismegisto-angular-vehicle-plate.d.ts +107 -0
- package/types/trismegisto-angular-vehicle-plate.d.ts.map +1 -0
- package/types/trismegisto-angular-webhook.d.ts +244 -0
- package/types/trismegisto-angular-webhook.d.ts.map +1 -0
- package/types/trismegisto-angular-workflow-diagram.d.ts +136 -0
- package/types/trismegisto-angular-workflow-diagram.d.ts.map +1 -0
- package/types/trismegisto-angular-workflow-i18n.d.ts +358 -0
- package/types/trismegisto-angular-workflow-i18n.d.ts.map +1 -0
- package/types/trismegisto-angular-workload.d.ts +64 -0
- package/types/trismegisto-angular-workload.d.ts.map +1 -0
- package/types/trismegisto-angular-workspace-persistence.d.ts +5 -4
- package/types/trismegisto-angular-workspace-persistence.d.ts.map +1 -1
- package/types/trismegisto-angular-workspace.d.ts +79 -7
- package/types/trismegisto-angular-workspace.d.ts.map +1 -1
- package/types/trismegisto-angular.d.ts +120 -10
- package/types/trismegisto-angular.d.ts.map +1 -1
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { input, model, booleanAttribute, output, inject, computed, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { FILE_COLLECTIONS, filterFiles, groupFilesByRecency, pluralMessage, formatMessage, fileReferenceTime, formatFileSize } from '@trismegisto/primitives';
|
|
4
|
+
import { HERMES_MESSAGES, HermesI18nService } from '@trismegisto/angular/i18n';
|
|
5
|
+
import { fileIconName } from '@trismegisto/angular/attachment';
|
|
6
|
+
import { IconButtonComponent } from '@trismegisto/angular/icon-button';
|
|
7
|
+
import { ICON_DOCUMENT_CSV, ICON_DOCUMENT_DOC, ICON_DOCUMENT_IMAGE, ICON_DOCUMENT_PDF, ICON_DOCUMENTS_EXCEL, ICON_FILE, ICON_FILE_TEXT, ICON_FILE_ZIP, ICON_FOLDER, ICON_STAR, useHermesIcons, IconComponent } from '@trismegisto/angular/icon';
|
|
8
|
+
import { SegmentedControlComponent } from '@trismegisto/angular/segmented-control';
|
|
9
|
+
|
|
10
|
+
const FILE_LIST_MESSAGES_PT_BR = {
|
|
11
|
+
label: 'Arquivos',
|
|
12
|
+
collections: {
|
|
13
|
+
all: 'Todos',
|
|
14
|
+
recent: 'Recentes',
|
|
15
|
+
shared: 'Compartilhados comigo',
|
|
16
|
+
favorites: 'Favoritos',
|
|
17
|
+
},
|
|
18
|
+
collection: 'Mostrar',
|
|
19
|
+
buckets: {
|
|
20
|
+
today: 'Hoje',
|
|
21
|
+
yesterday: 'Ontem',
|
|
22
|
+
week: 'Últimos 7 dias',
|
|
23
|
+
month: 'Últimos 30 dias',
|
|
24
|
+
older: 'Mais antigos',
|
|
25
|
+
},
|
|
26
|
+
modifiedBy: 'Alterado por {name}',
|
|
27
|
+
sharedBy: 'Compartilhado por {name}',
|
|
28
|
+
favorite: 'Favorito: {name}',
|
|
29
|
+
folder: 'Pasta',
|
|
30
|
+
empty: {
|
|
31
|
+
all: 'Nenhum arquivo.',
|
|
32
|
+
recent: 'Nada aberto recentemente.',
|
|
33
|
+
shared: 'Ninguém compartilhou arquivos com você.',
|
|
34
|
+
favorites: 'Marque arquivos com a estrela para encontrá-los aqui.',
|
|
35
|
+
},
|
|
36
|
+
count: {
|
|
37
|
+
zero: 'Nenhum arquivo',
|
|
38
|
+
one: '{count} arquivo',
|
|
39
|
+
other: '{count} arquivos',
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
const FILE_LIST_MESSAGES_EN = {
|
|
43
|
+
label: 'Files',
|
|
44
|
+
collections: {
|
|
45
|
+
all: 'All',
|
|
46
|
+
recent: 'Recent',
|
|
47
|
+
shared: 'Shared with me',
|
|
48
|
+
favorites: 'Favorites',
|
|
49
|
+
},
|
|
50
|
+
collection: 'Show',
|
|
51
|
+
buckets: {
|
|
52
|
+
today: 'Today',
|
|
53
|
+
yesterday: 'Yesterday',
|
|
54
|
+
week: 'Last 7 days',
|
|
55
|
+
month: 'Last 30 days',
|
|
56
|
+
older: 'Older',
|
|
57
|
+
},
|
|
58
|
+
modifiedBy: 'Modified by {name}',
|
|
59
|
+
sharedBy: 'Shared by {name}',
|
|
60
|
+
favorite: 'Favorite: {name}',
|
|
61
|
+
folder: 'Folder',
|
|
62
|
+
empty: {
|
|
63
|
+
all: 'No files.',
|
|
64
|
+
recent: 'Nothing opened recently.',
|
|
65
|
+
shared: 'Nobody has shared files with you.',
|
|
66
|
+
favorites: 'Star files to find them here.',
|
|
67
|
+
},
|
|
68
|
+
count: {
|
|
69
|
+
zero: 'No files',
|
|
70
|
+
one: '{count} file',
|
|
71
|
+
other: '{count} files',
|
|
72
|
+
},
|
|
73
|
+
};
|
|
74
|
+
const FILE_LIST_MESSAGES_ES = {
|
|
75
|
+
label: 'Archivos',
|
|
76
|
+
collections: {
|
|
77
|
+
all: 'Todos',
|
|
78
|
+
recent: 'Recientes',
|
|
79
|
+
shared: 'Compartidos conmigo',
|
|
80
|
+
favorites: 'Favoritos',
|
|
81
|
+
},
|
|
82
|
+
collection: 'Mostrar',
|
|
83
|
+
buckets: {
|
|
84
|
+
today: 'Hoy',
|
|
85
|
+
yesterday: 'Ayer',
|
|
86
|
+
week: 'Últimos 7 días',
|
|
87
|
+
month: 'Últimos 30 días',
|
|
88
|
+
older: 'Más antiguos',
|
|
89
|
+
},
|
|
90
|
+
modifiedBy: 'Modificado por {name}',
|
|
91
|
+
sharedBy: 'Compartido por {name}',
|
|
92
|
+
favorite: 'Favorito: {name}',
|
|
93
|
+
folder: 'Carpeta',
|
|
94
|
+
empty: {
|
|
95
|
+
all: 'Ningún archivo.',
|
|
96
|
+
recent: 'Nada abierto recientemente.',
|
|
97
|
+
shared: 'Nadie compartió archivos contigo.',
|
|
98
|
+
favorites: 'Marca archivos con la estrella para encontrarlos aquí.',
|
|
99
|
+
},
|
|
100
|
+
count: {
|
|
101
|
+
zero: 'Ningún archivo',
|
|
102
|
+
one: '{count} archivo',
|
|
103
|
+
other: '{count} archivos',
|
|
104
|
+
},
|
|
105
|
+
};
|
|
106
|
+
/** Catálogos por idioma, no formato do `HermesI18nService.pick`. */
|
|
107
|
+
const FILE_LIST_MESSAGES = { 'pt-BR': FILE_LIST_MESSAGES_PT_BR, en: FILE_LIST_MESSAGES_EN, es: FILE_LIST_MESSAGES_ES };
|
|
108
|
+
|
|
109
|
+
const FILE_LIST_ICONS = [ICON_DOCUMENT_CSV, ICON_DOCUMENT_DOC, ICON_DOCUMENT_IMAGE, ICON_DOCUMENT_PDF, ICON_DOCUMENTS_EXCEL, ICON_FILE, ICON_FILE_TEXT, ICON_FILE_ZIP, ICON_FOLDER, ICON_STAR];
|
|
110
|
+
|
|
111
|
+
let sequence = 0;
|
|
112
|
+
/** Ícones por tipo que o `fileIconName` devolve (literais aqui para o gerador registrá-los nesta pasta). */
|
|
113
|
+
const FILE_TYPE_ICONS = ['file', 'file-text', 'file-zip', 'document-pdf', 'document-doc', 'document-csv', 'documents-excel', 'document-image', 'folder'];
|
|
114
|
+
/**
|
|
115
|
+
* Lista de arquivos por coleção — **todos**, **recentes** (último acesso da pessoa), **compartilhados comigo**
|
|
116
|
+
* e **favoritos** — com o seletor de coleção (`collections`, `[(collection)]`), busca por texto (`query`),
|
|
117
|
+
* agrupamento por data ("Hoje", "Ontem", "Últimos 7 dias"...) e a estrela de favorito em cada linha. Ícone por
|
|
118
|
+
* tipo do mesmo jeito do `hm-attachment`. Só apresentação: `open` abre, `favoriteChange` pede a troca — quem
|
|
119
|
+
* grava e atualiza `files` é o app.
|
|
120
|
+
*
|
|
121
|
+
* Acessibilidade: cada grupo de data é uma lista com título; o nome do arquivo é o botão de abrir (com o
|
|
122
|
+
* contexto — quem alterou, quando, tamanho — na descrição); a estrela é botão de alternância
|
|
123
|
+
* (`aria-pressed`) com o nome do arquivo.
|
|
124
|
+
*/
|
|
125
|
+
class FileListComponent {
|
|
126
|
+
#icons = useHermesIcons(FILE_LIST_ICONS);
|
|
127
|
+
files = input.required(...(ngDevMode ? [{ debugName: "files" }] : /* istanbul ignore next */ []));
|
|
128
|
+
/** Coleção mostrada. Two-way. */
|
|
129
|
+
collection = model('all', ...(ngDevMode ? [{ debugName: "collection" }] : /* istanbul ignore next */ []));
|
|
130
|
+
/** Coleções no seletor (e a ordem). Vazio ou uma só esconde o seletor. */
|
|
131
|
+
collections = input(FILE_COLLECTIONS, ...(ngDevMode ? [{ debugName: "collections" }] : /* istanbul ignore next */ []));
|
|
132
|
+
/** Texto de busca (nome e local). */
|
|
133
|
+
query = input('', ...(ngDevMode ? [{ debugName: "query" }] : /* istanbul ignore next */ []));
|
|
134
|
+
/** Agrupa por data. Padrão: só em "recentes" e "compartilhados". */
|
|
135
|
+
groupByDate = input(null, ...(ngDevMode ? [{ debugName: "groupByDate" }] : /* istanbul ignore next */ []));
|
|
136
|
+
/** Limite de "recentes". */
|
|
137
|
+
recentLimit = input(50, ...(ngDevMode ? [{ debugName: "recentLimit" }] : /* istanbul ignore next */ []));
|
|
138
|
+
/** Mostra a estrela de favorito (padrão). */
|
|
139
|
+
favorites = input(true, { ...(ngDevMode ? { debugName: "favorites" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
140
|
+
/** Título (padrão: "Arquivos"). */
|
|
141
|
+
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
142
|
+
/** Agora, para os grupos de data (padrão: o relógio do navegador). */
|
|
143
|
+
now = input(null, ...(ngDevMode ? [{ debugName: "now" }] : /* istanbul ignore next */ []));
|
|
144
|
+
open = output();
|
|
145
|
+
favoriteChange = output();
|
|
146
|
+
/** Sobrescreve textos do catálogo da peça (parcial), ex.: termos do domínio do app. */
|
|
147
|
+
texts = input(null, ...(ngDevMode ? [{ debugName: "texts" }] : /* istanbul ignore next */ []));
|
|
148
|
+
messages = inject(HERMES_MESSAGES);
|
|
149
|
+
i18n = inject(HermesI18nService);
|
|
150
|
+
text = computed(() => ({ ...this.i18n.pick(FILE_LIST_MESSAGES, FILE_LIST_MESSAGES_PT_BR), ...this.texts() }), ...(ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []));
|
|
151
|
+
locale = computed(() => this.messages.meta.locale, ...(ngDevMode ? [{ debugName: "locale" }] : /* istanbul ignore next */ []));
|
|
152
|
+
id = `hm-file-list-${++sequence}`;
|
|
153
|
+
options = computed(() => this.collections().map((value) => ({ value, label: this.text().collections[value] })), ...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
|
|
154
|
+
visible = computed(() => filterFiles(this.files(), this.collection(), { query: this.query(), recentLimit: this.recentLimit(), locale: this.locale() }), ...(ngDevMode ? [{ debugName: "visible" }] : /* istanbul ignore next */ []));
|
|
155
|
+
grouped = computed(() => {
|
|
156
|
+
const collection = this.collection();
|
|
157
|
+
const group = this.groupByDate() ?? (collection === 'recent' || collection === 'shared');
|
|
158
|
+
if (!group)
|
|
159
|
+
return [{ bucket: null, files: this.visible() }];
|
|
160
|
+
return groupFilesByRecency(this.visible(), collection, this.now() ?? new Date());
|
|
161
|
+
}, ...(ngDevMode ? [{ debugName: "grouped" }] : /* istanbul ignore next */ []));
|
|
162
|
+
countText = computed(() => pluralMessage(this.text().count, this.visible().length, this.locale()), ...(ngDevMode ? [{ debugName: "countText" }] : /* istanbul ignore next */ []));
|
|
163
|
+
emptyText = computed(() => this.text().empty[this.collection()], ...(ngDevMode ? [{ debugName: "emptyText" }] : /* istanbul ignore next */ []));
|
|
164
|
+
setCollection(value) {
|
|
165
|
+
if (FILE_COLLECTIONS.includes(value))
|
|
166
|
+
this.collection.set(value);
|
|
167
|
+
}
|
|
168
|
+
icon(file) {
|
|
169
|
+
if (file.folder)
|
|
170
|
+
return 'folder';
|
|
171
|
+
const name = fileIconName(file.name, file.type ?? '');
|
|
172
|
+
return FILE_TYPE_ICONS.includes(name) ? name : 'file';
|
|
173
|
+
}
|
|
174
|
+
meta(file) {
|
|
175
|
+
const parts = [];
|
|
176
|
+
if (this.collection() === 'shared' && file.sharedBy)
|
|
177
|
+
parts.push(formatMessage(this.text().sharedBy, { name: file.sharedBy }));
|
|
178
|
+
else if (file.modifiedBy)
|
|
179
|
+
parts.push(formatMessage(this.text().modifiedBy, { name: file.modifiedBy }));
|
|
180
|
+
const time = fileReferenceTime(file, this.collection());
|
|
181
|
+
if (time)
|
|
182
|
+
parts.push(this.when(time));
|
|
183
|
+
if (file.folder)
|
|
184
|
+
parts.push(this.text().folder);
|
|
185
|
+
else if (file.size != null)
|
|
186
|
+
parts.push(formatFileSize(file.size, this.locale()));
|
|
187
|
+
if (file.location)
|
|
188
|
+
parts.push(file.location);
|
|
189
|
+
return parts.join(' · ');
|
|
190
|
+
}
|
|
191
|
+
when(time) {
|
|
192
|
+
const date = new Date(time);
|
|
193
|
+
const now = this.now() ?? new Date();
|
|
194
|
+
const sameDay = date.toDateString() === now.toDateString();
|
|
195
|
+
return new Intl.DateTimeFormat(this.locale(), sameDay ? { hour: '2-digit', minute: '2-digit' } : { day: 'numeric', month: 'short', year: date.getFullYear() === now.getFullYear() ? undefined : 'numeric' }).format(date);
|
|
196
|
+
}
|
|
197
|
+
favoriteLabel(file) {
|
|
198
|
+
return formatMessage(this.text().favorite, { name: file.name });
|
|
199
|
+
}
|
|
200
|
+
toggleFavorite(file, favorite) {
|
|
201
|
+
this.favoriteChange.emit({ file, favorite });
|
|
202
|
+
}
|
|
203
|
+
metaId(index, group) {
|
|
204
|
+
return `${this.id}-${group}-${index}`;
|
|
205
|
+
}
|
|
206
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: FileListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
207
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.24", type: FileListComponent, isStandalone: true, selector: "hm-file-list", inputs: { files: { classPropertyName: "files", publicName: "files", isSignal: true, isRequired: true, transformFunction: null }, collection: { classPropertyName: "collection", publicName: "collection", isSignal: true, isRequired: false, transformFunction: null }, collections: { classPropertyName: "collections", publicName: "collections", isSignal: true, isRequired: false, transformFunction: null }, query: { classPropertyName: "query", publicName: "query", isSignal: true, isRequired: false, transformFunction: null }, groupByDate: { classPropertyName: "groupByDate", publicName: "groupByDate", isSignal: true, isRequired: false, transformFunction: null }, recentLimit: { classPropertyName: "recentLimit", publicName: "recentLimit", isSignal: true, isRequired: false, transformFunction: null }, favorites: { classPropertyName: "favorites", publicName: "favorites", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, now: { classPropertyName: "now", publicName: "now", isSignal: true, isRequired: false, transformFunction: null }, texts: { classPropertyName: "texts", publicName: "texts", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { collection: "collectionChange", open: "open", favoriteChange: "favoriteChange" }, host: { classAttribute: "hm-file-list" }, ngImport: i0, template: "<div class=\"hm-file-list__head\">\n <p class=\"hm-file-list__title\" [id]=\"id + '-title'\">{{ label() || text().label }} <span class=\"hm-file-list__count\">{{ countText() }}</span></p>\n @if (options().length > 1) {\n <hm-segmented-control class=\"hm-file-list__collections\" size=\"small\" [label]=\"text().collection\" [options]=\"options()\" [value]=\"collection()\" (valueChange)=\"setCollection($event)\" />\n }\n</div>\n\n@if (visible().length) {\n @for (group of grouped(); track group.bucket; let g = $index) {\n <div class=\"hm-file-list__group\">\n @if (group.bucket) {\n <p class=\"hm-file-list__bucket\" [id]=\"id + '-bucket-' + g\">{{ text().buckets[group.bucket] }}</p>\n }\n <ul class=\"hm-file-list__items\" [attr.aria-labelledby]=\"group.bucket ? id + '-bucket-' + g : id + '-title'\">\n @for (file of group.files; track file.id; let i = $index) {\n <li class=\"hm-file-list__item\">\n <span class=\"hm-file-list__icon\" [attr.data-folder]=\"file.folder || null\" aria-hidden=\"true\"><hm-icon [shape]=\"icon(file)\" /></span>\n <button type=\"button\" class=\"hm-file-list__open\" [attr.aria-describedby]=\"metaId(i, g)\" (click)=\"open.emit(file)\">\n <span class=\"hm-file-list__name\">{{ file.name }}</span>\n </button>\n <span class=\"hm-file-list__meta\" [id]=\"metaId(i, g)\">{{ meta(file) }}</span>\n @if (favorites()) {\n <hm-icon-button\n class=\"hm-file-list__favorite\"\n icon=\"star\"\n [solid]=\"!!file.favorite\"\n emphasis=\"subtle\"\n size=\"small\"\n toggle\n [pressed]=\"!!file.favorite\"\n [label]=\"favoriteLabel(file)\"\n (pressedChange)=\"toggleFavorite(file, $event)\"\n />\n }\n </li>\n }\n </ul>\n </div>\n }\n} @else {\n <p class=\"hm-file-list__empty\">{{ emptyText() }}</p>\n}\n", dependencies: [{ kind: "component", type: IconButtonComponent, selector: "hm-icon-button", inputs: ["label", "icon", "solid", "iconDirection", "emphasis", "intent", "size", "disabled", "toggle", "pressed", "keyShortcuts"], outputs: ["pressedChange", "clicked"] }, { kind: "component", type: IconComponent, selector: "hm-icon", inputs: ["shape", "direction", "size", "solid", "badge", "status", "flip", "inverse", "label"] }, { kind: "component", type: SegmentedControlComponent, selector: "hm-segmented-control", inputs: ["options", "value", "label", "size", "emphasis"], outputs: ["valueChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
208
|
+
}
|
|
209
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: FileListComponent, decorators: [{
|
|
210
|
+
type: Component,
|
|
211
|
+
args: [{ selector: 'hm-file-list', imports: [IconButtonComponent, IconComponent, SegmentedControlComponent], changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'hm-file-list' }, template: "<div class=\"hm-file-list__head\">\n <p class=\"hm-file-list__title\" [id]=\"id + '-title'\">{{ label() || text().label }} <span class=\"hm-file-list__count\">{{ countText() }}</span></p>\n @if (options().length > 1) {\n <hm-segmented-control class=\"hm-file-list__collections\" size=\"small\" [label]=\"text().collection\" [options]=\"options()\" [value]=\"collection()\" (valueChange)=\"setCollection($event)\" />\n }\n</div>\n\n@if (visible().length) {\n @for (group of grouped(); track group.bucket; let g = $index) {\n <div class=\"hm-file-list__group\">\n @if (group.bucket) {\n <p class=\"hm-file-list__bucket\" [id]=\"id + '-bucket-' + g\">{{ text().buckets[group.bucket] }}</p>\n }\n <ul class=\"hm-file-list__items\" [attr.aria-labelledby]=\"group.bucket ? id + '-bucket-' + g : id + '-title'\">\n @for (file of group.files; track file.id; let i = $index) {\n <li class=\"hm-file-list__item\">\n <span class=\"hm-file-list__icon\" [attr.data-folder]=\"file.folder || null\" aria-hidden=\"true\"><hm-icon [shape]=\"icon(file)\" /></span>\n <button type=\"button\" class=\"hm-file-list__open\" [attr.aria-describedby]=\"metaId(i, g)\" (click)=\"open.emit(file)\">\n <span class=\"hm-file-list__name\">{{ file.name }}</span>\n </button>\n <span class=\"hm-file-list__meta\" [id]=\"metaId(i, g)\">{{ meta(file) }}</span>\n @if (favorites()) {\n <hm-icon-button\n class=\"hm-file-list__favorite\"\n icon=\"star\"\n [solid]=\"!!file.favorite\"\n emphasis=\"subtle\"\n size=\"small\"\n toggle\n [pressed]=\"!!file.favorite\"\n [label]=\"favoriteLabel(file)\"\n (pressedChange)=\"toggleFavorite(file, $event)\"\n />\n }\n </li>\n }\n </ul>\n </div>\n }\n} @else {\n <p class=\"hm-file-list__empty\">{{ emptyText() }}</p>\n}\n" }]
|
|
212
|
+
}], propDecorators: { files: [{ type: i0.Input, args: [{ isSignal: true, alias: "files", required: true }] }], collection: [{ type: i0.Input, args: [{ isSignal: true, alias: "collection", required: false }] }, { type: i0.Output, args: ["collectionChange"] }], collections: [{ type: i0.Input, args: [{ isSignal: true, alias: "collections", required: false }] }], query: [{ type: i0.Input, args: [{ isSignal: true, alias: "query", required: false }] }], groupByDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "groupByDate", required: false }] }], recentLimit: [{ type: i0.Input, args: [{ isSignal: true, alias: "recentLimit", required: false }] }], favorites: [{ type: i0.Input, args: [{ isSignal: true, alias: "favorites", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], now: [{ type: i0.Input, args: [{ isSignal: true, alias: "now", required: false }] }], open: [{ type: i0.Output, args: ["open"] }], favoriteChange: [{ type: i0.Output, args: ["favoriteChange"] }], texts: [{ type: i0.Input, args: [{ isSignal: true, alias: "texts", required: false }] }] } });
|
|
213
|
+
|
|
214
|
+
// Ponto de import `@trismegisto/angular/file-list` (secundário do ng-packagr): o que o public-api e as outras pastas usam
|
|
215
|
+
// daqui. Ao criar arquivo público novo na pasta, acrescente a linha.
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* Generated bundle index. Do not edit.
|
|
219
|
+
*/
|
|
220
|
+
|
|
221
|
+
export { FILE_LIST_MESSAGES, FILE_LIST_MESSAGES_EN, FILE_LIST_MESSAGES_ES, FILE_LIST_MESSAGES_PT_BR, FileListComponent };
|
|
222
|
+
//# sourceMappingURL=trismegisto-angular-file-list.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trismegisto-angular-file-list.mjs","sources":["../../src/file-list/file-list-messages.ts","../../src/file-list/icons.generated.ts","../../src/file-list/file-list.component.ts","../../src/file-list/file-list.component.html","../../src/file-list/index.ts","../../src/file-list/trismegisto-angular-file-list.ts"],"sourcesContent":["import type { CalendarFilesMessages } from '@trismegisto/primitives';\n\n// Textos da peça desta pasta, fora do HERMES_MESSAGES (o pt-BR daquele vai embutido em todo componente; este só\n// entra no bundle de quem usa a peça). O componente escolhe pelo idioma com `HermesI18nService.pick`.\nexport type FileListMessages = CalendarFilesMessages['fileList'];\n\nexport const FILE_LIST_MESSAGES_PT_BR: FileListMessages = {\n label: 'Arquivos',\n collections: {\n all: 'Todos',\n recent: 'Recentes',\n shared: 'Compartilhados comigo',\n favorites: 'Favoritos',\n },\n collection: 'Mostrar',\n buckets: {\n today: 'Hoje',\n yesterday: 'Ontem',\n week: 'Últimos 7 dias',\n month: 'Últimos 30 dias',\n older: 'Mais antigos',\n },\n modifiedBy: 'Alterado por {name}',\n sharedBy: 'Compartilhado por {name}',\n favorite: 'Favorito: {name}',\n folder: 'Pasta',\n empty: {\n all: 'Nenhum arquivo.',\n recent: 'Nada aberto recentemente.',\n shared: 'Ninguém compartilhou arquivos com você.',\n favorites: 'Marque arquivos com a estrela para encontrá-los aqui.',\n },\n count: {\n zero: 'Nenhum arquivo',\n one: '{count} arquivo',\n other: '{count} arquivos',\n },\n};\n\nexport const FILE_LIST_MESSAGES_EN: FileListMessages = {\n label: 'Files',\n collections: {\n all: 'All',\n recent: 'Recent',\n shared: 'Shared with me',\n favorites: 'Favorites',\n },\n collection: 'Show',\n buckets: {\n today: 'Today',\n yesterday: 'Yesterday',\n week: 'Last 7 days',\n month: 'Last 30 days',\n older: 'Older',\n },\n modifiedBy: 'Modified by {name}',\n sharedBy: 'Shared by {name}',\n favorite: 'Favorite: {name}',\n folder: 'Folder',\n empty: {\n all: 'No files.',\n recent: 'Nothing opened recently.',\n shared: 'Nobody has shared files with you.',\n favorites: 'Star files to find them here.',\n },\n count: {\n zero: 'No files',\n one: '{count} file',\n other: '{count} files',\n },\n};\n\nexport const FILE_LIST_MESSAGES_ES: FileListMessages = {\n label: 'Archivos',\n collections: {\n all: 'Todos',\n recent: 'Recientes',\n shared: 'Compartidos conmigo',\n favorites: 'Favoritos',\n },\n collection: 'Mostrar',\n buckets: {\n today: 'Hoy',\n yesterday: 'Ayer',\n week: 'Últimos 7 días',\n month: 'Últimos 30 días',\n older: 'Más antiguos',\n },\n modifiedBy: 'Modificado por {name}',\n sharedBy: 'Compartido por {name}',\n favorite: 'Favorito: {name}',\n folder: 'Carpeta',\n empty: {\n all: 'Ningún archivo.',\n recent: 'Nada abierto recientemente.',\n shared: 'Nadie compartió archivos contigo.',\n favorites: 'Marca archivos con la estrella para encontrarlos aquí.',\n },\n count: {\n zero: 'Ningún archivo',\n one: '{count} archivo',\n other: '{count} archivos',\n },\n};\n\n/** Catálogos por idioma, no formato do `HermesI18nService.pick`. */\nexport const FILE_LIST_MESSAGES: Readonly<Record<string, FileListMessages>> = { 'pt-BR': FILE_LIST_MESSAGES_PT_BR, en: FILE_LIST_MESSAGES_EN, es: FILE_LIST_MESSAGES_ES };\n","// GERADO por scripts/generate-internal-icons.mjs — não editar à mão.\n// Ícones que esta pasta usa por dentro; cada @Component/@Directive daqui os registra com\n// `readonly #icons = useHermesIcons(FILE_LIST_ICONS);`.\nimport type { RegisteredIcon } from '@trismegisto/icons';\nimport {\n ICON_DOCUMENT_CSV,\n ICON_DOCUMENT_DOC,\n ICON_DOCUMENT_IMAGE,\n ICON_DOCUMENT_PDF,\n ICON_DOCUMENTS_EXCEL,\n ICON_FILE,\n ICON_FILE_TEXT,\n ICON_FILE_ZIP,\n ICON_FOLDER,\n ICON_STAR,\n} from '@trismegisto/angular/icon';\n\nexport const FILE_LIST_ICONS: readonly RegisteredIcon[] = [ICON_DOCUMENT_CSV, ICON_DOCUMENT_DOC, ICON_DOCUMENT_IMAGE, ICON_DOCUMENT_PDF, ICON_DOCUMENTS_EXCEL, ICON_FILE, ICON_FILE_TEXT, ICON_FILE_ZIP, ICON_FOLDER, ICON_STAR];\n","import { booleanAttribute, ChangeDetectionStrategy, Component, computed, inject, input, model, output } from '@angular/core';\nimport {\n type FileCollection,\n type FileItem,\n FILE_COLLECTIONS,\n fileReferenceTime,\n filterFiles,\n formatFileSize,\n formatMessage,\n groupFilesByRecency,\n pluralMessage,\n} from '@trismegisto/primitives';\nimport { HERMES_MESSAGES, HermesI18nService } from '@trismegisto/angular/i18n';\nimport { FILE_LIST_MESSAGES, FILE_LIST_MESSAGES_PT_BR, type FileListMessages } from './file-list-messages';\nimport { fileIconName } from '@trismegisto/angular/attachment';\nimport { IconButtonComponent } from '@trismegisto/angular/icon-button';\nimport { IconComponent, useHermesIcons } from '@trismegisto/angular/icon';\nimport { SegmentedControlComponent, type SegmentedOption } from '@trismegisto/angular/segmented-control';\nimport { FILE_LIST_ICONS } from './icons.generated';\n\nexport type { FileCollection, FileItem } from '@trismegisto/primitives';\n\n/** O que `favoriteChange` emite: o arquivo e o novo estado. */\nexport interface FileFavoriteChange {\n readonly file: FileItem;\n readonly favorite: boolean;\n}\n\nlet sequence = 0;\n\n/** Ícones por tipo que o `fileIconName` devolve (literais aqui para o gerador registrá-los nesta pasta). */\nconst FILE_TYPE_ICONS: readonly string[] = ['file', 'file-text', 'file-zip', 'document-pdf', 'document-doc', 'document-csv', 'documents-excel', 'document-image', 'folder'];\n\n/**\n * Lista de arquivos por coleção — **todos**, **recentes** (último acesso da pessoa), **compartilhados comigo**\n * e **favoritos** — com o seletor de coleção (`collections`, `[(collection)]`), busca por texto (`query`),\n * agrupamento por data (\"Hoje\", \"Ontem\", \"Últimos 7 dias\"...) e a estrela de favorito em cada linha. Ícone por\n * tipo do mesmo jeito do `hm-attachment`. Só apresentação: `open` abre, `favoriteChange` pede a troca — quem\n * grava e atualiza `files` é o app.\n *\n * Acessibilidade: cada grupo de data é uma lista com título; o nome do arquivo é o botão de abrir (com o\n * contexto — quem alterou, quando, tamanho — na descrição); a estrela é botão de alternância\n * (`aria-pressed`) com o nome do arquivo.\n */\n@Component({\n selector: 'hm-file-list',\n imports: [IconButtonComponent, IconComponent, SegmentedControlComponent],\n templateUrl: './file-list.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'hm-file-list' },\n})\nexport class FileListComponent {\n readonly #icons = useHermesIcons(FILE_LIST_ICONS);\n\n readonly files = input.required<readonly FileItem[]>();\n /** Coleção mostrada. Two-way. */\n readonly collection = model<FileCollection>('all');\n /** Coleções no seletor (e a ordem). Vazio ou uma só esconde o seletor. */\n readonly collections = input<readonly FileCollection[]>(FILE_COLLECTIONS);\n /** Texto de busca (nome e local). */\n readonly query = input('');\n /** Agrupa por data. Padrão: só em \"recentes\" e \"compartilhados\". */\n readonly groupByDate = input<boolean | null>(null);\n /** Limite de \"recentes\". */\n readonly recentLimit = input(50);\n /** Mostra a estrela de favorito (padrão). */\n readonly favorites = input(true, { transform: booleanAttribute });\n /** Título (padrão: \"Arquivos\"). */\n readonly label = input('');\n /** Agora, para os grupos de data (padrão: o relógio do navegador). */\n readonly now = input<Date | null>(null);\n\n readonly open = output<FileItem>();\n readonly favoriteChange = output<FileFavoriteChange>();\n\n /** Sobrescreve textos do catálogo da peça (parcial), ex.: termos do domínio do app. */\n readonly texts = input<Partial<FileListMessages> | null>(null);\n\n private readonly messages = inject(HERMES_MESSAGES);\n private readonly i18n = inject(HermesI18nService);\n protected readonly text = computed<FileListMessages>(() => ({ ...this.i18n.pick(FILE_LIST_MESSAGES, FILE_LIST_MESSAGES_PT_BR), ...this.texts() }));\n protected readonly locale = computed(() => this.messages.meta.locale);\n protected readonly id = `hm-file-list-${++sequence}`;\n\n protected readonly options = computed<readonly SegmentedOption[]>(() => this.collections().map((value) => ({ value, label: this.text().collections[value] })));\n\n protected readonly visible = computed(() =>\n filterFiles(this.files(), this.collection(), { query: this.query(), recentLimit: this.recentLimit(), locale: this.locale() }),\n );\n\n protected readonly grouped = computed(() => {\n const collection = this.collection();\n const group = this.groupByDate() ?? (collection === 'recent' || collection === 'shared');\n if (!group) return [{ bucket: null, files: this.visible() }];\n return groupFilesByRecency(this.visible(), collection, this.now() ?? new Date());\n });\n\n protected readonly countText = computed(() => pluralMessage(this.text().count, this.visible().length, this.locale()));\n protected readonly emptyText = computed(() => this.text().empty[this.collection()]);\n\n protected setCollection(value: string): void {\n if ((FILE_COLLECTIONS as readonly string[]).includes(value)) this.collection.set(value as FileCollection);\n }\n\n protected icon(file: FileItem): string {\n if (file.folder) return 'folder';\n const name = fileIconName(file.name, file.type ?? '');\n return FILE_TYPE_ICONS.includes(name) ? name : 'file';\n }\n\n protected meta(file: FileItem): string {\n const parts: string[] = [];\n if (this.collection() === 'shared' && file.sharedBy) parts.push(formatMessage(this.text().sharedBy, { name: file.sharedBy }));\n else if (file.modifiedBy) parts.push(formatMessage(this.text().modifiedBy, { name: file.modifiedBy }));\n const time = fileReferenceTime(file, this.collection());\n if (time) parts.push(this.when(time));\n if (file.folder) parts.push(this.text().folder);\n else if (file.size != null) parts.push(formatFileSize(file.size, this.locale()));\n if (file.location) parts.push(file.location);\n return parts.join(' · ');\n }\n\n private when(time: number): string {\n const date = new Date(time);\n const now = this.now() ?? new Date();\n const sameDay = date.toDateString() === now.toDateString();\n return new Intl.DateTimeFormat(\n this.locale(),\n sameDay ? { hour: '2-digit', minute: '2-digit' } : { day: 'numeric', month: 'short', year: date.getFullYear() === now.getFullYear() ? undefined : 'numeric' },\n ).format(date);\n }\n\n protected favoriteLabel(file: FileItem): string {\n return formatMessage(this.text().favorite, { name: file.name });\n }\n\n protected toggleFavorite(file: FileItem, favorite: boolean): void {\n this.favoriteChange.emit({ file, favorite });\n }\n\n protected metaId(index: number, group: number): string {\n return `${this.id}-${group}-${index}`;\n }\n}\n","<div class=\"hm-file-list__head\">\n <p class=\"hm-file-list__title\" [id]=\"id + '-title'\">{{ label() || text().label }} <span class=\"hm-file-list__count\">{{ countText() }}</span></p>\n @if (options().length > 1) {\n <hm-segmented-control class=\"hm-file-list__collections\" size=\"small\" [label]=\"text().collection\" [options]=\"options()\" [value]=\"collection()\" (valueChange)=\"setCollection($event)\" />\n }\n</div>\n\n@if (visible().length) {\n @for (group of grouped(); track group.bucket; let g = $index) {\n <div class=\"hm-file-list__group\">\n @if (group.bucket) {\n <p class=\"hm-file-list__bucket\" [id]=\"id + '-bucket-' + g\">{{ text().buckets[group.bucket] }}</p>\n }\n <ul class=\"hm-file-list__items\" [attr.aria-labelledby]=\"group.bucket ? id + '-bucket-' + g : id + '-title'\">\n @for (file of group.files; track file.id; let i = $index) {\n <li class=\"hm-file-list__item\">\n <span class=\"hm-file-list__icon\" [attr.data-folder]=\"file.folder || null\" aria-hidden=\"true\"><hm-icon [shape]=\"icon(file)\" /></span>\n <button type=\"button\" class=\"hm-file-list__open\" [attr.aria-describedby]=\"metaId(i, g)\" (click)=\"open.emit(file)\">\n <span class=\"hm-file-list__name\">{{ file.name }}</span>\n </button>\n <span class=\"hm-file-list__meta\" [id]=\"metaId(i, g)\">{{ meta(file) }}</span>\n @if (favorites()) {\n <hm-icon-button\n class=\"hm-file-list__favorite\"\n icon=\"star\"\n [solid]=\"!!file.favorite\"\n emphasis=\"subtle\"\n size=\"small\"\n toggle\n [pressed]=\"!!file.favorite\"\n [label]=\"favoriteLabel(file)\"\n (pressedChange)=\"toggleFavorite(file, $event)\"\n />\n }\n </li>\n }\n </ul>\n </div>\n }\n} @else {\n <p class=\"hm-file-list__empty\">{{ emptyText() }}</p>\n}\n","// Ponto de import `@trismegisto/angular/file-list` (secundário do ng-packagr): o que o public-api e as outras pastas usam\n// daqui. Ao criar arquivo público novo na pasta, acrescente a linha.\nexport * from './file-list.component';\nexport * from './file-list-messages';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAMO,MAAM,wBAAwB,GAAqB;AACxD,IAAA,KAAK,EAAE,UAAU;AACjB,IAAA,WAAW,EAAE;AACX,QAAA,GAAG,EAAE,OAAO;AACZ,QAAA,MAAM,EAAE,UAAU;AAClB,QAAA,MAAM,EAAE,uBAAuB;AAC/B,QAAA,SAAS,EAAE,WAAW;AACvB,KAAA;AACD,IAAA,UAAU,EAAE,SAAS;AACrB,IAAA,OAAO,EAAE;AACP,QAAA,KAAK,EAAE,MAAM;AACb,QAAA,SAAS,EAAE,OAAO;AAClB,QAAA,IAAI,EAAE,gBAAgB;AACtB,QAAA,KAAK,EAAE,iBAAiB;AACxB,QAAA,KAAK,EAAE,cAAc;AACtB,KAAA;AACD,IAAA,UAAU,EAAE,qBAAqB;AACjC,IAAA,QAAQ,EAAE,0BAA0B;AACpC,IAAA,QAAQ,EAAE,kBAAkB;AAC5B,IAAA,MAAM,EAAE,OAAO;AACf,IAAA,KAAK,EAAE;AACL,QAAA,GAAG,EAAE,iBAAiB;AACtB,QAAA,MAAM,EAAE,2BAA2B;AACnC,QAAA,MAAM,EAAE,yCAAyC;AACjD,QAAA,SAAS,EAAE,uDAAuD;AACnE,KAAA;AACD,IAAA,KAAK,EAAE;AACL,QAAA,IAAI,EAAE,gBAAgB;AACtB,QAAA,GAAG,EAAE,iBAAiB;AACtB,QAAA,KAAK,EAAE,kBAAkB;AAC1B,KAAA;;AAGI,MAAM,qBAAqB,GAAqB;AACrD,IAAA,KAAK,EAAE,OAAO;AACd,IAAA,WAAW,EAAE;AACX,QAAA,GAAG,EAAE,KAAK;AACV,QAAA,MAAM,EAAE,QAAQ;AAChB,QAAA,MAAM,EAAE,gBAAgB;A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AA,EAAA,WAAA,EAAA,IAAA,EDIY,mBAAmB,EAAA,QAAA,EAAA,gBAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,MAAA,EAAA,OAAA,EAAA,eAAA,EAAA,UAAA,EAAA,QAAA,EAAA,MAAA,EAAA,UAAA,EAAA,QAAA,EAAA,SAAA,EAAA,cAAA,CAAA,EAAA,OAAA,EAAA,CAAA,eAAA,EAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,aAAa,oJAAE,yBAAyB,EAAA,QAAA,EAAA,sBAAA,EAAA,MAAA,EAAA,CAAA,SAAA,EAAA,OAAA,EAAA,OAAA,EAAA,MAAA,EAAA,UAAA,CAAA,EAAA,OAAA,EAAA,CAAA,aAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FAK5D,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAP7B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,cAAc,WACf,CAAC,mBAAmB,EAAE,aAAa,EAAE,yBAAyB,CAAC,EAAA,eAAA,EAEvD,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC,EAAE,KAAK,EAAE,cAAc,EAAE,EAAA,QAAA,EAAA,2/DAAA,EAAA;;;AEjDjC;AACA;;ACDA;;AAEG;;"}
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { input, model, booleanAttribute, output, inject, computed, signal, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { FILE_ROLES, sortFilePermissions, pluralMessage, FILE_LINK_ACCESS, formatMessage, initials, wouldRemoveLastOwner } from '@trismegisto/primitives';
|
|
4
|
+
import { HERMES_MESSAGES, HermesI18nService } from '@trismegisto/angular/i18n';
|
|
5
|
+
import { ButtonComponent } from '@trismegisto/angular/button';
|
|
6
|
+
import { CopyButtonComponent } from '@trismegisto/angular/copy-button';
|
|
7
|
+
import { IconButtonComponent } from '@trismegisto/angular/icon-button';
|
|
8
|
+
import { ICON_EXCLAMATION_TRIANGLE, ICON_ORGANIZATION, ICON_TIMES, ICON_USER, ICON_USER_GROUP, ICON_USER_PLUS, useHermesIcons, IconComponent } from '@trismegisto/angular/icon';
|
|
9
|
+
import { InputComponent } from '@trismegisto/angular/input';
|
|
10
|
+
import { RadioComponent } from '@trismegisto/angular/radio';
|
|
11
|
+
import { SelectComponent } from '@trismegisto/angular/select';
|
|
12
|
+
|
|
13
|
+
const FILE_PERMISSIONS_MESSAGES_PT_BR = {
|
|
14
|
+
label: 'Acesso ao arquivo',
|
|
15
|
+
invite: 'Adicionar pessoas ou grupos',
|
|
16
|
+
invitePlaceholder: 'Nome ou e-mail',
|
|
17
|
+
inviteRole: 'Papel',
|
|
18
|
+
inviteButton: 'Adicionar',
|
|
19
|
+
people: 'Quem tem acesso',
|
|
20
|
+
roles: {
|
|
21
|
+
owner: 'Proprietário',
|
|
22
|
+
editor: 'Editor',
|
|
23
|
+
commenter: 'Comentador',
|
|
24
|
+
viewer: 'Leitor',
|
|
25
|
+
},
|
|
26
|
+
roleFor: 'Papel de {name}',
|
|
27
|
+
remove: 'Remover o acesso de {name}',
|
|
28
|
+
inherited: 'Herdado da pasta',
|
|
29
|
+
inheritedFolder: 'Herdado de {folder}',
|
|
30
|
+
lastOwner: 'O arquivo precisa de pelo menos um proprietário.',
|
|
31
|
+
kinds: {
|
|
32
|
+
user: 'Pessoa',
|
|
33
|
+
group: 'Grupo',
|
|
34
|
+
domain: 'Domínio',
|
|
35
|
+
},
|
|
36
|
+
linkTitle: 'Acesso pelo link',
|
|
37
|
+
linkAccess: 'Quem pode abrir pelo link',
|
|
38
|
+
linkOptions: {
|
|
39
|
+
restricted: 'Restrito',
|
|
40
|
+
organization: 'Toda a organização',
|
|
41
|
+
anyone: 'Qualquer pessoa com o link',
|
|
42
|
+
},
|
|
43
|
+
linkHints: {
|
|
44
|
+
restricted: 'Só quem está na lista acima abre o link.',
|
|
45
|
+
organization: 'Qualquer pessoa da organização abre o link.',
|
|
46
|
+
anyone: 'Qualquer pessoa com o link abre, mesmo sem conta.',
|
|
47
|
+
},
|
|
48
|
+
copyLink: 'Copiar link',
|
|
49
|
+
copiedLink: 'Link copiado',
|
|
50
|
+
count: {
|
|
51
|
+
one: '{count} pessoa ou grupo',
|
|
52
|
+
other: '{count} pessoas ou grupos',
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
const FILE_PERMISSIONS_MESSAGES_EN = {
|
|
56
|
+
label: 'File access',
|
|
57
|
+
invite: 'Add people or groups',
|
|
58
|
+
invitePlaceholder: 'Name or email',
|
|
59
|
+
inviteRole: 'Role',
|
|
60
|
+
inviteButton: 'Add',
|
|
61
|
+
people: 'People with access',
|
|
62
|
+
roles: {
|
|
63
|
+
owner: 'Owner',
|
|
64
|
+
editor: 'Editor',
|
|
65
|
+
commenter: 'Commenter',
|
|
66
|
+
viewer: 'Viewer',
|
|
67
|
+
},
|
|
68
|
+
roleFor: 'Role of {name}',
|
|
69
|
+
remove: 'Remove access for {name}',
|
|
70
|
+
inherited: 'Inherited from the folder',
|
|
71
|
+
inheritedFolder: 'Inherited from {folder}',
|
|
72
|
+
lastOwner: 'The file needs at least one owner.',
|
|
73
|
+
kinds: {
|
|
74
|
+
user: 'Person',
|
|
75
|
+
group: 'Group',
|
|
76
|
+
domain: 'Domain',
|
|
77
|
+
},
|
|
78
|
+
linkTitle: 'Link access',
|
|
79
|
+
linkAccess: 'Who can open with the link',
|
|
80
|
+
linkOptions: {
|
|
81
|
+
restricted: 'Restricted',
|
|
82
|
+
organization: 'Whole organization',
|
|
83
|
+
anyone: 'Anyone with the link',
|
|
84
|
+
},
|
|
85
|
+
linkHints: {
|
|
86
|
+
restricted: 'Only people on the list above can open the link.',
|
|
87
|
+
organization: 'Anyone in the organization can open the link.',
|
|
88
|
+
anyone: 'Anyone with the link can open it, even without an account.',
|
|
89
|
+
},
|
|
90
|
+
copyLink: 'Copy link',
|
|
91
|
+
copiedLink: 'Link copied',
|
|
92
|
+
count: {
|
|
93
|
+
one: '{count} person or group',
|
|
94
|
+
other: '{count} people or groups',
|
|
95
|
+
},
|
|
96
|
+
};
|
|
97
|
+
const FILE_PERMISSIONS_MESSAGES_ES = {
|
|
98
|
+
label: 'Acceso al archivo',
|
|
99
|
+
invite: 'Añadir personas o grupos',
|
|
100
|
+
invitePlaceholder: 'Nombre o correo',
|
|
101
|
+
inviteRole: 'Rol',
|
|
102
|
+
inviteButton: 'Añadir',
|
|
103
|
+
people: 'Quién tiene acceso',
|
|
104
|
+
roles: {
|
|
105
|
+
owner: 'Propietario',
|
|
106
|
+
editor: 'Editor',
|
|
107
|
+
commenter: 'Comentarista',
|
|
108
|
+
viewer: 'Lector',
|
|
109
|
+
},
|
|
110
|
+
roleFor: 'Rol de {name}',
|
|
111
|
+
remove: 'Quitar el acceso de {name}',
|
|
112
|
+
inherited: 'Heredado de la carpeta',
|
|
113
|
+
inheritedFolder: 'Heredado de {folder}',
|
|
114
|
+
lastOwner: 'El archivo necesita al menos un propietario.',
|
|
115
|
+
kinds: {
|
|
116
|
+
user: 'Persona',
|
|
117
|
+
group: 'Grupo',
|
|
118
|
+
domain: 'Dominio',
|
|
119
|
+
},
|
|
120
|
+
linkTitle: 'Acceso por enlace',
|
|
121
|
+
linkAccess: 'Quién puede abrir con el enlace',
|
|
122
|
+
linkOptions: {
|
|
123
|
+
restricted: 'Restringido',
|
|
124
|
+
organization: 'Toda la organización',
|
|
125
|
+
anyone: 'Cualquiera con el enlace',
|
|
126
|
+
},
|
|
127
|
+
linkHints: {
|
|
128
|
+
restricted: 'Solo quienes están en la lista de arriba abren el enlace.',
|
|
129
|
+
organization: 'Cualquier persona de la organización abre el enlace.',
|
|
130
|
+
anyone: 'Cualquiera con el enlace lo abre, incluso sin cuenta.',
|
|
131
|
+
},
|
|
132
|
+
copyLink: 'Copiar enlace',
|
|
133
|
+
copiedLink: 'Enlace copiado',
|
|
134
|
+
count: {
|
|
135
|
+
one: '{count} persona o grupo',
|
|
136
|
+
other: '{count} personas o grupos',
|
|
137
|
+
},
|
|
138
|
+
};
|
|
139
|
+
/** Catálogos por idioma, no formato do `HermesI18nService.pick`. */
|
|
140
|
+
const FILE_PERMISSIONS_MESSAGES = { 'pt-BR': FILE_PERMISSIONS_MESSAGES_PT_BR, en: FILE_PERMISSIONS_MESSAGES_EN, es: FILE_PERMISSIONS_MESSAGES_ES };
|
|
141
|
+
|
|
142
|
+
const FILE_PERMISSIONS_ICONS = [ICON_EXCLAMATION_TRIANGLE, ICON_ORGANIZATION, ICON_TIMES, ICON_USER, ICON_USER_GROUP, ICON_USER_PLUS];
|
|
143
|
+
|
|
144
|
+
let sequence = 0;
|
|
145
|
+
const KIND_ICON = { user: 'user', group: 'user-group', domain: 'organization' };
|
|
146
|
+
/**
|
|
147
|
+
* Permissões de um arquivo ou pasta: adicionar pessoas/grupos com um papel, a lista de quem tem acesso (dono
|
|
148
|
+
* primeiro; herdados da pasta aparecem com a origem e não mudam aqui) com troca de papel e remoção, e o acesso
|
|
149
|
+
* pelo link (restrito / organização / qualquer pessoa) com "copiar link". Só emite a intenção (`invite`,
|
|
150
|
+
* `roleChange`, `remove`, `[(linkAccess)]`); quem aplica — e quem decide quem pode o quê — é o servidor.
|
|
151
|
+
*
|
|
152
|
+
* Proteção de UI: rebaixar ou remover o último proprietário é recusado na hora (com o aviso), sem emitir.
|
|
153
|
+
*
|
|
154
|
+
* Acessibilidade: cada pessoa é um item de lista com nome, e-mail e tipo em texto; o seletor de papel e o
|
|
155
|
+
* "remover" levam o nome no nome acessível; o aviso do último dono sai numa região `role="alert"`.
|
|
156
|
+
*/
|
|
157
|
+
class FilePermissionsComponent {
|
|
158
|
+
#icons = useHermesIcons(FILE_PERMISSIONS_ICONS);
|
|
159
|
+
entries = input.required(...(ngDevMode ? [{ debugName: "entries" }] : /* istanbul ignore next */ []));
|
|
160
|
+
/** Papéis do seletor, do maior para o menor acesso. Padrão: proprietário, editor, comentador, leitor. */
|
|
161
|
+
roles = input(null, ...(ngDevMode ? [{ debugName: "roles" }] : /* istanbul ignore next */ []));
|
|
162
|
+
/** Papel que conta como dono (não pode ficar sem nenhum). */
|
|
163
|
+
ownerRole = input('owner', ...(ngDevMode ? [{ debugName: "ownerRole" }] : /* istanbul ignore next */ []));
|
|
164
|
+
/** Papel padrão do convite. */
|
|
165
|
+
inviteRole = input('viewer', ...(ngDevMode ? [{ debugName: "inviteRole" }] : /* istanbul ignore next */ []));
|
|
166
|
+
/** Acesso pelo link. `null` esconde a seção. Two-way. */
|
|
167
|
+
linkAccess = model(null, ...(ngDevMode ? [{ debugName: "linkAccess" }] : /* istanbul ignore next */ []));
|
|
168
|
+
/** Link do arquivo para "copiar link". */
|
|
169
|
+
link = input('', ...(ngDevMode ? [{ debugName: "link" }] : /* istanbul ignore next */ []));
|
|
170
|
+
/** A pessoa pode gerenciar (sem isso, tudo é só leitura). */
|
|
171
|
+
canManage = input(true, { ...(ngDevMode ? { debugName: "canManage" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
172
|
+
/** Título (padrão: "Acesso ao arquivo"). */
|
|
173
|
+
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
174
|
+
invite = output();
|
|
175
|
+
roleChange = output();
|
|
176
|
+
remove = output();
|
|
177
|
+
/** Sobrescreve textos do catálogo da peça (parcial), ex.: termos do domínio do app. */
|
|
178
|
+
texts = input(null, ...(ngDevMode ? [{ debugName: "texts" }] : /* istanbul ignore next */ []));
|
|
179
|
+
messages = inject(HERMES_MESSAGES);
|
|
180
|
+
i18n = inject(HermesI18nService);
|
|
181
|
+
text = computed(() => ({ ...this.i18n.pick(FILE_PERMISSIONS_MESSAGES, FILE_PERMISSIONS_MESSAGES_PT_BR), ...this.texts() }), ...(ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []));
|
|
182
|
+
locale = computed(() => this.messages.meta.locale, ...(ngDevMode ? [{ debugName: "locale" }] : /* istanbul ignore next */ []));
|
|
183
|
+
id = `hm-file-permissions-${++sequence}`;
|
|
184
|
+
query = signal('', ...(ngDevMode ? [{ debugName: "query" }] : /* istanbul ignore next */ []));
|
|
185
|
+
newRole = signal(null, ...(ngDevMode ? [{ debugName: "newRole" }] : /* istanbul ignore next */ []));
|
|
186
|
+
warning = signal('', ...(ngDevMode ? [{ debugName: "warning" }] : /* istanbul ignore next */ []));
|
|
187
|
+
/** Recria as linhas quando uma troca é recusada (o `<select>` nativo voltaria a mostrar o papel de antes). */
|
|
188
|
+
refresh = signal(0, ...(ngDevMode ? [{ debugName: "refresh" }] : /* istanbul ignore next */ []));
|
|
189
|
+
roleOptions = computed(() => {
|
|
190
|
+
const custom = this.roles();
|
|
191
|
+
if (custom?.length)
|
|
192
|
+
return custom;
|
|
193
|
+
const names = this.text().roles;
|
|
194
|
+
return FILE_ROLES.map((value) => ({ value, label: names[value] }));
|
|
195
|
+
}, ...(ngDevMode ? [{ debugName: "roleOptions" }] : /* istanbul ignore next */ []));
|
|
196
|
+
/** Convite não oferece "proprietário": transferir posse é outro fluxo. */
|
|
197
|
+
inviteOptions = computed(() => this.roleOptions().filter((r) => r.value !== this.ownerRole()), ...(ngDevMode ? [{ debugName: "inviteOptions" }] : /* istanbul ignore next */ []));
|
|
198
|
+
chosenRole = computed(() => this.newRole() ?? this.inviteRole(), ...(ngDevMode ? [{ debugName: "chosenRole" }] : /* istanbul ignore next */ []));
|
|
199
|
+
sorted = computed(() => sortFilePermissions(this.entries(), this.roleOptions().map((r) => r.value), this.locale()), ...(ngDevMode ? [{ debugName: "sorted" }] : /* istanbul ignore next */ []));
|
|
200
|
+
countText = computed(() => pluralMessage(this.text().count, this.entries().length, this.locale()), ...(ngDevMode ? [{ debugName: "countText" }] : /* istanbul ignore next */ []));
|
|
201
|
+
linkOptions = computed(() => {
|
|
202
|
+
const text = this.text();
|
|
203
|
+
return FILE_LINK_ACCESS.map((value) => ({ value, label: text.linkOptions[value], description: text.linkHints[value] }));
|
|
204
|
+
}, ...(ngDevMode ? [{ debugName: "linkOptions" }] : /* istanbul ignore next */ []));
|
|
205
|
+
roleLabel(role) {
|
|
206
|
+
return this.roleOptions().find((r) => r.value === role)?.label ?? role;
|
|
207
|
+
}
|
|
208
|
+
kindIcon(entry) {
|
|
209
|
+
return KIND_ICON[entry.kind ?? 'user'] ?? 'user';
|
|
210
|
+
}
|
|
211
|
+
kindText(entry) {
|
|
212
|
+
return this.text().kinds[entry.kind ?? 'user'];
|
|
213
|
+
}
|
|
214
|
+
inheritedText(entry) {
|
|
215
|
+
return entry.inheritedFrom ? formatMessage(this.text().inheritedFolder, { folder: entry.inheritedFrom }) : this.text().inherited;
|
|
216
|
+
}
|
|
217
|
+
initials(name) {
|
|
218
|
+
return initials(name).toLocaleUpperCase();
|
|
219
|
+
}
|
|
220
|
+
fmt(template, name) {
|
|
221
|
+
return formatMessage(template, { name });
|
|
222
|
+
}
|
|
223
|
+
setQuery(value) {
|
|
224
|
+
this.query.set(String(value ?? ''));
|
|
225
|
+
}
|
|
226
|
+
submitInvite(event) {
|
|
227
|
+
event?.preventDefault();
|
|
228
|
+
const query = this.query().trim();
|
|
229
|
+
if (!query)
|
|
230
|
+
return;
|
|
231
|
+
this.invite.emit({ query, role: this.chosenRole() });
|
|
232
|
+
this.query.set('');
|
|
233
|
+
}
|
|
234
|
+
changeRole(entry, role) {
|
|
235
|
+
if (!role || role === entry.role)
|
|
236
|
+
return;
|
|
237
|
+
if (wouldRemoveLastOwner(this.entries(), entry.id, role, this.ownerRole())) {
|
|
238
|
+
this.warning.set(this.text().lastOwner);
|
|
239
|
+
this.refresh.update((n) => n + 1);
|
|
240
|
+
return;
|
|
241
|
+
}
|
|
242
|
+
this.warning.set('');
|
|
243
|
+
this.roleChange.emit({ entry, role });
|
|
244
|
+
}
|
|
245
|
+
removeEntry(entry) {
|
|
246
|
+
if (wouldRemoveLastOwner(this.entries(), entry.id, null, this.ownerRole())) {
|
|
247
|
+
this.warning.set(this.text().lastOwner);
|
|
248
|
+
return;
|
|
249
|
+
}
|
|
250
|
+
this.warning.set('');
|
|
251
|
+
this.remove.emit(entry);
|
|
252
|
+
}
|
|
253
|
+
setLinkAccess(value) {
|
|
254
|
+
if (FILE_LINK_ACCESS.includes(value))
|
|
255
|
+
this.linkAccess.set(value);
|
|
256
|
+
}
|
|
257
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: FilePermissionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
258
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.24", type: FilePermissionsComponent, isStandalone: true, selector: "hm-file-permissions", inputs: { entries: { classPropertyName: "entries", publicName: "entries", isSignal: true, isRequired: true, transformFunction: null }, roles: { classPropertyName: "roles", publicName: "roles", isSignal: true, isRequired: false, transformFunction: null }, ownerRole: { classPropertyName: "ownerRole", publicName: "ownerRole", isSignal: true, isRequired: false, transformFunction: null }, inviteRole: { classPropertyName: "inviteRole", publicName: "inviteRole", isSignal: true, isRequired: false, transformFunction: null }, linkAccess: { classPropertyName: "linkAccess", publicName: "linkAccess", isSignal: true, isRequired: false, transformFunction: null }, link: { classPropertyName: "link", publicName: "link", isSignal: true, isRequired: false, transformFunction: null }, canManage: { classPropertyName: "canManage", publicName: "canManage", 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: { linkAccess: "linkAccessChange", invite: "invite", roleChange: "roleChange", remove: "remove" }, host: { classAttribute: "hm-file-permissions" }, ngImport: i0, template: "<p class=\"hm-file-permissions__title\">{{ label() || text().label }}</p>\n\n@if (canManage()) {\n <div class=\"hm-file-permissions__invite\">\n <hm-input class=\"hm-file-permissions__query\" [label]=\"text().invite\" [placeholder]=\"text().invitePlaceholder\" icon=\"user-plus\" [value]=\"query()\" (valueChange)=\"setQuery($event)\" (keydown.enter)=\"submitInvite($event)\" />\n <hm-select class=\"hm-file-permissions__invite-role\" [label]=\"text().inviteRole\" [value]=\"chosenRole()\" (valueChange)=\"newRole.set($event)\">\n @for (role of inviteOptions(); track role.value) {\n <option [value]=\"role.value\">{{ role.label }}</option>\n }\n </hm-select>\n <hm-button class=\"hm-file-permissions__invite-button\" [disabled]=\"!query().trim()\" (clicked)=\"submitInvite()\">{{ text().inviteButton }}</hm-button>\n </div>\n}\n\n<div class=\"hm-visually-hidden\" role=\"alert\">{{ warning() }}</div>\n@if (warning()) {\n <p class=\"hm-file-permissions__warning\" aria-hidden=\"true\"><hm-icon shape=\"exclamation-triangle\" />{{ warning() }}</p>\n}\n\n<p class=\"hm-file-permissions__section\" [id]=\"id + '-people'\">{{ text().people }} <span class=\"hm-file-permissions__count\">{{ countText() }}</span></p>\n<ul class=\"hm-file-permissions__list\" [attr.aria-labelledby]=\"id + '-people'\">\n @for (entry of sorted(); track entry.id + '-' + refresh()) {\n <li class=\"hm-file-permissions__entry\" [class.hm-file-permissions__entry--inherited]=\"entry.inherited\">\n <span class=\"hm-file-permissions__avatar\" [attr.data-kind]=\"entry.kind ?? 'user'\" aria-hidden=\"true\">\n @if (entry.avatar) {\n <img [src]=\"entry.avatar\" alt=\"\" />\n } @else if (entry.kind && entry.kind !== 'user') {\n <hm-icon [shape]=\"kindIcon(entry)\" />\n } @else {\n {{ initials(entry.name) }}\n }\n </span>\n <span class=\"hm-file-permissions__who\">\n <span class=\"hm-file-permissions__name\">{{ entry.name }}</span>\n <span class=\"hm-file-permissions__meta\">\n @if (entry.kind && entry.kind !== 'user') {\n <span>{{ kindText(entry) }}</span>\n }\n @if (entry.email) {\n <span>{{ entry.email }}</span>\n }\n @if (entry.inherited) {\n <span>{{ inheritedText(entry) }}</span>\n }\n </span>\n </span>\n @if (canManage() && !entry.inherited) {\n <hm-select class=\"hm-file-permissions__role\" [label]=\"fmt(text().roleFor, entry.name)\" labelHidden [value]=\"entry.role\" (valueChange)=\"changeRole(entry, $event)\">\n @for (role of roleOptions(); track role.value) {\n <option [value]=\"role.value\">{{ role.label }}</option>\n }\n </hm-select>\n <hm-icon-button icon=\"times\" emphasis=\"subtle\" size=\"small\" [label]=\"fmt(text().remove, entry.name)\" (clicked)=\"removeEntry(entry)\" />\n } @else {\n <span class=\"hm-file-permissions__role-text\">{{ roleLabel(entry.role) }}</span>\n }\n </li>\n }\n</ul>\n\n@if (linkAccess(); as access) {\n <div class=\"hm-file-permissions__link\">\n <p class=\"hm-file-permissions__section\">{{ text().linkTitle }}</p>\n <hm-radio [label]=\"text().linkAccess\" [options]=\"linkOptions()\" [value]=\"access\" [disabled]=\"!canManage()\" (valueChange)=\"setLinkAccess($event)\" />\n @if (link()) {\n <hm-copy-button variant=\"text\" [value]=\"link()\" [label]=\"text().copyLink\" [copiedLabel]=\"text().copiedLink\" />\n }\n </div>\n}\n", dependencies: [{ kind: "component", type: ButtonComponent, selector: "hm-button", inputs: ["emphasis", "intent", "size", "type", "icon", "iconDirection", "iconEnd", "disabled", "loading", "loadingState", "block", "link", "newTab", "caret", "inMenu", "toggle", "pressed"], outputs: ["loadingStateChange", "pressedChange", "clicked"] }, { kind: "component", type: CopyButtonComponent, selector: "hm-copy-button", inputs: ["value", "label", "copiedLabel", "variant", "size", "disabled", "feedbackDuration"], outputs: ["copied", "copyFailed"] }, { 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: InputComponent, selector: "hm-input", inputs: ["value", "label", "type", "placeholder", "icon", "labelHidden", "hint", "prefix", "suffix", "prefixIcon", "mask", "maskValue", "min", "max", "step", "stepButtons", "maxLength", "autocomplete", "inputMode"], outputs: ["valueChange"] }, { kind: "component", type: RadioComponent, selector: "hm-radio", inputs: ["value", "label", "options", "appearance", "layout", "hint"], outputs: ["valueChange"] }, { kind: "component", type: SelectComponent, selector: "hm-select", inputs: ["value", "label", "labelHidden", "hint"], outputs: ["valueChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
259
|
+
}
|
|
260
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: FilePermissionsComponent, decorators: [{
|
|
261
|
+
type: Component,
|
|
262
|
+
args: [{ selector: 'hm-file-permissions', imports: [ButtonComponent, CopyButtonComponent, IconButtonComponent, IconComponent, InputComponent, RadioComponent, SelectComponent], changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'hm-file-permissions' }, template: "<p class=\"hm-file-permissions__title\">{{ label() || text().label }}</p>\n\n@if (canManage()) {\n <div class=\"hm-file-permissions__invite\">\n <hm-input class=\"hm-file-permissions__query\" [label]=\"text().invite\" [placeholder]=\"text().invitePlaceholder\" icon=\"user-plus\" [value]=\"query()\" (valueChange)=\"setQuery($event)\" (keydown.enter)=\"submitInvite($event)\" />\n <hm-select class=\"hm-file-permissions__invite-role\" [label]=\"text().inviteRole\" [value]=\"chosenRole()\" (valueChange)=\"newRole.set($event)\">\n @for (role of inviteOptions(); track role.value) {\n <option [value]=\"role.value\">{{ role.label }}</option>\n }\n </hm-select>\n <hm-button class=\"hm-file-permissions__invite-button\" [disabled]=\"!query().trim()\" (clicked)=\"submitInvite()\">{{ text().inviteButton }}</hm-button>\n </div>\n}\n\n<div class=\"hm-visually-hidden\" role=\"alert\">{{ warning() }}</div>\n@if (warning()) {\n <p class=\"hm-file-permissions__warning\" aria-hidden=\"true\"><hm-icon shape=\"exclamation-triangle\" />{{ warning() }}</p>\n}\n\n<p class=\"hm-file-permissions__section\" [id]=\"id + '-people'\">{{ text().people }} <span class=\"hm-file-permissions__count\">{{ countText() }}</span></p>\n<ul class=\"hm-file-permissions__list\" [attr.aria-labelledby]=\"id + '-people'\">\n @for (entry of sorted(); track entry.id + '-' + refresh()) {\n <li class=\"hm-file-permissions__entry\" [class.hm-file-permissions__entry--inherited]=\"entry.inherited\">\n <span class=\"hm-file-permissions__avatar\" [attr.data-kind]=\"entry.kind ?? 'user'\" aria-hidden=\"true\">\n @if (entry.avatar) {\n <img [src]=\"entry.avatar\" alt=\"\" />\n } @else if (entry.kind && entry.kind !== 'user') {\n <hm-icon [shape]=\"kindIcon(entry)\" />\n } @else {\n {{ initials(entry.name) }}\n }\n </span>\n <span class=\"hm-file-permissions__who\">\n <span class=\"hm-file-permissions__name\">{{ entry.name }}</span>\n <span class=\"hm-file-permissions__meta\">\n @if (entry.kind && entry.kind !== 'user') {\n <span>{{ kindText(entry) }}</span>\n }\n @if (entry.email) {\n <span>{{ entry.email }}</span>\n }\n @if (entry.inherited) {\n <span>{{ inheritedText(entry) }}</span>\n }\n </span>\n </span>\n @if (canManage() && !entry.inherited) {\n <hm-select class=\"hm-file-permissions__role\" [label]=\"fmt(text().roleFor, entry.name)\" labelHidden [value]=\"entry.role\" (valueChange)=\"changeRole(entry, $event)\">\n @for (role of roleOptions(); track role.value) {\n <option [value]=\"role.value\">{{ role.label }}</option>\n }\n </hm-select>\n <hm-icon-button icon=\"times\" emphasis=\"subtle\" size=\"small\" [label]=\"fmt(text().remove, entry.name)\" (clicked)=\"removeEntry(entry)\" />\n } @else {\n <span class=\"hm-file-permissions__role-text\">{{ roleLabel(entry.role) }}</span>\n }\n </li>\n }\n</ul>\n\n@if (linkAccess(); as access) {\n <div class=\"hm-file-permissions__link\">\n <p class=\"hm-file-permissions__section\">{{ text().linkTitle }}</p>\n <hm-radio [label]=\"text().linkAccess\" [options]=\"linkOptions()\" [value]=\"access\" [disabled]=\"!canManage()\" (valueChange)=\"setLinkAccess($event)\" />\n @if (link()) {\n <hm-copy-button variant=\"text\" [value]=\"link()\" [label]=\"text().copyLink\" [copiedLabel]=\"text().copiedLink\" />\n }\n </div>\n}\n" }]
|
|
263
|
+
}], propDecorators: { entries: [{ type: i0.Input, args: [{ isSignal: true, alias: "entries", required: true }] }], roles: [{ type: i0.Input, args: [{ isSignal: true, alias: "roles", required: false }] }], ownerRole: [{ type: i0.Input, args: [{ isSignal: true, alias: "ownerRole", required: false }] }], inviteRole: [{ type: i0.Input, args: [{ isSignal: true, alias: "inviteRole", required: false }] }], linkAccess: [{ type: i0.Input, args: [{ isSignal: true, alias: "linkAccess", required: false }] }, { type: i0.Output, args: ["linkAccessChange"] }], link: [{ type: i0.Input, args: [{ isSignal: true, alias: "link", required: false }] }], canManage: [{ type: i0.Input, args: [{ isSignal: true, alias: "canManage", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], invite: [{ type: i0.Output, args: ["invite"] }], roleChange: [{ type: i0.Output, args: ["roleChange"] }], remove: [{ type: i0.Output, args: ["remove"] }], texts: [{ type: i0.Input, args: [{ isSignal: true, alias: "texts", required: false }] }] } });
|
|
264
|
+
|
|
265
|
+
// Ponto de import `@trismegisto/angular/file-permissions` (secundário do ng-packagr): o que o public-api e as outras pastas usam
|
|
266
|
+
// daqui. Ao criar arquivo público novo na pasta, acrescente a linha.
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* Generated bundle index. Do not edit.
|
|
270
|
+
*/
|
|
271
|
+
|
|
272
|
+
export { FILE_PERMISSIONS_MESSAGES, FILE_PERMISSIONS_MESSAGES_EN, FILE_PERMISSIONS_MESSAGES_ES, FILE_PERMISSIONS_MESSAGES_PT_BR, FilePermissionsComponent };
|
|
273
|
+
//# sourceMappingURL=trismegisto-angular-file-permissions.mjs.map
|