@akinon/projectzero 1.48.0-rc.0 → 1.48.0-rc.2
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
package/app-template/.gitignore
CHANGED
|
@@ -1,5 +1,47 @@
|
|
|
1
1
|
# projectzeronext
|
|
2
2
|
|
|
3
|
+
## 1.48.0-rc.2
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 2e6104d: ZERO-2888:Edit the numbering in the pagination and the visibility of the prev and next buttons
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [2e6104d]
|
|
12
|
+
- @akinon/next@1.48.0-rc.2
|
|
13
|
+
- @akinon/pz-akifast@1.48.0-rc.2
|
|
14
|
+
- @akinon/pz-b2b@1.48.0-rc.2
|
|
15
|
+
- @akinon/pz-basket-gift-pack@1.48.0-rc.2
|
|
16
|
+
- @akinon/pz-bkm@1.48.0-rc.2
|
|
17
|
+
- @akinon/pz-checkout-gift-pack@1.48.0-rc.2
|
|
18
|
+
- @akinon/pz-click-collect@1.48.0-rc.2
|
|
19
|
+
- @akinon/pz-credit-payment@1.48.0-rc.2
|
|
20
|
+
- @akinon/pz-gpay@1.48.0-rc.2
|
|
21
|
+
- @akinon/pz-masterpass@1.48.0-rc.2
|
|
22
|
+
- @akinon/pz-one-click-checkout@1.48.0-rc.2
|
|
23
|
+
- @akinon/pz-otp@1.48.0-rc.2
|
|
24
|
+
- @akinon/pz-pay-on-delivery@1.48.0-rc.2
|
|
25
|
+
|
|
26
|
+
## 1.48.0-rc.1
|
|
27
|
+
|
|
28
|
+
### Patch Changes
|
|
29
|
+
|
|
30
|
+
- Updated dependencies [fdd0b41]
|
|
31
|
+
- @akinon/next@1.48.0-rc.1
|
|
32
|
+
- @akinon/pz-akifast@1.48.0-rc.1
|
|
33
|
+
- @akinon/pz-b2b@1.48.0-rc.1
|
|
34
|
+
- @akinon/pz-basket-gift-pack@1.48.0-rc.1
|
|
35
|
+
- @akinon/pz-bkm@1.48.0-rc.1
|
|
36
|
+
- @akinon/pz-checkout-gift-pack@1.48.0-rc.1
|
|
37
|
+
- @akinon/pz-click-collect@1.48.0-rc.1
|
|
38
|
+
- @akinon/pz-credit-payment@1.48.0-rc.1
|
|
39
|
+
- @akinon/pz-gpay@1.48.0-rc.1
|
|
40
|
+
- @akinon/pz-masterpass@1.48.0-rc.1
|
|
41
|
+
- @akinon/pz-one-click-checkout@1.48.0-rc.1
|
|
42
|
+
- @akinon/pz-otp@1.48.0-rc.1
|
|
43
|
+
- @akinon/pz-pay-on-delivery@1.48.0-rc.1
|
|
44
|
+
|
|
3
45
|
## 1.48.0-rc.0
|
|
4
46
|
|
|
5
47
|
### Minor Changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "projectzeronext",
|
|
3
|
-
"version": "1.48.0-rc.
|
|
3
|
+
"version": "1.48.0-rc.2",
|
|
4
4
|
"private": true,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"scripts": {
|
|
@@ -22,19 +22,19 @@
|
|
|
22
22
|
"prestart": "pz-prestart"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@akinon/next": "1.48.0-rc.
|
|
26
|
-
"@akinon/pz-akifast": "1.48.0-rc.
|
|
27
|
-
"@akinon/pz-b2b": "1.48.0-rc.
|
|
28
|
-
"@akinon/pz-basket-gift-pack": "1.48.0-rc.
|
|
29
|
-
"@akinon/pz-bkm": "1.48.0-rc.
|
|
30
|
-
"@akinon/pz-checkout-gift-pack": "1.48.0-rc.
|
|
31
|
-
"@akinon/pz-click-collect": "1.48.0-rc.
|
|
32
|
-
"@akinon/pz-credit-payment": "1.48.0-rc.
|
|
33
|
-
"@akinon/pz-gpay": "1.48.0-rc.
|
|
34
|
-
"@akinon/pz-masterpass": "1.48.0-rc.
|
|
35
|
-
"@akinon/pz-one-click-checkout": "1.48.0-rc.
|
|
36
|
-
"@akinon/pz-otp": "1.48.0-rc.
|
|
37
|
-
"@akinon/pz-pay-on-delivery": "1.48.0-rc.
|
|
25
|
+
"@akinon/next": "1.48.0-rc.2",
|
|
26
|
+
"@akinon/pz-akifast": "1.48.0-rc.2",
|
|
27
|
+
"@akinon/pz-b2b": "1.48.0-rc.2",
|
|
28
|
+
"@akinon/pz-basket-gift-pack": "1.48.0-rc.2",
|
|
29
|
+
"@akinon/pz-bkm": "1.48.0-rc.2",
|
|
30
|
+
"@akinon/pz-checkout-gift-pack": "1.48.0-rc.2",
|
|
31
|
+
"@akinon/pz-click-collect": "1.48.0-rc.2",
|
|
32
|
+
"@akinon/pz-credit-payment": "1.48.0-rc.2",
|
|
33
|
+
"@akinon/pz-gpay": "1.48.0-rc.2",
|
|
34
|
+
"@akinon/pz-masterpass": "1.48.0-rc.2",
|
|
35
|
+
"@akinon/pz-one-click-checkout": "1.48.0-rc.2",
|
|
36
|
+
"@akinon/pz-otp": "1.48.0-rc.2",
|
|
37
|
+
"@akinon/pz-pay-on-delivery": "1.48.0-rc.2",
|
|
38
38
|
"@hookform/resolvers": "2.9.0",
|
|
39
39
|
"@next/third-parties": "14.1.0",
|
|
40
40
|
"@react-google-maps/api": "2.17.1",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"yup": "0.32.11"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
|
-
"@akinon/eslint-plugin-projectzero": "1.48.0-rc.
|
|
61
|
+
"@akinon/eslint-plugin-projectzero": "1.48.0-rc.2",
|
|
62
62
|
"@semantic-release/changelog": "6.0.2",
|
|
63
63
|
"@semantic-release/exec": "6.0.3",
|
|
64
64
|
"@semantic-release/git": "10.0.1",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useCallback, useEffect, useState } from 'react';
|
|
2
2
|
import { PaginationProps } from '@theme/components/types';
|
|
3
3
|
import { twMerge } from 'tailwind-merge';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
|
-
import {
|
|
5
|
+
import { Button } from '@theme/components';
|
|
6
6
|
import usePagination from '@akinon/next/hooks/use-pagination';
|
|
7
7
|
import { useLocalization } from '@akinon/next/hooks';
|
|
8
8
|
import { useRouter } from '@akinon/next/hooks';
|
|
@@ -92,9 +92,7 @@ export const Pagination = (props: PaginationProps) => {
|
|
|
92
92
|
}
|
|
93
93
|
}, [numberOfPages, page, pageList, threshold]);
|
|
94
94
|
|
|
95
|
-
const handleClick = (
|
|
96
|
-
e.preventDefault();
|
|
97
|
-
|
|
95
|
+
const handleClick = (url: string) => {
|
|
98
96
|
const newUrl = new URL(url, window.location.origin);
|
|
99
97
|
const page = newUrl.searchParams.get('page');
|
|
100
98
|
|
|
@@ -129,7 +127,7 @@ export const Pagination = (props: PaginationProps) => {
|
|
|
129
127
|
if (type === 'list') {
|
|
130
128
|
createListItems();
|
|
131
129
|
}
|
|
132
|
-
}, []);
|
|
130
|
+
}, [createListItems, type]);
|
|
133
131
|
|
|
134
132
|
useEffect(() => {
|
|
135
133
|
if (total && total !== paginationTotal) {
|
|
@@ -200,9 +198,8 @@ export const Pagination = (props: PaginationProps) => {
|
|
|
200
198
|
>
|
|
201
199
|
{prev && currentPage !== 1 && (
|
|
202
200
|
<li>
|
|
203
|
-
<
|
|
204
|
-
onClick={(
|
|
205
|
-
href={prev}
|
|
201
|
+
<button
|
|
202
|
+
onClick={() => handleClick(prev)}
|
|
206
203
|
className={twMerge(
|
|
207
204
|
'flex cursor-pointer text-sm px-2',
|
|
208
205
|
prevClassName
|
|
@@ -212,16 +209,15 @@ export const Pagination = (props: PaginationProps) => {
|
|
|
212
209
|
<span className="hidden lg:inline-block ms-4">
|
|
213
210
|
{t('category.pagination.previous')}
|
|
214
211
|
</span>
|
|
215
|
-
</
|
|
212
|
+
</button>
|
|
216
213
|
</li>
|
|
217
214
|
)}
|
|
218
215
|
|
|
219
216
|
{paginationItems.map((item, i) => (
|
|
220
217
|
<li key={i}>
|
|
221
218
|
{item?.url != '#' ? (
|
|
222
|
-
<
|
|
223
|
-
onClick={(
|
|
224
|
-
href={item.url}
|
|
219
|
+
<button
|
|
220
|
+
onClick={() => handleClick(item.url)}
|
|
225
221
|
className={twMerge(
|
|
226
222
|
clsx(
|
|
227
223
|
'text-xs px-2 cursor-pointer',
|
|
@@ -234,7 +230,7 @@ export const Pagination = (props: PaginationProps) => {
|
|
|
234
230
|
)}
|
|
235
231
|
>
|
|
236
232
|
{item?.page}
|
|
237
|
-
</
|
|
233
|
+
</button>
|
|
238
234
|
) : (
|
|
239
235
|
<span className="cursor-default text-xs flex items-center justify-center">
|
|
240
236
|
{item?.page}
|
|
@@ -245,9 +241,8 @@ export const Pagination = (props: PaginationProps) => {
|
|
|
245
241
|
|
|
246
242
|
{showNext && (
|
|
247
243
|
<li>
|
|
248
|
-
<
|
|
249
|
-
onClick={(
|
|
250
|
-
href={next}
|
|
244
|
+
<button
|
|
245
|
+
onClick={() => handleClick(next)}
|
|
251
246
|
className={twMerge(
|
|
252
247
|
'flex cursor-pointer text-xs px-2',
|
|
253
248
|
nextClassName
|
|
@@ -257,7 +252,7 @@ export const Pagination = (props: PaginationProps) => {
|
|
|
257
252
|
{t('category.pagination.next')}
|
|
258
253
|
</span>
|
|
259
254
|
<span>></span>
|
|
260
|
-
</
|
|
255
|
+
</button>
|
|
261
256
|
</li>
|
|
262
257
|
)}
|
|
263
258
|
</ul>
|