@pisell/private-materials 3.0.194 → 3.0.195
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/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +142 -150
- package/build/lowcode/render/default/view.js +2 -2
- package/build/lowcode/view.js +9 -9
- package/es/components/eftposPay/helper.d.ts +1 -0
- package/es/components/eftposPay/helper.js +14 -0
- package/es/components/eftposPay/tyro/index.js +11 -3
- package/lib/components/eftposPay/helper.d.ts +1 -0
- package/lib/components/eftposPay/helper.js +21 -0
- package/lib/components/eftposPay/tyro/index.js +10 -2
- package/package.json +4 -4
|
@@ -216,4 +216,18 @@ export function getPayAmonunt(_ref, formatAmount) {
|
|
|
216
216
|
surRateMoney: "".concat(surRateMoney),
|
|
217
217
|
totalUnit: formatAmount(total)
|
|
218
218
|
};
|
|
219
|
+
}
|
|
220
|
+
export function getBrowserVersion() {
|
|
221
|
+
var Sys = {};
|
|
222
|
+
var ua = navigator.userAgent.toLowerCase();
|
|
223
|
+
var s;
|
|
224
|
+
(s = ua.match(/rv:([\d.]+)\) like gecko/)) ? Sys.ie = s[1] : (s = ua.match(/msie ([\d\.]+)/)) ? Sys.ie = s[1] : (s = ua.match(/edge\/([\d\.]+)/)) ? Sys.edge = s[1] : (s = ua.match(/firefox\/([\d\.]+)/)) ? Sys.firefox = s[1] : (s = ua.match(/(?:opera|opr).([\d\.]+)/)) ? Sys.opera = s[1] : (s = ua.match(/chrome\/([\d\.]+)/)) ? Sys.chrome = s[1] : (s = ua.match(/version\/([\d\.]+).*safari/)) ? Sys.safari = s[1] : 0;
|
|
225
|
+
// 根据关系进行判断
|
|
226
|
+
if (Sys.ie) return 'IE: ' + Sys.ie;
|
|
227
|
+
if (Sys.edge) return 'EDGE: ' + Sys.edge;
|
|
228
|
+
if (Sys.firefox) return 'Firefox: ' + Sys.firefox;
|
|
229
|
+
if (Sys.chrome) return 'Chrome: ' + Sys.chrome;
|
|
230
|
+
if (Sys.opera) return 'Opera: ' + Sys.opera;
|
|
231
|
+
if (Sys.safari) return 'Safari: ' + Sys.safari;
|
|
232
|
+
return 'Unkonwn';
|
|
219
233
|
}
|
|
@@ -21,7 +21,7 @@ import { Button } from 'antd';
|
|
|
21
21
|
import { useDispatch, useContextData, updateState, updateCustom, updateComponent } from "../store";
|
|
22
22
|
import { ModeEnum, ClientEnum } from "../const";
|
|
23
23
|
import { Decimal } from 'decimal.js';
|
|
24
|
-
import { getUuid, getPayParams } from "../helper";
|
|
24
|
+
import { getUuid, getPayParams, getBrowserVersion } from "../helper";
|
|
25
25
|
import Step from "../component/step/step";
|
|
26
26
|
import { useStoreRef } from "../hooks";
|
|
27
27
|
var Minute = 1000 * 60;
|
|
@@ -156,7 +156,11 @@ export default (function (_ref) {
|
|
|
156
156
|
integrationKey: integrationKey,
|
|
157
157
|
transactionId: numRef.current,
|
|
158
158
|
mid: mid,
|
|
159
|
-
tid: tid
|
|
159
|
+
tid: tid,
|
|
160
|
+
device: JSON.stringify(deviceRef.current),
|
|
161
|
+
isPrintMerchant: isPrint('merchant'),
|
|
162
|
+
isPrintCustomer: isPrint('customer'),
|
|
163
|
+
browserVersion: getBrowserVersion()
|
|
160
164
|
};
|
|
161
165
|
dispatch(updateCustom({
|
|
162
166
|
requestParams: requestParams.current
|
|
@@ -226,7 +230,11 @@ export default (function (_ref) {
|
|
|
226
230
|
integrationKey: integrationKey,
|
|
227
231
|
transactionId: numRef.current,
|
|
228
232
|
mid: mid,
|
|
229
|
-
tid: tid
|
|
233
|
+
tid: tid,
|
|
234
|
+
device: JSON.stringify(deviceRef.current),
|
|
235
|
+
isPrintMerchant: isPrint('merchant'),
|
|
236
|
+
isPrintCustomer: isPrint('customer'),
|
|
237
|
+
browserVersion: getBrowserVersion()
|
|
230
238
|
};
|
|
231
239
|
dispatch(updateCustom({
|
|
232
240
|
requestParams: requestParams.current
|
|
@@ -21,6 +21,7 @@ var helper_exports = {};
|
|
|
21
21
|
__export(helper_exports, {
|
|
22
22
|
cloneDeep: () => cloneDeep,
|
|
23
23
|
getAmonunt: () => getAmonunt,
|
|
24
|
+
getBrowserVersion: () => getBrowserVersion,
|
|
24
25
|
getPayAmonunt: () => getPayAmonunt,
|
|
25
26
|
getPayParams: () => getPayParams,
|
|
26
27
|
getUuid: () => getUuid,
|
|
@@ -185,10 +186,30 @@ function getPayAmonunt({ money, amount, surRate, surMoney }, formatAmount) {
|
|
|
185
186
|
totalUnit: formatAmount(total)
|
|
186
187
|
};
|
|
187
188
|
}
|
|
189
|
+
function getBrowserVersion() {
|
|
190
|
+
const Sys = {};
|
|
191
|
+
const ua = navigator.userAgent.toLowerCase();
|
|
192
|
+
let s;
|
|
193
|
+
(s = ua.match(/rv:([\d.]+)\) like gecko/)) ? Sys.ie = s[1] : (s = ua.match(/msie ([\d\.]+)/)) ? Sys.ie = s[1] : (s = ua.match(/edge\/([\d\.]+)/)) ? Sys.edge = s[1] : (s = ua.match(/firefox\/([\d\.]+)/)) ? Sys.firefox = s[1] : (s = ua.match(/(?:opera|opr).([\d\.]+)/)) ? Sys.opera = s[1] : (s = ua.match(/chrome\/([\d\.]+)/)) ? Sys.chrome = s[1] : (s = ua.match(/version\/([\d\.]+).*safari/)) ? Sys.safari = s[1] : 0;
|
|
194
|
+
if (Sys.ie)
|
|
195
|
+
return "IE: " + Sys.ie;
|
|
196
|
+
if (Sys.edge)
|
|
197
|
+
return "EDGE: " + Sys.edge;
|
|
198
|
+
if (Sys.firefox)
|
|
199
|
+
return "Firefox: " + Sys.firefox;
|
|
200
|
+
if (Sys.chrome)
|
|
201
|
+
return "Chrome: " + Sys.chrome;
|
|
202
|
+
if (Sys.opera)
|
|
203
|
+
return "Opera: " + Sys.opera;
|
|
204
|
+
if (Sys.safari)
|
|
205
|
+
return "Safari: " + Sys.safari;
|
|
206
|
+
return "Unkonwn";
|
|
207
|
+
}
|
|
188
208
|
// Annotate the CommonJS export names for ESM import in node:
|
|
189
209
|
0 && (module.exports = {
|
|
190
210
|
cloneDeep,
|
|
191
211
|
getAmonunt,
|
|
212
|
+
getBrowserVersion,
|
|
192
213
|
getPayAmonunt,
|
|
193
214
|
getPayParams,
|
|
194
215
|
getUuid,
|
|
@@ -133,7 +133,11 @@ var tyro_default = ({
|
|
|
133
133
|
integrationKey,
|
|
134
134
|
transactionId: numRef.current,
|
|
135
135
|
mid,
|
|
136
|
-
tid
|
|
136
|
+
tid,
|
|
137
|
+
device: JSON.stringify(deviceRef.current),
|
|
138
|
+
isPrintMerchant: isPrint("merchant"),
|
|
139
|
+
isPrintCustomer: isPrint("customer"),
|
|
140
|
+
browserVersion: (0, import_helper.getBrowserVersion)()
|
|
137
141
|
};
|
|
138
142
|
dispatch(
|
|
139
143
|
(0, import_store.updateCustom)({
|
|
@@ -200,7 +204,11 @@ var tyro_default = ({
|
|
|
200
204
|
integrationKey,
|
|
201
205
|
transactionId: numRef.current,
|
|
202
206
|
mid,
|
|
203
|
-
tid
|
|
207
|
+
tid,
|
|
208
|
+
device: JSON.stringify(deviceRef.current),
|
|
209
|
+
isPrintMerchant: isPrint("merchant"),
|
|
210
|
+
isPrintCustomer: isPrint("customer"),
|
|
211
|
+
browserVersion: (0, import_helper.getBrowserVersion)()
|
|
204
212
|
};
|
|
205
213
|
dispatch(
|
|
206
214
|
(0, import_store.updateCustom)({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/private-materials",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.195",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -59,10 +59,10 @@
|
|
|
59
59
|
"react-infinite-scroll-component": "^6.1.0",
|
|
60
60
|
"rc-virtual-list": "^3.11.3",
|
|
61
61
|
"decimal.js": "^10.4.3",
|
|
62
|
-
"@pisell/
|
|
63
|
-
"@pisell/date-picker": "1.0.100",
|
|
62
|
+
"@pisell/materials": "3.0.55",
|
|
64
63
|
"@pisell/icon": "0.0.11",
|
|
65
|
-
"@pisell/
|
|
64
|
+
"@pisell/date-picker": "1.0.100",
|
|
65
|
+
"@pisell/utils": "1.0.42"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
68
68
|
"react": "^18.0.0",
|