@cniot/android-pda-components 0.1.7 → 0.1.11
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/.editorconfig +12 -0
- package/build/assets/{index.87a9df58.js → index.c282e766.js} +60 -26
- package/build/assets/index.d61b257a.css +1 -0
- package/build/assets/vendor.999402d8.js +40 -0
- package/build/index.html +3 -3
- package/es/index.cjs.js +4 -2
- package/es/index.es.js +304 -75
- package/es/style.css +1 -1
- package/package.json +1 -1
- package/build/assets/index.3bfc9bfe.css +0 -1
- package/build/assets/index.bf651e56.js +0 -455
- package/build/assets/vendor.116036fc.js +0 -40
package/es/index.es.js
CHANGED
|
@@ -36,7 +36,7 @@ var __publicField = (obj, key, value) => {
|
|
|
36
36
|
import React, { useState, useEffect, useRef, cloneElement, useCallback } from "react";
|
|
37
37
|
import ReactDOM from "react-dom";
|
|
38
38
|
var global = "";
|
|
39
|
-
var
|
|
39
|
+
var classnames = { exports: {} };
|
|
40
40
|
/*!
|
|
41
41
|
Copyright (c) 2018 Jed Watson.
|
|
42
42
|
Licensed under the MIT License (MIT), see
|
|
@@ -82,9 +82,9 @@ var _classnames_2_3_1_classnames = { exports: {} };
|
|
|
82
82
|
window.classNames = classNames2;
|
|
83
83
|
}
|
|
84
84
|
})();
|
|
85
|
-
})(
|
|
86
|
-
var classNames =
|
|
87
|
-
var index$
|
|
85
|
+
})(classnames);
|
|
86
|
+
var classNames = classnames.exports;
|
|
87
|
+
var index$o = "";
|
|
88
88
|
function getTypeClass$1(type) {
|
|
89
89
|
return {
|
|
90
90
|
"center": "op-overlay center",
|
|
@@ -110,8 +110,8 @@ function Overlay(props) {
|
|
|
110
110
|
className: getTypeClass$1(verticalPosition)
|
|
111
111
|
}, option), props.children) : null;
|
|
112
112
|
}
|
|
113
|
-
var index$
|
|
114
|
-
const blankFunc$
|
|
113
|
+
var index$n = "";
|
|
114
|
+
const blankFunc$6 = () => {
|
|
115
115
|
};
|
|
116
116
|
class PdaTitle extends React.Component {
|
|
117
117
|
constructor(props) {
|
|
@@ -121,13 +121,13 @@ class PdaTitle extends React.Component {
|
|
|
121
121
|
});
|
|
122
122
|
}
|
|
123
123
|
render() {
|
|
124
|
-
const { className, goBack = true, goBackHandle = blankFunc$
|
|
124
|
+
const { className, goBack = true, goBackHandle = blankFunc$6, icon = "scan", title = "\u4EFB\u52A1", menuList = null } = this.props;
|
|
125
125
|
const { showMenu } = this.state;
|
|
126
126
|
return /* @__PURE__ */ React.createElement("div", {
|
|
127
127
|
className: classNames({ [className]: true, "pda-header": true })
|
|
128
128
|
}, /* @__PURE__ */ React.createElement("div", {
|
|
129
129
|
className: "header-click-area",
|
|
130
|
-
onClick: goBack ? goBackHandle : blankFunc$
|
|
130
|
+
onClick: goBack ? goBackHandle : blankFunc$6
|
|
131
131
|
}, goBack && /* @__PURE__ */ React.createElement("div", {
|
|
132
132
|
className: "pda-goback"
|
|
133
133
|
}), icon && /* @__PURE__ */ React.createElement("div", {
|
|
@@ -149,7 +149,136 @@ class PdaTitle extends React.Component {
|
|
|
149
149
|
}, menuList)));
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
|
-
var
|
|
152
|
+
var keycode$1 = { exports: {} };
|
|
153
|
+
(function(module, exports) {
|
|
154
|
+
function keyCode(searchInput) {
|
|
155
|
+
if (searchInput && typeof searchInput === "object") {
|
|
156
|
+
var hasKeyCode = searchInput.which || searchInput.keyCode || searchInput.charCode;
|
|
157
|
+
if (hasKeyCode)
|
|
158
|
+
searchInput = hasKeyCode;
|
|
159
|
+
}
|
|
160
|
+
if (typeof searchInput === "number")
|
|
161
|
+
return names[searchInput];
|
|
162
|
+
var search = String(searchInput);
|
|
163
|
+
var foundNamedKey = codes[search.toLowerCase()];
|
|
164
|
+
if (foundNamedKey)
|
|
165
|
+
return foundNamedKey;
|
|
166
|
+
var foundNamedKey = aliases[search.toLowerCase()];
|
|
167
|
+
if (foundNamedKey)
|
|
168
|
+
return foundNamedKey;
|
|
169
|
+
if (search.length === 1)
|
|
170
|
+
return search.charCodeAt(0);
|
|
171
|
+
return void 0;
|
|
172
|
+
}
|
|
173
|
+
keyCode.isEventKey = function isEventKey(event, nameOrCode) {
|
|
174
|
+
if (event && typeof event === "object") {
|
|
175
|
+
var keyCode2 = event.which || event.keyCode || event.charCode;
|
|
176
|
+
if (keyCode2 === null || keyCode2 === void 0) {
|
|
177
|
+
return false;
|
|
178
|
+
}
|
|
179
|
+
if (typeof nameOrCode === "string") {
|
|
180
|
+
var foundNamedKey = codes[nameOrCode.toLowerCase()];
|
|
181
|
+
if (foundNamedKey) {
|
|
182
|
+
return foundNamedKey === keyCode2;
|
|
183
|
+
}
|
|
184
|
+
var foundNamedKey = aliases[nameOrCode.toLowerCase()];
|
|
185
|
+
if (foundNamedKey) {
|
|
186
|
+
return foundNamedKey === keyCode2;
|
|
187
|
+
}
|
|
188
|
+
} else if (typeof nameOrCode === "number") {
|
|
189
|
+
return nameOrCode === keyCode2;
|
|
190
|
+
}
|
|
191
|
+
return false;
|
|
192
|
+
}
|
|
193
|
+
};
|
|
194
|
+
exports = module.exports = keyCode;
|
|
195
|
+
var codes = exports.code = exports.codes = {
|
|
196
|
+
"backspace": 8,
|
|
197
|
+
"tab": 9,
|
|
198
|
+
"enter": 13,
|
|
199
|
+
"shift": 16,
|
|
200
|
+
"ctrl": 17,
|
|
201
|
+
"alt": 18,
|
|
202
|
+
"pause/break": 19,
|
|
203
|
+
"caps lock": 20,
|
|
204
|
+
"esc": 27,
|
|
205
|
+
"space": 32,
|
|
206
|
+
"page up": 33,
|
|
207
|
+
"page down": 34,
|
|
208
|
+
"end": 35,
|
|
209
|
+
"home": 36,
|
|
210
|
+
"left": 37,
|
|
211
|
+
"up": 38,
|
|
212
|
+
"right": 39,
|
|
213
|
+
"down": 40,
|
|
214
|
+
"insert": 45,
|
|
215
|
+
"delete": 46,
|
|
216
|
+
"command": 91,
|
|
217
|
+
"left command": 91,
|
|
218
|
+
"right command": 93,
|
|
219
|
+
"numpad *": 106,
|
|
220
|
+
"numpad +": 107,
|
|
221
|
+
"numpad -": 109,
|
|
222
|
+
"numpad .": 110,
|
|
223
|
+
"numpad /": 111,
|
|
224
|
+
"num lock": 144,
|
|
225
|
+
"scroll lock": 145,
|
|
226
|
+
"my computer": 182,
|
|
227
|
+
"my calculator": 183,
|
|
228
|
+
";": 186,
|
|
229
|
+
"=": 187,
|
|
230
|
+
",": 188,
|
|
231
|
+
"-": 189,
|
|
232
|
+
".": 190,
|
|
233
|
+
"/": 191,
|
|
234
|
+
"`": 192,
|
|
235
|
+
"[": 219,
|
|
236
|
+
"\\": 220,
|
|
237
|
+
"]": 221,
|
|
238
|
+
"'": 222
|
|
239
|
+
};
|
|
240
|
+
var aliases = exports.aliases = {
|
|
241
|
+
"windows": 91,
|
|
242
|
+
"\u21E7": 16,
|
|
243
|
+
"\u2325": 18,
|
|
244
|
+
"\u2303": 17,
|
|
245
|
+
"\u2318": 91,
|
|
246
|
+
"ctl": 17,
|
|
247
|
+
"control": 17,
|
|
248
|
+
"option": 18,
|
|
249
|
+
"pause": 19,
|
|
250
|
+
"break": 19,
|
|
251
|
+
"caps": 20,
|
|
252
|
+
"return": 13,
|
|
253
|
+
"escape": 27,
|
|
254
|
+
"spc": 32,
|
|
255
|
+
"spacebar": 32,
|
|
256
|
+
"pgup": 33,
|
|
257
|
+
"pgdn": 34,
|
|
258
|
+
"ins": 45,
|
|
259
|
+
"del": 46,
|
|
260
|
+
"cmd": 91
|
|
261
|
+
};
|
|
262
|
+
/*!
|
|
263
|
+
* Programatically add the following
|
|
264
|
+
*/
|
|
265
|
+
for (i = 97; i < 123; i++)
|
|
266
|
+
codes[String.fromCharCode(i)] = i - 32;
|
|
267
|
+
for (var i = 48; i < 58; i++)
|
|
268
|
+
codes[i - 48] = i;
|
|
269
|
+
for (i = 1; i < 13; i++)
|
|
270
|
+
codes["f" + i] = i + 111;
|
|
271
|
+
for (i = 0; i < 10; i++)
|
|
272
|
+
codes["numpad " + i] = i + 96;
|
|
273
|
+
var names = exports.names = exports.title = {};
|
|
274
|
+
for (i in codes)
|
|
275
|
+
names[codes[i]] = i;
|
|
276
|
+
for (var alias in aliases) {
|
|
277
|
+
codes[alias] = aliases[alias];
|
|
278
|
+
}
|
|
279
|
+
})(keycode$1, keycode$1.exports);
|
|
280
|
+
var keycode = keycode$1.exports;
|
|
281
|
+
var index$m = "";
|
|
153
282
|
function Button(props) {
|
|
154
283
|
const { type = "default", onClick, className = "" } = props;
|
|
155
284
|
return /* @__PURE__ */ React.createElement("button", {
|
|
@@ -163,12 +292,35 @@ function ButtonGroup(props) {
|
|
|
163
292
|
}, props.children);
|
|
164
293
|
}
|
|
165
294
|
Button.Group = ButtonGroup;
|
|
166
|
-
var index$
|
|
167
|
-
const empty$
|
|
295
|
+
var index$l = "";
|
|
296
|
+
const empty$3 = () => {
|
|
168
297
|
};
|
|
169
|
-
function index$
|
|
170
|
-
const {
|
|
298
|
+
function index$k(props) {
|
|
299
|
+
const {
|
|
300
|
+
onBack,
|
|
301
|
+
icon,
|
|
302
|
+
title,
|
|
303
|
+
menus = [],
|
|
304
|
+
onClickMenuItem = empty$3,
|
|
305
|
+
cancelMenuText,
|
|
306
|
+
menuShortcutKey,
|
|
307
|
+
backShortcutKey
|
|
308
|
+
} = props;
|
|
171
309
|
const [showMenus, setShowMenus] = React.useState(false);
|
|
310
|
+
React.useEffect(function() {
|
|
311
|
+
if (menuShortcutKey) {
|
|
312
|
+
return bindShortcutKey(getShortcutKeyCodes(menuShortcutKey), function() {
|
|
313
|
+
setShowMenus(true);
|
|
314
|
+
});
|
|
315
|
+
}
|
|
316
|
+
}, [menuShortcutKey]);
|
|
317
|
+
React.useEffect(function() {
|
|
318
|
+
if (backShortcutKey && onBack) {
|
|
319
|
+
return bindShortcutKey(getShortcutKeyCodes(backShortcutKey), function() {
|
|
320
|
+
onBack("back");
|
|
321
|
+
});
|
|
322
|
+
}
|
|
323
|
+
}, [backShortcutKey, onBack]);
|
|
172
324
|
return /* @__PURE__ */ React.createElement("div", {
|
|
173
325
|
className: "pda-header"
|
|
174
326
|
}, /* @__PURE__ */ React.createElement("div", {
|
|
@@ -204,7 +356,28 @@ function index$i(props) {
|
|
|
204
356
|
onClick: () => setShowMenus(false)
|
|
205
357
|
}, cancelMenuText)) : null)));
|
|
206
358
|
}
|
|
207
|
-
|
|
359
|
+
function getShortcutKeyCodes(shortcutKey) {
|
|
360
|
+
const shortcutKeys = shortcutKey.indexOf(",") > -1 ? shortcutKey.split(",") : [shortcutKey];
|
|
361
|
+
return shortcutKeys.map((k) => {
|
|
362
|
+
const kc = keycode(k);
|
|
363
|
+
if (kc === void 0) {
|
|
364
|
+
console.warn("OPButton.shortcutKey error key value by:", k);
|
|
365
|
+
}
|
|
366
|
+
return kc;
|
|
367
|
+
}).filter((k) => !!k);
|
|
368
|
+
}
|
|
369
|
+
function bindShortcutKey(keys, callback) {
|
|
370
|
+
function keyUpCallback(event) {
|
|
371
|
+
if (keys.indexOf(event.keyCode) > -1) {
|
|
372
|
+
callback && callback(event);
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
document.addEventListener("keyup", keyUpCallback);
|
|
376
|
+
return function() {
|
|
377
|
+
document.removeEventListener("keyup", keyUpCallback);
|
|
378
|
+
};
|
|
379
|
+
}
|
|
380
|
+
var index$j = "";
|
|
208
381
|
class PdaInfoCard$2 extends React.Component {
|
|
209
382
|
constructor(props) {
|
|
210
383
|
super(props);
|
|
@@ -262,7 +435,7 @@ class PdaInfoCard$2 extends React.Component {
|
|
|
262
435
|
}
|
|
263
436
|
}
|
|
264
437
|
PdaInfoCard$2.IMAGE_1 = "https://img.alicdn.com/imgextra/i2/O1CN01qYuxip1ME9zhdL9XG_!!6000000001402-2-tps-150-150.png";
|
|
265
|
-
var index$
|
|
438
|
+
var index$i = "";
|
|
266
439
|
class PdaListItem extends React.Component {
|
|
267
440
|
constructor(props) {
|
|
268
441
|
super(props);
|
|
@@ -276,11 +449,11 @@ class PdaListItem extends React.Component {
|
|
|
276
449
|
className: classNames({ [className]: true, "pda-list-item": true }),
|
|
277
450
|
style,
|
|
278
451
|
onClick
|
|
279
|
-
}, /* @__PURE__ */ React.createElement("div", {
|
|
452
|
+
}, !!header ? /* @__PURE__ */ React.createElement("div", {
|
|
280
453
|
className: "pda-listitem-header"
|
|
281
|
-
}, header), /* @__PURE__ */ React.createElement("div", {
|
|
454
|
+
}, header) : null, /* @__PURE__ */ React.createElement("div", {
|
|
282
455
|
onClick: onHeightLightClick,
|
|
283
|
-
className: "pda-listitem-highlight"
|
|
456
|
+
className: classNames({ "pda-listitem-highlight": true })
|
|
284
457
|
}, /* @__PURE__ */ React.createElement("div", null, highlightText), /* @__PURE__ */ React.createElement("div", null, highlightSubText)), /* @__PURE__ */ React.createElement("div", {
|
|
285
458
|
className: "pda-listitem-state-text"
|
|
286
459
|
}, stateTextList.map((item, index2) => {
|
|
@@ -295,24 +468,24 @@ class PdaListItem extends React.Component {
|
|
|
295
468
|
key: index2,
|
|
296
469
|
className: type
|
|
297
470
|
}, item.label || "");
|
|
298
|
-
})),
|
|
299
|
-
return /* @__PURE__ */ React.createElement("div", {
|
|
300
|
-
key: index2,
|
|
301
|
-
className: "pda-listitem-subinfo"
|
|
302
|
-
}, /* @__PURE__ */ React.createElement("span", null, item.label || ""), "\xA0\xA0", /* @__PURE__ */ React.createElement("span", null, item.content || ""));
|
|
303
|
-
}), icon ? /* @__PURE__ */ React.createElement("div", {
|
|
471
|
+
})), icon ? /* @__PURE__ */ React.createElement("div", {
|
|
304
472
|
onClick: onIconClick,
|
|
305
473
|
className: "pda-listitem-icon"
|
|
306
474
|
}, /* @__PURE__ */ React.createElement("div", {
|
|
307
475
|
className: classNames({ "listitem-icon-container": true, ["listitem-icon-" + icon]: true })
|
|
308
|
-
})) : null)
|
|
476
|
+
})) : null, subInfoList.map((item, index2) => {
|
|
477
|
+
return /* @__PURE__ */ React.createElement("div", {
|
|
478
|
+
key: index2,
|
|
479
|
+
className: "pda-listitem-subinfo"
|
|
480
|
+
}, /* @__PURE__ */ React.createElement("span", null, item.label || ""), "\xA0\xA0", /* @__PURE__ */ React.createElement("span", null, item.content || ""));
|
|
481
|
+
}));
|
|
309
482
|
}
|
|
310
483
|
}
|
|
311
|
-
var index$
|
|
312
|
-
function empty$
|
|
484
|
+
var index$h = "";
|
|
485
|
+
function empty$2() {
|
|
313
486
|
}
|
|
314
487
|
function Confirm(props) {
|
|
315
|
-
const { title = "title", message = null, subMessage = [], okText = "okText", cancelText = null, onClick = empty$
|
|
488
|
+
const { title = "title", message = null, subMessage = [], okText = "okText", cancelText = null, onClick = empty$2, type = "primary" } = props;
|
|
316
489
|
return /* @__PURE__ */ React.createElement("div", {
|
|
317
490
|
className: classNames({ "confirm-wrap": true, ["confirm-" + type]: true })
|
|
318
491
|
}, /* @__PURE__ */ React.createElement("div", {
|
|
@@ -336,7 +509,7 @@ function Confirm(props) {
|
|
|
336
509
|
onClick: () => onClick(true)
|
|
337
510
|
}, okText)));
|
|
338
511
|
}
|
|
339
|
-
var index$
|
|
512
|
+
var index$g = "";
|
|
340
513
|
function resolveContainer(getContainer) {
|
|
341
514
|
const container = typeof getContainer === "function" ? getContainer() : getContainer;
|
|
342
515
|
return container || document.body;
|
|
@@ -382,14 +555,15 @@ const defaultProps$1 = {
|
|
|
382
555
|
stopPropagation: ["click"]
|
|
383
556
|
};
|
|
384
557
|
const InternalToast = (p) => {
|
|
385
|
-
mergeProps(defaultProps$1, p);
|
|
558
|
+
const props = mergeProps(defaultProps$1, p);
|
|
559
|
+
const { maskClickable, content, icon, position, title, message, type } = props;
|
|
386
560
|
return /* @__PURE__ */ React.createElement(Overlay, {
|
|
387
561
|
verticalPosition: "bottom",
|
|
388
562
|
closable: true
|
|
389
563
|
}, /* @__PURE__ */ React.createElement(Toast, {
|
|
390
|
-
title
|
|
391
|
-
message
|
|
392
|
-
type
|
|
564
|
+
title,
|
|
565
|
+
message,
|
|
566
|
+
type
|
|
393
567
|
}));
|
|
394
568
|
};
|
|
395
569
|
const containers = [];
|
|
@@ -511,11 +685,11 @@ function toast(props) {
|
|
|
511
685
|
const { title, level, message, duration = null } = data;
|
|
512
686
|
const [hidden, setHidden] = useState(false);
|
|
513
687
|
React.useEffect(() => {
|
|
688
|
+
service.onNext("");
|
|
514
689
|
let timeout = null;
|
|
515
690
|
if (duration) {
|
|
516
691
|
setTimeout(() => {
|
|
517
692
|
setHidden(true);
|
|
518
|
-
service.onNext("");
|
|
519
693
|
}, duration);
|
|
520
694
|
}
|
|
521
695
|
return () => {
|
|
@@ -536,7 +710,7 @@ function splitMessage(message) {
|
|
|
536
710
|
var msg = String(message).split("by Error:");
|
|
537
711
|
return msg[1] || msg[0];
|
|
538
712
|
}
|
|
539
|
-
var index$
|
|
713
|
+
var index$f = "";
|
|
540
714
|
function NotFound(props) {
|
|
541
715
|
return /* @__PURE__ */ React.createElement("div", {
|
|
542
716
|
style: { padding: "20%" }
|
|
@@ -719,7 +893,7 @@ function createHashHistory(b) {
|
|
|
719
893
|
}
|
|
720
894
|
};
|
|
721
895
|
}
|
|
722
|
-
var index$
|
|
896
|
+
var index$e = "";
|
|
723
897
|
function Debug(props) {
|
|
724
898
|
const { appManager } = props;
|
|
725
899
|
const pages = Array.from(appManager.pageManager.keys()).reverse();
|
|
@@ -769,7 +943,7 @@ function Loading$1(props) {
|
|
|
769
943
|
style: { position: "absolute", left: 0, top: 0, zIndex: 100 }
|
|
770
944
|
}, "LOADING...") : null;
|
|
771
945
|
}
|
|
772
|
-
var index$
|
|
946
|
+
var index$d = {
|
|
773
947
|
Alert,
|
|
774
948
|
Start,
|
|
775
949
|
Toast: toast,
|
|
@@ -779,7 +953,7 @@ var index$b = {
|
|
|
779
953
|
Prompt,
|
|
780
954
|
Loading: Loading$1
|
|
781
955
|
};
|
|
782
|
-
var index$
|
|
956
|
+
var index$c = "";
|
|
783
957
|
function Presentation(props) {
|
|
784
958
|
const {
|
|
785
959
|
image = Presentation.IMAGE_1,
|
|
@@ -801,11 +975,11 @@ Presentation.IMAGE_1 = "https://img.alicdn.com/imgextra/i3/O1CN019Ivkor1ksy3pMGD
|
|
|
801
975
|
Presentation.IMAGE_2 = "https://img.alicdn.com/imgextra/i1/O1CN01lhSunu1X4VPw1Mlas_!!6000000002870-2-tps-352-158.png";
|
|
802
976
|
Presentation.IMAGE_3 = "https://img.alicdn.com/imgextra/i1/O1CN01mreYXo1XfbUsQ7hip_!!6000000002951-2-tps-322-144.png";
|
|
803
977
|
Presentation.IMAGE_4 = "https://img.alicdn.com/imgextra/i3/O1CN017gNM8F1Fmmcfti7Dg_!!6000000000530-1-tps-414-286.gif";
|
|
804
|
-
var index$
|
|
805
|
-
function empty() {
|
|
978
|
+
var index$b = "";
|
|
979
|
+
function empty$1() {
|
|
806
980
|
}
|
|
807
981
|
function List(props) {
|
|
808
|
-
const { dataSource = [], onClickItem, onItemClick = empty } = props;
|
|
982
|
+
const { dataSource = [], onClickItem, onItemClick = empty$1 } = props;
|
|
809
983
|
return /* @__PURE__ */ React.createElement("div", {
|
|
810
984
|
className: "android-pda-list"
|
|
811
985
|
}, dataSource.map((item, index2) => {
|
|
@@ -847,15 +1021,15 @@ function DefaultItem(props) {
|
|
|
847
1021
|
}, extra));
|
|
848
1022
|
}
|
|
849
1023
|
List.Item = DefaultItem;
|
|
850
|
-
var index$
|
|
851
|
-
const blankFunc$
|
|
1024
|
+
var index$a = "";
|
|
1025
|
+
const blankFunc$5 = () => {
|
|
852
1026
|
};
|
|
853
1027
|
class BaseLayoutContainer extends React.Component {
|
|
854
1028
|
constructor(props) {
|
|
855
1029
|
super(props);
|
|
856
1030
|
this.state = {};
|
|
857
1031
|
this._handleKeyUp = (e) => {
|
|
858
|
-
const { onScan = blankFunc$
|
|
1032
|
+
const { onScan = blankFunc$5, onEnter = blankFunc$5, onEsc = blankFunc$5, onDelete = blankFunc$5, scanMode = null } = this.props;
|
|
859
1033
|
e.preventDefault();
|
|
860
1034
|
const { code, keyCode, key } = e;
|
|
861
1035
|
if (code === "Enter") {
|
|
@@ -912,7 +1086,7 @@ class BaseLayoutContainer extends React.Component {
|
|
|
912
1086
|
}, footer));
|
|
913
1087
|
}
|
|
914
1088
|
}
|
|
915
|
-
const blankFunc$
|
|
1089
|
+
const blankFunc$4 = () => {
|
|
916
1090
|
};
|
|
917
1091
|
class RfidOnce$1 extends React.Component {
|
|
918
1092
|
constructor(props) {
|
|
@@ -982,11 +1156,11 @@ class RfidOnce$1 extends React.Component {
|
|
|
982
1156
|
}
|
|
983
1157
|
render() {
|
|
984
1158
|
const props = this.props;
|
|
985
|
-
const _a = props, { onRfidOnce = blankFunc$
|
|
1159
|
+
const _a = props, { onRfidOnce = blankFunc$4 } = _a, opts = __objRest(_a, ["onRfidOnce"]);
|
|
986
1160
|
return /* @__PURE__ */ React.createElement(BaseLayoutContainer, __spreadValues({}, opts));
|
|
987
1161
|
}
|
|
988
1162
|
}
|
|
989
|
-
const blankFunc$
|
|
1163
|
+
const blankFunc$3 = () => {
|
|
990
1164
|
};
|
|
991
1165
|
class RfidOnce extends React.Component {
|
|
992
1166
|
constructor(props) {
|
|
@@ -1071,14 +1245,14 @@ class RfidOnce extends React.Component {
|
|
|
1071
1245
|
}
|
|
1072
1246
|
render() {
|
|
1073
1247
|
const props = this.props;
|
|
1074
|
-
const _a = props, { onRfidScan = blankFunc$
|
|
1248
|
+
const _a = props, { onRfidScan = blankFunc$3, autoRfidScan } = _a, opts = __objRest(_a, ["onRfidScan", "autoRfidScan"]);
|
|
1075
1249
|
return /* @__PURE__ */ React.createElement(BaseLayoutContainer, __spreadValues({}, opts));
|
|
1076
1250
|
}
|
|
1077
1251
|
}
|
|
1078
1252
|
__publicField(RfidOnce, "defaultProps", {
|
|
1079
1253
|
rfidReaderSleep: false
|
|
1080
1254
|
});
|
|
1081
|
-
const blankFunc$
|
|
1255
|
+
const blankFunc$2 = () => {
|
|
1082
1256
|
};
|
|
1083
1257
|
class BarcodeScan extends React.Component {
|
|
1084
1258
|
constructor(props) {
|
|
@@ -1125,7 +1299,7 @@ class BarcodeScan extends React.Component {
|
|
|
1125
1299
|
}
|
|
1126
1300
|
render() {
|
|
1127
1301
|
const props = this.props;
|
|
1128
|
-
const _a = props, { onBarcodeScan = blankFunc$
|
|
1302
|
+
const _a = props, { onBarcodeScan = blankFunc$2 } = _a, opts = __objRest(_a, ["onBarcodeScan"]);
|
|
1129
1303
|
return /* @__PURE__ */ React.createElement(BaseLayoutContainer, __spreadValues({}, opts));
|
|
1130
1304
|
}
|
|
1131
1305
|
}
|
|
@@ -1148,56 +1322,83 @@ class BaseLayout extends React.Component {
|
|
|
1148
1322
|
return /* @__PURE__ */ React.createElement(BaseLayoutContainer, __spreadValues({}, props));
|
|
1149
1323
|
}
|
|
1150
1324
|
}
|
|
1151
|
-
var index$
|
|
1152
|
-
const blankFunc = () => {
|
|
1325
|
+
var index$9 = "";
|
|
1326
|
+
const blankFunc$1 = () => {
|
|
1153
1327
|
};
|
|
1154
|
-
function
|
|
1155
|
-
const
|
|
1328
|
+
function Keyborard(props) {
|
|
1329
|
+
const { label = "\u67E5\u8BE2", onWakeKeyboard = blankFunc$1, onClick = blankFunc$1, onHidden = blankFunc$1 } = props;
|
|
1156
1330
|
const inputRef = useRef(null);
|
|
1157
|
-
const
|
|
1331
|
+
const [visible, setVisible] = useState(true);
|
|
1158
1332
|
useEffect(() => {
|
|
1159
1333
|
const handleKeyUp = (e) => {
|
|
1160
1334
|
e.preventDefault();
|
|
1161
1335
|
const { code, keyCode, key } = e;
|
|
1162
1336
|
if (code === "Enter") {
|
|
1163
|
-
onClick(inputRef.current.value);
|
|
1164
|
-
|
|
1337
|
+
onClick(inputRef.current.value, e);
|
|
1338
|
+
onHidden(true);
|
|
1339
|
+
setVisible(false);
|
|
1165
1340
|
return;
|
|
1166
1341
|
}
|
|
1167
1342
|
};
|
|
1343
|
+
requestAnimationFrame(() => {
|
|
1344
|
+
inputRef.current.focus();
|
|
1345
|
+
onWakeKeyboard();
|
|
1346
|
+
});
|
|
1168
1347
|
document.addEventListener("keyup", handleKeyUp);
|
|
1169
1348
|
return () => {
|
|
1170
1349
|
document.removeEventListener("keyup", handleKeyUp);
|
|
1171
1350
|
};
|
|
1172
1351
|
}, []);
|
|
1352
|
+
if (!visible)
|
|
1353
|
+
return null;
|
|
1173
1354
|
return /* @__PURE__ */ React.createElement("div", {
|
|
1174
|
-
className: "wakekeyborard"
|
|
1175
|
-
|
|
1176
|
-
|
|
1355
|
+
className: "wakekeyborard-overlay",
|
|
1356
|
+
onClick: (e) => {
|
|
1357
|
+
var _a;
|
|
1358
|
+
if ((_a = e.target.className) == null ? void 0 : _a.includes("wakekeyborard-overlay")) {
|
|
1359
|
+
onHidden(false);
|
|
1360
|
+
setVisible(false);
|
|
1361
|
+
}
|
|
1362
|
+
}
|
|
1177
1363
|
}, /* @__PURE__ */ React.createElement("div", {
|
|
1178
1364
|
className: "wakekeyborard-inputbox"
|
|
1179
1365
|
}, /* @__PURE__ */ React.createElement("input", {
|
|
1180
1366
|
ref: inputRef,
|
|
1181
1367
|
type: "tel"
|
|
1182
1368
|
}), /* @__PURE__ */ React.createElement(Button, {
|
|
1183
|
-
type: "
|
|
1369
|
+
type: "cutout",
|
|
1184
1370
|
onClick: (e) => {
|
|
1185
|
-
onClick(inputRef.current.value);
|
|
1371
|
+
onClick(inputRef.current.value, e);
|
|
1372
|
+
onHidden(true);
|
|
1373
|
+
setVisible(false);
|
|
1374
|
+
}
|
|
1375
|
+
}, label)));
|
|
1376
|
+
}
|
|
1377
|
+
const blankFunc = () => {
|
|
1378
|
+
};
|
|
1379
|
+
function WakeKeyborard(props) {
|
|
1380
|
+
const [inputVisible, setInputVisible] = useState(false);
|
|
1381
|
+
const _a = props, { onClick = blankFunc, onHidden = blankFunc } = _a, keyborardProps = __objRest(_a, ["onClick", "onHidden"]);
|
|
1382
|
+
return /* @__PURE__ */ React.createElement("div", {
|
|
1383
|
+
className: "wakekeyborard"
|
|
1384
|
+
}, inputVisible ? /* @__PURE__ */ React.createElement(Keyborard, __spreadValues({
|
|
1385
|
+
onClick: (v, e) => {
|
|
1386
|
+
onClick(v);
|
|
1186
1387
|
setInputVisible(!inputVisible);
|
|
1388
|
+
},
|
|
1389
|
+
onHidden: (s) => {
|
|
1390
|
+
setInputVisible(false);
|
|
1391
|
+
onHidden(s);
|
|
1187
1392
|
}
|
|
1188
|
-
},
|
|
1393
|
+
}, keyborardProps)) : null, !inputVisible ? /* @__PURE__ */ React.createElement("div", {
|
|
1189
1394
|
className: "wakekeyborard-icon",
|
|
1190
1395
|
onClick: (e) => {
|
|
1191
1396
|
setInputVisible(!inputVisible);
|
|
1192
|
-
requestAnimationFrame(() => {
|
|
1193
|
-
inputRef.current.focus();
|
|
1194
|
-
onWakeKeyboard();
|
|
1195
|
-
});
|
|
1196
1397
|
}
|
|
1197
1398
|
}) : null);
|
|
1198
1399
|
}
|
|
1199
|
-
var index$
|
|
1200
|
-
var index$
|
|
1400
|
+
var index$8 = "";
|
|
1401
|
+
var index$7 = "";
|
|
1201
1402
|
class PdaInfoCard$1 extends React.Component {
|
|
1202
1403
|
constructor(props) {
|
|
1203
1404
|
super(props);
|
|
@@ -1217,10 +1418,10 @@ class PdaInfoCard$1 extends React.Component {
|
|
|
1217
1418
|
className: classNames({ "pda-step-indictor-bottom": true, "pda-step-indictor-bottom-hidden": isLast })
|
|
1218
1419
|
})), /* @__PURE__ */ React.createElement("div", {
|
|
1219
1420
|
className: classNames({ "pda-step": true, "pda-step-dark": !isActive })
|
|
1220
|
-
}, /* @__PURE__ */ React.createElement("
|
|
1421
|
+
}, /* @__PURE__ */ React.createElement("div", {
|
|
1221
1422
|
className: "pda-step-title"
|
|
1222
1423
|
}, title), infoList.map((item, index22) => {
|
|
1223
|
-
return /* @__PURE__ */ React.createElement("
|
|
1424
|
+
return /* @__PURE__ */ React.createElement("div", {
|
|
1224
1425
|
key: index22,
|
|
1225
1426
|
className: "pda-step-list"
|
|
1226
1427
|
}, /* @__PURE__ */ React.createElement("span", null, item.label || ""), "\xA0\xA0", /* @__PURE__ */ React.createElement("span", null, item.content || ""));
|
|
@@ -1251,7 +1452,7 @@ class PdaInfoCard extends React.Component {
|
|
|
1251
1452
|
}
|
|
1252
1453
|
}
|
|
1253
1454
|
__publicField(PdaInfoCard, "Step", PdaInfoCard$1);
|
|
1254
|
-
var index$
|
|
1455
|
+
var index$6 = "";
|
|
1255
1456
|
class PdaFinishCard extends React.Component {
|
|
1256
1457
|
constructor(props) {
|
|
1257
1458
|
super(props);
|
|
@@ -1287,7 +1488,7 @@ class PdaFinishCard extends React.Component {
|
|
|
1287
1488
|
}
|
|
1288
1489
|
PdaFinishCard.SUCCESS = "https://img.alicdn.com/imgextra/i2/O1CN01yYwwSx1uNV0M1gHlQ_!!6000000006025-1-tps-630-436.gif";
|
|
1289
1490
|
PdaFinishCard.ERROR_SUCCESS = "https://img.alicdn.com/imgextra/i3/O1CN01p5Oc5t1VMFWtBomQc_!!6000000002638-1-tps-600-456.gif";
|
|
1290
|
-
var index$
|
|
1491
|
+
var index$5 = "";
|
|
1291
1492
|
class PdaDistanceCard extends React.Component {
|
|
1292
1493
|
constructor(props) {
|
|
1293
1494
|
super(props);
|
|
@@ -1322,7 +1523,7 @@ class PdaDistanceCard extends React.Component {
|
|
|
1322
1523
|
}, /* @__PURE__ */ React.createElement("p", null, "\u8FDC"), /* @__PURE__ */ React.createElement("p", null, "\u8FD1")));
|
|
1323
1524
|
}
|
|
1324
1525
|
}
|
|
1325
|
-
var index$
|
|
1526
|
+
var index$4 = "";
|
|
1326
1527
|
function SubCard(props) {
|
|
1327
1528
|
const { title, context, name, tag, attrs = [], style } = props;
|
|
1328
1529
|
return /* @__PURE__ */ React.createElement("div", {
|
|
@@ -1348,6 +1549,34 @@ function SubCard(props) {
|
|
|
1348
1549
|
}, text);
|
|
1349
1550
|
})));
|
|
1350
1551
|
}
|
|
1552
|
+
var index$3 = "";
|
|
1553
|
+
function empty() {
|
|
1554
|
+
}
|
|
1555
|
+
function index$2(props) {
|
|
1556
|
+
const { dataSource = [], onClickItem = empty } = props;
|
|
1557
|
+
return /* @__PURE__ */ React.createElement("div", {
|
|
1558
|
+
className: "pda-app-list"
|
|
1559
|
+
}, dataSource.map((item) => {
|
|
1560
|
+
return /* @__PURE__ */ React.createElement("div", {
|
|
1561
|
+
className: "pda-app-group",
|
|
1562
|
+
key: item.groupName
|
|
1563
|
+
}, /* @__PURE__ */ React.createElement("h2", {
|
|
1564
|
+
className: "group-name"
|
|
1565
|
+
}, item.groupName), /* @__PURE__ */ React.createElement("div", {
|
|
1566
|
+
className: "group-apps"
|
|
1567
|
+
}, item.list.map((it) => {
|
|
1568
|
+
return /* @__PURE__ */ React.createElement("div", {
|
|
1569
|
+
className: "app-item",
|
|
1570
|
+
key: it.name,
|
|
1571
|
+
onClick: () => onClickItem(it)
|
|
1572
|
+
}, /* @__PURE__ */ React.createElement("span", {
|
|
1573
|
+
className: "app-name"
|
|
1574
|
+
}, it.name), /* @__PURE__ */ React.createElement("span", {
|
|
1575
|
+
className: "app-subname"
|
|
1576
|
+
}, it.subname));
|
|
1577
|
+
})));
|
|
1578
|
+
}));
|
|
1579
|
+
}
|
|
1351
1580
|
var index$1 = "";
|
|
1352
1581
|
function usePersistFn(fn) {
|
|
1353
1582
|
var fnRef = useRef(fn);
|
|
@@ -1684,4 +1913,4 @@ function PdaActionSheet(props) {
|
|
|
1684
1913
|
})));
|
|
1685
1914
|
}
|
|
1686
1915
|
const ListItem = PdaListItem;
|
|
1687
|
-
export { PdaActionSheet as ActionSheet, BaseLayout, Button, Confirm, PdaDistanceCard as DistanceCard, PdaFinishCard as FinishCard, index$
|
|
1916
|
+
export { PdaActionSheet as ActionSheet, index$2 as AppList, BaseLayout, Button, Confirm, PdaDistanceCard as DistanceCard, PdaFinishCard as FinishCard, index$k as Header, InfiniteScroll, PdaInfoCard$2 as InfoCard, Keyborard, List, ListItem, Overlay, index$d as PageFlowSystemPages, Presentation, PdaInfoCard as Steps, SubCard, PdaListItem as TaskCard, PdaTitle as Title, Toast, WakeKeyborard };
|