@akinon/next 1.21.0-rc.6 → 1.21.0-rc.8

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,19 @@
1
1
  # @akinon/next
2
2
 
3
+ ## 1.21.0-rc.8
4
+
5
+ ### Minor Changes
6
+
7
+ - 07cc81a: Add infinite and more types to pagination
8
+
9
+ ## 1.21.0-rc.7
10
+
11
+ ### Minor Changes
12
+
13
+ - 5ace3508: ZERO-2439: Add anonymous tracking page
14
+ - be04d041: ZERO-2452: UA events converted to be compatible with GA4 and types are declared
15
+ - c75e1e45: ZERO-2452: GA4 support for gtm events
16
+
3
17
  ## 1.21.0-rc.6
4
18
 
5
19
  ### Minor Changes
@@ -37,7 +37,7 @@ const protectedPackages = ['@akinon/next', 'next'];
37
37
  const pluginsToRemove = Object.keys(packageJson.dependencies || {}).filter(
38
38
  (dep) =>
39
39
  dep.startsWith('@akinon/') &&
40
- installedPlugins.includes(dep.replace('@akinon/', '')) &&
40
+ !installedPlugins.includes(dep.replace('@akinon/', '')) &&
41
41
  !protectedPackages.includes(dep)
42
42
  );
43
43
 
File without changes
File without changes
package/bin/pz-postdev.js CHANGED
File without changes
File without changes
File without changes
File without changes
package/bin/pz-predev.js CHANGED
File without changes
File without changes
@@ -1,6 +1,6 @@
1
1
  import { api } from './api';
2
2
  import { user } from '../urls';
3
- import { ForgotPasswordFormType } from '../../types';
3
+ import { ForgotPasswordFormType, Order } from '../../types';
4
4
  import { buildClientRequestUrl } from '../../utils';
5
5
 
6
6
  interface GetCaptchaResponse {
@@ -84,6 +84,21 @@ const userApi = api.injectEndpoints({
84
84
  contentType: 'application/json'
85
85
  })
86
86
  })
87
+ }),
88
+ getAnonymousTracking: build.mutation<
89
+ Order,
90
+ { email: string; number: string }
91
+ >({
92
+ query: ({ email, number }) => ({
93
+ url: buildClientRequestUrl(user.anonymousOrderTracking, {
94
+ useFormData: true
95
+ }),
96
+ method: 'POST',
97
+ body: {
98
+ email,
99
+ number
100
+ }
101
+ })
87
102
  })
88
103
  }),
89
104
  overrideExisting: false
@@ -95,5 +110,6 @@ export const {
95
110
  useConfirmEmailVerificationQuery,
96
111
  useValidateCaptchaMutation,
97
112
  useLogoutMutation,
98
- useForgotPasswordMutation
113
+ useForgotPasswordMutation,
114
+ useGetAnonymousTrackingMutation
99
115
  } = userApi;
@@ -20,6 +20,8 @@ interface GetStockParams {
20
20
  }
21
21
 
22
22
  interface GetFavoritesResponse {
23
+ next?: string | null;
24
+ previous?: string | null;
23
25
  count: number;
24
26
  results: FavoriteItem[];
25
27
  }
package/data/urls.ts CHANGED
@@ -172,7 +172,8 @@ export const user = {
172
172
  `/users/email-set-primary/${token}/`,
173
173
  confirmEmailVerification: (token: string) =>
174
174
  `/users/registration/account-confirm-email/${token}/`,
175
- csrfToken: '/csrf_token/'
175
+ csrfToken: '/csrf_token/',
176
+ anonymousOrderTracking: '/users/orders/anonymous'
176
177
  };
177
178
 
178
179
  export const b2b = {
@@ -70,10 +70,6 @@ export default function usePagination(
70
70
  dispatch({ type: 'setLimit', payload: limit });
71
71
  }, [limit]);
72
72
 
73
- useEffect(() => {
74
- window.scrollTo(0, 0);
75
- }, [state.page, state.limit]);
76
-
77
73
  const setTotal = useCallback(
78
74
  (total: number) => {
79
75
  dispatch({ type: 'setTotal', payload: total });
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.21.0-rc.6",
4
+ "version": "1.21.0-rc.8",
5
5
  "private": false,
6
6
  "license": "MIT",
7
7
  "bin": {
@@ -32,7 +32,7 @@
32
32
  "@typescript-eslint/eslint-plugin": "6.7.4",
33
33
  "@typescript-eslint/parser": "6.7.4",
34
34
  "eslint": "^8.14.0",
35
- "@akinon/eslint-plugin-projectzero": "1.21.0-rc.6",
35
+ "@akinon/eslint-plugin-projectzero": "1.21.0-rc.8",
36
36
  "eslint-config-prettier": "8.5.0"
37
37
  }
38
38
  }
package/types/gtm.ts CHANGED
@@ -14,3 +14,51 @@ export interface GTMUserType {
14
14
  gender: string;
15
15
  emailAllowed: boolean;
16
16
  }
17
+
18
+ export interface GA4EventItem {
19
+ item_id: string | number;
20
+ item_name: string | number;
21
+ coupon?: string | number;
22
+ discount?: string | null;
23
+ index?: number;
24
+ item_brand?: string;
25
+ item_category?: string;
26
+ item_category2?: string;
27
+ item_category3?: string;
28
+ item_category4?: string;
29
+ item_category5?: string;
30
+ item_list_id?: string;
31
+ item_list_name?: string;
32
+ item_variant?: string;
33
+ price?: string | number;
34
+ quantity?: number;
35
+ sale_status?: string;
36
+ stock_status?: string;
37
+ discount_percent?: number;
38
+ discount_price?: string;
39
+ product_gender?: string;
40
+ product_size?: string;
41
+ [key: string]: any;
42
+ }
43
+
44
+ export interface GA4EventParams {
45
+ item_list_id?: string;
46
+ item_list_name?: string;
47
+ value?: number;
48
+ currency?: string;
49
+ shipping_tier?: string;
50
+ coupon?: string;
51
+ selected_shipping_option?: string;
52
+ creative_name?: string;
53
+ creative_slot?: string;
54
+ promotion_id?: string;
55
+ promotion_name?: string;
56
+ items?: GA4EventItem[];
57
+ transaction_id?: string;
58
+ tax?: number;
59
+ shipping?: number;
60
+ shipping_country?: string;
61
+ shipping_city?: string;
62
+ payment_method?: string;
63
+ [key: string]: any;
64
+ }