@akinon/projectzero 1.91.0-rc.2 → 1.91.0-rc.4
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 +17 -0
- package/app-template/CHANGELOG.md +138 -0
- package/app-template/package.json +18 -18
- package/app-template/src/components/accordion.tsx +22 -19
- package/app-template/src/components/currency-select.tsx +1 -0
- package/app-template/src/components/file-input.tsx +27 -7
- package/app-template/src/components/modal.tsx +32 -16
- package/app-template/src/components/select.tsx +38 -26
- package/app-template/src/components/types/index.ts +25 -1
- package/app-template/src/plugins.js +2 -1
- package/app-template/src/types/index.ts +17 -0
- package/app-template/src/views/account/address-form.tsx +8 -4
- package/app-template/src/views/account/content-header.tsx +2 -2
- package/app-template/src/views/header/action-menu.tsx +1 -1
- package/app-template/tailwind.config.js +2 -6
- package/codemods/update-tailwind-config/index.js +30 -0
- package/codemods/update-tailwind-config/transform.js +102 -0
- package/commands/codemod.ts +0 -1
- package/commands/plugins.ts +34 -14
- package/dist/commands/codemod.js +0 -1
- package/dist/commands/plugins.js +34 -14
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @akinon/projectzero
|
|
2
2
|
|
|
3
|
+
## 1.91.0-rc.4
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 7eb51ca: ZERO-3424 :Update package versions
|
|
8
|
+
- 34578ef: ZERO-3419 :Add new payment plugins and update existing ones in the plugin list
|
|
9
|
+
|
|
10
|
+
## 1.91.0-rc.3
|
|
11
|
+
|
|
12
|
+
### Minor Changes
|
|
13
|
+
|
|
14
|
+
- 64699d3f: ZERO-2761: Fix invalid import for plugin module
|
|
15
|
+
- e974d8e8: ZERO-3406: Fix rc build
|
|
16
|
+
- 7727ae55: ZERO-3073: Refactor basket page to use server-side data fetching and simplify component structure
|
|
17
|
+
- 33377cfd: ZERO-3267: Refactor import statement for ROUTES in error-page component
|
|
18
|
+
- 942490f2: ZERO-3295: move third party tailwind content list to akinon-next
|
|
19
|
+
|
|
3
20
|
## 1.91.0-rc.2
|
|
4
21
|
|
|
5
22
|
## 1.91.0-rc.1
|
|
@@ -1,5 +1,143 @@
|
|
|
1
1
|
# projectzeronext
|
|
2
2
|
|
|
3
|
+
## 1.91.0-rc.4
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 7eb51ca: ZERO-3424 :Update package versions
|
|
8
|
+
- c39c700: ZERO-3420: Refactor Modal component
|
|
9
|
+
- 9dc7298: ZERO-3416: Refactor Accordion component to enhance props and improve styling flexibility
|
|
10
|
+
- d600c05: ZERO-3389: Add data-testid attributes for testing in CurrencySelect and ActionMenu components
|
|
11
|
+
- 2d3f178: ZERO-3417: Enhance FileInput component with additional props for customization
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies [d0853b3]
|
|
16
|
+
- Updated dependencies [d35e8ac]
|
|
17
|
+
- Updated dependencies [7eb51ca]
|
|
18
|
+
- Updated dependencies [c39c700]
|
|
19
|
+
- Updated dependencies [0de5573]
|
|
20
|
+
- Updated dependencies [2e436c1]
|
|
21
|
+
- Updated dependencies [ae010f0]
|
|
22
|
+
- Updated dependencies [9cfbf6c]
|
|
23
|
+
- Updated dependencies [9dc7298]
|
|
24
|
+
- Updated dependencies [b16a370]
|
|
25
|
+
- Updated dependencies [2d3f178]
|
|
26
|
+
- Updated dependencies [8bc82f0]
|
|
27
|
+
- @akinon/pz-pay-on-delivery@1.91.0-rc.4
|
|
28
|
+
- @akinon/pz-bkm@1.91.0-rc.4
|
|
29
|
+
- @akinon/pz-checkout-gift-pack@1.91.0-rc.4
|
|
30
|
+
- @akinon/pz-one-click-checkout@1.91.0-rc.4
|
|
31
|
+
- @akinon/pz-basket-gift-pack@1.91.0-rc.4
|
|
32
|
+
- @akinon/pz-tamara-extension@1.91.0-rc.4
|
|
33
|
+
- @akinon/pz-tabby-extension@1.91.0-rc.4
|
|
34
|
+
- @akinon/pz-credit-payment@1.91.0-rc.4
|
|
35
|
+
- @akinon/pz-click-collect@1.91.0-rc.4
|
|
36
|
+
- @akinon/pz-masterpass@1.91.0-rc.4
|
|
37
|
+
- @akinon/pz-saved-card@1.91.0-rc.4
|
|
38
|
+
- @akinon/next@1.91.0-rc.4
|
|
39
|
+
- @akinon/pz-akifast@1.91.0-rc.4
|
|
40
|
+
- @akinon/pz-gpay@1.91.0-rc.4
|
|
41
|
+
- @akinon/pz-b2b@1.91.0-rc.4
|
|
42
|
+
- @akinon/pz-otp@1.91.0-rc.4
|
|
43
|
+
|
|
44
|
+
## 1.91.0-rc.3
|
|
45
|
+
|
|
46
|
+
### Minor Changes
|
|
47
|
+
|
|
48
|
+
- 63774a6a: ZERO-3351: Add commerce redirection ignore list functionality and related utility
|
|
49
|
+
- 4434c510: ZERO-3321: remove csp test script
|
|
50
|
+
- 82174637: ZERO-2887: Add LoaderSpinner to Filters component
|
|
51
|
+
- 3670f522: ZERO-3301 :Upgrade react-number-format to the latest version
|
|
52
|
+
- 64699d3f: ZERO-2761: Fix invalid import for plugin module
|
|
53
|
+
- e974d8e8: ZERO-3406: Fix rc build
|
|
54
|
+
- 7727ae55: ZERO-3073: Refactor basket page to use server-side data fetching and simplify component structure
|
|
55
|
+
- 448adefb: ZERO-3321: move csp test to akinon-next
|
|
56
|
+
- e9ce5edb: ZERO-3321: check last CSP header in test
|
|
57
|
+
- 33377cfd: ZERO-3267: Refactor import statement for ROUTES in error-page component
|
|
58
|
+
- 942490f2: ZERO-3295: move third party tailwind content list to akinon-next
|
|
59
|
+
- 100f03a9: ZERO-3321: add test for Content-Security-Policy header in Next.js config
|
|
60
|
+
|
|
61
|
+
### Patch Changes
|
|
62
|
+
|
|
63
|
+
- Updated dependencies [5dfeea04]
|
|
64
|
+
- Updated dependencies [823d82f9]
|
|
65
|
+
- Updated dependencies [63774a6a]
|
|
66
|
+
- Updated dependencies [2d9b2b2c]
|
|
67
|
+
- Updated dependencies [5e1feca6]
|
|
68
|
+
- Updated dependencies [d8fad39f]
|
|
69
|
+
- Updated dependencies [72bfcbf2]
|
|
70
|
+
- Updated dependencies [40a46853]
|
|
71
|
+
- Updated dependencies [68bbcb27]
|
|
72
|
+
- Updated dependencies [2ba89b3c]
|
|
73
|
+
- Updated dependencies [1e53e17a]
|
|
74
|
+
- Updated dependencies [25524867]
|
|
75
|
+
- Updated dependencies [f49bb74f]
|
|
76
|
+
- Updated dependencies [155cd231]
|
|
77
|
+
- Updated dependencies [e9541a13]
|
|
78
|
+
- Updated dependencies [ad0bec92]
|
|
79
|
+
- Updated dependencies [9b7d0de6]
|
|
80
|
+
- Updated dependencies [72fd4d67]
|
|
81
|
+
- Updated dependencies [c53ef7b9]
|
|
82
|
+
- Updated dependencies [f8e4cac6]
|
|
83
|
+
- Updated dependencies [310556ec]
|
|
84
|
+
- Updated dependencies [64699d3f]
|
|
85
|
+
- Updated dependencies [832bee36]
|
|
86
|
+
- Updated dependencies [e974d8e8]
|
|
87
|
+
- Updated dependencies [b31333ed]
|
|
88
|
+
- Updated dependencies [28a59d49]
|
|
89
|
+
- Updated dependencies [8feabe9a]
|
|
90
|
+
- Updated dependencies [bf354de4]
|
|
91
|
+
- Updated dependencies [7727ae55]
|
|
92
|
+
- Updated dependencies [d552629f]
|
|
93
|
+
- Updated dependencies [448adefb]
|
|
94
|
+
- Updated dependencies [17f87524]
|
|
95
|
+
- Updated dependencies [65d3b862]
|
|
96
|
+
- Updated dependencies [bbe18b9f]
|
|
97
|
+
- Updated dependencies [17bfadc4]
|
|
98
|
+
- Updated dependencies [4920742c]
|
|
99
|
+
- Updated dependencies [b6e5b624]
|
|
100
|
+
- Updated dependencies [6c3629c2]
|
|
101
|
+
- Updated dependencies [6bc260be]
|
|
102
|
+
- Updated dependencies [7e56d6b6]
|
|
103
|
+
- Updated dependencies [dfaceffd]
|
|
104
|
+
- Updated dependencies [33377cfd]
|
|
105
|
+
- Updated dependencies [43c182ee]
|
|
106
|
+
- Updated dependencies [943a239e]
|
|
107
|
+
- Updated dependencies [068dc394]
|
|
108
|
+
- Updated dependencies [942490f2]
|
|
109
|
+
- Updated dependencies [eeb20bea]
|
|
110
|
+
- Updated dependencies [fec9638a]
|
|
111
|
+
- Updated dependencies [3bf63c8a]
|
|
112
|
+
- Updated dependencies [9be2c081]
|
|
113
|
+
- Updated dependencies [f2c92d5c]
|
|
114
|
+
- Updated dependencies [7bd3d992]
|
|
115
|
+
- Updated dependencies [b6d5bda2]
|
|
116
|
+
- Updated dependencies [fdd255ee]
|
|
117
|
+
- Updated dependencies [07248e09]
|
|
118
|
+
- Updated dependencies [acf03209]
|
|
119
|
+
- Updated dependencies [387356b6]
|
|
120
|
+
- Updated dependencies [49eeebfa]
|
|
121
|
+
- Updated dependencies [3f9b8d7e]
|
|
122
|
+
- Updated dependencies [b2ee69b9]
|
|
123
|
+
- Updated dependencies [0cabbda3]
|
|
124
|
+
- @akinon/next@1.91.0-rc.3
|
|
125
|
+
- @akinon/pz-basket-gift-pack@1.91.0-rc.3
|
|
126
|
+
- @akinon/pz-tamara-extension@1.91.0-rc.3
|
|
127
|
+
- @akinon/pz-masterpass@1.91.0-rc.3
|
|
128
|
+
- @akinon/pz-credit-payment@1.91.0-rc.3
|
|
129
|
+
- @akinon/pz-checkout-gift-pack@1.91.0-rc.3
|
|
130
|
+
- @akinon/pz-one-click-checkout@1.91.0-rc.3
|
|
131
|
+
- @akinon/pz-pay-on-delivery@1.91.0-rc.3
|
|
132
|
+
- @akinon/pz-click-collect@1.91.0-rc.3
|
|
133
|
+
- @akinon/pz-akifast@1.91.0-rc.3
|
|
134
|
+
- @akinon/pz-gpay@1.91.0-rc.3
|
|
135
|
+
- @akinon/pz-b2b@1.91.0-rc.3
|
|
136
|
+
- @akinon/pz-bkm@1.91.0-rc.3
|
|
137
|
+
- @akinon/pz-otp@1.91.0-rc.3
|
|
138
|
+
- @akinon/pz-tabby-extension@1.91.0-rc.3
|
|
139
|
+
- @akinon/pz-saved-card@1.91.0-rc.3
|
|
140
|
+
|
|
3
141
|
## 1.91.0-rc.2
|
|
4
142
|
|
|
5
143
|
### Patch Changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "projectzeronext",
|
|
3
|
-
"version": "1.91.0-rc.
|
|
3
|
+
"version": "1.91.0-rc.4",
|
|
4
4
|
"private": true,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"scripts": {
|
|
@@ -24,22 +24,22 @@
|
|
|
24
24
|
"test:middleware": "jest middleware-matcher.test.ts --bail"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@akinon/next": "1.91.0-rc.
|
|
28
|
-
"@akinon/pz-akifast": "1.91.0-rc.
|
|
29
|
-
"@akinon/pz-b2b": "1.91.0-rc.
|
|
30
|
-
"@akinon/pz-basket-gift-pack": "1.91.0-rc.
|
|
31
|
-
"@akinon/pz-bkm": "1.91.0-rc.
|
|
32
|
-
"@akinon/pz-checkout-gift-pack": "1.91.0-rc.
|
|
33
|
-
"@akinon/pz-click-collect": "1.91.0-rc.
|
|
34
|
-
"@akinon/pz-credit-payment": "1.91.0-rc.
|
|
35
|
-
"@akinon/pz-gpay": "1.91.0-rc.
|
|
36
|
-
"@akinon/pz-masterpass": "1.91.0-rc.
|
|
37
|
-
"@akinon/pz-one-click-checkout": "1.91.0-rc.
|
|
38
|
-
"@akinon/pz-otp": "1.91.0-rc.
|
|
39
|
-
"@akinon/pz-pay-on-delivery": "1.91.0-rc.
|
|
40
|
-
"@akinon/pz-saved-card": "1.91.0-rc.
|
|
41
|
-
"@akinon/pz-tabby-extension": "1.91.0-rc.
|
|
42
|
-
"@akinon/pz-tamara-extension": "1.91.0-rc.
|
|
27
|
+
"@akinon/next": "1.91.0-rc.4",
|
|
28
|
+
"@akinon/pz-akifast": "1.91.0-rc.4",
|
|
29
|
+
"@akinon/pz-b2b": "1.91.0-rc.4",
|
|
30
|
+
"@akinon/pz-basket-gift-pack": "1.91.0-rc.4",
|
|
31
|
+
"@akinon/pz-bkm": "1.91.0-rc.4",
|
|
32
|
+
"@akinon/pz-checkout-gift-pack": "1.91.0-rc.4",
|
|
33
|
+
"@akinon/pz-click-collect": "1.91.0-rc.4",
|
|
34
|
+
"@akinon/pz-credit-payment": "1.91.0-rc.4",
|
|
35
|
+
"@akinon/pz-gpay": "1.91.0-rc.4",
|
|
36
|
+
"@akinon/pz-masterpass": "1.91.0-rc.4",
|
|
37
|
+
"@akinon/pz-one-click-checkout": "1.91.0-rc.4",
|
|
38
|
+
"@akinon/pz-otp": "1.91.0-rc.4",
|
|
39
|
+
"@akinon/pz-pay-on-delivery": "1.91.0-rc.4",
|
|
40
|
+
"@akinon/pz-saved-card": "1.91.0-rc.4",
|
|
41
|
+
"@akinon/pz-tabby-extension": "1.91.0-rc.4",
|
|
42
|
+
"@akinon/pz-tamara-extension": "1.91.0-rc.4",
|
|
43
43
|
"@hookform/resolvers": "2.9.0",
|
|
44
44
|
"@next/third-parties": "14.1.0",
|
|
45
45
|
"@react-google-maps/api": "2.17.1",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"yup": "0.32.11"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
|
-
"@akinon/eslint-plugin-projectzero": "1.91.0-rc.
|
|
65
|
+
"@akinon/eslint-plugin-projectzero": "1.91.0-rc.4",
|
|
66
66
|
"@semantic-release/changelog": "6.0.2",
|
|
67
67
|
"@semantic-release/exec": "6.0.3",
|
|
68
68
|
"@semantic-release/git": "10.0.1",
|
|
@@ -1,33 +1,25 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { useState } from 'react';
|
|
4
4
|
import { Icon } from './icon';
|
|
5
5
|
import { twMerge } from 'tailwind-merge';
|
|
6
|
-
|
|
7
|
-
type AccordionProps = {
|
|
8
|
-
isCollapse?: boolean;
|
|
9
|
-
title?: string;
|
|
10
|
-
subTitle?: string;
|
|
11
|
-
icons?: string[];
|
|
12
|
-
iconSize?: number;
|
|
13
|
-
iconColor?: string;
|
|
14
|
-
children?: ReactNode;
|
|
15
|
-
className?: string;
|
|
16
|
-
titleClassName?: string;
|
|
17
|
-
dataTestId?: string;
|
|
18
|
-
};
|
|
6
|
+
import { AccordionProps } from './types';
|
|
19
7
|
|
|
20
8
|
export const Accordion = ({
|
|
21
9
|
isCollapse = false,
|
|
10
|
+
collapseClassName,
|
|
22
11
|
title,
|
|
23
12
|
subTitle,
|
|
24
13
|
icons = ['chevron-up', 'chevron-down'],
|
|
25
14
|
iconSize = 16,
|
|
26
15
|
iconColor = 'fill-[#000000]',
|
|
27
16
|
children,
|
|
17
|
+
headerClassName,
|
|
28
18
|
className,
|
|
29
19
|
titleClassName,
|
|
30
|
-
|
|
20
|
+
subTitleClassName,
|
|
21
|
+
dataTestId,
|
|
22
|
+
contentClassName
|
|
31
23
|
}: AccordionProps) => {
|
|
32
24
|
const [collapse, setCollapse] = useState(isCollapse);
|
|
33
25
|
|
|
@@ -39,15 +31,22 @@ export const Accordion = ({
|
|
|
39
31
|
)}
|
|
40
32
|
>
|
|
41
33
|
<div
|
|
42
|
-
className=
|
|
34
|
+
className={twMerge(
|
|
35
|
+
'flex items-center justify-between cursor-pointer',
|
|
36
|
+
headerClassName
|
|
37
|
+
)}
|
|
43
38
|
onClick={() => setCollapse(!collapse)}
|
|
44
39
|
data-testid={dataTestId}
|
|
45
40
|
>
|
|
46
|
-
<div className=
|
|
41
|
+
<div className={twMerge('flex flex-col', contentClassName)}>
|
|
47
42
|
{title && (
|
|
48
43
|
<h3 className={twMerge('text-sm', titleClassName)}>{title}</h3>
|
|
49
44
|
)}
|
|
50
|
-
{subTitle &&
|
|
45
|
+
{subTitle && (
|
|
46
|
+
<h4 className={twMerge('text-xs text-gray-700', subTitleClassName)}>
|
|
47
|
+
{subTitle}
|
|
48
|
+
</h4>
|
|
49
|
+
)}
|
|
51
50
|
</div>
|
|
52
51
|
|
|
53
52
|
{icons && (
|
|
@@ -58,7 +57,11 @@ export const Accordion = ({
|
|
|
58
57
|
/>
|
|
59
58
|
)}
|
|
60
59
|
</div>
|
|
61
|
-
{collapse &&
|
|
60
|
+
{collapse && (
|
|
61
|
+
<div className={twMerge('mt-3 text-sm', collapseClassName)}>
|
|
62
|
+
{children}
|
|
63
|
+
</div>
|
|
64
|
+
)}
|
|
62
65
|
</div>
|
|
63
66
|
);
|
|
64
67
|
};
|
|
@@ -70,6 +70,7 @@ export const CurrencySelect = (props: CurrencySelectProps) => {
|
|
|
70
70
|
onClick={confirmModalHandleClick}
|
|
71
71
|
appearance="filled"
|
|
72
72
|
className="font-medium px-10 py-4 h-12"
|
|
73
|
+
data-testid="currency-modal-confirm"
|
|
73
74
|
>
|
|
74
75
|
{t('common.currency_modal.continue')}
|
|
75
76
|
</Button>
|
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
import { useState } from 'react';
|
|
2
2
|
import { forwardRef } from 'react';
|
|
3
3
|
import { FileInputProps } from '@theme/components/types';
|
|
4
|
-
import clsx from 'clsx';
|
|
5
4
|
import { useLocalization } from '@akinon/next/hooks';
|
|
5
|
+
import { twMerge } from 'tailwind-merge';
|
|
6
6
|
|
|
7
7
|
export const FileInput = forwardRef<HTMLInputElement, FileInputProps>(
|
|
8
|
-
function FileInput(
|
|
8
|
+
function FileInput(
|
|
9
|
+
{
|
|
10
|
+
buttonClassName,
|
|
11
|
+
onChange,
|
|
12
|
+
fileClassName,
|
|
13
|
+
fileNameWrapperClassName,
|
|
14
|
+
fileInputClassName,
|
|
15
|
+
...props
|
|
16
|
+
},
|
|
17
|
+
ref
|
|
18
|
+
) {
|
|
9
19
|
const { t } = useLocalization();
|
|
10
20
|
const [fileNames, setFileNames] = useState<string[]>([]);
|
|
11
21
|
|
|
@@ -24,24 +34,34 @@ export const FileInput = forwardRef<HTMLInputElement, FileInputProps>(
|
|
|
24
34
|
type="file"
|
|
25
35
|
{...props}
|
|
26
36
|
ref={ref}
|
|
27
|
-
className=
|
|
37
|
+
className={twMerge(
|
|
38
|
+
'absolute inset-0 w-full h-full opacity-0 cursor-pointer',
|
|
39
|
+
fileInputClassName
|
|
40
|
+
)}
|
|
28
41
|
onChange={handleFileChange}
|
|
29
42
|
/>
|
|
30
43
|
<button
|
|
31
44
|
type="button"
|
|
32
|
-
className={
|
|
45
|
+
className={twMerge(
|
|
46
|
+
'bg-primary text-white py-2 px-4 text-sm',
|
|
47
|
+
buttonClassName
|
|
48
|
+
)}
|
|
33
49
|
>
|
|
34
50
|
{t('common.file_input.select_file')}
|
|
35
51
|
</button>
|
|
36
|
-
<div
|
|
52
|
+
<div
|
|
53
|
+
className={twMerge('mt-1 text-gray-500', fileNameWrapperClassName)}
|
|
54
|
+
>
|
|
37
55
|
{fileNames.length > 0 ? (
|
|
38
|
-
<ul className=
|
|
56
|
+
<ul className={twMerge('list-disc pl-4 text-xs', fileClassName)}>
|
|
39
57
|
{fileNames.map((name, index) => (
|
|
40
58
|
<li key={index}>{name}</li>
|
|
41
59
|
))}
|
|
42
60
|
</ul>
|
|
43
61
|
) : (
|
|
44
|
-
<span className=
|
|
62
|
+
<span className={twMerge('text-xs', fileClassName)}>
|
|
63
|
+
{t('common.file_input.no_file')}
|
|
64
|
+
</span>
|
|
45
65
|
)}
|
|
46
66
|
</div>
|
|
47
67
|
</div>
|
|
@@ -4,16 +4,7 @@ import ReactPortal from './react-portal';
|
|
|
4
4
|
import { Icon } from './icon';
|
|
5
5
|
import { twMerge } from 'tailwind-merge';
|
|
6
6
|
import { useEffect } from 'react';
|
|
7
|
-
|
|
8
|
-
export interface ModalProps {
|
|
9
|
-
portalId: string;
|
|
10
|
-
children?: React.ReactNode;
|
|
11
|
-
open?: boolean;
|
|
12
|
-
setOpen?: (open: boolean) => void;
|
|
13
|
-
title?: React.ReactNode;
|
|
14
|
-
showCloseButton?: React.ReactNode;
|
|
15
|
-
className?: string;
|
|
16
|
-
}
|
|
7
|
+
import { ModalProps } from '@theme/types';
|
|
17
8
|
|
|
18
9
|
export const Modal = (props: ModalProps) => {
|
|
19
10
|
const {
|
|
@@ -23,7 +14,14 @@ export const Modal = (props: ModalProps) => {
|
|
|
23
14
|
setOpen,
|
|
24
15
|
title = '',
|
|
25
16
|
showCloseButton = true,
|
|
26
|
-
className
|
|
17
|
+
className,
|
|
18
|
+
overlayClassName,
|
|
19
|
+
headerWrapperClassName,
|
|
20
|
+
titleClassName,
|
|
21
|
+
closeButtonClassName,
|
|
22
|
+
iconName = 'close',
|
|
23
|
+
iconSize = 16,
|
|
24
|
+
iconClassName
|
|
27
25
|
} = props;
|
|
28
26
|
|
|
29
27
|
useEffect(() => {
|
|
@@ -38,7 +36,12 @@ export const Modal = (props: ModalProps) => {
|
|
|
38
36
|
|
|
39
37
|
return (
|
|
40
38
|
<ReactPortal wrapperId={portalId}>
|
|
41
|
-
<div
|
|
39
|
+
<div
|
|
40
|
+
className={twMerge(
|
|
41
|
+
'fixed top-0 left-0 w-screen h-screen bg-primary bg-opacity-60 z-50',
|
|
42
|
+
overlayClassName
|
|
43
|
+
)}
|
|
44
|
+
/>
|
|
42
45
|
<section
|
|
43
46
|
className={twMerge(
|
|
44
47
|
'fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 z-50 bg-white',
|
|
@@ -46,15 +49,28 @@ export const Modal = (props: ModalProps) => {
|
|
|
46
49
|
)}
|
|
47
50
|
>
|
|
48
51
|
{(showCloseButton || title) && (
|
|
49
|
-
<div
|
|
50
|
-
|
|
52
|
+
<div
|
|
53
|
+
className={twMerge(
|
|
54
|
+
'flex px-6 py-4 border-b border-gray-400',
|
|
55
|
+
headerWrapperClassName
|
|
56
|
+
)}
|
|
57
|
+
>
|
|
58
|
+
{title && (
|
|
59
|
+
<h3 className={twMerge('text-lg font-light', titleClassName)}>
|
|
60
|
+
{title}
|
|
61
|
+
</h3>
|
|
62
|
+
)}
|
|
51
63
|
{showCloseButton && (
|
|
52
64
|
<button
|
|
53
65
|
type="button"
|
|
54
66
|
onClick={() => setOpen(false)}
|
|
55
|
-
className=
|
|
67
|
+
className={twMerge('ml-auto', closeButtonClassName)}
|
|
56
68
|
>
|
|
57
|
-
<Icon
|
|
69
|
+
<Icon
|
|
70
|
+
name={iconName}
|
|
71
|
+
size={iconSize}
|
|
72
|
+
className={iconClassName}
|
|
73
|
+
/>
|
|
58
74
|
</button>
|
|
59
75
|
)}
|
|
60
76
|
</div>
|
|
@@ -14,14 +14,18 @@ const Select = forwardRef<HTMLSelectElement, SelectProps>((props, ref) => {
|
|
|
14
14
|
error,
|
|
15
15
|
label,
|
|
16
16
|
required = false,
|
|
17
|
+
labelClassName,
|
|
17
18
|
...rest
|
|
18
19
|
} = props;
|
|
19
20
|
|
|
20
21
|
return (
|
|
21
22
|
<label
|
|
22
|
-
className={
|
|
23
|
-
'
|
|
24
|
-
|
|
23
|
+
className={twMerge(
|
|
24
|
+
clsx('flex flex-col relative text-xs text-gray-800', {
|
|
25
|
+
'pl-7': icon
|
|
26
|
+
}),
|
|
27
|
+
labelClassName
|
|
28
|
+
)}
|
|
25
29
|
>
|
|
26
30
|
{icon && (
|
|
27
31
|
<Icon
|
|
@@ -32,32 +36,40 @@ const Select = forwardRef<HTMLSelectElement, SelectProps>((props, ref) => {
|
|
|
32
36
|
)}
|
|
33
37
|
|
|
34
38
|
{label && (
|
|
35
|
-
<span className=
|
|
39
|
+
<span className={twMerge('mb-1', labelClassName)}>
|
|
36
40
|
{label} {required && <span className="text-secondary">*</span>}
|
|
37
41
|
</span>
|
|
38
42
|
)}
|
|
39
|
-
<
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
43
|
+
<div className="relative">
|
|
44
|
+
<select
|
|
45
|
+
{...rest}
|
|
46
|
+
ref={ref}
|
|
47
|
+
className={twMerge(
|
|
48
|
+
clsx(
|
|
49
|
+
'cursor-pointer truncate h-10 w-40 px-2.5 shrink-0 outline-none',
|
|
50
|
+
!borderless &&
|
|
51
|
+
'border border-gray-200 transition-all duration-150 hover:border-primary',
|
|
52
|
+
'appearance-none bg-transparent'
|
|
53
|
+
),
|
|
54
|
+
className
|
|
55
|
+
)}
|
|
56
|
+
>
|
|
57
|
+
{options?.map((option) => (
|
|
58
|
+
<option
|
|
59
|
+
key={option.value}
|
|
60
|
+
value={option.value}
|
|
61
|
+
className={option.class}
|
|
62
|
+
>
|
|
63
|
+
{option.label}
|
|
64
|
+
</option>
|
|
65
|
+
))}
|
|
66
|
+
</select>
|
|
67
|
+
<div className="pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-gray-700">
|
|
68
|
+
<svg className="h-4 w-4 fill-current" viewBox="0 0 20 20">
|
|
69
|
+
<path d="M9.293 12.95l.707.707L15.657 8l-1.414-1.414L10 10.828 5.757 6.586 4.343 8z" />
|
|
70
|
+
</svg>
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
61
73
|
{error && (
|
|
62
74
|
<span className="mt-1 text-sm text-error">{error.message}</span>
|
|
63
75
|
)}
|
|
@@ -29,7 +29,13 @@ export interface PaginationProps {
|
|
|
29
29
|
isLoading?: boolean;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
export
|
|
32
|
+
export interface FileInputProps extends React.HTMLProps<HTMLInputElement> {
|
|
33
|
+
fileClassName?: string;
|
|
34
|
+
fileNameWrapperClassName?: string;
|
|
35
|
+
fileInputClassName?: string;
|
|
36
|
+
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
37
|
+
buttonClassName?: string;
|
|
38
|
+
}
|
|
33
39
|
|
|
34
40
|
export type RadioProps = React.HTMLProps<HTMLInputElement>;
|
|
35
41
|
|
|
@@ -58,6 +64,7 @@ export interface SelectProps extends React.HTMLProps<HTMLSelectElement> {
|
|
|
58
64
|
iconSize?: number;
|
|
59
65
|
error?: FieldError | undefined;
|
|
60
66
|
required?: boolean;
|
|
67
|
+
labelClassName?: string;
|
|
61
68
|
}
|
|
62
69
|
export interface IconProps extends React.ComponentPropsWithRef<'i'> {
|
|
63
70
|
name: string;
|
|
@@ -91,3 +98,20 @@ export interface BadgeProps {
|
|
|
91
98
|
children: ReactNode;
|
|
92
99
|
className?: string;
|
|
93
100
|
}
|
|
101
|
+
|
|
102
|
+
export type AccordionProps = {
|
|
103
|
+
isCollapse?: boolean;
|
|
104
|
+
collapseClassName?: string;
|
|
105
|
+
title?: string;
|
|
106
|
+
subTitle?: string;
|
|
107
|
+
icons?: string[];
|
|
108
|
+
iconSize?: number;
|
|
109
|
+
iconColor?: string;
|
|
110
|
+
children?: ReactNode;
|
|
111
|
+
headerClassName?: string;
|
|
112
|
+
className?: string;
|
|
113
|
+
titleClassName?: string;
|
|
114
|
+
subTitleClassName?: string;
|
|
115
|
+
dataTestId?: string;
|
|
116
|
+
contentClassName?: string;
|
|
117
|
+
};
|
|
@@ -71,3 +71,20 @@ export interface SeoProps {
|
|
|
71
71
|
ogPriceAmount?: string;
|
|
72
72
|
ogPriceCurrency?: string;
|
|
73
73
|
}
|
|
74
|
+
|
|
75
|
+
export interface ModalProps {
|
|
76
|
+
portalId: string;
|
|
77
|
+
children?: React.ReactNode;
|
|
78
|
+
open?: boolean;
|
|
79
|
+
setOpen?: (open: boolean) => void;
|
|
80
|
+
title?: React.ReactNode;
|
|
81
|
+
showCloseButton?: React.ReactNode;
|
|
82
|
+
className?: string;
|
|
83
|
+
overlayClassName?: string;
|
|
84
|
+
headerWrapperClassName?: string;
|
|
85
|
+
titleClassName?: string;
|
|
86
|
+
closeButtonClassName?: string;
|
|
87
|
+
iconName?: string;
|
|
88
|
+
iconSize?: number;
|
|
89
|
+
iconClassName?: string;
|
|
90
|
+
}
|
|
@@ -259,23 +259,25 @@ export const AddressForm = (props: Props) => {
|
|
|
259
259
|
{/* TODO: Fix select and textarea components */}
|
|
260
260
|
|
|
261
261
|
<Select
|
|
262
|
-
className="w-full border-gray-500 text-sm
|
|
262
|
+
className="w-full border-gray-500 text-sm"
|
|
263
263
|
options={countryOptions}
|
|
264
264
|
{...register('country')}
|
|
265
265
|
error={errors.country}
|
|
266
266
|
data-testid="address-form-country"
|
|
267
267
|
label={t('account.address_book.form.country.title')}
|
|
268
|
+
labelClassName="mb-3"
|
|
268
269
|
required
|
|
269
270
|
/>
|
|
270
271
|
|
|
271
272
|
{city && (
|
|
272
273
|
<Select
|
|
273
|
-
className="w-full border-gray-500 text-sm
|
|
274
|
+
className="w-full border-gray-500 text-sm"
|
|
274
275
|
options={cityOptions}
|
|
275
276
|
{...register('city')}
|
|
276
277
|
error={errors.city}
|
|
277
278
|
data-testid="address-form-city"
|
|
278
279
|
label={t('account.address_book.form.province.title')}
|
|
280
|
+
labelClassName="mb-3"
|
|
279
281
|
required
|
|
280
282
|
/>
|
|
281
283
|
)}
|
|
@@ -283,24 +285,26 @@ export const AddressForm = (props: Props) => {
|
|
|
283
285
|
<div className="flex gap-4">
|
|
284
286
|
<div className="flex-1">
|
|
285
287
|
<Select
|
|
286
|
-
className="w-full border-gray-500 text-sm
|
|
288
|
+
className="w-full border-gray-500 text-sm"
|
|
287
289
|
options={townshipOptions}
|
|
288
290
|
{...register('township')}
|
|
289
291
|
error={errors.township}
|
|
290
292
|
data-testid="address-form-township"
|
|
291
293
|
label={t('account.address_book.form.township.title')}
|
|
294
|
+
labelClassName="mb-3"
|
|
292
295
|
required
|
|
293
296
|
/>
|
|
294
297
|
</div>
|
|
295
298
|
{district && (
|
|
296
299
|
<div className="flex-1">
|
|
297
300
|
<Select
|
|
298
|
-
className="w-full border-gray-500 text-sm
|
|
301
|
+
className="w-full border-gray-500 text-sm"
|
|
299
302
|
options={districtOptions}
|
|
300
303
|
{...register('district')}
|
|
301
304
|
error={errors.district}
|
|
302
305
|
data-testid="address-form-district"
|
|
303
306
|
label={t('account.address_book.form.district.title')}
|
|
307
|
+
labelClassName="mb-3"
|
|
304
308
|
required
|
|
305
309
|
/>
|
|
306
310
|
</div>
|
|
@@ -31,13 +31,13 @@ export const ContentHeader = (props: Props) => {
|
|
|
31
31
|
</h3>
|
|
32
32
|
<Select
|
|
33
33
|
onChange={handleChange}
|
|
34
|
-
className="w-full mb-4 md:mb-0 md:w-56
|
|
34
|
+
className="w-full mb-4 md:mb-0 md:w-56 text-xs"
|
|
35
35
|
options={orders}
|
|
36
36
|
data-testid="account-orders-header-select"
|
|
37
37
|
></Select>
|
|
38
38
|
<Button
|
|
39
39
|
className={clsx(
|
|
40
|
-
'w-full md:w-56',
|
|
40
|
+
'w-full md:w-56 md:ms-4',
|
|
41
41
|
isButtonDisabled &&
|
|
42
42
|
'hover:bg-black hover:text-white disabled:opacity-75'
|
|
43
43
|
)}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
const getAkinonNextContent = require("@akinon/next/tailwind/content");
|
|
1
2
|
const deepMerge = require('@akinon/next/utils/deep-merge');
|
|
2
3
|
const defaultTheme = require('tailwindcss/defaultTheme');
|
|
3
4
|
const plugins = require('./src/plugins');
|
|
@@ -26,12 +27,7 @@ const defaultConfig = {
|
|
|
26
27
|
'./src/widgets/**/*.{js,ts,jsx,tsx}',
|
|
27
28
|
'./src/hooks/**/*.{js,ts,jsx,tsx}',
|
|
28
29
|
'./src/utils/**/*.{js,ts,jsx,tsx}',
|
|
29
|
-
...plugins
|
|
30
|
-
.map((plugin) => [
|
|
31
|
-
`./node_modules/@akinon/${plugin}/**/*.{js,ts,jsx,tsx}`,
|
|
32
|
-
`../../node_modules/@akinon/${plugin}/**/*.{js,ts,jsx,tsx}`
|
|
33
|
-
])
|
|
34
|
-
.flat()
|
|
30
|
+
...getAkinonNextContent(plugins)
|
|
35
31
|
],
|
|
36
32
|
theme: {
|
|
37
33
|
extend: {
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
const path = require('path');
|
|
2
|
+
const jscodeshift = require('jscodeshift/src/Runner');
|
|
3
|
+
|
|
4
|
+
const codemodScript = path.resolve(__dirname, 'transform.js');
|
|
5
|
+
|
|
6
|
+
const transform = () => {
|
|
7
|
+
const workingDir = path.resolve(process.cwd());
|
|
8
|
+
|
|
9
|
+
jscodeshift
|
|
10
|
+
.run(codemodScript, [workingDir], {
|
|
11
|
+
verbose: 0,
|
|
12
|
+
dry: false,
|
|
13
|
+
print: false,
|
|
14
|
+
extensions: 'js',
|
|
15
|
+
ignorePattern: '**/node_modules/**',
|
|
16
|
+
filter: '**/tailwind.config.js'
|
|
17
|
+
})
|
|
18
|
+
.then(
|
|
19
|
+
(stats) => {
|
|
20
|
+
console.log(`Codemod completed. Stats:`, stats);
|
|
21
|
+
},
|
|
22
|
+
(error) => {
|
|
23
|
+
console.error(`Error executing codemod: ${error.message}`);
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
module.exports = {
|
|
29
|
+
transform
|
|
30
|
+
};
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
function transform(fileInfo, api) {
|
|
2
|
+
const j = api.jscodeshift;
|
|
3
|
+
const root = j(fileInfo.source);
|
|
4
|
+
|
|
5
|
+
if (!fileInfo.path.includes('tailwind.config.js')) {
|
|
6
|
+
return fileInfo.source;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
console.log(`Processing file: ${fileInfo.path}`);
|
|
10
|
+
|
|
11
|
+
const hasAkinonNextImport = root.find(j.VariableDeclarator, {
|
|
12
|
+
id: { name: 'getAkinonNextContent' }
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
if (hasAkinonNextImport.size() === 0) {
|
|
16
|
+
const requireStatement = j.variableDeclaration('const', [
|
|
17
|
+
j.variableDeclarator(
|
|
18
|
+
j.identifier('getAkinonNextContent'),
|
|
19
|
+
j.callExpression(j.identifier('require'), [
|
|
20
|
+
j.literal('@akinon/next/tailwind/content')
|
|
21
|
+
])
|
|
22
|
+
)
|
|
23
|
+
]);
|
|
24
|
+
|
|
25
|
+
root.get().node.program.body.unshift(requireStatement);
|
|
26
|
+
|
|
27
|
+
console.log(`Added getAkinonNextContent import to ${fileInfo.path}`);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const defaultConfig = root
|
|
31
|
+
.find(j.VariableDeclarator, {
|
|
32
|
+
id: { name: 'defaultConfig' },
|
|
33
|
+
init: { type: 'ObjectExpression' }
|
|
34
|
+
})
|
|
35
|
+
.paths()[0];
|
|
36
|
+
|
|
37
|
+
if (!defaultConfig) {
|
|
38
|
+
console.log(`No defaultConfig found in ${fileInfo.path}`);
|
|
39
|
+
return fileInfo.source;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const contentArray = defaultConfig.value.init.properties.find(
|
|
43
|
+
(prop) =>
|
|
44
|
+
prop.key.name === 'content' && prop.value.type === 'ArrayExpression'
|
|
45
|
+
);
|
|
46
|
+
|
|
47
|
+
if (!contentArray) {
|
|
48
|
+
console.log(`No content array found in defaultConfig`);
|
|
49
|
+
return fileInfo.source;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const pluginsVarName = root
|
|
53
|
+
.find(j.VariableDeclarator, {
|
|
54
|
+
id: { name: 'plugins' },
|
|
55
|
+
init: {
|
|
56
|
+
type: 'CallExpression',
|
|
57
|
+
callee: { name: 'require' }
|
|
58
|
+
}
|
|
59
|
+
})
|
|
60
|
+
.paths()[0]?.value.id.name;
|
|
61
|
+
|
|
62
|
+
if (!pluginsVarName) {
|
|
63
|
+
console.log(`No plugins variable found in ${fileInfo.path}`);
|
|
64
|
+
return fileInfo.source;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
const contentElements = contentArray.value.elements;
|
|
68
|
+
|
|
69
|
+
const filteredElements = contentElements.filter((element) => {
|
|
70
|
+
if (element.type === 'SpreadElement') {
|
|
71
|
+
if (
|
|
72
|
+
element.argument.type === 'CallExpression' &&
|
|
73
|
+
element.argument.callee.object?.callee.object.name === 'plugins'
|
|
74
|
+
) {
|
|
75
|
+
return false;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
if (
|
|
79
|
+
element.argument.type === 'CallExpression' &&
|
|
80
|
+
element.argument.callee.name === 'getAkinonNextContent'
|
|
81
|
+
) {
|
|
82
|
+
return false;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return true;
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
filteredElements.push(
|
|
89
|
+
j.spreadElement(
|
|
90
|
+
j.callExpression(j.identifier('getAkinonNextContent'), [
|
|
91
|
+
j.identifier(pluginsVarName)
|
|
92
|
+
])
|
|
93
|
+
)
|
|
94
|
+
);
|
|
95
|
+
|
|
96
|
+
contentArray.value.elements = filteredElements;
|
|
97
|
+
|
|
98
|
+
console.log(`Successfully updated ${fileInfo.path}`);
|
|
99
|
+
return root.toSource();
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
module.exports = transform;
|
package/commands/codemod.ts
CHANGED
package/commands/plugins.ts
CHANGED
|
@@ -69,45 +69,65 @@ export default async () => {
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
const definedPlugins = [
|
|
72
|
+
{
|
|
73
|
+
name: 'Akifast',
|
|
74
|
+
value: 'pz-akifast'
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
name: 'Apple Pay',
|
|
78
|
+
value: 'pz-apple-pay'
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
name: 'B2B',
|
|
82
|
+
value: 'pz-b2b'
|
|
83
|
+
},
|
|
72
84
|
{
|
|
73
85
|
name: 'Basket Gift Pack',
|
|
74
86
|
value: 'pz-basket-gift-pack'
|
|
75
87
|
},
|
|
76
88
|
{
|
|
77
|
-
name: '
|
|
78
|
-
value: 'pz-
|
|
89
|
+
name: 'BKM Express',
|
|
90
|
+
value: 'pz-bkm'
|
|
79
91
|
},
|
|
80
92
|
{
|
|
81
93
|
name: 'Checkout Gift Pack',
|
|
82
94
|
value: 'pz-checkout-gift-pack'
|
|
83
95
|
},
|
|
84
96
|
{
|
|
85
|
-
name: '
|
|
86
|
-
value: 'pz-
|
|
97
|
+
name: 'Click & Collect',
|
|
98
|
+
value: 'pz-click-collect'
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
name: 'Credit Payment',
|
|
102
|
+
value: 'pz-credit-payment'
|
|
87
103
|
},
|
|
88
104
|
{
|
|
89
105
|
name: 'Garanti Pay',
|
|
90
106
|
value: 'pz-gpay'
|
|
91
107
|
},
|
|
92
108
|
{
|
|
93
|
-
name: '
|
|
94
|
-
value: 'pz-
|
|
109
|
+
name: 'Masterpass',
|
|
110
|
+
value: 'pz-masterpass'
|
|
95
111
|
},
|
|
96
112
|
{
|
|
97
|
-
name: '
|
|
98
|
-
value: 'pz-
|
|
113
|
+
name: 'Multi Basket',
|
|
114
|
+
value: 'pz-multi-basket'
|
|
99
115
|
},
|
|
100
116
|
{
|
|
101
|
-
name: '
|
|
102
|
-
value: 'pz-
|
|
117
|
+
name: 'One Click Checkout',
|
|
118
|
+
value: 'pz-one-click-checkout'
|
|
103
119
|
},
|
|
104
120
|
{
|
|
105
|
-
name: '
|
|
106
|
-
value: 'pz-
|
|
121
|
+
name: 'Otp',
|
|
122
|
+
value: 'pz-otp'
|
|
107
123
|
},
|
|
108
124
|
{
|
|
109
|
-
name: '
|
|
110
|
-
value: 'pz-
|
|
125
|
+
name: 'Pay On Delivery',
|
|
126
|
+
value: 'pz-pay-on-delivery'
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
name: 'Saved Card',
|
|
130
|
+
value: 'pz-saved-card'
|
|
111
131
|
},
|
|
112
132
|
{
|
|
113
133
|
name: 'Tabby Payment Extension',
|
package/dist/commands/codemod.js
CHANGED
|
@@ -8,7 +8,6 @@ const yargs = require('yargs/yargs');
|
|
|
8
8
|
const { hideBin } = require('yargs/helpers');
|
|
9
9
|
const args = yargs(hideBin(process.argv)).argv;
|
|
10
10
|
exports.default = () => {
|
|
11
|
-
const workingDir = path_1.default.resolve(process.cwd());
|
|
12
11
|
const codemodName = args.codemod;
|
|
13
12
|
const codemodPath = path_1.default.resolve(__dirname, `../../codemods/${codemodName}/index.js`);
|
|
14
13
|
const codemod = require(codemodPath);
|
package/dist/commands/plugins.js
CHANGED
|
@@ -84,45 +84,65 @@ exports.default = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
84
84
|
process.exit(1);
|
|
85
85
|
}
|
|
86
86
|
const definedPlugins = [
|
|
87
|
+
{
|
|
88
|
+
name: 'Akifast',
|
|
89
|
+
value: 'pz-akifast'
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
name: 'Apple Pay',
|
|
93
|
+
value: 'pz-apple-pay'
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
name: 'B2B',
|
|
97
|
+
value: 'pz-b2b'
|
|
98
|
+
},
|
|
87
99
|
{
|
|
88
100
|
name: 'Basket Gift Pack',
|
|
89
101
|
value: 'pz-basket-gift-pack'
|
|
90
102
|
},
|
|
91
103
|
{
|
|
92
|
-
name: '
|
|
93
|
-
value: 'pz-
|
|
104
|
+
name: 'BKM Express',
|
|
105
|
+
value: 'pz-bkm'
|
|
94
106
|
},
|
|
95
107
|
{
|
|
96
108
|
name: 'Checkout Gift Pack',
|
|
97
109
|
value: 'pz-checkout-gift-pack'
|
|
98
110
|
},
|
|
99
111
|
{
|
|
100
|
-
name: '
|
|
101
|
-
value: 'pz-
|
|
112
|
+
name: 'Click & Collect',
|
|
113
|
+
value: 'pz-click-collect'
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
name: 'Credit Payment',
|
|
117
|
+
value: 'pz-credit-payment'
|
|
102
118
|
},
|
|
103
119
|
{
|
|
104
120
|
name: 'Garanti Pay',
|
|
105
121
|
value: 'pz-gpay'
|
|
106
122
|
},
|
|
107
123
|
{
|
|
108
|
-
name: '
|
|
109
|
-
value: 'pz-
|
|
124
|
+
name: 'Masterpass',
|
|
125
|
+
value: 'pz-masterpass'
|
|
110
126
|
},
|
|
111
127
|
{
|
|
112
|
-
name: '
|
|
113
|
-
value: 'pz-
|
|
128
|
+
name: 'Multi Basket',
|
|
129
|
+
value: 'pz-multi-basket'
|
|
114
130
|
},
|
|
115
131
|
{
|
|
116
|
-
name: '
|
|
117
|
-
value: 'pz-
|
|
132
|
+
name: 'One Click Checkout',
|
|
133
|
+
value: 'pz-one-click-checkout'
|
|
118
134
|
},
|
|
119
135
|
{
|
|
120
|
-
name: '
|
|
121
|
-
value: 'pz-
|
|
136
|
+
name: 'Otp',
|
|
137
|
+
value: 'pz-otp'
|
|
122
138
|
},
|
|
123
139
|
{
|
|
124
|
-
name: '
|
|
125
|
-
value: 'pz-
|
|
140
|
+
name: 'Pay On Delivery',
|
|
141
|
+
value: 'pz-pay-on-delivery'
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
name: 'Saved Card',
|
|
145
|
+
value: 'pz-saved-card'
|
|
126
146
|
},
|
|
127
147
|
{
|
|
128
148
|
name: 'Tabby Payment Extension',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akinon/projectzero",
|
|
3
|
-
"version": "1.91.0-rc.
|
|
3
|
+
"version": "1.91.0-rc.4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "CLI tool to manage your Project Zero Next project",
|
|
6
6
|
"bin": {
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"@types/temp": "0.9.4"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
+
"jscodeshift": "^0.15.1",
|
|
22
23
|
"@inquirer/prompts": "7.5.0",
|
|
23
24
|
"loading-spinner": "1.2.1",
|
|
24
25
|
"semver": "7.6.2",
|