@cniot/android-pda-components 0.2.29 → 0.2.34

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.
Files changed (112) hide show
  1. package/build/assets/{index.96f23a3d.js → index.62d45991.js} +16 -16
  2. package/build/assets/index.e900577b.css +1 -0
  3. package/build/index.html +2 -2
  4. package/doc/index.jsx +0 -2
  5. package/es/index.cjs.js +7 -0
  6. package/es/index.es.js +2204 -0
  7. package/es/style.css +1 -0
  8. package/package.json +1 -1
  9. package/build/assets/index.248cb4f2.css +0 -1
  10. package/packages/AppList/doc.jsx +0 -138
  11. package/packages/AppList/index.jsx +0 -33
  12. package/packages/AppList/index.less +0 -52
  13. package/packages/BaseLayout/BarcodeScan.jsx +0 -88
  14. package/packages/BaseLayout/BaseLayoutContainer.jsx +0 -208
  15. package/packages/BaseLayout/RfidOnce.jsx +0 -106
  16. package/packages/BaseLayout/RfidScan.jsx +0 -118
  17. package/packages/BaseLayout/doc.jsx +0 -177
  18. package/packages/BaseLayout/index.jsx +0 -52
  19. package/packages/BaseLayout/index.less +0 -47
  20. package/packages/Button/doc.jsx +0 -62
  21. package/packages/Button/index.jsx +0 -27
  22. package/packages/Button/index.less +0 -62
  23. package/packages/Confirm/doc.jsx +0 -147
  24. package/packages/Confirm/index.jsx +0 -71
  25. package/packages/Confirm/index.less +0 -55
  26. package/packages/Header/doc.jsx +0 -155
  27. package/packages/Header/index.jsx +0 -184
  28. package/packages/Header/index.less +0 -68
  29. package/packages/InfoCard/doc.jsx +0 -244
  30. package/packages/InfoCard/index.jsx +0 -67
  31. package/packages/InfoCard/index.less +0 -111
  32. package/packages/List/doc.jsx +0 -89
  33. package/packages/List/index.jsx +0 -54
  34. package/packages/List/index.less +0 -43
  35. package/packages/Overlay/doc.jsx +0 -103
  36. package/packages/Overlay/index.jsx +0 -42
  37. package/packages/Overlay/index.less +0 -28
  38. package/packages/PdaActionSheet/doc.jsx +0 -193
  39. package/packages/PdaActionSheet/index.jsx +0 -44
  40. package/packages/PdaActionSheet/index.less +0 -65
  41. package/packages/PdaDistanceCard/doc.jsx +0 -62
  42. package/packages/PdaDistanceCard/index.jsx +0 -35
  43. package/packages/PdaDistanceCard/index.less +0 -42
  44. package/packages/PdaFinishCard/doc.jsx +0 -111
  45. package/packages/PdaFinishCard/index.jsx +0 -62
  46. package/packages/PdaFinishCard/index.less +0 -62
  47. package/packages/PdaInfiniteScroll/doc.jsx +0 -121
  48. package/packages/PdaInfiniteScroll/index.jsx +0 -114
  49. package/packages/PdaInfiniteScroll/index.less +0 -12
  50. package/packages/PdaInfiniteScroll/utils.jsx +0 -25
  51. package/packages/PdaSteps/PdaStep/index.jsx +0 -38
  52. package/packages/PdaSteps/PdaStep/index.less +0 -70
  53. package/packages/PdaSteps/PdaSteps/index.jsx +0 -33
  54. package/packages/PdaSteps/PdaSteps/index.less +0 -0
  55. package/packages/PdaSteps/doc.jsx +0 -131
  56. package/packages/PdaSteps/index.jsx +0 -5
  57. package/packages/PdaTitle/doc.jsx +0 -102
  58. package/packages/PdaTitle/index.jsx +0 -51
  59. package/packages/PdaTitle/index.less +0 -65
  60. package/packages/Presentation/doc.jsx +0 -72
  61. package/packages/Presentation/index.jsx +0 -25
  62. package/packages/Presentation/index.less +0 -31
  63. package/packages/SelectCard/doc.jsx +0 -57
  64. package/packages/SelectCard/index.jsx +0 -13
  65. package/packages/SelectCard/index.less +0 -30
  66. package/packages/SimpleCard/doc.jsx +0 -59
  67. package/packages/SimpleCard/index.jsx +0 -13
  68. package/packages/SimpleCard/index.less +0 -38
  69. package/packages/SimpleCardBlock/doc.jsx +0 -77
  70. package/packages/SimpleCardBlock/index.jsx +0 -43
  71. package/packages/SimpleCardBlock/index.less +0 -26
  72. package/packages/SubCard/doc.jsx +0 -63
  73. package/packages/SubCard/index.jsx +0 -28
  74. package/packages/SubCard/index.less +0 -64
  75. package/packages/Tag/doc.jsx +0 -47
  76. package/packages/Tag/index.jsx +0 -12
  77. package/packages/Tag/index.less +0 -22
  78. package/packages/TaskCard/doc.jsx +0 -151
  79. package/packages/TaskCard/index.jsx +0 -65
  80. package/packages/TaskCard/index.less +0 -101
  81. package/packages/Toast/doc.jsx +0 -112
  82. package/packages/Toast/index.jsx +0 -7
  83. package/packages/Toast/index.less +0 -23
  84. package/packages/Toast/methods.jsx +0 -77
  85. package/packages/Toast/toast.jsx +0 -96
  86. package/packages/WakeKeyborard/doc.jsx +0 -170
  87. package/packages/WakeKeyborard/index.jsx +0 -61
  88. package/packages/WakeKeyborard/index.less +0 -55
  89. package/packages/WakeKeyborard/keyborard.jsx +0 -61
  90. package/packages/doc.jsx +0 -19
  91. package/packages/global.less +0 -7
  92. package/packages/index.jsx +0 -60
  93. package/packages/index.less +0 -3
  94. package/packages/pageflow-system-pages/alert/doc.jsx +0 -70
  95. package/packages/pageflow-system-pages/alert/index.jsx +0 -22
  96. package/packages/pageflow-system-pages/confirm/doc.jsx +0 -118
  97. package/packages/pageflow-system-pages/confirm/index.jsx +0 -31
  98. package/packages/pageflow-system-pages/debug/index.jsx +0 -27
  99. package/packages/pageflow-system-pages/debug/index.less +0 -5
  100. package/packages/pageflow-system-pages/index.jsx +0 -38
  101. package/packages/pageflow-system-pages/loading/index.jsx +0 -37
  102. package/packages/pageflow-system-pages/not-found/index.jsx +0 -12
  103. package/packages/pageflow-system-pages/not-found/index.less +0 -26
  104. package/packages/pageflow-system-pages/prompt/doc.jsx +0 -95
  105. package/packages/pageflow-system-pages/prompt/index.jsx +0 -43
  106. package/packages/pageflow-system-pages/prompt/index.less +0 -44
  107. package/packages/pageflow-system-pages/start/index.jsx +0 -28
  108. package/packages/pageflow-system-pages/start/index.less +0 -12
  109. package/packages/pageflow-system-pages/toast/doc.jsx +0 -76
  110. package/packages/pageflow-system-pages/toast/index.jsx +0 -42
  111. package/packages/utils/index.js +0 -56
  112. package/packages/variable.less +0 -4
