このコミットが含まれているのは:
@@ -21,21 +21,18 @@ import { countsErrorMessage, countsExportLabels } from '@/lib/countsDisplay'
|
||||
import { isApiError } from '@/lib/api'
|
||||
import { CountsDefinitionContext, countsAxisFields, countsAxisLabel,
|
||||
visibleCountsResources, countsFieldLabel,
|
||||
fetchCountsDefinition }
|
||||
from '@/lib/countsDefinitions'
|
||||
fetchCountsDefinition } from '@/lib/countsDefinitions'
|
||||
import { countsKeys } from '@/lib/queryKeys'
|
||||
import { setCountState, readCountState } from '@/lib/queryState'
|
||||
import { cn } from '@/lib/utils'
|
||||
import { useClientMotion } from '@/lib/useClientMotion'
|
||||
import useDialogue from '@/lib/dialogues/useDialogue'
|
||||
import { useLocale } from '@/lib/useLocale'
|
||||
import { useUITranslation } from '@/lib/useUITranslation'
|
||||
|
||||
import { setCountState, readCountState } from '@/lib/queryState'
|
||||
|
||||
import type { CountField, CountsResource } from '@/lib/counts'
|
||||
import type { CountsAxis, CountsDefinition } from '@/lib/countsDefinitions'
|
||||
|
||||
import type { CountsResource } from '@/lib/counts'
|
||||
|
||||
type PendingCountsRun = {
|
||||
key: ReturnType<typeof countsKeys.index>
|
||||
origin: string
|
||||
@@ -44,7 +41,8 @@ type PendingCountsRun = {
|
||||
|
||||
|
||||
const tooManyColumns = (failure: unknown): number | null => {
|
||||
if (!isApiError (failure) || failure.response?.status !== 422) return null
|
||||
if (!isApiError (failure) || failure.response?.status !== 422)
|
||||
return null
|
||||
const body = (failure.response.data ?? { }) as {
|
||||
error?: unknown; maxColumns?: unknown; max_columns?: unknown }
|
||||
const maximum = body.maxColumns ?? body.max_columns
|
||||
@@ -251,7 +249,9 @@ const CountsResourceContent = (
|
||||
setParams (next)
|
||||
}
|
||||
const download = async (format: 'csv' | 'json') => {
|
||||
if (exportInFlight.current || pendingRun.current != null || definition == null) return
|
||||
if (exportInFlight.current || pendingRun.current != null || definition == null)
|
||||
return
|
||||
|
||||
exportInFlight.current = true
|
||||
setExporting (true)
|
||||
setExportError (false)
|
||||
@@ -259,7 +259,7 @@ const CountsResourceContent = (
|
||||
{
|
||||
const axes = [...readCountState<CountsAxis[]> (params, 'rows', []),
|
||||
...readCountState<CountsAxis[]> (params, 'cols', [])]
|
||||
const fields = mode === 'summary' ? [
|
||||
const fields: CountField[] = mode === 'summary' ? [
|
||||
...axes.map (axis => ({
|
||||
key: axis.field, label: countsFieldLabel (axis.field) })),
|
||||
{ key: 'count', label: 'count' }]
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする