mirror of
https://github.com/jeffvli/feishin.git
synced 2026-06-10 22:32:17 +02:00
temp commit for breaking changes
This commit is contained in:
@@ -5,7 +5,7 @@ import { createWithEqualityFn } from 'zustand/traditional';
|
||||
import { DataTableProps } from '/@/renderer/store/settings.store';
|
||||
import { mergeOverridingColumns } from '/@/renderer/store/utils';
|
||||
import { AlbumArtistListArgs, AlbumArtistListSort, SortOrder } from '/@/shared/types/domain-types';
|
||||
import { ListDisplayType, TableColumn, TablePagination } from '/@/shared/types/types';
|
||||
import { ListDisplayType, ListPagination, TableColumn } from '/@/shared/types/types';
|
||||
|
||||
export type AlbumArtistListFilter = Omit<AlbumArtistListArgs['query'], 'limit' | 'startIndex'>;
|
||||
|
||||
@@ -33,7 +33,7 @@ type ListProps<T> = {
|
||||
};
|
||||
|
||||
type TableProps = DataTableProps & {
|
||||
pagination: TablePagination;
|
||||
pagination: ListPagination;
|
||||
scrollOffset: number;
|
||||
};
|
||||
|
||||
|
||||
@@ -3,7 +3,9 @@ import { immer } from 'zustand/middleware/immer';
|
||||
import { shallow } from 'zustand/shallow';
|
||||
import { createWithEqualityFn } from 'zustand/traditional';
|
||||
|
||||
import { DataTableProps, PersistedTableColumn } from '/@/renderer/store/settings.store';
|
||||
import { ItemTableListColumnConfig } from '/@/renderer/components/item-list/types';
|
||||
import { ListDeterministicArgs } from '/@/renderer/store';
|
||||
import { DataTableProps } from '/@/renderer/store/settings.store';
|
||||
import { mergeOverridingColumns } from '/@/renderer/store/utils';
|
||||
import {
|
||||
AlbumArtistListArgs,
|
||||
@@ -20,7 +22,7 @@ import {
|
||||
SongListSort,
|
||||
SortOrder,
|
||||
} from '/@/shared/types/domain-types';
|
||||
import { ListDisplayType, TableColumn, TablePagination } from '/@/shared/types/types';
|
||||
import { ListDisplayType, ListPagination, TableColumn } from '/@/shared/types/types';
|
||||
|
||||
export const generatePageKey = (page: string, id?: string) => {
|
||||
return id ? `${page}_${id}` : page;
|
||||
@@ -35,13 +37,14 @@ export type ListGridProps = {
|
||||
itemGap?: number;
|
||||
itemSize?: number;
|
||||
itemsPerRow?: number;
|
||||
scrollOffset?: number;
|
||||
};
|
||||
|
||||
export type ListItemProps<TFilter = any> = {
|
||||
display: ListDisplayType;
|
||||
filter: TFilter;
|
||||
grid?: ListGridProps;
|
||||
grid: ListGridProps;
|
||||
itemsPerPage: number;
|
||||
pagination: ListPagination;
|
||||
table: ListTableProps;
|
||||
};
|
||||
|
||||
@@ -67,9 +70,11 @@ export interface ListSlice extends ListState {
|
||||
setGrid: (args: ListDeterministicArgs & { data: Partial<ListGridProps> }) => void;
|
||||
setStore: (data: Partial<ListSlice>) => void;
|
||||
setTable: (args: ListDeterministicArgs & { data: Partial<ListTableProps> }) => void;
|
||||
setTableColumns: (args: ListDeterministicArgs & { data: PersistedTableColumn[] }) => void;
|
||||
setTableColumns: (
|
||||
args: ListDeterministicArgs & { data: ItemTableListColumnConfig[] },
|
||||
) => void;
|
||||
setTablePagination: (
|
||||
args: ListDeterministicArgs & { data: Partial<TablePagination> },
|
||||
args: ListDeterministicArgs & { data: Partial<ListPagination> },
|
||||
) => void;
|
||||
};
|
||||
}
|
||||
@@ -90,10 +95,7 @@ export interface ListState {
|
||||
};
|
||||
}
|
||||
|
||||
export type ListTableProps = DataTableProps & {
|
||||
pagination: TablePagination;
|
||||
scrollOffset: number;
|
||||
};
|
||||
export type ListTableProps = DataTableProps;
|
||||
|
||||
export type PlaylistListFilter = Omit<PlaylistListArgs['query'], 'limit' | 'startIndex'>;
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import { PlaylistListFilter, SongListFilter } from '/@/renderer/store/list.store
|
||||
import { DataTableProps } from '/@/renderer/store/settings.store';
|
||||
import { mergeOverridingColumns } from '/@/renderer/store/utils';
|
||||
import { PlaylistListSort, SortOrder } from '/@/shared/types/domain-types';
|
||||
import { ListDisplayType, TableColumn, TablePagination } from '/@/shared/types/types';
|
||||
import { ListDisplayType, TableColumn, ListPagination } from '/@/shared/types/types';
|
||||
|
||||
export interface PlaylistSlice extends PlaylistState {
|
||||
actions: {
|
||||
@@ -17,11 +17,11 @@ export interface PlaylistSlice extends PlaylistState {
|
||||
setGrid: (args: { data: Partial<ListGridProps> }) => void;
|
||||
setStore: (data: Partial<PlaylistSlice>) => void;
|
||||
setTable: (data: Partial<TableProps>) => void;
|
||||
setTablePagination: (args: { data: Partial<TablePagination> }) => void;
|
||||
setTablePagination: (args: { data: Partial<ListPagination> }) => void;
|
||||
};
|
||||
}
|
||||
|
||||
type DetailPaginationProps = TablePagination & {
|
||||
type DetailPaginationProps = ListPagination & {
|
||||
scrollOffset: number;
|
||||
};
|
||||
|
||||
@@ -54,7 +54,7 @@ interface PlaylistState {
|
||||
}
|
||||
|
||||
type TableProps = DataTableProps & {
|
||||
pagination: TablePagination;
|
||||
pagination: ListPagination;
|
||||
scrollOffset: number;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user