@akinon/projectzero 1.114.0-rc.21 → 1.114.0-snapshot-ZERO-3890-20251209002502
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 +2 -5
- package/app-template/.env.example +0 -1
- package/app-template/CHANGELOG.md +0 -77
- package/app-template/README.md +1 -25
- package/app-template/package.json +25 -26
- package/app-template/public/locales/en/account.json +1 -3
- package/app-template/public/locales/en/common.json +1 -42
- package/app-template/public/locales/en/product.json +3 -3
- package/app-template/public/locales/tr/account.json +1 -3
- package/app-template/public/locales/tr/common.json +1 -42
- package/app-template/public/locales/tr/product.json +1 -1
- package/app-template/src/app/[commerce]/[locale]/[currency]/account/orders/[id]/page.tsx +1 -20
- package/app-template/src/components/modal.tsx +0 -2
- package/app-template/src/components/select.tsx +1 -1
- package/app-template/src/hooks/index.ts +0 -2
- package/app-template/src/plugins.js +0 -1
- package/app-template/src/views/account/orders/order-detail-header.tsx +1 -1
- package/app-template/src/views/checkout/steps/shipping/address-box.tsx +17 -30
- package/app-template/src/views/checkout/steps/shipping/addresses.tsx +1 -1
- package/app-template/src/views/header/search/index.tsx +5 -26
- package/app-template/src/views/product/slider.tsx +37 -84
- package/commands/plugins.ts +8 -4
- package/dist/commands/plugins.js +250 -176
- package/package.json +1 -1
- package/app-template/src/app/api/image-proxy/route.ts +0 -1
- package/app-template/src/app/api/similar-product-list/route.ts +0 -1
- package/app-template/src/app/api/similar-products/route.ts +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
# @akinon/projectzero
|
|
2
2
|
|
|
3
|
-
## 1.114.0-
|
|
4
|
-
|
|
5
|
-
## 1.114.0-rc.20
|
|
3
|
+
## 1.114.0-snapshot-ZERO-3890-20251209002502
|
|
6
4
|
|
|
7
5
|
### Minor Changes
|
|
8
6
|
|
|
9
|
-
-
|
|
10
|
-
- d99a6a7: ZERO-3457_1: Fixed the settings prop and made sure everything is customizable.
|
|
7
|
+
- b59bed4: ZERO-3878: Reintegrated similar products and removed localStorage checks and implemented props based showing of buttons
|
|
11
8
|
|
|
12
9
|
## 1.113.0
|
|
13
10
|
|
|
@@ -7,7 +7,6 @@ NEXT_PUBLIC_URL=http://localhost:3000
|
|
|
7
7
|
SERVICE_BACKEND_URL=https://02fde10fee4440269e695aa10707dfaf.lb.akinoncloud.com
|
|
8
8
|
SITEMAP_S3_BUCKET_NAME=0fb534
|
|
9
9
|
NEXT_PUBLIC_VIRTUAL_TRY_ON_API_URL=https://d2a26507c7094f359aba349b96a96881.lb.akinoncloud.com
|
|
10
|
-
NEXT_PUBLIC_ENABLE_IMAGE_SEARCH=true
|
|
11
10
|
|
|
12
11
|
# LOG_LEVEL_DEV=debug # For more details, please refer to the Logging documentation.
|
|
13
12
|
|
|
@@ -1,82 +1,5 @@
|
|
|
1
1
|
# projectzeronext
|
|
2
2
|
|
|
3
|
-
## 1.114.0-rc.21
|
|
4
|
-
|
|
5
|
-
### Patch Changes
|
|
6
|
-
|
|
7
|
-
- Updated dependencies [6b73b05]
|
|
8
|
-
- @akinon/pz-masterpass-rest@1.114.0-rc.21
|
|
9
|
-
- @akinon/next@1.114.0-rc.21
|
|
10
|
-
- @akinon/pz-akifast@1.114.0-rc.21
|
|
11
|
-
- @akinon/pz-apple-pay@1.114.0-rc.21
|
|
12
|
-
- @akinon/pz-b2b@1.114.0-rc.21
|
|
13
|
-
- @akinon/pz-basket-gift-pack@1.114.0-rc.21
|
|
14
|
-
- @akinon/pz-bkm@1.114.0-rc.21
|
|
15
|
-
- @akinon/pz-checkout-gift-pack@1.114.0-rc.21
|
|
16
|
-
- @akinon/pz-click-collect@1.114.0-rc.21
|
|
17
|
-
- @akinon/pz-credit-payment@1.114.0-rc.21
|
|
18
|
-
- @akinon/pz-cybersource-uc@1.114.0-rc.21
|
|
19
|
-
- @akinon/pz-flow-payment@1.114.0-rc.21
|
|
20
|
-
- @akinon/pz-gpay@1.114.0-rc.21
|
|
21
|
-
- @akinon/pz-hepsipay@1.114.0-rc.21
|
|
22
|
-
- @akinon/pz-masterpass@1.114.0-rc.21
|
|
23
|
-
- @akinon/pz-multi-basket@1.114.0-rc.21
|
|
24
|
-
- @akinon/pz-one-click-checkout@1.114.0-rc.21
|
|
25
|
-
- @akinon/pz-otp@1.114.0-rc.21
|
|
26
|
-
- @akinon/pz-pay-on-delivery@1.114.0-rc.21
|
|
27
|
-
- @akinon/pz-saved-card@1.114.0-rc.21
|
|
28
|
-
- @akinon/pz-similar-products@1.114.0-rc.21
|
|
29
|
-
- @akinon/pz-tabby-extension@1.114.0-rc.21
|
|
30
|
-
- @akinon/pz-tamara-extension@1.114.0-rc.21
|
|
31
|
-
- @akinon/pz-virtual-try-on@1.114.0-rc.21
|
|
32
|
-
|
|
33
|
-
## 1.114.0-rc.20
|
|
34
|
-
|
|
35
|
-
### Minor Changes
|
|
36
|
-
|
|
37
|
-
- 4449f3a: ZERO-3681: Add order details localization and improve order handling in AccountOrderDetail
|
|
38
|
-
- 1a8622a9: ZERO-3392: Implemented AI Search functionality and update env
|
|
39
|
-
- b55acb76: ZERO-2577: Fix pagination bug and update usePagination hook and ensure pagination controls rendering correctly
|
|
40
|
-
- 143be2b: ZERO-3457: Crop styles are customizable and logic improved for rendering similar products modal
|
|
41
|
-
- 9f8cd3bc: ZERO-3449: AI Search Active Filters & Crop Style changes have been implemented
|
|
42
|
-
- d99a6a7: ZERO-3457_1: Fixed the settings prop and made sure everything is customizable.
|
|
43
|
-
- b87517f: ZERO-3680: Enhance select component styling to ensure focus state is consistent
|
|
44
|
-
- b05c3543: ZERO-2570: Category filters routes to absolute url
|
|
45
|
-
|
|
46
|
-
### Patch Changes
|
|
47
|
-
|
|
48
|
-
- Updated dependencies [d2c0e75]
|
|
49
|
-
- Updated dependencies [b55acb76]
|
|
50
|
-
- Updated dependencies [143be2b]
|
|
51
|
-
- Updated dependencies [9f8cd3bc]
|
|
52
|
-
- Updated dependencies [d99a6a7]
|
|
53
|
-
- Updated dependencies [7056203]
|
|
54
|
-
- Updated dependencies [4de5303c]
|
|
55
|
-
- Updated dependencies [95b139d]
|
|
56
|
-
- @akinon/next@1.114.0-rc.20
|
|
57
|
-
- @akinon/pz-virtual-try-on@1.114.0-rc.20
|
|
58
|
-
- @akinon/pz-akifast@1.114.0-rc.20
|
|
59
|
-
- @akinon/pz-apple-pay@1.114.0-rc.20
|
|
60
|
-
- @akinon/pz-b2b@1.114.0-rc.20
|
|
61
|
-
- @akinon/pz-basket-gift-pack@1.114.0-rc.20
|
|
62
|
-
- @akinon/pz-bkm@1.114.0-rc.20
|
|
63
|
-
- @akinon/pz-checkout-gift-pack@1.114.0-rc.20
|
|
64
|
-
- @akinon/pz-click-collect@1.114.0-rc.20
|
|
65
|
-
- @akinon/pz-credit-payment@1.114.0-rc.20
|
|
66
|
-
- @akinon/pz-cybersource-uc@1.114.0-rc.20
|
|
67
|
-
- @akinon/pz-flow-payment@1.114.0-rc.20
|
|
68
|
-
- @akinon/pz-gpay@1.114.0-rc.20
|
|
69
|
-
- @akinon/pz-hepsipay@1.114.0-rc.20
|
|
70
|
-
- @akinon/pz-masterpass@1.114.0-rc.20
|
|
71
|
-
- @akinon/pz-masterpass-rest@1.114.0-rc.20
|
|
72
|
-
- @akinon/pz-multi-basket@1.114.0-rc.20
|
|
73
|
-
- @akinon/pz-one-click-checkout@1.114.0-rc.20
|
|
74
|
-
- @akinon/pz-otp@1.114.0-rc.20
|
|
75
|
-
- @akinon/pz-pay-on-delivery@1.114.0-rc.20
|
|
76
|
-
- @akinon/pz-saved-card@1.114.0-rc.20
|
|
77
|
-
- @akinon/pz-tabby-extension@1.114.0-rc.20
|
|
78
|
-
- @akinon/pz-tamara-extension@1.114.0-rc.20
|
|
79
|
-
|
|
80
3
|
## 1.113.0
|
|
81
4
|
|
|
82
5
|
### Patch Changes
|
package/app-template/README.md
CHANGED
|
@@ -12,30 +12,6 @@ Run `cp .env.example .env && yarn` command at project root and all dependencies
|
|
|
12
12
|
|
|
13
13
|
- `SITEMAP_S3_BUCKET_NAME`: S3 bucket name for XML sitemaps (e.g., "0fb534"). This is required for the sitemap route to function correctly.
|
|
14
14
|
|
|
15
|
-
### Optional Environment Variables
|
|
16
|
-
|
|
17
|
-
- `NEXT_PUBLIC_ENABLE_IMAGE_SEARCH`: Set to `true` to enable image search feature for all users. If not set or `false`, the feature will only be visible to users who have enabled it via localStorage.
|
|
18
|
-
|
|
19
|
-
## Image Search Feature
|
|
20
|
-
|
|
21
|
-
The image search functionality allows users to search for similar products by uploading images or cropping existing product images.
|
|
22
|
-
|
|
23
|
-
### Feature Visibility Control
|
|
24
|
-
|
|
25
|
-
The image search feature can be controlled in two ways:
|
|
26
|
-
|
|
27
|
-
1. **Environment Variable (Global)**: Set `NEXT_PUBLIC_ENABLE_IMAGE_SEARCH=true` to enable for all users
|
|
28
|
-
2. **localStorage (Individual Users)**: Users can enable it locally using browser developer tools
|
|
29
|
-
|
|
30
|
-
````
|
|
31
|
-
|
|
32
|
-
### Feature Locations
|
|
33
|
-
|
|
34
|
-
When enabled, the image search feature appears in:
|
|
35
|
-
|
|
36
|
-
- **Header Search**: Camera icon next to the search input
|
|
37
|
-
- **Product Detail Page**: "View Similar Styles" button on product images
|
|
38
|
-
|
|
39
15
|
### Build
|
|
40
16
|
|
|
41
17
|
To build the app, run the following command:
|
|
@@ -43,7 +19,7 @@ To build the app, run the following command:
|
|
|
43
19
|
```bash
|
|
44
20
|
cd projectzeronext # Project root
|
|
45
21
|
yarn build
|
|
46
|
-
|
|
22
|
+
```
|
|
47
23
|
|
|
48
24
|
### Develop
|
|
49
25
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "projectzeronext",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.113.0",
|
|
4
4
|
"private": true,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"scripts": {
|
|
@@ -24,30 +24,29 @@
|
|
|
24
24
|
"test:middleware": "jest middleware-matcher.test.ts --bail"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@akinon/next": "1.
|
|
28
|
-
"@akinon/pz-akifast": "1.
|
|
29
|
-
"@akinon/pz-apple-pay": "1.
|
|
30
|
-
"@akinon/pz-b2b": "1.
|
|
31
|
-
"@akinon/pz-basket-gift-pack": "1.
|
|
32
|
-
"@akinon/pz-bkm": "1.
|
|
33
|
-
"@akinon/pz-checkout-gift-pack": "1.
|
|
34
|
-
"@akinon/pz-click-collect": "1.
|
|
35
|
-
"@akinon/pz-credit-payment": "1.
|
|
36
|
-
"@akinon/pz-cybersource-uc": "1.
|
|
37
|
-
"@akinon/pz-flow-payment": "1.
|
|
38
|
-
"@akinon/pz-gpay": "1.
|
|
39
|
-
"@akinon/pz-hepsipay": "1.
|
|
40
|
-
"@akinon/pz-masterpass": "1.
|
|
41
|
-
"@akinon/pz-masterpass-rest": "1.
|
|
42
|
-
"@akinon/pz-multi-basket": "1.
|
|
43
|
-
"@akinon/pz-one-click-checkout": "1.
|
|
44
|
-
"@akinon/pz-otp": "1.
|
|
45
|
-
"@akinon/pz-pay-on-delivery": "1.
|
|
46
|
-
"@akinon/pz-saved-card": "1.
|
|
47
|
-
"@akinon/pz-
|
|
48
|
-
"@akinon/pz-
|
|
49
|
-
"@akinon/pz-
|
|
50
|
-
"@akinon/pz-virtual-try-on": "1.114.0-rc.21",
|
|
27
|
+
"@akinon/next": "1.113.0",
|
|
28
|
+
"@akinon/pz-akifast": "1.113.0",
|
|
29
|
+
"@akinon/pz-apple-pay": "1.113.0",
|
|
30
|
+
"@akinon/pz-b2b": "1.113.0",
|
|
31
|
+
"@akinon/pz-basket-gift-pack": "1.113.0",
|
|
32
|
+
"@akinon/pz-bkm": "1.113.0",
|
|
33
|
+
"@akinon/pz-checkout-gift-pack": "1.113.0",
|
|
34
|
+
"@akinon/pz-click-collect": "1.113.0",
|
|
35
|
+
"@akinon/pz-credit-payment": "1.113.0",
|
|
36
|
+
"@akinon/pz-cybersource-uc": "1.113.0",
|
|
37
|
+
"@akinon/pz-flow-payment": "1.113.0",
|
|
38
|
+
"@akinon/pz-gpay": "1.113.0",
|
|
39
|
+
"@akinon/pz-hepsipay": "1.113.0",
|
|
40
|
+
"@akinon/pz-masterpass": "1.113.0",
|
|
41
|
+
"@akinon/pz-masterpass-rest": "1.113.0",
|
|
42
|
+
"@akinon/pz-multi-basket": "1.113.0",
|
|
43
|
+
"@akinon/pz-one-click-checkout": "1.113.0",
|
|
44
|
+
"@akinon/pz-otp": "1.113.0",
|
|
45
|
+
"@akinon/pz-pay-on-delivery": "1.113.0",
|
|
46
|
+
"@akinon/pz-saved-card": "1.113.0",
|
|
47
|
+
"@akinon/pz-tabby-extension": "1.113.0",
|
|
48
|
+
"@akinon/pz-tamara-extension": "1.113.0",
|
|
49
|
+
"@akinon/pz-virtual-try-on": "1.113.0",
|
|
51
50
|
"@hookform/resolvers": "2.9.0",
|
|
52
51
|
"@next/third-parties": "14.1.0",
|
|
53
52
|
"@react-google-maps/api": "2.17.1",
|
|
@@ -70,7 +69,7 @@
|
|
|
70
69
|
"yup": "0.32.11"
|
|
71
70
|
},
|
|
72
71
|
"devDependencies": {
|
|
73
|
-
"@akinon/eslint-plugin-projectzero": "1.
|
|
72
|
+
"@akinon/eslint-plugin-projectzero": "1.113.0",
|
|
74
73
|
"@semantic-release/changelog": "6.0.2",
|
|
75
74
|
"@semantic-release/exec": "6.0.3",
|
|
76
75
|
"@semantic-release/git": "10.0.1",
|
|
@@ -242,9 +242,7 @@
|
|
|
242
242
|
"total": "Total",
|
|
243
243
|
"items": "items",
|
|
244
244
|
"packages": "Packages",
|
|
245
|
-
"package_no": "Package no"
|
|
246
|
-
"back_to_orders": "Back to Orders",
|
|
247
|
-
"no_orders_found": "No orders found"
|
|
245
|
+
"package_no": "Package no"
|
|
248
246
|
},
|
|
249
247
|
"return": {
|
|
250
248
|
"title": "Return Items",
|
|
@@ -29,25 +29,7 @@
|
|
|
29
29
|
"clean": "clean",
|
|
30
30
|
"categories": "CATEGORIES",
|
|
31
31
|
"view_all": "VIEW ALL",
|
|
32
|
-
"not_found": "Search Results Not Found"
|
|
33
|
-
"image_search": {
|
|
34
|
-
"title": "Search by Image",
|
|
35
|
-
"upload_image": "Upload an image to find similar products",
|
|
36
|
-
"select_image": "Select Image",
|
|
37
|
-
"crop_image": "Crop Image",
|
|
38
|
-
"cancel_crop": "Cancel Crop",
|
|
39
|
-
"apply_crop": "Apply Crop",
|
|
40
|
-
"try_another": "Try Another Image",
|
|
41
|
-
"search_image": "Search Image",
|
|
42
|
-
"similar_products": "Similar Products",
|
|
43
|
-
"loading_cropper": "Loading cropper...",
|
|
44
|
-
"no_products": "No similar products found",
|
|
45
|
-
"best_results": "For best results:",
|
|
46
|
-
"tip_1": "Upload clear images of products",
|
|
47
|
-
"tip_2": "Use images with simple backgrounds",
|
|
48
|
-
"tip_3": "Focus on the main product",
|
|
49
|
-
"tip_4": "Use the crop tool to focus on specific details"
|
|
50
|
-
}
|
|
32
|
+
"not_found": "Search Results Not Found"
|
|
51
33
|
},
|
|
52
34
|
"page_404": {
|
|
53
35
|
"title": "Page not found.",
|
|
@@ -92,29 +74,6 @@
|
|
|
92
74
|
"select_file": "Select File",
|
|
93
75
|
"no_file": "No file selected"
|
|
94
76
|
},
|
|
95
|
-
"product": {
|
|
96
|
-
"no_products": "No products found",
|
|
97
|
-
"new_image": "New Image",
|
|
98
|
-
"view_similar_styles": "View Similar Styles",
|
|
99
|
-
"clear_all_filters": "Clear All Filters",
|
|
100
|
-
"reset_to_original": "Reset to Original",
|
|
101
|
-
"similar_styles": "Similar Styles",
|
|
102
|
-
"filters": "Filters",
|
|
103
|
-
"active_filters": "Active Filters"
|
|
104
|
-
},
|
|
105
|
-
"similar_products": {
|
|
106
|
-
"errors": {
|
|
107
|
-
"file_size_too_large": "Image size should be less than 5MB",
|
|
108
|
-
"invalid_image_file": "The selected file is not a valid image",
|
|
109
|
-
"invalid_image_format": "Invalid image format detected",
|
|
110
|
-
"search_failed": "Search failed. Please try again later",
|
|
111
|
-
"connection_failed": "Image search failed. Please check your connection and try again",
|
|
112
|
-
"invalid_image_properties": "Invalid image properties detected",
|
|
113
|
-
"file_read_error": "Error reading the file",
|
|
114
|
-
"processing_error": "Error processing image",
|
|
115
|
-
"crop_processing_error": "Error processing cropped image"
|
|
116
|
-
}
|
|
117
|
-
},
|
|
118
77
|
"forms": {
|
|
119
78
|
"sending": "Sending...",
|
|
120
79
|
"success": "Form submitted successfully!",
|
|
@@ -77,10 +77,10 @@
|
|
|
77
77
|
"photo_preview": "Photo Preview",
|
|
78
78
|
"error_title": "An Error Occurred",
|
|
79
79
|
"legal": {
|
|
80
|
-
"title": "
|
|
81
|
-
"text": "
|
|
80
|
+
"title": "Consent Statement",
|
|
81
|
+
"text": "I hereby declare that I give my <strong>explicit consent</strong> for the image I will upload to be used for <strong>AI-powered processing, enhancement, analysis, and content creation</strong> purposes.",
|
|
82
82
|
"accept": "Accept",
|
|
83
|
-
"error": "Please accept the
|
|
83
|
+
"error": "Please accept the consent statement."
|
|
84
84
|
},
|
|
85
85
|
"multiple_results_title": "Virtual Try-On Results",
|
|
86
86
|
"multiple_results_subtitle": "Try-on completed for {{count}} products",
|
|
@@ -242,9 +242,7 @@
|
|
|
242
242
|
"total": "Toplam",
|
|
243
243
|
"items": "adet",
|
|
244
244
|
"packages": "paket",
|
|
245
|
-
"package_no": "Paket no"
|
|
246
|
-
"back_to_orders": "Siparişlere geri dön",
|
|
247
|
-
"no_orders_found": "Sipariş bulunamadı"
|
|
245
|
+
"package_no": "Paket no"
|
|
248
246
|
},
|
|
249
247
|
"return": {
|
|
250
248
|
"title": "İade Ürünleri",
|
|
@@ -29,25 +29,7 @@
|
|
|
29
29
|
"clean": "temizle",
|
|
30
30
|
"categories": "KATEGORİLER",
|
|
31
31
|
"view_all": "HEPSİNİ GÖSTER",
|
|
32
|
-
"not_found": "Arama Sonuçları Bulunamadı"
|
|
33
|
-
"image_search": {
|
|
34
|
-
"title": "Görsel ile Ara",
|
|
35
|
-
"upload_image": "Benzer ürünleri bulmak için bir görsel yükleyin",
|
|
36
|
-
"select_image": "Görsel Seç",
|
|
37
|
-
"crop_image": "Görsel Kırp",
|
|
38
|
-
"cancel_crop": "Kırpmayı İptal Et",
|
|
39
|
-
"apply_crop": "Kırpmayı Uygula",
|
|
40
|
-
"try_another": "Başka Görsel Dene",
|
|
41
|
-
"search_image": "Arama Görseli",
|
|
42
|
-
"similar_products": "Benzer Ürünler",
|
|
43
|
-
"loading_cropper": "Kırpıcı yükleniyor...",
|
|
44
|
-
"no_products": "Benzer ürün bulunamadı",
|
|
45
|
-
"best_results": "En iyi sonuçlar için:",
|
|
46
|
-
"tip_1": "Net ürün görselleri yükleyin",
|
|
47
|
-
"tip_2": "Basit arka planlı görseller kullanın",
|
|
48
|
-
"tip_3": "Ana ürüne odaklanın",
|
|
49
|
-
"tip_4": "Belirli detaylara odaklanmak için kırpma aracını kullanın"
|
|
50
|
-
}
|
|
32
|
+
"not_found": "Arama Sonuçları Bulunamadı"
|
|
51
33
|
},
|
|
52
34
|
"page_404": {
|
|
53
35
|
"title": "Sayfa bulunamadı.",
|
|
@@ -92,29 +74,6 @@
|
|
|
92
74
|
"select_file": "Dosya Seç",
|
|
93
75
|
"no_file": "Dosya seçilmedi"
|
|
94
76
|
},
|
|
95
|
-
"product": {
|
|
96
|
-
"no_products": "Ürün bulunamadı",
|
|
97
|
-
"new_image": "Yeni Görsel",
|
|
98
|
-
"view_similar_styles": "Benzer Stillere Göz At",
|
|
99
|
-
"clear_all_filters": "Tüm Filtreleri Temizle",
|
|
100
|
-
"reset_to_original": "Orjinale Dön",
|
|
101
|
-
"similar_styles": "Benzer Stillere Göz At",
|
|
102
|
-
"filters": "Filtreler",
|
|
103
|
-
"active_filters": "Aktif Filtreler"
|
|
104
|
-
},
|
|
105
|
-
"similar_products": {
|
|
106
|
-
"errors": {
|
|
107
|
-
"file_size_too_large": "Görsel boyutu 5MB'dan küçük olmalıdır",
|
|
108
|
-
"invalid_image_file": "Seçilen dosya geçerli bir görsel değil",
|
|
109
|
-
"invalid_image_format": "Geçersiz görsel formatı tespit edildi",
|
|
110
|
-
"search_failed": "Arama başarısız oldu. Lütfen daha sonra tekrar deneyin",
|
|
111
|
-
"connection_failed": "Görsel arama başarısız oldu. Lütfen bağlantınızı kontrol edip tekrar deneyin",
|
|
112
|
-
"invalid_image_properties": "Geçersiz görsel özellikleri tespit edildi",
|
|
113
|
-
"file_read_error": "Dosya okuma hatası",
|
|
114
|
-
"processing_error": "Görsel işleme hatası",
|
|
115
|
-
"crop_processing_error": "Kırpılan görsel işleme hatası"
|
|
116
|
-
}
|
|
117
|
-
},
|
|
118
77
|
"forms": {
|
|
119
78
|
"sending": "Gönderiliyor...",
|
|
120
79
|
"success": "Form başarıyla gönderildi!",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"cabin": "Sanal Deneme Kabini",
|
|
81
81
|
"legal": {
|
|
82
82
|
"title": "Açık Rıza Metni",
|
|
83
|
-
"text": "
|
|
83
|
+
"text": "Yükleyeceğim görselin, <strong>yapay zekâ destekli işleme, iyileştirme, analiz ve içerik oluşturma</strong> amaçlarıyla kullanılmasına <strong>açık rıza verdiğimi</strong> beyan ederim.",
|
|
84
84
|
"accept": "Onayla",
|
|
85
85
|
"error": "Lütfen açık rıza metnini onaylayın."
|
|
86
86
|
},
|
|
@@ -61,26 +61,7 @@ const AccountOrderDetail = ({ params: { id } }) => {
|
|
|
61
61
|
}, [order, isSuccess, localeValue]);
|
|
62
62
|
|
|
63
63
|
if (isLoading && isFetching) {
|
|
64
|
-
return
|
|
65
|
-
<div className="flex flex-col items-center justify-center h-96">
|
|
66
|
-
<LoaderSpinner />
|
|
67
|
-
</div>
|
|
68
|
-
);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
if (!order) {
|
|
72
|
-
return (
|
|
73
|
-
<div className="flex flex-col items-center justify-center h-96">
|
|
74
|
-
<p className="mt-5 text-start text-lg mb-4">
|
|
75
|
-
{t('account.my_orders.detail.no_orders_found')}
|
|
76
|
-
</p>
|
|
77
|
-
<Link href={`/account/orders/`}>
|
|
78
|
-
<Button className="px-4" appearance="filled">
|
|
79
|
-
{t('account.my_orders.detail.back_to_orders')}
|
|
80
|
-
</Button>
|
|
81
|
-
</Link>
|
|
82
|
-
</div>
|
|
83
|
-
);
|
|
64
|
+
return <LoaderSpinner />;
|
|
84
65
|
}
|
|
85
66
|
|
|
86
67
|
return (
|
|
@@ -41,14 +41,12 @@ export const Modal = (props: ModalProps) => {
|
|
|
41
41
|
'fixed top-0 left-0 w-screen h-screen bg-primary bg-opacity-60 z-50',
|
|
42
42
|
overlayClassName
|
|
43
43
|
)}
|
|
44
|
-
onClick={(e) => e.stopPropagation()}
|
|
45
44
|
/>
|
|
46
45
|
<section
|
|
47
46
|
className={twMerge(
|
|
48
47
|
'fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 z-50 bg-white',
|
|
49
48
|
className
|
|
50
49
|
)}
|
|
51
|
-
onClick={(e) => e.stopPropagation()}
|
|
52
50
|
>
|
|
53
51
|
{(showCloseButton || title) && (
|
|
54
52
|
<div
|
|
@@ -48,7 +48,7 @@ const Select = forwardRef<HTMLSelectElement, SelectProps>((props, ref) => {
|
|
|
48
48
|
clsx(
|
|
49
49
|
'cursor-pointer truncate h-10 w-40 px-2.5 shrink-0 outline-none',
|
|
50
50
|
!borderless &&
|
|
51
|
-
'border border-gray-200 transition-all duration-150 hover:border-primary
|
|
51
|
+
'border border-gray-200 transition-all duration-150 hover:border-primary',
|
|
52
52
|
'appearance-none bg-transparent'
|
|
53
53
|
),
|
|
54
54
|
className
|
|
@@ -21,7 +21,7 @@ export const OrderDetailHeader = ({ title, order, children }: Props) => {
|
|
|
21
21
|
<div>
|
|
22
22
|
<span>{t('account.my_orders.detail.order_number')}</span>:{' '}
|
|
23
23
|
<span data-testid="account-orders-return-order-id">
|
|
24
|
-
{order
|
|
24
|
+
{order.number}
|
|
25
25
|
</span>
|
|
26
26
|
</div>
|
|
27
27
|
|
|
@@ -85,7 +85,7 @@ const AddressBox = ({
|
|
|
85
85
|
};
|
|
86
86
|
|
|
87
87
|
const onSubmit = (data) => {
|
|
88
|
-
editAddress({ ...data, invalidateTag: '
|
|
88
|
+
editAddress({ ...data, invalidateTag: 'Addresses' })
|
|
89
89
|
.unwrap()
|
|
90
90
|
.then((editAddressResponse) => {
|
|
91
91
|
handleAddressClick(addressType, editAddressResponse);
|
|
@@ -96,7 +96,7 @@ const AddressBox = ({
|
|
|
96
96
|
};
|
|
97
97
|
|
|
98
98
|
const handleRemoveAddress = async (addressPk: number) => {
|
|
99
|
-
await removeAddress({ id: addressPk, invalidateTag: '
|
|
99
|
+
await removeAddress({ id: addressPk, invalidateTag: 'Addresses' });
|
|
100
100
|
setRemoveAddressModalOpen(false);
|
|
101
101
|
dispatch(resetCheckoutState());
|
|
102
102
|
|
|
@@ -168,10 +168,7 @@ const AddressBox = ({
|
|
|
168
168
|
<Button
|
|
169
169
|
appearance="ghost"
|
|
170
170
|
className="italic underline hover:text-secondary-500 hover:!bg-white hover:!border-white p-0 h-auto"
|
|
171
|
-
onClick={(
|
|
172
|
-
e.stopPropagation();
|
|
173
|
-
setIsEditAddressModalOpen(true);
|
|
174
|
-
}}
|
|
171
|
+
onClick={() => setIsEditAddressModalOpen(true)}
|
|
175
172
|
data-testid="checkout-address-edit"
|
|
176
173
|
>
|
|
177
174
|
{t('checkout.address.box.edit')}
|
|
@@ -183,26 +180,21 @@ const AddressBox = ({
|
|
|
183
180
|
setOpen={setIsEditAddressModalOpen}
|
|
184
181
|
className="w-full sm:w-[28rem] max-h-[90vh] overflow-y-auto"
|
|
185
182
|
>
|
|
186
|
-
<
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
/>
|
|
197
|
-
</div>
|
|
183
|
+
<AddressForm
|
|
184
|
+
data={{
|
|
185
|
+
...address,
|
|
186
|
+
country: address.country?.pk,
|
|
187
|
+
city: address.city?.pk,
|
|
188
|
+
township: address.township?.pk,
|
|
189
|
+
district: address.district?.pk
|
|
190
|
+
}}
|
|
191
|
+
onSubmit={onSubmit}
|
|
192
|
+
/>
|
|
198
193
|
</Modal>
|
|
199
194
|
<Button
|
|
200
195
|
appearance="ghost"
|
|
201
196
|
className="italic underline hover:text-secondary-500 hover:!bg-white hover:!border-white p-0 h-auto"
|
|
202
|
-
onClick={(
|
|
203
|
-
e.stopPropagation();
|
|
204
|
-
setRemoveAddressModalOpen(true);
|
|
205
|
-
}}
|
|
197
|
+
onClick={() => setRemoveAddressModalOpen(true)}
|
|
206
198
|
data-testid="checkout-address-remove"
|
|
207
199
|
>
|
|
208
200
|
{t('checkout.address.box.remove')}
|
|
@@ -215,18 +207,14 @@ const AddressBox = ({
|
|
|
215
207
|
setOpen={setRemoveAddressModalOpen}
|
|
216
208
|
showCloseButton={false}
|
|
217
209
|
>
|
|
218
|
-
<div
|
|
219
|
-
className="text-center px-6 py-10"
|
|
220
|
-
onClick={(e) => e.stopPropagation()}
|
|
221
|
-
>
|
|
210
|
+
<div className="text-center px-6 py-10">
|
|
222
211
|
<p className="mb-4">
|
|
223
212
|
{t('account.address_book.modal.delete_description')}
|
|
224
213
|
</p>
|
|
225
214
|
<div className="space-x-3 flex justify-center">
|
|
226
215
|
<Button
|
|
227
216
|
appearance="outlined"
|
|
228
|
-
onClick={(
|
|
229
|
-
e.stopPropagation();
|
|
217
|
+
onClick={() => {
|
|
230
218
|
setRemoveAddressModalOpen(false);
|
|
231
219
|
}}
|
|
232
220
|
data-testid="remove-address-modal-cancel"
|
|
@@ -236,8 +224,7 @@ const AddressBox = ({
|
|
|
236
224
|
<Button
|
|
237
225
|
appearance="filled"
|
|
238
226
|
disabled={removeAddressLoading}
|
|
239
|
-
onClick={(
|
|
240
|
-
e.stopPropagation();
|
|
227
|
+
onClick={() => {
|
|
241
228
|
handleRemoveAddress(address.pk);
|
|
242
229
|
}}
|
|
243
230
|
className={
|
|
@@ -77,7 +77,7 @@ const Addresses = () => {
|
|
|
77
77
|
}, [billing_and_shipping_same]);
|
|
78
78
|
|
|
79
79
|
const onSubmit = (data) => {
|
|
80
|
-
addAddress({ ...data, invalidateTag: '
|
|
80
|
+
addAddress({ ...data, invalidateTag: 'Addresses' })
|
|
81
81
|
.unwrap()
|
|
82
82
|
.then((addAddressResponse) => {
|
|
83
83
|
if (addressList.length === 0) {
|
|
@@ -4,11 +4,11 @@ import { useEffect, useRef, useState } from 'react';
|
|
|
4
4
|
import { useAppDispatch, useAppSelector } from '@akinon/next/redux/hooks';
|
|
5
5
|
import { closeSearch } from '@akinon/next/redux/reducers/header';
|
|
6
6
|
import clsx from 'clsx';
|
|
7
|
-
|
|
7
|
+
|
|
8
|
+
import { Icon } from '@theme/components';
|
|
8
9
|
import Results from './results';
|
|
9
10
|
import { ROUTES } from '@theme/routes';
|
|
10
11
|
import { useLocalization, useRouter } from '@akinon/next/hooks';
|
|
11
|
-
import PluginModule, { Component } from '@akinon/next/components/plugin-module';
|
|
12
12
|
|
|
13
13
|
export default function Search() {
|
|
14
14
|
const { t } = useLocalization();
|
|
@@ -41,14 +41,6 @@ export default function Search() {
|
|
|
41
41
|
};
|
|
42
42
|
}, [isSearchOpen, dispatch]);
|
|
43
43
|
|
|
44
|
-
const handleSearchTextChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
|
45
|
-
setSearchText(e.target.value);
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
const handleCloseSearch = () => {
|
|
49
|
-
dispatch(closeSearch());
|
|
50
|
-
};
|
|
51
|
-
|
|
52
44
|
return (
|
|
53
45
|
<>
|
|
54
46
|
<div
|
|
@@ -74,9 +66,9 @@ export default function Search() {
|
|
|
74
66
|
{t('common.search.results_for')}
|
|
75
67
|
</span>
|
|
76
68
|
<div className="flex items-center">
|
|
77
|
-
<
|
|
69
|
+
<input
|
|
78
70
|
value={searchText}
|
|
79
|
-
onChange={
|
|
71
|
+
onChange={(e) => setSearchText(e.target.value)}
|
|
80
72
|
onKeyDown={(e) => {
|
|
81
73
|
if (e.key === 'Enter' && searchText.trim() !== '') {
|
|
82
74
|
router.push(`${ROUTES.LIST}/?search_text=${searchText}`);
|
|
@@ -86,27 +78,14 @@ export default function Search() {
|
|
|
86
78
|
placeholder={t('common.search.placeholder')}
|
|
87
79
|
ref={inputRef}
|
|
88
80
|
/>
|
|
89
|
-
|
|
90
|
-
<PluginModule
|
|
91
|
-
component={Component.HeaderImageSearchFeature}
|
|
92
|
-
props={{
|
|
93
|
-
settings: {
|
|
94
|
-
customStyles: {
|
|
95
|
-
controlsInner: 'bg-red-500'
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}}
|
|
99
|
-
/>
|
|
100
|
-
|
|
101
81
|
<Icon
|
|
102
82
|
name="close"
|
|
103
83
|
size={14}
|
|
104
|
-
onClick={
|
|
84
|
+
onClick={() => dispatch(closeSearch())}
|
|
105
85
|
className="cursor-pointer"
|
|
106
86
|
/>
|
|
107
87
|
</div>
|
|
108
88
|
</div>
|
|
109
|
-
|
|
110
89
|
<Results searchText={searchText} />
|
|
111
90
|
</div>
|
|
112
91
|
</div>
|
|
@@ -36,100 +36,53 @@ export default function ProductInfoSlider({ product }: ProductSliderItem) {
|
|
|
36
36
|
carouselRef.current?.next();
|
|
37
37
|
};
|
|
38
38
|
|
|
39
|
-
const handleThumbnailClick = (index
|
|
39
|
+
const handleThumbnailClick = (index) => {
|
|
40
40
|
setActiveIndex(index);
|
|
41
41
|
carouselRef.current?.goToSlide(index);
|
|
42
42
|
};
|
|
43
43
|
|
|
44
44
|
return (
|
|
45
|
-
|
|
46
|
-
<div className="lg:
|
|
47
|
-
<div className="
|
|
48
|
-
<
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
disabled={activeIndex === 0}
|
|
56
|
-
>
|
|
57
|
-
<Icon name="chevron-up" size={15} className="fill-[#000000]" />
|
|
58
|
-
</button>
|
|
59
|
-
<div className="hidden flex-col items-center overflow-scroll w-[80px] max-h-[620px] lg:block">
|
|
60
|
-
{product?.productimage_set?.map((item, index) => (
|
|
61
|
-
<Image
|
|
62
|
-
key={index}
|
|
63
|
-
src={item.image}
|
|
64
|
-
alt={`Thumbnail ${index}`}
|
|
65
|
-
width={80}
|
|
66
|
-
height={128}
|
|
67
|
-
aspectRatio={80 / 128}
|
|
68
|
-
className={twMerge('cursor-pointer', [
|
|
69
|
-
activeIndex === index && 'border-2 border-primary'
|
|
70
|
-
])}
|
|
71
|
-
onClick={() => handleThumbnailClick(index)}
|
|
72
|
-
/>
|
|
73
|
-
))}
|
|
74
|
-
</div>
|
|
75
|
-
<button
|
|
76
|
-
onClick={goToNext}
|
|
77
|
-
className={twMerge(
|
|
78
|
-
'hidden justify-center p-2 mt-3 border border-gray-100 rounded-full cursor-pointer lg:block',
|
|
79
|
-
[
|
|
80
|
-
activeIndex === product.productimage_set.length - 1 &&
|
|
81
|
-
'cursor-not-allowed opacity-45'
|
|
82
|
-
]
|
|
83
|
-
)}
|
|
84
|
-
disabled={activeIndex === product.productimage_set.length - 1}
|
|
85
|
-
>
|
|
86
|
-
<Icon name="chevron-down" size={15} className="fill-[#000000]" />
|
|
87
|
-
</button>
|
|
88
|
-
</div>
|
|
89
|
-
</div>
|
|
90
|
-
|
|
91
|
-
<div className="relative lg:col-span-5">
|
|
92
|
-
<FavButton className="absolute right-8 top-6 z-[20] sm:hidden" />
|
|
93
|
-
|
|
94
|
-
<PluginModule
|
|
95
|
-
component={Component.ProductImageSearchFeature}
|
|
96
|
-
props={{
|
|
97
|
-
product,
|
|
98
|
-
activeIndex,
|
|
99
|
-
showResetButton: true
|
|
100
|
-
}}
|
|
101
|
-
/>
|
|
102
|
-
|
|
103
|
-
<CarouselCore
|
|
104
|
-
responsive={{
|
|
105
|
-
all: {
|
|
106
|
-
breakpoint: { max: 5000, min: 0 },
|
|
107
|
-
items: 1
|
|
108
|
-
}
|
|
109
|
-
}}
|
|
110
|
-
arrows={false}
|
|
111
|
-
swipeable={true}
|
|
112
|
-
ref={carouselRef}
|
|
113
|
-
afterChange={(previousSlide, { currentSlide }) => {
|
|
114
|
-
setActiveIndex(currentSlide);
|
|
115
|
-
}}
|
|
116
|
-
containerAspectRatio={{ mobile: 520 / 798, desktop: 484 / 726 }}
|
|
45
|
+
<div className="lg:grid lg:grid-cols-6">
|
|
46
|
+
<div className="lg:col-span-1">
|
|
47
|
+
<div className="flex flex-col items-center justify-center md:mr-[6px]">
|
|
48
|
+
<button
|
|
49
|
+
onClick={goToPrev}
|
|
50
|
+
className={twMerge(
|
|
51
|
+
'hidden justify-center p-2 mb-3 border border-gray-100 rounded-full cursor-pointer lg:block',
|
|
52
|
+
[activeIndex === 0 && 'cursor-not-allowed opacity-45']
|
|
53
|
+
)}
|
|
54
|
+
disabled={activeIndex === 0}
|
|
117
55
|
>
|
|
118
|
-
{
|
|
56
|
+
<Icon name="chevron-up" size={15} className="fill-[#000000]" />
|
|
57
|
+
</button>
|
|
58
|
+
<div className="hidden flex-col items-center overflow-scroll w-[80px] max-h-[620px] lg:block">
|
|
59
|
+
{product?.productimage_set?.map((item, index) => (
|
|
119
60
|
<Image
|
|
120
|
-
key={
|
|
61
|
+
key={index}
|
|
121
62
|
src={item.image}
|
|
122
|
-
alt={
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
fill
|
|
63
|
+
alt={`Thumbnail ${index}`}
|
|
64
|
+
width={80}
|
|
65
|
+
height={128}
|
|
66
|
+
className={twMerge('cursor-pointer', [
|
|
67
|
+
activeIndex === index && 'border-2 border-primary'
|
|
68
|
+
])}
|
|
69
|
+
onClick={() => handleThumbnailClick(index)}
|
|
130
70
|
/>
|
|
131
71
|
))}
|
|
132
|
-
</
|
|
72
|
+
</div>
|
|
73
|
+
<button
|
|
74
|
+
onClick={goToNext}
|
|
75
|
+
className={twMerge(
|
|
76
|
+
'hidden justify-center p-2 mt-3 border border-gray-100 rounded-full cursor-pointer lg:block',
|
|
77
|
+
[
|
|
78
|
+
activeIndex === product.productimage_set.length - 1 &&
|
|
79
|
+
'cursor-not-allowed opacity-45'
|
|
80
|
+
]
|
|
81
|
+
)}
|
|
82
|
+
disabled={activeIndex === product.productimage_set.length - 1}
|
|
83
|
+
>
|
|
84
|
+
<Icon name="chevron-down" size={15} className="fill-[#000000]" />
|
|
85
|
+
</button>
|
|
133
86
|
</div>
|
|
134
87
|
</div>
|
|
135
88
|
|
package/commands/plugins.ts
CHANGED
|
@@ -137,10 +137,6 @@ export default async () => {
|
|
|
137
137
|
name: 'Tamara Payment Extension',
|
|
138
138
|
value: 'pz-tamara-extension'
|
|
139
139
|
},
|
|
140
|
-
{
|
|
141
|
-
name: 'Similar Products',
|
|
142
|
-
value: 'pz-similar-products'
|
|
143
|
-
},
|
|
144
140
|
{
|
|
145
141
|
name: 'Hepsipay',
|
|
146
142
|
value: 'pz-hepsipay'
|
|
@@ -156,6 +152,14 @@ export default async () => {
|
|
|
156
152
|
{
|
|
157
153
|
name: 'Masterpass Rest',
|
|
158
154
|
value: 'pz-masterpass-rest'
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
name: 'Similar Products',
|
|
158
|
+
value: 'pz-similar-products'
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
name: 'Haso Payment Gateway',
|
|
162
|
+
value: 'pz-haso'
|
|
159
163
|
}
|
|
160
164
|
];
|
|
161
165
|
|
package/dist/commands/plugins.js
CHANGED
|
@@ -1,200 +1,274 @@
|
|
|
1
|
-
|
|
2
|
-
var __createBinding =
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
var __createBinding =
|
|
3
|
+
(this && this.__createBinding) ||
|
|
4
|
+
(Object.create
|
|
5
|
+
? function (o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (
|
|
9
|
+
!desc ||
|
|
10
|
+
('get' in desc ? !m.__esModule : desc.writable || desc.configurable)
|
|
11
|
+
) {
|
|
12
|
+
desc = {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return m[k];
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
Object.defineProperty(o, k2, desc);
|
|
20
|
+
}
|
|
21
|
+
: function (o, m, k, k2) {
|
|
22
|
+
if (k2 === undefined) k2 = k;
|
|
23
|
+
o[k2] = m[k];
|
|
24
|
+
});
|
|
25
|
+
var __setModuleDefault =
|
|
26
|
+
(this && this.__setModuleDefault) ||
|
|
27
|
+
(Object.create
|
|
28
|
+
? function (o, v) {
|
|
29
|
+
Object.defineProperty(o, 'default', { enumerable: true, value: v });
|
|
30
|
+
}
|
|
31
|
+
: function (o, v) {
|
|
32
|
+
o['default'] = v;
|
|
33
|
+
});
|
|
34
|
+
var __importStar =
|
|
35
|
+
(this && this.__importStar) ||
|
|
36
|
+
function (mod) {
|
|
19
37
|
if (mod && mod.__esModule) return mod;
|
|
20
38
|
var result = {};
|
|
21
|
-
if (mod != null)
|
|
39
|
+
if (mod != null)
|
|
40
|
+
for (var k in mod)
|
|
41
|
+
if (k !== 'default' && Object.prototype.hasOwnProperty.call(mod, k))
|
|
42
|
+
__createBinding(result, mod, k);
|
|
22
43
|
__setModuleDefault(result, mod);
|
|
23
44
|
return result;
|
|
24
|
-
};
|
|
25
|
-
var __awaiter =
|
|
26
|
-
|
|
45
|
+
};
|
|
46
|
+
var __awaiter =
|
|
47
|
+
(this && this.__awaiter) ||
|
|
48
|
+
function (thisArg, _arguments, P, generator) {
|
|
49
|
+
function adopt(value) {
|
|
50
|
+
return value instanceof P
|
|
51
|
+
? value
|
|
52
|
+
: new P(function (resolve) {
|
|
53
|
+
resolve(value);
|
|
54
|
+
});
|
|
55
|
+
}
|
|
27
56
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
-
|
|
29
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
-
});
|
|
33
|
-
};
|
|
34
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
35
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
36
|
-
};
|
|
37
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
|
-
const fs = __importStar(require("fs"));
|
|
39
|
-
const path_1 = __importDefault(require("path"));
|
|
40
|
-
const child_process_1 = require("child_process");
|
|
41
|
-
const semver_1 = __importDefault(require("semver"));
|
|
42
|
-
const prompts_1 = require("@inquirer/prompts");
|
|
43
|
-
const rootDir = path_1.default.resolve(process.cwd());
|
|
44
|
-
function checkVersion(pkg) {
|
|
45
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
46
|
-
const packageName = '@akinon/next';
|
|
47
|
-
const registryUrl = `https://registry.npmjs.org/${packageName}`;
|
|
57
|
+
function fulfilled(value) {
|
|
48
58
|
try {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
if (!semver_1.default.satisfies(pkg.dependencies['@akinon/next'], latestVersion)) {
|
|
53
|
-
console.warn(`\x1b[43mWarning: The "${packageName}" package is currently at version ${pkg.dependencies['@akinon/next']}. Please upgrade it to the latest version (${latestVersion}) to ensure plugin compatibility.`, '\x1b[0m\n');
|
|
54
|
-
}
|
|
59
|
+
step(generator.next(value));
|
|
60
|
+
} catch (e) {
|
|
61
|
+
reject(e);
|
|
55
62
|
}
|
|
56
|
-
|
|
57
|
-
|
|
63
|
+
}
|
|
64
|
+
function rejected(value) {
|
|
65
|
+
try {
|
|
66
|
+
step(generator['throw'](value));
|
|
67
|
+
} catch (e) {
|
|
68
|
+
reject(e);
|
|
58
69
|
}
|
|
70
|
+
}
|
|
71
|
+
function step(result) {
|
|
72
|
+
result.done
|
|
73
|
+
? resolve(result.value)
|
|
74
|
+
: adopt(result.value).then(fulfilled, rejected);
|
|
75
|
+
}
|
|
76
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
59
77
|
});
|
|
78
|
+
};
|
|
79
|
+
var __importDefault =
|
|
80
|
+
(this && this.__importDefault) ||
|
|
81
|
+
function (mod) {
|
|
82
|
+
return mod && mod.__esModule ? mod : { default: mod };
|
|
83
|
+
};
|
|
84
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
85
|
+
const fs = __importStar(require('fs'));
|
|
86
|
+
const path_1 = __importDefault(require('path'));
|
|
87
|
+
const child_process_1 = require('child_process');
|
|
88
|
+
const semver_1 = __importDefault(require('semver'));
|
|
89
|
+
const prompts_1 = require('@inquirer/prompts');
|
|
90
|
+
const rootDir = path_1.default.resolve(process.cwd());
|
|
91
|
+
function checkVersion(pkg) {
|
|
92
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
93
|
+
const packageName = '@akinon/next';
|
|
94
|
+
const registryUrl = `https://registry.npmjs.org/${packageName}`;
|
|
95
|
+
try {
|
|
96
|
+
const response = yield fetch(registryUrl);
|
|
97
|
+
const pkgInfo = yield response.json();
|
|
98
|
+
const latestVersion = pkgInfo['dist-tags'].latest;
|
|
99
|
+
if (
|
|
100
|
+
!semver_1.default.satisfies(
|
|
101
|
+
pkg.dependencies['@akinon/next'],
|
|
102
|
+
latestVersion
|
|
103
|
+
)
|
|
104
|
+
) {
|
|
105
|
+
console.warn(
|
|
106
|
+
`\x1b[43mWarning: The "${packageName}" package is currently at version ${pkg.dependencies['@akinon/next']}. Please upgrade it to the latest version (${latestVersion}) to ensure plugin compatibility.`,
|
|
107
|
+
'\x1b[0m\n'
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
} catch (error) {
|
|
111
|
+
console.error(
|
|
112
|
+
`\x1b[41mError: ${
|
|
113
|
+
error === null || error === void 0 ? void 0 : error.message
|
|
114
|
+
}`,
|
|
115
|
+
'\x1b[0m\n'
|
|
116
|
+
);
|
|
117
|
+
}
|
|
118
|
+
});
|
|
60
119
|
}
|
|
61
|
-
exports.default = () =>
|
|
120
|
+
exports.default = () =>
|
|
121
|
+
__awaiter(void 0, void 0, void 0, function* () {
|
|
62
122
|
function findPluginsFilePath() {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
123
|
+
const option1 = path_1.default.resolve(rootDir, './src/plugins.js');
|
|
124
|
+
const option2 = path_1.default.resolve(
|
|
125
|
+
rootDir,
|
|
126
|
+
'./packages/akinon-next/plugins.js'
|
|
127
|
+
);
|
|
128
|
+
if (fs.existsSync(option1)) {
|
|
129
|
+
return option1;
|
|
130
|
+
} else if (fs.existsSync(option2)) {
|
|
131
|
+
return option2;
|
|
132
|
+
} else {
|
|
133
|
+
throw new Error(
|
|
134
|
+
'plugins.js was not found in either of the expected locations.'
|
|
135
|
+
);
|
|
136
|
+
}
|
|
74
137
|
}
|
|
75
138
|
const pkg = require(path_1.default.resolve(rootDir, './package.json'));
|
|
76
139
|
yield checkVersion(pkg);
|
|
77
140
|
const pluginsFilePath = findPluginsFilePath();
|
|
78
141
|
let installedPlugins = [];
|
|
79
142
|
try {
|
|
80
|
-
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
process.exit(1);
|
|
143
|
+
installedPlugins = require(pluginsFilePath);
|
|
144
|
+
} catch (error) {
|
|
145
|
+
console.error('Error loading installed plugins:', error);
|
|
146
|
+
process.exit(1);
|
|
85
147
|
}
|
|
86
148
|
const definedPlugins = [
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
149
|
+
{
|
|
150
|
+
name: 'Akifast',
|
|
151
|
+
value: 'pz-akifast'
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
name: 'Apple Pay',
|
|
155
|
+
value: 'pz-apple-pay'
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
name: 'B2B',
|
|
159
|
+
value: 'pz-b2b'
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
name: 'Basket Gift Pack',
|
|
163
|
+
value: 'pz-basket-gift-pack'
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
name: 'BKM Express',
|
|
167
|
+
value: 'pz-bkm'
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
name: 'Checkout Gift Pack',
|
|
171
|
+
value: 'pz-checkout-gift-pack'
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
name: 'Click & Collect',
|
|
175
|
+
value: 'pz-click-collect'
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
name: 'Credit Payment',
|
|
179
|
+
value: 'pz-credit-payment'
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
name: 'Garanti Pay',
|
|
183
|
+
value: 'pz-gpay'
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
name: 'Masterpass',
|
|
187
|
+
value: 'pz-masterpass'
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
name: 'Multi Basket',
|
|
191
|
+
value: 'pz-multi-basket'
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
name: 'One Click Checkout',
|
|
195
|
+
value: 'pz-one-click-checkout'
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
name: 'Otp',
|
|
199
|
+
value: 'pz-otp'
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
name: 'Pay On Delivery',
|
|
203
|
+
value: 'pz-pay-on-delivery'
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
name: 'Saved Card',
|
|
207
|
+
value: 'pz-saved-card'
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
name: 'Tabby Payment Extension',
|
|
211
|
+
value: 'pz-tabby-extension'
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
name: 'Tamara Payment Extension',
|
|
215
|
+
value: 'pz-tamara-extension'
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
name: 'Hepsipay',
|
|
219
|
+
value: 'pz-hepsipay'
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
name: 'Flow Payment',
|
|
223
|
+
value: 'pz-flow-payment'
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
name: 'Virtual Try-On',
|
|
227
|
+
value: 'pz-virtual-try-on'
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
name: 'Masterpass Rest',
|
|
231
|
+
value: 'pz-masterpass-rest'
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
name: 'Similar Products',
|
|
235
|
+
value: 'pz-similar-products'
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
name: 'Haso Payment Gateway',
|
|
239
|
+
value: 'pz-haso'
|
|
240
|
+
}
|
|
175
241
|
];
|
|
176
242
|
try {
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
243
|
+
const answers = yield (0, prompts_1.checkbox)({
|
|
244
|
+
message: 'Please check/uncheck plugins to install/uninstall.',
|
|
245
|
+
choices: definedPlugins.map((plugin) => ({
|
|
246
|
+
name: plugin.name,
|
|
247
|
+
value: plugin.value,
|
|
248
|
+
checked: installedPlugins.includes(plugin.value)
|
|
249
|
+
}))
|
|
250
|
+
});
|
|
251
|
+
if (!answers.length) {
|
|
252
|
+
console.log('\x1b[33m%s\x1b[0m', `\nUninstalling all plugins.`);
|
|
253
|
+
}
|
|
254
|
+
console.log('\x1b[36m%s\x1b[0m', `\nPlease wait...`);
|
|
255
|
+
fs.writeFileSync(
|
|
256
|
+
pluginsFilePath,
|
|
257
|
+
`module.exports = ${JSON.stringify(answers)};\n`,
|
|
258
|
+
{
|
|
259
|
+
encoding: 'utf-8'
|
|
187
260
|
}
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
261
|
+
);
|
|
262
|
+
(0, child_process_1.execSync)('yarn install', { stdio: 'pipe' });
|
|
263
|
+
console.log(
|
|
264
|
+
'\x1b[32m%s\x1b[0m',
|
|
265
|
+
`\n✓ ${
|
|
266
|
+
answers.length
|
|
194
267
|
? 'Installed selected plugins'
|
|
195
|
-
: 'Uninstalled all plugins'
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
268
|
+
: 'Uninstalled all plugins'
|
|
269
|
+
}.\n`
|
|
270
|
+
);
|
|
271
|
+
} catch (error) {
|
|
272
|
+
process.exit(1);
|
|
199
273
|
}
|
|
200
|
-
});
|
|
274
|
+
});
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '@akinon/next/api/image-proxy';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '@akinon/next/api/similar-product-list';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '@akinon/next/api/similar-products';
|