@forgeroute/ui 0.5.16 → 0.5.17
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/forgeroute-ui-action-bar.mjs +190 -0
- package/fesm2022/forgeroute-ui-action-bar.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-address-input.mjs +1164 -0
- package/fesm2022/forgeroute-ui-address-input.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-alert.mjs +223 -0
- package/fesm2022/forgeroute-ui-alert.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-avatar.mjs +320 -0
- package/fesm2022/forgeroute-ui-avatar.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-badge.mjs +158 -0
- package/fesm2022/forgeroute-ui-badge.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-bar-row.mjs +255 -0
- package/fesm2022/forgeroute-ui-bar-row.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-boards.mjs +2201 -0
- package/fesm2022/forgeroute-ui-boards.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-bulk-eligible.mjs +172 -0
- package/fesm2022/forgeroute-ui-bulk-eligible.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-business-hours.mjs +771 -0
- package/fesm2022/forgeroute-ui-business-hours.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-calendar.mjs +2006 -0
- package/fesm2022/forgeroute-ui-calendar.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-card-list-item.mjs +556 -0
- package/fesm2022/forgeroute-ui-card-list-item.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-charts.mjs +1 -1
- package/fesm2022/forgeroute-ui-charts.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-checkbox.mjs +815 -0
- package/fesm2022/forgeroute-ui-checkbox.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-chip.mjs +379 -0
- package/fesm2022/forgeroute-ui-chip.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-color-input.mjs +492 -0
- package/fesm2022/forgeroute-ui-color-input.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-column-filter.mjs +645 -0
- package/fesm2022/forgeroute-ui-column-filter.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-columns.mjs +351 -0
- package/fesm2022/forgeroute-ui-columns.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-combobox.mjs +772 -0
- package/fesm2022/forgeroute-ui-combobox.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-confirm.mjs +48 -0
- package/fesm2022/forgeroute-ui-confirm.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-contact-picker.mjs +865 -0
- package/fesm2022/forgeroute-ui-contact-picker.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-conversations.mjs +3627 -0
- package/fesm2022/forgeroute-ui-conversations.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-copy-field.mjs +378 -0
- package/fesm2022/forgeroute-ui-copy-field.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-data-table-core.mjs +6150 -0
- package/fesm2022/forgeroute-ui-data-table-core.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-date-input.mjs +384 -0
- package/fesm2022/forgeroute-ui-date-input.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-date-range-picker.mjs +453 -0
- package/fesm2022/forgeroute-ui-date-range-picker.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-datetime-input.mjs +375 -0
- package/fesm2022/forgeroute-ui-datetime-input.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-detail-card.mjs +655 -0
- package/fesm2022/forgeroute-ui-detail-card.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-discount-selector.mjs +259 -0
- package/fesm2022/forgeroute-ui-discount-selector.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-divider.mjs +111 -0
- package/fesm2022/forgeroute-ui-divider.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-dropdown.mjs +550 -0
- package/fesm2022/forgeroute-ui-dropdown.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-editor.mjs +4545 -0
- package/fesm2022/forgeroute-ui-editor.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-empty-state.mjs +231 -0
- package/fesm2022/forgeroute-ui-empty-state.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-error-state.mjs +195 -0
- package/fesm2022/forgeroute-ui-error-state.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-error.mjs +93 -0
- package/fesm2022/forgeroute-ui-error.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-fade.mjs +117 -0
- package/fesm2022/forgeroute-ui-fade.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-file-input.mjs +999 -0
- package/fesm2022/forgeroute-ui-file-input.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-fixed-footer.mjs +115 -0
- package/fesm2022/forgeroute-ui-fixed-footer.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-form-row.mjs +126 -0
- package/fesm2022/forgeroute-ui-form-row.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-form-section.mjs +93 -0
- package/fesm2022/forgeroute-ui-form-section.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-form.mjs +139 -0
- package/fesm2022/forgeroute-ui-form.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-hint.mjs +47 -0
- package/fesm2022/forgeroute-ui-hint.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-icon-picker.mjs +424 -0
- package/fesm2022/forgeroute-ui-icon-picker.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-icon.mjs +311 -0
- package/fesm2022/forgeroute-ui-icon.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-image-preview.mjs +237 -0
- package/fesm2022/forgeroute-ui-image-preview.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-keypad.mjs +278 -0
- package/fesm2022/forgeroute-ui-keypad.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-kpi-card.mjs +490 -0
- package/fesm2022/forgeroute-ui-kpi-card.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-language-switcher.mjs +134 -0
- package/fesm2022/forgeroute-ui-language-switcher.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-layout.mjs +18 -0
- package/fesm2022/forgeroute-ui-layout.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-list-item.mjs +620 -0
- package/fesm2022/forgeroute-ui-list-item.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-list.mjs +866 -0
- package/fesm2022/forgeroute-ui-list.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-live-region.mjs +118 -0
- package/fesm2022/forgeroute-ui-live-region.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-map.mjs +5 -1
- package/fesm2022/forgeroute-ui-map.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-maps.mjs +2 -1
- package/fesm2022/forgeroute-ui-maps.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-media.mjs +4615 -0
- package/fesm2022/forgeroute-ui-media.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-messaging.mjs +20 -1
- package/fesm2022/forgeroute-ui-messaging.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-more-menu.mjs +418 -0
- package/fesm2022/forgeroute-ui-more-menu.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-multi-select.mjs +532 -0
- package/fesm2022/forgeroute-ui-multi-select.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-notes.mjs +768 -0
- package/fesm2022/forgeroute-ui-notes.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-notification-bell.mjs +587 -0
- package/fesm2022/forgeroute-ui-notification-bell.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-offline-banner.mjs +156 -0
- package/fesm2022/forgeroute-ui-offline-banner.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-option-card.mjs +379 -0
- package/fesm2022/forgeroute-ui-option-card.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-page.mjs +317 -0
- package/fesm2022/forgeroute-ui-page.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-pagination.mjs +225 -0
- package/fesm2022/forgeroute-ui-pagination.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-panel-info-list.mjs +422 -0
- package/fesm2022/forgeroute-ui-panel-info-list.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-password-requirements.mjs +237 -0
- package/fesm2022/forgeroute-ui-password-requirements.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-payments.mjs +6243 -0
- package/fesm2022/forgeroute-ui-payments.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-pdf.mjs +9 -1
- package/fesm2022/forgeroute-ui-pdf.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-phone-number-picker.mjs +840 -0
- package/fesm2022/forgeroute-ui-phone-number-picker.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-pill-tabs.mjs +546 -0
- package/fesm2022/forgeroute-ui-pill-tabs.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-print.mjs +76 -0
- package/fesm2022/forgeroute-ui-print.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-progress-bar.mjs +252 -0
- package/fesm2022/forgeroute-ui-progress-bar.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-progress-ring.mjs +277 -0
- package/fesm2022/forgeroute-ui-progress-ring.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-quick-filter-tabs.mjs +301 -0
- package/fesm2022/forgeroute-ui-quick-filter-tabs.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-quickbooks.mjs +18 -1
- package/fesm2022/forgeroute-ui-quickbooks.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-radio-matrix.mjs +471 -0
- package/fesm2022/forgeroute-ui-radio-matrix.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-radio.mjs +911 -0
- package/fesm2022/forgeroute-ui-radio.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-read-only-mode.mjs +15 -0
- package/fesm2022/forgeroute-ui-read-only-mode.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-readonly-fieldset.mjs +146 -0
- package/fesm2022/forgeroute-ui-readonly-fieldset.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-reminder-alerts.mjs +249 -0
- package/fesm2022/forgeroute-ui-reminder-alerts.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-search-input.mjs +373 -0
- package/fesm2022/forgeroute-ui-search-input.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-section-header.mjs +296 -0
- package/fesm2022/forgeroute-ui-section-header.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-select.mjs +498 -0
- package/fesm2022/forgeroute-ui-select.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-setup.mjs +4649 -0
- package/fesm2022/forgeroute-ui-setup.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-share-menu.mjs +461 -0
- package/fesm2022/forgeroute-ui-share-menu.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-shell.mjs +981 -0
- package/fesm2022/forgeroute-ui-shell.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-show.mjs +129 -0
- package/fesm2022/forgeroute-ui-show.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-sidebar-layout.mjs +355 -0
- package/fesm2022/forgeroute-ui-sidebar-layout.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-skeleton.mjs +152 -0
- package/fesm2022/forgeroute-ui-skeleton.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-skip-link.mjs +129 -0
- package/fesm2022/forgeroute-ui-skip-link.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-snackbar.mjs +200 -0
- package/fesm2022/forgeroute-ui-snackbar.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-square.mjs +15 -1
- package/fesm2022/forgeroute-ui-square.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-stack.mjs +233 -0
- package/fesm2022/forgeroute-ui-stack.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-stacked-bar.mjs +200 -0
- package/fesm2022/forgeroute-ui-stacked-bar.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-stacking-plan.mjs +365 -0
- package/fesm2022/forgeroute-ui-stacking-plan.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-star-rating.mjs +498 -0
- package/fesm2022/forgeroute-ui-star-rating.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-star.mjs +184 -0
- package/fesm2022/forgeroute-ui-star.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-stepper.mjs +615 -0
- package/fesm2022/forgeroute-ui-stepper.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-stripe.mjs +14 -1
- package/fesm2022/forgeroute-ui-stripe.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-swatch-picker.mjs +416 -0
- package/fesm2022/forgeroute-ui-swatch-picker.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-table-toolbar.mjs +770 -0
- package/fesm2022/forgeroute-ui-table-toolbar.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-table-types.mjs +277 -0
- package/fesm2022/forgeroute-ui-table-types.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-text-input.mjs +1003 -0
- package/fesm2022/forgeroute-ui-text-input.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-text-template-picker.mjs +356 -0
- package/fesm2022/forgeroute-ui-text-template-picker.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-text.mjs +195 -0
- package/fesm2022/forgeroute-ui-text.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-textarea-input.mjs +542 -0
- package/fesm2022/forgeroute-ui-textarea-input.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-time-input.mjs +401 -0
- package/fesm2022/forgeroute-ui-time-input.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-timeline.mjs +549 -0
- package/fesm2022/forgeroute-ui-timeline.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-toast.mjs +507 -0
- package/fesm2022/forgeroute-ui-toast.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-toggle-badge.mjs +177 -0
- package/fesm2022/forgeroute-ui-toggle-badge.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-toggle.mjs +275 -0
- package/fesm2022/forgeroute-ui-toggle.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-tooltip.mjs +155 -0
- package/fesm2022/forgeroute-ui-tooltip.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-utils.mjs +1071 -0
- package/fesm2022/forgeroute-ui-utils.mjs.map +1 -0
- package/fesm2022/forgeroute-ui.mjs +105 -70663
- package/package.json +417 -1
- package/types/forgeroute-ui-action-bar.d.ts +74 -0
- package/types/forgeroute-ui-address-input.d.ts +354 -0
- package/types/forgeroute-ui-alert.d.ts +89 -0
- package/types/forgeroute-ui-avatar.d.ts +85 -0
- package/types/forgeroute-ui-badge.d.ts +45 -0
- package/types/forgeroute-ui-bar-row.d.ts +90 -0
- package/types/forgeroute-ui-boards.d.ts +575 -0
- package/types/forgeroute-ui-bulk-eligible.d.ts +53 -0
- package/types/forgeroute-ui-business-hours.d.ts +191 -0
- package/types/forgeroute-ui-calendar.d.ts +544 -0
- package/types/forgeroute-ui-card-list-item.d.ts +186 -0
- package/types/forgeroute-ui-charts.d.ts +1 -1
- package/types/forgeroute-ui-checkbox.d.ts +270 -0
- package/types/forgeroute-ui-chip.d.ts +125 -0
- package/types/forgeroute-ui-color-input.d.ts +160 -0
- package/types/forgeroute-ui-column-filter.d.ts +130 -0
- package/types/forgeroute-ui-columns.d.ts +150 -0
- package/types/forgeroute-ui-combobox.d.ts +252 -0
- package/types/forgeroute-ui-confirm.d.ts +34 -0
- package/types/forgeroute-ui-contact-picker.d.ts +173 -0
- package/types/forgeroute-ui-conversations.d.ts +993 -0
- package/types/forgeroute-ui-copy-field.d.ts +122 -0
- package/types/forgeroute-ui-data-table-core.d.ts +1221 -0
- package/types/forgeroute-ui-date-input.d.ts +101 -0
- package/types/forgeroute-ui-date-range-picker.d.ts +109 -0
- package/types/forgeroute-ui-datetime-input.d.ts +97 -0
- package/types/forgeroute-ui-detail-card.d.ts +252 -0
- package/types/forgeroute-ui-discount-selector.d.ts +57 -0
- package/types/forgeroute-ui-divider.d.ts +40 -0
- package/types/forgeroute-ui-dropdown.d.ts +156 -0
- package/types/forgeroute-ui-editor.d.ts +873 -0
- package/types/forgeroute-ui-empty-state.d.ts +29 -0
- package/types/forgeroute-ui-error-state.d.ts +38 -0
- package/types/forgeroute-ui-error.d.ts +29 -0
- package/types/forgeroute-ui-fade.d.ts +39 -0
- package/types/forgeroute-ui-file-input.d.ts +337 -0
- package/types/forgeroute-ui-fixed-footer.d.ts +53 -0
- package/types/forgeroute-ui-form-row.d.ts +30 -0
- package/types/forgeroute-ui-form-section.d.ts +18 -0
- package/types/forgeroute-ui-form.d.ts +68 -0
- package/types/forgeroute-ui-hint.d.ts +10 -0
- package/types/forgeroute-ui-icon-picker.d.ts +122 -0
- package/types/forgeroute-ui-icon.d.ts +95 -0
- package/types/forgeroute-ui-image-preview.d.ts +88 -0
- package/types/forgeroute-ui-keypad.d.ts +73 -0
- package/types/forgeroute-ui-kpi-card.d.ts +161 -0
- package/types/forgeroute-ui-language-switcher.d.ts +41 -0
- package/types/forgeroute-ui-layout.d.ts +13 -0
- package/types/forgeroute-ui-list-item.d.ts +253 -0
- package/types/forgeroute-ui-list.d.ts +282 -0
- package/types/forgeroute-ui-live-region.d.ts +49 -0
- package/types/forgeroute-ui-map.d.ts +1 -1
- package/types/forgeroute-ui-maps.d.ts +1 -1
- package/types/forgeroute-ui-media.d.ts +1221 -0
- package/types/forgeroute-ui-messaging.d.ts +6 -1
- package/types/forgeroute-ui-more-menu.d.ts +91 -0
- package/types/forgeroute-ui-multi-select.d.ts +119 -0
- package/types/forgeroute-ui-notes.d.ts +172 -0
- package/types/forgeroute-ui-notification-bell.d.ts +135 -0
- package/types/forgeroute-ui-offline-banner.d.ts +44 -0
- package/types/forgeroute-ui-option-card.d.ts +106 -0
- package/types/forgeroute-ui-page.d.ts +115 -0
- package/types/forgeroute-ui-pagination.d.ts +55 -0
- package/types/forgeroute-ui-panel-info-list.d.ts +147 -0
- package/types/forgeroute-ui-password-requirements.d.ts +89 -0
- package/types/forgeroute-ui-payments.d.ts +1818 -0
- package/types/forgeroute-ui-pdf.d.ts +1 -1
- package/types/forgeroute-ui-phone-number-picker.d.ts +199 -0
- package/types/forgeroute-ui-pill-tabs.d.ts +208 -0
- package/types/forgeroute-ui-print.d.ts +40 -0
- package/types/forgeroute-ui-progress-bar.d.ts +88 -0
- package/types/forgeroute-ui-progress-ring.d.ts +102 -0
- package/types/forgeroute-ui-quick-filter-tabs.d.ts +51 -0
- package/types/forgeroute-ui-quickbooks.d.ts +4 -1
- package/types/forgeroute-ui-radio-matrix.d.ts +131 -0
- package/types/forgeroute-ui-radio.d.ts +311 -0
- package/types/forgeroute-ui-read-only-mode.d.ts +26 -0
- package/types/forgeroute-ui-readonly-fieldset.d.ts +62 -0
- package/types/forgeroute-ui-reminder-alerts.d.ts +71 -0
- package/types/forgeroute-ui-search-input.d.ts +93 -0
- package/types/forgeroute-ui-section-header.d.ts +149 -0
- package/types/forgeroute-ui-select.d.ts +183 -0
- package/types/forgeroute-ui-setup.d.ts +775 -0
- package/types/forgeroute-ui-share-menu.d.ts +99 -0
- package/types/forgeroute-ui-shell.d.ts +173 -0
- package/types/forgeroute-ui-show.d.ts +40 -0
- package/types/forgeroute-ui-sidebar-layout.d.ts +161 -0
- package/types/forgeroute-ui-skeleton.d.ts +51 -0
- package/types/forgeroute-ui-skip-link.d.ts +51 -0
- package/types/forgeroute-ui-snackbar.d.ts +50 -0
- package/types/forgeroute-ui-square.d.ts +3 -1
- package/types/forgeroute-ui-stack.d.ts +99 -0
- package/types/forgeroute-ui-stacked-bar.d.ts +84 -0
- package/types/forgeroute-ui-stacking-plan.d.ts +116 -0
- package/types/forgeroute-ui-star-rating.d.ts +151 -0
- package/types/forgeroute-ui-star.d.ts +46 -0
- package/types/forgeroute-ui-stepper.d.ts +273 -0
- package/types/forgeroute-ui-stripe.d.ts +3 -1
- package/types/forgeroute-ui-swatch-picker.d.ts +118 -0
- package/types/forgeroute-ui-table-toolbar.d.ts +116 -0
- package/types/forgeroute-ui-table-types.d.ts +624 -0
- package/types/forgeroute-ui-text-input.d.ts +359 -0
- package/types/forgeroute-ui-text-template-picker.d.ts +100 -0
- package/types/forgeroute-ui-text.d.ts +76 -0
- package/types/forgeroute-ui-textarea-input.d.ts +174 -0
- package/types/forgeroute-ui-time-input.d.ts +105 -0
- package/types/forgeroute-ui-timeline.d.ts +196 -0
- package/types/forgeroute-ui-toast.d.ts +131 -0
- package/types/forgeroute-ui-toggle-badge.d.ts +64 -0
- package/types/forgeroute-ui-toggle.d.ts +92 -0
- package/types/forgeroute-ui-tooltip.d.ts +36 -0
- package/types/forgeroute-ui-utils.d.ts +210 -0
- package/types/forgeroute-ui.d.ts +106 -19539
- package/fesm2022/forgeroute-ui.mjs.map +0 -1
|
@@ -0,0 +1,2201 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, DestroyRef, Directive, ElementRef, Injector, NgZone, TemplateRef, ViewEncapsulation, afterNextRender, computed, contentChild, effect, inject, input, linkedSignal, output, signal, untracked } from "@angular/core";
|
|
3
|
+
import { DOCUMENT, NgTemplateOutlet } from "@angular/common";
|
|
4
|
+
import { ButtonComponent, UiLabelsService } from "@forgeroute/ui/core";
|
|
5
|
+
import { MoreMenuComponent } from "@forgeroute/ui/more-menu";
|
|
6
|
+
var BoardCardDirective = class BoardCardDirective {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.typeFrom = input("", {
|
|
9
|
+
...ngDevMode ? { debugName: "typeFrom" } : /* istanbul ignore next */ {},
|
|
10
|
+
alias: "uiBoardCard"
|
|
11
|
+
});
|
|
12
|
+
this.template = inject(TemplateRef);
|
|
13
|
+
}
|
|
14
|
+
static ngTemplateContextGuard(_dir, _ctx) {
|
|
15
|
+
return true;
|
|
16
|
+
}
|
|
17
|
+
static {
|
|
18
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
19
|
+
minVersion: "12.0.0",
|
|
20
|
+
version: "22.2.2",
|
|
21
|
+
ngImport: i0,
|
|
22
|
+
type: BoardCardDirective,
|
|
23
|
+
deps: [],
|
|
24
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
static {
|
|
28
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
29
|
+
minVersion: "17.1.0",
|
|
30
|
+
version: "22.2.2",
|
|
31
|
+
type: BoardCardDirective,
|
|
32
|
+
isStandalone: true,
|
|
33
|
+
selector: "ng-template[uiBoardCard]",
|
|
34
|
+
inputs: { typeFrom: {
|
|
35
|
+
classPropertyName: "typeFrom",
|
|
36
|
+
publicName: "uiBoardCard",
|
|
37
|
+
isSignal: true,
|
|
38
|
+
isRequired: false,
|
|
39
|
+
transformFunction: null
|
|
40
|
+
} },
|
|
41
|
+
ngImport: i0
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
46
|
+
minVersion: "12.0.0",
|
|
47
|
+
version: "22.2.2",
|
|
48
|
+
ngImport: i0,
|
|
49
|
+
type: BoardCardDirective,
|
|
50
|
+
decorators: [{
|
|
51
|
+
type: Directive,
|
|
52
|
+
args: [{
|
|
53
|
+
selector: "ng-template[uiBoardCard]",
|
|
54
|
+
standalone: true
|
|
55
|
+
}]
|
|
56
|
+
}],
|
|
57
|
+
propDecorators: { typeFrom: [{
|
|
58
|
+
type: i0.Input,
|
|
59
|
+
args: [{
|
|
60
|
+
isSignal: true,
|
|
61
|
+
alias: "uiBoardCard",
|
|
62
|
+
required: false
|
|
63
|
+
}]
|
|
64
|
+
}] }
|
|
65
|
+
});
|
|
66
|
+
const MOVE_PREFIX$1 = "ub-move:";
|
|
67
|
+
const MOVE_ICON$1 = "M4 12h12m0 0l-4-4m4 4l-4 4M20 5v14";
|
|
68
|
+
let nextBoardId$1 = 0;
|
|
69
|
+
const DOT_COLORS$1 = {
|
|
70
|
+
blue: "#3b82f6",
|
|
71
|
+
cyan: "#06b6d4",
|
|
72
|
+
green: "#22c55e",
|
|
73
|
+
teal: "#14b8a6",
|
|
74
|
+
amber: "#f59e0b",
|
|
75
|
+
orange: "#f97316",
|
|
76
|
+
red: "#ef4444",
|
|
77
|
+
pink: "#ec4899",
|
|
78
|
+
slate: "#64748b",
|
|
79
|
+
gray: "#6b7280"
|
|
80
|
+
};
|
|
81
|
+
var BoardComponent = class BoardComponent {
|
|
82
|
+
limitOf(col) {
|
|
83
|
+
const size = this.pageSize() > 0 ? Math.floor(this.pageSize()) : 0;
|
|
84
|
+
if (!size) return col.items.length;
|
|
85
|
+
let limit = this.drawn()[col.key] ?? size;
|
|
86
|
+
const moved = this.movedTo();
|
|
87
|
+
if (moved?.to === col.key) limit = Math.max(limit, col.items.findIndex((i) => this.itemKey()(i) === moved.key) + 1);
|
|
88
|
+
return limit;
|
|
89
|
+
}
|
|
90
|
+
showMore(key) {
|
|
91
|
+
const size = Math.floor(this.pageSize());
|
|
92
|
+
const col = this.cols().find((c) => c.key === key);
|
|
93
|
+
if (!col || size < 1) return;
|
|
94
|
+
const limit = Math.min(col.items.length, this.limitOf(col) + size);
|
|
95
|
+
this.drawn.update((d) => ({
|
|
96
|
+
...d,
|
|
97
|
+
[key]: limit
|
|
98
|
+
}));
|
|
99
|
+
this.announcement.set(this.labels.t("board.showingOf", {
|
|
100
|
+
limit,
|
|
101
|
+
total: col.items.length,
|
|
102
|
+
noun: this.itemNounPlural(),
|
|
103
|
+
column: col.label
|
|
104
|
+
}));
|
|
105
|
+
}
|
|
106
|
+
constructor() {
|
|
107
|
+
this.labels = inject(UiLabelsService);
|
|
108
|
+
this.columns = input.required(...ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []);
|
|
109
|
+
this.itemKey = input.required(...ngDevMode ? [{ debugName: "itemKey" }] : /* istanbul ignore next */ []);
|
|
110
|
+
this.itemLabel = input.required(...ngDevMode ? [{ debugName: "itemLabel" }] : /* istanbul ignore next */ []);
|
|
111
|
+
this.cardActions = input([], ...ngDevMode ? [{ debugName: "cardActions" }] : /* istanbul ignore next */ []);
|
|
112
|
+
this.moveMenu = input(true, ...ngDevMode ? [{ debugName: "moveMenu" }] : /* istanbul ignore next */ []);
|
|
113
|
+
this.loading = input(false, ...ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []);
|
|
114
|
+
this.error = input(null, ...ngDevMode ? [{ debugName: "error" }] : /* istanbul ignore next */ []);
|
|
115
|
+
this.readOnly = input(false, ...ngDevMode ? [{ debugName: "readOnly" }] : /* istanbul ignore next */ []);
|
|
116
|
+
this.moveDisabled = input(false, ...ngDevMode ? [{ debugName: "moveDisabled" }] : /* istanbul ignore next */ []);
|
|
117
|
+
this.canMove = input(null, ...ngDevMode ? [{ debugName: "canMove" }] : /* istanbul ignore next */ []);
|
|
118
|
+
this.ariaLabelInput = input(null, {
|
|
119
|
+
...ngDevMode ? { debugName: "ariaLabelInput" } : /* istanbul ignore next */ {},
|
|
120
|
+
alias: "ariaLabel"
|
|
121
|
+
});
|
|
122
|
+
this.ariaLabel = computed(() => this.ariaLabelInput() ?? this.labels.t("board.ariaLabel"), ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
|
|
123
|
+
this.emptyMessageInput = input(null, {
|
|
124
|
+
...ngDevMode ? { debugName: "emptyMessageInput" } : /* istanbul ignore next */ {},
|
|
125
|
+
alias: "emptyMessage"
|
|
126
|
+
});
|
|
127
|
+
this.emptyMessage = computed(() => this.emptyMessageInput() ?? this.labels.t("board.emptyMessage"), ...ngDevMode ? [{ debugName: "emptyMessage" }] : /* istanbul ignore next */ []);
|
|
128
|
+
this.emptyColumnTextInput = input(null, {
|
|
129
|
+
...ngDevMode ? { debugName: "emptyColumnTextInput" } : /* istanbul ignore next */ {},
|
|
130
|
+
alias: "emptyColumnText"
|
|
131
|
+
});
|
|
132
|
+
this.emptyColumnText = computed(() => this.emptyColumnTextInput() ?? this.labels.t("board.emptyColumnText"), ...ngDevMode ? [{ debugName: "emptyColumnText" }] : /* istanbul ignore next */ []);
|
|
133
|
+
this.itemNounInput = input(null, {
|
|
134
|
+
...ngDevMode ? { debugName: "itemNounInput" } : /* istanbul ignore next */ {},
|
|
135
|
+
alias: "itemNoun"
|
|
136
|
+
});
|
|
137
|
+
this.itemNoun = computed(() => this.itemNounInput() ?? this.labels.t("board.itemNoun"), ...ngDevMode ? [{ debugName: "itemNoun" }] : /* istanbul ignore next */ []);
|
|
138
|
+
this.itemNounPluralInput = input(null, {
|
|
139
|
+
...ngDevMode ? { debugName: "itemNounPluralInput" } : /* istanbul ignore next */ {},
|
|
140
|
+
alias: "itemNounPlural"
|
|
141
|
+
});
|
|
142
|
+
this.itemNounPlural = computed(() => this.itemNounPluralInput() ?? this.labels.t("board.itemNounPlural"), ...ngDevMode ? [{ debugName: "itemNounPlural" }] : /* istanbul ignore next */ []);
|
|
143
|
+
this.retryLabelInput = input(null, {
|
|
144
|
+
...ngDevMode ? { debugName: "retryLabelInput" } : /* istanbul ignore next */ {},
|
|
145
|
+
alias: "retryLabel"
|
|
146
|
+
});
|
|
147
|
+
this.retryLabel = computed(() => this.retryLabelInput() ?? this.labels.t("board.retryLabel"), ...ngDevMode ? [{ debugName: "retryLabel" }] : /* istanbul ignore next */ []);
|
|
148
|
+
this.pageSize = input(50, ...ngDevMode ? [{ debugName: "pageSize" }] : /* istanbul ignore next */ []);
|
|
149
|
+
this.cardClick = output();
|
|
150
|
+
this.cardAction = output();
|
|
151
|
+
this.itemMove = output();
|
|
152
|
+
this.retry = output();
|
|
153
|
+
this.card = contentChild(BoardCardDirective, ...ngDevMode ? [{ debugName: "card" }] : /* istanbul ignore next */ []);
|
|
154
|
+
this.cols = linkedSignal(() => this.columns(), ...ngDevMode ? [{ debugName: "cols" }] : /* istanbul ignore next */ []);
|
|
155
|
+
this.drawn = signal({}, ...ngDevMode ? [{ debugName: "drawn" }] : /* istanbul ignore next */ []);
|
|
156
|
+
this.movedTo = signal(null, ...ngDevMode ? [{ debugName: "movedTo" }] : /* istanbul ignore next */ []);
|
|
157
|
+
this.shownCols = computed(() => {
|
|
158
|
+
const size = this.pageSize() > 0 ? Math.floor(this.pageSize()) : 0;
|
|
159
|
+
return this.cols().map((col) => {
|
|
160
|
+
const limit = this.limitOf(col);
|
|
161
|
+
const hidden = Math.max(0, col.items.length - limit);
|
|
162
|
+
return {
|
|
163
|
+
col,
|
|
164
|
+
shown: hidden ? col.items.slice(0, limit) : col.items,
|
|
165
|
+
hidden,
|
|
166
|
+
next: Math.min(size, hidden)
|
|
167
|
+
};
|
|
168
|
+
});
|
|
169
|
+
}, ...ngDevMode ? [{ debugName: "shownCols" }] : /* istanbul ignore next */ []);
|
|
170
|
+
this.hintId = `ub-hint-${nextBoardId$1++}`;
|
|
171
|
+
this.overKey = signal(null, ...ngDevMode ? [{ debugName: "overKey" }] : /* istanbul ignore next */ []);
|
|
172
|
+
this.draggingKey = signal(null, ...ngDevMode ? [{ debugName: "draggingKey" }] : /* istanbul ignore next */ []);
|
|
173
|
+
this.announcement = signal("", ...ngDevMode ? [{ debugName: "announcement" }] : /* istanbul ignore next */ []);
|
|
174
|
+
this.host = inject(ElementRef);
|
|
175
|
+
this.drag = null;
|
|
176
|
+
this.skeletonColumns = computed(() => Array.from({ length: Math.max(this.columns().length, 4) }, (_, i) => i), ...ngDevMode ? [{ debugName: "skeletonColumns" }] : /* istanbul ignore next */ []);
|
|
177
|
+
this.canDrag = computed(() => !this.readOnly() && !this.moveDisabled(), ...ngDevMode ? [{ debugName: "canDrag" }] : /* istanbul ignore next */ []);
|
|
178
|
+
this.menuActions = computed(() => {
|
|
179
|
+
const out = /* @__PURE__ */ new Map();
|
|
180
|
+
const own = this.cardActions();
|
|
181
|
+
if (!this.moveMenu() || !this.canDrag()) return out;
|
|
182
|
+
const cols = this.cols();
|
|
183
|
+
const shared = /* @__PURE__ */ new Map();
|
|
184
|
+
for (const from of cols) for (const item of from.items) {
|
|
185
|
+
let list = this.canMove() ? void 0 : shared.get(from.key);
|
|
186
|
+
if (!list) {
|
|
187
|
+
const moves = cols.filter((to) => this.accepts(item, from.key, to)).map((to) => ({
|
|
188
|
+
type: MOVE_PREFIX$1 + to.key,
|
|
189
|
+
label: this.labels.t("board.moveTo", { column: to.label }),
|
|
190
|
+
icon: MOVE_ICON$1
|
|
191
|
+
}));
|
|
192
|
+
list = moves.length ? [...own, ...moves] : own;
|
|
193
|
+
if (!this.canMove()) shared.set(from.key, list);
|
|
194
|
+
}
|
|
195
|
+
out.set(this.itemKey()(item), list);
|
|
196
|
+
}
|
|
197
|
+
return out;
|
|
198
|
+
}, ...ngDevMode ? [{ debugName: "menuActions" }] : /* istanbul ignore next */ []);
|
|
199
|
+
effect(() => {
|
|
200
|
+
if (this.loading()) {
|
|
201
|
+
this.drawn.set({});
|
|
202
|
+
this.movedTo.set(null);
|
|
203
|
+
}
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
dot(color) {
|
|
207
|
+
return color && DOT_COLORS$1[color] || color || "#3b82f6";
|
|
208
|
+
}
|
|
209
|
+
onDragStart(event, item, col) {
|
|
210
|
+
if (!this.canDrag()) {
|
|
211
|
+
event.preventDefault();
|
|
212
|
+
return;
|
|
213
|
+
}
|
|
214
|
+
this.drag = {
|
|
215
|
+
item,
|
|
216
|
+
from: col.key
|
|
217
|
+
};
|
|
218
|
+
this.draggingKey.set(this.itemKey()(item));
|
|
219
|
+
if (event.dataTransfer) {
|
|
220
|
+
event.dataTransfer.effectAllowed = "move";
|
|
221
|
+
event.dataTransfer.setData("text/plain", this.itemKey()(item));
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
onDragEnd() {
|
|
225
|
+
this.drag = null;
|
|
226
|
+
this.draggingKey.set(null);
|
|
227
|
+
this.overKey.set(null);
|
|
228
|
+
}
|
|
229
|
+
onDragOver(event, col) {
|
|
230
|
+
if (!this.drag || !this.accepts(this.drag.item, this.drag.from, col)) {
|
|
231
|
+
if (event.dataTransfer) event.dataTransfer.dropEffect = "none";
|
|
232
|
+
return;
|
|
233
|
+
}
|
|
234
|
+
event.preventDefault();
|
|
235
|
+
if (event.dataTransfer) event.dataTransfer.dropEffect = "move";
|
|
236
|
+
if (this.overKey() !== col.key) this.overKey.set(col.key);
|
|
237
|
+
}
|
|
238
|
+
onDragLeave(event, col) {
|
|
239
|
+
const related = event.relatedTarget;
|
|
240
|
+
if ((!related || !event.currentTarget.contains(related)) && this.overKey() === col.key) this.overKey.set(null);
|
|
241
|
+
}
|
|
242
|
+
onDrop(event, col) {
|
|
243
|
+
event.preventDefault();
|
|
244
|
+
const drag = this.drag;
|
|
245
|
+
this.onDragEnd();
|
|
246
|
+
if (drag && this.accepts(drag.item, drag.from, col)) this.move(drag.item, drag.from, col.key);
|
|
247
|
+
}
|
|
248
|
+
onCardKey(event, item, col) {
|
|
249
|
+
if (event.target !== event.currentTarget) return;
|
|
250
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
251
|
+
event.preventDefault();
|
|
252
|
+
this.cardClick.emit(item);
|
|
253
|
+
return;
|
|
254
|
+
}
|
|
255
|
+
if (!event.shiftKey || event.key !== "ArrowLeft" && event.key !== "ArrowRight") return;
|
|
256
|
+
event.preventDefault();
|
|
257
|
+
if (!this.canDrag()) return;
|
|
258
|
+
const cols = this.cols();
|
|
259
|
+
const step = event.key === "ArrowRight" ? 1 : -1;
|
|
260
|
+
for (let i = cols.findIndex((c) => c.key === col.key) + step; i >= 0 && i < cols.length; i += step) if (this.accepts(item, col.key, cols[i])) {
|
|
261
|
+
this.move(item, col.key, cols[i].key);
|
|
262
|
+
this.announcement.set(this.labels.t("board.movedTo", {
|
|
263
|
+
item: this.itemLabel()(item),
|
|
264
|
+
column: cols[i].label
|
|
265
|
+
}));
|
|
266
|
+
this.focusCard(item);
|
|
267
|
+
return;
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
onMenuAction(type, item) {
|
|
271
|
+
if (!type.startsWith(MOVE_PREFIX$1)) {
|
|
272
|
+
this.cardAction.emit({
|
|
273
|
+
type,
|
|
274
|
+
item
|
|
275
|
+
});
|
|
276
|
+
return;
|
|
277
|
+
}
|
|
278
|
+
const key = this.itemKey()(item);
|
|
279
|
+
const from = this.cols().find((c) => c.items.some((i) => this.itemKey()(i) === key));
|
|
280
|
+
const to = this.cols().find((c) => c.key === type.slice(8));
|
|
281
|
+
if (!from || !to || !this.accepts(item, from.key, to)) return;
|
|
282
|
+
this.move(item, from.key, to.key);
|
|
283
|
+
this.announcement.set(this.labels.t("board.movedTo", {
|
|
284
|
+
item: this.itemLabel()(item),
|
|
285
|
+
column: to.label
|
|
286
|
+
}));
|
|
287
|
+
this.focusCard(item);
|
|
288
|
+
}
|
|
289
|
+
focusCard(item) {
|
|
290
|
+
const key = this.itemKey()(item);
|
|
291
|
+
setTimeout(() => {
|
|
292
|
+
const cards = this.host.nativeElement.querySelectorAll(".ub-card");
|
|
293
|
+
Array.from(cards).find((c) => c.dataset["boardKey"] === key)?.focus();
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
accepts(item, from, to) {
|
|
297
|
+
if (from === to.key || to.dropDisabled || this.moveDisabled() || this.readOnly()) return false;
|
|
298
|
+
const rule = this.canMove();
|
|
299
|
+
return !rule || rule(item, from, to.key);
|
|
300
|
+
}
|
|
301
|
+
move(item, from, to) {
|
|
302
|
+
const before = this.cols();
|
|
303
|
+
const key = this.itemKey()(item);
|
|
304
|
+
this.cols.set(before.map((c) => {
|
|
305
|
+
if (c.key === from) return {
|
|
306
|
+
...c,
|
|
307
|
+
items: c.items.filter((i) => this.itemKey()(i) !== key)
|
|
308
|
+
};
|
|
309
|
+
if (c.key === to) return {
|
|
310
|
+
...c,
|
|
311
|
+
items: [item, ...c.items]
|
|
312
|
+
};
|
|
313
|
+
return c;
|
|
314
|
+
}));
|
|
315
|
+
this.movedTo.set({
|
|
316
|
+
key,
|
|
317
|
+
to
|
|
318
|
+
});
|
|
319
|
+
this.itemMove.emit({
|
|
320
|
+
item,
|
|
321
|
+
from,
|
|
322
|
+
to,
|
|
323
|
+
revert: () => {
|
|
324
|
+
this.cols.set(before);
|
|
325
|
+
this.movedTo.set(null);
|
|
326
|
+
}
|
|
327
|
+
});
|
|
328
|
+
}
|
|
329
|
+
static {
|
|
330
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
331
|
+
minVersion: "12.0.0",
|
|
332
|
+
version: "22.2.2",
|
|
333
|
+
ngImport: i0,
|
|
334
|
+
type: BoardComponent,
|
|
335
|
+
deps: [],
|
|
336
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
337
|
+
});
|
|
338
|
+
}
|
|
339
|
+
static {
|
|
340
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
341
|
+
minVersion: "17.0.0",
|
|
342
|
+
version: "22.2.2",
|
|
343
|
+
type: BoardComponent,
|
|
344
|
+
isStandalone: true,
|
|
345
|
+
selector: "ui-board",
|
|
346
|
+
inputs: {
|
|
347
|
+
columns: {
|
|
348
|
+
classPropertyName: "columns",
|
|
349
|
+
publicName: "columns",
|
|
350
|
+
isSignal: true,
|
|
351
|
+
isRequired: true,
|
|
352
|
+
transformFunction: null
|
|
353
|
+
},
|
|
354
|
+
itemKey: {
|
|
355
|
+
classPropertyName: "itemKey",
|
|
356
|
+
publicName: "itemKey",
|
|
357
|
+
isSignal: true,
|
|
358
|
+
isRequired: true,
|
|
359
|
+
transformFunction: null
|
|
360
|
+
},
|
|
361
|
+
itemLabel: {
|
|
362
|
+
classPropertyName: "itemLabel",
|
|
363
|
+
publicName: "itemLabel",
|
|
364
|
+
isSignal: true,
|
|
365
|
+
isRequired: true,
|
|
366
|
+
transformFunction: null
|
|
367
|
+
},
|
|
368
|
+
cardActions: {
|
|
369
|
+
classPropertyName: "cardActions",
|
|
370
|
+
publicName: "cardActions",
|
|
371
|
+
isSignal: true,
|
|
372
|
+
isRequired: false,
|
|
373
|
+
transformFunction: null
|
|
374
|
+
},
|
|
375
|
+
moveMenu: {
|
|
376
|
+
classPropertyName: "moveMenu",
|
|
377
|
+
publicName: "moveMenu",
|
|
378
|
+
isSignal: true,
|
|
379
|
+
isRequired: false,
|
|
380
|
+
transformFunction: null
|
|
381
|
+
},
|
|
382
|
+
loading: {
|
|
383
|
+
classPropertyName: "loading",
|
|
384
|
+
publicName: "loading",
|
|
385
|
+
isSignal: true,
|
|
386
|
+
isRequired: false,
|
|
387
|
+
transformFunction: null
|
|
388
|
+
},
|
|
389
|
+
error: {
|
|
390
|
+
classPropertyName: "error",
|
|
391
|
+
publicName: "error",
|
|
392
|
+
isSignal: true,
|
|
393
|
+
isRequired: false,
|
|
394
|
+
transformFunction: null
|
|
395
|
+
},
|
|
396
|
+
readOnly: {
|
|
397
|
+
classPropertyName: "readOnly",
|
|
398
|
+
publicName: "readOnly",
|
|
399
|
+
isSignal: true,
|
|
400
|
+
isRequired: false,
|
|
401
|
+
transformFunction: null
|
|
402
|
+
},
|
|
403
|
+
moveDisabled: {
|
|
404
|
+
classPropertyName: "moveDisabled",
|
|
405
|
+
publicName: "moveDisabled",
|
|
406
|
+
isSignal: true,
|
|
407
|
+
isRequired: false,
|
|
408
|
+
transformFunction: null
|
|
409
|
+
},
|
|
410
|
+
canMove: {
|
|
411
|
+
classPropertyName: "canMove",
|
|
412
|
+
publicName: "canMove",
|
|
413
|
+
isSignal: true,
|
|
414
|
+
isRequired: false,
|
|
415
|
+
transformFunction: null
|
|
416
|
+
},
|
|
417
|
+
ariaLabelInput: {
|
|
418
|
+
classPropertyName: "ariaLabelInput",
|
|
419
|
+
publicName: "ariaLabel",
|
|
420
|
+
isSignal: true,
|
|
421
|
+
isRequired: false,
|
|
422
|
+
transformFunction: null
|
|
423
|
+
},
|
|
424
|
+
emptyMessageInput: {
|
|
425
|
+
classPropertyName: "emptyMessageInput",
|
|
426
|
+
publicName: "emptyMessage",
|
|
427
|
+
isSignal: true,
|
|
428
|
+
isRequired: false,
|
|
429
|
+
transformFunction: null
|
|
430
|
+
},
|
|
431
|
+
emptyColumnTextInput: {
|
|
432
|
+
classPropertyName: "emptyColumnTextInput",
|
|
433
|
+
publicName: "emptyColumnText",
|
|
434
|
+
isSignal: true,
|
|
435
|
+
isRequired: false,
|
|
436
|
+
transformFunction: null
|
|
437
|
+
},
|
|
438
|
+
itemNounInput: {
|
|
439
|
+
classPropertyName: "itemNounInput",
|
|
440
|
+
publicName: "itemNoun",
|
|
441
|
+
isSignal: true,
|
|
442
|
+
isRequired: false,
|
|
443
|
+
transformFunction: null
|
|
444
|
+
},
|
|
445
|
+
itemNounPluralInput: {
|
|
446
|
+
classPropertyName: "itemNounPluralInput",
|
|
447
|
+
publicName: "itemNounPlural",
|
|
448
|
+
isSignal: true,
|
|
449
|
+
isRequired: false,
|
|
450
|
+
transformFunction: null
|
|
451
|
+
},
|
|
452
|
+
retryLabelInput: {
|
|
453
|
+
classPropertyName: "retryLabelInput",
|
|
454
|
+
publicName: "retryLabel",
|
|
455
|
+
isSignal: true,
|
|
456
|
+
isRequired: false,
|
|
457
|
+
transformFunction: null
|
|
458
|
+
},
|
|
459
|
+
pageSize: {
|
|
460
|
+
classPropertyName: "pageSize",
|
|
461
|
+
publicName: "pageSize",
|
|
462
|
+
isSignal: true,
|
|
463
|
+
isRequired: false,
|
|
464
|
+
transformFunction: null
|
|
465
|
+
}
|
|
466
|
+
},
|
|
467
|
+
outputs: {
|
|
468
|
+
cardClick: "cardClick",
|
|
469
|
+
cardAction: "cardAction",
|
|
470
|
+
itemMove: "itemMove",
|
|
471
|
+
retry: "retry"
|
|
472
|
+
},
|
|
473
|
+
queries: [{
|
|
474
|
+
propertyName: "card",
|
|
475
|
+
first: true,
|
|
476
|
+
predicate: BoardCardDirective,
|
|
477
|
+
descendants: true,
|
|
478
|
+
isSignal: true
|
|
479
|
+
}],
|
|
480
|
+
ngImport: i0,
|
|
481
|
+
template: `
|
|
482
|
+
<!-- The card's "⋮" menu. Place it in the card's top row: <ng-container [ngTemplateOutlet]="menu" [ngTemplateOutletContext]="{ $implicit: item }" /> -->
|
|
483
|
+
<ng-template #menuTpl let-item>
|
|
484
|
+
@let actions = menuActions().get(itemKey()(item)) ?? cardActions();
|
|
485
|
+
@if (actions.length) {
|
|
486
|
+
<div class="ub-card__top-right" (click)="$event.stopPropagation()" (keydown)="$event.stopPropagation()">
|
|
487
|
+
<ui-more-menu [actions]="actions" [ariaLabel]="labels.t('board.actionsFor', { name: itemLabel()(item) })"
|
|
488
|
+
(actionClick)="onMenuAction($event, item)" />
|
|
489
|
+
</div>
|
|
490
|
+
}
|
|
491
|
+
</ng-template>
|
|
492
|
+
<div class="ub-wrap">
|
|
493
|
+
@if (loading()) {
|
|
494
|
+
<div class="ub-skeleton" role="status" [attr.aria-label]="labels.t('board.loadingNamed', { name: ariaLabel() })">
|
|
495
|
+
@for (n of skeletonColumns(); track n) {
|
|
496
|
+
<div class="ub-col-skeleton" aria-hidden="true">
|
|
497
|
+
<div class="ub-col-skeleton__header"></div>
|
|
498
|
+
@for (c of [1, 2, 3]; track c) { <div class="ub-col-skeleton__card"></div> }
|
|
499
|
+
</div>
|
|
500
|
+
}
|
|
501
|
+
</div>
|
|
502
|
+
} @else if (error()) {
|
|
503
|
+
<div class="ub-message" role="alert">
|
|
504
|
+
<p>{{ error() }}</p>
|
|
505
|
+
<ui-button variant="secondary" size="sm" (click)="retry.emit()">{{ retryLabel() }}</ui-button>
|
|
506
|
+
</div>
|
|
507
|
+
} @else if (cols().length === 0) {
|
|
508
|
+
<div class="ub-message" role="status"><p>{{ emptyMessage() }}</p></div>
|
|
509
|
+
} @else {
|
|
510
|
+
<div class="ub-board" role="region" [attr.aria-label]="ariaLabel()" [attr.aria-describedby]="canDrag() ? hintId : null">
|
|
511
|
+
@for (view of shownCols(); track view.col.key) {
|
|
512
|
+
@let col = view.col;
|
|
513
|
+
<div class="ub-col"
|
|
514
|
+
[class.ub-col--over]="overKey() === col.key"
|
|
515
|
+
[class.ub-col--success]="col.tone === 'success'"
|
|
516
|
+
role="group"
|
|
517
|
+
[attr.aria-label]="col.label + ' — ' + col.items.length + ' ' + (col.items.length === 1 ? itemNoun() : itemNounPlural())"
|
|
518
|
+
(dragover)="onDragOver($event, col)"
|
|
519
|
+
(dragleave)="onDragLeave($event, col)"
|
|
520
|
+
(drop)="onDrop($event, col)">
|
|
521
|
+
<div class="ub-col__header">
|
|
522
|
+
<div class="ub-col__title">
|
|
523
|
+
<span class="ub-col__dot" [style.background]="dot(col.color)" aria-hidden="true"></span>
|
|
524
|
+
<span class="ub-col__label">{{ col.label }}</span>
|
|
525
|
+
<span class="ub-col__count" aria-hidden="true">{{ col.items.length }}</span>
|
|
526
|
+
</div>
|
|
527
|
+
@if (col.summary) {
|
|
528
|
+
<div class="ub-col__summary"><span aria-hidden="true">{{ col.summary }}</span><span class="ub-sr-only">{{ col.summaryLabel || col.summary }}</span></div>
|
|
529
|
+
}
|
|
530
|
+
</div>
|
|
531
|
+
<div class="ub-col__cards" [attr.role]="col.items.length ? 'list' : null">
|
|
532
|
+
@for (item of view.shown; track itemKey()(item)) {
|
|
533
|
+
@let key = itemKey()(item);
|
|
534
|
+
<div class="ub-card"
|
|
535
|
+
[class.ub-card--success]="col.tone === 'success'"
|
|
536
|
+
[class.ub-card--dragging]="draggingKey() === key"
|
|
537
|
+
role="listitem"
|
|
538
|
+
tabindex="0"
|
|
539
|
+
[attr.data-board-key]="key"
|
|
540
|
+
[attr.aria-label]="itemLabel()(item)"
|
|
541
|
+
[attr.aria-keyshortcuts]="canDrag() ? 'Shift+ArrowLeft Shift+ArrowRight' : null"
|
|
542
|
+
[attr.draggable]="canDrag() ? 'true' : null"
|
|
543
|
+
(dragstart)="onDragStart($event, item, col)"
|
|
544
|
+
(dragend)="onDragEnd()"
|
|
545
|
+
(click)="cardClick.emit(item)"
|
|
546
|
+
(keydown)="onCardKey($event, item, col)">
|
|
547
|
+
@if (card(); as tpl) {
|
|
548
|
+
<ng-container [ngTemplateOutlet]="tpl.template" [ngTemplateOutletContext]="{ $implicit: item, column: col, menu: menuTpl }" />
|
|
549
|
+
}
|
|
550
|
+
</div>
|
|
551
|
+
}
|
|
552
|
+
@if (view.hidden > 0) {
|
|
553
|
+
<div class="ub-col__more" role="listitem">
|
|
554
|
+
<button type="button" class="ub-more-btn" [attr.aria-label]="labels.t('board.showMore', { next: view.next, hidden: view.hidden }) + ', ' + col.label" (click)="showMore(col.key)">{{ labels.t('board.showMore', { next: view.next, hidden: view.hidden }) }}</button>
|
|
555
|
+
</div>
|
|
556
|
+
}
|
|
557
|
+
@if (col.items.length === 0) {
|
|
558
|
+
<div class="ub-col__empty" role="status">{{ col.emptyText || emptyColumnText() }}</div>
|
|
559
|
+
}
|
|
560
|
+
</div>
|
|
561
|
+
</div>
|
|
562
|
+
}
|
|
563
|
+
</div>
|
|
564
|
+
@if (canDrag()) {
|
|
565
|
+
<p class="ub-sr-only" [id]="hintId">{{ labels.t('board.dragACardToAnother') }}</p>
|
|
566
|
+
}
|
|
567
|
+
<div class="ub-sr-only" role="status" aria-live="polite">{{ announcement() }}</div>
|
|
568
|
+
}
|
|
569
|
+
</div>
|
|
570
|
+
`,
|
|
571
|
+
isInline: true,
|
|
572
|
+
styles: ["ui-board{display:flex;flex-direction:column;flex:1;min-height:0}.ub-wrap{flex:1;min-height:0;overflow:hidden;display:flex;flex-direction:column}.ub-board{display:flex;gap:12px;padding:0 0 16px;overflow-x:auto;overflow-y:hidden;height:100%;align-items:stretch}.ub-board::-webkit-scrollbar{height:6px}.ub-board::-webkit-scrollbar-track{background:#f1f5f9;border-radius:3px}.ub-board::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:3px}.ub-col{flex:0 0 280px;min-width:280px;max-width:280px;display:flex;flex-direction:column;background:#f8fafc;border:1.5px solid #e2e8f0;border-radius:10px;min-height:0;transition:border-color .15s,background .15s}.ub-col--over{border-color:#3b82f6;background:#eff6ff}.ub-col--success{background:#f0fdf4;border-color:#bbf7d0}.ub-col--success.ub-col--over{border-color:#22c55e;background:#dcfce7}.ub-col__header{padding:12px 14px 10px;border-bottom:1px solid #e2e8f0;flex-shrink:0}.ub-col__title{display:flex;align-items:center;gap:7px;margin-bottom:2px}.ub-col__dot{width:9px;height:9px;border-radius:50%;flex-shrink:0}.ub-col__label{font-size:12px;font-weight:700;color:#374151;text-transform:uppercase;letter-spacing:.04em;flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ub-col__count{font-size:11px;font-weight:600;color:#fff;background:#64748b;border-radius:10px;padding:1px 7px;flex-shrink:0}.ub-col__summary{font-size:11px;color:#64748b;font-weight:500;margin-top:2px}.ub-col__cards{flex:1;overflow-y:auto;padding:10px;display:flex;flex-direction:column;gap:8px;min-height:60px}.ub-col__cards::-webkit-scrollbar{width:4px}.ub-col__cards::-webkit-scrollbar-track{background:transparent}.ub-col__cards::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:2px}.ub-col__more{flex-shrink:0}.ub-more-btn{width:100%;padding:8px 10px;font:inherit;font-size:12px;font-weight:600;color:#475569;background:#fff;border:1.5px dashed #cbd5e1;border-radius:8px;cursor:pointer}.ub-more-btn:hover{background:#f1f5f9;border-color:#94a3b8}.ub-more-btn:focus-visible{outline:2px solid #3b82f6;outline-offset:2px}.ub-col__empty{text-align:center;padding:24px 12px;color:#64748b;font-size:12px;border:1.5px dashed #e2e8f0;border-radius:8px;margin:4px 0}.ub-card{position:relative;background:#fff;border:1.5px solid #e2e8f0;border-radius:8px;padding:11px 12px;cursor:pointer;-webkit-user-select:none;user-select:none;transition:box-shadow .12s,border-color .12s,opacity .12s,transform .12s}.ub-card[draggable=true]{cursor:grab}.ub-card[draggable=true]:active{cursor:grabbing}.ub-card:hover{border-color:#94a3b8;box-shadow:0 2px 8px #00000012}.ub-card:focus-visible{outline:2px solid #3b82f6;outline-offset:2px}.ub-card--dragging{opacity:.4;transform:scale(.98);box-shadow:none}.ub-card--success{border-left:3px solid #22c55e}.ub-card__top{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;margin-bottom:4px}.ub-card__title{font-size:13px;font-weight:600;color:#1e293b;line-height:1.35;flex:1;min-width:0;word-break:break-word}.ub-card:hover .ub-card__title{color:#2563eb}.ub-card__top-right{flex-shrink:0;margin-top:-2px}.ub-card__status-row{margin-bottom:5px}.ub-card__contact{font-size:12px;color:#475569;margin-bottom:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ub-card__property{font-size:11px;color:#64748b;margin-bottom:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ub-card__next-step{display:flex;align-items:flex-start;gap:4px;font-size:11px;color:#64748b;margin-bottom:6px;line-height:1.4}.ub-card__next-step svg{flex-shrink:0;margin-top:1px;color:#94a3b8}.ub-card__footer{display:flex;align-items:center;justify-content:space-between;margin-top:6px;padding-top:6px;border-top:1px solid #f1f5f9}.ub-card__value{font-size:12px;font-weight:700;color:#0f172a}.ub-card__activity{font-size:11px;color:#64748b}.ub-card__activity--stale{color:#b45309;font-weight:600}.ub-skeleton{display:flex;gap:12px;padding-bottom:16px}.ub-col-skeleton{flex:0 0 280px;background:#f8fafc;border:1.5px solid #e2e8f0;border-radius:10px;padding:12px;display:flex;flex-direction:column;gap:10px}.ub-col-skeleton__header,.ub-col-skeleton__card{background:linear-gradient(90deg,#e2e8f0 25%,#f1f5f9,#e2e8f0 75%);background-size:200% 100%;animation:ub-shimmer 1.4s infinite}.ub-col-skeleton__header{height:32px;border-radius:6px}.ub-col-skeleton__card{height:90px;border-radius:8px}@keyframes ub-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}@media(prefers-reduced-motion:reduce){.ub-col-skeleton__header,.ub-col-skeleton__card{animation:none}.ub-card,.ub-col{transition:none}.ub-card--dragging{transform:none}}@media(pointer:coarse){.ub-more-btn{min-height:44px}}.ub-message{display:flex;flex-direction:column;align-items:center;gap:12px;padding:48px;color:#64748b;font-size:14px;text-align:center}.ub-message p{margin:0}.ub-sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}@media(max-width:640px){.ub-board{flex-direction:column;overflow-x:hidden;overflow-y:auto;height:auto;align-items:stretch}.ub-col{flex:none;min-width:0;max-width:100%;width:100%;max-height:none}.ub-skeleton{flex-direction:column}.ub-col-skeleton{flex:none;width:100%}}\n"],
|
|
573
|
+
dependencies: [
|
|
574
|
+
{
|
|
575
|
+
kind: "directive",
|
|
576
|
+
type: NgTemplateOutlet,
|
|
577
|
+
selector: "[ngTemplateOutlet]",
|
|
578
|
+
inputs: [
|
|
579
|
+
"ngTemplateOutletContext",
|
|
580
|
+
"ngTemplateOutlet",
|
|
581
|
+
"ngTemplateOutletInjector"
|
|
582
|
+
]
|
|
583
|
+
},
|
|
584
|
+
{
|
|
585
|
+
kind: "component",
|
|
586
|
+
type: ButtonComponent,
|
|
587
|
+
selector: "ui-button",
|
|
588
|
+
inputs: [
|
|
589
|
+
"variant",
|
|
590
|
+
"routerLink",
|
|
591
|
+
"queryParams",
|
|
592
|
+
"fragment",
|
|
593
|
+
"state",
|
|
594
|
+
"href",
|
|
595
|
+
"target",
|
|
596
|
+
"rel",
|
|
597
|
+
"shortLabel",
|
|
598
|
+
"shortBelow",
|
|
599
|
+
"color",
|
|
600
|
+
"active",
|
|
601
|
+
"size",
|
|
602
|
+
"type",
|
|
603
|
+
"disabled",
|
|
604
|
+
"loading",
|
|
605
|
+
"fullWidth",
|
|
606
|
+
"ariaLabel",
|
|
607
|
+
"ariaExpanded",
|
|
608
|
+
"ariaPressed",
|
|
609
|
+
"ariaDescribedBy",
|
|
610
|
+
"modal-footer-left",
|
|
611
|
+
"modal-footer-right"
|
|
612
|
+
]
|
|
613
|
+
},
|
|
614
|
+
{
|
|
615
|
+
kind: "component",
|
|
616
|
+
type: MoreMenuComponent,
|
|
617
|
+
selector: "ui-more-menu",
|
|
618
|
+
inputs: ["ariaLabel", "actions"],
|
|
619
|
+
outputs: ["actionClick"]
|
|
620
|
+
}
|
|
621
|
+
],
|
|
622
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
623
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
624
|
+
});
|
|
625
|
+
}
|
|
626
|
+
};
|
|
627
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
628
|
+
minVersion: "12.0.0",
|
|
629
|
+
version: "22.2.2",
|
|
630
|
+
ngImport: i0,
|
|
631
|
+
type: BoardComponent,
|
|
632
|
+
decorators: [{
|
|
633
|
+
type: Component,
|
|
634
|
+
args: [{
|
|
635
|
+
selector: "ui-board",
|
|
636
|
+
standalone: true,
|
|
637
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
638
|
+
encapsulation: ViewEncapsulation.None,
|
|
639
|
+
imports: [
|
|
640
|
+
NgTemplateOutlet,
|
|
641
|
+
ButtonComponent,
|
|
642
|
+
MoreMenuComponent
|
|
643
|
+
],
|
|
644
|
+
template: `
|
|
645
|
+
<!-- The card's "⋮" menu. Place it in the card's top row: <ng-container [ngTemplateOutlet]="menu" [ngTemplateOutletContext]="{ $implicit: item }" /> -->
|
|
646
|
+
<ng-template #menuTpl let-item>
|
|
647
|
+
@let actions = menuActions().get(itemKey()(item)) ?? cardActions();
|
|
648
|
+
@if (actions.length) {
|
|
649
|
+
<div class="ub-card__top-right" (click)="$event.stopPropagation()" (keydown)="$event.stopPropagation()">
|
|
650
|
+
<ui-more-menu [actions]="actions" [ariaLabel]="labels.t('board.actionsFor', { name: itemLabel()(item) })"
|
|
651
|
+
(actionClick)="onMenuAction($event, item)" />
|
|
652
|
+
</div>
|
|
653
|
+
}
|
|
654
|
+
</ng-template>
|
|
655
|
+
<div class="ub-wrap">
|
|
656
|
+
@if (loading()) {
|
|
657
|
+
<div class="ub-skeleton" role="status" [attr.aria-label]="labels.t('board.loadingNamed', { name: ariaLabel() })">
|
|
658
|
+
@for (n of skeletonColumns(); track n) {
|
|
659
|
+
<div class="ub-col-skeleton" aria-hidden="true">
|
|
660
|
+
<div class="ub-col-skeleton__header"></div>
|
|
661
|
+
@for (c of [1, 2, 3]; track c) { <div class="ub-col-skeleton__card"></div> }
|
|
662
|
+
</div>
|
|
663
|
+
}
|
|
664
|
+
</div>
|
|
665
|
+
} @else if (error()) {
|
|
666
|
+
<div class="ub-message" role="alert">
|
|
667
|
+
<p>{{ error() }}</p>
|
|
668
|
+
<ui-button variant="secondary" size="sm" (click)="retry.emit()">{{ retryLabel() }}</ui-button>
|
|
669
|
+
</div>
|
|
670
|
+
} @else if (cols().length === 0) {
|
|
671
|
+
<div class="ub-message" role="status"><p>{{ emptyMessage() }}</p></div>
|
|
672
|
+
} @else {
|
|
673
|
+
<div class="ub-board" role="region" [attr.aria-label]="ariaLabel()" [attr.aria-describedby]="canDrag() ? hintId : null">
|
|
674
|
+
@for (view of shownCols(); track view.col.key) {
|
|
675
|
+
@let col = view.col;
|
|
676
|
+
<div class="ub-col"
|
|
677
|
+
[class.ub-col--over]="overKey() === col.key"
|
|
678
|
+
[class.ub-col--success]="col.tone === 'success'"
|
|
679
|
+
role="group"
|
|
680
|
+
[attr.aria-label]="col.label + ' — ' + col.items.length + ' ' + (col.items.length === 1 ? itemNoun() : itemNounPlural())"
|
|
681
|
+
(dragover)="onDragOver($event, col)"
|
|
682
|
+
(dragleave)="onDragLeave($event, col)"
|
|
683
|
+
(drop)="onDrop($event, col)">
|
|
684
|
+
<div class="ub-col__header">
|
|
685
|
+
<div class="ub-col__title">
|
|
686
|
+
<span class="ub-col__dot" [style.background]="dot(col.color)" aria-hidden="true"></span>
|
|
687
|
+
<span class="ub-col__label">{{ col.label }}</span>
|
|
688
|
+
<span class="ub-col__count" aria-hidden="true">{{ col.items.length }}</span>
|
|
689
|
+
</div>
|
|
690
|
+
@if (col.summary) {
|
|
691
|
+
<div class="ub-col__summary"><span aria-hidden="true">{{ col.summary }}</span><span class="ub-sr-only">{{ col.summaryLabel || col.summary }}</span></div>
|
|
692
|
+
}
|
|
693
|
+
</div>
|
|
694
|
+
<div class="ub-col__cards" [attr.role]="col.items.length ? 'list' : null">
|
|
695
|
+
@for (item of view.shown; track itemKey()(item)) {
|
|
696
|
+
@let key = itemKey()(item);
|
|
697
|
+
<div class="ub-card"
|
|
698
|
+
[class.ub-card--success]="col.tone === 'success'"
|
|
699
|
+
[class.ub-card--dragging]="draggingKey() === key"
|
|
700
|
+
role="listitem"
|
|
701
|
+
tabindex="0"
|
|
702
|
+
[attr.data-board-key]="key"
|
|
703
|
+
[attr.aria-label]="itemLabel()(item)"
|
|
704
|
+
[attr.aria-keyshortcuts]="canDrag() ? 'Shift+ArrowLeft Shift+ArrowRight' : null"
|
|
705
|
+
[attr.draggable]="canDrag() ? 'true' : null"
|
|
706
|
+
(dragstart)="onDragStart($event, item, col)"
|
|
707
|
+
(dragend)="onDragEnd()"
|
|
708
|
+
(click)="cardClick.emit(item)"
|
|
709
|
+
(keydown)="onCardKey($event, item, col)">
|
|
710
|
+
@if (card(); as tpl) {
|
|
711
|
+
<ng-container [ngTemplateOutlet]="tpl.template" [ngTemplateOutletContext]="{ $implicit: item, column: col, menu: menuTpl }" />
|
|
712
|
+
}
|
|
713
|
+
</div>
|
|
714
|
+
}
|
|
715
|
+
@if (view.hidden > 0) {
|
|
716
|
+
<div class="ub-col__more" role="listitem">
|
|
717
|
+
<button type="button" class="ub-more-btn" [attr.aria-label]="labels.t('board.showMore', { next: view.next, hidden: view.hidden }) + ', ' + col.label" (click)="showMore(col.key)">{{ labels.t('board.showMore', { next: view.next, hidden: view.hidden }) }}</button>
|
|
718
|
+
</div>
|
|
719
|
+
}
|
|
720
|
+
@if (col.items.length === 0) {
|
|
721
|
+
<div class="ub-col__empty" role="status">{{ col.emptyText || emptyColumnText() }}</div>
|
|
722
|
+
}
|
|
723
|
+
</div>
|
|
724
|
+
</div>
|
|
725
|
+
}
|
|
726
|
+
</div>
|
|
727
|
+
@if (canDrag()) {
|
|
728
|
+
<p class="ub-sr-only" [id]="hintId">{{ labels.t('board.dragACardToAnother') }}</p>
|
|
729
|
+
}
|
|
730
|
+
<div class="ub-sr-only" role="status" aria-live="polite">{{ announcement() }}</div>
|
|
731
|
+
}
|
|
732
|
+
</div>
|
|
733
|
+
`,
|
|
734
|
+
styles: ["ui-board{display:flex;flex-direction:column;flex:1;min-height:0}.ub-wrap{flex:1;min-height:0;overflow:hidden;display:flex;flex-direction:column}.ub-board{display:flex;gap:12px;padding:0 0 16px;overflow-x:auto;overflow-y:hidden;height:100%;align-items:stretch}.ub-board::-webkit-scrollbar{height:6px}.ub-board::-webkit-scrollbar-track{background:#f1f5f9;border-radius:3px}.ub-board::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:3px}.ub-col{flex:0 0 280px;min-width:280px;max-width:280px;display:flex;flex-direction:column;background:#f8fafc;border:1.5px solid #e2e8f0;border-radius:10px;min-height:0;transition:border-color .15s,background .15s}.ub-col--over{border-color:#3b82f6;background:#eff6ff}.ub-col--success{background:#f0fdf4;border-color:#bbf7d0}.ub-col--success.ub-col--over{border-color:#22c55e;background:#dcfce7}.ub-col__header{padding:12px 14px 10px;border-bottom:1px solid #e2e8f0;flex-shrink:0}.ub-col__title{display:flex;align-items:center;gap:7px;margin-bottom:2px}.ub-col__dot{width:9px;height:9px;border-radius:50%;flex-shrink:0}.ub-col__label{font-size:12px;font-weight:700;color:#374151;text-transform:uppercase;letter-spacing:.04em;flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ub-col__count{font-size:11px;font-weight:600;color:#fff;background:#64748b;border-radius:10px;padding:1px 7px;flex-shrink:0}.ub-col__summary{font-size:11px;color:#64748b;font-weight:500;margin-top:2px}.ub-col__cards{flex:1;overflow-y:auto;padding:10px;display:flex;flex-direction:column;gap:8px;min-height:60px}.ub-col__cards::-webkit-scrollbar{width:4px}.ub-col__cards::-webkit-scrollbar-track{background:transparent}.ub-col__cards::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:2px}.ub-col__more{flex-shrink:0}.ub-more-btn{width:100%;padding:8px 10px;font:inherit;font-size:12px;font-weight:600;color:#475569;background:#fff;border:1.5px dashed #cbd5e1;border-radius:8px;cursor:pointer}.ub-more-btn:hover{background:#f1f5f9;border-color:#94a3b8}.ub-more-btn:focus-visible{outline:2px solid #3b82f6;outline-offset:2px}.ub-col__empty{text-align:center;padding:24px 12px;color:#64748b;font-size:12px;border:1.5px dashed #e2e8f0;border-radius:8px;margin:4px 0}.ub-card{position:relative;background:#fff;border:1.5px solid #e2e8f0;border-radius:8px;padding:11px 12px;cursor:pointer;-webkit-user-select:none;user-select:none;transition:box-shadow .12s,border-color .12s,opacity .12s,transform .12s}.ub-card[draggable=true]{cursor:grab}.ub-card[draggable=true]:active{cursor:grabbing}.ub-card:hover{border-color:#94a3b8;box-shadow:0 2px 8px #00000012}.ub-card:focus-visible{outline:2px solid #3b82f6;outline-offset:2px}.ub-card--dragging{opacity:.4;transform:scale(.98);box-shadow:none}.ub-card--success{border-left:3px solid #22c55e}.ub-card__top{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;margin-bottom:4px}.ub-card__title{font-size:13px;font-weight:600;color:#1e293b;line-height:1.35;flex:1;min-width:0;word-break:break-word}.ub-card:hover .ub-card__title{color:#2563eb}.ub-card__top-right{flex-shrink:0;margin-top:-2px}.ub-card__status-row{margin-bottom:5px}.ub-card__contact{font-size:12px;color:#475569;margin-bottom:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ub-card__property{font-size:11px;color:#64748b;margin-bottom:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ub-card__next-step{display:flex;align-items:flex-start;gap:4px;font-size:11px;color:#64748b;margin-bottom:6px;line-height:1.4}.ub-card__next-step svg{flex-shrink:0;margin-top:1px;color:#94a3b8}.ub-card__footer{display:flex;align-items:center;justify-content:space-between;margin-top:6px;padding-top:6px;border-top:1px solid #f1f5f9}.ub-card__value{font-size:12px;font-weight:700;color:#0f172a}.ub-card__activity{font-size:11px;color:#64748b}.ub-card__activity--stale{color:#b45309;font-weight:600}.ub-skeleton{display:flex;gap:12px;padding-bottom:16px}.ub-col-skeleton{flex:0 0 280px;background:#f8fafc;border:1.5px solid #e2e8f0;border-radius:10px;padding:12px;display:flex;flex-direction:column;gap:10px}.ub-col-skeleton__header,.ub-col-skeleton__card{background:linear-gradient(90deg,#e2e8f0 25%,#f1f5f9,#e2e8f0 75%);background-size:200% 100%;animation:ub-shimmer 1.4s infinite}.ub-col-skeleton__header{height:32px;border-radius:6px}.ub-col-skeleton__card{height:90px;border-radius:8px}@keyframes ub-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}@media(prefers-reduced-motion:reduce){.ub-col-skeleton__header,.ub-col-skeleton__card{animation:none}.ub-card,.ub-col{transition:none}.ub-card--dragging{transform:none}}@media(pointer:coarse){.ub-more-btn{min-height:44px}}.ub-message{display:flex;flex-direction:column;align-items:center;gap:12px;padding:48px;color:#64748b;font-size:14px;text-align:center}.ub-message p{margin:0}.ub-sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}@media(max-width:640px){.ub-board{flex-direction:column;overflow-x:hidden;overflow-y:auto;height:auto;align-items:stretch}.ub-col{flex:none;min-width:0;max-width:100%;width:100%;max-height:none}.ub-skeleton{flex-direction:column}.ub-col-skeleton{flex:none;width:100%}}\n"]
|
|
735
|
+
}]
|
|
736
|
+
}],
|
|
737
|
+
ctorParameters: () => [],
|
|
738
|
+
propDecorators: {
|
|
739
|
+
columns: [{
|
|
740
|
+
type: i0.Input,
|
|
741
|
+
args: [{
|
|
742
|
+
isSignal: true,
|
|
743
|
+
alias: "columns",
|
|
744
|
+
required: true
|
|
745
|
+
}]
|
|
746
|
+
}],
|
|
747
|
+
itemKey: [{
|
|
748
|
+
type: i0.Input,
|
|
749
|
+
args: [{
|
|
750
|
+
isSignal: true,
|
|
751
|
+
alias: "itemKey",
|
|
752
|
+
required: true
|
|
753
|
+
}]
|
|
754
|
+
}],
|
|
755
|
+
itemLabel: [{
|
|
756
|
+
type: i0.Input,
|
|
757
|
+
args: [{
|
|
758
|
+
isSignal: true,
|
|
759
|
+
alias: "itemLabel",
|
|
760
|
+
required: true
|
|
761
|
+
}]
|
|
762
|
+
}],
|
|
763
|
+
cardActions: [{
|
|
764
|
+
type: i0.Input,
|
|
765
|
+
args: [{
|
|
766
|
+
isSignal: true,
|
|
767
|
+
alias: "cardActions",
|
|
768
|
+
required: false
|
|
769
|
+
}]
|
|
770
|
+
}],
|
|
771
|
+
moveMenu: [{
|
|
772
|
+
type: i0.Input,
|
|
773
|
+
args: [{
|
|
774
|
+
isSignal: true,
|
|
775
|
+
alias: "moveMenu",
|
|
776
|
+
required: false
|
|
777
|
+
}]
|
|
778
|
+
}],
|
|
779
|
+
loading: [{
|
|
780
|
+
type: i0.Input,
|
|
781
|
+
args: [{
|
|
782
|
+
isSignal: true,
|
|
783
|
+
alias: "loading",
|
|
784
|
+
required: false
|
|
785
|
+
}]
|
|
786
|
+
}],
|
|
787
|
+
error: [{
|
|
788
|
+
type: i0.Input,
|
|
789
|
+
args: [{
|
|
790
|
+
isSignal: true,
|
|
791
|
+
alias: "error",
|
|
792
|
+
required: false
|
|
793
|
+
}]
|
|
794
|
+
}],
|
|
795
|
+
readOnly: [{
|
|
796
|
+
type: i0.Input,
|
|
797
|
+
args: [{
|
|
798
|
+
isSignal: true,
|
|
799
|
+
alias: "readOnly",
|
|
800
|
+
required: false
|
|
801
|
+
}]
|
|
802
|
+
}],
|
|
803
|
+
moveDisabled: [{
|
|
804
|
+
type: i0.Input,
|
|
805
|
+
args: [{
|
|
806
|
+
isSignal: true,
|
|
807
|
+
alias: "moveDisabled",
|
|
808
|
+
required: false
|
|
809
|
+
}]
|
|
810
|
+
}],
|
|
811
|
+
canMove: [{
|
|
812
|
+
type: i0.Input,
|
|
813
|
+
args: [{
|
|
814
|
+
isSignal: true,
|
|
815
|
+
alias: "canMove",
|
|
816
|
+
required: false
|
|
817
|
+
}]
|
|
818
|
+
}],
|
|
819
|
+
ariaLabelInput: [{
|
|
820
|
+
type: i0.Input,
|
|
821
|
+
args: [{
|
|
822
|
+
isSignal: true,
|
|
823
|
+
alias: "ariaLabel",
|
|
824
|
+
required: false
|
|
825
|
+
}]
|
|
826
|
+
}],
|
|
827
|
+
emptyMessageInput: [{
|
|
828
|
+
type: i0.Input,
|
|
829
|
+
args: [{
|
|
830
|
+
isSignal: true,
|
|
831
|
+
alias: "emptyMessage",
|
|
832
|
+
required: false
|
|
833
|
+
}]
|
|
834
|
+
}],
|
|
835
|
+
emptyColumnTextInput: [{
|
|
836
|
+
type: i0.Input,
|
|
837
|
+
args: [{
|
|
838
|
+
isSignal: true,
|
|
839
|
+
alias: "emptyColumnText",
|
|
840
|
+
required: false
|
|
841
|
+
}]
|
|
842
|
+
}],
|
|
843
|
+
itemNounInput: [{
|
|
844
|
+
type: i0.Input,
|
|
845
|
+
args: [{
|
|
846
|
+
isSignal: true,
|
|
847
|
+
alias: "itemNoun",
|
|
848
|
+
required: false
|
|
849
|
+
}]
|
|
850
|
+
}],
|
|
851
|
+
itemNounPluralInput: [{
|
|
852
|
+
type: i0.Input,
|
|
853
|
+
args: [{
|
|
854
|
+
isSignal: true,
|
|
855
|
+
alias: "itemNounPlural",
|
|
856
|
+
required: false
|
|
857
|
+
}]
|
|
858
|
+
}],
|
|
859
|
+
retryLabelInput: [{
|
|
860
|
+
type: i0.Input,
|
|
861
|
+
args: [{
|
|
862
|
+
isSignal: true,
|
|
863
|
+
alias: "retryLabel",
|
|
864
|
+
required: false
|
|
865
|
+
}]
|
|
866
|
+
}],
|
|
867
|
+
pageSize: [{
|
|
868
|
+
type: i0.Input,
|
|
869
|
+
args: [{
|
|
870
|
+
isSignal: true,
|
|
871
|
+
alias: "pageSize",
|
|
872
|
+
required: false
|
|
873
|
+
}]
|
|
874
|
+
}],
|
|
875
|
+
cardClick: [{
|
|
876
|
+
type: i0.Output,
|
|
877
|
+
args: ["cardClick"]
|
|
878
|
+
}],
|
|
879
|
+
cardAction: [{
|
|
880
|
+
type: i0.Output,
|
|
881
|
+
args: ["cardAction"]
|
|
882
|
+
}],
|
|
883
|
+
itemMove: [{
|
|
884
|
+
type: i0.Output,
|
|
885
|
+
args: ["itemMove"]
|
|
886
|
+
}],
|
|
887
|
+
retry: [{
|
|
888
|
+
type: i0.Output,
|
|
889
|
+
args: ["retry"]
|
|
890
|
+
}],
|
|
891
|
+
card: [{
|
|
892
|
+
type: i0.ContentChild,
|
|
893
|
+
args: [i0.forwardRef(() => BoardCardDirective), { isSignal: true }]
|
|
894
|
+
}]
|
|
895
|
+
}
|
|
896
|
+
});
|
|
897
|
+
function columnAtPoint(rects, x, y) {
|
|
898
|
+
for (const r of rects) if (x >= r.left && x <= r.right && y >= r.top && y <= r.bottom) return r.key;
|
|
899
|
+
return null;
|
|
900
|
+
}
|
|
901
|
+
function dropIndexAt(middles, y) {
|
|
902
|
+
let index = 0;
|
|
903
|
+
for (const m of middles) if (m < y) index++;
|
|
904
|
+
return index;
|
|
905
|
+
}
|
|
906
|
+
function autoScrollDelta(pos, start, end, edge = 48, maxSpeed = 18) {
|
|
907
|
+
if (end - start <= 0) return 0;
|
|
908
|
+
const zone = Math.min(edge, (end - start) / 2);
|
|
909
|
+
if (pos < start + zone) return -Math.round(maxSpeed * Math.min(1, (start + zone - pos) / zone));
|
|
910
|
+
if (pos > end - zone) return Math.round(maxSpeed * Math.min(1, (pos - (end - zone)) / zone));
|
|
911
|
+
return 0;
|
|
912
|
+
}
|
|
913
|
+
function clamp(n, min, max) {
|
|
914
|
+
return Math.min(max, Math.max(min, n));
|
|
915
|
+
}
|
|
916
|
+
var KanbanCardDirective = class KanbanCardDirective {
|
|
917
|
+
constructor() {
|
|
918
|
+
this.typeFrom = input("", {
|
|
919
|
+
...ngDevMode ? { debugName: "typeFrom" } : /* istanbul ignore next */ {},
|
|
920
|
+
alias: "uiKanbanCard"
|
|
921
|
+
});
|
|
922
|
+
this.template = inject(TemplateRef);
|
|
923
|
+
}
|
|
924
|
+
static ngTemplateContextGuard(_dir, _ctx) {
|
|
925
|
+
return true;
|
|
926
|
+
}
|
|
927
|
+
static {
|
|
928
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
929
|
+
minVersion: "12.0.0",
|
|
930
|
+
version: "22.2.2",
|
|
931
|
+
ngImport: i0,
|
|
932
|
+
type: KanbanCardDirective,
|
|
933
|
+
deps: [],
|
|
934
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
935
|
+
});
|
|
936
|
+
}
|
|
937
|
+
static {
|
|
938
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
939
|
+
minVersion: "17.1.0",
|
|
940
|
+
version: "22.2.2",
|
|
941
|
+
type: KanbanCardDirective,
|
|
942
|
+
isStandalone: true,
|
|
943
|
+
selector: "ng-template[uiKanbanCard]",
|
|
944
|
+
inputs: { typeFrom: {
|
|
945
|
+
classPropertyName: "typeFrom",
|
|
946
|
+
publicName: "uiKanbanCard",
|
|
947
|
+
isSignal: true,
|
|
948
|
+
isRequired: false,
|
|
949
|
+
transformFunction: null
|
|
950
|
+
} },
|
|
951
|
+
ngImport: i0
|
|
952
|
+
});
|
|
953
|
+
}
|
|
954
|
+
};
|
|
955
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
956
|
+
minVersion: "12.0.0",
|
|
957
|
+
version: "22.2.2",
|
|
958
|
+
ngImport: i0,
|
|
959
|
+
type: KanbanCardDirective,
|
|
960
|
+
decorators: [{
|
|
961
|
+
type: Directive,
|
|
962
|
+
args: [{
|
|
963
|
+
selector: "ng-template[uiKanbanCard]",
|
|
964
|
+
standalone: true
|
|
965
|
+
}]
|
|
966
|
+
}],
|
|
967
|
+
propDecorators: { typeFrom: [{
|
|
968
|
+
type: i0.Input,
|
|
969
|
+
args: [{
|
|
970
|
+
isSignal: true,
|
|
971
|
+
alias: "uiKanbanCard",
|
|
972
|
+
required: false
|
|
973
|
+
}]
|
|
974
|
+
}] }
|
|
975
|
+
});
|
|
976
|
+
const MOVE_PREFIX = "kb-move:";
|
|
977
|
+
const MOVE_ICON = "M4 12h12m0 0l-4-4m4 4l-4 4M20 5v14";
|
|
978
|
+
const DRAG_THRESHOLD_PX = 5;
|
|
979
|
+
const DOT_COLORS = {
|
|
980
|
+
blue: "#3b82f6",
|
|
981
|
+
cyan: "#06b6d4",
|
|
982
|
+
green: "#22c55e",
|
|
983
|
+
teal: "#14b8a6",
|
|
984
|
+
amber: "#f59e0b",
|
|
985
|
+
orange: "#f97316",
|
|
986
|
+
red: "#ef4444",
|
|
987
|
+
pink: "#ec4899",
|
|
988
|
+
slate: "#64748b",
|
|
989
|
+
gray: "#6b7280"
|
|
990
|
+
};
|
|
991
|
+
let nextBoardId = 0;
|
|
992
|
+
var KanbanBoardComponent = class KanbanBoardComponent {
|
|
993
|
+
constructor() {
|
|
994
|
+
this.labels = inject(UiLabelsService);
|
|
995
|
+
this.host = inject(ElementRef);
|
|
996
|
+
this.doc = inject(DOCUMENT);
|
|
997
|
+
this.injector = inject(Injector);
|
|
998
|
+
this.zone = inject(NgZone);
|
|
999
|
+
this.columns = input.required(...ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []);
|
|
1000
|
+
this.items = input.required(...ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []);
|
|
1001
|
+
this.columnFn = input.required(...ngDevMode ? [{ debugName: "columnFn" }] : /* istanbul ignore next */ []);
|
|
1002
|
+
this.cardId = input.required(...ngDevMode ? [{ debugName: "cardId" }] : /* istanbul ignore next */ []);
|
|
1003
|
+
this.cardLabel = input.required(...ngDevMode ? [{ debugName: "cardLabel" }] : /* istanbul ignore next */ []);
|
|
1004
|
+
this.canDrop = input(null, ...ngDevMode ? [{ debugName: "canDrop" }] : /* istanbul ignore next */ []);
|
|
1005
|
+
this.reorderable = input(true, ...ngDevMode ? [{ debugName: "reorderable" }] : /* istanbul ignore next */ []);
|
|
1006
|
+
this.moveMenu = input(true, ...ngDevMode ? [{ debugName: "moveMenu" }] : /* istanbul ignore next */ []);
|
|
1007
|
+
this.loading = input(false, ...ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []);
|
|
1008
|
+
this.readOnly = input(false, ...ngDevMode ? [{ debugName: "readOnly" }] : /* istanbul ignore next */ []);
|
|
1009
|
+
this.disabled = input(false, ...ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []);
|
|
1010
|
+
this.pageSize = input(50, ...ngDevMode ? [{ debugName: "pageSize" }] : /* istanbul ignore next */ []);
|
|
1011
|
+
this.ariaLabelInput = input(null, {
|
|
1012
|
+
...ngDevMode ? { debugName: "ariaLabelInput" } : /* istanbul ignore next */ {},
|
|
1013
|
+
alias: "ariaLabel"
|
|
1014
|
+
});
|
|
1015
|
+
this.ariaLabel = computed(() => this.ariaLabelInput() ?? this.labels.t("kanban.ariaLabel"), ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
|
|
1016
|
+
this.emptyTextInput = input(null, {
|
|
1017
|
+
...ngDevMode ? { debugName: "emptyTextInput" } : /* istanbul ignore next */ {},
|
|
1018
|
+
alias: "emptyText"
|
|
1019
|
+
});
|
|
1020
|
+
this.emptyText = computed(() => this.emptyTextInput() ?? this.labels.t("kanban.emptyColumnText"), ...ngDevMode ? [{ debugName: "emptyText" }] : /* istanbul ignore next */ []);
|
|
1021
|
+
this.cardMove = output();
|
|
1022
|
+
this.cardClick = output();
|
|
1023
|
+
this.columnMore = output();
|
|
1024
|
+
this.card = contentChild(KanbanCardDirective, ...ngDevMode ? [{ debugName: "card" }] : /* istanbul ignore next */ []);
|
|
1025
|
+
this.hintId = `kb-hint-${nextBoardId++}`;
|
|
1026
|
+
this.pickUpKeys = "Space";
|
|
1027
|
+
this.announcement = signal("", ...ngDevMode ? [{ debugName: "announcement" }] : /* istanbul ignore next */ []);
|
|
1028
|
+
this.tabKey = signal(null, ...ngDevMode ? [{ debugName: "tabKey" }] : /* istanbul ignore next */ []);
|
|
1029
|
+
this.canDrag = computed(() => !this.readOnly() && !this.disabled(), ...ngDevMode ? [{ debugName: "canDrag" }] : /* istanbul ignore next */ []);
|
|
1030
|
+
this.skeletonColumns = computed(() => Array.from({ length: Math.max(this.columns().length, 4) }, (_, i) => i), ...ngDevMode ? [{ debugName: "skeletonColumns" }] : /* istanbul ignore next */ []);
|
|
1031
|
+
this.layout = linkedSignal(() => this.group(this.items(), this.columnKeys(), this.columnFn()), ...ngDevMode ? [{ debugName: "layout" }] : /* istanbul ignore next */ []);
|
|
1032
|
+
this.columnKeys = computed(() => this.columns().map((c) => c.key).join("\0"), {
|
|
1033
|
+
...ngDevMode ? { debugName: "columnKeys" } : /* istanbul ignore next */ {},
|
|
1034
|
+
equal: (a, b) => a === b
|
|
1035
|
+
});
|
|
1036
|
+
this.session = signal(null, ...ngDevMode ? [{ debugName: "session" }] : /* istanbul ignore next */ []);
|
|
1037
|
+
this.drawn = signal({}, ...ngDevMode ? [{ debugName: "drawn" }] : /* istanbul ignore next */ []);
|
|
1038
|
+
this.movedKey = signal(null, ...ngDevMode ? [{ debugName: "movedKey" }] : /* istanbul ignore next */ []);
|
|
1039
|
+
this.history = /* @__PURE__ */ new Map();
|
|
1040
|
+
this.moveSeq = 0;
|
|
1041
|
+
this.pointer = null;
|
|
1042
|
+
this.suppressClick = false;
|
|
1043
|
+
this.liftedKey = computed(() => this.session()?.key ?? null, ...ngDevMode ? [{ debugName: "liftedKey" }] : /* istanbul ignore next */ []);
|
|
1044
|
+
this.pointerDragging = computed(() => this.session()?.mode === "pointer", ...ngDevMode ? [{ debugName: "pointerDragging" }] : /* istanbul ignore next */ []);
|
|
1045
|
+
this.views = computed(() => {
|
|
1046
|
+
const size = this.pageSize() > 0 ? Math.floor(this.pageSize()) : 0;
|
|
1047
|
+
const session = this.session();
|
|
1048
|
+
const held = session?.mode === "keyboard" ? session : null;
|
|
1049
|
+
const movedKey = this.movedKey();
|
|
1050
|
+
return this.columns().map((col) => {
|
|
1051
|
+
const list = this.layout().get(col.key) ?? [];
|
|
1052
|
+
const whole = !size || held !== null && (held.fromCol === col.key || held.col === col.key);
|
|
1053
|
+
let limit = whole ? list.length : Math.min(list.length, this.drawn()[col.key] ?? size);
|
|
1054
|
+
if (!whole) {
|
|
1055
|
+
if (session && session.fromCol === col.key) limit = Math.max(limit, Math.min(list.length, session.fromIndex + 1));
|
|
1056
|
+
if (movedKey !== null) {
|
|
1057
|
+
const at = list.findIndex((i) => this.cardId()(i) === movedKey);
|
|
1058
|
+
if (at >= 0) limit = Math.max(limit, at + 1);
|
|
1059
|
+
}
|
|
1060
|
+
}
|
|
1061
|
+
const hidden = list.length - limit;
|
|
1062
|
+
const remaining = Math.max(0, Math.floor(col.remaining ?? 0));
|
|
1063
|
+
return {
|
|
1064
|
+
col,
|
|
1065
|
+
list,
|
|
1066
|
+
shown: hidden > 0 ? list.slice(0, limit) : list,
|
|
1067
|
+
hidden,
|
|
1068
|
+
next: Math.min(size, hidden),
|
|
1069
|
+
remaining,
|
|
1070
|
+
count: list.length + remaining,
|
|
1071
|
+
nextRemote: Math.min(remaining, Math.max(1, Math.floor(col.nextCount ?? (size > 0 ? size : remaining))))
|
|
1072
|
+
};
|
|
1073
|
+
});
|
|
1074
|
+
}, ...ngDevMode ? [{ debugName: "views" }] : /* istanbul ignore next */ []);
|
|
1075
|
+
this.tabbableKey = computed(() => {
|
|
1076
|
+
const keys = /* @__PURE__ */ new Set();
|
|
1077
|
+
for (const list of this.layout().values()) for (const i of list) keys.add(this.cardId()(i));
|
|
1078
|
+
const wanted = this.tabKey();
|
|
1079
|
+
if (wanted && keys.has(wanted)) return wanted;
|
|
1080
|
+
for (const col of this.columns()) {
|
|
1081
|
+
const first = this.layout().get(col.key)?.[0];
|
|
1082
|
+
if (first !== void 0) return this.cardId()(first);
|
|
1083
|
+
}
|
|
1084
|
+
return null;
|
|
1085
|
+
}, ...ngDevMode ? [{ debugName: "tabbableKey" }] : /* istanbul ignore next */ []);
|
|
1086
|
+
this.slot = computed(() => {
|
|
1087
|
+
const s = this.session();
|
|
1088
|
+
if (!s || s.col === null || !this.targetAllowed(s)) return null;
|
|
1089
|
+
const before = (this.layout().get(s.col) ?? []).filter((i) => this.cardId()(i) !== s.key)[s.index];
|
|
1090
|
+
return {
|
|
1091
|
+
col: s.col,
|
|
1092
|
+
beforeKey: before === void 0 ? null : this.cardId()(before)
|
|
1093
|
+
};
|
|
1094
|
+
}, ...ngDevMode ? [{ debugName: "slot" }] : /* istanbul ignore next */ []);
|
|
1095
|
+
this.menuMemo = computed(() => {
|
|
1096
|
+
this.columns();
|
|
1097
|
+
this.canDrop();
|
|
1098
|
+
this.canDrag();
|
|
1099
|
+
this.layout();
|
|
1100
|
+
this.labels.t("kanban.moveTo", { column: "" });
|
|
1101
|
+
return /* @__PURE__ */ new Map();
|
|
1102
|
+
}, ...ngDevMode ? [{ debugName: "menuMemo" }] : /* istanbul ignore next */ []);
|
|
1103
|
+
this.onDocMove = (event) => {
|
|
1104
|
+
const p = this.pointer;
|
|
1105
|
+
if (!p || event.pointerId !== p.id) return;
|
|
1106
|
+
p.x = event.clientX;
|
|
1107
|
+
p.y = event.clientY;
|
|
1108
|
+
if (!p.started) {
|
|
1109
|
+
if (Math.hypot(p.x - p.startX, p.y - p.startY) < DRAG_THRESHOLD_PX) return;
|
|
1110
|
+
this.startDrag(p);
|
|
1111
|
+
}
|
|
1112
|
+
event.preventDefault();
|
|
1113
|
+
this.placeGhost(p);
|
|
1114
|
+
this.retarget(p);
|
|
1115
|
+
};
|
|
1116
|
+
this.onDocUp = (event) => {
|
|
1117
|
+
if (this.pointer && event.pointerId === this.pointer.id) this.endPointer(true, true);
|
|
1118
|
+
};
|
|
1119
|
+
this.onDocCancel = (event) => {
|
|
1120
|
+
if (this.pointer && event.pointerId === this.pointer.id) this.endPointer(false, true);
|
|
1121
|
+
};
|
|
1122
|
+
this.onSelectStart = (event) => {
|
|
1123
|
+
if (this.pointer) event.preventDefault();
|
|
1124
|
+
};
|
|
1125
|
+
this.onDocKey = (event) => {
|
|
1126
|
+
if (event.key === "Escape" && this.pointer) {
|
|
1127
|
+
event.preventDefault();
|
|
1128
|
+
this.endPointer(false, true);
|
|
1129
|
+
}
|
|
1130
|
+
};
|
|
1131
|
+
effect(() => {
|
|
1132
|
+
this.items();
|
|
1133
|
+
untracked(() => {
|
|
1134
|
+
this.history.clear();
|
|
1135
|
+
this.letGo();
|
|
1136
|
+
});
|
|
1137
|
+
});
|
|
1138
|
+
effect(() => {
|
|
1139
|
+
if (this.loading()) untracked(() => {
|
|
1140
|
+
this.drawn.set({});
|
|
1141
|
+
this.movedKey.set(null);
|
|
1142
|
+
this.letGo();
|
|
1143
|
+
});
|
|
1144
|
+
});
|
|
1145
|
+
effect(() => {
|
|
1146
|
+
if (!this.canDrag()) untracked(() => this.letGo());
|
|
1147
|
+
});
|
|
1148
|
+
inject(DestroyRef).onDestroy(() => this.endPointer(false, false));
|
|
1149
|
+
}
|
|
1150
|
+
letGo() {
|
|
1151
|
+
this.endPointer(false, false);
|
|
1152
|
+
if (this.session() !== null) this.session.set(null);
|
|
1153
|
+
}
|
|
1154
|
+
dot(color) {
|
|
1155
|
+
return color && DOT_COLORS[color] || color || "#3b82f6";
|
|
1156
|
+
}
|
|
1157
|
+
percent(p) {
|
|
1158
|
+
return this.labels.formatNumber(p / 100, {
|
|
1159
|
+
style: "percent",
|
|
1160
|
+
maximumFractionDigits: 1
|
|
1161
|
+
});
|
|
1162
|
+
}
|
|
1163
|
+
columnLabel(col, count) {
|
|
1164
|
+
return this.labels.t(count === 1 ? "kanban.columnLabel_one" : "kanban.columnLabel_other", {
|
|
1165
|
+
column: col.label,
|
|
1166
|
+
count
|
|
1167
|
+
});
|
|
1168
|
+
}
|
|
1169
|
+
isTarget(key) {
|
|
1170
|
+
const s = this.session();
|
|
1171
|
+
return !!s && s.col === key && this.targetAllowed(s);
|
|
1172
|
+
}
|
|
1173
|
+
isBlocked(key) {
|
|
1174
|
+
const s = this.session();
|
|
1175
|
+
if (!s || key === s.fromCol) return false;
|
|
1176
|
+
const col = this.columns().find((c) => c.key === key);
|
|
1177
|
+
return !!col && !this.accepts(s.item, s.fromCol, col);
|
|
1178
|
+
}
|
|
1179
|
+
slotBefore(colKey, beforeKey) {
|
|
1180
|
+
const slot = this.slot();
|
|
1181
|
+
return !!slot && slot.col === colKey && slot.beforeKey === beforeKey;
|
|
1182
|
+
}
|
|
1183
|
+
loadMore(col) {
|
|
1184
|
+
if (col.loadingMore) return;
|
|
1185
|
+
this.columnMore.emit(col.key);
|
|
1186
|
+
}
|
|
1187
|
+
showMore(colKey) {
|
|
1188
|
+
const size = Math.floor(this.pageSize());
|
|
1189
|
+
const view = this.views().find((v) => v.col.key === colKey);
|
|
1190
|
+
if (!view || size < 1) return;
|
|
1191
|
+
const limit = Math.min(view.list.length, view.shown.length + size);
|
|
1192
|
+
this.drawn.update((d) => ({
|
|
1193
|
+
...d,
|
|
1194
|
+
[colKey]: limit
|
|
1195
|
+
}));
|
|
1196
|
+
this.announce(this.labels.t("kanban.showingOf", {
|
|
1197
|
+
limit,
|
|
1198
|
+
total: view.list.length,
|
|
1199
|
+
column: view.col.label
|
|
1200
|
+
}));
|
|
1201
|
+
}
|
|
1202
|
+
revert(move) {
|
|
1203
|
+
const rec = this.history.get(move.id);
|
|
1204
|
+
if (!rec) return;
|
|
1205
|
+
for (const [id, other] of this.history) if (other.key === rec.key && id >= move.id) this.history.delete(id);
|
|
1206
|
+
const next = new Map(this.layout());
|
|
1207
|
+
for (const [colKey, list] of next) if (list.some((i) => this.cardId()(i) === rec.key)) next.set(colKey, list.filter((i) => this.cardId()(i) !== rec.key));
|
|
1208
|
+
const target = [...next.get(rec.fromCol) ?? []];
|
|
1209
|
+
const at = clamp(rec.fromIndex, 0, target.length);
|
|
1210
|
+
target.splice(at, 0, move.item);
|
|
1211
|
+
next.set(rec.fromCol, target);
|
|
1212
|
+
this.layout.set(next);
|
|
1213
|
+
this.movedKey.set(rec.key);
|
|
1214
|
+
this.announce(this.labels.t("kanban.reverted", {
|
|
1215
|
+
item: this.cardLabel()(move.item),
|
|
1216
|
+
column: this.colLabelOf(rec.fromCol),
|
|
1217
|
+
position: at + 1,
|
|
1218
|
+
total: target.length
|
|
1219
|
+
}));
|
|
1220
|
+
this.focusCard(rec.key);
|
|
1221
|
+
}
|
|
1222
|
+
group(items, columnKeys, columnOf) {
|
|
1223
|
+
const map = new Map(columnKeys.split("\0").map((k) => [k, []]));
|
|
1224
|
+
for (const item of items) map.get(columnOf(item))?.push(item);
|
|
1225
|
+
return map;
|
|
1226
|
+
}
|
|
1227
|
+
accepts(item, from, to) {
|
|
1228
|
+
if (to.key === from || to.disabled || !this.canDrag()) return false;
|
|
1229
|
+
const rule = this.canDrop();
|
|
1230
|
+
return !rule || rule(item, from, to.key);
|
|
1231
|
+
}
|
|
1232
|
+
targetAllowed(s) {
|
|
1233
|
+
if (s.col === null) return false;
|
|
1234
|
+
if (s.col === s.fromCol) return this.reorderable() || s.index === s.fromIndex;
|
|
1235
|
+
const col = this.columns().find((c) => c.key === s.col);
|
|
1236
|
+
return !!col && this.accepts(s.item, s.fromCol, col);
|
|
1237
|
+
}
|
|
1238
|
+
previewLength(s, colKey) {
|
|
1239
|
+
return (this.layout().get(colKey)?.length ?? 0) - (colKey === s.fromCol ? 1 : 0);
|
|
1240
|
+
}
|
|
1241
|
+
colLabelOf(key) {
|
|
1242
|
+
return this.columns().find((c) => c.key === key)?.label ?? key;
|
|
1243
|
+
}
|
|
1244
|
+
announce(text) {
|
|
1245
|
+
this.announcement.set(text === this.announcement() ? text + "\xA0" : text);
|
|
1246
|
+
}
|
|
1247
|
+
onCardClick(item) {
|
|
1248
|
+
if (this.suppressClick) return;
|
|
1249
|
+
this.cardClick.emit(item);
|
|
1250
|
+
}
|
|
1251
|
+
onCardKey(event, item, col, index) {
|
|
1252
|
+
if (event.target !== event.currentTarget) return;
|
|
1253
|
+
if (event.altKey || event.ctrlKey || event.metaKey) return;
|
|
1254
|
+
const key = this.cardId()(item);
|
|
1255
|
+
const s = this.session();
|
|
1256
|
+
if (s) {
|
|
1257
|
+
if (s.mode === "keyboard" && s.key === key) this.onHeldKey(event, s);
|
|
1258
|
+
return;
|
|
1259
|
+
}
|
|
1260
|
+
switch (event.key) {
|
|
1261
|
+
case "Enter":
|
|
1262
|
+
event.preventDefault();
|
|
1263
|
+
this.cardClick.emit(item);
|
|
1264
|
+
return;
|
|
1265
|
+
case " ":
|
|
1266
|
+
event.preventDefault();
|
|
1267
|
+
if (this.canDrag()) this.pickUp(item, key, col.key, index);
|
|
1268
|
+
else this.cardClick.emit(item);
|
|
1269
|
+
return;
|
|
1270
|
+
case "ArrowDown":
|
|
1271
|
+
case "ArrowUp":
|
|
1272
|
+
case "Home":
|
|
1273
|
+
case "End":
|
|
1274
|
+
case "ArrowLeft":
|
|
1275
|
+
case "ArrowRight":
|
|
1276
|
+
event.preventDefault();
|
|
1277
|
+
this.moveFocus(event.key, key, col.key, index);
|
|
1278
|
+
return;
|
|
1279
|
+
}
|
|
1280
|
+
}
|
|
1281
|
+
onCardFocusOut(event, key) {
|
|
1282
|
+
const s = this.session();
|
|
1283
|
+
if (!s || s.mode !== "keyboard" || s.key !== key) return;
|
|
1284
|
+
const next = event.relatedTarget;
|
|
1285
|
+
if (next && event.currentTarget.contains(next)) return;
|
|
1286
|
+
this.cancelSession();
|
|
1287
|
+
}
|
|
1288
|
+
pickUp(item, key, colKey, index) {
|
|
1289
|
+
this.movedKey.set(null);
|
|
1290
|
+
this.session.set({
|
|
1291
|
+
mode: "keyboard",
|
|
1292
|
+
item,
|
|
1293
|
+
key,
|
|
1294
|
+
fromCol: colKey,
|
|
1295
|
+
fromIndex: index,
|
|
1296
|
+
col: colKey,
|
|
1297
|
+
index
|
|
1298
|
+
});
|
|
1299
|
+
this.announce(this.labels.t("kanban.pickedUp", {
|
|
1300
|
+
item: this.cardLabel()(item),
|
|
1301
|
+
column: this.colLabelOf(colKey),
|
|
1302
|
+
position: index + 1,
|
|
1303
|
+
total: this.layout().get(colKey)?.length ?? 0
|
|
1304
|
+
}));
|
|
1305
|
+
}
|
|
1306
|
+
onHeldKey(event, s) {
|
|
1307
|
+
const cols = this.columns();
|
|
1308
|
+
const at = cols.findIndex((c) => c.key === s.col);
|
|
1309
|
+
switch (event.key) {
|
|
1310
|
+
case "ArrowLeft":
|
|
1311
|
+
case "ArrowRight": {
|
|
1312
|
+
event.preventDefault();
|
|
1313
|
+
const to = cols[clamp(at + (event.key === "ArrowRight" ? 1 : -1), 0, cols.length - 1)];
|
|
1314
|
+
if (to.key === s.col) return;
|
|
1315
|
+
const back = to.key === s.fromCol && !this.reorderable();
|
|
1316
|
+
this.target(s, to.key, back ? s.fromIndex : clamp(s.index, 0, this.previewLength(s, to.key)));
|
|
1317
|
+
return;
|
|
1318
|
+
}
|
|
1319
|
+
case "ArrowUp":
|
|
1320
|
+
case "ArrowDown": {
|
|
1321
|
+
event.preventDefault();
|
|
1322
|
+
const col = s.col ?? s.fromCol;
|
|
1323
|
+
if (!this.reorderable() && col === s.fromCol) return;
|
|
1324
|
+
this.target(s, col, clamp(s.index + (event.key === "ArrowDown" ? 1 : -1), 0, this.previewLength(s, col)));
|
|
1325
|
+
return;
|
|
1326
|
+
}
|
|
1327
|
+
case "Home":
|
|
1328
|
+
case "End": {
|
|
1329
|
+
event.preventDefault();
|
|
1330
|
+
const col = s.col ?? s.fromCol;
|
|
1331
|
+
if (!this.reorderable() && col === s.fromCol) return;
|
|
1332
|
+
this.target(s, col, event.key === "Home" ? 0 : this.previewLength(s, col));
|
|
1333
|
+
return;
|
|
1334
|
+
}
|
|
1335
|
+
case "Enter":
|
|
1336
|
+
case " ":
|
|
1337
|
+
event.preventDefault();
|
|
1338
|
+
this.drop();
|
|
1339
|
+
return;
|
|
1340
|
+
case "Escape":
|
|
1341
|
+
event.preventDefault();
|
|
1342
|
+
this.cancelSession();
|
|
1343
|
+
return;
|
|
1344
|
+
}
|
|
1345
|
+
}
|
|
1346
|
+
target(s, col, index) {
|
|
1347
|
+
const next = {
|
|
1348
|
+
...s,
|
|
1349
|
+
col,
|
|
1350
|
+
index
|
|
1351
|
+
};
|
|
1352
|
+
if (next.col === s.col && next.index === s.index) return;
|
|
1353
|
+
this.session.set(next);
|
|
1354
|
+
const item = this.cardLabel()(s.item);
|
|
1355
|
+
const column = this.colLabelOf(col);
|
|
1356
|
+
this.showTarget();
|
|
1357
|
+
if (this.targetAllowed(next)) this.announce(this.labels.t("kanban.movingOver", {
|
|
1358
|
+
item,
|
|
1359
|
+
column,
|
|
1360
|
+
position: index + 1,
|
|
1361
|
+
total: this.previewLength(next, col) + 1
|
|
1362
|
+
}));
|
|
1363
|
+
else this.announce(this.labels.t("kanban.movingOverBlocked", {
|
|
1364
|
+
item,
|
|
1365
|
+
column
|
|
1366
|
+
}));
|
|
1367
|
+
}
|
|
1368
|
+
showTarget() {
|
|
1369
|
+
afterNextRender(() => {
|
|
1370
|
+
const s = this.session();
|
|
1371
|
+
if (!s || s.col === null) return;
|
|
1372
|
+
const root = this.host.nativeElement;
|
|
1373
|
+
const col = Array.from(root.querySelectorAll(".kb-col")).find((c) => c.dataset["kbCol"] === s.col);
|
|
1374
|
+
(col?.querySelector(".kb-slot") ?? col)?.scrollIntoView({
|
|
1375
|
+
block: "nearest",
|
|
1376
|
+
inline: "nearest"
|
|
1377
|
+
});
|
|
1378
|
+
}, { injector: this.injector });
|
|
1379
|
+
}
|
|
1380
|
+
moveFocus(key, cardKey, colKey, index) {
|
|
1381
|
+
const views = this.views();
|
|
1382
|
+
const at = views.findIndex((v) => v.col.key === colKey);
|
|
1383
|
+
const here = views[at];
|
|
1384
|
+
let target = null;
|
|
1385
|
+
if (key === "ArrowDown") target = this.keyAt(here.shown, index + 1);
|
|
1386
|
+
else if (key === "ArrowUp") target = this.keyAt(here.shown, index - 1);
|
|
1387
|
+
else if (key === "Home") target = this.keyAt(here.shown, 0);
|
|
1388
|
+
else if (key === "End") target = this.keyAt(here.shown, here.shown.length - 1);
|
|
1389
|
+
else {
|
|
1390
|
+
const step = key === "ArrowRight" ? 1 : -1;
|
|
1391
|
+
for (let i = at + step; i >= 0 && i < views.length; i += step) if (views[i].shown.length) {
|
|
1392
|
+
target = this.keyAt(views[i].shown, Math.min(index, views[i].shown.length - 1));
|
|
1393
|
+
break;
|
|
1394
|
+
}
|
|
1395
|
+
}
|
|
1396
|
+
if (target && target !== cardKey) this.focusNow(target);
|
|
1397
|
+
}
|
|
1398
|
+
keyAt(list, i) {
|
|
1399
|
+
const item = list[i];
|
|
1400
|
+
return item === void 0 ? null : this.cardId()(item);
|
|
1401
|
+
}
|
|
1402
|
+
onPointerDown(event, item, colKey, index) {
|
|
1403
|
+
if (!this.canDrag() || this.session() || this.pointer || event.isPrimary === false) return;
|
|
1404
|
+
if (event.pointerType === "mouse" && event.button !== 0) return;
|
|
1405
|
+
const target = event.target;
|
|
1406
|
+
if (!target || target.closest("button, a, input, select, textarea, [contenteditable], [data-kanban-nodrag], .kb-card__menu")) return;
|
|
1407
|
+
if (event.pointerType !== "mouse" && !target.closest(".kb-handle")) return;
|
|
1408
|
+
const el = event.currentTarget;
|
|
1409
|
+
const rect = el.getBoundingClientRect();
|
|
1410
|
+
this.pointer = {
|
|
1411
|
+
id: event.pointerId,
|
|
1412
|
+
startX: event.clientX,
|
|
1413
|
+
startY: event.clientY,
|
|
1414
|
+
x: event.clientX,
|
|
1415
|
+
y: event.clientY,
|
|
1416
|
+
item,
|
|
1417
|
+
key: this.cardId()(item),
|
|
1418
|
+
col: colKey,
|
|
1419
|
+
index,
|
|
1420
|
+
el,
|
|
1421
|
+
ghost: null,
|
|
1422
|
+
offX: event.clientX - rect.left,
|
|
1423
|
+
offY: event.clientY - rect.top,
|
|
1424
|
+
started: false,
|
|
1425
|
+
raf: 0
|
|
1426
|
+
};
|
|
1427
|
+
this.doc.addEventListener("pointermove", this.onDocMove);
|
|
1428
|
+
this.doc.addEventListener("pointerup", this.onDocUp);
|
|
1429
|
+
this.doc.addEventListener("pointercancel", this.onDocCancel);
|
|
1430
|
+
this.doc.addEventListener("keydown", this.onDocKey);
|
|
1431
|
+
this.doc.addEventListener("selectstart", this.onSelectStart);
|
|
1432
|
+
}
|
|
1433
|
+
startDrag(p) {
|
|
1434
|
+
p.started = true;
|
|
1435
|
+
this.movedKey.set(null);
|
|
1436
|
+
this.session.set({
|
|
1437
|
+
mode: "pointer",
|
|
1438
|
+
item: p.item,
|
|
1439
|
+
key: p.key,
|
|
1440
|
+
fromCol: p.col,
|
|
1441
|
+
fromIndex: p.index,
|
|
1442
|
+
col: p.col,
|
|
1443
|
+
index: p.index
|
|
1444
|
+
});
|
|
1445
|
+
const rect = p.el.getBoundingClientRect();
|
|
1446
|
+
const ghost = p.el.cloneNode(true);
|
|
1447
|
+
ghost.classList.add("kb-ghost");
|
|
1448
|
+
ghost.removeAttribute("tabindex");
|
|
1449
|
+
ghost.removeAttribute("data-kb-key");
|
|
1450
|
+
ghost.setAttribute("aria-hidden", "true");
|
|
1451
|
+
ghost.setAttribute("inert", "");
|
|
1452
|
+
ghost.querySelectorAll(".kb-card__menu").forEach((n) => n.remove());
|
|
1453
|
+
ghost.querySelectorAll("[id]").forEach((n) => n.removeAttribute("id"));
|
|
1454
|
+
ghost.querySelectorAll("a, button, input, select, textarea, iframe, [tabindex], [contenteditable]").forEach((n) => n.setAttribute("tabindex", "-1"));
|
|
1455
|
+
ghost.style.boxSizing = "border-box";
|
|
1456
|
+
ghost.style.width = `${rect.width}px`;
|
|
1457
|
+
ghost.style.height = `${rect.height}px`;
|
|
1458
|
+
const look = this.doc.defaultView?.getComputedStyle(p.el);
|
|
1459
|
+
if (look) {
|
|
1460
|
+
ghost.style.font = look.font;
|
|
1461
|
+
ghost.style.color = look.color;
|
|
1462
|
+
}
|
|
1463
|
+
this.doc.body.appendChild(ghost);
|
|
1464
|
+
p.ghost = ghost;
|
|
1465
|
+
this.scheduleScroll(p);
|
|
1466
|
+
}
|
|
1467
|
+
placeGhost(p) {
|
|
1468
|
+
if (p.ghost) p.ghost.style.transform = `translate3d(${p.x - p.offX}px, ${p.y - p.offY}px, 0)`;
|
|
1469
|
+
}
|
|
1470
|
+
retarget(p) {
|
|
1471
|
+
const s = this.session();
|
|
1472
|
+
if (!s || s.mode !== "pointer") return;
|
|
1473
|
+
const cols = Array.from(this.host.nativeElement.querySelectorAll(".kb-col"));
|
|
1474
|
+
const rects = cols.map((c) => {
|
|
1475
|
+
const r = c.getBoundingClientRect();
|
|
1476
|
+
return {
|
|
1477
|
+
key: c.dataset["kbCol"] ?? "",
|
|
1478
|
+
left: r.left,
|
|
1479
|
+
right: r.right,
|
|
1480
|
+
top: r.top,
|
|
1481
|
+
bottom: r.bottom
|
|
1482
|
+
};
|
|
1483
|
+
});
|
|
1484
|
+
const key = columnAtPoint(rects, p.x, p.y);
|
|
1485
|
+
if (key === null) {
|
|
1486
|
+
if (s.col !== null) this.session.set({
|
|
1487
|
+
...s,
|
|
1488
|
+
col: null
|
|
1489
|
+
});
|
|
1490
|
+
return;
|
|
1491
|
+
}
|
|
1492
|
+
const colEl = cols[rects.findIndex((r) => r.key === key)];
|
|
1493
|
+
const slotEl = colEl.querySelector(".kb-slot");
|
|
1494
|
+
const list = colEl.querySelector(".kb-col__cards");
|
|
1495
|
+
const push = slotEl ? slotEl.getBoundingClientRect().height + (parseFloat(this.doc.defaultView?.getComputedStyle(list ?? colEl).rowGap ?? "") || 0) : 0;
|
|
1496
|
+
const index = dropIndexAt(Array.from(colEl.querySelectorAll(".kb-card:not(.kb-ghost)")).filter((c) => c.dataset["kbKey"] !== p.key).map((c) => {
|
|
1497
|
+
const r = c.getBoundingClientRect();
|
|
1498
|
+
const after = slotEl && (slotEl.compareDocumentPosition(c) & Node.DOCUMENT_POSITION_FOLLOWING) !== 0;
|
|
1499
|
+
return r.top + r.height / 2 - (after ? push : 0);
|
|
1500
|
+
}), p.y);
|
|
1501
|
+
if (s.col !== key || s.index !== index) this.session.set({
|
|
1502
|
+
...s,
|
|
1503
|
+
col: key,
|
|
1504
|
+
index
|
|
1505
|
+
});
|
|
1506
|
+
}
|
|
1507
|
+
scheduleScroll(p) {
|
|
1508
|
+
const win = this.doc.defaultView;
|
|
1509
|
+
if (!win) return;
|
|
1510
|
+
const step = () => {
|
|
1511
|
+
if (this.pointer !== p) return;
|
|
1512
|
+
const board = this.host.nativeElement.querySelector(".kb-board");
|
|
1513
|
+
if (board) {
|
|
1514
|
+
const r = board.getBoundingClientRect();
|
|
1515
|
+
const dx = autoScrollDelta(p.x, r.left, r.right);
|
|
1516
|
+
if (dx) board.scrollLeft += dx;
|
|
1517
|
+
const s = this.session();
|
|
1518
|
+
const list = s?.col ? this.host.nativeElement.querySelector(`.kb-col[data-kb-col="${s.col.replace(/["\\]/g, "\\$&")}"] .kb-col__cards`) : null;
|
|
1519
|
+
let dy = 0;
|
|
1520
|
+
if (list) {
|
|
1521
|
+
const lr = list.getBoundingClientRect();
|
|
1522
|
+
dy = autoScrollDelta(p.y, lr.top, lr.bottom);
|
|
1523
|
+
if (dy) list.scrollTop += dy;
|
|
1524
|
+
}
|
|
1525
|
+
if (dx || dy) this.retarget(p);
|
|
1526
|
+
}
|
|
1527
|
+
p.raf = win.requestAnimationFrame(step);
|
|
1528
|
+
};
|
|
1529
|
+
this.zone.runOutsideAngular(() => {
|
|
1530
|
+
p.raf = win.requestAnimationFrame(step);
|
|
1531
|
+
});
|
|
1532
|
+
}
|
|
1533
|
+
endPointer(commit, say) {
|
|
1534
|
+
const p = this.pointer;
|
|
1535
|
+
if (!p) return;
|
|
1536
|
+
this.pointer = null;
|
|
1537
|
+
this.doc.removeEventListener("pointermove", this.onDocMove);
|
|
1538
|
+
this.doc.removeEventListener("pointerup", this.onDocUp);
|
|
1539
|
+
this.doc.removeEventListener("pointercancel", this.onDocCancel);
|
|
1540
|
+
this.doc.removeEventListener("keydown", this.onDocKey);
|
|
1541
|
+
this.doc.removeEventListener("selectstart", this.onSelectStart);
|
|
1542
|
+
this.doc.defaultView?.cancelAnimationFrame(p.raf);
|
|
1543
|
+
p.ghost?.remove();
|
|
1544
|
+
if (!p.started) return;
|
|
1545
|
+
this.suppressClick = true;
|
|
1546
|
+
setTimeout(() => {
|
|
1547
|
+
this.suppressClick = false;
|
|
1548
|
+
});
|
|
1549
|
+
if (commit) this.drop();
|
|
1550
|
+
else if (say) this.cancelSession();
|
|
1551
|
+
else this.session.set(null);
|
|
1552
|
+
}
|
|
1553
|
+
drop() {
|
|
1554
|
+
const s = this.session();
|
|
1555
|
+
if (!s) return;
|
|
1556
|
+
if (s.col === null) {
|
|
1557
|
+
this.cancelSession();
|
|
1558
|
+
return;
|
|
1559
|
+
}
|
|
1560
|
+
if (!this.targetAllowed(s)) {
|
|
1561
|
+
this.announce(this.labels.t("kanban.dropBlocked", {
|
|
1562
|
+
item: this.cardLabel()(s.item),
|
|
1563
|
+
column: this.colLabelOf(s.col)
|
|
1564
|
+
}));
|
|
1565
|
+
if (s.mode === "pointer") this.session.set(null);
|
|
1566
|
+
return;
|
|
1567
|
+
}
|
|
1568
|
+
this.session.set(null);
|
|
1569
|
+
if (s.col === s.fromCol && s.index === s.fromIndex) {
|
|
1570
|
+
this.announce(this.labels.t("kanban.unchanged", {
|
|
1571
|
+
item: this.cardLabel()(s.item),
|
|
1572
|
+
column: this.colLabelOf(s.col),
|
|
1573
|
+
position: s.index + 1,
|
|
1574
|
+
total: this.layout().get(s.col)?.length ?? 0
|
|
1575
|
+
}));
|
|
1576
|
+
this.focusCard(s.key);
|
|
1577
|
+
return;
|
|
1578
|
+
}
|
|
1579
|
+
this.applyMove(s.item, s.key, s.fromCol, s.fromIndex, s.col, s.index);
|
|
1580
|
+
}
|
|
1581
|
+
cancelSession() {
|
|
1582
|
+
const s = this.session();
|
|
1583
|
+
if (!s) return;
|
|
1584
|
+
this.session.set(null);
|
|
1585
|
+
this.announce(this.labels.t("kanban.cancelled", {
|
|
1586
|
+
item: this.cardLabel()(s.item),
|
|
1587
|
+
column: this.colLabelOf(s.fromCol),
|
|
1588
|
+
position: s.fromIndex + 1,
|
|
1589
|
+
total: this.layout().get(s.fromCol)?.length ?? 0
|
|
1590
|
+
}));
|
|
1591
|
+
this.focusCard(s.key);
|
|
1592
|
+
}
|
|
1593
|
+
moveActions(item, fromCol) {
|
|
1594
|
+
if (!this.canDrag()) return [];
|
|
1595
|
+
const memo = this.menuMemo();
|
|
1596
|
+
const memoKey = this.canDrop() ? `${fromCol}|${this.cardId()(item)}` : fromCol;
|
|
1597
|
+
let actions = memo.get(memoKey);
|
|
1598
|
+
if (!actions) {
|
|
1599
|
+
actions = this.columns().filter((to) => this.accepts(item, fromCol, to)).map((to) => ({
|
|
1600
|
+
type: MOVE_PREFIX + to.key,
|
|
1601
|
+
label: this.labels.t("kanban.moveTo", { column: to.label }),
|
|
1602
|
+
icon: MOVE_ICON
|
|
1603
|
+
}));
|
|
1604
|
+
memo.set(memoKey, actions);
|
|
1605
|
+
}
|
|
1606
|
+
return actions;
|
|
1607
|
+
}
|
|
1608
|
+
onMenuAction(type, item, fromCol) {
|
|
1609
|
+
if (!type.startsWith(MOVE_PREFIX) || !this.canDrag()) return;
|
|
1610
|
+
const to = this.columns().find((c) => c.key === type.slice(8));
|
|
1611
|
+
if (!to || !this.accepts(item, fromCol, to)) return;
|
|
1612
|
+
const key = this.cardId()(item);
|
|
1613
|
+
const fromIndex = (this.layout().get(fromCol) ?? []).findIndex((i) => this.cardId()(i) === key);
|
|
1614
|
+
if (fromIndex < 0) return;
|
|
1615
|
+
this.applyMove(item, key, fromCol, fromIndex, to.key, 0);
|
|
1616
|
+
}
|
|
1617
|
+
applyMove(item, key, fromCol, fromIndex, toCol, toIndex) {
|
|
1618
|
+
const before = this.layout();
|
|
1619
|
+
const next = new Map(before);
|
|
1620
|
+
const source = (before.get(fromCol) ?? []).filter((i) => this.cardId()(i) !== key);
|
|
1621
|
+
const dest = fromCol === toCol ? source : [...before.get(toCol) ?? []];
|
|
1622
|
+
const at = clamp(toIndex, 0, dest.length);
|
|
1623
|
+
const placed = [...dest];
|
|
1624
|
+
placed.splice(at, 0, item);
|
|
1625
|
+
if (fromCol !== toCol) next.set(fromCol, source);
|
|
1626
|
+
next.set(toCol, placed);
|
|
1627
|
+
this.layout.set(next);
|
|
1628
|
+
this.movedKey.set(key);
|
|
1629
|
+
const id = ++this.moveSeq;
|
|
1630
|
+
this.history.set(id, {
|
|
1631
|
+
key,
|
|
1632
|
+
fromCol,
|
|
1633
|
+
fromIndex
|
|
1634
|
+
});
|
|
1635
|
+
this.announce(this.labels.t("kanban.moved", {
|
|
1636
|
+
item: this.cardLabel()(item),
|
|
1637
|
+
column: this.colLabelOf(toCol),
|
|
1638
|
+
position: at + 1,
|
|
1639
|
+
total: placed.length
|
|
1640
|
+
}));
|
|
1641
|
+
this.focusCard(key);
|
|
1642
|
+
const move = {
|
|
1643
|
+
id,
|
|
1644
|
+
item,
|
|
1645
|
+
fromColumn: fromCol,
|
|
1646
|
+
toColumn: toCol,
|
|
1647
|
+
fromIndex,
|
|
1648
|
+
toIndex: at,
|
|
1649
|
+
revert: () => this.revert(move)
|
|
1650
|
+
};
|
|
1651
|
+
this.cardMove.emit(move);
|
|
1652
|
+
}
|
|
1653
|
+
findCard(key) {
|
|
1654
|
+
return Array.from(this.host.nativeElement.querySelectorAll(".kb-card:not(.kb-ghost)")).find((c) => c.dataset["kbKey"] === key);
|
|
1655
|
+
}
|
|
1656
|
+
focusNow(key) {
|
|
1657
|
+
this.findCard(key)?.focus();
|
|
1658
|
+
}
|
|
1659
|
+
focusCard(key) {
|
|
1660
|
+
this.tabKey.set(key);
|
|
1661
|
+
afterNextRender(() => this.findCard(key)?.focus(), { injector: this.injector });
|
|
1662
|
+
}
|
|
1663
|
+
static {
|
|
1664
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
1665
|
+
minVersion: "12.0.0",
|
|
1666
|
+
version: "22.2.2",
|
|
1667
|
+
ngImport: i0,
|
|
1668
|
+
type: KanbanBoardComponent,
|
|
1669
|
+
deps: [],
|
|
1670
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
1671
|
+
});
|
|
1672
|
+
}
|
|
1673
|
+
static {
|
|
1674
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1675
|
+
minVersion: "17.0.0",
|
|
1676
|
+
version: "22.2.2",
|
|
1677
|
+
type: KanbanBoardComponent,
|
|
1678
|
+
isStandalone: true,
|
|
1679
|
+
selector: "ui-kanban-board",
|
|
1680
|
+
inputs: {
|
|
1681
|
+
columns: {
|
|
1682
|
+
classPropertyName: "columns",
|
|
1683
|
+
publicName: "columns",
|
|
1684
|
+
isSignal: true,
|
|
1685
|
+
isRequired: true,
|
|
1686
|
+
transformFunction: null
|
|
1687
|
+
},
|
|
1688
|
+
items: {
|
|
1689
|
+
classPropertyName: "items",
|
|
1690
|
+
publicName: "items",
|
|
1691
|
+
isSignal: true,
|
|
1692
|
+
isRequired: true,
|
|
1693
|
+
transformFunction: null
|
|
1694
|
+
},
|
|
1695
|
+
columnFn: {
|
|
1696
|
+
classPropertyName: "columnFn",
|
|
1697
|
+
publicName: "columnFn",
|
|
1698
|
+
isSignal: true,
|
|
1699
|
+
isRequired: true,
|
|
1700
|
+
transformFunction: null
|
|
1701
|
+
},
|
|
1702
|
+
cardId: {
|
|
1703
|
+
classPropertyName: "cardId",
|
|
1704
|
+
publicName: "cardId",
|
|
1705
|
+
isSignal: true,
|
|
1706
|
+
isRequired: true,
|
|
1707
|
+
transformFunction: null
|
|
1708
|
+
},
|
|
1709
|
+
cardLabel: {
|
|
1710
|
+
classPropertyName: "cardLabel",
|
|
1711
|
+
publicName: "cardLabel",
|
|
1712
|
+
isSignal: true,
|
|
1713
|
+
isRequired: true,
|
|
1714
|
+
transformFunction: null
|
|
1715
|
+
},
|
|
1716
|
+
canDrop: {
|
|
1717
|
+
classPropertyName: "canDrop",
|
|
1718
|
+
publicName: "canDrop",
|
|
1719
|
+
isSignal: true,
|
|
1720
|
+
isRequired: false,
|
|
1721
|
+
transformFunction: null
|
|
1722
|
+
},
|
|
1723
|
+
reorderable: {
|
|
1724
|
+
classPropertyName: "reorderable",
|
|
1725
|
+
publicName: "reorderable",
|
|
1726
|
+
isSignal: true,
|
|
1727
|
+
isRequired: false,
|
|
1728
|
+
transformFunction: null
|
|
1729
|
+
},
|
|
1730
|
+
moveMenu: {
|
|
1731
|
+
classPropertyName: "moveMenu",
|
|
1732
|
+
publicName: "moveMenu",
|
|
1733
|
+
isSignal: true,
|
|
1734
|
+
isRequired: false,
|
|
1735
|
+
transformFunction: null
|
|
1736
|
+
},
|
|
1737
|
+
loading: {
|
|
1738
|
+
classPropertyName: "loading",
|
|
1739
|
+
publicName: "loading",
|
|
1740
|
+
isSignal: true,
|
|
1741
|
+
isRequired: false,
|
|
1742
|
+
transformFunction: null
|
|
1743
|
+
},
|
|
1744
|
+
readOnly: {
|
|
1745
|
+
classPropertyName: "readOnly",
|
|
1746
|
+
publicName: "readOnly",
|
|
1747
|
+
isSignal: true,
|
|
1748
|
+
isRequired: false,
|
|
1749
|
+
transformFunction: null
|
|
1750
|
+
},
|
|
1751
|
+
disabled: {
|
|
1752
|
+
classPropertyName: "disabled",
|
|
1753
|
+
publicName: "disabled",
|
|
1754
|
+
isSignal: true,
|
|
1755
|
+
isRequired: false,
|
|
1756
|
+
transformFunction: null
|
|
1757
|
+
},
|
|
1758
|
+
pageSize: {
|
|
1759
|
+
classPropertyName: "pageSize",
|
|
1760
|
+
publicName: "pageSize",
|
|
1761
|
+
isSignal: true,
|
|
1762
|
+
isRequired: false,
|
|
1763
|
+
transformFunction: null
|
|
1764
|
+
},
|
|
1765
|
+
ariaLabelInput: {
|
|
1766
|
+
classPropertyName: "ariaLabelInput",
|
|
1767
|
+
publicName: "ariaLabel",
|
|
1768
|
+
isSignal: true,
|
|
1769
|
+
isRequired: false,
|
|
1770
|
+
transformFunction: null
|
|
1771
|
+
},
|
|
1772
|
+
emptyTextInput: {
|
|
1773
|
+
classPropertyName: "emptyTextInput",
|
|
1774
|
+
publicName: "emptyText",
|
|
1775
|
+
isSignal: true,
|
|
1776
|
+
isRequired: false,
|
|
1777
|
+
transformFunction: null
|
|
1778
|
+
}
|
|
1779
|
+
},
|
|
1780
|
+
outputs: {
|
|
1781
|
+
cardMove: "cardMove",
|
|
1782
|
+
cardClick: "cardClick",
|
|
1783
|
+
columnMore: "columnMore"
|
|
1784
|
+
},
|
|
1785
|
+
queries: [{
|
|
1786
|
+
propertyName: "card",
|
|
1787
|
+
first: true,
|
|
1788
|
+
predicate: KanbanCardDirective,
|
|
1789
|
+
descendants: true,
|
|
1790
|
+
isSignal: true
|
|
1791
|
+
}],
|
|
1792
|
+
ngImport: i0,
|
|
1793
|
+
template: `
|
|
1794
|
+
<div class="kb-wrap">
|
|
1795
|
+
@if (loading()) {
|
|
1796
|
+
<div class="kb-skeleton" role="status" [attr.aria-label]="labels.t('kanban.loading', { name: ariaLabel() })">
|
|
1797
|
+
@for (n of skeletonColumns(); track n) {
|
|
1798
|
+
<div class="kb-col-skeleton" aria-hidden="true">
|
|
1799
|
+
<div class="kb-col-skeleton__header"></div>
|
|
1800
|
+
@for (c of [1, 2, 3]; track c) { <div class="kb-col-skeleton__card"></div> }
|
|
1801
|
+
</div>
|
|
1802
|
+
}
|
|
1803
|
+
</div>
|
|
1804
|
+
} @else {
|
|
1805
|
+
<div class="kb-board" role="region" [attr.aria-label]="ariaLabel()" [attr.aria-describedby]="canDrag() ? hintId : null"
|
|
1806
|
+
[attr.aria-busy]="disabled() ? 'true' : null" [class.kb-board--dragging]="pointerDragging()">
|
|
1807
|
+
@for (view of views(); track view.col.key) {
|
|
1808
|
+
@let col = view.col;
|
|
1809
|
+
<div class="kb-col"
|
|
1810
|
+
role="group"
|
|
1811
|
+
[class.kb-col--target]="isTarget(col.key)"
|
|
1812
|
+
[class.kb-col--blocked]="isBlocked(col.key)"
|
|
1813
|
+
[attr.data-kb-col]="col.key"
|
|
1814
|
+
[attr.aria-disabled]="isBlocked(col.key) ? 'true' : null"
|
|
1815
|
+
[attr.aria-label]="columnLabel(col, view.count)">
|
|
1816
|
+
<div class="kb-col__header">
|
|
1817
|
+
<span class="kb-col__dot" [style.background]="dot(col.color)" aria-hidden="true"></span>
|
|
1818
|
+
<span class="kb-col__title">{{ col.label }}</span>
|
|
1819
|
+
@if (col.probability !== undefined && col.probability !== null) {
|
|
1820
|
+
<span class="kb-col__prob" aria-hidden="true">{{ percent(col.probability) }}</span>
|
|
1821
|
+
<span class="kb-sr">{{ labels.t('kanban.probability', { percent: percent(col.probability) }) }}</span>
|
|
1822
|
+
}
|
|
1823
|
+
<span class="kb-col__count" aria-hidden="true">{{ view.count }}</span>
|
|
1824
|
+
@if (isBlocked(col.key)) { <span class="kb-col__blocked">{{ labels.t('kanban.blocked') }}</span> }
|
|
1825
|
+
</div>
|
|
1826
|
+
<div class="kb-col__cards" [attr.role]="view.list.length || view.remaining > 0 ? 'list' : null">
|
|
1827
|
+
@for (item of view.shown; track cardId()(item); let i = $index) {
|
|
1828
|
+
@let key = cardId()(item);
|
|
1829
|
+
@if (slotBefore(col.key, key)) { <div class="kb-slot" aria-hidden="true"></div> }
|
|
1830
|
+
<div class="kb-card"
|
|
1831
|
+
role="listitem"
|
|
1832
|
+
[class.kb-card--lifted]="liftedKey() === key"
|
|
1833
|
+
[class.kb-card--movable]="canDrag()"
|
|
1834
|
+
[attr.data-kb-key]="key"
|
|
1835
|
+
[attr.tabindex]="key === tabbableKey() ? 0 : -1"
|
|
1836
|
+
[attr.aria-label]="cardLabel()(item)"
|
|
1837
|
+
[attr.aria-keyshortcuts]="canDrag() ? pickUpKeys : null"
|
|
1838
|
+
(focus)="tabKey.set(key)"
|
|
1839
|
+
(focusout)="onCardFocusOut($event, key)"
|
|
1840
|
+
(keydown)="onCardKey($event, item, col, i)"
|
|
1841
|
+
(click)="onCardClick(item)"
|
|
1842
|
+
(dragstart)="$event.preventDefault()"
|
|
1843
|
+
(pointerdown)="onPointerDown($event, item, col.key, i)">
|
|
1844
|
+
@if (canDrag()) {
|
|
1845
|
+
<span class="kb-handle" aria-hidden="true">
|
|
1846
|
+
<svg width="12" height="16" viewBox="0 0 12 16" fill="currentColor" focusable="false"><circle cx="3" cy="3" r="1.4"/><circle cx="9" cy="3" r="1.4"/><circle cx="3" cy="8" r="1.4"/><circle cx="9" cy="8" r="1.4"/><circle cx="3" cy="13" r="1.4"/><circle cx="9" cy="13" r="1.4"/></svg>
|
|
1847
|
+
</span>
|
|
1848
|
+
}
|
|
1849
|
+
<div class="kb-card__body">
|
|
1850
|
+
@if (card(); as tpl) {
|
|
1851
|
+
<ng-container [ngTemplateOutlet]="tpl.template" [ngTemplateOutletContext]="{ $implicit: item, column: col, index: i }" />
|
|
1852
|
+
}
|
|
1853
|
+
</div>
|
|
1854
|
+
@if (canDrag() && moveMenu()) {
|
|
1855
|
+
@let actions = moveActions(item, col.key);
|
|
1856
|
+
@if (actions.length) {
|
|
1857
|
+
<div class="kb-card__menu" (click)="$event.stopPropagation()" (keydown)="$event.stopPropagation()" (pointerdown)="$event.stopPropagation()">
|
|
1858
|
+
<ui-more-menu [actions]="actions" [ariaLabel]="labels.t('kanban.moveMenu', { name: cardLabel()(item) })"
|
|
1859
|
+
(actionClick)="onMenuAction($event, item, col.key)" />
|
|
1860
|
+
</div>
|
|
1861
|
+
}
|
|
1862
|
+
}
|
|
1863
|
+
</div>
|
|
1864
|
+
}
|
|
1865
|
+
@if (slotBefore(col.key, null)) { <div class="kb-slot" aria-hidden="true"></div> }
|
|
1866
|
+
@if (view.hidden > 0) {
|
|
1867
|
+
<div class="kb-more" role="listitem">
|
|
1868
|
+
<ui-button variant="secondary" size="sm" [fullWidth]="true" (click)="showMore(col.key)"
|
|
1869
|
+
[ariaLabel]="labels.t('kanban.showMore', { next: view.next, hidden: view.hidden }) + ', ' + col.label">{{ labels.t('kanban.showMore', { next: view.next, hidden: view.hidden }) }}</ui-button>
|
|
1870
|
+
</div>
|
|
1871
|
+
}
|
|
1872
|
+
@if (view.hidden === 0 && view.remaining > 0) {
|
|
1873
|
+
<div class="kb-more kb-more--server" role="listitem">
|
|
1874
|
+
<ui-button variant="secondary" size="sm" [fullWidth]="true" [loading]="!!col.loadingMore" (click)="loadMore(col)"
|
|
1875
|
+
[ariaLabel]="labels.t('kanban.showMore', { next: view.nextRemote, hidden: view.remaining }) + ', ' + col.label">{{ labels.t('kanban.showMore', { next: view.nextRemote, hidden: view.remaining }) }}</ui-button>
|
|
1876
|
+
</div>
|
|
1877
|
+
}
|
|
1878
|
+
@if (view.list.length === 0 && view.remaining === 0 && !slotBefore(col.key, null)) {
|
|
1879
|
+
<div class="kb-col__empty" role="status">{{ col.emptyText || emptyText() }}</div>
|
|
1880
|
+
}
|
|
1881
|
+
</div>
|
|
1882
|
+
@if (col.footer) {
|
|
1883
|
+
<div class="kb-col__footer"><span aria-hidden="true">{{ col.footer }}</span><span class="kb-sr">{{ col.footerLabel || col.footer }}</span></div>
|
|
1884
|
+
}
|
|
1885
|
+
</div>
|
|
1886
|
+
}
|
|
1887
|
+
</div>
|
|
1888
|
+
@if (canDrag()) { <p class="kb-sr" [id]="hintId">{{ labels.t('kanban.hint') }}</p> }
|
|
1889
|
+
<div class="kb-sr" role="status" aria-live="polite" aria-atomic="true">{{ announcement() }}</div>
|
|
1890
|
+
}
|
|
1891
|
+
</div>
|
|
1892
|
+
`,
|
|
1893
|
+
isInline: true,
|
|
1894
|
+
styles: [":host{display:flex;flex-direction:column;flex:1;min-height:0;min-width:0;max-width:100%}.kb-wrap{flex:1;min-height:0;min-width:0;display:flex;flex-direction:column;position:relative}.kb-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}.kb-board{display:flex;align-items:stretch;gap:12px;flex:1;min-height:0;padding:0 0 16px;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;scroll-snap-type:x proximity}.kb-board.kb-board--dragging{scroll-snap-type:none}.kb-col{flex:0 0 280px;width:280px;display:flex;flex-direction:column;min-height:0;background:#f8fafc;border:1.5px solid #e2e8f0;border-radius:10px;scroll-snap-align:start;transition:border-color .15s,background-color .15s}.kb-col--target{border-color:#2563eb;background:#eff6ff}.kb-col--blocked{border-style:dashed;border-color:#b91c1c;background:#fef2f2}.kb-col__header{display:flex;align-items:center;gap:7px;padding:12px 14px 10px;border-bottom:1px solid #e2e8f0;flex-shrink:0;min-width:0}.kb-col__dot{width:9px;height:9px;border-radius:50%;flex-shrink:0}.kb-col__title{flex:1;min-width:0;font-size:12px;font-weight:700;color:#374151;text-transform:uppercase;letter-spacing:.04em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kb-col__prob{font-size:11px;font-weight:600;color:#1e293b;background:#e2e8f0;border-radius:10px;padding:1px 7px;flex-shrink:0}.kb-col__count{font-size:11px;font-weight:600;color:#fff;background:#475569;border-radius:10px;padding:1px 7px;flex-shrink:0}.kb-col__blocked{font-size:11px;font-weight:700;color:#991b1b;flex-shrink:0}.kb-col__footer{padding:8px 14px;border-top:1px solid #e2e8f0;font-size:12px;font-weight:600;color:#334155;flex-shrink:0}.kb-col__cards{flex:1;min-height:60px;overflow-y:auto;padding:10px;display:flex;flex-direction:column;gap:8px}.kb-col__empty{text-align:center;padding:24px 12px;color:#475569;font-size:12px;border:1.5px dashed #cbd5e1;border-radius:8px}.kb-more{flex-shrink:0}.kb-slot{flex-shrink:0;height:56px;border:2px dashed #2563eb;border-radius:8px;background:#dbeafe}.kb-card{position:relative;background:#fff;border:1.5px solid #e2e8f0;border-radius:8px;padding:10px 36px 10px 12px;cursor:pointer;-webkit-user-select:none;user-select:none;transition:box-shadow .12s,border-color .12s,opacity .12s}.kb-card--movable{padding-left:26px;cursor:grab}.kb-card:hover{border-color:#94a3b8;box-shadow:0 2px 8px #00000012}.kb-card:focus-visible{outline:2px solid var(--ui-focus, #3b82f6);outline-offset:2px}.kb-card--lifted{opacity:.45;border-style:dashed}.kb-card__body{min-width:0}.kb-card__menu{position:absolute;top:4px;right:4px}.kb-handle{position:absolute;left:4px;top:50%;transform:translateY(-50%);width:18px;height:28px;display:flex;align-items:center;justify-content:center;color:#64748b;touch-action:none;cursor:grab}.kb-handle:after{content:\"\";position:absolute;inset:-8px -6px}.kb-ghost{position:fixed;left:0;top:0;margin:0;z-index:1000;pointer-events:none;opacity:.95;box-shadow:0 10px 24px #0f172a47;transition:none;cursor:grabbing}.kb-skeleton{display:flex;gap:12px;padding-bottom:16px}.kb-col-skeleton{flex:0 0 280px;background:#f8fafc;border:1.5px solid #e2e8f0;border-radius:10px;padding:12px;display:flex;flex-direction:column;gap:10px}.kb-col-skeleton__header,.kb-col-skeleton__card{background:linear-gradient(90deg,#e2e8f0 25%,#f1f5f9,#e2e8f0 75%);background-size:200% 100%;animation:kb-shimmer 1.4s infinite}.kb-col-skeleton__header{height:32px;border-radius:6px}.kb-col-skeleton__card{height:90px;border-radius:8px}@keyframes kb-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}@media(prefers-reduced-motion:reduce){.kb-col-skeleton__header,.kb-col-skeleton__card{animation:none}.kb-card,.kb-col{transition:none}.kb-board{scroll-behavior:auto}}@media(forced-colors:active){.kb-card,.kb-col{border:1px solid CanvasText}.kb-col--target{outline:3px solid Highlight;outline-offset:-3px}.kb-col--blocked{border-style:dashed;outline:3px dashed CanvasText;outline-offset:-3px}.kb-card:focus-visible{outline:3px solid Highlight}.kb-slot{border:2px dashed Highlight;background:Canvas}.kb-card--lifted{border-style:dashed;opacity:1}.kb-col__count,.kb-col__prob{border:1px solid CanvasText;background:Canvas;color:CanvasText}}@media(pointer:coarse){.kb-handle{width:32px;height:44px;left:0}.kb-card--movable{padding-left:36px}.kb-card__menu{top:0;right:0}}@media(max-width:640px){.kb-board{scroll-snap-type:x mandatory;scroll-padding:0 12px;padding-left:12px;padding-right:12px}.kb-board.kb-board--dragging{scroll-snap-type:none}.kb-col{flex:0 0 85%;width:85%}.kb-col-skeleton{flex:0 0 85%}}\n"],
|
|
1895
|
+
dependencies: [
|
|
1896
|
+
{
|
|
1897
|
+
kind: "directive",
|
|
1898
|
+
type: NgTemplateOutlet,
|
|
1899
|
+
selector: "[ngTemplateOutlet]",
|
|
1900
|
+
inputs: [
|
|
1901
|
+
"ngTemplateOutletContext",
|
|
1902
|
+
"ngTemplateOutlet",
|
|
1903
|
+
"ngTemplateOutletInjector"
|
|
1904
|
+
]
|
|
1905
|
+
},
|
|
1906
|
+
{
|
|
1907
|
+
kind: "component",
|
|
1908
|
+
type: ButtonComponent,
|
|
1909
|
+
selector: "ui-button",
|
|
1910
|
+
inputs: [
|
|
1911
|
+
"variant",
|
|
1912
|
+
"routerLink",
|
|
1913
|
+
"queryParams",
|
|
1914
|
+
"fragment",
|
|
1915
|
+
"state",
|
|
1916
|
+
"href",
|
|
1917
|
+
"target",
|
|
1918
|
+
"rel",
|
|
1919
|
+
"shortLabel",
|
|
1920
|
+
"shortBelow",
|
|
1921
|
+
"color",
|
|
1922
|
+
"active",
|
|
1923
|
+
"size",
|
|
1924
|
+
"type",
|
|
1925
|
+
"disabled",
|
|
1926
|
+
"loading",
|
|
1927
|
+
"fullWidth",
|
|
1928
|
+
"ariaLabel",
|
|
1929
|
+
"ariaExpanded",
|
|
1930
|
+
"ariaPressed",
|
|
1931
|
+
"ariaDescribedBy",
|
|
1932
|
+
"modal-footer-left",
|
|
1933
|
+
"modal-footer-right"
|
|
1934
|
+
]
|
|
1935
|
+
},
|
|
1936
|
+
{
|
|
1937
|
+
kind: "component",
|
|
1938
|
+
type: MoreMenuComponent,
|
|
1939
|
+
selector: "ui-more-menu",
|
|
1940
|
+
inputs: ["ariaLabel", "actions"],
|
|
1941
|
+
outputs: ["actionClick"]
|
|
1942
|
+
}
|
|
1943
|
+
],
|
|
1944
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
1945
|
+
});
|
|
1946
|
+
}
|
|
1947
|
+
};
|
|
1948
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1949
|
+
minVersion: "12.0.0",
|
|
1950
|
+
version: "22.2.2",
|
|
1951
|
+
ngImport: i0,
|
|
1952
|
+
type: KanbanBoardComponent,
|
|
1953
|
+
decorators: [{
|
|
1954
|
+
type: Component,
|
|
1955
|
+
args: [{
|
|
1956
|
+
selector: "ui-kanban-board",
|
|
1957
|
+
standalone: true,
|
|
1958
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1959
|
+
imports: [
|
|
1960
|
+
NgTemplateOutlet,
|
|
1961
|
+
ButtonComponent,
|
|
1962
|
+
MoreMenuComponent
|
|
1963
|
+
],
|
|
1964
|
+
template: `
|
|
1965
|
+
<div class="kb-wrap">
|
|
1966
|
+
@if (loading()) {
|
|
1967
|
+
<div class="kb-skeleton" role="status" [attr.aria-label]="labels.t('kanban.loading', { name: ariaLabel() })">
|
|
1968
|
+
@for (n of skeletonColumns(); track n) {
|
|
1969
|
+
<div class="kb-col-skeleton" aria-hidden="true">
|
|
1970
|
+
<div class="kb-col-skeleton__header"></div>
|
|
1971
|
+
@for (c of [1, 2, 3]; track c) { <div class="kb-col-skeleton__card"></div> }
|
|
1972
|
+
</div>
|
|
1973
|
+
}
|
|
1974
|
+
</div>
|
|
1975
|
+
} @else {
|
|
1976
|
+
<div class="kb-board" role="region" [attr.aria-label]="ariaLabel()" [attr.aria-describedby]="canDrag() ? hintId : null"
|
|
1977
|
+
[attr.aria-busy]="disabled() ? 'true' : null" [class.kb-board--dragging]="pointerDragging()">
|
|
1978
|
+
@for (view of views(); track view.col.key) {
|
|
1979
|
+
@let col = view.col;
|
|
1980
|
+
<div class="kb-col"
|
|
1981
|
+
role="group"
|
|
1982
|
+
[class.kb-col--target]="isTarget(col.key)"
|
|
1983
|
+
[class.kb-col--blocked]="isBlocked(col.key)"
|
|
1984
|
+
[attr.data-kb-col]="col.key"
|
|
1985
|
+
[attr.aria-disabled]="isBlocked(col.key) ? 'true' : null"
|
|
1986
|
+
[attr.aria-label]="columnLabel(col, view.count)">
|
|
1987
|
+
<div class="kb-col__header">
|
|
1988
|
+
<span class="kb-col__dot" [style.background]="dot(col.color)" aria-hidden="true"></span>
|
|
1989
|
+
<span class="kb-col__title">{{ col.label }}</span>
|
|
1990
|
+
@if (col.probability !== undefined && col.probability !== null) {
|
|
1991
|
+
<span class="kb-col__prob" aria-hidden="true">{{ percent(col.probability) }}</span>
|
|
1992
|
+
<span class="kb-sr">{{ labels.t('kanban.probability', { percent: percent(col.probability) }) }}</span>
|
|
1993
|
+
}
|
|
1994
|
+
<span class="kb-col__count" aria-hidden="true">{{ view.count }}</span>
|
|
1995
|
+
@if (isBlocked(col.key)) { <span class="kb-col__blocked">{{ labels.t('kanban.blocked') }}</span> }
|
|
1996
|
+
</div>
|
|
1997
|
+
<div class="kb-col__cards" [attr.role]="view.list.length || view.remaining > 0 ? 'list' : null">
|
|
1998
|
+
@for (item of view.shown; track cardId()(item); let i = $index) {
|
|
1999
|
+
@let key = cardId()(item);
|
|
2000
|
+
@if (slotBefore(col.key, key)) { <div class="kb-slot" aria-hidden="true"></div> }
|
|
2001
|
+
<div class="kb-card"
|
|
2002
|
+
role="listitem"
|
|
2003
|
+
[class.kb-card--lifted]="liftedKey() === key"
|
|
2004
|
+
[class.kb-card--movable]="canDrag()"
|
|
2005
|
+
[attr.data-kb-key]="key"
|
|
2006
|
+
[attr.tabindex]="key === tabbableKey() ? 0 : -1"
|
|
2007
|
+
[attr.aria-label]="cardLabel()(item)"
|
|
2008
|
+
[attr.aria-keyshortcuts]="canDrag() ? pickUpKeys : null"
|
|
2009
|
+
(focus)="tabKey.set(key)"
|
|
2010
|
+
(focusout)="onCardFocusOut($event, key)"
|
|
2011
|
+
(keydown)="onCardKey($event, item, col, i)"
|
|
2012
|
+
(click)="onCardClick(item)"
|
|
2013
|
+
(dragstart)="$event.preventDefault()"
|
|
2014
|
+
(pointerdown)="onPointerDown($event, item, col.key, i)">
|
|
2015
|
+
@if (canDrag()) {
|
|
2016
|
+
<span class="kb-handle" aria-hidden="true">
|
|
2017
|
+
<svg width="12" height="16" viewBox="0 0 12 16" fill="currentColor" focusable="false"><circle cx="3" cy="3" r="1.4"/><circle cx="9" cy="3" r="1.4"/><circle cx="3" cy="8" r="1.4"/><circle cx="9" cy="8" r="1.4"/><circle cx="3" cy="13" r="1.4"/><circle cx="9" cy="13" r="1.4"/></svg>
|
|
2018
|
+
</span>
|
|
2019
|
+
}
|
|
2020
|
+
<div class="kb-card__body">
|
|
2021
|
+
@if (card(); as tpl) {
|
|
2022
|
+
<ng-container [ngTemplateOutlet]="tpl.template" [ngTemplateOutletContext]="{ $implicit: item, column: col, index: i }" />
|
|
2023
|
+
}
|
|
2024
|
+
</div>
|
|
2025
|
+
@if (canDrag() && moveMenu()) {
|
|
2026
|
+
@let actions = moveActions(item, col.key);
|
|
2027
|
+
@if (actions.length) {
|
|
2028
|
+
<div class="kb-card__menu" (click)="$event.stopPropagation()" (keydown)="$event.stopPropagation()" (pointerdown)="$event.stopPropagation()">
|
|
2029
|
+
<ui-more-menu [actions]="actions" [ariaLabel]="labels.t('kanban.moveMenu', { name: cardLabel()(item) })"
|
|
2030
|
+
(actionClick)="onMenuAction($event, item, col.key)" />
|
|
2031
|
+
</div>
|
|
2032
|
+
}
|
|
2033
|
+
}
|
|
2034
|
+
</div>
|
|
2035
|
+
}
|
|
2036
|
+
@if (slotBefore(col.key, null)) { <div class="kb-slot" aria-hidden="true"></div> }
|
|
2037
|
+
@if (view.hidden > 0) {
|
|
2038
|
+
<div class="kb-more" role="listitem">
|
|
2039
|
+
<ui-button variant="secondary" size="sm" [fullWidth]="true" (click)="showMore(col.key)"
|
|
2040
|
+
[ariaLabel]="labels.t('kanban.showMore', { next: view.next, hidden: view.hidden }) + ', ' + col.label">{{ labels.t('kanban.showMore', { next: view.next, hidden: view.hidden }) }}</ui-button>
|
|
2041
|
+
</div>
|
|
2042
|
+
}
|
|
2043
|
+
@if (view.hidden === 0 && view.remaining > 0) {
|
|
2044
|
+
<div class="kb-more kb-more--server" role="listitem">
|
|
2045
|
+
<ui-button variant="secondary" size="sm" [fullWidth]="true" [loading]="!!col.loadingMore" (click)="loadMore(col)"
|
|
2046
|
+
[ariaLabel]="labels.t('kanban.showMore', { next: view.nextRemote, hidden: view.remaining }) + ', ' + col.label">{{ labels.t('kanban.showMore', { next: view.nextRemote, hidden: view.remaining }) }}</ui-button>
|
|
2047
|
+
</div>
|
|
2048
|
+
}
|
|
2049
|
+
@if (view.list.length === 0 && view.remaining === 0 && !slotBefore(col.key, null)) {
|
|
2050
|
+
<div class="kb-col__empty" role="status">{{ col.emptyText || emptyText() }}</div>
|
|
2051
|
+
}
|
|
2052
|
+
</div>
|
|
2053
|
+
@if (col.footer) {
|
|
2054
|
+
<div class="kb-col__footer"><span aria-hidden="true">{{ col.footer }}</span><span class="kb-sr">{{ col.footerLabel || col.footer }}</span></div>
|
|
2055
|
+
}
|
|
2056
|
+
</div>
|
|
2057
|
+
}
|
|
2058
|
+
</div>
|
|
2059
|
+
@if (canDrag()) { <p class="kb-sr" [id]="hintId">{{ labels.t('kanban.hint') }}</p> }
|
|
2060
|
+
<div class="kb-sr" role="status" aria-live="polite" aria-atomic="true">{{ announcement() }}</div>
|
|
2061
|
+
}
|
|
2062
|
+
</div>
|
|
2063
|
+
`,
|
|
2064
|
+
styles: [":host{display:flex;flex-direction:column;flex:1;min-height:0;min-width:0;max-width:100%}.kb-wrap{flex:1;min-height:0;min-width:0;display:flex;flex-direction:column;position:relative}.kb-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}.kb-board{display:flex;align-items:stretch;gap:12px;flex:1;min-height:0;padding:0 0 16px;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;scroll-snap-type:x proximity}.kb-board.kb-board--dragging{scroll-snap-type:none}.kb-col{flex:0 0 280px;width:280px;display:flex;flex-direction:column;min-height:0;background:#f8fafc;border:1.5px solid #e2e8f0;border-radius:10px;scroll-snap-align:start;transition:border-color .15s,background-color .15s}.kb-col--target{border-color:#2563eb;background:#eff6ff}.kb-col--blocked{border-style:dashed;border-color:#b91c1c;background:#fef2f2}.kb-col__header{display:flex;align-items:center;gap:7px;padding:12px 14px 10px;border-bottom:1px solid #e2e8f0;flex-shrink:0;min-width:0}.kb-col__dot{width:9px;height:9px;border-radius:50%;flex-shrink:0}.kb-col__title{flex:1;min-width:0;font-size:12px;font-weight:700;color:#374151;text-transform:uppercase;letter-spacing:.04em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kb-col__prob{font-size:11px;font-weight:600;color:#1e293b;background:#e2e8f0;border-radius:10px;padding:1px 7px;flex-shrink:0}.kb-col__count{font-size:11px;font-weight:600;color:#fff;background:#475569;border-radius:10px;padding:1px 7px;flex-shrink:0}.kb-col__blocked{font-size:11px;font-weight:700;color:#991b1b;flex-shrink:0}.kb-col__footer{padding:8px 14px;border-top:1px solid #e2e8f0;font-size:12px;font-weight:600;color:#334155;flex-shrink:0}.kb-col__cards{flex:1;min-height:60px;overflow-y:auto;padding:10px;display:flex;flex-direction:column;gap:8px}.kb-col__empty{text-align:center;padding:24px 12px;color:#475569;font-size:12px;border:1.5px dashed #cbd5e1;border-radius:8px}.kb-more{flex-shrink:0}.kb-slot{flex-shrink:0;height:56px;border:2px dashed #2563eb;border-radius:8px;background:#dbeafe}.kb-card{position:relative;background:#fff;border:1.5px solid #e2e8f0;border-radius:8px;padding:10px 36px 10px 12px;cursor:pointer;-webkit-user-select:none;user-select:none;transition:box-shadow .12s,border-color .12s,opacity .12s}.kb-card--movable{padding-left:26px;cursor:grab}.kb-card:hover{border-color:#94a3b8;box-shadow:0 2px 8px #00000012}.kb-card:focus-visible{outline:2px solid var(--ui-focus, #3b82f6);outline-offset:2px}.kb-card--lifted{opacity:.45;border-style:dashed}.kb-card__body{min-width:0}.kb-card__menu{position:absolute;top:4px;right:4px}.kb-handle{position:absolute;left:4px;top:50%;transform:translateY(-50%);width:18px;height:28px;display:flex;align-items:center;justify-content:center;color:#64748b;touch-action:none;cursor:grab}.kb-handle:after{content:\"\";position:absolute;inset:-8px -6px}.kb-ghost{position:fixed;left:0;top:0;margin:0;z-index:1000;pointer-events:none;opacity:.95;box-shadow:0 10px 24px #0f172a47;transition:none;cursor:grabbing}.kb-skeleton{display:flex;gap:12px;padding-bottom:16px}.kb-col-skeleton{flex:0 0 280px;background:#f8fafc;border:1.5px solid #e2e8f0;border-radius:10px;padding:12px;display:flex;flex-direction:column;gap:10px}.kb-col-skeleton__header,.kb-col-skeleton__card{background:linear-gradient(90deg,#e2e8f0 25%,#f1f5f9,#e2e8f0 75%);background-size:200% 100%;animation:kb-shimmer 1.4s infinite}.kb-col-skeleton__header{height:32px;border-radius:6px}.kb-col-skeleton__card{height:90px;border-radius:8px}@keyframes kb-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}@media(prefers-reduced-motion:reduce){.kb-col-skeleton__header,.kb-col-skeleton__card{animation:none}.kb-card,.kb-col{transition:none}.kb-board{scroll-behavior:auto}}@media(forced-colors:active){.kb-card,.kb-col{border:1px solid CanvasText}.kb-col--target{outline:3px solid Highlight;outline-offset:-3px}.kb-col--blocked{border-style:dashed;outline:3px dashed CanvasText;outline-offset:-3px}.kb-card:focus-visible{outline:3px solid Highlight}.kb-slot{border:2px dashed Highlight;background:Canvas}.kb-card--lifted{border-style:dashed;opacity:1}.kb-col__count,.kb-col__prob{border:1px solid CanvasText;background:Canvas;color:CanvasText}}@media(pointer:coarse){.kb-handle{width:32px;height:44px;left:0}.kb-card--movable{padding-left:36px}.kb-card__menu{top:0;right:0}}@media(max-width:640px){.kb-board{scroll-snap-type:x mandatory;scroll-padding:0 12px;padding-left:12px;padding-right:12px}.kb-board.kb-board--dragging{scroll-snap-type:none}.kb-col{flex:0 0 85%;width:85%}.kb-col-skeleton{flex:0 0 85%}}\n"]
|
|
2065
|
+
}]
|
|
2066
|
+
}],
|
|
2067
|
+
ctorParameters: () => [],
|
|
2068
|
+
propDecorators: {
|
|
2069
|
+
columns: [{
|
|
2070
|
+
type: i0.Input,
|
|
2071
|
+
args: [{
|
|
2072
|
+
isSignal: true,
|
|
2073
|
+
alias: "columns",
|
|
2074
|
+
required: true
|
|
2075
|
+
}]
|
|
2076
|
+
}],
|
|
2077
|
+
items: [{
|
|
2078
|
+
type: i0.Input,
|
|
2079
|
+
args: [{
|
|
2080
|
+
isSignal: true,
|
|
2081
|
+
alias: "items",
|
|
2082
|
+
required: true
|
|
2083
|
+
}]
|
|
2084
|
+
}],
|
|
2085
|
+
columnFn: [{
|
|
2086
|
+
type: i0.Input,
|
|
2087
|
+
args: [{
|
|
2088
|
+
isSignal: true,
|
|
2089
|
+
alias: "columnFn",
|
|
2090
|
+
required: true
|
|
2091
|
+
}]
|
|
2092
|
+
}],
|
|
2093
|
+
cardId: [{
|
|
2094
|
+
type: i0.Input,
|
|
2095
|
+
args: [{
|
|
2096
|
+
isSignal: true,
|
|
2097
|
+
alias: "cardId",
|
|
2098
|
+
required: true
|
|
2099
|
+
}]
|
|
2100
|
+
}],
|
|
2101
|
+
cardLabel: [{
|
|
2102
|
+
type: i0.Input,
|
|
2103
|
+
args: [{
|
|
2104
|
+
isSignal: true,
|
|
2105
|
+
alias: "cardLabel",
|
|
2106
|
+
required: true
|
|
2107
|
+
}]
|
|
2108
|
+
}],
|
|
2109
|
+
canDrop: [{
|
|
2110
|
+
type: i0.Input,
|
|
2111
|
+
args: [{
|
|
2112
|
+
isSignal: true,
|
|
2113
|
+
alias: "canDrop",
|
|
2114
|
+
required: false
|
|
2115
|
+
}]
|
|
2116
|
+
}],
|
|
2117
|
+
reorderable: [{
|
|
2118
|
+
type: i0.Input,
|
|
2119
|
+
args: [{
|
|
2120
|
+
isSignal: true,
|
|
2121
|
+
alias: "reorderable",
|
|
2122
|
+
required: false
|
|
2123
|
+
}]
|
|
2124
|
+
}],
|
|
2125
|
+
moveMenu: [{
|
|
2126
|
+
type: i0.Input,
|
|
2127
|
+
args: [{
|
|
2128
|
+
isSignal: true,
|
|
2129
|
+
alias: "moveMenu",
|
|
2130
|
+
required: false
|
|
2131
|
+
}]
|
|
2132
|
+
}],
|
|
2133
|
+
loading: [{
|
|
2134
|
+
type: i0.Input,
|
|
2135
|
+
args: [{
|
|
2136
|
+
isSignal: true,
|
|
2137
|
+
alias: "loading",
|
|
2138
|
+
required: false
|
|
2139
|
+
}]
|
|
2140
|
+
}],
|
|
2141
|
+
readOnly: [{
|
|
2142
|
+
type: i0.Input,
|
|
2143
|
+
args: [{
|
|
2144
|
+
isSignal: true,
|
|
2145
|
+
alias: "readOnly",
|
|
2146
|
+
required: false
|
|
2147
|
+
}]
|
|
2148
|
+
}],
|
|
2149
|
+
disabled: [{
|
|
2150
|
+
type: i0.Input,
|
|
2151
|
+
args: [{
|
|
2152
|
+
isSignal: true,
|
|
2153
|
+
alias: "disabled",
|
|
2154
|
+
required: false
|
|
2155
|
+
}]
|
|
2156
|
+
}],
|
|
2157
|
+
pageSize: [{
|
|
2158
|
+
type: i0.Input,
|
|
2159
|
+
args: [{
|
|
2160
|
+
isSignal: true,
|
|
2161
|
+
alias: "pageSize",
|
|
2162
|
+
required: false
|
|
2163
|
+
}]
|
|
2164
|
+
}],
|
|
2165
|
+
ariaLabelInput: [{
|
|
2166
|
+
type: i0.Input,
|
|
2167
|
+
args: [{
|
|
2168
|
+
isSignal: true,
|
|
2169
|
+
alias: "ariaLabel",
|
|
2170
|
+
required: false
|
|
2171
|
+
}]
|
|
2172
|
+
}],
|
|
2173
|
+
emptyTextInput: [{
|
|
2174
|
+
type: i0.Input,
|
|
2175
|
+
args: [{
|
|
2176
|
+
isSignal: true,
|
|
2177
|
+
alias: "emptyText",
|
|
2178
|
+
required: false
|
|
2179
|
+
}]
|
|
2180
|
+
}],
|
|
2181
|
+
cardMove: [{
|
|
2182
|
+
type: i0.Output,
|
|
2183
|
+
args: ["cardMove"]
|
|
2184
|
+
}],
|
|
2185
|
+
cardClick: [{
|
|
2186
|
+
type: i0.Output,
|
|
2187
|
+
args: ["cardClick"]
|
|
2188
|
+
}],
|
|
2189
|
+
columnMore: [{
|
|
2190
|
+
type: i0.Output,
|
|
2191
|
+
args: ["columnMore"]
|
|
2192
|
+
}],
|
|
2193
|
+
card: [{
|
|
2194
|
+
type: i0.ContentChild,
|
|
2195
|
+
args: [i0.forwardRef(() => KanbanCardDirective), { isSignal: true }]
|
|
2196
|
+
}]
|
|
2197
|
+
}
|
|
2198
|
+
});
|
|
2199
|
+
export { BoardCardDirective, BoardComponent, KanbanBoardComponent, KanbanCardDirective };
|
|
2200
|
+
|
|
2201
|
+
//# sourceMappingURL=forgeroute-ui-boards.mjs.map
|