@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 CHANGED
@@ -1,5 +1,13 @@
1
1
  # @akinon/next
2
2
 
3
+ ## 1.42.0-rc.7
4
+
5
+ ## 1.42.0-rc.6
6
+
7
+ ### Minor Changes
8
+
9
+ - 146ea39: ZERO-2774: Update imports
10
+
3
11
  ## 1.42.0-rc.5
4
12
 
5
13
  ## 1.42.0-rc.4
@@ -1,10 +1,9 @@
1
1
  'use client';
2
2
 
3
3
  import { MouseEvent, useCallback, useEffect, useState } from 'react';
4
- import { PaginationProps } from '@theme/components/types';
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';
@@ -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 '@theme/redux/store';
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.5",
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.5",
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
+ }