@blocklet/payment-react 1.14.25 → 1.14.27
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/es/components/table.js +8 -2
- package/es/hooks/table.d.ts +1 -0
- package/es/hooks/table.js +5 -0
- package/es/index.d.ts +1 -0
- package/es/index.js +1 -0
- package/lib/components/table.js +8 -2
- package/lib/hooks/table.d.ts +1 -0
- package/lib/hooks/table.js +13 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +12 -0
- package/package.json +3 -3
- package/src/components/table.tsx +8 -2
- package/src/hooks/table.ts +6 -0
- package/src/index.ts +1 -0
package/es/components/table.js
CHANGED
|
@@ -17,8 +17,8 @@ const Table = React.memo(
|
|
|
17
17
|
download: false,
|
|
18
18
|
filter: false,
|
|
19
19
|
selectableRows: "none",
|
|
20
|
-
rowsPerPage: 10,
|
|
21
|
-
rowsPerPageOptions: [10, 20, 50, 100],
|
|
20
|
+
rowsPerPage: isMobile ? 5 : 10,
|
|
21
|
+
rowsPerPageOptions: [5, 10, 20, 50, 100],
|
|
22
22
|
searchDebounceTime: 300,
|
|
23
23
|
tableBodyHeight: "100%",
|
|
24
24
|
loading: true
|
|
@@ -98,6 +98,8 @@ const Wrapped = styled(Datatable)`
|
|
|
98
98
|
}
|
|
99
99
|
td.MuiTableCell-root {
|
|
100
100
|
border-bottom: none;
|
|
101
|
+
padding-top: 12px;
|
|
102
|
+
padding-bottom: 12px;
|
|
101
103
|
&:first-of-type {
|
|
102
104
|
padding-left: 20px;
|
|
103
105
|
}
|
|
@@ -135,6 +137,10 @@ const Wrapped = styled(Datatable)`
|
|
|
135
137
|
> div {
|
|
136
138
|
overflow: auto;
|
|
137
139
|
}
|
|
140
|
+
.custom-toobar-title-inner {
|
|
141
|
+
display: flex;
|
|
142
|
+
align-items: center;
|
|
143
|
+
}
|
|
138
144
|
@media (max-width: ${({ theme }) => theme.breakpoints.values.md}px) {
|
|
139
145
|
th a,
|
|
140
146
|
td a {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useDefaultPageSize(pageSize?: number): number;
|
package/es/index.d.ts
CHANGED
|
@@ -31,5 +31,6 @@ export * from './libs/connect';
|
|
|
31
31
|
export * from './contexts/payment';
|
|
32
32
|
export * from './hooks/subscription';
|
|
33
33
|
export * from './hooks/mobile';
|
|
34
|
+
export * from './hooks/table';
|
|
34
35
|
export { translations, createTranslator } from './locales';
|
|
35
36
|
export { api, dayjs, FormInput, PhoneInput, AddressForm, StripeForm, Status, Livemode, Switch, ConfirmDialog, CheckoutForm, CheckoutTable, CheckoutDonate, CurrencySelector, Payment, PaymentSummary, PricingTable, ProductSkeleton, Amount, CustomerInvoiceList, CustomerPaymentList, TxLink, TxGas, SafeGuard, PricingItem, CountrySelect, Table, };
|
package/es/index.js
CHANGED
|
@@ -31,6 +31,7 @@ export * from "./libs/connect.js";
|
|
|
31
31
|
export * from "./contexts/payment.js";
|
|
32
32
|
export * from "./hooks/subscription.js";
|
|
33
33
|
export * from "./hooks/mobile.js";
|
|
34
|
+
export * from "./hooks/table.js";
|
|
34
35
|
export { translations, createTranslator } from "./locales/index.js";
|
|
35
36
|
export {
|
|
36
37
|
api,
|
package/lib/components/table.js
CHANGED
|
@@ -36,8 +36,8 @@ const Table = _react.default.memo(({
|
|
|
36
36
|
download: false,
|
|
37
37
|
filter: false,
|
|
38
38
|
selectableRows: "none",
|
|
39
|
-
rowsPerPage: 10,
|
|
40
|
-
rowsPerPageOptions: [10, 20, 50, 100],
|
|
39
|
+
rowsPerPage: isMobile ? 5 : 10,
|
|
40
|
+
rowsPerPageOptions: [5, 10, 20, 50, 100],
|
|
41
41
|
searchDebounceTime: 300,
|
|
42
42
|
tableBodyHeight: "100%",
|
|
43
43
|
loading: true
|
|
@@ -118,6 +118,8 @@ const Wrapped = (0, _system.styled)(_Datatable.default)`
|
|
|
118
118
|
}
|
|
119
119
|
td.MuiTableCell-root {
|
|
120
120
|
border-bottom: none;
|
|
121
|
+
padding-top: 12px;
|
|
122
|
+
padding-bottom: 12px;
|
|
121
123
|
&:first-of-type {
|
|
122
124
|
padding-left: 20px;
|
|
123
125
|
}
|
|
@@ -155,6 +157,10 @@ const Wrapped = (0, _system.styled)(_Datatable.default)`
|
|
|
155
157
|
> div {
|
|
156
158
|
overflow: auto;
|
|
157
159
|
}
|
|
160
|
+
.custom-toobar-title-inner {
|
|
161
|
+
display: flex;
|
|
162
|
+
align-items: center;
|
|
163
|
+
}
|
|
158
164
|
@media (max-width: ${({
|
|
159
165
|
theme
|
|
160
166
|
}) => theme.breakpoints.values.md}px) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useDefaultPageSize(pageSize?: number): number;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useDefaultPageSize = useDefaultPageSize;
|
|
7
|
+
var _mobile = require("./mobile");
|
|
8
|
+
function useDefaultPageSize(pageSize = 10) {
|
|
9
|
+
const {
|
|
10
|
+
isMobile
|
|
11
|
+
} = (0, _mobile.useMobile)();
|
|
12
|
+
return isMobile ? 5 : pageSize;
|
|
13
|
+
}
|
package/lib/index.d.ts
CHANGED
|
@@ -31,5 +31,6 @@ export * from './libs/connect';
|
|
|
31
31
|
export * from './contexts/payment';
|
|
32
32
|
export * from './hooks/subscription';
|
|
33
33
|
export * from './hooks/mobile';
|
|
34
|
+
export * from './hooks/table';
|
|
34
35
|
export { translations, createTranslator } from './locales';
|
|
35
36
|
export { api, dayjs, FormInput, PhoneInput, AddressForm, StripeForm, Status, Livemode, Switch, ConfirmDialog, CheckoutForm, CheckoutTable, CheckoutDonate, CurrencySelector, Payment, PaymentSummary, PricingTable, ProductSkeleton, Amount, CustomerInvoiceList, CustomerPaymentList, TxLink, TxGas, SafeGuard, PricingItem, CountrySelect, Table, };
|
package/lib/index.js
CHANGED
|
@@ -303,5 +303,17 @@ Object.keys(_mobile).forEach(function (key) {
|
|
|
303
303
|
}
|
|
304
304
|
});
|
|
305
305
|
});
|
|
306
|
+
var _table3 = require("./hooks/table");
|
|
307
|
+
Object.keys(_table3).forEach(function (key) {
|
|
308
|
+
if (key === "default" || key === "__esModule") return;
|
|
309
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
310
|
+
if (key in exports && exports[key] === _table3[key]) return;
|
|
311
|
+
Object.defineProperty(exports, key, {
|
|
312
|
+
enumerable: true,
|
|
313
|
+
get: function () {
|
|
314
|
+
return _table3[key];
|
|
315
|
+
}
|
|
316
|
+
});
|
|
317
|
+
});
|
|
306
318
|
var _locales = require("./locales");
|
|
307
319
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blocklet/payment-react",
|
|
3
|
-
"version": "1.14.
|
|
3
|
+
"version": "1.14.27",
|
|
4
4
|
"description": "Reusable react components for payment kit v2",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"@babel/core": "^7.25.2",
|
|
94
94
|
"@babel/preset-env": "^7.25.2",
|
|
95
95
|
"@babel/preset-react": "^7.24.7",
|
|
96
|
-
"@blocklet/payment-types": "1.14.
|
|
96
|
+
"@blocklet/payment-types": "1.14.27",
|
|
97
97
|
"@storybook/addon-essentials": "^7.6.20",
|
|
98
98
|
"@storybook/addon-interactions": "^7.6.20",
|
|
99
99
|
"@storybook/addon-links": "^7.6.20",
|
|
@@ -123,5 +123,5 @@
|
|
|
123
123
|
"vite-plugin-babel": "^1.2.0",
|
|
124
124
|
"vite-plugin-node-polyfills": "^0.21.0"
|
|
125
125
|
},
|
|
126
|
-
"gitHead": "
|
|
126
|
+
"gitHead": "8a67ed1dbdda51526d4cd03c9c10c6930a9ac6a0"
|
|
127
127
|
}
|
package/src/components/table.tsx
CHANGED
|
@@ -21,8 +21,8 @@ const Table = React.memo(
|
|
|
21
21
|
download: false,
|
|
22
22
|
filter: false,
|
|
23
23
|
selectableRows: 'none',
|
|
24
|
-
rowsPerPage: 10,
|
|
25
|
-
rowsPerPageOptions: [10, 20, 50, 100],
|
|
24
|
+
rowsPerPage: isMobile ? 5 : 10,
|
|
25
|
+
rowsPerPageOptions: [5, 10, 20, 50, 100],
|
|
26
26
|
searchDebounceTime: 300,
|
|
27
27
|
tableBodyHeight: '100%',
|
|
28
28
|
loading: true,
|
|
@@ -108,6 +108,8 @@ const Wrapped = styled(Datatable)`
|
|
|
108
108
|
}
|
|
109
109
|
td.MuiTableCell-root {
|
|
110
110
|
border-bottom: none;
|
|
111
|
+
padding-top: 12px;
|
|
112
|
+
padding-bottom: 12px;
|
|
111
113
|
&:first-of-type {
|
|
112
114
|
padding-left: 20px;
|
|
113
115
|
}
|
|
@@ -145,6 +147,10 @@ const Wrapped = styled(Datatable)`
|
|
|
145
147
|
> div {
|
|
146
148
|
overflow: auto;
|
|
147
149
|
}
|
|
150
|
+
.custom-toobar-title-inner {
|
|
151
|
+
display: flex;
|
|
152
|
+
align-items: center;
|
|
153
|
+
}
|
|
148
154
|
@media (max-width: ${({ theme }) => theme.breakpoints.values.md}px) {
|
|
149
155
|
th a,
|
|
150
156
|
td a {
|
package/src/index.ts
CHANGED