package/es/index.es.js ADDED
@@ -0,0 +1,2204 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+ var __objRest = (source, exclude) => {
21
+ var target = {};
22
+ for (var prop in source)
23
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
24
+ target[prop] = source[prop];
25
+ if (source != null && __getOwnPropSymbols)
26
+ for (var prop of __getOwnPropSymbols(source)) {
27
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
28
+ target[prop] = source[prop];
29
+ }
30
+ return target;
31
+ };
32
+ var __publicField = (obj, key, value) => {
33
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
34
+ return value;
35
+ };
36
+ import React, { useState, useEffect, useRef, cloneElement, useCallback } from "react";
37
+ import ReactDOM from "react-dom";
38
+ var global = "";
39
+ var classnames = { exports: {} };
40
+ /*!
41
+ Copyright (c) 2018 Jed Watson.
42
+ Licensed under the MIT License (MIT), see
43
+ http://jedwatson.github.io/classnames
44
+ */
45
+ (function(module) {
46
+ (function() {
47
+ var hasOwn = {}.hasOwnProperty;
48
+ function classNames2() {
49
+ var classes = [];
50
+ for (var i = 0; i < arguments.length; i++) {
51
+ var arg = arguments[i];
52
+ if (!arg)
53
+ continue;
54
+ var argType = typeof arg;
55
+ if (argType === "string" || argType === "number") {
56
+ classes.push(arg);
57
+ } else if (Array.isArray(arg)) {
58
+ if (arg.length) {
59
+ var inner = classNames2.apply(null, arg);
60
+ if (inner) {
61
+ classes.push(inner);
62
+ }
63
+ }
64
+ } else if (argType === "object") {
65
+ if (arg.toString === Object.prototype.toString) {
66
+ for (var key in arg) {
67
+ if (hasOwn.call(arg, key) && arg[key]) {
68
+ classes.push(key);
69
+ }
70
+ }
71
+ } else {
72
+ classes.push(arg.toString());
73
+ }
74
+ }
75
+ }
76
+ return classes.join(" ");
77
+ }
78
+ if (module.exports) {
79
+ classNames2.default = classNames2;
80
+ module.exports = classNames2;
81
+ } else {
82
+ window.classNames = classNames2;
83
+ }
84
+ })();
85
+ })(classnames);
86
+ var classNames = classnames.exports;
87
+ var index$t = "";
88
+ function getTypeClass$2(type) {
89
+ return {
90
+ "center": "op-overlay center",
91
+ "top": "op-overlay top",
92
+ "bottom": "op-overlay bottom"
93
+ }[type] || "op-overlay";
94
+ }
95
+ function Overlay$1(props) {
96
+ const { verticalPosition = "center", visible = true, closable = false, onClosed = () => {
97
+ } } = props;
98
+ const [hidden, setHidden] = useState(!visible);
99
+ useEffect(() => {
100
+ setHidden(!visible);
101
+ }, [visible]);
102
+ const option = {};
103
+ if (closable) {
104
+ option.onClick = (e) => {
105
+ setHidden(true);
106
+ onClosed();
107
+ };
108
+ }
109
+ useEffect(() => {
110
+ setHidden(!visible);
111
+ }, [visible]);
112
+ return !hidden ? /* @__PURE__ */ React.createElement("div", __spreadValues({
113
+ className: getTypeClass$2(verticalPosition)
114
+ }, option), props.children) : null;
115
+ }
116
+ var index$s = "";
117
+ const blankFunc$6 = () => {
118
+ };
119
+ class PdaTitle extends React.Component {
120
+ constructor(props) {
121
+ super(props);
122
+ __publicField(this, "state", {
123
+ showMenu: false
124
+ });
125
+ }
126
+ render() {
127
+ const { className, goBack = true, goBackHandle = blankFunc$6, icon = "scan", title = "\u4EFB\u52A1", menuList = null } = this.props;
128
+ const { showMenu } = this.state;
129
+ return /* @__PURE__ */ React.createElement("div", {
130
+ className: classNames({ [className]: true, "pda-header": true })
131
+ }, /* @__PURE__ */ React.createElement("div", {
132
+ className: "header-click-area",
133
+ onClick: goBack ? goBackHandle : blankFunc$6
134
+ }, goBack && /* @__PURE__ */ React.createElement("div", {
135
+ className: "pda-goback"
136
+ }), icon && /* @__PURE__ */ React.createElement("div", {
137
+ className: classNames({ "pda-header-icon": true, ["pda-header-icon-" + icon]: true })
138
+ })), /* @__PURE__ */ React.createElement("p", {
139
+ className: classNames({ "pda-title-text": true })
140
+ }, title), menuList ? /* @__PURE__ */ React.createElement("div", {
141
+ className: "pda-header-more",
142
+ onClick: (e) => {
143
+ this.setState({ showMenu: true });
144
+ }
145
+ }) : null, /* @__PURE__ */ React.createElement(Overlay$1, {
146
+ visible: showMenu,
147
+ verticalPosition: "bottom",
148
+ closable: true,
149
+ onClosed: (e) => this.setState({ showMenu: false })
150
+ }, /* @__PURE__ */ React.createElement("div", {
151
+ className: "pda-menus"
152
+ }, menuList)));
153
+ }
154
+ }
155
+ var keycode$1 = { exports: {} };
156
+ (function(module, exports) {
157
+ function keyCode(searchInput) {
158
+ if (searchInput && typeof searchInput === "object") {
159
+ var hasKeyCode = searchInput.which || searchInput.keyCode || searchInput.charCode;
160
+ if (hasKeyCode)
161
+ searchInput = hasKeyCode;
162
+ }
163
+ if (typeof searchInput === "number")
164
+ return names[searchInput];
165
+ var search = String(searchInput);
166
+ var foundNamedKey = codes[search.toLowerCase()];
167
+ if (foundNamedKey)
168
+ return foundNamedKey;
169
+ var foundNamedKey = aliases[search.toLowerCase()];
170
+ if (foundNamedKey)
171
+ return foundNamedKey;
172
+ if (search.length === 1)
173
+ return search.charCodeAt(0);
174
+ return void 0;
175
+ }
176
+ keyCode.isEventKey = function isEventKey(event, nameOrCode) {
177
+ if (event && typeof event === "object") {
178
+ var keyCode2 = event.which || event.keyCode || event.charCode;
179
+ if (keyCode2 === null || keyCode2 === void 0) {
180
+ return false;
181
+ }
182
+ if (typeof nameOrCode === "string") {
183
+ var foundNamedKey = codes[nameOrCode.toLowerCase()];
184
+ if (foundNamedKey) {
185
+ return foundNamedKey === keyCode2;
186
+ }
187
+ var foundNamedKey = aliases[nameOrCode.toLowerCase()];
188
+ if (foundNamedKey) {
189
+ return foundNamedKey === keyCode2;
190
+ }
191
+ } else if (typeof nameOrCode === "number") {
192
+ return nameOrCode === keyCode2;
193
+ }
194
+ return false;
195
+ }
196
+ };
197
+ exports = module.exports = keyCode;
198
+ var codes = exports.code = exports.codes = {
199
+ "backspace": 8,
200
+ "tab": 9,
201
+ "enter": 13,
202
+ "shift": 16,
203
+ "ctrl": 17,
204
+ "alt": 18,
205
+ "pause/break": 19,
206
+ "caps lock": 20,
207
+ "esc": 27,
208
+ "space": 32,
209
+ "page up": 33,
210
+ "page down": 34,
211
+ "end": 35,
212
+ "home": 36,
213
+ "left": 37,
214
+ "up": 38,
215
+ "right": 39,
216
+ "down": 40,
217
+ "insert": 45,
218
+ "delete": 46,
219
+ "command": 91,
220
+ "left command": 91,
221
+ "right command": 93,
222
+ "numpad *": 106,
223
+ "numpad +": 107,
224
+ "numpad -": 109,
225
+ "numpad .": 110,
226
+ "numpad /": 111,
227
+ "num lock": 144,
228
+ "scroll lock": 145,
229
+ "my computer": 182,
230
+ "my calculator": 183,
231
+ ";": 186,
232
+ "=": 187,
233
+ ",": 188,
234
+ "-": 189,
235
+ ".": 190,
236
+ "/": 191,
237
+ "`": 192,
238
+ "[": 219,
239
+ "\\": 220,
240
+ "]": 221,
241
+ "'": 222
242
+ };
243
+ var aliases = exports.aliases = {
244
+ "windows": 91,
245
+ "\u21E7": 16,
246
+ "\u2325": 18,
247
+ "\u2303": 17,
248
+ "\u2318": 91,
249
+ "ctl": 17,
250
+ "control": 17,
251
+ "option": 18,
252
+ "pause": 19,
253
+ "break": 19,
254
+ "caps": 20,
255
+ "return": 13,
256
+ "escape": 27,
257
+ "spc": 32,
258
+ "spacebar": 32,
259
+ "pgup": 33,
260
+ "pgdn": 34,
261
+ "ins": 45,
262
+ "del": 46,
263
+ "cmd": 91
264
+ };
265
+ /*!
266
+ * Programatically add the following
267
+ */
268
+ for (i = 97; i < 123; i++)
269
+ codes[String.fromCharCode(i)] = i - 32;
270
+ for (var i = 48; i < 58; i++)
271
+ codes[i - 48] = i;
272
+ for (i = 1; i < 13; i++)
273
+ codes["f" + i] = i + 111;
274
+ for (i = 0; i < 10; i++)
275
+ codes["numpad " + i] = i + 96;
276
+ var names = exports.names = exports.title = {};
277
+ for (i in codes)
278
+ names[codes[i]] = i;
279
+ for (var alias in aliases) {
280
+ codes[alias] = aliases[alias];
281
+ }
282
+ })(keycode$1, keycode$1.exports);
283
+ var keycode = keycode$1.exports;
284
+ var index$r = "";
285
+ function Button(props) {
286
+ const { type = "default", onClick, className = "", tabIndex = 1, dataClick = "" } = props;
287
+ let opt = {};
288
+ if (dataClick) {
289
+ opt["data-click"] = dataClick;
290
+ }
291
+ return /* @__PURE__ */ React.createElement("button", __spreadValues({
292
+ className: `pda-button pda-button-${type} ${className}`,
293
+ onClick,
294
+ tabIndex
295
+ }, opt), props.children);
296
+ }
297
+ function ButtonGroup(props) {
298
+ return /* @__PURE__ */ React.createElement("div", {
299
+ className: "button-group"
300
+ }, props.children);
301
+ }
302
+ Button.Group = ButtonGroup;
303
+ const SPECIAL_KEY_MAP = ["fn"];
304
+ const empty$3 = () => {
305
+ };
306
+ function index$q(props) {
307
+ const {
308
+ onBack,
309
+ icon,
310
+ title,
311
+ menus = [],
312
+ onClickMenuItem = empty$3,
313
+ onScanBarcode,
314
+ cancelMenuText,
315
+ configIconClick = null,
316
+ menuShortcutKey,
317
+ backShortcutKey
318
+ } = props;
319
+ const [showMenus, setShowMenus] = React.useState(false);
320
+ React.useEffect(function() {
321
+ if (menuShortcutKey) {
322
+ return bindShortcutKey(getShortcutKeyCodes(menuShortcutKey), function() {
323
+ setShowMenus(true);
324
+ });
325
+ }
326
+ }, [menuShortcutKey]);
327
+ React.useEffect(function() {
328
+ if (backShortcutKey && onBack) {
329
+ return bindShortcutKey(getShortcutKeyCodes(backShortcutKey), function() {
330
+ onBack("back");
331
+ });
332
+ }
333
+ }, [backShortcutKey, onBack]);
334
+ React.useEffect(() => {
335
+ return onKeyBoradBack(function() {
336
+ onBack && onBack("back");
337
+ });
338
+ }, []);
339
+ React.useEffect(() => {
340
+ return addEventListener(document, "BarcodeScan", function(e) {
341
+ onScanBarcode && onScanBarcode(e.param.scanData);
342
+ });
343
+ }, [onScanBarcode]);
344
+ return /* @__PURE__ */ React.createElement("div", {
345
+ className: "pda-header"
346
+ }, /* @__PURE__ */ React.createElement("div", {
347
+ className: "header-click-area"
348
+ }, onBack ? /* @__PURE__ */ React.createElement("div", {
349
+ className: "pda-goback",
350
+ onClick: () => onBack("back")
351
+ }) : null, icon && /* @__PURE__ */ React.createElement("div", {
352
+ className: `pda-header-icon pda-header-icon-${icon}`
353
+ })), /* @__PURE__ */ React.createElement("div", {
354
+ className: "pda-title-text"
355
+ }, title), menus && menus.length ? /* @__PURE__ */ React.createElement("div", {
356
+ className: "pda-header-icon pda-header-more",
357
+ onClick: () => setShowMenus(true)
358
+ }) : null, configIconClick ? /* @__PURE__ */ React.createElement("div", {
359
+ className: "pda-header-icon pda-header-config",
360
+ onClick: configIconClick
361
+ }) : null, /* @__PURE__ */ React.createElement(Overlay$1, {
362
+ visible: showMenus,
363
+ verticalPosition: "bottom",
364
+ closable: false,
365
+ onClosed: () => setShowMenus(false)
366
+ }, /* @__PURE__ */ React.createElement("div", {
367
+ className: "pda-menus"
368
+ }, menus.map((item, index2) => {
369
+ return /* @__PURE__ */ React.createElement(Button, {
370
+ onClick: () => {
371
+ setShowMenus(false);
372
+ onClickMenuItem(item);
373
+ },
374
+ key: item.key || index2
375
+ }, item.label);
376
+ }), cancelMenuText ? /* @__PURE__ */ React.createElement("div", {
377
+ style: { marginTop: 20 }
378
+ }, /* @__PURE__ */ React.createElement(Button, {
379
+ onClick: () => setShowMenus(false)
380
+ }, cancelMenuText)) : null)));
381
+ }
382
+ function getShortcutKeyCodes(shortcutKey) {
383
+ const shortcutKeys = shortcutKey.indexOf(",") > -1 ? shortcutKey.split(",") : [shortcutKey];
384
+ return shortcutKeys.map((k) => {
385
+ if (SPECIAL_KEY_MAP.indexOf(k.toLowerCase()) > -1) {
386
+ return k.toLowerCase();
387
+ }
388
+ const kc = keycode(k);
389
+ if (kc === void 0) {
390
+ console.warn("OPButton.shortcutKey error key value by:", k);
391
+ }
392
+ return kc;
393
+ }).filter((k) => k !== void 0);
394
+ }
395
+ function bindShortcutKey(keys, callback) {
396
+ function keyUpCallback(event) {
397
+ const key = event.key.toLowerCase();
398
+ const keyCode = SPECIAL_KEY_MAP.indexOf(key) > -1 ? key : event.keyCode;
399
+ if (keys.indexOf(keyCode) > -1) {
400
+ callback && callback(event);
401
+ }
402
+ }
403
+ document.addEventListener("keyup", keyUpCallback);
404
+ return function() {
405
+ document.removeEventListener("keyup", keyUpCallback);
406
+ };
407
+ }
408
+ function onKeyBoradBack(fn) {
409
+ function keyPressed(data) {
410
+ if (data.param.originValue == "back") {
411
+ fn && fn();
412
+ }
413
+ }
414
+ document.addEventListener("keyPressed", keyPressed, false);
415
+ return function() {
416
+ document.removeEventListener("keyPressed", keyPressed);
417
+ };
418
+ }
419
+ function addEventListener(node, eventName, fn) {
420
+ node.addEventListener(eventName, fn, false);
421
+ return function() {
422
+ node.removeEventListener(eventName, fn);
423
+ };
424
+ }
425
+ var index$p = "";
426
+ class PdaInfoCard$2 extends React.Component {
427
+ constructor(props) {
428
+ super(props);
429
+ }
430
+ render() {
431
+ const { className = "", title, highlightInfo, subTitle, subHighlightInfo, subHighlightSubInfo, infoImage, tagText, highlightInfoCN, highlightSubInfo, percentage, highlightSubInfoCN, boldInfo, infoList = [], style = {}, theme = "light" } = this.props;
432
+ return /* @__PURE__ */ React.createElement("div", {
433
+ className: classNames({ [className]: true, "pda-info-card": true, "pda-info-card-dark": theme === "dark" }),
434
+ style
435
+ }, /* @__PURE__ */ React.createElement("div", {
436
+ className: "pda-info-card-title-section"
437
+ }, /* @__PURE__ */ React.createElement("div", {
438
+ className: "pda-info-card-title"
439
+ }, title), tagText ? /* @__PURE__ */ React.createElement("div", {
440
+ className: "pda-info-card-tag"
441
+ }, /* @__PURE__ */ React.createElement("div", {
442
+ className: "pda-info-card-tag-text"
443
+ }, tagText)) : null), /* @__PURE__ */ React.createElement("div", {
444
+ className: "pda-info-card-highlight-section"
445
+ }, /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("div", {
446
+ className: "pda-info-card-highlight"
447
+ }, /* @__PURE__ */ React.createElement("span", {
448
+ className: "pda-info-card-highlight1"
449
+ }, highlightInfo), /* @__PURE__ */ React.createElement("span", {
450
+ className: "pda-info-card-highlight1CN"
451
+ }, highlightInfoCN), /* @__PURE__ */ React.createElement("span", {
452
+ className: "pda-info-card-highlight2"
453
+ }, highlightSubInfo), /* @__PURE__ */ React.createElement("span", {
454
+ className: "pda-info-card-highlight2CN"
455
+ }, highlightSubInfoCN)), subTitle ? /* @__PURE__ */ React.createElement("div", {
456
+ className: "pda-info-card-title"
457
+ }, subTitle) : null, subHighlightInfo ? /* @__PURE__ */ React.createElement("div", {
458
+ className: "pda-info-card-highlight"
459
+ }, /* @__PURE__ */ React.createElement("span", {
460
+ className: "pda-info-card-highlight1"
461
+ }, subHighlightInfo), /* @__PURE__ */ React.createElement("span", {
462
+ className: "pda-info-card-highlight2"
463
+ }, subHighlightSubInfo)) : null), infoImage ? /* @__PURE__ */ React.createElement("img", {
464
+ src: infoImage,
465
+ width: 150,
466
+ height: 150
467
+ }) : null), percentage !== void 0 ? /* @__PURE__ */ React.createElement("div", {
468
+ className: "pda-info-card-progress"
469
+ }, /* @__PURE__ */ React.createElement("div", {
470
+ className: "pda-info-card-progress-inside",
471
+ style: { width: `${percentage * 100}%` }
472
+ })) : null, /* @__PURE__ */ React.createElement("div", {
473
+ className: "pda-info-card-bold"
474
+ }, boldInfo), infoList.map((item, index2) => {
475
+ return /* @__PURE__ */ React.createElement("div", {
476
+ key: index2,
477
+ className: "pda-info-card-list"
478
+ }, /* @__PURE__ */ React.createElement("span", null, item.label || ""), "\xA0\xA0", /* @__PURE__ */ React.createElement("span", null, item.content || ""));
479
+ }));
480
+ }
481
+ }
482
+ PdaInfoCard$2.IMAGE_1 = "https://img.alicdn.com/imgextra/i2/O1CN01qYuxip1ME9zhdL9XG_!!6000000001402-2-tps-150-150.png";
483
+ var index$o = "";
484
+ class PdaListItem extends React.Component {
485
+ constructor(props) {
486
+ super(props);
487
+ }
488
+ render() {
489
+ const { className, header, onClick = () => {
490
+ }, onHeightLightClick = () => {
491
+ }, onIconClick = () => {
492
+ }, highlightText, highlightSubText, stateTextList = [], stateList = [], subInfoList = [], style = {}, icon } = this.props;
493
+ return /* @__PURE__ */ React.createElement("div", {
494
+ className: classNames({ [className]: true, "pda-list-item": true }),
495
+ style,
496
+ onClick
497
+ }, !!header ? /* @__PURE__ */ React.createElement("div", {
498
+ className: "pda-listitem-header"
499
+ }, header) : null, /* @__PURE__ */ React.createElement("div", {
500
+ onClick: onHeightLightClick,
501
+ className: classNames({ "pda-listitem-highlight": true })
502
+ }, /* @__PURE__ */ React.createElement("div", null, highlightText), /* @__PURE__ */ React.createElement("div", null, highlightSubText)), /* @__PURE__ */ React.createElement("div", {
503
+ className: "pda-listitem-state-text"
504
+ }, stateTextList.map((item, index2) => {
505
+ return /* @__PURE__ */ React.createElement("span", {
506
+ key: index2
507
+ }, item.label || "", "\uFF5C");
508
+ })), /* @__PURE__ */ React.createElement("div", {
509
+ className: "pda-listitem-state-block"
510
+ }, stateList.map((item, index2) => {
511
+ const type = item && item.type ? item.type : "default";
512
+ return /* @__PURE__ */ React.createElement("div", {
513
+ key: index2,
514
+ className: type
515
+ }, item.label || "");
516
+ })), icon ? /* @__PURE__ */ React.createElement("div", {
517
+ onClick: onIconClick,
518
+ className: "pda-listitem-icon"
519
+ }, /* @__PURE__ */ React.createElement("div", {
520
+ className: classNames({ "listitem-icon-container": true, ["listitem-icon-" + icon]: true })
521
+ })) : null, subInfoList.map((item, index2) => {
522
+ return /* @__PURE__ */ React.createElement("div", {
523
+ key: index2,
524
+ className: "pda-listitem-subinfo"
525
+ }, /* @__PURE__ */ React.createElement("span", null, item.label || ""), "\xA0\xA0", /* @__PURE__ */ React.createElement("span", null, item.content || ""));
526
+ }));
527
+ }
528
+ }
529
+ var index$n = "";
530
+ function empty$2() {
531
+ }
532
+ function Confirm(props) {
533
+ const { title = "title", message = null, subMessage = [], okText = "okText", cancelText = null, okDataClick = null, cancelDataClick = null, onClick = empty$2, type = "primary", insertButtons = [], appendButtons = [] } = props;
534
+ return /* @__PURE__ */ React.createElement("div", {
535
+ className: classNames({ "confirm-wrap": true, ["confirm-" + type]: true })
536
+ }, /* @__PURE__ */ React.createElement("div", {
537
+ className: "confirm-content"
538
+ }, /* @__PURE__ */ React.createElement("div", {
539
+ className: "confirm-title"
540
+ }, title), message ? /* @__PURE__ */ React.createElement("div", {
541
+ className: "confirm-message"
542
+ }, message) : null, subMessage.length ? /* @__PURE__ */ React.createElement("div", {
543
+ className: "confirm-sub-message"
544
+ }, subMessage.map((item, index2) => {
545
+ const { label, content } = item;
546
+ return /* @__PURE__ */ React.createElement("div", {
547
+ className: "confirm-sub-block",
548
+ key: label ? label : index2
549
+ }, /* @__PURE__ */ React.createElement("p", {
550
+ className: "confirm-sub-label"
551
+ }, label ? label + " : " : ""), /* @__PURE__ */ React.createElement("p", {
552
+ className: "confirm-sub-content"
553
+ }, content || ""));
554
+ })) : null), /* @__PURE__ */ React.createElement("div", {
555
+ className: "confirm-btns"
556
+ }, insertButtons.length > 0 ? /* @__PURE__ */ React.createElement(Button.Group, null, insertButtons.map((item, index2) => /* @__PURE__ */ React.createElement(Button, {
557
+ key: index2,
558
+ onClick: () => onClick(item.value),
559
+ dataClick: item.dataClick
560
+ }, item.label))) : null, /* @__PURE__ */ React.createElement(Button.Group, null, cancelText ? /* @__PURE__ */ React.createElement(Button, {
561
+ className: "confirm-cancel-button",
562
+ onClick: () => onClick(false),
563
+ dataClick: cancelDataClick
564
+ }, cancelText) : null, /* @__PURE__ */ React.createElement(Button, {
565
+ type: "primary",
566
+ onClick: () => onClick(true),
567
+ dataClick: okDataClick
568
+ }, okText)), appendButtons.length > 0 ? /* @__PURE__ */ React.createElement(Button.Group, null, appendButtons.map((item, index2) => /* @__PURE__ */ React.createElement(Button, {
569
+ key: index2,
570
+ onClick: () => onClick(item.value),
571
+ dataClick: item.dataClick
572
+ }, item.label))) : null));
573
+ }
574
+ var index$m = "";
575
+ function WindVaneLog(param) {
576
+ const params = {
577
+ domain: "logger",
578
+ method: "deviceLog",
579
+ params: param
580
+ };
581
+ WindVane.call("WindvanePlugin", "invoke", JSON.stringify(params), function(e) {
582
+ }, function(e) {
583
+ });
584
+ }
585
+ function resolveContainer(getContainer) {
586
+ const container = typeof getContainer === "function" ? getContainer() : getContainer;
587
+ return container || document.body;
588
+ }
589
+ function isUndefined(v) {
590
+ return v === void 0;
591
+ }
592
+ function mergeProps(...items) {
593
+ function customizer(objValue, srcValue) {
594
+ return isUndefined(srcValue) ? objValue : srcValue;
595
+ }
596
+ let ret = Object.assign({}, items[0]);
597
+ for (let i = 1; i < items.length; i++) {
598
+ ret = Object.assign(ret, items[i], customizer);
599
+ }
600
+ return ret;
601
+ }
602
+ function playSound(sound) {
603
+ if (window.WindVane) {
604
+ var params = {
605
+ domain: "audio",
606
+ method: "playSound",
607
+ params: { sound }
608
+ };
609
+ WindVane.call("WindvanePlugin", "invoke", JSON.stringify(params));
610
+ }
611
+ }
612
+ function getTypeClass$1(type) {
613
+ return {
614
+ "success": "toast-wrap success",
615
+ "warning": "toast-wrap warning",
616
+ "error": "toast-wrap error"
617
+ }[type] || "toast-wrap";
618
+ }
619
+ function Toast(props) {
620
+ const { title = "title", message = "message", type = "success", duration = null } = props;
621
+ const [hidden, setHidden] = useState(false);
622
+ useEffect(() => {
623
+ if (window.WindVane) {
624
+ if (type === "warning") {
625
+ playSound("error1");
626
+ window.WindVane.call("WVMotion", "vibrate", { duration: 400 });
627
+ } else if (type === "error") {
628
+ playSound("error2");
629
+ window.WindVane.call("WVMotion", "vibrate", { duration: 200 });
630
+ setTimeout(() => {
631
+ window.WindVane.call("WVMotion", "vibrate", { duration: 300 });
632
+ }, 250);
633
+ }
634
+ }
635
+ }, []);
636
+ if (duration) {
637
+ setTimeout(() => {
638
+ setHidden(true);
639
+ }, duration);
640
+ }
641
+ return !hidden ? /* @__PURE__ */ React.createElement("div", {
642
+ className: getTypeClass$1(type)
643
+ }, /* @__PURE__ */ React.createElement("div", {
644
+ className: "toast-title"
645
+ }, title), /* @__PURE__ */ React.createElement("div", {
646
+ className: "toast-message"
647
+ }, message)) : null;
648
+ }
649
+ const defaultProps$1 = {
650
+ maskClickable: true,
651
+ stopPropagation: ["click"]
652
+ };
653
+ const InternalToast = (p) => {
654
+ const props = mergeProps(defaultProps$1, p);
655
+ const { maskClickable, content, icon, position, title, message, type, visible } = props;
656
+ return /* @__PURE__ */ React.createElement(Overlay$1, {
657
+ visible,
658
+ verticalPosition: "bottom",
659
+ closable: true
660
+ }, /* @__PURE__ */ React.createElement(Toast, {
661
+ title,
662
+ message,
663
+ type
664
+ }));
665
+ };
666
+ const containers = [];
667
+ function unmount(container) {
668
+ const unmountResult = ReactDOM.unmountComponentAtNode(container);
669
+ if (unmountResult && container.parentNode) {
670
+ container.parentNode.removeChild(container);
671
+ }
672
+ }
673
+ const defaultProps = {
674
+ duration: 2e3
675
+ };
676
+ function show(p) {
677
+ const props = mergeProps(defaultProps, p);
678
+ let timer = 0;
679
+ const { getContainer = () => document.body } = props;
680
+ const container = document.createElement("div");
681
+ const bodyContainer = resolveContainer(getContainer);
682
+ bodyContainer.appendChild(container);
683
+ clear();
684
+ containers.push(container);
685
+ function TempToast() {
686
+ const [visible, setVisible] = useState(true);
687
+ useEffect(() => {
688
+ return () => {
689
+ props.afterClose && props.afterClose();
690
+ };
691
+ }, []);
692
+ useEffect(() => {
693
+ if (props.duration === 0) {
694
+ return;
695
+ }
696
+ timer = window.setTimeout(() => {
697
+ setVisible(false);
698
+ }, props.duration);
699
+ return () => {
700
+ window.clearTimeout(timer);
701
+ };
702
+ }, []);
703
+ return /* @__PURE__ */ React.createElement(InternalToast, __spreadProps(__spreadValues({}, props), {
704
+ getContainer: () => container,
705
+ visible,
706
+ afterClose: () => {
707
+ unmount(container);
708
+ }
709
+ }));
710
+ }
711
+ ReactDOM.render(/* @__PURE__ */ React.createElement(TempToast, null), container);
712
+ }
713
+ function clear() {
714
+ while (true) {
715
+ const container = containers.pop();
716
+ if (!container)
717
+ break;
718
+ unmount(container);
719
+ }
720
+ }
721
+ Toast.show = show;
722
+ Toast.clear = clear;
723
+ function Alert(props) {
724
+ const { service, data = {} } = props;
725
+ const onClickCallback = React.useCallback(function() {
726
+ service.onNext(true);
727
+ }, [service]);
728
+ return /* @__PURE__ */ React.createElement(Overlay$1, {
729
+ verticalPosition: "bottom"
730
+ }, /* @__PURE__ */ React.createElement(Confirm, __spreadProps(__spreadValues({}, data), {
731
+ onClick: onClickCallback
732
+ })));
733
+ }
734
+ function Start(props) {
735
+ const { action, appManager, service } = props;
736
+ const onReStart = React.useCallback(function() {
737
+ service.onStart(appManager.config.appId);
738
+ });
739
+ return /* @__PURE__ */ React.createElement("div", {
740
+ style: {
741
+ display: "flex",
742
+ flexDirection: "column",
743
+ justifyContent: "center",
744
+ alignItems: "center",
745
+ width: "100vw",
746
+ height: "100vh"
747
+ }
748
+ }, /* @__PURE__ */ React.createElement(Button, {
749
+ type: "primary",
750
+ onClick: onReStart
751
+ }, "\u5F00\u59CB\u4F5C\u4E1A"), /* @__PURE__ */ React.createElement("br", null), /* @__PURE__ */ React.createElement("div", null, appManager.config.appId), /* @__PURE__ */ React.createElement("div", null, appManager.config.groupId));
752
+ }
753
+ function confirm(props) {
754
+ const { service, data = {} } = props;
755
+ const onClickCallback = React.useCallback(function(v) {
756
+ service.onNext(v);
757
+ }, [service]);
758
+ return /* @__PURE__ */ React.createElement(Overlay$1, {
759
+ verticalPosition: "bottom"
760
+ }, /* @__PURE__ */ React.createElement(Confirm, __spreadProps(__spreadValues({}, data), {
761
+ onClick: onClickCallback
762
+ })));
763
+ }
764
+ var index$l = "";
765
+ function getTypeClass(type) {
766
+ return {
767
+ "center": "op-overlay center",
768
+ "top": "op-overlay top",
769
+ "bottom": "op-overlay bottom"
770
+ }[type] || "op-overlay";
771
+ }
772
+ function Overlay(props) {
773
+ const { verticalPosition = "center", visible = true, closable = false, onClosed = () => {
774
+ } } = props;
775
+ const [hidden, setHidden] = useState(!visible);
776
+ useEffect(() => {
777
+ setHidden(!visible);
778
+ }, [visible]);
779
+ const option = {};
780
+ if (closable) {
781
+ option.onClick = (e) => {
782
+ setHidden(true);
783
+ onClosed();
784
+ };
785
+ }
786
+ useEffect(() => {
787
+ setHidden(!visible);
788
+ }, [visible]);
789
+ return !hidden ? /* @__PURE__ */ React.createElement("div", __spreadValues({
790
+ className: getTypeClass(verticalPosition)
791
+ }, option), props.children) : null;
792
+ }
793
+ var index$k = "";
794
+ function Prompt(props) {
795
+ const inputRef = React.useRef();
796
+ const { data = {}, onNext } = props;
797
+ const { placeholder, defaultValue, title = "\u8BF7\u8F93\u5165", type = "text", okText = "\u786E\u8BA4", cancelText = "\u53D6\u6D88" } = data;
798
+ return /* @__PURE__ */ React.createElement(Overlay, {
799
+ verticalPosition: "center",
800
+ closable: false
801
+ }, /* @__PURE__ */ React.createElement("div", {
802
+ className: "prompt-dialog"
803
+ }, /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("h1", {
804
+ className: "prompt-title"
805
+ }, title), /* @__PURE__ */ React.createElement("input", {
806
+ className: "prompt-input",
807
+ autoFocus: true,
808
+ ref: inputRef,
809
+ placeholder,
810
+ type,
811
+ defaultValue,
812
+ onKeyUp: (e) => {
813
+ if (e.keyCode === 13) {
814
+ onNext(getInputValue(inputRef.current));
815
+ }
816
+ }
817
+ }), /* @__PURE__ */ React.createElement("div", {
818
+ className: "prompt-btns"
819
+ }, cancelText ? /* @__PURE__ */ React.createElement(Button, {
820
+ onClick: () => onNext("back")
821
+ }, cancelText) : null, /* @__PURE__ */ React.createElement(Button, {
822
+ type: "primary",
823
+ onClick: () => {
824
+ onNext(getInputValue(inputRef.current));
825
+ }
826
+ }, okText)))));
827
+ }
828
+ function getInputValue(input) {
829
+ const value = input.value || "";
830
+ return String(value).trim();
831
+ }
832
+ function toast(props) {
833
+ const { data = {}, onNext, service } = props;
834
+ const { title, level, message, duration = null } = data;
835
+ const [hidden, setHidden] = useState(false);
836
+ React.useEffect(() => {
837
+ if (data.hasNext === void 0) {
838
+ onNext("");
839
+ }
840
+ let timeout = null;
841
+ if (duration) {
842
+ timeout = setTimeout(() => {
843
+ setHidden(true);
844
+ }, duration);
845
+ }
846
+ return () => {
847
+ clearTimeout(timeout);
848
+ };
849
+ }, [data]);
850
+ return !hidden ? /* @__PURE__ */ React.createElement(Overlay$1, {
851
+ verticalPosition: "bottom"
852
+ }, /* @__PURE__ */ React.createElement("div", {
853
+ style: { width: "90%" }
854
+ }, /* @__PURE__ */ React.createElement(Toast, {
855
+ type: level,
856
+ title,
857
+ message: splitMessage(message)
858
+ }))) : null;
859
+ }
860
+ function splitMessage(message) {
861
+ var msg = String(message).split("by Error:");
862
+ return msg[1] || msg[0];
863
+ }
864
+ var index$j = "";
865
+ function NotFound(props) {
866
+ return /* @__PURE__ */ React.createElement("div", {
867
+ style: { padding: "20%" }
868
+ }, /* @__PURE__ */ React.createElement("h1", null, "404 ", /* @__PURE__ */ React.createElement("small", {
869
+ style: { fontSize: "60%" }
870
+ }, "Not found")), /* @__PURE__ */ React.createElement("div", null, props.action.getPage()));
871
+ }
872
+ function _extends() {
873
+ _extends = Object.assign || function(target) {
874
+ for (var i = 1; i < arguments.length; i++) {
875
+ var source = arguments[i];
876
+ for (var key in source) {
877
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
878
+ target[key] = source[key];
879
+ }
880
+ }
881
+ }
882
+ return target;
883
+ };
884
+ return _extends.apply(this, arguments);
885
+ }
886
+ var r, B = r || (r = {});
887
+ B.Pop = "POP";
888
+ B.Push = "PUSH";
889
+ B.Replace = "REPLACE";
890
+ var C = function(b) {
891
+ return b;
892
+ };
893
+ function E(b) {
894
+ b.preventDefault();
895
+ b.returnValue = "";
896
+ }
897
+ function F() {
898
+ var b = [];
899
+ return { get length() {
900
+ return b.length;
901
+ }, push: function(h) {
902
+ b.push(h);
903
+ return function() {
904
+ b = b.filter(function(k) {
905
+ return k !== h;
906
+ });
907
+ };
908
+ }, call: function(h) {
909
+ b.forEach(function(k) {
910
+ return k && k(h);
911
+ });
912
+ } };
913
+ }
914
+ function H() {
915
+ return Math.random().toString(36).substr(2, 8);
916
+ }
917
+ function I(b) {
918
+ var h = b.pathname, k = b.search;
919
+ b = b.hash;
920
+ return (h === void 0 ? "/" : h) + (k === void 0 ? "" : k) + (b === void 0 ? "" : b);
921
+ }
922
+ function J(b) {
923
+ var h = {};
924
+ if (b) {
925
+ var k = b.indexOf("#");
926
+ 0 <= k && (h.hash = b.substr(k), b = b.substr(0, k));
927
+ k = b.indexOf("?");
928
+ 0 <= k && (h.search = b.substr(k), b = b.substr(0, k));
929
+ b && (h.pathname = b);
930
+ }
931
+ return h;
932
+ }
933
+ function createHashHistory(b) {
934
+ function h() {
935
+ var a = J(m.location.hash.substr(1)), e = a.pathname, l = a.search;
936
+ a = a.hash;
937
+ var g = u.state || {};
938
+ return [g.idx, C({ pathname: e === void 0 ? "/" : e, search: l === void 0 ? "" : l, hash: a === void 0 ? "" : a, state: g.usr || null, key: g.key || "default" })];
939
+ }
940
+ function k() {
941
+ if (t)
942
+ c.call(t), t = null;
943
+ else {
944
+ var a = r.Pop, e = h(), l = e[0];
945
+ e = e[1];
946
+ if (c.length)
947
+ if (l != null) {
948
+ var g = q - l;
949
+ g && (t = { action: a, location: e, retry: function() {
950
+ p(-1 * g);
951
+ } }, p(g));
952
+ } else
953
+ ;
954
+ else
955
+ A(a);
956
+ }
957
+ }
958
+ function x(a) {
959
+ var e = document.querySelector("base"), l = "";
960
+ e && e.getAttribute("href") && (e = m.location.href, l = e.indexOf("#"), l = l === -1 ? e : e.slice(0, l));
961
+ return l + "#" + (typeof a === "string" ? a : I(a));
962
+ }
963
+ function z(a, e) {
964
+ e === void 0 && (e = null);
965
+ return C(_extends({}, d, typeof a === "string" ? J(a) : a, { state: e, key: H() }));
966
+ }
967
+ function A(a) {
968
+ v = a;
969
+ a = h();
970
+ q = a[0];
971
+ d = a[1];
972
+ f.call({ action: v, location: d });
973
+ }
974
+ function y(a, e) {
975
+ function l() {
976
+ y(a, e);
977
+ }
978
+ var g = r.Push, n = z(a, e);
979
+ if (!c.length || (c.call({ action: g, location: n, retry: l }), false)) {
980
+ var G = [{ usr: n.state, key: n.key, idx: q + 1 }, x(n)];
981
+ n = G[0];
982
+ G = G[1];
983
+ try {
984
+ u.pushState(n, "", G);
985
+ } catch (K) {
986
+ m.location.assign(G);
987
+ }
988
+ A(g);
989
+ }
990
+ }
991
+ function w(a, e) {
992
+ function l() {
993
+ w(a, e);
994
+ }
995
+ var g = r.Replace, n = z(a, e);
996
+ c.length && (c.call({
997
+ action: g,
998
+ location: n,
999
+ retry: l
1000
+ }), 1) || (n = [{ usr: n.state, key: n.key, idx: q }, x(n)], u.replaceState(n[0], "", n[1]), A(g));
1001
+ }
1002
+ function p(a) {
1003
+ u.go(a);
1004
+ }
1005
+ b === void 0 && (b = {});
1006
+ b = b.window;
1007
+ var m = b === void 0 ? document.defaultView : b, u = m.history, t = null;
1008
+ m.addEventListener("popstate", k);
1009
+ m.addEventListener("hashchange", function() {
1010
+ var a = h()[1];
1011
+ I(a) !== I(d) && k();
1012
+ });
1013
+ var v = r.Pop;
1014
+ b = h();
1015
+ var q = b[0], d = b[1], f = F(), c = F();
1016
+ q == null && (q = 0, u.replaceState(_extends({}, u.state, { idx: q }), ""));
1017
+ return {
1018
+ get action() {
1019
+ return v;
1020
+ },
1021
+ get location() {
1022
+ return d;
1023
+ },
1024
+ createHref: x,
1025
+ push: y,
1026
+ replace: w,
1027
+ go: p,
1028
+ back: function() {
1029
+ p(-1);
1030
+ },
1031
+ forward: function() {
1032
+ p(1);
1033
+ },
1034
+ listen: function(a) {
1035
+ return f.push(a);
1036
+ },
1037
+ block: function(a) {
1038
+ var e = c.push(a);
1039
+ c.length === 1 && m.addEventListener("beforeunload", E);
1040
+ return function() {
1041
+ e();
1042
+ c.length || m.removeEventListener("beforeunload", E);
1043
+ };
1044
+ }
1045
+ };
1046
+ }
1047
+ var index$i = "";
1048
+ function Debug(props) {
1049
+ const { appManager } = props;
1050
+ const pages = Array.from(appManager.pageManager.keys()).reverse();
1051
+ React.useEffect(function() {
1052
+ const history = createHashHistory();
1053
+ const unListen = history.listen(({ action, location }) => {
1054
+ const pathname = location.pathname;
1055
+ appManager.mockToPage(pathname, {});
1056
+ });
1057
+ return unListen;
1058
+ }, []);
1059
+ return /* @__PURE__ */ React.createElement("div", {
1060
+ className: "local-debug-side"
1061
+ }, /* @__PURE__ */ React.createElement("ul", null, pages.map((pathname) => /* @__PURE__ */ React.createElement("li", {
1062
+ key: pathname
1063
+ }, /* @__PURE__ */ React.createElement("a", {
1064
+ href: `#${pathname}`
1065
+ }, pathname)))));
1066
+ }
1067
+ function Loading$1(props) {
1068
+ const [showLoading, setShowLoading] = React.useState(false);
1069
+ const edgeService = props.edgeService;
1070
+ React.useEffect(function() {
1071
+ let currentLoading = false;
1072
+ const throttleSetShowLoading = function(loading) {
1073
+ currentLoading = loading;
1074
+ if (loading) {
1075
+ setTimeout(function() {
1076
+ if (currentLoading === loading) {
1077
+ setShowLoading(true);
1078
+ }
1079
+ }, 350);
1080
+ } else {
1081
+ setTimeout(function() {
1082
+ if (currentLoading === loading) {
1083
+ setShowLoading(false);
1084
+ }
1085
+ }, 100);
1086
+ }
1087
+ };
1088
+ if (!edgeService)
1089
+ return () => {
1090
+ };
1091
+ edgeService.on("IO_STATUS", throttleSetShowLoading);
1092
+ return function() {
1093
+ edgeService.off("IO_STATUS", throttleSetShowLoading);
1094
+ };
1095
+ }, [edgeService]);
1096
+ return showLoading ? /* @__PURE__ */ React.createElement("div", {
1097
+ style: { position: "absolute", left: 0, top: 0, zIndex: 100 }
1098
+ }, "LOADING...") : null;
1099
+ }
1100
+ function PlaySound({ data, service, action }) {
1101
+ const { sound } = data;
1102
+ if (window.WindVane) {
1103
+ var params = {
1104
+ domain: "audio",
1105
+ method: "playSound",
1106
+ params: { sound }
1107
+ };
1108
+ WindVane.call("WindvanePlugin", "invoke", JSON.stringify(params));
1109
+ }
1110
+ service.onNext({});
1111
+ return null;
1112
+ }
1113
+ var index$h = {
1114
+ Alert,
1115
+ Start,
1116
+ Toast: toast,
1117
+ Confirm: confirm,
1118
+ NotFound,
1119
+ Debug,
1120
+ Prompt,
1121
+ Loading: Loading$1,
1122
+ PlaySound
1123
+ };
1124
+ var index$g = "";
1125
+ function Presentation(props) {
1126
+ const {
1127
+ image = Presentation.IMAGE_1,
1128
+ text = "",
1129
+ subText = "",
1130
+ transparent
1131
+ } = props;
1132
+ return /* @__PURE__ */ React.createElement("div", {
1133
+ className: transparent ? "presentation-card transparent" : "presentation-card"
1134
+ }, /* @__PURE__ */ React.createElement("img", {
1135
+ src: image
1136
+ }), text ? /* @__PURE__ */ React.createElement("div", {
1137
+ className: "text"
1138
+ }, text) : null, subText ? /* @__PURE__ */ React.createElement("div", {
1139
+ className: "sub-text"
1140
+ }, subText) : null);
1141
+ }
1142
+ Presentation.IMAGE_1 = "https://img.alicdn.com/imgextra/i3/O1CN019Ivkor1ksy3pMGDsz_!!6000000004740-2-tps-280-322.png";
1143
+ Presentation.IMAGE_2 = "https://img.alicdn.com/imgextra/i1/O1CN01lhSunu1X4VPw1Mlas_!!6000000002870-2-tps-352-158.png";
1144
+ Presentation.IMAGE_3 = "https://img.alicdn.com/imgextra/i1/O1CN01mreYXo1XfbUsQ7hip_!!6000000002951-2-tps-322-144.png";
1145
+ Presentation.IMAGE_4 = "https://img.alicdn.com/imgextra/i3/O1CN017gNM8F1Fmmcfti7Dg_!!6000000000530-1-tps-414-286.gif";
1146
+ var index$f = "";
1147
+ function empty$1() {
1148
+ }
1149
+ function List(props) {
1150
+ const { dataSource = [], onClickItem, onItemClick = empty$1 } = props;
1151
+ return /* @__PURE__ */ React.createElement("div", {
1152
+ className: "android-pda-list"
1153
+ }, dataSource.map((item, index2) => {
1154
+ return /* @__PURE__ */ React.createElement(DefaultItem, {
1155
+ key: item.key || index2,
1156
+ dataSource: item,
1157
+ onClick: onClickItem || onItemClick
1158
+ });
1159
+ }), props.children);
1160
+ }
1161
+ function DefaultItem(props) {
1162
+ const dataSource = props.dataSource || {
1163
+ title: props.title,
1164
+ subTitle: props.subTitle,
1165
+ extra: props.extra,
1166
+ tags: props.tags
1167
+ };
1168
+ const { title, subTitle, extra, tags = [], tabIndex } = dataSource;
1169
+ const { onClick } = props;
1170
+ return /* @__PURE__ */ React.createElement("div", {
1171
+ className: "default-item",
1172
+ onClick: () => {
1173
+ onClick(props.dataSource);
1174
+ },
1175
+ tabIndex
1176
+ }, /* @__PURE__ */ React.createElement("div", {
1177
+ className: "text"
1178
+ }, /* @__PURE__ */ React.createElement("div", null, title), /* @__PURE__ */ React.createElement("div", {
1179
+ className: "sub-text"
1180
+ }, subTitle), /* @__PURE__ */ React.createElement("div", {
1181
+ className: "sub-tags"
1182
+ }, tags.map((text) => {
1183
+ return /* @__PURE__ */ React.createElement("div", {
1184
+ className: "sub-tag-item",
1185
+ key: text
1186
+ }, text);
1187
+ }))), /* @__PURE__ */ React.createElement("div", {
1188
+ className: "extra"
1189
+ }, extra));
1190
+ }
1191
+ List.Item = DefaultItem;
1192
+ var index$e = "";
1193
+ const blankFunc$5 = () => {
1194
+ };
1195
+ class BaseLayoutContainer extends React.Component {
1196
+ constructor(props) {
1197
+ super(props);
1198
+ this.state = {
1199
+ showLoading: false
1200
+ };
1201
+ this._handleKeyUp = (e) => {
1202
+ const { onScan = blankFunc$5, onEnter = blankFunc$5, onEsc = blankFunc$5, onDelete = blankFunc$5, scanMode = null } = this.props;
1203
+ const { code, keyCode, key } = e;
1204
+ if (code === "Enter") {
1205
+ e.preventDefault();
1206
+ onEnter(e);
1207
+ return;
1208
+ }
1209
+ if (code === "Delete") {
1210
+ e.preventDefault();
1211
+ onDelete(e);
1212
+ return;
1213
+ }
1214
+ if (code === "Esc") {
1215
+ e.preventDefault();
1216
+ onEsc(e);
1217
+ return;
1218
+ }
1219
+ };
1220
+ this._handleBeforeUnload = (e) => {
1221
+ e.returnValue = "\u786E\u5B9A\u79BB\u5F00\u5F53\u524D\u9875\u9762\u5417\uFF1F";
1222
+ return true;
1223
+ };
1224
+ this._handleUnload = (e) => {
1225
+ WindVane.call("WindvanePlugin", "invoke", "{'domain': 'rfid', 'method': 'stopRfidScan', 'params':null}", function(e2) {
1226
+ }, function(e2) {
1227
+ });
1228
+ const stopParam = {
1229
+ tag: "stopRfid",
1230
+ level: "d",
1231
+ message: "stop rfid scan!!!"
1232
+ };
1233
+ WindVaneLog(stopParam);
1234
+ WindVaneLog(stopParam);
1235
+ };
1236
+ }
1237
+ componentDidMount() {
1238
+ window.onunload = this._handleUnload;
1239
+ document.addEventListener("keyup", this._handleKeyUp);
1240
+ }
1241
+ componentWillUnmount() {
1242
+ window.onbeforeunload = null;
1243
+ window.onunload = null;
1244
+ document.removeEventListener("keyup", this._handleKeyUp);
1245
+ }
1246
+ shouldComponentUpdate(nextProps, nextState) {
1247
+ if (nextProps.loading && !this.props.loading) {
1248
+ this.setState({
1249
+ showLoading: true
1250
+ });
1251
+ if (nextProps.loadingTimeout) {
1252
+ setTimeout(() => {
1253
+ this.setState({
1254
+ showLoading: false
1255
+ });
1256
+ }, nextProps.loadingTimeout);
1257
+ }
1258
+ }
1259
+ if (!nextProps.loading && this.state.showLoading) {
1260
+ this.setState({
1261
+ showLoading: false
1262
+ });
1263
+ }
1264
+ return true;
1265
+ }
1266
+ render() {
1267
+ const props = this.props;
1268
+ const { style = {}, header, footer, loading } = this.props;
1269
+ return /* @__PURE__ */ React.createElement("div", {
1270
+ className: classNames({ "baselayout-wrapper": true }),
1271
+ style
1272
+ }, header && /* @__PURE__ */ React.createElement("div", {
1273
+ className: classNames({ "baselayout-header": true })
1274
+ }, header), /* @__PURE__ */ React.createElement("div", {
1275
+ className: classNames({ "baselayout-container": true })
1276
+ }, props.children), footer && /* @__PURE__ */ React.createElement("div", {
1277
+ className: classNames({ "baselayout-footer": true })
1278
+ }, footer), this.state.showLoading ? /* @__PURE__ */ React.createElement("div", {
1279
+ className: "loading"
1280
+ }) : null);
1281
+ }
1282
+ }
1283
+ const blankFunc$4 = () => {
1284
+ };
1285
+ class RfidOnce$1 extends React.Component {
1286
+ constructor(props) {
1287
+ super(props);
1288
+ this._rfidBeginScan = false;
1289
+ this._handleRfidScan = (e) => {
1290
+ const { onRfidOnce, onRfidBoxOnce, onRfidPalletOnce } = this.props;
1291
+ const data = e.param;
1292
+ const isBox = data.rfidData.startsWith("0F006");
1293
+ const isPallet = data.rfidData.startsWith("0F011");
1294
+ playSound("single_recog");
1295
+ if (isPallet) {
1296
+ let rfidData = data.rfidData;
1297
+ data.originData = rfidData;
1298
+ data.rfidData = rfidData.substr(5, 12);
1299
+ }
1300
+ if (onRfidBoxOnce && isBox) {
1301
+ this._stopWork();
1302
+ onRfidBoxOnce(data);
1303
+ } else if (onRfidPalletOnce && isPallet) {
1304
+ this._stopWork();
1305
+ onRfidPalletOnce(data);
1306
+ }
1307
+ if (onRfidOnce) {
1308
+ this._stopWork();
1309
+ onRfidOnce(data);
1310
+ }
1311
+ };
1312
+ this._startWork = (e) => {
1313
+ document.addEventListener("ContinuousRfidScan", this._handleRfidScan);
1314
+ WindVane.call("WindvanePlugin", "invoke", "{'domain': 'rfid', 'method': 'startScan', 'params': null}", function(e2) {
1315
+ }, function(e2) {
1316
+ });
1317
+ this._rfidBeginScan = true;
1318
+ };
1319
+ this._stopWork = (e) => {
1320
+ document.removeEventListener("ContinuousRfidScan", this._handleRfidScan);
1321
+ WindVane.call("WindvanePlugin", "invoke", "{'domain': 'rfid', 'method': 'stopRfidScan', 'params':null}", function(e2) {
1322
+ }, function(e2) {
1323
+ });
1324
+ };
1325
+ this._handleKeyDown = (e) => {
1326
+ const { code, keyCode, key } = e;
1327
+ if (code === "F22" || code === "F23" || code === "F24" || code === "F9" || code === "F16") {
1328
+ if (!this._rfidBeginScan) {
1329
+ this._startWork();
1330
+ }
1331
+ }
1332
+ };
1333
+ this._handleKeyUp = (e) => {
1334
+ const { code, keyCode, key } = e;
1335
+ if (code === "F22" || code === "F23" || code === "F24" || code === "F9" || code === "F16") {
1336
+ this._stopWork();
1337
+ this._rfidBeginScan = false;
1338
+ }
1339
+ };
1340
+ }
1341
+ componentDidMount() {
1342
+ document.addEventListener("keydown", this._handleKeyDown);
1343
+ document.addEventListener("keyup", this._handleKeyUp);
1344
+ WindVane.call("WindvanePlugin", "invoke", "{'domain': 'keyboard', 'method': 'changeScanMode', 'params': {'scanMode': 'RFID'}}", function(e) {
1345
+ }, function(e) {
1346
+ });
1347
+ }
1348
+ componentWillUnmount() {
1349
+ document.removeEventListener("keydown", this._handleKeyDown);
1350
+ document.removeEventListener("keyup", this._handleKeyUp);
1351
+ this._stopWork();
1352
+ }
1353
+ render() {
1354
+ const props = this.props;
1355
+ const _a = props, { onRfidOnce = blankFunc$4 } = _a, opts = __objRest(_a, ["onRfidOnce"]);
1356
+ return /* @__PURE__ */ React.createElement(BaseLayoutContainer, __spreadValues({}, opts));
1357
+ }
1358
+ }
1359
+ const blankFunc$3 = () => {
1360
+ };
1361
+ class RfidOnce extends React.Component {
1362
+ constructor(props) {
1363
+ super(props);
1364
+ this._rfidBeginScan = false;
1365
+ this._handleRfidScan = (e) => {
1366
+ const { onRfidScan, onRfidBoxScan, onRfidPalletScan } = this.props;
1367
+ const data = e.param;
1368
+ const isBox = data.rfidData.startsWith("0F006");
1369
+ const isPallet = data.rfidData.startsWith("0F011");
1370
+ if (isPallet) {
1371
+ let rfidData = data.rfidData;
1372
+ data.originData = rfidData;
1373
+ data.rfidData = rfidData.substr(5, 12);
1374
+ }
1375
+ if (isBox && onRfidBoxScan) {
1376
+ onRfidBoxScan(data);
1377
+ } else if (isPallet && onRfidPalletScan) {
1378
+ onRfidPalletScan(data);
1379
+ }
1380
+ if (onRfidScan) {
1381
+ onRfidScan(data);
1382
+ }
1383
+ };
1384
+ this._startWork = (e) => {
1385
+ document.addEventListener("ContinuousRfidScan", this._handleRfidScan);
1386
+ WindVane.call("WindvanePlugin", "invoke", "{'domain': 'rfid', 'method': 'startScan', 'params': null}", function(e2) {
1387
+ }, function(e2) {
1388
+ });
1389
+ this._rfidBeginScan = true;
1390
+ };
1391
+ this._stopWork = (e) => {
1392
+ document.removeEventListener("ContinuousRfidScan", this._handleRfidScan);
1393
+ WindVane.call("WindvanePlugin", "invoke", "{'domain': 'rfid', 'method': 'stopRfidScan', 'params':null}", function(e2) {
1394
+ }, function(e2) {
1395
+ });
1396
+ };
1397
+ this._handleKeyDown = (e) => {
1398
+ const { code, keyCode, key } = e;
1399
+ if (code === "F22" || code === "F23" || code === "F24" || code === "F9" || code === "F16") {
1400
+ if (!this._rfidBeginScan) {
1401
+ this._startWork();
1402
+ }
1403
+ }
1404
+ };
1405
+ this._handleKeyUp = (e) => {
1406
+ const { code, keyCode, key } = e;
1407
+ if (code === "F22" || code === "F23" || code === "F24" || code === "F9" || code === "F16") {
1408
+ this._stopWork();
1409
+ this._rfidBeginScan = false;
1410
+ }
1411
+ };
1412
+ }
1413
+ componentDidMount() {
1414
+ const { autoRfidScan = false, rfidReaderSleep } = this.props;
1415
+ WindVane.call("WindvanePlugin", "invoke", "{'domain': 'keyboard', 'method': 'changeScanMode', 'params': {'scanMode': 'RFID'}}", function(e) {
1416
+ }, function(e) {
1417
+ });
1418
+ if (!autoRfidScan) {
1419
+ document.addEventListener("keydown", this._handleKeyDown);
1420
+ document.addEventListener("keyup", this._handleKeyUp);
1421
+ } else {
1422
+ if (!rfidReaderSleep) {
1423
+ this._startWork();
1424
+ }
1425
+ }
1426
+ }
1427
+ componentWillUnmount() {
1428
+ document.removeEventListener("keydown", this._handleKeyDown);
1429
+ document.removeEventListener("keyup", this._handleKeyUp);
1430
+ this._stopWork();
1431
+ }
1432
+ shouldComponentUpdate(nextProps, nextState) {
1433
+ if (this.props.autoRfidScan && this.props.rfidReaderSleep !== nextProps.rfidReaderSleep) {
1434
+ if (!nextProps.rfidReaderSleep) {
1435
+ this._startWork();
1436
+ } else {
1437
+ this._stopWork();
1438
+ }
1439
+ }
1440
+ return true;
1441
+ }
1442
+ render() {
1443
+ const props = this.props;
1444
+ const _a = props, { onRfidScan = blankFunc$3, autoRfidScan } = _a, opts = __objRest(_a, ["onRfidScan", "autoRfidScan"]);
1445
+ return /* @__PURE__ */ React.createElement(BaseLayoutContainer, __spreadValues({}, opts));
1446
+ }
1447
+ }
1448
+ __publicField(RfidOnce, "defaultProps", {
1449
+ rfidReaderSleep: false
1450
+ });
1451
+ const blankFunc$2 = () => {
1452
+ };
1453
+ class BarcodeScan extends React.Component {
1454
+ constructor(props) {
1455
+ super(props);
1456
+ this._barcodeBeginScan = false;
1457
+ this._handleBarcodeScan = (e) => {
1458
+ const { onBarcodeScan } = this.props;
1459
+ this._stopWork();
1460
+ playSound("scan");
1461
+ onBarcodeScan && onBarcodeScan(e.param);
1462
+ };
1463
+ this._startWork = (e) => {
1464
+ document.addEventListener("BarcodeScan", this._handleBarcodeScan);
1465
+ this._barcodeBeginScan = true;
1466
+ };
1467
+ this._stopWork = (e) => {
1468
+ document.removeEventListener("BarcodeScan", this._handleBarcodeScan);
1469
+ };
1470
+ this._handleKeyDown = (e) => {
1471
+ const { code, keyCode, key } = e;
1472
+ if (code === "F22" || code === "F23" || code === "F24" || code === "F9" || code === "F16") {
1473
+ if (!this._barcodeBeginScan) {
1474
+ this._startWork();
1475
+ }
1476
+ }
1477
+ };
1478
+ this._handleKeyUp = (e) => {
1479
+ const { code, keyCode, key } = e;
1480
+ if (code === "F22" || code === "F23" || code === "F24" || code === "F9" || code === "F16") {
1481
+ this._stopWork();
1482
+ this._barcodeBeginScan = false;
1483
+ }
1484
+ };
1485
+ this.onScanBarcode = this.onScanBarcode.bind(this);
1486
+ }
1487
+ onScanBarcode(e) {
1488
+ this.props.onScanBarcode && this.props.onScanBarcode(e.param);
1489
+ }
1490
+ componentDidMount() {
1491
+ const { onBarcodeScan } = this.props;
1492
+ if (onBarcodeScan) {
1493
+ document.addEventListener("keydown", this._handleKeyDown);
1494
+ document.addEventListener("keyup", this._handleKeyUp);
1495
+ }
1496
+ document.addEventListener("BarcodeScan", this.onScanBarcode);
1497
+ WindVane.call("WindvanePlugin", "invoke", "{'domain': 'keyboard', 'method': 'changeScanMode', 'params': {'scanMode': 'barcode'}}", function(e) {
1498
+ }, function(e) {
1499
+ });
1500
+ }
1501
+ componentWillUnmount() {
1502
+ const { onBarcodeScan } = this.props;
1503
+ if (onBarcodeScan) {
1504
+ document.removeEventListener("keydown", this._handleKeyDown);
1505
+ document.removeEventListener("keyup", this._handleKeyUp);
1506
+ }
1507
+ document.removeEventListener("BarcodeScan", this.onScanBarcode);
1508
+ }
1509
+ render() {
1510
+ const props = this.props;
1511
+ const _a = props, { onBarcodeScan = blankFunc$2 } = _a, opts = __objRest(_a, ["onBarcodeScan"]);
1512
+ return /* @__PURE__ */ React.createElement(BaseLayoutContainer, __spreadValues({}, opts));
1513
+ }
1514
+ }
1515
+ class BaseLayout extends React.Component {
1516
+ constructor(props) {
1517
+ super(props);
1518
+ }
1519
+ render() {
1520
+ const props = this.props;
1521
+ const { onBarcodeScan, onScanBarcode, onRfidOnce, onRfidBoxOnce, onRfidPalletOnce, onRfidScan, onRfidBoxScan, onRfidPalletScan } = props;
1522
+ if (onRfidOnce || onRfidBoxOnce || onRfidPalletOnce) {
1523
+ return /* @__PURE__ */ React.createElement(RfidOnce$1, __spreadValues({}, props));
1524
+ }
1525
+ if (onRfidScan || onRfidBoxScan || onRfidPalletScan) {
1526
+ return /* @__PURE__ */ React.createElement(RfidOnce, __spreadValues({}, props));
1527
+ }
1528
+ if (onBarcodeScan || onScanBarcode) {
1529
+ return /* @__PURE__ */ React.createElement(BarcodeScan, __spreadValues({}, props));
1530
+ }
1531
+ return /* @__PURE__ */ React.createElement(BaseLayoutContainer, __spreadValues({}, props));
1532
+ }
1533
+ }
1534
+ var index$d = "";
1535
+ const blankFunc$1 = () => {
1536
+ };
1537
+ function Keyborard(props) {
1538
+ const { label = "\u67E5\u8BE2", onWakeKeyboard = blankFunc$1, onClick = blankFunc$1, onHidden = blankFunc$1, type = "tel", placeholder = "\u8BF7\u8F93\u5165" } = props;
1539
+ const inputRef = useRef(null);
1540
+ const [visible, setVisible] = useState(true);
1541
+ useEffect(() => {
1542
+ const handleKeyUp = (e) => {
1543
+ const { code, keyCode, key } = e;
1544
+ if (code === "Enter") {
1545
+ e.preventDefault();
1546
+ onClick(inputRef.current.value, e);
1547
+ onHidden(true);
1548
+ setVisible(false);
1549
+ return;
1550
+ }
1551
+ };
1552
+ requestAnimationFrame(() => {
1553
+ inputRef.current.focus();
1554
+ onWakeKeyboard();
1555
+ });
1556
+ document.addEventListener("keyup", handleKeyUp);
1557
+ return () => {
1558
+ document.removeEventListener("keyup", handleKeyUp);
1559
+ };
1560
+ }, []);
1561
+ if (!visible)
1562
+ return null;
1563
+ return /* @__PURE__ */ React.createElement("div", {
1564
+ className: "wakekeyborard-overlay",
1565
+ onClick: (e) => {
1566
+ if (e.target.className && e.target.className.includes("wakekeyborard-overlay")) {
1567
+ onHidden(false);
1568
+ setVisible(false);
1569
+ }
1570
+ }
1571
+ }, /* @__PURE__ */ React.createElement("div", {
1572
+ className: "wakekeyborard-inputbox"
1573
+ }, /* @__PURE__ */ React.createElement("input", {
1574
+ ref: inputRef,
1575
+ type,
1576
+ placeholder
1577
+ }), /* @__PURE__ */ React.createElement(Button, {
1578
+ type: "cutout",
1579
+ onClick: (e) => {
1580
+ onClick(inputRef.current.value, e);
1581
+ onHidden(true);
1582
+ setVisible(false);
1583
+ }
1584
+ }, label)));
1585
+ }
1586
+ const blankFunc = () => {
1587
+ };
1588
+ function WakeKeyborard(props) {
1589
+ const [inputVisible, setInputVisible] = useState(props.autoWakeup || false);
1590
+ const _a = props, { onClick = blankFunc, onHidden = blankFunc } = _a, keyborardProps = __objRest(_a, ["onClick", "onHidden"]);
1591
+ return /* @__PURE__ */ React.createElement("div", {
1592
+ className: "wakekeyborard"
1593
+ }, inputVisible ? /* @__PURE__ */ React.createElement(Keyborard, __spreadValues({
1594
+ onClick: (v, e) => {
1595
+ onClick(v);
1596
+ setInputVisible(!inputVisible);
1597
+ },
1598
+ onHidden: (s) => {
1599
+ setInputVisible(false);
1600
+ onHidden(s);
1601
+ }
1602
+ }, keyborardProps)) : null, !inputVisible ? /* @__PURE__ */ React.createElement("div", {
1603
+ className: "wakekeyborard-icon",
1604
+ onClick: (e) => {
1605
+ setInputVisible(!inputVisible);
1606
+ }
1607
+ }) : null);
1608
+ }
1609
+ WakeKeyborard.Keyborard = Keyborard;
1610
+ var index$c = "";
1611
+ var index$b = "";
1612
+ class PdaInfoCard$1 extends React.Component {
1613
+ constructor(props) {
1614
+ super(props);
1615
+ }
1616
+ render() {
1617
+ const { className, title, isActive, infoList = [], style = {}, index: index2, isLast } = this.props;
1618
+ return /* @__PURE__ */ React.createElement("div", {
1619
+ className: classNames({ [className]: true, "pda-step-card": true }),
1620
+ style
1621
+ }, /* @__PURE__ */ React.createElement("div", {
1622
+ className: "pda-step-indictor"
1623
+ }, /* @__PURE__ */ React.createElement("div", {
1624
+ className: classNames({ "pda-step-indictor-top": true, "pda-step-indictor-top-hidden": index2 === 0 })
1625
+ }), /* @__PURE__ */ React.createElement("div", {
1626
+ className: classNames({ "pda-step-indictor-center": true, "pda-step-indictor-center-active": isActive })
1627
+ }), /* @__PURE__ */ React.createElement("div", {
1628
+ className: classNames({ "pda-step-indictor-bottom": true, "pda-step-indictor-bottom-hidden": isLast })
1629
+ })), /* @__PURE__ */ React.createElement("div", {
1630
+ className: classNames({ "pda-step": true, "pda-step-dark": !isActive })
1631
+ }, /* @__PURE__ */ React.createElement("div", {
1632
+ className: "pda-step-title"
1633
+ }, title), infoList.map((item, index22) => {
1634
+ return /* @__PURE__ */ React.createElement("div", {
1635
+ key: index22,
1636
+ className: "pda-step-list"
1637
+ }, /* @__PURE__ */ React.createElement("span", null, item.label || ""), "\xA0\xA0", /* @__PURE__ */ React.createElement("span", null, item.content || ""));
1638
+ })));
1639
+ }
1640
+ }
1641
+ class PdaInfoCard extends React.Component {
1642
+ constructor(props) {
1643
+ super(props);
1644
+ }
1645
+ render() {
1646
+ const { className, style = {}, theme = "light", current = 0, children } = this.props;
1647
+ return /* @__PURE__ */ React.createElement("div", {
1648
+ className: classNames({ [className]: true }),
1649
+ style
1650
+ }, (children || []).map((child, index2) => {
1651
+ const childProps = __spreadValues({
1652
+ index: index2,
1653
+ isLast: index2 === (children || []).length - 1
1654
+ }, child.props);
1655
+ if (index2 === current) {
1656
+ childProps.isActive = true;
1657
+ } else {
1658
+ childProps.isActive = false;
1659
+ }
1660
+ return cloneElement(child, childProps);
1661
+ }));
1662
+ }
1663
+ }
1664
+ __publicField(PdaInfoCard, "Step", PdaInfoCard$1);
1665
+ var index$a = "";
1666
+ class PdaFinishCard extends React.Component {
1667
+ constructor(props) {
1668
+ super(props);
1669
+ }
1670
+ componentDidMount() {
1671
+ if (this.props.isError) {
1672
+ playSound("success3");
1673
+ } else {
1674
+ playSound("success2");
1675
+ }
1676
+ }
1677
+ render() {
1678
+ const { className, title, infoList = [], isError = false, buttonMultiLines = false, style = {}, onClick = () => {
1679
+ }, okText = "\u8FD4\u56DE\u9996\u9875", cancelText = null } = this.props;
1680
+ const footer = /* @__PURE__ */ React.createElement(Button.Group, null, cancelText ? /* @__PURE__ */ React.createElement(Button, {
1681
+ style: buttonMultiLines ? { height: "auto", lineHeight: "50px" } : {},
1682
+ type: "dark",
1683
+ onClick: () => onClick(false)
1684
+ }, cancelText) : null, /* @__PURE__ */ React.createElement(Button, {
1685
+ type: "primary",
1686
+ style: buttonMultiLines ? { height: "auto", lineHeight: "normal" } : {},
1687
+ onClick: () => onClick(true)
1688
+ }, okText));
1689
+ return /* @__PURE__ */ React.createElement(BaseLayout, {
1690
+ footer
1691
+ }, /* @__PURE__ */ React.createElement("div", {
1692
+ className: "pda-finish-card-top"
1693
+ }, /* @__PURE__ */ React.createElement("img", {
1694
+ className: "pda-finish-card-img",
1695
+ src: isError ? PdaFinishCard.ERROR_SUCCESS : PdaFinishCard.SUCCESS
1696
+ }), /* @__PURE__ */ React.createElement("p", {
1697
+ className: "pda-finish-card-title"
1698
+ }, title), infoList.map((item, index2) => {
1699
+ return /* @__PURE__ */ React.createElement("p", {
1700
+ key: index2,
1701
+ className: "pda-finish-card-list"
1702
+ }, /* @__PURE__ */ React.createElement("span", null, item.label || ""), /* @__PURE__ */ React.createElement("span", null, item.content || ""));
1703
+ })));
1704
+ }
1705
+ }
1706
+ PdaFinishCard.SUCCESS = "https://img.alicdn.com/imgextra/i3/O1CN01OL2UYg24792knbTtC_!!6000000007343-1-tps-506-415.gif";
1707
+ PdaFinishCard.ERROR_SUCCESS = "https://img.alicdn.com/imgextra/i3/O1CN01p5Oc5t1VMFWtBomQc_!!6000000002638-1-tps-600-456.gif";
1708
+ var index$9 = "";
1709
+ class PdaDistanceCard extends React.Component {
1710
+ constructor(props) {
1711
+ super(props);
1712
+ }
1713
+ render() {
1714
+ const { className, title, infoText, percentage = 0, style = {} } = this.props;
1715
+ const distanceImg = "https://img.alicdn.com/imgextra/i3/O1CN01EFksWL1DBZCu0H1JH_!!6000000000178-2-tps-21-30.png";
1716
+ const indictorImg = "https://img.alicdn.com/imgextra/i1/O1CN01YEhCSg1aObe8UZq7K_!!6000000003320-2-tps-379-17.png";
1717
+ return /* @__PURE__ */ React.createElement("div", {
1718
+ className: classNames({ [className]: true, "pda-distance-card": true }),
1719
+ style
1720
+ }, /* @__PURE__ */ React.createElement("p", {
1721
+ className: "pda-distance-card-highlight"
1722
+ }, /* @__PURE__ */ React.createElement("span", {
1723
+ className: "pda-distance-card-highlight1"
1724
+ }, title)), /* @__PURE__ */ React.createElement("div", {
1725
+ className: "pda-distance-indictor"
1726
+ }, /* @__PURE__ */ React.createElement("img", {
1727
+ src: distanceImg,
1728
+ width: 20,
1729
+ height: 29
1730
+ }), /* @__PURE__ */ React.createElement("p", null, infoText)), /* @__PURE__ */ React.createElement("div", {
1731
+ className: "pda-distance-card-progress"
1732
+ }, /* @__PURE__ */ React.createElement("div", {
1733
+ className: "pda-distance-card-progress-inside",
1734
+ style: { width: `${percentage * 100}%` }
1735
+ }), /* @__PURE__ */ React.createElement("img", {
1736
+ className: "pda-distance-card-progress-indictor",
1737
+ src: indictorImg
1738
+ })), /* @__PURE__ */ React.createElement("div", {
1739
+ className: "pda-distance-label"
1740
+ }, /* @__PURE__ */ React.createElement("p", null, "\u8FDC"), /* @__PURE__ */ React.createElement("p", null, "\u8FD1")));
1741
+ }
1742
+ }
1743
+ var index$8 = "";
1744
+ function SubCard(props) {
1745
+ const { title, context, name, tag, attrs = [], style } = props;
1746
+ return /* @__PURE__ */ React.createElement("div", {
1747
+ className: "android-sub-card",
1748
+ style
1749
+ }, /* @__PURE__ */ React.createElement("div", {
1750
+ className: "android-sub-card-title-section"
1751
+ }, /* @__PURE__ */ React.createElement("div", {
1752
+ className: "android-sub-card-title"
1753
+ }, title), tag ? /* @__PURE__ */ React.createElement("div", {
1754
+ className: "android-sub-card-tag"
1755
+ }, /* @__PURE__ */ React.createElement("div", {
1756
+ className: tag.type
1757
+ }, tag.label || "")) : null), /* @__PURE__ */ React.createElement("div", {
1758
+ className: "android-sub-card-context"
1759
+ }, context), name ? /* @__PURE__ */ React.createElement("div", {
1760
+ className: "android-sub-card-name"
1761
+ }, name) : null, /* @__PURE__ */ React.createElement("div", {
1762
+ className: "android-sub-card-attrs"
1763
+ }, attrs.map((text) => {
1764
+ return /* @__PURE__ */ React.createElement("div", {
1765
+ key: text
1766
+ }, text);
1767
+ })));
1768
+ }
1769
+ var index$7 = "";
1770
+ function SelectCard(props) {
1771
+ const { title, label, select = true, onClick = (e) => {
1772
+ } } = props;
1773
+ return /* @__PURE__ */ React.createElement("div", {
1774
+ className: "select-card"
1775
+ }, /* @__PURE__ */ React.createElement("p", null, title), /* @__PURE__ */ React.createElement("div", {
1776
+ className: "select-card-content",
1777
+ onClick
1778
+ }, label, " ", select ? /* @__PURE__ */ React.createElement("span", {
1779
+ className: "select-icon"
1780
+ }) : null, " "));
1781
+ }
1782
+ var index$6 = "";
1783
+ function empty() {
1784
+ }
1785
+ function index$5(props) {
1786
+ const { dataSource = [], onClickItem = empty } = props;
1787
+ let tabIndex = 1;
1788
+ return /* @__PURE__ */ React.createElement("div", {
1789
+ className: "pda-app-list"
1790
+ }, dataSource.map((item) => {
1791
+ return /* @__PURE__ */ React.createElement("div", {
1792
+ className: "pda-app-group",
1793
+ key: item.groupName
1794
+ }, /* @__PURE__ */ React.createElement("h2", {
1795
+ className: "group-name"
1796
+ }, item.groupName), /* @__PURE__ */ React.createElement("div", {
1797
+ className: "group-apps"
1798
+ }, item.list.map((it) => {
1799
+ return /* @__PURE__ */ React.createElement("div", {
1800
+ className: "app-item",
1801
+ key: it.name,
1802
+ autoFocus: tabIndex === 1,
1803
+ tabIndex: tabIndex++,
1804
+ onClick: () => onClickItem(it)
1805
+ }, /* @__PURE__ */ React.createElement("span", {
1806
+ className: "app-name"
1807
+ }, it.name), /* @__PURE__ */ React.createElement("span", {
1808
+ className: "app-subname"
1809
+ }, it.subname));
1810
+ })));
1811
+ }));
1812
+ }
1813
+ var index$4 = "";
1814
+ function usePersistFn(fn) {
1815
+ var fnRef = useRef(fn);
1816
+ fnRef.current = fn;
1817
+ var persistFn = useRef();
1818
+ if (!persistFn.current) {
1819
+ persistFn.current = function() {
1820
+ var args = [];
1821
+ for (var _i = 0; _i < arguments.length; _i++) {
1822
+ args[_i] = arguments[_i];
1823
+ }
1824
+ return fnRef.current.apply(this, args);
1825
+ };
1826
+ }
1827
+ return persistFn.current;
1828
+ }
1829
+ var __awaiter = function(thisArg, _arguments, P, generator) {
1830
+ function adopt(value) {
1831
+ return value instanceof P ? value : new P(function(resolve) {
1832
+ resolve(value);
1833
+ });
1834
+ }
1835
+ return new (P || (P = Promise))(function(resolve, reject) {
1836
+ function fulfilled(value) {
1837
+ try {
1838
+ step(generator.next(value));
1839
+ } catch (e) {
1840
+ reject(e);
1841
+ }
1842
+ }
1843
+ function rejected(value) {
1844
+ try {
1845
+ step(generator["throw"](value));
1846
+ } catch (e) {
1847
+ reject(e);
1848
+ }
1849
+ }
1850
+ function step(result) {
1851
+ result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
1852
+ }
1853
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
1854
+ });
1855
+ };
1856
+ var __generator = function(thisArg, body) {
1857
+ var _ = {
1858
+ label: 0,
1859
+ sent: function sent() {
1860
+ if (t[0] & 1)
1861
+ throw t[1];
1862
+ return t[1];
1863
+ },
1864
+ trys: [],
1865
+ ops: []
1866
+ }, f, y, t, g;
1867
+ return g = {
1868
+ next: verb(0),
1869
+ "throw": verb(1),
1870
+ "return": verb(2)
1871
+ }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
1872
+ return this;
1873
+ }), g;
1874
+ function verb(n) {
1875
+ return function(v) {
1876
+ return step([n, v]);
1877
+ };
1878
+ }
1879
+ function step(op) {
1880
+ if (f)
1881
+ throw new TypeError("Generator is already executing.");
1882
+ while (_) {
1883
+ try {
1884
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
1885
+ return t;
1886
+ if (y = 0, t)
1887
+ op = [op[0] & 2, t.value];
1888
+ switch (op[0]) {
1889
+ case 0:
1890
+ case 1:
1891
+ t = op;
1892
+ break;
1893
+ case 4:
1894
+ _.label++;
1895
+ return {
1896
+ value: op[1],
1897
+ done: false
1898
+ };
1899
+ case 5:
1900
+ _.label++;
1901
+ y = op[1];
1902
+ op = [0];
1903
+ continue;
1904
+ case 7:
1905
+ op = _.ops.pop();
1906
+ _.trys.pop();
1907
+ continue;
1908
+ default:
1909
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
1910
+ _ = 0;
1911
+ continue;
1912
+ }
1913
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
1914
+ _.label = op[1];
1915
+ break;
1916
+ }
1917
+ if (op[0] === 6 && _.label < t[1]) {
1918
+ _.label = t[1];
1919
+ t = op;
1920
+ break;
1921
+ }
1922
+ if (t && _.label < t[2]) {
1923
+ _.label = t[2];
1924
+ _.ops.push(op);
1925
+ break;
1926
+ }
1927
+ if (t[2])
1928
+ _.ops.pop();
1929
+ _.trys.pop();
1930
+ continue;
1931
+ }
1932
+ op = body.call(thisArg, _);
1933
+ } catch (e) {
1934
+ op = [6, e];
1935
+ y = 0;
1936
+ } finally {
1937
+ f = t = 0;
1938
+ }
1939
+ }
1940
+ if (op[0] & 5)
1941
+ throw op[1];
1942
+ return {
1943
+ value: op[0] ? op[1] : void 0,
1944
+ done: true
1945
+ };
1946
+ }
1947
+ };
1948
+ var __read = function(o, n) {
1949
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
1950
+ if (!m)
1951
+ return o;
1952
+ var i = m.call(o), r2, ar = [], e;
1953
+ try {
1954
+ while ((n === void 0 || n-- > 0) && !(r2 = i.next()).done) {
1955
+ ar.push(r2.value);
1956
+ }
1957
+ } catch (error) {
1958
+ e = {
1959
+ error
1960
+ };
1961
+ } finally {
1962
+ try {
1963
+ if (r2 && !r2.done && (m = i["return"]))
1964
+ m.call(i);
1965
+ } finally {
1966
+ if (e)
1967
+ throw e.error;
1968
+ }
1969
+ }
1970
+ return ar;
1971
+ };
1972
+ var __spread = function() {
1973
+ for (var ar = [], i = 0; i < arguments.length; i++) {
1974
+ ar = ar.concat(__read(arguments[i]));
1975
+ }
1976
+ return ar;
1977
+ };
1978
+ function useLockFn(fn) {
1979
+ var _this = this;
1980
+ var lockRef = useRef(false);
1981
+ return useCallback(function() {
1982
+ var args = [];
1983
+ for (var _i = 0; _i < arguments.length; _i++) {
1984
+ args[_i] = arguments[_i];
1985
+ }
1986
+ return __awaiter(_this, void 0, void 0, function() {
1987
+ var ret, e_1;
1988
+ return __generator(this, function(_a) {
1989
+ switch (_a.label) {
1990
+ case 0:
1991
+ if (lockRef.current)
1992
+ return [
1993
+ 2
1994
+ ];
1995
+ lockRef.current = true;
1996
+ _a.label = 1;
1997
+ case 1:
1998
+ _a.trys.push([1, 3, , 4]);
1999
+ return [
2000
+ 4,
2001
+ fn.apply(void 0, __spread(args))
2002
+ ];
2003
+ case 2:
2004
+ ret = _a.sent();
2005
+ lockRef.current = false;
2006
+ return [
2007
+ 2,
2008
+ ret
2009
+ ];
2010
+ case 3:
2011
+ e_1 = _a.sent();
2012
+ lockRef.current = false;
2013
+ throw e_1;
2014
+ case 4:
2015
+ return [
2016
+ 2
2017
+ ];
2018
+ }
2019
+ });
2020
+ });
2021
+ }, [fn]);
2022
+ }
2023
+ const overflowScrollReg = /scroll|auto/i;
2024
+ function isElement(node) {
2025
+ const ELEMENT_NODE_TYPE = 1;
2026
+ return node.tagName !== "HTML" && node.tagName !== "BODY" && node.nodeType === ELEMENT_NODE_TYPE;
2027
+ }
2028
+ function getScrollParent(el, root) {
2029
+ let node = el;
2030
+ while (node && node !== root && isElement(node)) {
2031
+ const { overflowY } = window.getComputedStyle(node);
2032
+ if (overflowScrollReg.test(overflowY)) {
2033
+ return node;
2034
+ }
2035
+ node = node.parentNode;
2036
+ }
2037
+ return root;
2038
+ }
2039
+ function Loading(props) {
2040
+ return /* @__PURE__ */ React.createElement("div", {
2041
+ style: {
2042
+ color: props.color || "#999"
2043
+ }
2044
+ }, /* @__PURE__ */ React.createElement("svg", {
2045
+ height: "1em",
2046
+ viewBox: "0 0 100 40",
2047
+ style: { verticalAlign: "-0.125em" }
2048
+ }, /* @__PURE__ */ React.createElement("g", {
2049
+ stroke: "none",
2050
+ strokeWidth: "1",
2051
+ fill: "none",
2052
+ fillRule: "evenodd"
2053
+ }, /* @__PURE__ */ React.createElement("g", {
2054
+ transform: "translate(-100.000000, -71.000000)"
2055
+ }, /* @__PURE__ */ React.createElement("g", {
2056
+ transform: "translate(95.000000, 71.000000)"
2057
+ }, /* @__PURE__ */ React.createElement("g", {
2058
+ transform: "translate(5.000000, 0.000000)"
2059
+ }, [0, 1, 2].map((i) => /* @__PURE__ */ React.createElement("rect", {
2060
+ key: i,
2061
+ fill: "currentColor",
2062
+ x: 20 + i * 26,
2063
+ y: "16",
2064
+ width: "8",
2065
+ height: "8",
2066
+ rx: "2"
2067
+ }, /* @__PURE__ */ React.createElement("animate", {
2068
+ attributeName: "y",
2069
+ from: "16",
2070
+ to: "16",
2071
+ dur: "2s",
2072
+ begin: `${i * 0.2}s`,
2073
+ repeatCount: "indefinite",
2074
+ values: "16; 6; 26; 16; 16",
2075
+ keyTimes: "0; 0.1; 0.3; 0.4; 1",
2076
+ id: "circ-anim"
2077
+ })))))))));
2078
+ }
2079
+ function isWindow(element) {
2080
+ return element === window;
2081
+ }
2082
+ function InfiniteScroll(props) {
2083
+ const { className, hasMore, loadMore, threshold = 0, style } = props;
2084
+ const doLoadMore = useLockFn(async () => {
2085
+ await loadMore();
2086
+ });
2087
+ const elementRef = useRef(null);
2088
+ const check = usePersistFn(() => {
2089
+ if (!hasMore)
2090
+ return;
2091
+ const element = elementRef.current;
2092
+ if (!element)
2093
+ return;
2094
+ const parent = getScrollParent(element);
2095
+ if (!parent)
2096
+ return;
2097
+ const elementTop = element.getBoundingClientRect().top;
2098
+ const current = isWindow(parent) ? window.innerHeight : parent.getBoundingClientRect().bottom;
2099
+ if (current >= elementTop - threshold) {
2100
+ doLoadMore();
2101
+ }
2102
+ });
2103
+ useEffect(() => {
2104
+ check();
2105
+ });
2106
+ useEffect(() => {
2107
+ const element = elementRef.current;
2108
+ if (!element)
2109
+ return;
2110
+ const parent = getScrollParent(element);
2111
+ if (!parent)
2112
+ return;
2113
+ function onScroll() {
2114
+ check();
2115
+ }
2116
+ parent.addEventListener("scroll", onScroll);
2117
+ return () => {
2118
+ parent.removeEventListener("scroll", onScroll);
2119
+ };
2120
+ }, []);
2121
+ return /* @__PURE__ */ React.createElement("div", {
2122
+ className: classNames({ [className]: true, "pda-infinite-scroll": true }),
2123
+ style,
2124
+ ref: elementRef
2125
+ }, hasMore ? /* @__PURE__ */ React.createElement("div", {
2126
+ className: "pda-infinite-scroll-view"
2127
+ }, /* @__PURE__ */ React.createElement("span", null, "\u52A0\u8F7D\u4E2D"), /* @__PURE__ */ React.createElement(Loading, null)) : /* @__PURE__ */ React.createElement("div", {
2128
+ className: "pda-infinite-scroll-view"
2129
+ }, /* @__PURE__ */ React.createElement("span", null, "\u6CA1\u6709\u66F4\u591A\u4E86~")));
2130
+ }
2131
+ var index$3 = "";
2132
+ function ActionSheet(props) {
2133
+ const { className = "", visible, actions = [], stickyToBottomActions = [], stickyToBottomDirection = "column", infiniteScroll = null } = props;
2134
+ return /* @__PURE__ */ React.createElement("div", {
2135
+ className: classNames({ [className]: true, "action-sheet": true, "show": visible })
2136
+ }, /* @__PURE__ */ React.createElement("div", {
2137
+ className: "action-sheet-container"
2138
+ }, /* @__PURE__ */ React.createElement("div", {
2139
+ className: "action-sheet-body"
2140
+ }, actions.map((item, index2) => {
2141
+ return /* @__PURE__ */ React.createElement("div", {
2142
+ onClick: () => {
2143
+ item.onClick(item.key);
2144
+ },
2145
+ className: "action-sheet-item",
2146
+ key: index2
2147
+ }, item.title);
2148
+ }), infiniteScroll ? /* @__PURE__ */ React.createElement(InfiniteScroll, __spreadValues({}, infiniteScroll)) : null), stickyToBottomActions.length > 0 ? /* @__PURE__ */ React.createElement("div", {
2149
+ className: classNames({ "action-sheet-sticky-bottom": true, ["action-sheet-sticky-bottom-" + stickyToBottomDirection]: true })
2150
+ }, stickyToBottomActions.map((item, index2) => {
2151
+ return /* @__PURE__ */ React.createElement("div", {
2152
+ onClick: () => {
2153
+ item.onClick(item.key);
2154
+ },
2155
+ className: "action-sheet-item",
2156
+ key: index2
2157
+ }, item.title);
2158
+ })) : null));
2159
+ }
2160
+ var index$2 = "";
2161
+ function Tag(props) {
2162
+ const { className = void 0, label = "label", type = "success" } = props;
2163
+ return /* @__PURE__ */ React.createElement("div", {
2164
+ className: classNames({ [className]: true, "pda-tag": true, ["pda-tag-" + type]: true })
2165
+ }, label);
2166
+ }
2167
+ var index$1 = "";
2168
+ function SimpleCard(props) {
2169
+ const { className = void 0, title = "", content = "", type = "default", onClick = () => {
2170
+ } } = props;
2171
+ return title || content ? /* @__PURE__ */ React.createElement("div", {
2172
+ className: classNames({ [className]: true, "simple-card": true, ["simple-card-" + type]: true }),
2173
+ onClick
2174
+ }, /* @__PURE__ */ React.createElement("p", {
2175
+ className: "simple-card-title"
2176
+ }, title), /* @__PURE__ */ React.createElement("p", {
2177
+ className: "simple-card-content"
2178
+ }, content)) : null;
2179
+ }
2180
+ var index = "";
2181
+ function SimpleCardBlock(props) {
2182
+ const { className = void 0, dataSource = [], title = "", tag } = props;
2183
+ return /* @__PURE__ */ React.createElement("div", {
2184
+ className: classNames({ [className]: true, "simple-card-block": true })
2185
+ }, /* @__PURE__ */ React.createElement("div", {
2186
+ className: "simple-card-block-header"
2187
+ }, /* @__PURE__ */ React.createElement("p", {
2188
+ className: "simple-card-block-title"
2189
+ }, title), tag ? /* @__PURE__ */ React.createElement("div", {
2190
+ style: { marginLeft: 12 }
2191
+ }, /* @__PURE__ */ React.createElement(Tag, __spreadValues({}, tag))) : null), dataSource.length > 0 ? /* @__PURE__ */ React.createElement("div", {
2192
+ className: "simple-card-block-content"
2193
+ }, dataSource.map((item, index2) => {
2194
+ return /* @__PURE__ */ React.createElement(SimpleCard, __spreadValues({
2195
+ key: index2
2196
+ }, item));
2197
+ }), /* @__PURE__ */ React.createElement("div", {
2198
+ style: { display: "inline-block", padding: "12px 18px" }
2199
+ }), /* @__PURE__ */ React.createElement("div", {
2200
+ style: { display: "inline-block", padding: "0 18px", margin: 0 }
2201
+ })) : null);
2202
+ }
2203
+ const ListItem = PdaListItem;
2204
+ export { ActionSheet, index$5 as AppList, BaseLayout, Button, Confirm, PdaDistanceCard as DistanceCard, PdaFinishCard as FinishCard, index$q as Header, InfiniteScroll, PdaInfoCard$2 as InfoCard, Keyborard, List, ListItem, Overlay$1 as Overlay, index$h as PageFlowSystemPages, Presentation, SelectCard, SimpleCard, SimpleCardBlock, PdaInfoCard as Steps, SubCard, Tag, PdaListItem as TaskCard, PdaTitle as Title, Toast, WakeKeyborard };