@cniot/android-pda-components 0.2.21 → 0.2.25
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/assets/{index.b428d9a3.js → index.44dba996.js} +1 -1
- package/build/index.html +1 -1
- package/doc/index.jsx +0 -2
- package/es/index.cjs.js +7 -0
- package/es/index.es.js +2201 -0
- package/es/style.css +1 -0
- package/package.json +1 -1
- package/packages/AppList/doc.jsx +0 -138
- package/packages/AppList/index.jsx +0 -33
- package/packages/AppList/index.less +0 -52
- package/packages/BaseLayout/BarcodeScan.jsx +0 -88
- package/packages/BaseLayout/BaseLayoutContainer.jsx +0 -208
- package/packages/BaseLayout/RfidOnce.jsx +0 -106
- package/packages/BaseLayout/RfidScan.jsx +0 -118
- package/packages/BaseLayout/doc.jsx +0 -177
- package/packages/BaseLayout/index.jsx +0 -52
- package/packages/BaseLayout/index.less +0 -47
- package/packages/Button/doc.jsx +0 -62
- package/packages/Button/index.jsx +0 -27
- package/packages/Button/index.less +0 -62
- package/packages/Confirm/doc.jsx +0 -147
- package/packages/Confirm/index.jsx +0 -71
- package/packages/Confirm/index.less +0 -55
- package/packages/Header/doc.jsx +0 -171
- package/packages/Header/index.jsx +0 -191
- package/packages/Header/index.less +0 -71
- package/packages/InfoCard/doc.jsx +0 -244
- package/packages/InfoCard/index.jsx +0 -67
- package/packages/InfoCard/index.less +0 -111
- package/packages/List/doc.jsx +0 -89
- package/packages/List/index.jsx +0 -54
- package/packages/List/index.less +0 -43
- package/packages/Overlay/doc.jsx +0 -103
- package/packages/Overlay/index.jsx +0 -42
- package/packages/Overlay/index.less +0 -28
- package/packages/PdaActionSheet/doc.jsx +0 -193
- package/packages/PdaActionSheet/index.jsx +0 -44
- package/packages/PdaActionSheet/index.less +0 -65
- package/packages/PdaDistanceCard/doc.jsx +0 -62
- package/packages/PdaDistanceCard/index.jsx +0 -35
- package/packages/PdaDistanceCard/index.less +0 -42
- package/packages/PdaFinishCard/doc.jsx +0 -111
- package/packages/PdaFinishCard/index.jsx +0 -62
- package/packages/PdaFinishCard/index.less +0 -62
- package/packages/PdaInfiniteScroll/doc.jsx +0 -121
- package/packages/PdaInfiniteScroll/index.jsx +0 -114
- package/packages/PdaInfiniteScroll/index.less +0 -12
- package/packages/PdaInfiniteScroll/utils.jsx +0 -25
- package/packages/PdaSteps/PdaStep/index.jsx +0 -38
- package/packages/PdaSteps/PdaStep/index.less +0 -70
- package/packages/PdaSteps/PdaSteps/index.jsx +0 -33
- package/packages/PdaSteps/PdaSteps/index.less +0 -0
- package/packages/PdaSteps/doc.jsx +0 -131
- package/packages/PdaSteps/index.jsx +0 -5
- package/packages/PdaTitle/doc.jsx +0 -102
- package/packages/PdaTitle/index.jsx +0 -51
- package/packages/Presentation/doc.jsx +0 -72
- package/packages/Presentation/index.jsx +0 -25
- package/packages/Presentation/index.less +0 -31
- package/packages/SelectCard/doc.jsx +0 -57
- package/packages/SelectCard/index.jsx +0 -13
- package/packages/SelectCard/index.less +0 -30
- package/packages/SimpleCard/doc.jsx +0 -59
- package/packages/SimpleCard/index.jsx +0 -13
- package/packages/SimpleCard/index.less +0 -38
- package/packages/SimpleCardBlock/doc.jsx +0 -77
- package/packages/SimpleCardBlock/index.jsx +0 -43
- package/packages/SimpleCardBlock/index.less +0 -26
- package/packages/SubCard/doc.jsx +0 -63
- package/packages/SubCard/index.jsx +0 -28
- package/packages/SubCard/index.less +0 -64
- package/packages/Tag/doc.jsx +0 -47
- package/packages/Tag/index.jsx +0 -12
- package/packages/Tag/index.less +0 -22
- package/packages/TaskCard/doc.jsx +0 -151
- package/packages/TaskCard/index.jsx +0 -65
- package/packages/TaskCard/index.less +0 -101
- package/packages/Toast/doc.jsx +0 -112
- package/packages/Toast/index.jsx +0 -7
- package/packages/Toast/index.less +0 -23
- package/packages/Toast/methods.jsx +0 -77
- package/packages/Toast/toast.jsx +0 -96
- package/packages/WakeKeyborard/doc.jsx +0 -170
- package/packages/WakeKeyborard/index.jsx +0 -61
- package/packages/WakeKeyborard/index.less +0 -55
- package/packages/WakeKeyborard/keyborard.jsx +0 -61
- package/packages/doc.jsx +0 -19
- package/packages/global.less +0 -7
- package/packages/index.jsx +0 -60
- package/packages/index.less +0 -3
- package/packages/pageflow-system-pages/alert/doc.jsx +0 -70
- package/packages/pageflow-system-pages/alert/index.jsx +0 -22
- package/packages/pageflow-system-pages/confirm/doc.jsx +0 -118
- package/packages/pageflow-system-pages/confirm/index.jsx +0 -31
- package/packages/pageflow-system-pages/debug/index.jsx +0 -27
- package/packages/pageflow-system-pages/debug/index.less +0 -5
- package/packages/pageflow-system-pages/index.jsx +0 -38
- package/packages/pageflow-system-pages/loading/index.jsx +0 -37
- package/packages/pageflow-system-pages/not-found/index.jsx +0 -12
- package/packages/pageflow-system-pages/not-found/index.less +0 -26
- package/packages/pageflow-system-pages/prompt/doc.jsx +0 -95
- package/packages/pageflow-system-pages/prompt/index.jsx +0 -43
- package/packages/pageflow-system-pages/prompt/index.less +0 -44
- package/packages/pageflow-system-pages/start/index.jsx +0 -28
- package/packages/pageflow-system-pages/start/index.less +0 -12
- package/packages/pageflow-system-pages/toast/doc.jsx +0 -76
- package/packages/pageflow-system-pages/toast/index.jsx +0 -42
- package/packages/utils/index.js +0 -56
- package/packages/variable.less +0 -4
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import Button from "../../Button";
|
|
3
|
-
import Overlay from "../../overlay";
|
|
4
|
-
import './index.less';
|
|
5
|
-
|
|
6
|
-
export default function Prompt(props) {
|
|
7
|
-
const inputRef = React.useRef();
|
|
8
|
-
const {data = {}, onNext} = props;
|
|
9
|
-
const {placeholder, defaultValue, title="请输入", type="text", okText="确认", cancelText="取消"} = data;
|
|
10
|
-
|
|
11
|
-
return <Overlay verticalPosition="center" closable={false} >
|
|
12
|
-
<div className="prompt-dialog">
|
|
13
|
-
<div>
|
|
14
|
-
<h1 className="prompt-title">{title}</h1>
|
|
15
|
-
<input
|
|
16
|
-
className="prompt-input"
|
|
17
|
-
autoFocus={true}
|
|
18
|
-
ref={inputRef}
|
|
19
|
-
placeholder={placeholder}
|
|
20
|
-
type={type}
|
|
21
|
-
defaultValue={defaultValue}
|
|
22
|
-
onKeyUp={(e)=> {
|
|
23
|
-
if(e.keyCode === 13){
|
|
24
|
-
onNext(getInputValue(inputRef.current))
|
|
25
|
-
}
|
|
26
|
-
}}
|
|
27
|
-
/>
|
|
28
|
-
<div className="prompt-btns">
|
|
29
|
-
{
|
|
30
|
-
cancelText ? <Button onClick={()=> onNext('back')} >{cancelText}</Button> : null
|
|
31
|
-
}
|
|
32
|
-
<Button type="primary" onClick={()=>{ onNext(getInputValue(inputRef.current)) }} >{okText}</Button>
|
|
33
|
-
</div>
|
|
34
|
-
</div>
|
|
35
|
-
</div>
|
|
36
|
-
</Overlay>
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
function getInputValue(input){
|
|
41
|
-
const value = input.value || "";
|
|
42
|
-
return String(value).trim()
|
|
43
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
.prompt-dialog{
|
|
2
|
-
background:#ffffff;
|
|
3
|
-
border-radius:6px 6px 0 0;
|
|
4
|
-
// padding:24px 20px;
|
|
5
|
-
padding:10px;
|
|
6
|
-
width:80%;
|
|
7
|
-
|
|
8
|
-
.prompt-title{
|
|
9
|
-
font-size:30px;
|
|
10
|
-
margin:10px 0;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.prompt-input{
|
|
14
|
-
transition: all .1s linear;
|
|
15
|
-
border: 1px solid #dcdfe6;
|
|
16
|
-
background-color: #fff;
|
|
17
|
-
outline: 0;
|
|
18
|
-
padding: 0;
|
|
19
|
-
margin: 0;
|
|
20
|
-
font-weight: 400;
|
|
21
|
-
vertical-align: middle;
|
|
22
|
-
background-color: #0000;
|
|
23
|
-
color: #1f2633;
|
|
24
|
-
font-size: 24px;
|
|
25
|
-
box-sizing: border-box;
|
|
26
|
-
width: 100%;
|
|
27
|
-
padding: 0.5em;
|
|
28
|
-
border-radius: 4px;
|
|
29
|
-
&:hover,&:active,&:focus{
|
|
30
|
-
border-color: #03c1fd;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.prompt-btns{
|
|
35
|
-
display:flex;
|
|
36
|
-
margin-top:10px;
|
|
37
|
-
.pda-button{
|
|
38
|
-
margin-left:10px;
|
|
39
|
-
}
|
|
40
|
-
.pda-button:first-child{
|
|
41
|
-
margin-left:0px;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import Button from "../../Button";
|
|
3
|
-
|
|
4
|
-
export default function Start(props) {
|
|
5
|
-
const { action, appManager, service } = props;
|
|
6
|
-
const onReStart = React.useCallback(function () {
|
|
7
|
-
service.onStart(appManager.config.appId);
|
|
8
|
-
});
|
|
9
|
-
return (
|
|
10
|
-
<div
|
|
11
|
-
style={{
|
|
12
|
-
display: "flex",
|
|
13
|
-
flexDirection: "column",
|
|
14
|
-
justifyContent: "center",
|
|
15
|
-
alignItems: "center",
|
|
16
|
-
width: "100vw",
|
|
17
|
-
height: "100vh",
|
|
18
|
-
}}
|
|
19
|
-
>
|
|
20
|
-
<Button type="primary" onClick={onReStart}>
|
|
21
|
-
开始作业
|
|
22
|
-
</Button>
|
|
23
|
-
<br />
|
|
24
|
-
<div>{appManager.config.appId}</div>
|
|
25
|
-
<div>{appManager.config.groupId}</div>
|
|
26
|
-
</div>
|
|
27
|
-
);
|
|
28
|
-
}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import SystemToast from "./index";
|
|
3
|
-
import service from '../../../mock/service';
|
|
4
|
-
|
|
5
|
-
export default function () {
|
|
6
|
-
return (
|
|
7
|
-
<div>
|
|
8
|
-
<h1>/system/toast</h1>
|
|
9
|
-
<p>弹框组件,如果要悬浮在页面上,请配合 Overlay 使用</p>
|
|
10
|
-
<h2>示例</h2>
|
|
11
|
-
<code className="code">
|
|
12
|
-
{
|
|
13
|
-
`
|
|
14
|
-
// gs 代码如下
|
|
15
|
-
pageFlow.toast({
|
|
16
|
-
level: "success", // success|warning|error
|
|
17
|
-
title: '111',
|
|
18
|
-
message: '2222',
|
|
19
|
-
duration: 3000,
|
|
20
|
-
})
|
|
21
|
-
`
|
|
22
|
-
}
|
|
23
|
-
</code>
|
|
24
|
-
<h2>页面效果</h2>
|
|
25
|
-
<div className="light-block light-block-overlay">
|
|
26
|
-
<SystemToast
|
|
27
|
-
service={service}
|
|
28
|
-
data={{
|
|
29
|
-
level: "success", // success|warning|error
|
|
30
|
-
title: '111',
|
|
31
|
-
message: '2222',
|
|
32
|
-
duration: 3000,
|
|
33
|
-
}}
|
|
34
|
-
onNext={console.log}
|
|
35
|
-
></SystemToast>
|
|
36
|
-
</div>
|
|
37
|
-
<h2>Toast</h2>
|
|
38
|
-
<table className="pure-table pure-table-bordered">
|
|
39
|
-
<thead>
|
|
40
|
-
<tr>
|
|
41
|
-
<th>属性</th>
|
|
42
|
-
<th>说明</th>
|
|
43
|
-
<th>类型</th>
|
|
44
|
-
<th>默认值</th>
|
|
45
|
-
</tr>
|
|
46
|
-
</thead>
|
|
47
|
-
<tbody>
|
|
48
|
-
<tr>
|
|
49
|
-
<td>level</td>
|
|
50
|
-
<td>弹框类型</td>
|
|
51
|
-
<td>string</td>
|
|
52
|
-
<td>success|warning|error</td>
|
|
53
|
-
</tr>
|
|
54
|
-
<tr>
|
|
55
|
-
<td>message</td>
|
|
56
|
-
<td>信息</td>
|
|
57
|
-
<td>string</td>
|
|
58
|
-
<td></td>
|
|
59
|
-
</tr>
|
|
60
|
-
<tr>
|
|
61
|
-
<td>title</td>
|
|
62
|
-
<td>标题</td>
|
|
63
|
-
<td>string</td>
|
|
64
|
-
<td></td>
|
|
65
|
-
</tr>
|
|
66
|
-
<tr>
|
|
67
|
-
<td>duration</td>
|
|
68
|
-
<td>延迟时间</td>
|
|
69
|
-
<td>number</td>
|
|
70
|
-
<td>ms</td>
|
|
71
|
-
</tr>
|
|
72
|
-
</tbody>
|
|
73
|
-
</table>
|
|
74
|
-
</div>
|
|
75
|
-
);
|
|
76
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import React, {useState} from "react";
|
|
2
|
-
import Toast from '../../Toast';
|
|
3
|
-
import Overlay from '../../Overlay';
|
|
4
|
-
// import "./index.less";
|
|
5
|
-
|
|
6
|
-
// Error occurs while executing src/start.gs(8879527103889997824#19) cause by Error: æ£è´§æ°éä¸è½å¤§äºè®¡åæ°é
|
|
7
|
-
export default function toast(props) {
|
|
8
|
-
const { data = {}, onNext, service } = props;
|
|
9
|
-
const { title, level, message, duration = null } = data;
|
|
10
|
-
const [hidden, setHidden] = useState(false)
|
|
11
|
-
React.useEffect(() => {
|
|
12
|
-
// 如果是 500 导致的的toast hasNext = fasle
|
|
13
|
-
// 如果是 pageflow.toast hasNext = undefined
|
|
14
|
-
if(data.hasNext === undefined) {
|
|
15
|
-
onNext("")
|
|
16
|
-
}
|
|
17
|
-
let timeout = null;
|
|
18
|
-
if(duration) {
|
|
19
|
-
timeout = setTimeout(() => {
|
|
20
|
-
setHidden(true);
|
|
21
|
-
// service.onNext("");
|
|
22
|
-
}, duration);
|
|
23
|
-
}
|
|
24
|
-
return () => {
|
|
25
|
-
clearTimeout(timeout);
|
|
26
|
-
}
|
|
27
|
-
}, [data])
|
|
28
|
-
|
|
29
|
-
return !hidden ? (
|
|
30
|
-
<Overlay verticalPosition="bottom" >
|
|
31
|
-
<div style={{width: '90%'}} >
|
|
32
|
-
<Toast type={level} title={title} message={splitMessage(message)} ></Toast>
|
|
33
|
-
</div>
|
|
34
|
-
</Overlay>
|
|
35
|
-
) : null;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
function splitMessage(message) {
|
|
40
|
-
var msg = String(message).split("by Error:");
|
|
41
|
-
return msg[1] || msg[0];
|
|
42
|
-
}
|
package/packages/utils/index.js
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
export function WindVaneLog(param) {
|
|
2
|
-
const params = {
|
|
3
|
-
domain: "logger",
|
|
4
|
-
method: "deviceLog",
|
|
5
|
-
params: param,
|
|
6
|
-
};
|
|
7
|
-
WindVane.call(
|
|
8
|
-
"WindvanePlugin",
|
|
9
|
-
"invoke",
|
|
10
|
-
JSON.stringify(params),
|
|
11
|
-
function (e) {
|
|
12
|
-
// alert('success ' + JSON.stringify(e));
|
|
13
|
-
},
|
|
14
|
-
function (e) {
|
|
15
|
-
// alert('failure ' + JSON.stringify(e));
|
|
16
|
-
}
|
|
17
|
-
);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export function resolveContainer(getContainer) {
|
|
21
|
-
const container =
|
|
22
|
-
typeof getContainer === "function" ? getContainer() : getContainer;
|
|
23
|
-
return container || document.body;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
function isUndefined(v) {
|
|
27
|
-
return v === undefined;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export function mergeProps(...items) {
|
|
31
|
-
function customizer(objValue, srcValue) {
|
|
32
|
-
return isUndefined(srcValue) ? objValue : srcValue;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
let ret = Object.assign({}, items[0]);
|
|
36
|
-
for (let i = 1; i < items.length; i++) {
|
|
37
|
-
// ret = assignWith(ret, items[i], customizer);
|
|
38
|
-
ret = Object.assign(ret, items[i], customizer);
|
|
39
|
-
}
|
|
40
|
-
return ret;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export function playSound(sound) {
|
|
44
|
-
if(window.WindVane) {
|
|
45
|
-
var params = {
|
|
46
|
-
domain: 'audio',
|
|
47
|
-
method: 'playSound',
|
|
48
|
-
params: { sound: sound }
|
|
49
|
-
}
|
|
50
|
-
WindVane.call(
|
|
51
|
-
'WindvanePlugin',
|
|
52
|
-
'invoke',
|
|
53
|
-
JSON.stringify(params),
|
|
54
|
-
);
|
|
55
|
-
}
|
|
56
|
-
}
|
package/packages/variable.less
DELETED