@akinon/next 1.51.0 → 1.52.0

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,14 @@
1
1
  # @akinon/next
2
2
 
3
+ ## 1.52.0
4
+
5
+ ### Minor Changes
6
+
7
+ - d8dd8dc: ZERO-2729: Audit packages for yarn and npm and also update app-template
8
+ - 8d9ac9a: ZERO-2794: Add field to order type
9
+ - 016d379: ZERO-2729: Update packages and force update dependencies using resolutions
10
+ - 146ea39: ZERO-2774: Update imports
11
+
3
12
  ## 1.51.0
4
13
 
5
14
  ### Minor Changes
@@ -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.51.0",
4
+ "version": "1.52.0",
5
5
  "private": false,
6
6
  "license": "MIT",
7
7
  "bin": {
@@ -25,16 +25,16 @@
25
25
  "react-redux": "8.1.3",
26
26
  "react-string-replace": "1.1.1",
27
27
  "redis": "4.5.1",
28
- "semver": "7.5.4",
28
+ "semver": "7.6.2",
29
29
  "set-cookie-parser": "2.6.0"
30
30
  },
31
31
  "devDependencies": {
32
+ "@akinon/eslint-plugin-projectzero": "1.52.0",
32
33
  "@types/react-redux": "7.1.30",
33
34
  "@types/set-cookie-parser": "2.4.7",
34
35
  "@typescript-eslint/eslint-plugin": "6.7.4",
35
36
  "@typescript-eslint/parser": "6.7.4",
36
37
  "eslint": "^8.14.0",
37
- "@akinon/eslint-plugin-projectzero": "1.51.0",
38
38
  "eslint-config-prettier": "8.5.0"
39
39
  }
40
40
  }
@@ -105,6 +105,13 @@ export interface Order {
105
105
  shipping_option: number;
106
106
  tracking_number: string;
107
107
  tracking_url: string;
108
+ [key: string]: any;
109
+ bank: {
110
+ pk: number;
111
+ name: string;
112
+ slug: string;
113
+ [key: string]: any;
114
+ };
108
115
  }
109
116
 
110
117
  export interface Quotations {
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
@@ -283,3 +283,21 @@ export interface AccordionProps {
283
283
  export interface PluginModuleComponentProps {
284
284
  settings?: Record<string, any>;
285
285
  }
286
+
287
+ export interface PaginationProps {
288
+ total: number | undefined;
289
+ limit?: number | undefined;
290
+ currentPage: number | undefined;
291
+ numberOfPages?: number | undefined;
292
+ containerClassName?: string;
293
+ moreButtonClassName?: string;
294
+ prevClassName?: string;
295
+ nextClassName?: string;
296
+ pageClassName?: string;
297
+ threshold?: number | undefined;
298
+ delta?: number | undefined;
299
+ render?: (pagination: UsePaginationType) => ReactNode;
300
+ type?: 'infinite' | 'list' | 'more';
301
+ onPageChange?: (page: number) => void;
302
+ direction?: 'next' | 'prev';
303
+ }