@akinon/projectzero 2.0.152-rc.0 → 2.0.152-rc.1
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 +6 -0
- package/app-template/CHANGELOG.md +34 -0
- package/app-template/docs/plugins.md +6 -0
- package/app-template/package.json +29 -29
- package/app-template/src/app/[pz]/account/orders/[id]/(detail)/page.tsx +21 -0
- package/app-template/src/app/[pz]/product/[pk]/page.tsx +7 -1
- package/app-template/src/views/category/category-info.tsx +15 -9
- package/app-template/src/views/product/index.ts +1 -0
- package/app-template/src/views/product/product-info.tsx +11 -0
- package/app-template/src/views/product/rate-review.tsx +21 -0
- package/app-template/src/views/product-item/index.tsx +5 -0
- package/commands/plugins.ts +4 -0
- package/dist/commands/plugins.js +4 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,39 @@
|
|
|
1
1
|
# projectzeronext
|
|
2
2
|
|
|
3
|
+
## 2.0.152-rc.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [97d29893]
|
|
8
|
+
- Updated dependencies [ad5240c4]
|
|
9
|
+
- @akinon/next@2.0.152-rc.1
|
|
10
|
+
- @akinon/pz-theme@2.0.152-rc.1
|
|
11
|
+
- @akinon/pz-virtual-try-on@2.0.152-rc.1
|
|
12
|
+
- @akinon/pz-akifast@2.0.152-rc.1
|
|
13
|
+
- @akinon/pz-apple-pay@2.0.152-rc.1
|
|
14
|
+
- @akinon/pz-b2b@2.0.152-rc.1
|
|
15
|
+
- @akinon/pz-basket-gift-pack@2.0.152-rc.1
|
|
16
|
+
- @akinon/pz-bkm@2.0.152-rc.1
|
|
17
|
+
- @akinon/pz-checkout-gift-pack@2.0.152-rc.1
|
|
18
|
+
- @akinon/pz-click-collect@2.0.152-rc.1
|
|
19
|
+
- @akinon/pz-credit-payment@2.0.152-rc.1
|
|
20
|
+
- @akinon/pz-cybersource-uc@2.0.152-rc.1
|
|
21
|
+
- @akinon/pz-flow-payment@2.0.152-rc.1
|
|
22
|
+
- @akinon/pz-google-pay@2.0.152-rc.1
|
|
23
|
+
- @akinon/pz-gpay@2.0.152-rc.1
|
|
24
|
+
- @akinon/pz-haso@2.0.152-rc.1
|
|
25
|
+
- @akinon/pz-hepsipay@2.0.152-rc.1
|
|
26
|
+
- @akinon/pz-masterpass@2.0.152-rc.1
|
|
27
|
+
- @akinon/pz-masterpass-rest@2.0.152-rc.1
|
|
28
|
+
- @akinon/pz-multi-basket@2.0.152-rc.1
|
|
29
|
+
- @akinon/pz-one-click-checkout@2.0.152-rc.1
|
|
30
|
+
- @akinon/pz-otp@2.0.152-rc.1
|
|
31
|
+
- @akinon/pz-pay-on-delivery@2.0.152-rc.1
|
|
32
|
+
- @akinon/pz-saved-card@2.0.152-rc.1
|
|
33
|
+
- @akinon/pz-similar-products@2.0.152-rc.1
|
|
34
|
+
- @akinon/pz-tabby-extension@2.0.152-rc.1
|
|
35
|
+
- @akinon/pz-tamara-extension@2.0.152-rc.1
|
|
36
|
+
|
|
3
37
|
## 2.0.152-rc.0
|
|
4
38
|
|
|
5
39
|
### Patch Changes
|
|
@@ -109,3 +109,9 @@ Integrates Tabby’s installment and deferred payment solutions into the checkou
|
|
|
109
109
|
Adds Tamara’s "Buy Now, Pay Later" feature to the payment options. Customers can defer payments while ensuring a seamless checkout experience.
|
|
110
110
|
|
|
111
111
|
[Click here for details](https://www.npmjs.com/package/@akinon/pz-tamara-extension)
|
|
112
|
+
|
|
113
|
+
### Rate & Review
|
|
114
|
+
|
|
115
|
+
Connects the storefront to the Akinon Rate & Review extension: approved review lists and rating summaries on product pages, rating badges on listings and a review form on the order page. Credentials stay on the server and the customer identity comes from the session.
|
|
116
|
+
|
|
117
|
+
[Click here for details](https://www.npmjs.com/package/@akinon/pz-rate-review)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "projectzeronext",
|
|
3
|
-
"version": "2.0.152-rc.
|
|
3
|
+
"version": "2.0.152-rc.1",
|
|
4
4
|
"private": true,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"scripts": {
|
|
@@ -24,33 +24,33 @@
|
|
|
24
24
|
"test:middleware": "jest middleware-matcher.test.ts --bail"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@akinon/next": "2.0.152-rc.
|
|
28
|
-
"@akinon/pz-akifast": "2.0.152-rc.
|
|
29
|
-
"@akinon/pz-apple-pay": "2.0.152-rc.
|
|
30
|
-
"@akinon/pz-b2b": "2.0.152-rc.
|
|
31
|
-
"@akinon/pz-basket-gift-pack": "2.0.152-rc.
|
|
32
|
-
"@akinon/pz-bkm": "2.0.152-rc.
|
|
33
|
-
"@akinon/pz-checkout-gift-pack": "2.0.152-rc.
|
|
34
|
-
"@akinon/pz-click-collect": "2.0.152-rc.
|
|
35
|
-
"@akinon/pz-credit-payment": "2.0.152-rc.
|
|
36
|
-
"@akinon/pz-cybersource-uc": "2.0.152-rc.
|
|
37
|
-
"@akinon/pz-flow-payment": "2.0.152-rc.
|
|
38
|
-
"@akinon/pz-google-pay": "2.0.152-rc.
|
|
39
|
-
"@akinon/pz-gpay": "2.0.152-rc.
|
|
40
|
-
"@akinon/pz-haso": "2.0.152-rc.
|
|
41
|
-
"@akinon/pz-hepsipay": "2.0.152-rc.
|
|
42
|
-
"@akinon/pz-masterpass": "2.0.152-rc.
|
|
43
|
-
"@akinon/pz-masterpass-rest": "2.0.152-rc.
|
|
44
|
-
"@akinon/pz-multi-basket": "2.0.152-rc.
|
|
45
|
-
"@akinon/pz-one-click-checkout": "2.0.152-rc.
|
|
46
|
-
"@akinon/pz-otp": "2.0.152-rc.
|
|
47
|
-
"@akinon/pz-pay-on-delivery": "2.0.152-rc.
|
|
48
|
-
"@akinon/pz-saved-card": "2.0.152-rc.
|
|
49
|
-
"@akinon/pz-similar-products": "2.0.152-rc.
|
|
50
|
-
"@akinon/pz-tabby-extension": "2.0.152-rc.
|
|
51
|
-
"@akinon/pz-tamara-extension": "2.0.152-rc.
|
|
52
|
-
"@akinon/pz-theme": "2.0.152-rc.
|
|
53
|
-
"@akinon/pz-virtual-try-on": "2.0.152-rc.
|
|
27
|
+
"@akinon/next": "2.0.152-rc.1",
|
|
28
|
+
"@akinon/pz-akifast": "2.0.152-rc.1",
|
|
29
|
+
"@akinon/pz-apple-pay": "2.0.152-rc.1",
|
|
30
|
+
"@akinon/pz-b2b": "2.0.152-rc.1",
|
|
31
|
+
"@akinon/pz-basket-gift-pack": "2.0.152-rc.1",
|
|
32
|
+
"@akinon/pz-bkm": "2.0.152-rc.1",
|
|
33
|
+
"@akinon/pz-checkout-gift-pack": "2.0.152-rc.1",
|
|
34
|
+
"@akinon/pz-click-collect": "2.0.152-rc.1",
|
|
35
|
+
"@akinon/pz-credit-payment": "2.0.152-rc.1",
|
|
36
|
+
"@akinon/pz-cybersource-uc": "2.0.152-rc.1",
|
|
37
|
+
"@akinon/pz-flow-payment": "2.0.152-rc.1",
|
|
38
|
+
"@akinon/pz-google-pay": "2.0.152-rc.1",
|
|
39
|
+
"@akinon/pz-gpay": "2.0.152-rc.1",
|
|
40
|
+
"@akinon/pz-haso": "2.0.152-rc.1",
|
|
41
|
+
"@akinon/pz-hepsipay": "2.0.152-rc.1",
|
|
42
|
+
"@akinon/pz-masterpass": "2.0.152-rc.1",
|
|
43
|
+
"@akinon/pz-masterpass-rest": "2.0.152-rc.1",
|
|
44
|
+
"@akinon/pz-multi-basket": "2.0.152-rc.1",
|
|
45
|
+
"@akinon/pz-one-click-checkout": "2.0.152-rc.1",
|
|
46
|
+
"@akinon/pz-otp": "2.0.152-rc.1",
|
|
47
|
+
"@akinon/pz-pay-on-delivery": "2.0.152-rc.1",
|
|
48
|
+
"@akinon/pz-saved-card": "2.0.152-rc.1",
|
|
49
|
+
"@akinon/pz-similar-products": "2.0.152-rc.1",
|
|
50
|
+
"@akinon/pz-tabby-extension": "2.0.152-rc.1",
|
|
51
|
+
"@akinon/pz-tamara-extension": "2.0.152-rc.1",
|
|
52
|
+
"@akinon/pz-theme": "2.0.152-rc.1",
|
|
53
|
+
"@akinon/pz-virtual-try-on": "2.0.152-rc.1",
|
|
54
54
|
"@hookform/resolvers": "2.9.0",
|
|
55
55
|
"@next/third-parties": "16.2.6",
|
|
56
56
|
"@react-google-maps/api": "2.17.1",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"yup": "0.32.11"
|
|
75
75
|
},
|
|
76
76
|
"devDependencies": {
|
|
77
|
-
"@akinon/eslint-plugin-projectzero": "2.0.152-rc.
|
|
77
|
+
"@akinon/eslint-plugin-projectzero": "2.0.152-rc.1",
|
|
78
78
|
"@semantic-release/changelog": "6.0.2",
|
|
79
79
|
"@semantic-release/exec": "6.0.3",
|
|
80
80
|
"@semantic-release/git": "10.0.1",
|
|
@@ -13,6 +13,9 @@ import { ROUTES } from '@theme/routes';
|
|
|
13
13
|
import { useLocalization } from '@akinon/next/hooks';
|
|
14
14
|
import settings from 'settings';
|
|
15
15
|
import { getOrderStatus } from 'utils';
|
|
16
|
+
import PluginModule, { Component } from '@akinon/next/components/plugin-module';
|
|
17
|
+
|
|
18
|
+
const DELIVERED_ORDER_ITEM_STATUS = '550';
|
|
16
19
|
|
|
17
20
|
const AccountOrderDetail = () => {
|
|
18
21
|
const { id } = useParams<{ id: string }>();
|
|
@@ -228,6 +231,24 @@ const AccountOrderDetail = () => {
|
|
|
228
231
|
{itemStatus.label}
|
|
229
232
|
</div>
|
|
230
233
|
|
|
234
|
+
{item?.status?.value?.toString() ===
|
|
235
|
+
DELIVERED_ORDER_ITEM_STATUS && (
|
|
236
|
+
<PluginModule
|
|
237
|
+
component={Component.OrderItemRateAction}
|
|
238
|
+
props={{
|
|
239
|
+
orderId: order.id,
|
|
240
|
+
orderNumber: order.number,
|
|
241
|
+
orderDate: order.created_date,
|
|
242
|
+
product: {
|
|
243
|
+
sku: item.product.sku,
|
|
244
|
+
base_code: item.product.base_code,
|
|
245
|
+
name: item.product.name
|
|
246
|
+
},
|
|
247
|
+
classNames: { root: 'lg:ml-6' }
|
|
248
|
+
}}
|
|
249
|
+
/>
|
|
250
|
+
)}
|
|
251
|
+
|
|
231
252
|
{(item?.is_cancellable || item?.is_refundable) &&
|
|
232
253
|
order?.is_cancellable && (
|
|
233
254
|
<div className="lg:ml-24">
|
|
@@ -2,7 +2,11 @@ import { getProductData, getWidgetData } from '@akinon/next/data/server';
|
|
|
2
2
|
import { withSegmentDefaults } from '@akinon/next/hocs/server';
|
|
3
3
|
import { AsyncPageProps, ResolvedPageProps, Metadata } from '@akinon/next/types';
|
|
4
4
|
import { generateJsonLd, serializeJsonLd } from '@theme/utils/generate-jsonld';
|
|
5
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
AccordionWrapper,
|
|
7
|
+
ProductInfo,
|
|
8
|
+
ProductRateReview
|
|
9
|
+
} from '@theme/views/product';
|
|
6
10
|
import ProductLayout from '@theme/views/product/layout';
|
|
7
11
|
import { notFound } from 'next/navigation';
|
|
8
12
|
|
|
@@ -83,6 +87,8 @@ async function Page({ params, searchParams }: ResolvedPageProps<{ pk: number }>)
|
|
|
83
87
|
data={data}
|
|
84
88
|
deliveryReturn={deliveryReturn?.attributes}
|
|
85
89
|
/>
|
|
90
|
+
|
|
91
|
+
<ProductRateReview data={data} />
|
|
86
92
|
</div>
|
|
87
93
|
</ProductLayout>
|
|
88
94
|
<script
|
|
@@ -7,6 +7,7 @@ import { CategoryHeader } from './category-header';
|
|
|
7
7
|
import { Filters } from './filters';
|
|
8
8
|
import { Pagination } from '@theme/components';
|
|
9
9
|
import { ProductItem } from '@theme/views/product-item';
|
|
10
|
+
import PluginModule, { Component } from '@akinon/next/components/plugin-module';
|
|
10
11
|
import { GetCategoryResponse } from '@akinon/next/types';
|
|
11
12
|
import { useAppDispatch, useAppSelector } from '@akinon/next/redux/hooks';
|
|
12
13
|
import { setFacets, setMenuOpen } from '@theme/redux/reducers/category';
|
|
@@ -119,15 +120,20 @@ export default function ListPage(props: ListPageProps) {
|
|
|
119
120
|
'lg:grid-cols-3': layoutSize === 3
|
|
120
121
|
})}
|
|
121
122
|
>
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
123
|
+
<PluginModule
|
|
124
|
+
component={Component.RateReviewPlpProvider}
|
|
125
|
+
props={{ products: data?.products ?? [] }}
|
|
126
|
+
>
|
|
127
|
+
{data?.products?.map((product, index) => (
|
|
128
|
+
<ProductItem
|
|
129
|
+
key={product.pk}
|
|
130
|
+
product={product}
|
|
131
|
+
width={itemDimensions.width}
|
|
132
|
+
height={itemDimensions.height}
|
|
133
|
+
index={index}
|
|
134
|
+
/>
|
|
135
|
+
))}
|
|
136
|
+
</PluginModule>
|
|
131
137
|
</div>
|
|
132
138
|
</FavouriteProductIdsProvider>
|
|
133
139
|
{data?.products?.length > 0 && (
|
|
@@ -6,4 +6,5 @@ export { default as ProductGroupInfo } from './product-group-info';
|
|
|
6
6
|
export { default as MiscButtons } from './misc-buttons';
|
|
7
7
|
export { default as ProductInfoSlider } from './slider';
|
|
8
8
|
export { default as AccordionWrapper } from './accordion-wrapper';
|
|
9
|
+
export { default as ProductRateReview } from './rate-review';
|
|
9
10
|
export { default as CombineProductCard } from './combine-product-card';
|
|
@@ -73,6 +73,17 @@ export default function ProductInfo({ data }: ProductPageProps) {
|
|
|
73
73
|
|
|
74
74
|
return (
|
|
75
75
|
<>
|
|
76
|
+
<PluginModule
|
|
77
|
+
component={Component.RateReviewBadge}
|
|
78
|
+
props={{
|
|
79
|
+
product: {
|
|
80
|
+
sku: data.product.sku,
|
|
81
|
+
base_code: data.product.base_code
|
|
82
|
+
},
|
|
83
|
+
classNames: { root: 'mt-2' }
|
|
84
|
+
}}
|
|
85
|
+
/>
|
|
86
|
+
|
|
76
87
|
<div
|
|
77
88
|
className={clsx(
|
|
78
89
|
'fixed bottom-0 left-0 w-1/2 h-14 z-[20] bg-white mt-0 border-t border-gray-500 items-center justify-center',
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import PluginModule, { Component } from '@akinon/next/components/plugin-module';
|
|
4
|
+
import { ProductPageProps } from './layout';
|
|
5
|
+
|
|
6
|
+
export default function ProductRateReview({
|
|
7
|
+
data
|
|
8
|
+
}: Pick<ProductPageProps, 'data'>) {
|
|
9
|
+
return (
|
|
10
|
+
<PluginModule
|
|
11
|
+
component={Component.ProductRateReview}
|
|
12
|
+
props={{
|
|
13
|
+
product: {
|
|
14
|
+
sku: data.product.sku,
|
|
15
|
+
base_code: data.product.base_code
|
|
16
|
+
},
|
|
17
|
+
classNames: { root: 'w-full mt-8' }
|
|
18
|
+
}}
|
|
19
|
+
/>
|
|
20
|
+
);
|
|
21
|
+
}
|
|
@@ -10,6 +10,7 @@ import useFavButton from '../../hooks/use-fav-button';
|
|
|
10
10
|
import { Product } from '@akinon/next/types';
|
|
11
11
|
import { Image } from '@akinon/next/components/image';
|
|
12
12
|
import { Price, Link } from '@theme/components';
|
|
13
|
+
import PluginModule, { Component } from '@akinon/next/components/plugin-module';
|
|
13
14
|
|
|
14
15
|
interface Props {
|
|
15
16
|
product: Product;
|
|
@@ -81,6 +82,10 @@ export const ProductItem = (props: Props) => {
|
|
|
81
82
|
>
|
|
82
83
|
{product_name}
|
|
83
84
|
</Link>
|
|
85
|
+
<PluginModule
|
|
86
|
+
component={Component.RateReviewPlpBadge}
|
|
87
|
+
props={{ product }}
|
|
88
|
+
/>
|
|
84
89
|
<div className="font-semibold">
|
|
85
90
|
{parseFloat(retail_price) > parseFloat(price) && (
|
|
86
91
|
<Price
|
package/commands/plugins.ts
CHANGED
package/dist/commands/plugins.js
CHANGED
|
@@ -199,6 +199,10 @@ exports.default = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
199
199
|
name: 'Virtual Try-On',
|
|
200
200
|
value: 'pz-virtual-try-on'
|
|
201
201
|
},
|
|
202
|
+
{
|
|
203
|
+
name: 'Rate & Review',
|
|
204
|
+
value: 'pz-rate-review'
|
|
205
|
+
},
|
|
202
206
|
{
|
|
203
207
|
name: 'Masterpass Rest',
|
|
204
208
|
value: 'pz-masterpass-rest'
|