@akinon/next 1.13.1 → 1.14.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.
Files changed (133) hide show
  1. package/.editorconfig +7 -0
  2. package/.eslintrc.js +40 -40
  3. package/.prettierrc +13 -13
  4. package/CHANGELOG.md +13 -0
  5. package/api/auth.ts +231 -231
  6. package/api/cache.ts +44 -44
  7. package/api/client.ts +174 -174
  8. package/api/logout.ts +42 -42
  9. package/assets/styles/index.scss +28 -28
  10. package/bin/pz-check-dependencies.js +98 -98
  11. package/bin/pz-install-plugins.js +33 -33
  12. package/bin/pz-install-theme.js +58 -58
  13. package/bin/pz-postbuild.js +1 -1
  14. package/bin/pz-postdev.js +1 -1
  15. package/bin/pz-postinstall.js +6 -6
  16. package/bin/pz-poststart.js +1 -1
  17. package/bin/pz-prebuild.js +4 -4
  18. package/bin/pz-predev.js +4 -4
  19. package/bin/pz-prestart.js +1 -1
  20. package/bin/run-script.js +44 -44
  21. package/components/accordion.tsx +52 -0
  22. package/components/button.tsx +46 -0
  23. package/components/client-root.tsx +19 -19
  24. package/components/icon.tsx +18 -18
  25. package/components/image.tsx +133 -133
  26. package/components/index.ts +17 -1
  27. package/components/input.tsx +110 -0
  28. package/components/lazy-component.tsx +33 -33
  29. package/components/loader-spinner.tsx +23 -23
  30. package/components/mobile-app-toggler.tsx +26 -26
  31. package/components/oauth-login.tsx +24 -24
  32. package/components/plugin-module.tsx +11 -8
  33. package/components/price.tsx +55 -0
  34. package/components/pz-providers.tsx +24 -24
  35. package/components/pz-root.tsx +21 -21
  36. package/components/radio.tsx +18 -18
  37. package/components/react-portal.tsx +45 -45
  38. package/components/redirect-three-d/content/index.tsx +74 -74
  39. package/components/redirect-three-d/index.tsx +17 -17
  40. package/components/selected-payment-option-view.tsx +7 -0
  41. package/components/trans.tsx +39 -39
  42. package/data/client/account.ts +208 -208
  43. package/data/client/address.ts +107 -107
  44. package/data/client/api.ts +85 -84
  45. package/data/client/b2b.ts +106 -106
  46. package/data/client/basket.ts +82 -82
  47. package/data/client/checkout.ts +516 -479
  48. package/data/client/misc.ts +101 -101
  49. package/data/client/product.ts +89 -89
  50. package/data/client/user.ts +99 -99
  51. package/data/client/wishlist.ts +118 -88
  52. package/data/server/category.ts +132 -128
  53. package/data/server/flatpage.ts +21 -21
  54. package/data/server/form.ts +22 -22
  55. package/data/server/index.ts +10 -10
  56. package/data/server/landingpage.ts +24 -24
  57. package/data/server/list.ts +67 -62
  58. package/data/server/menu.ts +35 -35
  59. package/data/server/product.ts +86 -86
  60. package/data/server/seo.ts +48 -48
  61. package/data/server/special-page.ts +47 -47
  62. package/data/server/widget.ts +27 -27
  63. package/data/urls.ts +221 -210
  64. package/hocs/client/index.ts +1 -1
  65. package/hocs/client/with-segment-defaults.tsx +25 -25
  66. package/hocs/server/index.ts +1 -1
  67. package/hocs/server/with-segment-defaults.tsx +85 -85
  68. package/hooks/index.ts +10 -10
  69. package/hooks/use-captcha.tsx +76 -76
  70. package/hooks/use-common-product-attributes.ts +36 -36
  71. package/hooks/use-debounce.ts +20 -20
  72. package/hooks/use-localization.ts +78 -78
  73. package/hooks/use-media-query.ts +36 -36
  74. package/hooks/use-mobile-iframe-handler.ts +23 -23
  75. package/hooks/use-on-click-outside.tsx +28 -28
  76. package/hooks/use-payment-options.ts +2 -1
  77. package/hooks/use-router.ts +45 -45
  78. package/hooks/use-translation.ts +14 -14
  79. package/lib/cache.ts +215 -215
  80. package/localization/index.ts +5 -5
  81. package/localization/provider.tsx +58 -58
  82. package/middlewares/currency.ts +100 -100
  83. package/middlewares/default.ts +256 -256
  84. package/middlewares/index.ts +29 -29
  85. package/middlewares/locale.ts +68 -68
  86. package/middlewares/oauth-login.ts +79 -79
  87. package/middlewares/pretty-url.ts +104 -104
  88. package/middlewares/redirection-payment.ts +160 -160
  89. package/middlewares/three-d-redirection.ts +159 -159
  90. package/middlewares/url-redirection.ts +65 -65
  91. package/package.json +2 -2
  92. package/plugins.js +2 -1
  93. package/redux/hooks.ts +7 -7
  94. package/redux/middlewares/checkout.ts +265 -260
  95. package/redux/middlewares/index.ts +50 -50
  96. package/redux/reducers/checkout.ts +184 -171
  97. package/redux/reducers/config.ts +28 -28
  98. package/redux/reducers/header.ts +59 -59
  99. package/redux/reducers/index.ts +14 -14
  100. package/redux/reducers/root.ts +61 -61
  101. package/sentry/index.ts +27 -27
  102. package/tailwind/rtl.js +137 -137
  103. package/types/commerce/account.ts +64 -64
  104. package/types/commerce/address.ts +94 -94
  105. package/types/commerce/b2b.ts +117 -117
  106. package/types/commerce/basket.ts +43 -43
  107. package/types/commerce/category.ts +114 -114
  108. package/types/commerce/checkout.ts +143 -136
  109. package/types/commerce/flatpage.ts +7 -7
  110. package/types/commerce/form.ts +66 -66
  111. package/types/commerce/index.ts +12 -12
  112. package/types/commerce/landingpage.ts +7 -7
  113. package/types/commerce/misc.ts +127 -127
  114. package/types/commerce/order.ts +119 -119
  115. package/types/commerce/product.ts +109 -109
  116. package/types/commerce/widget.ts +28 -28
  117. package/types/gtm.ts +16 -16
  118. package/types/index.ts +274 -237
  119. package/types/metadata.ts +7 -7
  120. package/types/next-auth.d.ts +24 -24
  121. package/utils/app-fetch.ts +69 -69
  122. package/utils/deep-merge.js +24 -24
  123. package/utils/generate-commerce-search-params.ts +22 -22
  124. package/utils/get-currency.ts +29 -29
  125. package/utils/image-loader.ts +31 -31
  126. package/utils/index.ts +150 -150
  127. package/utils/localization.ts +29 -29
  128. package/utils/log.ts +138 -138
  129. package/utils/menu-generator.ts +27 -27
  130. package/utils/mobile-3d-iframe.ts +77 -77
  131. package/utils/server-translation.ts +57 -57
  132. package/utils/server-variables.ts +9 -9
  133. package/with-pz-config.js +94 -94
