@akinon/pz-pay-on-delivery 1.100.0-rc.72 → 1.100.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/CHANGELOG.md +1 -17
  2. package/package.json +1 -1
  3. package/readme.md +0 -130
package/CHANGELOG.md CHANGED
@@ -1,20 +1,6 @@
1
1
  # @akinon/pz-pay-on-delivery
2
2
 
3
- ## 1.100.0-rc.72
4
-
5
- ## 1.100.0-rc.71
6
-
7
- ### Minor Changes
8
-
9
- - d0853b3b: ZERO-2844 :Add README for PayOnDelivery component with installation and usage instructions
10
- - d8be48fb: ZERO-3422: Update fetch method to use dynamic request method in wallet complete redirection middleware
11
- - 16aff543: ZERO-3431: Add test script for redirect utility in package.json
12
- - 64699d3ff: ZERO-2761: Fix invalid import for plugin module
13
- - e974d8e8: ZERO-3406: Fix rc build
14
- - 7eb51ca9: ZERO-3424 :Update package versions
15
- - 7727ae55: ZERO-3073: Refactor basket page to use server-side data fetching and simplify component structure
16
- - 8b1d24eb: ZERO-3422: Update fetch method to use dynamic request method in wallet complete redirection middleware
17
- - 33377cfd: ZERO-3267: Refactor import statement for ROUTES in error-page component
3
+ ## 1.100.0
18
4
 
19
5
  ## 1.99.0
20
6
 
@@ -38,8 +24,6 @@
38
24
 
39
25
  ## 1.91.0
40
26
 
41
- > > > > > > > origin/ZERO-3418
42
-
43
27
  ## 1.90.0
44
28
 
45
29
  ### Minor Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akinon/pz-pay-on-delivery",
3
- "version": "1.100.0-rc.72",
3
+ "version": "1.100.0",
4
4
  "license": "MIT",
5
5
  "main": "src/index.tsx",
6
6
  "peerDependencies": {
package/readme.md DELETED
@@ -1,130 +0,0 @@
1
- # @akinon/pz-pay-on-delivery
2
-
3
- ## Installation method
4
-
5
- You can use the following command to install the extension with the latest plugins:
6
-
7
- ```bash
8
- npx @akinon/projectzero@latest --plugins
9
- ```
10
-
11
- ## PayOnDelivery
12
-
13
- A customizable React component that enables customers to select a "Pay on Delivery" payment method during checkout and confirm their agreement to terms before placing the order.
14
-
15
- ---
16
-
17
- ### Props
18
-
19
- #### `PayOnDeliveryProps`
20
-
21
- | Prop | Type | Required | Description |
22
- | --- | --- | --- | --- |
23
- | `translations` | `Record<string, PayOnDeliveryTranslationsProps>` | Optional | Localization texts for section titles, labels, and error messages |
24
- | `agreementCheckbox` | `React.ReactElement` | Optional | A controlled checkbox React element (e.g., terms agreement checkbox) |
25
- | `customUIRender` | `(props: RenderProps) => React.ReactNode` | Optional | Override default UI rendering with your own layout and logic |
26
-
27
- ---
28
-
29
- #### `PayOnDeliveryTranslationsProps`
30
-
31
- | Key | Type | Description |
32
- | ---------------------------- | -------- | ------------------------------ |
33
- | `paymentInformationTitle` | `string` | Main section title |
34
- | `paymentInformationSubtitle` | `string` | Subtitle for available options |
35
- | `totalAmountText` | `string` | Label for total amount display |
36
- | `serviceFeeText` | `string` | Label for service fee info |
37
- | `returnInfoText` | `string` | Text about return process |
38
- | `refundInfoText` | `string` | Text about refund process |
39
- | `faqInfoText` | `string` | Link/label for FAQ section |
40
- | `placeOrderText` | `string` | Button text |
41
- | `errorMessageText` | `string` | API error display text |
42
- | `requiredFieldMessage` | `string` | Field validation error message |
43
-
44
- ---
45
-
46
- #### RenderProps (for `customUIRender`)
47
-
48
- | Prop | Type | Description |
49
- | --- | --- | --- | --- |
50
- | `handleSubmit` | `UseFormHandleSubmit` | Form submit handler |
51
- | `onSubmit` | `SubmitHandler<PayOnDeliveryForm>` | Submit function |
52
- | `register` | `UseFormRegister<PayOnDeliveryForm>` | Form field registrar |
53
- | `control` | `Control<PayOnDeliveryForm>` | React Hook Form control instance |
54
- | `errors` | `FieldErrors<PayOnDeliveryForm>` | Validation errors |
55
- | `paymentChoices` | `any[]` | List of available payment choices |
56
- | `preOrder` | `RootState['checkout']['preOrder']` | PreOrder data from Redux |
57
- | `formError` | `string | null` | API error messages |
58
- | `isLoading` | `boolean` | Loading state |
59
- | `setPayOnDeliveryChoice` | `(value: string) => void` | Function to update payment selection |
60
-
61
- ---
62
-
63
- ## Usage
64
-
65
- ```bash
66
- src/views/checkout/steps/payment/options/pay-on-delivery/
67
- ```
68
-
69
- ---
70
-
71
- ### Default Usage
72
-
73
- ```tsx
74
- <PluginModule
75
- component={Component.PayOnDelivery}
76
- props={{
77
- agreementCheckbox: (
78
- <CheckoutAgreements control={null} error={null} fieldId="agreement" />
79
- )
80
- }}
81
- />
82
- ```
83
-
84
- ---
85
-
86
- ### Customized Usage with `customUIRender`
87
-
88
- ```tsx
89
- <PluginModule
90
- component={Component.PayOnDelivery}
91
- props={{
92
- customUIRender: ({
93
- handleSubmit,
94
- onSubmit,
95
- control,
96
- errors,
97
- setPayOnDeliveryChoice,
98
- paymentChoices,
99
- preOrder,
100
- formError
101
- }) => (
102
- <form
103
- onSubmit={handleSubmit(onSubmit)}
104
- className="p-6 bg-white rounded-lg space-y-6"
105
- >
106
- <h2 className="text-xl font-semibold">PAY ON DELIVERY</h2>
107
- <div className="space-y-4">
108
- {paymentChoices.map((choice) => (
109
- <label key={choice.value} className="flex items-center space-x-4">
110
- <Radio
111
- type="radio"
112
- value={choice.value}
113
- checked={choice.value === preOrder.payment_choice?.value}
114
- onChange={() => setPayOnDeliveryChoice(choice.value)}
115
- />
116
- <span>{choice.label}</span>
117
- </label>
118
- ))}
119
- </div>
120
- {formError && <p className="text-xs text-error mt-2">{formError}</p>}
121
- <Button type="submit" className="w-full bg-black text-white">
122
- Place Order
123
- </Button>
124
- </form>
125
- )
126
- }}
127
- />
128
- ```
129
-
130
- ---