@bigbinary/neeto-payments-frontend 1.0.7 → 1.0.9
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/README.md +11 -49
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +3 -2
- package/types.d.ts +0 -1
package/README.md
CHANGED
|
@@ -7,9 +7,7 @@ neetoPayments is the library that manages payments across neeto products.
|
|
|
7
7
|
|
|
8
8
|
## Installation
|
|
9
9
|
|
|
10
|
-
1. **neetoPayments** has a few peer dependencies that are required for the
|
|
11
|
-
proper functioning of the package. Install all the peer dependencies using
|
|
12
|
-
the below command:
|
|
10
|
+
1. **neetoPayments** has a few peer dependencies that are required for the proper functioning of the package. Install all the peer dependencies using the below command:
|
|
13
11
|
|
|
14
12
|
```zsh
|
|
15
13
|
yarn add @bigbinary/neeto-commons-frontend@2.0.54 @bigbinary/neeto-filters-frontend@2.8.1 @bigbinary/neeto-icons@1.9.22 @bigbinary/neeto-molecules@1.0.9 @bigbinary/neetoui@4.4.10 @honeybadger-io/js@5.1.1 @honeybadger-io/react@5.1.3 axios@1.3.4 classnames@2.3.2 formik@2.2.9 js-logger@1.6.1 mixpanel-browser@2.45.0 ramda@0.28.0 react-helmet@6.1.0 react-query@3.39.3 react-router-dom@5.3.4 react-toastify@8.2.0 yup@1.0.2
|
|
@@ -33,22 +31,13 @@ neeto-payments-frontend exports:
|
|
|
33
31
|
|
|
34
32
|
#### Props
|
|
35
33
|
|
|
36
|
-
1. **holdableId**: To specify the ID of the entity that holds the stripe
|
|
37
|
-
account. This is an optional prop. If the value is not specified, the current
|
|
38
|
-
organization ID is taken as the default value while querying for
|
|
39
|
-
transactions.
|
|
34
|
+
1. **holdableId**: To specify the ID of the entity that holds the stripe account. This is an optional prop. If the value is not specified, the current organization ID is taken as the default value while querying for transactions.
|
|
40
35
|
|
|
41
|
-
2. **payableEntityColumns**: To specify the columns from the payable entity
|
|
42
|
-
which need to be additionally displayed. It is an optional prop that defaults
|
|
43
|
-
to `[]` if not specified.
|
|
36
|
+
2. **payableEntityColumns**: To specify the columns from the payable entity which need to be additionally displayed. It is an optional prop that defaults to `[]` if not specified.
|
|
44
37
|
|
|
45
38
|
3. **searchProps**: To specify the properties of the search bar in `Dashboard`.
|
|
46
39
|
|
|
47
|
-
4. **
|
|
48
|
-
for columns with filter type as `single_option` or `multi_option`. Its value
|
|
49
|
-
is `false` by default.
|
|
50
|
-
|
|
51
|
-
5. **tabs**: To specify the tabs to be displayed in the payments dashboard. It is an optional parameter.
|
|
40
|
+
4. **tabs**: To specify the tabs to be displayed in the payments dashboard. It is an optional parameter.
|
|
52
41
|
|
|
53
42
|
**More about `payableEntityColumns`**
|
|
54
43
|
|
|
@@ -90,23 +79,15 @@ const payableEntityColumns = [
|
|
|
90
79
|
];
|
|
91
80
|
```
|
|
92
81
|
|
|
93
|
-
The `payableEntityColumns` is similar to `columnData` prop used in `Table`
|
|
94
|
-
component in **NeetoUI**. The prop can be modified accordingly to customize the
|
|
95
|
-
columns in the table. For more customizations, refer
|
|
82
|
+
The `payableEntityColumns` is similar to `columnData` prop used in `Table` component in **NeetoUI**. The prop can be modified accordingly to customize the columns in the table. For more customizations, refer
|
|
96
83
|
[NeetoUI docs](https://neeto-ui.neeto.com/?path=/docs/components-table--default).
|
|
97
84
|
|
|
98
|
-
The additional keys are `isFilterable` and `filterProps`. `filterProps` is used
|
|
99
|
-
to build the list of columns to be represented in the filters pane. The
|
|
100
|
-
`isFilterable` key must be `true` for `filterProps` to be considered.
|
|
85
|
+
The additional keys are `isFilterable` and `filterProps`. `filterProps` is used to build the list of columns to be represented in the filters pane. The `isFilterable` key must be `true` for `filterProps` to be considered.
|
|
101
86
|
|
|
102
87
|
> :memo: **Note:** The data about the payable entity is in the format
|
|
103
|
-
> `{ payable: {...} }`. So the `dataIndex` key must be used accordingly. Refer
|
|
104
|
-
> the example above.
|
|
88
|
+
> `{ payable: {...} }`. So the `dataIndex` key must be used accordingly. Refer the example above.
|
|
105
89
|
|
|
106
|
-
> In the case of columns with filter type as `single_option` or `multi_option`,
|
|
107
|
-
> `values` key can be passed along with `filterProps`. Alternatively it be
|
|
108
|
-
> automated using `Dashboard` component. To know more on this, refer "More about
|
|
109
|
-
> shouldFetchFilterOptions prop" section below.
|
|
90
|
+
> In the case of columns with filter type as `single_option` or `multi_option`, `values` key can be passed along with `filterProps`.
|
|
110
91
|
|
|
111
92
|
**More about `searchProps` prop**
|
|
112
93
|
|
|
@@ -121,28 +102,11 @@ const searchProps = {
|
|
|
121
102
|
};
|
|
122
103
|
```
|
|
123
104
|
|
|
124
|
-
This is passed to the `FiltersBar` and `FiltersPane` components from
|
|
125
|
-
`neeto-filters-frontend`. This is similar to the `keyword` prop used in
|
|
126
|
-
`neeto-filters-frontend` with an additional `placeholder` key which is used as
|
|
127
|
-
the placeholder in the search bar.
|
|
105
|
+
This is passed to the `FiltersBar` and `FiltersPane` components from `neeto-filters-frontend`. This is similar to the `keyword` prop used in `neeto-filters-frontend` with an additional `placeholder` key which is used as the placeholder in the search bar.
|
|
128
106
|
|
|
129
107
|
To know more about the working of `node` and `model` keys, refer the
|
|
130
108
|
[`neeto-filters-frontend` documentation](https://github.com/bigbinary/neeto-filters-frontend/blob/main/README.md).
|
|
131
109
|
|
|
132
|
-
**More about `shouldFetchFilterOptions` prop**
|
|
133
|
-
|
|
134
|
-
`shouldFetchFilterOptions` decides whether or not to fetch the data to be set as
|
|
135
|
-
the `values` key in `filterProp`. For this to work,
|
|
136
|
-
`api/v1/payments/filter_options` endpoint must be defined and it must return the
|
|
137
|
-
filter options.
|
|
138
|
-
|
|
139
|
-
An example of desired response from the endpoint is:
|
|
140
|
-
|
|
141
|
-
`{ filterOptions: { host: [...], meeting: [...]}}`
|
|
142
|
-
|
|
143
|
-
> :memo: **Note:** For the above method to work, the keys inside the
|
|
144
|
-
> `filterOptions` object must match the `key` property in `payableEntityColumns`
|
|
145
|
-
|
|
146
110
|
**More about `tabs` prop**
|
|
147
111
|
|
|
148
112
|
`tabs` is an array of strings. It has default value as this: `["all", "successful", "pending", "declined", "refunded"]`.It should only be a subset of the array above. Preferably it shouldn't be an empty array.
|
|
@@ -150,14 +114,12 @@ An example of desired response from the endpoint is:
|
|
|
150
114
|
|
|
151
115
|
### 2. `buildStripeTransactionLink` function
|
|
152
116
|
|
|
153
|
-
This function is used to generate the stripe transaction link from a payment
|
|
154
|
-
identifier.
|
|
117
|
+
This function is used to generate the stripe transaction link from a payment identifier.
|
|
155
118
|
|
|
156
119
|
The arguments are:
|
|
157
120
|
|
|
158
121
|
1. `identifier`: The payment identifier
|
|
159
|
-
2. `isLive`: Specifying whether or not the environment is live. It defaults to
|
|
160
|
-
`true`.
|
|
122
|
+
2. `isLive`: Specifying whether or not the environment is live. It defaults to `true`.
|
|
161
123
|
|
|
162
124
|
Example usage
|
|
163
125
|
|