package/types/index.ts CHANGED
@@ -1,237 +1,274 @@
1
- import { LocaleUrlStrategy } from '../localization';
2
- import { PzNextRequest } from '../middlewares';
3
-
4
- declare global {
5
- export interface Window {
6
- dataLayer: Record<string, any>[];
7
- }
8
- }
9
-
10
- export * from './commerce';
11
- export * from './gtm';
12
- export * from './metadata';
13
-
14
- export interface Locale {
15
- label: string;
16
- /**
17
- * Lowercased locale value in `ISO 639-1` format or including country code in `ISO 3166-1 alpha-2` format.
18
- *
19
- * -- If you use uppercase characters, it will be considered as lowercase.
20
- *
21
- * ***
22
- * @example
23
- * value: 'en'
24
- * value: 'en-us'
25
- * value: 'tr'
26
- *
27
- * @see https://en.wikipedia.org/wiki/ISO_639-1
28
- * @see https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
29
- */
30
- value: string;
31
- localePath?: string;
32
- /**
33
- * Corresponding Commerce API value for fetching data. It will be used in `Accept-Language` header.
34
- */
35
- apiValue: string;
36
- rtl?: boolean;
37
- }
38
-
39
- export interface Currency {
40
- /**
41
- * It will be used for displaying currency in currency switcher.
42
- * Can be symbol, code, etc.
43
- *
44
- * @example
45
- * label: '$'
46
- * label: '€'
47
- * label: 'USD'
48
- * label: 'US Dollar'
49
- * label: '$ - USD'
50
- */
51
- label: string;
52
- /**
53
- * Lowercased currency code in `ISO 4217` format.
54
- *
55
- * It should match with one of the values returned from Commerce API.
56
- *
57
- * @example
58
- * code: 'usd'
59
- * code: 'eur'
60
- * code: 'try'
61
- *
62
- * @see https://en.wikipedia.org/wiki/ISO_4217
63
- */
64
- code: string;
65
- }
66
-
67
- export interface Settings {
68
- commerceUrl: string;
69
- redis: {
70
- defaultExpirationTime: number;
71
- };
72
- commonProductAttributes: Array<{
73
- translationKey: string;
74
- key: string;
75
- }>;
76
- localization: {
77
- locales: Locale[];
78
- currencies: Array<Currency>;
79
- /**
80
- * Default locale value in `ISO 639-1` format or including country code in `ISO 3166-1 alpha-2` format.
81
- *
82
- * It will be used for redirections and fallbacks.
83
- *
84
- * It should be one of the values in `locales` array.
85
- */
86
- defaultLocaleValue: string;
87
- /**
88
- * Determines url behavior according to locale.
89
- *
90
- * Available options:
91
- * - LocaleUrlStrategy.HideDefaultLocale
92
- * - LocaleUrlStrategy.HideAllLocales
93
- * - LocaleUrlStrategy.ShowAllLocales
94
- *
95
- * @default LocaleUrlStrategy.HideDefaultLocale
96
- *
97
- * @example
98
- * // Example configuration
99
- * locales: [{ value: 'en'}, { value: 'tr' }]
100
- * defaultLocaleValue: 'en'
101
- * // -------------------------------
102
- *
103
- * LocaleUrlStrategy.HideDefaultLocale:
104
- * en -> "/women"
105
- * tr -> "/tr/women"
106
- *
107
- * LocaleUrlStrategy.ShowAllLocales:
108
- * en -> "/en/women"
109
- * tr -> "/tr/women"
110
- *
111
- * LocaleUrlStrategy.HideAllLocales:
112
- * en -> "/women"
113
- * tr -> "/women"
114
- */
115
- localeUrlStrategy?: LocaleUrlStrategy;
116
- redirectToDefaultLocale?: boolean;
117
- defaultCurrencyCode: string;
118
- /**
119
- * The default behavior of `getActiveCurrencyCode` function is to get active currency code from cookie named `pz-currency`.
120
- *
121
- * You can use this function to override existing and get currency code from cookie, header, url, etc.
122
- *
123
- * If return value does not match with any currency code in `currencies` array, default currency code will be used.
124
- *
125
- * @param req - Incoming request. You can use this to get cookie, header, url, etc.
126
- * @param locale - Active locale value. E.g. 'en', 'tr', 'en-us', 'tr-tr'
127
- * @param defaultCurrencyCode - Default currency code in `ISO 4217` format. E.g. 'usd', 'eur', 'try'
128
- * @returns Currency code in `ISO 4217` format. E.g. 'usd', 'eur', 'try'
129
- *
130
- * @example
131
- * getActiveCurrencyCode: ({ req, locale, defaultCurrencyCode }) => {
132
- * const [, countryCode] = locale.split('-');
133
- *
134
- * if (countryCode === 'ae') {
135
- * return 'aed';
136
- * } else if (countryCode === 'qa') {
137
- * return 'qar';
138
- * }
139
- *
140
- * return defaultCurrencyCode;
141
- * }
142
- */
143
- getActiveCurrencyCode?: ({
144
- req,
145
- locale,
146
- defaultCurrencyCode
147
- }: {
148
- req: PzNextRequest;
149
- locale: string;
150
- defaultCurrencyCode: string;
151
- }) => string;
152
- /**
153
- * By default, pretty url resolver excludes locale from url.
154
- * In some cases, you may want to create flatpages and include locale in urls.
155
- * This is useful if you want to manage your flatpages for different countries by using locale value.
156
- *
157
- * @example
158
- * // URL entered in Omnitron: /en-us/pages/about-us
159
- * // Locale Strategy: LocaleUrlStrategy.ShowAllLocales
160
- *
161
- * // If you don't use this option, pretty url resolver will remove the locale and it will be resolved as '/pages/about-us' and you will get 404. Because there is no page with this url. But if you use this option, it will be resolved as '/en-us/pages/about-us' and you will get the page.
162
- * // Following pattern will include locale for all urls including '/pages/'.
163
- * localeIncludedPrettyUrlPattern: new RegExp('.+/pages/.+$')
164
- */
165
- localeIncludedPrettyUrlPattern?: RegExp;
166
- };
167
- rewrites?: Array<{
168
- source: string;
169
- destination: string;
170
- }>;
171
- checkout?: {
172
- /**
173
- * If there is a need to exclude certain payment options from the iframe, for instance, due to CORS issues, this option can be utilized by passing the slugs associated with the desired payment options.
174
- */
175
- iframeExcludedPaymentOptions?: string[];
176
- extraPaymentTypes?: string[];
177
- };
178
- }
179
-
180
- export interface CacheOptions {
181
- cache?: boolean;
182
- expire?: number;
183
- useProxy?: boolean;
184
- }
185
-
186
- export interface ClientRequestOptions {
187
- useTrailingSlash?: boolean;
188
- useFormData?: boolean;
189
- accept?: string;
190
- contentType?: string;
191
- responseType?: 'json' | 'text';
192
- }
193
-
194
- export type CDNOptions = {
195
- width?: number;
196
- height?: number;
197
- quality?: number;
198
- crop?: 'center' | 'top' | 'bottom' | 'left' | 'right';
199
- upscale?: boolean;
200
- };
201
-
202
- export type ImageOptions = CDNOptions & {
203
- sources?: Array<{ media: string; options: CDNOptions }>;
204
- };
205
-
206
- export type Translations = { [key: string]: object };
207
-
208
- export interface PageProps<T = any> {
209
- params: T;
210
- searchParams: URLSearchParams;
211
- }
212
-
213
- export interface LayoutProps<T = any> extends PageProps<T> {
214
- children: React.ReactNode;
215
- }
216
-
217
- export interface RootLayoutProps<
218
- T = { commerce: string; locale: string; currency: string }
219
- > extends LayoutProps<T> {
220
- translations: Translations;
221
- locale: Locale & {
222
- isoCode: string;
223
- };
224
- }
225
-
226
- export type RadioProps = React.HTMLProps<HTMLInputElement>;
227
-
228
- export interface AuthError {
229
- type: string;
230
- data?: any;
231
- }
232
-
233
- export interface IconProps extends React.ComponentPropsWithRef<'i'> {
234
- name: string;
235
- size?: number;
236
- className?: string;
237
- }
1
+ import { LocaleUrlStrategy } from '../localization';
2
+ import { PzNextRequest } from '../middlewares';
3
+ import { Control, FieldError } from 'react-hook-form';
4
+ import { ReactNode } from 'react';
5
+
6
+ declare global {
7
+ export interface Window {
8
+ dataLayer: Record<string, any>[];
9
+ }
10
+ }
11
+
12
+ export * from './commerce';
13
+ export * from './gtm';
14
+ export * from './metadata';
15
+
16
+ export interface Locale {
17
+ label: string;
18
+ /**
19
+ * Lowercased locale value in `ISO 639-1` format or including country code in `ISO 3166-1 alpha-2` format.
20
+ *
21
+ * -- If you use uppercase characters, it will be considered as lowercase.
22
+ *
23
+ * ***
24
+ * @example
25
+ * value: 'en'
26
+ * value: 'en-us'
27
+ * value: 'tr'
28
+ *
29
+ * @see https://en.wikipedia.org/wiki/ISO_639-1
30
+ * @see https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
31
+ */
32
+ value: string;
33
+ localePath?: string;
34
+ /**
35
+ * Corresponding Commerce API value for fetching data. It will be used in `Accept-Language` header.
36
+ */
37
+ apiValue: string;
38
+ rtl?: boolean;
39
+ }
40
+
41
+ export interface Currency {
42
+ /**
43
+ * It will be used for displaying currency in currency switcher.
44
+ * Can be symbol, code, etc.
45
+ *
46
+ * @example
47
+ * label: '$'
48
+ * label: ''
49
+ * label: 'USD'
50
+ * label: 'US Dollar'
51
+ * label: '$ - USD'
52
+ */
53
+ label: string;
54
+ /**
55
+ * Lowercased currency code in `ISO 4217` format.
56
+ *
57
+ * It should match with one of the values returned from Commerce API.
58
+ *
59
+ * @example
60
+ * code: 'usd'
61
+ * code: 'eur'
62
+ * code: 'try'
63
+ *
64
+ * @see https://en.wikipedia.org/wiki/ISO_4217
65
+ */
66
+ code: string;
67
+ }
68
+
69
+ export interface Settings {
70
+ commerceUrl: string;
71
+ redis: {
72
+ defaultExpirationTime: number;
73
+ };
74
+ commonProductAttributes: Array<{
75
+ translationKey: string;
76
+ key: string;
77
+ }>;
78
+ localization: {
79
+ locales: Locale[];
80
+ currencies: Array<Currency>;
81
+ /**
82
+ * Default locale value in `ISO 639-1` format or including country code in `ISO 3166-1 alpha-2` format.
83
+ *
84
+ * It will be used for redirections and fallbacks.
85
+ *
86
+ * It should be one of the values in `locales` array.
87
+ */
88
+ defaultLocaleValue: string;
89
+ /**
90
+ * Determines url behavior according to locale.
91
+ *
92
+ * Available options:
93
+ * - LocaleUrlStrategy.HideDefaultLocale
94
+ * - LocaleUrlStrategy.HideAllLocales
95
+ * - LocaleUrlStrategy.ShowAllLocales
96
+ *
97
+ * @default LocaleUrlStrategy.HideDefaultLocale
98
+ *
99
+ * @example
100
+ * // Example configuration
101
+ * locales: [{ value: 'en'}, { value: 'tr' }]
102
+ * defaultLocaleValue: 'en'
103
+ * // -------------------------------
104
+ *
105
+ * LocaleUrlStrategy.HideDefaultLocale:
106
+ * en -> "/women"
107
+ * tr -> "/tr/women"
108
+ *
109
+ * LocaleUrlStrategy.ShowAllLocales:
110
+ * en -> "/en/women"
111
+ * tr -> "/tr/women"
112
+ *
113
+ * LocaleUrlStrategy.HideAllLocales:
114
+ * en -> "/women"
115
+ * tr -> "/women"
116
+ */
117
+ localeUrlStrategy?: LocaleUrlStrategy;
118
+ redirectToDefaultLocale?: boolean;
119
+ defaultCurrencyCode: string;
120
+ /**
121
+ * The default behavior of `getActiveCurrencyCode` function is to get active currency code from cookie named `pz-currency`.
122
+ *
123
+ * You can use this function to override existing and get currency code from cookie, header, url, etc.
124
+ *
125
+ * If return value does not match with any currency code in `currencies` array, default currency code will be used.
126
+ *
127
+ * @param req - Incoming request. You can use this to get cookie, header, url, etc.
128
+ * @param locale - Active locale value. E.g. 'en', 'tr', 'en-us', 'tr-tr'
129
+ * @param defaultCurrencyCode - Default currency code in `ISO 4217` format. E.g. 'usd', 'eur', 'try'
130
+ * @returns Currency code in `ISO 4217` format. E.g. 'usd', 'eur', 'try'
131
+ *
132
+ * @example
133
+ * getActiveCurrencyCode: ({ req, locale, defaultCurrencyCode }) => {
134
+ * const [, countryCode] = locale.split('-');
135
+ *
136
+ * if (countryCode === 'ae') {
137
+ * return 'aed';
138
+ * } else if (countryCode === 'qa') {
139
+ * return 'qar';
140
+ * }
141
+ *
142
+ * return defaultCurrencyCode;
143
+ * }
144
+ */
145
+ getActiveCurrencyCode?: ({
146
+ req,
147
+ locale,
148
+ defaultCurrencyCode
149
+ }: {
150
+ req: PzNextRequest;
151
+ locale: string;
152
+ defaultCurrencyCode: string;
153
+ }) => string;
154
+ /**
155
+ * By default, pretty url resolver excludes locale from url.
156
+ * In some cases, you may want to create flatpages and include locale in urls.
157
+ * This is useful if you want to manage your flatpages for different countries by using locale value.
158
+ *
159
+ * @example
160
+ * // URL entered in Omnitron: /en-us/pages/about-us
161
+ * // Locale Strategy: LocaleUrlStrategy.ShowAllLocales
162
+ *
163
+ * // If you don't use this option, pretty url resolver will remove the locale and it will be resolved as '/pages/about-us' and you will get 404. Because there is no page with this url. But if you use this option, it will be resolved as '/en-us/pages/about-us' and you will get the page.
164
+ * // Following pattern will include locale for all urls including '/pages/'.
165
+ * localeIncludedPrettyUrlPattern: new RegExp('.+/pages/.+$')
166
+ */
167
+ localeIncludedPrettyUrlPattern?: RegExp;
168
+ };
169
+ rewrites?: Array<{
170
+ source: string;
171
+ destination: string;
172
+ }>;
173
+ checkout?: {
174
+ /**
175
+ * If there is a need to exclude certain payment options from the iframe, for instance, due to CORS issues, this option can be utilized by passing the slugs associated with the desired payment options.
176
+ */
177
+ iframeExcludedPaymentOptions?: string[];
178
+ extraPaymentTypes?: string[];
179
+ };
180
+ }
181
+
182
+ export interface CacheOptions {
183
+ cache?: boolean;
184
+ expire?: number;
185
+ useProxy?: boolean;
186
+ }
187
+
188
+ export interface ClientRequestOptions {
189
+ useTrailingSlash?: boolean;
190
+ useFormData?: boolean;
191
+ accept?: string;
192
+ contentType?: string;
193
+ responseType?: 'json' | 'text';
194
+ }
195
+
196
+ export type CDNOptions = {
197
+ width?: number;
198
+ height?: number;
199
+ quality?: number;
200
+ crop?: 'center' | 'top' | 'bottom' | 'left' | 'right';
201
+ upscale?: boolean;
202
+ };
203
+
204
+ export type ImageOptions = CDNOptions & {
205
+ sources?: Array<{ media: string; options: CDNOptions }>;
206
+ };
207
+
208
+ export type Translations = { [key: string]: object };
209
+
210
+ export interface PageProps<T = any> {
211
+ params: T;
212
+ searchParams: URLSearchParams;
213
+ }
214
+
215
+ export interface LayoutProps<T = any> extends PageProps<T> {
216
+ children: React.ReactNode;
217
+ }
218
+
219
+ export interface RootLayoutProps<
220
+ T = { commerce: string; locale: string; currency: string }
221
+ > extends LayoutProps<T> {
222
+ translations: Translations;
223
+ locale: Locale & {
224
+ isoCode: string;
225
+ };
226
+ }
227
+
228
+ export type RadioProps = React.HTMLProps<HTMLInputElement>;
229
+
230
+ export interface AuthError {
231
+ type: string;
232
+ data?: any;
233
+ }
234
+
235
+ export interface IconProps extends React.ComponentPropsWithRef<'i'> {
236
+ name: string;
237
+ size?: number;
238
+ className?: string;
239
+ }
240
+
241
+ export interface ButtonProps
242
+ extends React.ButtonHTMLAttributes<HTMLButtonElement> {
243
+ appearance?: 'filled' | 'outlined' | 'ghost';
244
+ }
245
+
246
+ export interface PriceProps {
247
+ currencyCode?: string;
248
+ useCurrencySymbol?: boolean;
249
+ useCurrencyAfterPrice?: boolean;
250
+ useCurrencySpace?: boolean;
251
+ useNegative?: boolean;
252
+ useNegativeSpace?: boolean;
253
+ }
254
+
255
+ export interface InputProps extends React.HTMLProps<HTMLInputElement> {
256
+ label?: string;
257
+ labelStyle?: 'default' | 'floating';
258
+ error?: FieldError | undefined;
259
+ control?: Control<any, any>;
260
+ required?: boolean;
261
+ }
262
+
263
+ export interface AccordionProps {
264
+ isCollapse?: boolean;
265
+ title?: string;
266
+ subTitle?: string;
267
+ icons?: string[];
268
+ iconSize?: number;
269
+ iconColor?: string;
270
+ children?: ReactNode;
271
+ className?: string;
272
+ titleClassName?: string;
273
+ dataTestId?: string;
274
+ }
package/types/metadata.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { Metadata as NextMetaData } from 'next';
2
-
3
- export interface Metadata extends NextMetaData {
4
- alternates?: NextMetaData['alternates'] & {
5
- languages?: Record<string, string>;
6
- };
7
- }
1
+ import { Metadata as NextMetaData } from 'next';
2
+
3
+ export interface Metadata extends NextMetaData {
4
+ alternates?: NextMetaData['alternates'] & {
5
+ languages?: Record<string, string>;
6
+ };
7
+ }
@@ -1,24 +1,24 @@
1
- import NextAuth from 'next-auth';
2
-
3
- declare module 'next-auth' {
4
- interface User {
5
- id?: number;
6
- pk: number;
7
- firstName: string;
8
- lastName: string;
9
- email: string;
10
- phone: string;
11
- emailAllowed: boolean;
12
- smsAllowed: boolean;
13
- dateJoined: string;
14
- lastLogin: string;
15
- dateOfBirth: string;
16
- token: string;
17
- hashedEmail: string;
18
- gender: string;
19
- }
20
-
21
- interface Session {
22
- user: User;
23
- }
24
- }
1
+ import NextAuth from 'next-auth';
2
+
3
+ declare module 'next-auth' {
4
+ interface User {
5
+ id?: number;
6
+ pk: number;
7
+ firstName: string;
8
+ lastName: string;
9
+ email: string;
10
+ phone: string;
11
+ emailAllowed: boolean;
12
+ smsAllowed: boolean;
13
+ dateJoined: string;
14
+ lastLogin: string;
15
+ dateOfBirth: string;
16
+ token: string;
17
+ hashedEmail: string;
18
+ gender: string;
19
+ }
20
+
21
+ interface Session {
22
+ user: User;
23
+ }
24
+ }