@pisell/materials 1.0.433 → 1.0.435
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/meta.js +1 -1
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +1 -1
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +1 -1
- package/es/components/pisellInformationEntry/Input/index.js +3 -0
- package/es/components/pisellInformationEntry/hooks/useTerminalPeripherals.d.ts +2 -2
- package/es/components/pisellInformationEntry/hooks/useTerminalPeripherals.js +14 -4
- package/es/components/pisellInformationEntry/index.less +1 -1
- package/lib/components/pisellInformationEntry/Input/index.js +3 -0
- package/lib/components/pisellInformationEntry/hooks/useTerminalPeripherals.d.ts +2 -2
- package/lib/components/pisellInformationEntry/hooks/useTerminalPeripherals.js +14 -4
- package/lib/components/pisellInformationEntry/index.less +1 -1
- package/package.json +3 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare type Peripherals = {
|
|
2
|
-
scanner: 'none' | 'connected' | '
|
|
3
|
-
nfc: 'none' | 'connected' | '
|
|
2
|
+
scanner: 'none' | 'connected' | 'disconnect';
|
|
3
|
+
nfc: 'none' | 'connected' | 'disconnect';
|
|
4
4
|
};
|
|
5
5
|
declare const useTerminalPeripherals: (onChange?: ((val: string) => void) | undefined) => {
|
|
6
6
|
peripheralsStatus: Peripherals;
|
|
@@ -21,8 +21,13 @@ var useTerminalPeripherals = function useTerminalPeripherals(onChange) {
|
|
|
21
21
|
useEffect(function () {
|
|
22
22
|
var _interaction$utils, _interaction$utils$mo, _interaction$utils2, _interaction$utils2$p, _interaction$utils3, _interaction$utils3$m;
|
|
23
23
|
// 获取外部设备扫描结果
|
|
24
|
-
interaction === null || interaction === void 0 ? void 0 : (_interaction$utils = interaction.utils) === null || _interaction$utils === void 0 ? void 0 : (_interaction$utils$mo = _interaction$utils.mountFunction) === null || _interaction$utils$mo === void 0 ? void 0 : _interaction$utils$mo.call(_interaction$utils, 'global', 'peripheralsResult', function (
|
|
25
|
-
|
|
24
|
+
interaction === null || interaction === void 0 ? void 0 : (_interaction$utils = interaction.utils) === null || _interaction$utils === void 0 ? void 0 : (_interaction$utils$mo = _interaction$utils.mountFunction) === null || _interaction$utils$mo === void 0 ? void 0 : _interaction$utils$mo.call(_interaction$utils, 'global', 'peripheralsResult', function (strVal) {
|
|
25
|
+
try {
|
|
26
|
+
var _val = JSON.parse(strVal);
|
|
27
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_val.value);
|
|
28
|
+
} catch (err) {
|
|
29
|
+
console.error(err);
|
|
30
|
+
}
|
|
26
31
|
});
|
|
27
32
|
|
|
28
33
|
// 主动获取设备连接状态
|
|
@@ -33,8 +38,13 @@ var useTerminalPeripherals = function useTerminalPeripherals(onChange) {
|
|
|
33
38
|
});
|
|
34
39
|
|
|
35
40
|
// 设备当前连接状态返回
|
|
36
|
-
interaction === null || interaction === void 0 ? void 0 : (_interaction$utils3 = interaction.utils) === null || _interaction$utils3 === void 0 ? void 0 : (_interaction$utils3$m = _interaction$utils3.mountFunction) === null || _interaction$utils3$m === void 0 ? void 0 : _interaction$utils3$m.call(_interaction$utils3, 'global', 'peripheralsStatus', function (
|
|
37
|
-
|
|
41
|
+
interaction === null || interaction === void 0 ? void 0 : (_interaction$utils3 = interaction.utils) === null || _interaction$utils3 === void 0 ? void 0 : (_interaction$utils3$m = _interaction$utils3.mountFunction) === null || _interaction$utils3$m === void 0 ? void 0 : _interaction$utils3$m.call(_interaction$utils3, 'global', 'peripheralsStatus', function (strPeripherals) {
|
|
42
|
+
try {
|
|
43
|
+
var peripherals = JSON.parse(strPeripherals);
|
|
44
|
+
setPeripheralsStatus(peripherals);
|
|
45
|
+
} catch (err) {
|
|
46
|
+
console.error(err);
|
|
47
|
+
}
|
|
38
48
|
});
|
|
39
49
|
}, []);
|
|
40
50
|
return {
|
|
@@ -52,6 +52,9 @@ var PisellEntryInput = (props) => {
|
|
|
52
52
|
onChange(e.target.value);
|
|
53
53
|
}
|
|
54
54
|
},
|
|
55
|
+
onPressEnter: (e) => {
|
|
56
|
+
onChange(value);
|
|
57
|
+
},
|
|
55
58
|
style: { flex: 1 },
|
|
56
59
|
prefix: /* @__PURE__ */ import_react.default.createElement(import_iconfont.default, { style: { color: "#667085" }, type: "pisell2-search-lg" }),
|
|
57
60
|
allowClear: true
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare type Peripherals = {
|
|
2
|
-
scanner: 'none' | 'connected' | '
|
|
3
|
-
nfc: 'none' | 'connected' | '
|
|
2
|
+
scanner: 'none' | 'connected' | 'disconnect';
|
|
3
|
+
nfc: 'none' | 'connected' | 'disconnect';
|
|
4
4
|
};
|
|
5
5
|
declare const useTerminalPeripherals: (onChange?: ((val: string) => void) | undefined) => {
|
|
6
6
|
peripheralsStatus: Peripherals;
|
|
@@ -48,8 +48,13 @@ var useTerminalPeripherals = (onChange) => {
|
|
|
48
48
|
_a2,
|
|
49
49
|
"global",
|
|
50
50
|
"peripheralsResult",
|
|
51
|
-
(
|
|
52
|
-
|
|
51
|
+
(strVal) => {
|
|
52
|
+
try {
|
|
53
|
+
const val = JSON.parse(strVal);
|
|
54
|
+
onChange == null ? void 0 : onChange(val.value);
|
|
55
|
+
} catch (err) {
|
|
56
|
+
console.error(err);
|
|
57
|
+
}
|
|
53
58
|
}
|
|
54
59
|
);
|
|
55
60
|
(_d = (_c = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _c.postMessageToApp) == null ? void 0 : _d.call(_c, {
|
|
@@ -61,8 +66,13 @@ var useTerminalPeripherals = (onChange) => {
|
|
|
61
66
|
_e,
|
|
62
67
|
"global",
|
|
63
68
|
"peripheralsStatus",
|
|
64
|
-
(
|
|
65
|
-
|
|
69
|
+
(strPeripherals) => {
|
|
70
|
+
try {
|
|
71
|
+
const peripherals = JSON.parse(strPeripherals);
|
|
72
|
+
setPeripheralsStatus(peripherals);
|
|
73
|
+
} catch (err) {
|
|
74
|
+
console.error(err);
|
|
75
|
+
}
|
|
66
76
|
}
|
|
67
77
|
);
|
|
68
78
|
}, []);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/materials",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.435",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -65,8 +65,8 @@
|
|
|
65
65
|
"crypto-js": "^4.2.0",
|
|
66
66
|
"@zxing/library": "0.21.2",
|
|
67
67
|
"@pisell/date-picker": "1.0.111",
|
|
68
|
-
"@pisell/
|
|
69
|
-
"@pisell/
|
|
68
|
+
"@pisell/utils": "1.0.42",
|
|
69
|
+
"@pisell/icon": "0.0.10"
|
|
70
70
|
},
|
|
71
71
|
"peerDependencies": {
|
|
72
72
|
"react": "^18.0.0",
|