@akinon/next 1.42.0-rc.5 → 1.42.0-rc.7
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/CHANGELOG.md +8 -0
- package/components/pagination.tsx +1 -2
- package/data/client/api.ts +1 -1
- package/package.json +2 -2
- package/types/index.ts +19 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { MouseEvent, useCallback, useEffect, useState } from 'react';
|
|
4
|
-
import { PaginationProps } from '
|
|
4
|
+
import { PaginationProps } from '../types';
|
|
5
5
|
import { twMerge } from 'tailwind-merge';
|
|
6
6
|
import clsx from 'clsx';
|
|
7
|
-
|
|
8
7
|
import usePagination from '@akinon/next/hooks/use-pagination';
|
|
9
8
|
import { useLocalization } from '@akinon/next/hooks';
|
|
10
9
|
import { useRouter } from '@akinon/next/hooks';
|
package/data/client/api.ts
CHANGED
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from '@reduxjs/toolkit/query/react';
|
|
10
10
|
import settings from 'settings';
|
|
11
11
|
import { getCookie } from '../../utils';
|
|
12
|
-
import { RootState } from '
|
|
12
|
+
import { RootState } from 'redux/store';
|
|
13
13
|
|
|
14
14
|
interface CustomBaseQueryApi extends BaseQueryApi {
|
|
15
15
|
getState: () => RootState;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akinon/next",
|
|
3
3
|
"description": "Core package for Project Zero Next",
|
|
4
|
-
"version": "1.42.0-rc.
|
|
4
|
+
"version": "1.42.0-rc.7",
|
|
5
5
|
"private": false,
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"bin": {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"set-cookie-parser": "2.6.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@akinon/eslint-plugin-projectzero": "1.42.0-rc.
|
|
33
|
+
"@akinon/eslint-plugin-projectzero": "1.42.0-rc.7",
|
|
34
34
|
"@types/react-redux": "7.1.30",
|
|
35
35
|
"@types/set-cookie-parser": "2.4.7",
|
|
36
36
|
"@typescript-eslint/eslint-plugin": "6.7.4",
|
package/types/index.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { LocaleUrlStrategy } from '../localization';
|
|
|
2
2
|
import { PzNextRequest } from '../middlewares';
|
|
3
3
|
import { Control, FieldError } from 'react-hook-form';
|
|
4
4
|
import { ReactNode } from 'react';
|
|
5
|
-
|
|
5
|
+
import { UsePaginationType } from '../hooks/use-pagination';
|
|
6
6
|
declare global {
|
|
7
7
|
interface Window {
|
|
8
8
|
// we did it like this because declare types needs to be identical, if not it will fail
|
|
@@ -291,3 +291,21 @@ export interface AccordionProps {
|
|
|
291
291
|
export interface PluginModuleComponentProps {
|
|
292
292
|
settings?: Record<string, any>;
|
|
293
293
|
}
|
|
294
|
+
|
|
295
|
+
export interface PaginationProps {
|
|
296
|
+
total: number | undefined;
|
|
297
|
+
limit?: number | undefined;
|
|
298
|
+
currentPage: number | undefined;
|
|
299
|
+
numberOfPages?: number | undefined;
|
|
300
|
+
containerClassName?: string;
|
|
301
|
+
moreButtonClassName?: string;
|
|
302
|
+
prevClassName?: string;
|
|
303
|
+
nextClassName?: string;
|
|
304
|
+
pageClassName?: string;
|
|
305
|
+
threshold?: number | undefined;
|
|
306
|
+
delta?: number | undefined;
|
|
307
|
+
render?: (pagination: UsePaginationType) => ReactNode;
|
|
308
|
+
type?: 'infinite' | 'list' | 'more';
|
|
309
|
+
onPageChange?: (page: number) => void;
|
|
310
|
+
direction?: 'next' | 'prev';
|
|
311
|
+
}
|