@akinon/pz-akifast 1.108.0-rc.87 → 1.108.0-snapshot-ZERO-3875-occasion-20251229071759

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/CHANGELOG.md +17 -12
  2. package/README.md +82 -106
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,19 +1,24 @@
1
1
  # @akinon/pz-akifast
2
2
 
3
- ## 1.108.0-rc.87
3
+ ## 1.108.0-snapshot-ZERO-3875-occasion-20251229071759
4
4
 
5
- ### Minor Changes
5
+ ## 1.108.0-rc.8
6
+
7
+ ## 1.108.0-rc.7
8
+
9
+ ## 1.108.0-rc.6
10
+
11
+ ## 1.108.0-rc.5
12
+
13
+ ## 1.108.0-rc.4
14
+
15
+ ## 1.108.0-rc.3
16
+
17
+ ## 1.108.0-rc.2
18
+
19
+ ## 1.108.0-rc.1
6
20
 
7
- - d8be48fb: ZERO-3422: Update fetch method to use dynamic request method in wallet complete redirection middleware
8
- - 16aff543: ZERO-3431: Add test script for redirect utility in package.json
9
- - 64699d3ff: ZERO-2761: Fix invalid import for plugin module
10
- - e974d8e8: ZERO-3406: Fix rc build
11
- - 7eb51ca9: ZERO-3424 :Update package versions
12
- - 7727ae55: ZERO-3073: Refactor basket page to use server-side data fetching and simplify component structure
13
- - 8b1d24eb: ZERO-3422: Update fetch method to use dynamic request method in wallet complete redirection middleware
14
- - 9cfbf6cd: ZERO-3397 :Update README.md to enhance button visibility management and add detailed usage examples for Checkout and Quick Login buttons
15
- - 33377cfd: ZERO-3267: Refactor import statement for ROUTES in error-page component
16
- - 33d4d0c9: ZERO-3615: remove custom not found
21
+ ## 1.108.0-rc.0
17
22
 
18
23
  ## 1.107.0
19
24
 
package/README.md CHANGED
@@ -8,19 +8,13 @@ You can use the following command to install the extension with the latest plugi
8
8
  npx @akinon/projectzero@latest --plugins
9
9
  ```
10
10
 
11
- ## Akifast
12
-
13
11
  ### Setting the Visibility of Buttons
14
12
 
15
- All buttons are visible by default.
16
-
17
- Manage the visibility of buttons:
18
-
19
- ```bash
20
- src/settings.js
21
- ```
13
+ (all buttons are visible by default)
22
14
 
23
15
  ```javascript
16
+ // settings.js file
17
+
24
18
  module.exports = {
25
19
  // other settings
26
20
  plugins: {
@@ -34,81 +28,71 @@ module.exports = {
34
28
  };
35
29
  ```
36
30
 
37
- ## Checkout Button Props
38
-
39
- You can see other props for the button in the `pz-one-click-checkout` package.
40
-
41
- | Property | Type | Required | Description |
42
- | -------- | --------- | -------- | -------------------------------------- |
43
- | isPdp | `boolean` | Optional | Indicates if it's a product info page. |
44
- | renderer | `object` | Optional | Custom rendering functions. |
45
-
46
- ## Quick Login Props
31
+ ### Usage in Plugin Module System
47
32
 
48
- | Property | Type | Required | Description |
49
- | ---------------- | --------- | -------- | ---------------------------------- |
50
- | buttonText | `string` | Optional | Text displayed on the button. |
51
- | isCaptchaVisible | `boolean` | Required | Indicates if captcha is visible. |
52
- | captchaValidated | `boolean` | Required | Indicates if captcha is validated. |
53
- | renderer | `object` | Optional | Custom rendering functions. |
54
-
55
- ## Renderer Props Types
33
+ ## Checkout Button
56
34
 
57
- The full type definitions for the renderer props:
35
+ ```javascript
36
+ import PluginModule, { Component } from '@akinon/next/components/plugin-module';
58
37
 
59
- ```typescript
60
- interface AkifastRendererProps {
61
- quickLoginButton?: {
62
- renderButton?: (props: {
63
- buttonText: string;
64
- disabled: boolean;
65
- onClick: () => void;
66
- rest: React.ButtonHTMLAttributes<HTMLButtonElement>;
67
- }) => React.ReactNode;
68
- };
69
- checkoutButton?: {
70
- renderButton?: (props: {
71
- provider: ProvidersType;
72
- rest: OneClickCheckoutButtonProps;
73
- }) => React.ReactNode;
74
- renderEmptyState?: () => React.ReactNode;
75
- };
76
- }
38
+ <PluginModule
39
+ component={Component.AkifastCheckoutButton}
40
+ props={{
41
+ ...checkoutProviderProps, // same with one click checkout props
42
+ isPdp: true
43
+ }}
44
+ />;
77
45
  ```
78
46
 
79
- ### Usage Examples
80
-
81
- Both the `CheckoutButton` and `QuickLoginButton` can be customized using the `renderer` prop. This allows you to fully customize the appearance and behavior of these components while maintaining their core functionality.
82
-
83
- ## Checkout Button
47
+ ## Quick Login Button
84
48
 
85
- Summary:
49
+ ```javascript
50
+ import PluginModule, { Component } from '@akinon/next/components/plugin-module';
86
51
 
87
- ```bash
88
- /src/views/basket/summary.tsx
52
+ <PluginModule
53
+ component={Component.AkifastQuickLoginButton}
54
+ props={{
55
+ isCaptchaVisible,
56
+ captchaValidated
57
+ }}
58
+ />;
89
59
  ```
90
60
 
91
- Product Info:
61
+ ## Customizing Components
92
62
 
93
- ```bash
94
- /src/views/product/product-info.tsx
95
- ```
63
+ Both the `CheckoutButton` and `QuickLoginButton` can be customized using the `renderer` prop. This allows you to fully customize the appearance and behavior of these components while maintaining their core functionality.
96
64
 
97
- ### Default Usage
65
+ ### Customizing Quick Login Button
98
66
 
99
67
  ```javascript
100
68
  import PluginModule, { Component } from '@akinon/next/components/plugin-module';
101
69
 
102
70
  <PluginModule
103
- component={Component.AkifastCheckoutButton}
71
+ component={Component.AkifastQuickLoginButton}
104
72
  props={{
105
- ...checkoutProviderProps, // same with one click checkout props
106
- isPdp: true
73
+ isCaptchaVisible,
74
+ captchaValidated,
75
+ buttonText: 'Quick Login',
76
+ renderer: {
77
+ renderButton: ({ buttonText, disabled, onClick, rest }) => (
78
+ <button
79
+ className="custom-login-button"
80
+ disabled={disabled}
81
+ onClick={onClick}
82
+ {...rest}
83
+ >
84
+ <svg className="icon-login" viewBox="0 0 24 24">
85
+ {/* Your custom SVG icon */}
86
+ </svg>
87
+ {buttonText}
88
+ </button>
89
+ )
90
+ }
107
91
  }}
108
92
  />;
109
93
  ```
110
94
 
111
- ### Customized Usage with Renderer
95
+ ### Customizing Checkout Button
112
96
 
113
97
  ```javascript
114
98
  import PluginModule, { Component } from '@akinon/next/components/plugin-module';
@@ -129,13 +113,13 @@ import PluginModule, { Component } from '@akinon/next/components/plugin-module';
129
113
  console.log('Original props:', rest);
130
114
  }}
