@eifi1/ui-kit 0.51.7 → 0.53.0
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/README.md +178 -67
- package/dist/account/account-parts.d.ts +10 -8
- package/dist/account/account-parts.js +1 -18
- package/dist/account/account-parts.js.map +1 -1
- package/dist/account/data-export-setting-labels.js +1 -1
- package/dist/account/data-export-setting-labels.js.map +1 -1
- package/dist/account/delete-account-setting-labels.js +1 -1
- package/dist/account/delete-account-setting-labels.js.map +1 -1
- package/dist/account/email-change-setting-labels.js +1 -1
- package/dist/account/email-change-setting-labels.js.map +1 -1
- package/dist/account/passkeys-setting.d.ts +9 -2
- package/dist/account/passkeys-setting.js +41 -29
- package/dist/account/passkeys-setting.js.map +1 -1
- package/dist/account/sessions-setting.d.ts +3 -2
- package/dist/account/sessions-setting.js +10 -8
- package/dist/account/sessions-setting.js.map +1 -1
- package/dist/admin/admin-action-confirm.js +1 -3
- package/dist/admin/admin-action-confirm.js.map +1 -1
- package/dist/admin/admin-parts.d.ts +6 -3
- package/dist/admin/admin-parts.js +6 -21
- package/dist/admin/admin-parts.js.map +1 -1
- package/dist/admin/mail-test-card-labels.js +1 -1
- package/dist/admin/mail-test-card-labels.js.map +1 -1
- package/dist/admin/plan-change-labels.d.ts +2 -2
- package/dist/admin/plan-change-labels.js +1 -17
- package/dist/admin/plan-change-labels.js.map +1 -1
- package/dist/admin/plan-change.d.ts +3 -42
- package/dist/admin/plan-change.js +1 -1
- package/dist/admin/plan-change.js.map +1 -1
- package/dist/admin/reviewer-scope-editor.js +3 -3
- package/dist/admin/reviewer-scope-editor.js.map +1 -1
- package/dist/auth/auth-errors-labels.d.ts +11 -0
- package/dist/auth/auth-errors-labels.js +13 -0
- package/dist/auth/auth-errors-labels.js.map +1 -0
- package/dist/auth/auth-errors.d.ts +7 -23
- package/dist/auth/auth-errors.js +2 -15
- package/dist/auth/auth-errors.js.map +1 -1
- package/dist/auth/complete-name-dialog.js +2 -1
- package/dist/auth/complete-name-dialog.js.map +1 -1
- package/dist/auth/forgot-password-form-labels.js +1 -1
- package/dist/auth/forgot-password-form-labels.js.map +1 -1
- package/dist/auth/forgot-password-form.js +7 -2
- package/dist/auth/forgot-password-form.js.map +1 -1
- package/dist/auth/register-form-labels.js +1 -1
- package/dist/auth/register-form-labels.js.map +1 -1
- package/dist/auth/reset-password-form-labels.js +1 -1
- package/dist/auth/reset-password-form-labels.js.map +1 -1
- package/dist/auth/reset-password-form.js +5 -1
- package/dist/auth/reset-password-form.js.map +1 -1
- package/dist/auth/sign-in-form-labels.js +1 -1
- package/dist/auth/sign-in-form-labels.js.map +1 -1
- package/dist/auth/status-parts.d.ts +0 -3
- package/dist/auth/status-parts.js +0 -4
- package/dist/auth/status-parts.js.map +1 -1
- package/dist/auth/verify-email-labels.js +1 -1
- package/dist/auth/verify-email-labels.js.map +1 -1
- package/dist/auth/verify-email.js +7 -2
- package/dist/auth/verify-email.js.map +1 -1
- package/dist/billing/cancel-subscription.d.ts +10 -7
- package/dist/billing/cancel-subscription.js +6 -6
- package/dist/billing/cancel-subscription.js.map +1 -1
- package/dist/billing/plan-card.d.ts +5 -3
- package/dist/billing/plan-card.js +7 -8
- package/dist/billing/plan-card.js.map +1 -1
- package/dist/billing/plan-change-labels.d.ts +42 -0
- package/dist/billing/plan-change-labels.js +22 -0
- package/dist/billing/plan-change-labels.js.map +1 -0
- package/dist/billing/plan-switch.d.ts +9 -6
- package/dist/billing/plan-switch.js +7 -5
- package/dist/billing/plan-switch.js.map +1 -1
- package/dist/chart.d.ts +4 -3
- package/dist/chart.js +72 -4
- package/dist/chart.js.map +1 -1
- package/dist/components/account-chips.d.ts +5 -5
- package/dist/components/account-chips.js +11 -13
- package/dist/components/account-chips.js.map +1 -1
- package/dist/components/alert-banner.d.ts +16 -5
- package/dist/components/alert-banner.js +46 -1
- package/dist/components/alert-banner.js.map +1 -1
- package/dist/components/amount-input.d.ts +13 -0
- package/dist/components/amount-input.js +1 -0
- package/dist/components/amount-input.js.map +1 -1
- package/dist/components/autocomplete.js +57 -65
- package/dist/components/autocomplete.js.map +1 -1
- package/dist/components/bulk-action-bar.d.ts +12 -2
- package/dist/components/bulk-action-bar.js +65 -21
- package/dist/components/bulk-action-bar.js.map +1 -1
- package/dist/components/button-look.d.ts +5 -5
- package/dist/components/button-look.js.map +1 -1
- package/dist/components/button.d.ts +2 -2
- package/dist/components/button.js.map +1 -1
- package/dist/components/chart-edge.d.ts +16 -0
- package/dist/components/chart-edge.js +14 -1
- package/dist/components/chart-edge.js.map +1 -1
- package/dist/components/chart-figure.d.ts +13 -0
- package/dist/components/chart-figure.js +15 -0
- package/dist/components/chart-figure.js.map +1 -0
- package/dist/components/chart-zoom-core.js +1 -4
- package/dist/components/chart-zoom-core.js.map +1 -1
- package/dist/components/chart.d.ts +8 -1
- package/dist/components/chart.js +19 -10
- package/dist/components/chart.js.map +1 -1
- package/dist/components/combobox-core.d.ts +111 -2
- package/dist/components/combobox-core.js +148 -42
- package/dist/components/combobox-core.js.map +1 -1
- package/dist/components/combobox.d.ts +1 -1
- package/dist/components/combobox.js +141 -130
- package/dist/components/combobox.js.map +1 -1
- package/dist/components/copy-button.d.ts +6 -5
- package/dist/components/copy-button.js +5 -3
- package/dist/components/copy-button.js.map +1 -1
- package/dist/components/country-select.js +2 -2
- package/dist/components/country-select.js.map +1 -1
- package/dist/components/data-table-column-settings.d.ts +1 -1
- package/dist/components/data-table-column-settings.js +33 -7
- package/dist/components/data-table-column-settings.js.map +1 -1
- package/dist/components/data-table-filters.d.ts +4 -2
- package/dist/components/data-table-filters.js +2 -2
- package/dist/components/data-table-filters.js.map +1 -1
- package/dist/components/data-table-fit.d.ts +6 -4
- package/dist/components/data-table-fit.js +4 -1
- package/dist/components/data-table-fit.js.map +1 -1
- package/dist/components/data-table-groups.d.ts +1 -1
- package/dist/components/data-table-groups.js.map +1 -1
- package/dist/components/data-table-head.d.ts +1 -1
- package/dist/components/data-table-head.js +15 -12
- package/dist/components/data-table-head.js.map +1 -1
- package/dist/components/data-table-mobile.d.ts +12 -7
- package/dist/components/data-table-mobile.js +43 -30
- package/dist/components/data-table-mobile.js.map +1 -1
- package/dist/components/data-table-pagination.js +11 -6
- package/dist/components/data-table-pagination.js.map +1 -1
- package/dist/components/data-table-resize.d.ts +1 -1
- package/dist/components/data-table-resize.js.map +1 -1
- package/dist/components/data-table-row-actions.d.ts +2 -2
- package/dist/components/data-table-row-actions.js.map +1 -1
- package/dist/components/data-table-row.d.ts +6 -2
- package/dist/components/data-table-row.js +17 -10
- package/dist/components/data-table-row.js.map +1 -1
- package/dist/components/data-table-selection.d.ts +1 -1
- package/dist/components/data-table-selection.js.map +1 -1
- package/dist/components/data-table-shared.d.ts +10 -2
- package/dist/components/data-table-shared.js +18 -0
- package/dist/components/data-table-shared.js.map +1 -1
- package/dist/components/data-table-sort.d.ts +21 -2
- package/dist/components/data-table-sort.js +24 -0
- package/dist/components/data-table-sort.js.map +1 -1
- package/dist/components/data-table-virtual.d.ts +1 -1
- package/dist/components/data-table-virtual.js +18 -6
- package/dist/components/data-table-virtual.js.map +1 -1
- package/dist/components/data-table.d.ts +13 -4
- package/dist/components/data-table.js +139 -36
- package/dist/components/data-table.js.map +1 -1
- package/dist/components/date-field.d.ts +25 -3
- package/dist/components/date-field.js +33 -8
- package/dist/components/date-field.js.map +1 -1
- package/dist/components/date-picker.d.ts +16 -3
- package/dist/components/date-picker.js +55 -26
- package/dist/components/date-picker.js.map +1 -1
- package/dist/components/date-range-picker.d.ts +38 -24
- package/dist/components/date-range-picker.js +23 -7
- package/dist/components/date-range-picker.js.map +1 -1
- package/dist/components/error-boundary.js +37 -30
- package/dist/components/error-boundary.js.map +1 -1
- package/dist/components/{ui-labels.d.ts → field-base-labels.d.ts} +0 -2
- package/dist/components/{ui-labels.js → field-base-labels.js} +2 -9
- package/dist/components/field-base-labels.js.map +1 -0
- package/dist/components/field-base.d.ts +4 -3
- package/dist/components/field-base.js +3 -3
- package/dist/components/field-base.js.map +1 -1
- package/dist/components/form-actions.js +11 -5
- package/dist/components/form-actions.js.map +1 -1
- package/dist/components/hover-menu.d.ts +3 -0
- package/dist/components/hover-menu.js +5 -3
- package/dist/components/hover-menu.js.map +1 -1
- package/dist/components/icon-button.js +14 -9
- package/dist/components/icon-button.js.map +1 -1
- package/dist/components/inline-confirm.d.ts +43 -0
- package/dist/components/inline-confirm.js +67 -0
- package/dist/components/inline-confirm.js.map +1 -0
- package/dist/components/inline-entity-combobox.d.ts +4 -3
- package/dist/components/inline-entity-combobox.js +148 -140
- package/dist/components/inline-entity-combobox.js.map +1 -1
- package/dist/components/input.js +1 -1
- package/dist/components/input.js.map +1 -1
- package/dist/components/jump-calendar.js +28 -112
- package/dist/components/jump-calendar.js.map +1 -1
- package/dist/components/legal-page.d.ts +3 -1
- package/dist/components/legal-page.js +3 -2
- package/dist/components/legal-page.js.map +1 -1
- package/dist/components/legal.d.ts +4 -2
- package/dist/components/legal.js.map +1 -1
- package/dist/components/lightbox.d.ts +2 -2
- package/dist/components/lightbox.js +17 -6
- package/dist/components/lightbox.js.map +1 -1
- package/dist/components/list.d.ts +6 -2
- package/dist/components/list.js +3 -2
- package/dist/components/list.js.map +1 -1
- package/dist/components/measured-grid.d.ts +1 -1
- package/dist/components/measured-grid.js +2 -1
- package/dist/components/measured-grid.js.map +1 -1
- package/dist/components/mini-calendar.js +3 -5
- package/dist/components/mini-calendar.js.map +1 -1
- package/dist/components/modal.js +3 -1
- package/dist/components/modal.js.map +1 -1
- package/dist/components/month-grid.d.ts +55 -0
- package/dist/components/month-grid.js +148 -0
- package/dist/components/month-grid.js.map +1 -0
- package/dist/components/month-picker.d.ts +36 -4
- package/dist/components/month-picker.js +123 -146
- package/dist/components/month-picker.js.map +1 -1
- package/dist/components/multi-select.d.ts +2 -2
- package/dist/components/multi-select.js +11 -6
- package/dist/components/multi-select.js.map +1 -1
- package/dist/components/nav-pills.d.ts +1 -1
- package/dist/components/nav-pills.js.map +1 -1
- package/dist/components/picker-sheet.js +2 -1
- package/dist/components/picker-sheet.js.map +1 -1
- package/dist/components/pie-chart-labels.d.ts +7 -0
- package/dist/components/pie-chart-labels.js +1 -0
- package/dist/components/pie-chart-labels.js.map +1 -1
- package/dist/components/pie-chart.d.ts +5 -3
- package/dist/components/pie-chart.js +7 -22
- package/dist/components/pie-chart.js.map +1 -1
- package/dist/components/popover.d.ts +3 -0
- package/dist/components/popover.js +7 -1
- package/dist/components/popover.js.map +1 -1
- package/dist/components/row-actions.js +2 -1
- package/dist/components/row-actions.js.map +1 -1
- package/dist/components/series-chart-axes.d.ts +4 -4
- package/dist/components/series-chart-axes.js.map +1 -1
- package/dist/components/series-chart-labels.d.ts +7 -4
- package/dist/components/series-chart-labels.js.map +1 -1
- package/dist/components/series-chart.d.ts +92 -23
- package/dist/components/series-chart.js +74 -30
- package/dist/components/series-chart.js.map +1 -1
- package/dist/components/share-card.js +3 -3
- package/dist/components/share-card.js.map +1 -1
- package/dist/components/tabs-labels.d.ts +2 -0
- package/dist/components/tabs-labels.js +11 -0
- package/dist/components/tabs-labels.js.map +1 -0
- package/dist/components/tabs.d.ts +1 -1
- package/dist/components/tabs.js +1 -1
- package/dist/components/tabs.js.map +1 -1
- package/dist/components/toggle-legend.d.ts +2 -2
- package/dist/components/toggle-legend.js +6 -6
- package/dist/components/toggle-legend.js.map +1 -1
- package/dist/components/translation-review-editor.d.ts +4 -2
- package/dist/components/translation-review-editor.js +2 -3
- package/dist/components/translation-review-editor.js.map +1 -1
- package/dist/components/translation-review.d.ts +2 -1
- package/dist/components/translation-review.js +2 -2
- package/dist/components/translation-review.js.map +1 -1
- package/dist/components/treemap-labels.d.ts +31 -0
- package/dist/components/treemap-labels.js +10 -0
- package/dist/components/treemap-labels.js.map +1 -0
- package/dist/components/treemap-layout.d.ts +62 -0
- package/dist/components/treemap-layout.js +126 -0
- package/dist/components/treemap-layout.js.map +1 -0
- package/dist/components/treemap.d.ts +167 -19
- package/dist/components/treemap.js +340 -100
- package/dist/components/treemap.js.map +1 -1
- package/dist/components/use-table-state.d.ts +5 -5
- package/dist/components/use-table-state.js +4 -1
- package/dist/components/use-table-state.js.map +1 -1
- package/dist/data-table.d.ts +1 -2
- package/dist/data-table.js +1 -4
- package/dist/data-table.js.map +1 -1
- package/dist/demo/demo-countdown.d.ts +0 -5
- package/dist/demo/demo-countdown.js +0 -4
- package/dist/demo/demo-countdown.js.map +1 -1
- package/dist/eslint/index.js +1 -1
- package/dist/eslint/role-utilities.d.ts +36 -7
- package/dist/eslint/role-utilities.js +42 -9
- package/dist/eslint/role-utilities.js.map +1 -1
- package/dist/feedback/feedback-dialog.d.ts +25 -16
- package/dist/feedback/feedback-dialog.js +6 -2
- package/dist/feedback/feedback-dialog.js.map +1 -1
- package/dist/feedback/feedback-mutation.d.ts +18 -0
- package/dist/feedback/feedback-mutation.js +8 -0
- package/dist/feedback/feedback-mutation.js.map +1 -0
- package/dist/feedback/feedback-page-link.d.ts +53 -0
- package/dist/feedback/feedback-page-link.js +37 -0
- package/dist/feedback/feedback-page-link.js.map +1 -0
- package/dist/feedback/feedback-public-list.d.ts +8 -4
- package/dist/feedback/feedback-public-list.js +2 -2
- package/dist/feedback/feedback-public-list.js.map +1 -1
- package/dist/feedback/feedback-replies.d.ts +3 -1
- package/dist/feedback/feedback-replies.js +5 -4
- package/dist/feedback/feedback-replies.js.map +1 -1
- package/dist/feedback/feedback-row-detail-labels.js +0 -3
- package/dist/feedback/feedback-row-detail-labels.js.map +1 -1
- package/dist/feedback/feedback-row-detail.d.ts +33 -44
- package/dist/feedback/feedback-row-detail.js +28 -34
- package/dist/feedback/feedback-row-detail.js.map +1 -1
- package/dist/feedback/feedback-status-undo.d.ts +17 -14
- package/dist/feedback/feedback-status-undo.js +10 -15
- package/dist/feedback/feedback-status-undo.js.map +1 -1
- package/dist/feedback/feedback-submit-dialog.d.ts +1 -1
- package/dist/feedback/feedback-submit-dialog.js +1 -1
- package/dist/feedback/feedback-submit-dialog.js.map +1 -1
- package/dist/feedback/feedback-submit.js +9 -3
- package/dist/feedback/feedback-submit.js.map +1 -1
- package/dist/feedback/feedback-swipe.d.ts +1 -1
- package/dist/feedback/feedback-swipe.js.map +1 -1
- package/dist/feedback/feedback-table.d.ts +21 -9
- package/dist/feedback/feedback-table.js +45 -25
- package/dist/feedback/feedback-table.js.map +1 -1
- package/dist/feedback/feedback-thread-labels.d.ts +2 -2
- package/dist/feedback/feedback-thread-labels.js.map +1 -1
- package/dist/feedback/feedback-thread.d.ts +15 -23
- package/dist/feedback/feedback-thread.js +2 -1
- package/dist/feedback/feedback-thread.js.map +1 -1
- package/dist/feedback.d.ts +6 -6
- package/dist/feedback.js +90 -6
- package/dist/feedback.js.map +1 -1
- package/dist/hooks/use-focus-trap.d.ts +35 -0
- package/dist/hooks/use-focus-trap.js +6 -4
- package/dist/hooks/use-focus-trap.js.map +1 -1
- package/dist/hooks/use-hotkey.d.ts +5 -2
- package/dist/hooks/use-hotkey.js +5 -4
- package/dist/hooks/use-hotkey.js.map +1 -1
- package/dist/hooks/use-long-press.d.ts +7 -4
- package/dist/hooks/use-long-press.js +3 -0
- package/dist/hooks/use-long-press.js.map +1 -1
- package/dist/hooks/use-media-query.js +12 -4
- package/dist/hooks/use-media-query.js.map +1 -1
- package/dist/hooks/use-mounted.d.ts +22 -0
- package/dist/hooks/use-mounted.js +24 -0
- package/dist/hooks/use-mounted.js.map +1 -0
- package/dist/hooks/use-overlay-history.js +19 -3
- package/dist/hooks/use-overlay-history.js.map +1 -1
- package/dist/i18n/defaults.js +4 -9
- package/dist/i18n/defaults.js.map +1 -1
- package/dist/i18n/german.js +7 -18
- package/dist/i18n/german.js.map +1 -1
- package/dist/i18n/kit-labels.d.ts +9 -11
- package/dist/i18n/kit-labels.js.map +1 -1
- package/dist/i18n/locales/en.js +15 -64
- package/dist/i18n/locales/en.js.map +3 -3
- package/dist/i18n/locales/es.js +7 -18
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.js +20 -27
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hu.js +9 -18
- package/dist/i18n/locales/hu.js.map +1 -1
- package/dist/i18n/locales/it.js +7 -19
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/zh.js +8 -18
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/i18n/review.js +12 -2
- package/dist/i18n/review.js.map +1 -1
- package/dist/i18n/shared-labels.js +0 -1
- package/dist/i18n/shared-labels.js.map +1 -1
- package/dist/index.d.ts +21 -23
- package/dist/index.js +50 -65
- package/dist/index.js.map +1 -1
- package/dist/landing/routing.d.ts +3 -1
- package/dist/landing/routing.js +4 -7
- package/dist/landing/routing.js.map +1 -1
- package/dist/lib/broadcast.d.ts +17 -0
- package/dist/lib/broadcast.js +30 -0
- package/dist/lib/broadcast.js.map +1 -0
- package/dist/lib/date-format.d.ts +37 -2
- package/dist/lib/date-format.js +34 -8
- package/dist/lib/date-format.js.map +1 -1
- package/dist/lib/day-format.d.ts +46 -0
- package/dist/lib/day-format.js +46 -0
- package/dist/lib/day-format.js.map +1 -0
- package/dist/lib/describe-failure.d.ts +14 -0
- package/dist/lib/describe-failure.js +9 -0
- package/dist/lib/describe-failure.js.map +1 -0
- package/dist/lib/direction.d.ts +16 -0
- package/dist/lib/direction.js +9 -1
- package/dist/lib/direction.js.map +1 -1
- package/dist/lib/focus-left.d.ts +63 -0
- package/dist/lib/focus-left.js +67 -0
- package/dist/lib/focus-left.js.map +1 -0
- package/dist/lib/format.js +5 -14
- package/dist/lib/format.js.map +1 -1
- package/dist/lib/http-status.d.ts +24 -0
- package/dist/lib/http-status.js +14 -0
- package/dist/lib/http-status.js.map +1 -0
- package/dist/lib/intl-cache.d.ts +14 -0
- package/dist/lib/intl-cache.js +15 -0
- package/dist/lib/intl-cache.js.map +1 -0
- package/dist/lib/iso-day.d.ts +11 -0
- package/dist/lib/iso-day.js +8 -0
- package/dist/lib/iso-day.js.map +1 -0
- package/dist/lib/lazy-with-fallback.d.ts +31 -0
- package/dist/lib/lazy-with-fallback.js +40 -0
- package/dist/lib/lazy-with-fallback.js.map +1 -0
- package/dist/lib/path-pattern.d.ts +34 -0
- package/dist/lib/path-pattern.js +24 -0
- package/dist/lib/path-pattern.js.map +1 -0
- package/dist/lib/reduced-motion.d.ts +2 -1
- package/dist/lib/reduced-motion.js.map +1 -1
- package/dist/lib/round.d.ts +2 -1
- package/dist/lib/round.js +2 -1
- package/dist/lib/round.js.map +1 -1
- package/dist/lib/safe-storage.d.ts +24 -5
- package/dist/lib/safe-storage.js +27 -2
- package/dist/lib/safe-storage.js.map +1 -1
- package/dist/lib/session-refresh.js +1 -1
- package/dist/lib/session-refresh.js.map +1 -1
- package/dist/lib/share-format.d.ts +13 -0
- package/dist/lib/share-format.js +10 -0
- package/dist/lib/share-format.js.map +1 -0
- package/dist/lib/text-case.d.ts +17 -0
- package/dist/lib/text-case.js +8 -0
- package/dist/lib/text-case.js.map +1 -0
- package/dist/lib/text-match.d.ts +29 -0
- package/dist/lib/text-match.js +20 -2
- package/dist/lib/text-match.js.map +1 -1
- package/dist/lib/thenable.d.ts +13 -0
- package/dist/lib/thenable.js +8 -0
- package/dist/lib/thenable.js.map +1 -0
- package/dist/lib/translation-review.d.ts +7 -2
- package/dist/lib/translation-review.js +4 -4
- package/dist/lib/translation-review.js.map +1 -1
- package/dist/notifications/device-zone-report.js +1 -1
- package/dist/notifications/device-zone-report.js.map +1 -1
- package/dist/notifications/notification-bell.d.ts +2 -1
- package/dist/notifications/notification-bell.js +3 -3
- package/dist/notifications/notification-bell.js.map +1 -1
- package/dist/notifications/notification-inbox.d.ts +10 -6
- package/dist/notifications/notification-inbox.js +26 -48
- package/dist/notifications/notification-inbox.js.map +1 -1
- package/dist/notifications/notification-parts.d.ts +3 -2
- package/dist/notifications/notification-parts.js +1 -3
- package/dist/notifications/notification-parts.js.map +1 -1
- package/dist/notifications/notification-types-setting.js +1 -1
- package/dist/notifications/notification-types-setting.js.map +1 -1
- package/dist/notifications/notifications-labels.d.ts +6 -0
- package/dist/notifications/notifications-labels.js +1 -0
- package/dist/notifications/notifications-labels.js.map +1 -1
- package/dist/notifications/push-device-setting.js +1 -1
- package/dist/notifications/push-device-setting.js.map +1 -1
- package/dist/notifications/push-devices-setting.d.ts +2 -1
- package/dist/notifications/push-devices-setting.js +27 -49
- package/dist/notifications/push-devices-setting.js.map +1 -1
- package/dist/notifications/quiet-hours-setting.d.ts +10 -3
- package/dist/notifications/quiet-hours-setting.js +65 -26
- package/dist/notifications/quiet-hours-setting.js.map +1 -1
- package/dist/notifications/unsubscribe-panel.js +4 -7
- package/dist/notifications/unsubscribe-panel.js.map +1 -1
- package/dist/notifications/use-push-device.d.ts +39 -1
- package/dist/notifications/use-push-device.js +28 -7
- package/dist/notifications/use-push-device.js.map +1 -1
- package/dist/offline/query-persistence.d.ts +3 -1
- package/dist/offline/query-persistence.js +19 -2
- package/dist/offline/query-persistence.js.map +1 -1
- package/dist/rhf/fields.d.ts +11 -4
- package/dist/rhf/fields.js.map +1 -1
- package/dist/search/command-palette.js +1 -1
- package/dist/search/command-palette.js.map +1 -1
- package/dist/search/global-search.js +19 -9
- package/dist/search/global-search.js.map +1 -1
- package/dist/search/search-index.d.ts +0 -6
- package/dist/search/search-index.js +0 -4
- package/dist/search/search-index.js.map +1 -1
- package/dist/search/use-command-key.d.ts +12 -1
- package/dist/search/use-command-key.js +3 -12
- package/dist/search/use-command-key.js.map +1 -1
- package/dist/search.d.ts +1 -1
- package/dist/search.js +6 -1
- package/dist/search.js.map +1 -1
- package/dist/settings/use-settings-focus.js +1 -0
- package/dist/settings/use-settings-focus.js.map +1 -1
- package/dist/shell/account-menu-language.d.ts +5 -3
- package/dist/shell/account-menu-language.js +2 -2
- package/dist/shell/account-menu-language.js.map +1 -1
- package/dist/shell/account-menu-text-size.d.ts +9 -6
- package/dist/shell/account-menu-text-size.js +2 -2
- package/dist/shell/account-menu-text-size.js.map +1 -1
- package/dist/shell/app-shell.d.ts +0 -10
- package/dist/shell/app-shell.js +1 -7
- package/dist/shell/app-shell.js.map +1 -1
- package/dist/shell/company-switcher.d.ts +1 -1
- package/dist/shell/company-switcher.js.map +1 -1
- package/dist/shell/dev-menu.d.ts +1 -1
- package/dist/shell/dev-menu.js +5 -18
- package/dist/shell/dev-menu.js.map +1 -1
- package/dist/shell/top-bar-actions.d.ts +1 -1
- package/dist/shell/top-bar-actions.js.map +1 -1
- package/dist/shell/top-bar-parts-labels.d.ts +1 -3
- package/dist/shell/top-bar-parts-labels.js +0 -1
- package/dist/shell/top-bar-parts-labels.js.map +1 -1
- package/dist/shell.d.ts +7 -10
- package/dist/shell.js +14 -23
- package/dist/shell.js.map +1 -1
- package/dist/sync/engine.d.ts +30 -4
- package/dist/sync/engine.js +172 -52
- package/dist/sync/engine.js.map +1 -1
- package/dist/sync.d.ts +2 -2
- package/dist/sync.js +2 -10
- package/dist/sync.js.map +1 -1
- package/dist/testing/css-variables.js +3 -8
- package/dist/testing/css-variables.js.map +1 -1
- package/dist/theme/chart-palette.d.ts +0 -5
- package/dist/theme/chart-palette.js +0 -2
- package/dist/theme/chart-palette.js.map +1 -1
- package/dist/theme/contrast.d.ts +2 -1
- package/dist/theme/contrast.js +3 -8
- package/dist/theme/contrast.js.map +1 -1
- package/dist/theme/palette-store.js +6 -6
- package/dist/theme/palette-store.js.map +1 -1
- package/dist/theme/text-size.js +3 -8
- package/dist/theme/text-size.js.map +1 -1
- package/dist/theme/theme-store.js +3 -6
- package/dist/theme/theme-store.js.map +1 -1
- package/dist/tour/tour-catalogue.d.ts +7 -4
- package/dist/tour/tour-catalogue.js +12 -10
- package/dist/tour/tour-catalogue.js.map +1 -1
- package/dist/tour/tour-dock.d.ts +0 -2
- package/dist/tour/tour-dock.js +0 -2
- package/dist/tour/tour-dock.js.map +1 -1
- package/dist/tour/tour-gates.d.ts +4 -0
- package/dist/tour/tour-gates.js +14 -0
- package/dist/tour/tour-gates.js.map +1 -1
- package/dist/tour/tour-overlay.d.ts +27 -0
- package/dist/tour/tour-overlay.js +741 -0
- package/dist/tour/tour-overlay.js.map +1 -0
- package/dist/tour/tour.d.ts +13 -3
- package/dist/tour/tour.js +59 -781
- package/dist/tour/tour.js.map +1 -1
- package/dist/tour/use-tour-progress.js +1 -1
- package/dist/tour/use-tour-progress.js.map +1 -1
- package/dist/wizard/stepper-nav.d.ts +5 -1
- package/dist/wizard/stepper-nav.js.map +1 -1
- package/dist/wizard/types.d.ts +6 -2
- package/dist/wizard/types.js.map +1 -1
- package/dist/wizard/use-wizard.d.ts +3 -1
- package/dist/wizard/use-wizard.js.map +1 -1
- package/dist/wizard/validation.d.ts +3 -1
- package/dist/wizard/validation.js.map +1 -1
- package/package.json +10 -6
- package/src/account/account-parts.ts +5 -25
- package/src/account/data-export-setting-labels.ts +1 -1
- package/src/account/delete-account-setting-labels.ts +1 -1
- package/src/account/email-change-setting-labels.ts +1 -1
- package/src/account/passkeys-setting.tsx +60 -38
- package/src/account/sessions-setting.tsx +18 -12
- package/src/admin/admin-action-confirm.tsx +1 -5
- package/src/admin/admin-parts.ts +11 -25
- package/src/admin/mail-test-card-labels.ts +1 -1
- package/src/admin/plan-change-labels.ts +5 -23
- package/src/admin/plan-change.tsx +7 -44
- package/src/admin/reviewer-scope-editor.tsx +3 -3
- package/src/auth/auth-errors-labels.ts +23 -0
- package/src/auth/auth-errors.ts +11 -38
- package/src/auth/complete-name-dialog.tsx +4 -1
- package/src/auth/forgot-password-form-labels.ts +1 -1
- package/src/auth/forgot-password-form.tsx +11 -6
- package/src/auth/register-form-labels.ts +1 -1
- package/src/auth/reset-password-form-labels.ts +1 -1
- package/src/auth/reset-password-form.tsx +8 -4
- package/src/auth/sign-in-form-labels.ts +1 -1
- package/src/auth/status-parts.tsx +0 -6
- package/src/auth/verify-email-labels.ts +1 -1
- package/src/auth/verify-email.tsx +11 -6
- package/src/billing/cancel-subscription.tsx +15 -12
- package/src/billing/plan-card.tsx +18 -10
- package/src/billing/plan-change-labels.ts +66 -0
- package/src/billing/plan-switch.tsx +15 -12
- package/src/chart.ts +73 -6
- package/src/components/account-chips.tsx +20 -23
- package/src/components/alert-banner.tsx +82 -5
- package/src/components/amount-input.tsx +18 -7
- package/src/components/autocomplete.tsx +64 -70
- package/src/components/bulk-action-bar.tsx +70 -2
- package/src/components/button-look.ts +5 -5
- package/src/components/button.tsx +2 -2
- package/src/components/chart-edge.ts +34 -1
- package/src/components/chart-figure.tsx +35 -0
- package/src/components/chart-zoom-core.tsx +6 -5
- package/src/components/chart.tsx +26 -5
- package/src/components/combobox-core.tsx +293 -62
- package/src/components/combobox.tsx +183 -153
- package/src/components/copy-button.tsx +34 -23
- package/src/components/country-select.tsx +16 -11
- package/src/components/data-table-column-settings.tsx +52 -10
- package/src/components/data-table-filters.ts +6 -4
- package/src/components/data-table-fit.ts +19 -5
- package/src/components/data-table-groups.tsx +1 -1
- package/src/components/data-table-head.tsx +32 -22
- package/src/components/data-table-mobile.tsx +61 -26
- package/src/components/data-table-pagination.tsx +21 -6
- package/src/components/data-table-resize.ts +1 -1
- package/src/components/data-table-row-actions.tsx +3 -3
- package/src/components/data-table-row.tsx +25 -14
- package/src/components/data-table-selection.ts +1 -1
- package/src/components/data-table-shared.tsx +33 -1
- package/src/components/data-table-sort.ts +57 -2
- package/src/components/data-table-virtual.ts +32 -8
- package/src/components/data-table.tsx +239 -68
- package/src/components/date-field.tsx +66 -9
- package/src/components/date-picker.tsx +125 -49
- package/src/components/date-range-picker.tsx +71 -36
- package/src/components/error-boundary.tsx +53 -39
- package/src/components/field-base-labels.ts +20 -0
- package/src/components/field-base.tsx +13 -7
- package/src/components/form-actions.tsx +20 -5
- package/src/components/hover-menu.tsx +18 -8
- package/src/components/icon-button.tsx +14 -9
- package/src/components/inline-confirm.tsx +116 -0
- package/src/components/inline-entity-combobox.tsx +197 -153
- package/src/components/input.tsx +1 -1
- package/src/components/jump-calendar.tsx +30 -146
- package/src/components/legal-page.tsx +10 -7
- package/src/components/legal.tsx +4 -2
- package/src/components/lightbox.tsx +21 -8
- package/src/components/list.tsx +10 -4
- package/src/components/measured-grid.tsx +8 -4
- package/src/components/mini-calendar.tsx +6 -5
- package/src/components/modal.tsx +6 -1
- package/src/components/month-grid.tsx +229 -0
- package/src/components/month-picker.tsx +192 -200
- package/src/components/multi-select.tsx +21 -9
- package/src/components/nav-pills.tsx +1 -1
- package/src/components/picker-sheet.tsx +12 -9
- package/src/components/pie-chart-labels.ts +8 -0
- package/src/components/pie-chart.tsx +22 -28
- package/src/components/popover.tsx +18 -1
- package/src/components/row-actions.tsx +2 -1
- package/src/components/series-chart-axes.ts +9 -4
- package/src/components/series-chart-labels.ts +7 -4
- package/src/components/series-chart.tsx +253 -87
- package/src/components/share-card.tsx +6 -6
- package/src/components/tabs-labels.ts +13 -0
- package/src/components/tabs.tsx +2 -2
- package/src/components/toggle-legend.tsx +16 -11
- package/src/components/translation-review-editor.tsx +6 -5
- package/src/components/translation-review.tsx +4 -3
- package/src/components/treemap-labels.ts +47 -0
- package/src/components/treemap-layout.ts +210 -0
- package/src/components/treemap.tsx +780 -138
- package/src/components/use-table-state.ts +12 -9
- package/src/data-table.ts +1 -4
- package/src/demo/demo-countdown.ts +3 -8
- package/src/eslint/role-utilities.ts +97 -19
- package/src/feedback/feedback-dialog.tsx +30 -19
- package/src/feedback/feedback-mutation.ts +20 -0
- package/src/feedback/feedback-page-link.ts +90 -0
- package/src/feedback/feedback-public-list.tsx +13 -7
- package/src/feedback/feedback-replies.tsx +13 -6
- package/src/feedback/feedback-row-detail-labels.ts +0 -3
- package/src/feedback/feedback-row-detail.tsx +70 -84
- package/src/feedback/feedback-status-undo.ts +28 -28
- package/src/feedback/feedback-submit-dialog.tsx +2 -2
- package/src/feedback/feedback-submit.tsx +21 -7
- package/src/feedback/feedback-swipe.tsx +1 -1
- package/src/feedback/feedback-table.tsx +86 -38
- package/src/feedback/feedback-thread-labels.ts +2 -2
- package/src/feedback/feedback-thread.tsx +18 -26
- package/src/feedback.ts +89 -6
- package/src/hooks/use-focus-trap.ts +8 -24
- package/src/hooks/use-hotkey.ts +24 -7
- package/src/hooks/use-long-press.ts +16 -2
- package/src/hooks/use-media-query.ts +20 -4
- package/src/hooks/use-mounted.ts +39 -0
- package/src/hooks/use-overlay-history.ts +32 -3
- package/src/i18n/defaults.ts +4 -9
- package/src/i18n/german.ts +8 -19
- package/src/i18n/kit-labels.tsx +9 -11
- package/src/i18n/locales/es.ts +8 -19
- package/src/i18n/locales/fr.ts +21 -30
- package/src/i18n/locales/hu.ts +10 -19
- package/src/i18n/locales/it.ts +8 -20
- package/src/i18n/locales/zh.ts +9 -19
- package/src/i18n/review.ts +12 -2
- package/src/i18n/shared-labels.ts +0 -1
- package/src/index.ts +57 -49
- package/src/landing/routing.tsx +14 -10
- package/src/lib/broadcast.ts +52 -0
- package/src/lib/date-format.ts +89 -13
- package/src/lib/day-format.ts +96 -0
- package/src/lib/describe-failure.ts +18 -0
- package/src/lib/direction.ts +39 -0
- package/src/lib/focus-left.ts +156 -0
- package/src/lib/format.ts +5 -17
- package/src/lib/http-status.ts +38 -0
- package/src/lib/intl-cache.ts +25 -0
- package/src/lib/iso-day.ts +13 -0
- package/src/lib/lazy-with-fallback.ts +82 -0
- package/src/lib/path-pattern.ts +55 -0
- package/src/lib/reduced-motion.ts +2 -1
- package/src/lib/round.ts +7 -2
- package/src/lib/safe-storage.ts +48 -6
- package/src/lib/session-refresh.ts +1 -1
- package/src/lib/share-format.ts +18 -0
- package/src/lib/text-case.ts +19 -0
- package/src/lib/text-match.ts +57 -2
- package/src/lib/thenable.ts +19 -0
- package/src/lib/translation-review.ts +13 -5
- package/src/notifications/device-zone-report.ts +1 -1
- package/src/notifications/notification-bell.tsx +7 -4
- package/src/notifications/notification-inbox.tsx +40 -58
- package/src/notifications/notification-parts.tsx +3 -4
- package/src/notifications/notification-types-setting.tsx +1 -1
- package/src/notifications/notifications-labels.ts +7 -0
- package/src/notifications/push-device-setting.tsx +1 -1
- package/src/notifications/push-devices-setting.tsx +30 -55
- package/src/notifications/quiet-hours-setting.tsx +93 -31
- package/src/notifications/unsubscribe-panel.tsx +4 -7
- package/src/notifications/use-push-device.ts +76 -10
- package/src/offline/query-persistence.ts +35 -3
- package/src/rhf/fields.tsx +11 -4
- package/src/search/command-palette.tsx +2 -4
- package/src/search/global-search.tsx +36 -15
- package/src/search/search-index.ts +0 -15
- package/src/search/use-command-key.ts +13 -12
- package/src/search.ts +10 -1
- package/src/settings/use-settings-focus.ts +3 -0
- package/src/shell/account-menu-language.tsx +6 -4
- package/src/shell/account-menu-text-size.tsx +10 -7
- package/src/shell/app-shell.tsx +0 -13
- package/src/shell/company-switcher.tsx +1 -1
- package/src/shell/dev-menu.tsx +8 -22
- package/src/shell/top-bar-actions.tsx +1 -1
- package/src/shell/top-bar-parts-labels.ts +1 -4
- package/src/shell.ts +21 -17
- package/src/sync/engine.ts +339 -61
- package/src/sync.ts +2 -8
- package/src/testing/css-variables.ts +8 -9
- package/src/theme/chart-palette.ts +0 -2
- package/src/theme/contrast.ts +8 -9
- package/src/theme/palette-store.ts +9 -9
- package/src/theme/text-size.ts +6 -8
- package/src/theme/theme-store.ts +7 -9
- package/src/tour/tour-catalogue.tsx +26 -15
- package/src/tour/tour-dock.ts +0 -2
- package/src/tour/tour-gates.ts +23 -0
- package/src/tour/tour-overlay.tsx +1170 -0
- package/src/tour/tour.tsx +108 -1202
- package/src/tour/use-tour-progress.ts +1 -1
- package/src/wizard/stepper-nav.tsx +3 -1
- package/src/wizard/types.ts +11 -2
- package/src/wizard/use-wizard.ts +2 -1
- package/src/wizard/validation.ts +8 -2
- package/tokens.css +6 -5
- package/dist/components/field-sync-labels.d.ts +0 -2
- package/dist/components/field-sync-labels.js +0 -12
- package/dist/components/field-sync-labels.js.map +0 -1
- package/dist/components/field-sync.d.ts +0 -164
- package/dist/components/field-sync.js +0 -269
- package/dist/components/field-sync.js.map +0 -1
- package/dist/components/section-nav.d.ts +0 -37
- package/dist/components/section-nav.js +0 -33
- package/dist/components/section-nav.js.map +0 -1
- package/dist/components/sign-chip-labels.d.ts +0 -2
- package/dist/components/sign-chip-labels.js +0 -11
- package/dist/components/sign-chip-labels.js.map +0 -1
- package/dist/components/sign-chip.d.ts +0 -68
- package/dist/components/sign-chip.js +0 -47
- package/dist/components/sign-chip.js.map +0 -1
- package/dist/components/ui-labels.js.map +0 -1
- package/dist/lib/isin.d.ts +0 -28
- package/dist/lib/isin.js +0 -36
- package/dist/lib/isin.js.map +0 -1
- package/dist/shell/dev-switchers.d.ts +0 -6
- package/dist/shell/dev-switchers.js +0 -12
- package/dist/shell/dev-switchers.js.map +0 -1
- package/dist/shell/role-switcher.d.ts +0 -21
- package/dist/shell/role-switcher.js +0 -31
- package/dist/shell/role-switcher.js.map +0 -1
- package/src/components/field-sync-labels.ts +0 -13
- package/src/components/field-sync.tsx +0 -482
- package/src/components/section-nav.tsx +0 -65
- package/src/components/sign-chip-labels.ts +0 -12
- package/src/components/sign-chip.tsx +0 -124
- package/src/components/ui-labels.ts +0 -24
- package/src/lib/isin.ts +0 -62
- package/src/shell/dev-switchers.tsx +0 -18
- package/src/shell/role-switcher.tsx +0 -46
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/feedback/feedback-submit.tsx"],"sourcesContent":["import { lazy, Suspense, useRef, useState } from \"react\";\nimport type { ReactNode } from \"react\";\nimport { toast } from \"../components/toast\";\n// Types only, gone from the built module: the dialog's modules load with the dialog.\nimport type { FeedbackSubmitter } from \"./feedback-context\";\nimport type { FeedbackMultipleSubmission } from \"./feedback-dialog\";\nimport { useFeedbackToastLabels } from \"./feedback-labels\";\nimport { FEEDBACK_PICKABLE_CATEGORIES, type FeedbackContext, type FeedbackEnvironment } from \"./feedback-record\";\nimport type { FeedbackCategory } from \"./feedback-vocabulary\";\n\n/**\n * The dialog, loaded when it is first opened rather than with the top bar that mounts the\n * hook (0.34, MOD-1 of the refactor audit 2026-10; see feedback-submit-dialog.tsx). A\n * LITERAL relative `import()`, as the catalogue loaders are (i18n/languages.ts): the\n * library build keeps the module its own (`bundle: false`), and a path an app's bundler\n * can read is a chunk it can split off.\n */\nconst LazySubmitDialog = lazy(() =>\n import(\"./feedback-submit-dialog\").then((module) => ({ default: module.FeedbackSubmitDialog })),\n);\n\n/**\n * `FeedbackCreate` — the body of `POST /feedback` (keksdose `schemas/feedback.py:25`, §3.4\n * of docs/feedback-harmonization.md), as {@link useFeedbackSubmit} hands it to the app's\n * `create`.\n */\nexport interface FeedbackCreatePayload {\n /** Trimmed; never blank (the dialog will not send a subject of spaces). */\n title: string;\n /** `\"\"` when the reporter wrote nothing or only whitespace — the server stores `\"\"`. */\n body: string;\n /** Never `CRASH` — the server answers that with a 422 (§3.4). */\n category: FeedbackCategory;\n /** §3.2, built by `feedbackContext` from what the context box showed. */\n context: FeedbackContext;\n /** The captured screenshot's upload URL, or `null`. */\n screenshot_url: string | null;\n /** The picked and pasted files' upload URLs, in the order they were added — `[]` when\n * none, as keksdose sends it. At most 5. */\n attachment_urls: string[];\n}\n\nexport interface UseFeedbackSubmitOptions<R = unknown> {\n /**\n * `POST /feedback/attachments` for ONE file → its URL (§3.3) — the app's authed client.\n * Every file goes up BEFORE the report is created, so a row never names a file that did\n * not arrive (keksdose `use-feedback-dialog.tsx:89`); if any upload rejects, nothing is\n * created and the failure toast says so.\n */\n upload: (file: File) => Promise<string>;\n /** `POST /feedback` with the payload. Whatever it resolves with reaches `onSubmitted`. */\n create: (payload: FeedbackCreatePayload) => Promise<R>;\n /** Who is filing — shown in the context box and sent in `context.user_*`. */\n user?: FeedbackSubmitter | null;\n /** `context.environment` — the app's own reading of which copy it is (keksdose\n * `deployEnvironment()`). */\n environment?: FeedbackEnvironment | (string & {});\n /** `context.version` — the app build (`__APP_VERSION__`). */\n version?: string;\n /** The report was filed: after the \"Thanks for the feedback!\" toast and the close. The\n * place to invalidate the app's feedback queries. */\n onSubmitted?: (result: R) => void;\n /**\n * The failure toast's text from what `upload` or `create` rejected with — the app's own\n * `extractApiErrorMessage(err, fallback)` (keksdose) / `apiErrorMessage` (Kurvenschmiede),\n * so the server's `detail` wins (§3.7: a 413, a 415, keksdose's demo-session 403). Without\n * it every failure says `feedbackToast.submitFailed`.\n */\n errorMessage?: (error: unknown, fallback: string) => string;\n /**\n * The \"Capture screenshot\" button's capture. Default {@link captureAppScreenshot} of\n * `#root`; another root is `() => captureAppScreenshot({ rootId: \"app\" })`. `false`\n * hides the button — for an app that does not install the optional peer\n * `modern-screenshot`. A rejection becomes the `captureFailed` toast.\n */\n capture?: false | (() => Promise<File | null>);\n /**\n * The app's reports are public (0.38, docs/feedback-harmonization.md §9.2 decision 6):\n * `true` shows **\"Other users will see the title and text (never your screenshots or\n * files)\"** (`feedbackDialog.publicNotice`) under the body. keksdose and Kurvenschmiede\n * pass it — for a viewer who passes the app's `public_viewer` — and kastlan, whose\n * public parts are off, does not. Default `false`.\n */\n publicNotice?: boolean;\n}\n\nexport interface FeedbackSubmit {\n /**\n * Open the dialog on `category` — a `FeedbackMenu` row's (§4.2: \"default category when\n * opened from a row: that row's\"). Without one, or with `CRASH` (never pickable), it\n * opens on `OTHER`, the server's own default (§3.4). Each open starts a fresh form,\n * reads `location.href` for the context box and ticks \"Attach current page URL\" again.\n */\n open: (category?: FeedbackCategory) => void;\n /** Close it, as Cancel does. */\n close: () => void;\n /**\n * The dialog — render it once, anywhere (it portals). `null` while closed. Since 0.34\n * its module loads when it is first opened (MOD-1), so it appears a moment after\n * `open`: a test finds it with `await screen.findBy…`, not `getBy…`.\n */\n dialog: ReactNode;\n}\n\n/**\n * The feedback submit dialog, wired (0.27.0, docs/feedback-harmonization.md §4.2): the\n * one call that replaces keksdose's `use-feedback-dialog.tsx`, kastlan's `FeedbackButton`\n * and Kurvenschmiede's `use-feedback-dialog.tsx`.\n *\n * ```tsx\n * const feedback = useFeedbackSubmit({\n * upload: (file) => feedbackApi.uploadAttachment(file),\n * create: (payload) => feedbackApi.create(payload),\n * user, environment: deployEnvironment(), version: __APP_VERSION__,\n * errorMessage: extractApiErrorMessage,\n * onSubmitted: () => qc.invalidateQueries({ queryKey: queryKeys.feedback.all }),\n * });\n * <FeedbackMenu onFile={feedback.open} isAdmin={user?.role === \"ADMIN\"} />\n * {feedback.dialog}\n * ```\n *\n * What it settles, so no app restates it:\n *\n * - `FeedbackDialog` in `attachments=\"multiple\"` with `requireBody={false}` (§7.4): a\n * subject alone is a report. One captured screenshot in its own slot plus up to 5\n * picked or pasted files, `FEEDBACK_ATTACHMENT_ACCEPT` (images, PDF, text), 10 MB each.\n * - The pickable categories — Bug, Idea, Question, Other, in the kit's words. `CRASH` is\n * filed by the error boundary and is never offered (keksdose feedback #160).\n * - The context box, built from the same values as the `context` it sends\n * ({@link FeedbackContextBox} / `feedbackContext`), the URL read when the dialog OPENS.\n * - Upload every file, then create (keksdose `use-feedback-dialog.tsx:89`): the\n * screenshot to `screenshot_url`, the rest to `attachment_urls`, all in parallel.\n * - The toasts, from `feedbackToast`: filed, failed (the server's `detail` through\n * `errorMessage`), a refused file's type, size or count, a failed capture.\n *\n * What stays the app's: the API client, the user, the environment and version, and what\n * to refresh afterwards. No TanStack in here — `create` is a plain promise, so the hook\n * runs in any app; the app's mutation, if it wants one, lives inside `create`.\n *\n * A failure keeps the dialog open with the draft, as keksdose's did. A dialog closed and\n * opened again while a send is still running is NOT closed by that send's success — the\n * new draft is somebody's next report.\n */\nexport function useFeedbackSubmit<R = unknown>(options: UseFeedbackSubmitOptions<R>): FeedbackSubmit {\n const { upload, create, user, environment, version, onSubmitted, errorMessage, capture, publicNotice } = options;\n const toastText = useFeedbackToastLabels();\n const [isOpen, setIsOpen] = useState(false);\n const [category, setCategory] = useState<FeedbackCategory>(\"OTHER\");\n const [url, setUrl] = useState(\"\");\n const [attachUrl, setAttachUrl] = useState(true);\n const [submitting, setSubmitting] = useState(false);\n // Which opening a send belongs to — see \"closed and opened again\" above.\n const opening = useRef(0);\n const inFlight = useRef(false);\n\n const open = (next?: FeedbackCategory) => {\n opening.current += 1;\n setCategory(next && FEEDBACK_PICKABLE_CATEGORIES.includes(next) ? next : \"OTHER\");\n setUrl(typeof window === \"undefined\" ? \"\" : window.location.href);\n // Fresh every time (Kurvenschmiede use-feedback-dialog.tsx:80): a reporter who left the\n // page out of one idea is not saying the bug report after it is unrelated too.\n setAttachUrl(true);\n setIsOpen(true);\n };\n const close = () => setIsOpen(false);\n\n // `context` comes from the dialog, built off the values its context box shows.\n const submit = async (data: FeedbackMultipleSubmission, context: FeedbackContext) => {\n if (inFlight.current) return;\n inFlight.current = true;\n setSubmitting(true);\n const from = opening.current;\n let result: R;\n try {\n const [screenshot_url, attachment_urls] = await Promise.all([\n data.screenshot ? upload(data.screenshot) : Promise.resolve(null),\n Promise.all(data.attachments.map((file) => upload(file))),\n ]);\n result = await create({\n title: data.title.trim(),\n body: data.body.trim() ? data.body : \"\",\n category: data.category as FeedbackCategory,\n context,\n screenshot_url,\n attachment_urls,\n });\n } catch (error) {\n toast.error(errorMessage ? errorMessage(error, toastText.submitFailed) : toastText.submitFailed);\n return;\n } finally {\n inFlight.current = false;\n setSubmitting(false);\n }\n toast.success(toastText.submitted);\n if (opening.current === from) setIsOpen(false);\n onSubmitted?.(result);\n };\n\n // Nothing is drawn while the dialog's module is on its way — a few milliseconds, once per\n // page load; a spinner would only flash. A load that fails (a deploy replaced the chunk)\n // throws a chunk-load error to the app's error boundary, as a lazy route's does.\n const dialog = isOpen ? (\n <Suspense fallback={null}>\n <LazySubmitDialog\n onClose={close}\n category={category}\n onCategoryChange={setCategory}\n submitting={submitting}\n onSubmit={submit}\n user={user}\n url={url}\n attachUrl={attachUrl}\n onAttachUrlChange={setAttachUrl}\n environment={environment}\n version={version}\n capture={capture}\n publicNotice={publicNotice}\n />\n </Suspense>\n ) : null;\n\n return { open, close, dialog };\n}\n"],"mappings":";AA2MM;AA3MN,SAAS,MAAM,UAAU,QAAQ,gBAAgB;AAEjD,SAAS,aAAa;AAItB,SAAS,8BAA8B;AACvC,SAAS,oCAAoF;AAU7F,MAAM,mB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AA,QACvB,MAAM,KAAK,KAAK,KAAK,IAAI,KAAK,OAAO;AAAA,QACrC,UAAU,KAAK;AAAA,QACf;AAAA,QACA;AAAA,QACA;AAAA,MACF,CAAC;AAAA,IACH,SAAS,OAAO;AACd,YAAM,MAAM,eAAe,aAAa,OAAO,UAAU,YAAY,IAAI,UAAU,YAAY;AAC/F;AAAA,IACF,UAAE;AACA,eAAS,UAAU;AACnB,oBAAc,KAAK;AAAA,IACrB;AACA,UAAM,QAAQ,UAAU,SAAS;AACjC,QAAI,QAAQ,YAAY,KAAM,WAAU,KAAK;AAC7C,kBAAc,MAAM;AAAA,EACtB;AAKA,QAAM,SAAS,SACb,oBAAC,YAAS,UAAU,MAClB;AAAA,IAAC;AAAA;AAAA,MACC,SAAS;AAAA,MACT;AAAA,MACA,kBAAkB;AAAA,MAClB;AAAA,MACA,UAAU;AAAA,MACV;AAAA,MACA;AAAA,MACA;AAAA,MACA,mBAAmB;AAAA,MACnB;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,EACF,GACF,IACE;AAEJ,SAAO,EAAE,MAAM,OAAO,OAAO;AAC/B;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/feedback/feedback-submit.tsx"],"sourcesContent":["import { Suspense, useLayoutEffect, useRef, useState } from \"react\";\nimport type { ReactNode } from \"react\";\nimport { toast } from \"../components/toast\";\nimport { lazyWithFallback } from \"../lib/lazy-with-fallback\";\n// Types only, gone from the built module: the dialog's modules load with the dialog.\nimport type { FeedbackSubmitter } from \"./feedback-context\";\nimport type { FeedbackSubmitDialogProps } from \"./feedback-submit-dialog\";\nimport type { FeedbackMultipleSubmission } from \"./feedback-dialog\";\nimport { useFeedbackToastLabels } from \"./feedback-labels\";\nimport { FEEDBACK_PICKABLE_CATEGORIES, type FeedbackContext, type FeedbackEnvironment } from \"./feedback-record\";\nimport type { FeedbackCategory } from \"./feedback-vocabulary\";\n\n/**\n * The dialog, loaded when it is first opened rather than with the top bar that mounts the\n * hook (0.34, MOD-1 of the refactor audit 2026-10; see feedback-submit-dialog.tsx). A\n * LITERAL relative `import()`, as the catalogue loaders are (i18n/languages.ts): the\n * library build keeps the module its own (`bundle: false`), and a path an app's bundler\n * can read is a chunk it can split off.\n *\n * A fetch that fails — a tab left open across a deploy, offline — closes the dialog\n * rather than throwing (0.52 code review, tour.tsx): the hook lives in the top bar, above\n * the routes' error boundaries, so the rejected import took the whole shell down. The\n * next open fetches again.\n */\nconst LazySubmitDialog = lazyWithFallback(\n () => import(\"./feedback-submit-dialog\").then((module) => module.FeedbackSubmitDialog),\n SubmitDialogUnavailable,\n);\n\nfunction SubmitDialogUnavailable({ onClose }: FeedbackSubmitDialogProps) {\n useLayoutEffect(onClose, [onClose]);\n return null;\n}\n\n/**\n * `FeedbackCreate` — the body of `POST /feedback` (keksdose `schemas/feedback.py:25`, §3.4\n * of docs/feedback-harmonization.md), as {@link useFeedbackSubmit} hands it to the app's\n * `create`.\n */\nexport interface FeedbackCreatePayload {\n /** Trimmed; never blank (the dialog will not send a subject of spaces). */\n title: string;\n /** `\"\"` when the reporter wrote nothing or only whitespace — the server stores `\"\"`. */\n body: string;\n /** Never `CRASH` — the server answers that with a 422 (§3.4). */\n category: FeedbackCategory;\n /** §3.2, built by `feedbackContext` from what the context box showed. */\n context: FeedbackContext;\n /** The captured screenshot's upload URL, or `null`. */\n screenshot_url: string | null;\n /** The picked and pasted files' upload URLs, in the order they were added — `[]` when\n * none, as keksdose sends it. At most 5. */\n attachment_urls: string[];\n}\n\nexport interface UseFeedbackSubmitOptions<R = unknown> {\n /**\n * `POST /feedback/attachments` for ONE file → its URL (§3.3) — the app's authed client.\n * Every file goes up BEFORE the report is created, so a row never names a file that did\n * not arrive (keksdose `use-feedback-dialog.tsx:89`); if any upload rejects, nothing is\n * created and the failure toast says so.\n */\n upload: (file: File) => Promise<string>;\n /** `POST /feedback` with the payload. Whatever it resolves with reaches `onSubmitted`. */\n create: (payload: FeedbackCreatePayload) => Promise<R>;\n /** Who is filing — shown in the context box and sent in `context.user_*`. */\n user?: FeedbackSubmitter | null;\n /** `context.environment` — the app's own reading of which copy it is (keksdose\n * `deployEnvironment()`). */\n environment?: FeedbackEnvironment | (string & {});\n /** `context.version` — the app build (`__APP_VERSION__`). */\n version?: string;\n /** The report was filed: after the \"Thanks for the feedback!\" toast and the close. The\n * place to invalidate the app's feedback queries. */\n onSubmitted?: (result: R) => void;\n /**\n * The failure toast's text from what `upload` or `create` rejected with — the app's own\n * `extractApiErrorMessage(err, fallback)` (keksdose) / `apiErrorMessage` (Kurvenschmiede),\n * so the server's `detail` wins (§3.7: a 413, a 415, keksdose's demo-session 403). Without\n * it every failure says `feedbackToast.submitFailed`.\n */\n errorMessage?: (error: unknown, fallback: string) => string;\n /**\n * The \"Capture screenshot\" button's capture. Default {@link captureAppScreenshot} of\n * `#root`; another root is `() => captureAppScreenshot({ rootId: \"app\" })`. `false`\n * hides the button — for an app that does not install the optional peer\n * `modern-screenshot`. A rejection becomes the `captureFailed` toast.\n */\n capture?: false | (() => Promise<File | null>);\n /**\n * The app's reports are public (0.38, docs/feedback-harmonization.md §9.2 decision 6):\n * `true` shows **\"Other users will see the title and text (never your screenshots or\n * files)\"** (`feedbackDialog.publicNotice`) under the body. keksdose and Kurvenschmiede\n * pass it — for a viewer who passes the app's `public_viewer` — and kastlan, whose\n * public parts are off, does not. Default `false`.\n */\n publicNotice?: boolean;\n}\n\nexport interface FeedbackSubmit {\n /**\n * Open the dialog on `category` — a `FeedbackMenu` row's (§4.2: \"default category when\n * opened from a row: that row's\"). Without one, or with `CRASH` (never pickable), it\n * opens on `OTHER`, the server's own default (§3.4). Each open starts a fresh form,\n * reads `location.href` for the context box and ticks \"Attach current page URL\" again.\n */\n open: (category?: FeedbackCategory) => void;\n /** Close it, as Cancel does. */\n close: () => void;\n /**\n * The dialog — render it once, anywhere (it portals). `null` while closed. Since 0.34\n * its module loads when it is first opened (MOD-1), so it appears a moment after\n * `open`: a test finds it with `await screen.findBy…`, not `getBy…`.\n */\n dialog: ReactNode;\n}\n\n/**\n * The feedback submit dialog, wired (0.27.0, docs/feedback-harmonization.md §4.2): the\n * one call that replaces keksdose's `use-feedback-dialog.tsx`, kastlan's `FeedbackButton`\n * and Kurvenschmiede's `use-feedback-dialog.tsx`.\n *\n * ```tsx\n * const feedback = useFeedbackSubmit({\n * upload: (file) => feedbackApi.uploadAttachment(file),\n * create: (payload) => feedbackApi.create(payload),\n * user, environment: deployEnvironment(), version: __APP_VERSION__,\n * errorMessage: extractApiErrorMessage,\n * onSubmitted: () => qc.invalidateQueries({ queryKey: queryKeys.feedback.all }),\n * });\n * <FeedbackMenu onFile={feedback.open} isAdmin={user?.role === \"ADMIN\"} />\n * {feedback.dialog}\n * ```\n *\n * What it settles, so no app restates it:\n *\n * - `FeedbackDialog` in `attachments=\"multiple\"` with `requireBody={false}` (§7.4): a\n * subject alone is a report. One captured screenshot in its own slot plus up to 5\n * picked or pasted files, `FEEDBACK_ATTACHMENT_ACCEPT` (images, PDF, text), 10 MB each.\n * - The pickable categories — Bug, Idea, Question, Other, in the kit's words. `CRASH` is\n * filed by the error boundary and is never offered (keksdose feedback #160).\n * - The context box, built from the same values as the `context` it sends\n * ({@link FeedbackContextBox} / `feedbackContext`), the URL read when the dialog OPENS.\n * - Upload every file, then create (keksdose `use-feedback-dialog.tsx:89`): the\n * screenshot to `screenshot_url`, the rest to `attachment_urls`, all in parallel.\n * - The toasts, from `feedbackToast`: filed, failed (the server's `detail` through\n * `errorMessage`), a refused file's type, size or count, a failed capture.\n *\n * What stays the app's: the API client, the user, the environment and version, and what\n * to refresh afterwards. No TanStack in here — `create` is a plain promise, so the hook\n * runs in any app; the app's mutation, if it wants one, lives inside `create`.\n *\n * A failure keeps the dialog open with the draft, as keksdose's did. A dialog closed and\n * opened again while a send is still running is NOT closed by that send's success — the\n * new draft is somebody's next report.\n */\nexport function useFeedbackSubmit<R = unknown>(options: UseFeedbackSubmitOptions<R>): FeedbackSubmit {\n const { upload, create, user, environment, version, onSubmitted, errorMessage, capture, publicNotice } = options;\n const toastText = useFeedbackToastLabels();\n const [isOpen, setIsOpen] = useState(false);\n const [category, setCategory] = useState<FeedbackCategory>(\"OTHER\");\n const [url, setUrl] = useState(\"\");\n const [attachUrl, setAttachUrl] = useState(true);\n const [submitting, setSubmitting] = useState(false);\n // Which opening a send belongs to — see \"closed and opened again\" above.\n const opening = useRef(0);\n const inFlight = useRef(false);\n\n const open = (next?: FeedbackCategory) => {\n opening.current += 1;\n setCategory(next && FEEDBACK_PICKABLE_CATEGORIES.includes(next) ? next : \"OTHER\");\n setUrl(typeof window === \"undefined\" ? \"\" : window.location.href);\n // Fresh every time (Kurvenschmiede use-feedback-dialog.tsx:80): a reporter who left the\n // page out of one idea is not saying the bug report after it is unrelated too.\n setAttachUrl(true);\n setIsOpen(true);\n };\n const close = () => setIsOpen(false);\n\n // `context` comes from the dialog, built off the values its context box shows.\n const submit = async (data: FeedbackMultipleSubmission<FeedbackCategory>, context: FeedbackContext) => {\n if (inFlight.current) return;\n inFlight.current = true;\n setSubmitting(true);\n const from = opening.current;\n let result: R;\n try {\n const [screenshot_url, attachment_urls] = await Promise.all([\n data.screenshot ? upload(data.screenshot) : Promise.resolve(null),\n Promise.all(data.attachments.map((file) => upload(file))),\n ]);\n result = await create({\n title: data.title.trim(),\n body: data.body.trim() ? data.body : \"\",\n category: data.category,\n context,\n screenshot_url,\n attachment_urls,\n });\n } catch (error) {\n toast.error(errorMessage ? errorMessage(error, toastText.submitFailed) : toastText.submitFailed);\n return;\n } finally {\n inFlight.current = false;\n setSubmitting(false);\n }\n toast.success(toastText.submitted);\n if (opening.current === from) setIsOpen(false);\n onSubmitted?.(result);\n };\n\n // Nothing is drawn while the dialog's module is on its way — a few milliseconds, once per\n // page load; a spinner would only flash. A load that fails (a deploy replaced the chunk,\n // offline) closes the dialog (`SubmitDialogUnavailable`): the hook sits in the top bar,\n // above the routes' error boundaries, where a thrown chunk error took the shell down.\n const dialog = isOpen ? (\n <Suspense fallback={null}>\n <LazySubmitDialog\n onClose={close}\n category={category}\n onCategoryChange={setCategory}\n submitting={submitting}\n onSubmit={submit}\n user={user}\n url={url}\n attachUrl={attachUrl}\n onAttachUrlChange={setAttachUrl}\n environment={environment}\n version={version}\n capture={capture}\n publicNotice={publicNotice}\n />\n </Suspense>\n ) : null;\n\n return { open, close, dialog };\n}\n"],"mappings":";AAyNM;AAzNN,SAAS,UAAU,iBAAiB,QAAQ,gBAAgB;AAE5D,SAAS,aAAa;AACtB,SAAS,wBAAwB;AAKjC,SAAS,8BAA8B;AACvC,SAAS,oCAAoF;AAe7F,MAAM,mBAAmB;AAAA,EACvB,MAAM,OAAO,0BAA0B,EAAE,KAAK,CAAC,WAAW,OAAO,oBAAoB;AAAA,EACrF;AACF;AAEA,SAAS,wBAAwB,EAAE,QAAQ,GAA8B;AACvE,kBAAgB,SAAS,CAAC,OAAO,CAAC;AAClC,SAAO;AACT;AA4HO,SAAS,kBAA+B,SAAsD;AACnG,QAAM,EAAE,QAAQ,QAAQ,MAAM,aAAa,SAAS,aAAa,cAAc,SAAS,aAAa,IAAI;AACzG,QAAM,YAAY,uBAAuB;AACzC,QAAM,CAAC,QAAQ,SAAS,IAAI,SAAS,KAAK;AAC1C,QAAM,CAAC,UAAU,WAAW,IAAI,SAA2B,OAAO;AAClE,QAAM,CAAC,KAAK,MAAM,IAAI,SAAS,EAAE;AACjC,QAAM,CAAC,WAAW,YAAY,IAAI,SAAS,IAAI;AAC/C,QAAM,CAAC,YAAY,aAAa,IAAI,SAAS,KAAK;AAElD,QAAM,UAAU,OAAO,CAAC;AACxB,QAAM,WAAW,OAAO,KAAK;AAE7B,QAAM,OAAO,CAAC,SAA4B;AACxC,YAAQ,WAAW;AACnB,gBAAY,QAAQ,6BAA6B,SAAS,IAAI,IAAI,OAAO,OAAO;AAChF,WAAO,OAAO,WAAW,cAAc,KAAK,OAAO,SAAS,IAAI;AAGhE,iBAAa,IAAI;AACjB,cAAU,IAAI;AAAA,EAChB;AAC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
56
|
* for it, or `null` when the row offers no swipe at all:
|
|
57
57
|
*
|
|
58
58
|
* ```tsx
|
|
59
|
-
* const changeStatus = useFeedbackStatusUndo(update.
|
|
59
|
+
* const changeStatus = useFeedbackStatusUndo(update.mutateAsync);
|
|
60
60
|
* const statusLabels = useFeedbackStatusLabels();
|
|
61
61
|
* <DataTable
|
|
62
62
|
* mobileSwipeActions={isAdmin && !mine
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/feedback/feedback-swipe.tsx"],"sourcesContent":["import { Ban, Check, ChevronsRight } from \"lucide-react\";\nimport type { SwipeAction } from \"../components/swipeable-row\";\nimport type { MobileSwipeActions } from \"../components/data-table\";\nimport { nextFeedbackStatus, visibleFeedbackStatuses, type FeedbackStatus } from \"./feedback-vocabulary\";\nimport type { FeedbackStatusLabels } from \"./feedback-labels\";\nimport type { FeedbackStatusChange, FeedbackStatusRow } from \"./feedback-status-undo\";\n\n/**\n * Swipes on the admin inbox's phone cards — §4.5 of the feedback contract, keksdose's\n * (`feedback-page.tsx:990`, feedback #144 rework item 4: *\"it is a queue, and triaging it\n * one tap-into-the-row at a time is the slow way\"*), for every app.\n *\n * - `advance` — one step along the chain (`nextFeedbackStatus`: OPEN → READY → IN_PROGRESS →\n * IN_EVALUATION → DONE), labelled with the status it goes to;\n * - `done` — straight to DONE, for a row that plainly needs no stop on the way;\n * - `wont_do` — dismiss as WONT_DO.\n *\n * The same transitions the status column offers, so nothing is reachable by gesture that\n * is not reachable by tap. keksdose lets the user rebind them (Settings → Interaction,\n * feedback #404) and keeps that storage; kastlan and Kurvenschmiede take the default.\n */\nexport const FEEDBACK_SWIPE_ACTIONS = [\"advance\", \"done\", \"wont_do\"] as const;\n\n/** One of {@link FEEDBACK_SWIPE_ACTIONS}. */\nexport type FeedbackSwipeAction = (typeof FEEDBACK_SWIPE_ACTIONS)[number];\n\n/**\n * Which swipe does what — the same shape as 0.26's `TranslationReviewSwipeBinding`: per\n * LOGICAL side an ordered ladder, index 0 at the first threshold, index 1 at the longer\n * drag. `end` is a drag toward the reading end (right in a left-to-right page), `start`\n * the other way. keksdose stores PHYSICAL `right` / `left` ladders and hands\n * `{ end: right, start: left }`, as its translations page does\n * (`translations-page.tsx:280`).\n *\n * The ids are typed loosely on purpose: a stored binding carries keksdose's `\"none\"`\n * fillers and may carry an id from another version or another surface — they are\n * dropped (see {@link feedbackSwipePlan}), so it is passed in without a cast.\n */\nexport interface FeedbackSwipeBinding {\n /** A drag toward the reading START, nearest threshold first. */\n start?: readonly (FeedbackSwipeAction | (string & {}))[];\n /** A drag toward the reading END, nearest threshold first. */\n end?: readonly (FeedbackSwipeAction | (string & {}))[];\n}\n\n/** keksdose's shipped binding (`swipe-prefs-store.ts:99`): toward the end advance, then\n * done on the longer drag; toward the start won't do. A settings page's reset goes here. */\nexport const DEFAULT_FEEDBACK_SWIPE: FeedbackSwipeBinding = Object.freeze({\n start: Object.freeze([\"wont_do\"] as const),\n end: Object.freeze([\"advance\", \"done\"] as const),\n});\n\nexport interface FeedbackSwipeOptions {\n /** What a swipe commits through: the undoable change from `useFeedbackStatusUndo`, the\n * same one the status cell and the detail's pills use — so a swipe gets the same 8 s\n * \"Set to …\" toast with Undo as a tap (§4.5, §7.10, Marcel 2026-10-04; keksdose's\n * `changeStatusUndoably` on its swipes too). A swipe is the easiest status change to\n * make by accident. The plan calls it and nothing else, so the page owns the PATCH. */\n change: FeedbackStatusChange;\n /** The status names the panels show — `useFeedbackStatusLabels()`. The `done` panel\n * reads DONE's, `wont_do` WONT_DO's, `advance` the next status's. */\n labels: FeedbackStatusLabels;\n}\n\n/** Where an action takes a row, or null when it would do nothing from there. */\nfunction targetOf(id: string, status: FeedbackStatus): FeedbackStatus | null {\n switch (id) {\n case \"advance\":\n // Null at the chain's end (DONE) and off it (NEEDS_LIVE_TEST, POSTPONED, WONT_DO):\n // \"advance\" has no meaning there, and a threshold that commits nothing is a trap.\n return nextFeedbackStatus(status);\n case \"done\":\n return status === \"DONE\" ? null : \"DONE\";\n case \"wont_do\":\n return status === \"WONT_DO\" ? null : \"WONT_DO\";\n default:\n // \"none\", or an id this version does not know: an empty slot.\n return null;\n }\n}\n\n/** One action's panel, by tone (0.33): SwipeableRow paints the tone's soft wash idle,\n * and its fill under that fill's own foreground once armed — the same pairs in light\n * and dark, where the fills turn pastel. */\nfunction panel(\n id: FeedbackSwipeAction,\n target: FeedbackStatus,\n row: FeedbackStatusRow,\n { change, labels }: FeedbackSwipeOptions,\n): SwipeAction {\n const onCommit = () => change(row, target);\n // `id`: the binding's own (0.46, dev#598) — DataTable's desktop column tells the\n // actions apart by it, and `feedbackSwipeOmitShown` reads the target from it.\n switch (id) {\n case \"advance\":\n return {\n id,\n onCommit,\n label: labels[target],\n icon: <ChevronsRight className=\"size-4\" aria-hidden />,\n tone: \"info\",\n };\n case \"done\":\n return {\n id,\n onCommit,\n label: labels.DONE,\n icon: <Check className=\"size-4\" aria-hidden />,\n tone: \"success\",\n };\n case \"wont_do\":\n return {\n id,\n onCommit,\n label: labels.WONT_DO,\n icon: <Ban className=\"size-4\" aria-hidden />,\n tone: \"danger\",\n };\n }\n}\n\n/**\n * The binding resolved against one row — what DataTable's `mobileSwipeActions` returns\n * for it, or `null` when the row offers no swipe at all:\n *\n * ```tsx\n * const changeStatus = useFeedbackStatusUndo(update.mutate);\n * const statusLabels = useFeedbackStatusLabels();\n * <DataTable\n * mobileSwipeActions={isAdmin && !mine\n * ? (row) => feedbackSwipePlan(DEFAULT_FEEDBACK_SWIPE, row, { change: changeStatus, labels: statusLabels })\n * : undefined}\n * />\n * ```\n *\n * Modelled on 0.26's `translationReviewSwipePlan` (keksdose's `resolveSwipePlan`): an\n * action the row cannot take DROPS OUT and the ladder closes up behind it, so the second\n * stage becomes the first instead of the side going dead behind an unreachable stage:\n *\n * - `advance` on DONE and off the chain (NEEDS_LIVE_TEST, POSTPONED, WONT_DO);\n * - `done` on DONE, `wont_do` on WONT_DO;\n * - `\"none\"` and any id this version does not know;\n * - a later stage that lands where an earlier one on the same side already does — the id\n * named twice, or `done` behind `advance` on IN_EVALUATION (both go to DONE): a longer\n * drag to the same effect would arm a threshold that adds nothing.\n *\n * Only what the ROW decides. Whether the page may write at all — the admin inbox, not\n * `/my-feedback`; no write lock — is the caller's, by passing no `mobileSwipeActions`.\n */\nexport function feedbackSwipePlan(\n binding: FeedbackSwipeBinding,\n row: FeedbackStatusRow,\n options: FeedbackSwipeOptions,\n): MobileSwipeActions | null {\n const side = (ids: FeedbackSwipeBinding[\"start\"]): SwipeAction[] => {\n const reached = new Set<FeedbackStatus>();\n const out: SwipeAction[] = [];\n for (const id of ids ?? []) {\n const target = targetOf(id, row.status);\n if (target === null || reached.has(target)) continue;\n reached.add(target);\n out.push(panel(id as FeedbackSwipeAction, target, row, options));\n }\n return out;\n };\n const start = side(binding.start);\n const end = side(binding.end);\n if (start.length === 0 && end.length === 0) return null;\n return { start, end };\n}\n\n/**\n * For DataTable's `desktopSwipeActions.omit` beside the kit's status cell (0.46, keksdose\n * dev#598 item 3): `true` for a planned action whose target status the cell already\n * offers as its own icon — {@link visibleFeedbackStatuses}, the next and the previous step\n * and the off-chain verdicts — so the desktop column adds only what the cell lacks (\"Done\"\n * where DONE is more than one step away). Read from the action's `id` and the row, never\n * from the translated label; an action without one of {@link FEEDBACK_SWIPE_ACTIONS} as its\n * id (an app's own) is kept.\n *\n * ```tsx\n * <DataTable\n * mobileSwipeActions={(row) => feedbackSwipePlan(binding, row, options)}\n * desktopSwipeActions={{ omit: feedbackSwipeOmitShown, name: (row) => row.title }}\n * />\n * ```\n */\nexport function feedbackSwipeOmitShown(action: SwipeAction, row: FeedbackStatusRow): boolean {\n if (action.id === undefined) return false;\n const target = targetOf(action.id, row.status);\n return target !== null && visibleFeedbackStatuses(row.status).includes(target);\n}\n"],"mappings":";AAmGc;AAnGd,SAAS,KAAK,OAAO,qBAAqB;AAG1C,SAAS,oBAAoB,+BAAoD;AAkB1E,MAAM,yBAAyB,CAAC,WAAW,QAAQ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AQ,IAAI,MAAM,EAAG;AAC5C,cAAQ,IAAI,MAAM;AAClB,UAAI,KAAK,MAAM,IAA2B,QAAQ,KAAK,OAAO,CAAC;AAAA,IACjE;AACA,WAAO;AAAA,EACT;AACA,QAAM,QAAQ,KAAK,QAAQ,KAAK;AAChC,QAAM,MAAM,KAAK,QAAQ,GAAG;AAC5B,MAAI,MAAM,WAAW,KAAK,IAAI,WAAW,EAAG,QAAO;AACnD,SAAO,EAAE,OAAO,IAAI;AACtB;AAkBO,SAAS,uBAAuB,QAAqB,KAAiC;AAC3F,MAAI,OAAO,OAAO,OAAW,QAAO;AACpC,QAAM,SAAS,SAAS,OAAO,IAAI,IAAI,MAAM;AAC7C,SAAO,WAAW,QAAQ,wBAAwB,IAAI,MAAM,EAAE,SAAS,MAAM;AAC/E;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/feedback/feedback-swipe.tsx"],"sourcesContent":["import { Ban, Check, ChevronsRight } from \"lucide-react\";\nimport type { SwipeAction } from \"../components/swipeable-row\";\nimport type { MobileSwipeActions } from \"../components/data-table\";\nimport { nextFeedbackStatus, visibleFeedbackStatuses, type FeedbackStatus } from \"./feedback-vocabulary\";\nimport type { FeedbackStatusLabels } from \"./feedback-labels\";\nimport type { FeedbackStatusChange, FeedbackStatusRow } from \"./feedback-status-undo\";\n\n/**\n * Swipes on the admin inbox's phone cards — §4.5 of the feedback contract, keksdose's\n * (`feedback-page.tsx:990`, feedback #144 rework item 4: *\"it is a queue, and triaging it\n * one tap-into-the-row at a time is the slow way\"*), for every app.\n *\n * - `advance` — one step along the chain (`nextFeedbackStatus`: OPEN → READY → IN_PROGRESS →\n * IN_EVALUATION → DONE), labelled with the status it goes to;\n * - `done` — straight to DONE, for a row that plainly needs no stop on the way;\n * - `wont_do` — dismiss as WONT_DO.\n *\n * The same transitions the status column offers, so nothing is reachable by gesture that\n * is not reachable by tap. keksdose lets the user rebind them (Settings → Interaction,\n * feedback #404) and keeps that storage; kastlan and Kurvenschmiede take the default.\n */\nexport const FEEDBACK_SWIPE_ACTIONS = [\"advance\", \"done\", \"wont_do\"] as const;\n\n/** One of {@link FEEDBACK_SWIPE_ACTIONS}. */\nexport type FeedbackSwipeAction = (typeof FEEDBACK_SWIPE_ACTIONS)[number];\n\n/**\n * Which swipe does what — the same shape as 0.26's `TranslationReviewSwipeBinding`: per\n * LOGICAL side an ordered ladder, index 0 at the first threshold, index 1 at the longer\n * drag. `end` is a drag toward the reading end (right in a left-to-right page), `start`\n * the other way. keksdose stores PHYSICAL `right` / `left` ladders and hands\n * `{ end: right, start: left }`, as its translations page does\n * (`translations-page.tsx:280`).\n *\n * The ids are typed loosely on purpose: a stored binding carries keksdose's `\"none\"`\n * fillers and may carry an id from another version or another surface — they are\n * dropped (see {@link feedbackSwipePlan}), so it is passed in without a cast.\n */\nexport interface FeedbackSwipeBinding {\n /** A drag toward the reading START, nearest threshold first. */\n start?: readonly (FeedbackSwipeAction | (string & {}))[];\n /** A drag toward the reading END, nearest threshold first. */\n end?: readonly (FeedbackSwipeAction | (string & {}))[];\n}\n\n/** keksdose's shipped binding (`swipe-prefs-store.ts:99`): toward the end advance, then\n * done on the longer drag; toward the start won't do. A settings page's reset goes here. */\nexport const DEFAULT_FEEDBACK_SWIPE: FeedbackSwipeBinding = Object.freeze({\n start: Object.freeze([\"wont_do\"] as const),\n end: Object.freeze([\"advance\", \"done\"] as const),\n});\n\nexport interface FeedbackSwipeOptions {\n /** What a swipe commits through: the undoable change from `useFeedbackStatusUndo`, the\n * same one the status cell and the detail's pills use — so a swipe gets the same 8 s\n * \"Set to …\" toast with Undo as a tap (§4.5, §7.10, Marcel 2026-10-04; keksdose's\n * `changeStatusUndoably` on its swipes too). A swipe is the easiest status change to\n * make by accident. The plan calls it and nothing else, so the page owns the PATCH. */\n change: FeedbackStatusChange;\n /** The status names the panels show — `useFeedbackStatusLabels()`. The `done` panel\n * reads DONE's, `wont_do` WONT_DO's, `advance` the next status's. */\n labels: FeedbackStatusLabels;\n}\n\n/** Where an action takes a row, or null when it would do nothing from there. */\nfunction targetOf(id: string, status: FeedbackStatus): FeedbackStatus | null {\n switch (id) {\n case \"advance\":\n // Null at the chain's end (DONE) and off it (NEEDS_LIVE_TEST, POSTPONED, WONT_DO):\n // \"advance\" has no meaning there, and a threshold that commits nothing is a trap.\n return nextFeedbackStatus(status);\n case \"done\":\n return status === \"DONE\" ? null : \"DONE\";\n case \"wont_do\":\n return status === \"WONT_DO\" ? null : \"WONT_DO\";\n default:\n // \"none\", or an id this version does not know: an empty slot.\n return null;\n }\n}\n\n/** One action's panel, by tone (0.33): SwipeableRow paints the tone's soft wash idle,\n * and its fill under that fill's own foreground once armed — the same pairs in light\n * and dark, where the fills turn pastel. */\nfunction panel(\n id: FeedbackSwipeAction,\n target: FeedbackStatus,\n row: FeedbackStatusRow,\n { change, labels }: FeedbackSwipeOptions,\n): SwipeAction {\n const onCommit = () => change(row, target);\n // `id`: the binding's own (0.46, dev#598) — DataTable's desktop column tells the\n // actions apart by it, and `feedbackSwipeOmitShown` reads the target from it.\n switch (id) {\n case \"advance\":\n return {\n id,\n onCommit,\n label: labels[target],\n icon: <ChevronsRight className=\"size-4\" aria-hidden />,\n tone: \"info\",\n };\n case \"done\":\n return {\n id,\n onCommit,\n label: labels.DONE,\n icon: <Check className=\"size-4\" aria-hidden />,\n tone: \"success\",\n };\n case \"wont_do\":\n return {\n id,\n onCommit,\n label: labels.WONT_DO,\n icon: <Ban className=\"size-4\" aria-hidden />,\n tone: \"danger\",\n };\n }\n}\n\n/**\n * The binding resolved against one row — what DataTable's `mobileSwipeActions` returns\n * for it, or `null` when the row offers no swipe at all:\n *\n * ```tsx\n * const changeStatus = useFeedbackStatusUndo(update.mutateAsync);\n * const statusLabels = useFeedbackStatusLabels();\n * <DataTable\n * mobileSwipeActions={isAdmin && !mine\n * ? (row) => feedbackSwipePlan(DEFAULT_FEEDBACK_SWIPE, row, { change: changeStatus, labels: statusLabels })\n * : undefined}\n * />\n * ```\n *\n * Modelled on 0.26's `translationReviewSwipePlan` (keksdose's `resolveSwipePlan`): an\n * action the row cannot take DROPS OUT and the ladder closes up behind it, so the second\n * stage becomes the first instead of the side going dead behind an unreachable stage:\n *\n * - `advance` on DONE and off the chain (NEEDS_LIVE_TEST, POSTPONED, WONT_DO);\n * - `done` on DONE, `wont_do` on WONT_DO;\n * - `\"none\"` and any id this version does not know;\n * - a later stage that lands where an earlier one on the same side already does — the id\n * named twice, or `done` behind `advance` on IN_EVALUATION (both go to DONE): a longer\n * drag to the same effect would arm a threshold that adds nothing.\n *\n * Only what the ROW decides. Whether the page may write at all — the admin inbox, not\n * `/my-feedback`; no write lock — is the caller's, by passing no `mobileSwipeActions`.\n */\nexport function feedbackSwipePlan(\n binding: FeedbackSwipeBinding,\n row: FeedbackStatusRow,\n options: FeedbackSwipeOptions,\n): MobileSwipeActions | null {\n const side = (ids: FeedbackSwipeBinding[\"start\"]): SwipeAction[] => {\n const reached = new Set<FeedbackStatus>();\n const out: SwipeAction[] = [];\n for (const id of ids ?? []) {\n const target = targetOf(id, row.status);\n if (target === null || reached.has(target)) continue;\n reached.add(target);\n out.push(panel(id as FeedbackSwipeAction, target, row, options));\n }\n return out;\n };\n const start = side(binding.start);\n const end = side(binding.end);\n if (start.length === 0 && end.length === 0) return null;\n return { start, end };\n}\n\n/**\n * For DataTable's `desktopSwipeActions.omit` beside the kit's status cell (0.46, keksdose\n * dev#598 item 3): `true` for a planned action whose target status the cell already\n * offers as its own icon — {@link visibleFeedbackStatuses}, the next and the previous step\n * and the off-chain verdicts — so the desktop column adds only what the cell lacks (\"Done\"\n * where DONE is more than one step away). Read from the action's `id` and the row, never\n * from the translated label; an action without one of {@link FEEDBACK_SWIPE_ACTIONS} as its\n * id (an app's own) is kept.\n *\n * ```tsx\n * <DataTable\n * mobileSwipeActions={(row) => feedbackSwipePlan(binding, row, options)}\n * desktopSwipeActions={{ omit: feedbackSwipeOmitShown, name: (row) => row.title }}\n * />\n * ```\n */\nexport function feedbackSwipeOmitShown(action: SwipeAction, row: FeedbackStatusRow): boolean {\n if (action.id === undefined) return false;\n const target = targetOf(action.id, row.status);\n return target !== null && visibleFeedbackStatuses(row.status).includes(target);\n}\n"],"mappings":";AAmGc;AAnGd,SAAS,KAAK,OAAO,qBAAqB;AAG1C,SAAS,oBAAoB,+BAAoD;AAkB1E,MAAM,yBAAyB,CAAC,WAAW,QAAQ,SAAS;AA0B5D,MAAM,yBAA+C,OAAO,OAAO;AAAA,EACxE,OAAO,OAAO,OAAO,CAAC,SAAS,CAAU;AAAA,EACzC,KAAK,OAAO,OAAO,CAAC,WAAW,MAAM,CAAU;AACjD,CAAC;AAeD,SAAS,SAAS,IAAY,QAA+C;AAC3E,UAAQ,IAAI;AAAA,IACV,KAAK;AAGH,aAAO,mBAAmB,MAAM;AAAA,IAClC,KAAK;AACH,aAAO,WAAW,SAAS,OAAO;AAAA,IACpC,KAAK;AACH,aAAO,WAAW,YAAY,OAAO;AAAA,IACvC;AAEE,aAAO;AAAA,EACX;AACF;AAKA,SAAS,MACP,IACA,QACA,KACA,EAAE,QAAQ,OAAO,GACJ;AACb,QAAM,WAAW,MAAM,OAAO,KAAK,MAAM;AAGzC,UAAQ,IAAI;AAAA,IACV,KAAK;AACH,aAAO;AAAA,QACL;AAAA,QACA;AAAA,QACA,OAAO,OAAO,MAAM;AAAA,QACpB,MAAM,oBAAC,iBAAc,WAAU,UAAS,eAAW,MAAC;AAAA,QACpD,MAAM;AAAA,MACR;AAAA,IACF,KAAK;AACH,aAAO;AAAA,QACL;AAAA,QACA;AAAA,QACA,OAAO,OAAO;AAAA,QACd,MAAM,oBAAC,SAAM,WAAU,UAAS,eAAW,MAAC;AAAA,QAC5C,MAAM;AAAA,MACR;AAAA,IACF,KAAK;AACH,aAAO;AAAA,QACL;AAAA,QACA;AAAA,QACA,OAAO,OAAO;AAAA,QACd,MAAM,oBAAC,OAAI,WAAU,UAAS,eAAW,MAAC;AAAA,QAC1C,MAAM;AAAA,MACR;AAAA,EACJ;AACF;AA8BO,SAAS,kBACd,SACA,KACA,SAC2B;AAC3B,QAAM,OAAO,CAAC,QAAsD;AAClE,UAAM,UAAU,oBAAI,IAAoB;AACxC,UAAM,MAAqB,CAAC;AAC5B,eAAW,MAAM,OAAO,CAAC,GAAG;AAC1B,YAAM,SAAS,SAAS,IAAI,IAAI,MAAM;AACtC,UAAI,WAAW,QAAQ,QAAQ,IAAI,MAAM,EAAG;AAC5C,cAAQ,IAAI,MAAM;AAClB,UAAI,KAAK,MAAM,IAA2B,QAAQ,KAAK,OAAO,CAAC;AAAA,IACjE;AACA,WAAO;AAAA,EACT;AACA,QAAM,QAAQ,KAAK,QAAQ,KAAK;AAChC,QAAM,MAAM,KAAK,QAAQ,GAAG;AAC5B,MAAI,MAAM,WAAW,KAAK,IAAI,WAAW,EAAG,QAAO;AACnD,SAAO,EAAE,OAAO,IAAI;AACtB;AAkBO,SAAS,uBAAuB,QAAqB,KAAiC;AAC3F,MAAI,OAAO,OAAO,OAAW,QAAO;AACpC,QAAM,SAAS,SAAS,OAAO,IAAI,IAAI,MAAM;AAC7C,SAAO,WAAW,QAAQ,wBAAwB,IAAI,MAAM,EAAE,SAAS,MAAM;AAC/E;","names":[]}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
2
|
import { type LabelOverride } from "../i18n/kit-labels.js";
|
|
3
|
+
import type { PathPattern } from "../landing/routing.js";
|
|
3
4
|
import type { FloatingCorner } from "../components/floating-panel.js";
|
|
4
5
|
import type { DataTableColumn } from "../components/data-table.js";
|
|
5
6
|
import { type FeedbackStatus } from "./feedback-inbox.js";
|
|
@@ -136,10 +137,12 @@ export declare function isFeedbackAwaiting(status: FeedbackStatus): boolean;
|
|
|
136
137
|
*/
|
|
137
138
|
export type FeedbackRenderDate = (iso: string) => string;
|
|
138
139
|
/**
|
|
139
|
-
* `renderDate` when the app gave one, else the kit's: the
|
|
140
|
-
* when the app set one (called with the
|
|
141
|
-
* `DateMark` calls it), else `Intl` in the provider's locale
|
|
142
|
-
* unparseable value is passed through rather than
|
|
140
|
+
* `renderDate` when the app gave one (and it answers), else the kit's: the
|
|
141
|
+
* `<UiKitProvider formatDate>` when the app set one (called with the calendar day and
|
|
142
|
+
* `weekday: true`, as `DateMark` calls it), else `Intl` in the provider's locale and
|
|
143
|
+
* (0.52) time zone, with the weekday. An unparseable value is passed through rather than
|
|
144
|
+
* hidden. The kit's one day ladder since 0.52 (refactor audit 2026-10-30, DUP-2), which
|
|
145
|
+
* every date a kit component prints goes down.
|
|
143
146
|
*/
|
|
144
147
|
export declare function useFeedbackRenderDate(renderDate?: FeedbackRenderDate, locale?: string): FeedbackRenderDate;
|
|
145
148
|
export interface FeedbackSubjectProps {
|
|
@@ -176,8 +179,8 @@ export interface FeedbackColumnsOptions {
|
|
|
176
179
|
/** The admin on `/feedback` — the status cell offers its steps. Otherwise it shows them
|
|
177
180
|
* read-only. */
|
|
178
181
|
canEdit: boolean;
|
|
179
|
-
/** The undoable status change, `useFeedbackStatusUndo(update.
|
|
180
|
-
* same one the row detail and the swipes use. */
|
|
182
|
+
/** The undoable status change, `useFeedbackStatusUndo(update.mutateAsync)` (§4.5) —
|
|
183
|
+
* the same one the row detail and the swipes use. */
|
|
181
184
|
onStatus: FeedbackStatusChange;
|
|
182
185
|
/** See {@link FeedbackRenderDate}. */
|
|
183
186
|
renderDate: FeedbackRenderDate;
|
|
@@ -195,6 +198,15 @@ export interface FeedbackColumnsOptions {
|
|
|
195
198
|
/** The Votes header — `feedbackPublic.columnVotes`, so the inbox and the public list
|
|
196
199
|
* say the same ({@link useFeedbackColumns} reads it). Default "Votes". */
|
|
197
200
|
votesHeader?: string;
|
|
201
|
+
/**
|
|
202
|
+
* 0.52 (FLW-7): the app's one-shot routes, ON TOP of the kit's — `/join`, `/register`,
|
|
203
|
+
* `/verify-email`, `/reset-password` (a string is that path and everything under it, a
|
|
204
|
+
* RegExp is tested on the path, as `useLastVisitedPage`'s `exclude`). The URL cell
|
|
205
|
+
* shows such a page as text with Copy, never as a link; any other page links its path
|
|
206
|
+
* alone. Keep it stable (module scope): it is a dependency of {@link useFeedbackColumns}'
|
|
207
|
+
* memo.
|
|
208
|
+
*/
|
|
209
|
+
pageLinkExclude?: readonly PathPattern[];
|
|
198
210
|
}
|
|
199
211
|
/**
|
|
200
212
|
* The nine columns of §4.3, in the contract's order, for `DataTable` — keksdose's
|
|
@@ -232,7 +244,7 @@ export interface FeedbackColumnsOptions {
|
|
|
232
244
|
* Pure: hand it resolved words, or use {@link useFeedbackColumns}. Keys are stable, so
|
|
233
245
|
* an app may drop or add a column (`columns.filter((c) => c.key !== "email")`).
|
|
234
246
|
*/
|
|
235
|
-
export declare function feedbackColumns<T extends FeedbackTableRow>({ mine, canEdit, onStatus, renderDate, commit, labels, statusLabels, categoryLabels, votes, votesHeader, }: FeedbackColumnsOptions): DataTableColumn<T>[];
|
|
247
|
+
export declare function feedbackColumns<T extends FeedbackTableRow>({ mine, canEdit, onStatus, renderDate, commit, labels, statusLabels, categoryLabels, votes, votesHeader, pageLinkExclude, }: FeedbackColumnsOptions): DataTableColumn<T>[];
|
|
236
248
|
/** What {@link useFeedbackColumns} takes: {@link FeedbackColumnsOptions} with the words
|
|
237
249
|
* read from the provider, and `renderDate` optional. */
|
|
238
250
|
export interface UseFeedbackColumnsOptions extends Omit<FeedbackColumnsOptions, "renderDate" | "labels" | "statusLabels" | "categoryLabels" | "votesHeader"> {
|
|
@@ -245,10 +257,10 @@ export interface UseFeedbackColumnsOptions extends Omit<FeedbackColumnsOptions,
|
|
|
245
257
|
/**
|
|
246
258
|
* {@link feedbackColumns} with the `feedbackPage`, `feedbackStatus` and
|
|
247
259
|
* `feedbackCategory` words from the provider, memoised on what it reads — pass
|
|
248
|
-
* `update.
|
|
260
|
+
* `update.mutateAsync` through `useFeedbackStatusUndo` (stable) rather than a fresh function
|
|
249
261
|
* per render, or every row's columns are rebuilt on each render (keksdose :667).
|
|
250
262
|
*/
|
|
251
|
-
export declare function useFeedbackColumns<T extends FeedbackTableRow>({ mine, canEdit, onStatus, renderDate: renderDateProp, commit, votes, labels: labelsProp, }: UseFeedbackColumnsOptions): DataTableColumn<T>[];
|
|
263
|
+
export declare function useFeedbackColumns<T extends FeedbackTableRow>({ mine, canEdit, onStatus, renderDate: renderDateProp, commit, votes, pageLinkExclude, labels: labelsProp, }: UseFeedbackColumnsOptions): DataTableColumn<T>[];
|
|
252
264
|
/**
|
|
253
265
|
* The phone list's day headers (keksdose feedback #325: the list "grouped by date, like
|
|
254
266
|
* the transactions list"): `DataTable mobileGroupBy={feedbackMobileGroupBy(renderDate)}`.
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { useMemo } from "react";
|
|
3
|
+
import { useCallback, useMemo } from "react";
|
|
4
4
|
import { ExternalLink, ThumbsUp } from "lucide-react";
|
|
5
5
|
import { cn } from "../lib/cn.js";
|
|
6
|
-
import {
|
|
7
|
-
import { EMPTY_FORMATTED_VALUE
|
|
8
|
-
import {
|
|
6
|
+
import { useDayFormatter } from "../lib/day-format.js";
|
|
7
|
+
import { EMPTY_FORMATTED_VALUE } from "../lib/format.js";
|
|
8
|
+
import { useKitLabels, useKitLink } from "../i18n/kit-labels.js";
|
|
9
9
|
import { Chip } from "../components/chip.js";
|
|
10
|
+
import { CopyButton } from "../components/copy-button.js";
|
|
10
11
|
import { Tooltip } from "../components/tooltip.js";
|
|
11
12
|
import { FloatingAction, FloatingActionGroup } from "../components/floating-panel.js";
|
|
12
13
|
import { pickLinkRenderer } from "../components/text-link.js";
|
|
@@ -28,7 +29,8 @@ import {
|
|
|
28
29
|
FEEDBACK_AWAITING_STATUSES,
|
|
29
30
|
feedbackReworkCount
|
|
30
31
|
} from "./feedback-record.js";
|
|
31
|
-
import {
|
|
32
|
+
import { feedbackPagePath, useFeedbackDetailLabels } from "./feedback-row-detail.js";
|
|
33
|
+
import { feedbackPage, feedbackPageLinkTarget } from "./feedback-page-link.js";
|
|
32
34
|
import { DEFAULT_FEEDBACK_PAGE_LABELS } from "./feedback-table-labels.js";
|
|
33
35
|
import { DEFAULT_FEEDBACK_PUBLIC_LABELS } from "./feedback-public-labels.js";
|
|
34
36
|
function useFeedbackPageLabels(labels) {
|
|
@@ -59,17 +61,8 @@ const FEEDBACK_DATE_STYLE = {
|
|
|
59
61
|
year: "numeric"
|
|
60
62
|
};
|
|
61
63
|
function useFeedbackRenderDate(renderDate, locale) {
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
return useMemo(() => {
|
|
65
|
-
if (renderDate) return renderDate;
|
|
66
|
-
return (iso) => {
|
|
67
|
-
const date = toDate(iso);
|
|
68
|
-
if (!date) return iso || EMPTY_FORMATTED_VALUE;
|
|
69
|
-
const own = fromProvider ? fromProvider(toLocalIso(date), { unit: "day", source: "dateMark", locale: kitLocale, weekday: true }) : "";
|
|
70
|
-
return own || formatDate(date, FEEDBACK_DATE_STYLE, { locale: kitLocale });
|
|
71
|
-
};
|
|
72
|
-
}, [renderDate, fromProvider, kitLocale]);
|
|
64
|
+
const day = useDayFormatter(renderDate, locale);
|
|
65
|
+
return useCallback((iso) => day(iso, { weekday: true, style: FEEDBACK_DATE_STYLE }), [day]);
|
|
73
66
|
}
|
|
74
67
|
function FeedbackDate({ value, renderDate }) {
|
|
75
68
|
if (!value) return /* @__PURE__ */ jsx("span", { className: "text-placeholder", children: EMPTY_FORMATTED_VALUE });
|
|
@@ -99,22 +92,34 @@ function FeedbackSubject({ row, wrap = false, labels: labelsProp, className }) {
|
|
|
99
92
|
chips
|
|
100
93
|
] });
|
|
101
94
|
}
|
|
102
|
-
function FeedbackPageLinkCell({
|
|
95
|
+
function FeedbackPageLinkCell({
|
|
96
|
+
context,
|
|
97
|
+
openPage,
|
|
98
|
+
exclude
|
|
99
|
+
}) {
|
|
103
100
|
const kitLink = useKitLink();
|
|
104
|
-
const
|
|
105
|
-
|
|
106
|
-
|
|
101
|
+
const page = feedbackPage(context);
|
|
102
|
+
if (!page) return /* @__PURE__ */ jsx("span", { className: "text-placeholder", children: EMPTY_FORMATTED_VALUE });
|
|
103
|
+
const href = feedbackPageLinkTarget(page, exclude);
|
|
104
|
+
if (!href) return /* @__PURE__ */ jsx(FeedbackPageText, { path: page.path, url: page.url });
|
|
107
105
|
const className = "inline-flex min-w-0 max-w-full items-center gap-1 text-secondary hover:text-primary hover:underline";
|
|
108
106
|
const children = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
109
107
|
/* @__PURE__ */ jsx("span", { className: "sr-only", children: openPage }),
|
|
110
108
|
" ",
|
|
111
|
-
/* @__PURE__ */ jsx("code", { className: "min-w-0 truncate text-xs", children: path }),
|
|
109
|
+
/* @__PURE__ */ jsx("code", { className: "min-w-0 truncate text-xs", children: page.path }),
|
|
112
110
|
/* @__PURE__ */ jsx(ExternalLink, { className: "size-3 shrink-0", "aria-hidden": true })
|
|
113
111
|
] });
|
|
114
112
|
const onClick = (event) => event.stopPropagation();
|
|
115
113
|
const render = pickLinkRenderer(void 0, kitLink, href);
|
|
116
114
|
return render ? /* @__PURE__ */ jsx(RenderedLink, { render, href, className, onClick, children }) : /* @__PURE__ */ jsx("a", { href, className, onClick, children });
|
|
117
115
|
}
|
|
116
|
+
function FeedbackPageText({ path, url }) {
|
|
117
|
+
const { copyUrl } = useFeedbackDetailLabels();
|
|
118
|
+
return /* @__PURE__ */ jsxs("span", { className: "inline-flex min-w-0 max-w-full items-center gap-1 text-secondary", "data-feedback-page-unlinked": "", children: [
|
|
119
|
+
/* @__PURE__ */ jsx("code", { className: "min-w-0 truncate text-xs", children: path }),
|
|
120
|
+
/* @__PURE__ */ jsx(CopyButton, { size: "xs", className: "shrink-0", text: url, label: copyUrl, stopPropagation: true })
|
|
121
|
+
] });
|
|
122
|
+
}
|
|
118
123
|
function RenderedLink({ render, ...props }) {
|
|
119
124
|
return render(props);
|
|
120
125
|
}
|
|
@@ -138,7 +143,8 @@ function feedbackColumns({
|
|
|
138
143
|
statusLabels,
|
|
139
144
|
categoryLabels,
|
|
140
145
|
votes = false,
|
|
141
|
-
votesHeader = DEFAULT_FEEDBACK_PUBLIC_LABELS.columnVotes
|
|
146
|
+
votesHeader = DEFAULT_FEEDBACK_PUBLIC_LABELS.columnVotes,
|
|
147
|
+
pageLinkExclude
|
|
142
148
|
}) {
|
|
143
149
|
const editable = canEdit && !mine;
|
|
144
150
|
const votesColumn = votes ? [
|
|
@@ -257,7 +263,7 @@ function feedbackColumns({
|
|
|
257
263
|
// The cell IS a link, so the row's own permalink must never wrap it (keksdose
|
|
258
264
|
// feedback #451: <a> in <a>, and "open the page" silently did nothing).
|
|
259
265
|
noRowLink: true,
|
|
260
|
-
cell: (row) => /* @__PURE__ */ jsx(FeedbackPageLinkCell, { context: row.context, openPage: labels.openPage }),
|
|
266
|
+
cell: (row) => /* @__PURE__ */ jsx(FeedbackPageLinkCell, { context: row.context, openPage: labels.openPage, exclude: pageLinkExclude }),
|
|
261
267
|
sortBy: (row) => feedbackPagePath(row.context) ?? "",
|
|
262
268
|
filterBy: (row) => feedbackPagePath(row.context) ?? "",
|
|
263
269
|
mobileHidden: true,
|
|
@@ -310,6 +316,7 @@ function useFeedbackColumns({
|
|
|
310
316
|
renderDate: renderDateProp,
|
|
311
317
|
commit,
|
|
312
318
|
votes,
|
|
319
|
+
pageLinkExclude,
|
|
313
320
|
labels: labelsProp
|
|
314
321
|
}) {
|
|
315
322
|
const labels = useFeedbackPageLabels(labelsProp);
|
|
@@ -328,9 +335,22 @@ function useFeedbackColumns({
|
|
|
328
335
|
statusLabels,
|
|
329
336
|
categoryLabels,
|
|
330
337
|
votes,
|
|
331
|
-
votesHeader
|
|
338
|
+
votesHeader,
|
|
339
|
+
pageLinkExclude
|
|
332
340
|
}),
|
|
333
|
-
[
|
|
341
|
+
[
|
|
342
|
+
mine,
|
|
343
|
+
canEdit,
|
|
344
|
+
onStatus,
|
|
345
|
+
renderDate,
|
|
346
|
+
commit,
|
|
347
|
+
labels,
|
|
348
|
+
statusLabels,
|
|
349
|
+
categoryLabels,
|
|
350
|
+
votes,
|
|
351
|
+
votesHeader,
|
|
352
|
+
pageLinkExclude
|
|
353
|
+
]
|
|
334
354
|
);
|
|
335
355
|
}
|
|
336
356
|
function feedbackMobileGroupBy(renderDate) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/feedback/feedback-table.tsx"],"sourcesContent":["import { useMemo } from \"react\";\nimport type { MouseEvent, ReactElement, ReactNode } from \"react\";\nimport { ExternalLink, ThumbsUp } from \"lucide-react\";\nimport { cn } from \"../lib/cn\";\nimport { toLocalIso } from \"../lib/dates\";\nimport { EMPTY_FORMATTED_VALUE, formatDate, toDate } from \"../lib/format\";\nimport { useKitDateFormatter, useKitLabels, useKitLink, useKitLocale, type LabelOverride } from \"../i18n/kit-labels\";\nimport type { KitLinkProps } from \"../i18n/kit-labels\";\nimport { Chip } from \"../components/chip\";\nimport { Tooltip } from \"../components/tooltip\";\nimport { FloatingAction, FloatingActionGroup } from \"../components/floating-panel\";\nimport type { FloatingCorner } from \"../components/floating-panel\";\nimport { pickLinkRenderer } from \"../components/text-link\";\nimport type { DataTableColumn } from \"../components/data-table\";\nimport {\n FEEDBACK_CATEGORY_ORDER,\n FEEDBACK_STATUS_META,\n FEEDBACK_STATUS_ORDER,\n FeedbackCategoryBadge,\n FeedbackStatusBadge,\n FeedbackStatusTransitions,\n feedbackCategoryRank,\n visibleFeedbackStatuses,\n type FeedbackStatus,\n} from \"./feedback-inbox\";\nimport {\n useFeedbackCategoryLabels,\n useFeedbackStatusLabels,\n type FeedbackCategoryLabels,\n type FeedbackStatusLabels,\n} from \"./feedback-labels\";\nimport {\n FEEDBACK_AWAITING_STATUSES,\n feedbackReworkCount,\n type FeedbackContext,\n type FeedbackRecord,\n} from \"./feedback-record\";\nimport type { FeedbackStatusChange } from \"./feedback-status-undo\";\nimport { feedbackPageHref, feedbackPagePath } from \"./feedback-row-detail\";\nimport type { CommitScope } from \"../components/write-lock\";\nimport { DEFAULT_FEEDBACK_PAGE_LABELS } from \"./feedback-table-labels\";\nimport { DEFAULT_FEEDBACK_PUBLIC_LABELS } from \"./feedback-public-labels\";\n\n/**\n * The two feedback pages' TABLE — `/feedback` (the admin inbox) and `/my-feedback` (the\n * user's own) — as the kit's parts: §4.3 of the feedback contract\n * (docs/feedback-harmonization.md), lifted from keksdose\n * `frontend/src/features/feedback/feedback-page.tsx` (columns :711–963, the phone card\n * :1038–1065, the awaiting toggle :689–709 and :1086–1101).\n *\n * Until 0.27 each app wrote this table itself, and the three had drifted exactly where a\n * table drifts: kastlan's showed five statuses and no environment, Kurvenschmiede's one\n * page served both audiences, and keksdose's — the canon, argued over a year of feedback\n * items — had a latent bug of its own: its subject cell carries the environment and\n * rework chips \"so a second attempt is marked on every surface at once\" (:760), but the\n * phone card is a `mobileCard`, and `DataTable` never renders the `mobilePrimary` cell\n * when `mobileCard` is set (data-table-mobile.tsx, `cardInner`). Its phone cards showed neither\n * chip. {@link FeedbackMobileCard} draws both itself, from the same\n * {@link FeedbackSubject} the column uses, so the two surfaces cannot part again.\n *\n * What stays the app's: the rows (its API client), who is an admin, the routes and the\n * `/feedback` → `/my-feedback` redirect, the `?row=` deep link and the row detail. What\n * is here: the nine columns ({@link feedbackColumns} / {@link useFeedbackColumns}), the\n * phone card and its day headers ({@link FeedbackMobileCard},\n * {@link feedbackMobileGroupBy}), the phone's \"Only what is waiting for you\" toggle\n * ({@link FeedbackAwaitingToggle}), the empty state ({@link FeedbackEmptyState}) and the\n * `feedbackPage` words. The swipes are `feedbackSwipePlan` (feedback-swipe.tsx), passed\n * by the app because whether the page may write is the app's call.\n */\n\n/* ── Labels ─────────────────────────────────────────────────────────────────── */\n\n/**\n * `feedbackPage` — the words of the two feedback pages (§4.3). The English is keksdose's\n * `en.json` (`feedback.*`, `common.none`); the de-CH canon is noted on each key (keksdose\n * `de-CH.json`, ss never ß).\n */\nexport interface FeedbackPageLabels {\n /** The admin inbox's page title, `/feedback` — the menu's \"Feedback inbox\" (0.40,\n * §10.2 decision 11; \"Feedback\" before). de-CH: \"Feedback-Eingang\" */\n title: string;\n /** The user's own list, `/my-feedback`. de-CH: \"Mein Feedback\" */\n myTitle: string;\n /** Column 1, the id. de-CH: \"#\" */\n columnId: string;\n /** Column 2, when it was filed. de-CH: \"Datum\" */\n columnDate: string;\n /** Column 3. de-CH: \"Kategorie\" */\n columnCategory: string;\n /** Column 4, the title with its chips. de-CH: \"Betreff\" */\n columnSubject: string;\n /** Column 5, who filed it. de-CH: \"Nutzer\" */\n columnUser: string;\n /** Column 6. de-CH: \"E-Mail\" */\n columnEmail: string;\n /** Column 7, the page it was filed from. de-CH: \"URL\" */\n columnUrl: string;\n /** Column 8. de-CH: \"Status\" */\n columnStatus: string;\n /** Column 9, when it was settled. de-CH: \"Erledigt am\" */\n columnResolved: string;\n /** What the URL cell's link does, said before the path to a screen reader.\n * de-CH: \"Seite öffnen\" */\n openPage: string;\n /** The table with nothing to show, on both pages (§7.13) — keksdose's `common.none`.\n * de-CH: \"Keine\" */\n empty: string;\n /** The submitter of a report whose account was erased (`user_id: null`, keksdose live\n * #275). de-CH: \"<gelöschter Nutzer>\" */\n deletedUser: string;\n /** The submitter when neither a name nor an email is known — `id` is `user_id`.\n * de-CH: \"Nutzer #{{id}}\" */\n userFallback: (id: number) => string;\n /** The chip for a report filed from a copy of the app that is not production —\n * `environment` is `context.environment` as filed (\"dev\", \"local\", or the app's own\n * word). Upper-cased like the top bar's environment badge, so the marker the tester saw\n * is the marker triage sees. Guarded: a context is untyped JSON, so a value that is no\n * string (an app calling it with `context.environment` as stored) is printed, never\n * thrown on. de-CH: the same. */\n environment: (environment: string) => string;\n /** The chip for a report sent back for rework — `count` ≥ 1 is how many times\n * (`reworkCount`, keksdose live #331). de-CH: \"Nacharbeit\" / \"Nacharbeit ×{{count}}\" */\n reworkChip: (count: number) => string;\n /** The phone toggle narrowing the inbox to IN_EVALUATION + NEEDS_LIVE_TEST.\n * de-CH: \"Nur was auf Sie wartet\" */\n awaitingFilter: string;\n /** The name of the phone's floating group that holds it. de-CH: \"Feedback-Aktionen\" */\n phoneActions: string;\n}\n\n// Defined in ./feedback-table-labels, which holds no component code (0.34, KS U8).\nexport { DEFAULT_FEEDBACK_PAGE_LABELS };\n\n/** `feedbackPage` resolved: English, then `<UiKitProvider labels>`, then `labels`. The\n * page's title comes from here too: `mine ? labels.myTitle : labels.title`. */\nexport function useFeedbackPageLabels(labels?: LabelOverride<FeedbackPageLabels>): FeedbackPageLabels {\n return useKitLabels(\"feedbackPage\", DEFAULT_FEEDBACK_PAGE_LABELS, labels);\n}\n\n/* ── Reading a row ──────────────────────────────────────────────────────────── */\n\n/** What the table reads off a report — {@link FeedbackRecord}'s fields, so an app's own\n * row type with more of them passes as it is. */\nexport type FeedbackTableRow = Pick<\n FeedbackRecord,\n | \"id\"\n | \"user_id\"\n | \"user_email\"\n | \"title\"\n | \"body\"\n | \"category\"\n | \"status\"\n | \"context\"\n | \"resolved_at\"\n | \"created_at\"\n | \"votes\"\n>;\n\n/** A context value as a trimmed string, or `\"\"` — every key is optional on read (§3.2)\n * and an app's own context type may say `unknown`. */\nfunction text(value: unknown): string {\n return typeof value === \"string\" ? value.trim() : \"\";\n}\n\n/**\n * The environment a report was filed from when it is NOT production, as filed — or\n * `null` (keksdose `environmentLabel`, :142). Production is silent, as the top bar's\n * badge is: the marker earns attention by being rare. A missing value is production too —\n * every row filed before a test copy existed, and crash rows filed before the crash\n * payload carried `environment` (§3.2, §3.6). An unknown value is shown rather than swallowed: an environment\n * nobody recognises is exactly when triage needs to see one.\n */\nexport function feedbackEnvironment(context: FeedbackContext | null | undefined): string | null {\n const env = text(context?.environment);\n return !env || env.toLowerCase() === \"prod\" ? null : env;\n}\n\n/**\n * Who filed a report, as one string (keksdose `submitterLabel`, :163): the display name,\n * else the email, else `userFallback(user_id)`. An erased account (`user_id: null`) is\n * `deletedUser` FIRST, ahead of the context: the server scrubs the name with the account,\n * but a row that somehow kept one must still not go on naming somebody who asked to be\n * forgotten. The joined `user_email` (admin list) is preferred to the context snapshot.\n */\nexport function feedbackSubmitter(\n row: Pick<FeedbackRecord, \"user_id\" | \"user_email\" | \"context\">,\n labels: Pick<FeedbackPageLabels, \"deletedUser\" | \"userFallback\">,\n): string {\n if (row.user_id == null) return labels.deletedUser;\n return (\n text(row.context?.user_display_name) ||\n text(row.user_email) ||\n text(row.context?.user_email) ||\n labels.userFallback(row.user_id)\n );\n}\n\n/**\n * The submitter's email (keksdose `submitterEmail`, :175): the joined `user_email` —\n * authoritative, the display name is self-chosen (feedback #108) — else the context\n * snapshot, which is what `/my-feedback` has (`GET /feedback/my` sends no join). `\"\"`\n * for an erased account, for the reason {@link feedbackSubmitter} gives.\n */\nexport function feedbackSubmitterEmail(row: Pick<FeedbackRecord, \"user_id\" | \"user_email\" | \"context\">): string {\n if (row.user_id == null) return \"\";\n return text(row.user_email) || text(row.context?.user_email);\n}\n\n/** Whether a status is one the phone's awaiting toggle keeps — `FEEDBACK_AWAITING_STATUSES`,\n * the two that wait on the person triaging. `rows.filter((r) => isFeedbackAwaiting(r.status))`. */\nexport function isFeedbackAwaiting(status: FeedbackStatus): boolean {\n return FEEDBACK_AWAITING_STATUSES.includes(status);\n}\n\n/* ── Dates ──────────────────────────────────────────────────────────────────── */\n\n/**\n * How the pages write a date: an ISO timestamp in, one string out. keksdose passes its\n * `useDateCell()` (the app's date-format preference, weekday and all — dev#546), which\n * fits as it is.\n *\n * ONE function for the date column, the resolved column, the phone card and the phone's\n * day headers, so the four cannot disagree (keksdose dev#546 round 3: the header is a\n * string and must say what the card says).\n */\nexport type FeedbackRenderDate = (iso: string) => string;\n\n/** The kit's own date, weekday included: \"Sun, 4 Oct 2026\" / \"So., 4. Okt. 2026\". A date\n * in a column carries its weekday (keksdose's rule, date-cell.tsx). */\nconst FEEDBACK_DATE_STYLE: Intl.DateTimeFormatOptions = {\n weekday: \"short\",\n day: \"numeric\",\n month: \"short\",\n year: \"numeric\",\n};\n\n/**\n * `renderDate` when the app gave one, else the kit's: the `<UiKitProvider formatDate>`\n * when the app set one (called with the LOCAL calendar day and `weekday: true`, as\n * `DateMark` calls it), else `Intl` in the provider's locale with the weekday. An\n * unparseable value is passed through rather than hidden.\n */\nexport function useFeedbackRenderDate(renderDate?: FeedbackRenderDate, locale?: string): FeedbackRenderDate {\n const kitLocale = useKitLocale(locale);\n const fromProvider = useKitDateFormatter();\n return useMemo<FeedbackRenderDate>(() => {\n if (renderDate) return renderDate;\n return (iso) => {\n const date = toDate(iso);\n if (!date) return iso || EMPTY_FORMATTED_VALUE;\n const own = fromProvider\n ? fromProvider(toLocalIso(date), { unit: \"day\", source: \"dateMark\", locale: kitLocale, weekday: true })\n : \"\";\n return own || formatDate(date, FEEDBACK_DATE_STYLE, { locale: kitLocale });\n };\n }, [renderDate, fromProvider, kitLocale]);\n}\n\n/** A date in a cell: `<time>`, nowrap, tabular figures; \"—\" when there is none. */\nfunction FeedbackDate({ value, renderDate }: { value: string | null | undefined; renderDate: FeedbackRenderDate }) {\n if (!value) return <span className=\"text-placeholder\">{EMPTY_FORMATTED_VALUE}</span>;\n return (\n <time dateTime={value} className=\"whitespace-nowrap tabular-nums text-muted\">\n {renderDate(value)}\n </time>\n );\n}\n\n/** An instant for sorting; a value that does not parse sorts with the empty ones. */\nfunction instant(value: string | null | undefined): number | null {\n const ms = value ? Date.parse(value) : NaN;\n return Number.isNaN(ms) ? null : ms;\n}\n\n/* ── The subject: title + environment chip + rework chip ───────────────────── */\n\nexport interface FeedbackSubjectProps {\n /** `replies` (0.40): the chip counts the rework entries, else the body's blocks —\n * {@link feedbackReworkCount}. */\n row: Pick<FeedbackRecord, \"title\" | \"body\" | \"context\"> & Partial<Pick<FeedbackRecord, \"replies\">>;\n /**\n * `false` (default): one line — the title truncates and the chips stay whole, as a\n * table cell wants. `true`: the title wraps and the chips flow after its last word, as\n * the phone card wants (a phone shows the whole title or nothing useful).\n */\n wrap?: boolean;\n /** Over the `feedbackPage` namespace. */\n labels?: LabelOverride<FeedbackPageLabels>;\n className?: string;\n}\n\n/**\n * A report's title with its two chips (§4.3, column 4): the environment when it is not\n * production (keksdose's amber outline, the top bar's environment badge — the marker the\n * tester saw is the marker triage sees) and **Rework** / **Rework ×n** when the author has\n * sent it back (keksdose live #331: *\"have a new category for items in rework\"*, as a fact\n * derived from the body rather than a seventh status).\n *\n * No tooltip on either chip (keksdose dev#523): each already says what it means.\n */\nexport function FeedbackSubject({ row, wrap = false, labels: labelsProp, className }: FeedbackSubjectProps) {\n const labels = useFeedbackPageLabels(labelsProp);\n const env = feedbackEnvironment(row.context);\n const rounds = feedbackReworkCount(row);\n const chipClass = wrap ? \"ms-1.5 align-middle\" : \"shrink-0\";\n const chips = (\n <>\n {env && (\n <Chip size=\"sm\" variant=\"outline\" shape=\"square\" tone=\"warning\" caps className={chipClass} data-feedback-env=\"\">\n {labels.environment(env)}\n </Chip>\n )}\n {rounds > 0 && (\n <Chip size=\"sm\" tone=\"warning\" caps className={chipClass} data-feedback-rework={rounds}>\n {labels.reworkChip(rounds)}\n </Chip>\n )}\n </>\n );\n if (wrap) {\n return (\n <span className={cn(\"min-w-0 font-medium [overflow-wrap:anywhere]\", className)}>\n {row.title}\n {chips}\n </span>\n );\n }\n return (\n <span className={cn(\"inline-flex min-w-0 max-w-full items-center gap-1.5 large:items-start\", className)}>\n {/* One line at Normal; from Large up the title wraps rather than losing its end (text\n size §10.17 — the release sweep's first CI run found it cut on the showcase). */}\n <span className=\"min-w-0 truncate-until-large font-medium\">{row.title}</span>\n {chips}\n </span>\n );\n}\n\n/* ── The URL cell ───────────────────────────────────────────────────────────── */\n\n/**\n * The page a report was filed from, as a link — the cell keksdose's column 7 draws\n * (:850): the path as text, path + query + hash as the `href`, read from `context.url`\n * else `context.route` by the row detail's own readers (`feedbackPagePath` /\n * `feedbackPageHref`, feedback-row-detail.tsx), so the column and the detail link the\n * same page the same way. A real link through the `<UiKitProvider linkComponent>` (the app's router, so it\n * does not reload the app; keksdose's plain `<a>` did), and its click stops at the cell so\n * the row does not open as well.\n *\n * Its name is the path, as on screen, with \"Open page\" said before it — keksdose's\n * `aria-label=\"Open page\"` replaced the path, so a screen reader heard forty identical\n * links down the column.\n */\nfunction FeedbackPageLinkCell({ context, openPage }: { context: FeedbackContext | null; openPage: string }) {\n const kitLink = useKitLink();\n const href = feedbackPageHref(context);\n const path = feedbackPagePath(context);\n if (!href || !path) return <span className=\"text-placeholder\">{EMPTY_FORMATTED_VALUE}</span>;\n const className =\n \"inline-flex min-w-0 max-w-full items-center gap-1 text-secondary hover:text-primary hover:underline\";\n const children = (\n <>\n {/* The space outside the hidden span: a flex container drops it from the layout,\n and the accessible name keeps it (\"Open page /accounts\"). */}\n <span className=\"sr-only\">{openPage}</span> <code className=\"min-w-0 truncate text-xs\">{path}</code>\n <ExternalLink className=\"size-3 shrink-0\" aria-hidden />\n </>\n );\n const onClick = (event: MouseEvent<HTMLAnchorElement>) => event.stopPropagation();\n const render = pickLinkRenderer<KitLinkProps>(undefined, kitLink, href);\n return render ? (\n <RenderedLink render={render} href={href} className={className} onClick={onClick}>\n {children}\n </RenderedLink>\n ) : (\n <a href={href} className={className} onClick={onClick}>\n {children}\n </a>\n );\n}\n\n/** The provider's link, drawn by a component declared once (as FloatingAction's). */\nfunction RenderedLink({ render, ...props }: KitLinkProps & { render: (props: KitLinkProps) => ReactElement }) {\n return render(props);\n}\n\n/* ── The columns ────────────────────────────────────────────────────────────── */\n\n/** What {@link feedbackColumns} takes — every word already resolved (see\n * {@link useFeedbackColumns}, which resolves them from the provider). */\nexport interface FeedbackColumnsOptions {\n /** `/my-feedback`. The same nine columns (one page component, §4.3), but the status\n * cell is read-only there whatever `canEdit` says — \"no status or outcome editing\n * there (also for an admin)\". */\n mine?: boolean;\n /** The admin on `/feedback` — the status cell offers its steps. Otherwise it shows them\n * read-only. */\n canEdit: boolean;\n /** The undoable status change, `useFeedbackStatusUndo(update.mutate)` (§4.5) — the\n * same one the row detail and the swipes use. */\n onStatus: FeedbackStatusChange;\n /** See {@link FeedbackRenderDate}. */\n renderDate: FeedbackRenderDate;\n /** The status buttons SAVE when pressed: pass `true` to put them under the page's\n * `WriteLockProvider` (FeedbackStatusTransitions' `commit`). Off by default — a\n * feedback inbox is rarely what an app's lock is about. */\n commit?: CommitScope;\n labels: FeedbackPageLabels;\n statusLabels: FeedbackStatusLabels;\n categoryLabels: FeedbackCategoryLabels;\n /** 0.38 (§9.6): a sortable **Votes** column before Status — `row.votes`, a missing\n * one as 0 — hidden on the phone (the card's chip, {@link FeedbackMobileCardProps.votes},\n * carries it there). Off by default. */\n votes?: boolean;\n /** The Votes header — `feedbackPublic.columnVotes`, so the inbox and the public list\n * say the same ({@link useFeedbackColumns} reads it). Default \"Votes\". */\n votesHeader?: string;\n}\n\n/** The vote count, a quiet chip with the thumb (§9.6) — the Votes cell and the card's. */\nfunction FeedbackVoteCount({ votes, className }: { votes: number | undefined; className?: string }) {\n return (\n <Chip size=\"sm\" className={className} data-feedback-vote-count={votes ?? 0}>\n <ThumbsUp className=\"size-3\" aria-hidden />\n <span className=\"tabular-nums\">{votes ?? 0}</span>\n </Chip>\n );\n}\n\n/** A status's place in the chain, unknown ones last (as `feedbackCategoryRank`). */\nfunction statusRank(status: FeedbackStatus): number {\n const at = FEEDBACK_STATUS_ORDER.indexOf(status);\n return at === -1 ? FEEDBACK_STATUS_ORDER.length : at;\n}\n\n/**\n * The nine columns of §4.3, in the contract's order, for `DataTable` — keksdose's\n * (:711–963) with the contract's changes:\n *\n * | # | key | cell | filter | phone |\n * |---|---|---|---|---|\n * | 1 | `id` | id, mono | number | hidden |\n * | 2 | `date` | `created_at`, weekday ({@link FeedbackRenderDate}) | date | |\n * | 3 | `category` | `FeedbackCategoryBadge`, sorted CRASH first | select, all five | |\n * | 4 | `title` | {@link FeedbackSubject} | text: title + environment | card heading |\n * | 5 | `user` | {@link feedbackSubmitter} | text: name + email, or \"deleted user\" | |\n * | 6 | `email` | {@link feedbackSubmitterEmail} | text | hidden |\n * | 7 | `url` | the page, a link (`noRowLink`) | text: path | hidden |\n * | 8 | `status` | `FeedbackStatusTransitions variant=\"icon\"`, `visibleFeedbackStatuses` | select, chain order | |\n * | 9 | `resolved` | `resolved_at` | date | hidden |\n *\n * - Both select filters list the WHOLE vocabulary in its own order, translated —\n * without `options` the popover lists the bare enum values found in the rows\n * (keksdose feedback #160), and kastlan's first CRASH row would otherwise appear in a\n * filter that never offered it.\n * - The status column owns the status filter, and only it (keksdose live #330's revert:\n * the phone's filter sheet already exposes every column filter).\n * - Fitted to the table's width (0.48, keksdose live #451): Subject `grow`s and\n * ellipsises, and a narrow table leaves out URL, then Email, then Resolved\n * (`fitPriority` 1–3) — the open report repeats all three — then Votes and Category\n * (4, 5), then User, Date and # (6–8, 0.51.4) before Subject would drop below 8rem\n * (`growMin`, 0.51.4; the table's default floor is 10).\n * Drop the two keys with\n * `{ ...col, grow: undefined, fitPriority: undefined }` for the 0.47 layout.\n * - `/my-feedback` shows the same nine: the Email cell's context fallback exists for it\n * (the admin list's join is absent there, §3.1), and its phone card drops the submitter\n * instead ({@link FeedbackMobileCardProps.showSubmitter}).\n *\n * Pure: hand it resolved words, or use {@link useFeedbackColumns}. Keys are stable, so\n * an app may drop or add a column (`columns.filter((c) => c.key !== \"email\")`).\n */\nexport function feedbackColumns<T extends FeedbackTableRow>({\n mine = false,\n canEdit,\n onStatus,\n renderDate,\n commit,\n labels,\n statusLabels,\n categoryLabels,\n votes = false,\n votesHeader = DEFAULT_FEEDBACK_PUBLIC_LABELS.columnVotes,\n}: FeedbackColumnsOptions): DataTableColumn<T>[] {\n const editable = canEdit && !mine;\n const votesColumn: DataTableColumn<T>[] = votes\n ? [\n {\n key: \"votes\",\n header: votesHeader,\n className: \"whitespace-nowrap\",\n cell: (row) => <FeedbackVoteCount votes={row.votes ?? undefined} />,\n sortBy: (row) => row.votes ?? 0,\n filter: { type: \"number\", getValue: (row) => row.votes ?? 0 },\n mobileHidden: true,\n // Fourth to go (Kurvenschmiede S1, 0.48): with only the first three, Subject was\n // crushed to 24px at 1100px. Still reachable from the Columns panel.\n fitPriority: 4,\n },\n ]\n : [];\n return [\n {\n key: \"id\",\n header: labels.columnId,\n cell: (row) => <span className=\"font-mono text-xs text-muted\">{row.id}</span>,\n sortBy: (row) => row.id,\n filter: { type: \"number\", getValue: (row) => row.id },\n mobileHidden: true,\n // The very last to go (0.51.4, Kurvenschmiede): replies and the feedback loop name a\n // report by its number, so it stays while anything else can give way.\n fitPriority: 8,\n },\n {\n key: \"date\",\n header: labels.columnDate,\n cell: (row) => <FeedbackDate value={row.created_at} renderDate={renderDate} />,\n sortBy: (row) => instant(row.created_at),\n filter: { type: \"date\", getValue: (row) => row.created_at },\n // Seventh to go (0.51.4): the open report shows it.\n fitPriority: 7,\n },\n {\n key: \"category\",\n header: labels.columnCategory,\n cell: (row) => <FeedbackCategoryBadge category={row.category} label={categoryLabels[row.category]} />,\n sortBy: (row) => feedbackCategoryRank(row.category),\n filter: {\n type: \"select\",\n getValue: (row) => row.category,\n options: FEEDBACK_CATEGORY_ORDER.map((value) => ({ value, label: categoryLabels[value] })),\n },\n // Last to go (Kurvenschmiede S1, 0.48), before Subject would drop below 10rem:\n // the open report's Subject section repeats the badge.\n fitPriority: 5,\n },\n {\n key: \"title\",\n header: labels.columnSubject,\n cell: (row) => <FeedbackSubject row={row} labels={labels} />,\n sortBy: (row) => row.title,\n // Searchable by the environment too, so \"dev\" narrows to the test copy's reports —\n // a chip you can see but not filter by makes you read every row (keksdose :804).\n filterBy: (row) => {\n const env = feedbackEnvironment(row.context);\n return env ? `${row.title} ${labels.environment(env)}` : row.title;\n },\n mobilePrimary: true,\n // The rest of the row, one line and an ellipsis (0.48, keksdose live #451: one long\n // crash title pushed Status and the row actions off the edge).\n grow: true,\n // 8rem, not the table's 10 (0.51.4, Kurvenschmiede): at 768px beside a sidebar only\n // Subject, Status (a fixed 13.5rem) and the row actions are left, and they were up\n // to 20px too wide (Hungarian). A subject's first words carry it; the open report\n // has the rest.\n growMin: 8,\n },\n {\n key: \"user\",\n header: labels.columnUser,\n // At most 12rem, one line and an ellipsis, the whole value in the kit's Tooltip (0.48 build\n // review 2, keksdose N2): beside the grow Subject every other cell keeps one line, so\n // an email standing in for a missing name widened the column and cost Votes and\n // Category their room first. The open report shows both in full.\n cell: (row) => {\n const who = feedbackSubmitter(row, labels);\n return (\n <Tooltip label={who} portal lazy>\n <span className=\"block max-w-[12rem] truncate-until-large text-secondary\">{who}</span>\n </Tooltip>\n );\n },\n sortBy: (row) => feedbackSubmitter(row, labels),\n // Name AND email, so either finds the person; the erased ones by the placeholder\n // (their context holds no name any more).\n filterBy: (row) =>\n row.user_id == null ? labels.deletedUser : `${feedbackSubmitter(row, labels)} ${feedbackSubmitterEmail(row)}`,\n // Sixth to go (0.51.4, Kurvenschmiede): with only 1–5, Subject reached its floor while\n // #, Date and User were still drawn, and the inbox scrolled sideways from 768 to\n // ~1115px beside an open sidebar. The open report names the submitter.\n fitPriority: 6,\n },\n {\n key: \"email\",\n header: labels.columnEmail,\n // One line, like the URL beside it: keksdose's `break-all` let the browser squeeze\n // the column to its header and broke every address in two (\"user@exam / ple.test\"),\n // which made every row taller. Unbroken, a resized (pinned) column ellipsises it.\n className: \"whitespace-nowrap\",\n cell: (row) => {\n const email = feedbackSubmitterEmail(row);\n return email ? (\n <span className=\"text-secondary\">{email}</span>\n ) : (\n <span className=\"text-placeholder\">{EMPTY_FORMATTED_VALUE}</span>\n );\n },\n sortBy: feedbackSubmitterEmail,\n filterBy: feedbackSubmitterEmail,\n mobileHidden: true,\n // Second to go when the table is narrow: the open report shows the submitter.\n fitPriority: 2,\n },\n {\n key: \"url\",\n header: labels.columnUrl,\n // A cell only ellipsises what it is told not to wrap (keksdose live #348: the path\n // clipped mid-character \"behind the next column\").\n className: \"whitespace-nowrap\",\n // The cell IS a link, so the row's own permalink must never wrap it (keksdose\n // feedback #451: <a> in <a>, and \"open the page\" silently did nothing).\n noRowLink: true,\n cell: (row) => <FeedbackPageLinkCell context={row.context} openPage={labels.openPage} />,\n sortBy: (row) => feedbackPagePath(row.context) ?? \"\",\n filterBy: (row) => feedbackPagePath(row.context) ?? \"\",\n mobileHidden: true,\n // First to go when the table is narrow (0.48): the open report repeats the page.\n fitPriority: 1,\n },\n ...votesColumn,\n {\n key: \"status\",\n header: labels.columnStatus,\n // A KNOWN width: at most six 28px icon buttons (from IN_PROGRESS or IN_EVALUATION:\n // one step either way and the three off the chain) — keksdose live #348 sized it\n // for five and the sixth pushed the column wider.\n className: \"w-[13.5rem] whitespace-nowrap\",\n cell: (row) => (\n <FeedbackStatusTransitions\n status={row.status}\n statuses={visibleFeedbackStatuses(row.status)}\n canEdit={editable}\n commit={commit}\n onPick={(status) => onStatus(row, status)}\n variant=\"icon\"\n label={(status) => statusLabels[status]}\n />\n ),\n sortBy: (row) => statusRank(row.status),\n filter: {\n type: \"select\",\n getValue: (row) => row.status,\n options: FEEDBACK_STATUS_ORDER.map((value) => ({ value, label: statusLabels[value] })),\n },\n },\n {\n key: \"resolved\",\n header: labels.columnResolved,\n cell: (row) => <FeedbackDate value={row.resolved_at} renderDate={renderDate} />,\n sortBy: (row) => instant(row.resolved_at),\n filter: { type: \"date\", getValue: (row) => row.resolved_at },\n mobileHidden: true,\n // Third to go (0.48).\n fitPriority: 3,\n },\n ];\n}\n\n/** What {@link useFeedbackColumns} takes: {@link FeedbackColumnsOptions} with the words\n * read from the provider, and `renderDate` optional. */\nexport interface UseFeedbackColumnsOptions extends Omit<\n FeedbackColumnsOptions,\n \"renderDate\" | \"labels\" | \"statusLabels\" | \"categoryLabels\" | \"votesHeader\"\n> {\n /** Default: the kit's date with the weekday ({@link useFeedbackRenderDate}). */\n renderDate?: FeedbackRenderDate;\n /** Over the `feedbackPage` namespace. Keep it stable (module scope or memoised): it is\n * a dependency of the memo. */\n labels?: LabelOverride<FeedbackPageLabels>;\n}\n\n/**\n * {@link feedbackColumns} with the `feedbackPage`, `feedbackStatus` and\n * `feedbackCategory` words from the provider, memoised on what it reads — pass\n * `update.mutate` through `useFeedbackStatusUndo` (stable) rather than a fresh function\n * per render, or every row's columns are rebuilt on each render (keksdose :667).\n */\nexport function useFeedbackColumns<T extends FeedbackTableRow>({\n mine,\n canEdit,\n onStatus,\n renderDate: renderDateProp,\n commit,\n votes,\n labels: labelsProp,\n}: UseFeedbackColumnsOptions): DataTableColumn<T>[] {\n const labels = useFeedbackPageLabels(labelsProp);\n const statusLabels = useFeedbackStatusLabels();\n const categoryLabels = useFeedbackCategoryLabels();\n const votesHeader = useKitLabels(\"feedbackPublic\", DEFAULT_FEEDBACK_PUBLIC_LABELS).columnVotes;\n const renderDate = useFeedbackRenderDate(renderDateProp);\n return useMemo(\n () =>\n feedbackColumns<T>({\n mine,\n canEdit,\n onStatus,\n renderDate,\n commit,\n labels,\n statusLabels,\n categoryLabels,\n votes,\n votesHeader,\n }),\n [mine, canEdit, onStatus, renderDate, commit, labels, statusLabels, categoryLabels, votes, votesHeader],\n );\n}\n\n/* ── The phone ──────────────────────────────────────────────────────────────── */\n\n/**\n * The phone list's day headers (keksdose feedback #325: the list \"grouped by date, like\n * the transactions list\"): `DataTable mobileGroupBy={feedbackMobileGroupBy(renderDate)}`.\n *\n * The key IS the header — the same string the card's date says. DataTable groups runs of\n * equal keys, so the rows must come newest first, as `GET /feedback` and\n * `GET /feedback/my` send them (§3.3).\n */\nexport function feedbackMobileGroupBy(\n renderDate: FeedbackRenderDate,\n): (row: Pick<FeedbackRecord, \"created_at\">) => string {\n return (row) => renderDate(row.created_at);\n}\n\nexport interface FeedbackMobileCardProps {\n row: FeedbackTableRow;\n /** Add the submitter after the date — the admin inbox (`canEdit`). On `/my-feedback`\n * every row is the viewer's own and the name would repeat down the list. */\n showSubmitter?: boolean;\n /** See {@link FeedbackRenderDate}; the same function as the columns' and the day\n * headers'. Default: the kit's ({@link useFeedbackRenderDate}). */\n renderDate?: FeedbackRenderDate;\n /** 0.38: the vote count as a chip beside the category — with `useFeedbackColumns`'\n * `votes`, whose column the phone hides. */\n votes?: boolean;\n /** Over the `feedbackPage` namespace. */\n labels?: LabelOverride<FeedbackPageLabels>;\n}\n\n/**\n * One report as a phone card (§4.3; keksdose :1042, feedback #325 rework: *\"compact card\n * instead of a wasteful label/value row per field\"*): the title with its environment and\n * rework chips and the status badge on one line, then the compact category badge, the\n * date and (admin) the submitter beneath.\n *\n * `DataTable mobileCard={(row) => <FeedbackMobileCard row={row} … />}`. It draws the\n * chips itself: with a `mobileCard`, DataTable never renders the `mobilePrimary` cell,\n * which is how keksdose's cards lost them.\n */\nexport function FeedbackMobileCard({\n row,\n showSubmitter = false,\n renderDate: renderDateProp,\n votes = false,\n labels: labelsProp,\n}: FeedbackMobileCardProps) {\n const labels = useFeedbackPageLabels(labelsProp);\n const renderDate = useFeedbackRenderDate(renderDateProp);\n return (\n <div className=\"min-w-0 space-y-1\">\n <div className=\"flex items-start justify-between gap-2\">\n <FeedbackSubject row={row} wrap labels={labels} className=\"flex-1\" />\n {/* The pill the desktop status column draws, so a status is the same colour and\n glyph on both layouts. */}\n <FeedbackStatusBadge status={row.status} className=\"shrink-0\" />\n </div>\n <div className=\"flex min-w-0 flex-wrap items-center gap-x-2 gap-y-0.5 text-xs text-muted\">\n <FeedbackCategoryBadge category={row.category} compact />\n {votes && <FeedbackVoteCount votes={row.votes ?? undefined} />}\n <FeedbackDate value={row.created_at} renderDate={renderDate} />\n {showSubmitter && (\n // The short id form: \"#7\" says enough on a card that has room for little.\n <span className=\"min-w-0 truncate\">\n · {feedbackSubmitter(row, { deletedUser: labels.deletedUser, userFallback: (id) => `#${id}` })}\n </span>\n )}\n </div>\n </div>\n );\n}\n\nexport interface FeedbackAwaitingToggleProps {\n /** Narrowed to what waits on the triager. Page state, not the URL (keksdose :699): a\n * thumb gesture on one screen, not a view worth linking to. */\n pressed: boolean;\n onPressedChange: (pressed: boolean) => void;\n /** Further `FloatingAction`s, after the toggle — the group is what makes them free. */\n children?: ReactNode;\n /** Default `bottom-end`, the register's corner. */\n corner?: FloatingCorner;\n /** Over the group's default distance from the bottom. */\n offset?: string;\n /** On the group. It is `md:hidden` already: the desktop has the status column's\n * filter, the same question asked where there is room for it. */\n className?: string;\n /** Over the `feedbackPage` namespace. */\n labels?: LabelOverride<FeedbackPageLabels>;\n}\n\n/**\n * The phone inbox's one filter button — **\"Only what is waiting for you\"** (§4.3;\n * keksdose live #330 rework: *\"a button that toggles the evaluation items (in evaluation,\n * test when live) as toggle button similar to the show/hide upcoming/scheduled for the tx\n * page\"*).\n *\n * It narrows TO `FEEDBACK_AWAITING_STATUSES` rather than hiding them: after a loop run\n * those ARE the queue — the rows handed back for a verdict — and everything else is\n * history. A `FloatingActionGroup` with one member anyway, in the register's corner and\n * shape (keksdose feedback #58), so a second action costs nothing; the glyph is\n * IN_EVALUATION's own, so the button reads in the vocabulary of the badges it filters on.\n *\n * Admin inbox only: on `/my-feedback` the author is not waiting on their own verdict.\n * The filtering is the page's — `rows.filter((r) => isFeedbackAwaiting(r.status))` —\n * so the table's own filters, sort and URL stay untouched.\n */\nexport function FeedbackAwaitingToggle({\n pressed,\n onPressedChange,\n children,\n corner,\n offset,\n className,\n labels: labelsProp,\n}: FeedbackAwaitingToggleProps) {\n const labels = useFeedbackPageLabels(labelsProp);\n const Icon = FEEDBACK_STATUS_META.IN_EVALUATION.icon;\n return (\n <FloatingActionGroup\n aria-label={labels.phoneActions}\n corner={corner}\n offset={offset}\n className={cn(\"md:hidden\", className)}\n >\n <FloatingAction\n label={labels.awaitingFilter}\n icon={<Icon aria-hidden />}\n pressed={pressed}\n onClick={() => onPressedChange(!pressed)}\n />\n {children}\n </FloatingActionGroup>\n );\n}\n\n/* ── Empty ──────────────────────────────────────────────────────────────────── */\n\nexport interface FeedbackEmptyStateProps {\n /** Over the `feedbackPage` namespace. */\n labels?: LabelOverride<FeedbackPageLabels>;\n}\n\n/**\n * The table with nothing to show (§7.13): the one word **None** / **Keine**, on both\n * pages — keksdose's `empty={t(\"common.none\")}` (`feedback-page.tsx:982`). No hint\n * beneath it: where reports are sent from is the feedback menu's business, and the inbox\n * needs no sentence to say it is empty.\n *\n * For `DataTable empty`, which sits in a centred, muted cell — so no box of its own.\n * keksdose passes it unconditionally, so a filter (or the awaiting toggle) that leaves\n * nothing says \"None\" too: `empty={<FeedbackEmptyState />}`.\n */\nexport function FeedbackEmptyState({ labels: labelsProp }: FeedbackEmptyStateProps) {\n const labels = useFeedbackPageLabels(labelsProp);\n return <span data-feedback-empty=\"\">{labels.empty}</span>;\n}\n"],"mappings":";AAoQqB,SA8CjB,UA9CiB,KA8CjB,YA9CiB;AApQrB,SAAS,eAAe;AAExB,SAAS,cAAc,gBAAgB;AACvC,SAAS,UAAU;AACnB,SAAS,kBAAkB;AAC3B,SAAS,uBAAuB,YAAY,cAAc;AAC1D,SAAS,qBAAqB,cAAc,YAAY,oBAAwC;AAEhG,SAAS,YAAY;AACrB,SAAS,eAAe;AACxB,SAAS,gBAAgB,2BAA2B;AAEpD,SAAS,wBAAwB;AAEjC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AACP;AAAA,EACE;AAAA,EACA;AAAA,OAGK;AACP;AAAA,EACE;AAAA,EACA;AAAA,OAGK;AAEP,SAAS,kBAAkB,wBAAwB;AAEnD,SAAS,oCAAoC;AAC7C,SAAS,sCAAsC;AA8FxC,SAAS,sBAAsB,QAAgE;AACpG,SAAO,aAAa,gBAAgB,8BAA8B,MAAM;AAC1E;AAuBA,SAAS,KAAK,OAAwB;AACpC,SAAO,OAAO,UAAU,WAAW,MAAM,KAAK,IAAI;AACpD;AAUO,SAAS,oBAAoB,SAA4D;AAC9F,QAAM,MAAM,KAAK,SAAS,WAAW;AACrC,SAAO,CAAC,OAAO,IAAI,YAAY,MAAM,SAAS,OAAO;AACvD;AASO,SAAS,kBACd,KACA,QACQ;AACR,MAAI,IAAI,WAAW,KAA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AAAA,EACA;AAAA,EACA;AAAA,EACA,QAAQ;AACV,GAAgC;AAC9B,QAAM,SAAS,sBAAsB,UAAU;AAC/C,QAAM,OAAO,qBAAqB,cAAc;AAChD,SACE;AAAA,IAAC;AAAA;AAAA,MACC,cAAY,OAAO;AAAA,MACnB;AAAA,MACA;AAAA,MACA,WAAW,GAAG,aAAa,SAAS;AAAA,MAEpC;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,OAAO,OAAO;AAAA,YACd,MAAM,oBAAC,QAAK,eAAW,MAAC;AAAA,YACxB;AAAA,YACA,SAAS,MAAM,gBAAgB,CAAC,OAAO;AAAA;AAAA,QACzC;AAAA,QACC;AAAA;AAAA;AAAA,EACH;AAEJ;AAmBO,SAAS,mBAAmB,EAAE,QAAQ,WAAW,GAA4B;AAClF,QAAM,SAAS,sBAAsB,UAAU;AAC/C,SAAO,oBAAC,UAAK,uBAAoB,IAAI,iBAAO,OAAM;AACpD;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/feedback/feedback-table.tsx"],"sourcesContent":["import { useCallback, useMemo } from \"react\";\nimport type { MouseEvent, ReactElement, ReactNode } from \"react\";\nimport { ExternalLink, ThumbsUp } from \"lucide-react\";\nimport { cn } from \"../lib/cn\";\nimport { useDayFormatter } from \"../lib/day-format\";\nimport { EMPTY_FORMATTED_VALUE } from \"../lib/format\";\nimport { useKitLabels, useKitLink, type LabelOverride } from \"../i18n/kit-labels\";\nimport type { KitLinkProps } from \"../i18n/kit-labels\";\nimport type { PathPattern } from \"../landing/routing\";\nimport { Chip } from \"../components/chip\";\nimport { CopyButton } from \"../components/copy-button\";\nimport { Tooltip } from \"../components/tooltip\";\nimport { FloatingAction, FloatingActionGroup } from \"../components/floating-panel\";\nimport type { FloatingCorner } from \"../components/floating-panel\";\nimport { pickLinkRenderer } from \"../components/text-link\";\nimport type { DataTableColumn } from \"../components/data-table\";\nimport {\n FEEDBACK_CATEGORY_ORDER,\n FEEDBACK_STATUS_META,\n FEEDBACK_STATUS_ORDER,\n FeedbackCategoryBadge,\n FeedbackStatusBadge,\n FeedbackStatusTransitions,\n feedbackCategoryRank,\n visibleFeedbackStatuses,\n type FeedbackStatus,\n} from \"./feedback-inbox\";\nimport {\n useFeedbackCategoryLabels,\n useFeedbackStatusLabels,\n type FeedbackCategoryLabels,\n type FeedbackStatusLabels,\n} from \"./feedback-labels\";\nimport {\n FEEDBACK_AWAITING_STATUSES,\n feedbackReworkCount,\n type FeedbackContext,\n type FeedbackRecord,\n} from \"./feedback-record\";\nimport type { FeedbackStatusChange } from \"./feedback-status-undo\";\nimport { feedbackPagePath, useFeedbackDetailLabels } from \"./feedback-row-detail\";\nimport { feedbackPage, feedbackPageLinkTarget } from \"./feedback-page-link\";\nimport type { CommitScope } from \"../components/write-lock\";\nimport { DEFAULT_FEEDBACK_PAGE_LABELS } from \"./feedback-table-labels\";\nimport { DEFAULT_FEEDBACK_PUBLIC_LABELS } from \"./feedback-public-labels\";\n\n/**\n * The two feedback pages' TABLE — `/feedback` (the admin inbox) and `/my-feedback` (the\n * user's own) — as the kit's parts: §4.3 of the feedback contract\n * (docs/feedback-harmonization.md), lifted from keksdose\n * `frontend/src/features/feedback/feedback-page.tsx` (columns :711–963, the phone card\n * :1038–1065, the awaiting toggle :689–709 and :1086–1101).\n *\n * Until 0.27 each app wrote this table itself, and the three had drifted exactly where a\n * table drifts: kastlan's showed five statuses and no environment, Kurvenschmiede's one\n * page served both audiences, and keksdose's — the canon, argued over a year of feedback\n * items — had a latent bug of its own: its subject cell carries the environment and\n * rework chips \"so a second attempt is marked on every surface at once\" (:760), but the\n * phone card is a `mobileCard`, and `DataTable` never renders the `mobilePrimary` cell\n * when `mobileCard` is set (data-table-mobile.tsx, `cardInner`). Its phone cards showed neither\n * chip. {@link FeedbackMobileCard} draws both itself, from the same\n * {@link FeedbackSubject} the column uses, so the two surfaces cannot part again.\n *\n * What stays the app's: the rows (its API client), who is an admin, the routes and the\n * `/feedback` → `/my-feedback` redirect, the `?row=` deep link and the row detail. What\n * is here: the nine columns ({@link feedbackColumns} / {@link useFeedbackColumns}), the\n * phone card and its day headers ({@link FeedbackMobileCard},\n * {@link feedbackMobileGroupBy}), the phone's \"Only what is waiting for you\" toggle\n * ({@link FeedbackAwaitingToggle}), the empty state ({@link FeedbackEmptyState}) and the\n * `feedbackPage` words. The swipes are `feedbackSwipePlan` (feedback-swipe.tsx), passed\n * by the app because whether the page may write is the app's call.\n */\n\n/* ── Labels ─────────────────────────────────────────────────────────────────── */\n\n/**\n * `feedbackPage` — the words of the two feedback pages (§4.3). The English is keksdose's\n * `en.json` (`feedback.*`, `common.none`); the de-CH canon is noted on each key (keksdose\n * `de-CH.json`, ss never ß).\n */\nexport interface FeedbackPageLabels {\n /** The admin inbox's page title, `/feedback` — the menu's \"Feedback inbox\" (0.40,\n * §10.2 decision 11; \"Feedback\" before). de-CH: \"Feedback-Eingang\" */\n title: string;\n /** The user's own list, `/my-feedback`. de-CH: \"Mein Feedback\" */\n myTitle: string;\n /** Column 1, the id. de-CH: \"#\" */\n columnId: string;\n /** Column 2, when it was filed. de-CH: \"Datum\" */\n columnDate: string;\n /** Column 3. de-CH: \"Kategorie\" */\n columnCategory: string;\n /** Column 4, the title with its chips. de-CH: \"Betreff\" */\n columnSubject: string;\n /** Column 5, who filed it. de-CH: \"Nutzer\" */\n columnUser: string;\n /** Column 6. de-CH: \"E-Mail\" */\n columnEmail: string;\n /** Column 7, the page it was filed from. de-CH: \"URL\" */\n columnUrl: string;\n /** Column 8. de-CH: \"Status\" */\n columnStatus: string;\n /** Column 9, when it was settled. de-CH: \"Erledigt am\" */\n columnResolved: string;\n /** What the URL cell's link does, said before the path to a screen reader.\n * de-CH: \"Seite öffnen\" */\n openPage: string;\n /** The table with nothing to show, on both pages (§7.13) — keksdose's `common.none`.\n * de-CH: \"Keine\" */\n empty: string;\n /** The submitter of a report whose account was erased (`user_id: null`, keksdose live\n * #275). de-CH: \"<gelöschter Nutzer>\" */\n deletedUser: string;\n /** The submitter when neither a name nor an email is known — `id` is `user_id`.\n * de-CH: \"Nutzer #{{id}}\" */\n userFallback: (id: number) => string;\n /** The chip for a report filed from a copy of the app that is not production —\n * `environment` is `context.environment` as filed (\"dev\", \"local\", or the app's own\n * word). Upper-cased like the top bar's environment badge, so the marker the tester saw\n * is the marker triage sees. Guarded: a context is untyped JSON, so a value that is no\n * string (an app calling it with `context.environment` as stored) is printed, never\n * thrown on. de-CH: the same. */\n environment: (environment: string) => string;\n /** The chip for a report sent back for rework — `count` ≥ 1 is how many times\n * (`reworkCount`, keksdose live #331). de-CH: \"Nacharbeit\" / \"Nacharbeit ×{{count}}\" */\n reworkChip: (count: number) => string;\n /** The phone toggle narrowing the inbox to IN_EVALUATION + NEEDS_LIVE_TEST.\n * de-CH: \"Nur was auf Sie wartet\" */\n awaitingFilter: string;\n /** The name of the phone's floating group that holds it. de-CH: \"Feedback-Aktionen\" */\n phoneActions: string;\n}\n\n// Defined in ./feedback-table-labels, which holds no component code (0.34, KS U8).\nexport { DEFAULT_FEEDBACK_PAGE_LABELS };\n\n/** `feedbackPage` resolved: English, then `<UiKitProvider labels>`, then `labels`. The\n * page's title comes from here too: `mine ? labels.myTitle : labels.title`. */\nexport function useFeedbackPageLabels(labels?: LabelOverride<FeedbackPageLabels>): FeedbackPageLabels {\n return useKitLabels(\"feedbackPage\", DEFAULT_FEEDBACK_PAGE_LABELS, labels);\n}\n\n/* ── Reading a row ──────────────────────────────────────────────────────────── */\n\n/** What the table reads off a report — {@link FeedbackRecord}'s fields, so an app's own\n * row type with more of them passes as it is. */\nexport type FeedbackTableRow = Pick<\n FeedbackRecord,\n | \"id\"\n | \"user_id\"\n | \"user_email\"\n | \"title\"\n | \"body\"\n | \"category\"\n | \"status\"\n | \"context\"\n | \"resolved_at\"\n | \"created_at\"\n | \"votes\"\n>;\n\n/** A context value as a trimmed string, or `\"\"` — every key is optional on read (§3.2)\n * and an app's own context type may say `unknown`. */\nfunction text(value: unknown): string {\n return typeof value === \"string\" ? value.trim() : \"\";\n}\n\n/**\n * The environment a report was filed from when it is NOT production, as filed — or\n * `null` (keksdose `environmentLabel`, :142). Production is silent, as the top bar's\n * badge is: the marker earns attention by being rare. A missing value is production too —\n * every row filed before a test copy existed, and crash rows filed before the crash\n * payload carried `environment` (§3.2, §3.6). An unknown value is shown rather than swallowed: an environment\n * nobody recognises is exactly when triage needs to see one.\n */\nexport function feedbackEnvironment(context: FeedbackContext | null | undefined): string | null {\n const env = text(context?.environment);\n return !env || env.toLowerCase() === \"prod\" ? null : env;\n}\n\n/**\n * Who filed a report, as one string (keksdose `submitterLabel`, :163): the display name,\n * else the email, else `userFallback(user_id)`. An erased account (`user_id: null`) is\n * `deletedUser` FIRST, ahead of the context: the server scrubs the name with the account,\n * but a row that somehow kept one must still not go on naming somebody who asked to be\n * forgotten. The joined `user_email` (admin list) is preferred to the context snapshot.\n */\nexport function feedbackSubmitter(\n row: Pick<FeedbackRecord, \"user_id\" | \"user_email\" | \"context\">,\n labels: Pick<FeedbackPageLabels, \"deletedUser\" | \"userFallback\">,\n): string {\n if (row.user_id == null) return labels.deletedUser;\n return (\n text(row.context?.user_display_name) ||\n text(row.user_email) ||\n text(row.context?.user_email) ||\n labels.userFallback(row.user_id)\n );\n}\n\n/**\n * The submitter's email (keksdose `submitterEmail`, :175): the joined `user_email` —\n * authoritative, the display name is self-chosen (feedback #108) — else the context\n * snapshot, which is what `/my-feedback` has (`GET /feedback/my` sends no join). `\"\"`\n * for an erased account, for the reason {@link feedbackSubmitter} gives.\n */\nexport function feedbackSubmitterEmail(row: Pick<FeedbackRecord, \"user_id\" | \"user_email\" | \"context\">): string {\n if (row.user_id == null) return \"\";\n return text(row.user_email) || text(row.context?.user_email);\n}\n\n/** Whether a status is one the phone's awaiting toggle keeps — `FEEDBACK_AWAITING_STATUSES`,\n * the two that wait on the person triaging. `rows.filter((r) => isFeedbackAwaiting(r.status))`. */\nexport function isFeedbackAwaiting(status: FeedbackStatus): boolean {\n return FEEDBACK_AWAITING_STATUSES.includes(status);\n}\n\n/* ── Dates ──────────────────────────────────────────────────────────────────── */\n\n/**\n * How the pages write a date: an ISO timestamp in, one string out. keksdose passes its\n * `useDateCell()` (the app's date-format preference, weekday and all — dev#546), which\n * fits as it is.\n *\n * ONE function for the date column, the resolved column, the phone card and the phone's\n * day headers, so the four cannot disagree (keksdose dev#546 round 3: the header is a\n * string and must say what the card says).\n */\nexport type FeedbackRenderDate = (iso: string) => string;\n\n/** The kit's own date, weekday included: \"Sun, 4 Oct 2026\" / \"So., 4. Okt. 2026\". A date\n * in a column carries its weekday (keksdose's rule, date-cell.tsx). */\nconst FEEDBACK_DATE_STYLE: Intl.DateTimeFormatOptions = {\n weekday: \"short\",\n day: \"numeric\",\n month: \"short\",\n year: \"numeric\",\n};\n\n/**\n * `renderDate` when the app gave one (and it answers), else the kit's: the\n * `<UiKitProvider formatDate>` when the app set one (called with the calendar day and\n * `weekday: true`, as `DateMark` calls it), else `Intl` in the provider's locale and\n * (0.52) time zone, with the weekday. An unparseable value is passed through rather than\n * hidden. The kit's one day ladder since 0.52 (refactor audit 2026-10-30, DUP-2), which\n * every date a kit component prints goes down.\n */\nexport function useFeedbackRenderDate(renderDate?: FeedbackRenderDate, locale?: string): FeedbackRenderDate {\n const day = useDayFormatter<string>(renderDate, locale);\n return useCallback<FeedbackRenderDate>((iso) => day(iso, { weekday: true, style: FEEDBACK_DATE_STYLE }), [day]);\n}\n\n/** A date in a cell: `<time>`, nowrap, tabular figures; \"—\" when there is none. */\nfunction FeedbackDate({ value, renderDate }: { value: string | null | undefined; renderDate: FeedbackRenderDate }) {\n if (!value) return <span className=\"text-placeholder\">{EMPTY_FORMATTED_VALUE}</span>;\n return (\n <time dateTime={value} className=\"whitespace-nowrap tabular-nums text-muted\">\n {renderDate(value)}\n </time>\n );\n}\n\n/** An instant for sorting; a value that does not parse sorts with the empty ones. */\nfunction instant(value: string | null | undefined): number | null {\n const ms = value ? Date.parse(value) : NaN;\n return Number.isNaN(ms) ? null : ms;\n}\n\n/* ── The subject: title + environment chip + rework chip ───────────────────── */\n\nexport interface FeedbackSubjectProps {\n /** `replies` (0.40): the chip counts the rework entries, else the body's blocks —\n * {@link feedbackReworkCount}. */\n row: Pick<FeedbackRecord, \"title\" | \"body\" | \"context\"> & Partial<Pick<FeedbackRecord, \"replies\">>;\n /**\n * `false` (default): one line — the title truncates and the chips stay whole, as a\n * table cell wants. `true`: the title wraps and the chips flow after its last word, as\n * the phone card wants (a phone shows the whole title or nothing useful).\n */\n wrap?: boolean;\n /** Over the `feedbackPage` namespace. */\n labels?: LabelOverride<FeedbackPageLabels>;\n className?: string;\n}\n\n/**\n * A report's title with its two chips (§4.3, column 4): the environment when it is not\n * production (keksdose's amber outline, the top bar's environment badge — the marker the\n * tester saw is the marker triage sees) and **Rework** / **Rework ×n** when the author has\n * sent it back (keksdose live #331: *\"have a new category for items in rework\"*, as a fact\n * derived from the body rather than a seventh status).\n *\n * No tooltip on either chip (keksdose dev#523): each already says what it means.\n */\nexport function FeedbackSubject({ row, wrap = false, labels: labelsProp, className }: FeedbackSubjectProps) {\n const labels = useFeedbackPageLabels(labelsProp);\n const env = feedbackEnvironment(row.context);\n const rounds = feedbackReworkCount(row);\n const chipClass = wrap ? \"ms-1.5 align-middle\" : \"shrink-0\";\n const chips = (\n <>\n {env && (\n <Chip size=\"sm\" variant=\"outline\" shape=\"square\" tone=\"warning\" caps className={chipClass} data-feedback-env=\"\">\n {labels.environment(env)}\n </Chip>\n )}\n {rounds > 0 && (\n <Chip size=\"sm\" tone=\"warning\" caps className={chipClass} data-feedback-rework={rounds}>\n {labels.reworkChip(rounds)}\n </Chip>\n )}\n </>\n );\n if (wrap) {\n return (\n <span className={cn(\"min-w-0 font-medium [overflow-wrap:anywhere]\", className)}>\n {row.title}\n {chips}\n </span>\n );\n }\n return (\n <span className={cn(\"inline-flex min-w-0 max-w-full items-center gap-1.5 large:items-start\", className)}>\n {/* One line at Normal; from Large up the title wraps rather than losing its end (text\n size §10.17 — the release sweep's first CI run found it cut on the showcase). */}\n <span className=\"min-w-0 truncate-until-large font-medium\">{row.title}</span>\n {chips}\n </span>\n );\n}\n\n/* ── The URL cell ───────────────────────────────────────────────────────────── */\n\n/**\n * The page a report was filed from, as a link — the cell keksdose's column 7 draws\n * (:850): the path as text and as the `href`, read from `context.url` else\n * `context.route` by the row detail's own reader (`feedbackPage`, feedback-page-link.ts),\n * so the column and the detail link the same page the same way. A real link through the\n * `<UiKitProvider linkComponent>` (the app's router, so it does not reload the app;\n * keksdose's plain `<a>` did), and its click stops at the cell so the row does not open\n * as well.\n *\n * Its name is the path, as on screen, with \"Open page\" said before it — keksdose's\n * `aria-label=\"Open page\"` replaced the path, so a screen reader heard forty identical\n * links down the column.\n *\n * The PATH alone (0.52 code review, feedback-page-link.ts): the query is the reporter's to\n * write, and `/login?next=%2Fjoin%3Ftoken%3D…` forwarded the admin's click to an\n * invitation. A one-shot route — `/join`, `/register`, `/verify-email`, `/reset-password`\n * and the app's `pageLinkExclude` — is the path as text with Copy, never a link (0.52,\n * refactor audit 2026-10-30, FLW-7): those routes act on load.\n */\nfunction FeedbackPageLinkCell({\n context,\n openPage,\n exclude,\n}: {\n context: FeedbackContext | null;\n openPage: string;\n exclude: readonly PathPattern[] | undefined;\n}) {\n const kitLink = useKitLink();\n const page = feedbackPage(context);\n if (!page) return <span className=\"text-placeholder\">{EMPTY_FORMATTED_VALUE}</span>;\n const href = feedbackPageLinkTarget(page, exclude);\n if (!href) return <FeedbackPageText path={page.path} url={page.url} />;\n const className =\n \"inline-flex min-w-0 max-w-full items-center gap-1 text-secondary hover:text-primary hover:underline\";\n const children = (\n <>\n {/* The space outside the hidden span: a flex container drops it from the layout,\n and the accessible name keeps it (\"Open page /accounts\"). */}\n <span className=\"sr-only\">{openPage}</span> <code className=\"min-w-0 truncate text-xs\">{page.path}</code>\n <ExternalLink className=\"size-3 shrink-0\" aria-hidden />\n </>\n );\n const onClick = (event: MouseEvent<HTMLAnchorElement>) => event.stopPropagation();\n const render = pickLinkRenderer<KitLinkProps>(undefined, kitLink, href);\n return render ? (\n <RenderedLink render={render} href={href} className={className} onClick={onClick}>\n {children}\n </RenderedLink>\n ) : (\n <a href={href} className={className} onClick={onClick}>\n {children}\n </a>\n );\n}\n\n/** A one-shot page in the URL column: its path to read, and Copy. A component of its own\n * so only such a row resolves the `feedbackDetail` words — every cell of a 270-row inbox\n * did, for a button only a one-shot row shows (0.52 code review, efficiency). */\nfunction FeedbackPageText({ path, url }: { path: string; url: string }) {\n const { copyUrl } = useFeedbackDetailLabels();\n return (\n <span className=\"inline-flex min-w-0 max-w-full items-center gap-1 text-secondary\" data-feedback-page-unlinked=\"\">\n <code className=\"min-w-0 truncate text-xs\">{path}</code>\n <CopyButton size=\"xs\" className=\"shrink-0\" text={url} label={copyUrl} stopPropagation />\n </span>\n );\n}\n\n/** The provider's link, drawn by a component declared once (as FloatingAction's). */\nfunction RenderedLink({ render, ...props }: KitLinkProps & { render: (props: KitLinkProps) => ReactElement }) {\n return render(props);\n}\n\n/* ── The columns ────────────────────────────────────────────────────────────── */\n\n/** What {@link feedbackColumns} takes — every word already resolved (see\n * {@link useFeedbackColumns}, which resolves them from the provider). */\nexport interface FeedbackColumnsOptions {\n /** `/my-feedback`. The same nine columns (one page component, §4.3), but the status\n * cell is read-only there whatever `canEdit` says — \"no status or outcome editing\n * there (also for an admin)\". */\n mine?: boolean;\n /** The admin on `/feedback` — the status cell offers its steps. Otherwise it shows them\n * read-only. */\n canEdit: boolean;\n /** The undoable status change, `useFeedbackStatusUndo(update.mutateAsync)` (§4.5) —\n * the same one the row detail and the swipes use. */\n onStatus: FeedbackStatusChange;\n /** See {@link FeedbackRenderDate}. */\n renderDate: FeedbackRenderDate;\n /** The status buttons SAVE when pressed: pass `true` to put them under the page's\n * `WriteLockProvider` (FeedbackStatusTransitions' `commit`). Off by default — a\n * feedback inbox is rarely what an app's lock is about. */\n commit?: CommitScope;\n labels: FeedbackPageLabels;\n statusLabels: FeedbackStatusLabels;\n categoryLabels: FeedbackCategoryLabels;\n /** 0.38 (§9.6): a sortable **Votes** column before Status — `row.votes`, a missing\n * one as 0 — hidden on the phone (the card's chip, {@link FeedbackMobileCardProps.votes},\n * carries it there). Off by default. */\n votes?: boolean;\n /** The Votes header — `feedbackPublic.columnVotes`, so the inbox and the public list\n * say the same ({@link useFeedbackColumns} reads it). Default \"Votes\". */\n votesHeader?: string;\n /**\n * 0.52 (FLW-7): the app's one-shot routes, ON TOP of the kit's — `/join`, `/register`,\n * `/verify-email`, `/reset-password` (a string is that path and everything under it, a\n * RegExp is tested on the path, as `useLastVisitedPage`'s `exclude`). The URL cell\n * shows such a page as text with Copy, never as a link; any other page links its path\n * alone. Keep it stable (module scope): it is a dependency of {@link useFeedbackColumns}'\n * memo.\n */\n pageLinkExclude?: readonly PathPattern[];\n}\n\n/** The vote count, a quiet chip with the thumb (§9.6) — the Votes cell and the card's. */\nfunction FeedbackVoteCount({ votes, className }: { votes: number | undefined; className?: string }) {\n return (\n <Chip size=\"sm\" className={className} data-feedback-vote-count={votes ?? 0}>\n <ThumbsUp className=\"size-3\" aria-hidden />\n <span className=\"tabular-nums\">{votes ?? 0}</span>\n </Chip>\n );\n}\n\n/** A status's place in the chain, unknown ones last (as `feedbackCategoryRank`). */\nfunction statusRank(status: FeedbackStatus): number {\n const at = FEEDBACK_STATUS_ORDER.indexOf(status);\n return at === -1 ? FEEDBACK_STATUS_ORDER.length : at;\n}\n\n/**\n * The nine columns of §4.3, in the contract's order, for `DataTable` — keksdose's\n * (:711–963) with the contract's changes:\n *\n * | # | key | cell | filter | phone |\n * |---|---|---|---|---|\n * | 1 | `id` | id, mono | number | hidden |\n * | 2 | `date` | `created_at`, weekday ({@link FeedbackRenderDate}) | date | |\n * | 3 | `category` | `FeedbackCategoryBadge`, sorted CRASH first | select, all five | |\n * | 4 | `title` | {@link FeedbackSubject} | text: title + environment | card heading |\n * | 5 | `user` | {@link feedbackSubmitter} | text: name + email, or \"deleted user\" | |\n * | 6 | `email` | {@link feedbackSubmitterEmail} | text | hidden |\n * | 7 | `url` | the page, a link (`noRowLink`) | text: path | hidden |\n * | 8 | `status` | `FeedbackStatusTransitions variant=\"icon\"`, `visibleFeedbackStatuses` | select, chain order | |\n * | 9 | `resolved` | `resolved_at` | date | hidden |\n *\n * - Both select filters list the WHOLE vocabulary in its own order, translated —\n * without `options` the popover lists the bare enum values found in the rows\n * (keksdose feedback #160), and kastlan's first CRASH row would otherwise appear in a\n * filter that never offered it.\n * - The status column owns the status filter, and only it (keksdose live #330's revert:\n * the phone's filter sheet already exposes every column filter).\n * - Fitted to the table's width (0.48, keksdose live #451): Subject `grow`s and\n * ellipsises, and a narrow table leaves out URL, then Email, then Resolved\n * (`fitPriority` 1–3) — the open report repeats all three — then Votes and Category\n * (4, 5), then User, Date and # (6–8, 0.51.4) before Subject would drop below 8rem\n * (`growMin`, 0.51.4; the table's default floor is 10).\n * Drop the two keys with\n * `{ ...col, grow: undefined, fitPriority: undefined }` for the 0.47 layout.\n * - `/my-feedback` shows the same nine: the Email cell's context fallback exists for it\n * (the admin list's join is absent there, §3.1), and its phone card drops the submitter\n * instead ({@link FeedbackMobileCardProps.showSubmitter}).\n *\n * Pure: hand it resolved words, or use {@link useFeedbackColumns}. Keys are stable, so\n * an app may drop or add a column (`columns.filter((c) => c.key !== \"email\")`).\n */\nexport function feedbackColumns<T extends FeedbackTableRow>({\n mine = false,\n canEdit,\n onStatus,\n renderDate,\n commit,\n labels,\n statusLabels,\n categoryLabels,\n votes = false,\n votesHeader = DEFAULT_FEEDBACK_PUBLIC_LABELS.columnVotes,\n pageLinkExclude,\n}: FeedbackColumnsOptions): DataTableColumn<T>[] {\n const editable = canEdit && !mine;\n const votesColumn: DataTableColumn<T>[] = votes\n ? [\n {\n key: \"votes\",\n header: votesHeader,\n className: \"whitespace-nowrap\",\n cell: (row) => <FeedbackVoteCount votes={row.votes ?? undefined} />,\n sortBy: (row) => row.votes ?? 0,\n filter: { type: \"number\", getValue: (row) => row.votes ?? 0 },\n mobileHidden: true,\n // Fourth to go (Kurvenschmiede S1, 0.48): with only the first three, Subject was\n // crushed to 24px at 1100px. Still reachable from the Columns panel.\n fitPriority: 4,\n },\n ]\n : [];\n return [\n {\n key: \"id\",\n header: labels.columnId,\n cell: (row) => <span className=\"font-mono text-xs text-muted\">{row.id}</span>,\n sortBy: (row) => row.id,\n filter: { type: \"number\", getValue: (row) => row.id },\n mobileHidden: true,\n // The very last to go (0.51.4, Kurvenschmiede): replies and the feedback loop name a\n // report by its number, so it stays while anything else can give way.\n fitPriority: 8,\n },\n {\n key: \"date\",\n header: labels.columnDate,\n cell: (row) => <FeedbackDate value={row.created_at} renderDate={renderDate} />,\n sortBy: (row) => instant(row.created_at),\n filter: { type: \"date\", getValue: (row) => row.created_at },\n // Seventh to go (0.51.4): the open report shows it.\n fitPriority: 7,\n },\n {\n key: \"category\",\n header: labels.columnCategory,\n cell: (row) => <FeedbackCategoryBadge category={row.category} label={categoryLabels[row.category]} />,\n sortBy: (row) => feedbackCategoryRank(row.category),\n filter: {\n type: \"select\",\n getValue: (row) => row.category,\n options: FEEDBACK_CATEGORY_ORDER.map((value) => ({ value, label: categoryLabels[value] })),\n },\n // Last to go (Kurvenschmiede S1, 0.48), before Subject would drop below 10rem:\n // the open report's Subject section repeats the badge.\n fitPriority: 5,\n },\n {\n key: \"title\",\n header: labels.columnSubject,\n cell: (row) => <FeedbackSubject row={row} labels={labels} />,\n sortBy: (row) => row.title,\n // Searchable by the environment too, so \"dev\" narrows to the test copy's reports —\n // a chip you can see but not filter by makes you read every row (keksdose :804).\n filterBy: (row) => {\n const env = feedbackEnvironment(row.context);\n return env ? `${row.title} ${labels.environment(env)}` : row.title;\n },\n mobilePrimary: true,\n // The rest of the row, one line and an ellipsis (0.48, keksdose live #451: one long\n // crash title pushed Status and the row actions off the edge).\n grow: true,\n // 8rem, not the table's 10 (0.51.4, Kurvenschmiede): at 768px beside a sidebar only\n // Subject, Status (a fixed 13.5rem) and the row actions are left, and they were up\n // to 20px too wide (Hungarian). A subject's first words carry it; the open report\n // has the rest.\n growMin: 8,\n },\n {\n key: \"user\",\n header: labels.columnUser,\n // At most 12rem, one line and an ellipsis, the whole value in the kit's Tooltip (0.48 build\n // review 2, keksdose N2): beside the grow Subject every other cell keeps one line, so\n // an email standing in for a missing name widened the column and cost Votes and\n // Category their room first. The open report shows both in full.\n cell: (row) => {\n const who = feedbackSubmitter(row, labels);\n return (\n <Tooltip label={who} portal lazy>\n <span className=\"block max-w-[12rem] truncate-until-large text-secondary\">{who}</span>\n </Tooltip>\n );\n },\n sortBy: (row) => feedbackSubmitter(row, labels),\n // Name AND email, so either finds the person; the erased ones by the placeholder\n // (their context holds no name any more).\n filterBy: (row) =>\n row.user_id == null ? labels.deletedUser : `${feedbackSubmitter(row, labels)} ${feedbackSubmitterEmail(row)}`,\n // Sixth to go (0.51.4, Kurvenschmiede): with only 1–5, Subject reached its floor while\n // #, Date and User were still drawn, and the inbox scrolled sideways from 768 to\n // ~1115px beside an open sidebar. The open report names the submitter.\n fitPriority: 6,\n },\n {\n key: \"email\",\n header: labels.columnEmail,\n // One line, like the URL beside it: keksdose's `break-all` let the browser squeeze\n // the column to its header and broke every address in two (\"user@exam / ple.test\"),\n // which made every row taller. Unbroken, a resized (pinned) column ellipsises it.\n className: \"whitespace-nowrap\",\n cell: (row) => {\n const email = feedbackSubmitterEmail(row);\n return email ? (\n <span className=\"text-secondary\">{email}</span>\n ) : (\n <span className=\"text-placeholder\">{EMPTY_FORMATTED_VALUE}</span>\n );\n },\n sortBy: feedbackSubmitterEmail,\n filterBy: feedbackSubmitterEmail,\n mobileHidden: true,\n // Second to go when the table is narrow: the open report shows the submitter.\n fitPriority: 2,\n },\n {\n key: \"url\",\n header: labels.columnUrl,\n // A cell only ellipsises what it is told not to wrap (keksdose live #348: the path\n // clipped mid-character \"behind the next column\").\n className: \"whitespace-nowrap\",\n // The cell IS a link, so the row's own permalink must never wrap it (keksdose\n // feedback #451: <a> in <a>, and \"open the page\" silently did nothing).\n noRowLink: true,\n cell: (row) => (\n <FeedbackPageLinkCell context={row.context} openPage={labels.openPage} exclude={pageLinkExclude} />\n ),\n sortBy: (row) => feedbackPagePath(row.context) ?? \"\",\n filterBy: (row) => feedbackPagePath(row.context) ?? \"\",\n mobileHidden: true,\n // First to go when the table is narrow (0.48): the open report repeats the page.\n fitPriority: 1,\n },\n ...votesColumn,\n {\n key: \"status\",\n header: labels.columnStatus,\n // A KNOWN width: at most six 28px icon buttons (from IN_PROGRESS or IN_EVALUATION:\n // one step either way and the three off the chain) — keksdose live #348 sized it\n // for five and the sixth pushed the column wider.\n className: \"w-[13.5rem] whitespace-nowrap\",\n cell: (row) => (\n <FeedbackStatusTransitions\n status={row.status}\n statuses={visibleFeedbackStatuses(row.status)}\n canEdit={editable}\n commit={commit}\n onPick={(status) => onStatus(row, status)}\n variant=\"icon\"\n label={(status) => statusLabels[status]}\n />\n ),\n sortBy: (row) => statusRank(row.status),\n filter: {\n type: \"select\",\n getValue: (row) => row.status,\n options: FEEDBACK_STATUS_ORDER.map((value) => ({ value, label: statusLabels[value] })),\n },\n },\n {\n key: \"resolved\",\n header: labels.columnResolved,\n cell: (row) => <FeedbackDate value={row.resolved_at} renderDate={renderDate} />,\n sortBy: (row) => instant(row.resolved_at),\n filter: { type: \"date\", getValue: (row) => row.resolved_at },\n mobileHidden: true,\n // Third to go (0.48).\n fitPriority: 3,\n },\n ];\n}\n\n/** What {@link useFeedbackColumns} takes: {@link FeedbackColumnsOptions} with the words\n * read from the provider, and `renderDate` optional. */\nexport interface UseFeedbackColumnsOptions extends Omit<\n FeedbackColumnsOptions,\n \"renderDate\" | \"labels\" | \"statusLabels\" | \"categoryLabels\" | \"votesHeader\"\n> {\n /** Default: the kit's date with the weekday ({@link useFeedbackRenderDate}). */\n renderDate?: FeedbackRenderDate;\n /** Over the `feedbackPage` namespace. Keep it stable (module scope or memoised): it is\n * a dependency of the memo. */\n labels?: LabelOverride<FeedbackPageLabels>;\n}\n\n/**\n * {@link feedbackColumns} with the `feedbackPage`, `feedbackStatus` and\n * `feedbackCategory` words from the provider, memoised on what it reads — pass\n * `update.mutateAsync` through `useFeedbackStatusUndo` (stable) rather than a fresh function\n * per render, or every row's columns are rebuilt on each render (keksdose :667).\n */\nexport function useFeedbackColumns<T extends FeedbackTableRow>({\n mine,\n canEdit,\n onStatus,\n renderDate: renderDateProp,\n commit,\n votes,\n pageLinkExclude,\n labels: labelsProp,\n}: UseFeedbackColumnsOptions): DataTableColumn<T>[] {\n const labels = useFeedbackPageLabels(labelsProp);\n const statusLabels = useFeedbackStatusLabels();\n const categoryLabels = useFeedbackCategoryLabels();\n const votesHeader = useKitLabels(\"feedbackPublic\", DEFAULT_FEEDBACK_PUBLIC_LABELS).columnVotes;\n const renderDate = useFeedbackRenderDate(renderDateProp);\n return useMemo(\n () =>\n feedbackColumns<T>({\n mine,\n canEdit,\n onStatus,\n renderDate,\n commit,\n labels,\n statusLabels,\n categoryLabels,\n votes,\n votesHeader,\n pageLinkExclude,\n }),\n [\n mine,\n canEdit,\n onStatus,\n renderDate,\n commit,\n labels,\n statusLabels,\n categoryLabels,\n votes,\n votesHeader,\n pageLinkExclude,\n ],\n );\n}\n\n/* ── The phone ──────────────────────────────────────────────────────────────── */\n\n/**\n * The phone list's day headers (keksdose feedback #325: the list \"grouped by date, like\n * the transactions list\"): `DataTable mobileGroupBy={feedbackMobileGroupBy(renderDate)}`.\n *\n * The key IS the header — the same string the card's date says. DataTable groups runs of\n * equal keys, so the rows must come newest first, as `GET /feedback` and\n * `GET /feedback/my` send them (§3.3).\n */\nexport function feedbackMobileGroupBy(\n renderDate: FeedbackRenderDate,\n): (row: Pick<FeedbackRecord, \"created_at\">) => string {\n return (row) => renderDate(row.created_at);\n}\n\nexport interface FeedbackMobileCardProps {\n row: FeedbackTableRow;\n /** Add the submitter after the date — the admin inbox (`canEdit`). On `/my-feedback`\n * every row is the viewer's own and the name would repeat down the list. */\n showSubmitter?: boolean;\n /** See {@link FeedbackRenderDate}; the same function as the columns' and the day\n * headers'. Default: the kit's ({@link useFeedbackRenderDate}). */\n renderDate?: FeedbackRenderDate;\n /** 0.38: the vote count as a chip beside the category — with `useFeedbackColumns`'\n * `votes`, whose column the phone hides. */\n votes?: boolean;\n /** Over the `feedbackPage` namespace. */\n labels?: LabelOverride<FeedbackPageLabels>;\n}\n\n/**\n * One report as a phone card (§4.3; keksdose :1042, feedback #325 rework: *\"compact card\n * instead of a wasteful label/value row per field\"*): the title with its environment and\n * rework chips and the status badge on one line, then the compact category badge, the\n * date and (admin) the submitter beneath.\n *\n * `DataTable mobileCard={(row) => <FeedbackMobileCard row={row} … />}`. It draws the\n * chips itself: with a `mobileCard`, DataTable never renders the `mobilePrimary` cell,\n * which is how keksdose's cards lost them.\n */\nexport function FeedbackMobileCard({\n row,\n showSubmitter = false,\n renderDate: renderDateProp,\n votes = false,\n labels: labelsProp,\n}: FeedbackMobileCardProps) {\n const labels = useFeedbackPageLabels(labelsProp);\n const renderDate = useFeedbackRenderDate(renderDateProp);\n return (\n <div className=\"min-w-0 space-y-1\">\n <div className=\"flex items-start justify-between gap-2\">\n <FeedbackSubject row={row} wrap labels={labels} className=\"flex-1\" />\n {/* The pill the desktop status column draws, so a status is the same colour and\n glyph on both layouts. */}\n <FeedbackStatusBadge status={row.status} className=\"shrink-0\" />\n </div>\n <div className=\"flex min-w-0 flex-wrap items-center gap-x-2 gap-y-0.5 text-xs text-muted\">\n <FeedbackCategoryBadge category={row.category} compact />\n {votes && <FeedbackVoteCount votes={row.votes ?? undefined} />}\n <FeedbackDate value={row.created_at} renderDate={renderDate} />\n {showSubmitter && (\n // The short id form: \"#7\" says enough on a card that has room for little.\n <span className=\"min-w-0 truncate\">\n · {feedbackSubmitter(row, { deletedUser: labels.deletedUser, userFallback: (id) => `#${id}` })}\n </span>\n )}\n </div>\n </div>\n );\n}\n\nexport interface FeedbackAwaitingToggleProps {\n /** Narrowed to what waits on the triager. Page state, not the URL (keksdose :699): a\n * thumb gesture on one screen, not a view worth linking to. */\n pressed: boolean;\n onPressedChange: (pressed: boolean) => void;\n /** Further `FloatingAction`s, after the toggle — the group is what makes them free. */\n children?: ReactNode;\n /** Default `bottom-end`, the register's corner. */\n corner?: FloatingCorner;\n /** Over the group's default distance from the bottom. */\n offset?: string;\n /** On the group. It is `md:hidden` already: the desktop has the status column's\n * filter, the same question asked where there is room for it. */\n className?: string;\n /** Over the `feedbackPage` namespace. */\n labels?: LabelOverride<FeedbackPageLabels>;\n}\n\n/**\n * The phone inbox's one filter button — **\"Only what is waiting for you\"** (§4.3;\n * keksdose live #330 rework: *\"a button that toggles the evaluation items (in evaluation,\n * test when live) as toggle button similar to the show/hide upcoming/scheduled for the tx\n * page\"*).\n *\n * It narrows TO `FEEDBACK_AWAITING_STATUSES` rather than hiding them: after a loop run\n * those ARE the queue — the rows handed back for a verdict — and everything else is\n * history. A `FloatingActionGroup` with one member anyway, in the register's corner and\n * shape (keksdose feedback #58), so a second action costs nothing; the glyph is\n * IN_EVALUATION's own, so the button reads in the vocabulary of the badges it filters on.\n *\n * Admin inbox only: on `/my-feedback` the author is not waiting on their own verdict.\n * The filtering is the page's — `rows.filter((r) => isFeedbackAwaiting(r.status))` —\n * so the table's own filters, sort and URL stay untouched.\n */\nexport function FeedbackAwaitingToggle({\n pressed,\n onPressedChange,\n children,\n corner,\n offset,\n className,\n labels: labelsProp,\n}: FeedbackAwaitingToggleProps) {\n const labels = useFeedbackPageLabels(labelsProp);\n const Icon = FEEDBACK_STATUS_META.IN_EVALUATION.icon;\n return (\n <FloatingActionGroup\n aria-label={labels.phoneActions}\n corner={corner}\n offset={offset}\n className={cn(\"md:hidden\", className)}\n >\n <FloatingAction\n label={labels.awaitingFilter}\n icon={<Icon aria-hidden />}\n pressed={pressed}\n onClick={() => onPressedChange(!pressed)}\n />\n {children}\n </FloatingActionGroup>\n );\n}\n\n/* ── Empty ──────────────────────────────────────────────────────────────────── */\n\nexport interface FeedbackEmptyStateProps {\n /** Over the `feedbackPage` namespace. */\n labels?: LabelOverride<FeedbackPageLabels>;\n}\n\n/**\n * The table with nothing to show (§7.13): the one word **None** / **Keine**, on both\n * pages — keksdose's `empty={t(\"common.none\")}` (`feedback-page.tsx:982`). No hint\n * beneath it: where reports are sent from is the feedback menu's business, and the inbox\n * needs no sentence to say it is empty.\n *\n * For `DataTable empty`, which sits in a centred, muted cell — so no box of its own.\n * keksdose passes it unconditionally, so a filter (or the awaiting toggle) that leaves\n * nothing says \"None\" too: `empty={<FeedbackEmptyState />}`.\n */\nexport function FeedbackEmptyState({ labels: labelsProp }: FeedbackEmptyStateProps) {\n const labels = useFeedbackPageLabels(labelsProp);\n return <span data-feedback-empty=\"\">{labels.empty}</span>;\n}\n"],"mappings":";AA8PqB,SA8CjB,UA9CiB,KA8CjB,YA9CiB;AA9PrB,SAAS,aAAa,eAAe;AAErC,SAAS,cAAc,gBAAgB;AACvC,SAAS,UAAU;AACnB,SAAS,uBAAuB;AAChC,SAAS,6BAA6B;AACtC,SAAS,cAAc,kBAAsC;AAG7D,SAAS,YAAY;AACrB,SAAS,kBAAkB;AAC3B,SAAS,eAAe;AACxB,SAAS,gBAAgB,2BAA2B;AAEpD,SAAS,wBAAwB;AAEjC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AACP;AAAA,EACE;AAAA,EACA;AAAA,OAGK;AACP;AAAA,EACE;AAAA,EACA;AAAA,OAGK;AAEP,SAAS,kBAAkB,+BAA+B;AAC1D,SAAS,cAAc,8BAA8B;AAErD,SAAS,oCAAoC;AAC7C,SAAS,sCAAsC;AA8FxC,SAAS,sBAAsB,QAAgE;AACpG,SAAO,aAAa,gBAAgB,8BAA8B,MAAM;AAC1E;AAuBA,SAAS,KAAK,OAAwB;AACpC,SAAO,OAAO,UAAU,WAAW,MAAM,KAAK,IAAI;AACpD;AAUO,SAAS,oBAAoB,SAA4D;AAC9F,QAAM,MAA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,SAAS,QAAW;AAAA,MAC5D,oBAAC,gBAAa,OAAO,IAAI,YAAY,YAAwB;AAAA,MAC5D;AAAA,MAEC,qBAAC,UAAK,WAAU,oBAAmB;AAAA;AAAA,QAC9B,kBAAkB,KAAK,EAAE,aAAa,OAAO,aAAa,cAAc,CAAC,OAAO,IAAI,EAAE,GAAG,CAAC;AAAA,SAC/F;AAAA,OAEJ;AAAA,KACF;AAEJ;AAoCO,SAAS,uBAAuB;AAAA,EACrC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,QAAQ;AACV,GAAgC;AAC9B,QAAM,SAAS,sBAAsB,UAAU;AAC/C,QAAM,OAAO,qBAAqB,cAAc;AAChD,SACE;AAAA,IAAC;AAAA;AAAA,MACC,cAAY,OAAO;AAAA,MACnB;AAAA,MACA;AAAA,MACA,WAAW,GAAG,aAAa,SAAS;AAAA,MAEpC;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,OAAO,OAAO;AAAA,YACd,MAAM,oBAAC,QAAK,eAAW,MAAC;AAAA,YACxB;AAAA,YACA,SAAS,MAAM,gBAAgB,CAAC,OAAO;AAAA;AAAA,QACzC;AAAA,QACC;AAAA;AAAA;AAAA,EACH;AAEJ;AAmBO,SAAS,mBAAmB,EAAE,QAAQ,WAAW,GAA4B;AAClF,QAAM,SAAS,sBAAsB,UAAU;AAC/C,SAAO,oBAAC,UAAK,uBAAoB,IAAI,iBAAO,OAAM;AACpD;","names":[]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ChatComposerLabels, FeedbackThreadLabels } from "./feedback-thread.js";
|
|
2
2
|
export declare const DEFAULT_FEEDBACK_THREAD_LABELS: FeedbackThreadLabels;
|
|
3
|
-
export declare const DEFAULT_FEEDBACK_COMPOSER_LABELS:
|
|
3
|
+
export declare const DEFAULT_FEEDBACK_COMPOSER_LABELS: ChatComposerLabels;
|