@bigbinary/neeto-payments-frontend 1.0.8 → 1.0.10

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 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,15 @@ 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. **shouldFetchFilterOptions**: To specify whether or not to fetch the options
48
- for columns with filter type as `single_option` or `multi_option`. Its value
49
- is `false` by default.
40
+ 4. **tabs**: To specify the tabs to be displayed in the payments dashboard. It is an optional parameter.
50
41
 
51
- 5. **tabs**: To specify the tabs to be displayed in the payments dashboard. It is an optional parameter.
42
+ 5. **headerProps**: To specify the props to be passed to the neetoUI `Header` component used in the `Dashboard`.
52
43
 
53
44
  **More about `payableEntityColumns`**
54
45
 
@@ -90,23 +81,15 @@ const payableEntityColumns = [
90
81
  ];
91
82
  ```
92
83
 
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
84
+ 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
85
  [NeetoUI docs](https://neeto-ui.neeto.com/?path=/docs/components-table--default).
97
86
 
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.
87
+ 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
88
 
102
89
  > :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.
90
+ > `{ payable: {...} }`. So the `dataIndex` key must be used accordingly. Refer the example above.
105
91
 
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.
92
+ > In the case of columns with filter type as `single_option` or `multi_option`, `values` key can be passed along with `filterProps`.
110
93
 
111
94
  **More about `searchProps` prop**
112
95
 
@@ -121,28 +104,11 @@ const searchProps = {
121
104
  };
122
105
  ```
123
106
 
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.
107
+ 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
108
 
129
109
  To know more about the working of `node` and `model` keys, refer the
130
110
  [`neeto-filters-frontend` documentation](https://github.com/bigbinary/neeto-filters-frontend/blob/main/README.md).
131
111
 
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
112
  **More about `tabs` prop**
147
113
 
148
114
  `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 +116,12 @@ An example of desired response from the endpoint is:
150
116
 
151
117
  ### 2. `buildStripeTransactionLink` function
152
118
 
153
- This function is used to generate the stripe transaction link from a payment
154
- identifier.
119
+ This function is used to generate the stripe transaction link from a payment identifier.
155
120
 
156
121
  The arguments are:
157
122
 
158
123
  1. `identifier`: The payment identifier
159
- 2. `isLive`: Specifying whether or not the environment is live. It defaults to
160
- `true`.
124
+ 2. `isLive`: Specifying whether or not the environment is live. It defaults to `true`.
161
125
 
162
126
  Example usage
163
127