260706_01_ENH: DataTable 버그 수정 및 Date 관련 컴포넌트 추가
This commit is contained in:
27
.tooling/components/ui/calendar.tsx
Normal file
27
.tooling/components/ui/calendar.tsx
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
import type { HTMLAttributes } from "react";
|
||||||
|
import { cn } from "@/lib/utils";
|
||||||
|
|
||||||
|
export type CalendarDateRange = {
|
||||||
|
from?: Date;
|
||||||
|
to?: Date;
|
||||||
|
};
|
||||||
|
|
||||||
|
type CalendarBaseProps = Omit<HTMLAttributes<HTMLDivElement>, "onSelect">;
|
||||||
|
|
||||||
|
type CalendarSingleProps = CalendarBaseProps & {
|
||||||
|
mode: "single";
|
||||||
|
selected?: Date;
|
||||||
|
onSelect?: (date: Date | undefined) => void;
|
||||||
|
};
|
||||||
|
|
||||||
|
type CalendarRangeProps = CalendarBaseProps & {
|
||||||
|
mode: "range";
|
||||||
|
selected?: CalendarDateRange;
|
||||||
|
onSelect?: (range: CalendarDateRange | undefined) => void;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type CalendarProps = CalendarSingleProps | CalendarRangeProps;
|
||||||
|
|
||||||
|
export function Calendar({ className, ...props }: CalendarProps) {
|
||||||
|
return <div className={cn(className)} data-mode={props.mode} />;
|
||||||
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "kri-ui-registry",
|
"name": "kri-ui-registry",
|
||||||
"version": "0.2.0",
|
"version": "0.3.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"description": "KRI internal shadcn UI registry",
|
"description": "KRI internal shadcn UI registry",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ export function KriMultiSelect<T = unknown>({
|
|||||||
)
|
)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={cn('flex-none overflow-hidden', widthClassName, heightClassName)}>
|
<div className={cn('flex-none', widthClassName, heightClassName)}>
|
||||||
<MultiSelect<T>
|
<MultiSelect<T>
|
||||||
options={options}
|
options={options}
|
||||||
defaultValue={value}
|
defaultValue={value}
|
||||||
@@ -96,7 +96,7 @@ export function KriMultiSelect<T = unknown>({
|
|||||||
onSearchValueChange={onSearchValueChange}
|
onSearchValueChange={onSearchValueChange}
|
||||||
maxCount={maxCount}
|
maxCount={maxCount}
|
||||||
hideSelectAll={hideSelectAll}
|
hideSelectAll={hideSelectAll}
|
||||||
autoSize
|
autoSize={!widthClassName}
|
||||||
singleLine
|
singleLine
|
||||||
resetOnDefaultValueChange
|
resetOnDefaultValueChange
|
||||||
deduplicateOptions
|
deduplicateOptions
|
||||||
@@ -154,7 +154,7 @@ export function KriSingleSelect<T = unknown>({
|
|||||||
const selectedLabel = options.find((option) => option.value === value)?.label
|
const selectedLabel = options.find((option) => option.value === value)?.label
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={cn('flex-none overflow-hidden', widthClassName, heightClassName)}>
|
<div className={cn('flex-none', widthClassName, heightClassName)}>
|
||||||
<MultiSelect<T>
|
<MultiSelect<T>
|
||||||
ref={ref}
|
ref={ref}
|
||||||
options={options}
|
options={options}
|
||||||
@@ -194,7 +194,7 @@ export function KriSingleSelect<T = unknown>({
|
|||||||
preventDeselect={preventDeselect}
|
preventDeselect={preventDeselect}
|
||||||
hideOptionCheck={hideOptionCheck}
|
hideOptionCheck={hideOptionCheck}
|
||||||
hideSelectAll
|
hideSelectAll
|
||||||
autoSize
|
autoSize={!widthClassName}
|
||||||
singleLine
|
singleLine
|
||||||
closeOnSelect
|
closeOnSelect
|
||||||
resetOnDefaultValueChange
|
resetOnDefaultValueChange
|
||||||
|
|||||||
82
registry/components/KriDatePicker.tsx
Normal file
82
registry/components/KriDatePicker.tsx
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
"use client";
|
||||||
|
|
||||||
|
import {CalendarIcon, X} from "lucide-react";
|
||||||
|
import {Button} from "@/components/ui/button";
|
||||||
|
import {Calendar} from "@/components/ui/calendar";
|
||||||
|
import {Popover, PopoverContent, PopoverTrigger} from "@/components/ui/popover";
|
||||||
|
import {cn} from "@/lib/utils";
|
||||||
|
|
||||||
|
const parseDate = (value: string) => {
|
||||||
|
if (!value) return undefined
|
||||||
|
|
||||||
|
const [year, month, day] = value.split('-').map(Number)
|
||||||
|
if (!year || !month || !day) return undefined
|
||||||
|
|
||||||
|
const date = new Date(year, month - 1, day)
|
||||||
|
if (date.getFullYear() !== year || date.getMonth() !== month - 1 || date.getDate() !== day) {
|
||||||
|
return undefined
|
||||||
|
}
|
||||||
|
|
||||||
|
return date
|
||||||
|
}
|
||||||
|
|
||||||
|
const formatDate = (date: Date | undefined) => {
|
||||||
|
if (!date) return ''
|
||||||
|
|
||||||
|
const year = date.getFullYear()
|
||||||
|
const month = String(date.getMonth() + 1).padStart(2, '0')
|
||||||
|
const day = String(date.getDate()).padStart(2, '0')
|
||||||
|
|
||||||
|
return `${year}-${month}-${day}`
|
||||||
|
}
|
||||||
|
|
||||||
|
export function KriDatePicker({
|
||||||
|
value,
|
||||||
|
onChange,
|
||||||
|
placeholder = "날짜 선택",
|
||||||
|
className,
|
||||||
|
}: {
|
||||||
|
value: string;
|
||||||
|
onChange: (value: string) => void;
|
||||||
|
placeholder?: string;
|
||||||
|
className?: string;
|
||||||
|
}) {
|
||||||
|
const selected = parseDate(value);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className={cn("relative", className)}>
|
||||||
|
<Popover>
|
||||||
|
<PopoverTrigger asChild>
|
||||||
|
<Button
|
||||||
|
type="button"
|
||||||
|
variant="outline"
|
||||||
|
className={cn("h-9 w-full justify-start bg-white pr-8 text-left font-normal", !value && "text-muted-foreground")}
|
||||||
|
>
|
||||||
|
<CalendarIcon className="h-4 w-4" />
|
||||||
|
{selected ? formatDate(selected) : placeholder}
|
||||||
|
</Button>
|
||||||
|
</PopoverTrigger>
|
||||||
|
<PopoverContent className="w-auto p-0" align="start">
|
||||||
|
<Calendar
|
||||||
|
mode="single"
|
||||||
|
selected={selected}
|
||||||
|
onSelect={(date) => onChange(date ? formatDate(date) : "")}
|
||||||
|
/>
|
||||||
|
</PopoverContent>
|
||||||
|
</Popover>
|
||||||
|
{value && (
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
className="absolute right-2 top-1/2 inline-flex h-5 w-5 -translate-y-1/2 items-center justify-center rounded-full text-muted-foreground hover:bg-muted hover:text-foreground"
|
||||||
|
onClick={(event) => {
|
||||||
|
event.stopPropagation();
|
||||||
|
onChange("");
|
||||||
|
}}
|
||||||
|
aria-label="날짜 초기화"
|
||||||
|
>
|
||||||
|
<X className="h-3.5 w-3.5" />
|
||||||
|
</button>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -1,10 +1,8 @@
|
|||||||
'use client'
|
'use client'
|
||||||
|
|
||||||
import { useRef } from 'react'
|
import { CalendarIcon, X } from 'lucide-react'
|
||||||
import { CalendarDays, X } from 'lucide-react'
|
|
||||||
import { Button } from '@/components/ui/button'
|
import { Button } from '@/components/ui/button'
|
||||||
import { Input } from '@/components/ui/input'
|
import { Calendar } from '@/components/ui/calendar'
|
||||||
import { Label } from '@/components/ui/label'
|
|
||||||
import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover'
|
import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover'
|
||||||
import { cn } from '@/lib/utils'
|
import { cn } from '@/lib/utils'
|
||||||
|
|
||||||
@@ -23,6 +21,30 @@ export type KriDateRangePickerProps = {
|
|||||||
disabled?: boolean
|
disabled?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const parseDate = (value: string) => {
|
||||||
|
if (!value) return undefined
|
||||||
|
|
||||||
|
const [year, month, day] = value.split('-').map(Number)
|
||||||
|
if (!year || !month || !day) return undefined
|
||||||
|
|
||||||
|
const date = new Date(year, month - 1, day)
|
||||||
|
if (date.getFullYear() !== year || date.getMonth() !== month - 1 || date.getDate() !== day) {
|
||||||
|
return undefined
|
||||||
|
}
|
||||||
|
|
||||||
|
return date
|
||||||
|
}
|
||||||
|
|
||||||
|
const formatDate = (date: Date | undefined) => {
|
||||||
|
if (!date) return ''
|
||||||
|
|
||||||
|
const year = date.getFullYear()
|
||||||
|
const month = String(date.getMonth() + 1).padStart(2, '0')
|
||||||
|
const day = String(date.getDate()).padStart(2, '0')
|
||||||
|
|
||||||
|
return `${year}-${month}-${day}`
|
||||||
|
}
|
||||||
|
|
||||||
export function KriDateRangePicker({
|
export function KriDateRangePicker({
|
||||||
value,
|
value,
|
||||||
onChange,
|
onChange,
|
||||||
@@ -32,7 +54,11 @@ export function KriDateRangePicker({
|
|||||||
contentClassName,
|
contentClassName,
|
||||||
disabled = false,
|
disabled = false,
|
||||||
}: KriDateRangePickerProps) {
|
}: KriDateRangePickerProps) {
|
||||||
const toInputRef = useRef<HTMLInputElement | null>(null)
|
const selected = {
|
||||||
|
from: parseDate(value.from),
|
||||||
|
to: parseDate(value.to),
|
||||||
|
}
|
||||||
|
const selectedRange = selected.from || selected.to ? selected : undefined
|
||||||
|
|
||||||
const displayText = value.from && value.to
|
const displayText = value.from && value.to
|
||||||
? `${value.from} ~ ${value.to}`
|
? `${value.from} ~ ${value.to}`
|
||||||
@@ -43,76 +69,52 @@ export function KriDateRangePicker({
|
|||||||
: placeholder
|
: placeholder
|
||||||
|
|
||||||
const hasValue = value.from.length > 0 || value.to.length > 0
|
const hasValue = value.from.length > 0 || value.to.length > 0
|
||||||
const invalidRange = value.from.length > 0 && value.to.length > 0 && value.from > value.to
|
|
||||||
|
|
||||||
const focusAndOpenToDate = () => {
|
|
||||||
const input = toInputRef.current
|
|
||||||
if (!input) return
|
|
||||||
|
|
||||||
input.focus()
|
|
||||||
const inputWithPicker = input as HTMLInputElement & { showPicker?: () => void }
|
|
||||||
inputWithPicker.showPicker?.()
|
|
||||||
if (!inputWithPicker.showPicker) {
|
|
||||||
input.click()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={cn('flex items-center gap-2', className)}>
|
<div className={cn('relative', className)}>
|
||||||
<Popover>
|
<Popover>
|
||||||
<PopoverTrigger asChild>
|
<PopoverTrigger asChild>
|
||||||
<Button
|
<Button
|
||||||
type="button"
|
type="button"
|
||||||
variant="outline"
|
variant="outline"
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
className={cn('justify-start min-w-[260px] font-normal', triggerClassName)}
|
className={cn(
|
||||||
|
'h-9 w-full justify-start bg-white pr-8 text-left font-normal',
|
||||||
|
!hasValue && 'text-muted-foreground',
|
||||||
|
triggerClassName,
|
||||||
|
)}
|
||||||
>
|
>
|
||||||
<CalendarDays className="w-4 h-4" />
|
<CalendarIcon className="h-4 w-4" />
|
||||||
<span className="truncate">{displayText}</span>
|
<span className="truncate">{displayText}</span>
|
||||||
</Button>
|
</Button>
|
||||||
</PopoverTrigger>
|
</PopoverTrigger>
|
||||||
<PopoverContent align="start" className={cn('w-[360px] space-y-3', contentClassName)}>
|
<PopoverContent className={cn('w-auto p-0', contentClassName)} align="start">
|
||||||
<Label className="font-semibold">조회 기간</Label>
|
<Calendar
|
||||||
|
mode="range"
|
||||||
<div className="flex items-center gap-2">
|
selected={selectedRange}
|
||||||
<Input
|
onSelect={(range) => {
|
||||||
type="date"
|
onChange({
|
||||||
value={value.from}
|
from: formatDate(range?.from),
|
||||||
onChange={(e) => {
|
to: formatDate(range?.to),
|
||||||
const nextFrom = e.target.value
|
})
|
||||||
onChange({ ...value, from: nextFrom })
|
}}
|
||||||
if (nextFrom) {
|
/>
|
||||||
requestAnimationFrame(() => {
|
|
||||||
focusAndOpenToDate()
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
<span className="text-sm text-muted-foreground">~</span>
|
|
||||||
<Input
|
|
||||||
ref={toInputRef}
|
|
||||||
type="date"
|
|
||||||
value={value.to}
|
|
||||||
onChange={(e) => onChange({ ...value, to: e.target.value })}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{invalidRange && (
|
|
||||||
<p className="text-xs text-red-600">조회 시작일은 종료일보다 이후일 수 없습니다.</p>
|
|
||||||
)}
|
|
||||||
</PopoverContent>
|
</PopoverContent>
|
||||||
</Popover>
|
</Popover>
|
||||||
|
|
||||||
<Button
|
{hasValue && !disabled ? (
|
||||||
type="button"
|
<button
|
||||||
variant="ghost"
|
type="button"
|
||||||
size="icon-sm"
|
className="absolute right-2 top-1/2 inline-flex h-5 w-5 -translate-y-1/2 items-center justify-center rounded-full text-muted-foreground hover:bg-muted hover:text-foreground"
|
||||||
onClick={() => onChange({ from: '', to: '' })}
|
onClick={(event) => {
|
||||||
disabled={disabled || !hasValue}
|
event.stopPropagation()
|
||||||
aria-label="조회 기간 초기화"
|
onChange({ from: '', to: '' })
|
||||||
>
|
}}
|
||||||
<X className="w-4 h-4" />
|
aria-label="조회 기간 초기화"
|
||||||
</Button>
|
>
|
||||||
|
<X className="h-3.5 w-3.5" />
|
||||||
|
</button>
|
||||||
|
) : null}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
103
registry/components/KriDateTimePicker.tsx
Normal file
103
registry/components/KriDateTimePicker.tsx
Normal file
@@ -0,0 +1,103 @@
|
|||||||
|
'use client'
|
||||||
|
|
||||||
|
import { CalendarIcon, X } from 'lucide-react'
|
||||||
|
import { Button } from '@/components/ui/button'
|
||||||
|
import { Calendar } from '@/components/ui/calendar'
|
||||||
|
import { Input } from '@/components/ui/input'
|
||||||
|
import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover'
|
||||||
|
import { cn } from '@/lib/utils'
|
||||||
|
|
||||||
|
export type KriDateTimePickerProps = {
|
||||||
|
value: string
|
||||||
|
onChange: (value: string) => void
|
||||||
|
placeholder?: string
|
||||||
|
className?: string
|
||||||
|
triggerClassName?: string
|
||||||
|
contentClassName?: string
|
||||||
|
disabled?: boolean
|
||||||
|
}
|
||||||
|
|
||||||
|
// value는 <input type="datetime-local">과 동일한 'yyyy-MM-ddTHH:mm' 포맷을 쓴다
|
||||||
|
const parseDateTime = (value: string): { date: Date | undefined; time: string } => {
|
||||||
|
if (!value) return { date: undefined, time: '' }
|
||||||
|
|
||||||
|
const [datePart, timePart = ''] = value.split('T')
|
||||||
|
const [year, month, day] = datePart.split('-').map(Number)
|
||||||
|
if (!year || !month || !day) return { date: undefined, time: timePart }
|
||||||
|
|
||||||
|
const date = new Date(year, month - 1, day)
|
||||||
|
if (date.getFullYear() !== year || date.getMonth() !== month - 1 || date.getDate() !== day) {
|
||||||
|
return { date: undefined, time: timePart }
|
||||||
|
}
|
||||||
|
|
||||||
|
return { date, time: timePart }
|
||||||
|
}
|
||||||
|
|
||||||
|
const toValue = (date: Date | undefined, time: string): string => {
|
||||||
|
if (!date) return ''
|
||||||
|
|
||||||
|
const year = date.getFullYear()
|
||||||
|
const month = String(date.getMonth() + 1).padStart(2, '0')
|
||||||
|
const day = String(date.getDate()).padStart(2, '0')
|
||||||
|
|
||||||
|
return `${year}-${month}-${day}T${time || '00:00'}`
|
||||||
|
}
|
||||||
|
|
||||||
|
export function KriDateTimePicker({
|
||||||
|
value,
|
||||||
|
onChange,
|
||||||
|
placeholder = '날짜/시간 선택',
|
||||||
|
className,
|
||||||
|
triggerClassName,
|
||||||
|
contentClassName,
|
||||||
|
disabled = false,
|
||||||
|
}: KriDateTimePickerProps) {
|
||||||
|
const { date, time } = parseDateTime(value)
|
||||||
|
const hasValue = date !== undefined
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className={cn('flex items-center gap-2', className)}>
|
||||||
|
<Popover>
|
||||||
|
<PopoverTrigger asChild>
|
||||||
|
<Button
|
||||||
|
type="button"
|
||||||
|
variant="outline"
|
||||||
|
disabled={disabled}
|
||||||
|
className={cn(
|
||||||
|
'w-40 justify-start bg-white text-left font-normal',
|
||||||
|
!hasValue && 'text-muted-foreground',
|
||||||
|
triggerClassName,
|
||||||
|
)}
|
||||||
|
>
|
||||||
|
<CalendarIcon className="h-4 w-4" />
|
||||||
|
<span className="truncate">{hasValue ? value.split('T')[0] : placeholder}</span>
|
||||||
|
</Button>
|
||||||
|
</PopoverTrigger>
|
||||||
|
<PopoverContent className={cn('w-auto p-0', contentClassName)} align="start">
|
||||||
|
<Calendar mode="single" selected={date} onSelect={(nextDate) => onChange(toValue(nextDate, time || '00:00'))} />
|
||||||
|
</PopoverContent>
|
||||||
|
</Popover>
|
||||||
|
|
||||||
|
<Input
|
||||||
|
type="time"
|
||||||
|
className="w-32"
|
||||||
|
value={time}
|
||||||
|
disabled={disabled || !hasValue}
|
||||||
|
onChange={(event) => onChange(toValue(date, event.target.value))}
|
||||||
|
/>
|
||||||
|
|
||||||
|
{hasValue && !disabled ? (
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
className="inline-flex h-5 w-5 items-center justify-center rounded-full text-muted-foreground hover:bg-muted hover:text-foreground"
|
||||||
|
onClick={() => onChange('')}
|
||||||
|
aria-label="날짜/시간 초기화"
|
||||||
|
>
|
||||||
|
<X className="h-3.5 w-3.5" />
|
||||||
|
</button>
|
||||||
|
) : null}
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default KriDateTimePicker
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
'use client'
|
'use client'
|
||||||
|
|
||||||
import { useEffect, useMemo, useState } from 'react'
|
import { useCallback, useEffect, useMemo, useState } from 'react'
|
||||||
import type { PaginationState, Row, RowSelectionState, SortingState } from '@tanstack/react-table'
|
import type { OnChangeFn, PaginationState, Row, RowSelectionState, SortingState } from '@tanstack/react-table'
|
||||||
import { flexRender, getCoreRowModel, getPaginationRowModel, getSortedRowModel, useReactTable } from '@tanstack/react-table'
|
import { flexRender, getCoreRowModel, getPaginationRowModel, getSortedRowModel, useReactTable } from '@tanstack/react-table'
|
||||||
import { ArrowDown, ArrowUp, ArrowUpDown } from 'lucide-react'
|
import { ArrowDown, ArrowUp, ArrowUpDown } from 'lucide-react'
|
||||||
import { Button } from '@/components/ui/button'
|
import { Button } from '@/components/ui/button'
|
||||||
@@ -13,25 +13,26 @@ import { DataTablePagination } from './DataTablePagination'
|
|||||||
import { usePreventClickOnDrag } from './hooks/usePreventClickOnDrag'
|
import { usePreventClickOnDrag } from './hooks/usePreventClickOnDrag'
|
||||||
|
|
||||||
export function DataTable<TData, TValue = unknown>({
|
export function DataTable<TData, TValue = unknown>({
|
||||||
columns,
|
columns,
|
||||||
data,
|
data,
|
||||||
getRowId,
|
getRowId,
|
||||||
highlightRowIds,
|
highlightRowIds,
|
||||||
isClient = true,
|
isClient = true,
|
||||||
pageCount: serverPageCount,
|
pageCount: serverPageCount,
|
||||||
totalCount: serverTotalCount,
|
totalCount: serverTotalCount,
|
||||||
onPaginationChange: onServerPaginationChange,
|
pagination: externalPagination,
|
||||||
onSortingChange: onServerSortingChange,
|
onPaginationChange: onServerPaginationChange,
|
||||||
selectMode = 'none',
|
onSortingChange: onServerSortingChange,
|
||||||
onRowClick,
|
selectMode = 'none',
|
||||||
onRowSelectionChange,
|
onRowClick,
|
||||||
defaultPageSize = 10,
|
onRowSelectionChange,
|
||||||
pageSizeOptions = [5, 10, 25, 50],
|
defaultPageSize = 10,
|
||||||
paginationItemsToDisplay = 5,
|
pageSizeOptions = [5, 10, 25, 50],
|
||||||
emptyText = '데이터가 없습니다.',
|
paginationItemsToDisplay = 5,
|
||||||
className,
|
emptyText = '데이터가 없습니다.',
|
||||||
}: Readonly<DataTableProps<TData, TValue>>) {
|
className,
|
||||||
const [pagination, setPagination] = useState<PaginationState>({ pageIndex: 0, pageSize: defaultPageSize })
|
}: Readonly<DataTableProps<TData, TValue>>) {
|
||||||
|
const [internalPagination, setInternalPagination] = useState<PaginationState>({ pageIndex: 0, pageSize: defaultPageSize })
|
||||||
const [sorting, setSorting] = useState<SortingState>([])
|
const [sorting, setSorting] = useState<SortingState>([])
|
||||||
const [rowSelection, setRowSelection] = useState<RowSelectionState>({})
|
const [rowSelection, setRowSelection] = useState<RowSelectionState>({})
|
||||||
const drag = usePreventClickOnDrag()
|
const drag = usePreventClickOnDrag()
|
||||||
@@ -43,22 +44,22 @@ export function DataTable<TData, TValue = unknown>({
|
|||||||
const selectionColumn = {
|
const selectionColumn = {
|
||||||
id: 'select',
|
id: 'select',
|
||||||
header: ({ table }) => selectMode === 'multi' ? (
|
header: ({ table }) => selectMode === 'multi' ? (
|
||||||
<Checkbox
|
<Checkbox
|
||||||
checked={table.getIsAllPageRowsSelected() || (table.getIsSomePageRowsSelected() && 'indeterminate')}
|
checked={table.getIsAllPageRowsSelected() || (table.getIsSomePageRowsSelected() && 'indeterminate')}
|
||||||
onCheckedChange={(value) => table.toggleAllPageRowsSelected(Boolean(value))}
|
onCheckedChange={(value) => table.toggleAllPageRowsSelected(Boolean(value))}
|
||||||
aria-label="전체 선택"
|
aria-label="전체 선택"
|
||||||
/>
|
/>
|
||||||
) : null,
|
) : null,
|
||||||
cell: ({ row }) => (
|
cell: ({ row }) => (
|
||||||
<Checkbox
|
<Checkbox
|
||||||
checked={row.getIsSelected()}
|
checked={row.getIsSelected()}
|
||||||
onCheckedChange={(value) => {
|
onCheckedChange={(value) => {
|
||||||
if (selectMode === 'single') table.resetRowSelection()
|
if (selectMode === 'single') table.resetRowSelection()
|
||||||
row.toggleSelected(Boolean(value))
|
row.toggleSelected(Boolean(value))
|
||||||
}}
|
}}
|
||||||
aria-label="행 선택"
|
aria-label="행 선택"
|
||||||
onClick={(event) => event.stopPropagation()}
|
onClick={(event) => event.stopPropagation()}
|
||||||
/>
|
/>
|
||||||
),
|
),
|
||||||
size: 28,
|
size: 28,
|
||||||
enableSorting: false,
|
enableSorting: false,
|
||||||
@@ -67,6 +68,25 @@ export function DataTable<TData, TValue = unknown>({
|
|||||||
return [selectionColumn, ...columns]
|
return [selectionColumn, ...columns]
|
||||||
}, [columns, selectMode, selectionEnabled])
|
}, [columns, selectMode, selectionEnabled])
|
||||||
|
|
||||||
|
const pagination = isClient ? internalPagination : (externalPagination ?? internalPagination)
|
||||||
|
|
||||||
|
const handlePaginationChange = useCallback<OnChangeFn<PaginationState>>(
|
||||||
|
(updater) => {
|
||||||
|
if (isClient) {
|
||||||
|
setInternalPagination(updater)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if (onServerPaginationChange) {
|
||||||
|
onServerPaginationChange(updater)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
setInternalPagination(updater)
|
||||||
|
},
|
||||||
|
[isClient, onServerPaginationChange],
|
||||||
|
)
|
||||||
|
|
||||||
const table = useReactTable({
|
const table = useReactTable({
|
||||||
data,
|
data,
|
||||||
columns: enhancedColumns,
|
columns: enhancedColumns,
|
||||||
@@ -75,7 +95,7 @@ export function DataTable<TData, TValue = unknown>({
|
|||||||
enableRowSelection: selectionEnabled,
|
enableRowSelection: selectionEnabled,
|
||||||
onRowSelectionChange: setRowSelection,
|
onRowSelectionChange: setRowSelection,
|
||||||
onSortingChange: setSorting,
|
onSortingChange: setSorting,
|
||||||
onPaginationChange: setPagination,
|
onPaginationChange: handlePaginationChange,
|
||||||
getCoreRowModel: getCoreRowModel(),
|
getCoreRowModel: getCoreRowModel(),
|
||||||
getSortedRowModel: isClient ? getSortedRowModel() : undefined,
|
getSortedRowModel: isClient ? getSortedRowModel() : undefined,
|
||||||
getPaginationRowModel: isClient ? getPaginationRowModel() : undefined,
|
getPaginationRowModel: isClient ? getPaginationRowModel() : undefined,
|
||||||
@@ -85,10 +105,6 @@ export function DataTable<TData, TValue = unknown>({
|
|||||||
...(getRowId ? { getRowId } : {}),
|
...(getRowId ? { getRowId } : {}),
|
||||||
})
|
})
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if (!isClient) onServerPaginationChange?.(pagination)
|
|
||||||
}, [isClient, onServerPaginationChange, pagination])
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!isClient) onServerSortingChange?.(sorting)
|
if (!isClient) onServerSortingChange?.(sorting)
|
||||||
}, [isClient, onServerSortingChange, sorting])
|
}, [isClient, onServerSortingChange, sorting])
|
||||||
@@ -115,68 +131,68 @@ export function DataTable<TData, TValue = unknown>({
|
|||||||
const totalCount = isClient ? data.length : (serverTotalCount ?? 0)
|
const totalCount = isClient ? data.length : (serverTotalCount ?? 0)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={cn('w-full space-y-4', className)}>
|
<div className={cn('w-full space-y-4', className)}>
|
||||||
<div className="rounded-md border">
|
<div className="rounded-md border">
|
||||||
<Table>
|
<Table>
|
||||||
<TableHeader>
|
<TableHeader>
|
||||||
{table.getHeaderGroups().map((headerGroup) => (
|
{table.getHeaderGroups().map((headerGroup) => (
|
||||||
<TableRow key={headerGroup.id} className="hover:bg-transparent">
|
<TableRow key={headerGroup.id} className="hover:bg-transparent">
|
||||||
{headerGroup.headers.map((header) => {
|
{headerGroup.headers.map((header) => {
|
||||||
const column = header.column
|
const column = header.column
|
||||||
const sorted = column.getIsSorted()
|
const sorted = column.getIsSorted()
|
||||||
const content = header.isPlaceholder ? null : flexRender(column.columnDef.header, header.getContext())
|
const content = header.isPlaceholder ? null : flexRender(column.columnDef.header, header.getContext())
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<TableHead
|
<TableHead
|
||||||
key={header.id}
|
key={header.id}
|
||||||
className={cn('text-base font-semibold text-foreground', column.id === 'actions' && 'w-[140px] text-center')}
|
className={cn('text-base font-semibold text-foreground', column.id === 'actions' && 'w-[140px] text-center')}
|
||||||
style={{ width: header.getSize() !== 150 ? header.getSize() : undefined }}
|
style={{ width: header.getSize() !== 150 ? header.getSize() : undefined }}
|
||||||
>
|
>
|
||||||
{!header.isPlaceholder && column.getCanSort() ? (
|
{!header.isPlaceholder && column.getCanSort() ? (
|
||||||
<Button type="button" variant="ghost" className="flex gap-1 px-0 text-base font-semibold" onClick={column.getToggleSortingHandler()}>
|
<Button type="button" variant="ghost" className="flex gap-1 px-0 text-base font-semibold" onClick={column.getToggleSortingHandler()}>
|
||||||
<span>{content}</span>
|
<span>{content}</span>
|
||||||
{sorted === 'asc' ? <ArrowUp className="size-3" /> : sorted === 'desc' ? <ArrowDown className="size-3" /> : <ArrowUpDown className="text-muted-foreground size-3" />}
|
{sorted === 'asc' ? <ArrowUp className="size-3" /> : sorted === 'desc' ? <ArrowDown className="size-3" /> : <ArrowUpDown className="text-muted-foreground size-3" />}
|
||||||
</Button>
|
</Button>
|
||||||
) : content}
|
) : content}
|
||||||
</TableHead>
|
</TableHead>
|
||||||
)
|
)
|
||||||
})}
|
})}
|
||||||
</TableRow>
|
</TableRow>
|
||||||
))}
|
))}
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<TableBody>
|
<TableBody>
|
||||||
{table.getRowModel().rows.length ? table.getRowModel().rows.map((row) => (
|
{table.getRowModel().rows.length ? table.getRowModel().rows.map((row) => (
|
||||||
<TableRow
|
<TableRow
|
||||||
key={row.id}
|
key={row.id}
|
||||||
data-state={row.getIsSelected() ? 'selected' : undefined}
|
data-state={row.getIsSelected() ? 'selected' : undefined}
|
||||||
onPointerDown={drag.onPointerDown}
|
onPointerDown={drag.onPointerDown}
|
||||||
onPointerMove={drag.onPointerMove}
|
onPointerMove={drag.onPointerMove}
|
||||||
onPointerUp={drag.onPointerUp}
|
onPointerUp={drag.onPointerUp}
|
||||||
onPointerCancel={drag.onPointerCancel}
|
onPointerCancel={drag.onPointerCancel}
|
||||||
onClick={drag.wrapClick(() => handleRowClick(row))}
|
onClick={drag.wrapClick(() => handleRowClick(row))}
|
||||||
className={cn(
|
className={cn(
|
||||||
'text-sm [&>td]:px-2 [&>td]:py-0',
|
'text-sm [&>td]:px-2 [&>td]:py-0',
|
||||||
selectMode !== 'none' && 'cursor-pointer',
|
selectMode !== 'none' && 'cursor-pointer',
|
||||||
'data-[state=selected]:bg-muted data-[state=selected]:font-semibold',
|
'data-[state=selected]:bg-muted data-[state=selected]:font-semibold',
|
||||||
highlightRowIds?.includes(row.id) && 'bg-emerald-50',
|
highlightRowIds?.includes(row.id) && 'bg-emerald-50',
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{row.getVisibleCells().map((cell) => <TableCell key={cell.id}>{flexRender(cell.column.columnDef.cell, cell.getContext())}</TableCell>)}
|
{row.getVisibleCells().map((cell) => <TableCell key={cell.id}>{flexRender(cell.column.columnDef.cell, cell.getContext())}</TableCell>)}
|
||||||
</TableRow>
|
</TableRow>
|
||||||
)) : (
|
)) : (
|
||||||
<TableRow><TableCell colSpan={enhancedColumns.length} className="h-24 text-center">{emptyText}</TableCell></TableRow>
|
<TableRow><TableCell colSpan={enhancedColumns.length} className="h-24 text-center">{emptyText}</TableCell></TableRow>
|
||||||
)}
|
)}
|
||||||
</TableBody>
|
</TableBody>
|
||||||
</Table>
|
</Table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<DataTablePagination
|
||||||
|
table={table}
|
||||||
|
isClient={isClient}
|
||||||
|
totalCount={totalCount}
|
||||||
|
pageSizeOptions={pageSizeOptions}
|
||||||
|
paginationItemsToDisplay={paginationItemsToDisplay}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<DataTablePagination
|
|
||||||
table={table}
|
|
||||||
isClient={isClient}
|
|
||||||
totalCount={totalCount}
|
|
||||||
pageSizeOptions={pageSizeOptions}
|
|
||||||
paginationItemsToDisplay={paginationItemsToDisplay}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { ColumnDef, PaginationState, SortingState } from '@tanstack/react-table'
|
import type { ColumnDef, PaginationState, SortingState, Updater } from '@tanstack/react-table'
|
||||||
|
|
||||||
export type SelectMode = 'none' | 'click-event' | 'single' | 'multi'
|
export type SelectMode = 'none' | 'click-event' | 'single' | 'multi'
|
||||||
export type DataTableColumn<TData, TValue = unknown> = ColumnDef<TData, TValue>
|
export type DataTableColumn<TData, TValue = unknown> = ColumnDef<TData, TValue>
|
||||||
@@ -23,7 +23,8 @@ export interface DataTableProps<TData, TValue = unknown> {
|
|||||||
isClient?: boolean
|
isClient?: boolean
|
||||||
pageCount?: number
|
pageCount?: number
|
||||||
totalCount?: number
|
totalCount?: number
|
||||||
onPaginationChange?: (pagination: PaginationState) => void
|
pagination?: PaginationState
|
||||||
|
onPaginationChange?: (updater: Updater<PaginationState>) => void
|
||||||
onSortingChange?: (sorting: SortingState) => void
|
onSortingChange?: (sorting: SortingState) => void
|
||||||
selectMode?: SelectMode
|
selectMode?: SelectMode
|
||||||
onRowClick?: (row: TData) => void
|
onRowClick?: (row: TData) => void
|
||||||
|
|||||||
@@ -16,12 +16,14 @@ interface DataTablePaginationProps<TData> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function DataTablePagination<TData>({
|
export function DataTablePagination<TData>({
|
||||||
table,
|
table,
|
||||||
isClient,
|
isClient,
|
||||||
totalCount,
|
totalCount,
|
||||||
pageSizeOptions,
|
pageSizeOptions,
|
||||||
paginationItemsToDisplay,
|
paginationItemsToDisplay,
|
||||||
}: DataTablePaginationProps<TData>) {
|
}: DataTablePaginationProps<TData>) {
|
||||||
|
'use no memo'
|
||||||
|
|
||||||
const currentPage = table.getState().pagination.pageIndex + 1
|
const currentPage = table.getState().pagination.pageIndex + 1
|
||||||
const pageCount = table.getPageCount()
|
const pageCount = table.getPageCount()
|
||||||
const { pages, showLeftEllipsis, showRightEllipsis } = usePagination({
|
const { pages, showLeftEllipsis, showRightEllipsis } = usePagination({
|
||||||
@@ -31,66 +33,66 @@ export function DataTablePagination<TData>({
|
|||||||
})
|
})
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex items-center justify-between gap-3 p-2 pt-0 max-sm:flex-col">
|
<div className="flex items-center justify-between gap-3 p-2 pt-0 max-sm:flex-col">
|
||||||
<p className="text-muted-foreground flex-1 whitespace-nowrap text-sm" aria-live="polite">
|
<p className="text-muted-foreground flex-1 whitespace-nowrap text-sm" aria-live="polite">
|
||||||
Page <span className="text-foreground">{currentPage}</span> of{' '}
|
Page <span className="text-foreground">{currentPage}</span> of{' '}
|
||||||
<span className="text-foreground">{pageCount}</span>
|
<span className="text-foreground">{pageCount}</span>
|
||||||
{!isClient && totalCount > 0 ? (
|
{!isClient && totalCount > 0 ? (
|
||||||
<span className="ml-2">(총 <span className="text-foreground">{totalCount}</span>건)</span>
|
<span className="ml-2">(총 <span className="text-foreground">{totalCount}</span>건)</span>
|
||||||
) : null}
|
) : null}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div className="grow">
|
<div className="grow">
|
||||||
<Pagination>
|
<Pagination>
|
||||||
<PaginationContent>
|
<PaginationContent>
|
||||||
<PaginationItem>
|
<PaginationItem>
|
||||||
<Button size="icon" variant="outline" onClick={() => table.firstPage()} disabled={!table.getCanPreviousPage()} aria-label="첫 페이지">
|
<Button size="icon" variant="outline" onClick={() => table.firstPage()} disabled={!table.getCanPreviousPage()} aria-label="첫 페이지">
|
||||||
<ChevronsLeftIcon aria-hidden="true" />
|
<ChevronsLeftIcon aria-hidden="true" />
|
||||||
</Button>
|
|
||||||
</PaginationItem>
|
|
||||||
<PaginationItem>
|
|
||||||
<Button size="icon" variant="outline" onClick={() => table.previousPage()} disabled={!table.getCanPreviousPage()} aria-label="이전 페이지">
|
|
||||||
<ChevronLeftIcon aria-hidden="true" />
|
|
||||||
</Button>
|
|
||||||
</PaginationItem>
|
|
||||||
{showLeftEllipsis ? <PaginationItem><PaginationEllipsis /></PaginationItem> : null}
|
|
||||||
{pages.map((page) => (
|
|
||||||
<PaginationItem key={page}>
|
|
||||||
<Button
|
|
||||||
size="icon"
|
|
||||||
variant={page === currentPage ? 'default' : 'ghost'}
|
|
||||||
onClick={() => table.setPageIndex(page - 1)}
|
|
||||||
aria-current={page === currentPage ? 'page' : undefined}
|
|
||||||
>
|
|
||||||
{page}
|
|
||||||
</Button>
|
</Button>
|
||||||
</PaginationItem>
|
</PaginationItem>
|
||||||
))}
|
<PaginationItem>
|
||||||
{showRightEllipsis ? <PaginationItem><PaginationEllipsis /></PaginationItem> : null}
|
<Button size="icon" variant="outline" onClick={() => table.previousPage()} disabled={!table.getCanPreviousPage()} aria-label="이전 페이지">
|
||||||
<PaginationItem>
|
<ChevronLeftIcon aria-hidden="true" />
|
||||||
<Button size="icon" variant="outline" onClick={() => table.nextPage()} disabled={!table.getCanNextPage()} aria-label="다음 페이지">
|
</Button>
|
||||||
<ChevronRightIcon aria-hidden="true" />
|
</PaginationItem>
|
||||||
</Button>
|
{showLeftEllipsis ? <PaginationItem><PaginationEllipsis /></PaginationItem> : null}
|
||||||
</PaginationItem>
|
{pages.map((page) => (
|
||||||
<PaginationItem>
|
<PaginationItem key={page}>
|
||||||
<Button size="icon" variant="outline" onClick={() => table.lastPage()} disabled={!table.getCanNextPage()} aria-label="마지막 페이지">
|
<Button
|
||||||
<ChevronsRightIcon aria-hidden="true" />
|
size="icon"
|
||||||
</Button>
|
variant={page === currentPage ? 'default' : 'ghost'}
|
||||||
</PaginationItem>
|
onClick={() => table.setPageIndex(page - 1)}
|
||||||
</PaginationContent>
|
aria-current={page === currentPage ? 'page' : undefined}
|
||||||
</Pagination>
|
>
|
||||||
</div>
|
{page}
|
||||||
|
</Button>
|
||||||
|
</PaginationItem>
|
||||||
|
))}
|
||||||
|
{showRightEllipsis ? <PaginationItem><PaginationEllipsis /></PaginationItem> : null}
|
||||||
|
<PaginationItem>
|
||||||
|
<Button size="icon" variant="outline" onClick={() => table.nextPage()} disabled={!table.getCanNextPage()} aria-label="다음 페이지">
|
||||||
|
<ChevronRightIcon aria-hidden="true" />
|
||||||
|
</Button>
|
||||||
|
</PaginationItem>
|
||||||
|
<PaginationItem>
|
||||||
|
<Button size="icon" variant="outline" onClick={() => table.lastPage()} disabled={!table.getCanNextPage()} aria-label="마지막 페이지">
|
||||||
|
<ChevronsRightIcon aria-hidden="true" />
|
||||||
|
</Button>
|
||||||
|
</PaginationItem>
|
||||||
|
</PaginationContent>
|
||||||
|
</Pagination>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div className="flex flex-1 justify-end">
|
<div className="flex flex-1 justify-end">
|
||||||
<Select value={String(table.getState().pagination.pageSize)} onValueChange={(value) => table.setPageSize(Number(value))}>
|
<Select value={String(table.getState().pagination.pageSize)} onValueChange={(value) => table.setPageSize(Number(value))}>
|
||||||
<SelectTrigger className="w-fit whitespace-nowrap" aria-label="페이지당 개수">
|
<SelectTrigger className="w-fit whitespace-nowrap" aria-label="페이지당 개수">
|
||||||
<SelectValue placeholder="페이지당 개수" />
|
<SelectValue placeholder="페이지당 개수" />
|
||||||
</SelectTrigger>
|
</SelectTrigger>
|
||||||
<SelectContent>
|
<SelectContent>
|
||||||
{pageSizeOptions.map((size) => <SelectItem key={size} value={String(size)}>{size} / page</SelectItem>)}
|
{pageSizeOptions.map((size) => <SelectItem key={size} value={String(size)}>{size} / page</SelectItem>)}
|
||||||
</SelectContent>
|
</SelectContent>
|
||||||
</Select>
|
</Select>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,15 +22,15 @@ export function usePreventClickOnDrag(thresholdPx = 6) {
|
|||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
const wrapClick = React.useCallback(
|
const wrapClick = React.useCallback(
|
||||||
(callback: () => void) => (event: React.MouseEvent) => {
|
(callback: () => void) => (event: React.MouseEvent) => {
|
||||||
if (state.current.dragging) {
|
if (state.current.dragging) {
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
event.stopPropagation()
|
event.stopPropagation()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
callback()
|
callback()
|
||||||
},
|
},
|
||||||
[],
|
[],
|
||||||
)
|
)
|
||||||
|
|
||||||
return { onPointerDown, onPointerMove, onPointerUp, onPointerCancel: onPointerUp, wrapClick }
|
return { onPointerDown, onPointerMove, onPointerUp, onPointerCancel: onPointerUp, wrapClick }
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ export function KriHeader({
|
|||||||
) : null}
|
) : null}
|
||||||
|
|
||||||
{logo ? (
|
{logo ? (
|
||||||
<button type="button" className="flex shrink-0 items-center" onClick={() => onNavigate?.(homePath)}>
|
<button type="button" className="flex shrink-0 items-center cursor-pointer" onClick={() => onNavigate?.(homePath)}>
|
||||||
{logo}
|
{logo}
|
||||||
</button>
|
</button>
|
||||||
) : null}
|
) : null}
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ function OptionItem<T>({
|
|||||||
value={`${option.label} ${option.value}`}
|
value={`${option.label} ${option.value}`}
|
||||||
disabled={option.disabled}
|
disabled={option.disabled}
|
||||||
onSelect={onToggle}
|
onSelect={onToggle}
|
||||||
className="flex items-center"
|
className="flex items-center cursor-pointer"
|
||||||
>
|
>
|
||||||
{!hideOptionCheck ? (
|
{!hideOptionCheck ? (
|
||||||
<span
|
<span
|
||||||
@@ -124,7 +124,7 @@ export function MultiSelectContent<T>({
|
|||||||
{selectionMode === 'multiple' && !hideSelectAll && selectableOptions.length > 0 ? (
|
{selectionMode === 'multiple' && !hideSelectAll && selectableOptions.length > 0 ? (
|
||||||
<>
|
<>
|
||||||
<CommandGroup>
|
<CommandGroup>
|
||||||
<CommandItem value="__kri_select_all__" onSelect={onToggleAll}>
|
<CommandItem className="cursor-pointer" value="__kri_select_all__" onSelect={onToggleAll}>
|
||||||
<span
|
<span
|
||||||
className={cn(
|
className={cn(
|
||||||
'border-primary flex size-4 items-center justify-center rounded-sm border',
|
'border-primary flex size-4 items-center justify-center rounded-sm border',
|
||||||
|
|||||||
@@ -24,8 +24,7 @@
|
|||||||
"description": "시작일과 종료일을 선택하고 초기화할 수 있는 KRI 공통 날짜 범위 컴포넌트입니다.",
|
"description": "시작일과 종료일을 선택하고 초기화할 수 있는 KRI 공통 날짜 범위 컴포넌트입니다.",
|
||||||
"registryDependencies": [
|
"registryDependencies": [
|
||||||
"button",
|
"button",
|
||||||
"input",
|
"calendar",
|
||||||
"label",
|
|
||||||
"popover"
|
"popover"
|
||||||
],
|
],
|
||||||
"dependencies": [
|
"dependencies": [
|
||||||
|
|||||||
Reference in New Issue
Block a user