131
115
  >
132
- Hemen Satın Al
116
+ Buy Now
133
117
  </button>
134
118
  </div>
135
119
  ),
136
120
  renderEmptyState: () => (
137
121
  <div className="checkout-unavailable">
138
- Akifast ile ödeme şu an mevcut değil
122
+ Akifast payment option is not available at the moment.
139
123
  </div>
140
124
  )
141
125
  }
@@ -143,52 +127,44 @@ import PluginModule, { Component } from '@akinon/next/components/plugin-module';
143
127
  />;
144
128
  ```
145
129
 
146
- ## Quick Login Button
130
+ ## Checkout Button Props
147
131
 
148
- ```bash
149
- /src/views/login/index.tsx
150
- ```
132
+ You can see other props for the button in the `pz-one-click-checkout` package.
151
133
 
152
- ### Default Usage
134
+ | Property | Type | Description |
135
+ | -------- | --------- | -------------------------------------- |
136
+ | isPdp | `boolean` | Indicates if it's a product info page. |
137
+ | renderer | `object` | Custom rendering functions. |
153
138
 
154
- ```javascript
155
- import PluginModule, { Component } from '@akinon/next/components/plugin-module';
139
+ ## Quick Login Props
156
140
 
157
- <PluginModule
158
- component={Component.AkifastQuickLoginButton}
159
- props={{
160
- isCaptchaVisible,
161
- captchaValidated
162
- }}
163
- />;
164
- ```
141
+ | Property | Type | Description |
142
+ | ---------------- | --------- | ---------------------------------- |
143
+ | buttonText | `string` | Text displayed on the button. |
144
+ | isCaptchaVisible | `boolean` | Indicates if captcha is visible. |
145
+ | captchaValidated | `boolean` | Indicates if captcha is validated. |
146
+ | renderer | `object` | Custom rendering functions. |
165
147
 
166
- ### Customized Usage with Renderer
148
+ ## Renderer Props Types
167
149
 
168
- ```javascript
169
- import PluginModule, { Component } from '@akinon/next/components/plugin-module';
150
+ The full type definitions for the renderer props:
170
151
 
171
- <PluginModule
172
- component={Component.AkifastQuickLoginButton}
173
- props={{
174
- isCaptchaVisible,
175
- captchaValidated,
176
- buttonText: 'Hızlı Giriş',
177
- renderer: {
178
- renderButton: ({ buttonText, disabled, onClick, rest }) => (
179
- <button
180
- className="custom-login-button"
181
- disabled={disabled}
182
- onClick={onClick}
183
- {...rest}
184
- >
185
- <svg className="icon-login" viewBox="0 0 24 24">
186
- {/* Your custom SVG icon */}
187
- </svg>
188
- {buttonText}
189
- </button>
190
- )
191
- }
192
- }}
193
- />;
152
+ ```typescript
153
+ interface AkifastRendererProps {
154
+ quickLoginButton?: {
155
+ renderButton?: (props: {
156
+ buttonText: string;
157
+ disabled: boolean;
158
+ onClick: () => void;
159
+ rest: React.ButtonHTMLAttributes<HTMLButtonElement>;
160
+ }) => React.ReactNode;
161
+ };
162
+ checkoutButton?: {
163
+ renderButton?: (props: {
164
+ provider: ProvidersType;
165
+ rest: OneClickCheckoutButtonProps;
166
+ }) => React.ReactNode;
167
+ renderEmptyState?: () => React.ReactNode;
168
+ };
169
+ }
194
170
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akinon/pz-akifast",
3
- "version": "1.108.0-rc.87",
3
+ "version": "1.108.0-snapshot-ZERO-3875-occasion-20251229071759",
4
4
  "main": "./src/index.ts",
5
5
  "module": "./src/index.ts",
6
6
  "license": "MIT",